/* Riječ po riječ — палитра «известняк Которского залива» */
:root {
  --ground: #eceee8;
  --surface: #f8f9f5;
  --raised: #ffffff;
  --ink: #16222a;
  --ink-2: #4f5c62;
  --ink-3: #7b878b;
  --line: #d4d9d1;
  --sea: #1d586b;
  --sea-ink: #ffffff;
  --sea-soft: #dbe7e8;
  --gold: #a57822;
  --gold-soft: #f2e8d0;
  --ok: #2c7248;
  --ok-soft: #dcefe2;
  --bad: #a93b2b;
  --bad-soft: #f7e1dc;
  --shadow: 0 1px 0 rgba(22, 34, 42, .04), 0 10px 28px -16px rgba(22, 34, 42, .28);
  --f-display: "Yeseva One", Georgia, "Times New Roman", serif;
  --f-body: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0f171b; --surface: #152027; --raised: #1b2830;
    --ink: #e3e9e5; --ink-2: #a2aeb0; --ink-3: #758387; --line: #28363d;
    --sea: #74b7c9; --sea-ink: #0d1519; --sea-soft: #173139;
    --gold: #d8ad54; --gold-soft: #372c16;
    --ok: #6fc48e; --ok-soft: #16301f; --bad: #eb8b78; --bad-soft: #3b1f1a;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 12px 30px -16px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0f171b; --surface: #152027; --raised: #1b2830;
  --ink: #e3e9e5; --ink-2: #a2aeb0; --ink-3: #758387; --line: #28363d;
  --sea: #74b7c9; --sea-ink: #0d1519; --sea-soft: #173139;
  --gold: #d8ad54; --gold-soft: #372c16;
  --ok: #6fc48e; --ok-soft: #16301f; --bad: #eb8b78; --bad-soft: #3b1f1a;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 12px 30px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-2); }
.small { font-size: 13.5px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ——— шапка ——— */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1080px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap;
}
.brand {
  font-family: var(--f-display); font-size: 23px; line-height: 1; text-decoration: none;
  letter-spacing: .01em; white-space: nowrap;
}
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a {
  text-decoration: none; font-size: 14.5px; padding: 6px 10px; border-radius: 8px; color: var(--ink-2);
}
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.nav a:hover { color: var(--ink); }
.tools { display: flex; align-items: center; gap: 8px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.seg button {
  border: 0; background: none; padding: 4px 10px; border-radius: 7px; cursor: pointer;
  font-size: 13.5px; color: var(--ink-2); font-weight: 500;
}
.seg button[aria-pressed="true"] { background: var(--sea); color: var(--sea-ink); }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { color: var(--ink); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 64px; }
.loading { color: var(--ink-2); }

h1, h2, h3 { text-wrap: balance; margin: 0; }
.eyebrow {
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600;
}

/* ——— главная ——— */
.hello { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.hello h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 4.6vw, 44px); line-height: 1.08; max-width: 18ch; }
.hello h1 em { font-style: normal; color: var(--sea); }
.tally { display: flex; gap: 28px; }
.tally div { display: grid; gap: 2px; }
.tally b { font-family: var(--f-mono); font-weight: 500; font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tally span { font-size: 13px; color: var(--ink-2); }

.home-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .home-grid { grid-template-columns: 1fr; } }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--sea); cursor: pointer; font-size: 14px; }
.link-btn:hover { text-decoration: underline; }

.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.topic {
  width: 100%; text-align: left; cursor: pointer; display: grid; gap: 8px;
  padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
  transition: border-color .15s, background .15s;
}
.topic:hover { border-color: color-mix(in srgb, var(--sea) 45%, var(--line)); }
.topic[aria-pressed="true"] { border-color: var(--sea); background: var(--raised); box-shadow: inset 3px 0 0 var(--sea); }
.topic[aria-pressed="false"] { opacity: .72; }
.topic-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.topic-name { font-family: var(--f-display); font-size: 19px; line-height: 1.15; }
.topic-ru { font-size: 13.5px; color: var(--ink-2); }
.topic-num { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.meter { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; }
.meter .m-known { background: var(--sea); }
.meter .m-learn { background: var(--gold); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }

.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .modes { grid-template-columns: 1fr; } }
.mode {
  display: grid; grid-template-rows: auto 1fr auto; gap: 6px; text-decoration: none;
  padding: 16px 16px 14px; border-radius: var(--r); background: var(--raised); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.mode:hover { border-color: var(--sea); transform: translateY(-1px); }
.mode h3 { font-family: var(--f-display); font-weight: 400; font-size: 21px; }
.mode p { margin: 0; font-size: 14px; color: var(--ink-2); }
.mode-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 13px; }
.pill {
  font-family: var(--f-mono); font-size: 12px; padding: 2px 8px; border-radius: 99px;
  background: var(--sea-soft); color: var(--sea); white-space: nowrap;
}
.pill.due { background: var(--gold-soft); color: var(--gold); }
.mode-go { color: var(--sea); font-weight: 500; }
.mode.mode-dict { background: var(--surface); box-shadow: none; border-style: dashed; }
.mode.featured { grid-column: 1 / -1; background: var(--sea); color: var(--sea-ink); border-color: var(--sea); }
.mode.featured p, .mode.featured .mode-go { color: color-mix(in srgb, var(--sea-ink) 82%, transparent); }
.mode.featured .pill { background: color-mix(in srgb, var(--sea-ink) 18%, transparent); color: var(--sea-ink); }

.hint-box { margin-top: 28px; padding: 16px 18px; border-radius: var(--r); background: var(--gold-soft); color: var(--ink); font-size: 14.5px; max-width: 70ch; }
.hint-box b { font-weight: 600; }

/* ——— упражнение ——— */
.stage { max-width: 680px; margin: 0 auto; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.back { text-decoration: none; color: var(--ink-2); font-size: 14.5px; }
.back:hover { color: var(--ink); }
.stage-title { font-family: var(--f-display); font-size: 18px; }
.count { font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); }
.pips { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-bottom: 18px; }
.pips i { height: 4px; border-radius: 3px; background: var(--line); }
.pips i.cur { background: var(--ink-3); }
.pips i.ok { background: var(--ok); }
.pips i.bad { background: var(--bad); }
.pips i.mid { background: var(--gold); }

.card {
  background: var(--raised); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 36px); display: grid; gap: 22px;
}
.ask { display: grid; gap: 6px; justify-items: center; text-align: center; }
.ask .label { font-size: 13px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.word {
  font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 7vw, 54px); line-height: 1.1;
  overflow-wrap: anywhere; text-wrap: balance;
}
.word.ru { font-family: var(--f-body); font-weight: 500; font-size: clamp(26px, 5vw, 36px); }
.word.sentence { font-size: clamp(24px, 4.6vw, 34px); }
.twin { font-family: var(--f-mono); font-size: 13.5px; color: var(--ink-3); }
.say-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.say {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--sea); cursor: pointer; flex: none;
}
.say:hover { border-color: var(--sea); }
.say.rec { color: var(--gold); }
.say[disabled] { opacity: .35; cursor: default; }

.answer { display: grid; gap: 6px; text-align: center; justify-items: center; padding-top: 18px; border-top: 1px dashed var(--line); }
.answer .word { font-size: clamp(26px, 5vw, 38px); }
.note { font-size: 14.5px; color: var(--ink-2); max-width: 52ch; margin: 0; }
.note b { color: var(--ink); font-weight: 600; }

.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .opts, .opts.three { grid-template-columns: 1fr; } }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
  font-size: 16.5px; min-height: 52px; transition: border-color .12s, background .12s;
}
.opt:hover:not([disabled]) { border-color: var(--sea); }
.opt kbd { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; flex: none; }
.opt.me { font-family: var(--f-display); font-size: 19px; }
.opt[disabled] { cursor: default; }
.opt.right { background: var(--ok-soft); border-color: var(--ok); color: var(--ink); }
.opt.wrong { background: var(--bad-soft); border-color: var(--bad); }
.opt.dim { opacity: .55; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn {
  border: 1px solid var(--sea); background: var(--sea); color: var(--sea-ink); cursor: pointer;
  padding: 10px 18px; border-radius: var(--r); font-weight: 500; font-size: 15.5px; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--sea); filter: none; }
.btn kbd { font-family: var(--f-mono); font-size: 11px; opacity: .7; }
.btn.danger-ghost { background: none; border-color: var(--line); color: var(--bad); }
.btn.danger-ghost.armed { background: var(--bad); color: var(--raised); border-color: var(--bad); }
.grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grades .btn { justify-content: center; flex-direction: column; gap: 0; padding: 10px 8px; }
.grades .btn small { font-size: 12px; font-weight: 400; opacity: .8; }
.g-again { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.g-hard { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.g-good { background: var(--ok-soft); color: var(--ok); border-color: transparent; }

.verdict { text-align: center; font-weight: 600; font-size: 15.5px; }
.verdict.ok { color: var(--ok); }
.verdict.bad { color: var(--bad); }
.verdict.mid { color: var(--gold); }

.type-in { display: grid; gap: 10px; }
.type-in input {
  width: 100%; font-family: var(--f-display); font-size: 26px; padding: 12px 16px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); text-align: center;
}
.type-in input:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-soft); }
.type-in input.ok { border-color: var(--ok); background: var(--ok-soft); }
.type-in input.bad { border-color: var(--bad); background: var(--bad-soft); }
.type-in input.mid { border-color: var(--gold); background: var(--gold-soft); }
.diacr { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.diacr button {
  width: 40px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  font-family: var(--f-mono); font-size: 16px;
}
.diacr button:hover { border-color: var(--sea); }

.line, .bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.line {
  min-height: 62px; padding: 10px; border-radius: var(--r); align-content: flex-start;
  background: repeating-linear-gradient(to bottom, transparent 0 49px, var(--line) 49px 50px);
  border: 1px dashed var(--line);
}
.line.ok { border: 1px solid var(--ok); background: var(--ok-soft); }
.line.bad { border: 1px solid var(--bad); background: var(--bad-soft); }
.tok {
  font-family: var(--f-display); font-size: 19px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); line-height: 1.25;
}
.tok:hover:not([disabled]) { border-color: var(--sea); }
.tok.clitic { border-bottom: 2px solid var(--gold); }
.bank .tok.used { visibility: hidden; }
.tok[disabled] { cursor: default; }

.gap-sentence { font-family: var(--f-display); font-size: clamp(24px, 4.6vw, 32px); line-height: 1.45; text-align: center; text-wrap: balance; }
.blank {
  display: inline-block; min-width: 4.5ch; border-bottom: 2px solid var(--gold); color: var(--gold); padding: 0 4px;
}
.blank.ok { color: var(--ok); border-color: var(--ok); }
.blank.bad { color: var(--bad); border-color: var(--bad); }
.gap-hint { font-size: 13.5px; color: var(--ink-2); text-align: center; }
.gap-hint span { font-family: var(--f-mono); font-size: 12.5px; background: var(--gold-soft); color: var(--gold); padding: 1px 7px; border-radius: 6px; }

.ff-expl { display: grid; gap: 10px; padding-top: 18px; border-top: 1px dashed var(--line); text-align: center; justify-items: center; }
.ff-line { font-size: 17px; }
.ff-line s { color: var(--bad); text-decoration-thickness: 2px; }
.ff-line strong { color: var(--ok); font-weight: 600; }
.example { font-size: 15px; display: grid; gap: 2px; }
.example .ex-me { font-family: var(--f-display); font-size: 19px; }
.example .ex-ru { color: var(--ink-2); }

.summary { text-align: center; display: grid; gap: 14px; justify-items: center; }
.score { font-family: var(--f-display); font-size: clamp(48px, 10vw, 72px); line-height: 1; }
.score small { font-size: .42em; color: var(--ink-2); }
.missed { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; width: 100%; max-width: 480px; text-align: left; }
.missed li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 12px; border-radius: 8px; background: var(--surface); font-size: 14.5px; }
.missed li b { font-family: var(--f-display); font-weight: 400; font-size: 17px; }
.missed li span { color: var(--ink-2); text-align: right; }

.empty { text-align: center; color: var(--ink-2); padding: 24px 0; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.dir-toggle { margin-left: auto; }

/* ——— падежи ——— */
.select {
  font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); max-width: 100%;
}
.opt-body { display: grid; gap: 1px; }
.case-tag { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); }
.heads-up {
  width: 100%; max-width: 52ch; text-align: left; padding: 12px 14px; border-radius: var(--r);
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
}
.heads-up p { margin: 4px 0 0; font-size: 14.5px; }
.heads-title { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--gold); }

/* ——— таблицы и справочник ——— */
.tbl-wrap { overflow-x: auto; width: 100%; }
.answer .tbl-wrap { margin-top: 6px; }
.tbl { border-collapse: collapse; font-size: 14.5px; margin: 0 auto; }
.tbl th, .tbl td { padding: 6px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl thead th { font-family: var(--f-display); font-weight: 400; font-size: 17px; white-space: nowrap; }
.tbl thead th small { font-family: var(--f-body); font-size: 12px; color: var(--ink-3); }
.tbl tbody th { font-weight: 500; color: var(--ink-2); font-size: 13.5px; white-space: nowrap; }
.tbl td { font-family: var(--f-display); font-size: 17px; white-space: nowrap; }
.tbl .short { color: var(--sea); }
.tbl td.hl { background: var(--gold-soft); border-radius: 6px; }
.tbl.wide { width: 100%; }
.tbl.wide td { font-family: var(--f-body); font-size: 14.5px; white-space: normal; }
.tbl.wide td:first-child, .tbl.wide td:last-child { font-family: var(--f-display); font-size: 16.5px; }
.tbl.wide td:first-child { white-space: nowrap; }
.tbl tr.diff td { background: var(--gold-soft); }
.diff-note { display: block; font-family: var(--f-body); font-size: 12.5px; color: var(--gold); margin-top: 2px; }
.ref-toc { display: flex; flex-wrap: wrap; gap: 6px; }
.ref-toc a { text-decoration: none; font-size: 13.5px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.ref-toc a:hover { border-color: var(--sea); color: var(--ink); }
.ref-sec { margin-bottom: 36px; scroll-margin-top: 80px; }
.ref-sec h2 { font-family: var(--f-display); font-weight: 400; font-size: 26px; margin-bottom: 6px; }
.ref-intro, .ref-p { color: var(--ink-2); max-width: 70ch; margin: 0 0 12px; font-size: 15px; }
.ref-sec .tbl:not(.wide) { margin: 0; }
.ref-notes { margin: 12px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; max-width: 70ch; display: grid; gap: 4px; }
.tbl .end { color: var(--sea); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--sea) 35%, transparent); }
.tbl.decl thead th { white-space: normal; min-width: 8.5em; }
.th-sub { display: block; font-family: var(--f-body); font-size: 11.5px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.th-sub.mono { font-family: var(--f-mono); }
.tbl.decl td { padding-block: 8px; }
b.mark { color: var(--ink); font-weight: 600; }

/* ——— словарь ——— */
.dict-head { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.dict-head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 4vw, 38px); }
.search {
  width: min(360px, 100%); padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--raised);
}
.search:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-soft); }
.dict-group { margin-bottom: 28px; }
.dict-group h2 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; }
.dict-group h2 span { font-family: var(--f-display); text-transform: none; letter-spacing: 0; font-size: 18px; color: var(--ink); font-weight: 400; }
.dict-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dict-list li {
  display: grid; grid-template-columns: 34px minmax(0, 1.1fr) minmax(0, 1fr) 12px; gap: 12px; align-items: center;
  padding: 8px 4px; border-bottom: 1px solid var(--line);
}
.dict-me { font-family: var(--f-display); font-size: 18px; line-height: 1.2; }
.dict-me small { display: block; font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.dict-ru { color: var(--ink-2); font-size: 15px; }
.dict-ru small { display: block; font-size: 13px; color: var(--ink-3); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); justify-self: end; }
.dot.learn { background: var(--gold); }
.dot.known { background: var(--sea); }
@media (max-width: 560px) {
  .dict-list li { grid-template-columns: 34px minmax(0, 1fr) 10px; }
  .dict-ru { grid-column: 2; grid-row: 2; }
  .dot { grid-column: 3; grid-row: 1; }
}

/* ——— настройки ——— */
dialog {
  border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(460px, calc(100% - 32px));
  background: var(--raised); color: var(--ink); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(10, 18, 22, .45); }
.dlg { padding: 20px 22px 22px; display: grid; gap: 18px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2 { font-family: var(--f-display); font-weight: 400; font-size: 24px; }
.dlg-sec { display: grid; gap: 10px; }
.dlg-sec h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.dlg-sec p { margin: 0; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--sea); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.file-btn { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media (max-width: 560px) {
  .wrap { padding-top: 20px; }
  .top-in { padding: 8px 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .nav { order: 3; width: 100%; }
}
