/* MOSSWARD public site (Codex 47, 19/10/2026): one stylesheet for every
   public page. Moss, parchment and brass from the 2D game; real game art
   and real screenshots only, no drawn imitation of gameplay. */

@font-face { font-family: "Lora"; src: url("/assets/fonts/Lora-Variable.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/assets/fonts/Manrope-Variable.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }

:root {
    --moss-950: #0e1f19;
    --moss-900: #15302a;
    --moss-800: #1d3d34;
    --moss-700: #2a5244;
    --moss-500: #4d7a55;
    --leaf: #86a85d;
    --paper: #fbf6e9;
    --parchment: #f3e8cf;
    --parchment-2: #e9dab7;
    --ink: #1f332a;
    --ink-soft: #4b5e52;
    --brass-dark: #85601f;
    --brass: #b78a3a;
    --brass-2: #d8b465;
    --brass-3: #f0d998;
    --cream: #fbf3dd;
    --line: rgba(31, 51, 42, 0.14);
    --line-dark: rgba(251, 243, 221, 0.16);
    --danger: #9b2f25;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow: 0 22px 48px -24px rgba(14, 31, 25, 0.55);
    --shadow-soft: 0 10px 30px -18px rgba(14, 31, 25, 0.4);
    --display: "Lora", "Iowan Old Style", Georgia, "Hiragino Mincho ProN", "Noto Serif CJK SC", serif;
    --body: "Manrope", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Apple SD Gothic Neo", "PingFang SC", "Noto Sans CJK SC", sans-serif;
    --gutter: clamp(16px, 4vw, 32px);
    --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.62; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
:lang(ja), :lang(zh-Hans) { line-break: strict; }
:lang(ko) { word-break: keep-all; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; color: var(--moss-900); letter-spacing: -0.01em; overflow-wrap: break-word; }
h2 { font-size: clamp(30px, 3.6vw, 44px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--brass-2); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

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

.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-dark); }
:lang(ja) .eyebrow, :lang(ko) .eyebrow, :lang(zh-Hans) .eyebrow { letter-spacing: 0.06em; }
.fine-print { font-size: 14px; color: var(--ink-soft); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--brass-dark); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }
.text-link:hover { color: var(--moss-700); }
.notice, .note { display: inline-flex; align-items: flex-start; gap: 10px; margin: 8px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--parchment); color: var(--ink); font-size: 15px; }
.status-dot { flex: none; width: 9px; height: 9px; margin-top: 0.55em; border-radius: 50%; background: var(--brass-2); box-shadow: 0 0 0 4px rgba(216, 180, 101, 0.22); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font: 700 16px/1 var(--body); text-decoration: none; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease; }
.button:hover { transform: translateY(-1px); }
.button-brass { background: linear-gradient(180deg, var(--brass-3), var(--brass-2) 55%, var(--brass)); color: var(--moss-950); box-shadow: 0 8px 20px -10px rgba(183, 138, 58, 0.9); }
.button-ghost { border-color: rgba(251, 243, 221, 0.55); color: var(--cream); background: rgba(14, 31, 25, 0.25); }
.button-dark { background: var(--moss-900); color: var(--cream); }
.button-danger { background: var(--danger); color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(14, 31, 25, 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-dark); color: var(--cream); }
.release-note { padding: 14px var(--gutter); background: #eee4cd; color: #203d38; border-bottom: 1px solid #c8ad77; font-size: 15px; line-height: 1.5; }
.release-note > div { max-width: var(--max); margin: 0 auto; }
.release-note strong { display: block; font-weight: 700; }
.release-note p { margin: 3px 0 0; color: inherit; }
.header-inner { display: flex; align-items: center; gap: 20px; max-width: var(--max); min-height: 64px; margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--cream); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 0.08em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
#main-nav { display: flex; align-items: center; gap: 4px; }
#main-nav > a { padding: 10px 14px; border-radius: 999px; color: rgba(251, 243, 221, 0.86); text-decoration: none; font-weight: 600; font-size: 15px; }
#main-nav > a:hover, #main-nav > a[aria-current="page"] { color: var(--cream); background: rgba(251, 243, 221, 0.1); }
#main-nav > a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brass-2); }
#main-nav > .nav-download { margin-left: 6px; border: 1px solid rgba(216, 180, 101, 0.7); color: var(--brass-3); }
.locale-picker { position: relative; margin-left: 6px; }
.locale-picker summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-dark); list-style: none; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--cream); }
.locale-picker summary::-webkit-details-marker { display: none; }
.locale-picker summary svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; }
.locale-options { position: absolute; right: 0; top: calc(100% + 8px); display: grid; min-width: 210px; padding: 8px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); border: 1px solid var(--line); }
.locale-options a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 15px; }
.locale-options a:hover, .locale-options a[aria-current="true"] { background: var(--parchment); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-dark); border-radius: 12px; background: transparent; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.nav-toggle span { width: 18px; height: 2px; border-radius: 2px; background: var(--cream); transition: transform 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter); }
/* A section reached through its #address stops 16px below the sticky header (64px + 1px line), not under it. */
.section[id] { scroll-margin-top: 81px; }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head p:not(.eyebrow) { color: var(--ink-soft); }

/* Home hero */
.hero { position: relative; isolation: isolate; overflow: hidden; color: var(--cream); background: var(--moss-950); }
.hero-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 31, 25, 0.94) 0%, rgba(14, 31, 25, 0.78) 40%, rgba(14, 31, 25, 0.25) 72%, rgba(14, 31, 25, 0.1) 100%), linear-gradient(180deg, rgba(14, 31, 25, 0) 70%, rgba(14, 31, 25, 0.6) 100%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: clamp(28px, 5vw, 64px); max-width: var(--max); min-height: min(820px, 88vh); margin: 0 auto; padding: clamp(56px, 8vw, 96px) var(--gutter) clamp(96px, 10vw, 128px); }
.hero-wordmark { width: min(460px, 78vw); margin: 0 0 18px -6px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45)); }
.hero .eyebrow { color: var(--brass-3); }
.hero h1 { color: var(--cream); font-size: clamp(38px, 5.4vw, 66px); line-height: 1.04; margin-bottom: 18px; }
.hero h1 em { font-style: italic; color: var(--brass-2); }
.hero-lead { max-width: 33em; font-size: clamp(17px, 1.6vw, 19px); color: rgba(251, 243, 221, 0.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.hero-device { display: flex; justify-content: center; }
.hero-device .shot { width: min(300px, 70vw); transform: rotate(-2deg); }
.hero-robots { width: min(520px, 100%); filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.45)); }

/* Availability (hero and download) */
.availability { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.availability .status { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: rgba(251, 243, 221, 0.1); border: 1px solid var(--line-dark); color: rgba(251, 243, 221, 0.92); font-size: 14px; font-weight: 600; }
.availability .status-dot { margin-top: 0; }
.store-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--cream); color: var(--moss-950); font-weight: 700; text-decoration: none; }

/* Facts band */
.facts { position: relative; z-index: 2; max-width: var(--max); margin: -64px auto 0; padding: 0 var(--gutter); }
.facts ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; list-style: none; }
.facts li { display: grid; gap: 4px; padding: 22px 22px 20px; border-radius: var(--radius); background: var(--paper); border-top: 3px solid var(--brass-2); box-shadow: var(--shadow); }
.facts strong { font-family: var(--display); font-size: clamp(30px, 3.4vw, 40px); line-height: 1; color: var(--moss-900); }
.facts span { color: var(--ink-soft); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }

/* Screenshots */
.shot { display: block; padding: 7px; border-radius: 30px; background: linear-gradient(160deg, #23463b, var(--moss-950)); box-shadow: var(--shadow), inset 0 0 0 1px rgba(216, 180, 101, 0.35); text-decoration: none; }
.shot img { width: 100%; border-radius: 23px; background: var(--moss-800); }
.shot:hover { box-shadow: var(--shadow), inset 0 0 0 1px var(--brass-2); }
.shot-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 250px); gap: clamp(16px, 2.4vw, 28px); overflow-x: auto; padding: 4px 4px 18px; margin: 0 -4px; list-style: none; scroll-snap-type: x mandatory; scrollbar-color: var(--brass) transparent; }
.shot-rail li { scroll-snap-align: start; }
.shot-rail figure { margin: 0; }
.shot-rail figcaption { display: grid; gap: 2px; margin-top: 14px; }
.shot-rail figcaption strong { font-family: var(--display); font-size: 18px; color: var(--moss-900); }
.shot-rail figcaption span { font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
.shots-pending { display: grid; justify-items: center; gap: 12px; padding: 32px; border-radius: var(--radius-lg); background: var(--parchment); text-align: center; color: var(--ink-soft); }
.shots-pending img { width: min(520px, 100%); }

/* Features */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 6vw, 80px); }
.feature-copy > p:not(.eyebrow) { color: var(--ink-soft); }
.feature-media { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0; }
.feature-media .shot { width: min(300px, 78vw); }
.feature-media figcaption { display: grid; gap: 4px; max-width: 320px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.feature-media figcaption strong { color: var(--moss-900); font-family: var(--display); font-size: 17px; }
.feature-art { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.feature-arena .feature-art, .arena-steps .feature-art { width: min(320px, 78vw); }
.feature-daily .feature-art, .feature-store .feature-art { object-fit: contain; box-shadow: none; border-radius: 0; filter: drop-shadow(0 18px 22px rgba(14, 31, 25, 0.28)); }
.feature-daily .feature-media, .feature-store .feature-media { order: -1; }
.feature + .feature { padding-top: 0; }
.ticks { display: grid; gap: 10px; margin: 18px 0 22px; list-style: none; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.4em; width: 18px; height: 18px; border-radius: 50%; background: var(--moss-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10.5 3.2 3L15 7' fill='none' stroke='%23f0d998' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* Club */
.club-card { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius-lg); background: var(--moss-900); color: var(--cream); box-shadow: var(--shadow); }
.club-art { position: absolute; z-index: -1; top: 0; right: 0; width: 44%; height: 100%; object-fit: cover; object-position: center 38%; mask-image: linear-gradient(90deg, transparent 0%, #000 38%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%); }
.club-copy { max-width: 62%; padding: clamp(28px, 5vw, 56px); }
.club-copy .eyebrow { color: var(--brass-3); }
.club-copy h2 { color: var(--cream); }
.club-copy > p:not(.eyebrow) { color: rgba(251, 243, 221, 0.86); }
.club-copy .fine-print { color: rgba(251, 243, 221, 0.72); }
.club-copy .notice { background: rgba(251, 243, 221, 0.1); color: var(--cream); }
.benefits { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; list-style: none; }
.benefits li { padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(216, 180, 101, 0.7); color: var(--brass-3); font-weight: 700; font-size: 15px; }

/* Fair */
.fair h2 { margin-bottom: 24px; }
.fair-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; list-style: none; }
.fair-grid li { padding: 22px; border-radius: var(--radius); background: var(--parchment); }
.fair-grid h3 { font-size: 19px; }
.fair-grid p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Download */
.download { background: radial-gradient(120% 140% at 15% 0%, var(--moss-700) 0%, var(--moss-900) 45%, var(--moss-950) 100%); color: var(--cream); }
.download-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 40px); max-width: var(--max); margin: 0 auto; padding: clamp(48px, 7vw, 80px) var(--gutter); }
.download-icon { width: clamp(88px, 12vw, 128px); height: auto; border-radius: 26%; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7); }
.download .eyebrow { color: var(--brass-3); }
.download h2 { color: var(--cream); }
.download-copy > p:not(.eyebrow) { max-width: 40em; color: rgba(251, 243, 221, 0.84); }

/* Footer */
.site-footer { background: var(--moss-950); color: rgba(251, 243, 221, 0.78); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; max-width: var(--max); margin: 0 auto; padding: 48px var(--gutter) 24px; }
.footer-brand img { width: 200px; margin: 0 0 8px -4px; }
.footer-brand p { margin: 0; font-family: var(--display); font-style: italic; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-content: flex-start; max-width: 560px; }
.footer-links a { color: rgba(251, 243, 221, 0.86); text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 0; }
.footer-links a:hover { color: var(--brass-3); text-decoration: underline; text-underline-offset: 4px; }
.footer-legal { max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter) 32px; border-top: 1px solid var(--line-dark); font-size: 14px; }

/* Inner page hero */
.page-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; overflow: hidden; background: linear-gradient(135deg, var(--moss-800), var(--moss-950)); color: var(--cream); padding: 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
.page-hero-art { position: absolute; z-index: -1; top: 0; right: 0; width: min(46%, 560px); height: 100%; object-fit: cover; object-position: center 35%; mask-image: linear-gradient(90deg, transparent, #000 45%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); opacity: 0.9; }
.page-hero-landscape { width: 100%; mask-image: none; -webkit-mask-image: none; opacity: 1; }
.page-hero:has(.page-hero-landscape)::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 31, 25, 0.95), rgba(14, 31, 25, 0.72) 55%, rgba(14, 31, 25, 0.35)); }
.page-hero-inner { max-width: 680px; padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 80px); }
.page-hero .eyebrow { color: var(--brass-3); }
.page-hero h1 { color: var(--cream); font-size: clamp(34px, 4.6vw, 56px); }
.page-lead { font-size: clamp(17px, 1.6vw, 19px); color: rgba(251, 243, 221, 0.88); }
.page-hero .fine-print { color: rgba(251, 243, 221, 0.72); }
.page-hero .text-link { color: var(--brass-3); }
.page-hero-device { padding: 40px 0; }
.page-hero-device .shot { width: min(240px, 60vw); transform: rotate(2deg); }
.page-hero-plain { grid-template-columns: minmax(0, 1fr); }

/* Arena */
.rule-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rule-cards article { padding: 24px; border-radius: var(--radius); background: var(--parchment); border-top: 3px solid var(--brass-2); }
.rule-cards h2 { font-size: 21px; }
.rule-cards p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.gold-rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; padding-top: 0; }
.gold-rule > div > p:not(.eyebrow) { color: var(--ink-soft); }
.gold-rule .ticks { margin: 0; padding: 28px; border-radius: var(--radius-lg); background: var(--moss-900); color: var(--cream); }
.arena-modes { padding-top: 0; }
.definition-list { display: grid; gap: 0; margin: 0 0 24px; }
.definition-list > div { display: grid; grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.definition-list dt { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--moss-900); }
.definition-list dd { margin: 0; color: var(--ink-soft); }
.disclosure { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); margin: 0 0 10px; }
.disclosure summary { display: flex; align-items: center; gap: 12px; padding: 16px 52px 16px 18px; position: relative; cursor: pointer; list-style: none; font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--moss-900); }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font: 400 24px/1 var(--body); color: var(--brass-dark); }
.disclosure[open] summary::after { content: "−"; }
.disclosure summary span { color: var(--brass-dark); font-size: 15px; }
.disclosure p { margin: 0; padding: 0 18px 18px; color: var(--ink-soft); }
.disclosure[open] { background: var(--parchment); }
.step-list { display: grid; gap: 22px; list-style: none; }
.step-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; }
.step-number { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--brass); line-height: 1.2; }
.step-list h3 { margin-bottom: 4px; }
.step-list p { margin: 0; color: var(--ink-soft); }

/* Leaderboard */
.leaderboard-section .section-head { max-width: 820px; }
.leaderboard-context { font-size: 15px; }
.board-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.board-tabs button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 700 15px var(--body); cursor: pointer; }
.board-tabs button[aria-selected="true"] { background: var(--moss-900); border-color: var(--moss-900); color: var(--cream); }
#record-panel { padding: clamp(16px, 3vw, 28px); border-radius: var(--radius-lg); background: var(--parchment); }
.board-note { font-size: 15px; color: var(--ink-soft); }
.board-table-wrap { position: relative; overflow-x: auto; border-radius: 14px; background: var(--paper); }
.record-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.record-table th { padding: 12px 14px; text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.record-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.record-table tbody tr:last-child td { border-bottom: 0; }
.record-table td:first-child { font-family: var(--display); font-weight: 700; color: var(--brass-dark); }
.record-detail { display: block; color: var(--ink-soft); font-size: 13px; }
.record-duration { white-space: nowrap; }
.record-state { display: grid; justify-items: center; gap: 8px; padding: 28px 16px; text-align: center; color: var(--ink-soft); }
.record-state:empty { display: none; }
.record-state-mark { width: 14px; height: 14px; border-radius: 50%; background: var(--brass-2); box-shadow: 0 0 0 6px rgba(216, 180, 101, 0.22); }
.record-state.is-error .record-state-mark { background: var(--danger); box-shadow: 0 0 0 6px rgba(155, 47, 37, 0.15); }
.board-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; font-size: 14px; color: var(--ink-soft); }
.board-connection::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--parchment-2); vertical-align: middle; }
.board-connection.is-live::before { background: var(--leaf); }
.record-disclaimer, .leaderboard-sync-note { margin-top: 18px; font-size: 14px; color: var(--ink-soft); }

/* Guide */
.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.guide-index { position: sticky; top: 88px; }
.guide-index nav { display: grid; gap: 2px; }
.guide-index nav a { display: flex; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.guide-index nav a span { color: var(--brass-dark); font-family: var(--display); }
.guide-index nav a:hover { background: var(--parchment); }
.guide-content section { scroll-margin-top: 88px; padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.guide-content section:last-child { border-bottom: 0; margin-bottom: 0; }
.section-count { display: block; margin-bottom: 8px; font-family: var(--display); font-weight: 700; color: var(--brass); }
.guide-content .lead { font-size: 19px; }
.team-lineup { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 18px; }
.team-lineup figure { display: grid; justify-items: center; gap: 8px; margin: 0; padding: 18px 22px 14px; border-radius: var(--radius); background: var(--parchment); }
.team-lineup figcaption { font-family: var(--display); font-weight: 600; color: var(--moss-900); }
.mechanism-list { display: grid; gap: 0; }

/* Support, forms */
.support-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--moss-900); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { color: var(--brass-dark); font-family: var(--body); }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list p { color: var(--ink-soft); }
.contact-panel { padding: clamp(22px, 4vw, 36px); border-radius: var(--radius-lg); background: var(--parchment); }
form { display: grid; gap: 8px; }
label { font-weight: 700; font-size: 15px; color: var(--moss-900); }
input, select, textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(31, 51, 42, 0.28); background: var(--paper); color: var(--ink); font: 16px var(--body); }
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--brass-2); outline-offset: 1px; border-color: var(--brass); }
[aria-invalid="true"] { border-color: var(--danger); }
.field-help, .form-privacy { font-size: 14px; color: var(--ink-soft); }
.form-result { min-height: 1.5em; margin: 6px 0 0; font-weight: 600; }
.form-result.is-error { color: var(--danger); }
form .button { justify-self: start; margin-top: 10px; }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.checkbox-label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.checkbox-label input { width: 22px; min-height: 22px; height: 22px; margin-top: 2px; flex: none; }
.deletion-warning { padding: 12px 14px; border-radius: 12px; background: rgba(155, 47, 37, 0.08); color: var(--danger); font-weight: 600; }

/* Legal */
.legal-content { max-width: 820px; }
.legal-content section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.legal-content section h2 { font-size: 23px; }
.legal-content section p { margin: 0; color: var(--ink-soft); }
.legal-links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 28px; }

/* Invite, share */
.invite-card-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.invite-card-heading img { border-radius: 12px; }
.invite-card-heading h2 { margin: 0; font-size: 24px; }
.invite-code-label { position: absolute; left: -10000px; }
#invitation-code { font: 700 24px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.12em; text-align: center; }
.invite-qualification { margin-top: 14px; color: var(--ink-soft); font-size: 15px; }
.invite-terms { margin: 10px 0 14px; }
.invite-terms summary { cursor: pointer; font-weight: 700; }
.invite-terms p { color: var(--ink-soft); font-size: 15px; }
.share-card { display: grid; justify-items: center; gap: 24px; }
.share-image { width: 100%; max-width: 1200px; border-radius: var(--radius); box-shadow: var(--shadow); }
.share-image-portrait { max-width: 540px; }

/* Screenshot viewer */
.screenshot-dialog { width: min(92vw, 470px); max-height: 94vh; padding: 16px 16px 12px; border: 0; border-radius: 26px; background: var(--moss-950); color: var(--cream); }
.screenshot-dialog::backdrop { background: rgba(8, 18, 14, 0.84); }
.screenshot-dialog figure { margin: 0; }
.screenshot-dialog img { width: auto; max-width: 100%; max-height: 74vh; margin: 0 auto; border-radius: 20px; }
.screenshot-dialog figcaption { margin-top: 12px; text-align: center; font-size: 15px; color: rgba(251, 243, 221, 0.86); }
.dialog-close { position: absolute; top: 10px; right: 10px; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(251, 243, 221, 0.14); color: var(--cream); font-size: 26px; cursor: pointer; }
.screenshot-navigation { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 10px; }
.screenshot-navigation button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-dark); background: transparent; color: var(--cream); font-size: 20px; cursor: pointer; }
body.viewing-screenshot { overflow: hidden; }

/* Tablet */
@media (max-width: 1040px) {
    .facts ul, .fair-grid, .rule-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .guide-layout { grid-template-columns: minmax(0, 1fr); }
    .guide-index { position: static; }
    .guide-index nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
    .guide-index nav a { flex: none; background: var(--parchment); }
}

/* Phone */
@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    #main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px var(--gutter) 20px; background: var(--moss-950); border-bottom: 1px solid var(--line-dark); }
    #main-nav.is-open { display: flex; }
    #main-nav > a { padding: 14px 12px; font-size: 17px; }
    #main-nav > .nav-download { margin: 6px 0 0; text-align: center; }
    .locale-picker { margin: 6px 0 0; }
    .locale-options { position: static; margin-top: 8px; }
    .hero-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-bottom: 110px; }
    .hero::after { background: linear-gradient(180deg, rgba(14, 31, 25, 0.86) 0%, rgba(14, 31, 25, 0.82) 55%, rgba(14, 31, 25, 0.92) 100%); }
    .hero-device .shot { width: min(260px, 72vw); }
    .feature, .gold-rule, .support-layout { grid-template-columns: minmax(0, 1fr); }
    .feature-daily .feature-media, .feature-store .feature-media { order: 0; }
    .club-art { position: static; width: 100%; height: 220px; mask-image: linear-gradient(180deg, #000 40%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent); }
    .club-copy { max-width: none; padding-top: 0; }
    .page-hero { grid-template-columns: minmax(0, 1fr); }
    .page-hero-art { width: 100%; opacity: 0.35; mask-image: none; -webkit-mask-image: none; }
    .page-hero-device { display: none; }
    .download-inner { grid-template-columns: minmax(0, 1fr); }
    .definition-list > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (max-width: 520px) {
    body { font-size: 16px; }
    .facts ul { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
    .facts li { padding: 16px 14px; }
    .fair-grid, .rule-cards { grid-template-columns: minmax(0, 1fr); }
    .hero-actions .button { flex: 1 1 auto; }
    .step-list li { grid-template-columns: 40px minmax(0, 1fr); }
}

/* Put the two real boards on the courtyard, with the Arena result in front. */
.hero-inner { align-items: center; }
.hero-wordmark { width: min(235px, 64%); margin-bottom: 1rem; }
.hero .availability { margin-top: 1.65rem; }
.store-link { min-height: 48px; padding-inline: 19px; border-radius: 12px; background: #f6e7be; color: #193126; border: 1px solid #debe78; }
.store-link:hover { background: #fff3d6; }
.hero-paths { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 1rem; }
.hero-paths a { display: inline-flex; align-items: center; min-height: 44px; color: #f9efdb; text-underline-offset: 5px; }
.hero-device { position: relative; isolation: isolate; align-items: center; }
.hero-device .shot { width: min(55%, 264px); margin-left: 26%; transform: rotate(3deg); }
.hero-device .hero-board { position: absolute; left: 6%; top: 14%; width: min(46%, 215px); height: auto; border: 4px solid #294339; border-radius: 20px; transform: rotate(-8deg); box-shadow: var(--shadow); z-index: -1; }
.facts ul { gap: 0; padding-block: 14px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.facts li { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.feature-arena { background: linear-gradient(120deg, #1c352a, #2c4738); color: #fff4dc; padding: clamp(24px,5vw,64px); border-radius: 24px; margin-top: 3rem; }
.feature-arena :is(h2, .text-link) { color: #fff4dc; }
.feature-arena :is(.eyebrow, .ticks li, .feature-copy p) { color: #efdeb4; }
@media (max-width: 760px) {
    .hero-device { width: min(360px, 96%); margin-inline: auto; }
    .hero-device .shot { width: 53%; }
    .feature-arena { margin-inline: var(--gutter); }
}
.hero-device { width: min(100%, 480px); margin-inline: auto; }
@media (max-width: 760px) { .hero-device { width: min(96%, 360px); } }
/* Five board columns on a phone: tighter cells so stars, puzzles and moves stay in view. */
@media (max-width: 520px) {
    .record-table { font-size: 14px; }
    .record-table th, .record-table td { padding: 10px 5px; }
    .record-table th { font-size: 11px; letter-spacing: 0.02em; }
    .record-table :is(th, td):first-child { padding-left: 10px; }
    .record-table :is(th, td):nth-child(n+5) { padding-right: 10px; }
    .record-table td:nth-child(2) { min-width: 9ch; overflow-wrap: anywhere; }
}

.guide-robot { display: block; width: 120px; height: 120px; object-fit: contain; }
