/* =========================================================
   Leonida Copilot — "Leonida Night" theme (original artwork)
   ========================================================= */
:root {
  --ink: #07031a;
  --ink-2: #0e0726;
  --glass: rgba(16, 8, 36, 0.72);
  --glass-strong: rgba(12, 6, 28, 0.9);
  --line: rgba(255, 255, 255, 0.09);
  --line-hot: rgba(255, 61, 139, 0.45);

  --pink: #ff3d8b;
  --pink-soft: #ff7ab6;
  --orange: #ff8a3d;
  --gold: #ffc96b;
  --cyan: #2de2e6;
  --violet: #9b5cff;
  --green: #3ef0a1;
  --amber: #ffb547;

  --text: #f6f1ff;
  --muted: #b7a9d6;
  --dim: #8a7cab;

  --sunset: linear-gradient(100deg, var(--gold) 0%, var(--orange) 35%, var(--pink) 70%, var(--violet) 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8);

  --f-display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --f-ui: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--ink);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--pink-soft); }
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.2em; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--cyan); color: var(--ink); padding: .5rem .9rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Background scene ---------- */
.scene, .scene-shade, .grain { position: fixed; inset: 0; pointer-events: none; }
.scene {
  z-index: -3;
  background: var(--ink) url("/assets/scene.svg") center bottom / cover no-repeat;
}
@media (orientation: portrait) {
  .scene { background-image: url("/assets/scene-portrait.svg"); }
}
.scene-shade {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(7, 3, 26, 0.2) 0%, rgba(7, 3, 26, 0.35) 40%, rgba(7, 3, 26, 0.82) 75%, rgba(7, 3, 26, 0.94) 100%);
  transition: background .4s;
}
body.scrolled .scene-shade { background: rgba(7, 3, 26, 0.82); }
.grain {
  z-index: -1;
  opacity: .09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font-family: var(--f-ui); font-weight: 700; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: 999px; padding: .6rem 1.05rem;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, opacity .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-lg { font-size: 1.12rem; padding: .85rem 1.5rem; }
.btn-block { width: 100%; }
.btn-primary {
  color: #1a0718;
  background: var(--sunset);
  box-shadow: 0 10px 30px -8px rgba(255, 61, 139, .65), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 14px 38px -8px rgba(255, 61, 139, .9), inset 0 1px 0 rgba(255, 255, 255, .5); transform: translateY(-1px); }
.btn-outline { color: var(--text); border-color: rgba(255, 255, 255, .35); background: rgba(10, 4, 24, .35); backdrop-filter: blur(6px); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, .06); border-color: var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-vip {
  color: #1a0718; background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 6px 22px -6px rgba(255, 138, 61, .8);
}
.btn-vip.is-vip { color: var(--green); background: rgba(62, 240, 161, .1); border-color: rgba(62, 240, 161, .5); box-shadow: none; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1rem, 3vw, 2rem);
  padding-top: max(.7rem, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(7, 3, 26, .85), rgba(7, 3, 26, .55));
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; min-width: 0; }
.brand-logo { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 0 24px rgba(155, 92, 255, .45); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--f-display); font-size: 1.3rem; letter-spacing: .04em; line-height: 1; }
.brand-name em { font-style: normal; background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-family: var(--f-ui); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .2rem; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }

/* ---------- Hero ---------- */
main { position: relative; }
.hero {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 6rem) clamp(1rem, 3vw, 2rem) clamp(2rem, 5vw, 3.5rem);
  display: grid; grid-template-columns: 1.35fr .9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  min-height: min(82vh, 760px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1.1rem;
  font-family: var(--f-ui); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; font-size: .85rem;
  color: var(--gold); padding: .35rem .8rem; border-radius: 999px;
  background: rgba(10, 4, 24, .5); border: 1px solid rgba(255, 201, 107, .3); backdrop-filter: blur(6px);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(62, 240, 161, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(62, 240, 161, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 240, 161, 0); } }

.hero-title { margin: 0; font-family: var(--f-display); font-weight: 400; text-transform: uppercase; line-height: .92; letter-spacing: .01em; }
.hero-title span { display: block; }
.line-1 { font-size: clamp(3rem, 9vw, 6.6rem); color: #fff; text-shadow: 0 0 30px rgba(255, 61, 139, .55), 0 4px 0 rgba(90, 15, 70, .6); }
.line-2 {
  font-size: clamp(2.6rem, 7.8vw, 5.8rem);
  background: linear-gradient(180deg, #fff3b0 0%, var(--gold) 30%, var(--orange) 60%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 120, 60, .45));
}
.hero-sub { max-width: 40rem; margin: 1.3rem 0 1.6rem; font-size: clamp(1rem, 1.6vw, 1.15rem); color: #e9e0ff; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-proof { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; font-size: .9rem; color: #dcd0f5; }
.hero-proof li { display: flex; align-items: center; gap: .4rem; }
.hero-proof .ico { color: var(--cyan); }

/* HUD */
.hud {
  position: relative; padding: 1.4rem; border-radius: 24px;
  background: linear-gradient(160deg, rgba(30, 12, 60, .78), rgba(10, 4, 24, .85));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--shadow), 0 0 0 1px rgba(45, 226, 230, .08) inset;
  backdrop-filter: blur(16px);
}
.hud::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(45, 226, 230, .6), transparent 40%, transparent 60%, rgba(255, 61, 139, .6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.hud-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.hud-label { font-family: var(--f-ui); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: .85rem; color: var(--muted); }
.pill { font-family: var(--f-ui); font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; padding: .25rem .65rem; border-radius: 999px; border: 1px solid; }
.pill-free { color: var(--muted); border-color: var(--line); background: rgba(255, 255, 255, .04); }
.pill-vip { color: var(--gold); border-color: rgba(255, 201, 107, .5); background: rgba(255, 201, 107, .1); }

.radar {
  --pct: 0;
  position: relative; width: min(240px, 70vw); aspect-ratio: 1; margin: 0 auto; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 58%, rgba(45, 226, 230, .12) 58.5% 59%, transparent 59.5%),
    radial-gradient(circle, transparent 0 38%, rgba(45, 226, 230, .12) 38.5% 39%, transparent 39.5%),
    conic-gradient(from 0deg, var(--cyan) 0%, var(--pink) calc(var(--pct) * 1%), rgba(255, 255, 255, .07) calc(var(--pct) * 1%));
  box-shadow: 0 0 40px rgba(45, 226, 230, .18), inset 0 0 30px rgba(0, 0, 0, .6);
}
.radar::before {
  content: ""; position: absolute; inset: 10px; border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.6%, rgba(45, 226, 230, .18) 50%, transparent 50.4%),
    linear-gradient(0deg, transparent 49.6%, rgba(45, 226, 230, .18) 50%, transparent 50.4%),
    radial-gradient(circle, #160a33, #07031a 75%);
}
.radar-sweep {
  position: absolute; inset: 10px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(45, 226, 230, .35), transparent 22%);
  animation: sweep 4.5s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-core { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.radar-pct { font-family: var(--f-display); font-size: clamp(2.6rem, 8vw, 3.4rem); line-height: 1; text-shadow: 0 0 18px rgba(45, 226, 230, .7); }
.radar-cap { font-family: var(--f-ui); letter-spacing: .22em; text-transform: uppercase; font-size: .78rem; color: var(--muted); margin-top: .3rem; }

.stars { display: flex; justify-content: center; gap: .35rem; margin: 1.1rem 0 1rem; }
.stars .ico { width: 26px; height: 26px; color: rgba(255, 255, 255, .14); transition: color .3s, filter .3s; }
.stars .ico.on { color: var(--gold); filter: drop-shadow(0 0 8px rgba(255, 201, 107, .8)); }
.hud-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 0; }
.hud-stats div { padding: .7rem .8rem; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.hud-stats dt { font-family: var(--f-ui); letter-spacing: .16em; text-transform: uppercase; font-size: .72rem; color: var(--dim); }
.hud-stats dd { margin: .1rem 0 0; font-family: var(--f-display); font-size: 1.35rem; letter-spacing: .02em; }

/* ---------- App area ---------- */
.app { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem) 3rem; scroll-margin-top: 80px; }
.app:focus { outline: none; }

.tabs {
  position: sticky; top: 70px; z-index: 20;
  display: flex; gap: .4rem; padding: .4rem; margin-bottom: 1.4rem;
  background: rgba(10, 4, 24, .9); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(14px); width: 100%;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8);
}
.tab {
  display: inline-flex; align-items: center; gap: .5rem; border: 0; cursor: pointer; border-radius: 999px;
  padding: .6rem 1.2rem; background: transparent; color: var(--muted);
  font-family: var(--f-ui); font-weight: 700; font-size: 1.05rem; letter-spacing: .1em; text-transform: uppercase;
  transition: color .2s, background .2s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: #1a0718; background: var(--sunset); box-shadow: 0 6px 20px -6px rgba(255, 61, 139, .7); }
.panel { display: none; animation: rise .35s ease; }
.panel.is-active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card {
  padding: clamp(1.1rem, 3vw, 1.6rem); border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.card-head h2, .modal-title {
  margin: 0 0 .3rem; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2rem);
  text-transform: uppercase; letter-spacing: .02em;
}
.card-head p { margin: 0 0 1.2rem; }

/* Calculator */
.calc-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field-label { font-family: var(--f-ui); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; color: var(--muted); }
select, input[type="number"], input[type="text"], input[type="search"] {
  width: 100%; padding: .8rem .95rem; border-radius: var(--radius-sm);
  background: rgba(5, 2, 16, .7); border: 1px solid rgba(255, 255, 255, .14); color: var(--text);
  font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.4rem; }
select option { background: var(--ink-2); }
select:focus, input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(45, 226, 230, .18); }
.money-input { position: relative; display: block; }
.money-input > span { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); font-family: var(--f-display); color: var(--green); font-size: 1.15rem; }
.money-input input { padding-left: 2rem; font-family: var(--f-display); font-size: 1.25rem; letter-spacing: .03em; color: var(--green); }
.quick-add { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0 1.2rem; }

.chip {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05);
  color: var(--muted); font-family: var(--f-ui); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .88rem;
  transition: all .2s;
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.chip.is-active { color: #1a0718; background: var(--gold); border-color: var(--gold); }
.chip .count { font-size: .78rem; opacity: .75; }

.gate {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem 1.2rem; border-radius: var(--radius-sm);
  background: linear-gradient(110deg, rgba(255, 61, 139, .16), rgba(155, 92, 255, .1));
  border: 1px solid var(--line-hot);
}
.gate.is-clear { background: linear-gradient(110deg, rgba(62, 240, 161, .14), rgba(45, 226, 230, .08)); border-color: rgba(62, 240, 161, .45); }
.gate-k { font-family: var(--f-ui); letter-spacing: .16em; text-transform: uppercase; font-size: .78rem; color: var(--muted); }
.gate-v { font-family: var(--f-display); font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.05; }
.gate-v.red { color: var(--pink-soft); text-shadow: 0 0 18px rgba(255, 61, 139, .5); }
.gate-v.green { color: var(--green); text-shadow: 0 0 18px rgba(62, 240, 161, .45); }
.gate-meta { color: var(--muted); font-size: .92rem; }
.gate-best { text-align: right; }
.gate-best strong { display: block; font-family: var(--f-ui); font-size: 1.1rem; letter-spacing: .04em; }

/* Routes (mission cards) */
.routes { display: grid; gap: .9rem; margin-top: 1.2rem; }
.route {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: start;
  padding: 1.1rem 1.2rem 1.1rem 1.4rem; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px);
  transition: border-color .2s, transform .2s;
}
.route:hover { border-color: rgba(255, 255, 255, .22); transform: translateY(-1px); }
.route::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tier, var(--cyan)); box-shadow: 0 0 16px var(--tier, var(--cyan)); }
.route.is-best { border-color: rgba(255, 201, 107, .55); box-shadow: 0 0 0 1px rgba(255, 201, 107, .25), 0 18px 50px -20px rgba(255, 138, 61, .55); }
.route-rank { font-family: var(--f-display); font-size: 1.6rem; line-height: 1; color: rgba(255, 255, 255, .25); min-width: 2ch; }
.route-title { margin: 0; font-family: var(--f-ui); font-weight: 700; font-size: 1.25rem; letter-spacing: .02em; line-height: 1.2; }
.route-tags { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: .4rem 0 .55rem; color: var(--muted); font-size: .88rem; }
.route-tags span { display: inline-flex; align-items: center; gap: .3rem; }
.route-steps { margin: 0; color: #e4dbf7; }
.route-pay { text-align: right; }
.route-pay strong { display: block; font-family: var(--f-display); font-size: 1.45rem; color: var(--green); letter-spacing: .02em; line-height: 1.1; }
.route-pay span { font-family: var(--f-ui); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.meter { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: .55rem; width: 120px; margin-left: auto; }
.meter i { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--cyan), var(--green)); border-radius: inherit; }
.badge-best {
  display: inline-flex; align-items: center; gap: .3rem; margin-bottom: .35rem;
  font-family: var(--f-ui); font-weight: 700; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: #1a0718; background: var(--gold); padding: .15rem .55rem; border-radius: 6px;
}

/* Locked content */
.locked { position: relative; margin-top: .3rem; border-radius: var(--radius-sm); overflow: hidden; }
.locked-blur { filter: blur(6px); user-select: none; color: var(--muted); padding: .5rem .2rem; }
.locked-cta {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap;
  padding: .5rem .8rem; background: linear-gradient(90deg, rgba(10, 4, 24, .92), rgba(10, 4, 24, .55));
}
.locked-cta span { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--f-ui); font-weight: 600; letter-spacing: .06em; color: var(--gold); }
.btn-unlock { padding: .4rem .85rem; font-size: .85rem; }

/* Checklist */
.list-tools { display: grid; gap: .8rem; margin-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.list-tools-row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.search { position: relative; flex: 1 1 260px; }
.search .ico { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search input { padding-left: 2.4rem; }
.toggle { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; color: var(--muted); font-family: var(--f-ui); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { width: 40px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, .12); position: relative; transition: background .2s; }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .toggle-ui { background: var(--pink); }
.toggle input:checked + .toggle-ui::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--cyan); outline-offset: 2px; }

.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .9rem; }
.item {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: start;
  padding: 1rem; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(12px); transition: border-color .2s, opacity .2s;
}
.item.is-done { border-color: rgba(62, 240, 161, .35); }
.item.is-done .item-title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(62, 240, 161, .6); }
.cat-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--c, var(--cyan)); background: color-mix(in srgb, var(--c, var(--cyan)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--cyan)) 35%, transparent); }
.cat-ico .ico { width: 22px; height: 22px; }
.cat-safes { --c: var(--gold); }
.cat-cars { --c: var(--cyan); }
.cat-collectibles { --c: var(--pink); }
.cat-cheats { --c: var(--violet); }
.item-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .25rem; }
.item-cat { font-family: var(--f-ui); font-weight: 700; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--c, var(--muted)); }
.item-title { margin: 0; font-family: var(--f-ui); font-weight: 700; font-size: 1.12rem; line-height: 1.25; letter-spacing: .01em; }
.item-hint { margin: .3rem 0 .5rem; color: var(--muted); font-size: .9rem; }
.secret {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .86rem; color: var(--cyan);
  padding: .55rem .7rem; border-radius: 10px; background: rgba(45, 226, 230, .07); border: 1px dashed rgba(45, 226, 230, .35);
}
.status { display: inline-block; font-family: var(--f-ui); font-weight: 700; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; padding: .08rem .45rem; border-radius: 5px; vertical-align: .05em; }
.status-verified { color: var(--green); background: rgba(62, 240, 161, .12); }
.status-pending { color: var(--amber); background: rgba(255, 181, 71, .12); }

.check {
  width: 34px; height: 34px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .25);
  display: grid; place-items: center; cursor: pointer; color: transparent; transition: all .2s; padding: 0;
}
.check:hover { border-color: var(--green); }
.check[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #05220f; box-shadow: 0 0 18px rgba(62, 240, 161, .55); }
.check .ico { width: 20px; height: 20px; }
.empty { text-align: center; color: var(--muted); padding: 2rem; }

.data-note { display: flex; gap: .55rem; align-items: flex-start; margin: 1.6rem 0 0; font-size: .86rem; color: var(--muted); }
.data-note .ico { color: var(--cyan); margin-top: .15rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: rgba(5, 2, 14, .92); padding: 2rem clamp(1rem, 3vw, 2rem) calc(2rem + env(safe-area-inset-bottom)); }
.footer-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-brand { display: flex; gap: .7rem; align-items: center; }
.footer-brand img { border-radius: 10px; }
.footer-brand strong { font-family: var(--f-display); font-weight: 400; letter-spacing: .04em; font-size: 1.1rem; }
.footer-brand p { margin: 0; color: var(--dim); font-size: .85rem; }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-family: var(--f-ui); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.footer-links a:hover { color: var(--gold); }
.disclaimer, .copyright { max-width: 1180px; margin: 1.2rem auto 0; color: var(--dim); font-size: .8rem; }
.copyright { margin-top: .5rem; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 1, 10, .75); backdrop-filter: blur(6px); }
.modal-card {
  position: relative; width: min(480px, 100%); max-height: calc(100vh - 2rem); overflow: auto;
  padding: 1.8rem 1.5rem 1.5rem; border-radius: 22px;
  background: linear-gradient(170deg, #1d0c3d, #0b0520 70%); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(255, 61, 139, .45);
  animation: pop .25s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-x { position: absolute; top: .8rem; right: .8rem; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.modal-x:hover { color: var(--text); }
.vip-card { overflow: hidden; }
.vip-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 160px; background: url("/assets/scene.svg") center 72% / cover; opacity: .55; -webkit-mask: linear-gradient(#000, transparent); mask: linear-gradient(#000, transparent); pointer-events: none; }
.vip-card > * { position: relative; }
.vip-ribbon { display: inline-block; font-family: var(--f-ui); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; color: #1a0718; background: var(--gold); padding: .25rem .7rem; border-radius: 6px; }
.vip-title { margin: .8rem 0 .4rem; font-family: var(--f-display); font-weight: 400; font-size: 2.1rem; line-height: 1; text-transform: uppercase; }
.vip-title span { background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }
.perks { list-style: none; padding: 0; margin: 1.1rem 0; display: grid; gap: .55rem; }
.perks li { display: flex; gap: .6rem; align-items: flex-start; }
.perks .ico { color: var(--green); margin-top: .2rem; }
.price-row { display: flex; align-items: center; gap: 1rem; margin: .6rem 0 1rem; }
.price { font-family: var(--f-display); font-size: 3.4rem; line-height: 1; background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-cur { font-size: 1.6rem; vertical-align: 1.3rem; }
.price-cents { font-size: 1.8rem; }
.price-note { font-family: var(--f-ui); letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; color: var(--muted); line-height: 1.25; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; color: var(--muted); margin-bottom: 1rem; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--pink); flex: none; }
.fine { display: flex; justify-content: center; align-items: center; gap: .4rem; margin: .8rem 0 0; font-size: .8rem; color: var(--dim); }

.key-box { margin: 1rem 0; padding: 1rem; border-radius: var(--radius-sm); background: rgba(255, 201, 107, .07); border: 1px solid rgba(255, 201, 107, .3); }
.key-row { display: flex; gap: .5rem; align-items: center; margin: .5rem 0; }
.key-row code { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 1.1rem; letter-spacing: .06em; color: var(--gold); padding: .7rem .8rem; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); overflow-wrap: anywhere; }
.key-row input { flex: 1; font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; letter-spacing: .05em; }
.success-card { text-align: center; }
.success-badge { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; color: #1a0718; background: var(--sunset); box-shadow: 0 0 50px rgba(255, 138, 61, .7); }
.success-badge .ico { width: 36px; height: 36px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; display: grid; gap: .5rem; width: min(420px, calc(100% - 2rem)); }
.toast { padding: .8rem 1rem; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(12px); font-size: .92rem; animation: pop .25s ease; }
.toast.ok { border-color: rgba(62, 240, 161, .5); }
.toast.err { border-color: rgba(255, 61, 139, .6); }

/* ---------- Legal pages ---------- */
.legal { max-width: 820px; margin: 0 auto; padding: 3rem clamp(1rem, 3vw, 2rem) 4rem; }
.legal .card { line-height: 1.7; }
.legal h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.2rem, 6vw, 3.2rem); text-transform: uppercase; margin: 0 0 .3rem; }
.legal h2 { font-family: var(--f-ui); font-size: 1.35rem; letter-spacing: .04em; margin: 2rem 0 .4rem; color: var(--gold); }
.legal p, .legal li { color: #e4dbf7; }
.legal .updated { color: var(--dim); font-size: .9rem; margin-bottom: 1.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 2.2rem; }
  .hud { max-width: 420px; width: 100%; margin: 0 auto; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .hide-sm { display: none; }
  .brand-sub { display: none; }
  .brand-name { font-size: 1.1rem; }
  .brand-logo { width: 38px; height: 38px; }
  .topbar-actions .btn { padding: .5rem .7rem; font-size: .88rem; }
  .tabs { top: 62px; width: 100%; }
  .tab { flex: 1; justify-content: center; padding: .55rem .6rem; font-size: .95rem; }
  .calc-grid { grid-template-columns: 1fr; }
  .route { grid-template-columns: 1fr; gap: .4rem; padding-left: 1.2rem; }
  .route-rank { display: none; }
  .route-pay { text-align: left; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
  .meter { margin-left: 0; }
  .gate-best { text-align: left; }
  .items { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.scene-shade-dark { background: rgba(7, 3, 26, 0.82); }

/* v2.1 — money planner + three-level status */
.calc-grid { grid-template-columns: 1.4fr 1fr 1fr; }
.money-target input { color: var(--gold); }
.money-target > span { color: var(--gold); }
.goal-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .2rem 0 .2rem; }
.goal-chips:empty { display: none; }
.goal-chips .chip { color: var(--gold); border-color: rgba(255, 201, 107, .35); }
.status-sourced { color: var(--cyan); background: rgba(45, 226, 230, .12); }
.status[title] { cursor: help; }
.chapter-notes { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .45rem; font-size: .9rem; color: var(--muted); }
.chapter-notes li { padding: .6rem .8rem; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.chapter-notes strong { color: var(--text); }
.category-note { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: var(--radius-sm); background: rgba(45, 226, 230, .07); border: 1px solid rgba(45, 226, 230, .25); color: #dff8fa; font-size: .92rem; }
.route.is-later { opacity: .55; }
.route.is-later:hover { opacity: .85; }
.badge-later { display: inline-block; margin-bottom: .35rem; font-family: var(--f-ui); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: .12rem .5rem; border-radius: 6px; }
.route-pay span { display: block; }
.data-note > span { display: block; }
@media (max-width: 900px) { .calc-grid { grid-template-columns: 1fr 1fr; } .calc-grid .field:first-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .calc-grid { grid-template-columns: 1fr 1fr; } }
.secret-arrows { font-size: 1.25rem; letter-spacing: .12em; line-height: 1.5; color: #9ff6f8; }

/* v2.1.1 — header never overlaps on phones */
.brand { flex: 1 1 auto; min-width: 0; }
.brand-mark { flex: none; display: block; line-height: 0; }
.brand-text { min-width: 0; overflow: hidden; }
.brand-name, .brand-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { flex: none; }
@media (max-width: 640px) {
  .topbar { gap: .5rem; padding-left: .75rem; padding-right: .75rem; }
  .brand { gap: .5rem; }
  .brand-logo { width: 36px; height: 36px; border-radius: 10px; }
  .brand-name { font-size: 1.02rem; line-height: 1.02; letter-spacing: .03em; }
  .brand-name em { display: block; }
  .topbar-actions { gap: .35rem; }
  .topbar-actions .btn-icon-sm { width: 38px; height: 38px; padding: 0; }
  .topbar-actions .btn-icon-sm .ico { width: 18px; height: 18px; }
  .topbar-actions .btn-vip { height: 38px; padding: 0 .8rem; font-size: .9rem; gap: .35rem; }
}
@media (max-width: 340px) {
  .brand-text { display: none; }
}

/* v2.1.2 — modals always scrollable on phones (100vh ignores mobile browser bars) */
.modal { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-card { max-height: calc(100vh - 2rem); }
@supports (height: 100dvh) {
  .modal-card { max-height: calc(100dvh - 2rem); }
}
@media (max-width: 640px) {
  .modal {
    place-items: start center;
    padding: max(.75rem, env(safe-area-inset-top)) .75rem calc(.75rem + env(safe-area-inset-bottom));
  }
  .modal-backdrop { position: fixed; }
  .modal-card { max-height: none; overflow: visible; margin: auto 0; padding: 1.4rem 1.1rem 0; }
  .modal-card:not(.vip-card) { padding-bottom: 1.2rem; }
  .vip-card { overflow: visible; }
  .vip-card::before { border-radius: 22px 22px 0 0; }
  .vip-title { font-size: 1.75rem; margin-top: .6rem; }
  .vip-card > .muted { font-size: .92rem; margin: .3rem 0 0; }
  .perks { margin: .8rem 0; gap: .45rem; font-size: .92rem; }
  .price-row { margin: .3rem 0 .6rem; }
  .price { font-size: 2.8rem; }
  /* Consent + pay button stay pinned to the bottom of the screen while the card scrolls */
  .vip-cta {
    position: sticky; bottom: 0; z-index: 2;
    margin: 0 -1.1rem; padding: .85rem 1.1rem calc(.85rem + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(11, 5, 32, .88), #0b0520 35%);
    border-top: 1px solid var(--line);
    border-radius: 0 0 22px 22px;
    backdrop-filter: blur(10px);
  }
  .vip-cta .consent { font-size: .8rem; margin-bottom: .7rem; }
  .vip-cta .fine { margin-top: .55rem; }
}
.vip-card > .modal-x { position: absolute; top: .8rem; right: .8rem; z-index: 3; }

/* v2.3 — SEO guide pages */
.guide { max-width: 1000px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem; display: grid; gap: 1.2rem; }
.crumbs { font-size: .85rem; color: var(--dim); }
.crumbs a { color: var(--muted); text-decoration: none; }
.guide-hero h1 { margin: .4rem 0 .6rem; font-family: var(--f-display); font-weight: 400; text-transform: uppercase; line-height: .98; font-size: clamp(2.2rem, 7vw, 3.8rem); background: linear-gradient(180deg, #fff 0%, #fff3b0 45%, var(--orange) 80%, var(--pink) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.guide-intro { font-size: clamp(1rem, 2vw, 1.12rem); color: #e9e0ff; max-width: 46rem; margin: 0 0 .8rem; }
.legend { font-size: .82rem; color: var(--muted); margin: 0; }
.guide .card h2 { margin: 0 0 .5rem; font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.4rem, 3.5vw, 1.8rem); letter-spacing: .02em; }
.gtable-wrap { overflow-x: auto; margin-top: .8rem; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.gtable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.gtable th, .gtable td { text-align: left; vertical-align: top; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.gtable thead th { font-family: var(--f-ui); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; color: var(--muted); background: rgba(255, 255, 255, .04); }
.gtable tbody th { font-family: var(--f-ui); font-weight: 700; font-size: 1.02rem; color: var(--text); min-width: 10rem; }
.gtable tbody tr:last-child th, .gtable tbody tr:last-child td { border-bottom: 0; }
.gtable .code { font-family: ui-monospace, Consolas, monospace; color: var(--cyan); white-space: nowrap; }
.gtable .arrows { font-size: 1.05rem; letter-spacing: .08em; }
.lock-pill { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--f-ui); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); text-decoration: none; padding: .2rem .55rem; border-radius: 999px; border: 1px solid rgba(255, 201, 107, .4); background: rgba(255, 201, 107, .08); white-space: nowrap; }
.lock-pill:hover { background: rgba(255, 201, 107, .18); }
.steps, .tips { margin: .4rem 0 0; padding-left: 1.2rem; display: grid; gap: .4rem; color: #e4dbf7; }
.cta-box { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; align-items: center; border-color: rgba(255, 201, 107, .35); background: linear-gradient(120deg, rgba(255, 61, 139, .16), rgba(155, 92, 255, .12)); }
.cta-box p { margin: 0; }
.cta-actions { display: grid; gap: .6rem; }
.faq details { border-top: 1px solid var(--line); padding: .7rem 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-family: var(--f-ui); font-weight: 700; font-size: 1.08rem; }
.faq details p { margin: .5rem 0 0; color: #e4dbf7; }
.related { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; font-size: .9rem; color: var(--muted); }
.related a, .guide-links a { color: var(--gold); text-decoration: none; font-family: var(--f-ui); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.guide-links { max-width: 1180px; margin: 1.2rem auto 0; display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; font-size: .9rem; color: var(--dim); }
@media (max-width: 760px) {
  .cta-box { grid-template-columns: 1fr; }
  .gtable thead { display: none; }
  .gtable, .gtable tbody, .gtable tr, .gtable th, .gtable td { display: block; width: 100%; }
  .gtable tr { padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
  .gtable tbody th, .gtable td { padding: .15rem 0; border: 0; }
  .gtable tbody th { min-width: 0; }
  .gtable .code { white-space: normal; }
}
@media (max-width: 760px) { .gtable .code { font-size: 1.35rem; font-weight: 700; margin: .2rem 0; } .gtable .arrows { font-size: 1.3rem; } }

/* v2.4 — activities category + pending cheats */
.cat-activities { --c: var(--green); }
.pending { margin-top: 1.2rem; padding: 1.1rem 1.2rem; border-radius: var(--radius); background: var(--glass); border: 1px dashed rgba(255, 255, 255, .18); backdrop-filter: blur(12px); }
.pending-title { margin: 0 0 .3rem; font-family: var(--f-ui); font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; }
.pending-list { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; }
.pending-list li { display: grid; gap: .1rem; padding: .6rem .75rem; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: .9rem; }
.pending-group { font-family: var(--f-ui); font-weight: 700; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); }

/* v2.5 — game update card */
.patch-note { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: var(--radius-sm); background: rgba(45, 226, 230, .07); border: 1px solid rgba(45, 226, 230, .3); font-size: .92rem; }
.patch-note summary { cursor: pointer; font-weight: 600; }
.patch-badge { display: inline-block; margin-right: .4rem; font-family: var(--f-ui); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #1a0718; background: var(--cyan); padding: .1rem .45rem; border-radius: 5px; }
.patch-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .6rem 0; }
.patch-cols ul { margin: .3rem 0 0; padding-left: 1.1rem; color: #e4dbf7; }
@media (max-width: 640px) { .patch-cols { grid-template-columns: 1fr; } }
