/* Tolk: шов. Светлота занята смыслом (свет у читающего), поэтому тёмной темы нет; ночью тот же приём на приглушённых значениях. Контраст проверяется tests/js/contrast.test.mjs. */
:root {
  --list: #F5F5F1;
  --kop: #1A1F96;
  --kop2: #565BA8;
  --list2: #C9CBEA;
  --hl-lit: rgba(26, 31, 150, .14);
  --hl-dim: rgba(245, 245, 241, .16);
  --latin: -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --list: #C9CBEA;
    --kop: #12156B;
    --kop2: #2C307F;
    --list2: #B4B7E0;
    --hl-lit: rgba(18, 21, 107, .16);
    --hl-dim: rgba(201, 203, 234, .14);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  height: 100%; overflow: hidden; position: fixed; inset: 0; background: var(--kop); font-family: var(--latin); color: var(--list);
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
button, input, textarea { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; border-radius: 6px; }
.noscript { position: fixed; inset: 24px; font-size: 20px; }

/* Письменности. Веб-шрифтов нет: всё уже есть в телефоне. */
:lang(ja) { font-family: "Hiragino Sans", "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", var(--latin); word-break: auto-phrase; line-break: strict; }
:lang(ko) { font-family: "Apple SD Gothic Neo", "Noto Sans CJK KR", "Malgun Gothic", var(--latin); word-break: keep-all; }
:lang(zh) { font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei UI", var(--latin); line-break: strict; word-break: auto-phrase; }
:lang(zh-Hant) { font-family: "PingFang TC", "Noto Sans CJK TC", "Microsoft JhengHei UI", var(--latin); }
:lang(ar), :lang(fa) { font-family: "SF Arabic", "Geeza Pro", "Noto Sans Arabic", "Noto Naskh Arabic", "Segoe UI", var(--latin); }
:lang(he) { font-family: "SF Hebrew", "Noto Sans Hebrew", "Segoe UI", var(--latin); }
:lang(hi) { font-family: "Kohinoor Devanagari", "Noto Sans Devanagari", "Nirmala UI", var(--latin); }
:lang(bn) { font-family: "Kohinoor Bangla", "Noto Sans Bengali", "Nirmala UI", var(--latin); }
:lang(th) { font-family: "Thonburi", "Noto Sans Thai", "Leelawadee UI", var(--latin); }
:lang(ka) { font-family: "Noto Sans Georgian", "Sylfaen", var(--latin); }
:lang(hy) { font-family: "Noto Sans Armenian", "Sylfaen", var(--latin); }

/* Сцена: шов общий на все экраны и никогда не исчезает. */
.stage {
  --s: 50%; --app-h: 100dvh; --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  position: fixed; left: 0; right: 0; top: 0; height: var(--app-h); overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.ground { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.layer, .screen { position: absolute; inset: 0; }
.lit { --fg: var(--kop); --soft: var(--kop2); --bg: var(--list); --hl: var(--hl-lit); }
.dim { --fg: var(--list); --soft: var(--list2); --bg: var(--kop); --hl: var(--hl-dim); }

.half { position: absolute; left: 0; right: 0; color: var(--fg); transition: color .2s linear; }
.half.top { top: 0; height: var(--s); transform: rotate(180deg); }
.half.bottom { top: var(--s); bottom: 0; }
.table { position: absolute; inset: 0; }

/* Половина считается от шва: сверху 40 px на сам шов, новое у него, старое тонет к краю. */
.inner {
  position: absolute; inset: 0; overflow: hidden auto; padding: 36px 24px calc(16px + var(--safe-top));
  overscroll-behavior: contain; scrollbar-width: none; touch-action: pan-y; -webkit-overflow-scrolling: touch;
}
.inner::-webkit-scrollbar, .results::-webkit-scrollbar, .scroll::-webkit-scrollbar { display: none; }
.half.bottom .inner { padding-bottom: calc(68px + var(--safe-bottom)); }

/* Четыре размера и один вес акцента. */
.say { font-size: 40px; line-height: 1.12; font-weight: 500; letter-spacing: -.015em; text-wrap: pretty; overflow-wrap: anywhere; }
.own { font-size: 26px; line-height: 1.22; font-weight: 400; letter-spacing: -.005em; text-wrap: pretty; overflow-wrap: anywhere; }
.say.fs1 { font-size: 32px; line-height: 1.16; }
.say.fs2 { font-size: 26px; line-height: 1.22; }
.say.fs3 { font-size: 21px; line-height: 1.3; }
.own.fs1 { font-size: 22px; line-height: 1.25; }
.own.fs2, .own.fs3 { font-size: 19px; line-height: 1.3; }
.say.huge { font-size: clamp(38px, 13.5vw, 56px); line-height: 1.06; letter-spacing: -.022em; }
.say.card { font-size: clamp(34px, 11vw, 44px); }
.say.sm { font-size: 30px; line-height: 1.16; }
.say.multi { font-size: clamp(28px, 8.6vw, 36px); margin-bottom: 14px; }
.partial { color: var(--soft); }
.past { margin-top: 30px; font-size: 17px; line-height: 1.38; color: var(--soft); overflow-wrap: anywhere; }
.past p + p { margin-top: 12px; }
.past .mine { padding-inline-start: 32px; }
.note { font-size: 15px; line-height: 1.3; color: var(--soft); margin-top: 10px; }
.note.big { font-size: 20px; margin-top: 0; }
.note.full { flex-basis: 100%; margin: 0 0 2px; }
.lead { font-size: 15px; line-height: 1.3; color: var(--soft); margin: 0 0 8px; }
.hint { font-size: 15px; line-height: 1.35; color: var(--soft); margin-top: 16px; }
.caret { display: inline-block; width: .09em; height: .86em; margin-inline-start: .06em; background: currentColor; vertical-align: -.08em; }
.body { font-size: 19px; line-height: 1.35; color: var(--soft); margin-top: 14px; }

/* Подстройка письменностей: CJK без трекинга, арабское и деванагари с большим интерлиньяжем. */
:lang(ja) .say, :lang(zh) .say, :lang(ko) .say, .say:lang(ja), .say:lang(zh), .say:lang(ko) { font-size: 38px; line-height: 1.32; letter-spacing: 0; }
:lang(ja) .own, :lang(zh) .own, :lang(ko) .own { font-size: 25px; line-height: 1.42; letter-spacing: 0; }
:lang(ja) .say.fs1, :lang(zh) .say.fs1, :lang(ko) .say.fs1 { font-size: 30px; }
:lang(ja) .say.fs2, :lang(zh) .say.fs2, :lang(ko) .say.fs2 { font-size: 25px; }
:lang(ja) .say.fs3, :lang(zh) .say.fs3, :lang(ko) .say.fs3 { font-size: 21px; line-height: 1.42; }
:lang(ja) .say.card { font-size: clamp(34px, 11vw, 44px); }
:lang(ja) .say.huge, :lang(zh) .say.huge, :lang(ko) .say.huge { font-size: clamp(34px, 11vw, 44px); line-height: 1.26; }
:lang(ja) .past { font-size: 16px; line-height: 1.55; }
:lang(ar) .say, :lang(fa) .say { font-size: 44px; line-height: 1.45; letter-spacing: 0; }
:lang(ar) .own, :lang(fa) .own { font-size: 29px; line-height: 1.45; letter-spacing: 0; }
:lang(ar) .past, :lang(fa) .past { font-size: 19px; line-height: 1.45; }
/* Ступени длинной реплики идут после базовых правил письменности: при равной специфичности иначе победит базовый размер и текст не уменьшится. */
:lang(ja) .own.fs1, :lang(zh) .own.fs1, :lang(ko) .own.fs1 { font-size: 22px; line-height: 1.42; }
:lang(ja) .own.fs2, :lang(zh) .own.fs2, :lang(ko) .own.fs2 { font-size: 20px; line-height: 1.42; }
:lang(ja) .own.fs3, :lang(zh) .own.fs3, :lang(ko) .own.fs3 { font-size: 18px; line-height: 1.42; }
:lang(ar) .say.fs1, :lang(fa) .say.fs1 { font-size: 34px; line-height: 1.42; }
:lang(ar) .say.fs2, :lang(fa) .say.fs2 { font-size: 28px; line-height: 1.42; }
:lang(ar) .say.fs3, :lang(fa) .say.fs3 { font-size: 23px; line-height: 1.42; }
:lang(ar) .say.card, :lang(fa) .say.card { font-size: clamp(32px, 10vw, 40px); line-height: 1.38; }
:lang(ar) .say.huge, :lang(fa) .say.huge { font-size: clamp(34px, 11vw, 44px); line-height: 1.34; }
:lang(ar) .own.fs1, :lang(fa) .own.fs1 { font-size: 25px; line-height: 1.42; }
:lang(ar) .own.fs2, :lang(fa) .own.fs2 { font-size: 22px; line-height: 1.42; }
:lang(ar) .own.fs3, :lang(fa) .own.fs3 { font-size: 20px; line-height: 1.42; }
:lang(hi) .say, :lang(bn) .say, :lang(th) .say { line-height: 1.45; letter-spacing: 0; }
:lang(hi) .own, :lang(bn) .own, :lang(th) .own { line-height: 1.45; letter-spacing: 0; }

/* Управление: значки на шве, служебное словами. */
.word { display: inline-flex; align-items: center; min-height: 48px; min-width: 48px; padding: 0 12px; font-size: 15px; color: var(--soft); text-align: start; }
.word.strong { color: var(--fg); font-weight: 500; font-size: 17px; padding-inline-start: 0; }
.word.tall { min-height: 56px; font-size: 17px; padding-inline-start: 0; }
.state-word { display: flex; padding-inline: 0; margin-bottom: 2px; font-size: 16px; color: var(--soft); pointer-events: none; }
.state-word.act { color: var(--fg); font-weight: 500; }

/* Значки на шве. Заливка Лист и обводка Копирка видны на обоих полях. Посередине экрана: при повороте на 180° кнопка остаётся на месте. */
.ctl-row { position: absolute; top: var(--s); left: 50%; transform: translate(-50%, -50%); display: flex; gap: 8px; z-index: 2; }
.ctl {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; flex: none; background: var(--list); color: var(--kop); box-shadow: 0 0 0 1.5px var(--kop);
  transition: transform .12s var(--ease), background .15s linear, color .15s linear; touch-action: manipulation;
}
.ctl:active { transform: scale(.9); }
.ctl.soft { background: none; color: var(--soft); box-shadow: none; }
.ic { width: 24px; height: 24px; grid-area: 1 / 1; fill: currentColor; }
.ic .line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ctl.main .ic { opacity: 0; transform: scale(.55) rotate(-30deg); transition: opacity .14s linear, transform .2s var(--ease); }
.ctl.main[data-icon="pause"] .i-pause, .ctl.main[data-icon="play"] .i-play, .ctl.main[data-icon="speaker"] .i-speaker { opacity: 1; transform: none; }
/* Чуть живые: пауза дышит, пока телефон слушает, и бьётся чаще, когда слышит речь. */
.i-pause rect { transform-box: fill-box; transform-origin: center; }
.ctl.main[data-s="listen"] .i-pause rect { animation: ctl-breathe 2.8s ease-in-out infinite; }
.ctl.main[data-s="hear"] .i-pause rect, .ctl.main[data-s="hold"] .i-pause rect { animation: ctl-breathe .7s ease-in-out infinite; }
.ctl.main[data-s="think"] .i-pause rect, .ctl.main[data-s="stream"] .i-pause rect { animation: ctl-breathe 1.2s ease-in-out infinite; }
.i-pause .b2 { animation-delay: -.35s !important; }
.ctl.main[data-icon="speaker"] .i-speaker .w1 { animation: ctl-wave 1s ease-in-out infinite; }
.ctl.main[data-icon="speaker"] .i-speaker .w2 { animation: ctl-wave 1s ease-in-out -.25s infinite; }
.ctl.main[data-icon="play"] { animation: ctl-call 2.4s ease-in-out infinite; }
.ctl.mic { animation: ctl-in .24s var(--ease); touch-action: none; }
.ctl.mic.on { background: var(--kop); color: var(--list); box-shadow: 0 0 0 1.5px var(--list); transform: scale(1.08); }
@keyframes ctl-breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.72); } }
@keyframes ctl-wave { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes ctl-call { 0%, 100% { box-shadow: 0 0 0 1.5px var(--kop); } 50% { box-shadow: 0 0 0 5px var(--list2); } }
@keyframes ctl-in { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.ctl-row.three { left: 16px; transform: translateY(-50%); }
@media (min-width: 460px) { .ctl-row.three { left: 50%; transform: translate(-50%, -50%); } }
@media (max-width: 339px) { .ctl-row { left: 16px; transform: translateY(-50%); } }
.foot {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0 8px calc(10px + var(--safe-bottom)); display: flex; justify-content: space-between; align-items: center; gap: 0 4px; flex-wrap: wrap;
  background: var(--bg); transition: background .2s linear;
}
/* Текст уходит под подвал плавно: срез посреди строки выглядит поломкой. */
.half.bottom .foot::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 22px; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--bg)); }
.start .half.bottom .foot::before { display: none; }
.foot > .word { flex: 0 1 auto; min-width: 48px; padding: 2px 8px; line-height: 1.15; overflow-wrap: break-word; }
.foot-end { display: flex; align-items: center; flex: none; }
.banner { margin: 2px 0 12px; font-size: 16px; line-height: 1.32; color: var(--fg); }
.banner p + .word { margin-top: 2px; }
.extra:empty { display: none; }

/* Пара: одна капсула, разрезанная швом. */
.pair {
  position: absolute; right: 16px; top: var(--s); transform: translateY(-50%); z-index: 3; width: 112px; height: 64px; display: grid; grid-template-rows: 1fr 1fr; font-size: 15px; font-weight: 400;
  transition: right .24s var(--ease), width .24s var(--ease), height .24s var(--ease), font-size .24s var(--ease); color: inherit;
}
.pair span {
  display: flex; align-items: center; justify-content: center; min-width: 0; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 1.5px solid var(--fg); background: var(--bg); color: var(--fg); border-radius: 0 0 32px 32px; border-top: 0; transition: background .2s linear, color .2s linear;
}
.pair .p-top { transform: rotate(180deg); }
@media (max-width: 399px) { .pair { width: 96px; } }
.pair.big { right: calc(50% - 118px); width: 236px; height: 148px; font-size: 32px; font-weight: 500; letter-spacing: -.01em; }
.pair.big span { border-radius: 0 0 118px 118px; border-width: 2px; border-top: 0; }
@media (max-width: 359px) { .pair.big { right: calc(50% - 104px); width: 208px; height: 132px; font-size: 26px; } .pair { width: 96px; } }

/* Старт */
.go { position: absolute; left: 0; right: 0; top: 74px; bottom: calc(66px + var(--safe-bottom)); padding: 0 24px; display: flex; align-items: flex-end; text-align: start; font-size: clamp(52px, 17.4vw, 68px); line-height: 1; font-weight: 500; letter-spacing: -.03em; color: var(--fg); }
.go:lang(ja), .go:lang(zh), .go:lang(ko) { letter-spacing: 0; }
.go:lang(ar), .go:lang(fa) { letter-spacing: 0; line-height: 1.5; }
.start .foot { justify-content: space-between; gap: 8px; }
.start .foot-end .word { padding: 0 8px; }
.quiet { font-size: 15px; color: var(--fg); padding-inline-start: 12px; min-width: 0; }
.quiet span { margin-inline-start: .3em; font-weight: 500; }
.quiet-text { font-size: 14px; line-height: 1.3; color: var(--soft); padding-inline-start: 12px; min-width: 0; }

/* Экраны первого запуска */
.first .half.bottom { display: flex; }
.first-body { padding: 44px 24px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; justify-content: flex-end; width: 100%; color: var(--fg); overflow: auto; }
.huge-name { font-size: clamp(52px, 17.4vw, 68px); line-height: 1.04; font-weight: 500; letter-spacing: -.03em; margin: 8px 0 auto; overflow-wrap: anywhere; }
.huge-name:lang(ja), .huge-name:lang(zh), .huge-name:lang(ko) { letter-spacing: 0; }
.first .cta { margin-top: 26px; }
.first-body .about { margin: 0 0 14px; font-size: 17px; }

.cta {
  display: flex; align-items: center; justify-content: center; min-height: 64px; width: 100%; padding: 8px 24px; border-radius: 32px; background: var(--fg); color: var(--bg); font-size: 20px; font-weight: 500; text-align: center;
}
.cta:disabled { opacity: .45; cursor: default; }
.cta.end { margin-top: 28px; background: none; color: var(--fg); border: 1.5px solid var(--fg); font-size: 18px; }

/* Экраны с полосой: шов уезжает наверх, под ним рабочее поле. */
.band { display: flex; flex-direction: column; user-select: text; -webkit-user-select: text; }
.band-top { flex: none; height: calc(88px + var(--safe-top)); padding: var(--safe-top) 12px 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--list); }
.band-top h2 { font-size: 17px; font-weight: 400; line-height: 1.2; }
.band-top .word { font-size: 17px; flex: none; }
.band-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 18px 24px calc(14px + var(--safe-bottom)); color: var(--fg); background: var(--list); }
.band-body.center { justify-content: center; gap: 28px; }
.plain .band-body { background: none; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { width: 100%; min-height: 64px; padding: 6px 2px; border-bottom: 2px solid var(--fg); font-size: 26px; font-weight: 500; letter-spacing: .02em; }
.field::placeholder, .query-input::placeholder, .compose-area::placeholder { color: var(--soft); opacity: 1; font-weight: 400; }
.email-field { font-size: 22px; font-weight: 400; letter-spacing: 0; }
.code-field { letter-spacing: .25em; }
.code-sent { margin-top: 0; }
.code-to { font-weight: 500; color: var(--fg); overflow-wrap: anywhere; }
.msg { font-size: 16px; line-height: 1.32; color: var(--soft); min-height: 1.3em; }

/* Поиск */
.results { flex: 1; min-height: 0; overflow: hidden auto; margin: 0 -24px; padding: 0 24px 8px; overscroll-behavior: contain; scrollbar-width: none; }
.country { padding: 6px 0 12px; }
.country h3 { font-size: 30px; line-height: 1.1; font-weight: 500; letter-spacing: -.015em; overflow-wrap: anywhere; }
.c-name { font-size: 20px; line-height: 1.2; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; min-width: 88px; padding: 6px 14px; border-radius: 32px; border: 1.5px solid var(--fg); color: var(--fg); font-size: 18px; line-height: 1.2; font-weight: 500; flex: 1 1 auto; max-width: 100%;
}
.chip small { font-size: 15px; font-weight: 400; color: var(--soft); }
.chip.on { background: var(--fg); color: var(--bg); }
.chip.small { min-height: 48px; font-size: 16px; font-weight: 400; flex: 0 1 auto; border-radius: 24px; }
.hit { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; min-height: 56px; font-size: 20px; text-align: start; }
.hit > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.hit .self { font-weight: 500; text-align: end; flex: none; white-space: nowrap; } /* самоназвание целиком: переносится русская подпись */
.hit.q { flex: none; min-height: 64px; margin-top: 8px; }
.hit.q small { display: block; font-size: 15px; color: var(--soft); }
.hit.q b { font-weight: 500; display: flex; width: 48px; height: 48px; border-radius: 24px; border: 1.5px solid var(--fg); align-items: center; justify-content: center; font-size: 22px; flex: none; }
.query { position: relative; flex: none; margin-top: 8px; border-bottom: 2px solid var(--fg); font-size: 30px; line-height: 1.2; font-weight: 500; letter-spacing: -.015em; }
.query-input:focus-visible, .field:focus-visible, .compose-area:focus-visible { outline: 0; }
.query:focus-within, .field:focus { border-bottom-width: 3px; }
.query-input { position: relative; display: block; width: 100%; min-height: 56px; padding: 6px 0; font-weight: 500; letter-spacing: inherit; }
.query-input::placeholder { font-size: 24px; }
.ghost { position: absolute; left: 0; right: 0; top: 0; min-height: 56px; padding: 6px 0; line-height: 44px; white-space: pre; overflow: hidden; pointer-events: none; }
.ghost-typed { visibility: hidden; }
.ghost-tail { color: var(--soft); font-weight: 400; }

/* Настройки */
.scroll { flex: 1; min-height: 0; overflow: hidden auto; margin: -18px -24px 0; padding: 12px 24px 18px; scrollbar-width: none; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; min-height: 64px; padding: 8px 0; font-size: 19px; line-height: 1.25; text-align: start; }
.set-row small { display: block; font-size: 15px; color: var(--soft); margin-top: 2px; }
.set-row .self { font-weight: 500; flex: none; max-width: 50%; text-align: end; }
.switch { flex: none; min-width: 72px; min-height: 36px; padding: 0 12px; border: 1.5px solid var(--fg); border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.switch.on { background: var(--fg); color: var(--bg); }
.set-block { padding: 10px 0 12px; }
.set-title { font-size: 19px; }
.set-note { margin: 4px 0 10px; }
.sign-out { margin-top: 12px; }
.msg.warn { color: var(--fg); margin-top: 12px; }
.msg.warn + .sign-out { margin-top: 0; color: var(--fg); font-weight: 500; }
.chips.wrap { margin-top: 8px; }

/* Ввод */
.compose-area { flex: 1; min-height: 96px; width: 100%; resize: none; font-size: 26px; line-height: 1.22; user-select: text; -webkit-user-select: text; }
.band-body > .row { flex: none; display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.band-body > .row .cta { flex: 1; }
.count { font-size: 15px; color: var(--soft); min-width: 2em; }
.count:empty { display: none; }

/* Крупно */
.big-box { position: absolute; left: 0; right: 0; top: 0; bottom: calc(148px + var(--safe-bottom)); padding: calc(28px + var(--safe-top)) 24px 24px; overflow: hidden; color: var(--fg); transition: transform .2s var(--ease); }
.big-box.flipped { transform: rotate(180deg); }
.big-text { font-weight: 500; line-height: 1.12; letter-spacing: -.015em; overflow-wrap: normal; }
.big-text:lang(ja), .big-text:lang(zh), .big-text:lang(ko) { line-height: 1.32; letter-spacing: 0; }
.big-text:lang(ar), .big-text:lang(fa) { line-height: 1.45; letter-spacing: 0; }
.big-text.tate { writing-mode: vertical-rl; height: 100%; }
.strip { position: absolute; left: 0; right: 0; bottom: 0; height: calc(148px + var(--safe-bottom)); padding: 20px 24px var(--safe-bottom); color: var(--list); }
.strip-sub { font-size: 17px; line-height: 1.35; color: var(--list2); max-height: 2.8em; overflow: hidden; }
.row3 { position: absolute; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom)); display: flex; justify-content: space-between; }
.row3 .word { font-size: 17px; color: var(--list); }
.bigtext.away { transform: rotate(180deg); }

/* Догадка языка */
.guess { display: flex; flex-wrap: wrap; gap: 10px; margin: 2px 0 14px; align-items: stretch; }
.guess.in-feed { flex: none; margin: 0; padding: 12px 24px; background: var(--list); color: var(--kop); }
.guess .chip { flex: 0 1 auto; min-height: 56px; font-size: 20px; }

/* Режим: два слова на линии слова состояния, у правого края половины владельца. Тихо и всегда на одном месте. */
.mode-switch { display: inline-flex; align-items: center; color: var(--soft); font-size: 15px; }
.mode-word { min-height: 48px; min-width: 48px; padding: 0 6px; color: var(--soft); }
.mode-word.on { color: var(--fg); font-weight: 500; }
.mode-bar { color: var(--soft); user-select: none; }
.half.bottom > .mode-switch { position: absolute; top: 34px; inset-inline-end: 10px; background: var(--bg); transition: background .2s linear; z-index: 1; }
.half.bottom .state-word { max-width: calc(100% - 156px); text-align: start; line-height: 1.2; }

/* Отметка непонятного места: слово под пальцем и найденный кусок мягко подсвечены тем же пигментом. */
.hl { color: var(--fg); }
.w.sel, .hl { background: var(--hl); border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.w.sel { box-shadow: 0 0 0 2px var(--hl); }
.lead.mark-lead, .mark-lead { font-size: 17px; line-height: 1.3; font-weight: 500; color: var(--fg); margin: 0 0 10px; }
.mark-text { font-size: 26px; line-height: 1.26; overflow-wrap: anywhere; }
.mark-text.read { font-size: 32px; line-height: 1.16; font-weight: 500; letter-spacing: -.01em; }
.mark-alt { font-size: 22px; line-height: 1.26; overflow-wrap: anywhere; }
.mark-text + .note { margin-top: 10px; }
@media (max-height: 640px) { .mark-text, .mark-text.read { font-size: 20px; } .mark-alt { font-size: 18px; } .lead.mark-lead, .mark-lead { font-size: 16px; margin-bottom: 6px; } }
.note + .mark-alt { margin-top: 4px; }
.mark-actions { display: flex; gap: 4px; margin: 10px 0 0 -6px; }
.mark-actions .act { display: inline-flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; flex: 1 1 0; min-width: 0; max-width: 96px; min-height: 56px; padding: 4px 6px; color: var(--fg); font-size: 12px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.mark-actions .act:active { opacity: .6; }
.mark-actions .act .ic { flex: none; }
.mark-actions .act:disabled { color: var(--soft); opacity: .6; cursor: default; }
.big-text .w.sel { box-shadow: none; }
.strip-hint { font-size: 15px; line-height: 1.3; color: var(--list2); }
.strip-sub.one { max-height: 1.35em; margin-top: 2px; }

/* Диктовка: тот же лист и та же Копирка, но шов наверху и свет на месте. */
.dict { position: absolute; inset: 0; display: flex; flex-direction: column; user-select: none; }
.d-band { flex: none; height: calc(72px + var(--safe-top)); padding: var(--safe-top) 8px 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--list); }
.d-band .word { color: var(--list2); flex: 0 1 auto; padding: 0 8px; line-height: 1.1; overflow-wrap: anywhere; }
.d-band .mode-switch { flex: none; }
.d-feed { flex: 1; min-height: 0; overflow: hidden auto; padding: 18px 24px 8px; color: var(--fg); touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: none; display: flex; flex-direction: column; }
.d-feed::-webkit-scrollbar { display: none; }
.d-list { margin-top: auto; }
.d-hint { font-size: 21px; line-height: 1.3; color: var(--soft); margin-bottom: auto; padding-top: 4px; }
.d-hint.now { color: var(--fg); font-weight: 500; }
.d-hint[hidden] + .d-list { margin-top: auto; }
.d-card { padding: 4px 0 8px; }
.d-card + .d-card { margin-top: 10px; }
.d-src { font-size: 16px; line-height: 1.38; color: var(--soft); overflow-wrap: anywhere; }
.d-src.live { font-size: 22px; line-height: 1.28; color: var(--fg); }
.d-tr { font-size: 22px; line-height: 1.24; font-weight: 500; letter-spacing: -.01em; overflow-wrap: anywhere; margin-top: 2px; }
.d-card.last .d-tr { font-size: 34px; line-height: 1.14; letter-spacing: -.015em; }
.d-tr.wait { color: var(--soft); font-weight: 400; }
.d-card.last .d-tr.wait { font-size: 22px; }
:lang(ja) .d-tr, :lang(zh) .d-tr, :lang(ko) .d-tr, .d-tr:lang(ja), .d-tr:lang(zh), .d-tr:lang(ko) { line-height: 1.38; letter-spacing: 0; }
.d-tr:lang(ar), .d-tr:lang(fa) { line-height: 1.5; letter-spacing: 0; }
.d-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0 2px; margin-inline-start: -12px; }
.d-row.small .word { font-size: 15px; }
.d-row.between { justify-content: space-between; flex-wrap: nowrap; margin-inline: 0; gap: 8px; }
.d-card .word { padding: 0 12px; }
.word.main { color: var(--fg); font-weight: 500; }
.d-mark { margin-top: 8px; padding-top: 10px; border-top: 1.5px solid var(--fg); }
.d-mark .mark-lead { margin-bottom: 4px; }
.d-banner { flex: none; margin: 0; padding: 8px 24px; background: var(--list); color: var(--kop); }
.d-foot { flex: none; padding: 0 8px calc(10px + var(--safe-bottom)); background: var(--list); color: var(--fg); }
.d-pair { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; min-width: 0; padding: 0 12px; font-size: 16px; color: var(--fg); white-space: nowrap; overflow: hidden; flex: 0 1 auto; }
.d-pair span { overflow: hidden; text-overflow: ellipsis; }
.d-arrow { color: var(--soft); flex: none; }
.mic-row { gap: 4px; }
.mic-row .word { flex: 0 1 auto; min-width: 48px; padding: 0 6px; text-align: center; justify-content: center; line-height: 1.15; overflow-wrap: anywhere; }
.d-mic {
  flex: 1 0 auto; max-width: 64%; min-height: 72px; padding: 6px 8px; border-radius: 36px; background: var(--fg); color: var(--bg); font-size: 20px; overflow-wrap: anywhere; font-weight: 500; line-height: 1.1; text-align: center; touch-action: none;
  transition: background .12s linear, color .12s linear, box-shadow .12s linear;
}
.d-mic.on { background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 3px var(--fg); }
.clip-temp { position: fixed; left: -1000px; top: 0; width: 10px; height: 10px; opacity: 0; }
.copy-area { user-select: text; -webkit-user-select: text; margin-top: 10px; }

/* История */
.history .band-body { padding-bottom: calc(10px + var(--safe-bottom)); }
.hist-list { margin-bottom: 4px; }
.hist-row { display: block; width: 100%; min-height: 64px; padding: 10px 0; text-align: start; }
.hist-row + .hist-row { border-top: 1px solid var(--hl); }
.hist-meta { display: block; font-size: 15px; line-height: 1.3; color: var(--soft); }
.hist-first { display: block; margin-top: 2px; font-size: 19px; line-height: 1.28; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-q { font-size: 20px; font-weight: 400; border-bottom: 2px solid var(--fg); flex: none; min-height: 52px; }
.hist-q::-webkit-search-cancel-button { display: none; }
.hist-tail .word { color: var(--soft); padding-inline: 0; }
.word.armed { color: var(--fg); font-weight: 500; }
.hist-head { flex: none; padding-bottom: 8px; }
.hist-body { margin: 0 -24px; padding: 4px 24px 12px; }
.hist-entry { padding: 8px 0; }
.hist-entry .word { padding-inline: 0; }
.hist-tr { font-size: 20px; line-height: 1.28; font-weight: 500; overflow-wrap: anywhere; margin-top: 2px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.hist-foot { flex: none; margin-inline: -12px; }

/* Движение отключено: свет переключается сразу, состояние несут слова. */
@media (prefers-reduced-motion: reduce) {
  .half, .pair, .pair span, .foot, .big-box, .mode-switch, .d-mic, .ctl, .ctl.main .ic { transition: none; }
  .ctl, .ctl .ic, .ctl .ic * { animation: none !important; }
}
