/* Playroom is intentionally self-contained; no Gate styles or scripts. */
:root {
  color-scheme: light;
  --paper: #f3f0e8;
  --ink: #292b26;
  --muted: #66665c;
  --rule: #ceccc0;
  --red: #ad432e;
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--red); outline-offset: 6px; }
::selection { background: #e4baa8; color: var(--ink); }
.site-shell { width: min(1200px, calc(100% - 112px)); margin: 0 auto; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 12px 20px; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 82px; padding: 16px 0; border-bottom: 2px solid var(--ink); }
main { padding: 32px 0 56px; }
.wordmark { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: -0.04em; }
.wordmark > span:first-child { font-size: 25px; }
.wordmark-note { padding-left: 15px; margin-left: 3px; border-left: 1px solid var(--rule); font-family: var(--sans); font-size: 11px; font-weight: 400; letter-spacing: 0.12em; }
.edition { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--muted); }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0; font-size: 11px; color: var(--muted); }
.breadcrumbs a { text-decoration: none; padding: 6px 0; }
.breadcrumbs a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 5px; }
.breadcrumbs [aria-current] { color: var(--ink); }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 8px 0 36px; }
.eyebrow { margin: 0 0 16px; font: 10px/1.6 var(--mono); letter-spacing: 0.12em; color: var(--red); }
h1 { margin: 0; font-family: var(--serif); font-size: clamp(36px, 4.8vw, 66px); font-weight: 600; line-height: 1.25; letter-spacing: -0.055em; }
.title-period { color: var(--red); }
.intro-note { flex-shrink: 0; margin: 0 0 2px; font: 18px/1.8 var(--serif); }
.intro-note > span { display: block; margin-top: 12px; color: var(--muted); font: 11px/1.7 var(--sans); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 0; border-top: 1px solid var(--ink); }
.section-heading h1, .section-heading h2 { margin: 0; font-family: var(--sans); font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: 0.13em; }
.section-heading > span { color: var(--muted); font-size: 10px; }
.game-grid { display: grid; gap: 32px; }
.game-entry { display: grid; grid-template-columns: 1.12fr 1fr; text-decoration: none; border: 1px solid var(--rule); background: #faf8f1; }
.game-art { position: relative; min-width: 0; min-height: 360px; display: flex; flex-direction: column; overflow: hidden; }
.house-art { justify-content: center; padding: 27px 34px; color: #e6e7d7; background: #323e37; border-right: 1px solid var(--ink); }
/* Fine print marks and ruled paper replace the portal's glow and gradients. */
.house-art::after { content: ""; position: absolute; inset: 10px; border: 1px solid #e6e7d726; pointer-events: none; }
.cover-meta, .cover-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; font: 9px/1.6 var(--mono); letter-spacing: 0.08em; }
.cover-meta { opacity: 0.75; }
.cover-title { margin-top: 0; text-align: center; font: 42px/1.2 var(--serif); letter-spacing: 0.2em; text-indent: 0.2em; }
.cover-title > span { display: block; margin-top: 10px; font: 8px/1.6 var(--mono); letter-spacing: 0.22em; }
.house-plan { display: block; width: 100%; height: 202px; margin: 6px 0; }
.plan-guides { opacity: 0.35; stroke-width: 0.7; }
.plan-furniture { opacity: 0.45; stroke-width: 1; }
.plan-door { stroke: #e5b291; }
.house-outline { stroke-dasharray: 1500; animation: house-draw 8s ease-in-out infinite; }
.house-scan { stroke: #e5b291; stroke-width: 1; stroke-dasharray: 3 5; animation: house-scan 8s ease-in-out infinite; }
.cover-bottom { margin-top: auto; }
.cover-bottom > span:first-child { font-family: var(--sans); font-size: 10px; line-height: 1.8; }
.cover-stamp { padding: 6px 8px; border: 1px solid #e5b291; color: #e5b291; transform: rotate(-8deg); font: 12px/1.2 var(--serif); }
.entry-copy { display: flex; flex-direction: column; min-width: 0; padding: 32px 40px; }
.entry-summary { display: block; margin: auto 0; }
.entry-number { display: flex; align-items: baseline; gap: 12px; color: var(--red); font: 24px/1 var(--serif); }
.entry-number > span { font: 8px/1.5 var(--mono); letter-spacing: 0.09em; color: var(--muted); }
.entry-category { display: flex; align-items: center; gap: 12px; margin-top: 48px; font-size: 10px; color: var(--muted); letter-spacing: 0.08em; }
.entry-title { display: block; margin-top: 0; font: 600 clamp(24px, 2.4vw, 32px)/1.5 var(--serif); letter-spacing: -0.05em; }
.entry-description { display: block; margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 2; }
.entry-details { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 16px 0 0; font-size: 10px; color: var(--muted); }
.entry-details > span + span { border-left: 1px solid var(--rule); padding-left: 20px; }
.entry-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 12px; font-weight: 600; }
.action-arrow { display: grid; place-items: center; flex-shrink: 0; margin-left: auto; width: 36px; height: 36px; border: 1px solid var(--ink); border-radius: 50%; font-size: 22px; font-weight: 400; transition: background-color 180ms ease, color 180ms ease, transform 180ms ease; }
.game-entry:hover .action-arrow, .game-entry:focus-visible .action-arrow { background: var(--red); color: var(--paper); border-color: var(--red); transform: rotate(45deg); }
.game-entry:hover .entry-title, .game-entry:focus-visible .entry-title { color: var(--red); }
.afterword { display: flex; align-items: center; gap: 20px; padding: 32px 0 38px; }
.afterword-mark { color: var(--red); font-size: 38px; line-height: 1; }
.afterword p { margin: 0; font: 15px/1.7 var(--serif); }
.afterword p > span { color: var(--muted); font: 11px/1.8 var(--sans); }
.afterword-label { margin-left: auto; font: 9px/1.6 var(--mono); color: var(--muted); letter-spacing: 0.12em; }
.colophon { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0 30px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 10px; }
.colophon > span:last-child { font: 9px/1.6 var(--mono); letter-spacing: 0.08em; }

.chapter-intro h1 { font-size: clamp(30px, 3.6vw, 48px); }
.chapter-art { align-items: center; padding: 27px 34px; background: #633c33; color: #f0dfca; }
.chapter-art .cover-meta, .chapter-art .cover-bottom { align-self: stretch; }
.door-frame { position: relative; width: 104px; height: 164px; margin: 22px 0 18px; border: 1px solid #d0b198; border-bottom: 0; background: #30251f; perspective: 350px; }
.door-leaf { position: absolute; inset: 3px 3px 0; border: 1px solid #c3a189; background: #794b3e; transform-origin: left; transform: rotateY(-24deg); transition: transform 550ms ease; }
.door-leaf::before { content: ""; position: absolute; inset: 10px; border: 1px solid #b98f744d; }
.door-handle { position: absolute; top: 56%; right: 10px; width: 4px; height: 9px; background: #ead6b4; }
.door-light { position: absolute; left: -20px; right: -20px; top: 100%; height: 18px; background: #e3bd8b; opacity: 0.25; clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%); }
.game-entry:hover .door-leaf, .game-entry:focus-visible .door-leaf { transform: rotateY(-48deg); }
.chapter-saitama { --red: #3e6377; }
.chapter-saitama .chapter-art { background: #304b5b; color: #e1e9e8; }
.chapter-saitama .door-frame { border-color: #a5bec8; background: #1c2d38; }
.chapter-saitama .door-leaf { border-color: #93afbd; background: #466779; }
.chapter-saitama .door-leaf::before { border-color: #a5bec84d; }
.chapter-saitama .door-handle { background: #d9e6e8; }
.chapter-saitama .door-light { background: #b6d4de; }
.chapter-saitama .chapter-intro h1 { color: var(--red); }
.chapter-hometown { --red: #806200; }
.chapter-hometown .chapter-art { background: #806719; color: #fff0bf; }
.chapter-hometown .door-frame { border-color: #d4ba66; background: #382f15; }
.chapter-hometown .door-leaf { border-color: #d4ba66; background: #a18328; }
.chapter-hometown .door-leaf::before { border-color: #d4ba664d; }
.chapter-hometown .door-handle { background: #fff0bf; }
.chapter-hometown .door-light { background: #ebcf75; }
.chapter-hometown .chapter-intro h1 { color: var(--red); }
.chapter-cover-title { font: 42px/1.3 var(--serif); letter-spacing: 0.22em; text-indent: 0.22em; text-align: center; }
.chapter-cover-title > span { display: block; margin: 8px 0 0; font-size: 10px; letter-spacing: 0.25em; }
.availability-dot { width: 5px; height: 5px; background: #55704c; border-radius: 50%; }
.reading-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 30px 0 38px; }
.note-label { color: var(--red); font: 10px/1.7 var(--mono); }
.reading-notes p { max-width: 440px; margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.9; }

@keyframes house-draw {
  0%, 100% { stroke-dashoffset: 0; opacity: 1; }
  50% { stroke-dashoffset: 100; opacity: 0.65; }
}
@keyframes house-scan {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(6px); opacity: 1; }
}


@media (max-width: 1000px) {
  .site-shell { width: calc(100% - 64px); }
  .intro { gap: 24px; }
  .intro-note { font-size: 15px; }
  .entry-copy { padding: 28px; }
  .house-art, .chapter-art { padding: 24px; }
  .entry-category { margin-top: 36px; }
}
@media (max-width: 760px) {
  .site-shell { width: calc(100% - 40px); }
  .masthead { min-height: 72px; }
  main { padding: 24px 0 40px; }
  .breadcrumbs { gap: 8px; }
  .wordmark-note { display: none; }
  .edition { font-size: 8px; letter-spacing: 0; }
  .intro { display: block; padding: 4px 0 28px; }
  .eyebrow { font-size: 8px; margin-bottom: 18px; }
  h1 { font-size: clamp(34px, 7vw, 52px); }
  .intro-note { margin-top: 14px; font-size: 16px; }
  .intro-note br { display: none; }
  .intro-note > span { margin-top: 4px; }
  .game-entry { grid-template-columns: 1fr; }
  .game-art { min-height: 320px; }
  .house-art { border-right: 0; }
  .house-plan { max-width: 440px; align-self: center; }
  .entry-copy { padding: 26px; }
  .entry-category { margin-top: 28px; }
  .entry-title { font-size: 27px; }
  .entry-description { margin-top: 12px; }
  .entry-details { gap: 8px 12px; margin: 14px 0 0; }
  .entry-details > span + span { padding-left: 12px; }
  .entry-action { margin-top: 24px; padding-top: 16px; }
  .afterword-label { display: none; }
  .reading-notes { grid-template-columns: 1fr; gap: 22px; }
  .chapter-intro h1 { font-size: clamp(27px, 5.8vw, 42px); }
}
@media (max-width: 360px) {
  .site-shell { width: calc(100% - 32px); }
  .wordmark { font-size: 15px; gap: 8px; }
  .edition { max-width: 85px; text-align: right; line-height: 1.7; }
  .game-art { padding: 24px 20px; }
  .entry-copy { padding: 24px 20px; }
  .entry-title { font-size: 24px; }
  .colophon > span:last-child { font-size: 8px; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .house-scan { display: none; }
}
