/* ==========================================================================
   Triviavore — site styles
   Palette pulled from the box art and the four habitat colors.
   ========================================================================== */
:root {
  --ink: #10202b;
  --ink-soft: #435563;
  --paper: #fbf8f1;
  --paper-2: #f2ede1;
  --line: #e2dccd;
  --white: #ffffff;

  --sky: #1ea7e1;
  --sky-deep: #0a5d8f;
  --deep: #06222e;
  --deep-2: #0b3545;

  --red: #e3241b;   --red-deep: #9e130d;
  --blue: #1b9be0;  --blue-deep: #0a5b9c;
  --gold: #e6a400;  --gold-deep: #94630a;
  --green: #3caf29; --green-deep: #1f6e15;
  --purple: #8b2fd9;

  --cliff: #ff6b1f;
  --q-red: #c3161c;
  --a-green: #1c8a2c;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 32px rgba(6, 34, 46, .16);
  --shadow-lg: 0 24px 60px rgba(6, 34, 46, .28);

  --font-display: "Lilita One", "Arial Rounded MT Bold", "Arial Black", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --topbar-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
a { color: var(--sky-deep); font-weight: 700; }
a:hover { color: var(--blue-deep); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; letter-spacing: .2px; }
h2 { font-size: clamp(1.9rem, 5.2vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 780px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* Four-habitat color stripe: the site's signature divider */
.stripe {
  height: 5px;
  background: linear-gradient(90deg, var(--red) 0 25%, var(--blue) 25% 50%, var(--gold) 50% 75%, var(--green) 75% 100%);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: #fff; --btn-edge: #000;
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: .7em 1.35em;
  border: 0; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-body); font-weight: 900; font-size: 1.02rem; line-height: 1.1;
  text-decoration: none; text-align: center; cursor: pointer;
  box-shadow: 0 4px 0 var(--btn-edge), 0 8px 18px rgba(0,0,0,.18);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.06); color: var(--btn-fg); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn-edge), 0 4px 10px rgba(0,0,0,.18); }
.btn-buy { --btn-bg: linear-gradient(180deg, #ff8a2a, var(--red)); --btn-edge: var(--red-deep); }
.btn-primary { --btn-bg: linear-gradient(180deg, #2fb6ef, var(--blue-deep)); --btn-edge: #063f6e; }
.btn-secondary { --btn-bg: var(--white); --btn-fg: var(--ink); --btn-edge: #cfc6b2; border: 2px solid var(--ink); }
.btn-right { --btn-bg: linear-gradient(180deg, #4cc63a, var(--green-deep)); --btn-edge: #154d0e; }
.btn-wrong { --btn-bg: var(--white); --btn-fg: var(--q-red); --btn-edge: #d9cfc0; border: 2px solid var(--q-red); }
.btn-ghost-light { --btn-bg: rgba(255,255,255,.14); --btn-edge: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.85); backdrop-filter: blur(4px); }
.btn-sm { min-height: 40px; padding: .5em 1em; font-size: .92rem; }
.btn-lg { min-height: 56px; padding: .8em 1.6em; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-link {
  background: none; border: 0; padding: .6em .4em; cursor: pointer;
  font-weight: 800; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px;
}
.btn-link.light { color: #dff3ff; }

/* ---------- Promo banner ---------- */
.promo {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 8px 44px 8px 16px; background: var(--gold); color: #2a1c00;
  font-size: .9rem; line-height: 1.35; text-align: center;
}
.promo p { margin: 0; }
.promo-close {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; background: transparent; font-size: 1.4rem; cursor: pointer; color: inherit;
}
.promo[hidden] { display: none; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 34, 46, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; height: var(--topbar-h); }
.topbar-logo img { height: 30px; width: auto; }
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a { color: #e9f6ff; text-decoration: none; font-weight: 800; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.topnav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.topbar .btn-buy { margin-left: auto; }
@media (min-width: 860px) {
  .topnav { display: flex; }
  .topbar .btn-buy { margin-left: 8px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: #fff; padding: 36px 0 72px;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: -2; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(6,34,46,.70) 0%, rgba(6,34,46,.35) 38%, rgba(6,34,46,.55) 70%, rgba(6,34,46,.95) 100%);
}
.hero::after { /* soft wave into the next section */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 40px;
  background: var(--deep);
  -webkit-mask: radial-gradient(60px 26px at 50% 0, transparent 98%, #000) 0 0 / 120px 40px repeat-x;
          mask: radial-gradient(60px 26px at 50% 0, transparent 98%, #000) 0 0 / 120px 40px repeat-x;
}
.hero-grid { display: grid; gap: 20px; align-items: center; }
.hero-logo { width: min(100%, 520px); margin: 0 auto 10px; filter: drop-shadow(0 6px 16px rgba(0,0,0,.45)); }
.hero h1 {
  font-size: clamp(1.75rem, 6.4vw, 3.1rem);
  text-align: center; margin-bottom: .45em;
  text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 6px 22px rgba(0,0,0,.55);
}
.hl { color: #ffd23f; }
.hero-sub { text-align: center; font-size: 1.08rem; font-weight: 700; max-width: 40em; margin: 0 auto 1.2em; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 18px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips li {
  padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: .88rem;
  background: rgba(6,34,46,.55); border: 1px solid rgba(255,255,255,.35);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.hero-art { position: relative; justify-self: center; width: min(62vw, 300px); margin-top: 8px; }
.hero-box { width: 100%; filter: drop-shadow(0 22px 34px rgba(0,0,0,.55)); transform: rotate(-3deg); }
.price-hex {
  position: absolute; right: -14%; top: 8%;
  width: 92px; height: 104px; display: grid; place-content: center; text-align: center;
  background: linear-gradient(180deg, #ffd23f, var(--gold));
  color: #3a2500; transform: rotate(8deg);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
}
.price-hex span { font-weight: 900; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; line-height: 1; }
.price-hex strong { font-family: var(--font-display); font-size: 2.1rem; font-weight: 400; line-height: 1; }

@media (min-width: 900px) {
  .hero { padding: 64px 0 110px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 40px; }
  .hero-logo { margin: 0 0 14px; }
  .hero h1, .hero-sub { text-align: left; margin-left: 0; }
  .hero-ctas, .chips { justify-content: flex-start; }
  .hero-art { width: min(100%, 400px); margin-top: 0; }
  .price-hex { width: 112px; height: 126px; right: -6%; }
  .price-hex strong { font-size: 2.6rem; }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; position: relative; }
@media (min-width: 900px) { .section { padding: 92px 0; } }
.section-head { max-width: 760px; margin: 0 auto 36px; }
.section-head.center { text-align: center; }
.section-head p:last-child { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 0; }
.section-head.on-dark h2 { color: #fff; }
.section-head.on-dark p:last-child { color: #d3e9f5; }
.eyebrow {
  display: inline-block; margin: 0 0 .7em; padding: 4px 12px; border-radius: 999px;
  font-weight: 900; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
  background: var(--ink); color: #fff;
}
.on-dark .eyebrow { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); }

/* ---------- Play (trivia) ---------- */
.play {
  color: #fff;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(30,167,225,.35), transparent 60%),
    linear-gradient(180deg, var(--deep) 0%, #0a3a52 55%, #0b4a68 100%);
  padding-top: 36px;
}
.play-grid { display: grid; gap: 22px; align-items: start; }
.play-side {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius); padding: 16px;
}
.side-label { font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #a9d8ef; margin: 0 0 8px; }
.picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.picker button {
  display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px;
  background: rgba(255,255,255,.06); border: 2px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; color: #fff; font-weight: 800; font-size: .85rem;
  transition: background .15s, border-color .15s, transform .15s;
}
.picker button img { width: 100%; max-width: 64px; }
.picker button:hover { background: rgba(255,255,255,.12); }
.picker button[aria-checked="true"] { background: rgba(255,255,255,.16); border-color: #ffd23f; transform: translateY(-2px); }

.evo { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.evo-step { display: grid; justify-items: center; text-align: center; gap: 2px; opacity: .38; filter: grayscale(.85); transition: opacity .3s, filter .3s, transform .3s; }
.evo-step img { width: 100%; max-width: 76px; }
.evo-step .evo-name { font-weight: 900; font-size: .95rem; }
.evo-step small { font-size: .74rem; color: #bfe2f3; font-weight: 700; line-height: 1.2; }
.evo-step.reached { opacity: 1; filter: none; }
.evo-step.current { transform: scale(1.06); }
.meter { height: 10px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; margin: 6px 0 10px; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--green), #ffd23f); transition: width .5s ease; }
.score { margin: 0; font-weight: 800; color: #dff3ff; font-size: .95rem; text-align: center; }
.apex-cta { margin-top: 14px; padding: 14px; border-radius: var(--radius-sm); background: linear-gradient(180deg, #fff6d6, #ffe08a); color: #3a2500; text-align: center; }
.apex-cta strong { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; display: block; margin-bottom: 4px; }
.apex-cta p { font-size: .92rem; margin-bottom: 10px; }

/* The trivia card: built from a real card's torn-edge frame */
.qcard-wrap { min-width: 0; }
.qcard {
  position: relative; max-width: 560px; margin: 0 auto;
  background: url("img/card-mid.webp") center top / 100% auto repeat-y;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.45));
}
.qcard-top, .qcard-bottom { width: 100%; }
.qcard-top { margin-bottom: 0; }
.qcard-bottom { margin-top: -1px; }
.qcard-body { position: relative; padding: 0 9% 0; text-align: center; color: var(--ink); min-height: 180px; display: flex; flex-direction: column; }
.qcard-meta { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: .8rem; font-weight: 800; color: #6b7a85; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.deck-pill { background: var(--green); color: #fff; padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; }
.q-text {
  font-weight: 900; color: var(--q-red);
  font-size: clamp(1.12rem, 4.6vw, 1.45rem); line-height: 1.3;
  margin: 0 0 16px; text-wrap: pretty;
}
.q-answer {
  font-weight: 800; color: var(--a-green);
  font-size: clamp(1rem, 4vw, 1.18rem); line-height: 1.4;
  margin: 0 0 16px; padding-top: 12px; border-top: 2px dashed #cfe6d2;
  animation: pop-in .35s ease;
}
.q-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: auto; padding-bottom: 4px; }
.q-actions .btn { min-width: 150px; }
.qcard.flip { animation: card-flip .45s ease; }

.levelup {
  position: absolute; inset: 22% 10% auto; z-index: 3;
  display: grid; justify-items: center; gap: 2px; text-align: center;
  padding: 18px 16px; border-radius: var(--radius);
  background: linear-gradient(180deg, #fffbe8, #ffe48f); color: #3a2500;
  box-shadow: var(--shadow-lg); animation: level-pop 2.4s ease forwards;
}
.levelup img { width: 96px; }
.levelup strong { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; }
.levelup span { font-weight: 800; }

.play-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; margin: 18px auto 6px; max-width: 560px; }
.seg { display: inline-flex; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 4px; }
.seg button { border: 0; background: transparent; color: #dff3ff; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: .92rem; cursor: pointer; min-height: 40px; }
.seg button small { opacity: .75; font-weight: 700; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.fine { font-size: .85rem; color: var(--ink-soft); text-align: center; max-width: 560px; margin: 0 auto; }
.fine.on-dark { color: #a9cde0; }
.fine.on-dark a { color: #fff; }

@media (min-width: 900px) {
  .play-grid { grid-template-columns: 300px 1fr; gap: 36px; }
  .play-side { position: sticky; top: calc(var(--topbar-h) + 20px); }
  .qcard-body { min-height: 260px; }
}

/* ---------- How it works ---------- */
.how { background: var(--paper); }
.steps { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 16px; }
.step {
  position: relative; background: var(--white); border-radius: var(--radius); padding: 22px 20px 18px;
  box-shadow: var(--shadow); border-top: 6px solid var(--c, var(--blue));
}
.step-blue { --c: var(--blue); } .step-gold { --c: var(--gold); } .step-red { --c: var(--red); }
.step-num {
  position: absolute; top: -18px; left: 18px; width: 40px; height: 44px;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 1.4rem; color: #fff;
  background: var(--c); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.step h3 { margin-top: 6px; }
.step p { color: var(--ink-soft); }
.step-tokens { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.step-tokens img { width: 22%; max-width: 64px; }
.step-tokens.tiles-mini img { width: 30%; max-width: 74px; border-radius: 8px; box-shadow: 0 3px 8px rgba(0,0,0,.2); }
.step-tokens .arrow { font-weight: 900; color: var(--ink-soft); }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 22px; } }

.chains { display: grid; gap: 10px; margin-bottom: 48px; }
.chain {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--white); border-radius: var(--radius-sm); padding: 8px 12px;
  border-left: 8px solid var(--c); box-shadow: 0 4px 14px rgba(6,34,46,.08);
}
.c-blue { --c: var(--blue); } .c-green { --c: var(--green); } .c-red { --c: var(--red); } .c-gold { --c: var(--gold); }
.chain-hab { font-family: var(--font-display); font-size: 1.15rem; color: var(--c); min-width: 86px; }
.chain-row { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; font-weight: 800; font-size: .9rem; white-space: nowrap; }
.chain-row img { width: 32px; }
@media (max-width: 520px) { .chain { flex-direction: column; align-items: flex-start; gap: 2px; } .chain-hab { min-width: 0; } }
@media (min-width: 521px) { .chain-row { font-size: .95rem; gap: 4px 6px; } .chain-row img { width: 40px; } }
.chain-row i { font-style: normal; color: #9aa7b0; margin: 0 2px; }
@media (min-width: 820px) { .chains { grid-template-columns: 1fr 1fr; } }

/* Board */
.board-block { display: grid; gap: 24px; align-items: center; margin-bottom: 48px; }
.board-frame {
  padding: 10px; border-radius: 22px;
  background: linear-gradient(145deg, #5b3a1f, #3a2412);
  box-shadow: var(--shadow-lg), inset 0 2px 0 rgba(255,255,255,.15);
  max-width: 560px; width: 100%; margin: 0 auto;
}
.board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.tile {
  position: relative; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer;
  border-radius: 6px; overflow: hidden; background: #333 center / cover no-repeat;
  box-shadow: 0 2px 0 rgba(0,0,0,.35);
  transition: transform .15s ease, box-shadow .15s ease;
  container-type: inline-size;
}
.tile:hover { transform: translateY(-2px); }
.tile.selected { box-shadow: 0 0 0 3px #ffd23f, 0 6px 14px rgba(0,0,0,.4); z-index: 2; transform: scale(1.04); }
.tile.dealing { animation: deal .5s ease both; animation-delay: calc(var(--i) * 22ms); }
.tile.flipping { animation: tile-flip .6s ease; }
.tile-label {
  position: absolute; left: 0; right: 0; bottom: 6%; text-align: center;
  font-family: var(--font-display); color: #fff; font-size: 13cqi; line-height: 1;
  text-shadow: 0 0 3px #000, 0 1px 0 #000, 0 0 6px rgba(0,0,0,.6);
}
.tile-survival { background-image: url("img/tiles/survival-art.webp"); outline: 3px solid #9fd8f0; outline-offset: -3px; }
.tile-safe {
  background:
    linear-gradient(135deg, rgba(255,255,255,.55) 0 22%, transparent 22% 48%, rgba(0,0,0,.12) 48% 70%, transparent 70%),
    linear-gradient(45deg, #9a9a9a, #e6e6e6 45%, #a5a5a5 70%, #d4d4d4);
  outline: 3px solid #e8e8e8; outline-offset: -3px;
}
.tile-safe b {
  position: absolute; font-family: var(--font-display); font-weight: 400; font-size: 34cqi; line-height: 1;
  -webkit-text-stroke: 2px #fff; paint-order: stroke fill;
  text-shadow: 0 0 0 #000, 0 2px 3px rgba(0,0,0,.6);
}
.tile-safe .n1 { left: 8%; top: 4%; }
.tile-safe .n2 { left: 50%; top: 32%; transform: translateX(-50%); }
.tile-safe .n3 { right: 8%; bottom: 2%; }
.t-red { color: var(--red); } .t-blue { color: var(--blue); } .t-gold { color: var(--gold); } .t-green { color: var(--green); }
.tile-token {
  position: absolute; left: 2%; bottom: 2%; width: 50%;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.6));
  pointer-events: none;
}
.board-side h3 { font-size: 1.6rem; }
.board-side > p { color: var(--ink-soft); }
.tile-info {
  background: var(--white); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 14px;
  box-shadow: 0 4px 14px rgba(6,34,46,.08); border-left: 6px solid var(--info-c, var(--ink));
  min-height: 120px;
}
.tile-info strong { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; display: block; margin-bottom: 4px; }
.tile-info p { margin: 0 0 .5em; color: var(--ink-soft); font-size: .98rem; }
.tile-info .btn { margin-top: 4px; }
.legend { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-weight: 800; font-size: .92rem; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend small { color: var(--ink-soft); font-weight: 700; }
.sw { width: 18px; height: 18px; border-radius: 4px; flex: none; }
.sw-hab { background: linear-gradient(90deg, var(--red) 0 25%, var(--blue) 25% 50%, var(--gold) 50% 75%, var(--green) 75%); }
.sw-surv { background: url("img/tiles/survival-art.webp") center / cover; }
.sw-safe { background: linear-gradient(45deg, #9a9a9a, #e6e6e6); border: 1px solid #aaa; }
.sw-human { background: var(--purple); }
@media (min-width: 900px) { .board-block { grid-template-columns: 1.1fr .9fr; gap: 44px; } }

.rule-cards { display: grid; gap: 16px; margin-bottom: 28px; }
.rule-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.rule-card p { color: var(--ink-soft); margin: 0; }
@media (min-width: 820px) { .rule-cards { grid-template-columns: repeat(3, 1fr); } }

.rules { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rules > summary {
  cursor: pointer; list-style: none; padding: 18px 20px; font-family: var(--font-display); font-size: 1.3rem;
  display: flex; justify-content: space-between; align-items: center;
}
.rules > summary::-webkit-details-marker { display: none; }
.rules > summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--sky-deep); }
.rules[open] > summary::after { content: "–"; }
.rules-body { padding: 0 20px 20px; border-top: 1px solid var(--line); }
.rules-body h4 { font-size: 1.15rem; margin-top: 1.2em; color: var(--sky-deep); }
.rules-body li { margin-bottom: .4em; }
.rules-body ul, .rules-body ol { padding-left: 1.2em; }

/* ---------- What's inside ---------- */
.inbox { background: var(--paper-2); }
.inbox-grid { display: grid; gap: 24px; align-items: center; margin-bottom: 24px; }
.inbox-photo { margin: 0; }
.inbox-photo img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }
.contents { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contents li { display: flex; gap: 14px; align-items: center; background: var(--white); border-radius: var(--radius-sm); padding: 12px; box-shadow: 0 4px 14px rgba(6,34,46,.07); }
.contents img { width: 58px; height: 58px; object-fit: contain; flex: none; border-radius: 6px; }
.contents b { display: block; font-size: 1.05rem; }
.contents span { color: var(--ink-soft); font-size: .95rem; line-height: 1.4; display: block; }
.photo-pair { display: grid; gap: 16px; }
.photo-pair img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
@media (min-width: 820px) {
  .inbox-grid { grid-template-columns: 1.15fr .85fr; gap: 36px; }
  .photo-pair { grid-template-columns: 1fr 1fr; }
}

/* ---------- Who it's for ---------- */
.fits { background: var(--paper); }
.fit-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (max-width: 559px) {
  .fit { display: grid; grid-template-columns: 64px 1fr; column-gap: 14px; text-align: left; padding: 16px; align-items: center; }
  .fit img { grid-row: span 2; width: 64px; margin: 0; }
  .fit h3 { margin: 0 0 2px; font-size: 1.2rem; }
}
.fit { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-align: center; }
.fit img { width: 72px; margin: 0 auto 8px; }
.fit p { color: var(--ink-soft); margin: 0; font-size: .97rem; }
@media (min-width: 560px) { .fit-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .fit-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Buy ---------- */
.buy {
  color: #fff;
  background:
    radial-gradient(900px 400px at 85% 0%, rgba(255,107,31,.45), transparent 60%),
    radial-gradient(800px 380px at 10% 100%, rgba(60,175,41,.35), transparent 60%),
    linear-gradient(180deg, #0b3545, var(--deep));
}
.offers { display: grid; gap: 18px; max-width: 980px; margin: 0 auto 28px; }
.offer {
  position: relative; background: var(--white); color: var(--ink); border-radius: var(--radius);
  padding: 26px 22px 22px; text-align: center; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.offer h3 { font-size: 1.35rem; }
.offer .price { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; margin: 6px 0 8px; color: var(--ink); }
.offer .price span { font-size: .5em; vertical-align: top; position: relative; top: .25em; }
.offer .price.small { font-size: 1.8rem; line-height: 1.15; }
.offer .price .from { font-family: var(--font-body); font-weight: 800; font-size: 1rem; color: var(--ink-soft); top: 0; vertical-align: baseline; }
.offer-note { color: var(--ink-soft); font-size: .95rem; margin-bottom: 18px; }
.offer .btn { margin-top: auto; }
.offer-featured { outline: 4px solid #ffd23f; }
.ribbon {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  margin: 0; padding: 4px 14px; border-radius: 999px; white-space: nowrap;
  background: #ffd23f; color: #3a2500; font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
}
.buy-notes { max-width: 760px; margin: 0 auto; text-align: center; color: #d3e9f5; }
.buy-notes p { margin-bottom: .6em; }
.buy-notes a { color: #fff; }
@media (min-width: 860px) { .offers { grid-template-columns: repeat(3, 1fr); align-items: stretch; } .offer-featured { transform: translateY(-10px); } }

/* ---------- About ---------- */
.about { background: var(--paper-2); }
.about-grid { display: grid; gap: 28px; align-items: center; }
.about-copy p:not(.eyebrow) { color: var(--ink-soft); font-size: 1.05rem; }
.about-sign { font-family: var(--font-display); color: var(--ink) !important; font-size: 1.3rem !important; }
.about-art { margin: 0; justify-self: center; max-width: 380px; }
.about-art img { border-radius: var(--radius); box-shadow: var(--shadow-lg); transform: rotate(2deg); }
@media (min-width: 860px) { .about-grid { grid-template-columns: 1.2fr .8fr; gap: 56px; } }

/* ---------- FAQ ---------- */
.faq details { background: var(--white); border-radius: var(--radius-sm); margin-bottom: 10px; box-shadow: 0 4px 14px rgba(6,34,46,.07); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 900; font-size: 1.05rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--sky-deep); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer {
  position: relative; color: #cfe3ee; padding: 120px 0 calc(40px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, var(--paper) 0, rgba(6,34,46,0) 60px),
    linear-gradient(180deg, rgba(6,34,46,.15), rgba(6,34,46,.92) 55%),
    url("img/landscape-1000.webp") center bottom / cover no-repeat,
    var(--deep);
}
.footer-inner { display: grid; gap: 16px; justify-items: center; text-align: center; }
.footer-logo { width: 200px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.footer-nav a { color: #fff; text-decoration: none; font-weight: 800; padding: 6px 0; }
.footer-nav a:hover { text-decoration: underline; }
.footer-fine { font-size: .85rem; margin: 0; color: #a9c6d6; }

/* ---------- Mobile sticky buy bar ---------- */
.buybar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px;
  background: rgba(6,34,46,.95); color: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transform: translateY(140%); transition: transform .3s ease;
}
.buybar.show { transform: none; }
.buybar img { width: 34px; height: auto; flex: none; }
.buybar div { display: grid; line-height: 1.15; min-width: 0; }
.buybar b { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.buybar span { font-size: .78rem; color: #a9cde0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar .btn { margin-left: auto; flex: none; }
@media (min-width: 860px) { .buybar { display: none; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: #fff; font-weight: 800; font-size: .92rem; text-align: center;
  box-shadow: var(--shadow-lg); transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Animations ---------- */
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes card-flip { 0% { transform: perspective(900px) rotateY(0); } 50% { transform: perspective(900px) rotateY(80deg); opacity: .6; } 100% { transform: perspective(900px) rotateY(0); } }
@keyframes level-pop { 0% { opacity: 0; transform: scale(.6); } 12% { opacity: 1; transform: scale(1.06); } 20% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes deal { from { opacity: 0; transform: translateY(-14px) rotate(-6deg) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes tile-flip { 0% { transform: perspective(500px) rotateY(0); } 50% { transform: perspective(500px) rotateY(90deg); } 100% { transform: perspective(500px) rotateY(0); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .levelup { animation: none !important; } /* stays visible; app.js hides it after a moment */
}

/* ---------- Trivia list page ---------- */
.page-hero { background: linear-gradient(180deg, var(--deep), #0b4a68); color: #fff; padding: 48px 0 40px; text-align: center; }
.page-hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
.page-hero p { color: #d3e9f5; max-width: 680px; margin: 0 auto 1.2em; font-size: 1.08rem; }
.qa-section { padding: 48px 0; }
.qa-section h2 { font-size: clamp(1.6rem, 4.6vw, 2.2rem); }
.qa { background: var(--white); border-radius: var(--radius-sm); margin-bottom: 8px; box-shadow: 0 3px 10px rgba(6,34,46,.06); }
.qa summary { cursor: pointer; padding: 14px 16px; font-weight: 800; color: var(--q-red); list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before { content: "Q "; color: var(--ink-soft); font-family: var(--font-display); font-weight: 400; }
.qa p { margin: 0; padding: 0 16px 14px; color: var(--a-green); font-weight: 700; }
.cta-band { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; display: grid; gap: 14px; align-items: center; justify-items: center; text-align: center; margin: 8px 0 32px; }
.cta-band img { width: 120px; }
@media (min-width: 720px) { .cta-band { grid-template-columns: auto 1fr auto; text-align: left; justify-items: start; } }
