:root {
    color-scheme: dark;
    --ink: #f8f3e8;
    --muted: #c5cfc4;
    --paper: #f7f2e8;
    --green: #13231b;
    --gold: #f3ca8d;
    --ease: cubic-bezier(.25, .1, .25, 1);
    font-family: 'Inter Tight', Inter, system-ui, sans-serif;
    background: var(--green);
    color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
img { display: block; width: 100%; height: auto; }
button, summary { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #c77f31; outline-offset: 5px; }
[id] { scroll-margin-top: 6rem; }
p { line-height: 1.6; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(2.5rem, 5.2vw, 5.2rem); font-weight: 600; letter-spacing: -.065em; line-height: .99; }
.wrap { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.section { padding-block: clamp(4rem, 8vw, 8rem); }
.skip { position: fixed; top: .75rem; left: .75rem; z-index: 15; padding: .8rem 1rem; background: var(--paper); color: var(--green); transform: translateY(-160%); }
.skip:focus { transform: none; }

.site-header { position: fixed; inset: 0 0 auto; z-index: 5; display: flex; justify-content: center; padding: 20px 16px; pointer-events: none; }
.nav-shell { pointer-events: auto; display: flex; align-items: center; gap: clamp(1rem, 3vw, 3rem); padding: 9px 10px 9px 14px; border: 1px solid #f9efdb4d; border-radius: 100px; background: #18251ee6; backdrop-filter: blur(16px); }
.brand, .nav-links a, .button, .hero-guide { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; white-space: nowrap; }
.brand-tile { display: grid; place-items: center; width: 30px; height: 32px; border-radius: 5px; color: #32271d; background: #f7e4c1; border-bottom: 3px solid #bd9969; font-size: .7rem; font-weight: 700; }
.nav-links { display: flex; gap: clamp(1rem, 2vw, 2rem); color: #e8e9df; font-size: .94rem; }
.nav-links a { transition: color .24s var(--ease); }
.nav-links a:hover { color: var(--gold); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 48px; padding: .6rem 1.25rem; border-radius: 999px; font-weight: 700; transition: transform .25s var(--ease), background .25s var(--ease); }
.button:hover { transform: translateY(-2px); }
.button-glass { border: 1px solid #fff3d5; color: #24241d; background: radial-gradient(ellipse at 50% 100%, #fff9e7 0, transparent 70%), linear-gradient(160deg, #d9ae7b, #fff0d0); box-shadow: inset 0 1px 3px #fff9e9; }
.nav-play { min-height: 40px; padding-inline: 1rem; font-size: .9rem; }
.menu-toggle, .mobile-menu { display: none; }
.mobile-menu[open] { display: flex; }

.hero { isolation: isolate; position: relative; display: grid; grid-template-rows: 1fr auto; min-height: min(100svh, 1050px); min-height: max(640px, min(100svh, 1050px)); overflow: hidden; background: #242f23; }
.hero-picture, .hero::after { position: absolute; z-index: -1; inset: 0; }
.hero-picture img { height: 100%; object-fit: cover; object-position: center 66%; transform: scale(1.04) translateY(var(--hero-y, 0px)); }
.hero::after { content: ''; background: linear-gradient(180deg, #10181388, #1018133d 24%, #101813cf 52%, #0c130a00 79%, #090e09d9 100%); }
.hero-content { align-self: start; justify-self: center; text-align: center; padding: clamp(8rem, 18svh, 13rem) 1.25rem 7rem; }
.hero h1 { font-size: clamp(3.75rem, 11vw, 11.75rem); font-weight: 600; line-height: .9; letter-spacing: -.075em; color: #fff4de; background: linear-gradient(#fffdf6, #f3cea0); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-content p { margin: clamp(1rem, 2.6vw, 2rem) 0 1.55rem; font-size: clamp(1.05rem, 1.7vw, 1.5rem); color: #fff9ef; }
.hero-content > * { animation: appear .65s var(--ease) both; }
.hero-content p { animation-delay: .08s; }
.hero-play, .hero-guide { animation-delay: .16s; }
.hero-play { min-height: 54px; padding-inline: 1.5rem; }
.hero-guide { display: inline-flex; align-items: center; gap: .5rem; margin-left: 1rem; padding: .65rem .4rem; font-weight: 600; }
.hero-guide:hover { text-decoration: underline; }
.hero-bottom { display: flex; justify-content: space-between; gap: 1rem; padding: 18px max(24px, calc((100% - 1200px) / 2)); color: #fff5e7; border-top: 1px solid #fff6e64d; background: #0b140e61; font-size: .92rem; }

.rule-layout, .practice-layout, .table-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.rule-layout h2, .practice h2, .table-layout h2 { margin-bottom: 2rem; }
.steps { margin: 0 0 1.5rem; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: .9rem 0 .9rem 2.6rem; border-top: 1px solid #f8f3e830; counter-increment: step; }
.steps li::before { position: absolute; left: 0; content: counter(step, decimal-leading-zero); color: var(--gold); font-weight: 600; }
.steps h3, .table-options dt { font-size: 1.3rem; font-weight: 650; letter-spacing: -.025em; }
.steps p { margin-top: .3rem; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 650; text-underline-offset: .25em; }
.editorial-photo { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; }
.practice { background: #eee1ca; color: #192b21; color-scheme: light; }
.practice p, .table-layout p { max-width: 44ch; font-size: 1.12rem; }
.practice-board { padding: clamp(1.2rem, 4vw, 2.5rem); border-radius: 12px; background: #273c2c; color: var(--ink); }
.series { display: grid; gap: .75rem; padding: 0; margin: 0 0 1.25rem; list-style: none; }
.series li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-bottom: .75rem; border-bottom: 1px solid #f8f3e83b; }
.series li > span { font-size: .95rem; }
.tiles { display: flex; gap: .3rem; }
.tile { display: grid; place-items: center; width: clamp(1.85rem, 4vw, 2.55rem); height: clamp(2.3rem, 4.7vw, 3.1rem); border-radius: 5px; border-bottom: 4px solid #c5a77d; background: #f8edd8; color: #272721; font-size: clamp(1rem, 2vw, 1.4rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.blue .tile { color: #184c75; }
.red .tile { color: #a0222a; }
.result summary { width: fit-content; min-height: 44px; display: flex; align-items: center; padding: .5rem 1.1rem; border-radius: 999px; color: #24241d; background: var(--gold); font-weight: 700; list-style-type: none; }
.result summary::-webkit-details-marker { display: none; }
.result p { margin-top: .8rem; font-size: 1rem; }
.result-open, .result[open] .result-closed { display: none; }
.result[open] .result-open { display: inline; }
.table-figure { margin: 0; }
.table-figure figcaption { margin-top: .6rem; font-size: .86rem; color: var(--muted); }
.table-options { margin: 0 0 1.3rem; }
.table-options dt { padding-top: .75rem; border-top: 1px solid #f8f3e830; }
.table-options dd { margin: .2rem 0 .9rem; color: var(--muted); line-height: 1.55; }
.button-dark { margin-top: 1.25rem; border: 1px solid #e9cc9980; color: var(--gold); }
.button-dark:hover { background: #423d2a; }
.site-footer { border-top: 1px solid #f8f3e830; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: .75rem 1.2rem; min-height: 92px; }
.footer-inner > a:not(.brand) { color: var(--muted); text-underline-offset: .25em; }
.error-page { padding-top: 10rem; min-height: 80vh; }
.error-page h1 { margin-bottom: 1.5rem; font-size: clamp(2.8rem, 7vw, 6rem); line-height: 1; letter-spacing: -.06em; }

.hero-bottom { display: block; padding-block: 20px; background: #0b140ede; }
.game-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.game-link { display: flex; align-items: center; gap: .65rem; min-height: 58px; padding: .6rem .8rem; border-radius: 10px; border: 1px solid #f3ca8d55; background: #213429; color: var(--ink); text-decoration: none; }
.game-link:hover { background: #324936; border-color: var(--gold); }
.game-link img { width: 24px; height: 24px; flex: 0 0 24px; object-fit: contain; }
.game-link strong, .game-link small { display: block; }
.game-link strong { line-height: 1.15; }
.game-link small { margin-top: .18rem; color: var(--muted); line-height: 1.2; }
.game-link > span:last-child { margin-left: auto; color: var(--gold); }
.contents-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.4rem; padding-block: 1.1rem; border-bottom: 1px solid #f8f3e830; }
.contents-links a, .collection-links a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: .2em; }
.feature-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: start; gap: clamp(2rem, 6vw, 6rem); }
.feature-layout h2 { margin-bottom: 1.25rem; }
.feature-layout p + p, .feature-layout p + .text-link { margin-top: 1rem; }
.practice .table-options dt { border-color: #273c2c40; }
.practice .table-options dd { color: #354337; }
.questions details { border-top: 1px solid #f8f3e830; padding-block: .75rem; }
.questions summary { min-height: 44px; padding-block: .55rem; font-weight: 650; }
.questions p { margin-bottom: .4rem; color: var(--muted); }
.collection-links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1rem; }
.story-list { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.story-list li { border-top: 1px solid #f8f3e843; }
.practice .story-list li { border-color: #273c2c40; }
.story-link { display: grid; grid-template-columns: clamp(75px, 15vw, 170px) minmax(0, 1fr) auto; align-items: center; gap: clamp(.65rem, 2.5vw, 1.75rem); padding-block: .95rem; text-decoration: none; }
.story-link:hover h3 { text-decoration: underline; text-underline-offset: .18em; }
.story-link img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }
.story-link h3 { font-size: clamp(1.1rem, 2.8vw, 1.8rem); line-height: 1.13; }
.story-link p { margin-top: .35rem; color: var(--muted); }
.practice .story-link p { color: #354337; }
.story-arrow { font-size: 1.35rem; }
.subpage { padding-block: clamp(6.5rem, 11vw, 9.5rem) 4rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .3rem .8rem; padding: 0; list-style: none; font-size: .9rem; color: var(--muted); }
.breadcrumbs li + li::before { content: '/'; margin-right: .8rem; }
.page-intro { max-width: 880px; margin-block: 1.6rem; }
.page-intro h1 { font-size: clamp(2.35rem, 6vw, 5.7rem); line-height: 1; letter-spacing: -.055em; }
.page-intro p { margin-top: 1rem; max-width: 66ch; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); }
.archive-heading { margin-top: 3.25rem; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.editorial { margin-top: clamp(1.75rem, 4vw, 3.75rem); }
.article-figure { margin: 0; }
.article-figure img { max-height: 500px; object-fit: cover; border-radius: 12px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); align-items: start; gap: clamp(1.5rem, 5vw, 5rem); margin-top: 2rem; }
.article-toc { padding: 1rem; border: 1px solid #f8f3e843; border-radius: 10px; }
.article-toc h2, .related h2 { font-size: 1.4rem; letter-spacing: -.02em; }
.article-toc ol { padding-left: 1.2rem; margin-bottom: 0; }
.article-toc a, .related a { display: inline-block; padding-block: .3rem; text-underline-offset: .16em; line-height: 1.4; }
.article-prose { max-width: 71ch; font-size: 1.12rem; }
.article-prose section + section { margin-top: 2.5rem; }
.article-prose h2 { margin-bottom: .85rem; font-size: clamp(1.55rem, 3vw, 2.45rem); line-height: 1.1; letter-spacing: -.035em; }
.article-prose p + p { margin-top: .85rem; }
.article-source { margin-top: 2rem; color: var(--gold); }
.related, .error-return { margin-top: 2.5rem; }
.related { border-top: 1px solid #f8f3e843; padding-top: 1.6rem; }
.related ul { padding-left: 1.2rem; }

@keyframes appear { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 800px) {
    .wrap { width: calc(100% - 44px); }
    .site-header { padding-top: 12px; }
    .nav-shell { width: min(100%, 32rem); justify-content: space-between; gap: .75rem; }
    .nav-links { display: none; }
    .nav-play { margin-left: auto; }
    .menu-ready .menu-toggle { display: grid; align-content: center; gap: 4px; flex: 0 0 44px; width: 44px; height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: #ffffff16; }
    .menu-toggle span { height: 2px; border-radius: 2px; background: var(--ink); }
    .mobile-menu { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; align-items: center; justify-content: center; flex-direction: column; gap: 1.55rem; color: var(--ink); background: #14221bfa; border: 0; }
    .mobile-menu::backdrop { background: #0a100b; }
    .mobile-menu a { font-size: clamp(1.25rem, 4vw, 1.75rem); text-decoration: none; animation: appear .35s var(--ease) both; }
    .mobile-menu a:nth-of-type(2) { animation-delay: .06s; }
    .mobile-menu a:nth-of-type(3) { animation-delay: .12s; }
    .mobile-menu a:nth-of-type(4) { animation-delay: .18s; }
    .menu-close { position: absolute; top: 1.15rem; right: 1rem; width: 48px; height: 48px; border-radius: 50%; border: 1px solid #ffffff64; background: transparent; color: inherit; font-size: 1.9rem; }
    body:has(.mobile-menu[open]) { overflow: hidden; }
    .rule-layout, .practice-layout, .table-layout, .feature-layout, .article-layout { grid-template-columns: 1fr; }
    .table-layout > div { grid-row: 1; }
}

@media (max-width: 640px) {
    .hero { min-height: max(580px, 94svh); }
    .hero-picture img { object-position: 54% center; }
    .hero::after { background: linear-gradient(180deg, #10181391, #101813dc 22%, #101813ad 51%, #0c130a00 70%, #090e09dc 100%); }
    .hero-content { padding: clamp(6rem, 14svh, 8rem) 1.15rem 10.5rem; }
    .hero h1 { font-size: clamp(2.8rem, 12vw, 5rem); }
    .hero-bottom { padding: 12px 14px; }
    .game-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
    .game-link { min-height: 56px; gap: .4rem; padding: .45rem; font-size: .82rem; }
    .game-link img { width: 20px; height: 20px; flex-basis: 20px; }
    .game-link > span:last-child { display: none; }
    .footer-inner { flex-wrap: wrap; padding-block: 1.25rem; }
}

@media (max-width: 355px) {
    .nav-shell { gap: .35rem; }
    .nav-play { padding-inline: .55rem; }
    .hero-guide { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .hero-picture img { transform: none; }
}
