/* Fahrplan A2 — расписание отправлений как образ: жёлтый лист, строки «время, блок, состояние». */
@font-face { font-family: 'Fira Sans'; font-weight: 400; font-display: swap; src: url(../fonts/fs-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans'; font-weight: 400; font-display: swap; src: url(../fonts/fs-cyrillic-400.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans'; font-weight: 500; font-display: swap; src: url(../fonts/fs-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans'; font-weight: 500; font-display: swap; src: url(../fonts/fs-cyrillic-500.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans'; font-weight: 700; font-display: swap; src: url(../fonts/fs-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans'; font-weight: 700; font-display: swap; src: url(../fonts/fs-cyrillic-700.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans Condensed'; font-weight: 600; font-display: swap; src: url(../fonts/fsc-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans Condensed'; font-weight: 600; font-display: swap; src: url(../fonts/fsc-cyrillic-600.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans Condensed'; font-weight: 700; font-display: swap; src: url(../fonts/fsc-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans Condensed'; font-weight: 700; font-display: swap; src: url(../fonts/fsc-cyrillic-700.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --ink: #1B1D1F; --paper: #FFFFFF; --bg: #F1F2EF; --line: #D9DBD6; --muted: #5B6066;
  --yellow: #FFD400; --on-yellow: #1B1D1F;
  --red: #D5281B; --green: #1E8E5A; --orange: #BF5600; --amber: #B86E00; --amber-fill: #F2A900; --blue: #2B5FD9;
  --red-bg: #FCEBE9; --green-bg: #E6F4EC; --amber-bg: #FFF4D9; --blue-bg: #E9EFFC; --read-bg: rgba(255, 140, 0, .16); --read-word: #FF8A00;
  --sans: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --cond: 'Fira Sans Condensed', 'Fira Sans', system-ui, sans-serif;
  --ch-a: #2B5FD9; --ch-b: #D98F00;
  --tab-h: 64px; --tab-gap: 8px;
  /* вид «стекло и плитки»: содержимое — на бумажных плитках, управление — на стекле */
  --tile: var(--paper); --r-tile: 22px; --r-ctl: 14px;
  --well: rgba(118, 118, 128, .12); --well-2: rgba(118, 118, 128, .2);
  --raise: #FFFFFF;
  --sh-tile: 0 0 0 .5px rgba(0, 0, 0, .05), 0 1px 2px rgba(0, 0, 0, .04), 0 10px 26px -16px rgba(0, 0, 0, .24);
  --sh-raise: 0 0 0 .5px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .1), 0 3px 8px -3px rgba(0, 0, 0, .14);
  --sh-ink: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 18px -8px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .14);
  --bottom: calc(var(--tab-h) + var(--tab-gap) + env(safe-area-inset-bottom));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --ink: #ECEDEA; --paper: #1D2022; --bg: #141617; --line: #33383B; --muted: #9BA1A6;
    --red: #FF6B5E; --green: #4CC38A; --orange: #FF9A3D; --amber: #FFB84D; --amber-fill: #FFB84D; --blue: #7FA6FF;
    --red-bg: #3A1F1C; --green-bg: #17302A; --amber-bg: #3A2E12; --blue-bg: #1C2740; --read-bg: rgba(255, 159, 10, .24); --read-word: #FF9F0A;
    --ch-a: #5F8FF0; --ch-b: #B98316;
    --well: rgba(118, 118, 128, .24); --well-2: rgba(118, 118, 128, .34); --raise: #3A3D41;
    --sh-tile: 0 0 0 .5px rgba(255, 255, 255, .07), 0 10px 26px -16px rgba(0, 0, 0, .7);
    --sh-raise: inset 0 1px 0 rgba(255, 255, 255, .09), 0 0 0 .5px rgba(255, 255, 255, .06), 0 2px 6px rgba(0, 0, 0, .45);
    --sh-ink: 0 0 0 .5px rgba(255, 255, 255, .1), 0 8px 18px -8px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
  --ink: #ECEDEA; --paper: #1D2022; --bg: #141617; --line: #33383B; --muted: #9BA1A6;
  --red: #FF6B5E; --green: #4CC38A; --orange: #FF9A3D; --amber: #FFB84D; --amber-fill: #FFB84D; --blue: #7FA6FF;
  --red-bg: #3A1F1C; --green-bg: #17302A; --amber-bg: #3A2E12; --blue-bg: #1C2740; --read-bg: rgba(255, 159, 10, .24); --read-word: #FF9F0A;
  --ch-a: #5F8FF0; --ch-b: #B98316;
  --well: rgba(118, 118, 128, .24); --well-2: rgba(118, 118, 128, .34); --raise: #3A3D41;
  --sh-tile: 0 0 0 .5px rgba(255, 255, 255, .07), 0 10px 26px -16px rgba(0, 0, 0, .7);
  --sh-raise: inset 0 1px 0 rgba(255, 255, 255, .09), 0 0 0 .5px rgba(255, 255, 255, .06), 0 2px 6px rgba(0, 0, 0, .45);
  --sh-ink: 0 0 0 .5px rgba(255, 255, 255, .1), 0 8px 18px -8px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.45 var(--sans); overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }   /* удержание кнопки (выбор нескольких, папки) не выделяет текст */
/* меню и выбор папок снизу: удержание строки — выбор нескольких, а не выделение текста; поле названия папки остаётся обычным */
.asheet, .selbar { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.asheet input, .asheet textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
button, a, input, select, summary { touch-action: manipulation; }
summary { cursor: pointer; padding: 8px 0; font-weight: 500; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--cond); font-weight: 700; margin: 0; line-height: 1.15; }
h2 { font-size: 24px; margin: 28px 0 10px; }
h3 { font-size: 19px; margin: 20px 0 6px; }
p { margin: 0 0 10px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

#app { --app-w: 560px; max-width: var(--app-w); margin: 0 auto; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); min-height: 100vh; min-height: 100dvh; background: var(--bg); position: relative; }
.view { padding: 0 16px calc(var(--bottom) + 28px); }
.view.flush { padding-left: 0; padding-right: 0; }
.pad { padding-left: 16px; padding-right: 16px; }
.top { padding: calc(18px + env(safe-area-inset-top)) 16px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top h1 { font-size: 32px; letter-spacing: -.01em; }

/* нижние вкладки: стеклянная капсула парит над содержимым; выбранная — приподнятая капля, как в плеере */
.tabs { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-gap) + env(safe-area-inset-bottom)); z-index: 20; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); pointer-events: none; }
.tabs-in { pointer-events: auto; position: relative; max-width: 536px; margin: 0 auto; height: var(--tab-h); border-radius: 32px; padding: 6px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, .72); position: relative; padding: 0; border-radius: 26px; transition: background .2s, color .2s; }
.tab svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab:active { background: rgba(255, 255, 255, .12); }
.tab[aria-current=page] { color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .27), rgba(255, 255, 255, .13));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .36), inset 0 0 0 .5px rgba(255, 255, 255, .18); }
.tab .dot { position: absolute; top: 2px; left: calc(50% + 9px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px rgba(40, 40, 40, .85); }

/* жёлтый лист «DicDic» */
.sheet { background: linear-gradient(180deg, #FFDA1F, var(--yellow)); color: var(--on-yellow); padding: calc(16px + env(safe-area-inset-top)) 16px 18px; border-radius: 0 0 30px 30px;
  box-shadow: 0 12px 30px -18px rgba(150, 110, 0, .55), inset 0 -1px 0 rgba(0, 0, 0, .05); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sheet h1 { font-size: 40px; letter-spacing: -0.01em; }
.sheet .date { font-family: var(--cond); font-weight: 600; font-size: 17px; text-align: right; }
.sheet .stage { margin-top: 12px; font-weight: 700; font-size: 19px; line-height: 1.25; }
.sheet .meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; align-items: center; }
.sheet .gear { border: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; padding: 0; margin: -4px -4px -4px 0; color: var(--on-yellow);
  background: rgba(255, 255, 255, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 3px rgba(120, 90, 0, .25); }
.sheet .gear svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; display: block; }
.delay { display: inline-block; background: var(--on-yellow); color: var(--yellow); font-family: var(--cond); font-weight: 700; padding: 1px 8px; border-radius: 3px; }
.prog { height: 6px; background: rgba(27, 29, 31, .16); margin-top: 12px; position: relative; border-radius: 3px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); }
.prog i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--on-yellow); border-radius: 3px; }
.prog b { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--on-yellow); }

/* строки расписания */
.board { background: var(--tile); margin: 14px 12px 0; border-radius: var(--r-tile); box-shadow: var(--sh-tile); overflow: hidden; }
.row { display: grid; grid-template-columns: 62px 1fr auto; gap: 0 10px; padding: 13px 16px; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; align-items: start; }
.row:first-child { border-top: 0; }
.row .time { font-family: var(--cond); font-weight: 700; font-size: 23px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.row .time s { display: block; font-size: 14px; font-weight: 600; color: var(--muted); }
.row .name { font-weight: 700; font-size: 18px; line-height: 1.25; }
.row .what { color: var(--muted); font-size: 15px; margin-top: 2px; }
.row .stat { font-family: var(--cond); font-weight: 700; font-size: 16px; white-space: nowrap; padding-top: 3px; text-align: right; }
.row.done .name, .row.done .time { color: var(--muted); }
.row.skip .name, .row.skip .time { text-decoration: line-through; color: var(--muted); }
.stat.ok { color: var(--green); } .stat.late { color: var(--red); } .stat.now { color: var(--ink); background: var(--yellow); color: var(--on-yellow); padding: 3px 9px 1px; border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); } .stat.wait { color: var(--muted); font-weight: 600; }
.detail { background: var(--paper); border-top: 1px solid var(--line); padding: 4px 16px 14px 88px; }
.bmore { margin-top: 6px; border-top: 1px solid var(--line); }
.bmore > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: 15px; cursor: pointer; }
.bmore > summary::-webkit-details-marker { display: none; }
.bmore > summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -3px 0 0 2px; transition: transform .2s; }
.bmore[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.bmore .inline { border-top: 0; padding: 2px 0 8px; }
.bmore-acts { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.item .box { flex: none; width: 24px; height: 24px; border: 2px solid var(--ink); border-radius: 7px; background: none; padding: 0; margin-top: 1px; display: grid; place-items: center; }
.item .box.on { background: var(--ink); }
.item .box.on::after { content: ''; width: 11px; height: 6px; border-left: 2.5px solid var(--paper); border-bottom: 2.5px solid var(--paper); transform: rotate(-45deg) translate(1px, -1px); }
.item .box.auto { border-color: var(--line); } .item .box.auto.on { background: var(--green); border-color: var(--green); }
.item .txt { flex: 1; font-size: 16px; }
.item.done .txt { color: var(--muted); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* кнопки: приподнятые капли; главная — тёмная, второстепенная — утопленная */
.btn { border: 0; background: var(--raise); color: var(--ink); border-radius: var(--r-ctl); padding: 10px 18px; font-weight: 600; font-size: 16px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  box-shadow: var(--sh-raise); transition: transform .12s, box-shadow .12s; }
.btn.pri { background: var(--ink); color: var(--paper); box-shadow: var(--sh-ink); }
.btn.yel { background: linear-gradient(180deg, #FFDD33, var(--yellow)); color: var(--on-yellow); box-shadow: 0 1px 2px rgba(0, 0, 0, .16), 0 8px 18px -8px rgba(170, 130, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .55); }
.btn.sm { min-height: 36px; padding: 6px 13px; font-size: 15px; border-radius: 12px; }
.btn.ghost { background: var(--well); box-shadow: none; font-weight: 500; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; }
.btn:active { transform: scale(.97); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; background: var(--well); border-radius: 999px; padding: 7px 15px; font-weight: 500; font-size: 15px; min-height: 38px; color: var(--ink); transition: background .15s; }
.chip.on { background: var(--ink); color: var(--paper); box-shadow: var(--sh-ink); }

/* блоки и заметки */
.box-card { background: var(--tile); border: 0; border-radius: var(--r-tile); padding: 14px 16px; margin: 12px 0; box-shadow: var(--sh-tile); }
.box-card h3 { margin-top: 0; }
.notice { --acc: var(--muted); background: var(--tile); border: 0; border-radius: 18px; padding: 12px 14px 12px 18px; margin: 10px 0; font-size: 15.5px; box-shadow: inset 5px 0 0 var(--acc), var(--sh-tile); }
.notice.gap, .notice.miss, .notice.warn { --acc: var(--red); }
.notice.load { --acc: var(--amber-fill); }
.notice.ok, .notice.fit { --acc: var(--green); }
.notice .when { color: var(--muted); font-size: 13.5px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.big { font-family: var(--cond); font-weight: 700; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.trio > div { background: var(--tile); border: 0; border-radius: 20px; padding: 12px 12px 11px; box-shadow: var(--sh-tile); }
.trio .lbl { font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.2; }
.c-learn { color: var(--amber); } .c-rev { color: var(--green); } .c-new { color: var(--blue); } .c-bad { color: var(--red); }

/* карточка */
.study { display: flex; flex-direction: column; min-height: calc(100vh - var(--tab-h) - env(safe-area-inset-bottom)); min-height: calc(100dvh - var(--tab-h) - env(safe-area-inset-bottom)); }
.study-top { padding: calc(10px + env(safe-area-inset-top)) 16px 8px; display: flex; align-items: center; gap: 14px; font-family: var(--cond); font-weight: 700; font-size: 19px; }
.study-top .sp { flex: 1; }
.study-top { gap: 16px; }
.cnt2 { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; min-width: 30px; }
.cnt2 b { font: 700 20px/1 var(--cond); }
.cnt2 small { font: 500 11px/1.2 var(--sans); color: var(--muted); margin-top: 3px; letter-spacing: .01em; }
.study-top .icon { border: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; padding: 0; margin: -4px 0; color: var(--ink); background: var(--raise); box-shadow: var(--sh-raise); }
.study-top .icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.study-top .icon:disabled { color: var(--line); box-shadow: none; background: var(--well); }
.face { flex: 1; background: var(--tile); margin: 4px 12px 12px; border-radius: 26px; box-shadow: var(--sh-tile); padding: 18px 18px 22px; display: flex; flex-direction: column; }
.face .kind { font-size: 14.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--ink); }
.tag.new { background: var(--blue-bg); color: var(--blue); } .tag.ch { background: var(--red-bg); color: var(--red); }
.q { font-size: 27px; font-weight: 500; line-height: 1.22; margin: 18px 0 6px; overflow-wrap: anywhere; }
.q.de, .a .de { font-weight: 700; }
.a { border-top: 2px solid var(--ink); margin-top: 16px; padding-top: 14px; }
.a .de { font-size: 29px; line-height: 1.2; overflow-wrap: anywhere; }
.a .ru { font-size: 22px; font-weight: 500; }
.a .forms { color: var(--muted); margin-top: 4px; }
.a .ex { margin-top: 14px; padding-left: 12px; border-left: 3px solid var(--yellow); }
.a .ex i { font-style: normal; color: var(--muted); display: block; font-size: 15.5px; }
.a .note { margin-top: 12px; font-size: 15.5px; background: var(--well); border-radius: 14px; padding: 10px 13px; }
.a .pat { margin-top: 10px; font-family: var(--cond); font-weight: 600; font-size: 18px; }
.subs { margin-top: 12px; display: grid; gap: 8px; }
.sub { border: 0; border-radius: 14px; padding: 10px 13px; background: var(--well); text-align: left; width: 100%; }
.sub b { display: block; margin-top: 3px; font-size: 18px; }
.say { border: 0; background: var(--raise); box-shadow: var(--sh-raise); border-radius: 50%; width: 44px; height: 44px; display: inline-grid; place-items: center; flex: none; color: var(--ink); padding: 0; }
.say svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.line-say { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dock { padding: 10px; margin: 0 12px; border-radius: 28px; position: sticky; bottom: calc(var(--bottom) + 10px); z-index: 4; }
.dock .small.muted { color: rgba(255, 255, 255, .72); }
.rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rate button { border: 0; border-radius: 18px; padding: 9px 2px 8px; min-height: 60px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 6px rgba(0, 0, 0, .25); font-weight: 700; font-size: 16px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.rate small { font-weight: 500; font-size: 12.5px; opacity: .92; margin-top: 3px; }
.rate .g1 { background: #C22A1E; } .rate .g2 { background: #8F5A00; } .rate .g3 { background: #1B7F50; } .rate .g4 { background: #2553C4; }
.anchor { margin-top: 12px; }
.anchor textarea, .field textarea, .field input, .field select { width: 100%; border: 0; border-radius: 13px; background: var(--well); padding: 10px 12px; }
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-weight: 500; margin-bottom: 4px; }
.field small { display: block; color: var(--muted); margin-top: 4px; font-size: 14px; }
/* поле, которое только что заполнил ИИ (⟳ в «Изменить слово»): на миг подсвечено жёлтым */
.field .aifill { animation: aifill 1.4s ease-out; }
@keyframes aifill { from { background: color-mix(in srgb, var(--yellow) 45%, var(--well)); } to { background: var(--well); } }
@media (prefers-reduced-motion: reduce) { .field .aifill { animation: none; } }
.modal-head .nredo { margin: -4px 0; }
.inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.inline:first-of-type { border-top: 0; }
.inline input[type=time], .inline select, .inline input[type=number], .inline input[type=date] { border: 0; border-radius: 12px; background: var(--well); padding: 7px 10px; min-height: 40px; }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--line); position: relative; flex: none; border: 0; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); transition: transform .15s; }
.switch:checked { background: var(--green); } .switch:checked::after { transform: translateX(20px); }
.empty { padding: 34px 20px; text-align: center; }
.empty .big { font-size: 26px; margin-bottom: 10px; }

/* курс */
.stages { margin: 14px 12px 0; border-radius: var(--r-tile); background: var(--tile); box-shadow: var(--sh-tile); overflow: hidden; }
.stage-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 0 10px; align-items: center; padding: 12px 16px; border: 0; border-top: 1px solid var(--line); background: var(--paper); width: 100%; text-align: left; }
.stage-row:first-child { border-top: 0; }
.stage-row .n { font-family: var(--cond); font-weight: 700; font-size: 26px; }
.stage-row.cur { box-shadow: inset 6px 0 0 var(--yellow); }
.stage-row.past .n { color: var(--green); }
.stage-row .t { font-weight: 500; line-height: 1.25; }
.stage-row .s { font-size: 14px; color: var(--muted); }
.meter { height: 5px; background: var(--well-2); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--green); }
.frame { border-top: 1px solid var(--line); padding: 10px 0; }
.frame .de { font-weight: 700; }
.frame .ru { color: var(--muted); font-size: 15.5px; }
.timer { font-family: var(--cond); font-weight: 700; font-size: 76px; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; margin: 14px 0 6px; }
.timer.over { color: var(--red); }
.isl-lines { margin: 8px 0 0; padding: 0; list-style: none; }
.isl-lines li { padding: 7px 0; border-top: 1px solid var(--line); }
.isl-lines li:first-child { border-top: 0; }
.isl-lines small { display: block; color: var(--muted); }

/* контроль */
.chart { width: 100%; height: auto; display: block; }
.chart text { font: 500 11px var(--sans); fill: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal div { aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 500; background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.cal .full { background: var(--green); border-color: var(--green); color: #fff; }
.cal .part { background: var(--amber-bg); border-color: var(--amber-fill); color: var(--ink); }
.cal .miss { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.cal .pause { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }
.cal .today { border: 2px solid var(--ink); color: var(--ink); }
.cal .none, .cal .future { background: none; border-style: dashed; }
.cal .hd { border: 0; background: none; aspect-ratio: auto; font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.stbar { display: grid; grid-template-columns: 30px 1fr 44px; gap: 8px; align-items: center; font-size: 14.5px; padding: 3px 0; }
.stbar .meter { margin: 0; height: 8px; }
.meter i.lo { background: var(--red); } .meter i.mid { background: var(--amber-fill); }

/* лист поверх экрана: как лист слова в читалке — ручка сверху, тянется вниз, без крестика */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .32); display: flex; align-items: flex-end; justify-content: center; animation: fp-fade .2s ease-out; }
.modal-in { position: relative; background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; border-radius: 28px 28px 0 0; padding: 0 16px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .22); animation: fp-up .34s cubic-bezier(.2, .9, .25, 1); }
.modal-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--bg); margin: 0 -16px; padding: 22px 16px 10px; z-index: 2; touch-action: none; cursor: grab; }
.modal-head::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--well-2); }
.modal-head h2 { margin: 0; font-size: 24px; }
/* крестик остаётся для клавиатуры и чтения с экрана: виден, только когда на нём фокус */
.modal-head .x { position: absolute; right: 10px; top: 14px; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.modal-head .x:focus-visible { width: auto; height: auto; clip-path: none; overflow: visible; }
.x { border: 0; background: none; font-size: 30px; line-height: 1; padding: 4px 10px; color: var(--ink); }
.modal-in.dragging { transition: none !important; }
@keyframes fp-fade { from { background-color: rgba(0, 0, 0, 0); } }   /* темнеет только фон, лист сразу непрозрачный */
@keyframes fp-up { from { transform: translateY(40%); } }
.toast { pointer-events: none; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom) + 14px); padding: 11px 18px; border-radius: 20px; z-index: 60; font-size: 15px; max-width: 88%; text-align: center; animation: fp-toast .25s cubic-bezier(.2, .9, .25, 1); }
@keyframes fp-toast { from { opacity: 0; transform: translate(-50%, 10px) scale(.96); } }
ol.steps { padding-left: 22px; margin: 8px 0; } ol.steps li { margin: 6px 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* вход и регистрация */
.segs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 15px; background: var(--well); margin-bottom: 10px; }
.seg { border: 0; background: none; padding: 8px 4px; font-weight: 600; font-size: 15.5px; color: var(--muted); position: relative; min-height: 38px; border-radius: 12px; transition: background .15s, color .15s; }
.seg.on { color: var(--ink); background: var(--raise); box-shadow: var(--sh-raise); }
.err { color: var(--red); min-height: 0; margin: 6px 0 8px; font-size: 15.5px; }
.err:empty { display: none; }
/* страница входа и регистрации (владелец, 16.11): жёлтая плитка с названием, бумажная плитка с формой — бенто;
   переключатель и «глаз» приподняты (неоморфизм), поля — утопленные «таблетки»; без вкладок внизу */
.authpage { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 24px) 16px calc(env(safe-area-inset-bottom) + 24px); }
.ahero { border-radius: var(--r-tile); padding: 22px 22px 20px; color: var(--on-yellow);
  background: radial-gradient(120% 140% at 0% 0%, #FFE866 0%, var(--yellow) 48%, #F2C500 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 16px 34px -20px rgba(150, 110, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -1px 0 rgba(0, 0, 0, .06); }
.ahero h1 { font-size: 21px; font-weight: 600; line-height: 1.2; }
.ahero .abrand { display: block; font-size: 54px; font-weight: 800; letter-spacing: -.5px; line-height: 1.05; margin-top: 2px; }
.acard { background: var(--tile); border-radius: var(--r-tile); padding: 14px 16px 10px; box-shadow: var(--sh-tile); }
.acard .segs { border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.acard .seg { border-radius: 999px; min-height: 42px; font-size: 16px; }
.afield { display: flex; flex-direction: column; }
.afield label { padding-left: 20px; margin-bottom: 6px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.afield input { width: 100%; height: 52px; border: 0; border-radius: 999px; padding: 0 20px; background: var(--well); font-size: 17px;
  -webkit-appearance: none; appearance: none; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .08); transition: box-shadow .15s; }
.afield input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.afield.bad input { box-shadow: inset 0 0 0 1.5px var(--red); }
.afield.bad input:focus { box-shadow: inset 0 0 0 2px var(--red); }
/* строка ошибки под полем: место оставлено заранее — появилась ошибка, поля не сдвинулись */
.amsg { min-height: 20px; margin: 5px 0 8px; padding-left: 20px; font-size: 14px; line-height: 20px; color: var(--red); }
.apw { position: relative; }
.apw input { padding-right: 58px; }
.aeye { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--raise); color: var(--muted); box-shadow: var(--sh-raise); }
.aeye svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.aeye[aria-pressed=true] { color: var(--ink); }
.acard .btn.pri { min-height: 54px; border-radius: 999px; font-size: 17px; margin-top: 2px; }
.aform-msg { min-height: 20px; margin: 10px 0 2px; text-align: center; font-size: 14px; line-height: 20px; color: var(--red); }

/* словарь: строки как в расписании, слева полоса рода */
.topacts { display: flex; gap: 8px; align-items: center; }
.icon-btn { border: 0; background: var(--raise); box-shadow: var(--sh-raise); border-radius: 50%; width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; color: var(--ink); font-weight: 700; flex: none; }
.icon-btn.sm { width: 34px; height: 34px; }
/* «Тренировка» в шапке словаря — круглая кнопка без счётчика */
.icon-btn.drillb[hidden] { display: none; }
.icon-btn.viewb.on { background: var(--ink); color: var(--paper); box-shadow: var(--sh-ink); }
/* строка «Фильтр: …» над списком словаря: нажатие — меню сортировки и фильтра, ✕ — сбросить фильтры */
/* лист слова: заголовок, словарная форма и перевод копируются нажатием — строка на миг подсвечивается */
.copyable { cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 8px; }
.copyable.copied { animation: copied .7s ease-out; }
@keyframes copied { from { background: var(--well); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .copyable.copied { animation: none; } }
.icon-btn.addtext svg { stroke-width: 2.2; }
.icon-btn:disabled { opacity: .35; }
.icon-btn svg, .ic svg, .dbtn svg, .fab svg, .sic svg, .wchk svg, .tchip svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.icon-btn svg { width: 22px; height: 22px; }
.ic { display: inline-block; } .ic svg { width: 18px; height: 18px; }
.btn .ic { margin-left: -2px; }
/* поиск словаря: поднятый вверх стоит на месте и висит в воздухе, как панель вкладок внизу (владелец, 17.11) — без
   полосы фона, сверху и снизу по 8 (было 2 и 8: сверху сливался со строкой телефона); прижат — стекло, как у панели.
   margin-top −6: в начале страницы поле стоит там же, где стояло */
.dsearch { position: sticky; top: 0; z-index: 5; padding: 8px 16px; margin-top: -6px; pointer-events: none; }
.dsearch > * { pointer-events: auto; }
.dsearch input { width: 100%; border: 0; border-radius: 999px; background: var(--well); padding: 9px 12px 9px 44px; min-height: 52px; font-size: 17px; -webkit-appearance: none; appearance: none;
  transition: background-color .2s, box-shadow .2s, color .2s; }
.dsearch .sic { position: absolute; left: 32px; top: 24px; color: var(--muted); pointer-events: none; z-index: 1; }   /* над стеклом поля */
.dsearch .sclr { top: 14px; z-index: 1; }
.dsearch.stuck input { color: #fff; background-color: rgba(40, 40, 40, .75);
  -webkit-backdrop-filter: blur(30px) saturate(150%) contrast(69%); backdrop-filter: blur(30px) saturate(150%) contrast(69%);
  box-shadow: 0 20px 44px -12px rgba(0, 0, 0, .4), 0 3px 10px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .26), inset 0 -1px 0 rgba(255, 255, 255, .06), inset 0 0 0 .5px rgba(255, 255, 255, .14); }
.dsearch.stuck input::placeholder { color: rgba(255, 255, 255, .55); }
.dsearch.stuck .sic { color: rgba(255, 255, 255, .62); }
.dsearch.stuck .sclr span { background: rgba(255, 255, 255, .3); }
@media (prefers-reduced-transparency: reduce) { .dsearch.stuck input { background-color: rgb(40, 40, 44); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.dsearch .sic svg { width: 20px; height: 20px; }
.dsearch input { padding-right: 44px; }
input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
/* «×» в поле поиска: серый круг с белым крестиком, нажимать можно на 40×40 вокруг него */
.sclr { position: absolute; right: 22px; top: 8px; width: 40px; height: 40px; border: 0; background: none; padding: 0; display: grid; place-items: center; cursor: pointer; }
.sclr[hidden] { display: none; }
.sclr span { width: 24px; height: 24px; border-radius: 50%; background: rgba(60, 60, 67, .5); color: #fff; display: grid; place-items: center; transition: transform .12s; }
.sclr svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.sclr:active span { transform: scale(.88); }
.sclr:focus-visible span { outline: 2px solid var(--blue); outline-offset: 2px; }
[data-theme=dark] .sclr span { background: rgba(235, 235, 245, .45); color: #1C1C1E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .sclr span { background: rgba(235, 235, 245, .45); color: #1C1C1E; } }
.dchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.dchips::-webkit-scrollbar { display: none; }
.dchips .chip, .wfold .chip { white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 6px; }
.chip .cnt { color: var(--muted); font-size: 13.5px; font-weight: 500; } .chip.on .cnt { color: inherit; opacity: .7; }
.chip.add { background: none; box-shadow: inset 0 0 0 1.5px var(--well-2); color: var(--muted); }
.chip.sm { min-height: 32px; padding: 4px 11px; font-size: 14.5px; }
.chip.static { cursor: default; }
.fdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--fc); flex: none; }
/* цвета папок: --fc — насыщенный (светлая тема, точки), --fn — неоновый (тёмная тема и стеклянные меню) */
.fc0 { --fc: #2B5FD9; --fn: #6E9BFF; } .fc1 { --fc: #1E8E5A; --fn: #3EE08F; } .fc2 { --fc: #C77F00; --fn: #FFC145; } .fc3 { --fc: #8E44AD; --fn: #C58BFF; }
.fc4 { --fc: #D5281B; --fn: #FF6B5E; } .fc5 { --fc: #0E8A8A; --fn: #2EE6D6; } .fc6 { --fc: #6B7178; --fn: #B8C0C8; } .fc7 { --fc: #C2185B; --fn: #FF5FA2; }
.fc8 { --fc: #5C8A00; --fn: #B5F04A; } .fc9 { --fc: #D35400; --fn: #FF9248; } .fc10 { --fc: #0277BD; --fn: #4FC3F7; } .fc11 { --fc: #9A7F00; --fn: #FFE45C; }
/* пилюля папки: название горит цветом папки, фон — тот же цвет, приглушённый; без ободка, как остальные; выбранная — фон ярче */
.fchip, .fcsw { --ft: var(--fc); }
:root[data-theme=dark] .fchip, :root[data-theme=dark] .fcsw, .glass .fchip, .glass .fcsw { --ft: var(--fn); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .fchip, :root:not([data-theme=light]) .fcsw { --ft: var(--fn); } }
.chip.fchip, .glass .chip.fchip { color: var(--ft); background: color-mix(in srgb, var(--ft) 14%, transparent); box-shadow: none; }
.chip.fchip .cnt { color: inherit; opacity: .7; }
.chip.fchip.on, .glass .chip.fchip.on { color: var(--ft); background: color-mix(in srgb, var(--ft) 32%, transparent); box-shadow: none; }
.wsh-f.fchip { color: var(--ft); background: color-mix(in srgb, var(--ft) 14%, transparent); border-radius: 999px; padding: 2px 9px; font-weight: 600; }
/* настройки папки: строка «Цвет» и квадратик выбранного цвета справа; нажатие — окно выбора цвета */
.fsh-t { display: flex; justify-content: center; padding-top: 14px; }
.fsh-t .chip { font-size: 17px; min-height: 40px; padding: 8px 18px; }
.aitem.fcrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fcsw { width: 30px; height: 30px; border-radius: 8px; flex: none; background: var(--fh, var(--ft)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
/* окно выбора цвета (colorpick.js): поверх всех меню; «Сетка» — квадратики, «Спектр» — поле с меткой */
.cpk { position: fixed; inset: 0; z-index: 58; background: rgba(0, 0, 0, .34); display: flex; align-items: flex-end; justify-content: center; animation: fp-fade .18s ease-out; }
.cpk-in { position: relative; width: calc(100% - 16px); max-width: 440px; margin: 0 8px calc(8px + env(safe-area-inset-bottom)); padding: 12px 14px 16px; border-radius: 26px; animation: fp-up .3s cubic-bezier(.2, .9, .25, 1); user-select: none; -webkit-user-select: none; }
.cpk-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin-bottom: 10px; }
.cpk-now { width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.cpk-t { text-align: center; font-weight: 600; font-size: 17px; }
.cpk-x { justify-self: end; width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; background: rgba(118, 118, 128, .32); color: rgba(255, 255, 255, .85); display: grid; place-items: center; cursor: pointer; }
.cpk-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.glass .cpk-segs { background: rgba(118, 118, 128, .24); margin-bottom: 14px; border-radius: 999px; }
.glass .cpk-segs .seg { color: rgba(255, 255, 255, .88); border-radius: 999px; font-size: 16px; }
.glass .cpk-segs .seg.on { background: rgba(255, 255, 255, .24); color: #fff; box-shadow: none; }
.cpk-grid { display: grid; grid-template-columns: repeat(12, 1fr); border-radius: 12px; overflow: hidden; }
.cpk-c { aspect-ratio: 1; border: 0; padding: 0; margin: 0; border-radius: 0; cursor: pointer; position: relative; }
.cpk-c.on { z-index: 1; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4.5px rgba(0, 0, 0, .85); border-radius: 4px; }
.cpk-spec { position: relative; aspect-ratio: 1.12; border-radius: 12px; touch-action: none; cursor: crosshair;
  background: linear-gradient(to right, #fff 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0) 50%, #000 100%),
    linear-gradient(to bottom, #f00 0%, #ff0 16.67%, #0f0 33.33%, #0ff 50%, #00f 66.67%, #f0f 83.33%, #f00 100%); }
.cpk-mark { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .4); }
.cpk [hidden] { display: none !important; }
/* «Новые слова»: слово уже в словаре — зелёная галочка в поле, кнопка «Уже в словаре» */
.inbox { position: relative; }
.inbox input { width: 100%; padding-right: 44px; }
.inok { position: absolute; right: 10px; top: 50%; transform: translateY(-50%) scale(.6); width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s, transform .15s; pointer-events: none; }
.inok svg, .okic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.inbox.has .inok { opacity: 1; transform: translateY(-50%) scale(1); }
.inbox.has input { box-shadow: inset 0 0 0 2px var(--green); }
.notice.ok { --acc: var(--green); }
.notice.ok .okic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #fff; vertical-align: -4px; margin-right: 6px; }
.btn.okbtn { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.okbtn .okic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; }
/* главные действия словаря: две плитки под заголовком */
.dacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 2px 12px 12px; }
.dacts .one { grid-column: 1 / -1; }
.atile { border: 0; text-align: left; font: inherit; color: var(--ink); background: var(--tile); box-shadow: var(--sh-tile); border-radius: 20px; padding: 12px 12px 12px 12px; min-height: 68px;
  display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; align-content: center; min-width: 0; }
.atile .aic { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--raise); box-shadow: var(--sh-raise); }
.atile .aic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.atile b { font-size: 17px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atile .asub { font-size: 13.5px; color: var(--muted); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atile.pri .aic { background: var(--yellow); color: var(--on-yellow); box-shadow: var(--sh-ink); }
.atile:active { transform: scale(.98); }
.atile:disabled { opacity: .45; }
.dbanner { background: var(--tile); border: 0; border-radius: 18px; padding: 12px 14px 12px 18px; margin: 0 0 12px; font-size: 15.5px; box-shadow: inset 5px 0 0 var(--yellow), var(--sh-tile); }
.dbl { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dbanner .meter i { background: var(--ink); }
.view.dict { padding-bottom: calc(var(--bottom) + 140px); }
.wlist { background: var(--tile); margin: 0 12px; border-radius: var(--r-tile); box-shadow: var(--sh-tile); overflow: hidden; }
.wrow { display: grid; grid-template-columns: 5px 1fr auto; gap: 0 12px; align-items: center; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; padding: 8px 16px 8px 0; min-height: 58px; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.wrow:first-child { border-top: 0; }
.wbar { align-self: stretch; background: var(--g, transparent); border-radius: 0 2px 2px 0; }
.g-der { --g: var(--blue); } .g-die { --g: var(--red); } .g-das { --g: var(--green); }
.wtx { min-width: 0; }
.wde { display: block; font-weight: 700; font-size: 17.5px; line-height: 1.25; overflow-wrap: anywhere; }
.wru { display: block; color: var(--muted); font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wmeta { display: flex; align-items: center; gap: 8px; }
.wtag { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); white-space: nowrap; }
.wtag.soft { background: var(--bg); color: var(--muted); font-weight: 500; }
.mem { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.mem.queued { border-color: var(--muted); background: radial-gradient(circle, var(--muted) 0 2px, transparent 2.5px); }
.mem.learn { background: var(--amber-fill); border-color: var(--amber-fill); }
.mem.ok { background: var(--green); border-color: var(--green); }
.mem.weak { background: var(--red); border-color: var(--red); }
.wchk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.wchk svg { width: 15px; height: 15px; stroke-width: 2.8; }
.wrow.on { background: var(--blue-bg); }
.wrow.on .wchk { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.dempty { padding: 26px 20px; text-align: center; color: var(--muted); }
.fab { position: fixed; right: max(calc(16px + env(safe-area-inset-right)), calc(50% - var(--app-w) / 2 + 16px)); bottom: calc(var(--bottom) + 14px); width: 60px; height: 60px; border-radius: 50%; border: 0; background: linear-gradient(180deg, #FFDF3D, var(--yellow) 60%, #F2C700); color: var(--on-yellow); display: grid; place-items: center; z-index: 15; padding: 0;
  box-shadow: 0 12px 26px -10px rgba(150, 110, 0, .7), 0 2px 6px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(0, 0, 0, .08); }
.fab:active { transform: scale(.95); }
.fab svg { width: 28px; height: 28px; stroke-width: 2.4; }
.selbar { position: fixed; left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); bottom: calc(var(--bottom) + 10px); z-index: 18; padding: 10px 12px 12px; max-width: 540px; margin: 0 auto; border-radius: 26px; }
.selhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .selhead b { flex: 1; }
.selacts { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, .8fr) 44px; gap: 8px; }
.selacts .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selacts .btn { padding-left: 6px; padding-right: 6px; }
.selacts .icon-btn { width: 44px; height: 36px; }

/* листы действий: стеклянное меню снизу, «Отмена» — отдельной каплей, как в iOS */
.asheet { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .28); display: flex; align-items: flex-end; justify-content: center; animation: fp-fade .18s ease-out; }
.asheet-in { width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; gap: 8px; padding: 0 8px calc(8px + env(safe-area-inset-bottom)); animation: fp-up .3s cubic-bezier(.2, .9, .25, 1); }
.agroup { position: relative; border-radius: 22px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.asheet-title { padding: 13px 18px 10px; font: 500 13.5px/1.3 var(--sans); color: rgba(255, 255, 255, .62); text-align: center; }
.aitem { display: block; width: 100%; text-align: left; border: 0; border-top: .5px solid rgba(255, 255, 255, .14); background: none; color: #fff; padding: 13px 18px; font-size: 17px; font-weight: 500; min-height: 52px; }
.agroup > .aitem:first-child { border-top: 0; }
.aitem:active, .fitem:active { background: rgba(255, 255, 255, .12); }
.aitem small { display: block; color: rgba(255, 255, 255, .6); font-size: 14px; font-weight: 400; margin-top: 1px; }
.aitem.danger { color: #FF7B6E; }
.aitem.cancel { position: relative; font-weight: 600; text-align: center; border: 0; border-radius: 22px; min-height: 56px; flex: none; }
.fitem { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-top: .5px solid rgba(255, 255, 255, .14); background: none; color: #fff; padding: 13px 18px; min-height: 52px; text-align: left; font-size: 17px; }
.fitem .muted { color: rgba(255, 255, 255, .6); }
.fitem .fname { flex: 1; font-weight: 500; }
.fitem:disabled { opacity: .5; }
.fitem.fadd { color: #FFD60A; } .fitem.fadd .fname { font-weight: 600; }
.fplus { width: 22px; height: 22px; display: grid; place-items: center; flex: none; }
.fplus svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.asheet [hidden] { display: none !important; }
/* выбор нескольких папок: удержание строки включает кружки с галочками, как в списке словаря */
/* кружок-отметка в выборе папок: пустой — не отмечено, белый с галочкой — отмечено */
.fchk { display: grid; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); place-items: center; color: transparent; flex: none; }
.fchk svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.fitem.on { background: rgba(255, 255, 255, .1); }
.fitem.on .fchk { background: #fff; border-color: #fff; color: #1C1C1E; }
.fplus.fcards svg { stroke-width: 1.9; stroke-linejoin: round; }
/* «Отмена» и «Готово» в один ряд; «Готово» неактивна, пока ничего не отмечено */
.abtns { display: flex; gap: 8px; flex: none; }
.abtns .aitem { flex: 1; position: relative; text-align: center; border: 0; border-radius: 22px; min-height: 56px; font-weight: 600; }
.aitem.aok { color: #FFD60A; }
.aitem.aok:disabled { color: rgba(255, 255, 255, .32); }
/* строка меню с ползунком: нажатие переключает, меню остаётся открытым */
.aitem.atog { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.atog-t { flex: 1; min-width: 0; }
.glass .switch:not(:checked) { background: rgba(120, 120, 128, .4); }
/* удаление смахиванием: текст о последствиях и красный ползунок, который нужно дотянуть вправо */
.sw-box .asheet-title { color: #fff; font-size: 17px; font-weight: 700; }
.sw-text { margin: 0; padding: 0 18px 10px; font-size: 15px; line-height: 1.4; color: rgba(235, 235, 245, .78); text-align: left; }
.sw-pad { padding: 6px 12px 14px; }
.sw-track { position: relative; height: 60px; border-radius: 30px; background: rgba(255, 69, 58, .16); overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
.sw-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 60px; border-radius: 30px; background: rgba(255, 69, 58, .38); }
.sw-label { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 52px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .82); pointer-events: none; }
.sw-knob { position: absolute; left: 4px; top: 4px; width: 52px; height: 52px; border-radius: 50%; border: 0; padding: 0; background: #FF453A; color: #fff; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); cursor: grab; touch-action: none; }
.sw-knob svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sw-knob:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.fnew { display: flex; gap: 8px; padding: 10px 14px 12px; border-top: .5px solid rgba(255, 255, 255, .14); }
.modal .fnew { padding: 0; border: 0; }
.fsent { display: grid; gap: 8px; }                              /* проверка шаблона на предложении: поле во всю ширину, кнопка под ним */
.fsent textarea { border: 0; border-radius: 12px; background: var(--well); padding: 8px 12px; font: inherit; }
.fsent .btn { justify-self: start; }
.fnew input { flex: 1; border: 0; border-radius: 12px; background: var(--well); padding: 8px 12px; min-height: 40px; min-width: 0; }
.glass .fnew input { background: rgba(255, 255, 255, .12); color: #fff; } .glass .fnew input::placeholder { color: rgba(255, 255, 255, .5); }
.dsetup { padding: 0 18px 12px; }
.drow { padding: 6px 0; } .drow .chips { margin-top: 6px; }

/* карточка слова */
.wtitle { font-size: 30px; overflow-wrap: anywhere; padding-right: 8px; }
.art { font-weight: 700; } .a-der { color: var(--blue); } .a-die { color: var(--red); } .a-das { color: var(--green); }
.whead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.wru2 { font-size: 21px; font-weight: 500; line-height: 1.3; }
.wsub { color: var(--muted); font-size: 15px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 3px; }
.wforms { color: var(--muted); margin-top: 6px; font-size: 16px; }
.wfold { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.note-body { margin-top: 6px; }
.npart { padding: 10px 0 8px; border-top: 1px solid var(--line); }
.npart h4 { margin: 0 0 3px; font-family: var(--cond); font-weight: 700; font-size: 13px; letter-spacing: .03em; color: var(--muted); }
.ntext { white-space: pre-line; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.npron { font-size: 17px; padding: 4px 0 8px; }
.ex1 { margin-top: 10px; padding-left: 12px; border-left: 3px solid var(--yellow); }
.ex1 i { display: block; font-style: normal; color: var(--muted); font-size: 15px; }
.nbox { margin-top: 14px; border-top: 1px solid var(--line); }
.nbox summary { color: var(--blue); }
.wacts { margin-top: 14px; }
.linkbtn { border: 0; background: none; color: var(--blue); padding: 0; font-weight: 500; text-decoration: underline; min-height: 0; }
.addinfo .notice { margin: 6px 0; }
.addinfo p { margin: 6px 0; }
.addlog { margin-top: 10px; }
.tag.my { background: var(--amber-bg); color: var(--amber); } .tag.ok { background: var(--green-bg); color: var(--green); }
.secret { -webkit-text-security: disc; }
.field select { min-height: 44px; }

/* тренировка: колода карточек под пальцем — карточка размером с карточку, сзади ещё две, кнопки — круглые и небольшие */
body.drilling .tabs { display: none; }
body.drilling .toast { bottom: auto; top: calc(env(safe-area-inset-top) + 64px); }          /* подсказка не ложится на кнопки под карточкой */
.view.drill { padding-bottom: calc(env(safe-area-inset-bottom) + 18px); height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
/* карточка тренировки стоит так же, как учебная: сразу под шапкой, на всё место до кнопок */
.view.drill .deck { min-height: 0; grid-template-rows: minmax(0, 1fr); padding: 14px 0 26px; }
.view.drill .deck > * { height: 100%; max-height: 660px; align-self: start; }
.view.drill .dend { overflow: auto; min-height: 0; }
html:has(body.drilling), body.drilling { overscroll-behavior: none; }
.view.drill .deck, .view.drill .drilldock { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.deck { --cw: min(calc(100vw - 56px), 360px); --ch: min(58vh, 470px); flex: 1; display: grid; place-items: center; padding: 22px 0 6px; perspective: 1200px; }
.deck > * { grid-area: 1 / 1; width: var(--cw); height: var(--ch); }
.ghost { border-radius: 28px; background: var(--tile); box-shadow: var(--sh-tile); transform-origin: 50% 100%; }
.ghost.g1 { transform: translateY(12px) scale(.94); opacity: .85; }
.ghost.g2 { transform: translateY(24px) scale(.88); opacity: .55; }
.dcard { position: relative; background: var(--tile); border-radius: 28px; padding: 22px 20px 18px; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: inset 0 5px 0 var(--g, transparent), 0 0 0 .5px var(--line), 0 1px 2px rgba(0, 0, 0, .06), 0 18px 40px -18px rgba(0, 0, 0, .35);
  touch-action: none; -webkit-user-select: none; user-select: none; cursor: grab; transform-origin: 50% 90%; will-change: transform; --know: 0; --dont: 0; --put: 0; }
.dcard.enter { animation: fp-card-in .28s cubic-bezier(.2, .9, .25, 1); }
.dcard.flipin .dface { animation: fp-flip .3s cubic-bezier(.2, .9, .25, 1); }
@keyframes fp-card-in { from { transform: translateY(14px) scale(.95); } }
@keyframes fp-flip { from { transform: rotateY(-80deg); opacity: .2; } }
.dcard .say { position: absolute; right: 14px; top: 16px; }
.dface { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: auto; touch-action: pan-y; }
.dfront { font-size: 32px; font-weight: 700; line-height: 1.2; margin: auto 48px auto 0; padding-top: 6px; overflow-wrap: anywhere; }
.dcard.flipped .dfront { margin: 34px 48px 0 0; font-size: 26px; }
.dfront:lang(ru) { font-weight: 500; font-size: 28px; }
.dback { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
/* учебные карточки — тот же компонент: метки над вопросом, рамка, заметка, якорь; карточку не тянут, а листают внутри */
.dkind { font-size: 14.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-right: 48px; }
.dcard.haskind .dfront { margin: auto 48px auto 0; padding-top: 0; }
.dcard.haskind.flipped .dfront { margin: 14px 48px 0 0; }
.dcard.still { cursor: default; touch-action: pan-y; -webkit-user-select: text; user-select: text; }
.dback .note { margin-top: 12px; font-size: 15.5px; background: var(--well); border-radius: 14px; padding: 10px 13px; }
.dback .pat { margin-top: 10px; font-family: var(--cond); font-weight: 600; font-size: 18px; }
/* экран учебной карточки не прокручивается: шапка, карточка на всё свободное место, кнопки, вкладки.
   Верх карточки стоит на месте; длинный ответ листается внутри карточки */
.view.studyv { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; padding-bottom: calc(var(--bottom) + 10px); }
.view.studyv .study { flex: 1; min-height: 0; }
.study .deck { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); padding: 8px 0 26px; }
.study .deck > * { height: 100%; max-height: 660px; align-self: start; }
.study .dock { position: relative; bottom: auto; flex: none; }
.study .dock > .btn { min-height: 60px; }
.dface { overscroll-behavior: contain; }
.dans { font-size: 24px; font-weight: 500; overflow-wrap: anywhere; }
.dans:lang(de) { font-weight: 700; font-size: 26px; }
.dtap { text-align: center; padding-top: 10px; }
.dcard .nbox { -webkit-user-select: text; user-select: text; }
/* штампы: проявляются по ходу смахивания */
.stamp { position: absolute; z-index: 2; padding: 4px 12px; border: 3px solid; border-radius: 12px; font: 800 20px/1.1 var(--cond); letter-spacing: .04em; text-transform: uppercase; pointer-events: none; background: var(--tile); }
.stamp.know { left: 18px; top: 22px; color: var(--green); transform: rotate(-12deg); opacity: var(--know); }
.stamp.dont { right: 18px; top: 22px; color: var(--red); transform: rotate(12deg); opacity: var(--dont); }
.stamp.put { left: 50%; bottom: 22px; color: var(--blue); transform: translateX(-50%); opacity: var(--put); }
/* три круглые кнопки под колодой */
.drilldock { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 28px 6px; width: 100%; max-width: 440px; margin: 0 auto; }
.dbtn { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--muted); font: 600 14px var(--sans); }
.dcirc { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; background: var(--raise); box-shadow: var(--sh-raise), 0 8px 18px -10px rgba(0, 0, 0, .35); transition: transform .12s; }
.dbtn.put .dcirc { width: 64px; height: 64px; margin-top: 7px; }
.dbtn:active .dcirc { transform: scale(.92); }
.dcirc svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.dbtn.no .dcirc { color: var(--red); } .dbtn.yes .dcirc { color: var(--green); } .dbtn.put .dcirc { color: var(--blue); }
.dbtn.put .dcirc svg { width: 28px; height: 28px; stroke-width: 2.2; }
.dhint { text-align: center; margin: 6px 0 0; }
.dend { padding: 30px 20px; max-width: 380px; margin: 0 auto; width: 100%; text-align: center; }
.dend .big { font-size: 34px; margin-bottom: 4px; }
.dend .trio { margin: 20px 0; text-align: left; }
.dendb { display: flex; flex-direction: column; gap: 10px; }
@media (prefers-reduced-motion: reduce) { .dcard.enter, .dcard.flipin .dface { animation: none; } }

/* шаблон разбора */
.tsec { background: var(--tile); border: 0; border-radius: 18px; padding: 8px 10px 2px; margin: 8px 0; box-shadow: var(--sh-tile); }
.tsec.off .temoji, .tsec.off .ttitle { opacity: .5; }
.tsec-head { display: flex; align-items: center; gap: 8px; }
.tsec-head input[type=text] { border: 1.5px solid var(--line); border-radius: 6px; background: var(--paper); padding: 6px 8px; min-height: 38px; }
.temoji { width: 40px; text-align: center; padding: 6px 2px !important; } .ttitle { flex: 1; min-width: 0; font-weight: 700; font-size: 15.5px; }
.tsec-head .icon-btn.sm { width: 30px; }
.tsec summary { color: var(--muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsec textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 6px; background: var(--paper); padding: 8px 10px; margin-bottom: 8px; }
/* «Серая строка»: блок из словарей — название и что он показывает; пример строки сверху */
.tline { padding-bottom: 8px; }
.tline-name { flex: 1; min-width: 0; font-size: 15.5px; line-height: 1.3; }
.tline-name .small { margin-top: 2px; }
.tsec.tline.off .tline-name, .tsec.tline.off .tag { opacity: .5; }
.tline .tsec-head + textarea { margin-top: 8px; }
.tline-ex { margin: 8px 0 10px; } .tline-ex p { margin: 4px 0; overflow-wrap: anywhere; }
.tsec .switch { width: 44px; height: 26px; } .tsec .switch::after { width: 20px; height: 20px; } .tsec .switch:checked::after { transform: translateX(18px); }

/* раскладка слова: таблицы форм */
.sepbar { color: var(--muted); font-weight: 400; margin: 0 1px; }
.wtabs { grid-template-columns: repeat(3, 1fr); margin: 14px 0 4px; }
.wpane { min-height: 120px; padding-top: 6px; }
/* полоса выделения: окончание в формах, слово и его перевод во «В тексте» (читалка и словарь). Жёлтая приглушена:
   яркая под белым текстом тёмной темы размывает буквы */
.chg { font-weight: 700; background: linear-gradient(transparent 58%, rgba(255, 212, 0, .55) 58%); padding: 0 1px; }
:root[data-theme=dark] .chg { background: linear-gradient(transparent 58%, rgba(255, 212, 0, .32) 58%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .chg { background: linear-gradient(transparent 58%, rgba(255, 212, 0, .32) 58%); } }
.ftable { background: var(--tile); border: 0; border-radius: 16px; overflow: hidden; margin: 8px 0; box-shadow: var(--sh-tile); }
.fr { display: grid; gap: 0 10px; padding: 8px 12px; border-top: 1px solid var(--line); align-items: baseline; }
.fr:first-child { border-top: 0; }
.fr.fh { background: var(--bg); padding-top: 6px; padding-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.fr.on { background: var(--amber-bg); }
.fn .fr { grid-template-columns: 86px 1fr 1fr; }
.fv .fr { grid-template-columns: 74px 1fr; font-size: 17px; }
.fl .fr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); font-size: 17px; }   /* подпись словами (английский): «причастие прошедшего времени» */
.fa4 .fr { grid-template-columns: 44px repeat(4, 1fr); gap: 0 6px; font-size: 15.5px; }
.fp3 .fr { grid-template-columns: repeat(3, 1fr); font-size: 16.5px; }
.fc b { display: block; font-size: 13.5px; font-family: var(--cond); font-weight: 700; }
.fc small { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }
.fr small.ind { display: block; color: var(--muted); font-size: 13.5px; }
.fa4 small.ind { font-size: 12.5px; }
.fp { color: var(--muted); font-size: 15px; }
.fa { font-weight: 500; } .fa.a-der { color: var(--blue); } .fa.a-die { color: var(--red); } .fa.a-das { color: var(--green); } .fa.a-pl { color: var(--orange); }
.fv .aux { font-weight: 700; }
.pfx { color: var(--blue); font-weight: 500; }
.fnote { font-size: 15px; background: var(--well); border-radius: 14px; padding: 9px 12px; margin: 8px 0; }
.fsrc { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.fseg { margin: 10px 0 4px; }
.ftense { margin: 14px 0 6px; }
.ftt { font-size: 16px; line-height: 1.35; }
.ftt b { font-family: var(--cond); font-size: 19px; }
.fmk { color: var(--muted); margin: 2px 0 2px; font-style: italic; }
.tl { width: 100%; height: 30px; display: block; margin: 6px 0 0; }
.tl line { stroke: var(--line); stroke-width: 2; } .tl line.now { stroke: var(--ink); stroke-width: 2; }
.tl circle { fill: var(--yellow); stroke: var(--ink); stroke-width: 2; }
.tl text { font: 500 10px var(--sans); fill: var(--muted); }
.fdeg { font-size: 19px; margin: 6px 0 4px; }
.fhom { margin: 4px 0 10px; } .fhom .chips { margin-top: 6px; }
.exh { margin: 12px 0 2px; font-family: var(--cond); font-weight: 700; font-size: 15px; color: var(--muted); }

/* курс: этапы и контроль */
.csegs { margin: 0 16px 6px; } .csegs.flushtop, .top.flushtop { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }

/* чтение: библиотека */
.blist { background: var(--tile); margin: 12px 12px 0; border-radius: var(--r-tile); box-shadow: var(--sh-tile); overflow: hidden; }
.bhero { margin: 12px 12px 0; }
.bhero-k { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--muted); padding: 2px 2px 0; }
.bhero-t { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 2px 0; color: var(--ink); font: inherit; }
.bhero-t b { display: block; font: 700 23px/1.2 var(--cond); }
.bhero-t span { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.bhero .shero-m .meter i { background: var(--ink); }
.bhero .btn { margin-top: 14px; }
.brow { display: block; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 16px; }
.brow:first-child { border-top: 0; }
.brow.big { background: var(--tile); border: 0; border-radius: var(--r-tile); padding: 14px 16px 14px 20px; box-shadow: inset 5px 0 0 var(--yellow), var(--sh-tile); }
.brow .bt { font-size: 17px; line-height: 1.3; } .brow.big .bt { font-size: 19px; }
.brow .bm { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); margin-top: 3px; flex-wrap: wrap; }
.brow .meter { margin-top: 8px; } .brow .meter i { background: var(--ink); }
.kn { font-weight: 500; } .kn.easy { color: var(--green); } .kn.fit { color: var(--ink); } .kn.hard { color: var(--amber); } .kn.vhard { color: var(--red); }

/* читалка: страница во весь экран, вкладки спрятаны */
body.reading .tabs { display: none; }
body.reading { overscroll-behavior: none; }
.reader { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--paper); z-index: 5; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.rtop { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; border-bottom: 1px solid var(--line); position: relative; z-index: 6; background: var(--paper); }
.rtop .icon-btn { border: 0; font-size: 22px; width: 38px; height: 38px; background: none; box-shadow: none; border-radius: 12px; }
.rtitle { flex: 1; min-width: 0; line-height: 1.2; }
.rtitle b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.rtitle small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.rview { flex: 1; overflow: hidden; position: relative; padding: 16px 20px 0; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.rcols { position: relative; line-height: 1.6; font-family: var(--sans); hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; text-align: left; }
.rcols p { margin: 0 0 .8em; }
.rcols .rch { font-size: 1.25em; margin: 0 0 .7em; }
.rcols .w { border-radius: 3px; }
.rcols .w.rs { background: var(--read-bg); }
.rcols .w.rw { background: var(--read-word); color: #1B1D1F; }
.rcols .w.cs { background: var(--amber-bg); }
.rcols .w.cur { background: var(--yellow); color: var(--on-yellow); }
.rcols .w.nw { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.rcols .w.lw { text-decoration: underline dashed; text-decoration-color: var(--amber-fill); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.rbot { padding: 6px 16px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.rline { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.rkn.easy { color: var(--green); } .rkn.hard { color: var(--amber); } .rkn.vhard { color: var(--red); }
.rprog { height: 3px; background: var(--line); margin-top: 6px; } .rprog i { display: block; height: 100%; background: var(--ink); }

/* лист слова: три высоты */
/* лист снизу: высоту и прокрутку ведёт sheet.js, здесь только вид */
.sh { position: fixed; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 8px); z-index: 30; max-width: 560px; margin: 0 auto;
  background: var(--paper); border-radius: 28px 28px 0 0; box-shadow: 0 -1px 0 rgba(255, 255, 255, .06) inset, 0 -16px 44px -8px rgba(0, 0, 0, .22), 0 0 0 .5px rgba(0, 0, 0, .06);
  transform: translate3d(0, 110%, 0); will-change: transform; touch-action: pan-x; overscroll-behavior: contain;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sh-scroll { height: 100%; overflow: hidden; border-radius: inherit; }
.sh-in { position: relative; padding: 0 16px; will-change: transform; }
.sh-end { height: calc(env(safe-area-inset-bottom) + 28px); }
.sh-top { position: relative; z-index: 3; will-change: transform; background: var(--paper); margin: 0 -16px; padding: 0 16px; border-radius: 28px 28px 0 0; }
.sh-grab { display: block; width: 100%; padding: 8px 0 4px; margin: 0; background: none; border: 0; cursor: grab; }
.sh-grab i { display: block; margin: 0 auto; width: 40px; height: 5px; border-radius: 3px; background: var(--well-2); }
.sh-pills { position: relative; z-index: 3; background: var(--paper); margin: 0 -16px; padding: 10px 16px; display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-behavior: smooth; transition: box-shadow .15s; }
.sh-pills::-webkit-scrollbar { display: none; }
.sh.scrolled .sh-pills { box-shadow: 0 1px 0 var(--line), 0 8px 12px -10px rgba(0, 0, 0, .3); }
.pill { flex: none; border: 0; border-radius: 999px; padding: 0 18px; min-height: 40px; font: 500 15px/1 var(--sans); background: var(--well); color: var(--ink); cursor: pointer; transition: background .15s; }
.pill.on { background: var(--ink); color: var(--paper); box-shadow: var(--sh-ink); }
.pill:focus-visible, .rsh-plus:focus-visible, .sh-grab:focus-visible { outline: 2px solid var(--blue, #2563eb); outline-offset: 2px; }
/* затемнение под листом словаря: нажатие закрывает лист */
.sh-dim { position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, .32); opacity: 0; touch-action: none; }
/* лист слова в словаре — тот же, что в читалке, плюс кнопки словаря */
.rsh-ic { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--raise); box-shadow: var(--sh-raise); color: var(--ink); display: grid; place-items: center; padding: 0; flex: none; cursor: pointer; }
.rsh-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rsh-ic:active { transform: scale(.94); }
.wsh-cards { color: var(--muted); }
.wsh-cards.on { background: var(--ink); color: var(--paper); box-shadow: var(--sh-ink); }      /* учится по карточкам — как выбранная пилюля */
/* «Разбор»: строка над текстом — слева кто и когда разобрал, справа круглая «⟳» */
.nhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 8px; }
.nhead .nmeta { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.nredo svg { stroke-width: 2; }
.rsh-ic.pri { background: var(--yellow); color: var(--on-yellow); box-shadow: var(--sh-ink); }
.rsh-ic:disabled { cursor: default; }
.rsh-ic.spin svg { animation: fp-spin .9s linear infinite; }
@keyframes fp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rsh-ic.spin svg { animation-duration: 2.4s; } }
.rsh-ic:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* кнопка языковой пары (pairs.js): код языка слова над кодом языка перевода — EN над RU */
.pairb-in { display: flex; flex-direction: column; align-items: center; gap: 2px; font: 700 12px/1 var(--cond); letter-spacing: .03em; }
.pairb-in span + span { padding-top: 2px; border-top: 1.5px solid currentColor; }
.pairb-in.none { font-size: 18px; }
.addpair { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.addpair-n { border: 0; background: none; padding: 8px 0; font: inherit; font-weight: 500; color: var(--ink); text-align: start; cursor: pointer; }
.addpair-n.need { color: var(--muted); }
.chip.chk { display: inline-flex; align-items: center; gap: 6px; }
.chip.chk .ic { display: none; }
.chip.chk.on .ic { display: inline-grid; }
.chip.chk .ic svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wsh .rsh-stat { gap: 8px; min-width: 0; }
.wsh-kind { font-size: 13px; color: var(--muted); }
.wsh-f { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.wsh-f .fdot { width: 8px; height: 8px; }
.wsh .wpane { padding-top: 4px; }
.wsh .wpane .note-body { margin-top: 0; }
.wsh .wpane .npart:first-child { border-top: 0; padding-top: 2px; }
.wsh .wacts { padding: 8px 0 4px; }
/* верх листа слова (словарь и читалка): кнопки ⋯ / ↳ / звук — своей строкой справа, под ними полоса состояний.
   Полоса — одной строкой во всю ширину листа: что не поместилось, уходит за край и листается вбок, как пилюли папок.
   От полосы до слова — 12px, как было, когда полоса стояла в одной строке с кнопками: строка 48px, метка 24px по центру */
.rsh-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.rsh-stat { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; color: var(--muted); font-size: 14px; min-height: 24px;
  margin: 0 -16px 12px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.rsh-stat::-webkit-scrollbar { display: none; }
.rsh-stat > * { flex: none; white-space: nowrap; }
.rsh-btns { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: none; order: -1; margin-top: 2px; }   /* 2px от язычка, как было в строке 48px: (48 − 44) / 2 */
.rsh-plus { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); box-shadow: var(--sh-ink); display: grid; place-items: center; padding: 0; flex: none; cursor: pointer; }
.rsh-plus svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rsh-plus.in { background: var(--raise); color: var(--green); box-shadow: var(--sh-raise); }
.rsh-plus:active, .rsh-btns .say:active { transform: scale(.94); }
.rsh-w { font-size: 34px; font-weight: 700; font-family: var(--cond); line-height: 1.15; padding: 2px 0 0; overflow: hidden; white-space: nowrap; }
.rsh-w .art { font-weight: 700; } .art.a-pl { color: var(--orange); }
/* шапка слова (wordhead.js — одна на словарь и читалку): 1) слово  ↕6  2) словарная форма, если не та же  ↕1  3) серая строка  ↕6  4) перевод */
.rsh-info { padding-bottom: 2px; }
.rsh-dict { margin-top: 6px; font-size: 14px; line-height: 19px; min-height: 19px; font-style: italic; color: var(--ink); overflow-wrap: anywhere; }
.rsh-dict[hidden] { display: none; }
.rsh-dict[hidden] + .rsh-meta { margin-top: 6px; }          /* словарная форма та же, что заголовок: серая строка на её месте */
.rsh-meta { margin-top: 1px; font-size: 14px; line-height: 19px; min-height: 19px; color: var(--muted); overflow-wrap: anywhere; }
.rsh-meta .rsh-form { font-weight: 700; color: var(--ink); }      /* форма слова: Präteritum, Komparativ, мн. ч. */
.rsh-tr { font-size: 19px; line-height: 26px; min-height: 26px; font-weight: 500; margin: 6px 0 2px; }
.rsh-askai { margin-left: 10px; font-size: 15px; }
.rsh-more { margin-left: 8px; font-size: 15px; font-weight: 400; color: var(--muted); }
.rsh-more::before { content: '· '; }
.rsh-ai { margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); background: var(--well); border-radius: 999px; padding: 1px 7px; vertical-align: 3px; }
.opened.often { color: var(--amber); font-weight: 500; }
.stchip { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.stchip.known { background: var(--green-bg); color: var(--green); } .stchip.learn { background: var(--amber-bg); color: var(--amber); } .stchip.new { background: var(--red-bg); color: var(--red); } .stchip.name { background: var(--well); color: var(--muted); }
.rsh-panes { padding-top: 4px; }
.rsh-pane[hidden] { display: none; }
.rsh-src { font-size: 17px; line-height: 1.5; margin: 4px 0 8px; }
.rsh-trs { font-size: 17px; margin: 8px 0 4px; }
.ex1 i .chg { color: var(--ink); }                          /* перевод примера серый — выделенный кусок обычным цветом, как в читалке */
.rsh-note .note-body { margin-top: 0; }
.rsh-note .npart:first-child { border-top: 0; padding-top: 2px; }

/* плеер чтения — копия снимка (3x, ширина 428): плашка 72 высотой, по 10 от краёв экрана, скругление 27,
   всё по центральной линии; ❚❚ в 33,8 от левого края плашки, время с 59,3; 1x · ↺15 · ↻15 · ✕ шагом 43, ✕ в 33,9 от правого */
/* стекло по рецептам материалов iOS (UIBlurEffect, файлы .materialrecipe): размытие, насыщенность, «плита» яркости.
   Плита сжимает яркость фона к тёмной середине — в CSS это contrast() фона и полупрозрачный серый слой поверх.
   Плеер — тонкий материал (systemThinMaterialDark): фон хорошо просвечивает. Меню и панели с текстом — обычный
   (systemMaterialDark): плотнее, текст читается на любом фоне. Значения фильтра — прямо в свойстве: Safari 18.2+
   не применяет -webkit-backdrop-filter, если значение взято из переменной CSS */
.glass { color: #fff; background: rgba(42, 42, 42, .6);
  -webkit-backdrop-filter: blur(30px) saturate(135%) contrast(88%); backdrop-filter: blur(30px) saturate(135%) contrast(88%);
  box-shadow: 0 20px 44px -12px rgba(0, 0, 0, .4), 0 3px 10px rgba(0, 0, 0, .14),
    inset 0 1px 0 rgba(255, 255, 255, .26), inset 0 -1px 0 rgba(255, 255, 255, .06), inset 0 0 0 .5px rgba(255, 255, 255, .14); }
.glass.regular { background: rgba(40, 40, 40, .75);
  -webkit-backdrop-filter: blur(30px) saturate(150%) contrast(69%); backdrop-filter: blur(30px) saturate(150%) contrast(69%); }
.glass::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .1) 28%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, .12) 85%, rgba(255, 255, 255, .28));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@media (prefers-reduced-transparency: reduce) { .glass, .glass.regular { background: rgb(40, 40, 44); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.tts { position: absolute; left: 10px; right: 10px; top: 64px; z-index: 5; height: 72px; border-radius: 27px;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: transform .34s cubic-bezier(.2, .9, .25, 1); will-change: transform; }
.tts.dragging { transition: none; }
.tts-bar { display: flex; align-items: center; height: 72px; padding: 0 12.4px 0 10.8px; }
.tts button { background: none; border: 0; color: #fff; display: grid; place-items: center; width: 43px; height: 52px; padding: 0; border-radius: 22px; cursor: pointer; flex: none; }
.tts button:active { background: rgba(255, 255, 255, .12); }
.tts button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.tts .tts-play { width: 46px; }
.tts-play svg { width: 20px; height: 20px; }
.tts-back svg, .tts-fwd svg { width: 21px; height: 21px; overflow: visible; }
.tts-x svg { width: 22px; height: 22px; }
.tts-voice svg { width: 23px; height: 23px; }
.tts .tts-voice[aria-expanded="true"] { background: rgba(255, 255, 255, .16); }
.tts.loading .tts-play svg { animation: tts-wait 1s ease-in-out infinite alternate; }
@keyframes tts-wait { from { opacity: 1; } to { opacity: .3; } }
/* окно выбора голоса: то же стекло, что у плеера, поверх текста */
.tts-shade { position: absolute; inset: 0; z-index: 4; }
.tts-menu { position: absolute; left: 10px; right: 10px; z-index: 5; max-height: calc(100% - 170px); overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 0 10px; border-radius: 27px;
  transform-origin: 85% 0; animation: tts-menu-in .22s cubic-bezier(.2, .9, .25, 1); }
@keyframes tts-menu-in { from { opacity: 0; transform: scale(.94) translateY(-6px); } }
.vhead { padding: 10px 22px 6px; font: 600 15px/20px var(--sans); color: rgba(255, 255, 255, .55); }
.vrow { position: relative; display: flex; align-items: center; margin: 0 8px; border-radius: 19px; }
.vrow + .vrow::before { content: ''; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; background: rgba(255, 255, 255, .1); }
.vrow.on { background: rgba(255, 255, 255, .1); }
.vrow.on::before, .vrow.on + .vrow::before { display: none; }
.tts-menu button { background: none; border: 0; color: #fff; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tts-menu button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.vpick { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px 10px 14px; text-align: left; border-radius: 19px; }
.vpick:active, .vdel:active { background: rgba(255, 255, 255, .12); }
.vtext { flex: 1; min-width: 0; }
.vtext b { display: block; font: 600 17px/22px var(--sans); }
.vtext small { display: block; margin-top: 2px; font: 400 13.5px/18px var(--sans); color: rgba(255, 255, 255, .62); overflow-wrap: anywhere; }
.vrow.err small { color: #FF9A8A; }
.vbar { display: block; height: 3px; margin-top: 7px; border-radius: 2px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.vbar i { display: block; height: 100%; border-radius: 2px; background: var(--read-word, #FF8A00); transition: width .2s linear; }
.vchk { flex: none; width: 24px; height: 24px; display: grid; place-items: center; color: #fff; }
.vchk svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.vrow:not(.on) .vchk { color: rgba(255, 255, 255, .7); }
.vdel { flex: none; width: 44px; height: 44px; margin-right: 6px; display: grid; place-items: center; border-radius: 22px; color: rgba(255, 255, 255, .62) !important; }
.vdel svg { width: 20px; height: 20px; }
.vnote { margin: 8px 22px 4px; font: 400 13px/18px var(--sans); color: rgba(255, 255, 255, .5); }
/* дикция: три положения в ряд, выбранное — светлой плашкой, как отмеченный голос */
.vdict { display: flex; gap: 4px; margin: 0 12px; padding: 4px; border-radius: 16px; background: rgba(255, 255, 255, .08); }
.vdbtn { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 6px 4px; border: 0; border-radius: 12px; background: none; color: rgba(255, 255, 255, .7); font: 600 13.5px/16px var(--sans); }
.vdbtn.on { background: rgba(255, 255, 255, .92); color: #16181c; }
.vdict.off .vdbtn { opacity: .4; }
@media (prefers-reduced-motion: reduce) { .tts-menu { animation: none; } .tts.loading .tts-play svg { animation: none; opacity: .5; } }
/* выпадающее меню — компонент системы (menu.js): меню iPhone на стекле обычного материала.
   Стекло — .pmenu, прокрутка — внутри (.pm-scroll): высота до низа экрана, страница под меню не едет */
.pmenu-shade { position: fixed; inset: 0; z-index: 55; touch-action: none; }
.pmenu:focus { outline: none; }
.pmenu { position: fixed; z-index: 56; top: var(--pm-top, 80px); border-radius: 22px; overflow: hidden;
  -webkit-user-select: none; user-select: none; animation: pm-in .2s cubic-bezier(.2, .9, .25, 1); }
@keyframes pm-in { from { opacity: 0; transform: scale(.9); } }
.pm-scroll { position: relative; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 2px 0;
  max-height: calc(100vh - var(--pm-top, 80px) - 12px - env(safe-area-inset-bottom));
  max-height: calc(100dvh - var(--pm-top, 80px) - 12px - env(safe-area-inset-bottom)); }
.pm-sec + .pm-sec { border-top: 7px solid rgba(0, 0, 0, .2); }
.pm-h { padding: 10px 16px 3px 46px; font: 500 13px/16px var(--sans); color: rgba(255, 255, 255, .55); }
.pm-row { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 9px 16px 9px 12px;
  border: 0; background: none; color: #fff; font: 400 17px/22px var(--sans); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pm-row + .pm-row::before { content: ''; position: absolute; left: 46px; right: 0; top: 0; height: 1px; transform: scaleY(.5); transform-origin: 0 0; background: rgba(255, 255, 255, .3); }
.pm-row:active { background: rgba(255, 255, 255, .12); }
.pm-row:focus-visible { outline: 2px solid #fff; outline-offset: -3px; border-radius: 12px; }
.pm-row.off { color: rgba(255, 255, 255, .36); cursor: default; }
.pm-row.off:active { background: none; }
.pm-chk { flex: none; width: 26px; height: 22px; display: grid; place-items: center; }
.pm-chk svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pm-tx { flex: 1; min-width: 0; }
.pm-l { display: flex; align-items: center; gap: 9px; }
.pm-tx small { display: block; margin-top: 1px; font: 400 14px/18px var(--sans); color: rgba(255, 255, 255, .62); }
.pm-n { flex: none; font: 400 15px/1 var(--sans); color: rgba(255, 255, 255, .58); font-variant-numeric: tabular-nums; }
.pm-row.off .pm-n, .pm-row.off small { color: inherit; }
.pm-ic { flex: none; width: 22px; display: grid; place-items: center; }
.pm-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pmenu .mem.new { border-color: rgba(255, 255, 255, .6); }
.pmenu .mem.queued { border-color: rgba(255, 255, 255, .75); background: radial-gradient(circle, rgba(255, 255, 255, .75) 0 2px, transparent 2.5px); }
.pm-row.off .pm-dot { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .pmenu { animation: none; } }
.tts-time { font: 500 16px/1 var(--sans); font-variant-numeric: tabular-nums; margin-left: 2.5px; letter-spacing: .01em; }
.tts-sp { flex: 1; }
.tts .tts-rate { width: auto; min-width: 43px; padding: 0 2px; font: 300 21px/1 var(--sans); }
.tts-grab { position: absolute; left: 50%; bottom: 6px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: rgba(255, 255, 255, .34); pointer-events: none; }
.tts-pull { position: absolute; left: 50%; bottom: -1px; width: 96px; height: 20px; margin-left: -48px; display: none; place-items: center; background: none; border: 0; padding: 0; touch-action: none; cursor: grab; }
.tts-pull i { display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--muted); opacity: .55; }
.reader.tts-hidden .tts-pull { display: grid; }
@media (prefers-reduced-motion: reduce) { .tts { transition: none; } }
/* кто стал активным, тот сверху: читает голос — оранжевое поверх жёлтого; нажали слово — наоборот */
.rcols.tts-front .w.rs { background: var(--read-bg); }
.rcols.tts-front .w.rw { background: var(--read-word); color: #1B1D1F; }

/* ---------- настройки чтения: стеклянная панель из плиток (бенто) ---------- */
:root { --ink1: #3F444A; --ink2: #5A4532; --ink3: #1E3A5F; }
:root[data-theme=dark] { --ink1: #B4BAC0; --ink2: #E2CFB3; --ink3: #BCD3F2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --ink1: #B4BAC0; --ink2: #E2CFB3; --ink3: #BCD3F2; } }
.reader { --r-ink: var(--ink); }
.reader[data-ink="1"] { --r-ink: var(--ink1); } .reader[data-ink="2"] { --r-ink: var(--ink2); } .reader[data-ink="3"] { --r-ink: var(--ink3); }
.rcols { color: var(--r-ink); }
.rset-shade { position: absolute; inset: 0; z-index: 7; }
.rset { position: absolute; left: 10px; right: 10px; z-index: 8; max-height: calc(100% - 120px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 28px; padding: 8px; transform-origin: 90% 0; animation: tts-menu-in .22s cubic-bezier(.2, .9, .25, 1); -webkit-user-select: none; user-select: none; }
.rset button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rset button:focus-visible, .rset input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.bento .wide { grid-column: 1 / -1; }
.rset .tile { border-radius: 21px; position: relative; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 20px; text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 .5px rgba(255, 255, 255, .09), 0 1px 2px rgba(0, 0, 0, .18); }
.rset .tl { font: 500 12.5px/15px var(--sans); color: rgba(255, 255, 255, .7); padding-left: 4px; }
.tlrow { display: flex; justify-content: space-between; align-items: baseline; }
.tlrow b { font: 500 13.5px/15px var(--sans); white-space: nowrap; padding-right: 4px; }
/* переключатели: утопленная дорожка, выбранное — приподнятая светлая капля */
.seg2 { display: flex; gap: 3px; padding: 3px; border-radius: 14px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .06); }
.seg2 button { flex: 1; min-width: 0; height: 36px; border-radius: 11px; display: grid; place-items: center; font: 500 15px/1 var(--sans); color: rgba(255, 255, 255, .78) !important; transition: background .15s, color .15s; }
.seg2 button.on { color: #fff !important; background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .17));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 0 0 .5px rgba(255, 255, 255, .2); }
.seg2 svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.fonts .seg2 button { height: 50px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.fonts .fa { font-size: 21px; line-height: 1; font-weight: 400; }
.fonts small { font: 400 10.5px/1.1 var(--sans); color: rgba(255, 255, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.inks .seg2 button { height: 40px; }
.sw { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 2px 5px rgba(0, 0, 0, .35); }
.sw[data-ink="1"] { background: var(--ink1); } .sw[data-ink="2"] { background: var(--ink2); } .sw[data-ink="3"] { background: var(--ink3); }
.step { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 3px; border-radius: 14px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35); }
.step b { font: 600 17px/1 var(--sans); }
.stb { width: 44px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .12)) !important; box-shadow: 0 2px 5px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .3); }
.stb:disabled { opacity: .35; }
.stb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
/* ползунок страницы: дорожка с заливкой до текущей страницы */
.rng { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; --p: 0%; }
.rng::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #fff var(--p), rgba(255, 255, 255, .2) var(--p)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3); }
.rng::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #fff var(--p), rgba(255, 255, 255, .2) var(--p)); }
.rng::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35), inset 0 -1px 0 rgba(0, 0, 0, .12); }
.rng::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.tocbtn { flex-direction: row !important; align-items: center; gap: 12px !important; min-height: 56px; padding: 8px 12px !important; }
.tocbtn .ti, .tocbtn .tch { flex: none; display: grid; place-items: center; }
.tocbtn .ti svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.tocbtn .tch svg { width: 18px; height: 18px; fill: none; stroke: rgba(255, 255, 255, .6); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.toc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toc-t b { font: 600 16px/20px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toc-t small { font: 400 13px/17px var(--sans); color: rgba(255, 255, 255, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rset-head { display: flex; align-items: center; gap: 8px; padding: 2px 6px 10px 0; }
.rset-head b { flex: 1; font: 600 18px/22px var(--sans); }
.rset-back { width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; }
.rset-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.rset-back:active, .toc-row:active, .tocbtn:active { background: rgba(255, 255, 255, .14) !important; }
.toc { display: flex; flex-direction: column; gap: 2px; }
.toc-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; text-align: left; }
.toc-row.on { background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.toc-n { flex: none; width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; font: 600 13px/1 var(--sans); background: rgba(255, 255, 255, .1); }
.toc-row.done .toc-n { color: rgba(255, 255, 255, .55); }
.toc-row.on .toc-n { background: var(--read-word, #FF8A00); color: #1B1D1F; }
.icon-btn.raa[aria-expanded="true"] { background: var(--bg); border-radius: 12px; }
/* лента: глава одной колонкой, листается вверх-вниз */
.reader.rscroll .rview { overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; padding-bottom: 24px; }
.reader.rscroll .rcols { transform: none !important; height: auto !important; width: auto !important; column-width: auto !important; column-gap: normal !important; }
.rnav { display: none; }
.reader.rscroll .rnav { display: block; width: 100%; margin: 6px 0 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); font: 500 15px/20px var(--sans); text-align: center; cursor: pointer; }
.reader.rscroll .rnav.next { margin: 24px 0 8px; }

/* ---------- PDF: страница как картинка (ui-pdf.js). Экран — на всю ширину, и лёжа тоже: так страница крупнее ---------- */
.preader { max-width: none; background: var(--bg); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.preader .rtop { gap: 6px; }
.preader .rtop .pz { font-size: 26px; font-weight: 500; line-height: 1; }
.ptitle { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: start; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pprog { margin-top: 0; flex: none; }
.pbody { flex: 1; min-height: 0; position: relative; display: flex; }
.pview { flex: 1; min-width: 0; overflow: auto; position: relative; touch-action: pan-x pan-y; overscroll-behavior: contain; outline: none; direction: ltr;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.pview:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.pview::after { content: ''; display: block; height: env(safe-area-inset-bottom); }
.psizer { position: relative; transform-origin: 0 0; }
/* лист страницы — белый в любой теме: PDF рисуется как на бумаге */
.ppage { position: absolute; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .14), 0 2px 8px -2px rgba(0, 0, 0, .24); }
.ppage canvas { position: absolute; display: block; pointer-events: none; }
.ppage .pbase { left: 0; top: 0; width: 100%; height: 100%; }
/* слова в PDF: подсветка поверх картинки страницы. Лист белый в любой теме, поэтому цвета — светлой темы, умножением:
   буквы под подсветкой остаются чёрными. cur — нажатое слово, cs — его предложение, nw / lw — «Подсветить новые слова» */
.pmarks { position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: multiply; }
.pmk { position: absolute; border-radius: 2px; }
.pmk.cs { background: #FFF0BF; }
.pmk.cur { background: #FFD400; box-shadow: 0 0 0 1px #FFD400; }
.pmk.nw { border-bottom: 2px solid #D5281B; }
.pmk.lw { border-bottom: 2px dashed #F2A900; }
.pnum { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa0a6; font: 500 30px/1 var(--sans); }
.ppage.on .pnum { display: none; }
.perr { position: sticky; top: 12px; left: 12px; z-index: 2; width: max-content; max-width: min(320px, calc(100vw - 24px)); margin: 12px; padding: 12px 14px; border-radius: 16px;
  background: var(--paper); color: var(--ink); box-shadow: var(--sh-tile); font-size: 15px; }
.perr p { margin: 0 0 8px; }
.pmsg { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center;
  background: var(--bg); overflow: auto; }
.pmsg[hidden], .pmsg [hidden] { display: none !important; }
.pmsg p { margin: 0; max-width: 420px; }
.pmsg-t { font-size: 17px; }
.pfile { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.pfile-b { position: relative; cursor: pointer; }
.pfile-b:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.prange { display: block; width: 100%; margin: 6px 0 14px; }
@media (orientation: landscape) and (max-height: 520px) { .preader .rtop { padding-top: calc(3px + env(safe-area-inset-top)); padding-bottom: 3px; } }
@media (prefers-reduced-motion: reduce) { .rset { animation: none; } }

/* ---------- кнопки на стеклянных панелях (ответы, тренировка, выделение) ---------- */
.glass .btn { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 3px rgba(0, 0, 0, .25); }
.glass .btn.pri { background: #fff; color: #1B1D1F; box-shadow: 0 2px 8px rgba(0, 0, 0, .3), inset 0 -1px 0 rgba(0, 0, 0, .08); }
.glass .btn.ghost { background: rgba(255, 255, 255, .08); }
.glass .icon-btn { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.selbar .selhead, .selbar .selhead b { color: #fff; }
@media (prefers-reduced-motion: reduce) { .modal, .modal-in, .asheet, .asheet-in, .toast { animation: none; } }

/* ---------- настройки: плитки разделов ---------- */
.stile { background: var(--tile); border-radius: var(--r-tile); box-shadow: var(--sh-tile); padding: 2px 16px 12px; margin: 12px 0; }
.stile > h3, .stile > summary h3 { margin: 14px 0 8px; font-size: 19px; }
.stile .inline:first-of-type { border-top: 0; }
.stile .inline { border-top-color: var(--line); }
.stile .srow { padding: 10px 0 4px; border-top: 1px solid var(--line); } .stile .srow > div:first-child { margin-bottom: 8px; }
.stile .srow .segs { margin-bottom: 4px; } .stile .srow .seg { font-size: 14.5px; }
.stile.fold { padding-bottom: 2px; }
.stile.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 0; min-height: 52px; }
.stile.fold > summary::-webkit-details-marker { display: none; }
.stile.fold > summary h3 { margin: 0; }
.stile.fold > summary::after { content: ''; width: 9px; height: 9px; border-right: 2.2px solid var(--muted); border-bottom: 2.2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .2s; }
.stile.fold[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.stile.fold[open] { padding-bottom: 12px; }
.stile .acts { margin-top: 10px; }
.modal .ver { text-align: center; }

/* ---------- «Сегодня»: главное действие, плитки дня ---------- */
.hero { margin: 14px 0 0; padding: 14px 14px 12px; border-radius: 26px; background: var(--tile); box-shadow: var(--sh-tile); }
.shero { margin: 12px 12px 0; }
.shero-t { margin: 10px 2px 2px; font: 700 23px/1.2 var(--cond); }
.shero-s { margin: 0 2px; color: var(--muted); font-size: 15px; }
.shero-m { display: flex; align-items: center; gap: 10px; margin: 12px 2px 2px; font-size: 13.5px; color: var(--muted); }
.shero-m .meter { flex: 1; margin: 0; }
.shero-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.shero-acts .btn:only-child { grid-column: 1 / -1; }
.shero-acts .btn { min-height: 50px; border-radius: 16px; }
.shero-more { display: flex; width: 100%; align-items: center; justify-content: space-between; border: 0; background: none; color: var(--muted); font: inherit; font-size: 15px; padding: 12px 2px 2px; margin-top: 8px; border-top: 1px solid var(--line); }
.chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); margin-right: 4px; }
.hero-k { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.hero-k .stat { padding-top: 2px; } .hero-k b { font-family: var(--cond); font-size: 18px; }
.hero-t { margin: 8px 2px 12px; font-size: 17px; line-height: 1.35; }
.hero .btn { min-height: 52px; font-size: 17px; border-radius: 18px; }
.busy .inline { padding: 0; border: 0; }
.box-card h3 { margin: 2px 0 10px; }
.freeplan { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.notice.acc b { display: block; margin-bottom: 2px; }
.foot { margin: 8px 4px 0; }

/* ---------- содержимое стеклянных меню: капли, подписи ---------- */
.glass .chip { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.glass .chip.on { background: #fff; color: #1B1D1F; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.glass .chip .cnt { color: inherit; opacity: .7; }
.glass .muted, .glass .small.muted { color: rgba(255, 255, 255, .62); }
.agroup .dsetup { padding: 2px 16px 16px; }
.agroup .drow > span, .agroup .drow > div:first-child { color: rgba(255, 255, 255, .7); font-size: 14px; }
.agroup .fnew .btn { flex: none; }
.stile .srow select { width: 100%; border: 0; border-radius: 12px; background: var(--well); padding: 9px 10px; min-height: 42px; margin: 8px 0 4px; }
.stile label.srow { display: block; }
/* отчёт проверки ИИ */
.lexrep { display: grid; gap: 8px; margin-top: 10px; }
.lexrow { background: var(--tile); border-radius: 14px; padding: 10px 12px; box-shadow: var(--sh-tile); }
.lexrow.bad { box-shadow: inset 3px 0 0 var(--red), var(--sh-tile); }
.lexrow ul { margin: 6px 0 0; padding-left: 18px; color: var(--red); }

/* админка «Переводы» */
.admin .admtabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px 4px; scrollbar-width: none; }
.admin .admtabs::-webkit-scrollbar { display: none; }
.admin .admtabs .chip { flex: none; white-space: nowrap; }
.admin .stile h4 { margin: 14px 0 4px; font-size: 15px; }
.admflow.soon { opacity: .62; }
.admstate { margin: 2px 0 8px; font-weight: 600; } .admstate.on { color: var(--green); } .admstate.off { color: var(--red); }
.admlangs { display: grid; gap: 10px; margin: 6px 0 4px; }
.admlang-t { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.admfind { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-bottom: 10px; }
.admfind select, .admfind input { min-height: 40px; border: 0; border-radius: 12px; background: var(--well); padding: 6px 10px; }
.admtexts { margin-top: 12px; display: grid; gap: 10px; }
.admtext { background: var(--tile); border-radius: 16px; padding: 10px 12px; box-shadow: var(--sh-tile); }
.admtext.st-none, .admtext.st-stale, .admtext.st-review { box-shadow: inset 3px 0 0 var(--amber-fill), var(--sh-tile); }
.admtext-k { word-break: break-all; margin-bottom: 4px; }
.admtext-src { color: var(--muted); font-size: 15px; }
.admtext-t { font-size: 16px; margin: 4px 0 6px; }
.admtext textarea, .admtext input { width: 100%; border: 0; border-radius: 12px; background: var(--well); padding: 8px 10px; margin-top: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* консоль администратора (ui-console.js): на весь экран, слева меню разделов (на телефоне — сверху), как в проекте Таро */
body.console-on { overflow: hidden; }
.console { position: fixed; inset: 0; z-index: 35; background: var(--bg); display: flex; flex-direction: column; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.con-side { flex: none; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--paper); box-shadow: 0 1px 0 var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.con-brand b { font: 700 22px/1.1 var(--cond, var(--sans)); display: block; }
.con-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--well); color: var(--ink); font: 500 15px/1 var(--sans); }
.con-nav { grid-column: 1 / -1; display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.con-item { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--well); color: var(--ink); font: 500 16px/1 var(--sans); }
.con-item.on { background: var(--ink); color: var(--paper); }
.console .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.con-main { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); outline: none; }
.con-box, .con-h { max-width: 1100px; margin-inline: auto; }
.con-h { font: 700 30px/1.1 var(--cond, var(--sans)); margin-block: 0 14px; } .con-h2 { font: 700 20px/1.2 var(--sans); margin: 0 0 8px; }
.con-tiles .qtile:last-child { grid-column: auto; }
.qtile.tap { border: 0; text-align: start; color: var(--ink); font: inherit; cursor: pointer; }
.console .stile { margin-bottom: 14px; } .console .stile h3 { margin: 0 0 4px; }
@media (min-width: 860px) {
  .console { flex-direction: row; }
  .con-side { width: 240px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 20px 14px; box-shadow: 1px 0 0 var(--line); }
  .con-nav { flex-direction: column; overflow: visible; } .con-item, .con-back { border-radius: 14px; background: none; justify-content: flex-start; }
  .con-item.on { background: var(--ink); } .con-back { order: 0; }
  .con-main { padding: 28px 32px 40px; }
  .qtiles.con-tiles { grid-template-columns: repeat(4, 1fr); }
}
/* CRM консоли (crm.js) — устройство CRM Таро (Attio), вид этого приложения */
.con-main.flush { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.con-crm { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.crm { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.crm .ic svg, .crm-ib svg, .crm-lock svg, .crm-empty-ic svg, .crm-feed-ic svg, .crm-mark svg, .crm-chk svg, .crm-yes svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.crm .ic svg { width: 18px; height: 18px; }
.crm-pad { padding: 16px; }
.crm-nav { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; border-bottom: 1px solid var(--line); scrollbar-width: none; background: var(--bg); }
.crm-nav-i { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 500 16px/1.2 var(--sans); white-space: nowrap; }
.crm-nav-i.on { background: var(--well); color: var(--ink); font-weight: 600; }
.crm-nav-n { font-size: 14px; color: var(--muted); }
.crm-nav-h { display: none; margin: 14px 14px 4px; font: 600 13px/1.2 var(--sans); color: var(--muted); }
.crm-nav-sp { display: none; }
.crm-emoji { width: 20px; text-align: center; }
.crm-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.crm-page { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 40px; }
.crm-h2 { font: 700 24px/1.15 var(--cond, var(--sans)); margin: 0 0 12px; }
.crm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.crm-bar.flat { border: 0; padding: 0 0 12px; }
.crm-bar[hidden] { display: none; }
.crm-sp { flex: 1; }
.crm-title { display: flex; align-items: center; gap: 8px; margin: 0 4px 0 0; font: 700 22px/1.2 var(--cond, var(--sans)); min-width: 0; }
.crm-title > span:not(.ic):not(.crm-count) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-count { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--well); font: 500 14px/1.4 var(--sans); }
.crm-tb { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--raise); box-shadow: var(--sh-raise); color: var(--ink); font: 600 14.5px/1 var(--sans); white-space: nowrap; }
.crm-tb.on { box-shadow: inset 0 0 0 2px var(--ink), var(--sh-raise); }
.crm-tb-t { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; }
.crm-end { margin-inline-start: auto; }
.crm-ib { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink); display: inline-grid; place-items: center; padding: 0; }
.crm-ib:active { background: var(--well); } .crm-ib:disabled { opacity: .3; }
.crm-ib svg { width: 20px; height: 20px; }
.crm-qbox { position: relative; flex: 1 1 200px; min-width: 180px; max-width: 360px; }
.crm-qbox > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.crm-search { width: 100%; min-height: 44px; border: 0; border-radius: 999px; background: var(--well); padding: 8px 14px 8px 40px; font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.crm-draft { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crm-bulk { background: var(--paper); }
.crm-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.crm-more { display: flex; justify-content: center; padding: 10px; border-top: 1px solid var(--line); }
.btn.danger { color: var(--red); } .btn.pri.danger { background: var(--red); color: #fff; box-shadow: none; }
.btn .ic svg { width: 18px; height: 18px; }
/* таблица: шапка и колонка имени закреплены, прокрутка в обе стороны внутри */
.crm-tablewrap { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.crm-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 15px; }
.crm-table th, .crm-table td { padding: 0; border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); background: var(--bg); text-align: start; font-weight: 400; vertical-align: middle; }
.crm-table thead th { position: sticky; top: 0; z-index: 3; }
.crm-table tfoot td { position: sticky; bottom: 0; z-index: 3; border-top: 1px solid var(--line); border-bottom: 0; }
.crm-table .c-chk { position: sticky; inset-inline-start: 0; z-index: 2; width: 44px; border-inline-end: 0; }
.crm-table .c-name { position: sticky; inset-inline-start: 44px; z-index: 2; min-width: 11rem; }
.crm-table thead .c-chk, .crm-table thead .c-name, .crm-table tfoot .c-chk, .crm-table tfoot .c-name { z-index: 4; }
.crm-table tr.sel > * { background: color-mix(in srgb, var(--yellow) 18%, var(--bg)); }
.crm-th { display: flex; align-items: center; gap: 7px; width: 100%; min-width: 8.5rem; height: 46px; padding: 0 12px; border: 0; background: none; color: var(--muted); font: 500 14px/1.2 var(--sans); text-align: start; white-space: nowrap; }
.crm-name { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 4px 12px; border: 0; background: none; color: var(--ink); font: 600 15.5px/1.2 var(--sans); text-align: start; }
.crm-name > span:not(.crm-av) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 13rem; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.crm-cell { display: flex; align-items: center; min-height: 48px; min-width: 8.5rem; max-width: 18rem; padding: 4px 12px; overflow: hidden; white-space: nowrap; color: var(--ink); }
button.crm-cell { width: 100%; border: 0; background: none; font: inherit; text-align: start; }
button.crm-cell:active, button.crm-cell:focus-visible { background: var(--well); }
.crm-calc { display: flex; align-items: center; justify-content: flex-end; gap: 6px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--muted); font: inherit; white-space: nowrap; }
.crm-calc b { color: var(--ink); }
.crm-chk { width: 44px; height: 44px; border: 0; background: none; padding: 0; display: grid; place-items: center; }
.crm-chk i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; }
.crm-chk.on i, .crm-chk.some i { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.crm-chk.some i::after { content: ''; width: 10px; height: 2px; border-radius: 1px; background: currentColor; }
.crm-chk svg, .crm-mark svg, .crm-yes svg { width: 14px; height: 14px; stroke-width: 3; }
.crm-av { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--well-2); color: var(--ink); display: inline-grid; place-items: center; font: 700 14px/1 var(--sans); }
.crm-av.lg { width: 56px; height: 56px; font-size: 24px; } .crm-av.xs { width: 22px; height: 22px; font-size: 11px; }
.crm-badge { display: inline-block; padding: 2px 8px; margin-inline-start: 4px; border-radius: 999px; background: var(--well); font: 500 12.5px/1.4 var(--sans); font-style: normal; color: var(--ink); }
.crm-yes { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-grid; place-items: center; }
.crm-no { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: inline-block; }
.crm-stars { color: var(--amber-fill); letter-spacing: 1px; }
.crm-link { border: 0; background: none; padding: 0; color: var(--ink); font: inherit; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; }
.crm-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
/* варианты выбора: цвета палитры приложения, текст тёмный */
.crm-opt { display: inline-flex; align-items: center; max-width: 100%; padding: 2px 10px; border-radius: 999px; font: 500 14px/1.45 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #1B1D1F; }
.crm-opt.opt-line { color: var(--ink); background: none; box-shadow: inset 0 0 0 1px var(--line); }
.crm-chips { display: inline-flex; gap: 4px; min-width: 0; overflow: hidden; } .crm-chips.wrap { flex-wrap: wrap; overflow: visible; }
.opt-sky { background: #CFE3F7; } .opt-rose { background: #F6D3DA; } .opt-olive { background: #D7E4BF; } .opt-yellow { background: #FFE88A; }
.opt-ochre { background: #EFD39A; } .opt-terracotta { background: #F2C2A5; } .opt-scarlet { background: #F3A79F; } .opt-burgundy { background: #DDB0BA; }
.opt-paper { background: #E7E5DF; } .opt-cream { background: #F6EFD9; }
.crm-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; } .crm-dot.none { box-shadow: inset 0 0 0 2px var(--line); }
.pmenu .crm-dot { width: 16px; height: 16px; }
/* доска */
.crm-board { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 12px; overflow-x: auto; overscroll-behavior: contain; align-items: flex-start; }
.crm-col { flex: none; width: 18rem; max-height: 100%; display: flex; flex-direction: column; border-radius: 20px; background: var(--well); }
.crm-col.over { box-shadow: inset 0 0 0 2px var(--ink); }
.crm-col-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; } .crm-col-h h3 { margin: 0; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-cards { list-style: none; margin: 0; padding: 0 8px 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 5rem; }
.crm-card { background: var(--tile); border-radius: 16px; box-shadow: var(--sh-tile); }
.crm-card-h { display: flex; align-items: center; padding: 2px 2px 2px 0; } .crm-card-h .crm-name { flex: 1; min-width: 0; }
.crm-card-f { margin: 0; padding: 0 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.crm-card-f > div { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; } .crm-card-f dt { color: var(--muted); flex: none; } .crm-card-f dd { margin: 0; min-width: 0; overflow: hidden; }
.crm-card-foot { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-top: 1px solid var(--line); } .crm-card-foot span { display: inline-flex; align-items: center; gap: 4px; }
.crm-card-foot .ic svg { width: 14px; height: 14px; }
/* пусто */
.crm-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 16px; text-align: center; }
.crm-empty-ic { width: 48px; height: 48px; border-radius: 50%; background: var(--well); display: grid; place-items: center; color: var(--muted); }
.crm-empty-ic svg { width: 24px; height: 24px; } .crm-empty p { margin: 0; max-width: 28rem; }
/* окна CRM */
.crm-dlg { padding-bottom: 8px; }
.crm-dlg > p { margin: 6px 0; }
.crm-foot { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.crm-foot[hidden] { display: none; }
.crm-in { width: 100%; min-height: 46px; border: 0; border-radius: 14px; background: var(--well); padding: 10px 14px; font: 16px/1.35 var(--sans); color: var(--ink); -webkit-appearance: none; appearance: none; min-width: 0; }
textarea.crm-in { resize: vertical; }
select.crm-in { padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.crm-sub { margin: 16px 0 4px; font: 600 14px/1.3 var(--sans); color: var(--muted); }
.crm-warn { color: var(--red); }
.crm-flist { list-style: none; margin: 0; padding: 0; }
.crm-frow { display: flex; align-items: center; gap: 8px; min-height: 48px; border-bottom: 1px solid var(--line); }
.crm-frow.off { opacity: .5; }
.crm-frow-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; } .crm-frow-t > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.crm-frow > .crm-in { flex: 1; }
.crm-row-b { display: flex; flex: none; }
.crm-lock { color: var(--muted); width: 20px; } .crm-lock svg { width: 18px; height: 18px; }
.crm-colorb { flex: none; width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; } .crm-colorb .crm-dot { width: 22px; height: 22px; }
.crm-addrow { display: flex; align-items: center; gap: 8px; margin: 8px 0; } .crm-addrow .crm-in { flex: 1; }
.btn.crm-grow { flex: 1; justify-content: flex-start; min-width: 0; overflow: hidden; }
.crm-emojirow { display: grid; grid-template-columns: 6rem 1fr; gap: 10px; }
.crm-rule { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; }
.crm-rule > select.crm-in, .crm-rule > .crm-in { flex: 1; }
.crm-join { flex: none; min-width: 4.5rem; min-height: 46px; display: inline-flex; align-items: center; color: var(--muted); font-size: 14.5px; }
.crm-rule > select.crm-in:first-child, .crm-rule > select:nth-child(1) { flex: none; width: 5.5rem; }
.crm-rule-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.crm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .crm-rule-b .crm-two { grid-template-columns: 1fr; } }
.crm-group.sub { flex: 1; padding: 8px; border-radius: 18px; background: var(--well); }
.crm-choice { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-pick { border: 2px solid transparent; background: none; border-radius: 999px; padding: 2px; min-height: 40px; display: inline-flex; align-items: center; }
.crm-pick.on { border-color: var(--ink); }
.crm-radio { list-style: none; margin: 8px 0; padding: 0; }
.crm-radio li > button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 4px 10px; border: 0; border-radius: 14px; background: none; color: var(--ink); font: 16px/1.3 var(--sans); text-align: start; }
.crm-radio li > button.on { background: var(--well); font-weight: 600; }
.crm-radio li.small { padding: 10px; }
.crm-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; }
.crm-radio .on .crm-mark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.crm-rate { display: flex; gap: 6px; } .crm-rate button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--well); font-size: 24px; color: var(--muted); }
.crm-rate button.on { color: var(--amber-fill); }
.crm-sw { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; }
/* карточка человека */
.crm-rectop { padding: 4px 8px; }
.crm-rec { flex: 1; min-height: 0; overflow-y: auto; }
.crm-rec-l { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.crm-rec-r { padding: 0 16px 32px; min-width: 0; }
.crm-who { display: flex; align-items: center; gap: 12px; } .crm-who .crm-h2 { margin: 0; overflow-wrap: anywhere; } .crm-who .crm-badge { margin: 4px 4px 0 0; }
.crm-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crm-sec-h h3 { margin: 6px 0; font: 600 15px/1.3 var(--sans); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.crm-fields { display: flex; flex-direction: column; }
.crm-field { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 6px 8px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: 15.5px/1.35 var(--sans); text-align: start; }
button.crm-field:active { background: var(--well); }
.crm-fl { flex: none; width: 44%; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14.5px; min-width: 0; } .crm-fl span { overflow: hidden; text-overflow: ellipsis; }
.crm-fv { flex: 1; min-width: 0; }
.crm-entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.crm-entries li { background: var(--tile); border-radius: 18px; box-shadow: var(--sh-tile); padding: 4px 4px 6px 12px; }
.crm-entry-h { display: flex; align-items: center; gap: 8px; } .crm-entry-h b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-tabs { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 0; border-bottom: 1px solid var(--line); }
.crm-panel { padding-top: 12px; }
.crm-hl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.crm-hl-i { display: flex; flex-direction: column; gap: 8px; min-height: 88px; padding: 12px 14px; border: 0; border-radius: 18px; background: var(--tile); box-shadow: var(--sh-tile); color: var(--ink); font: inherit; text-align: start; }
.crm-hl-l { display: flex; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 14px; } .crm-hl-l .ic { color: var(--muted); }
.crm-hl-i b { font-size: 20px; font-weight: 600; }
.crm-actf { margin-bottom: 12px; }
.crm-feed { list-style: none; margin: 0; padding: 0; }
.crm-feed li { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.crm-feed li:not(:last-child)::before { content: ''; position: absolute; left: 19px; top: 42px; bottom: 2px; width: 1px; background: var(--line); }
.crm-feed-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--tile); box-shadow: var(--sh-tile); display: grid; place-items: center; color: var(--muted); }
.crm-feed-ic svg { width: 18px; height: 18px; }
.crm-feed-b { flex: 1; min-width: 0; padding-top: 2px; } .crm-feed-b p { margin: 0 0 2px; display: flex; flex-wrap: wrap; gap: 8px; }
.crm-feed-t { display: flex; flex-direction: column; gap: 4px; }
.crm-chg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crm-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* задачи и заметки */
.crm-bucket h3 { margin: 14px 0 6px 6px; font: 600 15px/1.3 var(--sans); } .crm-bucket h3.bad, .crm-task-m .bad { color: var(--red); }
.crm-tasks { list-style: none; margin: 0; padding: 0; background: var(--tile); border-radius: 18px; box-shadow: var(--sh-tile); }
.crm-tasks li { display: flex; align-items: flex-start; gap: 2px; padding: 2px 4px; } .crm-tasks li + li { border-top: 1px solid var(--line); }
.crm-task-b { flex: 1; min-width: 0; padding: 10px 0; } .crm-task-b p { margin: 0; overflow-wrap: anywhere; } .crm-task-b p.done { color: var(--muted); text-decoration: line-through; }
.crm-task-m { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px !important; } .crm-task-m span { display: inline-flex; align-items: center; gap: 4px; }
.crm-task-m .ic svg { width: 14px; height: 14px; }
.crm-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.crm-notes li { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--tile); border-radius: 18px; box-shadow: var(--sh-tile); }
.crm-notes h3 { margin: 0; font-size: 17px; } .crm-notes p { margin: 0; }
.crm-note-h, .crm-note-f { display: flex; align-items: center; gap: 8px; } .crm-note-f { border-top: 1px solid var(--line); padding-top: 6px; }
.crm-set { max-width: 760px; } .crm-set .crm-sec-h { margin-top: 10px; } .crm-set .crm-sec-h .acts { margin: 0; }
@media (min-width: 1100px) {
  .crm { flex-direction: row; }
  .crm-nav { flex-direction: column; width: 230px; overflow-y: auto; border-bottom: 0; border-inline-end: 1px solid var(--line); padding: 12px 10px; gap: 2px; }
  .crm-nav-i { border-radius: 14px; width: 100%; }
  .crm-nav-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: start; }
  .crm-nav-h { display: block; } .crm-nav-sp { display: block; flex: 1; }
  .crm-nav.rec { display: none; }
  .crm-rec { display: flex; overflow: hidden; }
  .crm-rec-l { width: 23rem; flex: none; overflow-y: auto; border-inline-end: 1px solid var(--line); }
  .crm-rec-r { flex: 1; overflow-y: auto; padding: 0 24px 32px; }
  .crm-hl { grid-template-columns: repeat(3, 1fr); }
  .crm-notes { grid-template-columns: 1fr 1fr; }
  .crm-col { width: 20rem; }
  .crm-page { padding: 24px 28px 40px; }
}
@media (min-width: 1500px) { .crm-nav.rec { display: flex; } }
@media (max-width: 1099px) { .crm-nav.rec { display: none; } }
@media (prefers-color-scheme: dark) { .crm-opt:not(.opt-line) { filter: saturate(.85) brightness(.92); } }
/* «Очередь»: доска потоков «вид × язык» (как в проекте Таро), плитки здоровья, список текстов по запросу */
.qhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .qhead p { flex: 1; margin: 0; }
.qtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.qtile { background: var(--tile); box-shadow: var(--sh-tile); border-radius: 16px; padding: 10px 12px; min-width: 0; }
.qtile b { display: block; font-size: 24px; line-height: 1.2; }
.qtile.bad { box-shadow: inset 0 0 0 2px var(--red), var(--sh-tile); } .qtile.bad b { color: var(--red); }
.qtile:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* нечётная последняя плитка — во всю ширину, без дыры */
.qall { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; } .qall > div { flex: 1; min-width: 0; } .qall .btn { flex: none; }
.qall.off { box-shadow: inset 0 0 0 2px var(--ink), var(--sh-tile); }
.qsec { margin-bottom: 14px; } .qsec h3 { margin: 0 0 4px; }
.qscroll { overflow-x: auto; background: var(--tile); box-shadow: var(--sh-tile); border-radius: 16px; margin-top: 8px; -webkit-overflow-scrolling: touch; }
.qboard { border-collapse: collapse; font-size: 14px; }
.qboard th, .qboard td { padding: 8px 8px; text-align: start; vertical-align: top; font-weight: 500; white-space: nowrap; }
.qboard tbody tr { border-top: 1px solid var(--line); }
.qboard .qfirst { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--tile); box-shadow: 1px 0 0 var(--line); }
.qboard td.paused { background: var(--well); }
.qth, .qcell { display: flex; align-items: center; gap: 6px; } .qcell { align-items: flex-start; }
.qoff { color: var(--muted); text-decoration: line-through; }
.qpause { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: var(--well); color: var(--ink); }
.qpause.on { background: var(--ink); color: var(--paper); }
.qpause svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qname, .qnum { border: 0; background: none; padding: 2px 4px; color: var(--ink); font: inherit; text-align: start; border-radius: 8px; min-width: 64px; min-height: 36px; }
.qname small, .qnum small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.qnum b { display: block; font-size: 18px; line-height: 1.2; }
.qnum small.bad, .qrow .bad { color: var(--red); } .qnum small.qp { color: var(--ink); font-weight: 600; }
.qnow h3 { margin: 0 0 4px; font-size: 16px; } .qnow { margin-bottom: 14px; }
.qfilters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.qfilters select { min-height: 44px; min-width: 0; border: 0; border-radius: 12px; background: var(--well); padding: 6px 10px; }
.qlist .danger { color: var(--red); }
.qselbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; background: var(--well); border-radius: 14px; padding: 2px 8px 2px 2px; margin: 8px 0; position: sticky; top: 0; z-index: 2; }
.qselbar span { flex: 1; min-width: 120px; }
.qlink { border: 0; background: none; padding: 6px 0; color: var(--ink); font: 600 14px/1.2 var(--sans); text-decoration: underline; }
.qchk { flex: none; width: 44px; height: 44px; border: 0; background: none; padding: 0; display: grid; place-items: center; }
.qchk i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; }
.qchk.all i, .qchk.some i { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.qchk.some i::after { content: ''; width: 10px; height: 2px; background: currentColor; border-radius: 1px; }
.qchk svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.qrows { list-style: none; margin: 0; padding: 0; background: var(--tile); box-shadow: var(--sh-tile); border-radius: 16px; }
.qrow { display: flex; align-items: flex-start; gap: 4px; padding: 4px 10px 4px 0; } .qrow + .qrow { border-top: 1px solid var(--line); }
.qrow-t { flex: 1; min-width: 0; padding: 8px 0; } .qrow-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.qbadge { flex: none; margin-top: 10px; font: 600 12px/1 var(--sans); padding: 5px 8px; border-radius: 999px; background: var(--well); color: var(--ink); }
.qbadge.done { background: var(--green); color: #fff; } .qbadge.failed, .qbadge.retry { background: var(--red); color: #fff; }
.admlog-r { padding: 8px 0; border-top: 1px solid var(--line); } .admlog-r:first-child { border-top: 0; } .admlog-r.bad b { color: var(--red); }

/* справа налево (арабский, персидский, сорани): немецкий текст и цифры остаются слева направо */
[dir="rtl"] [lang="de"], [dir="rtl"] .rview, [dir="rtl"] .num { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .inline, [dir="rtl"] .srow { text-align: right; }

/* плашка «Powered by Netlify»: Netlify сам вставляет её на страницу (iframe справа внизу, поверх всего) и она закрывала
   кнопки тренировки. Спрятана так же, как в проекте Таро: у её встроенного стиля нет !important, поэтому это правило сильнее.
   Убрать — удалить эти строки (или выключить плашку в Netlify: Project configuration → General → Powered by Netlify badge). */
iframe#nl-badge-frame,
iframe#nl-hud-frame {
  display: none !important;
}

/* ---------- словари: консоль «Словари» и «Словари на телефоне» (ui-dicts.js) ---------- */
.admdicts .dkcard, .admdicts .dkauto { margin: 10px 0; display: grid; gap: 8px; }
.admdicts .dkcard.off { opacity: .78; }
.dkcard-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dkcard-h b { font-size: 17px; }
.dkchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dkchip { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.dkchip.ok { background: var(--green-bg); color: var(--green); }
.dkchip.bad { background: var(--red-bg); color: var(--red); }
.dkchip.wait { background: var(--amber-bg); color: var(--amber); }
.dksrc { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.dksrc-r a { color: var(--blue); font-weight: 600; }
.dkset { display: grid; gap: 4px; }
.dkrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.dkrow .acts { margin: 0; flex-wrap: nowrap; }

/* ---------- колоды карточек (вкладка «Карточки», ui-decks.js) ---------- */
.dklist { padding: 0; }
.dkrow { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-right: 12px; }
.dkrow:first-child { border-top: 0; }
.dkmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; text-align: left; padding: 14px 4px 14px 16px; color: var(--ink); min-height: 64px; }
.dkt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dkname { font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.dksub { color: var(--muted); line-height: 1.3; }
.dkcnt { display: flex; gap: 12px; flex: none; }
.dkmore { flex: none; }
.dkmore svg { width: 20px; height: 20px; }
.top-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dkset .dksearch { width: 100%; border: 0; border-radius: 999px; background: var(--well); padding: 10px 16px; min-height: 46px; margin: 4px 0 6px; }
.dkset .dkh { font-size: 17px; margin: 14px 0 6px; }
.dkitems { display: flex; flex-direction: column; }
.dkitem { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.dkitem:first-child { border-top: 0; }
.dkset { min-width: 0; max-width: 100%; }
.dkset > * { min-width: 0; }
.dkw { flex: 1; min-width: 0; overflow: hidden; }
.dkde { font-weight: 600; overflow-wrap: anywhere; }
.dkw .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dkst { color: var(--muted); white-space: nowrap; flex: none; }
.dkitem .icon-btn.sm { width: 34px; height: 34px; }
.dkitem .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* окно выбора с колодами: название и поиск стоят на месте, список под ними листается */
.agroup.pick-fix { display: flex; flex-direction: column; overflow: hidden; }
.pick-top { flex: none; padding-bottom: 10px; border-bottom: .5px solid rgba(255, 255, 255, .14); }
.pick-search { display: block; width: calc(100% - 28px); margin: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; padding: 9px 16px; min-height: 42px; font-size: 16px; }
.pick-search::placeholder { color: rgba(255, 255, 255, .5); }
.pick-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.pick-list .flist > .fitem:first-child { border-top: 0; }
.fitem.fnone { justify-content: center; font-size: 15px; }
/* строка поиска в выпадающем меню (фильтр словаря): стоит на месте, строки под ней листаются */
.pm-top { padding: 10px 12px 8px; border-bottom: .5px solid rgba(255, 255, 255, .14); }
.pm-find { display: block; width: 100%; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; padding: 8px 14px; min-height: 38px; font-size: 16px; -webkit-appearance: none; appearance: none; }
.pm-find::placeholder { color: rgba(255, 255, 255, .5); }
.pm-none { padding: 14px 16px; font-size: 15px; color: rgba(255, 255, 255, .6); text-align: center; }
/* окно колод: подпись под строкой (курс: «придёт по курсу»), закреплённая строка — не нажимается, но видна ясно */
.fitem .fname small.fsub { display: block; margin-top: 1px; font: 400 13.5px/1.3 var(--sans); color: rgba(255, 255, 255, .6); }
.fitem.lock:disabled { opacity: .8; }
/* метка своей колоды на листе слова */
.wsh-f.wdeck { color: var(--ink); background: var(--well); border-radius: 999px; padding: 2px 9px 2px 7px; font-weight: 600; }
.wsh-f.wdeck .ic svg { width: 14px; height: 14px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

/* вкладка «Словарь» в листе слова (владелец, 18.11: как в Яндекс Переводчике, в виде приложения): карточка на каждое слово
   этого написания — слово, транскрипция, часть речи, формы, свой «+»; значения по номерам — переводы плашками, подпись серым */
.dcards { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 14px; }
.dcard { background: var(--tile); border-radius: 18px; box-shadow: var(--sh-tile); padding: 12px 12px 14px 16px; }
.dcard-h { display: flex; align-items: flex-start; gap: 10px; }
.dcard-t { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 2px; padding-top: 3px; }
.dcard-w { font: 700 22px/1.2 var(--cond); overflow-wrap: anywhere; }
.dcard-ai { margin-left: 0; vertical-align: 1px; }
.dcard-ipa, .dcard-pos, .dcard-forms { color: var(--muted); font-size: 14.5px; line-height: 20px; }
.dcard-pos, .dcard-forms { font-style: italic; }
.dcard-ipa:empty { display: none; }
.dcard-s { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dcard-s li { display: flex; gap: 10px; align-items: flex-start; }
.dcard-n { flex: none; width: 14px; color: var(--muted); font-size: 14px; line-height: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.dcard-sv { flex: 1; min-width: 0; }
.dcard-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dcard-chip { background: var(--amber-bg); color: var(--ink); border-radius: 999px; padding: 4px 11px; font-size: 16px; line-height: 22px; }
.dcard-lab { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dcard-lab.open { white-space: normal; overflow: visible; }
.dcard-lab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.dcard-muted { margin: 8px 0 0; }

/* ---------- Настройки → «Словари» (ui-dicts.js, владелец, 18.11): группы по языку слов, у пары — выключатель и скачивание ---------- */
.dicset { display: grid; gap: 8px; min-width: 0; }
.dicgrp { border-top: 1px solid var(--line); }
.dicgrp-h { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: none; border: 0; padding: 12px 0; min-height: 56px; color: var(--ink); text-align: left; font: inherit; }
.dicgrp-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dicgrp-t b { font-size: 17px; }
.dicgrp-ic { flex: none; display: inline-flex; transform: rotate(90deg); transition: transform .15s; color: var(--muted); }
.dicgrp-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dicgrp-h[aria-expanded="true"] .dicgrp-ic { transform: rotate(-90deg); }
.dicgrp-b { display: grid; gap: 0; padding: 0 0 8px 0; }
.dicrow { display: grid; gap: 4px; padding: 10px 0 10px 12px; border-top: 1px solid var(--line); }
.dicrow-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dicrow-t { min-width: 0; display: grid; gap: 2px; }
.dicrow.off .dicrow-t > div:first-child { color: var(--muted); }
.dicrow .acts { margin: 4px 0 0; }
.dicrow .acts:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .dicgrp-ic { transition: none; } }

/* общий словарь (консоль, ui-words.js) и предложения из книг во «В тексте» */
.admword { display: block; width: 100%; border: 0; text-align: start; font: inherit; color: var(--ink); }
button.admword { cursor: pointer; }
.admword.st-ai { box-shadow: inset 3px 0 0 var(--amber-fill), var(--sh-tile); }
.admword.st-deleted { opacity: .72; }
.admword-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.admword-h b { font-size: 17px; }
.admwcard { display: grid; gap: 8px; padding-top: 12px; }
.dkcard-h b.admw-lemma { font-size: 22px; }
.admwords .admfind { margin-top: 10px; }
.admw-tr { font-size: 17px; }
.admw-f .ex1 { margin-top: 6px; }
.admw-was { opacity: .7; }
.admw-edit { display: grid; gap: 4px; }
.admw-edit input, .admw-edit textarea { width: 100%; border: 0; border-radius: 12px; background: var(--well); padding: 8px 10px; }
.rsh-books { margin-top: 6px; }

/* ---------- Все устройства (20.11): телефон, телефон лёжа, складной, планшет, окно iPad, компьютер ----------
   Телефон (окно уже 740 точек) — одна колонка 560, как было. Шире — приложение занимает окно: две колонки там, где они
   помогают (Сегодня, Курс, Контроль), списки — сеткой (слова, колоды, тексты, этапы), учёба по карточкам — колонкой 720.
   Окна — по центру, лист слова лёжа — сбоку. Вырез экрана лёжа (iPhone) — поля env(safe-area-inset-*). */
@media (min-width: 740px) {
  #app { --app-w: 1120px; }
  #app[data-view=cards], #app[data-view=deck], #app[data-view=drill] { --app-w: 720px; }
  .view.onb { max-width: 720px; margin: 0 auto; }                 /* первый запуск: настройки курса — колонкой */
  .tcols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; column-gap: 4px; }
  .tcols.ccols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  @media (max-width: 899px) { .tcols.ccols { display: block; } }   /* «Курс» на iPad mini стоя — одной колонкой: кнопкам этапа тесно */
  .tcol { min-width: 0; }
  /* списки — сеткой: строки разделены линиями, у краёв линии уходят под скругление (отрицательный отступ) */
  #app[data-view=dict] .wlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
  #app[data-view=dict] .wlist > * { border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: -1px 0 0 -1px; width: auto; }
  /* колоды и тексты — плитками: одна колода — одна плитка, сколько бы их ни было */
  #app[data-view=read] .blist, #app[data-view=decks] .dklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px;
    background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  #app[data-view=read] .blist > *, #app[data-view=decks] .dklist > * { border: 0; width: auto; background: var(--tile); border-radius: var(--r-tile); box-shadow: var(--sh-tile); }
  /* «Контроль» — две колонки текста, заголовки и три числа сверху — во всю ширину */
  .view.ctl { column-count: 2; column-gap: 28px; }
  .view.ctl > .top, .view.ctl > .segs, .view.ctl > .trio { column-span: all; }
  .view.ctl > h2 { break-after: avoid; }
  .view.ctl > .box-card, .view.ctl > .notice { break-inside: avoid; }
  .view.ctl > .box-card { display: block; overflow: hidden; }
  /* лист слова снизу (планшет стоя) — шире телефонного */
  .sh { max-width: 640px; }
  /* плеер и настройки читалки — не во всю ширину планшета */
  .tts, .tts-menu { max-width: 560px; margin-left: auto; margin-right: auto; }
  .rset { left: auto; width: min(460px, calc(100% - 20px)); }
  .asheet-in { max-width: 460px; }
  /* карточка учёбы и тренировки — крупнее телефонной */
  .deck { --cw: min(calc(100vw - 56px), 500px); }
}
/* лист слова сбоку (sheet.js: широкий экран лёжа) — справа или слева, высота по содержимому */
.sh.side { left: auto; right: max(12px, env(safe-area-inset-right)); width: min(440px, calc(50% - 20px)); max-width: none; margin: 0; }
.sh.side.side-l { right: auto; left: max(12px, env(safe-area-inset-left)); }
.sh-dim.side { background: rgba(0, 0, 0, .14); }
/* окна (Настройки, «Добавить» и др.) на планшете — по центру экрана, со скруглением со всех сторон, крестик виден */
@media (min-width: 740px) and (min-height: 560px) {
  .modal { align-items: center; padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); }
  .modal-in { max-width: 600px; max-height: min(100%, 900px); border-radius: 28px; padding-bottom: 24px; animation: fp-pop .24s cubic-bezier(.2, .9, .25, 1); }
  .modal-head { border-radius: 28px 28px 0 0; padding-top: 18px; padding-right: 60px; }
  .modal-head::before { display: none; }
  .modal-head .x { width: 36px; height: 36px; overflow: visible; clip-path: none; top: 14px; right: 14px; padding: 0; border-radius: 50%; background: var(--well); font-size: 24px; line-height: 36px; text-align: center; color: var(--muted); }
}
@keyframes fp-pop { from { transform: scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .modal-in { animation: none; } }
/* телефон лёжа: высоты мало — панель вкладок ниже (значок и подпись мельче), содержимому остаётся больше места */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --tab-h: 52px; --tab-gap: 6px; }
  .tab { font-size: 10.5px; }
  .tab svg { width: 20px; height: 20px; }
  .tab .dot { top: 0; }
}
/* мышь и тачпад (компьютер, iPad с клавиатурой): строки списков и вкладки отзываются на наведение */
@media (hover: hover) and (pointer: fine) {
  .wrow:not(.on):hover, .brow:not(.big):hover, .stage-row:hover, .dkmain:hover { background: var(--well); }
  .tab:not([aria-current=page]):hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .pill:not(.on):hover { background: var(--well-2); }
}
.view.broken { padding-top: calc(24px + env(safe-area-inset-top)); }
/* окно «ИИ»: выбор ключа и список моделей с поиском (владелец, 21.11) */
.aiapi { margin-top: 0; }
.aiapi .segs { margin-bottom: 0; }
.mpick-q { width: 100%; border: 0; border-radius: 999px; background: var(--well); padding: 10px 16px; min-height: 46px; font-size: 16px; -webkit-appearance: none; appearance: none; margin: 2px 0 8px; }
.mpick-list { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border-radius: 16px; background: var(--well); padding: 4px; }
.mpick-g { padding: 10px 12px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mpick-row { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 12px; min-height: 44px; color: var(--ink); font-size: 15px; }
.mpick-row.on { background: var(--paper); box-shadow: var(--sh-raise); font-weight: 600; }
.mpick-ck { flex: none; width: 18px; height: 18px; color: var(--green); }
.mpick-ck svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; display: block; }
.mpick-id { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mpick-p { flex: none; font-size: 13.5px; color: var(--muted); font-weight: 400; }
.mpick-empty { padding: 10px 12px; margin: 0; }
.mpick-none { margin: 4px 0 8px; }
@media (hover: hover) and (pointer: fine) { .mpick-row:not(.on):hover { background: var(--well-2); } }
