/* Rocco Mediev Tools: shared styles for the website's section pages (each tool ships its own styles).
   Each page picks a theme on <body>: theme-home (neutral and elegant: the site covers board games, health,
   3D printing, personal finance and more), theme-games (warm game night), theme-health (calm sage on dark), theme-arcade
   (neon mobile games), theme-apps (warm terracotta mobile apps, same page parts as the mobile games) or
   theme-dnd (dark fantasy, like the Character Forge). */

@font-face { font-family: 'Cinzel'; src: url('fonts/Cinzel-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('fonts/Cinzel-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Cinzel Decorative'; src: url('fonts/CinzelDecorative-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('fonts/EBGaramond-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('fonts/EBGaramond-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('fonts/EBGaramond-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

/* ---------- tokens (theme-dnd is the base; the other themes override) ---------- */
:root {
  --bg: #0c0910;
  --panel: rgba(25, 18, 34, 0.86);
  --line: rgba(214, 170, 92, 0.2);
  --line-strong: rgba(224, 177, 85, 0.55);
  --accent: #e0b155;
  --accent-2: #f6d98f;
  --tag: #cdb9ff;
  --text: #f1e7d6;
  --muted: #b5a68f;
  --faint: #8a7d6c;
  --gutter: clamp(18px, 4vw, 44px);
  --wrap: 1180px;
  --font-display: 'Cinzel Decorative', 'Cinzel', serif;
  --font-head: 'Cinzel', serif;
  --font-body: 'EB Garamond', Garamond, Georgia, serif;
  --font-ui: 'Cinzel', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.theme-home {
  --bg: #0d0e10;
  --panel: rgba(22, 23, 26, 0.9);
  --line: rgba(242, 237, 228, 0.12);
  --line-strong: rgba(214, 181, 124, 0.55);
  --accent: #d6b57c;
  --accent-2: #f2ede4;
  --tag: #c9b89c;
  --text: #f2ede4;
  --muted: #a7a095;
  --faint: #78736b;
  --font-display: 'EB Garamond', Georgia, serif;
  --font-head: 'EB Garamond', Georgia, serif;
  --font-body: var(--sans);
  --font-ui: var(--sans);
}
.theme-games {
  --bg: #100c09;
  --panel: rgba(30, 22, 16, 0.9);
  --line: rgba(232, 180, 104, 0.18);
  --line-strong: rgba(232, 180, 104, 0.55);
  --accent: #e8b468;
  --accent-2: #f7dcae;
  --tag: #f0c58a;
  --text: #f4e9da;
  --muted: #bba68c;
  --faint: #8c7a66;
  --font-display: 'EB Garamond', Georgia, serif;
  --font-head: 'EB Garamond', Georgia, serif;
  --font-body: 'EB Garamond', Garamond, Georgia, serif;
  --font-ui: var(--sans);
}
.theme-health {
  --bg: #0c0f0d;
  --panel: rgba(20, 26, 23, 0.9);
  --line: rgba(200, 225, 205, 0.13);
  --line-strong: rgba(156, 200, 164, 0.55);
  --accent: #9cc8a4;
  --accent-2: #f1ede4;
  --tag: #b9d3bd;
  --text: #f1ede4;
  --muted: #a7aca3;
  --faint: #767b73;
  --font-display: 'EB Garamond', Georgia, serif;
  --font-head: 'EB Garamond', Georgia, serif;
  --font-body: 'EB Garamond', Garamond, Georgia, serif;
  --font-ui: var(--sans);
}
/* Chinese: the Latin display fonts have no CJK glyphs, so fall back to the system's CJK fonts. */
html[lang^='zh'] body {
  --font-display: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-head: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
}
html[lang^='zh'] body.theme-dnd { --font-display: 'Cinzel Decorative', 'Noto Serif SC', 'Songti SC', 'SimSun', serif; --font-head: 'Cinzel', 'Noto Serif SC', 'Songti SC', 'SimSun', serif; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  color: var(--text); background: var(--bg); font-family: var(--font-body); font-size: 18px; line-height: 1.55;
}
.theme-dnd {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(224, 177, 85, 0.16), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(160, 124, 255, 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
/* Drifting embers (fantasy pages only) */
.theme-dnd::before {
  content: ''; position: fixed; inset: -50%; z-index: 0; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #f6d98f, transparent),
    radial-gradient(1px 1px at 70% 80%, #e0b155, transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, #ef7b3d, transparent),
    radial-gradient(1px 1px at 85% 20%, #cdb9ff, transparent),
    radial-gradient(1px 1px at 55% 45%, #f6d98f, transparent);
  background-size: 340px 340px, 420px 420px, 520px 520px, 380px 380px, 460px 460px;
  animation: drift 60s linear infinite;
}
@keyframes drift { to { transform: translateY(-340px); } }
a { color: var(--accent-2); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.top { position: relative; z-index: 5; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.theme-home .top, .theme-games .top, .theme-health .top { position: absolute; top: 0; left: 0; right: 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--accent-2); text-decoration: none; }
.brand svg { flex: none; width: 30px; height: 30px; color: var(--accent); }
.brand span { font-family: var(--font-head); font-weight: 600; font-size: 19px; letter-spacing: 0.04em; }
.theme-dnd .brand span { font-weight: 700; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px 3px 3px 10px; border-radius: 999px; background: rgba(12, 12, 14, 0.55); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lang-switch svg { width: 16px; height: 16px; color: var(--accent); margin-right: 4px; }
.lang-switch button { min-width: 40px; min-height: 32px; padding: 4px 10px; white-space: nowrap; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-family: var(--font-ui); font-size: 12.5px; letter-spacing: 0.06em; cursor: pointer; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed='true'] { background: rgba(255, 255, 255, 0.1); color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.theme-dnd .lang-switch button[aria-pressed='true'] { background: linear-gradient(180deg, rgba(224, 177, 85, 0.32), rgba(156, 116, 40, 0.3)); }

/* ---------- breadcrumb ---------- */
/* Breadcrumb: each step back is a pill (easy to see over the hero art and to tap, 44px tall); the current page is plain bold text */
.crumbs { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-ui); font-size: 15.5px; letter-spacing: 0.04em; line-height: 1.2; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(10, 8, 14, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--text); text-decoration: none; transition: border-color 0.15s, color 0.15s, background-color 0.15s; }
.crumbs a:hover, .crumbs a:focus-visible { border-color: var(--accent); color: var(--accent-2); background: rgba(10, 8, 14, 0.75); }
.crumbs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.crumbs > span[aria-hidden] { font-size: 20px; line-height: 1; color: var(--accent); opacity: 0.8; }
.crumbs [aria-current] { padding: 0 4px; font-weight: 700; color: var(--accent); }
.hero-copy .crumbs, .legal .crumbs { margin-bottom: 18px; }
.theme-dnd .crumbs { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- photo heroes (home, board games, health) ---------- */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: min(86vh, 760px); padding: 120px 0 clamp(48px, 8vw, 96px); }
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; }
/* No overflow clip on .hero, plus a solid strip over the photo's last pixels: together they avoid a 1px light seam
   where the photo meets the page (an anti-aliased clip edge showed it). */
.hero::before { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 6px; z-index: 0; background: var(--bg); pointer-events: none; }
.hero-home .hero-bg { object-position: 70% 50%; }
.hero-home::after { background: linear-gradient(90deg, rgba(13, 14, 16, 0.94) 0%, rgba(13, 14, 16, 0.7) 45%, rgba(13, 14, 16, 0.15) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 35%); }
.hero-games, .hero-health { min-height: min(80vh, 700px); text-align: center; }
.hero-games .hero-bg { object-position: 50% 60%; }
.hero-health .hero-bg { object-position: 50% 55%; }
/* The table stays visible up top; the title sits on a deep fade at the bottom. */
.hero-games::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(16, 12, 9, 0.82) 32%, rgba(16, 12, 9, 0.2) 70%, rgba(16, 12, 9, 0.45) 100%), radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(16, 12, 9, 0.6) 100%); }
.hero-health::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(12, 15, 13, 0.82) 32%, rgba(12, 15, 13, 0.2) 70%, rgba(12, 15, 13, 0.45) 100%), radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(12, 15, 13, 0.6) 100%); }
.hero-copy { max-width: 640px; }
.hero-games .hero-copy, .hero-health .hero-copy { margin: 0 auto; }
.hero-games .crumbs, .hero-health .crumbs, .intro .crumbs { justify-content: center; margin-bottom: 22px; }
.eyebrow { margin: 0; font-family: var(--font-ui); font-size: 12.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--tag); }
.hero h1 { margin: 14px 0 18px; font-family: var(--font-display); font-weight: 400; font-size: clamp(44px, 7.4vw, 92px); line-height: 1.02; letter-spacing: -0.01em; color: var(--accent-2); }
.hero-games h1, .hero-health h1 { font-weight: 600; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6); }
.hero .lead { margin: 0; max-width: 560px; font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); }
.hero-games .lead, .hero-health .lead { margin: 0 auto; font-style: italic; color: var(--text); opacity: 0.85; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-family: var(--font-ui); font-size: 15px; letter-spacing: 0.04em; text-decoration: none; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { color: #141414; background: var(--accent-2); }
.btn-primary:hover { background: #fff; }
.btn-ghost { color: var(--text); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { border-color: var(--line-strong); }

/* ---------- section headings & intro (fantasy page) ---------- */
main { position: relative; z-index: 1; flex: 1; width: 100%; }
.section { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: clamp(36px, 6vw, 72px) var(--gutter) clamp(48px, 7vw, 88px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; font-family: var(--font-head); font-weight: 400; font-size: clamp(28px, 4vw, 40px); color: var(--accent-2); }
.section-head p { margin: 0; color: var(--faint); font-size: 15px; }
.intro { text-align: center; padding: clamp(28px, 6vw, 64px) var(--gutter) clamp(26px, 4vw, 44px); }
.intro h1 { margin: 10px 0 12px; font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 7vw, 62px); line-height: 1.1; color: var(--accent-2); text-shadow: 0 0 34px rgba(224, 177, 85, 0.35); }
.intro .lead { max-width: 640px; margin: 0 auto; font-size: clamp(17px, 2.4vw, 20px); font-style: italic; color: var(--muted); }
.intro + .section { padding-top: 0; }
.theme-home .intro, .theme-health .intro { padding-top: 140px; }
.theme-home .intro h1, .theme-health .intro h1 { font-weight: 400; text-shadow: none; }
.flourish { display: block; width: min(320px, 70%); height: 14px; margin: 22px auto 0; color: var(--accent); opacity: 0.8; }
.theme-dnd .eyebrow { font-family: var(--font-head); color: var(--accent); }
html[lang^='zh'] .eyebrow { letter-spacing: 0.18em; }

/* ---------- cards ---------- */
.cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.theme-home .cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line); color: inherit; text-decoration: none;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7); transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.theme-home .card { border-radius: 14px; }
a.card:hover, a.card:focus-visible { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 26px 50px -16px rgba(0, 0, 0, 0.8), 0 0 30px -10px var(--line-strong); }
.card-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #141414; }
.theme-home .card-art { aspect-ratio: 4 / 3; }
.card-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s, filter 0.4s; }
a.card:hover .card-art img { transform: scale(1.05); }
.card-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--panel)); }
.card-art.trio { display: grid; grid-template-columns: repeat(3, 1fr); }
.card-art.trio img { object-position: 50% 25%; }
.card-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 8px 22px 22px; }
.card h2, .card h3 { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 24px; letter-spacing: 0.02em; color: var(--accent-2); }
.theme-dnd .card h2 { font-weight: 700; font-size: 23px; letter-spacing: 0.06em; }
.theme-home .card h3 { font-weight: 400; font-size: 26px; letter-spacing: 0; }
.tag { margin: 0; font-family: var(--font-ui); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tag); }
.card p { margin: 0; color: var(--muted); }
.theme-home .card p { font-size: 15.5px; line-height: 1.5; }
.go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; font-family: var(--font-ui); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.theme-home .go, .theme-games .go, .theme-health .go { font-weight: 600; letter-spacing: 0.06em; }
.go svg { width: 18px; height: 18px; transition: transform 0.25s; }
a.card:hover .go svg { transform: translateX(4px); }
/* "Coming soon" */
.badge { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 5px 12px; border-radius: 999px; font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.08em; color: var(--text); background: rgba(13, 14, 16, 0.72); border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.badge.live { color: #141414; background: var(--accent-2); border-color: transparent; }
.card.soon { box-shadow: none; }
.card.soon .card-art img { filter: grayscale(0.35) brightness(0.8); }
.card.soon h3, .card.soon h2 { color: var(--text); opacity: 0.85; }
.card.soon.plain .card-art { display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(160, 124, 255, 0.18), transparent 60%), #140e1c; }
.card.soon.plain .card-art::after { display: none; }
.card.soon.plain .card-art svg { width: 72px; height: 72px; color: #a07cff; opacity: 0.6; }
.card.soon.plain { border-style: dashed; background: rgba(25, 18, 34, 0.5); }
.theme-games .card.soon.plain .card-art { background: radial-gradient(circle at 50% 45%, rgba(232, 180, 104, 0.16), transparent 60%), #17110c; }
.theme-games .card.soon.plain .card-art svg { color: var(--accent); }
.theme-games .card.soon.plain { background: rgba(30, 22, 16, 0.55); }
.theme-health .card.soon.plain .card-art { background: radial-gradient(circle at 50% 45%, rgba(156, 200, 164, 0.16), transparent 60%), #111713; }
.theme-health .card.soon.plain .card-art svg { color: var(--accent); }
.theme-health .card.soon.plain { background: rgba(20, 26, 23, 0.55); }
/* An app card that opens another site (the store page) */
.go .ext { width: 15px; height: 15px; opacity: 0.8; }
a.card:hover .go .ext { transform: none; }
.card-links { margin: 22px 0 0; text-align: center; color: var(--faint); font-size: 15.5px; }
.card-links a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- privacy policy ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 130px var(--gutter) clamp(48px, 7vw, 88px); }
.legal h1 { margin: 12px 0 6px; font-family: var(--font-display); font-weight: 400; font-size: clamp(38px, 6vw, 60px); line-height: 1.05; color: var(--accent-2); }
.legal .updated { margin: 0 0 28px; color: var(--faint); font-size: 14.5px; }
.legal h2 { margin: 34px 0 10px; font-family: var(--font-head); font-weight: 400; font-size: 26px; color: var(--accent-2); }
.legal p { margin: 0 0 14px; color: var(--muted); font-size: 16.5px; line-height: 1.65; }
.legal a { color: var(--accent); }
.legal h3 { margin: 24px 0 8px; font-family: var(--font-head); font-weight: 600; font-size: 19px; color: var(--text); }
.legal ul { margin: 0 0 16px; padding-left: 1.3em; color: var(--muted); font-size: 16.5px; line-height: 1.65; }
.legal li { margin: 0 0 8px; }
.legal .lead { color: var(--text); font-size: 19px; }
.legal .eyebrow a { color: inherit; text-decoration: none; }
.legal .eyebrow a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Privacy index: one text-only card per policy */
.cards.policies .card-body { padding-top: 22px; }
.cards.policies .tag { overflow-wrap: anywhere; }
.theme-home .cards.policies .card h2 { font-weight: 400; font-size: 26px; letter-spacing: 0; }
.hub-note { margin: 28px 0 0; text-align: center; color: var(--muted); }
.hub-note a { color: var(--accent); }
.foot .legal-link { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.foot .legal-link:hover { color: var(--text); }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; padding: 30px var(--gutter) calc(30px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; font-size: 15px; color: var(--faint); }
.foot p { margin: 6px auto; max-width: 760px; }
.paypal { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; color: #fff; text-decoration: none; font-family: var(--font-ui); font-weight: 600; font-size: 13.5px; letter-spacing: 0.06em; background: linear-gradient(180deg, #2f8ff0, #0070e0 55%, #0057b8); box-shadow: 0 8px 22px -10px rgba(0, 112, 224, 0.8); }
.theme-dnd .paypal { font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 13px; }
.paypal svg { width: 16px; height: 16px; }
.paypal:hover { filter: brightness(1.08); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .brand span { font-size: 16px; }
  .theme-dnd .brand span { font-size: 13px; letter-spacing: 0.1em; }
  .hero { min-height: 0; padding-top: 110px; }
  .hero-home::after { background: linear-gradient(180deg, rgba(13, 14, 16, 0.55) 0%, rgba(13, 14, 16, 0.85) 60%, var(--bg) 100%); }
  .section-head { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- mobile games (theme-arcade: the neon palette of the games themselves) ---------- */
.theme-arcade {
  --bg: #0b0716;
  --panel: rgba(23, 15, 42, 0.9);
  --line: rgba(186, 150, 255, 0.16);
  --line-strong: rgba(255, 90, 200, 0.55);
  --accent: #ff5ac8;
  --accent-2: #f5eeff;
  --tag: #6ff3ff;
  --text: #efe8ff;
  --muted: #b6a9d4;
  --faint: #8378a6;
  --font-display: var(--sans);
  --font-head: var(--sans);
  --font-body: var(--sans);
  --font-ui: var(--sans);
}
.theme-arcade .top { position: absolute; top: 0; left: 0; right: 0; }
.theme-arcade .hero h1, .game-hero h1 { font-weight: 800; letter-spacing: -0.02em; text-shadow: 0 0 40px rgba(255, 90, 200, 0.35); }
.hero-arcade .hero-bg { object-position: 75% 50%; }
.hero-arcade::after { background: linear-gradient(90deg, rgba(11, 7, 22, 0.94) 0%, rgba(11, 7, 22, 0.66) 42%, rgba(11, 7, 22, 0.05) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 35%); }
.theme-arcade .card h2, .theme-arcade .card h3 { font-weight: 700; letter-spacing: 0; }
.theme-arcade .go { font-weight: 700; letter-spacing: 0.06em; }
.theme-arcade .btn-primary { color: #fff; background: linear-gradient(135deg, #ff5ac8, #8b5cff); box-shadow: 0 10px 30px -10px rgba(255, 90, 200, 0.7); }
.theme-arcade .btn-primary:hover { background: linear-gradient(135deg, #ff5ac8, #8b5cff); filter: brightness(1.1); }
.theme-arcade .card.soon.plain .card-art { background: radial-gradient(circle at 50% 45%, rgba(255, 90, 200, 0.16), transparent 60%), #120a22; }
.theme-arcade .card.soon.plain .card-art svg { color: var(--accent); }
.theme-arcade .card.soon.plain { background: rgba(23, 15, 42, 0.55); }

/* Platforms: what the game runs on today and what comes later */
.platforms { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.platform { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px 7px 11px; border-radius: 999px; font-size: 14.5px; color: var(--muted); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.platform svg { width: 18px; height: 18px; flex: none; }
.platform b { color: var(--text); font-weight: 600; }
.platform.on { border-color: rgba(61, 220, 132, 0.55); background: rgba(61, 220, 132, 0.1); }
.platform.on svg { color: #3ddc84; }
.platform.later svg { color: var(--faint); }

/* Game page: title and a phone playing the game */
.game-hero { position: relative; isolation: isolate; padding: 116px 0 clamp(40px, 6vw, 72px); }
.game-hero .hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.game-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--bg) 0%, rgba(11, 7, 22, 0.3) 38%, rgba(11, 7, 22, 0.55) 100%); }
.game-hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(28px, 5vw, 64px); }
.game-hero .crumbs { margin-bottom: 22px; }
.game-title { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.game-title img { flex: none; width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 10px 28px -8px rgba(255, 90, 200, 0.6); }
.game-hero h1 { margin: 0; font-size: clamp(38px, 6vw, 68px); line-height: 1.02; color: var(--accent-2); }
.game-hero .lead { margin: 20px 0 0; max-width: 580px; font-size: clamp(17px, 2.2vw, 20px); color: var(--text); opacity: 0.9; }
.phone { position: relative; margin: 0; width: min(300px, 72vw); aspect-ratio: 9 / 16; padding: 10px; border-radius: 34px; background: linear-gradient(160deg, #2b1d4c, #110a20); border: 1px solid rgba(186, 150, 255, 0.35); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85), 0 0 44px -14px rgba(255, 90, 200, 0.6); }
.phone img, .phone video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 25px; background: #120a22; }

/* Gameplay clips */
.clips { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px 18px; }
.clip { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 196px; margin: 0; text-align: center; }
.clip .phone { width: 100%; padding: 8px; border-radius: 28px; }
.clip .phone img, .clip .phone video { border-radius: 21px; }
.clip figcaption b { display: block; margin-bottom: 4px; font-size: 18px; color: var(--accent-2); }
.clip figcaption span { display: block; max-width: 240px; font-size: 15px; line-height: 1.5; color: var(--muted); }

/* About the game */
.about { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(26px, 5vw, 60px); align-items: start; }
.about h2, .tester h2 { margin: 0 0 14px; font-family: var(--font-head); font-weight: 800; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.01em; color: var(--accent-2); }
.about p { margin: 0 0 14px; color: var(--muted); }
.about .lead { color: var(--text); font-size: 19px; }
.features { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.features li { position: relative; padding-left: 28px; color: var(--muted); }
.features li::before { content: ''; position: absolute; left: 4px; top: 0.55em; width: 10px; height: 10px; transform: rotate(45deg); background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.features b { color: var(--text); font-weight: 600; }
.keyart { margin: 0; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.8); }
.keyart img { display: block; width: 100%; height: auto; }
.page-links { margin: 26px 0 0; color: var(--faint); font-size: 15.5px; }
.page-links a { color: var(--accent); }

/* Become a tester */
.tester { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 48px); padding: clamp(22px, 4vw, 44px); border-radius: 22px; border: 1px solid var(--line-strong); background: linear-gradient(160deg, rgba(255, 90, 200, 0.12), rgba(111, 243, 255, 0.05) 60%, transparent), var(--panel); box-shadow: 0 0 60px -26px rgba(255, 90, 200, 0.6); }
.tester p { margin: 0 0 12px; color: var(--muted); }
.steps { margin: 16px 0 0; padding-left: 1.3em; color: var(--muted); }
.steps li { margin: 0 0 8px; }
.ios-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 15px; color: var(--faint); }
.ios-note svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.tester-form { display: flex; flex-direction: column; gap: 16px; }
.tester-form[hidden] { display: none; } /* display: flex above would otherwise keep a sent form on screen */
.field label { display: block; margin: 0 0 6px; font-size: 14.5px; font-weight: 600; color: var(--text); }
.field .hint { margin: 6px 0 0; font-size: 13.5px; color: var(--faint); }
.field input { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(8, 5, 18, 0.6); color: var(--text); font: inherit; font-size: 17px; }
.field input:focus { outline: none; border-color: var(--tag); box-shadow: 0 0 0 3px rgba(111, 243, 255, 0.18); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.check a { color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tester-form .btn { align-self: flex-start; border: 0; cursor: pointer; }
.tester-form .btn[disabled] { opacity: 0.6; cursor: progress; }
.form-status { min-height: 1.4em; margin: 0; font-size: 15.5px; }
.form-status.err { color: #ff8fa3; }
.tester-done { padding: 20px 22px; border-radius: 16px; border: 1px solid rgba(125, 255, 176, 0.4); background: rgba(125, 255, 176, 0.07); }
.tester-done h3 { margin: 0 0 8px; font-size: 21px; color: #7dffb0; }
.tester-done p { margin: 0 0 12px; color: var(--muted); }
.tester-done .btn { margin: 4px 0 12px; }
.tester-done .small { font-size: 14px; color: var(--faint); }
/* "Test several at once" on the mobile games and apps pages: one checkbox row per game or app */
.app-picks { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.app-picks legend { margin: 0 0 6px; padding: 0; font-size: 14.5px; font-weight: 600; color: var(--text); }
.app-picks .group { margin: 8px 0 0; font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.app-picks .check { align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(8, 5, 18, 0.35); color: var(--text); }
.app-picks .check input { margin: 0; }
.app-picks .check:has(input:checked) { border-color: var(--accent); }
.done-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 12px; }
.done-links .btn { margin: 0; }
@media (max-width: 860px) {
  .game-hero .wrap, .about, .tester { grid-template-columns: 1fr; }
  .game-hero .phone { margin: 0 auto; }
  .keyart { max-width: 420px; }
}
@media (max-width: 640px) {
  .hero-arcade::after { background: linear-gradient(180deg, rgba(11, 7, 22, 0.5) 0%, rgba(11, 7, 22, 0.86) 60%, var(--bg) 100%); }
  .game-title img { width: 60px; height: 60px; border-radius: 14px; }
  .clip { width: min(250px, 82vw); }
}

/* ---------- mobile apps (theme-apps: Keeper's warm terracotta and sage; reuses the mobile games' page parts) ---------- */
.theme-apps {
  --bg: #100d0b;
  --panel: rgba(31, 25, 21, 0.9);
  --line: rgba(245, 230, 214, 0.13);
  --line-strong: rgba(229, 143, 98, 0.55);
  --accent: #e58f62;
  --accent-2: #f7efe6;
  --tag: #a9c9a4;
  --text: #f4ece2;
  --muted: #b8aa9b;
  --faint: #857a6e;
  --font-display: 'EB Garamond', Georgia, serif;
  --font-head: 'EB Garamond', Georgia, serif;
  --font-body: var(--sans);
  --font-ui: var(--sans);
}
.theme-apps .top { position: absolute; top: 0; left: 0; right: 0; }
.theme-apps .hero h1, .theme-apps .game-hero h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5); }
.hero-apps .hero-bg { object-position: 75% 50%; }
.hero-apps::after { background: linear-gradient(90deg, rgba(16, 13, 11, 0.94) 0%, rgba(16, 13, 11, 0.66) 42%, rgba(16, 13, 11, 0.05) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 35%); }
.theme-apps .game-hero::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(16, 13, 11, 0.35) 38%, rgba(16, 13, 11, 0.6) 100%); }
.theme-apps .card h2, .theme-apps .card h3 { font-weight: 600; letter-spacing: 0; }
.theme-apps .go { font-weight: 600; letter-spacing: 0.06em; }
.theme-apps .btn-primary { color: #fff; background: linear-gradient(135deg, #e58f62, #b5583a); box-shadow: 0 10px 30px -10px rgba(229, 143, 98, 0.7); }
.theme-apps .btn-primary:hover { background: linear-gradient(135deg, #e58f62, #b5583a); filter: brightness(1.1); }
.theme-apps .badge.live { color: #fff; background: var(--accent); } /* stands out on the light app art */
.theme-apps .card.soon.plain .card-art { background: radial-gradient(circle at 50% 45%, rgba(229, 143, 98, 0.16), transparent 60%), #17120f; }
.theme-apps .card.soon.plain .card-art svg { color: var(--accent); }
.theme-apps .card.soon.plain { background: rgba(31, 25, 21, 0.55); }
.theme-apps .game-title img { box-shadow: 0 10px 28px -8px rgba(229, 143, 98, 0.55); }
/* App screens are taller than the games' 9:16 video: a modern 9:19.5 phone, shown from the top */
.theme-apps .phone { aspect-ratio: 9 / 19.5; background: linear-gradient(160deg, #3a2e27, #15110e); border-color: rgba(245, 230, 214, 0.22); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85), 0 0 44px -16px rgba(229, 143, 98, 0.55); }
.theme-apps .game-hero .phone { width: min(270px, 66vw); }
.theme-apps .phone img { object-position: 50% 0; background: #f7f1e8; }
.theme-apps .about h2, .theme-apps .tester h2 { font-weight: 600; letter-spacing: 0; }
.theme-apps .features li::before { box-shadow: 0 0 8px rgba(229, 143, 98, 0.6); }
.theme-apps .tester { background: linear-gradient(160deg, rgba(229, 143, 98, 0.12), rgba(169, 201, 164, 0.05) 60%, transparent), var(--panel); box-shadow: 0 0 60px -26px rgba(229, 143, 98, 0.5); }
.theme-apps .field input { background: rgba(10, 8, 6, 0.6); }
.theme-apps .field input:focus { box-shadow: 0 0 0 3px rgba(169, 201, 164, 0.2); }
@media (max-width: 640px) {
  .hero-apps::after { background: linear-gradient(180deg, rgba(16, 13, 11, 0.5) 0%, rgba(16, 13, 11, 0.86) 60%, var(--bg) 100%); }
}
