:root {
    color-scheme: light;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: #fff;
    color: #22272e;
    --muted: #555d68;
    --line: #dce0e5;
    --surface: #f3f4f6;
    --blue: #174fc9;
    --blue-dark: #123e9c;
    --red: #b52735;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
section[id], footer[id] { scroll-margin-top: 1rem; }

.wrap { width: min(100% - 3rem, 72rem); margin-inline: auto; }
.skip-link { position: fixed; top: .7rem; left: .7rem; transform: translateY(-220%); z-index: 5; background: var(--blue); color: #fff; padding: .65rem; }
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(.85rem, 2.5vw, 1.75rem); }
nav a { text-decoration: none; color: var(--muted); font-weight: 650; font-size: .95rem; }
nav a:hover { color: var(--blue); }
.game-menu { flex-wrap: nowrap; gap: .75rem; }
.game-menu > span { color: var(--muted); font-size: .875rem; }
.game-menu a[aria-current="page"] { color: var(--blue); background: #eaf0fd; border-radius: .3rem; padding: .55rem .75rem; white-space: nowrap; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 800; letter-spacing: .06em; }
.brand-mark { width: 1.15rem; height: .7rem; border: 2px solid var(--blue); border-right-color: var(--red); border-radius: .3rem .3rem .45rem .45rem; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
    padding-block: clamp(2.5rem, 7vw, 5rem);
}
.hero-copy { min-width: 0; }
.eyebrow { color: var(--muted); font-size: .875rem; font-weight: 650; }
.hero h1 { margin-block: .35rem 1rem; font-size: clamp(3rem, 6.8vw, 6rem); line-height: .98; letter-spacing: -.065em; font-weight: 800; }
.tagline { font-size: clamp(1.15rem, 2.2vw, 1.65rem); font-weight: 700; letter-spacing: -.025em; }
.hero-description { color: var(--muted); max-width: 27rem; margin: .65rem 0 1.35rem; line-height: 1.6; }
.hero-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); border-radius: .5rem; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media video { position: absolute; inset: 0; }
.hero-playback {
    position: absolute;
    right: .7rem;
    bottom: .7rem;
    min-height: 2.75rem;
    padding: .55rem .75rem;
    border: 1px solid var(--line);
    border-radius: .35rem;
    background: #fff;
    color: #22272e;
    font: inherit;
    font-size: .875rem;
    cursor: pointer;
}
.hero-playback:hover { color: var(--blue); }

.button, .secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 3.125rem;
    padding: .65rem 1.15rem;
    border: 1px solid transparent;
    border-radius: .35rem;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.button { background: var(--blue); color: #fff; }
.button:hover { background: var(--blue-dark); }
.button:disabled { background: #e2e5e9; color: #555d68; cursor: default; }
.file-type { border: 1px solid currentColor; border-radius: .2rem; padding: .05rem .3rem; font-size: .875rem; }

.guide { padding-top: clamp(1.8rem, 4vw, 3rem); border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; letter-spacing: -.04em; }
.steps { list-style: none; padding: 0; margin: 1.35rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.step img { width: 100%; height: auto; border-radius: .4rem; }
.step-copy { padding-block: .85rem; }
.step h3 { font-size: 1.2rem; letter-spacing: -.02em; }
.step p { margin-top: .35rem; color: var(--muted); line-height: 1.55; }
.media-note, .availability { font-size: .875rem; color: var(--muted); line-height: 1.5; }
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.4rem; background: var(--surface); border-radius: .4rem; }
.rules div { padding: 1.05rem; display: grid; gap: .25rem; }
.rules div + div { border-left: 1px solid var(--line); }
.rules strong { font-size: 1.15rem; }
.rules div > span, .score-note { color: var(--muted); line-height: 1.55; }
.points-up { color: var(--blue); }
.points-down { color: var(--red); }
.score-note { margin-top: .85rem; max-width: 50rem; }

.download { padding-block: clamp(2.75rem, 7vw, 5rem); }
.download-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    padding: clamp(1.4rem, 4vw, 2.5rem);
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: .4rem;
}
.download h2 { margin-block: .35rem .55rem; }
.download-panel p { color: var(--muted); }
.download-action .availability { margin-top: .5rem; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 2rem; }
.footer-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem; }
.site-footer h2 { margin-top: .65rem; font-size: 1.5rem; }
.contact-list { margin: 0 0 .65rem; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; }
.contact-list li { display: grid; gap: .15rem; }
.contact-list span { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }

.admin { width: min(100% - 3rem, 37rem); margin: clamp(2rem, 12vh, 7rem) auto; }
.admin header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.admin > p { margin-top: 1rem; color: var(--muted); }
.secondary { background: transparent; color: inherit; border-color: var(--line); }
.secondary:hover { background: var(--surface); }
.upload { display: grid; justify-items: start; gap: 1rem; margin-top: 1.5rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: .4rem; }
.upload input { max-width: 100%; font: inherit; }
.feedback { padding: .8rem 1rem; border: 1px solid currentColor; border-radius: .35rem; }
.admin .success { color: var(--blue); }
.admin .failure { color: var(--red); }

@media (max-width: 760px) {
    .wrap { width: min(100% - 2rem, 36rem); }
    .header-inner { flex-wrap: wrap; padding-block: .75rem; }
    .hero, .steps, .footer-inner { grid-template-columns: 1fr; }
    .hero { gap: 1.5rem; }
    .steps { gap: .9rem; }
    .rules { grid-template-columns: 1fr; }
    .rules div + div { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 360px) {
    .contact-list { grid-template-columns: 1fr; }
    .download-action, .download-action .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
