/* AI-вчитель: чат, виправлення, дії з повідомленнями, підказки, старт і підсумок */
.tutor-chat .msg{max-width:88%}
.msg.ai .msg-body{overflow-wrap:anywhere}
.msg.ai.pending{padding:10px 14px}
.typing.inline{display:flex;margin-top:4px}
.typing.inline i{width:5px;height:5px}
.msg-label{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:700;color:var(--accent-ink);margin-bottom:4px}

/* дії під повідомленням вчителя: компактний рядок без рамок */
.msg-acts{display:flex;flex-wrap:wrap;gap:2px;margin:6px -6px -6px}
.mact{display:inline-flex;align-items:center;gap:4px;min-height:36px;min-width:36px;justify-content:center;padding:4px 8px;border:0;border-radius:12px;
  background:transparent;color:var(--ink-dim);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
.mact:hover{background:var(--surface-2);color:var(--ink)}
.mact[aria-pressed="true"],.mact[aria-expanded="true"]{background:var(--accent-soft);color:var(--accent-ink)}
.mact:focus-visible{outline:2px solid var(--accent-ink);outline-offset:1px}
.msg-tr{margin-top:8px;padding:8px 10px;border-radius:12px;background:var(--surface-2);font-size:var(--fs-sm)}
.msg-tr p:last-child{margin-bottom:0}
.msg-words{margin-top:10px;display:flex;flex-direction:column;gap:6px}
.word-chip{max-width:100%;font-size:13px;gap:4px;min-height:34px;padding:4px 10px}
.word-chip b{font-weight:700}
.word-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.word-chip:disabled{opacity:.75;cursor:default}

/* картка виправлень — під реплікою учня */
.fixcard{align-self:flex-end;max-width:88%;min-width:0;margin-top:-6px;background:var(--warn-soft);border-radius:16px;border-top-right-radius:6px;padding:0 12px;font-size:var(--fs-sm)}
.fixcard summary{list-style:none;display:flex;align-items:center;gap:6px;min-height:40px;cursor:pointer;color:var(--ink);min-width:0}
.fixcard summary::-webkit-details-marker{display:none}
.fixcard summary>svg:first-child{color:var(--warn);flex:none}
.fixcard summary>svg:last-child{flex:none;color:var(--ink-dim);transition:transform var(--dur) var(--ease)}
.fixcard[open] summary>svg:last-child{transform:rotate(180deg)}
.fix-title{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--warn);flex:none}
.fix-peek{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.fix-peek s{color:var(--ink-dim)}
.fixcard[open] .fix-peek{visibility:hidden}
.fixcard ul{list-style:none;margin:0;padding:0 0 10px;display:flex;flex-direction:column;gap:10px}
.fixcard li{display:flex;flex-direction:column;gap:2px;align-items:flex-start}
.fix-line{overflow-wrap:anywhere}
.fix-line s{text-decoration-thickness:1.5px}
.fix-line .arrow{color:var(--ink-dim)}
.fix-add{min-height:32px;padding:4px 8px;margin-left:-8px;gap:4px}

.mem-note{align-self:flex-start;display:flex;align-items:center;gap:6px;max-width:88%;margin-top:-4px;padding:2px 4px;font-size:12.5px;color:var(--ink-dim)}
.mem-note svg{flex:none;color:var(--accent-ink)}
.mem-undo{border:0;background:transparent;color:var(--accent-ink);font:inherit;font-weight:700;padding:6px 4px;min-height:32px;cursor:pointer;flex:none}

/* нижня панель: підказки + поле вводу; над клавіатурою iOS — через --kb */
.tutor-dock{position:sticky;bottom:calc(var(--quickbar-h) + var(--safe-b) + 8px);z-index:5;display:flex;flex-direction:column;gap:8px;
  box-shadow:0 9px 0 var(--bg);background:linear-gradient(to bottom,transparent,var(--bg) 14px)}
.tutor-dock .composer{position:static;box-shadow:var(--shadow-float)}
@media (min-width:600px){.tutor-dock{bottom:calc(var(--quickbar-h) + var(--safe-b) + 20px)}}
body.focus-mode .tutor-dock{bottom:calc(var(--safe-b) + 8px)}
body.kb-open .tutor-dock{bottom:calc(var(--kb,0px) + 8px)}
body.kb-open .quickbar-wrap{visibility:hidden}
.sugg{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:2px 2px 0;margin:0 -2px;align-items:center;-webkit-overflow-scrolling:touch}
.sugg::-webkit-scrollbar{display:none}
.sugg[hidden]{display:none}
.sugg .chip{flex:none;white-space:nowrap;min-height:36px;font-size:13.5px;background:var(--surface)}
.sugg-chip{max-width:85%;overflow:hidden;text-overflow:ellipsis}
.sugg-ic{flex:none;display:grid;place-items:center;width:24px;color:var(--warn)}
.hint-chip{gap:6px;color:var(--ink)}
.hint-chip svg{color:var(--warn)}
.jump{position:absolute;right:6px;top:-52px;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--ink);
  box-shadow:var(--shadow-float);display:grid;place-items:center;cursor:pointer}
.jump[hidden]{display:none}

/* план заняття і старт */
.plan summary{list-style:none;display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:700;min-height:28px}
.plan summary::-webkit-details-marker{display:none}
.plan summary svg:first-child{color:var(--accent-ink)}
.plan[open] summary svg:last-child{transform:rotate(180deg)}
.plan ol{margin:8px 0 0;padding-left:22px;font-size:var(--fs-sm)}
.plan li+li{margin-top:4px}
.tutor-start .chips .chip{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.start-focus{justify-content:flex-start;text-align:left;align-items:center;height:auto;padding-block:10px}
.start-focus .grow{display:flex;flex-direction:column;min-width:0}
.start-focus-t{font-weight:500;white-space:normal}
.start-prev{text-decoration:none;color:inherit;gap:10px}

/* підсумок */
.sum-mistakes{gap:12px}
/* заголовки розділів підсумку — як підписи груп плиток */
.tutor-summary .section-title{font-size:11px;font-weight:700;letter-spacing:.08em;line-height:1.3;color:var(--ink-dim)}
.tutor-summary > .card:not(.accent){background:var(--tile);border-color:var(--tile-edge);box-shadow:none}
.sum-mistake{display:flex;flex-direction:column;gap:4px;align-items:flex-start;padding-bottom:12px;border-bottom:1px solid var(--line)}
.sum-mistake:last-child{border-bottom:0;padding-bottom:0}
.sum-word{display:flex;align-items:center;gap:6px;min-width:0}
.sum-word .grow{min-width:0;overflow-wrap:anywhere}


/* голос: підказка */
.voice-hint{text-align:left}
.voice-hint ol{margin:4px 0 0;padding-left:20px}

/* повідомлення застосунку — над панеллю вводу, а не поверх неї */
body:has(.tutor-dock) .toasts{bottom:calc(var(--quickbar-h) + var(--safe-b) + 124px)}
body.focus-mode:has(.tutor-dock) .toasts{bottom:calc(var(--safe-b) + 124px)}
body.kb-open:has(.tutor-dock) .toasts{bottom:calc(var(--kb,0px) + 124px)}
.voice .subs .line.pending{opacity:.65}

/* голос: миттєві виправлення під реплікою учня */
.vfix-count{display:inline-flex;align-items:center;gap:4px;min-height:32px;padding:4px 10px;border:0;border-radius:var(--radius-pill);
  background:var(--warn-soft);color:var(--warn);font:inherit;font-size:12.5px;font-weight:700;cursor:pointer;margin-top:-10px}
.vfix-count[hidden]{display:none}
.vfixes{align-self:flex-end;display:flex;flex-direction:column;align-items:flex-end;gap:4px;max-width:92%;margin-top:-4px}
.vfix{display:flex;flex-direction:column;align-items:flex-end;gap:1px;max-width:100%;min-height:36px;padding:5px 10px;border:0;border-radius:12px;border-top-right-radius:4px;
  background:var(--warn-soft);color:var(--ink);font:inherit;font-size:13px;text-align:right;cursor:pointer;transition:box-shadow var(--dur) var(--ease)}
.vfix-line{overflow-wrap:anywhere}
.vfix-line s{color:var(--ink-dim);text-decoration-thickness:1.5px}
.vfix-line b{color:var(--good)}
.vfix-arrow{color:var(--ink-dim)}
.vfix-why{font-size:11.5px;color:var(--ink-dim);line-height:1.3}
.vfix.playing{box-shadow:0 0 0 2px var(--warn)}
.vfix.wait{animation:vfix-wait .5s var(--ease)}
@keyframes vfix-wait{0%,100%{transform:none}30%{transform:translateX(-3px)}60%{transform:translateX(3px)}}
@media (prefers-reduced-motion:reduce){.vfix.wait{animation:none;opacity:.6}}

/* старт вчителя (#/tutor): плитки — css/tiles.css; історія — рядки-плитки з кнопкою видалення */
.tt-empty .tx-s{font-size:var(--fs-sm)}
/* вузький екран: режими — по 2 в ряд (у трьох колонках слова переносяться посередині), останній — на всю ширину */
@media (max-width:360px){
  .tt-modes{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  .tt-modes > *{grid-column:auto !important}
  .tt-modes > :last-child:nth-child(odd){grid-column:1 / -1 !important}
  .tt-modes > .tx.wide:not(:last-child){flex-direction:column;align-items:flex-start;gap:7px}
}

/* місії з життя: нейтральні плитки (синя — лише головна дія сторінки) */
.mission-status{font-size:var(--fs-xs);color:var(--ink-dim);padding:0 4px}
.mission-status:empty{display:none}
.mission-list{display:flex;flex-direction:column;gap:8px}
.mission-list:empty{display:none}
.mission-card{background:var(--tile);border:1px solid var(--tile-edge);color:var(--ink);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:8px;font-size:var(--fs-sm)}
.mission-title{font-family:var(--font-head);font-weight:700;font-size:var(--fs-md);line-height:1.2}
.mission-why{color:var(--accent-ink);font-size:var(--fs-xs)}
.mission-sit{line-height:1.45}
.mission-meta{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:var(--fs-xs);color:var(--ink-dim)}
.mission-meta b{color:var(--ink);font-weight:600}
.mission-goal{display:flex;gap:6px;align-items:flex-start}
.mission-goal svg{flex:none;margin-top:2px;color:var(--accent-ink)}
.mission-phrases summary{list-style:none;display:flex;align-items:center;gap:6px;min-height:36px;cursor:pointer;font-weight:600;color:var(--ink)}
.mission-phrases summary::-webkit-details-marker{display:none}
.mission-phrases summary>svg{color:var(--ink-dim)}
.mission-phrases[open] summary>svg:last-child{transform:rotate(180deg)}
.mission-phrases ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.mission-phrase{display:flex;align-items:flex-start;gap:6px;width:100%;min-height:36px;padding:6px 8px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.mission-phrase:hover{background:var(--tile-sq)}
.mission-phrase svg{flex:none;margin-top:3px;color:var(--ink-dim)}
.mission-card .mission-save{color:var(--ink-dim);border:1px dashed var(--line-strong);background:transparent}
.mission-acts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:2px}
.mission-go{background:var(--accent-soft);color:var(--accent-ink);font-weight:700;gap:6px}
.mission-go.alt{background:var(--tile-sq);color:var(--ink)}

/* підсумок: очікування, засвоєно, мовлення, вимова */
.sum-wait{min-height:1.5em;transition:opacity var(--dur) var(--ease)}
.sum-wait-bar{width:min(240px,70%);height:4px;border-radius:4px;background:var(--surface-2);overflow:hidden}
.sum-wait-bar i{display:block;height:100%;width:35%;border-radius:4px;background:var(--accent);animation:sum-wait 1.6s ease-in-out infinite}
@keyframes sum-wait{0%{transform:translateX(-100%)}100%{transform:translateX(290%)}}
@media (prefers-reduced-motion:reduce){.sum-wait-bar i{animation:none;width:100%;opacity:.35}}
.sum-mastered>.row>svg,.sum-speech>.row>svg,.sum-pron>.row>svg{color:var(--accent-ink);flex:none}
.sum-mastered>.row>svg{color:var(--good)}
.sum-mastered-row{display:flex;align-items:center;gap:10px}
.sum-mastered-row .tag{display:inline-flex;align-items:center;gap:2px;flex:none}
.mastered-dots{display:inline-flex;gap:4px;flex:none}
.mastered-dots i{width:10px;height:10px;border-radius:50%;border:2px solid var(--good);box-sizing:border-box}
.mastered-dots i.on{background:var(--good)}
.sum-stats{gap:12px}
.sum-tip{display:flex;gap:8px;align-items:flex-start;padding:10px 12px;border-radius:var(--radius-btn);background:var(--accent-soft);font-size:var(--fs-sm)}
.sum-tip svg{flex:none;color:var(--accent-ink);margin-top:1px}
.pron-turn{display:flex;flex-direction:column;gap:8px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.pron-turn:last-child{border-bottom:0;padding-bottom:0}

/* «Не згоден», правило помилки, загальний рівень */
.sum-mistake-foot{gap:6px;align-items:center;margin-top:4px}
.disagree{color:var(--ink-dim);padding-inline:8px;min-height:32px}
.disagree[disabled]{opacity:.7}
.fix-acts{gap:6px;margin-top:4px}
li.disputed .fix-line{opacity:.55}
.rolling-level{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:12px;background:var(--accent-soft)}
.rolling-level[hidden]{display:none}

/* Нові слова: додані в картки автоматично */
.sum-auto{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:var(--radius-btn);background:var(--accent-soft)}
.sum-auto[hidden]{display:none}
.sum-auto-ico{display:grid;place-items:center;flex:none;color:var(--accent-ink);margin-top:1px}
.sum-auto-t{font-weight:600;font-size:var(--fs-sm);color:var(--accent-ink)}
.sum-word.is-auto b{color:var(--accent-ink)}
.btn.ghost.sum-unadd{flex:none;color:var(--ink-dim);min-height:36px;padding-inline:10px}
/* Підсумок: «Ви вже вживаєте ці слова» — довгий переклад обрізається */
.used-chips .chip{max-width:100%;min-width:0}
.used-chips .chip .dim{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.used-chips .chip b,.used-chips .chip .ico{flex:none}

/* ---------- Єдиний дизайн (2026-11-07): внутрішні екрани вчителя в мові плиток ----------
   Чат: шапка, план, дії під повідомленням, слова, виправлення, підказки, поле вводу; старт «Про що поговоримо?»;
   місії; підсумок (іконка + заголовок + показники + групи); голосове вікно. Основа — css/tiles.css. */
.tu-note{margin:0;padding:0 4px;font-size:var(--fs-xs);color:var(--ink-dim);line-height:1.45}
.tu-panel{background:var(--tile);border:1px solid var(--tile-edge);border-radius:16px;padding:12px 14px;min-width:0}
.tu-mhead{display:flex;align-items:center;gap:12px;min-width:0}
.tu-mhead > .tx-body,.tu-mhead > .grow{flex:1;min-width:0}
.tu-mhead > .tx-pill{align-self:flex-start}
.tx-sq.tu-good{background:var(--good-soft);color:var(--good)}
.tx-sq.tu-accent{background:var(--accent-soft);color:var(--accent-ink)}
.tx-sq.tu-warn{background:var(--warn-soft);color:var(--warn)}
.tx-sq .emo{width:20px;height:20px}
/* квадратик-кнопка «прослухати» на початку рядка-плитки */
button.tu-say{border:0;font:inherit;cursor:pointer;color:var(--ink);-webkit-tap-highlight-color:transparent;transition:transform .18s ease}
button.tu-say:active{transform:scale(.92)}
html.kbd button.tu-say:focus-visible{outline:2px solid var(--accent-ink);outline-offset:2px}
/* факт (роль, мета): квадратик + підпис групи + текст */
.tu-facts{display:flex;flex-direction:column;gap:8px}
.tu-fact{display:flex;align-items:flex-start;gap:10px;min-width:0}
.tu-fact .tx-sq{width:30px;height:30px;border-radius:9px}
.tu-fact-k{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-dim);line-height:1.3}
.tu-fact-v{font-size:var(--fs-sm);line-height:1.4;overflow-wrap:anywhere}

/* шапка чату: аватар — квадратик плитки */
.tutor-chat .tutor-head .avatar{border-radius:12px}
.tutor-chat .tutor-head .grow{min-width:0}
.tutor-chat .tutor-head .xs.dim{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* план заняття — плитка, що розкривається */
.tu-plan{background:var(--tile);border:1px solid var(--tile-edge);border-radius:16px;padding:10px 12px}
.tu-plan > summary{gap:12px;min-height:40px;font-weight:600}
.tu-plan > summary > svg:last-child{flex:none;color:var(--ink-dim);transition:transform var(--dur) var(--ease)}
.tu-plan > summary .tx-sq{background:var(--accent-soft);color:var(--accent-ink)}
.tu-plan > summary .tx-body{flex:1}
.plan.tu-plan summary svg:first-child{color:inherit}
.tu-plan ol{margin:10px 0 2px;padding-left:22px}

/* сценарій / місія над чатом */
.tu-intro{display:flex;flex-direction:column;gap:10px;background:var(--tile);border:1px solid var(--tile-edge);border-radius:16px;padding:12px 14px}
.tu-intro .small{line-height:1.45}

/* бульбашки: радіус плиток */
.tutor-chat .msg{border-radius:18px}
.tutor-chat .msg.ai{background:var(--tile);border-color:var(--tile-edge);border-bottom-left-radius:6px}
.tutor-chat .msg.me{border-bottom-right-radius:6px}
/* дії під повідомленням — маленькі плитки */
.msg-acts{gap:6px;margin:10px 0 0}
.mact{background:var(--tile-sq);border-radius:10px;min-height:34px;padding:4px 10px;color:var(--ink-dim)}
.mact:hover{background:var(--tile-sq);color:var(--ink)}
.msg-tr{background:var(--tile-sq);border-radius:12px}
/* корисні слова — рядки з квадратиком «+» */
.msg-words{gap:6px}
.msg-words > .tx-label{padding:0}
.tu-wrows{display:flex;flex-direction:column;gap:6px}
.tu-wrow{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:5px 10px 5px 5px;border-radius:12px;border:1px solid var(--tile-edge);
  background:var(--tile-sq);color:var(--ink);font:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .18s ease}
.tu-wrow:active:not(:disabled){transform:scale(.985)}
html.kbd .tu-wrow:focus-visible{outline:2px solid var(--accent-ink);outline-offset:2px}
.tu-wsq{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--accent-soft);color:var(--accent-ink)}
.tu-wrow.is-on{cursor:default;opacity:1}
.tu-wrow.is-on .tu-wsq{background:var(--good-soft);color:var(--good)}
.tu-wt{display:flex;flex-direction:column;min-width:0;line-height:1.25;font-size:13.5px}
.tu-wt b{font-weight:700;overflow-wrap:anywhere}
.tu-wt .dim{font-size:12.5px;overflow-wrap:anywhere}

/* виправлення — плитка з жовтим квадратиком */
.fixcard{background:var(--tile);border:1px solid var(--tile-edge);border-radius:16px;border-top-right-radius:6px;padding:0 12px}
.fixcard summary{min-height:48px;gap:10px}
.tu-fsq{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--warn-soft);color:var(--warn)}
.fix-title{font-size:11px;letter-spacing:.08em}
.fixcard ul{gap:0;padding:0 0 4px}
.fixcard li{padding:10px 0;border-top:1px solid var(--line);gap:4px}
.fix-acts{gap:6px;margin-top:2px}
.fixcard .fix-add,.fixcard .disagree{margin:0;min-height:32px;padding:4px 10px;border-radius:10px;background:var(--tile-sq);color:var(--ink-dim)}
.fixcard .fix-add:not(:disabled){color:var(--accent-ink)}

/* нижня панель: підказки — плитки, поле вводу — плитка */
.sugg .chip{background:var(--tile);border:1px solid var(--tile-edge);border-radius:12px;min-height:40px;padding-inline:12px;font-weight:600;color:var(--ink)}
.sugg-ic{width:30px;height:30px;border-radius:9px;background:var(--warn-soft)}
.hint-chip svg{color:var(--warn)}
.tutor-dock .composer{border-radius:16px;background:var(--tile);border-color:var(--tile-edge)}
.tutor-dock .composer:focus-within{border-color:var(--accent-ink)}
.tutor-dock .composer .icon-btn{border-radius:12px}
.jump{border-radius:14px;background:var(--tile);border-color:var(--tile-edge)}

/* старт чату «Про що поговоримо?» */
.tu-start .tu-topic .tx-l{font-size:13.5px}
.tu-start .start-focus{background:var(--tile)}
.tu-start .start-focus .tx-sq{background:var(--accent-soft);color:var(--accent-ink)}
.tu-start .start-focus .tx-l{font-weight:500}
@media (max-width:360px){.tu-start .tu-topic{padding:10px 8px}.tu-start .tu-topic .tx-l{font-size:12.5px}}

/* місії з життя — плитка з квадратиком, фактами й двома діями */
.tu-mission{gap:12px}
.tu-mission .tu-mhead{align-items:flex-start}
.tu-mission .tu-mhead .tx-body{gap:3px}
.tu-mission .mission-sit{color:var(--ink)}
.tu-mission .mission-phrases summary{gap:10px;min-height:40px}
.tu-mission .mission-phrases summary .tx-sq{width:30px;height:30px;border-radius:9px}
.tu-mission .mission-phrases summary>svg:last-child{color:var(--ink-dim)}
.tu-mission .mission-save{min-height:48px;background:var(--tile-sq);border-color:transparent}
.tu-mission .mission-save .tx-sq{background:var(--tile)}
.tu-mission .mission-save:disabled{opacity:.7;cursor:default}
.tu-mission .mission-acts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:0}
.tu-mission .mission-acts .tx{background:var(--tile-sq);border-color:transparent}
.tu-mission .mission-acts .tx .tx-sq{background:var(--tile)}

/* ---------- підсумок ---------- */
.tu-sumhead{display:flex;align-items:center;gap:14px;padding:4px 2px 0}
.tu-sumhead > .tx-sq{width:52px;height:52px;border-radius:16px;background:var(--accent-soft);color:var(--accent-ink)}
.tu-sumhead .tx-body{flex:1}
.tu-sumh1{margin:0;font-size:var(--fs-xl);line-height:1.2}
.tu-sumhead .tx-s{font-size:var(--fs-sm)}
.tutor-summary .tx-row{align-items:flex-start}
.tutor-summary .tx-row > .tx-sq,.tutor-summary .tx-row > .tx-no,.tutor-summary .tx-row > .icon-btn{margin-top:1px}
.tutor-summary .tx-row > .tx-pill{margin-top:8px}
.tutor-summary .tx-row .tx-l{font-weight:500}
.tutor-summary .tx-row .tx-l b{font-weight:700}
.sum-mistake .tx-body{gap:4px}
.sum-mistake .fix-line{font-size:var(--fs-sm);line-height:1.4}
.sum-mistake-foot{margin-top:2px;gap:6px}
.sum-mistake-foot .tx-pill{white-space:normal;line-height:1.2}
.tutor-summary .disagree{min-height:30px;padding:3px 8px;border-radius:10px;background:var(--tile-sq);font-size:12.5px}
.sum-mastered-row .fix-line{font-size:var(--fs-sm)}
.tu-dots{flex:none;display:inline-flex;margin-top:12px}
.tutor-summary .sum-word,.tutor-summary .ph-pick{min-height:56px}
.tutor-summary .sum-word > .icon-btn,.tutor-summary .ph-pick > .icon-btn{flex:none}
.tutor-summary .sum-unadd{flex:none;margin-top:2px}
.sum-auto{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 35%,transparent)}
.sum-auto .sum-auto-t{color:var(--accent-ink);font-weight:600}
.sum-tip .tx-l{font-weight:600}
.tu-md p:last-child{margin-bottom:0}
.tu-assess{gap:12px}
.tx-no.tu-lvl{width:auto;min-width:34px;padding:0 6px;background:var(--accent-soft);color:var(--accent-ink);font-size:13px}
.rolling-level{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 35%,transparent)}
.rolling-level .tx-no{background:var(--accent);color:#fff}
.tu-crit{display:flex;flex-direction:column}
.tu-crit-row{display:flex;align-items:flex-start;gap:12px;padding:9px 0;border-top:1px solid var(--line)}
.tu-crit-row .tx-no{width:auto;min-width:34px;padding:0 6px;font-size:12.5px}
.tu-crit-row .tx-body{flex:1;min-width:0}
.tu-crit-row .tx-l{font-weight:600}
.tu-ul{margin:0;padding-left:20px}
.tu-ul li+li{margin-top:2px}
.sum-pron.tx-rows{gap:6px}
.pron-turn{border-bottom:0;padding:10px 12px;gap:8px}
.pron-turn:last-child{padding-bottom:10px}
.tutor-summary > .btn.ghost.block{margin-top:-6px}
.tutor-summary .used-chips .chip{background:var(--tile-sq);border-color:transparent}

/* ---------- голосове вікно: старт, розмова, кінець ---------- */
.voice .stage{gap:16px}
.voice .ctrl .c{border-radius:18px;background:var(--tile);border-color:var(--tile-edge)}
.voice .ctrl.on .c{background:var(--accent-soft);border-color:transparent}
.voice .ctrl.stop .c{background:var(--bad);border-color:transparent}
.voice .ctrl{font-weight:600}
.voice .ptt{border-radius:28px}
.voice .subs .line{background:var(--tile);border:1px solid var(--tile-edge);border-radius:14px;border-bottom-left-radius:6px;align-self:flex-start;max-width:92%}
.voice .subs .line.me{background:var(--accent-soft);border-color:transparent;border-radius:14px;border-bottom-right-radius:6px;align-self:flex-end}
.vfix-count{border-radius:10px}
.vfix{background:var(--tile);border:1px solid color-mix(in srgb,var(--warn) 45%,transparent);border-radius:12px;border-top-right-radius:4px}
.voice .notice{border-radius:14px}
.voice-hint{border-radius:14px;background:var(--tile);border:1px solid var(--tile-edge)}
/* старт: теми — плитки по 3, головна дія — синя плитка */
.vc-start{width:100%;max-width:520px;display:flex;flex-direction:column;gap:12px;text-align:left}
.vc-start .tx-label{text-align:left}
.vc-start .tx{padding:10px}
.vc-start .tx .tx-sq{width:32px;height:32px;border-radius:10px}
.vc-start .tx-l{font-size:13px}
.vc-tip{display:flex;align-items:center;gap:10px;padding:0 4px;font-size:var(--fs-xs);color:var(--ink-dim);line-height:1.35}
.vc-tip .tx-sq{width:28px;height:28px;border-radius:9px}
.vc-scen{width:100%;max-width:520px}
.voice .controls.vc-go{flex-direction:column;align-items:stretch;gap:8px;width:100%;max-width:520px;margin:0 auto}
.voice .controls.vc-go .btn{width:100%}
.voice .controls .tx.primary{width:100%}
@media (max-height:640px){.vc-start .tx .tx-sq{display:none}.vc-start .tx{min-height:44px;justify-content:center}}
/* кінець без відповіді / помилка */
.vc-end{display:flex;flex-direction:column;gap:14px;padding-top:8px}
.tx-row.sum-mistake{flex-direction:row;align-items:flex-start;gap:12px;padding-bottom:9px;border-bottom:1px solid var(--tile-edge)}
.tx-row.sum-mistake:last-child{padding-bottom:9px;border-bottom:1px solid var(--tile-edge)}
.tu-md{font-size:var(--fs-sm);line-height:1.5}
.msg-acts{gap:4px}
.mact{padding:4px 8px}
@media (max-height:640px){
  .voice.vc-starting .aura{--aura:84px}
  .voice .controls.vc-go .tx-s,.vc-start .tu-note{display:none}
  .voice .controls.vc-go .tx.primary{padding:10px 12px}
}

/* екрани стану й перевірки тексту (аудит 2026-11-07) */
.tu-state .sum-wait{display:block;min-height:1.5em}
.tu-state .sum-wait-bar{margin:0 4px}
.tu-improved{white-space:pre-wrap;overflow-wrap:anywhere}
.tx-row.tu-del .tx-sq{background:var(--bad-soft);color:var(--bad)}
.tx-row.tu-del .tx-l{color:var(--bad)}
/* помилка старту голосу: шапка стану й вхід — як скрізь, ліворуч */
.vc-fail{width:100%;max-width:520px;margin:0 auto;text-align:left}
.voice .controls.vc-go .tx-rows{width:100%}

/* Місія — згорнута плитка (.pg-fold); всередині — ситуація, ролі, фрази, дії */
.tu-mfold .pg-fold-b{font-size:var(--fs-sm);gap:8px}
.tu-mfold>summary .tx-s{color:var(--accent-ink)}
.tu-mfold .mission-save{color:var(--ink-dim);border:1px dashed var(--line-strong);background:transparent}
/* «Показати всі» під історією */
.tx-more.tt-all{align-self:center;background:none;border:0;padding:8px 12px;min-height:40px;cursor:pointer;font:inherit;font-size:var(--fs-sm);font-weight:600;color:var(--accent-ink)}
/* підсумок: згорнуті розділи — панелі всередині на тон глибші */
.tutor-summary .pg-fold-b .tu-panel{background:var(--tile-sq);border-color:transparent}

/* ---------- Преміальний вигляд (2026-11-08): вчитель, чат, голос, підсумок, сценарії, заняття ----------
   Глибина замість рамок, радіуси --r-tile/--r-row, одна синя дія на екран; репліка учня — акцентний градієнт. */
/* шапка чату: аватар — тихий квадратик (не другий «синій» елемент) */
.tutor-chat .tutor-head .avatar{border-radius:12px;background:var(--accent-soft);color:var(--accent-ink);font-family:var(--font-head);font-weight:600;font-size:17px}
.tutor-chat .tutor-head .name{font-family:var(--font-head);font-weight:600;letter-spacing:-.01em}
.tutor-chat .tutor-head .btn.sm.soft{border-radius:12px;font-weight:600}
/* бульбашки: вчитель — плитка з тінню, учень — градієнт акценту */
.tutor-chat .chat{gap:12px}
.tutor-chat .msg{border-radius:var(--r-tile);line-height:1.5;padding:12px 15px}
.tutor-chat .msg.ai{background:var(--tile);border:1px solid var(--tile-edge);box-shadow:var(--tile-shadow);border-bottom-left-radius:6px}
.tutor-chat .msg.me{background:var(--accent-grad);color:#fff;border:0;border-bottom-right-radius:6px;box-shadow:0 6px 16px -10px rgba(30,58,138,.55)}
.tutor-chat .msg.sys{padding:4px 12px;border-radius:99px;background:var(--tile-sq);font-size:12.5px}
.tutor-chat .msg.ai.pending{padding:12px 16px}
/* дії під реплікою — тихий рядок без плашок; натиснута — м'який акцент */
.msg-acts{gap:2px;margin:8px -8px -6px;padding-top:4px}
.mact{background:transparent;border-radius:10px;min-height:34px;padding:4px 8px;font-weight:600;color:var(--ink-dim)}
.mact:hover{background:var(--tile-sq);color:var(--ink)}
.mact[aria-pressed="true"],.mact[aria-expanded="true"]{background:var(--accent-soft);color:var(--accent-ink)}
.msg-tr{border-radius:12px;background:var(--tile-sq);padding:9px 12px}
/* корисні слова — рядки без рамок */
.tu-wrow{border:0;border-radius:var(--r-row);background:var(--tile-sq)}
.tu-wt b{font-weight:600}
/* виправлення й план — плитки з тінню, без рамок */
.fixcard,.tu-plan,.tu-intro,.tu-panel,.voice-hint{border-color:var(--tile-edge);box-shadow:var(--tile-shadow);border-radius:var(--r-tile)}
.fixcard{border-top-right-radius:6px}
.tutor-summary .pg-fold-b .tu-panel,.tu-mfold .tu-panel{box-shadow:none}
.fix-title{font-weight:600}
.fixcard li{border-top-color:var(--tile-edge)}
.fixcard .fix-add,.fixcard .disagree,.tutor-summary .disagree{font-weight:600}
.mem-note{font-size:12px}
/* нижня панель: підказки — тихі плитки; поле вводу — плитка з глибиною */
.sugg .chip{border:0;box-shadow:var(--tile-shadow);border-radius:var(--r-row);font-weight:500}
.sugg .hint-chip{font-weight:600}
.tutor-dock .composer{border-radius:var(--r-tile);border:1px solid var(--tile-edge);box-shadow:0 1px 2px rgba(11,21,48,.05),0 10px 28px -12px rgba(11,21,48,.22)}
.tutor-dock .composer .icon-btn.soft{background:var(--accent-grad);color:#fff;box-shadow:var(--accent-glow)}
.tutor-dock .composer .icon-btn.soft:disabled{background:var(--tile-sq);color:var(--ink-dim);box-shadow:none}
.jump{border:0;box-shadow:var(--shadow-float);border-radius:14px}

/* місії: «У фразник» — тихий рядок замість пунктирної рамки */
.tu-mfold .mission-save,.mission-card .mission-save{border:0;background:var(--tile-sq);color:var(--ink);border-radius:var(--r-row);font-weight:600}
.tu-mfold .mission-acts .tx{box-shadow:none}

/* підсумок: рівень у розмовах — тихо, без кромки; цифри Onest 600 */
.rolling-level,.sum-auto{border:0;box-shadow:none}
.rolling-level .tx-no,.tx-no.tu-lvl{background:var(--accent-soft);color:var(--accent-ink);font-family:var(--font-head);font-weight:600}
.tu-crit-row{border-top-color:var(--tile-edge)}
.tu-crit-row .tx-no{font-family:var(--font-head);font-weight:600}
.tu-sumh1{font-family:var(--font-head);font-weight:600;letter-spacing:-.025em}
.tu-sumhead > .tx-sq{background:var(--accent-grad);color:#fff;box-shadow:var(--accent-glow)}
.tx-row.sum-mistake,.tx-row.sum-mistake:last-child{border-bottom:0;padding-bottom:10px}
.sum-wait-bar{height:4px;background:var(--track);border-radius:99px}
.sum-wait-bar i{background:var(--accent-grad);border-radius:99px}
.tu-check .tu-orig{border:0}

/* перевірка тексту: вид тексту — сегменти */
.seg.tu-kind button{padding-inline:6px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* сценарії: іконки-емодзі в квадратиках успадковують колір (на синій плитці — білі) */
.tx-sq .emo{color:inherit}

/* голос: ядро — градієнт акценту зі світінням; субтитри — плитки з тінню; кнопки керування — плитки */
.aura .core{background:var(--accent-grad);box-shadow:var(--accent-glow),inset 0 1px 0 rgba(255,255,255,.16)}
.aura.me .core{background:var(--good)}
.voice .state{font-family:var(--font-head);font-weight:600;color:var(--ink);letter-spacing:-.01em}
.voice .top .num{font-family:var(--font-head);font-weight:600;font-variant-numeric:tabular-nums}
.voice .subs{gap:10px}
.voice .subs .line{border:1px solid var(--tile-edge);box-shadow:var(--tile-shadow);border-radius:var(--r-row);border-bottom-left-radius:6px;padding:10px 13px;line-height:1.45}
.voice .subs .line.me{background:var(--accent-soft);border-color:transparent;box-shadow:none;border-radius:var(--r-row);border-bottom-right-radius:6px}
.voice .ctrl{color:var(--ink-dim);font-weight:600}
.voice .ctrl .c{border:0;box-shadow:var(--tile-shadow);border-radius:20px;width:62px;height:62px}
.voice .ctrl.on .c{box-shadow:none}
.voice .ctrl.stop .c{box-shadow:0 10px 22px -12px color-mix(in srgb,var(--bad) 80%,transparent)}
.vfix{border:0;background:var(--tile);box-shadow:var(--tile-shadow),inset 3px 0 0 var(--warn);border-radius:12px;border-top-right-radius:4px;padding:6px 11px}
.vfix.playing{box-shadow:0 0 0 2px var(--warn)}
.vfix-count{font-weight:600}
.vc-scen{box-shadow:var(--tile-shadow)}
/* «Надіслати» синіє лише з текстом у полі — до того не змагається з головною дією екрана */
.tutor-dock .composer:has(textarea:placeholder-shown) .icon-btn.soft:not([aria-label="Зупинити відповідь"]){background:var(--accent-soft);color:var(--accent-ink);box-shadow:none}
/* оцінка рівня: на вузькому екрані пігулка впевненості переходить під заголовок, а не стискає його */
.tu-assess > .tu-mhead{flex-wrap:wrap;row-gap:6px}
.tu-assess > .tu-mhead > .tx-body{flex:1 1 150px}
.tu-assess > .tu-mhead > .tx-pill{align-self:center;margin-left:auto}
.tu-checkta{min-height:min(240px,34dvh);border-radius:var(--r-tile)}

/* ---------- «Скажи ще раз» (js/redo.js): власні речення з помилками розмови — вимовити правильно ---------- */
.tx.tu-redo .tx-sq{background:var(--accent-soft);color:var(--accent-ink)}
.redo{padding-bottom:8px}
.redo-head{display:flex;flex-direction:column;gap:8px}
.redo-head-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.redo-head-row .tx-label{padding:0 2px}
.redo-count{font-family:var(--font-head);font-weight:600;font-size:var(--fs-sm);font-variant-numeric:tabular-nums;color:var(--ink-dim);padding-right:2px}
.tx.redo-card{flex-direction:column;align-items:stretch;gap:10px;padding:16px;cursor:default}
.tx.redo-card:active{transform:none}
.redo-tags{display:flex;flex-wrap:wrap;gap:6px}
.redo-tags:empty{display:none}
.redo-tags .tx-pill{white-space:normal;line-height:1.2}
.redo-tags .tx-pill.accent{background:var(--accent-soft);color:var(--accent-ink)}
.redo-ex{margin:0;font-size:var(--fs-md);line-height:1.45;overflow-wrap:anywhere}
.redo-wrong{margin:0;color:var(--ink-dim);font-size:var(--fs-sm);line-height:1.4;overflow-wrap:anywhere}
.redo-wrong s{text-decoration-thickness:1.5px;text-decoration-color:color-mix(in srgb,var(--bad) 70%,transparent)}
.redo-ask{margin:2px 0 0;display:flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--accent-ink)}
.redo-ask svg{flex:none}
.redo-fb:empty{display:none}
.tx.redo-res,.tx.redo-msg{flex-direction:row;align-items:flex-start;cursor:default}
.tx.redo-res:active,.tx.redo-msg:active{transform:none}
.redo-res .tx-body{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}
.redo-res .tx-l{font-weight:600}
.tx.redo-res.good .tx-l{color:var(--good)}
.tx.redo-res.bad .tx-l{color:var(--bad)}
.redo-target{display:flex;align-items:center;gap:10px;font-weight:600;line-height:1.35;overflow-wrap:anywhere}
.redo-target > span{min-width:0}
.redo-target .tu-say{flex:none;width:34px;height:34px}
.tx.redo-res.good .redo-target .tu-say{background:color-mix(in srgb,var(--good) 16%,transparent);color:var(--good)}
.redo-said{margin:0;display:flex;flex-direction:column;gap:1px;font-size:var(--fs-sm);color:var(--ink-dim);overflow-wrap:anywhere}
.redo-k{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase}
.redo-act{display:flex;flex-direction:column;align-items:center;gap:10px}
.redo-act > .tx,.redo-act > .redo-input{align-self:stretch}
textarea.input.redo-input{min-height:76px;font-size:var(--fs-md)}
/* велика кнопка мікрофона — єдина синя дія екрана */
.redo-mic{width:88px;height:88px;margin-top:6px;border-radius:50%;border:0;display:grid;place-items:center;cursor:pointer;color:#fff;
  background:var(--accent-grad);box-shadow:var(--accent-glow);-webkit-tap-highlight-color:transparent;transition:transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .2s ease}
.redo-mic:active{transform:scale(.94)}
.redo-mic.rec{background:var(--bad);box-shadow:0 0 0 0 color-mix(in srgb,var(--bad) 45%,transparent);animation:redoPulse 1.4s ease-out infinite}
.redo-mic.wait{opacity:.7;cursor:default;box-shadow:none}
html.kbd .redo-mic:focus-visible{outline:3px solid var(--accent-ink);outline-offset:3px}
@keyframes redoPulse{from{box-shadow:0 0 0 0 color-mix(in srgb,var(--bad) 45%,transparent)}to{box-shadow:0 0 0 18px transparent}}
@media (prefers-reduced-motion:reduce){.redo-mic.rec{animation:none}}
.redo-cap{margin:0;font-size:var(--fs-sm);color:var(--ink-dim);text-align:center;min-height:1.4em}
.redo-foot{display:flex;justify-content:center;flex-wrap:wrap;gap:4px 14px}
.redo-foot:empty{display:none}
.redo-link{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 10px;border:0;border-radius:12px;background:transparent;
  color:var(--ink-dim);font:inherit;font-size:var(--fs-sm);font-weight:600;cursor:pointer;-webkit-tap-highlight-color:transparent}
.redo-link{text-decoration:none}
.redo-link:hover{background:var(--tile-sq);color:var(--ink)}
html.kbd .redo-link:focus-visible{outline:2px solid var(--accent-ink);outline-offset:1px}
.redo-miss{align-items:flex-start}
.redo-miss .fix-line{font-size:var(--fs-sm);line-height:1.4}
.redo-miss .tu-say{flex:none}
@media (max-width:360px){
  .tx.redo-card{padding:14px}
  .redo-ex{font-size:var(--fs-sm)}
  .redo-mic{width:76px;height:76px}
}
/* екран «Вчитель готує підсумок» (2026-11-09): смужка на всю ширину під шапкою, контури підсумку нижче */
.tu-state .sum-wait-bar{width:auto;margin:0 4px}
.sum-wait-skel{opacity:.7}
.vc-start,.vc-scen{margin-inline:auto}
