:root {
  --bg: #0b0b12;
  --surface: #14141f;
  --surface-2: #1c1c2b;
  --line: #2a2a3d;
  --text: #f4f4f8;
  --muted: #a3a3b8;
  --faint: #6e6e86;
  --cyan: #25f4ee;
  --pink: #fe2c55;
  --good: #3ddc84;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --header-bg: rgba(11, 11, 18, .85);
  --cyan-ink: #25f4ee;
  --glow-a: rgba(254, 44, 85, .16);
  --glow-b: rgba(37, 244, 238, .12);
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.55;
  background-image: radial-gradient(900px 500px at 85% -10%, var(--glow-a), transparent 60%),
    radial-gradient(800px 500px at -10% 10%, var(--glow-b), transparent 60%);
  background-repeat: no-repeat;
}
a { color: var(--cyan-ink); }
img, svg { max-width: 100%; }
.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; }
.brand span b { color: var(--pink); }
.nav-links { display: flex; gap: .25rem; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { display: block; padding: .5rem .8rem; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--pink); }
.nav-toggle { display: none; margin-left: auto; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .45rem .7rem; font: inherit; cursor: pointer; }


/* Hero */
.hero { padding: 4rem 0 2.5rem; }
.eyebrow { display: inline-flex; gap: .5rem; align-items: center; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan-ink); background: rgba(37, 244, 238, .08); border: 1px solid rgba(37, 244, 238, .25); padding: .35rem .75rem; border-radius: 999px; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.07; letter-spacing: -.03em; margin: 1rem 0 .8rem; }
h1 .grad { background: linear-gradient(90deg, var(--cyan-ink), var(--text) 45%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 44rem; margin: 0 0 1.5rem; }
.page-hero { padding: 3rem 0 1.5rem; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; margin: 0 0 .5rem; }
h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.section { padding: 2.5rem 0; }
.section-head { margin-bottom: 1.5rem; }
.section-head p { color: var(--muted); margin: 0; max-width: 46rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .75rem 1.2rem; border-radius: 12px; font: inherit; font-weight: 700; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: #ff4a6e; }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--faint); }
.btn-sm { padding: .45rem .75rem; font-size: .9rem; border-radius: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-top: 2rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.stat .k { color: var(--muted); font-size: .85rem; }
.stat .v { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }

/* Cards and layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.25rem; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 84px; }
@media (max-width: 900px) { .sticky { position: static; } }

.feature { display: block; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.feature:hover { border-color: var(--cyan); transform: translateY(-2px); }
.feature .ico { font-size: 1.8rem; }
.feature p { color: var(--muted); margin: 0; }

/* Forms */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: var(--muted); }
input, select { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .65rem .8rem; font: inherit; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.field { margin-bottom: 1rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 1rem; }
.hint { font-size: .82rem; color: var(--faint); margin-top: .3rem; }
.tabs { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700; padding: .45rem .9rem; border-radius: 9px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }

/* Gift picker */
.search-row { display: flex; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search-row input { flex: 1 1 200px; }
.search-row select { flex: 0 1 190px; }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .7rem; max-height: 560px; overflow-y: auto; padding-right: .25rem; }
.gift { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: .8rem .6rem .7rem; text-align: center; cursor: pointer; color: var(--text); font: inherit; transition: border-color .15s, transform .15s; }
.gift:hover { border-color: var(--cyan); transform: translateY(-2px); }
.gift .em { font-size: 2rem; line-height: 1.1; display: block; }
.gift .nm { display: block; font-weight: 700; font-size: .88rem; margin-top: .3rem; line-height: 1.2; }
.gift .cn { display: block; font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.gift .qty { position: absolute; top: 6px; right: 6px; background: var(--pink); color: #fff; font-size: .72rem; font-weight: 800; min-width: 22px; height: 22px; border-radius: 11px; display: none; align-items: center; justify-content: center; padding: 0 6px; }
.gift.has .qty { display: inline-flex; }
.gift.has { border-color: var(--pink); }
.coin { color: #ffd166; }

.basket { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; max-height: 300px; overflow-y: auto; }
.basket li { display: grid; grid-template-columns: auto 1fr auto auto; gap: .6rem; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .45rem .6rem; }
.basket .em { font-size: 1.4rem; }
.basket .nm { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.basket .sub { font-size: .8rem; color: var(--muted); }
.basket input { width: 76px; padding: .35rem .5rem; text-align: center; }
.icon-btn { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 1.1rem; padding: .2rem .4rem; border-radius: 8px; }
.icon-btn:hover { color: var(--pink); background: var(--surface-2); }
.empty { color: var(--faint); text-align: center; padding: 1.2rem; border: 1px dashed var(--line); border-radius: 12px; margin-bottom: 1rem; }

.result { display: grid; gap: .6rem; }
.result-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.result-row:last-child { border-bottom: 0; }
.result-row .k { color: var(--muted); }
.result-row .v { font-weight: 800; font-variant-numeric: tabular-nums; }
.big-result { background: linear-gradient(135deg, rgba(254, 44, 85, .18), rgba(37, 244, 238, .12)); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: .6rem; }
.big-result .k { color: var(--muted); font-size: .9rem; }
.big-result .v { font-size: 2.2rem; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); cursor: default; }
th button { background: none; border: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; padding: 0; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; }
tr:last-child td { border-bottom: 0; }

/* Goals */
.goal { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: .8rem; }
.goal-top { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.goal h3 { margin: 0; }
.goal .meta { color: var(--muted); font-size: .88rem; }
.bar { height: 12px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: .7rem 0 .5rem; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width .4s; }
.goal.done .bar > span { background: var(--good); }
.goal-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .6rem; }
.goal-actions input { width: 130px; padding: .4rem .6rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; padding: .15rem .5rem; border-radius: 999px; background: rgba(61, 220, 132, .15); color: var(--good); }

/* Chart */
.chart-box { position: relative; }
.chart-box svg { display: block; width: 100%; height: 260px; }
.chart-box .axis { fill: var(--faint); font-size: 11px; }
.chart-box .grid { stroke: var(--line); stroke-width: 1; }
.chart-box .barm { fill: var(--cyan); }
.chart-box .barm:hover, .chart-box .barm.active { fill: #8ff9f6; }
.tooltip { position: absolute; pointer-events: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; font-size: .85rem; box-shadow: var(--shadow); opacity: 0; transition: opacity .1s; white-space: nowrap; z-index: 5; }
.tooltip.show { opacity: 1; }
.tooltip b { display: block; }
.tooltip span { color: var(--muted); }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: .7rem; }
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); margin: .7rem 0 0; }

.note { font-size: .88rem; color: var(--muted); background: rgba(255, 209, 102, .06); border: 1px solid rgba(255, 209, 102, .25); border-radius: 12px; padding: .8rem 1rem; }
.cta-band { text-align: center; padding: 2.5rem 1.5rem; background: linear-gradient(135deg, rgba(254, 44, 85, .15), rgba(37, 244, 238, .1)); border: 1px solid var(--line); border-radius: 22px; }
.cta-band p { color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 0 2.5rem; color: var(--faint); font-size: .88rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.footer-grid nav a { color: var(--muted); text-decoration: none; }
.footer-grid nav a:hover { color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%) translateY(150%); background: var(--surface-2); border: 1px solid var(--line); padding: .7rem 1.1rem; border-radius: 12px; font-weight: 600; transition: transform .25s; z-index: 50; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- v2 additions ---------- */
[data-theme="light"] {
  --bg: #f6f6fa; --surface: #ffffff; --surface-2: #f0f0f6; --line: #dedeea; --text: #14141f; --muted: #555569; --faint: #7a7a90;
  --shadow: 0 8px 30px rgba(20, 20, 40, .08); --header-bg: rgba(246, 246, 250, .9); --cyan-ink: #0a8f8b;
  --glow-a: rgba(254, 44, 85, .08); --glow-b: rgba(37, 244, 238, .1); --good: #1a9d55; color-scheme: light;
}
[data-theme="light"] .coin { color: #c98a00; }
[data-theme="light"] .chart-box .barm { fill: #0fb5b0; }
[data-theme="light"] .chart-box .barm:hover, [data-theme="light"] .chart-box .barm.active { fill: #0a8f8b; }
.muted { color: var(--muted); }
p.muted, .card p.muted { margin: 0 0 .6rem; }
.strong { color: var(--text); }
.center { text-align: center; justify-content: center; }
.good { color: var(--good); }
.h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; margin: 0 0 1rem; }
.h3 { font-size: 1.15rem; margin: 0 0 .8rem; }
.narrow { max-width: 780px; }
.wrap.narrow { width: min(780px, 100% - 2.5rem); }
textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .65rem .8rem; font: inherit; resize: vertical; }
code { background: var(--surface-2); padding: .1rem .35rem; border-radius: 6px; font-size: .88em; word-break: break-all; }

/* nav */
.nav-links { align-items: center; }
.dropdown { position: relative; }
.dropdown summary { list-style: none; cursor: pointer; padding: .5rem .8rem; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary::after { content: " ▾"; font-size: .75em; }
.dropdown summary:hover, .dropdown details[open] summary { color: var(--text); background: var(--surface-2); }
.dropdown ul { list-style: none; margin: 0; padding: .4rem; position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 30; }
.dropdown ul.right { left: auto; right: 0; min-width: 200px; }
.dropdown ul a, .linkish { display: block; width: 100%; text-align: left; padding: .55rem .75rem; border-radius: 9px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .93rem; background: none; border: 0; font-family: inherit; cursor: pointer; }
.dropdown ul a:hover, .linkish:hover { background: var(--surface-2); }
.theme-toggle { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px; cursor: pointer; font-size: 1rem; }
[data-theme="light"] .t-dark, :root:not([data-theme="light"]) .t-light { display: none; }
.nav-cta { color: #fff !important; margin-left: .25rem; }
.nav-links a.nav-cta:hover { background: #ff4a6e; }
.badge.pro { background: linear-gradient(90deg, var(--pink), #ff7a45); color: #fff; }
.badge.warn { background: rgba(254, 44, 85, .15); color: var(--pink); }
.badge.ok { background: rgba(61, 220, 132, .15); color: var(--good); }
.badge { background: var(--surface-2); color: var(--muted); vertical-align: middle; }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1rem; max-height: calc(100vh - 64px); overflow-y: auto; }
  .nav-links.open { display: flex; }
  .dropdown ul, .dropdown ul.right { position: static; box-shadow: none; border: 0; background: transparent; padding-left: 1rem; }
  .nav-cta { margin: .5rem 0 0; }
}

/* layout bits */
.grid-2.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .grid-2.even { grid-template-columns: 1fr; } }
.btn-row.center { justify-content: center; }
.btn[aria-disabled="true"] { opacity: .7; cursor: default; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 1.25rem; }
.stat .delta { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.sync-note { color: var(--muted); font-size: .92rem; margin: 0 0 1rem; }
.file-btn { margin: 0; color: var(--text); }
.inline-field { display: flex; align-items: center; gap: .75rem; }
.inline-field label { margin: 0; }
.inline-field select { width: auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { background: rgba(254, 44, 85, .1); border: 1px solid rgba(254, 44, 85, .35); color: var(--text); padding: .7rem 1rem; border-radius: 12px; }
.good-note { background: rgba(61, 220, 132, .08); border-color: rgba(61, 220, 132, .3); }
.check { display: flex; gap: .5rem; align-items: center; color: var(--text); font-weight: 600; }
.check input { width: auto; }
.check.small { font-size: .82rem; color: var(--muted); font-weight: 500; margin-top: .35rem; }
.wrap-cell { white-space: normal; min-width: 200px; }
tr.total td { font-weight: 800; border-top: 2px solid var(--line); }
tr.best td { background: rgba(61, 220, 132, .07); }
tr.dim td { opacity: .55; }
td.actions { display: flex; gap: .4rem; }
.inline-form { display: flex; gap: .4rem; }
.inline-form select { padding: .35rem .5rem; width: auto; }

/* prose / articles */
.prose { font-size: 1.04rem; }
.prose h2 { margin-top: 2rem; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose .table-wrap { margin: 1rem 0; }
.answer { border-left: 4px solid var(--pink); font-size: 1.05rem; margin-bottom: 1.5rem; }

/* gift cards and gift page */
.gift-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.gift-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; text-decoration: none; color: var(--text); padding: 1rem; box-shadow: none; transition: border-color .2s, transform .2s; }
.gift-card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.gift-card .em { font-size: 2.3rem; line-height: 1.2; }
.gift-card .val { font-weight: 800; color: var(--good); }
.gift-hero { display: flex; gap: 1.5rem; align-items: center; }
.gift-big { font-size: 5.5rem; line-height: 1; flex: 0 0 auto; width: 120px; height: 120px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; }
@media (max-width: 600px) { .gift-hero { flex-direction: column; align-items: flex-start; } .gift-big { width: 96px; height: 96px; font-size: 4rem; } }
.gift .em img, .basket .em img { vertical-align: middle; }
.report { margin-top: 1rem; }
.report-form { margin-top: .8rem; }

/* battle */
.battle-board { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
.side { text-align: center; padding: 1rem; border-radius: 14px; border: 2px solid transparent; transition: border-color .2s; }
.side.picked { border-color: var(--line); background: var(--surface-2); }
.side-a .side-score { color: var(--pink); }
.side-b .side-score { color: var(--cyan-ink); }
.side-name { text-align: center; font-weight: 800; font-size: 1.1rem; background: transparent; border-color: transparent; }
.side-name:hover, .side-name:focus { border-color: var(--line); }
.side-score { text-align: center; font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 900; background: transparent; border-color: transparent; padding: .2rem; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.side.bump .side-score { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.08); } }
.vs { text-align: center; }
.vs span { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--cyan)); color: #fff; font-weight: 900; }
.vs .gap { margin-top: .6rem; font-weight: 700; color: var(--muted); max-width: 180px; }
.battle-bar { grid-column: 1 / -1; display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--surface); }
.battle-bar span { transition: width .3s; }
#b-bar-a { background: var(--pink); }
#b-bar-b { background: var(--cyan); }
@media (max-width: 640px) { .battle-board { grid-template-columns: 1fr; } .vs { order: -1; } }
.gift-grid.compact { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-height: 380px; }
.gift-grid.compact .em { font-size: 1.6rem; }
.gift-grid.compact .nm { font-size: .78rem; }

/* premium lock */
.locked-wrap { position: relative; }
.locked-wrap.locked > :not(.lock-overlay) { filter: blur(3px); opacity: .55; pointer-events: none; user-select: none; }
.lock-overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1rem; }
.lock-overlay > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.5rem; box-shadow: var(--shadow); max-width: 340px; }
.lock-overlay p { color: var(--muted); margin: .4rem 0 .9rem; }
.upsell { border-color: rgba(254, 44, 85, .4); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.featured { border: 2px solid var(--pink); }
.plan .badge.pro { position: absolute; top: -12px; right: 1.2rem; }
.price { font-size: 2.4rem; font-weight: 900; letter-spacing: -.03em; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.ticks { list-style: none; padding: 0; margin: .5rem 0 1.5rem; flex: 1; }
.ticks li { padding: .35rem 0 .35rem 1.6rem; position: relative; color: var(--muted); }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 900; }
.ticks strong { color: var(--text); }
.plan form, .plan .btn { width: 100%; }
.roadmap { display: grid; gap: 1rem; }

/* auth */
.auth-wrap { display: grid; place-items: center; }
.auth-card { width: min(480px, 100%); }
.google-btn { width: 100%; }
.google-btn span { font-weight: 900; color: #4285f4; }
.or { display: flex; align-items: center; gap: .75rem; color: var(--faint); margin: 1rem 0; font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.danger { border-color: rgba(254, 44, 85, .35); }

/* admin */
.admin-nav, .pills { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.admin-nav a, .pills a { padding: .45rem .8rem; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; }
.admin-nav a:hover, .pills a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a[aria-current="page"], .pills a[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--pink); }
.pills { border: 0; margin-bottom: 1rem; }
.hbars { display: grid; gap: .45rem; }
.hbar { display: grid; grid-template-columns: 64px 1fr 40px; gap: .6rem; align-items: center; font-size: .88rem; }
.hbar .lbl { color: var(--muted); }
.hbar .track { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.hbar .track span { display: block; height: 100%; background: var(--cyan); border-radius: 999px; }
.hbar .n { text-align: right; font-weight: 700; }
.report-item { margin-bottom: .8rem; box-shadow: none; }
.report-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.settings-form .card { margin-bottom: 1.25rem; box-shadow: none; }
.temp { font-size: 1rem; user-select: all; }

/* consent, ads */
.consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; box-shadow: var(--shadow); z-index: 60; }
.consent p { margin: 0 0 .75rem; color: var(--muted); font-size: .92rem; }
.ad-wrap { margin: 1rem auto; }
.ad-slot { min-height: 100px; border: 1px dashed var(--line); border-radius: 12px; padding: .4rem; }
.ad-label { display: block; font-size: .7rem; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .3rem; }

/* footer */
.footer-grid { align-items: flex-start; }
.footer-grid nav { flex-direction: column; gap: .35rem; }
.footer-grid nav strong { color: var(--text); margin-bottom: .2rem; }
.footer-brand { max-width: 320px; }
.footer-brand strong { color: var(--text); }

.report-sheet h3 { margin-bottom: .2rem; }
.chart-box .barm.ghost { opacity: .5; }
@media print {
  .site-header, .site-footer, .no-print, .section-head, .stats-strip, .btn-row, .consent, .ad-wrap, .page-hero, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  #dashboard > :not(.locked-wrap), .locked-wrap:not(:has(#report)) { display: none !important; }
  .card { box-shadow: none; border: 0; }
}
.dropdown details { background: none; border: 0; padding: 0; margin: 0; border-radius: 0; }

/* ---------- v3: payout modes and disclaimer ---------- */
.mode-pill { display: inline-block; margin-left: .35rem; font-size: .72rem; font-weight: 800; padding: .12rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--text); vertical-align: middle; }
.big-result .range { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.big-result .range:empty { display: none; }
tr.dim-row td { color: var(--muted); font-size: .9rem; }
.disclaimer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 3rem; }
.disclaimer p { margin: 0; padding: 1rem 0; font-size: .86rem; color: var(--muted); }
.disclaimer + .site-footer { margin-top: 0; }
input[type="range"] { padding: 0; accent-color: var(--pink); }
.brand span i { font-style: normal; color: var(--muted); font-weight: 700; }

/* ---------- v5: layout polish for desktop, tablet and mobile (no content changes) ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, svg, video { height: auto; }
/* grid children may shrink below their content (stops wide tables pushing pages sideways) */
.grid-2 > *, .grid-3 > *, .plans > *, .battle-board > *, .stats-strip > * { min-width: 0; }
.table-wrap { -webkit-overflow-scrolling: touch; }
/* reading sections line up with the rest of the page instead of floating in the centre */
.wrap.narrow { width: min(1160px, 100% - 2.5rem); }
.wrap.narrow > * { max-width: 780px; }
.wrap.narrow > .section-head { max-width: 780px; }
/* consistent rhythm */
.section + .section { padding-top: 1.5rem; }
.card > h3:first-child, .card > .h3:first-child { margin-top: 0; }
.btn { min-height: 44px; }
.btn-sm { min-height: 36px; }
.gift, .icon-btn, .theme-toggle { touch-action: manipulation; }
.big-result .v { line-height: 1.15; word-break: break-word; }
.result-row .v { text-align: right; }
.result-row .k { min-width: 0; }

/* large desktop */
@media (min-width: 1400px) {
  .wrap, .wrap.narrow { width: min(1240px, 100% - 4rem); }
  .gift-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
}

/* tablet */
@media (max-width: 900px) {
  .sticky { position: static; }
  .grid-2, .grid-2.even { gap: 1rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .gift-cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; max-width: none; }
}

/* phones */
@media (max-width: 600px) {
  .wrap, .wrap.narrow { width: calc(100% - 2rem); }
  input, select, textarea { font-size: 16px; }   /* stops iOS zooming into fields */
  .hero { padding: 2rem 0 1.5rem; }
  .page-hero { padding: 1.75rem 0 1.25rem; }
  h1 { font-size: clamp(1.75rem, 8vw, 2.2rem); margin: .8rem 0 .6rem; }
  .page-hero h1 { font-size: clamp(1.6rem, 7.5vw, 2rem); }
  h2, .h2 { font-size: 1.4rem; }
  .lead { font-size: 1.02rem; margin-bottom: 1.1rem; }
  .eyebrow { font-size: .7rem; padding: .3rem .65rem; }
  .section { padding: 1.75rem 0; }
  .section-head { margin-bottom: 1rem; }
  .card { padding: 1rem; border-radius: 14px; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero .btn-row .btn { flex: 1 1 140px; }
  /* stat tiles in two columns instead of four tall rows */
  .stats-strip, .kpis { grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.25rem; }
  .stat { padding: .75rem .85rem; border-radius: 12px; }
  .stat .k { font-size: .76rem; line-height: 1.3; }
  .stat .v { font-size: 1.2rem; }
  .stat input { padding: .45rem .6rem; }
  .big-result { padding: .85rem 1rem; }
  .big-result .v { font-size: 1.85rem; }
  .result-row { padding: .5rem 0; font-size: .95rem; }
  /* gift picker: three per row */
  .search-row select { flex: 1 1 100%; }
  .gift-grid { grid-template-columns: repeat(3, 1fr); gap: .5rem; max-height: 440px; }
  .gift { padding: .6rem .3rem .55rem; border-radius: 12px; }
  .gift .em { font-size: 1.6rem; }
  .gift .nm { font-size: .76rem; }
  .gift .cn { font-size: .72rem; }
  .gift-grid.compact { grid-template-columns: repeat(3, 1fr); max-height: 360px; }
  .basket li { gap: .45rem; padding: .4rem .5rem; }
  .basket input { width: 64px; }
  /* battle scoreboard stays side by side */
  .battle-board { grid-template-columns: 1fr auto 1fr; gap: .4rem; padding: .75rem; }
  .vs { order: 0; }
  .vs span { width: 40px; height: 40px; font-size: .8rem; }
  .vs .gap { font-size: .75rem; max-width: 84px; margin-top: .4rem; }
  .side { padding: .6rem .25rem; }
  .side-name { font-size: .9rem; padding: .3rem; }
  .side-score { font-size: 1.9rem; }
  .side .btn-sm { padding: .35rem .55rem; font-size: .78rem; min-height: 32px; }
  .inline-field { flex-wrap: wrap; }
  /* tables */
  th, td { padding: .55rem .6rem; font-size: .88rem; }
  th { font-size: .72rem; }
  /* gift page */
  .gift-hero { gap: 1rem; }
  .gift-cards { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .gift-card { padding: .8rem .5rem; }
  /* goals and analytics */
  .goal-actions input { width: 100%; flex: 1 1 100%; }
  .goal-top { gap: .6rem; }
  .chart-box svg { height: 220px; }
  /* FAQ and prose */
  details { padding: .85rem 1rem; }
  .prose { font-size: 1rem; }
  /* footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .footer-grid nav:last-child { grid-column: 1 / -1; }
  .disclaimer p { font-size: .8rem; }
  .site-footer { padding-bottom: 2rem; }
  /* admin and account */
  .admin-nav, .pills { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-nav a, .pills a { white-space: nowrap; }
  td.actions, .inline-form { flex-wrap: wrap; }
  .toast { width: calc(100% - 2rem); text-align: center; }
}
@media (max-width: 360px) {
  .gift-grid, .gift-grid.compact { grid-template-columns: repeat(2, 1fr); }
  .side-score { font-size: 1.6rem; }
}
.wrap > .narrow.prose { margin-left: 0 !important; }
@media (max-width: 600px) {
  .hero .btn-row .btn { flex: 1 1 100%; }
  /* compact tables so key numbers fit on screen; the first column wraps instead of scrolling */
  .table-wrap table th, .table-wrap table td { padding: .5rem .45rem; font-size: .8rem; }
  .table-wrap table th { font-size: .66rem; letter-spacing: .02em; }
  .table-wrap table td:first-child, .table-wrap table th:first-child { white-space: normal; min-width: 96px; }
  .table-wrap table td.wrap-cell { min-width: 140px; }
}
@media (max-width: 600px) {
  .table-wrap table th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
  .table-wrap table td:first-child, .table-wrap table th:first-child { min-width: 88px; }
  .tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .tabs button { padding: .5rem .35rem; font-size: .8rem; line-height: 1.2; white-space: normal; }
}
@media (max-width: 600px) {
  .cta-band { padding: 1.75rem 1.1rem; border-radius: 18px; }
  .cta-band .btn-row .btn { flex: 1 1 100%; }
  .disclaimer { margin-top: 1.5rem; }
}
.wrap.narrow { max-width: none; }
.prose .table-wrap th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
.table-wrap th, .table-wrap td { white-space: normal; }
.table-wrap th { vertical-align: bottom; line-height: 1.25; }
@media (max-width: 1100px) {
  .card .table-wrap th, .card .table-wrap td { padding: .55rem .5rem; }
}
@media (max-width: 600px) {
  .table-wrap table th, .table-wrap table td, .card .table-wrap th, .card .table-wrap td { padding: .45rem .3rem; font-size: .76rem; }
  .table-wrap table th { font-size: .62rem; letter-spacing: 0; }
  .table-wrap table td:first-child, .table-wrap table th:first-child { min-width: 70px; padding-left: .5rem; }
  .table-wrap table td:last-child, .table-wrap table th:last-child { padding-right: .5rem; }
  .table-wrap table td img { width: 18px; height: 18px; }
}
@media (max-width: 600px) {
  .card > .table-wrap { margin-left: -1rem; margin-right: -1rem; border-radius: 0; border-left: 0; border-right: 0; }
}
