/* Общий вид страниц продукта Subpair: шапка, меню режимов, кнопки, карточки, зона перетаскивания файлов.
   Своё у каждой страницы - только в её <style>. Тёмная тема - data-theme=dark на <html> (ставит i18n.js). */
:root { --bg:#ffffff; --fg:#2f2d2b; --dim:#7a736a; --acc:#46658a; --acc-dark:#3a5677; --acc-soft:#e8eef5;
  --card:#faf9f7; --line:#e9e2d6; --line2:#d6ccbc; --nat:#a85a40; --btn-fg:#ffffff; --bad:#c0392b;
  --warn-bg:#fdf3e7; --warn-line:#f0d3ae; --warn:#8a4b1f;
  --pink:#e49c9c; --sand:#e4ccb4; --sage:#9cb4b4; --sun:#e4cc9c; --paper:#f7f2ea; }
/* палитра Lalea (10.10.2026, LT-815): снята с картинок слов - тёплая бумага, тушь, пыльно-голубой из иконки, терракота */
:root[data-theme=dark] { --bg:#1b1a18; --fg:#ece6dc; --dim:#a39b90; --acc:#9cb4cc; --acc-dark:#b4c8dc; --acc-soft:#263240;
  --card:#24221f; --line:#38342e; --line2:#4a453d; --nat:#e4b49c; --btn-fg:#1b1a18; --bad:#f08a7e;
  --warn-bg:#2a2016; --warn-line:#5a4128; --warn:#f0c08a;
  --pink:#c98585; --sand:#8f7d69; --sage:#7f9a9a; --sun:#b8a274; --paper:#26231f; color-scheme:dark; }
* { box-sizing:border-box; }
/* шрифт заголовков Lalea - Nunito (OFL, свои файлы в brand/fonts), его выбор 12.10; текст - системный */
@font-face { font-family:"Nunito"; font-style:normal; font-display:swap; font-weight:200 1000;
  src:url(/brand/fonts/nunito-cyrillic-ext-wght-normal.woff2) format("woff2"); unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family:"Nunito"; font-style:normal; font-display:swap; font-weight:200 1000;
  src:url(/brand/fonts/nunito-cyrillic-wght-normal.woff2) format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"Nunito"; font-style:normal; font-display:swap; font-weight:200 1000;
  src:url(/brand/fonts/nunito-vietnamese-wght-normal.woff2) format("woff2"); unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family:"Nunito"; font-style:normal; font-display:swap; font-weight:200 1000;
  src:url(/brand/fonts/nunito-latin-ext-wght-normal.woff2) format("woff2"); unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Nunito"; font-style:normal; font-display:swap; font-weight:200 1000;
  src:url(/brand/fonts/nunito-latin-wght-normal.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root { --head-font:"Nunito",-apple-system,Segoe UI,Roboto,sans-serif; }
body { margin:0; background:var(--bg); color:var(--fg); font:16px/1.5 -apple-system,Segoe UI,Roboto,sans-serif; }
h1, h2, h3 { font-family:var(--head-font); font-weight:800; }
.wrap { max-width:720px; margin:0 auto; padding:16px; }
.wrap.wide { max-width:1320px; }
@media (min-width:900px) { .wrap.wide { padding:18px 36px; } }
a { color:var(--acc-dark); }
[hidden] { display:none !important; }

/* шапка и меню */
header { display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:14px; color:var(--dim); }
header .brand { text-decoration:none; display:inline-flex; align-items:center; gap:8px; }
header .brand .brand-ic { width:26px; height:26px; border-radius:7px; display:block; }
header .brand .brand-word { height:36px; width:auto; display:block; }   /* нарисованное название (LT-815) */
header .brand b { color:var(--acc); font-size:18px; letter-spacing:.3px; }
header a { color:var(--dim); }
.hr { display:flex; gap:8px; align-items:center; min-width:0; }
.ctx { position:relative; min-width:0; }
.ctxbtn { display:flex; align-items:center; gap:8px; background:var(--bg); color:var(--fg); border:1px solid var(--line); border-radius:999px; padding:5px 12px; font-size:13.5px; max-width:100%; }
.ctxbtn:hover, .ctxbtn[aria-expanded=true] { border-color:var(--acc); }
.ctxbtn .ctxl { font-weight:600; white-space:nowrap; }
.ctxbtn .ctxs { color:var(--dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:12em; }
.ctxbtn .ctxs:empty { display:none; }
.ctxbtn .ctxs::before { content:"· "; }
.ctxbtn::after { content:"▾"; color:var(--dim); font-size:11px; }
.ctxp { width:min(300px, calc(100vw - 64px)); display:flex; flex-direction:column; gap:12px; }
.ctxp label { display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--dim); text-transform:uppercase; letter-spacing:.5px; font-weight:600; }
.ctxp select, .ctxp select.uilang { width:100%; max-width:none; text-transform:none; letter-spacing:0; font-weight:400; }
.lpick { display:flex; justify-content:space-between; align-items:center; width:100%; text-align:left; background:var(--bg); color:var(--fg);
  border:1px solid var(--line); border-radius:8px; padding:8px 10px; font-size:15px; text-transform:none; letter-spacing:0; font-weight:400; }
.lpick::after { content:"▾"; color:var(--dim); font-size:11px; }
.lpick:hover { border-color:var(--acc); }
/* выбор языка поиском (langPicker в i18n.js) */
.lpk { position:fixed; z-index:60; display:flex; flex-direction:column; background:var(--bg); color:var(--fg); border:1px solid var(--line);
  border-radius:14px; box-shadow:0 12px 36px rgba(0,0,0,.22); padding:10px; }
:root[data-theme=dark] .lpk { box-shadow:0 12px 36px rgba(0,0,0,.6); }
.lpk .lpq { width:100%; margin-bottom:8px; }
.lpk .lpl { overflow-y:auto; min-height:0; flex:1; }
.lpi { display:flex; justify-content:space-between; align-items:baseline; gap:10px; width:100%; text-align:left; background:none; border:0;
  border-radius:8px; color:var(--fg); padding:7px 9px; font-size:14.5px; }
.lpi small { color:var(--dim); font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lpi:hover { background:var(--card); }
.lpi.on { color:var(--acc-dark); font-weight:600; }
.lph { font-size:11.5px; color:var(--dim); text-transform:uppercase; letter-spacing:.6px; padding:8px 9px 4px; border-top:1px solid var(--line); margin-top:4px; }
.lpl > .lph:first-child { border-top:0; margin-top:0; }
[dir=rtl] .lpi, [dir=rtl] .lpick { text-align:right; }
@media (max-width:640px) { header { flex-wrap:wrap; } .ctxbtn .ctxs { max-width:7em; } .ctx .popp.right { left:0; right:auto; } }

/* всплывающие панели (popover() в i18n.js): меню плеера, настройки, плашка в шапке */
.pm, .ctx { position:relative; }
.popp { position:absolute; top:calc(100% + 8px); left:0; z-index:30; background:var(--bg); color:var(--fg);
  border:1px solid var(--line); border-radius:14px; padding:14px; box-shadow:0 12px 36px rgba(0,0,0,.18); }
:root[data-theme=dark] .popp { box-shadow:0 12px 36px rgba(0,0,0,.55); }
.popp.right { left:auto; right:0; }
.popp.up { top:auto; bottom:calc(100% + 8px); }
.popp h3 { font-size:12px; color:var(--dim); font-weight:600; text-transform:uppercase; letter-spacing:.6px; margin:0 0 6px; padding-left:8px; }
.opts { display:flex; flex-direction:column; }
.opt { display:block; width:100%; text-align:left; background:none; border:0; border-radius:8px; color:var(--fg); font-size:14px; line-height:1.35; padding:7px 8px 7px 28px; position:relative; }
.opt:hover { background:var(--card); }
.opt.on { color:var(--acc-dark); font-weight:600; }
.opt.on::before { content:"✓"; position:absolute; left:9px; }
[dir=rtl] .opt { text-align:right; padding:7px 28px 7px 8px; }
[dir=rtl] .opt.on::before { left:auto; right:9px; }
.hr #who { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
select.uilang { font-size:14px; padding:4px 6px; max-width:9em; }
button.theme { background:var(--bg); color:var(--fg); border:1px solid var(--line); border-radius:8px; padding:3px 9px; font-size:15px; line-height:1.4; }
/* меню - пилюли, крупно (LT-964, 18.10.2026): было 14 px с подчёркиванием, "мелко" */
nav.modes { display:flex; gap:6px; overflow-x:auto; margin:14px 0 6px; scrollbar-width:none; }
nav.modes a { padding:9px 16px; color:var(--dim); text-decoration:none; font:700 16px var(--head-font); white-space:nowrap; border-radius:999px; }
nav.modes a:hover { background:var(--card); color:var(--fg); }
nav.modes a.end { margin-left:auto; }
nav.modes .nb.risk { background:#e8590c; }
nav.modes .nb { margin-left:6px; background:var(--pink); color:#fff; border-radius:9px; padding:1px 7px; font:700 12px -apple-system,Segoe UI,Roboto,sans-serif; vertical-align:1px; }
nav.modes a[aria-current] { background:var(--fg); color:var(--bg); }
@media (max-width:560px) { nav.modes a { padding:8px 12px; font-size:15px; } }

/* заголовок страницы */
.head { text-align:center; margin:28px auto 22px; max-width:620px; }
.head h1 { font-size:30px; line-height:1.2; margin:0 0 8px; letter-spacing:-.4px; }
.head .sub { color:var(--dim); margin:0; }

/* кнопки и поля */
button { font:inherit; cursor:pointer; }
.btn { display:inline-block; background:var(--acc); color:var(--btn-fg); font-weight:800; font-family:var(--head-font); padding:13px 22px; border-radius:14px; border:0; font-size:16.5px; text-decoration:none; text-align:center; box-shadow:0 4px 0 var(--acc-dark); }
.btn:active { transform:translateY(2px); box-shadow:0 2px 0 var(--acc-dark); }
.btn:hover { background:var(--acc-dark); }
.btn:disabled { opacity:.45; cursor:default; }
.btn.wide { min-width:240px; font-size:17px; }
.ghost { display:inline-block; background:var(--bg); color:var(--fg); border:1px solid var(--line); border-radius:10px; padding:8px 12px; font-size:14px; text-decoration:none; text-align:center; }
.ghost:hover { border-color:var(--acc); }
.ghost.on { background:var(--acc-soft); border-color:var(--acc); color:var(--acc-dark); }
.link { background:none; border:0; color:var(--acc-dark); padding:0; text-decoration:underline; font-size:inherit; }
select, input[type=text], input[type=url], input[type=password], input[type=search] { font:inherit; font-size:15px; color:var(--fg); background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:8px 10px; max-width:100%; }
input:focus, select:focus { outline:2px solid var(--acc-soft); border-color:var(--acc); }
.go { display:flex; justify-content:center; margin-top:20px; }

/* карточки, заметки */
.card { background:var(--bg); border:1px solid var(--line); border-radius:14px; padding:18px; display:flex; flex-direction:column; gap:12px; }
.card h2 { font-size:13px; color:var(--dim); font-weight:600; text-transform:uppercase; letter-spacing:.6px; margin:0; }
.note { min-height:22px; font-size:14px; color:var(--dim); margin-top:10px; text-align:center; }
.err { color:var(--bad); }
.notice { background:var(--warn-bg); border:1px solid var(--warn-line); color:var(--warn); border-radius:12px; padding:10px 14px; font-size:14px; }
.notice a { color:inherit; }
.muted { color:var(--dim); font-size:14px; }

/* пустое состояние */
.empty { text-align:center; padding:34px 18px; }
.empty .ico { width:64px; height:64px; border-radius:50%; background:var(--acc-soft); color:var(--acc-dark); display:flex; align-items:center; justify-content:center; font-size:26px; margin:0 auto 14px; }
.empty h2 { font-size:21px; margin:0 0 6px; }
.empty p { color:var(--dim); margin:0 auto 6px; max-width:440px; }

/* зона перетаскивания и строки файлов */
.drop { display:block; border:2px dashed var(--line2); border-radius:16px; padding:34px 20px; text-align:center; background:var(--card); transition:.15s; cursor:pointer; }
.drop:hover, .drop.over { border-color:var(--acc); background:var(--acc-soft); }
.drop .ico { font-size:34px; color:var(--acc); line-height:1; }
.drop .big { font-size:18px; font-weight:600; margin:10px 0 4px; }
.drop .hint { color:var(--dim); font-size:14px; }
.drop input { display:none; }
.drop.small { padding:14px 20px; }
.drop.small .ico, .drop.small .hint { display:none; }
.drop.small .big { margin:0; font-size:15px; font-weight:500; color:var(--acc-dark); }
.files { margin-top:16px; display:flex; flex-direction:column; gap:8px; }
.file { display:flex; align-items:center; gap:12px; border:1px solid var(--line); border-radius:12px; padding:10px 12px; background:var(--bg); }
.file .kind { width:34px; height:34px; border-radius:9px; background:var(--acc-soft); color:var(--acc-dark); display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:700; flex:none; }
.file .what { flex:1; min-width:0; }
.file .role { font-size:12px; color:var(--dim); text-transform:uppercase; letter-spacing:.5px; }
.file .name { overflow:hidden; text-overflow:ellipsis; }
.file .x { background:none; border:0; color:var(--dim); font-size:20px; line-height:1; padding:4px 6px; }
.file .x:hover { color:var(--bad); }
.file.missing { border-style:dashed; color:var(--dim); }
.file.missing .kind { background:var(--card); color:var(--dim); }
.search { display:flex; gap:8px; flex-wrap:wrap; }
.search input { flex:1; min-width:160px; }
.res { border:1px solid var(--line); border-radius:10px; margin-top:8px; max-height:260px; overflow-y:auto; background:var(--bg); }
.res div { padding:8px 12px; border-bottom:1px solid var(--line); cursor:pointer; font-size:14px; color:var(--fg); }
.res div:last-child { border-bottom:0; }
.res div:hover { background:var(--acc-soft); }
.res small { display:block; color:var(--dim); }
.or { display:flex; align-items:center; gap:12px; color:var(--dim); font-size:13px; margin:14px 0; }
.or::before, .or::after { content:""; flex:1; border-top:1px solid var(--line); }

/* реплики на экране: предыдущие, текущая, перевод */
.screen { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:22px; display:flex; flex-direction:column; gap:10px; min-height:240px; justify-content:flex-end; }
.screen .prev { color:var(--dim); font-size:16px; }
.screen .cur { font-size:27px; line-height:1.35; font-weight:500; min-height:2.7em; }
.screen .nat { font-size:20px; color:var(--nat); font-style:italic; min-height:1.4em; }
.seg { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--bg); }
.seg button { background:none; border:0; color:var(--fg); padding:7px 12px; font-size:14px; }
.seg button:hover { background:var(--acc-soft); }
.seg span { padding:0 6px; color:var(--dim); font-size:13px; min-width:6.5em; text-align:center; }

@media (max-width: 600px) {
  .head { margin:18px auto 16px; }
  .head h1 { font-size:24px; }
  .screen { padding:16px; min-height:200px; }
  .screen .cur { font-size:23px; }
}

/* жаворонок Lalea в пустых состояниях (LT-815) */
.lark { display:block; width:min(200px, 46vw); height:auto; margin:0 auto 14px; }
:root[data-theme=dark] .lark { opacity:.92; }

/* режим телевизора (LT-819): фокус с пульта видно издалека, мелкое крупнее */
html.tv :focus { outline:4px solid var(--acc) !important; outline-offset:3px; box-shadow:0 0 0 9px var(--acc-soft); }
html.tv body { font-size:18px; }
html.tv button, html.tv a { scroll-margin:80px; }
