/* =========================================================
   VI Cheats — styles
   ========================================================= */

:root {
  /* surfaces */
  --bg: #0b0714;
  --bg-2: #120a22;
  --panel: #160d29;
  --panel-2: #1d1235;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);

  /* text */
  --text: #f7f2ff;
  --muted: #b9abd6;
  --dim: #8a7ca8;

  /* neon */
  --pink: #ff3d8b;
  --orange: #ffb347;
  --violet: #8b5cf6;
  --teal: #2de2e6;
  --yellow: #ffd84d;
  --green: #3ddc97;
  --red: #ff5d73;
  --grad: linear-gradient(95deg, #ffb347 0%, #ff3d8b 50%, #a26bff 100%);

  /* D-pad direction colors */
  --k-U: #2de2e6;
  --k-D: #ff5fa2;
  --k-L: #ffb347;
  --k-R: #a98bff;

  /* category colors */
  --c-player: #2de2e6;
  --c-combat: #ff5d73;
  --c-vehicles: #ffb347;
  --c-world: #ffd84d;
  --c-filters: #b794ff;

  --radius: 16px;
  --header-h: 64px;
  --font-display: 'Anton', 'Impact', 'Arial Narrow Bold', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 10px;
  background: var(--text); color: var(--bg); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 880px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 1px 7px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-body);
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .2s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--grad);
  color: #1a0820;
  box-shadow: 0 10px 30px -10px rgba(255, 61, 139, .7);
}
.btn-primary:hover { box-shadow: 0 14px 38px -10px rgba(255, 61, 139, .95); transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-2);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, .28); }

.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-small svg { width: 18px; height: 18px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--dim);
  transition: color .15s, background-color .15s, border-color .15s;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .07); }

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  background: rgba(11, 7, 20, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; filter: drop-shadow(0 0 12px rgba(255, 61, 139, .45)); }
.brand-word { font-family: var(--font-display); font-size: 24px; letter-spacing: .04em; line-height: 1; }
.brand-word .grad-text { margin-left: 3px; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px;
  transition: color .15s, background-color .15s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

.header-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.pad-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(61, 220, 151, .12); border: 1px solid rgba(61, 220, 151, .35);
  color: var(--green); font-size: 12px; font-weight: 700;
}
.pad-chip svg { width: 16px; height: 16px; }
.pad-chip[hidden] { display: none; }

.seg {
  display: inline-flex; padding: 3px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 255, 255, .04);
}
.seg button {
  min-height: 34px; padding: 0 14px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .02em;
  transition: background-color .15s, color .15s;
}
.seg button[aria-checked="true"] { background: var(--text); color: var(--bg); }
.seg button:not([aria-checked="true"]):hover { color: var(--text); }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(56px, 9vw, 112px) 0 clamp(150px, 16vw, 230px);
  background:
    radial-gradient(60% 55% at 78% 92%, rgba(255, 110, 90, .55), transparent 70%),
    linear-gradient(180deg, #0b0714 0%, #170a2e 30%, #3b0f4f 56%, #8d1f5e 76%, #e2513f 92%, #ff8f3a 100%);
}

.hero-scene { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.sun {
  position: absolute;
  right: 7%; bottom: 13%;
  width: clamp(220px, 31vw, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe66d 0%, #ffb347 35%, #ff5f7e 70%, #e0338a 100%);
  box-shadow: 0 0 90px 20px rgba(255, 120, 90, .45);
  -webkit-mask-image: linear-gradient(to bottom, #000 0 50%, transparent 50% 53%, #000 53% 61%, transparent 61% 65%, #000 65% 72%, transparent 72% 77%, #000 77% 83%, transparent 83% 89%, #000 89% 93%, transparent 93%);
          mask-image: linear-gradient(to bottom, #000 0 50%, transparent 50% 53%, #000 53% 61%, transparent 61% 65%, #000 65% 72%, transparent 72% 77%, #000 77% 83%, transparent 83% 89%, #000 89% 93%, transparent 93%);
  animation: sun-rise 1.4s cubic-bezier(.2, .7, .2, 1) both;
}

.sea {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 19%;
  background:
    repeating-linear-gradient(180deg, rgba(255, 190, 120, .16) 0 2px, transparent 2px 11px),
    linear-gradient(180deg, rgba(60, 12, 70, .55) 0%, var(--bg) 100%);
  border-top: 1px solid rgba(255, 200, 140, .35);
}

.palms {
  position: absolute; bottom: 0;
  height: clamp(190px, 25vw, 340px);
  width: auto;
  color: #0d0618;
}
.palms-left { left: -20px; }
.palms-right { right: -20px; }

.hero-inner { position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(11, 7, 20, .45);
  backdrop-filter: blur(8px);
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(61, 220, 151, .6);
  animation: pulse 2s infinite;
}

.hero-title {
  margin: 0;
  max-width: 20ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 9vw, 116px);
  line-height: .94;
  letter-spacing: .005em;
  text-transform: uppercase;
  text-shadow: 0 6px 40px rgba(11, 7, 20, .5);
}
.hero-title .grad-text { filter: drop-shadow(0 4px 24px rgba(255, 61, 139, .35)); }

.lede {
  max-width: 600px;
  margin: 24px 0 0;
  color: #e1d6f5;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.55;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 880px;
  margin: 56px 0 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.stat { padding: 18px 20px; background: rgba(15, 8, 28, .72); }
.stat dt { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.stat dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 40px; line-height: 1.05; }
.stat dd small { font-size: 20px; color: var(--dim); margin-left: 2px; }
.stat-mine dd { color: var(--teal); }
.meter { height: 4px; margin-top: 10px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--green)); border-radius: inherit; transition: width .5s ease; }

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; flex-wrap: wrap; }
.kicker {
  margin: 0 0 8px;
  color: var(--pink);
  font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.section-sub { margin: 14px 0 0; color: var(--muted); font-size: 17px; }

/* ---------------------------------------------------------
   How-to steps
   --------------------------------------------------------- */
.steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  margin: 0; padding: 0; list-style: none;
  counter-reset: none;
}
.step {
  position: relative;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.step-n {
  position: absolute; top: 18px; right: 20px;
  font-family: var(--font-display); font-size: 44px; line-height: 1;
  color: rgba(255, 255, 255, .08);
}
.step-visual { display: flex; align-items: center; gap: 8px; min-height: 52px; margin-bottom: 18px; }
.step h3 { margin: 0 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); }

.shoulder {
  display: inline-grid; place-items: center;
  min-width: 58px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line-2); border-bottom-width: 3px;
  border-radius: 12px 12px 8px 8px;
  background: rgba(255, 255, 255, .07);
  font-weight: 800; font-size: 15px;
}
.plus { color: var(--dim); font-weight: 800; }

.callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.callout { padding: 24px; border-radius: var(--radius); border: 1px solid; }
.callout h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 17px; }
.callout h3 svg { width: 20px; height: 20px; flex: none; }
.callout ul { margin: 0; padding-left: 18px; color: #d9cdee; }
.callout li + li { margin-top: 8px; }
.callout strong { color: var(--text); }
.callout-warn { background: rgba(255, 93, 115, .07); border-color: rgba(255, 93, 115, .28); }
.callout-warn h3 svg { color: var(--red); }
.callout-tip { background: rgba(45, 226, 230, .06); border-color: rgba(45, 226, 230, .25); }
.callout-tip h3 svg { color: var(--teal); }

/* ---------------------------------------------------------
   D-pad key glyph (shared)
   --------------------------------------------------------- */
.key {
  --k: var(--k-U);
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--k) 45%, transparent);
  background: color-mix(in srgb, var(--k) 13%, transparent);
  color: var(--k);
  flex: none;
}
.key svg { width: 18px; height: 18px; }
.key-U { --k: var(--k-U); }
.key-R { --k: var(--k-R); }
.key-D { --k: var(--k-D); }
.key-L { --k: var(--k-L); }
.key-R svg, .slot-R svg, .dpad-R svg { transform: rotate(90deg); }
.key-D svg, .slot-D svg, .dpad-D svg { transform: rotate(180deg); }
.key-L svg, .slot-L svg, .dpad-L svg { transform: rotate(-90deg); }
.step-visual .key { width: 44px; height: 44px; border-radius: 12px; }
.step-visual .key svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------
   Toolbar
   --------------------------------------------------------- */
.toolbar {
  position: sticky; top: var(--header-h); z-index: 30;
  display: grid; gap: 12px;
  margin: 0 -24px 24px;
  padding: 14px 24px;
  background: rgba(11, 7, 20, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.search { position: relative; }
.search > svg {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--dim); pointer-events: none;
}
.search input {
  width: 100%; height: 52px;
  padding: 0 52px 0 48px;
  border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--panel);
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--dim); }
.search input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 61, 139, .18); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.search-kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search input:focus ~ .search-kbd,
.search input:not(:placeholder-shown) ~ .search-kbd { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  --c: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted); font-size: 14px; font-weight: 700;
  transition: background-color .15s, color .15s, border-color .15s;
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip-count { color: var(--dim); font-weight: 600; font-size: 12px; }
.chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  color: var(--text);
}
.chip[aria-pressed="true"] .chip-count { color: var(--text); opacity: .7; }

.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar-row .btn { margin-left: auto; }

.select {
  position: relative;
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--panel);
}
.select span { padding-left: 12px; color: var(--dim); font-size: 13px; font-weight: 700; }
.select select {
  appearance: none; -webkit-appearance: none;
  height: 40px; padding: 0 34px 0 8px;
  border: 0; background: transparent;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
}
.select select:focus { outline: none; }
.select:focus-within { border-color: var(--pink); }
.select::after {
  content: ''; position: absolute; right: 13px; top: 50%;
  width: 7px; height: 7px; margin-top: -5px;
  border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim);
  transform: rotate(45deg); pointer-events: none;
}
.select option { background: var(--panel); color: var(--text); }

.result-count { margin: 0; color: var(--muted); font-weight: 600; }
.result-count b { color: var(--text); }

/* ---------------------------------------------------------
   Cheat cards
   --------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}

.card {
  --c: var(--c-player);
  position: relative;
  display: flex; flex-direction: column;
  padding: 20px 20px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--c) 9%, transparent), transparent 60%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  transition: border-color .2s, transform .2s, box-shadow .2s;
  animation: card-in .35s ease both;
}
.card::before {
  content: ''; position: absolute; left: 20px; right: 20px; top: -1px; height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--c);
  opacity: .85;
}
.card:hover { border-color: color-mix(in srgb, var(--c) 40%, transparent); box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--c) 70%, transparent); }
.card.cat-player   { --c: var(--c-player); }
.card.cat-combat   { --c: var(--c-combat); }
.card.cat-vehicles { --c: var(--c-vehicles); }
.card.cat-world    { --c: var(--c-world); }
.card.cat-filters  { --c: var(--c-filters); }

.card.is-flash { animation: flash 1.6s ease; }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px -8px 6px 0; }
.card-tools { display: flex; align-items: center; gap: 4px; }
.tag {
  color: var(--c);
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.fav[aria-pressed="true"] { color: var(--yellow); }
.fav[aria-pressed="false"] svg { fill-opacity: 0; }
.fav svg path { transition: fill-opacity .15s; }

.card-title { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.card-effect { margin: 6px 0 16px; color: var(--muted); font-size: 15px; }

.seq-wrap { margin-bottom: 14px; }
.seq { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.seq .key { position: relative; }
.seq .key.fork::after {
  content: ''; position: absolute; left: 50%; bottom: -7px;
  width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--yellow);
}
.seq-meta { margin: 8px 0 0; color: var(--dim); font-size: 12px; font-weight: 600; }

.seq-missing {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; padding: 12px 14px;
  border: 1px dashed var(--line-2); border-radius: 12px;
  color: var(--dim); font-size: 14px; font-weight: 600;
}
.seq-missing svg { width: 18px; height: 18px; flex: none; }
.seq-missing .ghost-keys { display: flex; gap: 4px; margin-left: auto; }
.seq-missing .ghost-keys span {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 6px;
  background: rgba(255, 255, 255, .05); color: var(--dim); font-size: 12px; font-weight: 800;
}

.twin {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 0 0 14px; padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 216, 77, .07);
  color: #f3e3a0; font-size: 13px; line-height: 1.45;
}
.twin svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--yellow); }
.twin b { color: var(--yellow); }

.unlock { margin: 0 0 14px; font-size: 14px; }
.unlock dt { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.unlock dt svg { width: 13px; height: 13px; }
.unlock dd { margin: 3px 0 0; color: var(--text); font-weight: 600; }

.note {
  margin: 0 0 14px; padding-left: 10px;
  border-left: 2px solid var(--line-2);
  color: var(--muted); font-size: 13px;
}

.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.card-actions { display: flex; align-items: center; gap: 2px; }
.act {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 10px;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 700;
  transition: background-color .15s, color .15s;
}
.act svg { width: 16px; height: 16px; }
.act:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.act-train { color: var(--pink); }
.act-train:hover { color: #ff7fb1; background: rgba(255, 61, 139, .1); }

.unlock-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px 0 10px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 700;
  transition: all .15s;
}
.unlock-toggle svg { width: 15px; height: 15px; }
.unlock-toggle:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.unlock-toggle[aria-pressed="true"] {
  background: rgba(61, 220, 151, .13);
  border-color: rgba(61, 220, 151, .45);
  color: var(--green);
}
.card-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-tested  { background: rgba(45, 226, 230, .14); color: var(--teal); }
.badge-agreed  { background: rgba(61, 220, 151, .13); color: var(--green); }
.badge-partial { background: rgba(255, 216, 77, .13); color: var(--yellow); }
.badge-hidden  { background: rgba(255, 255, 255, .07); color: var(--dim); }

.empty {
  padding: 56px 24px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  color: var(--muted);
}
.empty-title { margin: 0 0 6px; color: var(--text); font-size: 20px; font-weight: 800; }
.empty .btn { margin-top: 12px; }

/* ---------------------------------------------------------
   FAQ
   --------------------------------------------------------- */
.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color .15s, background-color .15s;
}
.faq details[open] { border-color: var(--line-2); background: var(--panel-2); }
.faq summary {
  position: relative;
  padding: 18px 56px 18px 20px;
  font-weight: 700; font-size: 17px;
  list-style: none; cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 22px; top: 50%;
  width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--pink); border-bottom: 2px solid var(--pink);
  transform: rotate(45deg); transition: transform .2s, margin-top .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0; padding: 0 20px 20px; color: var(--muted); }

/* ---------------------------------------------------------
   Sources
   --------------------------------------------------------- */
.legend { display: grid; gap: 12px; margin: 0 0 40px; padding: 0; list-style: none; }
.legend li { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 16px; color: var(--muted); }
.legend .badge { justify-self: start; }
.sources-title { margin: 0 0 14px; font-size: 14px; color: var(--dim); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.sources a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel);
  text-decoration: none; font-weight: 700;
  transition: border-color .15s, background-color .15s;
}
.sources a:hover { border-color: var(--line-2); background: var(--panel-2); }
.sources a span { color: var(--dim); font-size: 13px; font-weight: 600; }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer { padding: 48px 0 56px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-inner { display: grid; gap: 14px; }
.brand-small .brand-word { font-size: 20px; }
.brand-small .brand-mark { width: 24px; height: 24px; }
.disclaimer { max-width: 760px; margin: 0; color: var(--dim); font-size: 13px; }
.footer-meta { margin: 0; color: var(--dim); font-size: 13px; }
.footer-meta a { color: var(--muted); }

/* ---------------------------------------------------------
   Trainer dialog
   --------------------------------------------------------- */
.trainer {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 28px 28px 22px;
  border: 1px solid var(--line-2);
  border-radius: 22px;
  background:
    radial-gradient(90% 50% at 50% 0%, rgba(255, 61, 139, .16), transparent 70%),
    var(--panel);
  color: var(--text);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .8);
  overflow-y: auto;
}
.trainer::backdrop { background: rgba(6, 3, 12, .72); backdrop-filter: blur(6px); }
.trainer[open] { animation: pop .25s cubic-bezier(.2, .9, .3, 1.2); }
.trainer.is-win { border-color: rgba(61, 220, 151, .6); box-shadow: 0 0 0 1px rgba(61, 220, 151, .3), 0 0 80px -10px rgba(61, 220, 151, .5), 0 40px 120px -20px rgba(0, 0, 0, .8); }

.trainer-close-form { position: absolute; top: 14px; right: 14px; margin: 0; }
.trainer .kicker { margin-bottom: 4px; }
.trainer-name { margin: 0; padding-right: 40px; font-family: var(--font-display); font-weight: 400; font-size: 38px; line-height: 1.05; text-transform: uppercase; }
.trainer-effect { margin: 6px 0 0; color: var(--muted); }
.trainer-prefix { margin: 18px 0 14px; color: var(--muted); font-size: 14px; }

.slots { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.slot {
  --k: var(--k-U);
  position: relative;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04);
  color: var(--dim);
  transition: background-color .12s, border-color .12s, color .12s, transform .12s;
}
.slot svg { width: 22px; height: 22px; }
.slot-U { --k: var(--k-U); }
.slot-R { --k: var(--k-R); }
.slot-D { --k: var(--k-D); }
.slot-L { --k: var(--k-L); }
.slot.is-next { border-color: var(--text); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.slot.is-ok {
  color: var(--k);
  border-color: color-mix(in srgb, var(--k) 60%, transparent);
  background: color-mix(in srgb, var(--k) 20%, transparent);
  transform: scale(1.06);
}
.slot.is-bad { color: var(--red); border-color: var(--red); background: rgba(255, 93, 115, .18); }
.slots.memory .slot:not(.is-ok):not(.is-bad) svg { visibility: hidden; }
.slots.memory .slot:not(.is-ok):not(.is-bad)::after { content: '?'; position: absolute; font-weight: 800; color: var(--dim); }
.slots.is-shake { animation: shake .4s ease; }
.trainer.is-win .slot.is-ok { animation: bounce .5s ease both; }

.trainer-msg { min-height: 48px; margin: 16px 0 6px; font-weight: 600; }
.trainer-msg.ok { color: var(--green); }
.trainer-msg.bad { color: var(--red); }

.trainer-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.trainer-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.switch { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui {
  position: relative; width: 36px; height: 20px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); transition: background-color .15s;
}
.switch-ui::after {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  transition: transform .15s;
}
.switch input:checked + .switch-ui { background: var(--pink); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--teal); outline-offset: 2px; }

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-rows: repeat(3, 64px);
  justify-content: center;
  margin: 22px auto 18px;
}
.dpad-btn {
  --k: var(--k-U);
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #2a1d45, #1c1232);
  color: var(--k);
  touch-action: manipulation;
  transition: transform .08s, background-color .08s, box-shadow .08s;
}
.dpad-btn svg { width: 26px; height: 26px; }
.dpad-U { grid-area: 1 / 2; border-radius: 14px 14px 4px 4px; --k: var(--k-U); }
.dpad-L { grid-area: 2 / 1; border-radius: 14px 4px 4px 14px; --k: var(--k-L); }
.dpad-R { grid-area: 2 / 3; border-radius: 4px 14px 14px 4px; --k: var(--k-R); }
.dpad-D { grid-area: 3 / 2; border-radius: 4px 4px 14px 14px; --k: var(--k-D); }
.dpad-hub { grid-area: 2 / 2; background: #1c1232; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.dpad-btn:hover { background: linear-gradient(180deg, #34245a, #241840); }
.dpad-btn.is-down,
.dpad-btn:active {
  transform: scale(.94);
  background: color-mix(in srgb, var(--k) 30%, #1c1232);
  box-shadow: 0 0 24px -4px var(--k);
}

.trainer-actions { display: flex; justify-content: center; gap: 8px; }
.trainer-hint { margin: 14px 0 0; color: var(--dim); font-size: 12.5px; text-align: center; }
.trainer-hint kbd { font-size: 11px; }

/* ---------------------------------------------------------
   Toast
   --------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--text); color: var(--bg);
  font-weight: 700; font-size: 14px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6);
  transform: translate(-50%, 20px); opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------------------------------------------------------
   Animations
   --------------------------------------------------------- */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); }
  70% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}
@keyframes sun-rise { from { transform: translateY(18%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes flash {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  20%, 60% { box-shadow: 0 0 0 3px var(--c), 0 0 50px -6px var(--c); }
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shake {
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
@keyframes bounce { 40% { transform: translateY(-6px) scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .steps { grid-template-columns: 1fr; }
  .callouts { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { position: static; margin: 0 0 20px; padding: 0; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .brand-word { font-size: 21px; }
  .pad-chip span { display: none; }
  .sun { right: -14%; bottom: 30%; opacity: .7; }
  .palms { height: 170px; }
  .palms-right { display: none; }
  .stat { padding: 14px 16px; }
  .stat dd { font-size: 32px; }
  .toolbar-row .btn { margin-left: 0; }
  .search input { font-size: 15px; padding-right: 16px; }
  .search-kbd { display: none; }
  .legend li { grid-template-columns: 1fr; gap: 6px; }
  .sources { grid-template-columns: 1fr; }
  .trainer { padding: 22px 18px 18px; }
  .trainer-name { font-size: 30px; }
  .slot { width: 38px; height: 38px; }
  .slot svg { width: 19px; height: 19px; }
  .switch { margin-left: 0; }
}

/* ---------------------------------------------------------
   Print — clean black-and-white cheat sheet
   --------------------------------------------------------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .hero, #how, #faq, #sources, .site-footer, .toolbar, .toast, .trainer,
  .card-actions, .unlock-toggle, .fav, .empty, .skip-link, .twin { display: none !important; }
  .section-cheats { padding: 0; border: 0; }
  .section-head { margin-bottom: 12px; }
  .section h2 { font-size: 22pt; color: #000; }
  .kicker, .result-count { color: #444; }
  .grid { display: block; columns: 2; column-gap: 10mm; }
  .card {
    break-inside: avoid; margin: 0 0 6mm; padding: 0 0 4mm;
    border: 0; border-bottom: 1px solid #ccc; border-radius: 0;
    background: none !important; box-shadow: none !important; animation: none !important;
  }
  .card::before { display: none; }
  .card-top { margin: 0; }
  .tag, .unlock dt, .seq-meta, .card-effect, .note, .seq-missing { color: #444 !important; }
  .card-title { font-size: 13pt; color: #000; }
  .card-effect { margin: 2px 0 6px; font-size: 10pt; }
  .key { width: 22px; height: 22px; border: 1px solid #000 !important; background: none !important; color: #000 !important; }
  .key svg { width: 13px; height: 13px; }
  .seq .key.fork::after { display: none; }
  .seq-missing { padding: 4px 0; border: 0; margin-bottom: 6px; }
  .seq-missing .ghost-keys { display: none; }
  .unlock { margin-bottom: 6px; font-size: 10pt; }
  .unlock dd { color: #000; }
  .card-foot { border: 0; padding: 0; }
  .badge { background: none !important; color: #000 !important; border: 1px solid #000; height: 18px; }
}

/* =========================================================
   Added: language menu, ad slots, admin (same look as above)
   ========================================================= */
.lang { position: relative; }
.lang summary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  list-style: none; cursor: pointer; user-select: none;
  font-size: 13px; font-weight: 800; letter-spacing: .04em;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; color: var(--muted); }
.lang summary:hover, .lang[open] summary { border-color: rgba(255, 255, 255, .3); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  width: 200px; margin: 0; padding: 6px; list-style: none;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7);
}
.lang-list button {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; padding: 9px 12px;
  border: 0; border-radius: 9px; background: transparent; text-align: left;
  font-size: 14px; font-weight: 600;
}
.lang-list button span { color: var(--dim); font-size: 11px; font-weight: 800; }
.lang-list button:hover { background: rgba(255, 255, 255, .07); }
.lang-list button[aria-current="true"] { background: var(--text); color: var(--bg); }
.lang-list button[aria-current="true"] span { color: #6b5a8a; }

/* ad slots */
.ad-row { display: flex; justify-content: center; }
.ad { display: none; width: 100%; max-width: 970px; }
.ad.is-on { display: block; min-height: 112px; margin: 32px 0; }
.ad-label { display: block; margin-bottom: 6px; color: var(--dim); text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.ad-ph {
  display: grid; place-items: center; align-content: center; gap: 2px;
  height: 90px;
  border: 1px dashed var(--line-2); border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  color: var(--dim); text-align: center; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.ad-ph small { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }

/* a guide that lists a different code */
.conflict {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 0 0 14px; padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 93, 115, .08);
  color: #ffc2cb; font-size: 13px; line-height: 1.45;
}
.conflict svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--red); }

/* admin: a quiet link at the end of the footer */
.admin-link {
  margin-left: 6px; padding: 0; border: 0; background: none;
  color: var(--dim); opacity: .5; font-size: 12px;
}
.admin-link:hover, .admin-link[aria-expanded="true"], .admin.is-authed .admin-link { opacity: 1; color: var(--muted); text-decoration: underline; }
.admin-panel {
  max-width: 420px; margin-top: 6px; padding: 16px 18px 18px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  font-size: 14px;
}
.admin-panel[hidden] { display: none; }
.admin-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.admin-head b { font-size: 16px; }
.admin-live { padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--dim); font-size: 12px; font-weight: 700; }
.admin-live.on { background: rgba(61, 220, 151, .13); color: var(--green); }
.admin-x { margin-left: auto; }
.admin-panel label, .admin-panel legend { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.admin-panel label small { color: var(--dim); font-weight: 500; }
.admin-panel input:not([type="checkbox"]), .admin-panel select, .admin-panel textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit;
}
.admin-panel textarea { resize: vertical; }
.admin-panel input:focus, .admin-panel select:focus, .admin-panel textarea:focus { outline: none; border-color: var(--pink); }
#aCode { font-family: ui-monospace, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.admin-login .btn { width: 100%; margin-top: 12px; }
.a-preview { display: flex; flex-wrap: wrap; gap: 4px; min-height: 26px; margin-top: 8px; }
.a-preview .key { width: 26px; height: 26px; border-radius: 7px; }
.a-preview .key svg { width: 14px; height: 14px; }
.a-pad { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.a-pad button { min-width: 38px; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255, 255, 255, .05); font-size: 15px; font-weight: 700; }
.a-pad button:hover { background: rgba(255, 255, 255, .1); }
.a-sources { margin: 0; padding: 0; border: 0; }
.a-sources div { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.a-sources label, .a-check { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; color: var(--text) !important; font-weight: 500 !important; }
.a-check { margin-top: 12px !important; }
.a-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.admin-msg { min-height: 1.4em; margin: 10px 0 0; }
.admin-msg.ok { color: var(--green); }
.admin-msg.bad { color: var(--red); }
.admin-panel h4 { margin: 14px 0 6px; color: var(--dim); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.a-log { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.a-log li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.a-log li:last-child { border-bottom: 0; }
.a-meta { margin: 14px 0 0 !important; color: var(--dim); font-size: 12px; }
.a-link { padding: 0; border: 0; background: none; color: var(--pink); text-decoration: underline; font-size: 12px; }

@media (max-width: 640px) {
  .lang summary { padding: 0 10px; }
  .header-tools { gap: 8px; }
}
@media print {
  .lang, .ad-row, .admin, .admin-panel, .conflict { display: none !important; }
}
