/* BlitzDrop — "anime clash" look (mockups 2026-12-03): halftone paper, panels with chamfered corners and hard shadows,
   aura violet + ki cyan, Dela Gothic One headings, Chakra Petch UI, JetBrains Mono numbers.
   Two themes (owner, 2026-12-03): LIGHT (cream paper, ink lines) and DARK (night paper, violet panels) — dark is the
   default; body.dark switches every colour through the variables below (cookie bd_theme, toggle in the header).
   App pages fit one laptop screen (1366×660 viewport) and never scroll sideways; the home page scrolls. */

:root {
  /* brand — the same in both themes */
  --violet: #8b3dff; --violet-d: #6d28e8; --lilac: #c9a2ff; --cyan: #2ee6ff; --yellow: #ffe14d; --rose: #ff8a8a;
  --on-light: #14121c;          /* text on yellow / cyan / lilac / white chips */
  --on-ink: #ffffff; --on-ink-2: #d9d4e4; --on-ink-3: #b7b0c6;   /* text on panels (11:1 / 8:1) */
  --ink-2: #26222f;
  --head: 'Dela Gothic One', 'Chakra Petch', system-ui, sans-serif;
  --body: 'Chakra Petch', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* LIGHT theme */
  --paper: #f3eee2; --dots: rgba(20,18,28,.09);
  --card: #ffffff; --cream: #fffdf8;
  --text: #14121c; --muted: #4b4558; --muted-2: #3d3848;
  --ink: #14121c;               /* lines + borders */
  --shade: #14121c;             /* hard offset shadows */
  --panel: #14121c; --panel-line: #14121c;   /* dark panels (claim card, balance, footer) */
  --strong: #14121c;            /* selected chip / coin, hold button */
  --btn: #14121c;               /* primary button */
  --field: #14121c; --field-line: #14121c;
  --dash: #ddd5c4; --lilac-bg: #efe6ff; --track-off: #d8d1c2;
  --violet-t: #5b1fd1; --link-h: #3a0f94; --brand-b: #6d28e8; --rose-t: #b42318;

  /* Names the own captcha page (views/captcha.ejs) reads. */
  --surface: var(--card); --surface-2: var(--cream); --surface-3: var(--paper); --bg-2: var(--cream);
  --line: var(--ink); --line-2: var(--ink); --faint: var(--muted);
  --moon: var(--violet-d); --moon-2: var(--lilac); --moon-soft: var(--lilac-bg);
  --violet-2: var(--violet-d); --violet-soft: var(--lilac-bg);
  --mint: #0b7a55; --mint-soft: #d8f7ec; --gold: #8a6100;
  --r-sm: 0; --r: 0; --r-lg: 0; --shadow: 6px 6px 0 var(--violet); --display: var(--head);
  color-scheme: light;
}
body.dark {
  --paper: #110f18; --dots: rgba(255,255,255,.05);
  --card: #1b1826; --cream: #211d2d;
  --text: #f1ecfa; --muted: #b9b2c9; --muted-2: #d0c9de;
  --ink: #5d5573; --shade: #05040a;
  --panel: #0b0a10; --panel-line: #3d3650;
  --strong: #7c3aed; --btn: #7c3aed;
  --field: #0b0a10; --field-line: #4a4260;
  --dash: #332d42; --lilac-bg: #2a2140; --track-off: #3a3448;
  --violet-t: #c9a2ff; --link-h: #e2ccff; --brand-b: #b98cff; --rose-t: #ff8a8a;
  --mint: #3ddc97; --mint-soft: #133a2b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 500 15px/1.45 var(--body);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dots) 1.2px, transparent 1.3px); background-size: 14px 14px;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--violet-t); }
a:hover { color: var(--link-h); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
button { font-family: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ── Shapes ── */
.chamfer { clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.chamfer-sm { clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.drop { filter: drop-shadow(5px 5px 0 var(--violet)); }
.skew { transform: skewX(-10deg); }
.burst { background-image: repeating-conic-gradient(from 0deg at 85% 20%, rgba(139,61,255,.15) 0deg 6deg, transparent 6deg 14deg); }

/* ── Header ── */
.top { min-height: 56px; background: var(--paper); border-bottom: 3px solid var(--ink); position: relative; z-index: 20; }
.top .wrap { min-height: 53px; display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font: 400 19px var(--head); letter-spacing: .01em; }
.brand b { font-weight: 400; color: var(--brand-b); }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 0 14px; flex: 1 1 auto; min-width: 0; }
.nav a { color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 13px;
  min-height: 44px; display: flex; align-items: center; padding: 0 4px; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--violet-t); border-bottom-color: var(--violet); }
.nav a[aria-current="page"] { border-bottom-color: var(--violet); }
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.bal { background: var(--panel); color: #fff; padding: 9px 14px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; box-shadow: inset 0 0 0 2px var(--panel-line); }
.bal:hover { color: #fff; }
.bal .n { font: 800 15px var(--mono); }
.bal .u { font-size: 12px; color: #c9c3d6; letter-spacing: .08em; }
.theme-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--text);
  border: 2px solid var(--ink); cursor: pointer; transform: skewX(-8deg); }
.theme-btn:hover { background: var(--lilac-bg); }
.theme-btn .ico { transform: skewX(8deg); }
.theme-btn .moon-i { display: none; }
body.dark .theme-btn .sun-i { display: none; }
body.dark .theme-btn .moon-i { display: block; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-sm { width: 16px; height: 16px; }

/* ── Layout ── */
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.app { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; padding-top: 16px; padding-bottom: 16px; }
.app-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.rail { flex: 0 0 300px; max-width: 100%; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.cols { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.cols > * { flex: 1 1 300px; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }

/* ── Cards ── */
.card { background: var(--card); color: var(--text); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--shade); padding: 12px 16px; }
.card.v { box-shadow: 5px 5px 0 var(--violet); }
.card.c { box-shadow: 5px 5px 0 var(--cyan); }
.card.y { box-shadow: 5px 5px 0 var(--yellow); }
.card-ink { background: var(--panel); color: #fff; border: 3px solid var(--panel-line); position: relative; overflow: hidden; padding: 12px 16px; }
.card-ink > * { position: relative; }
.card-ink .bg { position: absolute; inset: 0; }
.cap { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.card-ink .cap { color: var(--on-ink-3); }
.big-n { font: 800 20px var(--mono); }
.title { font: 400 20px var(--head); font-style: italic; }
.page-title { font: 400 28px var(--head); font-style: italic; margin: 0; }
.stat { display: flex; flex-direction: column; gap: 1px; }
.stat .k { font-size: 11px; letter-spacing: .1em; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.card-ink .stat .k { color: var(--on-ink-3); }
.stat .v { font: 800 18px var(--mono); }
.vt { color: var(--violet-t); }
.card-ink .vt { color: var(--lilac); }
.card-ink .ct { color: var(--cyan); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; cursor: pointer;
  font: 700 14px var(--body); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; background: var(--btn); color: #fff; }
.btn:hover { color: #fff; filter: brightness(1.15); }
.btn:disabled { cursor: not-allowed; opacity: .9; }
.btn-y { background: var(--yellow); color: var(--on-light); }
.btn-y:hover { color: var(--on-light); }
.btn-l { background: var(--lilac); color: var(--on-light); transform: skewX(-10deg); }
.btn-l:hover { color: var(--on-light); }
.btn-c { background: var(--cyan); color: var(--on-light); }
.btn-c:hover { color: var(--on-light); }
.btn-out { background: var(--card); color: var(--text); border: 3px solid var(--ink); }
.btn-out:hover { color: var(--text); background: var(--cream); }
.btn-out-ink { background: transparent; color: var(--on-ink); border: 2px solid var(--on-ink-3); }
.btn-out-ink:hover { color: var(--on-ink); background: var(--ink-2); }
.btn-big { min-height: 52px; font: 400 19px var(--head); font-style: italic; letter-spacing: .04em; text-transform: none; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--violet-t); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; min-height: 44px; }

/* ── Forms ── */
.lbl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.input { height: 44px; padding: 0 12px; background: var(--field); color: #fff; border: 2px solid var(--field-line); font: 600 15px var(--mono); width: 100%; min-width: 0; letter-spacing: 0; text-transform: none; }
.input::placeholder { color: #a39cb3; }
textarea.input { height: auto; padding: 8px 10px; font-size: 12px; resize: none; }
.row { display: flex; gap: 8px; }
.coins { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; border: 0; margin: 0; padding: 0; }
.coin-opt { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; background: var(--card); color: var(--text); border: 2px solid var(--ink); transform: skewX(-8deg); cursor: pointer; }
.coin-opt input { accent-color: var(--violet); width: 18px; height: 18px; margin: 0; }
.coin-opt img { width: 20px; height: 20px; }
.coin-opt:has(input:checked) { background: var(--strong); color: #fff; border-color: var(--strong); }
.coin-opt .min { margin-left: auto; font: 600 11px var(--mono); }
.coin-opt:focus-within { outline: 3px solid var(--cyan); outline-offset: 2px; }
.switch { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; background: transparent; border: 0;
  border-bottom: 2px dashed var(--dash); text-align: left; color: var(--text); cursor: pointer; padding: 0; }
.switch .t { display: flex; flex-direction: column; }
.switch .t b { font-size: 14px; }
.switch .t small { font-size: 12px; color: var(--muted); }
.switch .track { position: relative; flex: none; width: 50px; height: 26px; background: var(--track-off); border: 2px solid var(--ink); transform: skewX(-12deg); }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border: 2px solid var(--on-light); transition: left .15s; }
.switch[aria-pressed="true"] .track { background: var(--violet); }
.switch[aria-pressed="true"] .track::after { left: 28px; }

/* ── Messages ── */
.msg { padding: 10px 14px; border: 3px solid var(--ink); background: var(--card); color: var(--text); font-weight: 600; box-shadow: 4px 4px 0 var(--lilac); }
.msg-err { box-shadow: 4px 4px 0 var(--rose); }
.msg-ok { box-shadow: 4px 4px 0 var(--cyan); }

/* ── Faucet card ── */
.claim { padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.claim-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.claim-n { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.claim-n .n { font: 800 52px/1 var(--mono); color: var(--cyan); }
.claim-n .u { font: 400 20px var(--head); font-style: italic; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; padding: 3px 10px; transform: skewX(-10deg); background: var(--yellow); color: var(--on-light); }
.ladder { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 2px; transform: skewX(-14deg); align-items: end; }
.ladder span { border: 2px solid #6b6378; background: transparent; }
.ladder span.on { border-color: var(--violet); background: var(--violet); }
.ladder span.now { border-color: #fff; background: var(--cyan); }
.ladder-k { display: flex; justify-content: space-between; font: 600 12px var(--mono); color: var(--on-ink-2); }
.claim-act { display: flex; align-items: center; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.aura { position: relative; width: 210px; height: 72px; flex: none; display: flex; align-items: flex-end; justify-content: center; }
.aura svg { position: absolute; left: 0; bottom: 12px; }
.aura .btn-claim { position: relative; height: 52px; padding: 0 30px; background: #fff; color: var(--on-light); box-shadow: inset 0 0 0 4px var(--violet);
  font: 400 20px var(--head); font-style: italic; letter-spacing: .06em; border: 0; cursor: pointer; }
.aura .btn-claim:disabled { cursor: not-allowed; }
.aura.off svg { opacity: .25; }
.claim-status { margin: 0; flex: 1 1 180px; font-size: 14px; color: var(--on-ink-2); }
.flick { transform-origin: 50% 100%; animation: flick .5s ease-in-out infinite alternate; }
.flick2 { transform-origin: 50% 100%; animation: flick .38s ease-in-out infinite alternate-reverse; }
@keyframes flick { 0% { transform: scaleY(.92) skewX(-2deg); } 100% { transform: scaleY(1.06) skewX(2deg); } }
.chips { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.chips li { padding: 2px 7px; border: 2px solid var(--ink); background: var(--card); color: var(--text); transform: skewX(-10deg); font: 800 13px var(--mono); }
.chips li:first-child { background: var(--strong); border-color: var(--strong); color: #fff; }
.chips li.none { background: var(--card); border-color: var(--ink); color: var(--muted); }
.tile-y { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--on-light); background: var(--yellow); border: 3px solid var(--on-light); box-shadow: 4px 4px 0 var(--shade); padding: 10px 14px; }
.tile-y:hover { color: var(--on-light); }
.tile-y .cap { color: var(--on-light); }

/* Sound switch on the faucet card (same pref as Allies → Sound effects; on by default) */
.snd-btn { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--on-ink);
  border: 2px solid var(--on-ink-3); cursor: pointer; transform: skewX(-8deg); }
.snd-btn:hover { background: var(--ink-2); }
.snd-btn .ico { transform: skewX(8deg); }
.snd-btn .snd-off, .snd-btn[aria-pressed="false"] .snd-on { display: none; }
.snd-btn[aria-pressed="false"] .snd-off { display: block; }
.snd-btn[aria-pressed="false"] { color: var(--on-ink-3); }

/* ── PTC (1.3.0): one list, highest reward first, scrolling inside its card so the page fits one screen ── */
.ptc { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; height: max(340px, calc(100vh - 262px)); }
.ptc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px 16px; flex-wrap: wrap; }
.ptc-sub { margin: 0; font-size: 13px; color: var(--muted); }
.ptc-stats { display: flex; gap: 18px; }
.ptc-filter { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pf { min-height: 36px; padding: 0 12px; background: var(--card); color: var(--text); border: 2px solid var(--ink); transform: skewX(-10deg); cursor: pointer;
  font: 700 12px var(--body); letter-spacing: .08em; text-transform: uppercase; }
.pf[aria-pressed="true"] { background: var(--strong); border-color: var(--strong); color: #fff; }
.pf-r { margin-left: auto; width: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.pf-r .ico { transform: skewX(10deg); }
.ptc-list { flex: 1 1 auto; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; border-top: 3px solid var(--ink); margin: 0 -14px -12px; padding: 0 14px; }
.ptc-empty { margin: 0; padding: 28px 8px; text-align: center; color: var(--muted); }
.ptc-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 2px dashed var(--dash); }
.ptc-gem { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; padding: 3px 0; background: var(--violet); color: #fff; transform: skewX(-10deg); }
.ptc-gem b { font: 800 17px/1.1 var(--mono); transform: skewX(10deg); }
.ptc-gem small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; transform: skewX(10deg); }
.ptc-row:first-child .ptc-gem { background: var(--yellow); color: var(--on-light); }
.ptc-body { flex: 1; min-width: 0; }
.ptc-t { margin: 0; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptc-m { margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptc-m .src { font-weight: 700; color: var(--violet-t); }
.ptc-row .btn { min-height: 40px; padding: 0 16px; flex: none; }
.ptc-note { margin: 2px 0 0; font-size: 12px; font-weight: 700; color: var(--violet-t); }
.ptc-row[class*=" s-"] .ptc-gem { background: var(--track-off); color: var(--text); }
.ptc-row.s-done .ptc-gem { background: var(--mint); color: #fff; }
.ptc-row.s-done .ptc-note { color: var(--mint); }
.ptc-row.s-retry .ptc-note { color: var(--rose-t); }
.ptc-row .btn[aria-disabled="true"] { background: var(--track-off); color: var(--text); cursor: default; filter: none; }
.ptc-row.s-done .btn[aria-disabled="true"] { background: var(--mint); color: #fff; }
.rail-card { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.rail-card p { margin: 0; font-size: 13px; }
.card-ink.rail-card p { color: var(--on-ink-2); }
.card.rail-card p { color: var(--muted); }
@media (max-width: 760px) {
  .ptc { height: max(460px, calc(100vh - 70px)); }
  .ptc-gem { width: 62px; }
  .ptc-row .btn { padding: 0 12px; }
}

.ptc-hist { max-height: min(420px, calc(100vh - 260px)); overflow: auto; }
.ptc-hist .tbl td { font-size: 13px; }

/* ── Tables ── */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-size: 11px; letter-spacing: .12em; color: var(--muted); text-align: left; padding: 6px 10px; border-bottom: 3px solid var(--ink); text-transform: uppercase; }
.tbl td { padding: 4px 10px; border-bottom: 2px dashed var(--dash); font-size: 14px; }
.tbl .r { text-align: right; }
.tbl tr.me { background: var(--lilac-bg); }
.medal { display: inline-flex; width: 28px; height: 20px; align-items: center; justify-content: center; font: 800 13px var(--mono); transform: skewX(-10deg); }
.medal.m1, .medal.m2, .medal.m3 { color: var(--on-light); }
.medal.m1 { background: var(--yellow); } .medal.m2 { background: #d8d1c2; } .medal.m3 { background: #ffb27a; }
.bar { display: block; height: 14px; background: #2c2836; border: 2px solid #fff; transform: skewX(-14deg); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--yellow); }
.minibar { display: inline-block; width: 60px; height: 8px; background: var(--dash); transform: skewX(-14deg); overflow: hidden; vertical-align: middle; }
.minibar > span { display: block; height: 100%; background: var(--violet); }

/* ── Checklist / history ── */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.checks li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checks .ok { width: 18px; height: 18px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--violet-d); transform: skewX(-10deg); color: #fff; }
.checks .no { background: #b42318; }
.checks .s { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 2px dashed var(--dash); font-size: 14px; }
.hist .w { font: 600 12px var(--mono); color: var(--muted); }
.hist .pos { color: var(--violet-t); font-weight: 800; }
.hist .neg { color: var(--text); font-weight: 800; }
.receive { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 12px; background: var(--lilac-bg); border: 2px solid var(--ink); }
.hold { position: relative; height: 46px; background: var(--strong); color: #fff; overflow: hidden; border: 0; cursor: pointer; width: 100%;
  font: 700 15px var(--body); letter-spacing: .14em; text-transform: uppercase; touch-action: none; user-select: none; }
.hold .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--violet-d), var(--cyan)); }
.hold .t { position: relative; }
.code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--ink-2); padding: 12px; font: 600 13px var(--mono); color: var(--on-ink-2); }

/* ── Ads: one leaderboard, one rectangle, one banner per page — responsive boxes (owner, 2026-12-03) ── */
.ad-slot { width: 100%; display: flex; justify-content: center; align-self: center; }
.ad-728 { max-width: 728px; min-height: 90px; }
.ad-300 { max-width: 300px; min-height: 250px; }
.ad-468 { max-width: 468px; min-height: 60px; }
.ad-fit { width: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.ad-fit-inner { max-width: 100%; }
.ad-fit-inner iframe, .ad-fit-inner img { max-width: 100%; }
@media (max-width: 600px) { .ad-728, .ad-728 .ad-fit { min-height: 50px; } }

/* ── Notifications: ONE toast stack + ONE queued popup for the whole site (public/js/site.js BD.toast / BD.popup) ── */
.toasts { position: fixed; top: 68px; right: 16px; width: 340px; max-width: calc(100% - 32px); display: flex; flex-direction: column; gap: 10px; z-index: 900; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; background: var(--card); color: var(--text); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--k, var(--lilac)); padding: 8px 6px 8px 12px; animation: toastIn .35s cubic-bezier(.2,1.4,.4,1) both; }
.toast .i { width: 40px; height: 40px; flex: none; background: var(--k, var(--lilac)); border: 2px solid var(--on-light); transform: skewX(-10deg); display: flex; align-items: center; justify-content: center; }
.toast .i svg { transform: skewX(10deg); width: 20px; height: 20px; fill: none; stroke: var(--on-light); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.toast .b { flex: 1; min-width: 0; }
.toast .b p { margin: 0; }
.toast .b .t1 { font-weight: 700; font-size: 15px; }
.toast .b .t2 { font-size: 13px; color: var(--muted); }
.toast .x, .pop .x { width: 44px; height: 44px; flex: none; background: transparent; border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); }
.toast.out { animation: toastOut .25s ease-in both; }
@keyframes toastIn { 0% { transform: translateX(40px) skewX(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateX(30px); opacity: 0; } }
.pop-back { position: fixed; inset: 0; background: rgba(8,6,14,.68); z-index: 19999; }
.pop { position: fixed; top: 100px; left: 50%; transform: translateX(-50%); width: 420px; max-width: calc(100% - 32px); max-height: calc(100vh - 120px); overflow: auto;
  background: var(--card); color: var(--text); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--k, var(--yellow)); padding: 24px 24px 20px; z-index: 20000;
  display: flex; flex-direction: column; gap: 10px; text-align: center; animation: popIn .4s cubic-bezier(.2,1.5,.4,1) both; }
.pop.wide { width: 780px; top: 56px; max-height: calc(100vh - 80px); text-align: left; }
.pop .x { position: absolute; top: 4px; right: 4px; }
.pop .word { font: 400 44px/1 var(--head); font-style: italic; color: transparent; -webkit-text-stroke: 2px var(--text); }
.pop h2 { font: 400 24px var(--head); font-style: italic; padding-right: 36px; }
.pop p { margin: 0; font-size: 16px; color: var(--muted); }
@keyframes popIn { 0% { transform: translateX(-50%) scale(.6) rotate(-4deg); opacity: 0; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }

/* ── Referral banners (Allies → "Promo banners" popup) ── */
.banners { display: flex; flex-direction: column; gap: 14px; }
.banner-item { border: 2px solid var(--ink); background: var(--cream); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.banner-head b { flex: 1; font: 700 14px var(--mono); }
.banner-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.banner-img { display: block; max-width: 100%; height: auto; }

/* ── Phone tab bar (members) ── */
.tabs-m { display: none; }
@media (max-width: 760px) {
  .top .nav.member { display: none; }
  .tabs-m { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--panel); border-top: 2px solid var(--panel-line); padding-bottom: env(safe-area-inset-bottom); }
  .tabs-m a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; color: #d9d4e4; text-decoration: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .tabs-m a[aria-current="page"] { color: var(--cyan); }
  body.member { padding-bottom: 64px; }
  .toasts { top: 60px; left: 10px; right: 10px; width: auto; max-width: none; }
  .wrap { padding-left: 14px; padding-right: 14px; }
  .claim { padding: 14px; }
  .claim-n .n { font-size: 42px; }
  .aura { width: 100%; }
  .aura .btn-claim { width: 100%; }
  .pop.wide { top: 16px; max-height: calc(100vh - 32px); padding: 20px 14px 14px; }
}

/* ── Landing / public ── */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding: 48px 0 32px; }
.hero > div { flex: 1 1 440px; min-width: 0; }
.hero h1 { font: 400 clamp(44px, 7vw, 76px)/.98 var(--head); font-style: italic; margin: 14px 0; }
.hero h1 span { color: var(--brand-b); }
.hero p.lead { font-size: 19px; line-height: 1.5; color: var(--muted-2); max-width: 520px; margin: 0 0 18px; }
.pill { display: inline-block; background: var(--cyan); color: var(--on-light); font-weight: 700; font-size: 13px; letter-spacing: .12em; padding: 6px 12px; transform: skewX(-10deg); }
.chip-w { display: inline-block; padding: 8px 16px; background: #fff; color: var(--on-light); font-weight: 700; letter-spacing: .08em; transform: skewX(-10deg); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.steps li { position: relative; }
.steps .n { position: absolute; right: 14px; top: 4px; font: 400 60px var(--head); color: transparent; -webkit-text-stroke: 2px var(--lilac); }
.sec { padding: 32px 0; }
.sec h2 { font: 400 clamp(30px, 4vw, 42px) var(--head); font-style: italic; margin-bottom: 18px; }
.faq details { background: var(--card); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--shade); margin-bottom: 12px; }
.faq summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 18px; font-weight: 700; font-size: 16px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 22px var(--head); color: var(--brand-b); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--muted-2); line-height: 1.55; }
.doc { line-height: 1.6; }
.doc-scroll { height: max(220px, calc(100vh - 466px)); overflow: auto; padding-right: 10px; font-size: 15px; }
.doc-scroll > p:first-child { margin-top: 0; }
@media (max-width: 760px) { .doc-scroll { height: auto; overflow: visible; padding-right: 0; } }
.doc h2 { font: 400 20px var(--head); font-style: italic; margin: 18px 0 6px; }
.doc p, .doc li { color: var(--muted-2); }
.doc ul { padding-left: 20px; }
.foot { background: var(--panel); color: #c9c3d6; margin-top: 24px; border-top: 2px solid var(--panel-line); }
.foot .wrap { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; }
.foot a { color: var(--lilac); }
.cta-band { background: var(--panel); color: #fff; position: relative; overflow: hidden; border-top: 2px solid var(--panel-line); }
.cta-band .wrap { position: relative; padding-top: 52px; padding-bottom: 52px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.cta-band h2 { font: 400 clamp(30px, 5vw, 50px) var(--head); font-style: italic; }
.btn-white { background: #fff; color: var(--on-light); box-shadow: inset 0 0 0 4px var(--violet); padding: 0 34px; }
.btn-white:hover { color: var(--on-light); }

/* ── Sign in ── */
.split { min-height: 100vh; display: flex; flex-wrap: wrap; }
.split-art { flex: 1 1 480px; min-width: 0; position: relative; overflow: hidden; background: var(--panel); color: #fff; padding: 24px 40px; display: flex; flex-direction: column; justify-content: center; gap: 20px; border-right: 2px solid var(--panel-line); }
.split-art .brand { color: #fff; }
.split-art .brand b { color: var(--lilac); }
.split-form { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px 24px; }
.sbtn { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 3px solid var(--ink); color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; transform: skewX(-6deg); background: var(--card); }
.sbtn:hover { color: var(--text); background: var(--cream); }
.or { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.or::before, .or::after { content: ''; flex: 1; height: 2px; background: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .flick, .flick2, .toast, .pop { animation: none !important; }
}
body.calm .flick, body.calm .flick2, body.calm .toast, body.calm .pop { animation: none !important; }
body.dark .ptc-row.s-done .ptc-gem, body.dark .ptc-row.s-done .btn[aria-disabled="true"] { color: var(--on-light); }
