/* anggastudio.dev/tts-series
   Built in the games' own visual language: the doodle paper they are played
   on, raised 2.5D buttons that sink when pressed (a face on a slab 22% darker,
   as in packages/core/src/theme/depth.ts), Quicksand everywhere, and each app
   page wearing that app's palette. The series pages use a neutral ink theme. */

:root {
  --bg: #fbf6ec;
  --surface: #ffffff;
  --ink: #1f2328;
  --muted: #72777e;
  --border: #e7dcc6;
  --primary: #1f2328;
  --primary-lip: #000000;
  --primary-dark: #000000;
  --accent: #f9a826;
  --accent-lip: #c2831e;
  --secondary: #e8505b;
  --doodle: url(/tts-series/assets/series-doodle.webp);
  --radius: 22px;
  --depth: 5px;
  --font: "Quicksand", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg) var(--doodle) repeat;
  background-size: 300px 300px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; border-radius: 8px; }

/* ---------- Tiles: the series mark ---------- */
.tiles { display: inline-flex; gap: 4px; vertical-align: middle; }
.tiles > span {
  display: grid; place-items: center;
  width: 1.6em; height: 1.6em;
  border-radius: 0.36em;
  background: #fff; color: #1f2328;
  font-weight: 700;
  box-shadow: 0 3px 0 #d9ceb8;
}
.tiles > span.hot { background: #e8505b; color: #fff; box-shadow: 0 3px 0 #b53e47; }

/* ---------- Raised buttons ---------- */
.btn {
  --face: var(--surface); --lip: var(--border); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  padding: 11px 24px;
  margin-bottom: var(--depth);
  border: 0;
  border-radius: 999px;
  background: var(--face);
  color: var(--fg);
  box-shadow: 0 var(--depth) 0 var(--lip);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(var(--depth)); box-shadow: 0 0 0 var(--lip); }
.btn.primary { --face: var(--primary); --lip: var(--primary-lip); --fg: #fff; }
.btn.accent { --face: var(--accent); --lip: var(--accent-lip); --fg: var(--ink); }
.btn.light { --face: var(--surface); --lip: var(--border); box-shadow: 0 var(--depth) 0 var(--lip), inset 0 0 0 2px var(--border); }
.btn.light:active { box-shadow: 0 0 0 var(--lip), inset 0 0 0 2px var(--border); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--border); margin-bottom: 0; }
.btn.ghost:active { transform: none; }
.btn.sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn .gp { width: 15px; height: 17px; }
.pill { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 13px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--border);
}

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand .tiles { font-size: 12px; gap: 3px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav > a, .dd-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; border: 0; background: none;
  text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink); cursor: pointer;
}
.nav > a:hover, .dd-btn:hover, .nav > a[aria-current] { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.dd-btn svg { width: 11px; height: 8px; }
.dd { position: relative; }
.dd .mega {
  position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0;
  width: 600px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px;
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--border); border-radius: 20px; box-shadow: 0 4px 0 var(--border), 0 24px 50px -20px rgba(0, 0, 0, 0.25);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.dd:hover .mega, .dd:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega-h { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 4px 10px 6px; }
.mega a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; text-decoration: none; }
.mega a:hover, .mega a[aria-current] { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.mega img { width: 36px; height: 36px; border-radius: 10px; }
.mega b { display: block; font-size: 15px; line-height: 1.2; }
.mega small { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; }
.menu { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .menu { display: block; }
  .menu summary { list-style: none; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; cursor: pointer; border-radius: 12px; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu summary span { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: var(--ink); }
  .menu-panel {
    position: absolute; left: 0; right: 0; top: 64px;
    max-height: calc(100vh - 64px); overflow: auto;
    background: var(--surface); border-bottom: 2px solid var(--border);
    padding: 12px 16px 24px; display: grid; gap: 4px;
  }
  .menu-panel > a { padding: 10px 12px; border-radius: 12px; text-decoration: none; font-weight: 700; }
  .menu-panel .mega { position: static; width: auto; opacity: 1; visibility: visible; transform: none; translate: none; box-shadow: none; border: 0; padding: 8px 0 0; grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
section { padding: 72px 0; }
section.tinted { background: color-mix(in srgb, var(--surface) 55%, transparent); border-block: 2px solid var(--border); }
.head { max-width: 44em; margin-bottom: 36px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--secondary); margin-bottom: 10px; }
body.themed .eyebrow { color: var(--primary); }
.head h2 { font-size: clamp(28px, 3.8vw, 42px); }
.head p { margin-top: 12px; color: var(--muted); font-size: 18px; }
.more { margin-top: 32px; }
.fine { margin-top: 16px; font-size: 14px; color: var(--muted); }
.group-h { font-size: 15px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 8px 0 16px; }
.group-h ~ .group-h { margin-top: 36px; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; margin-bottom: 20px; }
.kicker .tiles { font-size: 13px; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); }
mark { background: linear-gradient(transparent 60%, color-mix(in srgb, var(--accent) 70%, transparent) 60%); color: inherit; padding: 0 2px; }
.lede { margin-top: 18px; font-size: 18px; color: var(--muted); max-width: 36em; }
.lede.big { font-size: 22px; color: var(--ink); font-weight: 600; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 28px; }
.ctas.center { justify-content: center; }
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumb a { color: var(--muted); }

/* Home: pick a game */
.picker { margin-top: 30px; }
.picker-h { font-size: 14px; font-weight: 700; color: var(--muted); margin: 14px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px 10px; }
.chip {
  --c: var(--ink); --c-lip: #000;
  padding: 8px 16px; min-height: 40px; margin-bottom: 4px;
  border: 0; border-radius: 999px;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 4px 0 var(--border), inset 0 0 0 2px var(--border);
  font-weight: 700; font-size: 15px; cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}
.chip:hover { box-shadow: 0 4px 0 var(--c-lip), inset 0 0 0 2px var(--c); }
.chip:active { transform: translateY(4px); box-shadow: 0 0 0 var(--border), inset 0 0 0 2px var(--border); }
.chip[aria-pressed="true"] { background: var(--c); color: #fff; box-shadow: 0 4px 0 var(--c-lip); }

.showcase {
  position: relative;
  padding: 28px 24px 24px;
  border-radius: 32px;
  background: var(--bg) var(--doodle) repeat;
  background-size: 240px 240px;
  border: 2px solid var(--border);
  box-shadow: 0 6px 0 var(--border);
  transition: background-color 0.3s ease;
}
.showcase-phones { position: relative; height: 430px; }
.showcase-phones .phone { position: absolute; width: 196px; transition: transform 0.3s ease; }
.showcase-phones .back { right: 12%; top: 28px; transform: rotate(7deg); }
.showcase-phones .front { left: 12%; top: 0; transform: rotate(-4deg); z-index: 2; }
.showcase-card { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; background: var(--surface); border: 2px solid var(--border); border-radius: 20px; }
.showcase-card img { width: 58px; height: 58px; border-radius: 15px; flex: none; }
.showcase-name { font-size: 20px; font-weight: 700; }
.showcase-tag { font-size: 15px; color: var(--muted); line-height: 1.4; }
.showcase-meta { font-size: 13px; font-weight: 700; color: var(--primary); margin-top: 2px; }
.showcase-btns { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 16px; }
@media (max-width: 480px) {
  .showcase { padding: 20px 14px 16px; }
  .showcase-phones { height: 330px; }
  .showcase-phones .phone { width: 150px; }
  .showcase-phones .front { left: 4%; }
  .showcase-phones .back { right: 4%; }
}

/* Stats band */
.band { padding: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; transform: translateY(-50%); margin-bottom: -24px; }
.stat { background: var(--surface); border: 2px solid var(--border); border-radius: 20px; box-shadow: 0 5px 0 var(--border); padding: 16px 18px; text-align: center; }
.stat b { display: block; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.1; }
.stat span { font-size: 14px; color: var(--muted); font-weight: 600; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); transform: none; margin: 0 auto 8px; } .band { padding-bottom: 8px; } }

/* ---------- Phones (thin bezel) ---------- */
.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 1080 / 2148;
  /* A fixed thin bezel. Percentage padding would be a share of the parent's
     width, not the phone's, and came out several times too thick. */
  padding: 4px;
  border-radius: 10.5% / 5.3%;
  background: #17181c;
  box-shadow: inset 0 0 0 1.5px #3b3d45, 0 18px 40px -16px rgba(20, 20, 25, 0.45);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 9.6% / 4.8%; }
.duo .phone, .showcase-phones .phone { padding: 5px; }
.phone::after {
  content: ""; position: absolute; top: 2.6%; left: 50%;
  width: 3.4%; aspect-ratio: 1; translate: -50% 0;
  border-radius: 50%; background: #0b0b0e;
}

/* ---------- Game tiles ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.game {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 20px 18px 18px; margin-bottom: 6px;
  border-radius: 24px;
  background: var(--primary) var(--doodle) repeat;
  background-size: 200px 200px;
  background-blend-mode: soft-light;
  color: #fff; text-decoration: none;
  box-shadow: 0 6px 0 var(--primary-lip);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.game:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--primary-lip); }
.game:active { transform: translateY(6px); box-shadow: 0 0 0 var(--primary-lip); }
.game img { width: 64px; height: 64px; border-radius: 17px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9); margin-bottom: 14px; }
.game-name { font-size: 20px; font-weight: 700; line-height: 1.2; }
.game-sub { font-size: 14px; opacity: 0.92; line-height: 1.35; margin-top: 2px; }
.game-meta { margin-top: auto; padding-top: 12px; font-size: 13px; font-weight: 700; opacity: 0.85; }

/* ---------- Playable crossword ---------- */
.xw { position: relative; --xw-primary: var(--primary); --xw-sel: #fdecc8; --xw-ok: #d6f2e0; }
.xw-picks { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.xw-picks button {
  padding: 4px; border: 0; background: var(--surface); border-radius: 16px; cursor: pointer;
  box-shadow: 0 4px 0 var(--border), inset 0 0 0 2px var(--border);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.xw-picks button img { width: 44px; height: 44px; border-radius: 12px; }
.xw-picks button[aria-pressed="true"] { box-shadow: 0 4px 0 var(--xw-primary), inset 0 0 0 3px var(--xw-primary); }
.xw-picks button:active { transform: translateY(4px); box-shadow: none; }
.xw-board { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .xw-board { grid-template-columns: 1fr; } }
.xw-gridwrap { background: var(--surface); border: 2px solid var(--border); border-radius: 22px; box-shadow: 0 5px 0 var(--border); padding: 14px; }
.xw-grid { container-type: inline-size; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 3px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.xw-cell, .xw-blank { aspect-ratio: 1; }
.xw-cell {
  position: relative; display: grid; place-items: center;
  background: #fff; border-radius: 18%;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--xw-ink, #1f2328) 16%, transparent), 0 2px 0 color-mix(in srgb, var(--xw-ink, #1f2328) 14%, transparent);
  cursor: pointer;
  transition: background 0.12s ease;
}
.xw-cell.on { background: var(--xw-sel); }
.xw-cell.cur { box-shadow: inset 0 0 0 2.5px var(--xw-primary), 0 2px 0 color-mix(in srgb, var(--xw-primary) 40%, transparent); }
.xw-cell.ok { background: var(--xw-ok); }
.xw-cell.ok.on { background: color-mix(in srgb, var(--xw-ok) 70%, var(--xw-sel)); }
.xw-cell.hint .xw-letter { color: var(--xw-primary); }
.xw-cell.bad { animation: xw-bad 0.5s ease; }
@keyframes xw-bad { 0%, 100% { translate: 0; } 20% { translate: -3px; background: #ffd9d9; } 40% { translate: 3px; background: #ffd9d9; } 60% { translate: -2px; } 80% { translate: 2px; } }
.xw-num { position: absolute; top: 3%; left: 7%; font-size: calc(100cqi / var(--cols) * 0.24); font-weight: 700; color: color-mix(in srgb, var(--xw-ink, #1f2328) 55%, transparent); line-height: 1; }
.xw-letter { font-size: calc(100cqi / var(--cols) * 0.52); font-weight: 700; line-height: 1; text-transform: uppercase; }
.xw-side { display: grid; gap: 14px; }
.xw-current {
  display: grid; gap: 4px; text-align: left; cursor: text;
  padding: 16px 18px; border: 2px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: 0 4px 0 var(--border);
}
.xw-dir { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--xw-primary); }
.xw-len { font-size: 13px; color: var(--muted); font-weight: 600; justify-self: end; margin-top: -24px; }
.xw-clue { font-size: 19px; font-weight: 700; line-height: 1.35; }
.xw-status { min-height: 1.6em; font-size: 15px; font-weight: 700; color: var(--xw-primary); }
.xw-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.xw-actions .pill { background: var(--xw-primary); }
.xw-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-height: 360px; overflow: auto; padding-right: 4px; }
@media (max-width: 520px) { .xw-lists { grid-template-columns: 1fr; max-height: none; } }
.xw-h { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.xw-lists ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.xw-lists li { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 6px 8px; border-radius: 10px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.xw-lists li:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.xw-lists li.sel { background: var(--xw-sel); }
.xw-lists li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.xw-lists li b { color: var(--xw-primary); }
.xw-input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; font-size: 16px; border: 0; padding: 0; pointer-events: none; }
.xw-win {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border-radius: 24px;
}
.xw-win[hidden] { display: none; }
.xw-stars { font-size: 52px; letter-spacing: 6px; color: #fbbf24; line-height: 1; text-shadow: 0 3px 0 #d69e1a; }
.xw-wintitle { font-size: 30px; font-weight: 700; }
.xw-winsub, .xw-winmore { color: var(--muted); }
.xw-winbtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }
.xw-winbtns .btn.primary { --face: var(--xw-primary); --lip: color-mix(in srgb, var(--xw-primary) 78%, #000); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step .phone { width: 78%; margin: 0 auto 18px; }
.step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 3px 0 #000; margin-bottom: 10px; }
.step h3 { font-size: 20px; margin-bottom: 6px; }
.step p { font-size: 15px; color: var(--muted); }

/* ---------- Hint economy ---------- */
.economy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .economy { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .economy { grid-template-columns: 1fr; } }
.eco { padding: 20px; }
.eco-vis { display: flex; align-items: center; gap: 6px; height: 34px; margin-bottom: 14px; }
.tok { width: 22px; height: 22px; border-radius: 7px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.tok.on { background: #fbbf24; box-shadow: 0 3px 0 #d69e1a; }
.tok.b { background: #38bdf8; box-shadow: 0 3px 0 #1f8fc0; }
.eco-plus { font-weight: 700; font-size: 18px; margin-left: 4px; }
.eco h3 { font-size: 19px; margin-bottom: 6px; }
.eco p { font-size: 15px; color: var(--muted); }

/* ---------- Plans ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { padding: 24px; }
.plan.pick { border-color: var(--primary); box-shadow: 0 5px 0 var(--primary-lip); }
.plan-tag { font-size: 14px; color: var(--muted); font-weight: 600; }
.plan h3 { font-size: 26px; margin: 2px 0 16px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-size: 15px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.ticks li.no { color: var(--muted); }
.ticks li.no::before { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.plans.compact .plan { padding: 20px; }
.loyal {
  margin-top: 22px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 22px 26px; border-radius: var(--radius);
  background: var(--ink); color: #fff; box-shadow: 0 5px 0 #000;
}
.loyal .tiles { font-size: 16px; }
.loyal h3 { font-size: 21px; }
.loyal p { color: rgba(255, 255, 255, 0.78); font-size: 15px; margin-top: 4px; max-width: 58em; }
.loyal > div { flex: 1 1 320px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 2px solid var(--border); border-radius: 18px; box-shadow: 0 4px 0 var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; translate: 0 -50%; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--ink) 7%, transparent); font-size: 18px; }
.faq details[open] summary::after { content: "−"; }
.faq-a { padding: 0 20px 18px; color: var(--muted); display: grid; gap: 10px; }
.faq-a b { color: var(--ink); }
.faq-group { font-size: 22px; margin: 36px 0 14px; }
.faq-group:first-child { margin-top: 0; }
.contact { margin-top: 40px; padding: 22px 24px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.contact .tiles { font-size: 18px; }
.contact > div { flex: 1 1 240px; }
.contact h3 { font-size: 20px; }
.contact p { color: var(--muted); font-size: 15px; }

/* ---------- Closing ---------- */
.closing { text-align: center; }
.closing h2 { font-size: clamp(28px, 4vw, 46px); }
.closing p { margin-top: 10px; color: var(--muted); }
.closing-icon { width: 96px; height: 96px; border-radius: 26px; margin: 0 auto 20px; box-shadow: 0 6px 0 var(--primary-lip); }
.icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }
.icons a { display: block; transition: transform 0.15s ease; }
.icons a:hover { transform: translateY(-4px) rotate(-4deg); }
.icons img { width: 64px; height: 64px; border-radius: 17px; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.15); }

/* ---------- App page ---------- */
.app-id { display: flex; align-items: center; gap: 18px; }
.app-id img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 5px 0 var(--primary-lip); }
.app-id h1 { font-size: clamp(36px, 4.6vw, 54px); }
.app-sub { font-weight: 700; color: var(--primary); }
.mini-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.mini-stats div { background: var(--surface); border: 2px solid var(--border); border-radius: 16px; box-shadow: 0 4px 0 var(--border); padding: 8px 16px; }
.mini-stats b { font-size: 22px; display: block; line-height: 1.2; }
.mini-stats span { font-size: 13px; color: var(--muted); font-weight: 600; }
.duo { position: relative; height: 560px; max-width: 480px; width: 100%; margin-inline: auto; }
.duo .phone { position: absolute; width: 236px; }
.duo .back { right: 2%; top: 44px; transform: rotate(6deg); }
.duo .front { left: 2%; top: 0; transform: rotate(-3deg); z-index: 2; }
@media (max-width: 480px) { .duo { height: 420px; } .duo .phone { width: 172px; } }

.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.topics li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; font-weight: 600; }
.topic-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 700; box-shadow: 0 3px 0 var(--primary-lip); }

.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lv-group { padding: 16px 16px 10px; }
.lv-range { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.lv-group ol { list-style: none; margin: 0; padding: 0; }
.lv-group li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 6px 2px; border-top: 1px dashed var(--border); font-size: 15px; }
.lv-group li:first-child { border-top: 0; }
.lv-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; }
.lv-t { font-weight: 600; }
.lv-c { font-size: 12px; color: var(--muted); }
.levels-more { margin-top: 20px; }
.levels-more summary { list-style: none; cursor: pointer; width: max-content; }
.levels-more summary::-webkit-details-marker { display: none; }
.levels-more[open] summary { display: none; }
.levels-more .levels { margin-top: 0; }

.screens { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 22px; overflow-x: auto; padding: 6px 4px 22px; scroll-snap-type: x mandatory; }
@media (min-width: 1020px) { .screens { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; } }
.screens figure { margin: 0; scroll-snap-align: start; }
.screens figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.screens figcaption b { display: block; color: var(--ink); font-size: 16px; }
.others { padding-top: 24px; }

/* ---------- Guide ---------- */
.page-hero { padding: 48px 0 24px; }
.page-hero h1 { font-size: clamp(36px, 5vw, 56px); }
.guide { padding-top: 24px; }
.guide-grid { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .guide-grid { grid-template-columns: 1fr; } }
.toc { position: sticky; top: 88px; padding: 18px 16px; }
@media (max-width: 900px) { .toc { position: static; } }
.toc-h { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.guide-body { display: grid; gap: 22px; }
.g-sec { display: grid; grid-template-columns: 1fr 210px; gap: 32px; align-items: start; padding: 28px; background: var(--surface); border: 2px solid var(--border); border-radius: 26px; box-shadow: 0 5px 0 var(--border); }
.g-sec.text-only { grid-template-columns: 1fr; }
@media (max-width: 640px) { .g-sec { grid-template-columns: 1fr; padding: 22px; } .g-phone { max-width: 220px; margin: 0 auto; } }
.g-n { font-size: 14px; font-weight: 700; color: var(--secondary); }
.g-text h2 { font-size: 28px; margin: 4px 0 14px; }
.g-text > p, .g-text > ul, .g-text > ol { margin-bottom: 12px; color: #3d4148; }
.g-text b { color: var(--ink); }
.nums { padding-left: 22px; display: grid; gap: 8px; }

/* ---------- Footer ---------- */
.foot { margin-top: 24px; padding: 48px 0 40px; background: color-mix(in srgb, var(--surface) 70%, transparent); border-top: 2px solid var(--border); font-size: 15px; }
.foot-cols { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 28px; }
@media (max-width: 980px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }
.foot-about p { color: var(--muted); margin-top: 12px; max-width: 30em; }
.foot-h { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-legal { margin-top: 36px; padding-top: 18px; border-top: 1px dashed var(--border); font-size: 13px; color: var(--muted); }

/* Era apps: the level themes as a cloud of tiles. */
.cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.cloud span {
  padding: 7px 14px; border-radius: 12px;
  background: var(--surface); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border);
  font-weight: 600; font-size: 15px;
}
.cloud span:nth-child(5n + 1) { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 0 var(--primary-lip); }

/* ---------- Crossword: sound, solve pop, win celebration ---------- */
.xw-sound { width: 40px; padding: 0; }
.xw-sound svg { width: 20px; height: 20px; }
.xw-sound .off { display: none; }
.xw-sound[aria-pressed="false"] .on { display: none; }
.xw-sound[aria-pressed="false"] .off { display: inline; }
.xw-sound[aria-pressed="false"] { color: var(--muted); }
.xw-cell.pop { animation: xw-pop 0.36s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes xw-pop { 0% { transform: scale(1); } 45% { transform: scale(1.18); } 100% { transform: scale(1); } }
.xw-card {
  display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 28px 32px 24px; max-width: 420px;
  background: var(--surface); border: 2px solid var(--border); border-radius: 28px; box-shadow: 0 6px 0 var(--border), 0 30px 60px -24px rgba(0, 0, 0, 0.35);
  animation: xw-card-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes xw-card-in { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: none; } }
.xw-trophy { width: 72px; height: 72px; animation: xw-trophy 0.5s cubic-bezier(0.34, 1.9, 0.64, 1) 0.14s both; }
@keyframes xw-trophy { 0% { transform: scale(0.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.xw-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 6; border-radius: 24px; }
.xw-confetti i { position: absolute; top: -20px; border-radius: 2px; animation: xw-fall linear both; }
@keyframes xw-fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  50% { transform: translate(var(--sway), 50vh) rotate(calc(var(--spin) / 2)); }
  85% { opacity: 1; }
  100% { transform: translate(calc(var(--sway) * -0.4), 100vh) rotate(var(--spin)); opacity: 0; }
}

/* Small screens: keep boxes big enough to tap, and let the board scroll
   sideways instead, the way the app lets you pan a large grid. */
@media (max-width: 640px) {
  .xw-gridwrap { overflow-x: auto; padding: 10px; -webkit-overflow-scrolling: touch; }
  .xw-grid { min-width: calc(var(--cols) * 28px); }
}

/* ---------- Google Play badge ----------
   The official badge's look (black, thin grey border, small caps line over
   "Google Play"), raised like the rest of the site so it presses the same. */
.gplay {
  display: inline-flex; align-items: center; gap: 11px;
  min-height: 56px; padding: 8px 22px 8px 16px; margin-bottom: 5px;
  border-radius: 12px;
  background: #000;
  border: 1.5px solid #a6a6a6;
  color: #fff; text-decoration: none;
  box-shadow: 0 5px 0 #3a3a3a, 0 14px 24px -12px rgba(0, 0, 0, 0.6);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.gplay:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #3a3a3a, 0 20px 28px -12px rgba(0, 0, 0, 0.65); }
.gplay:active { transform: translateY(5px); box-shadow: 0 0 0 #3a3a3a; }
.gp-logo { width: 30px; height: 34px; flex: none; }
.gplay-text { display: grid; line-height: 1.02; text-align: left; font-family: "Google Sans", "Product Sans", var(--font); }
.gplay-text small { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; }
.gplay-text b { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.gplay.big { min-height: 66px; padding: 10px 28px 10px 20px; border-radius: 14px; }
.gplay.big .gp-logo { width: 36px; height: 41px; }
.gplay.big .gplay-text small { font-size: 12px; }
.gplay.big .gplay-text b { font-size: 27px; }
.gplay.light { border-color: #fff; box-shadow: 0 5px 0 #000, 0 0 0 4px rgba(255, 255, 255, 0.12); }
.gplay.light:hover { box-shadow: 0 7px 0 #000, 0 0 0 6px rgba(255, 255, 255, 0.16); }
.gplay.light:active { box-shadow: 0 0 0 #000; }
.xw-winbtns .gplay { min-height: 52px; }

/* ---------- anggastudio on Google Play ---------- */
.dev { padding: 24px 0 56px; }
.dev-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center;
  padding: 36px 40px; border-radius: 30px;
  background: #16171b url(/tts-series/assets/series-doodle.webp) repeat;
  background-size: 260px 260px;
  color: #fff;
  box-shadow: 0 7px 0 #000;
  overflow: hidden;
}
@media (max-width: 820px) { .dev-card { grid-template-columns: 1fr; padding: 28px 22px; } }
.dev-logo { width: 150px; height: auto; margin-bottom: 18px; opacity: 0.95; }
.dev-card h2 { font-size: clamp(24px, 3vw, 32px); }
.dev-card p { margin: 10px 0 24px; color: rgba(255, 255, 255, 0.72); max-width: 32em; }
.dev-icons { display: grid; grid-template-columns: repeat(3, 72px); gap: 16px; justify-content: center; }
.dev-icons img {
  width: 72px; height: 72px; border-radius: 19px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.6);
  transform: rotate(calc((var(--i) - 4) * 2deg));
  transition: transform 0.2s ease;
}
.dev-card:hover .dev-icons img { transform: rotate(0) translateY(-3px); }
@media (max-width: 420px) { .dev-icons { grid-template-columns: repeat(3, 60px); } .dev-icons img { width: 60px; height: 60px; } }
