/* v2 student — роль УЧЕНИКА. Все правила — под html[data-yt-role="student"].
   Цвета — только токены темы. Цвета карты знаний: зелёный = --sage, жёлтый = --gold,
   красный = --rose, серый = «не начато». */

html[data-yt-role="student"]{
  /* уровни освоения: Освоил / Умею / Знаком / Пробел / Не начато */
  --st-mastered: var(--sage);
  --st-good: color-mix(in srgb, var(--sage) 55%, var(--surface));
  --st-learning: var(--gold);
  --st-gapc: var(--rose);
  --st-none: color-mix(in srgb, var(--ink) 22%, transparent);
  --st-gap: 16px;
}
/* в авто-тёмной теме у статусов карты знаний были светлые (тёмные на тёмном) цвета текста */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"])[data-yt-role="student"]{
    --lvi-mastered:#7FDCA5; --lvi-good:#A9C3F2; --lvi-learning:#F6C565; --lvi-gap:#FF9C85;
    --lv-unknown: rgba(237,243,236,0.16);
  }
}

/* ---------- общие кусочки ---------- */
html[data-yt-role="student"] .st-dot{ display:inline-block; width:10px; height:10px; border-radius:50%; flex:none; background:var(--st-none); }
html[data-yt-role="student"] .st-dot.st-mastered, html[data-yt-role="student"] .st-bar .st-mastered{ background:var(--st-mastered); }
html[data-yt-role="student"] .st-dot.st-good, html[data-yt-role="student"] .st-bar .st-good{ background:var(--st-good); }
html[data-yt-role="student"] .st-dot.st-learning, html[data-yt-role="student"] .st-bar .st-learning{ background:var(--st-learning); }
html[data-yt-role="student"] .st-dot.st-gap, html[data-yt-role="student"] .st-bar .st-gap{ background:var(--st-gapc); }
html[data-yt-role="student"] .st-dot.st-good{ box-shadow:inset 0 0 0 1.5px var(--st-mastered); }
html[data-yt-role="student"] .st-legend{ display:flex; flex-wrap:wrap; gap:4px 16px; font-size:13px; color:var(--ink-soft); }
html[data-yt-role="student"] .st-legend > span{ display:inline-flex; align-items:center; gap:8px; min-height:20px; }
html[data-yt-role="student"] .st-legend b{ color:var(--ink); font-weight:800; }
html[data-yt-role="student"] .st-h{ font-family:var(--font-body); font-size:17px; font-weight:800; color:var(--ink); margin:24px 0 8px; }

/* ================= ГЛАВНАЯ ================= */
html[data-yt-role="student"] #v91Hero .v91-topic{ display:none !important; }
/* мягкая подпись под серией */
html[data-yt-role="student"] #v91Hero .v91-head{ flex-wrap:wrap; row-gap:4px; }
html[data-yt-role="student"] #v91Hero .st-streak-note{ flex:0 0 100%; margin:0; text-align:right; font-size:13px; font-weight:600; color:var(--ink-soft); line-height:1.35; }
/* подсказка к игровому слову: пузырь с хвостиком под плашкой, один раз */
html[data-yt-role="student"] .st-tip{
  --st-arrow:50%;
  position:relative; display:flex; align-items:center; gap:8px; margin-top:12px; padding:8px 4px 8px 16px;
  border-radius:var(--ds-r-m); background:var(--ink); color:var(--paper); font-size:14px; line-height:1.4; font-weight:600;
  animation:st-tip-in .25s ease both;
}
html[data-yt-role="student"] .st-tip::before{ content:''; position:absolute; top:-6px; left:var(--st-arrow); width:12px; height:12px; margin-left:-6px;
  background:var(--ink); transform:rotate(45deg); border-radius:2px; }
html[data-yt-role="student"] .st-tip-t{ flex:1; min-width:0; }
html[data-yt-role="student"] .st-tip-x{ flex:none; width:44px; height:44px; display:flex; align-items:center; justify-content:center; border:0; border-radius:50%;
  background:transparent; color:var(--paper); cursor:pointer; }
html[data-yt-role="student"] .st-tip-x:hover{ background:color-mix(in srgb, var(--paper) 14%, transparent); }
html[data-yt-role="student"] .st-tip-x .ico{ width:18px; height:18px; }
html[data-yt-role="student"] #v91Hero .v91-chips > .st-tip{ grid-column:1 / -1; margin-top:4px; }
html[data-yt-role="student"] #v91Hero .v91-head > .st-tip{ flex:0 0 100%; margin-top:8px; }
html[data-yt-role="student"] #practiceGameBar + .st-tip{ margin:8px 0 4px; }
@keyframes st-tip-in{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce){ html[data-yt-role="student"] .st-tip{ animation:none; } }

/* ================= УЧЁБА ================= */
/* предметы: подзаголовок и Юпи-подсказка внизу — лишние, главное наверху */
html[data-yt-role="student"] #screen-practice[data-st-view="subjects"] > p.muted,
html[data-yt-role="student"] #screen-practice[data-st-view="subjects"] #practiceBuddy{ display:none !important; }
html[data-yt-role="student"] #screen-practice[data-st-view="subjects"] > .screen-title{ margin-bottom:12px; }
/* игры дублировались в строке энергии — они есть во вкладке «Игры» */
html[data-yt-role="student"] #practiceGameBar #gbBubbles,
html[data-yt-role="student"] #practiceGameBar #gbCode,
html[data-yt-role="student"] #practiceGameBar #gbLogic,
html[data-yt-role="student"] #practiceGameBar #gbSort{ display:none !important; }
html[data-yt-role="student"] #screen-practice > .eyebrow{ display:none; }
html[data-yt-role="student"] #practiceGameBar .game-bar{ flex-wrap:nowrap; gap:6px; overflow-x:auto; scrollbar-width:none; }
html[data-yt-role="student"] #practiceGameBar .game-bar::-webkit-scrollbar{ display:none; }
html[data-yt-role="student"] #practiceGameBar .gb-chip{ flex:none; }
@media (max-width:420px){ html[data-yt-role="student"] #practiceGameBar .gb-chip{ padding-left:10px; padding-right:10px; } }
html[data-yt-role="student"] #pvTabs{ margin-top:12px; margin-bottom:16px; }

/* внутри темы шапка «Учёба» не нужна: одна задача на экране */
html[data-yt-role="student"] #screen-practice[data-st-view="topics"] > p.muted,
html[data-yt-role="student"] #screen-practice[data-st-view="theory"] > p.muted,
html[data-yt-role="student"] #screen-practice[data-st-view="exercise"] > p.muted,
html[data-yt-role="student"] #screen-practice[data-st-view="results"] > p.muted,
html[data-yt-role="student"] #screen-practice[data-st-view="theory"] > .eyebrow,
html[data-yt-role="student"] #screen-practice[data-st-view="exercise"] > .eyebrow,
html[data-yt-role="student"] #screen-practice[data-st-view="results"] > .eyebrow,
html[data-yt-role="student"] #screen-practice[data-st-view="theory"] > .screen-title,
html[data-yt-role="student"] #screen-practice[data-st-view="exercise"] > .screen-title,
html[data-yt-role="student"] #screen-practice[data-st-view="results"] > .screen-title,
html[data-yt-role="student"] #screen-practice[data-st-view="theory"] #practiceGameBar,
html[data-yt-role="student"] #screen-practice[data-st-view="results"] #practiceGameBar,
html[data-yt-role="student"] #screen-practice[data-st-view="theory"] #practiceBuddy,
html[data-yt-role="student"] #screen-practice[data-st-view="results"] #practiceBuddy,
html[data-yt-role="student"] #screen-practice[data-st-view="topics"] #practiceBuddy{ display:none !important; }

/* «Назад» внутри учёбы (к темам / к предметам) остаётся всегда: шапка экрана спрятана,
   и v92 считал эту кнопку «шапочной» и прятал */
html[data-yt-role="student"] #practiceContent > .v92-back[hidden]{ display:inline-flex !important; }

/* «Продолжить» + «Карта знаний» */
html[data-yt-role="student"] .st-learn-top{ display:grid; grid-template-columns:1fr; gap:12px; margin:0 0 8px; }
html[data-yt-role="student"] .st-learn-top[hidden]{ display:none; }
@media (min-width:900px){
  html[data-yt-role="student"] .st-learn-top{ grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:16px; }
}
html[data-yt-role="student"] .st-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--ds-r-l);
  padding:20px; display:flex; flex-direction:column; gap:8px; min-width:0; box-sizing:border-box;
}
html[data-yt-role="student"] .st-skel{ min-height:180px; background:var(--surface-2); border-color:transparent; }
html[data-yt-role="student"] .st-cont{ background:var(--ds-main-bg, var(--surface)); border-color:color-mix(in srgb, var(--teal) 35%, var(--border)); }
html[data-yt-role="student"] .st-eyebrow{ font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-soft); }
html[data-yt-role="student"] .st-cont-t{ font-family:var(--font-brand); font-size:24px; line-height:1.2; color:var(--ink); overflow-wrap:anywhere; }
html[data-yt-role="student"] .st-cont-s{ display:flex; align-items:center; gap:8px; font-size:14px; color:var(--ink-soft); line-height:1.4; }
html[data-yt-role="student"] .st-card .st-go{ margin-top:auto; width:100%; min-height:52px; font-size:16px; gap:8px; }
html[data-yt-role="student"] .st-card .st-go .ico{ width:20px; height:20px; }
html[data-yt-role="student"] .st-cont .st-cont-s + .st-go{ margin-top:8px; }

html[data-yt-role="student"] .st-map-head{ display:flex; align-items:center; gap:12px; }
html[data-yt-role="student"] .st-map-ic{ width:44px; height:44px; flex:none; border-radius:var(--ds-r-s); display:flex; align-items:center; justify-content:center;
  background:var(--surface-2); color:var(--ink); }
html[data-yt-role="student"] .st-map-ic .ico{ width:22px; height:22px; }
html[data-yt-role="student"] .st-map-t{ display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
html[data-yt-role="student"] .st-map-t b{ font-size:17px; font-weight:800; color:var(--ink); }
html[data-yt-role="student"] .st-map-t small{ font-size:13px; color:var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html[data-yt-role="student"] .st-link{ min-height:44px; padding:0 12px; border:0; border-radius:var(--ds-r-s); background:transparent; color:var(--teal-strong);
  font:inherit; font-size:14px; font-weight:800; cursor:pointer; flex:none; }
html[data-yt-role="student"] .st-link:hover{ background:var(--surface-2); }
html[data-yt-role="student"] .st-bar{ display:flex; gap:3px; height:12px; border-radius:99px; overflow:hidden; margin-top:4px; }
html[data-yt-role="student"] .st-bar i{ display:block; min-width:6px; }
html[data-yt-role="student"] .st-bar .st-none{ background:var(--st-none); }
html[data-yt-role="student"] .st-map .st-legend{ margin-top:4px; }
html[data-yt-role="student"] .st-map-empty{ margin:4px 0 0; font-size:13px; line-height:1.6; color:var(--ink-soft); }
html[data-yt-role="student"] .st-map-empty .st-nw{ white-space:nowrap; }
html[data-yt-role="student"] .st-map-empty .st-dot{ vertical-align:-1px; margin-left:2px; }
html[data-yt-role="student"] .st-map .st-map-empty + .st-map-btn{ margin-top:8px; }
html[data-yt-role="student"] .st-map-btn{ margin-top:auto; width:100%; min-height:48px; gap:8px; }
html[data-yt-role="student"] .st-map .st-legend + .st-map-btn{ margin-top:8px; }

/* «Все предметы»: заголовок, класс, сетка; «Тема не идёт?» — под сеткой */
html[data-yt-role="student"] #practiceContent > .pg-row{ margin-bottom:12px; }
html[data-yt-role="student"] #practiceContent > .ps-grid + #v91Help{ margin-top:16px; }

/* тропинка тем: спокойные заголовки разделов, узлы — цветом карты знаний */
html[data-yt-role="student"] .v74-path .pt-section{
  background:transparent !important; color:var(--ink-soft) !important; box-shadow:none !important;
  padding:0 !important; margin:8px 0 16px !important; border-radius:0;
  font-family:var(--font-body) !important; font-size:13px !important; font-weight:800 !important;
  letter-spacing:.08em; text-transform:uppercase; text-align:center;
}
html[data-yt-role="student"] .v74-path .pt-block + .pt-block{ margin-top:32px; }
/* узлы тропинки по уровню карты знаний (единый источник); узел ▶ — самая слабая тема */
html[data-yt-role="student"] .topic-row[data-st-lv="mastered"] .v74-node{ background:color-mix(in srgb, var(--st-mastered) 30%, var(--surface)); border-color:var(--st-mastered); color:var(--ink); box-shadow:0 6px 0 var(--st-mastered); }
html[data-yt-role="student"] .topic-row[data-st-lv="good"] .v74-node{ background:color-mix(in srgb, var(--st-mastered) 14%, var(--surface)); border-color:var(--st-mastered); color:var(--ink); box-shadow:0 6px 0 var(--st-good); }
html[data-yt-role="student"] .topic-row[data-st-lv="learning"] .v74-node{ background:color-mix(in srgb, var(--st-learning) 26%, var(--surface)); border-color:var(--st-learning); color:var(--ink); box-shadow:0 6px 0 var(--st-learning); }
html[data-yt-role="student"] .topic-row[data-st-lv="gap"] .v74-node{ background:color-mix(in srgb, var(--st-gapc) 24%, var(--surface)); border-color:var(--st-gapc); color:var(--ink); box-shadow:0 6px 0 var(--st-gapc); }
html[data-yt-role="student"] .topic-row.v74-cur[data-st-lv] .v74-node{ background:var(--teal); color:var(--teal-ink); }
html[data-yt-role="student"] .topic-row.v74-cur[data-st-lv="gap"] .v74-node{ box-shadow:0 7px 0 var(--st-gapc), 0 0 0 9px color-mix(in srgb, var(--st-gapc) 30%, transparent); border-color:var(--st-gapc); }
html[data-yt-role="student"] .topic-row.v74-cur[data-st-lv="learning"] .v74-node{ box-shadow:0 7px 0 var(--st-learning), 0 0 0 9px color-mix(in srgb, var(--st-learning) 30%, transparent); border-color:var(--st-learning); }
/* «освоено» старой системы уровней — прячем: уровень показывает карта знаний */
html[data-yt-role="student"] .topic-row[data-st-lv] .mastered-tag{ display:none !important; }
html[data-yt-role="student"] .topic-row[data-st-lv="gap"]:not(.v74-cur) .v74-node svg{ display:none; }
html[data-yt-role="student"] .topic-row[data-st-lv="gap"]:not(.v74-cur) .v74-node::after{ content:'!'; font-family:var(--font-body); font-size:30px; font-weight:900; line-height:1; }
html[data-yt-role="student"] .st-lv-tag{ display:inline-flex; align-items:center; gap:4px; margin-left:8px; padding:2px 8px; border-radius:99px; font-size:12px; font-weight:800; vertical-align:2px;
  color:var(--ink); border:1.5px solid var(--st-none); white-space:nowrap; }
html[data-yt-role="student"] .st-lv-tag.st-mastered{ border-color:var(--st-mastered); background:color-mix(in srgb, var(--st-mastered) 16%, transparent); }
html[data-yt-role="student"] .st-lv-tag.st-good{ border-color:var(--st-mastered); }
html[data-yt-role="student"] .st-lv-tag.st-learning{ border-color:var(--st-learning); background:color-mix(in srgb, var(--st-learning) 16%, transparent); }
html[data-yt-role="student"] .st-lv-tag.st-gap{ border-color:var(--st-gapc); background:color-mix(in srgb, var(--st-gapc) 16%, transparent); }
/* «НАЧАТЬ» над узлом наезжал на строку предыдущей темы — крупного узла с ▶ достаточно */
html[data-yt-role="student"] .v74-start{ display:none !important; }
html[data-yt-role="student"] .v74-cur{ margin-top:8px !important; }
html[data-yt-role="student"] .st-path-legend{ justify-content:center; margin:0 0 24px; }
/* на экране тем: одна главная кнопка + карта; дуэль и рейтинг предмета — в своих разделах меню */
html[data-yt-role="student"] #practiceDuelBtn,
html[data-yt-role="student"] #practiceRatingBtn{ display:none !important; }

/* теория: одна кнопка «к заданиям» (вторая вела туда же) */
html[data-yt-role="student"] #thSkip{ display:none !important; }

/* задание: подсказка репетитора и обратная связь — с воздухом */
html[data-yt-role="student"] #practiceContent .quiz-react{ margin-top:16px; }
html[data-yt-role="student"] #practiceContent .pr-skill{ margin-top:8px; }
html[data-yt-role="student"] #practiceContent #practiceNext{ margin-top:16px; width:100%; max-width:420px; }

/* итоги темы */
html[data-yt-role="student"] #practiceContent .v76-done + #practiceResultTutors:not(:empty){ margin-top:16px; }
html[data-yt-role="student"] .st-tutor-hint{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:16px; border-radius:var(--ds-r-m);
  background:var(--surface); border:1px solid var(--border); border-left:4px solid var(--st-learning);
}
html[data-yt-role="student"] .st-tutor-ic{ width:40px; height:40px; flex:none; border-radius:var(--ds-r-s); background:var(--surface-2); display:flex; align-items:center; justify-content:center; color:var(--ink); }
html[data-yt-role="student"] .st-tutor-t{ flex:1 1 220px; min-width:0; display:flex; flex-direction:column; gap:4px; }
html[data-yt-role="student"] .st-tutor-t b{ font-size:15px; color:var(--ink); }
html[data-yt-role="student"] .st-tutor-t small{ font-size:13px; color:var(--ink-soft); line-height:1.4; }
html[data-yt-role="student"] .st-tutor-hint .btn{ flex:none; min-height:44px; }
@media (max-width:560px){ html[data-yt-role="student"] .st-tutor-hint .btn{ width:100%; } }

/* ================= КАРТА ЗНАНИЙ (окно) ================= */
html[data-yt-role="student"] #lhBox > .lv-legend{ display:none; }
html[data-yt-role="student"] #lhBox > .lv-legend .lv-due{ display:none; }
html[data-yt-role="student"] #lhBox > .lv-sum{ height:12px; margin-top:8px; }
html[data-yt-role="student"] #lhBox .lv-sum i.lv-mastered{ background:var(--st-mastered); }
html[data-yt-role="student"] #lhBox .lv-sum i.lv-good{ background:var(--st-good); }
html[data-yt-role="student"] #lhBox .lv-sum i.lv-learning{ background:var(--st-learning); }
html[data-yt-role="student"] #lhBox .lv-sum i.lv-gap{ background:var(--st-gapc); }
/* «Твой следующий шаг» */
html[data-yt-role="student"] #lhBox .st-next{ display:flex; flex-direction:column; gap:8px; margin-top:16px; padding:16px; border-radius:var(--ds-r-m);
  background:var(--ds-main-bg, var(--surface-2)); border:1px solid color-mix(in srgb, var(--teal) 35%, var(--border)); }
html[data-yt-role="student"] #lhBox .st-next-t{ font-family:var(--font-brand); font-size:20px; line-height:1.2; color:var(--ink); overflow-wrap:anywhere; }
html[data-yt-role="student"] #lhBox .st-next-go{ width:100%; min-height:52px; gap:4px 8px; margin-top:4px; flex-wrap:wrap; }
html[data-yt-role="student"] #lhBox .st-next-go small{ font-size:13px; font-weight:700; opacity:.9; white-space:nowrap; }
html[data-yt-role="student"] #lhBox .st-next-go small::before{ content:'· '; }
@media (max-width:699px){
  html[data-yt-role="student"] #lhBox .st-next-go{ padding-top:8px; padding-bottom:8px; }
  html[data-yt-role="student"] #lhBox .st-next-go small{ flex-basis:100%; text-align:center; }
  html[data-yt-role="student"] #lhBox .st-next-go small::before{ content:none; }
}
@media (min-width:700px){ html[data-yt-role="student"] #lhBox .st-next-go{ width:auto; align-self:flex-start; padding-left:24px; padding-right:24px; } }
/* кнопка «Закрыть пробел» под темой */
html[data-yt-role="student"] #lhBox .st-gap-btn{ display:inline-flex; align-items:center; gap:8px; min-height:44px; margin:0 0 8px 16px; padding:0 16px;
  border-radius:99px; border:1.5px solid var(--border); background:var(--surface); color:var(--ink); font:inherit; font-size:14px; font-weight:800; cursor:pointer; }
html[data-yt-role="student"] #lhBox .st-gap-btn:hover{ border-color:var(--teal); }
html[data-yt-role="student"] #lhBox .st-gap-btn .ico{ width:16px; height:16px; color:var(--teal-strong); }
html[data-yt-role="student"] #lhBox .lm-topic[data-st-lv="gap"] + .st-gap-btn{ border-color:color-mix(in srgb, var(--st-gapc) 60%, var(--border)); }
html[data-yt-role="student"] #lhBox .st-lh-legend{ margin:8px 0 4px; }
html[data-yt-role="student"] #lhBox .lh-head{ gap:8px; }
html[data-yt-role="student"] #lhBox .lh-tabs{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px; margin-top:12px; }
@media (max-width:520px){ html[data-yt-role="student"] #lhBox .lh-tabs{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
html[data-yt-role="student"] #lhBox .lh-tabs .pill-opt{ min-width:0; min-height:44px; padding:0 8px; font-size:14px; white-space:nowrap; margin:0; }
html[data-yt-role="student"] #lhBox .lm-filter{ margin-bottom:8px; }
html[data-yt-role="student"] #lhBox .lm-sec{ margin-top:16px; }
html[data-yt-role="student"] #lhBox .lm-sec-t{ margin-bottom:4px; }
html[data-yt-role="student"] #lhBox .lm-topic{ min-height:56px; padding:8px 8px 8px 16px; position:relative; border-radius:var(--ds-r-s); }
html[data-yt-role="student"] #lhBox .lm-topic:hover{ background:var(--surface-2); }
html[data-yt-role="student"] #lhBox .lm-topic::before{ content:''; position:absolute; left:2px; top:12px; bottom:12px; width:5px; border-radius:4px; background:var(--st-none); }
html[data-yt-role="student"] #lhBox .lm-topic[data-st-lv="mastered"]::before{ background:var(--st-mastered); }
html[data-yt-role="student"] #lhBox .lm-topic[data-st-lv="good"]::before{ background:var(--st-good); }
html[data-yt-role="student"] #lhBox .lm-topic[data-st-lv="learning"]::before{ background:var(--st-learning); }
html[data-yt-role="student"] #lhBox .lm-topic[data-st-lv="gap"]::before{ background:var(--st-gapc); }
html[data-yt-role="student"] #lhBox .lm-topic[data-st-lv="gap"]{ background:color-mix(in srgb, var(--st-gapc) 9%, transparent); }
html[data-yt-role="student"] #lhBox .lm-side .lv-bar{ display:none; }
html[data-yt-role="student"] #lhBox .lm-side{ display:flex; align-items:center; justify-content:flex-end; }
html[data-yt-role="student"] #lhBox .lm-side .lv-due{ white-space:nowrap; }
html[data-yt-role="student"] #lhBox .lh-share{ display:flex; align-items:flex-start; gap:8px; margin-top:16px; font-size:13px; color:var(--ink-soft); line-height:1.4; }
html[data-yt-role="student"] #lhBox .lh-share input{ width:18px; height:18px; flex:none; margin-top:1px; }
html[data-yt-role="student"] #lhBox details.st-how{ margin-top:8px; font-size:13px; color:var(--ink-soft); }
html[data-yt-role="student"] #lhBox details.st-how > summary{ min-height:44px; display:flex; align-items:center; cursor:pointer; font-weight:700; color:var(--ink-soft); }
html[data-yt-role="student"] #lhBox details.st-how > .lh-how{ margin:0 0 8px; }

/* ================= ДУЭЛИ ================= */
/* случайный соперник спрятан, пока игроков мало (кнопка остаётся в DOM — на неё завязан код) */
html[data-yt-role="student"] #duelRandom{ display:none !important; }
html[data-yt-role="student"] #duelsContent .duel-hero{ padding:16px 20px; }
html[data-yt-role="student"] #duelsContent .duel-hero .duel-vs{ transform:scale(.8); margin:-8px 0; }
html[data-yt-role="student"] #duelsContent .duel-hero p{ margin-top:8px; line-height:1.45; }
html[data-yt-role="student"] #duelsContent .section-head{ margin-top:24px; }
html[data-yt-role="student"] #duelFilter details.st-more{ margin-top:12px; }
html[data-yt-role="student"] #duelFilter details.st-more > summary{ min-height:44px; display:flex; align-items:center; gap:8px; cursor:pointer;
  font-weight:800; font-size:14px; color:var(--teal-strong); list-style:none; }
html[data-yt-role="student"] #duelFilter details.st-more > summary::-webkit-details-marker{ display:none; }
html[data-yt-role="student"] #duelFilter details.st-more > summary::after{ content:'▾'; font-size:12px; }
html[data-yt-role="student"] #duelFilter details.st-more[open] > summary::after{ content:'▴'; }
html[data-yt-role="student"] #duelFilter .st-more-b{ display:flex; flex-direction:column; gap:8px; padding-top:4px; }
html[data-yt-role="student"] #duelFilter .gf-sum{ margin-top:12px; }
html[data-yt-role="student"] #duelsContent .dl-row{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; }
html[data-yt-role="student"] #duelsContent .dl-row .dl-chip{ min-height:64px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; text-align:center; padding:8px; }
html[data-yt-role="student"] #duelsContent .dl-row .dl-chip small{ display:none; }
html[data-yt-role="student"] #duelsContent .dl-row .dl-chip b{ position:static !important; order:0; }
html[data-yt-role="student"] #duelsContent .dl-row .dl-chip .dl-pts{ position:static !important; order:1; font-size:13px; }
html[data-yt-role="student"] #duelsContent > .btn-row{ margin-top:16px; }
html[data-yt-role="student"] #duelsContent > .btn-row #duelFriend{ width:100%; min-height:52px; gap:8px; }
html[data-yt-role="student"] #duelsContent .st-join-l{ margin-top:16px; font-size:13px; font-weight:700; color:var(--ink-soft); }
html[data-yt-role="student"] #duelsContent .st-join{ margin-top:8px !important; }
html[data-yt-role="student"] #duelsContent .st-join input{ min-height:44px; box-sizing:border-box; }

/* ================= ПРОФИЛЬ УЧЕНИКА ================= */
/* счётчики «записи / отзывов / в избранном» и плитки-дубли меню ученику не нужны */
html[data-yt-role="student"] #screen-student-profile .stat-row,
html[data-yt-role="student"] #screen-student-profile .feature-tile-row,
html[data-yt-role="student"] #screen-student-profile .feature-tile-row + *:empty{ display:none !important; }
html[data-yt-role="student"] #screen-student-profile .section-head:has(+ .feature-tile-row){ display:none !important; }
html[data-yt-role="student"] #screen-student-profile > .card,
html[data-yt-role="student"] #screen-student-profile > .section-head{ margin-top:16px; }
html[data-yt-role="student"] #screen-student-profile > .section-head{ margin-top:24px; }

/* ================= РЕЙТИНГ ================= */
html[data-yt-role="student"] #screen-game #gameTabContent > .chip-row{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; padding-bottom:4px; }
html[data-yt-role="student"] #screen-game #gameTabContent > .chip-row::-webkit-scrollbar{ display:none; }
html[data-yt-role="student"] #screen-game #gameTabContent > .chip-row .chip{ flex:none; }
html[data-yt-role="student"] #screen-game #gameTabContent > * + *{ margin-top:12px; }

/* ================= МОИ УРОКИ / ДЗ / ТЕСТЫ / БИБЛИОТЕКА ================= */
html[data-yt-role="student"] #screen-homework #hwList,
html[data-yt-role="student"] #screen-tests #testsList{ gap:12px; }
html[data-yt-role="student"] #screen-library .material-list{ gap:8px; }

/* ================= ИГРЫ ЮПИ (код / детектив / сортировка) — bugstudent ================= */
/* внутри уровня было ДВЕ кнопки «Назад» подряд: «к Юпи» (экрана) и «все уровни» (шапки уровня).
   Внутри уровня оставляем только вторую — она ведёт к списку уровней, а оттуда первая — к Юпи. */
html[data-yt-role="student"] #screen-code.in-level > #cgBack,
html[data-yt-role="student"] #screen-logic.in-task > #dtBack,
html[data-yt-role="student"] #screen-sort.in-round > #srtBack{ display:none !important; }
/* «Юпики сегодня: осталось 6 из 6…» разваливалось на три колонки (flex по текстовым кускам) */
html[data-yt-role="student"] .dt-daily{ display:block !important; line-height:1.45; font-size:13px; font-weight:600; color:var(--ink-soft);
  padding:10px 12px; border-radius:var(--ds-r-m, 14px); background:var(--surface); border:1px solid var(--border); margin:12px 0 !important; }
html[data-yt-role="student"] .dt-daily > .ico{ display:inline-flex; vertical-align:-3px; margin-right:6px; color:var(--teal-strong); }
html[data-yt-role="student"] .dt-daily b{ color:var(--ink); }
/* окна итогов: подпись над заголовком — по центру, как и всё окно */
html[data-yt-role="student"] #overlayGeneric .cg-win > .eyebrow{ margin-left:auto !important; margin-right:auto !important; }
/* выбор в детективе: заголовок — по левому краю, как подпись и варианты */
html[data-yt-role="student"] #overlayGeneric .dt-pick h3{ text-align:left; margin-top:4px; }
/* сортировка: выделение было старым синим (--pen) — теперь акцент */
html[data-yt-role="student"] .srt-item.sel{ background:var(--teal) !important; border-color:var(--teal) !important; color:var(--teal-ink) !important; }
html[data-yt-role="student"] .srt-bin{ border-radius:var(--ds-r-m, 14px); }
html[data-yt-role="student"] .srt-bin.active{ border-color:var(--teal) !important; }
html[data-yt-role="student"] .srt-drop{ background:color-mix(in srgb, var(--teal) 16%, var(--surface)) !important; color:var(--teal-strong) !important;
  border:1.5px dashed var(--teal) !important; border-radius:var(--ds-r-s, 10px) !important; min-height:44px; font:800 14px var(--font-body) !important; }

/* ================= «Ура, новая стадия!» (#overlayPetLevel) — bugstudent ================= */
html[data-yt-role="student"] #overlayPetLevel .overlay-sheet{ text-align:center; }
html[data-yt-role="student"] #overlayPetLevel .levelup{ display:flex; flex-direction:column; align-items:center; gap:4px; padding:4px 4px 8px; position:relative; z-index:1; }
html[data-yt-role="student"] #overlayPetLevel .levelup .eyebrow{ display:inline-flex; margin:0 auto 2px; padding:4px 12px; border-radius:999px;
  background:color-mix(in srgb, var(--teal) 16%, transparent); color:var(--teal-strong); }
html[data-yt-role="student"] #overlayPetLevel .levelup .yupi{ width:min(190px, 52vw); height:auto; margin:-6px auto -10px; }
html[data-yt-role="student"] #overlayPetLevel .levelup h2{ font-family:var(--font-brand); font-size:22px; line-height:1.2; margin:4px 0 0; }
html[data-yt-role="student"] #overlayPetLevel .levelup p{ max-width:34ch; margin-left:auto; margin-right:auto; }
html[data-yt-role="student"] #overlayPetLevel #petLevelOk{ width:100%; min-height:52px; }
/* конфетти долетало до низа и оставалось там полоской — теперь гаснет */
html[data-yt-role="student"] #overlayPetLevel .confetti i{ animation-name:stConf; }
@keyframes stConf{ 80%{ opacity:1; } to{ transform:translateY(380px) rotate(540deg); opacity:0; } }
html.is-desktop-browser[data-yt-role="student"] #overlayPetLevel .overlay-sheet{ max-width:440px !important; }
html.is-desktop-browser[data-yt-role="student"] #overlayPetLevel .sheet-handle{ display:none; }
/* «Учиться дальше»: тема стоит отдельной строкой — точка «· » в её начале лишняя */
html[data-yt-role="student"] #v91Hero .v91-go small.st-go-topic::before{ content:none; }
/* одно обучение, а не два: карточка «Как тут всё устроено» не показывается, пока идёт экскурсия
   и после того как её прошли/пропустили (памятка — в Профиле) */
html.st-tour-on[data-yt-role="student"] #roleGuideHome,
html.st-tour-done[data-yt-role="student"] #roleGuideHome{ display:none !important; }

/* «Ещё для Юпи» — свёрнутый блок внизу экрана Юпи */
.st-petmore{ margin-top:22px; border:1.5px solid var(--border); border-radius:var(--ds-r-m,16px); background:var(--surface); }
.st-petmore > summary{ cursor:pointer; list-style:none; padding:14px 16px; min-height:44px; font-weight:800; font-size:15px; color:var(--ink); display:flex; flex-direction:column; gap:2px; }
.st-petmore > summary::-webkit-details-marker{ display:none; }
.st-petmore > summary::after{ content:'▾'; position:absolute; }
.st-petmore{ position:relative; }
.st-petmore > summary::after{ right:16px; top:14px; color:var(--ink-soft); }
.st-petmore[open] > summary::after{ content:'▴'; }
.st-petmore > summary small{ font-weight:500; font-size:12.5px; color:var(--ink-soft); }
.st-petmore-body{ padding:0 14px 16px; display:flex; flex-direction:column; gap:18px; }

/* v101: ряд вкладок «Учёбы» на экране дуэлей */
#screen-duels > .st-duel-tabs{ margin:14px 0 6px; }
/* v101: плашка ближайшего урока на главной */
.st-lesson-pill{ display:flex; align-items:center; gap:10px; width:100%; min-height:48px; margin:0 0 14px; padding:8px 16px; border:1px solid color-mix(in srgb, var(--teal) 40%, var(--border)); border-radius:var(--ds-r-m, 16px); background:color-mix(in srgb, var(--teal) 12%, var(--surface)); color:var(--ink); font:600 14.5px/1.35 var(--font-body); text-align:left; cursor:pointer; }
.st-lesson-pill .st-lp-ic{ display:inline-flex; color:var(--teal-strong, var(--teal)); }
.st-lesson-pill .st-lp-ic .ico, .st-lesson-pill .st-lp-ic svg{ width:20px; height:20px; }
/* v101: на «Дуэлях» вкладки вместо кнопки «Назад» */
#screen-duels > [data-back="practice"]{ display:none !important; }


/* v101: три цвета на карте знаний — «Умею» тем же зелёным, что «Освоил» */
html[data-yt-role="student"]{ --st-good: var(--st-mastered); }
html[data-yt-role="student"] .st-dot.st-good{ box-shadow:none; }
html[data-yt-role="student"] .topic-row[data-st-lv="good"] .v74-node{ background:color-mix(in srgb, var(--st-mastered) 30%, var(--surface)); box-shadow:0 6px 0 var(--st-mastered); }
html[data-yt-role="student"] .st-lv-tag.st-good{ background:color-mix(in srgb, var(--st-mastered) 16%, transparent); }
