:root {
  color-scheme: light;
  --paper: #f0ece2;
  --ink: #393d34;
  --muted: #74776b;
  --line: #d3d1c3;
  --olive: #52634d;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif; }
body { margin: 0; min-height: 100svh; background: radial-gradient(ellipse at 78% 22%, #faf7ef, transparent 65%), var(--paper); }
.site-header, main, footer { width: min(1180px, calc(100% - 96px)); margin: auto; }
.site-header { height: 90px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--ink); text-decoration: none; font-family: "Yu Mincho", serif; font-size: 25px; letter-spacing: .16em; }
.wordmark span { font-size: 11px; letter-spacing: .08em; border-left: 1px solid var(--line); margin-left: 17px; padding-left: 17px; }
.studio { font-family: Georgia, serif; font-size: 13px; letter-spacing: .12em; color: var(--muted); }
#game-frame { position: relative; }
#unity-canvas { position: absolute; inset: 0; visibility: hidden; display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
#welcome { position: relative; display: grid; grid-template-columns: .95fr 1.15fr; align-items: center; gap: clamp(32px, 5vw, 72px); padding: 70px 0 64px; }
.welcome-copy { max-width: 440px; }
.eyebrow { display: flex; align-items: center; gap: 13px; margin: 0 0 23px; font-size: 10px; letter-spacing: .18em; color: var(--olive); }
.edition { padding: 6px 10px; border: 1px solid #a7b29b; border-radius: 3px; font-size: 12px; letter-spacing: .12em; }
h1 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(26px, 2.85vw, 37px); line-height: 1.65; letter-spacing: .035em; font-weight: 500; }
h1 span { display: block; white-space: nowrap; }
.introduction { margin: 22px 0 24px; font-size: 14px; line-height: 2; letter-spacing: .05em; color: #626758; }
.play-features { font-size: 11px; color: var(--muted); margin: 0 0 13px; letter-spacing: .04em; }
.play-features span { padding: 0 7px; }
button { font: inherit; cursor: pointer; touch-action: manipulation; transition: background .2s, transform .2s; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #a4843f; outline-offset: 5px; }
#start { display: flex; align-items: center; gap: 13px; width: 100%; max-width: 360px; min-height: 62px; border: 1px solid var(--olive); border-radius: 4px; padding: 17px 22px; color: #fffdf4; background: var(--olive); font-size: 18px; letter-spacing: .1em; box-shadow: 0 4px 0 #35442f15; }
#start:hover { background: #40563b; transform: translateY(-1px); }
#start svg { flex: 0 0 23px; width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.button-arrow { margin-left: auto; }
.entry-hint { font-size: 11px; line-height: 1.8; margin: 13px 0 0; color: #646b59; }
.download-note { font-size: 10px; line-height: 1.9; margin: 7px 0 0; color: var(--muted); max-width: 365px; }
.journey-postcard { position: relative; margin: 0; padding: 13px 13px 0; background: #fffdf6; transform: rotate(2deg); box-shadow: 0 15px 35px #45482a13, 0 2px 3px #45482a12; border: 1px solid #e7e2d4; }
.journey-postcard::before { content: ""; position: absolute; left: 40%; top: -13px; width: 25%; height: 27px; z-index: 1; transform: rotate(-5deg); background: #c8c3a566; border-left: 1px dashed #b9b39566; border-right: 1px dashed #b9b39566; }
.postcard-picture { overflow: hidden; aspect-ratio: 16 / 9; background: #e5d6ba; }
.cover { display: block; width: 100%; height: 100%; object-fit: cover; }
figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 64px; padding: 12px 7px; font-family: "Yu Mincho", serif; font-size: 14px; letter-spacing: .08em; }
.postcard-number { font-size: 9px; color: #89897a; letter-spacing: .07em; white-space: nowrap; }
#loading { max-width: 360px; min-height: 62px; padding: 9px 0; }
#load-label { font-size: 13px; line-height: 1.8; margin: 0 0 12px; color: var(--olive); }
progress { appearance: none; width: calc(100% - 48px); height: 6px; border: 0; background: #d8d5c7; border-radius: 3px; vertical-align: middle; }
progress::-webkit-progress-bar { background: #d8d5c7; border-radius: 3px; }
progress::-webkit-progress-value { background: #76866a; border-radius: 3px; }
progress::-moz-progress-bar { background: #76866a; border-radius: 3px; }
#load-percent { display: inline-block; width: 45px; padding-left: 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
#load-error { font-size: 12px; line-height: 1.8; color: #8b4032; overflow-wrap: anywhere; }
.text-button { border: 0; background: transparent; color: var(--ink); text-decoration: underline; font-size: 13px; }
.toolbar { display: none; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.toolbar p { margin: 0; }
.separator { padding: 0 10px; color: #aaa99c; }
#fullscreen { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 7px 13px; border-radius: 3px; font-size: 12px; }
#fullscreen:hover { background: #e0dfd1; }
.guide { border-top: 1px solid var(--line); font-size: 12px; line-height: 1.9; }
.guide summary { cursor: pointer; padding: 18px 0; list-style-position: inside; color: #646b59; }
.guide-body { max-width: 850px; padding: 0 0 12px; }
.guide-body p { margin: 0 0 12px; }
footer { margin-top: 12px; padding: 20px 0 25px; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); font-size: 10px; line-height: 1.9; color: #838575; }
.orientation-note { display: none; font-size: 12px; color: var(--muted); }
[hidden] { display: none !important; }
body.playing .site-header { border: 0; height: 70px; }
body.playing .site-header, body.playing main, body.playing footer { width: min(1450px, calc(100% - 64px), calc((100svh - 150px)*16/9)); }
body.playing #game-frame { aspect-ratio: 16 / 9; background: #eee8dc; overflow: hidden; border-radius: 3px; }
body.playing #unity-canvas { position: relative; visibility: visible; }
body.playing .toolbar { display: flex; }
body.playing .guide { margin-top: 20px; }
#game-frame:fullscreen { border-radius: 0; width: 100vw; height: 100vh; aspect-ratio: auto; background: #eee8dc; }
@media (max-width: 760px) {
  .site-header, main, footer { width: calc(100% - 40px); }
  .site-header { height: 65px; }
  .wordmark { font-size: 22px; }
  #welcome { grid-template-columns: 1fr; padding: 34px 0 30px; gap: 36px; }
  .welcome-copy { max-width: 100%; }
  h1 { font-size: clamp(25px, 6vw, 35px); }
  .eyebrow { margin-bottom: 17px; }
  .introduction { font-size: 13px; margin: 16px 0 20px; }
  #start { max-width: none; min-height: 56px; font-size: 17px; }
  #loading { max-width: none; }
  .journey-postcard { margin: 0 7px; padding: 9px 9px 0; }
  figcaption { min-height: 55px; font-size: 13px; }
  footer { flex-direction: column; gap: 4px; }
  body.playing .site-header, body.playing main, body.playing footer { width: calc(100% - 24px); }
  body.playing .site-header { height: 52px; }
  body.playing .orientation-note { display: block; }
}
@media (orientation: landscape) and (max-height: 550px) {
  body:not(.playing) .site-header { height: 50px; }
  body:not(.playing) #welcome { grid-template-columns: 1fr 1.05fr; padding: 26px 0 30px; gap: 35px; }
  body:not(.playing) .eyebrow { margin-bottom: 10px; }
  body:not(.playing) .edition { font-size: 10px; padding: 4px 7px; }
  body:not(.playing) h1 { font-size: clamp(21px, 3vw, 29px); line-height: 1.5; }
  body:not(.playing) .introduction { margin: 12px 0; font-size: 12px; line-height: 1.8; }
  body:not(.playing) #start { min-height: 46px; padding: 10px 15px; font-size: 15px; }
  body:not(.playing) .play-features { font-size: 10px; margin-bottom: 9px; }
  body:not(.playing) .entry-hint { margin-top: 10px; }
  body.playing .site-header, body.playing footer, body.playing .guide, body.playing .toolbar p { display: none; }
  body.playing main { width: 100%; }
  body.playing #game-frame { width: 100vw; height: 100svh; aspect-ratio: auto; border-radius: 0; }
  body.playing .toolbar { position: fixed; right: max(8px, env(safe-area-inset-right)); top: 8px; margin: 0; z-index: 5; }
  body.playing #fullscreen { background: #f4efe3c9; font-size: 10px; padding: 5px 8px; }
  body.playing .orientation-note { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
