:root {
  color-scheme: light;
  --ink: #202820;
  --muted: #71786a;
  --paper: #f4f1e5;
  --paper-deep: #e4dec9;
  --white: #fffdf7;
  --line: #d8d5ca;
  --red: #a87935;
  --red-dark: #795a26;
  --blue: #496b5b;
  --green-pale: #e1e9d8;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --sans: ui-monospace, "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --shadow: 0 18px 45px rgba(35, 43, 36, .075);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
.topbar {
  height: 76px;
  padding: 0 clamp(22px, 5.5vw, 88px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 17px; font-weight: 700; letter-spacing: .06em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-family: var(--sans); font-size: 8px; letter-spacing: .15em; }
.brand-mark { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--ink); transform: rotate(-4deg); }
.brand-mark i { width: 3px; height: 12px; display: block; background: var(--red); transform: skew(-14deg); }
.brand-mark i:nth-child(2) { height: 17px; background: var(--ink); }
.brand-mark i:nth-child(3) { height: 9px; background: var(--blue); }
.top-link { color: var(--muted); font-family: var(--sans); font-size: 10px; letter-spacing: .06em; text-decoration: none; }
.top-link span { padding-left: 5px; color: var(--red); }
.top-link:hover, .source-list a:hover { color: var(--red-dark); }
main { max-width: 1440px; margin: auto; padding: 0 clamp(22px, 7.3vw, 116px); }
.intro { min-height: 315px; display: flex; align-items: center; justify-content: space-between; padding: 48px 5.6% 43px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.intro::after { content: ""; width: 245px; height: 245px; position: absolute; right: 21%; top: -125px; border: 1px solid rgba(23,37,34,.12); border-radius: 50%; box-shadow: 0 0 0 22px rgba(23,37,34,.025), 0 0 0 45px rgba(23,37,34,.02); pointer-events: none; }
.intro-copy { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 16px; color: var(--blue); font-family: var(--sans); font-size: 9px; font-weight: 500; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow-dot, .live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--red); vertical-align: 1px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(42px, 5.4vw, 68px); font-weight: 500; letter-spacing: .12em; line-height: 1.14; }
h1 span { color: var(--red); }
.lead { margin: 13px 0 12px; font-size: clamp(17px, 2vw, 21px); line-height: 1.9; letter-spacing: .045em; }
.intro-note { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .03em; }
.intro-aside { width: 265px; height: 180px; margin: 0 2% 0 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; flex-shrink: 0; border: 1px solid rgba(23,37,34,.17); outline: 1px solid rgba(23,37,34,.11); outline-offset: 6px; position: relative; z-index: 1; transform: rotate(1.5deg); background: rgba(255,253,247,.34); }
.aside-kicker { color: var(--muted); font-family: var(--sans); font-size: 8px; letter-spacing: .2em; }
.aside-char { margin: 7px 0; font-size: 56px; font-weight: 500; letter-spacing: .12em; }
.aside-char span { color: var(--red); font-size: 20px; vertical-align: 14px; }
.aside-rule { width: 52px; height: 1px; margin-bottom: 9px; background: var(--red); }
.aside-caption { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.play-area { padding: 43px 0 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 0 0 20px; padding: 0 5.6%; }
.section-heading .eyebrow { margin-bottom: 6px; }
.heading-line { width: 24px; height: 1px; display: inline-block; margin: 0 8px 3px; background: var(--red); }
h2 { margin-bottom: 0; font-size: 25px; font-weight: 500; letter-spacing: .07em; }
.round-label { margin: 0 0 5px; color: var(--muted); font-family: var(--sans); font-size: 9px; letter-spacing: .08em; }
.live-dot { width: 6px; height: 6px; background: #7a9d80; }
.game-shell { min-height: 525px; display: grid; grid-template-columns: 245px minmax(0, 1fr); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.game-rail { padding: 26px 24px 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.rail-block { margin-bottom: 22px; }
.rail-label { margin: 0 0 10px; color: var(--muted); font-family: var(--sans); font-size: 8px; letter-spacing: .13em; }
.surname-card { padding: 11px 12px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; border: 1px solid var(--line); background: #fbfaf5; }
.surname-card strong { font-size: 22px; font-weight: 500; letter-spacing: .08em; }
.surname-card span { color: var(--muted); font-family: var(--sans); font-size: 9px; }
.surname-card b { grid-column: 1 / -1; margin-top: 5px; color: var(--blue); font-family: var(--sans); font-size: 8px; font-weight: 500; letter-spacing: .06em; }
.choice-list { display: grid; gap: 6px; }
.choice-button { width: 100%; padding: 9px 10px; border: 1px solid transparent; display: flex; justify-content: space-between; align-items: center; color: var(--ink); background: transparent; cursor: pointer; text-align: left; transition: background .18s ease, border-color .18s ease; }
.choice-button:hover { background: #f6f4ed; }
.choice-button[aria-pressed="true"] { border-color: #c9d3cc; background: #edf2ed; }
.choice-main { font-size: 12px; }
.choice-sub { color: var(--muted); font-family: var(--sans); font-size: 8px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; background: #efeee8; }
.segment-button { padding: 8px 6px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-family: var(--sans); font-size: 9px; }
.segment-button.is-selected { color: var(--ink); background: var(--white); box-shadow: 0 1px 4px rgba(0,0,0,.09); }
.score-card { margin-top: 8px; padding: 14px 13px 12px; border: 1px solid var(--line); background: #fbfaf5; }
.score-top { display: flex; align-items: center; justify-content: space-between; }
.score-top .rail-label { margin: 0; }
.score-symbol { color: var(--red); font-size: 14px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 5px; margin-top: 12px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-wide { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--line); }
.stat-label { color: var(--muted); font-family: var(--sans); font-size: 8px; letter-spacing: .05em; }
.stat strong { font-family: var(--sans); font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat strong small { margin-left: 3px; color: var(--muted); font-size: 9px; }
.player-score { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 9px; }
.player-score[hidden] { display: none; }
.player-score span { display: flex; align-items: center; gap: 5px; }
.player-score strong { font-family: var(--sans); font-size: 12px; font-weight: 500; }
.player-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.player-two { background: var(--blue); }
.new-game { margin-top: 13px; padding: 10px 12px; border: 1px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer; font-size: 11px; transition: color .2s, background .2s; }
.new-game span { margin-right: 7px; color: var(--red); font-family: var(--sans); font-size: 15px; }
.new-game:hover { color: var(--white); background: var(--ink); }
.rail-footnote { margin: 9px 0 0; color: var(--muted); font-size: 9px; text-align: center; }
.board-wrap { min-width: 0; padding: 23px clamp(18px, 3vw, 42px) 22px; display: flex; flex-direction: column; }
.board-topline { min-height: 22px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.turn-label, .board-count { margin: 0; font-family: var(--sans); font-size: 9px; letter-spacing: .06em; }
.turn-label { color: var(--blue); }
.board-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.board { width: 100%; max-width: 840px; margin: auto; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.memory-card { aspect-ratio: 1 / 1; min-width: 0; padding: 0; position: relative; overflow: hidden; border: 1px solid #c8c5b9; color: var(--ink); background: var(--paper); cursor: pointer; transition: transform .22s ease, border-color .2s, background .2s, box-shadow .2s; transform-style: preserve-3d; }
.memory-card:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--red); box-shadow: 0 5px 14px rgba(34,43,37,.09); }
.memory-card:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #bd4d38; outline-offset: 3px; }
.card-back, .card-front { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; backface-visibility: hidden; transition: opacity .15s ease, transform .24s ease; }
.card-back { background: #e8ece5; }
.card-back::before, .card-back::after { content: ""; position: absolute; border: 1px solid rgba(49,95,98,.19); }
.card-back::before { inset: 7px; }
.card-back::after { width: 19px; height: 19px; border-color: rgba(189,77,56,.42); transform: rotate(45deg); }
.card-back-symbol { position: relative; z-index: 1; padding: 2px 5px; color: var(--blue); background: #e8ece5; font-size: clamp(22px, 3.1vw, 33px); }
.card-back-number { position: absolute; right: 11px; bottom: 9px; color: rgba(23,37,34,.46); font-family: var(--sans); font-size: 8px; }
.card-front { opacity: 0; transform: rotateY(90deg); background: #fffdf8; }
.memory-card.is-open .card-back, .memory-card.is-matched .card-back { opacity: 0; transform: rotateY(-90deg); }
.memory-card.is-open .card-front, .memory-card.is-matched .card-front { opacity: 1; transform: rotateY(0); }
.card-family { margin-bottom: 0; color: var(--muted); font-family: var(--sans); font-size: clamp(6px, .72vw, 8px); letter-spacing: .06em; }
.card-glyph { width: 52%; height: 57%; object-fit: contain; mix-blend-mode: multiply; }
.card-name { margin-top: -2px; font-size: clamp(10px, 1.15vw, 14px); line-height: 1; letter-spacing: .04em; white-space: nowrap; }
.memory-card.is-matched { border-color: #9ab4a0; background: var(--green-pale); cursor: default; }
.memory-card.is-matched .card-front { background: #e8f0e8; }
.memory-card.is-matched::after { content: "✓"; position: absolute; right: 8px; top: 4px; color: #548163; font-family: var(--sans); font-size: 11px; }
.board-caption { min-height: 28px; margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #75776d; }
.board-caption p { margin: 0; font-size: 10px; letter-spacing: .08em; }
.caption-mark { color: var(--red); font-size: 23px; line-height: 1; }
.caption-end { align-self: end; }
.result-message { margin-top: 10px; padding: 11px; border: 1px solid #b8c9bc; color: var(--blue); background: #eef4ef; text-align: center; font-size: 12px; }
.result-message[hidden] { display: none; }
.mobile-tip { display: none; color: var(--muted); font-family: var(--sans); font-size: 9px; }
.how-section { padding: 48px 5.6% 47px; display: grid; grid-template-columns: 210px 1fr; gap: 35px; border-bottom: 1px solid var(--line); }
.how-title-block .eyebrow { margin-bottom: 9px; }
.how-title-block h2 { font-size: 22px; }
.steps { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; list-style: none; }
.steps li { display: flex; gap: 11px; padding: 3px 12px 0 0; }
.step-num { color: var(--red); font-family: var(--sans); font-size: 9px; letter-spacing: .1em; }
.steps strong, .steps small { display: block; }
.steps strong { margin-bottom: 5px; font-size: 12px; font-weight: 600; }
.steps small { color: var(--muted); font-size: 9px; line-height: 1.8; }
.about-section { padding: 60px 5.6% 65px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 55px; }
.about-heading .eyebrow { margin-bottom: 12px; }
.about-heading h2 { font-size: 27px; line-height: 1.75; }
.about-copy { max-width: 660px; color: #424a44; font-size: 12px; line-height: 2.1; }
.about-copy p { margin-bottom: 13px; }
.about-copy strong { color: var(--ink); }
.sources { margin-top: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sources summary { padding: 13px 0; color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 600; }
.source-list { padding: 0 0 13px; font-size: 10px; line-height: 1.9; }
.source-list p { margin: 0 0 8px; }
.source-list ul { margin: 8px 0; padding-left: 18px; }
.source-list a { color: var(--blue); text-underline-offset: 3px; }
.source-small { color: var(--muted); font-size: 9px; }
.footer { min-height: 85px; padding: 18px clamp(22px, 7.3vw, 116px); display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #e9eee8; background: var(--ink); }
.footer-brand { font-size: 15px; font-weight: 600; letter-spacing: .06em; text-decoration: none; }
.footer-brand span { margin-left: 5px; color: #aeb8ae; font-size: 9px; font-weight: 400; }
.footer p { margin: 0; color: #b4bdb4; font-size: 9px; }
.footer-mark { color: #9ba99e; font-family: var(--sans); font-size: 9px; letter-spacing: .15em; }

@media (max-width: 820px) {
  main { padding-right: 26px; padding-left: 26px; }
  .intro { padding-right: 2%; padding-left: 2%; }
  .intro-aside { width: 205px; height: 155px; margin-right: 3%; }
  .game-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .game-rail { padding: 22px 16px; }
  .board-wrap { padding-right: 20px; padding-left: 20px; }
  .board { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
  .how-section, .about-section { padding-right: 2%; padding-left: 2%; }
  .how-section { grid-template-columns: 150px 1fr; gap: 20px; }
  .steps { gap: 8px; }
  .about-section { gap: 30px; }
}
@media (max-width: 620px) {
  .topbar { height: 64px; padding: 0 19px; }
  .top-link { font-size: 9px; }
  main { padding-right: 18px; padding-left: 18px; }
  .intro { min-height: 285px; padding: 36px 3% 31px; }
  .intro-aside { width: 110px; height: 115px; margin: 0 0 0 12px; outline-offset: 3px; }
  .aside-kicker { font-size: 6px; }
  .aside-char { font-size: 35px; }
  .aside-caption { max-width: 90px; font-size: 7px; text-align: center; }
  .intro::after { right: 3%; top: 10px; width: 140px; height: 140px; }
  .eyebrow { font-size: 8px; }
  .lead { font-size: 15px; }
  .intro-note { max-width: 245px; font-size: 10px; line-height: 1.7; }
  .section-heading { padding: 0 2%; }
  .section-heading h2 { font-size: 21px; }
  .game-shell { display: flex; flex-direction: column; }
  .game-rail { padding: 17px 15px 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-block { margin: 0; }
  .player-select-block { grid-column: 2; grid-row: 1; }
  .choice-list { grid-template-columns: 1fr; gap: 3px; }
  .choice-button { padding: 6px 7px; }
  .choice-main { font-size: 10px; }
  .choice-sub { font-size: 7px; }
  .player-select-block .rail-label { margin-bottom: 10px; }
  .score-card { grid-column: 1 / -1; margin-top: 0; padding: 10px 11px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); margin-top: 8px; }
  .stat-wide { grid-column: auto; padding-top: 0; border-top: 0; }
  .stat strong { font-size: 15px; }
  .stat-label { font-size: 7px; }
  .player-score { margin-top: 7px; padding-top: 7px; }
  .new-game { grid-column: 1 / -1; margin-top: -3px; padding: 8px; }
  .rail-footnote { display: none; }
  .board-wrap { padding: 16px 13px 12px; }
  .board-topline { margin-bottom: 11px; }
  .board { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .card-back::before { inset: 5px; }
  .card-glyph { width: 50%; height: 56%; }
  .card-name { font-size: clamp(10px, 3.5vw, 13px); }
  .card-family { font-size: 7px; }
  .card-back-number { right: 7px; bottom: 5px; font-size: 7px; }
  .board-caption p { font-size: 8px; }
  .mobile-tip { display: block; margin: 10px 2% 0; }
  .how-section { padding: 34px 2%; display: block; }
  .how-title-block { margin-bottom: 18px; }
  .steps { grid-template-columns: 1fr; gap: 13px; }
  .steps li { padding: 0; }
  .steps small { font-size: 9px; }
  .about-section { padding: 40px 2%; display: block; }
  .about-heading { margin-bottom: 18px; }
  .about-heading h2 { font-size: 23px; }
  .about-copy { font-size: 11px; }
  .footer { padding: 17px 19px; flex-wrap: wrap; }
  .footer p { order: 3; width: 100%; }
}
@media (max-width: 380px) {
  .intro-aside { display: none; }
  .intro-copy { max-width: 100%; }
  .game-rail { grid-template-columns: 1fr; }
  .player-select-block { grid-column: 1; grid-row: auto; }
  .player-select-block .segmented { max-width: 190px; }
  .card-glyph { width: 50%; height: 56%; }
  .card-name { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
