/* افراچوب — یک عنصرِ به‌یادماندنی: «متر نواری» (نوارِ زردِ نجاری با درجه‌ها) که مسیرِ هر پروژه را
   از ورودِ مشتری تا تحویل نشان می‌دهد. بقیه آرام و کاری: سطحِ ملامینه، جوهرِ گرافیتی، نوارِ کناریِ گردویی. */

:root {
  --board: #f4f5f2;
  --panel: #ffffff;
  --ink: #1f2328;
  --dim: #5f6670;
  --faint: #8b9199;
  --line: #d9dbd6;
  --line-2: #e8e9e5;
  --walnut: #2b1d14;
  --walnut-2: #4a3323;
  --walnut-ink: #efe6dc;
  --tape: #f2c230;
  --tape-ink: #2b1d14;
  --tape-dim: #f7dc84;
  --ok: #2e7d5b;
  --ok-bg: #e3f1ea;
  --late: #c0392b;
  --late-bg: #fbe7e4;
  --wait: #4f6a96;
  --wait-bg: #e6ecf6;
  --focus: #1f6feb;
  --r-s: 6px;
  --r-m: 10px;
  --shadow: 0 1px 0 rgba(31, 35, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --board: #16181b; --panel: #1d2024; --ink: #e8e6e1; --dim: #a7adb5; --faint: #7d838b;
    --line: #30343a; --line-2: #262a2f; --walnut: #120c08; --walnut-2: #2b1d14; --walnut-ink: #e8ddd0;
    --tape: #e8b923; --tape-dim: #6b5a1c; --ok: #5cc097; --ok-bg: #173127; --late: #f0806f; --late-bg: #3a1d19;
    --wait: #93abd6; --wait-bg: #1e2738; --focus: #6aa5ff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --board: #16181b; --panel: #1d2024; --ink: #e8e6e1; --dim: #a7adb5; --faint: #7d838b;
  --line: #30343a; --line-2: #262a2f; --walnut: #120c08; --walnut-2: #2b1d14; --walnut-ink: #e8ddd0;
  --tape: #e8b923; --tape-dim: #6b5a1c; --ok: #5cc097; --ok-bg: #173127; --late: #f0806f; --late-bg: #3a1d19;
  --wait: #93abd6; --wait-bg: #1e2738; --focus: #6aa5ff; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--board); color: var(--ink);
  font: 400 15px/1.75 Vazirmatn, Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.boot { padding: 40px; color: var(--dim); }
h1, h2, h3 { line-height: 1.35; margin: 0; }
h1 { font-size: 24px; font-weight: 900; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.num { font-feature-settings: "tnum"; white-space: nowrap; }
.dim { color: var(--dim); }
.faint { color: var(--faint); font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── پوسته */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  background: var(--walnut); color: var(--walnut-ink); padding: 18px 12px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; text-decoration: none; }
.brand b { font-size: 20px; font-weight: 900; letter-spacing: -.2px; }
.brand small { display: block; font-size: 12px; opacity: .7; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: var(--r-s);
  text-decoration: none; color: var(--walnut-ink); opacity: .82;
}
.nav a:hover { background: var(--walnut-2); opacity: 1; }
.nav a[aria-current="page"] { background: var(--tape); color: var(--tape-ink); opacity: 1; font-weight: 700; }
.nav .count { font-size: 12px; background: rgba(255,255,255,.14); border-radius: 99px; padding: 0 8px; }
.nav a[aria-current="page"] .count { background: rgba(43,29,20,.15); }
.side .me { margin-top: auto; padding: 10px 12px; font-size: 13px; border-top: 1px solid rgba(255,255,255,.1); }
.side .me button { background: none; border: 0; color: var(--walnut-ink); opacity: .75; padding: 0; cursor: pointer; text-decoration: underline; }
.main { min-width: 0; padding: 24px 28px 80px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.top p { margin: 2px 0 0; color: var(--dim); }

.tabbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 16px 16px 92px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 20;
    background: var(--walnut); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { text-align: center; color: var(--walnut-ink); text-decoration: none; font-size: 12px; padding: 6px 2px; border-radius: var(--r-s); opacity: .8; }
  .tabbar a[aria-current="page"] { background: var(--tape); color: var(--tape-ink); opacity: 1; font-weight: 700; }
}

/* ── اجزا */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); }
.pad { padding: 16px 18px; }
.stack { display: grid; gap: 14px; }
.stack > *, .grid2 > * { min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 14px;
  border-radius: var(--r-s); border: 1px solid var(--line); background: var(--panel); cursor: pointer; text-decoration: none; font-weight: 500;
}
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--walnut); color: var(--walnut-ink); border-color: var(--walnut); }
.btn.primary:hover { background: var(--walnut-2); }
.btn.go { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.stop { color: var(--late); border-color: color-mix(in srgb, var(--late) 45%, var(--line)); }
.btn.small { min-height: 30px; padding: 2px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--focus); cursor: pointer; text-decoration: underline; }

label.f { display: grid; gap: 4px; font-size: 13px; color: var(--dim); }
.in, select.in, textarea.in {
  width: 100%; min-height: 40px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--panel); color: var(--ink); font-size: 15px;
}
textarea.in { min-height: 76px; resize: vertical; }
.in:focus { outline: 2px solid var(--focus); outline-offset: -1px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }

.badge { display: inline-block; font-size: 12px; padding: 1px 9px; border-radius: 99px; background: var(--line-2); color: var(--dim); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.late { background: var(--late-bg); color: var(--late); font-weight: 700; }
.badge.wait { background: var(--wait-bg); color: var(--wait); }
.badge.tape { background: var(--tape); color: var(--tape-ink); font-weight: 700; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: right; font-weight: 500; color: var(--dim); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr.clickable { cursor: pointer; }
table.t tr.clickable:hover td { background: var(--line-2); }
.scroll { overflow-x: auto; }

.empty { padding: 28px 18px; text-align: center; color: var(--dim); }
.err { color: var(--late); background: var(--late-bg); border-radius: var(--r-s); padding: 8px 12px; font-size: 14px; }
.note { background: var(--line-2); border-radius: var(--r-s); padding: 8px 12px; font-size: 14px; color: var(--dim); }

/* ── متر نواری */
.tape { position: relative; padding-top: 6px; }
.tape-body {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); min-height: 46px;
  background: var(--tape); border-radius: 4px; position: relative; overflow: hidden;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.08);
}
.tape-seg { position: relative; border-inline-start: 2px solid var(--tape-ink); display: flex; align-items: flex-end; padding: 0 6px 4px; min-width: 0; }
.tape-seg:first-child { border-inline-start: 0; }
.tape-seg .lbl { font-size: 11.5px; font-weight: 700; color: var(--tape-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tape-seg .no { position: absolute; top: 2px; inset-inline-start: 5px; font-size: 13px; font-weight: 900; color: var(--tape-ink); }
.ticks { position: absolute; inset: 0 0 auto 0; height: 14px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.tick { border-inline-start: 1px solid var(--tape-ink); height: 9px; opacity: .55; }
.tick.done { height: 14px; opacity: 1; }
.tick.now { height: 100%; border-inline-start: 3px solid var(--late); opacity: 1; }
.tape-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: rgba(43, 29, 20, .14); pointer-events: none; }
.tape-hook {
  position: absolute; top: -2px; width: 14px; height: 54px; background: var(--walnut); border-radius: 2px;
  transform: translateX(50%); box-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.tape.mini .tape-body { min-height: 14px; border-radius: 3px; }
.tape.mini .tape-seg { border-inline-start-width: 1px; padding: 0; }
.tape.mini .tape-hook { height: 22px; width: 6px; top: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .tape.live .tape-fill { animation: pull .9s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes pull { from { transform: scaleX(0); transform-origin: right; } to { transform: scaleX(1); transform-origin: right; } }
}

/* ── گام‌ها */
.phase { margin-top: 6px; }
.phase > h3 { display: flex; gap: 8px; align-items: baseline; padding: 4px 2px; }
.phase > h3 .no { color: var(--faint); font-weight: 900; }
.step { border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel); margin: 6px 0; }
.step > button.head {
  width: 100%; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; text-align: right;
  background: none; border: 0; padding: 9px 12px; cursor: pointer;
}
.step .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.step.s-done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.s-skipped .dot { background: var(--line-2); color: var(--faint); }
.step.s-ready .dot, .step.s-active .dot { border-color: var(--tape); background: var(--tape); color: var(--tape-ink); }
.step.s-waiting .dot { border-color: var(--wait); color: var(--wait); }
.step.s-locked { opacity: .62; }
.step.s-ready, .step.s-active { border-color: color-mix(in srgb, var(--tape) 70%, var(--line)); }
.step .t { font-weight: 500; }
.step .meta { font-size: 12.5px; color: var(--faint); }
.step .body { padding: 2px 14px 14px 14px; border-top: 1px dashed var(--line); display: grid; gap: 12px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; }
.kpi b { display: block; font-size: 26px; font-weight: 900; line-height: 1.2; }
.kpi span { color: var(--dim); font-size: 13px; }
.kpi.alarm b { color: var(--late); }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.timeline li { display: grid; grid-template-columns: 1fr; gap: 1px; padding-inline-start: 12px; border-inline-start: 2px solid var(--line); }
.timeline li.k-reject, .timeline li.k-override { border-color: var(--late); }
.timeline li.k-done, .timeline li.k-approve { border-color: var(--ok); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 8px 12px; cursor: pointer; color: var(--dim); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--tape); font-weight: 700; }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.file { border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; font-size: 12px; background: var(--panel); text-decoration: none; display: grid; }
.file img { width: 100%; height: 90px; object-fit: cover; display: block; background: var(--line-2); }
.file .ph { height: 90px; display: grid; place-items: center; background: var(--line-2); color: var(--dim); font-weight: 700; }
.file span { padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.modal-back { position: fixed; inset: 0; background: rgba(15, 12, 10, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.toast { position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 60; background: var(--walnut); color: var(--walnut-ink); padding: 10px 16px; border-radius: var(--r-s); }
@media (max-width: 860px) { .toast { bottom: 84px; inset-inline: 16px; } }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--walnut); }
.auth .panel { width: min(400px, 100%); padding: 26px; }
.auth .tape { margin: 4px 0 18px; }

.track { max-width: 640px; margin: 0 auto; padding: 32px 16px; }
.track ol { list-style: none; padding: 0; display: grid; gap: 6px; }
.track li { padding: 8px 12px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--panel); }
.track li.done { color: var(--ok); }
.track li.now { border-color: var(--tape); background: color-mix(in srgb, var(--tape) 22%, var(--panel)); font-weight: 700; }
@media print { .side, .tabbar, .btn { display: none !important; } .shell { display: block; } .main { padding: 0; } }
.side-file { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
@media (max-width: 1100px) { .side-file { position: static; max-height: none; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.primary { background: var(--tape); color: var(--tape-ink); border-color: var(--tape); }
}
:root[data-theme="dark"] .btn.primary { background: var(--tape); color: var(--tape-ink); border-color: var(--tape); }

/* ═══════════════════════ نسخهٔ ۲: پوستهٔ وب‌اپ، نوارِ بالا، کارت‌های موبایل، بُرد، اسکلت ═══════════════════════ */
:root { --tap: 44px; --topbar: 60px; --ease: cubic-bezier(.2,.7,.2,1); }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 16px; height: 16px; }
.nav a .ico { opacity: .9; }
.nav a > span:first-child { display: inline-flex; gap: 10px; align-items: center; }

/* نوارِ بالا */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  min-height: var(--topbar); padding: 8px 28px; padding-top: max(8px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--board) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-2);
}
.topbar .search { flex: 1; max-width: 460px; position: relative; }
.topbar .search .in { padding-inline-start: 38px; min-height: 42px; }
.topbar .search .ico { position: absolute; inset-inline-start: 11px; top: 11px; color: var(--faint); }
.topbar .brand-sm { display: none; font-weight: 900; text-decoration: none; }
.iconbtn {
  position: relative; display: inline-grid; place-items: center; width: var(--tap); height: var(--tap);
  border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--ink);
  transition: background .15s var(--ease);
}
.iconbtn:hover { background: var(--line-2); }
.iconbtn:active { background: var(--line); }
.iconbtn .dot-n {
  position: absolute; top: 6px; inset-inline-end: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--late); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1;
}
.searchres { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 40; max-height: 60vh; overflow: auto; }
.searchres a { display: block; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.searchres a:hover, .searchres a:focus-visible { background: var(--line-2); }
.drop { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); width: min(380px, calc(100vw - 24px)); z-index: 40; max-height: 70vh; overflow: auto; }
.drop .item { padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.drop .item.unread { background: color-mix(in srgb, var(--tape) 12%, var(--panel)); }
.main { padding-top: 20px; }
@media (max-width: 860px) {
  .topbar { padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .topbar .brand-sm { display: inline-flex; align-items: center; gap: 6px; }
  .topbar .search { display: none; }
  .topbar .search.open { display: block; position: fixed; inset: 0 0 auto 0; padding: 10px 12px; background: var(--board); max-width: none; z-index: 45; }
  .topbar .search.open .ico { top: 21px; inset-inline-start: 23px; }
  .topbar .spacer { flex: 1; }
  .main { padding-top: 14px; }
}
@media (min-width: 861px) { .only-mobile { display: none !important; } }
@media (max-width: 860px) { .only-desktop { display: none !important; } }

/* نوارِ پایین با آیکون و «بیشتر» */
@media (max-width: 860px) {
  .tabbar a, .tabbar button {
    display: grid; justify-items: center; gap: 2px; min-height: 52px; align-content: center;
    background: none; border: 0; color: var(--walnut-ink); font: inherit; font-size: 11.5px; opacity: .82; border-radius: 10px; cursor: pointer;
  }
  .tabbar a[aria-current="page"] { opacity: 1; }
  .tabbar .ico { width: 22px; height: 22px; }
}
.sheet-back { position: fixed; inset: 0; z-index: 55; background: rgba(15,12,10,.45); display: flex; align-items: flex-end; }
.sheet {
  width: 100%; max-height: 85vh; overflow: auto; background: var(--panel); border-radius: 18px 18px 0 0;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); animation: rise .22s var(--ease);
}
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 2px auto 12px; }
.sheet a, .sheet button.row-btn {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px; text-decoration: none;
  border-radius: 10px; width: 100%; background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer;
}
.sheet a:active, .sheet button.row-btn:active { background: var(--line-2); }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }

/* اندازهٔ لمس */
@media (pointer: coarse) {
  .btn { min-height: var(--tap); }
  .btn.small { min-height: 40px; padding: 4px 12px; }
  .in, select.in { min-height: 46px; font-size: 16px; } /* ۱۶px: آیفون روی فیلد زوم نمی‌کند */
  .step > button.head { min-height: 56px; }
}
.btn:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; } }

/* جدول ← کارت در موبایل */
@media (max-width: 720px) {
  table.t.cards thead { display: none; }
  table.t.cards, table.t.cards tbody, table.t.cards tr, table.t.cards td { display: block; width: 100%; }
  table.t.cards tr { border: 1px solid var(--line); border-radius: var(--r-m); margin: 0 0 10px; padding: 10px 12px; background: var(--panel); }
  table.t.cards td { border: 0; padding: 3px 0; }
  table.t.cards td[data-l]::before { content: attr(data-l); display: inline-block; min-width: 92px; color: var(--faint); font-size: 12.5px; }
  .panel.scroll:has(table.t.cards) { background: none; border: 0; box-shadow: none; }
}

/* بُردِ فازها */
.board { align-items: start; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.lane { background: var(--line-2); border-radius: var(--r-m); padding: 10px; min-height: 140px; scroll-snap-align: start; }
.lane h3 { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 8px; }
.card {
  display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 10px 12px; margin-bottom: 8px; transition: border-color .15s var(--ease);
}
.card:hover { border-color: var(--faint); }
.card .tape { margin: 6px 0 2px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; cursor: pointer; color: var(--dim); min-height: 36px; font: inherit; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }

/* اسکلتِ بارگذاری */
.skel { display: grid; gap: 10px; }
.skel i { display: block; height: 16px; border-radius: 6px; background: linear-gradient(90deg, var(--line-2), var(--line), var(--line-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skel i:nth-child(2) { width: 82%; } .skel i:nth-child(3) { width: 64%; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } }

/* پروژه در موبایل: گام‌ها / پرونده */
@media (max-width: 1100px) {
  .proj-split[data-view="steps"] .side-file { display: none; }
  .proj-split[data-view="file"] .steps-col { display: none; }
}
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { width: 40px; height: 22px; appearance: none; background: var(--line); border-radius: 99px; position: relative; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s var(--ease); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { inset-inline-start: 21px; }
.install-hint { font-size: 13px; color: var(--dim); }
.offline-bar { position: fixed; inset: auto 0 0 0; z-index: 70; background: var(--late); color: #fff; text-align: center; font-size: 13px; padding: 6px; }
@media (max-width: 860px) { .offline-bar { bottom: calc(64px + env(safe-area-inset-bottom)); } }
