:root {
  --bg: #0a0a0b; --panel: #121214; --panel2: #18181b; --line: #232327; --line2: #2e2e34;
  --text: #ececee; --muted: #8b8b94; --dim: #5d5d66;
  --lime: #b5fc0c; --lime-ink: #0d1400; --lime-soft: rgba(181, 252, 12, .10); --lime-line: rgba(181, 252, 12, .32);
  --red: #ff5d5d; --red-soft: rgba(255, 93, 93, .12); --amber: #ffc24a; --amber-soft: rgba(255, 194, 74, .12);
  --r: 18px; --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Inter", "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--lime); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; color: #fff; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 750; }
h3 { font-size: 15px; font-weight: 700; }
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }

/* sidebar */
.side { padding: 26px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.brand { display: block; padding: 0 8px 26px; }
.brand img { width: 140px; display: block; }
nav a { display: flex; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 600; margin-bottom: 2px; transition: background .2s, color .2s; }
nav a:hover { color: var(--text); background: var(--panel); }
nav a.on { color: #fff; background: var(--panel2); }
nav a.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); margin-right: 10px; }
.pill { margin-left: auto; background: var(--lime); color: var(--lime-ink); font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 0 7px; line-height: 19px; }
.pill:empty { display: none; }
.side-foot { margin-top: auto; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.side-foot b { color: #fff; }

/* main */
main { padding: 34px 42px 80px; max-width: 1180px; width: 100%; }
.enter { animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.head p { margin: 6px 0 0; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1.3fr 1fr; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* buttons + inputs */
button, .btn { font: inherit; font-weight: 650; border-radius: 12px; padding: 10px 16px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s var(--ease), background .2s, border-color .2s, opacity .2s; }
button:hover, .btn:hover { border-color: #3d3d45; background: #1f1f23; }
button:active, .btn:active { transform: scale(.97); }
.lime { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.lime:hover { background: #c4ff3a; border-color: #c4ff3a; }
.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.ghost:hover { background: var(--panel2); color: var(--text); }
.big { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.danger { color: var(--red); }
button:disabled { opacity: .45; cursor: default; transform: none; }
input[type=text], input[type=url], input[type=number], textarea, select {
  font: inherit; width: 100%; color: #fff; background: var(--bg); border: 1px solid var(--line2); border-radius: 12px; padding: 11px 13px; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
input[type=checkbox] { accent-color: var(--lime); width: 18px; height: 18px; }
label.f { display: block; font-size: 13px; font-weight: 650; margin: 16px 0 7px; color: var(--text); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
code { background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; padding: 2px 7px; font-size: 12.5px; color: var(--text); word-break: break-all; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line2); white-space: nowrap; }
.badge.lime { background: var(--lime-soft); color: var(--lime); border-color: var(--lime-line); }
.badge.amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(255, 194, 74, .3); }
.badge.red { background: var(--red-soft); color: var(--red); border-color: rgba(255, 93, 93, .3); }

/* home */
.live.on { border-color: var(--lime-line); background: radial-gradient(120% 140% at 0% 0%, rgba(181, 252, 12, .10), transparent 55%), var(--panel); }
.go { display: flex; gap: 10px; margin-top: 16px; }
.go .prefix { display: flex; align-items: center; flex: 1; background: var(--bg); border: 1px solid var(--line2); border-radius: 14px; padding-left: 14px; transition: border-color .2s, box-shadow .2s; }
.go .prefix:focus-within { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.go .prefix span { color: var(--dim); }
.go .prefix input { border: 0; background: transparent; box-shadow: none; padding-left: 2px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(181, 252, 12, .7); animation: pulse 1.8s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(181, 252, 12, 0); } 100% { box-shadow: 0 0 0 0 rgba(181, 252, 12, 0); } }
.clipit { width: 100%; margin-top: 18px; padding: 22px; font-size: 22px; font-weight: 850; letter-spacing: -.01em; border-radius: 16px; background: var(--lime); color: var(--lime-ink); border: 0; box-shadow: 0 10px 40px rgba(181, 252, 12, .18); }
.clipit:hover { background: #c4ff3a; }
.clipit.flash { animation: flash .6s var(--ease); }
@keyframes flash { 30% { transform: scale(1.03); box-shadow: 0 0 0 14px rgba(181, 252, 12, .25); } }
kbd { font: 600 12px ui-monospace, Menlo, monospace; background: var(--panel2); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; color: var(--text); }
.alt { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.meter { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; margin: 12px 0 6px; }
.meter i { display: block; height: 100%; background: var(--lime); border-radius: 99px; transition: width .6s var(--ease); }
.big-n { font-size: 40px; font-weight: 850; color: #fff; letter-spacing: -.03em; line-height: 1; }
.big-n small { font-size: 18px; color: var(--muted); font-weight: 700; }
.next { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.next:first-child { border-top: 0; }
.next img { width: 40px; height: 70px; object-fit: cover; border-radius: 8px; background: var(--panel2); flex: none; }
.next time { color: var(--lime); font-weight: 700; font-size: 13px; }
.cta { display: flex; align-items: center; gap: 14px; }
.cta .n { font-size: 34px; font-weight: 850; color: var(--lime); }
.ev { display: flex; gap: 10px; padding: 7px 0; font-size: 13.5px; border-top: 1px solid var(--line); color: var(--muted); }
.ev:first-child { border-top: 0; }
.ev time { flex: none; width: 62px; white-space: nowrap; color: var(--dim); font-variant-numeric: tabular-nums; }
.ev.error { color: var(--red); }

.toggle.auto { border-top: 0; padding: 14px 0 2px; }

.plan-now { margin-top: 12px; }
.pn-name { color: #fff; font-weight: 800; font-size: 20px; }

/* review deck */
.deck-wrap { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: start; }
.deck { position: relative; aspect-ratio: 9 / 16; height: clamp(340px, calc(100vh - 390px), 700px); margin: 0 auto; }
.swipe { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: #000; border: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); touch-action: pan-y; user-select: none; cursor: grab; transition: transform .38s var(--ease), opacity .38s; will-change: transform; }
.swipe.dragging { transition: none; cursor: grabbing; }
.swipe.behind { transform: scale(.93) translateY(18px); opacity: .45; pointer-events: none; }
.swipe video, .swipe img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.stamp { position: absolute; top: 28px; padding: 6px 14px; border-radius: 12px; font-weight: 900; font-size: 26px; letter-spacing: .05em; border: 3px solid; opacity: 0; background: rgba(0, 0, 0, .4); }
.stamp.yes { left: 22px; color: var(--lime); border-color: var(--lime); transform: rotate(-12deg); }
.stamp.no { right: 22px; color: var(--red); border-color: var(--red); transform: rotate(12deg); }
.sound { position: absolute; bottom: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; padding: 0; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(6px); }
.busy { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: rgba(10, 10, 11, .8); backdrop-filter: blur(4px); color: var(--text); font-weight: 650; text-align: center; padding: 20px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line2); border-top-color: var(--lime); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.controls { display: flex; justify-content: center; align-items: flex-end; gap: 26px; margin-top: 22px; }
.round { width: 62px; height: 62px; border-radius: 50%; padding: 0; font-size: 22px; flex-direction: column; gap: 0; }
.round.yes { background: var(--lime); color: var(--lime-ink); border: 0; width: 76px; height: 76px; font-size: 30px; box-shadow: 0 10px 30px rgba(181, 252, 12, .22); }
.round.yes:hover { background: #c4ff3a; }
.round.no { color: var(--red); }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.title-in { font-size: 24px !important; font-weight: 800; background: transparent !important; border: 1px solid transparent !important; padding: 4px 8px !important; margin: 0 -9px; border-radius: 10px; color: #fff; }
.title-in:hover { border-color: var(--line2) !important; }
.title-in:focus { border-color: var(--lime) !important; }
.note { border-radius: 12px; padding: 10px 13px; font-size: 13.5px; margin-top: 12px; }
.note.amber { background: var(--amber-soft); color: var(--amber); }
.note.lime { background: var(--lime-soft); color: var(--lime); }
.note.red { background: var(--red-soft); color: var(--red); }
.sheet { margin-top: 18px; padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--lime-line); animation: fade .25s var(--ease); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0; }
.chip { font-size: 13px; padding: 6px 12px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line2); color: var(--text); cursor: pointer; font-weight: 600; }
.chip:hover { border-color: var(--lime-line); color: var(--lime); }
.keys { color: var(--dim); font-size: 12.5px; margin-top: 22px; }
.empty { text-align: center; padding: 80px 20px; color: var(--muted); border: 1px dashed var(--line2); border-radius: var(--r); }
.empty h2 { margin-bottom: 8px; }

/* timeline */
.tl { margin-top: 14px; }
.tl-track { position: relative; height: 58px; border-radius: 12px; background-size: 100% 100%; background-color: var(--panel2); border: 1px solid var(--line2); cursor: ew-resize; touch-action: none; user-select: none; transition: transform .15s var(--ease); }
.tl-track.on { transform: scaleY(1.06); }
.tl-dim { position: absolute; top: 0; bottom: 0; right: 0; left: 0; background: rgba(10, 10, 11, .55); border-radius: 0 11px 11px 0; pointer-events: none; }
.tl-head { position: absolute; top: -8px; bottom: -8px; width: 3px; margin-left: -1.5px; background: var(--lime); border-radius: 2px; box-shadow: 0 0 12px rgba(181, 252, 12, .6); pointer-events: none; }
.tl-head span { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -4px); background: var(--lime); color: var(--lime-ink); font: 800 11px ui-monospace, Menlo, monospace; padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
.tl-mark { position: absolute; bottom: -10px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #fff; border: 2px solid var(--lime); cursor: pointer; z-index: 2; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.tl-mark span { display: block; transform: rotate(45deg); font: 800 10px/16px -apple-system, sans-serif; text-align: center; color: #000; }
.tl-mark:hover { background: var(--lime); }
.tl-bar { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.tl-bar #tlclock { font-variant-numeric: tabular-nums; }
.note-form { display: flex; gap: 8px; align-items: center; margin-top: 10px; padding: 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--lime-line); animation: fade .2s var(--ease); }
.note-form input { padding: 8px 10px; }
.pin { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.pin:first-child { border-top: 0; }
.pin b { color: var(--lime); margin-right: 4px; }
.pin-t { flex: 1; color: #fff; font-size: 14px; }
.small { font-size: 13px; }
button.small { padding: 6px 10px; }

/* add-channel dialog */
dialog.addch { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 20px; padding: 24px; width: min(560px, 94vw); box-shadow: 0 30px 90px rgba(0, 0, 0, .7); }
dialog.addch::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
.ideas { display: grid; gap: 8px; margin-top: 16px; max-height: 300px; overflow: auto; }
.idea { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; justify-content: stretch; padding: 12px 14px; border-radius: 14px; }
.idea b { color: #fff; font-size: 15px; }
.idea .t { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.idea .t.w { color: var(--amber); }
.idea.on { border-color: var(--lime); background: var(--lime-soft); }

.seg { display: flex; gap: 6px; }
.seg button { flex: 1; flex-direction: column; gap: 0; padding: 8px 10px; font-size: 14px; }
.seg button small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.seg button.on { border-color: var(--lime); background: var(--lime-soft); color: var(--lime); }
.seg button.on small { color: var(--lime); }

/* analytics */
.seg-s button { flex: none; padding: 6px 12px; font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.kpi-l { font-size: 13px; color: var(--muted); font-weight: 650; }
.kpi-n { font-size: 34px; font-weight: 850; color: #fff; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-s { font-size: 12px; color: var(--dim); margin-top: 4px; }
.vbars { display: flex; align-items: flex-end; gap: 2px; height: 150px; margin-top: 16px; border-bottom: 1px solid var(--line2); }
.vbars .bar { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: pointer; }
.vbars .bar i { display: block; width: 100%; background: var(--lime); border-radius: 4px 4px 0 0; opacity: .85; transition: opacity .15s; }
.vbars .bar:hover i, .vbars .bar.on i { opacity: 1; box-shadow: 0 0 14px rgba(181, 252, 12, .35); }
.vaxis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--dim); margin-top: 6px; }
.tp { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.tp:first-of-type { border-top: 0; }
.tp img, .tp-ph { width: 48px; height: 84px; border-radius: 8px; object-fit: cover; background: var(--panel2); flex: none; }
.tp-b { flex: 1; min-width: 0; }
.tp-t { color: #fff; font-weight: 700; }
.tp-m { font-size: 13px; color: var(--muted); margin-top: 3px; }
.tp-m b { color: #fff; }
.up { color: var(--lime); font-weight: 700; }
.tp-p { display: flex; gap: 10px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.cm { display: flex; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.cm:first-of-type { border-top: 0; }
.cm.more { display: none; }
.card.all .cm.more { display: flex; }
.cm .av { width: 32px; height: 32px; font-size: 13px; }
.cm-h { font-size: 13px; } .cm-h b { color: #fff; }
.cm-t { color: var(--text); font-size: 14.5px; margin: 2px 0; word-wrap: break-word; }
.chs { padding: 12px 0; border-top: 1px solid var(--line); }
.chs:first-of-type { border-top: 0; }
.chs b { color: #fff; }
.bio { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.bio code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* phone swipe review */
.m-review { display: flex; flex-direction: column; align-items: stretch; }
.m-deck { aspect-ratio: 9 / 16; width: auto; max-width: 100%; margin: 0 auto; height: calc(100vh - 318px) !important; height: calc(100dvh - 318px) !important; min-height: 360px; }
.m-deck .swipe { border-radius: 20px; }
.ov-top { position: absolute; top: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.ov-top button { padding: 5px 12px; font-size: 12.5px; border-radius: 99px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ov-top button.on { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.ov-rail { position: absolute; right: 10px; bottom: 130px; display: flex; flex-direction: column; gap: 12px; z-index: 3; }
.ov-rail button { width: 44px; height: 44px; padding: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .18); font-size: 18px; color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ov-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 64px 16px 16px; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); z-index: 2; pointer-events: none; }
.ov-title { color: #fff; font-weight: 800; font-size: 19px; line-height: 1.2; margin-top: 6px; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.ov-meta { color: rgba(255, 255, 255, .75); font-size: 12.5px; margin-top: 4px; }
.ov-note { margin-top: 8px; font-size: 12.5px; color: var(--amber); }
.ov-note.lime { color: var(--lime); }
.m-hint { text-align: center; color: var(--dim); font-size: 12px; margin-top: 10px; }
.bs-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .25s; z-index: 60; }
.bs-bg.on { opacity: 1; }
.bs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: var(--panel); border-top: 1px solid var(--line2); border-radius: 22px 22px 0 0;
      max-height: 86vh; overflow: auto; transform: translateY(100%); transition: transform .3s var(--ease); padding: 8px 18px calc(24px + env(safe-area-inset-bottom)); }
.bs.on { transform: none; }
.bs-handle { width: 44px; height: 5px; border-radius: 3px; background: var(--line2); margin: 4px auto 14px; cursor: grab; touch-action: none; }
.bs .sheet { margin-top: 0; border: 0; padding: 0; background: transparent; }
.bs .sheet + .sheet { margin-top: 16px; }
.bs .note-form { margin-top: 12px; }
#toast.act { pointer-events: auto; display: flex; gap: 14px; align-items: center; justify-content: space-between; }
#toast .undo { background: transparent; border: 0; color: #4d7c0f; font-weight: 800; padding: 4px 6px; }

/* posts */
.tabs { display: flex; gap: 6px; margin-bottom: 22px; }
.tabs a { padding: 8px 16px; border-radius: 99px; color: var(--muted); font-weight: 650; border: 1px solid var(--line); }
.tabs a.on { color: var(--lime-ink); background: var(--lime); border-color: var(--lime); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.tile { border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform .2s var(--ease), border-color .2s; }
.tile:hover { transform: translateY(-3px); border-color: var(--line2); }
.thumb { aspect-ratio: 9 / 16; background: #000; position: relative; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .when { position: absolute; left: 10px; top: 10px; }
.tile .b { padding: 12px; }
.tile .t { font-weight: 750; color: #fff; font-size: 14px; line-height: 1.3; }
.tile .m { font-size: 12.5px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* channels */
.chan { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.chan:first-of-type { border-top: 0; }
.av { width: 44px; height: 44px; border-radius: 50%; background: var(--lime-soft); color: var(--lime); display: flex; align-items: center; justify-content: center; font-weight: 850; overflow: hidden; flex: none; }
.av img { width: 100%; height: 100%; }
.chan .meta { flex: 1; min-width: 0; }
.chan .meta b { color: #fff; }
.sug { border: 1px solid var(--lime-line); background: var(--lime-soft); border-radius: 14px; padding: 15px 16px; }
.sug + .sug { margin-top: 10px; }
.steps { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; }
.steps li { margin: 4px 0; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 18px; display: flex; flex-direction: column; position: relative; transition: transform .2s var(--ease), border-color .2s; }
.plan:hover { transform: translateY(-3px); border-color: var(--line2); }
.plan.cur { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime), 0 20px 60px rgba(181, 252, 12, .08); }
.plan.pop::before { content: "Most popular"; position: absolute; top: -11px; left: 18px; font-size: 11px; font-weight: 800; background: var(--lime); color: var(--lime-ink); padding: 2px 9px; border-radius: 99px; }
.plan .name { font-weight: 800; color: #fff; font-size: 17px; }
.plan .price { font-size: 36px; font-weight: 850; color: #fff; letter-spacing: -.03em; margin: 8px 0 2px; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 650; }
.plan .posts { color: var(--lime); font-weight: 800; font-size: 19px; margin-top: 6px; }
.plan ul { list-style: none; padding: 0; margin: 12px 0 18px; color: var(--muted); font-size: 13.5px; }
.plan li { padding: 4px 0; }
.plan li::before { content: "✓"; color: var(--lime); font-weight: 900; margin-right: 8px; }
.plan button { margin-top: auto; }

/* settings */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.mode { border: 1px solid var(--line2); border-radius: 14px; padding: 14px; cursor: pointer; display: block; transition: border-color .2s, background .2s; }
.mode input { display: none; }
.mode b { display: block; color: #fff; margin-bottom: 3px; }
.mode span { font-size: 13px; color: var(--muted); }
.mode.on { border-color: var(--lime); background: var(--lime-soft); }
.toggle { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.toggle:first-child { border-top: 0; }
.toggle div { flex: 1; }
.toggle b { color: #fff; font-weight: 650; display: block; }
.window { display: flex; gap: 10px; align-items: center; }
.window input { width: 110px; }
.keyrec { min-width: 180px; }
.keyrec.rec { border-color: var(--lime); color: var(--lime); }
.check { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; }
.check .ic { width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; background: var(--panel2); color: var(--dim); border: 1px solid var(--line2); }
.check.ok .ic { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }

#toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: #fff; color: #000; padding: 12px 20px; border-radius: 14px; opacity: 0; transition: .3s var(--ease); pointer-events: none; font-weight: 650; max-width: 560px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); z-index: 50; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--red); color: #fff; }

@media (max-width: 1150px) { .plans { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 980px) { .g2, .deck-wrap { grid-template-columns: 1fr; } .deck { height: min(70vh, 620px); } .modes { grid-template-columns: 1fr; } .plans { grid-template-columns: repeat(2, 1fr); } }
svg.ic { display: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.grid > *, .deck-wrap > *, main { min-width: 0; }
.go .prefix, .go .prefix input { min-width: 0; }

/* ---- phone: app layout with a bottom tab bar ---- */
@media (max-width: 720px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .side { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; padding: 12px 18px;
          border-right: 0; border-bottom: 1px solid var(--line); background: var(--bg); }
  .brand { padding: 0; } .brand img { width: 96px; }
  .side-foot { display: none; }
  nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
        padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); background: rgba(14, 14, 16, .94); border-top: 1px solid var(--line);
        backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  nav a { position: relative; flex-direction: column; justify-content: center; gap: 3px; padding: 6px 0; margin: 0; font-size: 10.5px; border-radius: 12px; }
  nav a.on { background: transparent; color: var(--lime); }
  nav a.on::before { display: none; }
  nav a:hover { background: transparent; }
  svg.ic { display: block; }
  nav .pill { position: absolute; top: 0; left: 55%; margin: 0; font-size: 10px; line-height: 16px; padding: 0 5px; }
  main { padding: 18px 16px 110px; }
  h1 { font-size: 26px; }
  .head { margin-bottom: 18px; }
  .card { padding: 18px; border-radius: 16px; }
  .go { flex-direction: column; } .go .lime { width: 100%; }
  .clipit { padding: 26px; font-size: 24px; }
  .deck-wrap { gap: 18px; }
  .deck { height: min(calc(100vh - 300px), 560px); max-width: 100%; }
  main.is-review { padding-top: 12px; }
  main.is-review .head { display: none; }
  main.is-review .deck { height: calc(100vh - 380px); height: calc(100dvh - 380px); min-height: 300px; }
  main.is-review .tl { margin-top: 10px; }
  main.is-review .tl-track { height: 46px; }
  main.is-review .tl-bar { margin-top: 6px; }
  main.is-review .controls { margin-top: 10px; gap: 34px; }
  main.is-review .round { width: 56px; height: 56px; }
  main.is-review .round.yes { width: 68px; height: 68px; }
  .controls { gap: 30px; }
  .tl-bar button.small { padding: 6px 8px; }
  .plans { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-n { font-size: 28px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .seg button { font-size: 13px; padding: 7px 6px; }
  #toast { bottom: 92px; width: calc(100% - 32px); text-align: center; }
  dialog.addch { padding: 18px; }
}
