:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --surface-3: #eceef2;
  --line: #e7e9ee;
  --ink: #0d0f14;
  --ink-2: #4f5562;
  --ink-3: #8a909c;
  --primary: #0d0f14;        /* головна кнопка */
  --primary-ink: #ffffff;
  --accent: #12a150;         /* навантаження, «ваше» */
  --accent-soft: #e4f6ec;
  --lime: #c8f24a;           /* акцент на темній картці */
  --held: #3b6cf6;
  --held-soft: #e8eefe;
  --warn: #b26a00;
  --warn-soft: #fff3df;
  --bad: #d92d3a;
  --bad-soft: #fde8ea;
  --inv: #0f1116;            /* темна картка активної зарядки */
  --inv-2: #1b1e25;
  --inv-ink: #f4f5f7;
  --inv-ink-2: #9aa0ab;
  --shadow: 0 1px 2px rgb(16 24 40 / .04), 0 8px 24px -12px rgb(16 24 40 / .10);
  --r: 14px;
  --r-lg: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0d10; --surface: #15171c; --surface-2: #1c1f25; --surface-3: #252830; --line: #262a31;
    --ink: #f2f3f5; --ink-2: #b4b9c3; --ink-3: #7d838f;
    --primary: #c8f24a; --primary-ink: #0d0f14;
    --accent: #3ccf7a; --accent-soft: #14301f;
    --held: #7c9cff; --held-soft: #1a2240;
    --warn: #f2b14c; --warn-soft: #33260f;
    --bad: #ff6b74; --bad-soft: #3a171b;
    --inv: #1c1f26; --inv-2: #272b33;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0d10; --surface: #15171c; --surface-2: #1c1f25; --surface-3: #252830; --line: #262a31;
  --ink: #f2f3f5; --ink-2: #b4b9c3; --ink-3: #7d838f;
  --primary: #c8f24a; --primary-ink: #0d0f14;
  --accent: #3ccf7a; --accent-soft: #14301f;
  --held: #7c9cff; --held-soft: #1a2240;
  --warn: #f2b14c; --warn-soft: #33260f;
  --bad: #ff6b74; --bad-soft: #3a171b;
  --inv: #1c1f26; --inv-2: #272b33;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.label { font-size: 13px; color: var(--ink-3); font-weight: 500; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.logo { width: 36px; height: 36px; border-radius: 11px; background: var(--primary); display: grid; place-items: center; flex: none; }
.logo svg { width: 19px; height: 19px; fill: var(--primary-ink); }
.brand-t { min-width: 0; }
h1 { font-size: 16px; font-weight: 700; }
.live { margin-top: 1px; font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); flex: none; }
.live.on .dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.me-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 14px 8px 11px; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; flex: none; box-shadow: var(--shadow); }
.me-btn .ic { width: 17px; height: 17px; color: var(--ink-3); }

/* ---------- розкладка ---------- */
.layout { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
.mine, .board { display: grid; gap: 12px; align-content: start; }
.pane-title { display: none; }
/* телефон: дві вкладки, видно одну */
body[data-tab="mine"] [data-pane="hall"], body[data-tab="hall"] [data-pane="mine"] { display: none; }
.tabs { display: flex; gap: 4px; padding-bottom: 10px; }
.tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-3); font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tabs em { font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.tb-live { background: var(--accent-soft); color: var(--accent); }
.tb-alert { background: var(--held); color: #fff; animation: blink 1.2s ease-in-out infinite; }
.tb-q { background: var(--warn-soft); color: var(--warn); }
.tb-n { background: var(--surface-3); color: var(--ink-2); }
@keyframes blink { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .tb-alert { animation: none; } }
.mini-status { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px 10px 10px; border: 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.mini-status .ms-v { flex: 1; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.mini-status .ms-go { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.mini-status .ms-go .ic { width: 16px; height: 16px; }
@media (max-width: 370px) { .mini-status .ms-v { display: none; } }
/* широкий екран: обидві частини поруч, вкладок нема */
@media (min-width: 900px) {
  .tabs, .mini-status { display: none !important; }
  body[data-tab] [data-pane] { display: revert; }
  body[data-tab] .mine, body[data-tab] .board { display: grid; }
  body[data-tab] .rules { display: block; }
  .pane-title { display: block; font-size: 13px; font-weight: 650; color: var(--ink-3); margin: 0 4px -6px; }
  .layout { grid-template-columns: 380px minmax(0, 1fr); grid-template-areas: "tmine thall" "mine hero" "mine board" "mine stats" "mine feed" "mine rules"; gap: 16px; align-items: start; }
  .t-mine { grid-area: tmine; } .t-hall { grid-area: thall; }
  .mine { grid-area: mine; position: sticky; top: 76px; grid-row: 2 / span 5; }
  .hero { grid-area: hero; } .board { grid-area: board; }
  .stats-card { grid-area: stats; } .feed-card { grid-area: feed; } .rules { grid-area: rules; }
  .board { grid-template-columns: 1fr 1fr; gap: 16px; }
  .board > :first-child { grid-column: 1 / -1; }
}

/* ---------- картки ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; min-height: 32px; flex-wrap: wrap; }
.count { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 99px; background: var(--surface-3); font-size: 13px; font-weight: 650; display: inline-grid; place-items: center; }
.empty { color: var(--ink-3); font-size: 14px; padding: 18px 4px 6px; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r); border: 0; font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; transition: transform .08s, filter .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; cursor: default; }
.btn .ic { width: 18px; height: 18px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--primary); color: var(--primary-ink); min-height: 54px; font-size: 16px; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.queue { background: var(--warn-soft); color: var(--warn); min-height: 54px; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn.xs { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 9px; }
.btn.stop { width: 100%; background: var(--inv-2); color: var(--inv-ink); margin-top: 16px; }
.btn.stop:hover { filter: brightness(1.15); }
.btn.ghost-inv { background: color-mix(in srgb, var(--held) 14%, transparent); color: var(--held); align-self: flex-start; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--held); text-decoration: underline; cursor: pointer; }

/* ---------- головна цифра ---------- */
.hero { background: var(--surface); border-radius: var(--r-lg); padding: 20px 20px 18px; box-shadow: var(--shadow); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; padding: 5px 11px; border-radius: 99px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { background: var(--accent-soft); color: var(--accent); }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.hero-num { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 18px; }
.hero-num .big { font-size: 52px; font-weight: 750; letter-spacing: -.045em; line-height: 1; }
.hero-num .unit { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.hero-num .of { font-size: 15px; color: var(--ink-3); margin-left: 4px; }
.hero-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hb-track { display: flex; height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hb-track i, .meter i, .sp-bar i { display: block; height: 100%; width: 0; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.hb-track .u, .meter .u, .sp-bar .u { background: var(--accent); }
.hb-track .h, .meter .h { background: var(--held); }
.hb-l { display: flex; justify-content: space-between; gap: 6px; margin-top: 7px; font-size: 12.5px; color: var(--ink-3); }
.hb-l b { color: var(--ink); font-weight: 650; }
.hero-kpis { display: flex; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-kpis div { flex: 1 1 0; min-width: 72px; display: flex; flex-direction: column; gap: 1px; }
.hero-kpis b { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.hero-kpis span { font-size: 12.5px; color: var(--ink-3); }

/* ---------- онбординг ---------- */
.onboard { display: flex; flex-direction: column; gap: 8px; }
.ob-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; margin-bottom: 6px; }
.onboard h2 { font-size: 20px; }
.apt-form { display: flex; gap: 8px; margin-top: 10px; }
.apt-form .field { flex: 1; min-width: 0; }

/* ---------- поля ---------- */
.field-group { margin-top: 18px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.field { width: 100%; height: 50px; padding: 0 14px; font: inherit; font-size: 16px; border-radius: var(--r); border: 1.5px solid transparent; background: var(--surface-2); color: var(--ink); transition: border-color .15s, background .15s; }
.field:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.field::placeholder { color: var(--ink-3); }
.big-field { height: 56px; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.input-unit { position: relative; margin-top: 8px; }
.input-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; pointer-events: none; }
.input-unit .field { padding-right: 44px; font-weight: 650; }

/* сегментований перемикач */
.seg { display: flex; padding: 4px; gap: 2px; background: var(--surface-2); border-radius: var(--r); }
.seg button { flex: 1 1 0; min-width: 0; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.seg button small { font-size: 11px; font-weight: 600; margin-left: 2px; opacity: .7; }
.seg button[aria-checked="true"], .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(16 24 40 / .12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-checked="true"], :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: var(--surface-3); } }
.seg.sm button { min-height: 32px; font-size: 13px; padding: 0 12px; }
.seg.sm { padding: 3px; border-radius: 11px; }

.callout { display: flex; gap: 10px; margin-top: 10px; padding: 11px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--ink); font-size: 13px; line-height: 1.4; }
.callout .ic { width: 18px; height: 18px; color: var(--warn); margin-top: 1px; }
.hint { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.hint.warn { display: flex; gap: 8px; color: var(--warn); font-weight: 550; margin: 16px 0 10px; }
.hint.warn .ic { width: 18px; height: 18px; margin-top: 1px; }

/* ---------- старт ---------- */
.start h2 { font-size: 20px; }
.tiles-dev { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 14px; }
.dev { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dev-ic { width: 52px; height: 52px; border-radius: 17px; background: var(--surface-2); display: grid; place-items: center; transition: background .15s, color .15s, transform .1s; }
.dev-ic .ic { width: 23px; height: 23px; }
.dev:active .dev-ic { transform: scale(.94); }
.dev-l { font-size: 12px; font-weight: 550; text-align: center; line-height: 1.2; }
.dev[aria-checked="true"] .dev-ic { background: var(--primary); color: var(--primary-ink); }
.dev[aria-checked="true"] .dev-l { color: var(--ink); font-weight: 650; }

/* вибір розетки */
.socks-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sp { display: flex; flex-direction: column; gap: 8px; padding: 11px; border-radius: var(--r); border: 1.5px solid transparent; background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; }
.sp-top { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.sp-top b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-top em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }
.sp-bar { display: flex; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.sp-bar .n { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.sp-free { font-size: 11.5px; color: var(--ink-3); }
.sp[aria-checked="true"] { border-color: var(--ink); background: var(--surface); }
.sp.no { opacity: .45; cursor: not-allowed; }

/* підсумок перед стартом */
.summary { margin: 20px 0 14px; padding: 4px 0; border-top: 1px solid var(--line); }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0 0; font-size: 14px; }
.summary dt { color: var(--ink-3); }
.summary dd { margin: 0; font-weight: 650; text-align: right; }

/* ---------- моя активна зарядка (темна картка) ---------- */
.charge { background: var(--inv); color: var(--inv-ink); position: relative; overflow: hidden; }
.charge::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--lime) 22%, transparent), transparent); pointer-events: none; }
.ch-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ch-dev { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
.ch-dev .ic { width: 18px; height: 18px; color: var(--lime); }
.ch-tag { font-size: 12px; font-weight: 650; color: var(--inv); background: var(--lime); padding: 3px 9px; border-radius: 99px; }
.ch-timer { font-size: 46px; font-weight: 750; letter-spacing: -.04em; line-height: 1; margin: 18px 0 14px; }
.ch-bar { height: 6px; border-radius: 99px; background: var(--inv-2); overflow: hidden; }
.ch-bar i { display: block; height: 100%; width: 1.5%; border-radius: 99px; background: var(--lime); transition: width .9s linear; }
.ch-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--inv-ink-2); }
.ch-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 0; }
.ch-kv div { background: var(--inv-2); border-radius: 12px; padding: 10px 12px; }
.ch-kv dt { font-size: 12px; color: var(--inv-ink-2); }
.ch-kv dd { margin: 2px 0 0; font-weight: 650; font-size: 15px; }
.ch-note { margin-top: 12px; font-size: 13px; color: var(--inv-ink-2); }
.charge.over .ch-tag { background: var(--bad); color: #fff; }
.charge.over .ch-bar i { background: var(--bad); }
.charge .js-left.over { color: #ff9aa0; font-weight: 650; }

/* пропозиція з черги */
.offer { background: var(--held-soft); box-shadow: inset 0 0 0 1.5px var(--held); display: flex; flex-direction: column; gap: 8px; animation: pulse 2.2s ease-in-out infinite; }
.offer-top { display: flex; justify-content: space-between; align-items: center; }
.offer-top .label { color: var(--held); font-weight: 650; }
.countdown { font-size: 22px; font-weight: 750; letter-spacing: -.02em; color: var(--held); }
.offer h2 { font-size: 20px; }
.offer p { font-size: 14px; color: var(--ink-2); }
@keyframes pulse { 50% { box-shadow: inset 0 0 0 1.5px var(--held), 0 0 0 5px color-mix(in srgb, var(--held) 16%, transparent); } }
@media (prefers-reduced-motion: reduce) { .offer { animation: none; } }

/* чекаю в черзі */
.waiting { display: flex; gap: 16px; align-items: flex-start; }
.wait-pos { flex: none; width: 64px; height: 64px; border-radius: 18px; background: var(--warn-soft); color: var(--warn); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wait-pos b { font-size: 26px; font-weight: 750; line-height: 1; }
.wait-pos span { font-size: 11px; font-weight: 600; }
.wait-t { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.wait-t p { font-size: 13.5px; }

/* ---------- рядки (як транзакції) ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.rows .row + .row { border-top: 1px solid var(--line); }
.ava { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; letter-spacing: -.02em; }
.ava.me { background: var(--accent); color: #fff; }
.ava.held { background: var(--held-soft); color: var(--held); box-shadow: inset 0 0 0 1.5px var(--held); }
.ava.num { background: var(--warn-soft); color: var(--warn); }
.ic-ava .ic { width: 19px; height: 19px; color: var(--ink-2); }
.row-main { flex: 1; min-width: 0; }
.row-t { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.row-s { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.row-v { font-weight: 650; font-size: 15px; }
.row-v.over, .row .js-left.over { color: var(--bad); }
.row .btn { margin-left: 52px; }
.tag { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; }
.day { font-size: 12.5px; font-weight: 650; color: var(--ink-3); margin: 14px 0 2px; }
.day:first-child { margin-top: 0; }

/* розетки на дашборді */
.sockets { display: grid; gap: 10px; }
@media (min-width: 640px) { .sockets { grid-template-columns: repeat(3, 1fr); } }
.sock { background: var(--surface-2); border-radius: 16px; padding: 14px; }
.sock-h { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; }
.sock-n, .sock-v { white-space: nowrap; }
.sock-n { font-weight: 650; }
.sock-v { font-size: 13px; color: var(--ink-3); }
.sock-v b { color: var(--ink); font-weight: 650; font-size: 14px; }
.meter { display: flex; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 10px 0 4px; }
.sock.full .meter .u { background: var(--warn); }
.sock .rows .row + .row { border-color: var(--surface-3); }
.sock .ava:not(.me):not(.held) { background: var(--surface); }
.sock-empty { font-size: 13px; color: var(--ink-3); padding-top: 6px; }

/* ---------- статистика ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 520px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface-2); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.k-v { font-size: 26px; font-weight: 750; letter-spacing: -.03em; }
.k-v.bad { color: var(--bad); }
.k-l { font-size: 12.5px; color: var(--ink-3); }
.sub { margin: 20px 0 6px; font-size: 13px; color: var(--ink-2); }
.toplist { list-style: none; margin: 0; padding: 0; }
.toplist li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.tl-main { flex: 1; min-width: 0; }
.tl-row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; }
.tl-row b { font-weight: 650; }
.tl-track { height: 6px; border-radius: 99px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.tl-track i { display: block; height: 100%; border-radius: 99px; background: var(--ink); width: 0; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.tl-n { font-size: 13px; color: var(--ink-3); width: 30px; text-align: right; }

/* ---------- правила ---------- */
.rules { padding: 0; }
.rules summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 18px; cursor: pointer; font-weight: 650; font-size: 17px; }
.rules summary::-webkit-details-marker { display: none; }
.rules .chev { color: var(--ink-3); transition: transform .2s; }
.rules[open] .chev { transform: rotate(180deg); }
.rules-list { margin: 0; padding: 0 18px 18px 38px; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.rules-list b { color: var(--ink); }
.admin-on { margin: 0 18px 18px; padding: 10px 12px; border-radius: 12px; background: var(--held-soft); font-size: 13px; }

/* ---------- повідомлення ---------- */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 24px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 9px; max-width: calc(100% - 32px); padding: 13px 18px; border-radius: 16px; background: var(--inv); color: var(--inv-ink); font-size: 14px; font-weight: 550; box-shadow: 0 12px 32px -8px rgb(0 0 0 / .35); transition: opacity .2s, transform .25s cubic-bezier(.2, .8, .2, 1); z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { width: 18px; height: 18px; }
.toast.ok .ic { color: var(--lime); }
.toast.err .ic { color: #ff9aa0; }

@media (max-width: 380px) {
  .hero-num .big { font-size: 44px; }
  .dev-ic { width: 46px; height: 46px; }
  .seg button { font-size: 14px; }
}

.more { margin-top: 10px; min-height: 42px; font-size: 14px; }
.sock .row { gap: 10px; flex-wrap: nowrap; }
.sock .ava { width: 36px; height: 36px; font-size: 13px; }
@media (min-width: 640px) { .sockets { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sock { min-width: 0; }
.sock .row-t { white-space: nowrap; }
.seg.sm button { flex: 0 0 auto; }
.sock .row-end .js-left { display: none; }
.row.over .row-v { color: var(--bad); }
[hidden] { display: none !important; }

/* ---------- спрощена форма ---------- */
.opts { margin-top: 16px; border-top: 1px solid var(--line); }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.opt-l { color: var(--ink-3); font-size: 14px; width: 92px; flex: none; }
.opt-v { flex: 1; font-weight: 650; font-size: 16px; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.opt-v small { font-size: 12px; font-weight: 650; color: var(--accent); }
.opt-c { font-size: 13px; font-weight: 600; color: var(--held); }
.opt-open { padding: 14px 0; border-bottom: 1px solid var(--line); }
.add-link { display: block; margin: 14px 0 0; padding: 4px 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.add-link.center { margin: 12px auto 0; color: var(--ink-3); }
.add-more { background: var(--surface); box-shadow: var(--shadow); min-height: 52px; color: var(--ink-2); }
.callout { margin: 16px 0 0; }
.callout b { font-weight: 700; }
.go { margin-top: 12px; }
.go-sub { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.sp { align-items: flex-start; position: relative; }
.sp-n { font-size: 24px; font-weight: 750; line-height: 1; letter-spacing: -.02em; }
.sp em { position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }
.sp-bar { width: 100%; }
.eta { font-weight: 650; color: var(--warn); font-size: 14px; }
.ch-kv dd small { display: block; font-size: 12px; font-weight: 500; color: var(--inv-ink-2); }

/* ---------- «Завершити» — головна дія, коли щось заряджається ---------- */
.btn.stop { background: var(--lime); color: #0d0f14; min-height: 58px; font-size: 17px; font-weight: 750; margin-top: 18px; }
.btn.stop .ic { width: 20px; height: 20px; }
.btn.stop:hover { filter: brightness(1.05); }
.charge.over .btn.stop { background: var(--bad); color: #fff; }
.charge.pending, .row.pending { opacity: .5; }
.stopbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.sb-in { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 20px; background: var(--inv); color: var(--inv-ink); box-shadow: 0 12px 32px -10px rgb(0 0 0 / .45); }
.sb-ic .ic { color: var(--lime); }
.sb-t { flex: 1; display: flex; flex-direction: column; min-width: 0; font-size: 13px; color: var(--inv-ink-2); }
.sb-t b { color: var(--inv-ink); font-size: 14px; }
.btn.stop-sm { background: var(--lime); color: #0d0f14; min-height: 46px; padding: 0 18px; font-weight: 750; border-radius: 14px; }
@media (min-width: 900px) { .stopbar { display: none; } }

/* повідомлення з «Скасувати» */
.toast.has-undo { pointer-events: auto; padding: 8px 8px 8px 18px; bottom: calc(92px + env(safe-area-inset-bottom)); }
.undo { margin-left: 6px; border: 0; border-radius: 11px; background: var(--lime); color: #0d0f14; font: inherit; font-weight: 750; font-size: 14px; padding: 10px 14px; cursor: pointer; }
.tiles-dev { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dev-l { font-size: 11.5px; hyphens: manual; }
.status { white-space: nowrap; }

/* ---------- сповіщення і встановлення ---------- */
.mine-main { display: grid; gap: 12px; }
.mine { gap: 12px; }
.notify { display: flex; gap: 14px; align-items: flex-start; }
.nt-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--held-soft); color: var(--held); display: grid; place-items: center; }
.nt-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nt-t b { font-size: 16px; }
.nt-t p { font-size: 13.5px; color: var(--ink-2); }
.nt-t .ic.in { width: 16px; height: 16px; vertical-align: -3px; color: var(--held); }
.nt-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.notify-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); padding: 2px 6px; }
.notify-line .ic { width: 16px; height: 16px; color: var(--accent); }
.notify-line.muted .ic { color: var(--ink-3); }
.nt-solo .btn { width: 100%; }
.wait-act { display: flex; gap: 8px; flex-wrap: wrap; }
.wait-act .btn .ic { width: 16px; height: 16px; }
