:root{
  --bg:#f7f5ff;
  --card:#ffffff;
  --ink:#14153a;
  --ink-soft:#474b7d;
  --muted:#8588a2;
  --line:#e8e4f7;
  --lavender:#ede9ff;
  --lavender-2:#f7f4ff;
  --purple:#6554d9;
  --purple-2:#7b69ef;
  --purple-dark:#44359e;
  --good:#20875a;
  --good-bg:#eef9f3;
  --bad:#c43d37;
  --bad-bg:#fff1f1;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{
  margin:0;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(230,224,255,.95), transparent 34%),
    radial-gradient(circle at 100% 12%, rgba(249,238,255,.8), transparent 25%),
    var(--bg);
}
button{font:inherit}
.app{
  width:min(100%,540px);
  margin:0 auto;
  min-height:100vh;
  padding:14px 13px calc(98px + env(safe-area-inset-bottom));
}
.screen{display:none}
.screen.active{display:block}
.center-screen{min-height:72vh!important;place-items:center;text-align:center}
.center-screen.active{display:grid!important}
.hidden{display:none!important}
.muted{color:var(--muted)}
.eyebrow{
  font-size:11px;
  font-weight:850;
  letter-spacing:.12em;
  color:#9295ad;
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:4px 4px 12px;
}
.subject{
  display:flex;
  align-items:center;
  gap:10px;
}
.subject-icon{
  width:42px;height:42px;
  display:grid;place-items:center;
  border-radius:11px;
  background:linear-gradient(145deg,#eeeaff,#ded8ff);
  color:var(--purple-dark);
  font-family:Georgia,serif;
  font-weight:900;
  font-size:20px;
  box-shadow:0 8px 20px rgba(78,63,163,.08);
}
.subject-title{font-size:14px;font-weight:900;color:#2b2c60}
.subject-subtitle{font-size:13px;color:#626695;margin-top:1px}
.icon-btn{
  position:relative;
  width:40px;height:40px;
  border:0;background:transparent;
  color:#2f3174;
  display:grid;place-items:center;
  cursor:pointer;
}
.icon-btn svg{
  width:27px;height:27px;
  fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}
.notification-dot{
  position:absolute;
  top:5px;right:4px;
  width:8px;height:8px;border-radius:50%;
  background:#7c69ef;
  box-shadow:0 0 0 3px var(--bg);
}
.hero{
  position:relative;
  min-height:390px;
  overflow:hidden;
  border-radius:29px;
  background:
    linear-gradient(145deg,rgba(255,255,255,.98),rgba(245,241,255,.98));
  border:1px solid rgba(226,220,247,.92);
  box-shadow:0 18px 42px rgba(70,58,143,.11);
}
.teacher-hero{
  position:absolute;
  right:-38px;
  bottom:-2px;
  width:59%;
  height:84%;
  object-fit:cover;
  object-position:49% 50%;
  border-radius:26px;
  z-index:1;
  filter:saturate(.95) contrast(.98);
}
.hero-fade{
  position:absolute;
  inset:0;
  z-index:2;
  background:
    linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.93) 25%,rgba(255,255,255,.22) 60%,rgba(255,255,255,0) 79%),
    linear-gradient(0deg,rgba(245,241,255,.86) 0%,rgba(245,241,255,0) 35%);
  pointer-events:none;
}
.hero-copy{
  position:relative;
  z-index:3;
  width:61%;
  padding:29px 0 0 20px;
}
.hero-copy h1{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(27px,6.7vw,38px);
  line-height:1.01;
  letter-spacing:-.035em;
  color:#12133f;
}
.hero-copy h1 span{
  display:block;
}
#helloName{
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:normal;
  font-size:.92em;
}
.hero-subtitle{
  margin:15px 0 0;
  font-size:18px;
  line-height:1.35;
  color:#4e5184;
}
.hero-subtitle span{white-space:nowrap}
.hand-note{
  margin-top:28px;
  font-family:"Segoe Print","Bradley Hand","Comic Sans MS",cursive;
  font-size:19px;
  line-height:1.35;
  transform:rotate(-5deg);
  color:#6b5cc8;
}
.hero-status{
  position:absolute;
  z-index:4;
  left:14px;right:14px;bottom:14px;
  padding:14px 16px;
  border-radius:20px;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.84);
  box-shadow:0 8px 22px rgba(65,55,125,.08);
}
.hero-status-title{
  font-family:Georgia,"Times New Roman",serif;
  font-size:20px;
  font-weight:700;
  color:#191943;
}
.hero-status-subtitle{
  margin-top:3px;
  color:#696d91;
  font-size:13px;
}
.progress-card{
  margin-top:12px;
  padding:20px;
  background:rgba(255,255,255,.97);
  border-radius:28px;
  border:1px solid var(--line);
  box-shadow:0 14px 34px rgba(65,55,125,.07);
}
.progress-card h2{
  margin:0 0 17px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:29px;
  letter-spacing:-.025em;
  color:#161740;
}
.progress-layout{
  display:grid;
  grid-template-columns:128px 1fr;
  gap:20px;
  align-items:center;
}
.progress-ring{
  --progress:0deg;
  width:128px;height:128px;
  border-radius:50%;
  padding:13px;
  background:conic-gradient(from -90deg,#7a67ef var(--progress),#e9e6f7 0);
  box-shadow:inset 0 0 0 1px rgba(111,93,222,.08);
}
.progress-ring-inner{
  width:100%;height:100%;
  border-radius:50%;
  display:grid;place-items:center;
  background:#fff;
}
.progress-value{
  font-family:Georgia,"Times New Roman",serif;
  font-size:36px;
  font-weight:700;
  color:#171840;
}
.progress-stats{
  border-left:1px solid #e6e2f4;
  padding-left:20px;
  display:grid;
  gap:13px;
}
.progress-stat span{
  display:block;
  font-size:12.5px;
  color:#777a99;
}
.progress-stat strong{
  display:block;
  margin-top:2px;
  font-size:22px;
  line-height:1.05;
  color:#171840;
}
.quote-card{
  margin-top:18px;
  min-height:72px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 16px;
  border-radius:19px;
  background:linear-gradient(135deg,#f1edff,#faf8ff);
  color:#6259ac;
  font-family:"Segoe Print","Bradley Hand","Comic Sans MS",cursive;
  font-size:16px;
  line-height:1.35;
}
.quote-mark{
  font-family:Georgia,serif;
  font-size:38px;
  line-height:1;
  color:#9b8ee9;
}
.quote-heart{
  margin-left:auto;
  font-size:22px;
}
.main-action{
  width:100%;
  margin-top:12px;
  border:0;
  border-radius:23px;
  padding:15px 16px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:13px;
  text-align:left;
  color:white;
  background:linear-gradient(135deg,#6f5de1,#5544ba);
  box-shadow:0 15px 28px rgba(86,68,188,.22);
  cursor:pointer;
}
.main-action:disabled{opacity:.55;cursor:not-allowed}
.main-action-icon{
  width:47px;height:47px;
  border-radius:15px;
  display:grid;place-items:center;
  background:rgba(255,255,255,.12);
}
.main-action-icon svg{
  width:27px;height:27px;
  fill:none;stroke:white;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
.main-action-copy{min-width:0}
.main-action-title{
  font-size:19px;
  font-weight:900;
  line-height:1.1;
}
.main-action-subtitle{
  margin-top:3px;
  color:rgba(255,255,255,.7);
  font-size:12.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.main-action-arrow{
  font-size:30px;
  font-weight:300;
  color:rgba(255,255,255,.92);
}
.today-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.quick-card{
  min-width:0;
  padding:15px;
  border-radius:21px;
  background:rgba(255,255,255,.94);
  border:1px solid var(--line);
  box-shadow:0 10px 25px rgba(65,55,125,.045);
}
.quick-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.quick-icon{
  width:36px;height:36px;
  border-radius:12px;
  display:grid;place-items:center;
  background:#efebff;
  color:#6555c8;
  font-weight:950;
  font-size:11px;
}
.quick-badge{
  max-width:95px;
  padding:5px 8px;
  border-radius:999px;
  background:#eee9ff;
  color:#6a5bcb;
  font-size:10px;
  font-weight:850;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.quick-badge.soft{
  background:#f5f3fa;
  color:#888aa0;
}
.quick-title{
  margin-top:12px;
  font-size:14px;
  font-weight:900;
  line-height:1.25;
}
.quick-meta{
  margin-top:5px;
  font-size:11.5px;
  line-height:1.35;
  color:#86899e;
}
.quick-phrase{
  margin-top:8px;
  font-size:11.5px;
  line-height:1.35;
  font-weight:750;
  color:#5c5f7c;
}
.mini-progress{
  display:flex;
  gap:7px;
  align-items:center;
  margin-top:10px;
}
.mini-progress-track{
  height:5px;flex:1;
  border-radius:999px;
  background:#ebe9f4;
  overflow:hidden;
}
.mini-progress-bar{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#8474ef,#6855d8);
}
.mini-progress span{
  font-size:10px;
  font-weight:900;
  color:#6256bb;
}
.quick-button{
  width:100%;
  margin-top:11px;
  padding:9px 10px;
  border:0;
  border-radius:12px;
  color:white;
  background:#6553cf;
  font-weight:850;
  font-size:12px;
  cursor:pointer;
}
.bottom-spacer{height:16px}
.keyboard-open .bottom-nav{
  display:none!important;
}
.keyboard-open .app{
  padding-bottom:14px;
}
.keyboard-open .toast{
  bottom:16px;
}

.bottom-nav{
  position:fixed;
  left:50%;
  bottom:0;
  z-index:30;
  width:min(100%,540px);
  transform:translateX(-50%);
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:2px;
  padding:10px 8px calc(8px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(18px);
  border-top:1px solid #e5e1f2;
  box-shadow:0 -10px 30px rgba(55,45,118,.08);
}
.nav-item{
  border:0;
  background:transparent;
  color:#7e809e;
  display:grid;
  place-items:center;
  gap:3px;
  padding:5px 1px;
  font-size:9.5px;
  cursor:pointer;
}
.nav-item svg{
  width:23px;height:23px;
  fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}
.nav-item.active{
  color:#5140d2;
  font-weight:900;
}
.toast{
  position:fixed;
  z-index:50;
  left:50%;
  bottom:88px;
  transform:translateX(-50%);
  width:min(86%,420px);
  padding:12px 14px;
  border-radius:11px;
  background:rgba(26,24,54,.92);
  color:white;
  font-size:12.5px;
  text-align:center;
  box-shadow:0 10px 25px rgba(20,18,52,.18);
}
.quiz-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:5px 0 14px;
}
.ghost{
  border:1px solid var(--line);
  background:white;
  border-radius:13px;
  padding:10px 12px;
  color:#3d3f6a;
  font-weight:800;
  cursor:pointer;
}
.counter{font-size:13px;font-weight:900;color:#757894}
.quiz-progress-track{
  height:8px;
  background:#e9e6f4;
  border-radius:999px;
  overflow:hidden;
  margin-bottom:13px;
}
.quiz-progress-bar{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#806eef,#6755d7);
}
.quiz-card,.result-card,.error-card{
  background:rgba(255,255,255,.97);
  border:1px solid var(--line);
  border-radius:25px;
  box-shadow:0 12px 30px rgba(60,50,126,.06);
}
.quiz-card{padding:20px}
.question{
  margin:9px 0 19px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:23px;
  line-height:1.3;
  letter-spacing:-.015em;
}
.selection-hint{
  margin:-7px 0 14px;
  color:#84879c;
  font-size:13px;
}
.options{display:grid;gap:10px}
.option{
  width:100%;
  display:flex;
  gap:11px;
  align-items:flex-start;
  padding:14px;
  border:1px solid var(--line);
  border-radius:15px;
  background:white;
  color:#282a55;
  text-align:left;
  line-height:1.35;
  cursor:pointer;
}
.option.selected{border-color:#6856db;background:#f5f2ff}
.option.correct{border-color:var(--good);background:var(--good-bg)}
.option.incorrect{border-color:var(--bad);background:var(--bad-bg)}
.dot{
  width:18px;height:18px;
  flex:0 0 auto;
  margin-top:1px;
  border:2px solid #a9aac0;
  border-radius:50%;
}
.option.selected .dot{border:5px solid #6b58dc}
.option.multiple .dot{border-radius:5px}
.option.multiple.selected .dot{
  border:2px solid #6b58dc;
  background:#6b58dc;
  box-shadow:inset 0 0 0 4px white;
}
.option.correct .dot{border-color:var(--good)}
.option.multiple.correct .dot{background:var(--good);box-shadow:inset 0 0 0 4px white}
.option.multiple.incorrect .dot{background:var(--bad);border-color:var(--bad);box-shadow:inset 0 0 0 4px white}
.primary,.secondary{
  width:100%;
  margin-top:16px;
  border:0;
  border-radius:15px;
  padding:14px 17px;
  font-weight:900;
  cursor:pointer;
}
.primary{
  color:white;
  background:linear-gradient(135deg,#715ee2,#5846bd);
}
.secondary{color:#34365f;background:#efedf6}
.primary:disabled,.secondary:disabled{opacity:.38;cursor:not-allowed}
.feedback{
  margin-top:16px;
  padding:15px;
  border-radius:16px;
}
.feedback.good{background:var(--good-bg);color:var(--good)}
.feedback.bad{background:var(--bad-bg);color:var(--bad)}
.feedback-title{font-size:18px;font-weight:950}
.correct-answer{margin-top:7px;font-weight:850}
.explanation{margin-top:8px;color:#282a55;font-size:14px;line-height:1.45}
.explanation.explanation-formatted,
.teacher-question-explanation.explanation-formatted{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.explanation-intro{
  margin-bottom:1px;
}
.explanation-item{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:start;
  column-gap:7px;
}
.explanation-item-number{
  color:#7353d8;
  font-weight:700;
  line-height:1.5;
}
.explanation-item-content{
  min-width:0;
}
.explanation-item-text{
  color:#1f1f1f;
  font-weight:400;
  line-height:1.5;
}
.explanation-item-rule{
  margin-top:4px;
  color:#1f1f1f;
  font-size:.94em;
  font-weight:400;
  line-height:1.45;
}
.motivation-image-wrap{
  display:flex;
  justify-content:center;
  margin:16px auto 12px;
}
.motivation-image-wrap.hidden{
  display:none !important;
}
.motivation-image{
  display:block;
  width:min(100%,340px);
  height:auto;
  max-height:48vh;
  object-fit:contain;
  border-radius:18px;
}
.result-card,.error-card{
  margin-top:28px;
  padding:24px 20px;
  text-align:center;
}
.result-teacher-wrap{
  width:150px;height:150px;
  margin:0 auto 12px;
  border-radius:50%;
  overflow:hidden;
  border:8px solid #f1edff;
  box-shadow:0 12px 28px rgba(69,54,158,.14);
}
.result-teacher{
  width:100%;height:100%;
  object-fit:cover;
  object-position:48% 38%;
}
.result-card h2,.error-card h2{
  margin:8px 0 0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:28px;
}
.result-stats{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:19px 0 14px;
}
.result-stats>div{
  padding:14px;
  border-radius:18px;
  background:#f8f6ff;
}
.result-stats strong{
  display:block;
  font-family:Georgia,serif;
  font-size:27px;
}
.result-stats span{
  display:block;
  margin-top:2px;
  color:#86899d;
  font-size:12px;
}
.result-phrase{
  margin:15px 4px;
  font-size:16px;
  font-weight:850;
  line-height:1.45;
}
.reminder{
  margin-top:13px;
  padding:13px;
  border-radius:15px;
  background:#fff4e9;
  color:#855d2e;
  font-size:13px;
  font-weight:850;
}
.error-icon{
  width:60px;height:60px;
  margin:0 auto 14px;
  display:grid;place-items:center;
  border-radius:20px;
  background:var(--bad-bg);
  color:var(--bad);
  font-size:28px;
  font-weight:950;
}
.loader{
  width:34px;height:34px;
  border:4px solid #ddd;
  border-top-color:#6857d9;
  border-radius:50%;
  animation:spin .8s linear infinite;
  margin:0 auto 12px;
}
@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:390px){
  .hero{min-height:372px}
  .teacher-hero{width:76%;right:-34px}
  .hero-copy{width:60%;padding-left:17px}
  .hero-copy h1{font-size:32px}
  .hero-subtitle{font-size:16px}
  .hand-note{font-size:17px}
  .progress-layout{grid-template-columns:112px 1fr;gap:15px}
  .progress-ring{width:112px;height:112px}
  .progress-stats{padding-left:15px}
  .progress-stat strong{font-size:19px}
}

/* v9.1 — simplified progress card */
.progress-layout,
.progress-ring,
.progress-ring-inner,
.progress-value,
.progress-stats,
.progress-stat{
  display:none !important;
}
.progress-metrics{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.progress-metric{
  min-height:104px;
  border-radius:20px;
  padding:17px 14px;
  background:linear-gradient(145deg,#f4f1ff,#fbfaff);
  border:1px solid #ebe7fa;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
}
.progress-metric strong{
  font-family:Georgia,"Times New Roman",serif;
  font-size:38px;
  line-height:1;
  color:#171840;
}
.progress-metric span{
  margin-top:7px;
  color:#777a99;
  font-size:12.5px;
  line-height:1.25;
  font-weight:700;
}

@media(max-width:390px){
  .teacher-hero{
    width:66%;
    height:84%;
    right:-28px;
  }
  .hero-copy{
    width:55%;
    padding-left:17px;
  }
  .hero-copy h1{
    font-size:30px;
  }
}


/* v9.2 — greeting fix */
@media(max-width:420px){
  .hero-copy{
    width:63%;
  }
  .hero-copy h1{
    font-size:28px;
  }
  #helloName{
    white-space:nowrap;
    font-size:.88em;
  }
  .teacher-hero{
    width:58%;
    right:-40px;
    bottom:-2px;
  }
}


/* v9.3 — clean hero */
.hero-subtitle{
  margin-top:16px;
}


/* v10 — экран домашних заданий */
.subscreen-head{
  display:flex;
  align-items:center;
  gap:13px;
  margin:5px 3px 18px;
}
.subscreen-head h1{
  margin:3px 0 0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:30px;
  line-height:1.05;
  letter-spacing:-.025em;
}
.subscreen-back{
  width:42px;height:42px;
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fff;
  color:#373967;
  font-size:22px;
  cursor:pointer;
}
.homework-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  padding:5px;
  margin-bottom:13px;
  border-radius:16px;
  background:#efedf7;
}
.homework-tab{
  border:0;
  border-radius:12px;
  padding:11px 9px;
  background:transparent;
  color:#82849b;
  font-weight:850;
  cursor:pointer;
}
.homework-tab.active{
  color:#fff;
  background:linear-gradient(135deg,#7563e5,#5948bd);
  box-shadow:0 7px 16px rgba(83,67,181,.17);
}
.homework-list{
  display:grid;
  gap:11px;
}
.homework-list-card{
  padding:17px;
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(255,255,255,.97);
  box-shadow:0 10px 27px rgba(61,51,126,.05);
}
.homework-list-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.homework-list-title{
  font-size:17px;
  line-height:1.28;
  font-weight:900;
  color:#191a42;
}
.homework-state{
  flex:0 0 auto;
  max-width:105px;
  padding:6px 9px;
  border-radius:999px;
  font-size:10.5px;
  font-weight:900;
  text-align:center;
  background:#eeeaff;
  color:#6656c8;
}
.homework-state.missed{
  background:#fff0f0;
  color:#b8433d;
}
.homework-state.done{
  background:#edf8f2;
  color:#2b8158;
}
.homework-state.upcoming{
  background:#f2f1f6;
  color:#85869a;
}
.homework-list-meta{
  margin-top:6px;
  color:#888ba0;
  font-size:12.5px;
  line-height:1.4;
}
.homework-list-progress{
  display:flex;
  align-items:center;
  gap:9px;
  margin-top:14px;
}
.homework-list-progress-track{
  flex:1;
  height:6px;
  border-radius:999px;
  background:#ebe9f4;
  overflow:hidden;
}
.homework-list-progress-bar{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#8170ed,#6655d7);
}
.homework-list-progress-value{
  font-size:11px;
  font-weight:900;
  color:#6255ba;
}
.homework-list-phrase{
  margin-top:11px;
  font-size:13px;
  line-height:1.4;
  font-weight:800;
  color:#565a76;
}
.homework-list-button{
  width:100%;
  margin-top:13px;
  padding:12px 13px;
  border:0;
  border-radius:11px;
  color:#fff;
  background:linear-gradient(135deg,#715ee0,#5847bd);
  font-weight:900;
  cursor:pointer;
}
.homework-list-button.secondary-list{
  color:#574bb0;
  background:#f0edff;
}
.homework-empty{
  padding:32px 20px;
  text-align:center;
  border:1px dashed #ddd8f1;
  border-radius:22px;
  color:#85879c;
  background:rgba(255,255,255,.7);
}
.homework-empty strong{
  display:block;
  margin-bottom:5px;
  font-family:Georgia,serif;
  font-size:20px;
  color:#34365f;
}
.subscreen-bottom-space{height:80px}
.summary-card{
  margin-top:10px;
  padding:24px 20px;
  text-align:center;
  border:1px solid var(--line);
  border-radius:27px;
  background:rgba(255,255,255,.97);
  box-shadow:0 13px 32px rgba(61,51,126,.06);
}
.summary-teacher{
  width:120px;height:120px;
  margin:0 auto 15px;
  overflow:hidden;
  border-radius:50%;
  border:7px solid #f0ecff;
  box-shadow:0 10px 24px rgba(70,54,158,.13);
}
.summary-teacher img{
  width:100%;height:100%;
  object-fit:cover;
  object-position:48% 38%;
}
.summary-title{
  font-family:Georgia,"Times New Roman",serif;
  font-size:25px;
  line-height:1.2;
  font-weight:700;
}
.summary-date{
  margin-top:6px;
  color:#8b8da1;
  font-size:12.5px;
}
.summary-stats{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:18px;
}
.summary-stats>div{
  padding:15px;
  border-radius:18px;
  background:#f7f5ff;
}
.summary-stats strong{
  display:block;
  font-family:Georgia,serif;
  font-size:29px;
}
.summary-stats span{
  display:block;
  margin-top:2px;
  color:#888ba0;
  font-size:12px;
}
.summary-phrase{
  margin-top:16px;
  font-size:15px;
  line-height:1.45;
  font-weight:850;
}
.summary-rno-note{
  margin-top:13px;
  padding:12px;
  border-radius:15px;
  background:#fff4e9;
  color:#855d2e;
  font-size:12.5px;
  font-weight:800;
}


/* v11 — экран РНО */
.rno-hero{
  position:relative;
  min-height:260px;
  overflow:hidden;
  border-radius:27px;
  background:
    linear-gradient(145deg,#ffffff 0%,#f4efff 100%);
  border:1px solid #e7e1f7;
  box-shadow:0 14px 34px rgba(65,55,125,.07);
}
.rno-hero-copy{
  position:relative;
  z-index:3;
  width:62%;
  padding:24px 0 23px 20px;
}
.rno-kicker{
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  color:#8173d7;
}
.rno-title{
  margin-top:8px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:29px;
  line-height:1.08;
  font-weight:700;
  color:#171840;
}
.rno-subtitle{
  margin-top:9px;
  font-size:13.5px;
  line-height:1.45;
  color:#696d91;
}
.rno-start{
  margin-top:16px;
  border:0;
  border-radius:11px;
  padding:11px 16px;
  color:#fff;
  background:linear-gradient(135deg,#715ee0,#5847bd);
  font-weight:900;
  cursor:pointer;
}
.rno-teacher{
  position:absolute;
  right:-28px;
  bottom:-8px;
  width:48%;
  height:98%;
  object-fit:cover;
  object-position:48% 40%;
  border-radius:26px;
}
.rno-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.82) 44%,rgba(255,255,255,0) 72%);
  pointer-events:none;
  z-index:2;
}
.rno-info-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.rno-info-card{
  padding:17px 15px;
  border-radius:20px;
  background:rgba(255,255,255,.96);
  border:1px solid var(--line);
  box-shadow:0 9px 24px rgba(61,51,126,.045);
}
.rno-info-label{
  display:block;
  color:#8588a0;
  font-size:12px;
}
.rno-info-card strong{
  display:block;
  margin-top:5px;
  font-family:Georgia,serif;
  font-size:31px;
  color:#181940;
}
.rno-schedule-card{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:12px;
  align-items:center;
  margin-top:12px;
  padding:15px;
  border-radius:20px;
  background:linear-gradient(145deg,#f1edff,#faf8ff);
  border:1px solid #e6e0fa;
}
.rno-schedule-icon{
  width:42px;height:42px;
  display:grid;place-items:center;
  border-radius:11px;
  background:#fff;
  color:#6555c8;
  font-size:20px;
  font-weight:950;
}
.rno-schedule-title{
  font-size:14px;
  line-height:1.25;
  font-weight:900;
  color:#2a2b60;
}
.rno-schedule-meta{
  margin-top:4px;
  font-size:12px;
  line-height:1.4;
  color:#747794;
}
.rno-note{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-top:13px;
  padding:13px 15px;
  border-radius:18px;
  background:rgba(255,255,255,.7);
  color:#777a96;
  font-size:12.5px;
  line-height:1.45;
}
.rno-note-mark{
  color:#7564dc;
  font-size:19px;
  line-height:1;
}
@media(max-width:390px){
  .rno-hero-copy{width:65%;padding-left:17px}
  .rno-title{font-size:26px}
  .rno-teacher{width:50%;right:-35px}
}


/* v11.1 — единое нижнее меню */
#globalBottomNav{
  transition:opacity .16s ease, transform .16s ease;
}
#globalBottomNav.hidden{
  display:none !important;
}
.quiz-card,
.result-card,
.summary-card{
  margin-bottom:8px;
}


/* v12 — кабинет преподавателя */
.topbar-actions{display:flex;align-items:center;gap:7px}
.role-switch{
  border:1px solid #e3def4;border-radius:13px;padding:8px 10px;
  background:rgba(255,255,255,.9);color:#5548aa;font-size:10.5px;
  line-height:1;font-weight:900;cursor:pointer;white-space:nowrap
}
.role-switch-icon{margin-right:3px}
.teacher-role-switch{padding:9px 11px;background:#f3f0ff}
.teacher-bottom-nav{grid-template-columns:repeat(4,1fr)}
.teacher-screen{color:#20213d}
.teacher-topbar{
  display:flex;justify-content:space-between;align-items:center;gap:14px;
  margin:4px 2px 14px
}
.teacher-brand{color:#6c5dc7;font-size:10px;font-weight:950;letter-spacing:.12em}
.teacher-subject{margin-top:4px;color:#8c8ea3;font-size:12px}
.teacher-welcome{
  position:relative;overflow:hidden;min-height:176px;border-radius:27px;padding:25px 22px;
  background:radial-gradient(circle at 88% 20%,rgba(127,105,229,.18),transparent 28%),
             linear-gradient(145deg,#fff 0%,#f4f0ff 100%);
  border:1px solid #e6e1f5;box-shadow:0 12px 34px rgba(57,46,113,.06)
}
.teacher-welcome-copy{position:relative;z-index:2;max-width:74%}
.teacher-greeting{color:#7a6dcc;font-size:12px;font-weight:900}
.teacher-welcome h1{
  margin:5px 0 7px;font-family:Georgia,"Times New Roman",serif;
  font-size:34px;line-height:1.04;letter-spacing:-.03em;color:#17183d
}
.teacher-welcome p{margin:0;color:#71748e;font-size:14px}
.teacher-welcome-mark{
  position:absolute;right:20px;bottom:18px;width:76px;height:76px;display:grid;place-items:center;
  border-radius:24px;background:linear-gradient(145deg,#7967e5,#5c4bc5);color:#fff;
  font-family:Georgia,serif;font-size:34px;font-weight:700;transform:rotate(5deg);
  box-shadow:0 13px 26px rgba(83,67,181,.2)
}
.teacher-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:11px}
.teacher-metric{
  min-width:0;padding:14px 11px;border-radius:19px;background:rgba(255,255,255,.96);
  border:1px solid #e8e4f4
}
.teacher-metric span{
  display:block;min-height:30px;color:#85879d;font-size:10.5px;line-height:1.35
}
.teacher-metric strong{
  display:block;margin-top:5px;font-family:Georgia,serif;font-size:29px;line-height:1;color:#1c1d43
}
.teacher-section{margin-top:24px}
.teacher-section-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:10px
}
.teacher-section-kicker{color:#7768cd;font-size:9.5px;font-weight:950;letter-spacing:.12em}
.teacher-section h2{
  margin:3px 0 0;font-family:Georgia,"Times New Roman",serif;font-size:23px;
  line-height:1.1;color:#1b1c40
}
.teacher-text-button{
  border:0;padding:4px 0;background:transparent;color:#6656c8;font-size:11px;font-weight:900;cursor:pointer
}
.teacher-stack{display:grid;gap:9px}
.teacher-event-card,.teacher-empty-card,.teacher-attention-card{
  padding:15px 16px;border-radius:19px;background:rgba(255,255,255,.97);
  border:1px solid #e8e4f4;box-shadow:0 8px 24px rgba(55,45,118,.035)
}
.teacher-event-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.teacher-event-badge{
  flex:0 0 auto;padding:5px 8px;border-radius:999px;background:#eeeaff;color:#6556c2;
  font-size:9.5px;font-weight:950
}
.teacher-event-badge.closing{background:#fff0ed;color:#b95d50}
.teacher-event-badge.opening{background:#eef7f4;color:#3d8067}
.teacher-event-title{font-size:14px;line-height:1.35;font-weight:900;color:#28294c}
.teacher-event-meta{margin-top:5px;color:#85879b;font-size:11.5px;line-height:1.4}
.teacher-event-progress{margin-top:9px;color:#555a78;font-size:12px;font-weight:800}
.teacher-empty-card{
  color:#85879b;font-size:12.5px;line-height:1.5;text-align:center;
  background:rgba(255,255,255,.72);border-style:dashed
}
.teacher-empty-card strong{
  display:block;margin-bottom:3px;color:#3a3b62;font-family:Georgia,serif;font-size:17px
}
.teacher-actions-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.teacher-action{
  min-height:83px;display:flex;align-items:center;gap:10px;padding:13px;text-align:left;
  border:1px solid #e6e1f3;border-radius:19px;background:#fff;color:#303153;cursor:pointer
}
.teacher-action.primary-action{
  color:#fff;border-color:transparent;background:linear-gradient(145deg,#7563df,#5847bd)
}
.teacher-action-icon{
  flex:0 0 auto;width:34px;height:34px;display:grid;place-items:center;border-radius:11px;
  background:#f0edff;color:#6654ca;font-weight:950
}
.teacher-action.primary-action .teacher-action-icon{background:rgba(255,255,255,.16);color:#fff}
.teacher-action strong,.teacher-action small{display:block}
.teacher-action strong{font-size:12px;line-height:1.2}
.teacher-action small{margin-top:4px;color:#8a8ca0;font-size:9.5px;line-height:1.3}
.teacher-action.primary-action small{color:rgba(255,255,255,.72)}
.teacher-attention-card{border-left:4px solid #7664da}
.teacher-results-list{
  overflow:hidden;border:1px solid #e7e3f2;border-radius:20px;background:#fff
}
.teacher-result-row{
  display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:13px 15px
}
.teacher-result-row + .teacher-result-row{border-top:1px solid #efecf6}
.teacher-result-name{font-size:13px;font-weight:900;color:#2c2d50}
.teacher-result-meta{margin-top:3px;color:#8a8ca0;font-size:10.5px;line-height:1.35}
.teacher-result-score{
  min-width:53px;text-align:center;padding:7px 8px;border-radius:12px;background:#f1eeff;
  color:#5b4dbc;font-size:12px;font-weight:950
}
.teacher-bottom-spacer{height:92px}
@media(max-width:390px){
  .role-switch{padding:8px 8px;font-size:9.5px}
  .teacher-welcome h1{font-size:31px}
  .teacher-welcome-copy{max-width:70%}
  .teacher-welcome-mark{width:68px;height:68px;right:15px}
  .teacher-metric{padding:13px 9px}
  .teacher-metric span{font-size:9.5px}
  .teacher-metric strong{font-size:26px}
}


/* v12.1 — главный экран по утверждённому референсу */
.hero{
  min-height:455px;
  border-radius:29px;
  background:#fbfaff;
}

.teacher-hero{
  right:-8%;
  bottom:0;
  width:78%;
  height:100%;
  object-fit:cover;
  object-position:32% 44%;
  border-radius:0;
  filter:saturate(.97) contrast(.99);
}

.hero-fade{
  background:
    linear-gradient(90deg,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,.98) 22%,
      rgba(255,255,255,.78) 38%,
      rgba(255,255,255,.18) 57%,
      rgba(255,255,255,0) 72%),
    linear-gradient(0deg,
      rgba(239,233,255,.34) 0%,
      rgba(239,233,255,0) 31%);
}

.hero-copy{
  width:56%;
  padding:54px 0 0 22px;
}

.hero-copy h1{
  font-size:clamp(39px,10.4vw,53px);
  line-height:.97;
  letter-spacing:-.045em;
}

#helloName{
  font-size:1em;
}

.hero-subtitle{
  margin-top:26px;
  font-size:19px;
  line-height:1.48;
  color:#575b89;
}

.hero-heart{
  display:inline;
  margin-left:0;
  white-space:nowrap;
}

.hero-status{
  left:16px;
  right:16px;
  bottom:16px;
  min-height:94px;
  display:grid;
  grid-template-columns:56px minmax(0,1fr) 28px;
  align-items:center;
  gap:13px;
  padding:13px 16px 13px 13px;
  border-radius:22px;
  background:rgba(255,255,255,.93);
  border:1px solid rgba(255,255,255,.96);
  box-shadow:0 11px 30px rgba(45,42,93,.11);
  backdrop-filter:blur(12px);
}

.hero-status-icon{
  width:56px;
  height:56px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#ebe5ff;
  color:#7955f4;
  font-size:30px;
  line-height:1;
}

.hero-status-copy{
  min-width:0;
}

.hero-status-title{
  font-size:21px;
  line-height:1.12;
}

.hero-status-subtitle{
  margin-top:5px;
  font-size:13.5px;
  line-height:1.35;
}

.hero-status-arrow{
  color:#8b8da5;
  font-size:38px;
  font-weight:300;
  line-height:1;
  transform:translateY(-1px);
}

@media(max-width:420px){
  .hero{
    min-height:445px;
  }

  .teacher-hero{
    right:-11%;
    width:80%;
    height:100%;
    object-position:31% 45%;
  }

  .hero-copy{
    width:58%;
    padding:50px 0 0 20px;
  }

  .hero-copy h1{
    font-size:42px;
  }

  #helloName{
    font-size:1em;
  }

  .hero-subtitle{
    margin-top:23px;
    font-size:17.5px;
  }

  .hero-status{
    grid-template-columns:52px minmax(0,1fr) 24px;
    min-height:88px;
    gap:11px;
  }

  .hero-status-icon{
    width:52px;
    height:52px;
    font-size:27px;
  }

  .hero-status-title{
    font-size:19px;
  }

  .hero-status-subtitle{
    font-size:12.5px;
  }
}

@media(max-width:360px){
  .hero-copy{
    width:60%;
    padding-left:17px;
  }

  .hero-copy h1{
    font-size:37px;
  }

  .hero-subtitle{
    font-size:16px;
  }
}


/* v12.2 — главная ученика: финальная композиция по утверждённому референсу */

/* Шапка */
.topbar{
  position:relative;
  min-height:72px;
  margin:4px 7px 13px;
}
.subject{gap:12px}
.subject-icon{
  width:52px;
  height:52px;
  border-radius:17px;
  font-size:27px;
}
.subject-title{
  font-size:20px;
  line-height:1.08;
}
.subject-subtitle{
  margin-top:4px;
  font-size:16px;
  line-height:1.12;
}
.icon-btn{
  width:48px;
  height:48px;
}
.icon-btn svg{
  width:34px;
  height:34px;
}
.notification-dot{
  top:4px;
  right:2px;
  width:9px;
  height:9px;
}

/* Вход в кабинет преподавателя: заметный, но не ломает референс */
#teacherModeBtn{
  position:absolute;
  right:2px;
  top:49px;
  z-index:20;
  padding:5px 8px;
  border:0;
  background:transparent;
  color:#6656c8;
  font-size:9.5px;
  letter-spacing:.01em;
}

/* Hero */
.hero{
  min-height:520px;
  border-radius:30px;
  background:#fff;
  border:1px solid rgba(226,220,247,.9);
  box-shadow:0 16px 38px rgba(70,58,143,.09);
}

.teacher-hero{
  position:absolute;
  z-index:1;
  right:0;
  top:0;
  bottom:auto;
  width:73%;
  height:100%;
  object-fit:cover;
  object-position:47% 42%;
  border-radius:0;
  filter:saturate(.96) contrast(.99);
}

.hero-fade{
  z-index:2;
  background:
    linear-gradient(90deg,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,1) 19%,
      rgba(255,255,255,.96) 28%,
      rgba(255,255,255,.72) 39%,
      rgba(255,255,255,.22) 54%,
      rgba(255,255,255,0) 67%),
    linear-gradient(0deg,
      rgba(238,233,255,.34) 0%,
      rgba(238,233,255,0) 34%);
}

.hero-copy{
  z-index:3;
  width:59%;
  padding:58px 0 0 22px;
}

.hero-copy h1{
  font-size:44px;
  line-height:.98;
  letter-spacing:-.045em;
}

#helloName{
  font-size:1em;
  white-space:nowrap;
}

.hero-subtitle{
  margin-top:27px;
  font-size:18px;
  line-height:1.48;
  color:#555a88;
}

.hero-heart{
  margin-left:0;
}

/* Нижняя статусная карточка */
.hero-status{
  z-index:4;
  left:18px;
  right:18px;
  bottom:17px;
  min-height:91px;
  display:grid;
  grid-template-columns:54px minmax(0,1fr) 22px;
  align-items:center;
  gap:13px;
  padding:13px 15px 13px 13px;
  border-radius:22px;
  background:rgba(255,255,255,.95);
  border:1px solid rgba(255,255,255,.98);
  box-shadow:0 11px 28px rgba(46,42,92,.10);
  backdrop-filter:blur(10px);
}

.hero-status-icon{
  width:54px;
  height:54px;
  border-radius:50%;
  font-size:28px;
}

.hero-status-title{
  font-size:19px;
  line-height:1.1;
  white-space:nowrap;
}

.hero-status-subtitle{
  margin-top:5px;
  font-size:12.5px;
  line-height:1.25;
  white-space:nowrap;
}

.hero-status-arrow{
  font-size:34px;
}

/* Телефоны поуже */
@media(max-width:420px){
  .app{padding-left:12px;padding-right:12px}

  .topbar{
    min-height:69px;
    margin-left:6px;
    margin-right:6px;
  }

  .subject-icon{
    width:49px;
    height:49px;
  }

  .subject-title{font-size:18px}
  .subject-subtitle{font-size:15px}

  #teacherModeBtn{
    top:46px;
    font-size:9px;
  }

  .hero{
    min-height:515px;
  }

  .teacher-hero{
    width:74%;
    object-position:46% 42%;
  }

  .hero-copy{
    width:60%;
    padding:56px 0 0 21px;
  }

  .hero-copy h1{
    font-size:41px;
  }

  .hero-subtitle{
    margin-top:25px;
    font-size:17px;
  }

  .hero-status{
    left:16px;
    right:16px;
    bottom:16px;
    grid-template-columns:52px minmax(0,1fr) 20px;
    gap:11px;
  }

  .hero-status-icon{
    width:52px;
    height:52px;
    font-size:27px;
  }

  .hero-status-title{
    font-size:18px;
  }

  .hero-status-subtitle{
    font-size:12px;
  }
}

@media(max-width:370px){
  .teacher-hero{
    width:76%;
    object-position:45% 43%;
  }

  .hero-copy{
    width:62%;
    padding-left:18px;
  }

  .hero-copy h1{
    font-size:37px;
  }

  .hero-subtitle{
    font-size:15.5px;
  }

  .hero-status-title{
    font-size:16.5px;
  }

  .hero-status-subtitle{
    font-size:10.8px;
  }
}


/* v13 — календарь и назначение ДЗ */
.teacher-subscreen-topbar{align-items:center;margin-bottom:16px}
.teacher-subscreen-heading{flex:1;min-width:0}
.teacher-subscreen-heading h1{margin:3px 0 0;font-family:Georgia,"Times New Roman",serif;font-size:29px;line-height:1.05;color:#191a40}
.teacher-compact-primary{border:0;border-radius:13px;padding:10px 12px;background:linear-gradient(145deg,#7563df,#5847bd);color:#fff;font-size:11px;font-weight:900;cursor:pointer}
.teacher-view-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px;margin-bottom:14px;border-radius:16px;background:#eeeaf8}
.teacher-view-tab{border:0;border-radius:12px;padding:10px;background:transparent;color:#7f8198;font-weight:900;cursor:pointer}
.teacher-view-tab.active{background:#fff;color:#5849b9;box-shadow:0 6px 16px rgba(69,55,145,.08)}
.teacher-calendar-head{display:grid;grid-template-columns:42px 1fr 42px;align-items:center;margin:3px 0 11px}
.calendar-arrow{width:38px;height:38px;border:1px solid #e5e0f3;border-radius:12px;background:#fff;color:#6252c0;font-size:24px;cursor:pointer}
.calendar-arrow:last-child{justify-self:end}
.teacher-calendar-title{text-align:center;font-family:Georgia,"Times New Roman",serif;font-size:21px;font-weight:700;color:#24254b;text-transform:capitalize}
.teacher-weekdays,.teacher-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}
.teacher-weekdays{margin-bottom:5px}
.teacher-weekdays span{text-align:center;color:#9698aa;font-size:9px;font-weight:850;text-transform:uppercase}
.teacher-calendar-day{position:relative;min-height:55px;border:1px solid #ece8f5;border-radius:13px;background:rgba(255,255,255,.94);padding:7px 5px;cursor:pointer;text-align:left;color:#33345a}
.teacher-calendar-day.outside{opacity:.35}
.teacher-calendar-day.today{border-color:#8b7ae4;box-shadow:inset 0 0 0 1px #8b7ae4}
.teacher-calendar-day.selected{background:#6b58d4;color:#fff;border-color:#6b58d4}
.teacher-day-number{font-size:11px;font-weight:900}
.teacher-day-dots{position:absolute;left:6px;right:6px;bottom:6px;display:flex;gap:3px;flex-wrap:wrap}
.teacher-day-dot{width:5px;height:5px;border-radius:50%;background:#65a88d}
.teacher-day-dot.close{background:#d77a70}
.teacher-day-dot.draft{background:#aaa7b8}
.teacher-calendar-day.selected .teacher-day-dot{box-shadow:0 0 0 1px rgba(255,255,255,.5)}
.compact-teacher-section{margin-top:18px}
.teacher-calendar-list-card{padding:15px 16px;border:1px solid #e8e4f4;border-radius:19px;background:#fff;cursor:pointer}
.teacher-calendar-list-card + .teacher-calendar-list-card{margin-top:9px}
.teacher-calendar-list-date{font-size:10px;font-weight:950;color:#7767ce;letter-spacing:.04em;text-transform:uppercase}
.teacher-calendar-list-title{margin-top:5px;font-size:14px;font-weight:900;color:#28294c}
.teacher-calendar-list-meta{margin-top:5px;font-size:11.5px;line-height:1.45;color:#85879b}
.teacher-form-card{padding:18px;border:1px solid #e7e2f3;border-radius:23px;background:#fff;box-shadow:0 10px 28px rgba(57,46,113,.05)}
.teacher-field{display:block;margin-bottom:15px}
.teacher-field>span{display:block;margin-bottom:7px;color:#686b86;font-size:11px;font-weight:900}
.teacher-field input,.teacher-field select{width:100%;box-sizing:border-box;border:1px solid #ddd7ee;border-radius:14px;background:#fbfaff;color:#24254c;padding:12px 13px;font:inherit;font-size:13px;outline:none}
.teacher-field input:focus,.teacher-field select:focus{border-color:#8271df;box-shadow:0 0 0 3px rgba(116,96,218,.1)}
.teacher-field select:disabled{opacity:.62}
.teacher-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.teacher-form-hint{padding:12px 13px;border-radius:15px;background:#f4f1ff;color:#74768f;font-size:11px;line-height:1.45}
.teacher-form-error{margin-top:10px;padding:11px 12px;border-radius:14px;background:#fff0ef;color:#a54d47;font-size:11.5px;font-weight:800}
.teacher-save-button{width:100%;margin-top:15px;border:0;border-radius:15px;padding:13px;background:linear-gradient(145deg,#7563df,#5847bd);color:#fff;font-size:13px;font-weight:950;cursor:pointer}
.teacher-save-button:disabled{opacity:.55;cursor:default}
.teacher-detail-card{padding:16px 17px;border:1px solid #e7e2f3;border-radius:22px;background:#fff}
.teacher-detail-row{display:grid;grid-template-columns:100px 1fr;gap:12px;align-items:start;padding:9px 0}
.teacher-detail-row + .teacher-detail-row{border-top:1px solid #f0edf6}
.teacher-detail-row span{color:#8c8ea0;font-size:11px}
.teacher-detail-row strong{font-size:12px;line-height:1.4;color:#33345a;text-align:right}
.teacher-detail-metrics{margin-top:11px}
.teacher-detail-actions{display:grid;gap:8px;margin-top:13px}
.teacher-detail-action{border:1px solid #e2dcf2;border-radius:15px;padding:12px;background:#fff;color:#5d51b7;font-size:12px;font-weight:900;cursor:pointer}
.teacher-detail-action.primary{border-color:transparent;background:linear-gradient(145deg,#7563df,#5847bd);color:#fff}
.teacher-detail-action.danger{color:#b45a53;background:#fff6f5;border-color:#f0d8d5}
.teacher-result-status{display:inline-block;margin-top:4px;padding:3px 7px;border-radius:999px;background:#f1eeff;color:#6454c3;font-size:9px;font-weight:900}
.teacher-result-status.not_started{background:#f2f1f5;color:#88899a}
.teacher-result-status.in_progress{background:#fff5e8;color:#a17034}
.teacher-result-status.completed{background:#edf8f2;color:#397c5e}
@media(max-width:390px){
  .teacher-subscreen-heading h1{font-size:26px}
  .teacher-calendar-day{min-height:51px;padding:6px 4px}
  .teacher-form-grid{grid-template-columns:1fr}
  .teacher-detail-row{grid-template-columns:86px 1fr}
}


/* v13.1 — форма назначения ДЗ */
.teacher-form-card{
  margin-bottom:0;
}

.teacher-form-actionbar{
  position:fixed;
  left:50%;
  bottom:72px;
  z-index:35;
  width:min(calc(100% - 26px),514px);
  transform:translateX(-50%);
  padding:10px 0 12px;
  background:
    linear-gradient(
      180deg,
      rgba(247,245,255,0) 0%,
      rgba(247,245,255,.92) 26%,
      rgba(247,245,255,.99) 100%
    );
  pointer-events:none;
}

.teacher-form-actionbar .teacher-save-button{
  pointer-events:auto;
  width:100%;
  margin:0;
  min-height:50px;
  border-radius:16px;
  font-size:14px;
  box-shadow:0 12px 28px rgba(83,67,181,.22);
}

.teacher-assign-spacer{
  height:150px;
}

@media(max-width:420px){
  .teacher-form-actionbar{
    width:calc(100% - 24px);
  }
}


/* v14 — раздел преподавателя «Тесты» */
.teacher-tests-head{
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  align-items:center;
}
.teacher-tests-heading{
  min-width:0;
}
.teacher-tests-heading h1{
  margin:3px 0 0;
}
.teacher-tests-tools{
  display:grid;
  gap:10px;
  margin-bottom:14px;
}
.teacher-search-wrap{
  position:relative;
}
.teacher-search-icon{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  color:#8175ca;
  font-size:18px;
  pointer-events:none;
}
.teacher-search-wrap input{
  width:100%;
  min-height:48px;
  padding:0 14px 0 42px;
  border:1px solid #ddd8ee;
  border-radius:16px;
  outline:none;
  background:rgba(255,255,255,.96);
  color:#25264b;
  font:inherit;
}
.teacher-search-wrap input:focus{
  border-color:#8270e8;
  box-shadow:0 0 0 3px rgba(117,99,223,.10);
}
.teacher-test-filters{
  display:flex;
  gap:7px;
  overflow-x:auto;
  scrollbar-width:none;
}
.teacher-test-filters::-webkit-scrollbar{display:none}
.teacher-test-filter{
  flex:0 0 auto;
  border:1px solid #e3def2;
  border-radius:999px;
  padding:8px 13px;
  background:#fff;
  color:#767993;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.teacher-test-filter.active{
  border-color:#7160d8;
  background:#7160d8;
  color:#fff;
}
.teacher-tests-list{
  display:grid;
  gap:11px;
}
.teacher-test-card{
  padding:17px;
  border:1px solid #e5e1f0;
  border-radius:21px;
  background:rgba(255,255,255,.97);
  box-shadow:0 9px 27px rgba(57,46,113,.04);
}
.teacher-test-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:11px;
}
.teacher-test-card-titlewrap{
  min-width:0;
}
.teacher-test-card-title{
  color:#1d1e43;
  font-size:15px;
  line-height:1.35;
  font-weight:950;
}
.teacher-test-card-meta{
  margin-top:5px;
  color:#8a8ca1;
  font-size:11px;
  line-height:1.35;
}
.teacher-test-status{
  flex:0 0 auto;
  padding:5px 9px;
  border-radius:999px;
  font-size:9.5px;
  font-weight:950;
}
.teacher-test-status.ready{
  background:#edf7f3;
  color:#357b61;
}
.teacher-test-status.archive{
  background:#f0eef4;
  color:#848396;
}
.teacher-test-card-description{
  margin-top:11px;
  color:#60637e;
  font-size:12px;
  line-height:1.45;
}
.teacher-test-last{
  margin-top:11px;
  color:#8b8da1;
  font-size:10.5px;
}
.teacher-test-card-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:13px;
}
.teacher-test-card-button{
  min-height:40px;
  border:1px solid #ded9ef;
  border-radius:13px;
  background:#f8f6ff;
  color:#5b50ae;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.teacher-test-card-button.primary{
  border-color:transparent;
  background:linear-gradient(145deg,#7563df,#5847bd);
  color:#fff;
}
.teacher-test-card-button:disabled,
.teacher-save-button:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.teacher-test-overview{
  padding:18px;
  border:1px solid #e4e0ef;
  border-radius:23px;
  background:rgba(255,255,255,.97);
}
.teacher-test-overview-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.teacher-test-created{
  color:#8a8ca0;
  font-size:10.5px;
}
.teacher-test-description{
  margin:13px 0 0;
  color:#62657e;
  font-size:12.5px;
  line-height:1.5;
}
.teacher-test-overview-stats{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-top:15px;
}
.teacher-test-overview-stats article{
  padding:14px;
  border-radius:17px;
  background:#f7f5ff;
}
.teacher-test-overview-stats strong{
  display:block;
  font-family:Georgia,"Times New Roman",serif;
  color:#1c1d43;
  font-size:26px;
}
.teacher-test-overview-stats span{
  display:block;
  margin-top:3px;
  color:#898b9f;
  font-size:10.5px;
}
.teacher-test-overview .teacher-save-button{
  margin-top:14px;
}
.teacher-question-list{
  display:grid;
  gap:9px;
}
.teacher-question-card{
  padding:15px;
  border:1px solid #e6e2f1;
  border-radius:19px;
  background:rgba(255,255,255,.96);
}
.teacher-question-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.teacher-question-number{
  color:#6758c1;
  font-size:10px;
  font-weight:950;
}
.teacher-question-type{
  padding:4px 7px;
  border-radius:999px;
  background:#f0edff;
  color:#7770a5;
  font-size:9px;
  font-weight:850;
}
.teacher-question-text{
  margin-top:10px;
  color:#24254a;
  font-size:12.5px;
  line-height:1.48;
  font-weight:750;
}
.teacher-question-answer{
  display:flex;
  gap:8px;
  align-items:baseline;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid #eeebf5;
  font-size:11px;
}
.teacher-question-answer span{
  color:#9293a5;
}
.teacher-question-answer strong{
  color:#5147a3;
}
.teacher-question-explanation{
  margin-top:9px;
  padding:10px 11px;
  border-radius:13px;
  background:#faf8ff;
  color:#686b83;
  font-size:10.5px;
  line-height:1.45;
}


/* ============================================================
   v15 — финальная главная + интервальное повторение
   ============================================================ */

/* Главная: изображение и текст больше не спорят друг с другом */
.hero{
  min-height:430px;
  background:
    radial-gradient(circle at 12% 14%,rgba(255,255,255,.86),transparent 30%),
    linear-gradient(145deg,#f2eeff 0%,#eae4ff 100%);
  border-color:#ded7f4;
  box-shadow:0 16px 38px rgba(70,58,143,.09);
}

.teacher-hero{
  right:0;
  top:0;
  bottom:auto;
  width:56%;
  height:100%;
  object-fit:cover;
  object-position:49% 38%;
  border-radius:0;
  filter:saturate(.96) contrast(.99);
}

.hero-fade{
  background:
    linear-gradient(
      90deg,
      rgba(242,238,255,1) 0%,
      rgba(242,238,255,1) 37%,
      rgba(242,238,255,.88) 45%,
      rgba(242,238,255,.30) 54%,
      rgba(242,238,255,0) 64%
    ),
    linear-gradient(
      0deg,
      rgba(236,230,255,.55) 0%,
      rgba(236,230,255,0) 31%
    );
}

.hero-copy{
  width:49%;
  padding:49px 0 0 22px;
}

.hero-copy h1{
  font-size:39px;
  line-height:1.02;
}

#helloName{
  white-space:normal;
}

.hero-subtitle{
  margin-top:23px;
  max-width:205px;
  font-size:16px;
  line-height:1.45;
  color:#555985;
}

.hero-status{
  left:16px;
  right:16px;
  bottom:15px;
  min-height:83px;
  grid-template-columns:48px minmax(0,1fr) 20px;
  gap:11px;
  padding:12px 13px;
  border-radius:21px;
  background:rgba(255,255,255,.95);
}

.hero-status-icon{
  width:48px;
  height:48px;
  font-size:24px;
}

.hero-status-title{
  font-size:17px;
  white-space:normal;
}

.hero-status-subtitle{
  font-size:11.5px;
  white-space:normal;
}

/* Экран повторения */
.repetition-lead{
  display:grid;
  grid-template-columns:52px 1fr;
  gap:13px;
  align-items:center;
  padding:17px;
  border:1px solid #e2dcf5;
  border-radius:22px;
  background:
    radial-gradient(circle at 90% 10%,rgba(123,105,239,.13),transparent 36%),
    linear-gradient(145deg,#fff 0%,#f4f0ff 100%);
  box-shadow:0 10px 28px rgba(65,55,125,.05);
}

.repetition-lead-mark{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:17px;
  background:#6a58d7;
  color:#fff;
  font-size:25px;
  font-weight:900;
}

.repetition-lead h2{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:21px;
  line-height:1.15;
  color:#1b1c43;
}

.repetition-lead p{
  margin:5px 0 0;
  color:#747793;
  font-size:12.5px;
  line-height:1.45;
}

.repetition-list{
  display:grid;
  gap:11px;
  margin-top:13px;
}

.repetition-topic-card{
  padding:17px;
  border:1px solid #e5e1f1;
  border-radius:21px;
  background:rgba(255,255,255,.97);
  box-shadow:0 9px 24px rgba(61,51,126,.045);
}

.repetition-topic-card.due{
  border-color:#d8d0f7;
  box-shadow:0 11px 28px rgba(91,72,190,.08);
}

.repetition-topic-card.mastered{
  background:rgba(250,251,253,.93);
}

.repetition-topic-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.repetition-topic-title-wrap{
  min-width:0;
}

.repetition-topic-stage{
  color:#8274cf;
  font-size:9.5px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.repetition-topic-title{
  margin:5px 0 0;
  color:#202148;
  font-size:15px;
  line-height:1.38;
  font-weight:900;
}

.repetition-topic-badge{
  flex:0 0 auto;
  padding:5px 8px;
  border-radius:999px;
  font-size:9px;
  font-weight:900;
}

.repetition-topic-badge.due{
  background:#eee9ff;
  color:#5949bd;
}

.repetition-topic-badge.progress{
  background:#fff4dc;
  color:#916719;
}

.repetition-topic-badge.waiting{
  background:#f0eff4;
  color:#7f8091;
}

.repetition-topic-badge.mastered{
  background:#eaf7f0;
  color:#35775b;
}

.repetition-topic-meta{
  margin-top:10px;
  color:#7b7e97;
  font-size:11.5px;
  line-height:1.4;
}

.repetition-cycle{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:5px;
  margin-top:13px;
}

.repetition-cycle span{
  height:5px;
  border-radius:999px;
  background:#ece9f3;
}

.repetition-cycle span.done{
  background:#6f5bdd;
}

.repetition-cycle span.current{
  background:#bdb2f4;
}

.repetition-topic-button{
  width:100%;
  min-height:42px;
  margin-top:14px;
  border:0;
  border-radius:11px;
  background:linear-gradient(145deg,#7461df,#5b48c1);
  color:#fff;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.repetition-rule{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:13px;
  padding:13px 14px;
  border-radius:18px;
  background:rgba(255,255,255,.68);
  color:#737690;
  font-size:11.5px;
  line-height:1.45;
}

.repetition-rule-icon{
  flex:0 0 auto;
  min-width:43px;
  padding:5px 7px;
  border-radius:10px;
  background:#eeeaff;
  color:#5d4cc3;
  font-size:10px;
  font-weight:950;
  text-align:center;
}

.repetition-intro-card{
  padding:25px 20px 20px;
  border:1px solid #e1dcf3;
  border-radius:27px;
  background:
    radial-gradient(circle at 88% 8%,rgba(123,105,239,.13),transparent 32%),
    #fff;
  box-shadow:0 14px 34px rgba(65,55,125,.06);
  text-align:center;
}

.repetition-intro-icon{
  width:58px;
  height:58px;
  margin:0 auto 15px;
  display:grid;
  place-items:center;
  border-radius:19px;
  background:#eee9ff;
  color:#6552d1;
  font-size:28px;
}

.repetition-intro-card h2{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  color:#191a42;
  font-size:27px;
}

.repetition-intro-card>p{
  max-width:380px;
  margin:12px auto 0;
  color:#5f6384;
  font-size:15px;
  line-height:1.55;
}

.repetition-check-note{
  display:grid;
  gap:4px;
  margin-top:20px;
  padding:15px;
  border-radius:18px;
  background:#f7f4ff;
  color:#666a88;
  font-size:12px;
  line-height:1.4;
  text-align:left;
}

.repetition-check-note strong{
  color:#40368f;
  font-size:12.5px;
}

.repetition-theory-button{
  margin-top:17px;
}

.repetition-result-meta{
  margin-top:13px;
  padding:12px 13px;
  border-radius:15px;
  background:#f3efff;
  color:#5d52a4;
  font-size:12.5px;
  line-height:1.4;
  font-weight:800;
}

#resultSecondaryBtn{
  margin-top:8px;
  width:100%;
}

@media(max-width:420px){
  .hero{
    min-height:420px;
  }

  .teacher-hero{
    width:57%;
    object-position:49% 36%;
  }

  .hero-copy{
    width:50%;
    padding:46px 0 0 19px;
  }

  .hero-copy h1{
    font-size:35px;
  }

  .hero-subtitle{
    max-width:180px;
    font-size:15px;
  }
}

@media(max-width:370px){
  .hero{
    min-height:405px;
  }

  .teacher-hero{
    width:58%;
  }

  .hero-copy{
    width:51%;
    padding-left:17px;
  }

  .hero-copy h1{
    font-size:31px;
  }

  .hero-subtitle{
    max-width:160px;
    font-size:13.5px;
  }
}

/* ============================================================
   v15.1 — HERO ONLY
   Структура:
   hero
    ├─ background image на всю карточку
    ├─ gradient overlay
    ├─ greeting content слева сверху
    └─ action card поверх изображения снизу
   ============================================================ */

.hero{
  position:relative;
  height:456px;
  min-height:456px;
  overflow:hidden;
  border-radius:30px;
  background:#f4f0ff;
  border:1px solid rgba(222,216,244,.95);
  box-shadow:0 16px 38px rgba(70,58,143,.10);
}

/* Одна фотография занимает весь hero. Никакой правой колонки. */
.teacher-hero{
  position:absolute;
  inset:0;
  z-index:1;
  width:100%;
  height:100%;
  max-width:none;
  object-fit:cover;
  object-position:72% center;
  border-radius:inherit;
  filter:saturate(.97) contrast(.99);
  transform:none;
}

/* Только мягкий градиент поверх фото — без отдельной светлой панели. */
.hero-fade{
  position:absolute;
  inset:0;
  z-index:2;
  pointer-events:none;
  background:
    linear-gradient(
      90deg,
      rgba(249,248,255,.98) 0%,
      rgba(249,248,255,.96) 18%,
      rgba(249,248,255,.88) 31%,
      rgba(249,248,255,.66) 42%,
      rgba(249,248,255,.36) 52%,
      rgba(249,248,255,.12) 61%,
      rgba(249,248,255,0) 72%
    ),
    linear-gradient(
      0deg,
      rgba(238,233,255,.26) 0%,
      rgba(238,233,255,0) 34%
    );
}

.hero-copy{
  position:absolute;
  top:0;
  left:0;
  z-index:3;
  width:235px;
  padding:42px 0 0 21px;
}

.hero-copy h1{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:40px;
  line-height:.98;
  letter-spacing:-.04em;
  color:#111542;
}

.hero-copy h1 span{
  display:block;
}

#helloName{
  white-space:nowrap;
  font-size:1em;
}

.hero-subtitle{
  width:165px;
  max-width:165px;
  margin:22px 0 0;
  font-size:17px;
  line-height:1.45;
  color:#626783;
}

.hero-heart{
  display:inline;
  margin-left:3px;
  white-space:nowrap;
}

/* Плавающая карточка остаётся внутри hero поверх фотографии. */
.hero-status{
  position:absolute;
  z-index:4;
  left:19px;
  right:19px;
  bottom:18px;
  min-height:86px;
  display:grid;
  grid-template-columns:50px minmax(0,1fr) 22px;
  align-items:center;
  gap:12px;
  padding:13px 15px 13px 13px;
  border-radius:26px;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(255,255,255,.96);
  box-shadow:0 12px 30px rgba(45,42,93,.12);
  backdrop-filter:blur(12px);
}

.hero-status-icon{
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#eee9ff;
  color:#765be7;
  font-size:25px;
  line-height:1;
}

.hero-status-title{
  font-family:Georgia,"Times New Roman",serif;
  font-size:18px;
  line-height:1.12;
  color:#191943;
  white-space:normal;
}

.hero-status-subtitle{
  margin-top:4px;
  font-size:12px;
  line-height:1.3;
  color:#737691;
  white-space:normal;
}

.hero-status-arrow{
  color:#8b8da5;
  font-size:34px;
  line-height:1;
}

@media(max-width:420px){
  .hero{
    height:452px;
    min-height:452px;
  }

  .teacher-hero{
    width:100%;
    height:100%;
    object-position:72% center;
  }

  .hero-copy{
    width:228px;
    padding:40px 0 0 20px;
  }

  .hero-copy h1{
    font-size:39px;
    line-height:.98;
  }

  .hero-subtitle{
    width:160px;
    max-width:160px;
    font-size:17px;
    line-height:1.45;
  }
}

@media(max-width:370px){
  .hero{
    height:438px;
    min-height:438px;
  }

  .hero-copy{
    width:215px;
    padding:37px 0 0 18px;
  }

  .hero-copy h1{
    font-size:37px;
  }

  .hero-subtitle{
    width:150px;
    max-width:150px;
    font-size:16.5px;
  }

  .hero-status{
    left:16px;
    right:16px;
    bottom:16px;
  }
}

/* ============================================================
   v15.2 — CURRENT VERSION POLISH
   1) Hero: photo reads as one full-card background, without a 50/50 panel.
   2) Quiz question typography: smaller and calmer on mobile.
   ============================================================ */

/* Softer translucent veil: the photograph remains visible across the whole hero. */
.hero-fade{
  background:
    linear-gradient(
      90deg,
      rgba(248,246,255,.90) 0%,
      rgba(248,246,255,.82) 16%,
      rgba(248,246,255,.66) 29%,
      rgba(248,246,255,.42) 40%,
      rgba(248,246,255,.20) 50%,
      rgba(248,246,255,.06) 59%,
      rgba(248,246,255,0) 68%
    ),
    linear-gradient(
      0deg,
      rgba(236,231,255,.20) 0%,
      rgba(236,231,255,0) 34%
    );
}

/* Keep the agreed full-background composition with the face safely visible. */
.teacher-hero{
  object-position:72% center;
}

/* Test questions: reduce visual weight so more of the task fits on one screen. */
.question{
  font-size:clamp(20px,5vw,22px);
  line-height:1.25;
  letter-spacing:-.012em;
  margin:8px 0 17px;
}

@media(max-width:370px){
  .question{
    font-size:19.5px;
    line-height:1.24;
  }
}

/* v15.2.2 — РНО по утверждённому референсу. Только визуал экрана РНО. */
#reviewScreen .subscreen-head{
  gap:13px;
  margin:7px 3px 18px;
  align-items:center;
}
#reviewScreen .subscreen-head .eyebrow{
  font-size:10.5px;
  font-weight:900;
  letter-spacing:.105em;
  color:#8d91ab;
}
#reviewScreen .subscreen-head h1{
  margin-top:4px;
  font-size:30px;
  line-height:1;
  letter-spacing:-.035em;
  color:#11143d;
}
#reviewScreen .subscreen-back{
  width:46px;
  height:46px;
  border:0;
  border-radius:16px;
  background:#fff;
  box-shadow:0 9px 26px rgba(58,49,121,.055);
  color:#202350;
  font-size:23px;
}
#reviewScreen .rno-hero{
  min-height:250px;
  border-radius:28px;
  border:1px solid #e6e1f6;
  background:#fff;
  box-shadow:0 14px 38px rgba(67,56,131,.06);
}
#reviewScreen .rno-teacher{
  position:absolute;
  z-index:1;
  width:76%;
  height:auto;
  max-width:none;
  right:-2%;
  bottom:0;
  border-radius:0 27px 27px 0;
  object-fit:contain;
  object-position:right bottom;
}
#reviewScreen .rno-hero::after{
  z-index:2;
  background:linear-gradient(90deg,
    rgba(255,255,255,.99) 0%,
    rgba(255,255,255,.98) 34%,
    rgba(255,255,255,.94) 45%,
    rgba(255,255,255,.72) 56%,
    rgba(255,255,255,.28) 67%,
    rgba(255,255,255,0) 78%);
}
#reviewScreen .rno-hero-copy{
  position:relative;
  z-index:3;
  width:53%;
  min-height:250px;
  padding:27px 0 22px 20px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
}
#reviewScreen .rno-kicker{
  font-size:10.5px;
  font-weight:950;
  letter-spacing:.105em;
  color:#7664de;
  white-space:nowrap;
}
#reviewScreen .rno-title{
  width:100%;
  max-width:182px;
  margin-top:12px;
  font-size:23px;
  line-height:1.08;
  letter-spacing:-.02em;
  color:#11143d;
}
#reviewScreen .rno-subtitle{
  width:100%;
  max-width:180px;
  margin-top:13px;
  font-size:12.5px;
  line-height:1.5;
  color:#666c94;
}
#reviewScreen .rno-start{
  position:relative;
  z-index:4;
  margin-top:14px;
  padding:10px 15px;
  border-radius:11px;
  box-shadow:0 8px 20px rgba(94,73,203,.16);
}
#reviewScreen .rno-info-grid{
  gap:11px;
  margin-top:13px;
}
#reviewScreen .rno-info-card{
  min-height:100px;
  padding:18px 16px 15px;
  border-radius:24px;
  background:rgba(255,255,255,.97);
  border:1px solid #e5e0f5;
  box-shadow:0 11px 28px rgba(61,51,126,.04);
}
#reviewScreen .rno-info-label{
  color:#74799b;
  font-size:12.5px;
  line-height:1.3;
}
#reviewScreen .rno-info-card strong{
  margin-top:6px;
  font-size:37px;
  line-height:1;
  color:#11143d;
}
#reviewScreen .rno-schedule-card{
  gap:13px;
  margin-top:13px;
  padding:16px 17px;
  min-height:82px;
  border-radius:24px;
  background:rgba(248,246,255,.96);
  border:1px solid #e3ddf7;
  box-shadow:0 9px 26px rgba(61,51,126,.03);
}
#reviewScreen .rno-schedule-icon{
  width:47px;
  height:47px;
  border-radius:16px;
  background:#fff;
  color:#735fe0;
  font-size:22px;
  box-shadow:0 7px 20px rgba(67,56,131,.04);
}
#reviewScreen .rno-schedule-title{
  font-size:15px;
  line-height:1.25;
  color:#20224f;
}
#reviewScreen .rno-schedule-meta{
  margin-top:4px;
  font-size:13px;
  line-height:1.35;
  color:#717698;
}
#reviewScreen .rno-note{display:none}

@media(max-width:390px){
  #reviewScreen .subscreen-head h1{font-size:28px}
  #reviewScreen .subscreen-back{width:44px;height:44px}
  #reviewScreen .rno-hero{min-height:242px}
  #reviewScreen .rno-hero-copy{
    width:54%;
    min-height:242px;
    padding:24px 0 20px 18px;
  }
  #reviewScreen .rno-kicker{font-size:10px}
  #reviewScreen .rno-title{max-width:170px;font-size:22px}
  #reviewScreen .rno-subtitle{max-width:168px;font-size:12px}
  #reviewScreen .rno-teacher{width:75%;right:-2%;bottom:0}
  #reviewScreen .rno-info-card{min-height:96px;padding:16px 14px 14px}
  #reviewScreen .rno-info-card strong{font-size:35px}
}


/* v15.2.3 — RNO hero: photo -> gradient -> content. Only this hero is changed. */
#reviewScreen .rno-hero{
  position:relative;
  height:310px;
  min-height:310px;
  overflow:hidden;
  background:#fff;
  border-radius:30px;
  border:1px solid #e6e1f6;
  box-shadow:0 14px 38px rgba(67,56,131,.06);
}
#reviewScreen .rno-hero::after{
  content:none;
}
#reviewScreen .rno-hero__photo{
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  z-index:0;
  width:59%;
  height:100%;
  object-fit:cover;
  object-position:52% center;
  opacity:1;
  border-radius:0;
  padding:0;
  margin:0;
  display:block;
  max-width:none;
}
#reviewScreen .rno-hero__gradient{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:linear-gradient(
    90deg,
    #fff 0%,
    #fff 34%,
    rgba(255,255,255,.98) 39%,
    rgba(255,255,255,.82) 46%,
    rgba(255,255,255,.38) 54%,
    rgba(255,255,255,0) 66%
  );
}
#reviewScreen .rno-hero__content{
  position:relative;
  z-index:2;
  width:50%;
  height:100%;
  box-sizing:border-box;
  padding:30px 0 28px 24px;
}
#reviewScreen .rno-kicker{
  font-size:10.5px;
  font-weight:950;
  letter-spacing:.105em;
  color:#7664de;
  white-space:nowrap;
}
#reviewScreen .rno-title{
  width:100%;
  max-width:185px;
  margin-top:14px;
  font-size:clamp(24px,6.5vw,27px);
  line-height:1.08;
  letter-spacing:-.025em;
  color:#11143d;
}
#reviewScreen .rno-subtitle{
  width:100%;
  max-width:178px;
  margin-top:16px;
  font-size:12.5px;
  line-height:1.5;
  color:#666c94;
}
#reviewScreen .rno-start{
  position:relative;
  z-index:3;
  margin-top:14px;
}
@media(max-width:390px){
  #reviewScreen .rno-hero{
    height:300px;
    min-height:300px;
  }
  #reviewScreen .rno-hero__photo{
    width:59%;
    object-position:52% center;
  }
  #reviewScreen .rno-hero__content{
    width:50%;
    padding:27px 0 25px 21px;
  }
  #reviewScreen .rno-title{
    max-width:174px;
    font-size:24px;
  }
  #reviewScreen .rno-subtitle{
    max-width:166px;
    font-size:12px;
  }
}

/* v15.2.4 — RNO hero simplified: text left + circular photo right. */
#reviewScreen .rno-hero{
  position:relative;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  height:auto;
  min-height:214px;
  overflow:hidden;
  box-sizing:border-box;
  padding:24px;
  background:#fff;
  border:1px solid #e6e1f6;
  border-radius:30px;
  box-shadow:0 14px 38px rgba(67,56,131,.06);
}
#reviewScreen .rno-hero::after,
#reviewScreen .rno-hero__gradient{
  display:none !important;
  content:none !important;
}
#reviewScreen .rno-hero__content{
  position:relative;
  z-index:2;
  flex:1 1 auto;
  width:60%;
  min-width:0;
  height:auto;
  box-sizing:border-box;
  padding:0;
}
#reviewScreen .rno-hero__photo{
  position:static;
  z-index:1;
  display:block;
  width:108px;
  height:108px;
  min-width:108px;
  max-width:108px;
  flex:0 0 108px;
  object-fit:contain;
  object-position:center;
  border-radius:0;
  opacity:1;
  padding:0;
  margin:0;
  box-shadow:none;
}
#reviewScreen .rno-kicker{
  margin:0;
  font-size:10px;
  line-height:1.25;
  font-weight:950;
  letter-spacing:.10em;
  color:#7664de;
}
#reviewScreen .rno-title{
  width:auto;
  max-width:100%;
  margin-top:10px;
  font-size:clamp(22px,5.8vw,25px);
  line-height:1.08;
  letter-spacing:-.025em;
  color:#11143d;
}
#reviewScreen .rno-subtitle{
  width:auto;
  max-width:100%;
  margin-top:12px;
  font-size:12px;
  line-height:1.45;
  color:#666c94;
}
#reviewScreen .rno-start{
  margin-top:12px;
}
@media(max-width:390px){
  #reviewScreen .rno-hero{
    min-height:204px;
    gap:12px;
    padding:21px 18px;
  }
  #reviewScreen .rno-hero__content{
    width:60%;
  }
  #reviewScreen .rno-hero__photo{
    width:108px;
    height:108px;
    min-width:108px;
    max-width:108px;
    flex-basis:108px;
  }
  #reviewScreen .rno-kicker{font-size:9.5px}
  #reviewScreen .rno-title{font-size:22px}
  #reviewScreen .rno-subtitle{font-size:11.5px}
}

/* ============================================================
   v15.2.6 — HOME HERO ONLY
   Text left + complete PNG right. No background image, crop, fade or opacity.
   Everything outside the home hero remains unchanged.
   ============================================================ */
#homeScreen .hero{
  position:relative;
  display:flex;
  flex-direction:column;
  height:auto;
  min-height:0;
  overflow:hidden;
  box-sizing:border-box;
  padding:24px 18px 18px;
  border-radius:30px;
  background:#fff;
  border:1px solid rgba(222,216,244,.95);
  box-shadow:0 16px 38px rgba(70,58,143,.10);
}

#homeScreen .hero-main-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  width:100%;
  min-height:170px;
}

#homeScreen .hero-copy{
  position:static;
  z-index:auto;
  flex:1 1 auto;
  width:60%;
  min-width:0;
  padding:0;
}

#homeScreen .hero-copy h1{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:34px;
  line-height:.98;
  letter-spacing:-.035em;
  color:#111542;
}

#homeScreen .hero-copy h1 span{
  display:block;
}

#homeScreen #helloName{
  white-space:nowrap;
  font-size:1em;
}

#homeScreen .hero-subtitle{
  width:auto;
  max-width:172px;
  margin:18px 0 0;
  font-size:15.5px;
  line-height:1.45;
  color:#626783;
}

#homeScreen .hero-image-wrap{
  width:108px;
  height:108px;
  flex:0 0 108px;
  display:flex;
  align-items:center;
  justify-content:center;
}

#homeScreen .teacher-hero{
  position:static;
  inset:auto;
  z-index:auto;
  display:block;
  width:100%;
  height:100%;
  min-width:0;
  max-width:100%;
  object-fit:contain;
  object-position:center;
  border-radius:0;
  opacity:1;
  filter:none;
  transform:none;
  padding:0;
  margin:0;
}

#homeScreen .hero-fade{
  display:none !important;
}

#homeScreen .hero-status{
  position:static;
  z-index:auto;
  left:auto;
  right:auto;
  bottom:auto;
  width:100%;
  box-sizing:border-box;
  margin-top:18px;
  min-height:86px;
}

@media(max-width:390px){
  #homeScreen .hero{
    padding:22px 16px 16px;
  }
  #homeScreen .hero-main-row{
    min-height:162px;
    gap:12px;
  }
  #homeScreen .hero-copy{
    width:60%;
  }
  #homeScreen .hero-copy h1{
    font-size:32px;
  }
  #homeScreen .hero-subtitle{
    max-width:158px;
    margin-top:16px;
    font-size:14.5px;
  }
  #homeScreen .hero-image-wrap{
    width:108px;
    height:108px;
    flex-basis:108px;
  }
  #homeScreen .hero-status{
    margin-top:16px;
  }
}

@media(max-width:360px){
  #homeScreen .hero-copy h1{
    font-size:30px;
  }
  #homeScreen .hero-subtitle{
    max-width:145px;
    font-size:14px;
  }
  #homeScreen .hero-image-wrap{
    width:100px;
    height:100px;
    flex-basis:100px;
  }
}

/* ============================================================
   v15.2.7 — HOME HERO ONLY (approved centered composition)
   Three independent layers:
   1) compact greeting card on top
   2) large centered circular character
   3) existing action card overlapping the circle
   Everything outside the dashboard hero stays unchanged.
   ============================================================ */
#dashboard .home-hero{
  position:relative;
  display:block;
  height:520px;
  min-height:520px;
  overflow:hidden;
  padding:0;
  border-radius:30px;
  background:#f4f0ff;
  border:1px solid rgba(222,216,244,.92);
  box-shadow:0 16px 38px rgba(70,58,143,.10);
}

#dashboard .home-greeting-card{
  position:absolute;
  z-index:5;
  top:18px;
  left:20px;
  right:20px;
  padding:14px 18px 15px;
  border-radius:23px;
  background:rgba(255,255,255,.91);
  border:1px solid rgba(232,227,249,.92);
  box-shadow:0 6px 20px rgba(67,56,131,.035);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

#dashboard .home-greeting-card h1{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(29px,7.4vw,32px);
  line-height:.98;
  letter-spacing:-.035em;
  color:#111542;
  font-weight:700;
  max-width:100%;
}

#dashboard .home-greeting-card #helloName{
  white-space:normal;
  font-size:1em;
}

#dashboard .home-greeting-subtitle{
  margin:7px 0 0;
  font-size:15.5px;
  line-height:1.3;
  color:#737895;
}

#dashboard .home-greeting-subtitle .hero-heart{
  white-space:nowrap;
}

#dashboard .home-character-circle{
  position:absolute;
  z-index:2;
  top:116px;
  left:50%;
  transform:translateX(-50%);
  width:345px;
  height:345px;
  width:min(88vw,345px);
  height:min(88vw,345px);
  max-width:345px;
  max-height:345px;
  aspect-ratio:1/1;
  border-radius:50%;
  overflow:hidden;
  background:#eee7ff;
  border:none;
  outline:none;
  box-shadow:none;
}

#dashboard .home-character-photo{
  position:absolute;
  left:-5%;
  top:-5%;
  display:block;
  width:110%;
  height:110%;
  max-width:none;
  object-fit:cover;
  object-position:center;
  opacity:1;
  border:0;
  outline:0;
  border-radius:0;
  box-shadow:none;
  filter:none;
  margin:0;
  padding:0;
}

#dashboard .home-hero .hero-status{
  position:absolute;
  z-index:6;
  left:19px;
  right:19px;
  bottom:20px;
  width:auto;
  min-height:88px;
  margin:0;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:52px minmax(0,1fr) 22px;
  align-items:center;
  gap:12px;
  padding:13px 15px 13px 13px;
  border-radius:26px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(255,255,255,.98);
  box-shadow:0 12px 30px rgba(45,42,93,.11);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

#dashboard .home-hero .hero-status-icon{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#eee9ff;
  color:#765be7;
  font-size:25px;
  line-height:1;
}

#dashboard .home-hero .hero-status-title{
  font-family:Georgia,"Times New Roman",serif;
  font-size:18px;
  line-height:1.12;
  color:#191943;
  white-space:normal;
}

#dashboard .home-hero .hero-status-subtitle{
  margin-top:4px;
  font-size:12.5px;
  line-height:1.3;
  color:#737691;
  white-space:normal;
}

#dashboard .home-hero .hero-status-arrow{
  color:#8b8da5;
  font-size:34px;
  line-height:1;
}

/* Neutralize old home-hero layout hooks only inside dashboard. */
#dashboard .home-hero .hero-main-row,
#dashboard .home-hero .hero-copy,
#dashboard .home-hero .hero-image-wrap,
#dashboard .home-hero > .teacher-hero,
#dashboard .home-hero > .hero-fade{
  display:none !important;
}

@media(max-width:390px){
  #dashboard .home-hero{
    height:510px;
    min-height:510px;
  }
  #dashboard .home-greeting-card{
    top:17px;
    left:17px;
    right:17px;
    padding:13px 16px 14px;
  }
  #dashboard .home-greeting-card h1{
    font-size:29px;
  }
  #dashboard .home-greeting-subtitle{
    font-size:15px;
  }
  #dashboard .home-character-circle{
    top:112px;
    width:338px;
    height:338px;
    width:min(88vw,338px);
    height:min(88vw,338px);
  }
  #dashboard .home-hero .hero-status{
    left:17px;
    right:17px;
    bottom:18px;
  }
}

@media(max-width:360px){
  #dashboard .home-hero{
    height:492px;
    min-height:492px;
  }
  #dashboard .home-greeting-card h1{
    font-size:27px;
  }
  #dashboard .home-greeting-subtitle{
    font-size:14.5px;
  }
  #dashboard .home-character-circle{
    top:108px;
    width:322px;
    height:322px;
    width:min(89vw,322px);
    height:min(89vw,322px);
  }
  #dashboard .home-hero .hero-status{
    left:15px;
    right:15px;
    bottom:16px;
    grid-template-columns:48px minmax(0,1fr) 20px;
  }
  #dashboard .home-hero .hero-status-icon{
    width:48px;
    height:48px;
  }
  #dashboard .home-hero .hero-status-title{
    font-size:17px;
  }
}


/* v15.6 — личный прогресс: финальный макет */
#statsScreen{
  padding-bottom:4px;
}
.stats-page-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin:2px 2px 17px;
}
.stats-page-head h1{
  margin:0;
  color:#10143e;
  font-size:30px;
  line-height:1;
  font-weight:950;
  letter-spacing:-.035em;
}
.stats-page-back{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  border:0;
  background:transparent;
  color:#171c53;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}
.stats-rank-grid{
  display:grid;
  grid-template-columns:minmax(0,.98fr) minmax(0,1.08fr);
  gap:10px;
}
.stats-own-place-card,
.stats-top-card,
.stats-full-ranking,
.stats-section-card{
  border:1px solid rgba(224,220,241,.9);
  box-shadow:0 12px 30px rgba(64,56,126,.07);
}
.stats-own-place-card{
  min-height:190px;
  padding:15px;
  overflow:hidden;
  border-radius:24px;
  background:
    radial-gradient(circle at 15% 8%,rgba(214,203,255,.65),transparent 34%),
    linear-gradient(145deg,#f1ecff,#faf8ff);
  border-color:#ded4ff;
}
.stats-own-top{
  display:flex;
  align-items:center;
  gap:11px;
}
.stats-own-trophy{
  width:64px;
  height:64px;
  flex:0 0 64px;
  display:grid;
  place-items:center;
  border-radius:21px;
  background:rgba(255,255,255,.48);
  color:#806bed;
}
.stats-own-trophy svg{
  width:48px;
  height:48px;
  fill:rgba(128,107,237,.16);
  stroke:currentColor;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.stats-own-place-copy{
  min-width:0;
}
.stats-own-place-label{
  color:#6553c2;
  font-size:12px;
  font-weight:750;
}
.stats-own-place-number{
  margin-top:3px;
  display:flex;
  align-items:baseline;
  gap:5px;
  color:#111544;
  font-size:35px;
  line-height:.95;
  font-weight:950;
  letter-spacing:-.035em;
}
.stats-own-place-number em{
  font-style:normal;
  font-size:24px;
  font-weight:950;
}
.stats-own-total{
  margin-top:5px;
  color:#6555bd;
  font-size:15px;
  font-weight:750;
}
.stats-own-motivation{
  min-height:74px;
  margin-top:13px;
  display:flex;
  align-items:center;
  padding:13px 13px;
  border-radius:17px;
  background:rgba(255,255,255,.47);
  color:#4f429f;
  font-size:12px;
  line-height:1.42;
  font-weight:750;
}
.stats-top-card{
  min-height:190px;
  padding:14px 13px 12px;
  border-radius:24px;
  background:linear-gradient(150deg,#fffdfa,#ffffff);
}
.stats-top-title{
  color:#15183f;
  font-size:18px;
  line-height:1.05;
  font-weight:950;
  letter-spacing:-.02em;
}
.stats-top-list{
  display:grid;
  gap:0;
  margin-top:8px;
}
.stats-top-row{
  display:grid;
  grid-template-columns:28px 28px minmax(0,1fr) auto;
  align-items:center;
  gap:6px;
  min-height:41px;
  padding:4px 1px;
  border-bottom:1px solid #eeeaf3;
}
.stats-top-row:nth-child(3){
  border-bottom:0;
}
.stats-top-row.is-me{
  margin:0 -3px;
  padding-left:3px;
  padding-right:3px;
  border-radius:10px;
  background:#f5f1ff;
}
.stats-medal{
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border-radius:50%;
  font-size:12px;
  font-weight:950;
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.05);
}
.stats-medal.rank-1{background:#ffc944;color:#8f6200}
.stats-medal.rank-2{background:#d9dfe9;color:#5d6574}
.stats-medal.rank-3{background:#efa65d;color:#8f4e13}
.stats-top-avatar{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(145deg,#eae5ff,#f7f5ff);
  color:#5c4fc0;
  font-size:8px;
  font-weight:950;
}
.stats-top-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#24274b;
  font-size:10px;
  font-weight:850;
}
.stats-top-rating{
  color:#171a43;
  font-size:10px;
  font-weight:950;
}
.stats-top-empty{
  padding:12px 0;
  color:#9290a4;
  font-size:10px;
  line-height:1.35;
}
.stats-ranking-toggle{
  width:100%;
  min-height:34px;
  margin-top:8px;
  padding:0 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:0;
  border-radius:12px;
  background:#f3f4f8;
  color:#191b42;
  font-size:10.5px;
  font-weight:900;
  cursor:pointer;
}
.stats-ranking-toggle span:last-child{
  font-size:20px;
  line-height:1;
  margin-top:-1px;
}
.stats-full-ranking{
  margin-top:10px;
  padding:15px 14px;
  border-radius:22px;
  background:#fff;
}
.stats-full-ranking-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.stats-full-ranking-head h2,
.stats-results-section h2,
.stats-sections-section h2{
  margin:0;
  color:#11143e;
  font-size:23px;
  line-height:1.08;
  font-weight:950;
  letter-spacing:-.025em;
}
.stats-full-ranking-head span{
  color:#9694a8;
  font-size:9.5px;
  font-weight:800;
}
.stats-ranking-list{
  display:grid;
  gap:5px;
}
.stats-ranking-row{
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:6px 8px;
  border-radius:13px;
  background:#faf9fd;
}
.stats-ranking-row.is-me{
  background:#f0ecff;
  border:1px solid #d7ceff;
}
.stats-ranking-place{
  text-align:center;
  color:#6c6a83;
  font-size:13px;
  font-weight:950;
}
.stats-ranking-name{
  min-width:0;
  color:#2f314f;
  font-size:11px;
  font-weight:850;
}
.stats-you-badge{
  display:inline-block;
  margin-left:6px;
  padding:2px 6px;
  border-radius:999px;
  background:#6d59df;
  color:#fff;
  font-size:7px;
  font-weight:950;
  vertical-align:middle;
}
.stats-ranking-rating{
  color:#353267;
  font-size:11px;
  font-weight:950;
}
.stats-ranking-separator{
  padding:7px 5px 2px;
  color:#9b99ac;
  font-size:8px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.stats-results-section,
.stats-sections-section{
  margin-top:22px;
}
.stats-rings-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:11px;
}
.stats-ring-card{
  --ring-color:#6d59df;
  min-width:0;
  min-height:196px;
  padding:12px 9px 11px;
  border:1px solid #ebe7f2;
  border-radius:21px;
  text-align:center;
  box-shadow:0 10px 24px rgba(58,51,113,.04);
}
.stats-ring-homework{
  --ring-color:#42c58f;
  background:linear-gradient(145deg,#f0fcf8,#ffffff 62%);
}
.stats-ring-rno{
  --ring-color:#3ea0ef;
  background:linear-gradient(145deg,#f0f8ff,#ffffff 62%);
}
.stats-ring-repetition{
  --ring-color:#8b5af3;
  background:linear-gradient(145deg,#faf1ff,#ffffff 62%);
}
.stats-ring-homework .stats-result-icon{background:#ddf8ec}
.stats-ring-rno .stats-result-icon{background:#e0f1ff}
.stats-ring-repetition .stats-result-icon{background:#efe4ff}
.stats-ring-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:5px;
  color:#171a43;
}
.stats-ring-card-head strong{
  font-size:13px;
  font-weight:950;
}
.stats-result-icon{
  width:29px;
  height:29px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#eeeaff;
  color:var(--ring-color);
  font-size:17px;
  line-height:1;
  font-weight:900;
}
.stats-ring{
  --progress:0;
  width:94px;
  height:94px;
  margin:10px auto 0;
  padding:9px;
  border-radius:50%;
  background:conic-gradient(var(--ring-color) calc(var(--progress) * 1%),#e5e8ee 0);
}
.stats-ring-inner{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  border-radius:50%;
  background:#fff;
}
.stats-ring-inner strong{
  color:#14173f;
  font-size:14px;
  line-height:1;
  font-weight:950;
  letter-spacing:-.03em;
}
.stats-ring-inner span{
  color:var(--ring-color);
  font-size:12px;
  line-height:1;
  font-weight:950;
}
.stats-ring-caption{
  margin-top:9px;
  min-height:25px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#666a91;
  font-size:9px;
  line-height:1.22;
  font-weight:700;
}
.stats-sections-list{
  margin-top:11px;
}
.stats-section-card{
  padding:14px 13px 13px;
  border-radius:24px;
  background:rgba(255,255,255,.98);
}
.stats-section-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.stats-section-heading{
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
}
.stats-section-icon{
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(145deg,#ffdce9,#fff1f6);
  color:#df4779;
  font-size:15px;
  font-weight:950;
}
.stats-section-card-head h3{
  margin:0;
  color:#171a43;
  font-size:18px;
  line-height:1.05;
  font-weight:950;
  letter-spacing:-.02em;
}
.stats-section-card-head span{
  display:block;
  margin-top:4px;
  color:#8d90aa;
  font-size:10px;
  font-weight:750;
}
.stats-section-overall{
  flex:0 0 auto;
  text-align:right;
}
.stats-section-overall strong{
  display:block;
  color:#191b49;
  font-size:28px;
  line-height:.95;
  font-weight:950;
  letter-spacing:-.03em;
}
.stats-section-overall span{
  margin-top:4px;
  color:#8e91aa;
  font-size:8px;
  font-weight:700;
}
.stats-task-list{
  display:grid;
  gap:3px;
  margin-top:13px;
  padding:6px;
  border:1px solid #eeebf3;
  border-radius:16px;
  background:#fff;
}
.stats-task-wrap{
  border-radius:11px;
  overflow:hidden;
}
.stats-task-row{
  width:100%;
  min-height:36px;
  display:grid;
  grid-template-columns:72px minmax(55px,1fr) 39px minmax(0,auto) 13px;
  align-items:center;
  gap:7px;
  padding:5px 6px;
  border:0;
  border-radius:10px;
  background:transparent;
  text-align:left;
  cursor:pointer;
}
.stats-task-wrap.weak .stats-task-row{
  background:#fffafb;
}
.stats-task-label{
  color:#2d3158;
  font-size:9.5px;
  font-weight:800;
  white-space:nowrap;
}
.stats-task-bar{
  height:9px;
  overflow:hidden;
  border-radius:999px;
  background:#e9edf2;
}
.stats-task-bar-fill{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#51ce9a,#55c996);
}
.stats-task-wrap.attention .stats-task-bar-fill{
  background:linear-gradient(90deg,#ffd958,#f1c94f);
}
.stats-task-wrap.weak .stats-task-bar-fill{
  background:linear-gradient(90deg,#ff7184,#fb7c93);
}
.stats-task-wrap.no-data .stats-task-bar-fill{
  width:2%!important;
  background:#cfd5e0;
}
.stats-task-value{
  color:#23264d;
  text-align:right;
  font-size:9.5px;
  font-weight:950;
}
.stats-task-status{
  min-width:0;
  justify-self:end;
  white-space:nowrap;
}
.stats-weak-badge,
.stats-no-data-badge{
  padding:4px 7px;
  border-radius:999px;
  font-size:7px;
  font-weight:900;
}
.stats-weak-badge{
  background:#ffe7ee;
  color:#d64267;
}
.stats-no-data-badge{
  background:#f0f2f7;
  color:#81869a;
}
.stats-task-chevron{
  color:#20264f;
  font-size:18px;
  line-height:1;
  transition:transform .18s ease;
}
.stats-task-wrap.opened .stats-task-chevron{
  transform:rotate(90deg);
}
.stats-task-details{
  padding:4px 8px 9px 79px;
  color:#85889f;
  font-size:8.5px;
  line-height:1.45;
}
.stats-section-empty{
  color:#9290a3;
  font-size:11px;
  line-height:1.4;
}
@media (max-width:430px){
  .stats-page-head h1{font-size:27px}
  .stats-rank-grid{gap:8px;grid-template-columns:minmax(0,.97fr) minmax(0,1.03fr)}
  .stats-own-place-card{padding:13px;min-height:184px}
  .stats-own-trophy{width:53px;height:53px;flex-basis:53px;border-radius:18px}
  .stats-own-trophy svg{width:40px;height:40px}
  .stats-own-place-number{font-size:31px}
  .stats-own-place-number em{font-size:20px}
  .stats-own-motivation{font-size:10.5px;padding:11px;min-height:72px}
  .stats-top-card{padding:13px 10px 10px;min-height:184px}
  .stats-top-title{font-size:16px}
  .stats-top-row{grid-template-columns:25px 24px minmax(0,1fr) auto;gap:4px;min-height:39px}
  .stats-medal{width:24px;height:24px;font-size:10px}
  .stats-top-avatar{width:24px;height:24px;font-size:7px}
  .stats-top-name{font-size:8.7px}
  .stats-top-rating{font-size:8.8px}
  .stats-ranking-toggle{font-size:9.5px;min-height:31px}
  .stats-full-ranking-head h2,.stats-results-section h2,.stats-sections-section h2{font-size:21px}
  .stats-rings-grid{gap:6px}
  .stats-ring-card{min-height:178px;padding:10px 6px 9px}
  .stats-ring-card-head strong{font-size:11px}
  .stats-result-icon{width:25px;height:25px;font-size:14px}
  .stats-ring{width:78px;height:78px;padding:8px;margin-top:9px}
  .stats-ring-inner strong{font-size:12px}
  .stats-ring-inner span{font-size:10px}
  .stats-ring-caption{font-size:8px;min-height:23px}
  .stats-section-card{padding:13px 10px 12px}
  .stats-section-icon{width:38px;height:38px;flex-basis:38px;font-size:13px}
  .stats-section-card-head h3{font-size:16px}
  .stats-section-overall strong{font-size:24px}
  .stats-task-row{grid-template-columns:65px minmax(42px,1fr) 35px minmax(0,auto) 12px;gap:5px;padding:5px 4px}
  .stats-task-label{font-size:8.6px}
  .stats-task-value{font-size:8.8px}
  .stats-weak-badge,.stats-no-data-badge{font-size:6px;padding:3px 5px}
  .stats-task-chevron{font-size:16px}
  .stats-task-details{padding-left:71px}
}
@media (max-width:360px){
  .stats-page-head h1{font-size:25px}
  .stats-own-place-card{padding:11px}
  .stats-own-top{gap:7px}
  .stats-own-trophy{width:44px;height:44px;flex-basis:44px}
  .stats-own-trophy svg{width:34px;height:34px}
  .stats-own-place-label{font-size:10px}
  .stats-own-place-number{font-size:27px;gap:3px}
  .stats-own-place-number em{font-size:17px}
  .stats-own-total{font-size:13px}
  .stats-own-motivation{font-size:9.5px}
  .stats-top-name{font-size:7.8px}
  .stats-top-rating{font-size:8px}
  .stats-ring{width:70px;height:70px}
  .stats-ring-inner strong{font-size:11px}
  .stats-ring-caption{font-size:7.4px}
  .stats-task-row{grid-template-columns:61px minmax(36px,1fr) 32px minmax(0,auto) 11px;gap:4px}
  .stats-weak-badge,.stats-no-data-badge{font-size:5.5px;padding:3px 4px}
}

/* v15.7 — quieter typography + task 14 interaction */
body{
  font-family:Inter, "SF Pro Text", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight:400;
}
button,input,select,textarea{font-weight:400}
strong,b{font-weight:500}
h1,h2,h3,h4,h5,h6,
.stats-page-head h1,
.stats-top-title,
.stats-full-ranking-head h2,
.stats-results-section h2,
.stats-sections-section h2,
.stats-section-heading h3,
.question,
.result-card h2,
.error-card h2{
  font-weight:650!important;
}
.eyebrow,.subject-title,.counter,.selection-hint,
.stats-own-place-label,.stats-own-total,.stats-own-motivation,
.stats-top-name,.stats-top-rating,.stats-ranking-name,.stats-ranking-rating,
.stats-task-label,.stats-task-value,.stats-task-status,
.primary,.secondary,.feedback-title,.correct-answer{
  font-weight:400!important;
}
.primary,.secondary{font-weight:500!important}
.feedback-title{font-weight:600!important}
.question{letter-spacing:-.01em}

/* Top-3: rank badge + name, no initials avatar */
.stats-top-row{
  grid-template-columns:24px minmax(0,1fr) auto;
  gap:8px;
  min-height:38px;
  padding:5px 1px;
}
.stats-medal{
  width:22px;
  height:22px;
  border-radius:7px;
  font-size:10px;
  font-weight:500!important;
  box-shadow:none;
}
.stats-medal.rank-1{background:#fff3c9;color:#7d641b}
.stats-medal.rank-2{background:#f0f1f4;color:#656b78}
.stats-medal.rank-3{background:#f7e7d8;color:#805936}
.stats-top-avatar{display:none!important}
.stats-top-name{
  font-size:11.5px;
  color:#2c2e4d;
}
.stats-top-rating{
  font-size:11px;
  color:#4c4a70;
}

/* Task 14 — word-by-word spelling choice */
.spelling-option{
  display:grid;
  grid-template-columns:28px minmax(0,1fr);
  align-items:flex-start;
  gap:10px;
  padding:14px 13px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  transition:border-color .15s ease, background .15s ease;
}
.spelling-option.selected{
  border-color:#cfc6f4;
  background:#faf8ff;
}
.spelling-option.correct{
  border-color:#b9ddcb;
  background:#f6fbf8;
}
.spelling-option.incorrect{
  border-color:#efc5c3;
  background:#fff8f8;
}
.spelling-option-select{
  width:28px;
  min-width:28px;
  height:28px;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:9px;
  background:#f4f2fa;
  color:#65667d;
  cursor:pointer;
}
.spelling-option-select:disabled{cursor:default}
.spelling-check{
  width:12px;
  height:12px;
  border:1.5px solid #aaa8ba;
  border-radius:4px;
  background:#fff;
}
.spelling-option.selected .spelling-check{
  border-color:#7566cf;
  background:#7566cf;
  box-shadow:inset 0 0 0 3px #fff;
}
.spelling-sentence{
  min-width:0;
  color:#292b4a;
  font-size:14px;
  line-height:1.65;
  font-weight:400;
}
.spelling-word-wrap{
  position:relative;
  display:inline-block;
}
.spelling-word{
  display:inline;
  margin:0;
  padding:1px 2px;
  border:0;
  border-radius:5px;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:500;
  line-height:inherit;
  cursor:pointer;
  text-decoration:underline;
  text-decoration-color:#d9d4eb;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
.spelling-word:hover,
.spelling-word:focus-visible{
  background:#f6f3ff;
  outline:none;
}
.spelling-word.chosen{
  background:#f6f3ff;
  text-decoration-color:#aaa0d9;
}
.spelling-word.word-correct{
  background:#f2f8f5;
  text-decoration-color:#9fcab5;
}
.spelling-word.word-incorrect{
  background:#fff3f3;
  text-decoration-color:#dba6a3;
}
.spelling-word-menu{
  position:absolute;
  z-index:30;
  left:0;
  top:calc(100% + 6px);
  min-width:134px;
  display:none;
  padding:5px;
  border:1px solid #e2deee;
  border-radius:12px;
  background:#fff;
  box-shadow:0 10px 24px rgba(47,42,83,.12);
}
.spelling-word-menu.open{display:grid}
.spelling-word-choice{
  width:100%;
  padding:8px 9px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#33344e;
  text-align:left;
  font-size:12.5px;
  font-weight:400;
  cursor:pointer;
}
.spelling-word-choice:hover,
.spelling-word-choice.active{
  background:#f5f2ff;
}

@media (max-width:390px){
  .spelling-option{grid-template-columns:22px minmax(0,1fr);gap:8px;padding:12px 10px}
  .spelling-sentence{font-size:13.5px}
  .stats-top-name{font-size:11px}
}

/* Student area: regular text by default, weight reserved for hierarchy */
:is(#dashboard,#homeworksScreen,#reviewScreen,#repetitionScreen,#repetitionIntro,#homeworkSummary,#quiz,#result,#statsScreen)
:is(div,span,p,button,strong,b,label,a){
  font-weight:400!important;
}
:is(#dashboard,#homeworksScreen,#reviewScreen,#repetitionScreen,#repetitionIntro,#homeworkSummary,#quiz,#result,#statsScreen)
:is(h1,h2,h3,h4,h5,h6),
#dashboard .subject-title,
#dashboard .hero-status-title,
#dashboard .main-action-title,
#dashboard .quick-title,
#reviewScreen .rno-title,
#reviewScreen .rno-schedule-title,
#homeworkSummary .summary-title,
#repetitionScreen .repetition-topic-title,
#statsScreen .stats-top-title,
#statsScreen .stats-section-heading h3,
#quiz .feedback-title{
  font-weight:600!important;
}
:is(#dashboard,#homeworksScreen,#reviewScreen,#repetitionScreen,#repetitionIntro,#homeworkSummary,#quiz,#result,#statsScreen) :is(.primary,.secondary,button){
  font-weight:500!important;
}
#quiz .spelling-sentence,
#quiz .spelling-word-choice,
#quiz .selection-hint{font-weight:400!important}
#quiz .spelling-word{font-weight:500!important}

/* v15.8 — compact two-column homework cards */
#homeworksScreen .homework-list{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
#homeworksScreen .homework-list-card{
  min-width:0;
  padding:12px;
  border-radius:18px;
  box-shadow:0 7px 20px rgba(61,51,126,.045);
}
#homeworksScreen .homework-list-top{
  gap:7px;
}
#homeworksScreen .homework-list-title{
  min-width:0;
  font-size:14px;
  line-height:1.28;
  font-weight:600!important;
  color:#17183d;
  overflow-wrap:anywhere;
}
#homeworksScreen .homework-state{
  max-width:78px;
  padding:5px 7px;
  font-size:9px;
  line-height:1.05;
  font-weight:500!important;
}
#homeworksScreen .homework-list-meta{
  margin-top:5px;
  font-size:10.7px;
  line-height:1.3;
  font-weight:400!important;
}
#homeworksScreen .homework-list-deadline{
  min-height:28px;
}
#homeworksScreen .homework-list-progress{
  gap:7px;
  margin-top:9px;
}
#homeworksScreen .homework-list-progress-track{
  height:5px;
}
#homeworksScreen .homework-list-progress-value{
  flex:0 0 auto;
  font-size:10px;
  font-weight:500!important;
}
#homeworksScreen .homework-list-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  margin-top:8px;
}
#homeworksScreen .homework-list-count{
  min-width:0;
  margin-top:0;
  font-size:10.5px;
}
#homeworksScreen .homework-list-button{
  flex:0 0 auto;
  width:auto;
  min-width:74px;
  margin-top:0;
  padding:8px 10px;
  border-radius:11px;
  font-size:10.5px;
  line-height:1;
  font-weight:500!important;
  white-space:nowrap;
}
#homeworksScreen .homework-list-button-disabled{
  opacity:.46;
  cursor:default;
}
#homeworksScreen .homework-list-phrase{
  display:none!important;
}
#homeworksScreen .homework-empty{
  grid-column:1 / -1;
}

@media (max-width:360px){
  #homeworksScreen .homework-list{gap:8px}
  #homeworksScreen .homework-list-card{padding:10px;border-radius:16px}
  #homeworksScreen .homework-list-title{font-size:12.8px}
  #homeworksScreen .homework-state{max-width:66px;padding:4px 6px;font-size:8.2px}
  #homeworksScreen .homework-list-meta{font-size:9.8px}
  #homeworksScreen .homework-list-deadline{min-height:26px}
  #homeworksScreen .homework-list-progress{gap:5px;margin-top:8px}
  #homeworksScreen .homework-list-progress-value{font-size:9px}
  #homeworksScreen .homework-list-footer{gap:5px;margin-top:7px}
  #homeworksScreen .homework-list-count{font-size:9.2px}
  #homeworksScreen .homework-list-button{min-width:62px;padding:7px 8px;font-size:9px}
}


/* v15.9 · teacher deadline + group analytics */
.teacher-deadline-editor{
  margin-top:12px;padding:16px;border:1px solid #e5dff3;border-radius:20px;background:#fff;
  box-shadow:0 10px 28px rgba(57,46,113,.05)
}
.teacher-deadline-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.teacher-deadline-head h2{margin:2px 0 0;font-size:18px;color:#22244e}
.teacher-deadline-close{width:30px;height:30px;border:0;border-radius:50%;background:#f2eff8;color:#77788f;font-size:20px;line-height:1;cursor:pointer}
.teacher-deadline-quick{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:10px 0 12px}
.teacher-deadline-quick button{border:1px solid #dfd9ef;border-radius:12px;padding:9px 6px;background:#faf9ff;color:#6558c7;font-size:11px;font-weight:700;cursor:pointer}
.teacher-deadline-editor .teacher-save-button{width:100%;margin-top:10px}

.teacher-group-tabs{display:flex;gap:7px;overflow-x:auto;padding:2px 1px 10px;scrollbar-width:none}
.teacher-group-tabs::-webkit-scrollbar{display:none}
.teacher-group-tab{flex:0 0 auto;border:1px solid #dfd9ef;border-radius:999px;padding:8px 12px;background:#fff;color:#666980;font-size:11px;cursor:pointer}
.teacher-group-tab.active{border-color:#7867de;background:#7160dc;color:#fff}
.teacher-group-summary{padding:16px;border:1px solid #e7e2f3;border-radius:23px;background:#fff;box-shadow:0 10px 28px rgba(57,46,113,.05)}
.teacher-group-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.teacher-group-summary-head h2{margin:2px 0 0;font-size:20px;line-height:1.2;color:#22244e}
.teacher-group-count{flex:0 0 auto;padding:6px 9px;border-radius:999px;background:#f2effb;color:#77778f;font-size:10px}
.teacher-group-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:14px}
.teacher-group-metrics article{min-width:0;padding:10px 7px;border-radius:15px;background:#f8f6fd;text-align:center}
.teacher-group-metrics span{display:block;color:#8c8ea0;font-size:9px;line-height:1.2}
.teacher-group-metrics strong{display:block;margin-top:4px;color:#34345d;font-size:20px;font-weight:700}
.teacher-analytics-list{display:grid;gap:9px}
.teacher-analytics-card{padding:14px;border:1px solid #e7e2f3;border-radius:19px;background:#fff;box-shadow:0 7px 22px rgba(57,46,113,.035)}
.teacher-analytics-card.clickable{cursor:pointer}
.teacher-analytics-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.teacher-analytics-title{font-size:12.5px;line-height:1.4;font-weight:700;color:#303157}
.teacher-analytics-pill{flex:0 0 auto;padding:5px 8px;border-radius:999px;background:#eeeaff;color:#6558c7;font-size:10px;font-weight:700}
.teacher-analytics-mini{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}
.teacher-analytics-mini span{padding:8px 6px;border-radius:12px;background:#f8f6fd;color:#8b8da0;font-size:9.5px;text-align:center}
.teacher-analytics-mini strong{display:block;margin-top:2px;color:#414262;font-size:12px;font-weight:700}
.teacher-analytics-hard{margin-top:10px;padding-top:10px;border-top:1px solid #efedf5}
.teacher-analytics-hard span{display:block;color:#9293a4;font-size:9.5px}
.teacher-analytics-hard strong{display:block;margin-top:3px;color:#5c51b8;font-size:11.5px;line-height:1.35;font-weight:700}
.teacher-analytics-muted{margin-top:8px;color:#9293a4;font-size:11px}
.teacher-hardest-list{display:grid;gap:7px;margin-top:10px}
.teacher-hardest-row{display:grid;grid-template-columns:24px 1fr;gap:8px;align-items:start;padding-top:7px;border-top:1px solid #f0edf6}
.teacher-hardest-row>span{display:grid;place-items:center;width:24px;height:24px;border-radius:8px;background:#f0edfb;color:#6a5dca;font-size:10px;font-weight:700}
.teacher-hardest-row strong{display:block;color:#44455f;font-size:11px;line-height:1.3;font-weight:700}
.teacher-hardest-row small{display:-webkit-box;margin-top:3px;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;color:#9697a8;font-size:9.5px;line-height:1.35}
.teacher-student-stat-row .teacher-result-meta{line-height:1.45}

@media (max-width:430px){
  .teacher-group-metrics{grid-template-columns:repeat(2,1fr)}
  .teacher-group-metrics article{padding:9px 7px}
  .teacher-analytics-mini{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Task 15 — EGE N/NN interactive input */
.nn-ege-sentence{
  padding:15px 14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  color:#292b4a;
  font-size:14px;
  line-height:1.75;
  font-weight:400;
}
.nn-word-wrap{
  position:relative;
  display:inline-flex;
  align-items:flex-start;
  gap:1px;
}
.nn-word{
  display:inline;
  margin:0;
  padding:1px 2px;
  border:0;
  border-radius:5px;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:500;
  line-height:inherit;
  cursor:pointer;
  text-decoration:underline;
  text-decoration-color:#d9d4eb;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
.nn-word:hover,
.nn-word:focus-visible{
  background:#f6f3ff;
  outline:none;
}
.nn-word.chosen{
  background:#f6f3ff;
  text-decoration-color:#aaa0d9;
}
.nn-word.mark-correct{
  background:#f2f8f5;
  text-decoration-color:#9fcab5;
}
.nn-word.mark-incorrect{
  background:#fff3f3;
  text-decoration-color:#dba6a3;
}
.nn-marker-number{
  margin-left:1px;
  color:#77748d;
  font-size:9px;
  line-height:1;
  font-weight:500;
  transform:translateY(-1px);
}
.nn-word-menu{
  position:absolute;
  z-index:31;
  left:0;
  top:calc(100% + 6px);
  min-width:88px;
  display:none;
  grid-template-columns:1fr 1fr;
  gap:4px;
  padding:5px;
  border:1px solid #e2deee;
  border-radius:12px;
  background:#fff;
  box-shadow:0 10px 24px rgba(47,42,83,.12);
}
.nn-word-menu.open{display:grid}
.nn-word-choice{
  padding:8px 10px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#33344e;
  text-align:center;
  font-size:13px;
  font-weight:500;
  cursor:pointer;
}
.nn-word-choice:hover,
.nn-word-choice.active{
  background:#f5f2ff;
}
.nn-final-answer{
  display:grid;
  gap:7px;
  margin-top:12px;
}
.nn-final-label{
  color:#4c4a70;
  font-size:12.5px;
  font-weight:500;
}
.nn-final-answer input{
  width:100%;
  box-sizing:border-box;
  padding:12px 13px;
  border:1px solid #ded9ee;
  border-radius:13px;
  background:#fff;
  color:#25263f;
  font:inherit;
  font-size:15px;
  outline:none;
}
.nn-final-answer input:focus{
  border-color:#aaa0d9;
  box-shadow:0 0 0 3px rgba(117,102,207,.08);
}
.nn-final-answer input:disabled{
  background:#faf9fd;
  color:#55536a;
}
#quiz .nn-ege-sentence,
#quiz .nn-final-label{font-weight:400!important}
#quiz .nn-word,
#quiz .nn-word-choice{font-weight:500!important}

@media (max-width:390px){
  .nn-ege-sentence{font-size:13.5px;padding:13px 11px}
}


/* v15.14 — Homework 14 interactive practice */
.feedback.attention{
  background:#fff4d6!important;
  color:#6f4700!important;
  border-left:5px solid #f5a623!important;
}
.feedback.attention .feedback-title{color:#8a5500!important}

.spelling-ege-option{
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  gap:10px;
  align-items:flex-start;
  padding:13px 11px;
  border:1px solid rgba(39,42,85,.10);
  border-radius:16px;
  background:#fff;
  margin-bottom:10px;
}
.spelling-ege-number,
.letter-fill-number{
  width:28px;height:28px;border-radius:9px;
  display:inline-flex;align-items:center;justify-content:center;
  background:#f2f0ff;color:#6657bd;font-size:13px;font-weight:800;
}

.spelling-ege-select{
  appearance:none;border:0;background:transparent;padding:0;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
}
.spelling-ege-select:disabled{cursor:default}
.spelling-ege-check{
  width:18px;height:18px;border-radius:6px;border:1.5px solid #c8c5db;
  display:inline-flex;align-items:center;justify-content:center;
  color:transparent;font-size:12px;font-weight:900;
}
.spelling-ege-option.selected .spelling-ege-check{
  background:#7868d0;border-color:#7868d0;color:#fff;
}

.spelling-ege-final{margin-top:14px}
.spelling-ege-final-hint{font-size:12px;color:#8c8ca3;margin-top:5px;display:block}

.letter-fill-option{
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  gap:9px;
  align-items:center;
  padding:13px 11px;
  border:1px solid rgba(39,42,85,.10);
  border-radius:16px;
  background:#fff;
  margin-bottom:10px;
  transition:.18s ease;
}
.letter-fill-option.selected{border-color:#8c7be0;background:#f8f6ff}
.letter-fill-option.correct{border-color:#70c493;background:#f2fbf6}
.letter-fill-option.incorrect{border-color:#e99a9a;background:#fff4f4}
.letter-fill-select{
  appearance:none;border:0;background:transparent;padding:0;
  display:flex;align-items:center;gap:4px;cursor:pointer;
}
.letter-fill-select:disabled{cursor:default}
.letter-fill-check{
  width:18px;height:18px;border-radius:6px;border:1.5px solid #c8c5db;
  display:inline-flex;align-items:center;justify-content:center;
  color:transparent;font-size:12px;font-weight:900;
}
.letter-fill-option.selected .letter-fill-check{background:#7868d0;border-color:#7868d0;color:#fff}
.letter-fill-sentence{font-size:14px;line-height:1.85;color:#292a43}
.letter-fill-gap{
  appearance:none;
  display:inline-block;
  width:1.65em;min-width:1.65em;height:1.55em;
  margin:0 3px;padding:0;
  border:1.5px solid #d8d1f5;
  border-radius:7px;
  outline:0;
  background:#f4f1ff;
  color:#2a2b44;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
  text-align:center;
  font:inherit;font-weight:800;
  line-height:1.45em;
  vertical-align:-.20em;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease;
}
.letter-fill-gap::placeholder{color:transparent;opacity:0}
.letter-fill-gap:hover{border-color:#b9acec;background:#f0ecff}
.letter-fill-gap:focus{
  border-color:#7868d0;
  background:#fff;
  box-shadow:0 0 0 3px rgba(120,104,208,.13);
}
.letter-fill-gap.gap-correct{
  border-color:#70c493;
  background:#f1fbf5;
  color:#23794b;
  box-shadow:none;
}
.letter-fill-gap.gap-incorrect{
  border-color:#e99a9a;
  background:#fff4f4;
  color:#a43e3e;
  box-shadow:none;
}

@media(max-width:560px){
  .spelling-ege-option{grid-template-columns:22px minmax(0,1fr);gap:8px;padding:12px 10px}
  .letter-fill-option{grid-template-columns:22px minmax(0,1fr);gap:7px;padding:12px 10px}
  .letter-fill-sentence{font-size:13.5px}
}

/* Homework 14 — N/NN with checkbox selection instead of a numeric final answer */
.nn-position-list{
  display:grid;
  gap:8px;
  margin-top:14px;
}
.nn-position-row{
  border:1px solid rgba(39,42,85,.10);
  border-radius:11px;
  background:#fff;
  transition:border-color .18s ease,background .18s ease;
}
.nn-position-row.selected{
  border-color:#8c7be0;
  background:#f8f6ff;
}
.nn-position-row.correct{
  border-color:#70c493;
  background:#f2fbf6;
}
.nn-position-row.incorrect{
  border-color:#e99a9a;
  background:#fff4f4;
}
.nn-position-select{
  width:100%;
  appearance:none;
  border:0;
  background:transparent;
  padding:11px 12px;
  display:flex;
  align-items:center;
  gap:9px;
  color:#292a43;
  font:inherit;
  cursor:pointer;
  text-align:left;
}
.nn-position-select:disabled{cursor:default}
.nn-position-check{
  width:18px;
  height:18px;
  flex:0 0 18px;
  border-radius:6px;
  border:1.5px solid #c8c5db;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:transparent;
  font-size:12px;
  font-weight:900;
}
.nn-position-row.selected .nn-position-check{
  background:#7868d0;
  border-color:#7868d0;
  color:#fff;
}
.nn-position-text{
  font-size:14px;
  line-height:1.4;
}

/* v15.14 r6 — compact quiz typography and spacing */
#quiz .quiz-card{
  padding:15px 16px 16px;
  border-radius:21px;
}
#quiz .question{
  margin:4px 0 10px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:19px;
  line-height:1.27;
  font-weight:700!important;
  letter-spacing:-.018em;
  color:#1d1f46;
}
#quiz .selection-hint{
  margin:0 0 10px;
  font-size:12.5px;
  line-height:1.45;
  color:#85889f;
}
#quiz .options{
  gap:8px;
}
#quiz .option{
  padding:11px 12px;
  border-radius:11px;
  font-size:14px;
  line-height:1.38;
}
#quiz .spelling-option{
  grid-template-columns:24px minmax(0,1fr);
  gap:8px;
  padding:10px 11px;
  border-radius:11px;
}
#quiz .spelling-option-select{
  width:24px;
  min-width:24px;
  height:24px;
  border-radius:7px;
}
#quiz .spelling-check{
  width:13px;
  height:13px;
}
#quiz .spelling-sentence{
  font-size:13.5px;
  line-height:1.52;
}
#quiz .letter-fill-option{
  grid-template-columns:24px minmax(0,1fr);
  gap:8px;
  padding:10px 11px;
  border-radius:11px;
  margin-bottom:0;
}
#quiz .letter-fill-select{
  min-height:24px;
}
#quiz .letter-fill-check{
  width:18px;
  height:18px;
  border-radius:5px;
}
#quiz .letter-fill-sentence{
  font-size:13.5px;
  line-height:1.58;
}
#quiz .letter-fill-gap{
  width:1.55em;
  min-width:1.55em;
  height:1.5em;
  margin:0 2px;
  border-radius:6px;
  line-height:1.38em;
}
#quiz .nn-ege-sentence{
  padding:11px 12px;
  border-radius:11px;
  font-size:13.5px;
  line-height:1.58;
}
#quiz .nn-position-list{
  gap:8px;
}
#quiz .nn-position-row{
  padding:10px 11px;
  border-radius:11px;
}
#quiz .primary,
#quiz .secondary{
  margin-top:13px;
  padding:12px 15px;
  border-radius:11px;
}

@media (max-width:390px){
  #quiz .quiz-card{padding:14px 13px 15px}
  #quiz .question{
    font-size:18px;
    line-height:1.28;
    margin-bottom:9px;
  }
  #quiz .selection-hint{
    font-size:12px;
    margin-bottom:9px;
  }
  #quiz .spelling-sentence,
  #quiz .letter-fill-sentence,
  #quiz .nn-ege-sentence{
    font-size:13px;
  }
}

/* v15.14 r8 — compact question navigation */
.question-switcher{
  display:flex;
  align-items:center;
  gap:6px;
  padding:3px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.88);
}
.question-switcher .counter{
  min-width:48px;
  text-align:center;
  font-size:12.5px;
  font-weight:600!important;
  color:#666a89;
}
.question-switch-btn{
  width:30px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:9px;
  background:#f4f1ff;
  color:#6556c9;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  transition:background .15s ease,opacity .15s ease,transform .15s ease;
}
.question-switch-btn:not(:disabled):active{transform:scale(.94)}
.question-switch-btn:disabled{
  opacity:.28;
  cursor:default;
}
@media(max-width:560px){
  .quiz-head{gap:8px}
  .question-switcher{gap:4px}
  .question-switch-btn{width:28px;height:28px;font-size:20px}
  .question-switcher .counter{min-width:42px;font-size:12px}
}

/* ДЗ №14: формулировка задания показывается без дополнительных подсказок интерфейса. */
#selectionHint{
  display:none !important;
}


/* v15.14 r14 — unified compact checkbox style */
#quiz .letter-fill-select,
#quiz .spelling-ege-select,
#quiz .nn-position-select{
  width:24px;
  min-width:24px;
  height:24px;
  min-height:24px;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:7px;
  background:#f4f2fa;
  color:#65667d;
  cursor:pointer;
  flex:0 0 24px;
}

#quiz .letter-fill-select:disabled,
#quiz .spelling-ege-select:disabled,
#quiz .nn-position-select:disabled{
  cursor:default;
}

#quiz .letter-fill-check,
#quiz .spelling-ege-check,
#quiz .nn-position-check{
  width:13px;
  height:13px;
  flex:0 0 13px;
  border:1.5px solid #aaa8ba;
  border-radius:4px;
  background:#fff;
  color:transparent;
  font-size:0;
  box-shadow:none;
}

#quiz .letter-fill-option.selected .letter-fill-check,
#quiz .spelling-ege-option.selected .spelling-ege-check,
#quiz .nn-position-row.selected .nn-position-check{
  border-color:#7566cf;
  background:#7566cf;
  color:transparent;
  box-shadow:inset 0 0 0 3px #fff;
}

#quiz .letter-fill-option,
#quiz .spelling-ege-option{
  grid-template-columns:24px minmax(0,1fr);
}

#quiz .nn-position-select{
  width:100%;
  min-width:0;
  height:auto;
  min-height:0;
  padding:9px 10px;
  display:flex;
  justify-content:flex-start;
  gap:8px;
  background:transparent;
  border-radius:12px;
}

#quiz .nn-position-row .nn-position-check{
  background:#fff;
}

/* ============================================================
   v15.16 — Задание 16: интерактивный «Банк запятых»
   ============================================================ */
.punctuation-comma-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.punctuation-mini-instruction{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 2px 10px;
  color:#6a5c93;
  font-size:13px;
  line-height:1.35;
  font-weight:600;
}
.punctuation-mini-icon{
  width:20px;
  height:20px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(138,73,236,.12);
  border:1px solid rgba(138,73,236,.22);
  color:#8a49ec;
  font-size:13px;
  font-weight:800;
  flex:0 0 auto;
}
.punctuation-mini-text{
  font:600 14px/1.35 var(--font-ui, Inter, system-ui, sans-serif);
  color:#6c5f97;
}

.punctuation-option{
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  gap:9px;
  align-items:start;
  padding:13px 11px;
  border:1px solid rgba(39,42,85,.10);
  border-radius:16px;
  background:#fff;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease;
}

.punctuation-option.selected{
  border-color:#8c7be0;
  background:#f8f6ff;
}

.punctuation-option.correct{
  border-color:#70c493;
  background:#f2fbf6;
}

.punctuation-option.incorrect{
  border-color:#e99a9a;
  background:#fff4f4;
}

.punctuation-option.punctuation-incorrect:not(.correct):not(.incorrect){
  border-color:#f0c4c4;
}

.punctuation-option-select{
  width:24px;
  min-width:24px;
  height:24px;
  min-height:24px;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:7px;
  background:#f4f2fa;
  cursor:pointer;
  flex:0 0 24px;
}

.punctuation-option-select:disabled{cursor:default}

.punctuation-option-check{
  width:13px;
  height:13px;
  flex:0 0 13px;
  border:1.5px solid #aaa8ba;
  border-radius:4px;
  background:#fff;
  box-shadow:none;
}

.punctuation-option.selected .punctuation-option-check{
  border-color:#7566cf;
  background:#7566cf;
  box-shadow:inset 0 0 0 3px #fff;
}

.punctuation-option-content{
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:5px;
}

.punctuation-option-number{
  flex:0 0 auto;
  padding-top:1px;
  font-size:14px;
  line-height:1.78;
  font-weight:700;
  color:#74748b;
}

.punctuation-sentence{
  min-width:0;
  font-size:14px;
  line-height:1.78;
  color:#292a43;
  overflow-wrap:normal;
  word-break:normal;
}

.comma-slot{
  display:inline-block;
  position:relative;
  width:0;
  min-width:0;
  height:1.38em;
  vertical-align:-.22em;
  transition:width .22s cubic-bezier(.22,.8,.24,1);
  will-change:width;
}

.comma-slot.has-comma{
  width:2.16em;
}

.comma-slot.has-comma > .comma-inline{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
}

.comma-slot.preview{
  width:1.18em;
}

.comma-slot.preview::before{
  content:"";
  position:absolute;
  left:50%;
  bottom:.08em;
  width:.86em;
  height:2px;
  transform:translateX(-50%) scaleX(.72);
  border-radius:999px;
  background:rgba(142,91,226,.18);
  opacity:1;
  pointer-events:none;
  transition:transform .18s ease, opacity .18s ease;
}

.comma-slot.drag-origin{
  visibility:hidden;
}


.comma-inline{
  appearance:none;
  position:relative;
  display:inline-grid;
  place-items:center;
  width:.78em;
  min-width:.78em;
  height:1.02em;
  margin:0;
  padding:0 0 .06em;
  border:1px solid rgba(189,168,248,.9);
  border-radius:11px;
  background:linear-gradient(180deg, #f7f3ff 0%, #ebe1ff 100%);
  color:#7d38e6;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.18em;
  line-height:.62;
  font-weight:900;
  text-align:center;
  vertical-align:baseline;
  cursor:grab;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  box-shadow:0 6px 12px rgba(126,97,220,.13), inset 0 1px 0 rgba(255,255,255,.92), inset 0 -1px 0 rgba(195,178,247,.45);
  text-shadow:0 1px 0 rgba(255,255,255,.85), 0 2px 4px rgba(92,50,180,.18);
}

.comma-placed{
  color:#7b39e6;
}

.comma-inline::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:22px;
  height:28px;
  transform:translate(-50%,-50%);
}

.comma-inline:active{cursor:grabbing}
.comma-inline:disabled{cursor:default}

.comma-preview{
  display:none;
}

.comma-correct,
.comma-correction{
  color:#49aa73;
  background:linear-gradient(180deg,#f4fff8 0%, #dff7e8 100%);
  border-color:#a9e1bc;
  text-shadow:none;
}

.comma-incorrect{
  color:#d96b6b;
  background:linear-gradient(180deg,#fff7f7 0%, #ffe5e5 100%);
  border-color:#efb6b6;
  text-shadow:none;
}

.comma-correction{
  cursor:default;
  opacity:.95;
}

@keyframes commaPreviewPop{
  from{opacity:.45}
  to{opacity:1}
}

.comma-bank{
  position:relative;
  margin:10px auto 2px;
  width:min(46vw,190px);
  border:0;
  border-radius:18px;
  overflow:hidden;
}

.comma-bank-image{
  display:block;
  width:100%;
  height:auto;
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none;
}

.comma-bank.drag-over{
  transform:translateY(-1px);
}

.comma-bank.drag-over .comma-bank-image{
  filter:drop-shadow(0 8px 18px rgba(132,111,218,.18));
}

/* Прозрачные зоны захвата точно поверх четырёх запятых внутри банки. */
.comma-bank-coins{
  position:absolute;
  left:34.5%;
  right:25.5%;
  top:49.5%;
  height:34.5%;
  display:grid;
  grid-template-columns:repeat(2,1fr);
  grid-template-rows:repeat(2,1fr);
  column-gap:13%;
  row-gap:7%;
  align-items:stretch;
  z-index:2;
}

.comma-bank-token{
  appearance:none;
  width:100%;
  height:100%;
  margin:0;
  padding:0;
  border:0;
  border-radius:22px;
  background:transparent;
  color:transparent;
  box-shadow:none;
  cursor:grab;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
}

.comma-bank-token:active{
  cursor:grabbing;
  transform:scale(1.02);
}
.comma-bank-token:disabled{cursor:default;opacity:.7}

.comma-floating{
  position:fixed;
  z-index:99999;
  width:auto;
  height:auto;
  display:block;
  pointer-events:none;
  transform:translate(-50%,-52%);
  background:transparent;
  border:0;
  border-radius:0;
  color:#8a49ec;
  font-family:Georgia,"Times New Roman",serif;
  font-size:31px;
  line-height:1;
  font-weight:900;
  padding:0;
  box-shadow:none;
  text-shadow:0 1px 0 rgba(255,255,255,.92),0 2px 5px rgba(92,50,180,.14);
  will-change:left,top;
  transition:font-size .16s ease, color .16s ease, text-shadow .16s ease;
}

.comma-floating.embedded{
  color:#7b39e6;
  font-size:27px;
  text-shadow:0 1px 0 rgba(255,255,255,.96),0 1px 3px rgba(92,50,180,.10);
}

body.comma-drag-active{
  user-select:none;
  -webkit-user-select:none;
}

@media(max-width:420px){
  .punctuation-option{
    padding:12px 10px;
    gap:8px;
  }
  .punctuation-option-content{gap:4px}
  .punctuation-option-number,
  .punctuation-sentence{
    font-size:13.5px;
    line-height:1.78;
  }
  .comma-bank{
    width:min(52vw,170px);
    border-radius:11px;
  }
  .comma-bank-coins{
    left:34.5%;
    right:25.5%;
    top:49.5%;
    height:34.5%;
    column-gap:13%;
    row-gap:7%;
  }
  .comma-bank-token{
    width:100%;
    height:100%;
    border-radius:11px;
  }
  .comma-floating{
    font-size:29px;
  }
  .comma-floating.embedded{
    font-size:25px;
  }
}



/* r21 — №16 literally reuses the platform checkbox component */
#quiz .punctuation-option-select.letter-fill-select{
  width:24px;
  min-width:24px;
  height:24px;
  min-height:24px;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:7px;
  background:#f4f2fa;
  color:#65667d;
  cursor:pointer;
  flex:0 0 24px;
}
#quiz .punctuation-option-select.letter-fill-select:disabled{cursor:default}
#quiz .punctuation-option-check.letter-fill-check{
  width:13px;
  height:13px;
  flex:0 0 13px;
  border:1.5px solid #aaa8ba;
  border-radius:4px;
  background:#fff;
  color:transparent;
  font-size:0;
  box-shadow:none;
}
#quiz .punctuation-option.selected .punctuation-option-check.letter-fill-check{
  border-color:#7566cf;
  background:#7566cf;
  color:transparent;
  box-shadow:inset 0 0 0 3px #fff;
}


/* r31 — syntax markup, all in RusBrooks purple */
.syntax-helper{
  margin-top:10px;
}

.syntax-helper-heading{
  display:flex;
  align-items:baseline;
  gap:7px;
  margin-bottom:3px;
  color:#34245f;
  font-size:13px;
  font-weight:700;
}

.syntax-helper-optional{
  color:#8b82a6;
  font-size:11px;
  font-weight:550;
}

.syntax-helper-hint{
  margin-bottom:9px;
  color:#77708c;
  font-size:11.5px;
  line-height:1.35;
}

.syntax-role-tools{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.syntax-role-button{
  appearance:none;
  border:1px solid rgba(179,162,236,.65);
  background:#fff;
  color:#6f55c7;
  border-radius:999px;
  padding:8px 12px 9px;
  font-size:12.5px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(101,82,177,.07);
  transition:background .18s ease,border-color .18s ease,transform .12s ease,box-shadow .18s ease,color .18s ease;
}

.syntax-role-button:hover{
  border-color:rgba(126,56,230,.52);
  background:#fbf9ff;
}

.syntax-role-button.active{
  border-color:#7d38e6;
  background:#f1e9ff;
  box-shadow:0 4px 12px rgba(126,56,230,.10);
}

.syntax-role-button:active{transform:translateY(1px)}
.syntax-role-button:disabled{cursor:default;opacity:.62}

.syntax-role-sample{
  color:#4d3a76;
  text-decoration-color:#7d38e6;
  text-underline-offset:4px;
  text-decoration-thickness:1.8px;
  text-decoration-skip-ink:none;
}

.syntax-sample-subject{ text-decoration-line:underline; text-decoration-style:solid; }
.syntax-sample-predicate{ text-decoration-line:underline; text-decoration-style:double; }
.syntax-sample-object{ text-decoration-line:underline; text-decoration-style:dashed; }
.syntax-sample-definition{ text-decoration-line:underline; text-decoration-style:wavy; }
.syntax-sample-circumstance{
  padding-bottom:3px;
  background-image:repeating-linear-gradient(90deg,#7d38e6 0 6px,transparent 6px 9px,#7d38e6 9px 11px,transparent 11px 15px);
  background-size:auto 1.7px;
  background-position:0 100%;
  background-repeat:repeat-x;
}

.syntax-word{
  position:relative;
  border-radius:4px;
  cursor:default;
  text-decoration:none;
  text-decoration-color:#7d38e6;
  text-underline-offset:4px;
  text-decoration-thickness:2px;
  text-decoration-skip-ink:none;
  background-image:none;
  background-position:initial;
  background-repeat:initial;
  background-size:initial;
  padding-bottom:0;
  transition:background .14s ease,color .14s ease;
}

.syntax-word.syntax-ready{
  cursor:pointer;
}

.syntax-word.syntax-ready:hover{
  background:rgba(126,56,230,.07);
}

.syntax-word.syntax-subject{
  text-decoration-line:underline;
  text-decoration-style:solid;
}

.syntax-word.syntax-predicate{
  text-decoration-line:underline;
  text-decoration-style:double;
}

.syntax-word.syntax-object{
  text-decoration-line:underline;
  text-decoration-style:dashed;
}

.syntax-word.syntax-definition{
  text-decoration-line:underline;
  text-decoration-style:wavy;
}

.syntax-word.syntax-circumstance{
  padding-bottom:3px;
  background-image:repeating-linear-gradient(90deg,#7d38e6 0 6px,transparent 6px 9px,#7d38e6 9px 11px,transparent 11px 15px);
  background-size:auto 2px;
  background-position:0 100%;
  background-repeat:repeat-x;
}

/* r31 — confirmation is deliberately before the comma bank */


@media(max-width:420px){
  .syntax-role-tools{gap:5px}
  .syntax-role-button{padding:6px 8px 7px;font-size:10.8px}
}

/* r37 — cleaner school-style syntax underlines */
.syntax-sample-object,
.syntax-word.syntax-object{
  text-decoration:none;
  padding-bottom:4px;
  background-image:repeating-linear-gradient(
    90deg,
    #7d38e6 0 7px,
    transparent 7px 11px
  );
  background-size:auto 2px;
  background-position:0 calc(100% - 1px);
  background-repeat:repeat-x;
}

.syntax-sample-circumstance,
.syntax-word.syntax-circumstance{
  text-decoration:none;
  padding-bottom:4px;
  background-image:repeating-linear-gradient(
    90deg,
    #7d38e6 0 7px,
    transparent 7px 10px,
    #7d38e6 10px 12px,
    transparent 12px 17px
  );
  background-size:auto 2px;
  background-position:0 calc(100% - 1px);
  background-repeat:repeat-x;
}


/* r39 — subtle reset control for punctuation/syntax task */
.punctuation-reset-row{
  display:flex;
  justify-content:flex-end;
  margin:0 2px 2px;
}

.punctuation-reset-btn{
  appearance:none;
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:6px 8px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#8a8797;
  font:600 11.5px/1.2 var(--font-ui, Inter, system-ui, sans-serif);
  cursor:pointer;
  box-shadow:none;
  transition:color .16s ease, background .16s ease;
}

.punctuation-reset-btn:hover{
  color:#6e608f;
  background:rgba(126,56,230,.055);
}

.punctuation-reset-btn:active{
  transform:none;
  background:rgba(126,56,230,.09);
}

.punctuation-reset-icon{
  font-size:14px;
  line-height:1;
  font-weight:500;
  opacity:.72;
}

@media(max-width:420px){
  .punctuation-reset-row{margin-top:-1px}
  .punctuation-reset-btn{font-size:11px;padding:6px 7px}
}

/* r40 — unified punctuation workbench */
.punctuation-workbench{
  width:min(100%, 640px);
  margin:14px auto 4px;
  padding:16px 14px 12px;
  border:1px solid rgba(194,178,241,.46);
  border-radius:22px;
  background:linear-gradient(180deg,rgba(251,249,255,.82),rgba(255,255,255,.68));
  box-shadow:0 12px 30px rgba(106,82,177,.055);
}

.punctuation-workbench .syntax-helper{
  margin:0;
}

.punctuation-workbench .syntax-role-tools{
  justify-content:center;
  align-items:center;
  gap:8px;
  max-width:560px;
  margin:0 auto;
}

.punctuation-workbench .syntax-role-button{
  padding:7px 11px 8px;
}

.punctuation-workbench .comma-bank{
  margin:18px auto 5px;
  width:min(42vw,180px);
}

.punctuation-workbench .punctuation-reset-row{
  justify-content:center;
  margin:7px 0 0;
}

.punctuation-workbench .punctuation-reset-btn{
  padding:6px 11px;
  border:1px solid rgba(190,174,237,.55);
  border-radius:999px;
  background:rgba(255,255,255,.66);
  color:#83769e;
  font-size:11.5px;
  font-weight:600;
}

.punctuation-workbench .punctuation-reset-btn:hover{
  color:#6e55a4;
  border-color:rgba(145,111,224,.55);
  background:#fbf9ff;
}

@media(max-width:420px){
  .punctuation-workbench{
    margin-top:12px;
    padding:13px 9px 10px;
    border-radius:19px;
  }
  .punctuation-workbench .syntax-role-tools{
    gap:6px;
  }
  .punctuation-workbench .syntax-role-button{
    padding:6px 8px 7px;
    font-size:10.8px;
  }
  .punctuation-workbench .comma-bank{
    margin-top:15px;
    width:min(52vw,175px);
  }
}


/* r47 — task 17 turnover markup + punctuation */
.turnover-question-wrap{
  width:100%;
  display:grid;
  gap:14px;
}

#quiz .question.turnover-question-heading{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-weight:700!important;
  font-size:18px;
  line-height:1.35;
  letter-spacing:-.016em;
  margin-bottom:12px;
}

.turnover-sentence,
.turnover-correct-sentence{
  width:100%;
  padding:7px 2px 4px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:18px;
  line-height:2.68;
  color:#23243f;
  letter-spacing:-.01em;
  overflow-wrap:normal;
  word-break:normal;
}
.turnover-sentence{
  user-select:none;
  -webkit-user-select:none;
}

.turnover-word-wrap{display:inline}

.turnover-token,
.turnover-range-piece{
  position:relative;
  display:inline;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}

.turnover-token{
  padding:3px 2px 10px;
  cursor:pointer;
  transition:background-color .14s ease,color .14s ease,font-size .14s ease;
}

.turnover-range-piece.turnover-range-definition{
  background-color:#eee5ff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='4' viewBox='0 0 12 4'%3E%3Cpath d='M0 2 Q3 0 6 2 T12 2' fill='none' stroke='%237d38e6' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat:repeat-x;
  background-position:left calc(100% - 2px);
  background-size:12px 4px;
}

.turnover-range-piece.turnover-range-circumstance{
  background-color:#ddf6e9;
  background-image:repeating-linear-gradient(
    90deg,
    #2c9f70 0 7px,
    transparent 7px 10px,
    #2c9f70 10px 12px,
    transparent 12px 17px
  );
  background-repeat:repeat-x;
  background-size:auto 2px;
  background-position:left calc(100% - 2px);
}

.turnover-range-piece.turnover-piece-start{
  border-top-left-radius:6px;
  border-bottom-left-radius:6px;
}
.turnover-range-piece.turnover-piece-end{
  border-top-right-radius:6px;
  border-bottom-right-radius:6px;
}

.turnover-range-piece.turnover-range-nested{
  font-size:.91em;
  padding-top:2px;
  padding-bottom:7px;
  background-position:left calc(100% - 3px);
  z-index:3;
}

.turnover-token.turnover-main-word{
  background:#ffe8a8;
  color:#a96000;
  font-weight:800;
  border-radius:5px;
  padding-left:3px;
  padding-right:3px;
  z-index:5;
}
.turnover-token.turnover-main-word::before{
  content:"×";
  position:absolute;
  left:50%;
  top:-.72em;
  transform:translateX(-50%);
  color:#c17b12;
  font:800 .72em/1 Inter,ui-sans-serif,system-ui,sans-serif;
  pointer-events:none;
}
.turnover-token.turnover-main-word-pending{opacity:.82}

.turnover-static-boundary{
  position:absolute;
  top:3px;
  bottom:6px;
  width:2px;
  border-radius:999px;
  pointer-events:none;
  z-index:7;
}
.turnover-static-boundary.start{left:-2px}
.turnover-static-boundary.end{right:-2px}
.turnover-static-boundary.definition{background:#8a52e8}
.turnover-static-boundary.circumstance{background:#25a56f}
.turnover-static-boundary.nested{
  top:5px;
  bottom:9px;
}

.turnover-boundary-handle{
  appearance:none;
  position:absolute;
  top:-4px;
  bottom:0;
  width:22px;
  padding:0;
  border:0;
  background:transparent;
  z-index:12;
  cursor:ew-resize;
  touch-action:none;
}
.turnover-boundary-handle.start{left:-11px}
.turnover-boundary-handle.end{right:-11px}
.turnover-boundary-handle::after{
  content:"";
  position:absolute;
  top:7px;
  bottom:7px;
  left:10px;
  width:3px;
  border-radius:999px;
  box-shadow:0 0 0 2px rgba(255,255,255,.82);
}
.turnover-boundary-handle.definition::after{background:#8a52e8}
.turnover-boundary-handle.circumstance::after{background:#25a56f}
.turnover-boundary-handle.nested::after{top:9px;bottom:10px}

/* Слоты запятых используют тот же визуал, что и №16. */
.turnover-comma-slot{
  vertical-align:-.22em;
  width:.34em;
  min-width:.34em;
  z-index:8;
}
.turnover-comma-slot.numbered{
  width:2.08em;
  min-width:2.08em;
}
.turnover-comma-slot.has-comma:not(.numbered){width:2.16em}
.turnover-comma-slot.preview:not(.numbered){width:1.18em}
.turnover-comma-slot.has-comma.numbered,
.turnover-comma-slot.preview.numbered{
  width:3.18em;
}
.turnover-comma-slot.turnover-range-definition,
.turnover-comma-slot.turnover-range-circumstance{
  height:1.55em;
  vertical-align:-.35em;
}
.turnover-comma-slot.turnover-range-nested{
  height:1.42em;
  vertical-align:-.28em;
}
.turnover-comma-slot.has-comma > .turnover-inline-comma{
  left:.72em;
  transform:translate(-50%,-50%);
}
.turnover-comma-slot:not(.numbered).has-comma > .turnover-inline-comma{
  left:50%;
}
.turnover-position-number{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  color:#77748d;
  font-size:.64em;
  line-height:1;
  font-weight:500;
  white-space:nowrap;
  pointer-events:none;
  z-index:4;
}
.turnover-comma-slot.has-comma.numbered .turnover-position-number,
.turnover-comma-slot.preview.numbered .turnover-position-number{
  left:auto;
  right:.12em;
  transform:translateY(-50%);
}
.turnover-comma-slot.preview.numbered::before{
  left:.68em;
  transform:translateX(-50%) scaleX(.72);
}

.turnover-workbench{margin-top:2px}
.turnover-tools{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:7px;
  margin:0 auto;
}
.turnover-tool{
  appearance:none;
  border:1px solid rgba(190,174,237,.72);
  border-radius:12px;
  background:#fff;
  color:#5d5573;
  padding:8px 11px 9px;
  font:700 11.5px/1.1 Inter,ui-sans-serif,system-ui,sans-serif;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(83,61,140,.035);
  transition:background .14s ease,border-color .14s ease,color .14s ease,transform .12s ease;
}
.turnover-tool:active{transform:scale(.97)}
.turnover-tool-main_word.active{
  background:#ffd978;
  border-color:#e4ad32;
  color:#805000;
}
.turnover-tool-definition.active{
  background:#e7d9ff;
  border-color:#8a52e8;
  color:#5c2ead;
}
.turnover-tool-circumstance.active{
  background:#d9f4e6;
  border-color:#25a56f;
  color:#19734e;
}
.turnover-main-sample{font-weight:800;color:#a96000}
.turnover-definition-sample{
  text-decoration-line:underline;
  text-decoration-style:wavy;
  text-decoration-color:#7d38e6;
  text-underline-offset:3px;
}
.turnover-circumstance-sample{
  padding-bottom:4px;
  background-image:repeating-linear-gradient(90deg,#2c9f70 0 7px,transparent 7px 10px,#2c9f70 10px 12px,transparent 12px 17px);
  background-size:auto 2px;
  background-position:0 100%;
  background-repeat:repeat-x;
}
.turnover-tool-main_word.active .turnover-main-sample,
.turnover-tool-definition.active .turnover-definition-sample,
.turnover-tool-circumstance.active .turnover-circumstance-sample{color:inherit}

.turnover-comma-bank{
  margin-top:18px!important;
  width:min(46vw,190px);
}

.turnover-final-answer{
  display:grid;
  gap:7px;
  margin-top:13px;
}
.turnover-final-label{
  color:#4c4a70;
  font-size:12.5px;
  font-weight:500;
}
.turnover-final-answer input{
  width:100%;
  box-sizing:border-box;
  padding:12px 13px;
  border:1px solid #ded9ee;
  border-radius:13px;
  background:#fff;
  color:#25263f;
  font:inherit;
  font-size:15px;
  outline:none;
}
.turnover-final-answer input:focus{
  border-color:#aaa0d9;
  box-shadow:0 0 0 3px rgba(117,102,207,.08);
}
.turnover-final-answer input:disabled{
  background:#faf9fd;
  color:#55536a;
}

.feedback.turnover-retry{
  display:block;
  border:1px solid rgba(152,124,223,.35);
  background:#f8f5ff;
  color:#3c3157;
}
.feedback.turnover-retry #feedbackTitle,
.feedback.turnover-retry .feedback-title{color:#5f42a9}

.turnover-correct-sentence{
  margin:4px 0 0;
  padding:8px 2px 3px;
  font-size:15.5px;
  line-height:2.55;
  color:#23243f;
}
.turnover-correct-gap{
  display:inline;
  padding:3px 2px 10px;
  white-space:pre;
}
.turnover-correct-source{
  margin-top:3px;
  color:#77748d;
  font-size:12px;
  font-style:italic;
}
.turnover-explanation-items{
  display:grid;
  gap:7px;
  margin-top:11px;
  color:#25263f;
  font-size:13px;
  line-height:1.48;
}

body.turnover-range-drag-active{
  user-select:none;
  -webkit-user-select:none;
  cursor:ew-resize;
}
.turnover-locked{cursor:default!important}

@media(max-width:420px){
  #quiz .question.turnover-question-heading{font-size:17px;line-height:1.36}
  .turnover-sentence{
    padding-top:4px;
    font-size:17px;
    line-height:2.72;
  }
  .turnover-workbench{padding-left:6px;padding-right:6px}
  .turnover-tools{gap:5px}
  .turnover-tool{padding:7px 8px 8px;font-size:10.5px}
  .turnover-comma-bank{width:min(52vw,170px)}
  .turnover-correct-sentence{font-size:14.5px;line-height:2.55}
}


/* r48 — corrected task 17 layout: real wrapping + monolithic ranges */
.turnover-question-wrap{
  min-width:0;
  max-width:100%;
}

#quiz .question.turnover-question-heading{
  font-family:var(--font-ui,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);
}

.turnover-sentence,
.turnover-correct-sentence{
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  white-space:normal;
  overflow:visible;
  overflow-wrap:normal;
  word-break:normal;
}

.turnover-word-wrap{
  display:inline;
  white-space:nowrap;
}

.turnover-token{
  display:inline;
  padding:3px 0 10px;
  background:transparent;
}

.turnover-range-block{
  position:relative;
  display:inline;
  padding:3px 2px 10px;
  border-radius:6px;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
  transition:background-color .14s ease,font-size .14s ease;
}

.turnover-range-block.turnover-range-definition{
  background-color:#eee5ff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='4' viewBox='0 0 12 4'%3E%3Cpath d='M0 2 Q3 0 6 2 T12 2' fill='none' stroke='%237d38e6' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat:repeat-x;
  background-position:left calc(100% - 2px);
  background-size:12px 4px;
  z-index:1;
}

.turnover-range-block.turnover-range-circumstance{
  background-color:#ddf6e9;
  background-image:repeating-linear-gradient(
    90deg,
    #2c9f70 0 7px,
    transparent 7px 10px,
    #2c9f70 10px 12px,
    transparent 12px 17px
  );
  background-repeat:repeat-x;
  background-size:auto 2px;
  background-position:left calc(100% - 2px);
  z-index:1;
}

/* Вложенный оборот — самостоятельный более компактный слой поверх внешнего. */
.turnover-range-block.turnover-range-nested{
  font-size:.91em;
  padding-top:2px;
  padding-bottom:7px;
  background-position:left calc(100% - 2px);
  z-index:4;
}

.turnover-range-block.turnover-range-nested.turnover-range-definition{
  background-color:#eee5ff;
}
.turnover-range-block.turnover-range-nested.turnover-range-circumstance{
  background-color:#ddf6e9;
}

/* Старые piece-классы остаются только fallback для некорректно пересекающихся диапазонов. */
.turnover-range-block .turnover-token,
.turnover-range-block .turnover-comma-slot{
  background-color:transparent;
}

.turnover-token.turnover-main-word{
  position:relative;
  display:inline;
  background:#ffe8a8!important;
  color:#a96000;
  font-weight:800;
  border-radius:5px;
  padding-left:3px;
  padding-right:3px;
  z-index:8;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}

/* Между словами всегда есть реальный слот и точка переноса строки. */
.turnover-comma-slot{
  display:inline-block;
  position:relative;
  width:.42em;
  min-width:.42em;
  height:1.55em;
  vertical-align:-.34em;
  z-index:30;
  white-space:nowrap;
}

.turnover-comma-slot.numbered{
  width:2.72em;
  min-width:2.72em;
}
.turnover-comma-slot.has-comma:not(.numbered){
  width:2.16em;
  min-width:2.16em;
}
.turnover-comma-slot.preview:not(.numbered){
  width:1.18em;
  min-width:1.18em;
}
.turnover-comma-slot.has-comma.numbered,
.turnover-comma-slot.preview.numbered{
  width:3.65em;
  min-width:3.65em;
}

.turnover-position-number{
  font-size:.67em;
  color:#77748d;
}

.turnover-inline-comma{
  z-index:40;
}

/* Граница не перекрывает слот для запятой. */
.turnover-boundary-handle{
  width:14px;
  z-index:18;
}
.turnover-boundary-handle.start{left:-6px}
.turnover-boundary-handle.end{right:-6px}
.turnover-boundary-handle::after{left:6px}

.turnover-static-boundary{
  z-index:17;
}

.turnover-correct-comma{
  position:absolute;
  left:50%;
  top:48%;
  transform:translate(-50%,-50%);
  color:#25263f;
  font-family:var(--font-ui,Inter,system-ui,sans-serif);
  font-size:1em;
  font-weight:600;
}
.turnover-comma-slot.correct-comma-gap{
  width:.92em;
  min-width:.92em;
}

/* В №17 банк выглядит ровно как в №16. */
.punctuation-workbench .turnover-comma-bank{
  margin:18px auto 5px!important;
  width:min(42vw,180px);
}

@media(max-width:420px){
  .turnover-sentence{
    font-size:17px;
    line-height:2.72;
  }
  .turnover-comma-slot.numbered{
    width:2.58em;
    min-width:2.58em;
  }
  .turnover-comma-slot.has-comma.numbered,
  .turnover-comma-slot.preview.numbered{
    width:3.42em;
    min-width:3.42em;
  }
  .punctuation-workbench .turnover-comma-bank{
    margin-top:15px!important;
    width:min(52vw,175px);
  }
}

/* r49 — task 17: clean nested range (Variant 1) + persistent resize handles */
/* Main word: only bold text + syntax cross. No yellow fill, border or capsule. */
.turnover-token.turnover-main-word{
  background:transparent!important;
  color:inherit!important;
  font-weight:800;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  padding-left:0!important;
  padding-right:0!important;
}
.turnover-token.turnover-main-word::before{
  color:#c17b12;
}

/* Variant 1: nested range keeps exactly the same text size and height as the outer range. */
.turnover-range-block.turnover-range-nested,
.turnover-range-piece.turnover-range-nested{
  font-size:1em!important;
  padding-top:3px!important;
  padding-bottom:10px!important;
}

/* Inner range fully replaces the outer highlight on its span.
   Only its own line is moved a little closer to the text. */
.turnover-range-block.turnover-range-nested.turnover-range-definition{
  background-color:#eee5ff!important;
  background-position:left calc(100% - 5px)!important;
  box-shadow:none!important;
}
.turnover-range-block.turnover-range-nested.turnover-range-circumstance{
  background-color:#ddf6e9!important;
  background-position:left calc(100% - 5px)!important;
  box-shadow:none!important;
}

/* Fallback renderer follows the same rule for crossed/legacy ranges. */
.turnover-range-piece.turnover-range-nested.turnover-range-definition{
  background-color:#eee5ff!important;
  background-position:left calc(100% - 5px)!important;
}
.turnover-range-piece.turnover-range-nested.turnover-range-circumstance{
  background-color:#ddf6e9!important;
  background-position:left calc(100% - 5px)!important;
}

/* Nested boundaries are not shortened: hierarchy is communicated by color/line level only. */
.turnover-static-boundary.nested{
  top:3px!important;
  bottom:6px!important;
}
.turnover-boundary-handle.nested::after{
  top:7px!important;
  bottom:7px!important;
}

/* Every visible boundary is a drag target, including ranges that are not currently active. */
.turnover-boundary-handle{
  pointer-events:auto;
  opacity:1;
}

/* r50 — task 17 final interaction polish */
/* Only main words are bold; the cross stays directly above the selected word. */
.turnover-token.turnover-main-word{
  font-weight:700!important;
  color:inherit!important;
  background:transparent!important;
  padding-left:0!important;
  padding-right:0!important;
}
.turnover-token.turnover-main-word::before{
  content:"×";
  position:absolute;
  left:50%;
  top:-.72em;
  transform:translateX(-50%);
  color:#b98243;
  font:700 .68em/1 var(--font-ui,Inter,ui-sans-serif,system-ui,sans-serif);
  pointer-events:none;
}

/* Keep the two real turnover boundaries away from letters. */
.turnover-token.turnover-has-start-boundary{
  padding-left:6px!important;
}
.turnover-token.turnover-has-end-boundary{
  padding-right:6px!important;
}
.turnover-static-boundary.start{left:1px!important}
.turnover-static-boundary.end{right:1px!important}
.turnover-boundary-handle.start{left:-8px!important}
.turnover-boundary-handle.end{right:-8px!important}
.turnover-boundary-handle.start::after{left:9px!important}
.turnover-boundary-handle.end::after{left:3px!important}

/* More air between nested syntax lines so they never visually merge. */
.turnover-range-block.turnover-range-definition,
.turnover-range-block.turnover-range-circumstance{
  background-position:left calc(100% - 1px)!important;
}
.turnover-range-block.turnover-range-nested.turnover-range-definition,
.turnover-range-block.turnover-range-nested.turnover-range-circumstance,
.turnover-range-piece.turnover-range-nested.turnover-range-definition,
.turnover-range-piece.turnover-range-nested.turnover-range-circumstance{
  background-position:left calc(100% - 7px)!important;
}

/* Position numbers look like ordinary sentence text until a comma is placed. */
.turnover-comma-slot.numbered{
  width:1.92em!important;
  min-width:1.92em!important;
  vertical-align:-.22em!important;
}
.turnover-position-number{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  right:auto!important;
  transform:translate(-50%,-50%)!important;
  font:inherit!important;
  font-size:1em!important;
  line-height:1!important;
  font-weight:inherit!important;
  color:inherit!important;
  opacity:1!important;
  white-space:nowrap;
  pointer-events:none;
  z-index:45;
  transition:font-size .16s ease,color .16s ease,opacity .16s ease,top .16s ease,transform .16s ease;
}

/* After snapping/placing a comma, the number moves exactly above it and becomes quieter. */
.turnover-comma-slot.has-comma.numbered,
.turnover-comma-slot.preview.numbered{
  width:1.14em!important;
  min-width:1.14em!important;
  height:1.7em!important;
  vertical-align:-.28em!important;
}
.turnover-comma-slot.has-comma.numbered .turnover-position-number,
.turnover-comma-slot.preview.numbered .turnover-position-number{
  left:50%!important;
  right:auto!important;
  top:-.28em!important;
  transform:translate(-50%,-50%)!important;
  font-size:.60em!important;
  line-height:1!important;
  font-weight:500!important;
  color:#827d96!important;
  opacity:.72!important;
}
.turnover-comma-slot.has-comma.numbered > .turnover-inline-comma{
  left:50%!important;
  top:54%!important;
  transform:translate(-50%,-50%)!important;
}
.turnover-comma-slot.preview.numbered::before{
  left:50%!important;
  transform:translateX(-50%) scaleX(.72)!important;
}

/* Keep the exact task-17 comma-bank image already present in r49. */
.punctuation-workbench .turnover-comma-bank .comma-bank-image{
  display:block;
}

@media(max-width:420px){
  .turnover-comma-slot.numbered{
    width:1.86em!important;
    min-width:1.86em!important;
  }
  .turnover-comma-slot.has-comma.numbered,
  .turnover-comma-slot.preview.numbered{
    width:1.08em!important;
    min-width:1.08em!important;
  }
}


/* r51 — task 17: detached range boundaries + guaranteed main-word weight */
.turnover-sentence,
.turnover-correct-sentence{
  position:relative;
}

.turnover-token-text{
  font-weight:400;
}
.turnover-token.turnover-main-word > .turnover-token-text{
  font-weight:700!important;
  font-synthesis:weight;
}

/* Old inline boundaries are no longer part of the text flow. */
.turnover-static-boundary,
.turnover-boundary-handle{
  display:none!important;
}
.turnover-token.turnover-has-start-boundary,
.turnover-token.turnover-has-end-boundary{
  padding-left:0!important;
  padding-right:0!important;
}

.turnover-boundary-layer{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:70;
}
.turnover-overlay-boundary{
  appearance:none;
  position:absolute;
  width:22px;
  min-width:22px;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  transform:translateX(-50%);
  pointer-events:auto;
  touch-action:none;
  cursor:ew-resize;
  z-index:72;
}
.turnover-overlay-boundary:disabled{
  pointer-events:none;
  cursor:default;
}
.turnover-overlay-boundary::after{
  content:"";
  position:absolute;
  left:50%;
  top:0;
  bottom:0;
  width:3px;
  border-radius:999px;
  transform:translateX(-50%);
  box-shadow:0 0 0 1px rgba(255,255,255,.72);
}
.turnover-overlay-boundary.definition::after{background:#8a52e8}
.turnover-overlay-boundary.circumstance::after{background:#25a56f}

/* Add visual breathing room without changing inline width or causing wrapping. */
.turnover-overlay-boundary.start{margin-left:-4px}
.turnover-overlay-boundary.end{margin-left:4px}
.turnover-overlay-boundary.nested.start{margin-left:-3px}
.turnover-overlay-boundary.nested.end{margin-left:3px}

/* r52 — neutral-tap deletion + detached per-line range visuals */
/* The inline wrapper is structure only. It must never paint cloned fragments on wraps. */
.turnover-range-block,
.turnover-range-block.turnover-range-definition,
.turnover-range-block.turnover-range-circumstance,
.turnover-range-block.turnover-range-nested,
.turnover-range-block.turnover-range-nested.turnover-range-definition,
.turnover-range-block.turnover-range-nested.turnover-range-circumstance{
  padding:0!important;
  margin:0!important;
  border-radius:0!important;
  background:none!important;
  box-shadow:none!important;
  font-size:1em!important;
  box-decoration-break:slice!important;
  -webkit-box-decoration-break:slice!important;
}

.turnover-range-visual-layer{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:1;
}
.turnover-range-visual{
  position:absolute;
  display:block;
  border-radius:7px;
  pointer-events:none;
  box-sizing:border-box;
  z-index:calc(2 + var(--turnover-depth,0));
}
.turnover-range-visual.definition{
  background-color:#eee5ff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='4' viewBox='0 0 12 4'%3E%3Cpath d='M0 2 Q3 0 6 2 T12 2' fill='none' stroke='%237d38e6' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat:repeat-x;
  background-position:left calc(100% - 2px);
  background-size:12px 4px;
}
.turnover-range-visual.circumstance{
  background-color:#ddf6e9;
  background-image:repeating-linear-gradient(
    90deg,
    #2c9f70 0 7px,
    transparent 7px 10px,
    #2c9f70 10px 12px,
    transparent 12px 17px
  );
  background-repeat:repeat-x;
  background-size:auto 2px;
  background-position:left calc(100% - 2px);
}
.turnover-range-visual.nested.definition,
.turnover-range-visual.nested.circumstance{
  background-position:left calc(100% - 2px)!important;
}

/* Text and punctuation always stay above the visual range layer. */
.turnover-token,
.turnover-comma-slot,
.turnover-range-block{
  position:relative;
  z-index:12;
}
.turnover-token.turnover-main-word > .turnover-token-text{
  font-weight:700!important;
  font-synthesis:weight;
}

/* Position numbers: normal black text before and after comma placement. */
.turnover-position-number,
.turnover-comma-slot.has-comma.numbered .turnover-position-number,
.turnover-comma-slot.preview.numbered .turnover-position-number{
  color:#111426!important;
  opacity:1!important;
}
.turnover-comma-slot.has-comma.numbered .turnover-position-number,
.turnover-comma-slot.preview.numbered .turnover-position-number{
  font-weight:400!important;
}

/* Crossed/legacy fallback also uses the detached visual layer in r52. */
.turnover-range-piece,
.turnover-range-piece.turnover-range-definition,
.turnover-range-piece.turnover-range-circumstance,
.turnover-range-piece.turnover-range-nested,
.turnover-range-piece.turnover-range-nested.turnover-range-definition,
.turnover-range-piece.turnover-range-nested.turnover-range-circumstance{
  background:none!important;
  box-shadow:none!important;
}

/* r53 — softer range fills + definition color separated from purple commas */
/* Definition: warm coral/peach. Keep borders/underline vivid, make only the fill softer. */
.turnover-range-visual.definition{
  background-color:#fff2eb!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='4' viewBox='0 0 12 4'%3E%3Cpath d='M0 2 Q3 0 6 2 T12 2' fill='none' stroke='%23df713f' stroke-width='1.4'/%3E%3C/svg%3E")!important;
}
.turnover-overlay-boundary.definition::after{
  background:#e27642!important;
}
.turnover-tool-definition.active{
  background:#fff0e7!important;
  border-color:#e27642!important;
  color:#a84a21!important;
}
.turnover-definition-sample{
  text-decoration-color:#df713f!important;
}

/* Circumstance keeps its green identity, but the highlighter is calmer. */
.turnover-range-visual.circumstance{
  background-color:#edf9f3!important;
}

/* Legacy/fallback definition accents, if an older rendering path is ever used. */
.turnover-static-boundary.definition,
.turnover-boundary-handle.definition::after{
  background:#e27642!important;
}

/* r54 — final task 17 palette + nested-range spacing */
:root{
  --turnover-definition-fill:#FCEEF0;
  --turnover-definition-line:#D9858F;
  --turnover-circumstance-fill:#EEF6E9;
  --turnover-circumstance-line:#77A95D;
}

/* Definition: dusty rose, clearly separate from purple commas. */
.turnover-range-visual.definition{
  background-color:var(--turnover-definition-fill)!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='4' viewBox='0 0 12 4'%3E%3Cpath d='M0 2 Q3 0 6 2 T12 2' fill='none' stroke='%23D9858F' stroke-width='1.4'/%3E%3C/svg%3E")!important;
  border-radius:9px!important;
}
.turnover-overlay-boundary.definition::after{
  background:var(--turnover-definition-line)!important;
}
.turnover-tool-definition.active{
  background:#FCEEF0!important;
  border-color:var(--turnover-definition-line)!important;
  color:#9B5660!important;
}
.turnover-definition-sample{
  text-decoration-color:var(--turnover-definition-line)!important;
}

/* Circumstance: soft sage fill with a readable sage dash-dot line. */
.turnover-range-visual.circumstance{
  background-color:var(--turnover-circumstance-fill)!important;
  background-image:repeating-linear-gradient(
    90deg,
    var(--turnover-circumstance-line) 0 7px,
    transparent 7px 10px,
    var(--turnover-circumstance-line) 10px 12px,
    transparent 12px 17px
  )!important;
  border-radius:9px!important;
}
.turnover-overlay-boundary.circumstance::after{
  background:var(--turnover-circumstance-line)!important;
}
.turnover-tool-circumstance.active{
  background:#EEF6E9!important;
  border-color:var(--turnover-circumstance-line)!important;
  color:#527A43!important;
}
.turnover-circumstance-sample{
  text-decoration-color:var(--turnover-circumstance-line)!important;
}

/* A nested range feels inserted into the outer one: a small clean gap, no collision. */
.turnover-range-visual.nested{
  border-radius:9px!important;
  box-shadow:0 0 0 3px rgba(255,255,255,.96)!important;
}

/* Keep the continuation of an outer range calm and pill-like on every wrapped line. */
.turnover-range-visual{
  border-radius:9px!important;
}

/* Fallback/legacy accents use the same final palette. */
.turnover-static-boundary.definition,
.turnover-boundary-handle.definition::after{
  background:var(--turnover-definition-line)!important;
}
.turnover-static-boundary.circumstance,
.turnover-boundary-handle.circumstance::after{
  background:var(--turnover-circumstance-line)!important;
}

/* r54 nested ranges use a real split in the outer visual; keep only a fine white separator. */
.turnover-range-visual.nested{
  box-shadow:0 0 0 1.5px rgba(255,255,255,.98)!important;
}

/* r55 — approved Task 17 interaction fixes (built on r54) */
.turnover-sentence{
  text-align:left!important;
  padding-left:0!important;
  padding-right:0!important;
  margin-left:0!important;
  text-indent:0!important;
  overflow:visible!important;
}
.turnover-sentence > .turnover-token,
.turnover-sentence > .turnover-comma-slot{
  margin-left:0!important;
}

/* Text always stays above every highlight and boundary layer. */
.turnover-range-visual-layer{z-index:1!important}
.turnover-token,
.turnover-token-text,
.turnover-comma-slot{
  position:relative;
  z-index:20!important;
}

/* Both nested highlights remain visible: translucent fills, independent lines. */
.turnover-range-visual{
  pointer-events:none!important;
  box-shadow:none!important;
  border-radius:7px!important;
}
.turnover-range-visual.definition{
  background-color:rgba(252,238,240,.78)!important;
  background-position:left calc(100% - 7px)!important;
  z-index:calc(2 + var(--turnover-depth,0))!important;
}
.turnover-range-visual.circumstance{
  background-color:rgba(238,246,233,.78)!important;
  background-position:left calc(100% - 2px)!important;
  z-index:calc(2 + var(--turnover-depth,0))!important;
}
.turnover-range-visual.nested{
  box-shadow:none!important;
}

/* Every boundary is permanently draggable and never changes text layout. */
.turnover-boundary-layer{
  z-index:60!important;
  pointer-events:none!important;
  overflow:visible!important;
}
.turnover-overlay-boundary{
  width:18px!important;
  min-width:18px!important;
  transform:translateX(-50%)!important;
  pointer-events:auto!important;
  overflow:visible!important;
  background:transparent!important;
  border:0!important;
  padding:0!important;
  touch-action:none!important;
  cursor:ew-resize!important;
  z-index:62!important;
  margin-left:0!important;
}
.turnover-overlay-boundary::after{display:none!important}
.turnover-overlay-boundary-line{
  position:absolute;
  left:50%;
  top:var(--turnover-line-top,0px);
  width:3px;
  height:var(--turnover-line-height,100%);
  transform:translateX(-50%);
  border-radius:999px;
  box-shadow:0 0 0 1px rgba(255,255,255,.82);
  pointer-events:none;
}
.turnover-overlay-boundary.definition .turnover-overlay-boundary-line{
  background:var(--turnover-definition-line)!important;
}
.turnover-overlay-boundary.circumstance .turnover-overlay-boundary-line{
  background:var(--turnover-circumstance-line)!important;
}

/* Main-word cross: larger and closer to the word, without a capsule. */
.turnover-token.turnover-main-word::before{
  content:"×"!important;
  position:absolute!important;
  left:50%!important;
  top:-15px!important;
  transform:translateX(-50%)!important;
  color:#b98243!important;
  font-family:var(--font-ui,Inter,ui-sans-serif,system-ui,sans-serif)!important;
  font-size:22px!important;
  line-height:1!important;
  font-weight:700!important;
  pointer-events:none!important;
  z-index:26!important;
}

/* Numbered punctuation positions keep parentheses. When a comma is placed,
   the same (n) marker becomes visibly smaller and moves above the comma. */
.turnover-position-number{
  white-space:nowrap!important;
}
.turnover-comma-slot.has-comma.numbered .turnover-position-number,
.turnover-comma-slot.preview.numbered .turnover-position-number{
  font-size:.60em!important;
  line-height:1!important;
  top:-.28em!important;
  transform:translate(-50%,-50%)!important;
}
