/*
  dopagamelab.com サイト本体の共通スタイル (docs/dopagamelab-site.md §12「黒と黄色のコンボ画面」)
  見本: docs/design/dopagamelab-b-yellow/ (index.html = トップ、article.html = 読む紙面)
  - トップ: body.home-page (黒の地)
  - それ以外: body.article-page (黒のヘッダー・フッター + 明るい読む紙面)
  - 黄 #ffd60a は黒の上でだけ文字色に使う。明るい紙面では面・線だけに使う
  アプリのページ (/irokuttsuki-cube/*・/kuiya/privacy) は assets/page.css のまま。このファイルは読み込まない
*/

:root {
  --paper: #151515;
  --read-paper: #fbf9f3;
  --ink: #f6f3ec;
  --muted: #c4c4c4;
  --dark: #0f0f0f;
  --line: #474747;
  --accent: #ffd60a;
  --secondary: #fff1a8;
  --focus: #ffffff;
  --highlight: #ffd60a;
  --link: #6e4e00;
  --chart-bg: #f3efe2;
  --map-one: #ffe680;
  --map-two: #ffd60a;
  --map-three: #f2b705;
  --map-four: #f6f3ec;
  --map-stroke: #141414;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.85; color: var(--ink); background: var(--paper); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
a:focus-visible { position: relative; z-index: 10; }
::selection { background: var(--accent); color: var(--dark); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-feature-settings: "palt"; overflow-wrap: anywhere; line-height: 1.35; }
button:disabled { cursor: default; }
a, button { touch-action: manipulation; }
.wrap, .header-inner { width: min(1180px, calc(100% - 40px)); margin: auto; }
.skip { position: fixed; left: 12px; top: -100px; z-index: 50; background: #ffffff; color: #0f0f0f; padding: 12px; font-weight: 700; }
.skip:focus { top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- header ---------- */
.site-header { position: relative; z-index: 5; border-bottom: 1px solid #555555; }
.header-inner { padding: 23px 0; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 900; line-height: 1.2; text-decoration: none; letter-spacing: -0.05em; }
.brand > svg { width: 38px; height: 38px; flex: none; color: #ffd60a; }
.brand small { display: block; font-size: 9px; letter-spacing: 0.12em; font-weight: 700; margin-top: 6px; }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-header nav a { font-size: 13px; text-decoration: none; font-weight: 700; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-header nav a[aria-current] { color: #ffd60a; border-color: currentColor; }
.site-header a:hover, .site-footer a:hover { text-decoration: underline; }

/* ---------- small parts ---------- */
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; line-height: 1.5; }
.eyebrow .dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: currentColor; margin-right: 8px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 18px; padding: 14px 24px; font-size: 15px; line-height: 1.6; font-weight: 900; text-decoration: none; border: 2px solid transparent; min-height: 54px; }
.button svg, .text-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.text-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 13px; }
.micro { font-size: 11px; line-height: 1.7; margin-top: 13px; }
a.button, button { transition: transform 0.18s, box-shadow 0.18s; }
a.button:hover, button:not(:disabled):hover { transform: translateY(-3px); }
a.button:active, button:not(:disabled):active { transform: translateY(2px); }

/* ---------- top: hero ---------- */
.hero { position: relative; isolation: isolate; background: #151515; overflow: clip; border-bottom: 1px solid #666666; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(120deg, transparent 0 100px, rgba(255, 255, 255, 0.045) 101px 102px, transparent 103px 160px); }
.hero-grid { display: grid; gap: 28px; position: relative; z-index: 1; padding: 45px 0 40px; }
.hero .eyebrow { color: #fff1a8; }
.hero h1 { font-size: clamp(38px, 12.3vw, 82px); font-weight: 900; font-style: italic; line-height: 1.2; letter-spacing: -0.075em; margin-top: 20px; }
.hero h1 em { font-style: normal; color: #ffd60a; display: inline-block; }
.hero-sub { font-weight: 800; font-size: 17px; line-height: 1.6; margin-top: 20px; color: #dedede; }
.hero-copy { font-size: 14px; line-height: 1.95; max-width: 36em; margin-top: 16px; color: #c8c8c8; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }
.hero .button, .game-content .button, .about-strip .button { background: #ffd60a; color: #1a1a1a; box-shadow: 5px 5px 0 #4d4d4d; }
.hero .text-link { color: #fff1a8; }
.hero .micro { color: #c4c4c4; }

/* ---------- top: combo demo ---------- */
.hero-art { position: relative; min-width: 0; align-self: center; }
.combo-frame { position: relative; border: 1px solid #8a8a8a; background: #262626; box-shadow: 12px 12px 0 #0a0a0a; }
.combo-frame::before, .combo-frame::after { content: ""; position: absolute; width: 30px; height: 5px; background: #ffd60a; left: -1px; top: -3px; }
.combo-frame::after { left: auto; top: auto; right: -1px; bottom: -3px; }
.combo-hud { display: flex; justify-content: space-between; gap: 8px; padding: 12px 18px; border-bottom: 1px solid #666666; font-size: 10px; letter-spacing: 0.08em; color: #c4c4c4; }
.combo-display { padding: 17px 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; line-height: 1; }
.combo-word { font-size: clamp(42px, 8vw, 65px); font-weight: 900; font-style: italic; color: #ffd60a; letter-spacing: -0.08em; }
.combo-count { font-size: 72px; font-weight: 900; letter-spacing: -0.09em; color: #f6f3ec; }
.map-stage { height: 200px; margin: 10px 20px 0; padding: 30px 10px; background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px); background-size: 22px 22px; border-bottom: 1px dashed #999999; }
.region-map { width: 100%; height: 100%; overflow: visible; }
.region-map path { stroke: var(--map-stroke); stroke-width: 2.8; stroke-linejoin: round; fill: var(--map-one); }
.part-1 path { fill: var(--map-two); }
.part-2 path { fill: var(--map-three); }
.part-3 path { fill: var(--map-four); }
.map-part { transform-box: fill-box; transform-origin: center; transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.45s; }
.part-0 { transform: translate(12px, 14px) rotate(8deg); }
.part-1 { transform: translate(0, -22px) rotate(-8deg); }
.part-2 { transform: translate(-24px, -4px) rotate(-7deg); }
.part-3 { transform: translate(-8px, 23px) rotate(8deg); }
.map-part.joined, .complete .map-part { transform: translate(0, 0) rotate(0); }
.reward { font-weight: 900; font-size: 30px; line-height: 1.15; letter-spacing: -0.05em; padding: 18px 20px; color: #fff1a8; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.reward small { display: block; font-size: 10px; line-height: 1.6; letter-spacing: 0.12em; margin: 0; }
.combo-meter { display: flex; gap: 4px; margin: 0 20px 16px; }
.combo-meter i { height: 5px; flex: 1; background: #5c5c5c; }
.combo-meter i.on { background: #ffd60a; }
.demo-button { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; border: 0; font-size: 14px; font-weight: 900; padding: 14px; line-height: 1.6; background: #ffd60a; color: #1a1a1a; }
.demo-button[hidden] { display: none; }
.demo-button:disabled { background: #fff1a8; }
.demo-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.demo-note { font-size: 11px; line-height: 1.7; text-align: center; margin-top: 14px; color: #c4c4c4; }
.particle { position: absolute; left: 50%; top: 50%; width: 9px; height: 14px; background: var(--accent); pointer-events: none; animation: burst 0.85s ease-out forwards; z-index: 8; }
.particle:nth-child(3n) { background: var(--secondary); }
.particle:nth-child(2n) { border-radius: 50%; }
@keyframes burst {
  from { transform: translate(-50%, -50%) rotate(0); opacity: 1; }
  to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; }
}
.pop-feedback { animation: pop 0.45s ease-out; }
@keyframes pop {
  0% { transform: scale(0.86); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ---------- top: ribbon and sections ---------- */
.ribbon { background: #fff1a8; color: #1a1a1a; border-bottom: 4px solid #ffd60a; }
.ribbon-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 11px; font-weight: 900; letter-spacing: 0.07em; }
.section { padding-top: 70px; padding-bottom: 16px; }
.section-head { display: flex; gap: 20px; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(28px, 5.5vw, 42px); font-weight: 900; font-style: italic; letter-spacing: -0.05em; margin-top: 8px; }
.section-no { font-size: 12px; letter-spacing: 0.12em; font-weight: 900; color: #ffd60a; }
.section-no::before { content: "// "; color: #999999; }
.section-intro { font-size: 14px; max-width: 36em; margin-top: 12px; color: var(--muted); }

.game-card { display: grid; min-width: 0; border: 1px solid #6a6a6a; background: #222222; }
.game-image { position: relative; min-width: 0; border-bottom: 1px solid #6a6a6a; }
.game-image > img { width: 100%; aspect-ratio: 800 / 420; object-fit: cover; filter: saturate(0.8); }
.game-label { position: absolute; top: 15px; left: 15px; font-size: 11px; font-weight: 800; line-height: 1.4; padding: 6px 12px; background: var(--accent); color: var(--dark); border-left: 4px solid #0f0f0f; }
.game-content { padding: 26px 24px; min-width: 0; }
.game-content .eyebrow { color: #fff1a8; }
.game-content h3 { font-size: 30px; letter-spacing: -0.06em; font-weight: 900; margin: 8px 0 18px; color: #ffd60a; }
.game-content > p { font-size: 14px; color: #d4d4d4; }
.game-content > p + p { margin-top: 10px; }
.game-actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 24px; }
.game-actions > a:not(.button) { font-size: 13px; font-weight: 700; }
.score-rule { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 24px 0 0; gap: 0; color: #cccccc; }
.score-rule > div { padding: 12px 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.score-rule > div + div { border-left: 1px solid var(--line); }
.score-rule dt { font-size: 10px; font-weight: 700; }
.score-rule dd { font-size: clamp(13px, 2vw, 19px); font-weight: 900; line-height: 1.5; margin: 5px 0 0; color: #f6f3ec; overflow-wrap: anywhere; }
.score-rule dd span { font-size: 10px; margin-left: 3px; }
.more-link { margin-top: 18px; font-size: 13px; }

.reading-grid { display: grid; gap: 18px; counter-reset: reading; }
.read-card { position: relative; display: grid; grid-template-columns: 1fr 56px; gap: 12px; padding: 24px; text-decoration: none; min-width: 0; counter-increment: reading; border-top: 1px solid #6e6e6e; background: #222222; }
.read-card:nth-child(2n) { background: #2a2a2a; }
.read-card:hover { background: #383838; }
.read-card::before { content: "0" counter(reading); position: absolute; font-weight: 900; font-size: 12px; right: 22px; top: 20px; color: #c4c4c4; }
.read-card .category { font-size: 10px; letter-spacing: 0.08em; font-weight: 800; display: block; margin-bottom: 12px; color: #c4c4c4; }
.read-card h3 { font-size: 18px; line-height: 1.6; letter-spacing: -0.02em; }
.read-card:hover h3 { text-decoration: underline; text-underline-offset: 6px; }
.read-card p { font-size: 12px; line-height: 1.9; margin-top: 10px; color: var(--muted); }
.read-card .pref-shape, .read-card .abstract-icon { width: 56px; height: 70px; align-self: end; color: #ffd60a; }
.abstract-icon { display: grid; place-items: center; }
.abstract-icon svg { width: 42px; height: 42px; stroke: currentColor; fill: none; stroke-width: 2; }
.read-card .read-more { font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; }
.read-more svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

.about-strip { padding: 42px 28px; margin: 64px 0; display: grid; gap: 24px; border: 1px solid #bdbdbd; border-left: 6px solid #ffd60a; background: #222222; }
.about-strip h2 { font-size: 26px; letter-spacing: -0.04em; color: #ffd60a; }
.about-strip p { font-size: 14px; max-width: 44em; margin-top: 12px; color: #c8c8c8; }
.about-strip a:not(.button) { color: #fff1a8; }
.about-strip .button { align-self: center; justify-self: start; }

/* ---------- footer ---------- */
.site-footer { padding: 40px 0 28px; border-top: 1px solid #666666; background: #121212; color: #f6f3ec; }
.site-footer .brand > svg { color: #fff1a8; }
.site-footer nav { margin-top: 28px; gap: 10px 22px; }
.site-footer nav a { font-size: 12px; text-decoration: none; }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 24px; margin-top: 30px; font-size: 11px; letter-spacing: 0.02em; color: #b3b3b3; }

/* ---------- reading paper (all pages except the top) ---------- */
.article-page { --ink: #1b1b1b; --muted: #5c5a55; --line: #d9d4c6; --highlight: #7a5600; --focus: #a87b00; background: var(--read-paper); color: var(--ink); }
.article-page .site-header { color: #f6f3ec; background: #151515; border: 0; }
.reading-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; transform: scaleX(0); transform-origin: left; background: var(--highlight); z-index: 40; }
.article-masthead { padding: 26px 0; background: #e9e7e3; border-top: 5px solid #ffd60a; border-bottom: 1px solid #c1bdb1; }
.article-masthead .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.article-masthead span { font-size: 11px; font-weight: 900; letter-spacing: 0.14em; color: #474747; }
.article-masthead b { font-size: 13px; }
.article-layout { display: grid; gap: 36px; max-width: 1080px; margin: 0 auto; padding: 40px 20px 60px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.article-layout article { min-width: 0; width: 100%; max-width: 720px; margin: 0 auto; font-size: 16px; line-height: 2.05; overflow-wrap: anywhere; counter-reset: chapter; }
.article-layout h1 { font-size: clamp(28px, 6vw, 42px); line-height: 1.5; letter-spacing: -0.06em; font-weight: 900; margin-bottom: 16px; }
.crumbs { font-size: 12px; color: var(--muted); margin: 0 0 20px !important; }
.byline { font-size: 12px; line-height: 1.9; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 28px; margin-bottom: 30px !important; }
.article-layout article p { margin: 0 0 1.4em; }
.article-layout article h2 { font-size: 23px; line-height: 1.6; letter-spacing: -0.025em; margin: 2.4em 0 0.9em; scroll-margin-top: 24px; padding: 17px 0 0; border-top: 1px solid #bbb6a8; }
.article-layout article > h2 { counter-increment: chapter; }
.article-layout article > h2::before { content: counter(chapter, decimal-leading-zero); display: inline-block; font-size: 11px; letter-spacing: 0.1em; background: #2a2a2a; color: #ffd60a; padding: 2px 8px; margin-right: 12px; vertical-align: 3px; }
.no-count .article-layout article > h2::before { content: none; }
.no-count .article-layout article > h2 { border-top: 0; padding: 0 0 0 16px; border-left: 4px solid var(--highlight); }
.article-layout article h3 { font-size: 18px; font-weight: 800; line-height: 1.6; margin: 1.8em 0 0.6em; }
.article-layout strong { font-weight: 800; text-decoration: underline; text-decoration-color: var(--highlight); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.article-layout article a { color: var(--link); text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.article-layout ul, .article-layout ol { padding-left: 1.5em; margin: 1.2em 0 1.5em; }
.article-layout li { margin: 0.55em 0; }
.article-layout dl { margin: 0 0 1.4em; }
.article-layout dt { font-weight: 800; margin-top: 18px; }
.article-layout dd { margin: 0; padding-left: 0; }
.article-layout code, .article-layout kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.88em; padding: 0 5px; background: #efebdf; border: 1px solid var(--line); }
.article-layout .date { margin-top: 32px; font-size: 13px; color: var(--muted); }
.article-page .site-footer .footer-meta { color: #bdbdbd; }

/* buttons on the paper */
.article-page .button, .article-page .play { background: #2a2a2a; color: #f6f3ec; box-shadow: 4px 4px 0 #c5c1b6; }
.article-layout article a.play, .article-layout article a.button { color: #f6f3ec; text-decoration: none; }
.play { display: inline-flex; justify-content: center; align-items: center; padding: 12px 22px; min-height: 48px; font-size: 15px; font-weight: 900; line-height: 1.6; text-decoration: none; transition: transform 0.18s, box-shadow 0.18s; }
.play:hover { transform: translateY(-3px); }
.play:active { transform: translateY(2px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 16px 0 1.4em !important; font-size: 14px; }

/* game sub pages menu */
.article-layout .subnav { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 4px 0 28px; font-size: 14px; line-height: 1.5; }
.article-layout .subnav li { margin: 0; }
.article-layout .subnav a { display: inline-block; padding: 7px 14px; border: 1px solid #1b1b1b; color: #1b1b1b; text-decoration: none; font-weight: 700; }
.article-layout .subnav a:hover { background: #efebdf; }
.article-layout .subnav a[aria-current] { background: #1b1b1b; color: #ffd60a; }

.cover { display: block; width: 100%; height: auto; margin: 8px 0 20px; border: 1px solid var(--line); }
.shots { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 12px; }
.shots figure { margin: 0; flex: 1 1 140px; max-width: 220px; }
.shots img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.shots figcaption { font-size: 12px; line-height: 1.8; color: var(--muted); margin-top: 6px; }
.article-layout .note { padding: 14px 18px; background: #ffffff; border: 1px solid var(--line); border-left: 4px solid var(--highlight); font-size: 14px; line-height: 1.9; margin: 16px 0 1.4em; }

.table-wrap { overflow-x: auto; margin: 12px 0 1.4em; }
.data { border-collapse: collapse; font-size: 14px; line-height: 1.7; width: 100%; background: #ffffff; }
.data th, .data td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.data thead th { background: #1b1b1b; color: #f6f3ec; font-weight: 800; white-space: nowrap; border-bottom: 3px solid #ffd60a; }
.data td.num { text-align: right; white-space: nowrap; }

.article-layout .timeline { list-style: none; padding: 0; margin: 12px 0 1.4em; }
.article-layout .timeline > li { position: relative; margin: 0; padding: 4px 0 18px 22px; border-left: 2px solid #1b1b1b; }
.article-layout .timeline > li::before { content: ""; position: absolute; left: -7px; top: 10px; width: 10px; height: 10px; background: #ffd60a; border: 1px solid #1b1b1b; }
.article-layout .timeline time { display: block; font-weight: 900; font-size: 15px; letter-spacing: -0.01em; }
.article-layout .timeline ul { margin: 4px 0 0; }

.article-layout .cards { list-style: none; padding: 0; margin: 12px 0 1.4em; display: grid; gap: 12px; }
.article-layout .cards li { margin: 0; padding: 16px 18px; background: #ffffff; border: 1px solid var(--line); border-top: 3px solid #1b1b1b; }
.article-layout .cards h3 { margin: 0 0 6px; font-size: 17px; }
.article-layout .cards p { font-size: 14px; line-height: 1.9; margin: 0; color: var(--muted); }

.article-layout .works { list-style: none; padding: 0; margin: 16px 0 1.4em; display: grid; gap: 16px; }
.article-layout .work { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 16px; background: #ffffff; border: 1px solid var(--line); border-top: 3px solid #1b1b1b; }
.article-layout .work img { width: 96px; height: 160px; object-fit: cover; object-position: top; border: 1px solid var(--line); }
.article-layout .work h3 { margin: 0 0 6px; font-size: 19px; }
.article-layout .work p { font-size: 14px; line-height: 1.9; margin: 0 0 8px; }

/* figures: drawn for the light paper. They fit the column width, no scrolling */
.fig { margin: 32px 0; padding: 16px 6px 12px; background: var(--chart-bg); border: 1px solid var(--line); }
.fig svg, .fig img { display: block; width: 100%; height: auto; max-width: 520px; margin: 0 auto; font-family: var(--font); }
.fig.narrow svg, .fig.narrow img { max-width: 320px; }
.fig figcaption { font-size: 12px; line-height: 1.9; color: var(--muted); padding: 14px 10px 2px; }

.sources { margin-top: 52px; padding: 4px 22px 16px; background: var(--chart-bg); font-size: 13px; line-height: 1.95; border-top: 2px solid var(--highlight); }
.article-layout .sources h2 { font-size: 18px; border: 0; margin: 16px 0 12px; padding: 0; }
.article-layout .sources h2::before { content: none; }
.sources li { margin: 1em 0; }

/* article aside: table of contents (built by site.js) and the game card */
.article-aside { min-width: 0; }
.toc { border: 1px solid var(--line); border-top: 3px solid #3d3d3d; padding: 20px; background: var(--read-paper); }
.toc summary { font-weight: 800; cursor: pointer; font-size: 14px; }
.toc ol { padding-left: 20px; margin: 16px 0 0; }
.toc li { font-size: 12px; line-height: 1.8; margin: 8px 0; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.aside-game { display: none; margin-top: 24px; padding: 20px; border: 1px solid var(--line); }
.aside-game img { width: 100%; max-height: 260px; object-fit: contain; margin: 16px auto; }
.aside-game p { font-size: 12px; line-height: 1.8; margin-top: 12px; }
.aside-game .button { font-size: 12px; padding: 10px; width: 100%; margin-top: 18px; }
.article-end { max-width: 720px; margin: 0 auto 60px; padding: 30px 20px; border-top: 2px solid var(--highlight); background: #eceae6; }
.article-end h2 { font-size: 22px; margin: 6px 0 12px; }
.article-end p { font-size: 14px; margin-bottom: 20px; }
.article-end .actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.article-end .text-link { color: var(--link); }

/* ---------- wider screens ---------- */
@media (min-width: 680px) {
  .reading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { padding-top: 60px; padding-bottom: 60px; }
  .game-content { padding: 32px; }
  .about-strip { grid-template-columns: 1fr auto; }
  .about-strip .button { justify-self: end; }
  .article-layout { padding-top: 60px; }
  .article-layout article { font-size: 17px; }
  .article-layout article h2 { font-size: 25px; }
  .fig { padding: 22px 22px 14px; }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
  .combo-frame { transform: rotate(-2deg); margin: 0 8px; }
  .game-card { grid-template-columns: 1fr 1.05fr; }
  .game-image { border: 0; border-right: 1px solid #6a6a6a; }
  .game-image > img { height: 100%; object-fit: cover; }
  .game-content { padding: 35px; }
  .reading-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
  .section { padding-top: 90px; }
  .has-aside .article-layout { grid-template-columns: minmax(0, 720px) 240px; gap: 60px; }
  .article-aside { position: sticky; top: 30px; }
  .aside-game { display: block; }
}
@media (max-width: 479px) {
  /* tables fit the phone width instead of scrolling sideways */
  .data { font-size: 12.5px; }
  .data th, .data td { padding: 6px 5px; }
  .data thead th, .data td.num { white-space: normal; }
}
@media (max-width: 359px) {
  .wrap, .header-inner { width: calc(100% - 32px); }
  .site-header nav { gap: 4px 14px; }
  .site-header nav a { font-size: 12px; }
  .hero-copy { font-size: 13px; }
  .button { padding: 12px 18px; }
  .game-content { padding: 22px 18px; }
  .score-rule > div { padding-left: 4px; padding-right: 4px; }
  .read-card { padding: 20px; grid-template-columns: 1fr 40px; }
  .read-card .pref-shape, .read-card .abstract-icon { width: 40px; }
  .combo-display { padding-left: 14px; padding-right: 14px; gap: 10px; }
  .map-stage { margin-left: 14px; margin-right: 14px; }
  .article-layout { padding-left: 16px; padding-right: 16px; }
  .article-layout h1 { font-size: 28px; }
  .fig { padding-left: 4px; padding-right: 4px; }
  .sources { padding-left: 16px; padding-right: 16px; }
  .article-layout .work { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .article-layout .work img { width: 72px; height: 120px; }
}

/* ---------- reduced motion: stop every animation ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .particle { display: none; }
  a.button:hover, button:not(:disabled):hover, .play:hover, a.button:active, button:not(:disabled):active, .play:active { transform: none; }
}
