:root {
  color-scheme: light;
  --paper: #f4f2e8;
  --white: #fdfcf7;
  --ink: #142728;
  --muted: #4e605b;
  --border: #d8dcd0;
  --night-ink: #edf1e7;
  --accent: #edbc8f;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif;
  --sans: "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.65; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.35; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #207f76; outline-offset: 4px; }
.hero :focus-visible, .subhero :focus-visible { outline-color: #e8f39c; }
.wrap { width: min(1140px, calc(100% - 72px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 10; background: var(--white); padding: 12px; }
.masthead { background: var(--paper); border-bottom: 1px solid #21333115; }
.masthead-inner { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; justify-self: start; font-weight: 750; letter-spacing: 0.09em; line-height: 1.2; white-space: nowrap; }
.brand small { display: block; margin-top: 5px; font: 10px/1.1 var(--mono); letter-spacing: 0.12em; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #935b60; color: #935b60; border-radius: 8px; flex: none; font: 750 1.05rem/1 var(--serif); }
.masthead nav, .footer nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 38px); }
.masthead nav a, .footer nav a { font-size: 0.875rem; text-decoration: none; font-weight: 700; white-space: nowrap; }
.masthead nav a { padding-block: 9px 7px; border-bottom: 2px solid transparent; }
.masthead nav a:hover, .masthead nav a.current { border-color: #9e614e; }
.header-action { justify-self: end; background: transparent; border: 1px solid #c7d1c5; border-radius: 6px; padding: 7px 12px; font-size: 0.875rem; white-space: nowrap; font-weight: 700; text-decoration: none; }
.header-action:hover { background: #e8ebde; }

.hero { min-height: 490px; position: relative; isolation: isolate; display: grid; align-items: center; background: #211520; color: var(--night-ink); overflow: hidden; }
.hero-picture, .hero-picture img { position: absolute; height: 100%; right: 0; top: 0; }
.hero-picture { width: min(76%, 1280px); z-index: -2; }
.hero-picture img { width: 100%; object-fit: cover; object-position: 83% 45%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #211520 4%, #211520 22%, #211520ec 31%, #21152028 61%, transparent 81%), linear-gradient(0deg, #211520ad, transparent 30%); }
.hero-content { padding-block: 52px 68px; }
.eyebrow { color: #46614f; font-weight: 750; font-size: 0.875rem; letter-spacing: 0.13em; }
.eyebrow span { margin-right: 5px; }
.hero .eyebrow, .subhero .eyebrow { color: var(--accent); }
.hero h1 { font-family: var(--serif); font-size: clamp(3.1rem, 5.5vw, 4.85rem); font-weight: 650; margin: 18px 0 20px; letter-spacing: 0.015em; line-height: 1.09; }
.hero-description { color: #d8e2df; font-size: clamp(0.98rem, 1.35vw, 1.125rem); line-height: 1.8; font-weight: 500; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; gap: 8px; padding: 10px 18px; border-radius: 6px; text-align: center; border: 1px solid transparent; text-decoration: none; line-height: 1.35; font-size: 0.9375rem; font-weight: 750; transition: background-color 140ms, border-color 140ms; }
.button.primary { background: var(--accent); color: #182623; border-color: var(--accent); }
.button.primary:hover { background: #ffe1ba; border-color: #ffe1ba; }
.button.hero-secondary { color: var(--night-ink); border-color: #8ca59da0; background: #0a1d2990; }
.button.hero-secondary:hover { background: #26434a; }
.button.dark { background: #152f33; color: white; border-color: #152f33; }
.button.dark:hover { background: #284d4b; border-color: #284d4b; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
h2 { font: 700 clamp(1.6rem, 3vw, 2.28rem)/1.35 var(--serif); letter-spacing: 0.015em; }
.section-heading .eyebrow { margin-bottom: 6px; }
.text-link { font-size: 0.875rem; font-weight: 750; color: #214e47; text-underline-offset: 5px; text-decoration: underline; }
.text-link:hover { color: #126556; text-decoration-thickness: 2px; }
legend { font-size: 1rem; font-weight: 750; padding: 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

.section-space { padding-block: 48px; }
.sample-section { background: #eaece0; border-block: 1px solid #dfe1d5; }
.sample-grid, .guide-links, .category-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guide-links { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.example-card, .guide-link, .category-link { border: 1px solid var(--border); background: var(--white); border-radius: 9px; }
.example-card { display: flex; flex-direction: column; padding: 20px; gap: 8px; }
.sample-input { color: #445c56; font-size: 0.875rem; }
.example-card h3 { margin-top: 4px; font: 700 1.8rem/1.35 var(--serif); }
.vowel-line { display: flex; gap: 6px; flex-wrap: wrap; margin-block: 3px 1px; }
.sample-stat { padding: 3px 7px; background: #e9edd2; border-radius: 4px; font-size: 0.875rem; font-weight: 650; }
.example-card .text-link { margin-top: auto; padding-top: 4px; align-self: flex-start; }
.game-intro { padding-block: clamp(25px, 5vw, 52px); border-bottom: 1px solid #ded1c4; }
.game-intro h2, .comparison h2 { margin: 0 0 9px; }
.game-intro p, .comparison > p { max-width: 68ch; }
.game-intro p + p { margin-top: 9px; }
.comparison { margin-bottom: clamp(20px, 5vw, 44px); }
.comparison-scroll { overflow-x: auto; margin-top: 13px; border: 1px solid #decabd; border-radius: 7px; }
.comparison-scroll table { width: 100%; min-width: 470px; border-collapse: collapse; background: #fffbf6; }
.comparison-scroll th, .comparison-scroll td { padding: 10px 13px; text-align: left; border-bottom: 1px solid #eadfd3; white-space: nowrap; }
.comparison-scroll thead th { background: #efe1d5; color: #4a3530; }
.comparison-scroll tbody tr:last-child > * { border-bottom: 0; }
.guide-link { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 23px; text-decoration: none; }
.guide-link:hover, .category-link:hover { background: #ecf0df; border-color: #aabea8; }
.guide-link h3 { font: 700 1.26rem/1.5 var(--serif); }
.guide-link .text-link { margin-top: auto; }
.guide-icon { color: #416b5a; font-size: 1.5rem; font-weight: 700; }
.faq { margin-block: 46px 26px; max-width: 780px; scroll-margin-top: 24px; }
.faq h2 { margin-bottom: 12px; }
.faq details { padding: 10px 0; border-bottom: 1px solid #cdd6c9; }
.faq summary { cursor: pointer; padding: 4px 0; font-weight: 700; }
.faq details p { color: var(--muted); margin: 6px 0 4px 18px; }

.subhero { color: var(--night-ink); background: #081925 radial-gradient(ellipse at 88% 30%, #17413f, transparent 60%); padding: 25px 0 43px; }
.crumbs { font-size: 0.875rem; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 23px; color: #c5d9d5; }
.subhero h1 { font-family: var(--serif); font-size: clamp(2.1rem, 5vw, 3.55rem); margin: 9px 0 15px; }
.subhero p:last-child { color: #d6e5df; max-width: 68ch; }
.play-subhero { padding-bottom: clamp(24px, 5vw, 43px); }
.play-subhero .hero-actions { margin-top: 17px; }
.game-page-lead { max-width: 70ch; color: #e7e7dc; }
.game-page-source { margin-top: 9px; color: #edbc8f; font-size: 0.88rem; }
.game-entry-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 9px; margin-top: 12px; }
.game-entry-list a { font-weight: 750; }
.content-body { padding-block: 34px 55px; }
.content-body > h2, .collection > h2 { margin-bottom: 16px; }
.collection { margin-block: 34px 22px; }
.category-link { display: grid; align-content: center; text-decoration: none; padding: 14px 16px; gap: 2px; }
.category-link small { color: var(--muted); font-size: 0.875rem; }
.guide-article { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: clamp(19px, 5vw, 48px); max-width: 870px; }
.guide-article section + section { margin-top: 26px; }
.guide-article h2 { font-size: clamp(1.25rem, 2.7vw, 1.65rem); margin-bottom: 9px; }
.guide-article h2 span { color: #56715b; }
.guide-article p { line-height: 1.9; }
.article-actions { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer { background: #10272f; color: #e8efe4; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 23px; padding-block: 27px; }
.footer nav { flex-wrap: wrap; }
.footer nav a:hover { text-decoration: underline; }

@media (max-width: 920px) {
  .wrap { width: calc(100% - 48px); }
  .hero { min-height: 455px; }
  .sample-grid, .guide-links, .category-links { gap: 12px; }
  .example-card, .guide-link { padding: 15px; }
}
@media (max-width: 680px) {
  .comparison-scroll table { min-width: 0; table-layout: fixed; font-size: 0.84rem; }
  .comparison-scroll th, .comparison-scroll td { padding: 7px 5px; white-space: normal; overflow-wrap: anywhere; }
  .comparison-scroll th:nth-child(1) { width: 16%; }
  .comparison-scroll th:nth-child(2) { width: 29%; }
  .comparison-scroll th:nth-child(4) { width: 21%; }
  .comparison-scroll .text-link { font-size: inherit; }
  .wrap { width: calc(100% - 32px); }
  .masthead-inner { grid-template-columns: 1fr auto; gap: 0 8px; padding-top: 10px; min-height: 0; }
  .masthead nav { grid-row: 2; grid-column: 1 / -1; justify-content: center; gap: clamp(12px, 4vw, 30px); }
  .masthead nav a { padding-block: 9px 6px; }
  .brand { gap: 8px; }
  .brand-mark { width: 31px; height: 31px; }
  .brand small { font-size: 9px; }
  .hero { min-height: 465px; align-items: start; }
  .hero-picture { width: 100%; height: 100%; }
  .hero-picture img { object-position: 61% center; }
  .hero::after { background: linear-gradient(90deg, #211520ec 0%, #211520ac 37%, #21152024 100%), linear-gradient(0deg, #21152075, transparent 25%); }
  .hero-content { padding: 42px 0 70px; }
  .hero h1 { margin-block: 18px 15px; font-size: clamp(2.15rem, 9.5vw, 3.65rem); }
  .hero-description { font-size: 1rem; }
  .hero-actions { margin-top: 21px; }
  .section-space { padding-block: 32px; }
  .section-heading { margin-bottom: 15px; }
  .sample-grid, .guide-links, .category-links { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
