/* Voting Mini App. Colours come from the Telegram theme (set in app.js);
   these are the fallbacks outside Telegram. System fonts only. */
:root {
  --bg: #e9edf1; --surface: #ffffff; --surface-2: #f3f5f8; --sunk: #e1e6ec;
  --fg: #17202a; --muted: #5b6876; --line: #d6dde4;
  --accent: #2457c5; --accent-soft: #e3ebfb; --on-accent: #ffffff;
  --yes: #1d7f47; --yes-soft: #dcf1e4; --no: #b9362d; --no-soft: #f8e0dd;
  --hmm: #9a6512; --hmm-soft: #f7ead2; --flash: #fff3c4; --sel: #eef3fd;
  --shadow: 0 1px 2px rgba(20,30,40,.06), 0 6px 18px rgba(20,30,40,.08);
  --app-h: 100vh;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --f-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tg]) {
    --bg: #0e1318; --surface: #161d25; --surface-2: #1c252f; --sunk: #111820;
    --fg: #e5ecf2; --muted: #8e9cab; --line: #2a3541;
    --accent: #7aa2ff; --accent-soft: #1d2b49; --on-accent: #0b1220;
    --yes: #4cc27f; --yes-soft: #15301f; --no: #f0776c; --no-soft: #3a1c1a;
    --hmm: #e3ac4c; --hmm-soft: #352813; --flash: #3a3212; --sel: #1a2638;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 22px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-dark] { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--f-ui); font-size: 14px; line-height: 1.45;
  -webkit-text-size-adjust: 100%; font-variant-numeric: tabular-nums;
  overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
/* The app never scrolls as a page: only its body does, so the bars stay put.
   In Telegram's full-screen mode its own controls overlay the top edge. */
.app { position: fixed; left: 0; right: 0; top: 0; height: var(--app-h); display: flex; flex-direction: column; overflow: hidden;
  padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }

/* Font size (A− / A+): every part of the app is scaled together */
.app > *, .toasts { zoom: var(--z, 1); }
/* Top-right corner: font size and the window button, in both layouts */
.corner { position: absolute; z-index: 6; right: 10px;
  top: calc(8px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  display: flex; gap: 4px; align-items: center; }
.cbtn { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; padding: 3px 9px; font-size: 13px; font-weight: 600; min-height: 30px; white-space: nowrap; }
.cbtn:hover { border-color: var(--accent); }
.cbtn[disabled] { opacity: .4; cursor: default; }

/* Splash / message screens */
.splash, .msgscreen { flex: 1; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; color: var(--muted); }
.msgscreen h1 { margin: 0; font-size: 18px; color: var(--fg); }
.msgscreen p { margin: 0; max-width: 34ch; }
.msgscreen .big { font-size: 40px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Shared atoms */
.av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; flex: none; position: relative; border: 2px solid var(--surface); }
.av .v { position: absolute; right: -6px; bottom: -5px; font-size: 11px; line-height: 1; }
.avs { display: inline-flex; } .avs .av + .av { margin-left: -6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 3px; border-radius: 999px; background: var(--accent-soft); color: var(--fg); font-size: 12px; font-weight: 500; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; flex: none; }
.chip.muted { background: var(--surface-2); color: var(--muted); padding: 2px 8px; }
.chip.carried { background: var(--hmm-soft); color: var(--hmm); padding: 2px 8px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 100%; min-width: 0; }
.rel { font-weight: 600; font-size: 12px; color: var(--muted); white-space: nowrap; }
.rel i { display: inline-block; width: 30px; height: 5px; border-radius: 3px; background: var(--sunk); vertical-align: middle; margin-right: 6px; overflow: hidden; position: relative; }
.rel i span { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.muted { color: var(--muted); }
.soon { color: var(--no) !important; }
.cd { font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.cd.closed { background: var(--surface-2); color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.live .av { width: 24px; height: 24px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--yes); box-shadow: 0 0 0 3px var(--yes-soft); }
.live.off::before { background: var(--muted); box-shadow: none; }
.banner { background: var(--hmm-soft); color: var(--hmm); font-weight: 600; font-size: 13px; padding: 8px 14px; }
.banner.soft { background: var(--surface-2); color: var(--muted); font-weight: 500; padding: 6px 14px; }
.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { background: var(--flash); } 100% { background: transparent; } }
.segt { display: inline-flex; background: var(--sunk); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segt::-webkit-scrollbar { display: none; }
.segt button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; min-height: 32px; }
.segt button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.btn { border: 0; background: var(--accent); color: var(--on-accent); border-radius: 10px; padding: 9px 14px; font-weight: 600; white-space: nowrap; min-height: 40px; }
.btn.ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13px; font-weight: 600; justify-self: start; }
.busy { opacity: .7; }
.btn[disabled] { opacity: .5; cursor: default; }
.rescue { border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 7px 12px; font-weight: 600; font-size: 13px; white-space: nowrap; min-height: 36px; }

/* Votes: one control shows the count and casts your vote; yours is filled */
.rxs { display: inline-flex; gap: 6px; white-space: nowrap; }
.rx { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px 4px 9px; font-size: 16px; line-height: 1.2; min-height: 34px; }
.rx b { font-size: 13px; font-weight: 600; color: var(--muted); min-width: 8px; text-align: left; }
.rx:hover { border-color: var(--muted); }
.rx.up.has { background: var(--yes-soft); border-color: transparent; } .rx.up.has b { color: var(--yes); }
.rx.down.has { background: var(--no-soft); border-color: transparent; } .rx.down.has b { color: var(--no); }
.rx.hmm.has { background: var(--hmm-soft); border-color: transparent; } .rx.hmm.has b { color: var(--hmm); }
.rx[aria-pressed="true"] b { color: #fff !important; }
.rx.up[aria-pressed="true"] { background: var(--yes); border-color: var(--yes); box-shadow: 0 0 0 2px var(--yes-soft); }
.rx.down[aria-pressed="true"] { background: var(--no); border-color: var(--no); box-shadow: 0 0 0 2px var(--no-soft); }
.rx.hmm[aria-pressed="true"] { background: var(--hmm); border-color: var(--hmm); box-shadow: 0 0 0 2px var(--hmm-soft); }
.rx[disabled] { opacity: .55; cursor: default; }
.rxs.big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.rxs.big .rx { border-radius: 14px; padding: 8px 6px; display: grid; justify-items: center; gap: 2px; font-size: 22px; min-height: 64px; }
.rxs.big .rx span { font-size: 12px; font-weight: 600; color: var(--muted); }
.rxs.big .rx[aria-pressed="true"] span { color: #fff; }
.rxs.big .rx b { font-size: 15px; text-align: center; }

/* Comments */
.cmts { display: grid; gap: 8px; }
.cmt { font-size: 13px; display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; overflow-wrap: anywhere; }
.cmt .av { width: 22px; height: 22px; font-size: 9px; border: 0; }
.cmt b { font-weight: 600; margin-right: 4px; } .cmt small { color: var(--muted); }
.cform { display: flex; gap: 6px; align-items: flex-end; }
.cform textarea { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 9px 12px; font-size: 16px; line-height: 1.35; resize: none; min-height: 42px; max-height: 120px; }
.cform button { border: 0; background: var(--accent); color: var(--on-accent); border-radius: 12px; min-width: 44px; min-height: 42px; font-weight: 700; font-size: 18px; }
.cform button[disabled] { opacity: .5; }
.cform .count { font-size: 11px; color: var(--muted); align-self: center; }

/* Facts */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; }
.facts dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.facts dd small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.why { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.lbl { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: 4px; }
.why p { margin: 0 0 6px; } .why p:last-child { margin: 0; }
.links { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 13px; }
.links .linkish, .who .linkish { padding: 10px 0; min-height: 40px; }
.voters { display: grid; gap: 6px; font-size: 13px; }
/* Files: each is a button; the bot sends it to the private chat */
.docs { display: grid; gap: 6px; }
.docs .lbl { margin-bottom: 0; }
.files { display: grid; gap: 6px; }
.file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 10px; min-height: 40px; font-size: 13px; }
.file:hover { border-color: var(--accent); }
.file .fi { font-size: 16px; line-height: 1; }
.file .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.hint { margin: 0; font-size: 12px; color: var(--muted); }
.voters div { display: flex; gap: 8px; align-items: center; }

/* ---------------- Desktop ---------------- */
.d-top { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; padding: 12px 250px 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tools-h { font-weight: 600; font-size: 14px; }
.d-top h1 { margin: 0; font-size: 17px; font-weight: 600; }
.d-top h1 small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.d-top-r { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.feedbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 5px 12px; font-size: 13px; font-weight: 500; }
.feedbtn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface); }
.stat { padding: 8px 20px; display: grid; gap: 2px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 20px; font-weight: 600; }
.stat .v small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.stat.ok .v { color: var(--yes); } .stat.bad .v { color: var(--no); }
.bar { height: 5px; border-radius: 3px; background: var(--sunk); overflow: hidden; margin-top: 4px; }
.bar span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tools input[type="search"], .tools select { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 6px 10px; min-height: 34px; }
.tools input[type="search"] { width: 260px; max-width: 100%; }
.tools select { width: auto; max-width: 260px; }
.tools label { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.spacer { flex: 1; }
.split { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--surface); }
.list { overflow: auto; height: 100%; }
table { border-collapse: collapse; width: 100%; min-width: 980px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; } th.sortable:hover { color: var(--fg); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list td:not(.tt) { white-space: nowrap; }
tr.r { cursor: pointer; }
tr.r:hover td { background: var(--surface-2); }
tr.r[aria-selected="true"] td { background: var(--sel); }
td.st { padding: 0; width: 4px; }
td.st span { display: block; width: 4px; min-height: 58px; height: 100%; }
td.st .ok { background: var(--yes); } td.st .bad { background: var(--no); } td.st .none { background: transparent; }
td .t { font-weight: 600; line-height: 1.3; white-space: normal; }
td.tt { min-width: 300px; width: 100%; }
td .c { color: var(--muted); font-size: 12px; margin-top: 2px; white-space: normal; }
td.num { text-align: right; font-weight: 600; }
td.dl small { display: block; color: var(--muted); font-size: 12px; }
td.cc button { border: 0; background: none; padding: 6px; color: var(--muted); font-weight: 600; min-width: 36px; min-height: 34px; }
td.cc button:hover { color: var(--accent); }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); border-left: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; min-height: 0; box-shadow: -14px 0 32px rgba(20,30,40,.16); z-index: 3; }
.panel.anim { animation: slidein .18s ease-out; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.ptabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); background: var(--surface); align-items: flex-end; }
.ptabs button { border: 0; background: none; padding: 8px 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; }
.ptabs button[aria-pressed="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.pclose { margin-left: auto; align-self: center; border: 1px solid var(--line) !important; background: var(--surface) !important; border-radius: 8px; padding: 4px 10px !important; color: var(--muted); font-size: 13px; }
.pbody { flex: 1; min-height: 0; overflow: auto; padding: 16px; display: grid; gap: 14px; align-content: start; }
.pfoot { flex: none; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -4px 14px rgba(20,30,40,.06); }
.pfoot .rxs.big .rx { display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 44px; font-size: 18px; }
.pfoot .rxs.big .rx span { font-size: 13px; }
.pbody h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.pbody .cust { color: var(--muted); margin-top: -8px; }
.feed { display: grid; gap: 10px; }
.ev { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; font-size: 13px; }
.ev small { color: var(--muted); white-space: nowrap; }
.ev button { text-align: left; }
.foot { display: flex; gap: 16px; flex-wrap: wrap; padding: 8px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--surface); }
.foot span { display: inline-flex; gap: 6px; align-items: center; }
kbd { font: 600 11px var(--f-ui); background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--fg); }
.result { flex: 1; overflow: auto; padding: 16px 20px; display: grid; gap: 14px; align-content: start; background: var(--surface); }
.result-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.sheet { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sheet .wrap { overflow-x: auto; }
.sheet table { min-width: 860px; font-size: 13px; }
.sheet td, .sheet th { border-right: 1px solid var(--line); padding: 6px 8px; white-space: normal; }
.sheet th { background: var(--surface-2); position: static; }
.sheet-tabs { display: flex; gap: 2px; border-top: 1px solid var(--line); background: var(--surface-2); padding: 0 8px; overflow-x: auto; }
.sheet-tabs button { border: 0; background: transparent; padding: 8px 12px; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.sheet-tabs button[aria-pressed="true"] { color: var(--yes); border-bottom-color: var(--yes); background: var(--surface); font-weight: 600; }

/* ---------------- Phone ---------------- */
.m-head { display: grid; gap: 6px; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.m-right { display: inline-flex; gap: 6px; align-items: center; }
.m-prog { display: flex; align-items: center; gap: 8px; }
.m-prog .bar { flex: 1; margin: 0; }
.m-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.m-head .cd { flex: none; }
.m-title { font-weight: 600; font-size: 14px; line-height: 1.2; min-width: 0; margin-right: 96px; min-height: 30px; display: flex; align-items: center; }
body.dc .m-title { margin-right: 210px; }
.prog { font-size: 12px; color: var(--muted); }
.m-seg { display: flex; gap: 6px; overflow-x: auto; padding: 6px 12px; background: var(--bg); scrollbar-width: none; flex: none; }
.m-seg::-webkit-scrollbar { display: none; }
.m-seg button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; white-space: nowrap; color: var(--muted); min-height: 32px; }
.m-seg button b { font-weight: 600; }
.m-seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.m-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 12px 12px; overscroll-behavior: contain; touch-action: pan-y; }
.card { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 12px; touch-action: pan-y; position: relative; transition: transform .25s, opacity .25s; }
.card.dragging { transition: none; }
.card .stamp { position: absolute; top: 16px; font-size: 15px; font-weight: 800; padding: 3px 10px; border-radius: 8px; border: 2px solid; opacity: 0; transform: rotate(-8deg); pointer-events: none; z-index: 2; background: var(--surface); }
.card .stamp.up { left: 14px; color: var(--yes); border-color: var(--yes); }
.card .stamp.down { right: 14px; color: var(--no); border-color: var(--no); transform: rotate(8deg); }
.card .stamp.back { left: 14px; color: var(--accent); border-color: var(--accent); transform: none; }
.card h3 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 600; cursor: pointer; }
.card h3.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card .cust { color: var(--muted); font-size: 13px; margin-top: -6px; }
.who { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.pos { text-align: center; color: var(--muted); font-size: 12px; }
.nav { display: flex; justify-content: space-between; align-items: center; padding: 6px 2px 0; }
.nav button { border: 0; background: none; color: var(--accent); font-weight: 500; min-height: 40px; padding: 0 8px; }
.nav button[disabled] { color: var(--muted); opacity: .5; }
/* Vote bar: always at the bottom while the card scrolls; one compact row */
.m-actions { flex: none; padding: 6px 10px calc(6px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(20,30,40,.06); }
.m-actions .rxs.big { gap: 6px; }
.m-actions .rxs.big .rx { display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 44px; padding: 4px 6px; font-size: 18px; border-radius: 12px; }
.m-actions .rxs.big .rx span { font-size: 13px; }
.m-actions .rxs.big .rx b { font-size: 13px; min-width: 0; }
.m-actions .rxs.big, .pfoot .rxs.big { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.m-actions .rxs.big .rx, .pfoot .rxs.big .rx { min-width: 0; overflow: hidden; }
.m-actions .rxs.big .rx span, .pfoot .rxs.big .rx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* A larger font on a phone: the emoji and the count are enough */
body.zoomed:not(.desk) .m-actions .rxs.big .rx span { display: none; }
body.typing .m-actions, body.typing .m-seg, body.typing #mProg, body.typing .pos, body.typing .nav { display: none; }
.lst { display: grid; gap: 8px; padding-top: 8px; }
.li { background: var(--surface); border-radius: 14px; padding: 10px 12px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.li .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.li .m { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.li .open { border: 0; background: none; text-align: left; padding: 0; color: inherit; }
.m-empty { text-align: center; padding: 40px 18px; display: grid; gap: 8px; justify-items: center; }
.m-empty .big { font-size: 40px; }
.m-empty h3 { margin: 0; font-weight: 600; font-size: 17px; }
.m-empty p { margin: 0; color: var(--muted); }
.m-result { display: grid; gap: 10px; padding-top: 8px; }
.m-result h4 { margin: 8px 0 0; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* Toasts */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(66px + var(--safe-b)); display: grid; gap: 8px; z-index: 50; width: min(360px, calc(100vw - 24px)); pointer-events: none; }
.desk .toasts, body.desk .toasts { left: auto; right: 16px; transform: none; bottom: 16px; }
.toast { background: var(--fg); color: var(--bg); border-radius: 12px; padding: 9px 12px; display: flex; gap: 10px; align-items: center; font-size: 13px; box-shadow: var(--shadow); animation: tin .25s ease-out; }
.toast.err { background: var(--no); color: #fff; }
.toast .av { border-color: var(--fg); }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
