/* 大阪古事記 — cinematic travel journal. Local fonts, no network dependencies. */
:root {
  --ink:#122b2b; --ink-deep:#0b2020; --paper:#f4f0e5; --paper-light:#fffcf4;
  --brass:#c7aa71; --rust:#ba674a; --line:rgba(18,43,43,.18); --white:#fffdf7;
  --muted:#63706a; --topbar:76px; --radius:5px;
  --serif:"Yu Mincho","Hiragino Mincho ProN","Hiragino Mincho Pro", "Noto Serif CJK JP",serif;
  --sans:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;
  --shadow:0 18px 70px rgba(0,0,0,.22);
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; background:var(--paper); }
body { margin:0; color:var(--ink); font-family:var(--sans); font-size:16px; line-height:1.8; -webkit-font-smoothing:antialiased; overflow-x:hidden; }
button,input,textarea,select { font:inherit; }
button,a,input,textarea,select { -webkit-tap-highlight-color:transparent; }
button { color:inherit; cursor:pointer; }
button:disabled { cursor:not-allowed; }
a { color:inherit; text-underline-offset:4px; }
img,video { display:block; max-width:100%; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--brass); outline-offset:5px; }
button:disabled,.button:disabled { opacity:.4; }
h1,h2,h3,p { margin-top:0; }
h1,h2,h3 { line-height:1.45; }
[hidden] { display:none!important; }
#app { padding-top:var(--topbar); min-height:100svh; }
.topbar { position:fixed; inset:0 0 auto; height:var(--topbar); padding:0 clamp(20px,4.2vw,72px); display:flex; align-items:center; justify-content:space-between; gap:28px; background:var(--paper); border-bottom:1px solid var(--line); z-index:100; }
.brand { display:flex; align-items:center; gap:12px; text-decoration:none; flex-shrink:0; }
.brand-mark { width:38px; height:38px; border:1px solid var(--rust); border-radius:50%; display:grid; place-items:center; font-family:var(--serif); font-size:20px; color:var(--rust); line-height:1; }
.brand-name { display:block; font-family:var(--serif); font-weight:700; font-size:23px; letter-spacing:.14em; line-height:1.25; }
.brand-sub { display:block; font-size:9px; letter-spacing:.23em; line-height:1.7; color:var(--muted); }
.topnav { display:flex; align-items:center; gap:clamp(4px,1.3vw,22px); }
.nav-button { position:relative; padding:12px 8px; min-height:44px; border:0; background:none; font-size:13px; white-space:nowrap; color:#4a5952; }
.nav-button::after { content:""; position:absolute; bottom:4px; left:8px; right:8px; height:2px; background:var(--rust); transform:scaleX(0); transition:transform .22s ease; }
.nav-button:hover,.nav-button.active { color:var(--ink); }
.nav-button.active::after,.nav-button:hover::after { transform:scaleX(1); }
.menu-toggle { display:none; border:1px solid var(--line); border-radius:50%; background:transparent; min-width:44px; height:44px; padding:5px; }
.eyebrow { font-size:11px; font-weight:600; letter-spacing:.22em; text-transform:uppercase; line-height:1.6; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:13px; min-height:52px; padding:13px 26px; border:1px solid var(--ink); border-radius:var(--radius); background:transparent; font-size:14px; font-weight:600; letter-spacing:.06em; line-height:1.65; text-align:center; text-decoration:none; transition:background .2s,color .2s,transform .2s,border-color .2s; }
.button:not(:disabled):hover { transform:translateY(-2px); }
.button.primary { background:var(--ink); color:var(--white); }
.button.primary:hover { background:#214343; }
.button.secondary { border-color:var(--line); background:var(--paper-light); color:var(--ink); }
.button.secondary:hover { background:#e8e1d1; }
.button.ghost { color:inherit; border-color:currentColor; background:transparent; }
.button.small { min-height:44px; padding:9px 18px; font-size:13px; }
.buttonrow,.button-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.pill,.chip { display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border:1px solid var(--line); border-radius:30px; font-size:11px; line-height:1.6; letter-spacing:.04em; }
.muted { color:var(--muted); }
.fine-print { font-size:11px; line-height:1.8; opacity:.7; }
.visually-hidden { position:absolute!important; width:1px!important; height:1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; }
.progress-track { height:3px; background:rgba(199,170,113,.24); overflow:hidden; }
.progress-track > * { display:block; height:100%; background:var(--brass); transition:width .4s ease; }

/* Opening frame. .home-hero is an optional wrapper for the first screen. */
.home { position:relative; }
.home-hero { position:relative; isolation:isolate; overflow:hidden; }
.hero-bg { position:absolute; inset:0 0 auto; height:clamp(720px,calc(100svh - var(--topbar)),1000px); overflow:hidden; background:var(--ink); z-index:0; }
.home-hero .hero-bg { inset:0; height:100%; }
.hero-bg img,.hero-bg video,img.hero-bg,video.hero-bg { width:100%; height:100%; object-fit:cover; object-position:center; animation:kenburns 28s ease-in-out infinite alternate; }
.hero-veil { position:absolute; inset:0 0 auto; height:clamp(720px,calc(100svh - var(--topbar)),1000px); z-index:1; pointer-events:none; background:linear-gradient(90deg,rgba(6,26,26,.78),rgba(6,26,26,.32) 54%,rgba(6,26,26,.05)),linear-gradient(0deg,rgba(6,26,26,.66),transparent 32%,rgba(6,26,26,.03)); }
.home-hero .hero-veil { inset:0; height:100%; }
.hero-layout { position:relative; z-index:2; min-height:clamp(610px,calc(100svh - var(--topbar) - 110px),890px); max-width:1600px; margin:auto; padding:70px clamp(28px,7.5vw,120px) 48px; display:grid; grid-template-columns:1fr .6fr; align-items:center; gap:50px; color:var(--white); }
.hero-copy { max-width:720px; padding-bottom:10px; }
.hero-copy > .eyebrow { color:#e2cfaa; margin-bottom:26px; }
.hero-title { margin:0 0 19px; font-family:var(--serif); font-size:clamp(65px,7.5vw,112px); font-weight:500; letter-spacing:.08em; line-height:1.25; text-shadow:0 3px 28px rgba(0,0,0,.15); }
.title-osaka,.title-kojiki { display:inline-block; }
.title-kojiki { color:var(--white); }
.hero-subtitle { font-family:var(--serif); font-size:clamp(21px,2.4vw,31px); letter-spacing:.13em; line-height:1.75; margin-bottom:26px; }
.hero-description { max-width:540px; font-size:14px; line-height:2.2; color:rgba(255,253,247,.84); }
.hero-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:30px 0 22px; }
.hero-actions .primary { border-color:var(--paper); background:var(--paper); color:var(--ink); min-width:190px; }
.hero-actions .primary:hover { background:#fff; }
.hero-actions .secondary,.hero-actions .ghost { color:var(--white); border-color:rgba(255,253,247,.46); background:rgba(12,35,35,.1); backdrop-filter:blur(6px); }
.hero-actions .secondary:hover,.hero-actions .ghost:hover { background:rgba(255,255,255,.12); }
.hero-progress { max-width:400px; font-size:11px; letter-spacing:.08em; color:rgba(255,253,247,.68); }
.hero-progress .progress-track { margin-top:11px; }
.hero-aside { align-self:stretch; display:flex; flex-direction:column; justify-content:space-between; align-items:flex-end; padding:10px 0; }
.journey-seal { width:108px; height:108px; border:1px solid rgba(255,253,247,.6); border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; font-family:var(--serif); font-size:16px; letter-spacing:.2em; line-height:1.9; text-align:center; transform:rotate(8deg); }
.journey-seal small { display:block; font-family:var(--sans); font-size:9px; letter-spacing:.12em; }
.hero-caption { max-width:200px; padding:0 0 0 16px; border-left:1px solid rgba(255,253,247,.5); font-size:11px; line-height:1.8; color:rgba(255,253,247,.78); text-align:left; }
.hero-caption strong { display:block; color:var(--white); font-family:var(--serif); font-size:20px; font-weight:400; margin-bottom:5px; }
.hero-bottom { min-height:110px; position:relative; z-index:2; padding:20px clamp(28px,7.5vw,120px) 24px; color:var(--white); border-top:1px solid rgba(255,253,247,.18); background:rgba(10,31,30,.22); backdrop-filter:blur(5px); }
.route-peek { display:grid; grid-template-columns:repeat(8,1fr); max-width:1360px; margin:auto; gap:12px; }
.route-stop { position:relative; border:0; padding:5px 0; text-align:left; background:none; color:rgba(255,253,247,.58); font-size:12px; line-height:1.7; min-height:52px; }
.route-stop small,.route-stop > span:first-child { display:block; color:var(--brass); font-size:10px; letter-spacing:.12em; }
.route-stop::after { content:""; position:absolute; left:0; right:12px; bottom:0; height:1px; background:rgba(255,253,247,.2); }
.route-stop.active,.route-stop.done,.route-stop:hover { color:var(--white); }
.route-stop.active::after,.route-stop.done::after { background:var(--brass); height:2px; }
.home-section { position:relative; z-index:3; max-width:1600px; margin:0 auto; padding:85px clamp(28px,7.5vw,120px); background:var(--paper); }
.home-section + .home-section { padding-top:18px; }
.section-heading { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:16px 40px; margin-bottom:32px; }
.section-heading .eyebrow { color:var(--rust); margin-bottom:9px; }
.section-heading h2 { font-family:var(--serif); font-size:32px; font-weight:500; letter-spacing:.07em; margin-bottom:0; }
.section-heading p { max-width:520px; color:var(--muted); font-size:13px; margin-bottom:2px; }
.chapter-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:30px 24px; }
.chapter-card { position:relative; display:block; width:100%; text-align:left; padding:0 0 18px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; overflow:visible; }
.chapter-photo { position:relative; aspect-ratio:4/3; overflow:hidden; background:#cad2ca; }
.chapter-photo img { height:100%; width:100%; object-fit:cover; transition:transform .7s ease; }
.chapter-card:hover .chapter-photo img { transform:scale(1.045); }
.chapter-number { position:absolute; top:13px; left:13px; width:34px; height:34px; border:1px solid rgba(255,253,247,.72); border-radius:50%; display:grid; place-items:center; font-family:var(--serif); font-size:14px; line-height:1; color:var(--white); background:rgba(10,31,30,.4); backdrop-filter:blur(5px); z-index:1; }
.chapter-info { padding:17px 0 0; }
.chapter-info h3 { font-family:var(--serif); font-size:21px; font-weight:500; letter-spacing:.04em; margin-bottom:6px; }
.chapter-info p { color:var(--muted); font-size:12px; line-height:1.85; margin-bottom:12px; }
.chapter-state { color:var(--rust); font-size:11px; font-weight:600; letter-spacing:.06em; }
.chapter-card.done .chapter-state { color:#607459; }
.cast-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px; }
.cast-card { display:grid; grid-template-columns:36% 1fr; gap:18px; align-items:start; border-top:1px solid var(--line); padding-top:22px; }
.cast-photo { aspect-ratio:3/4; background:#e0d9c7; overflow:hidden; }
.cast-photo img { width:100%; height:100%; object-fit:cover; object-position:50% 25%; }
.cast-copy h3 { font-family:var(--serif); font-size:23px; font-weight:500; margin:0 0 3px; }
.cast-copy p { font-size:12px; line-height:1.9; margin-bottom:8px; }
.cast-copy .eyebrow { font-size:9px; letter-spacing:.06em; color:var(--rust); }
.intro-note { padding:24px 28px; border:1px solid var(--line); border-left:3px solid var(--brass); margin-top:42px; font-size:13px; line-height:2; color:var(--muted); }
.intro-note p:last-child { margin-bottom:0; }

/* The scene is the canvas; story and activities settle into the foreground. */
.play-shell { position:relative; isolation:isolate; min-height:calc(100svh - var(--topbar)); padding:34px clamp(22px,5vw,80px) 50px; color:var(--white); background:var(--ink-deep); overflow:hidden; }
.stage-image,.stage-shade { position:fixed; inset:var(--topbar) 0 0; z-index:-2; pointer-events:none; overflow:hidden; }
.stage-image { background:var(--ink-deep); }
.stage-image img,img.stage-image,.stage-image video { height:100%; width:100%; object-fit:cover; object-position:center; animation:scene-drift 26s ease-in-out infinite alternate; }
.stage-shade { z-index:-1; background:linear-gradient(0deg,rgba(4,22,22,.75),rgba(4,22,22,.08) 62%,rgba(4,22,22,.62)); }
.play-header { display:flex; align-items:flex-start; justify-content:space-between; gap:30px; max-width:1440px; margin:0 auto; position:relative; z-index:3; }
.chapter-meta .eyebrow { color:#e0c99d; margin-bottom:5px; }
.chapter-meta h1 { font-family:var(--serif); font-size:clamp(29px,3vw,43px); font-weight:500; letter-spacing:.08em; margin-bottom:5px; text-shadow:0 2px 20px rgba(0,0,0,.2); }
.chapter-meta p { font-size:12px; color:rgba(255,253,247,.76); margin:0; letter-spacing:.05em; }
.scene-steps { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; padding-top:8px; max-width:390px; }
.scene-steps > * { width:29px; height:4px; border:0; padding:0; border-radius:3px; background:rgba(255,253,247,.3); font-size:0; }
.scene-steps .active { background:var(--brass); }
.scene-steps .done { background:rgba(255,253,247,.82); }
.play-body { position:relative; max-width:1250px; margin:0 auto; min-height:calc(100svh - var(--topbar) - 202px); display:flex; flex-direction:column; justify-content:flex-end; }
.dialogue-layout { display:grid; grid-template-columns:210px minmax(0,1fr); gap:0; align-items:end; margin-top:clamp(80px,22vh,240px); width:100%; animation:fade-up .45s ease both; }
.speaker-portrait { position:relative; height:290px; margin:0 -12px 0 0; z-index:2; overflow:hidden; mask-image:linear-gradient(#000 86%,transparent); -webkit-mask-image:linear-gradient(#000 86%,transparent); }
.speaker-portrait img { height:100%; width:100%; object-fit:cover; object-position:center 20%; border-radius:4px 4px 0 0; }
.dialogue-card { min-width:0; position:relative; padding:27px 34px 22px 40px; border:1px solid rgba(244,240,229,.28); border-top:2px solid var(--brass); border-radius:var(--radius); background:rgba(11,32,32,.91); box-shadow:var(--shadow); backdrop-filter:blur(16px); }
.speaker-name { display:inline-block; color:#e7d1a8; font-family:var(--serif); font-size:21px; letter-spacing:.08em; margin:0 13px 12px 0; }
.speaker-role { display:inline-block; font-size:10px; color:rgba(255,253,247,.54); letter-spacing:.06em; }
.dialogue-text { font-family:var(--sans); font-size:clamp(18px,1.8vw,23px); line-height:1.95; font-weight:400; min-height:3.9em; letter-spacing:.025em; margin:0 0 24px; overflow-wrap:anywhere; }
.dialogue-text p { margin-bottom:12px; }
.dialogue-text p:last-child { margin-bottom:0; }
.dialogue-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; border-top:1px solid rgba(255,253,247,.14); padding-top:16px; }
.dialogue-actions .button.primary { background:var(--paper); color:var(--ink); border-color:var(--paper); min-height:46px; padding:10px 24px; }
.dialogue-actions .button.secondary,.dialogue-actions .button.ghost { color:var(--white); background:transparent; border-color:rgba(255,253,247,.3); }
.dialogue-counter { font-size:11px; color:rgba(255,253,247,.54); letter-spacing:.14em; }
.stage-caption { position:relative; z-index:2; display:block; margin:16px auto 0; max-width:1250px; text-align:right; font-size:10px; color:rgba(255,253,247,.6); letter-spacing:.04em; line-height:1.8; }
.explore-layer { position:relative; height:clamp(280px,48vh,540px); min-height:280px; margin:15px -2vw 0; }
.spot-button { position:absolute; transform:translate(-50%,-50%); display:flex; align-items:center; gap:10px; min-height:48px; padding:8px 17px 8px 9px; border:1px solid rgba(255,253,247,.7); border-radius:40px; background:rgba(13,39,38,.74); backdrop-filter:blur(9px); color:var(--white); font-size:13px; white-space:nowrap; box-shadow:0 3px 20px rgba(0,0,0,.15); transition:background .2s; }
.spot-button::before { content:"＋"; display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; border:1px solid var(--brass); border-radius:50%; color:var(--brass); font-size:18px; line-height:1; }
.spot-button:hover,.spot-button.active { background:rgba(18,43,43,.96); }
.spot-button.done::before,.spot-button.found::before { content:"✓"; color:var(--paper); background:var(--rust); border-color:var(--rust); font-size:14px; }
.explore-instructions { position:relative; align-self:center; width:min(100%,680px); }
.paper-panel { background:var(--paper); color:var(--ink); padding:24px 28px; border-top:3px solid var(--brass); box-shadow:var(--shadow); border-radius:var(--radius); }
.paper-panel h2 { font-family:var(--serif); font-size:24px; font-weight:500; margin-bottom:8px; }
.paper-panel p { font-size:14px; margin-bottom:12px; }
.paper-panel p:last-child { margin-bottom:0; }
.choice-card { width:min(100%,850px); align-self:center; margin:50px 0 0; padding:32px 36px; border-top:3px solid var(--brass); border-radius:var(--radius); background:rgba(244,240,229,.97); color:var(--ink); box-shadow:var(--shadow); }
.choice-card h2 { font-family:var(--serif); font-size:28px; font-weight:500; }
.choice-card > p { font-size:16px; line-height:1.9; }
.choice-options { display:grid; gap:10px; margin-top:24px; }
.choice-button { width:100%; display:flex; gap:14px; justify-content:space-between; align-items:center; padding:18px 22px; text-align:left; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper-light); color:var(--ink); min-height:60px; line-height:1.8; font-size:15px; transition:border-color .2s,background .2s; }
.choice-button::after { content:"↗"; color:var(--rust); font-size:20px; flex-shrink:0; }
.choice-button:hover,.choice-button.selected { background:#e9e4d5; border-color:var(--brass); }
.activity-panel { width:min(100%,1000px); align-self:center; color:var(--ink); margin-top:35px; padding:30px 34px; border-top:3px solid var(--brass); border-radius:var(--radius); background:rgba(244,240,229,.98); box-shadow:var(--shadow); }
.activity-head { border-bottom:1px solid var(--line); margin-bottom:23px; padding-bottom:18px; }
.activity-head .eyebrow { color:var(--rust); margin-bottom:6px; }
.activity-head h2 { font-family:var(--serif); font-size:28px; font-weight:500; margin:0 0 9px; }
.activity-head p { font-size:14px; line-height:1.9; margin-bottom:0; color:var(--muted); }
#puzzle-host { min-width:0; }
.lore-panel { width:100%; align-self:center; margin-top:38px; background:var(--paper); color:var(--ink); border-top:3px solid var(--brass); box-shadow:var(--shadow); }
.lore-layout { display:grid; grid-template-columns:.75fr 1.25fr; }
.lore-photo { position:relative; min-height:480px; background:var(--ink); }
.lore-photo img { height:100%; width:100%; object-fit:cover; position:absolute; inset:0; }
.lore-photo figcaption { position:absolute; left:20px; right:20px; bottom:16px; color:var(--white); font-size:10px; text-shadow:0 1px 5px #000; }
.lore-copy { padding:32px 38px; }
.lore-copy h2 { font-family:var(--serif); font-size:30px; font-weight:500; letter-spacing:.04em; margin-bottom:20px; }
.lore-copy > .eyebrow { color:var(--rust); }
.lore-copy > p:not(.eyebrow) { font-size:15px; line-height:2; overflow-wrap:anywhere; }
.fact-block { padding:17px 0; border-top:1px solid var(--line); font-size:14px; line-height:1.95; }
.fact-block p { margin:8px 0 0; }
.fact-tag { display:inline-block; font-size:10px; letter-spacing:.06em; padding:2px 8px; border:1px solid currentColor; border-radius:2px; line-height:1.7; }
.fact-tag.record { color:#436855; }
.fact-tag.tradition { color:#a15d42; }
.fact-tag.science { color:#496c7b; }
.source-links { margin:18px 0 22px; font-size:11px; line-height:1.9; color:var(--muted); }
.source-links a { display:inline-block; margin-right:12px; min-height:30px; overflow-wrap:anywhere; }
.chapter-end { width:min(100%,1030px); align-self:center; margin-top:40px; padding:30px; background:var(--paper); color:var(--ink); border-top:3px solid var(--brass); border-radius:var(--radius); box-shadow:var(--shadow); }
.postcard { position:relative; display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--line); background:var(--paper-light); min-height:300px; }
.postcard-image { min-height:300px; position:relative; background:var(--ink); }
.postcard-image img { position:absolute; inset:0; height:100%; width:100%; object-fit:cover; }
.postcard-copy { padding:35px 30px 27px; }
.postcard-copy h2 { font-family:var(--serif); font-size:30px; font-weight:500; letter-spacing:.05em; margin-bottom:16px; }
.postcard-copy p { font-size:14px; line-height:1.95; }
.postcard-stamp { display:flex; flex-direction:column; align-items:center; justify-content:center; position:absolute; width:76px; height:76px; right:20px; top:16px; border:2px solid var(--rust); outline:1px solid var(--rust); outline-offset:-6px; border-radius:50%; transform:rotate(12deg); color:var(--rust); opacity:.85; font-family:var(--serif); font-size:14px; letter-spacing:.12em; line-height:1.6; }
.postcard-copy:has(+ .postcard-stamp),.postcard-copy:has(.postcard-stamp) { padding-top:100px; }
.note-input { display:block; margin:23px 0; font-size:13px; font-weight:500; }
.note-input textarea,textarea.note-input { display:block; width:100%; min-height:90px; margin-top:8px; resize:vertical; padding:13px 15px; border:1px solid var(--line); border-radius:var(--radius); color:var(--ink); background:var(--paper-light); font-size:14px; line-height:1.8; font-weight:400; }
.note-input textarea::placeholder { color:#9b9b89; }
.ending-panel { width:min(100%,850px); align-self:center; text-align:center; padding:52px 48px; margin-top:55px; border:1px solid rgba(244,240,229,.4); border-top:3px solid var(--brass); background:rgba(11,32,32,.9); box-shadow:var(--shadow); backdrop-filter:blur(10px); }
.ending-panel h2 { font-family:var(--serif); font-size:clamp(30px,4vw,48px); font-weight:500; letter-spacing:.1em; }
.ending-panel p { line-height:2.2; }
.ending-panel .buttonrow { justify-content:center; margin-top:28px; }
.ending-panel .button.primary { background:var(--paper); color:var(--ink); border-color:var(--paper); }

/* Journal and travel atlas. */
.page-shell { min-height:calc(100svh - var(--topbar)); max-width:1440px; padding:62px clamp(24px,7vw,105px) 80px; margin:auto; }
.page-title { margin-bottom:42px; border-bottom:1px solid var(--line); padding-bottom:28px; }
.page-title .eyebrow { color:var(--rust); margin-bottom:10px; }
.page-title h1 { font-family:var(--serif); font-size:clamp(32px,3.8vw,48px); font-weight:500; letter-spacing:.08em; margin:0 0 14px; }
.page-title p { color:var(--muted); font-size:14px; max-width:760px; margin-bottom:0; }
.journal-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px; }
.journal-card { position:relative; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper-light); overflow:hidden; }
.journal-card > img,.journal-card .journal-photo img { width:100%; aspect-ratio:3/2; object-fit:cover; }
.journal-card > div:not(.journal-photo),.journal-card .journal-copy { padding:22px; }
.journal-card h2,.journal-card h3 { font-family:var(--serif); font-size:22px; font-weight:500; margin-bottom:12px; }
.journal-card p { font-size:13px; line-height:1.9; }
.journal-card .button { min-height:44px; font-size:12px; }
.journal-note { white-space:pre-wrap; overflow-wrap:anywhere; border-top:1px solid var(--line); padding-top:12px; color:var(--muted); }
.route-list { display:grid; gap:0; }
.route-row { display:grid; grid-template-columns:64px 190px 1fr auto; gap:28px; align-items:center; padding:26px 0; border-bottom:1px solid var(--line); }
.route-row > img { width:190px; aspect-ratio:3/2; object-fit:cover; }
.route-row .route-number { width:44px; height:44px; border:1px solid var(--brass); display:grid; place-items:center; border-radius:50%; color:var(--rust); font-family:var(--serif); font-size:18px; }
.route-row h2,.route-row h3 { font-family:var(--serif); font-weight:500; font-size:24px; margin-bottom:6px; }
.route-row p { font-size:13px; color:var(--muted); margin-bottom:0; }
.source-card { padding:24px 0; border-bottom:1px solid var(--line); }
.source-card h2,.source-card h3 { font-family:var(--serif); font-weight:500; font-size:23px; margin-bottom:8px; }
.source-card p { font-size:14px; max-width:880px; margin-bottom:8px; }
.source-card a { font-size:13px; color:#466c61; overflow-wrap:anywhere; }
.empty-state { padding:70px 30px; border:1px dashed #c7c7b7; text-align:center; color:var(--muted); }
.empty-state h2 { color:var(--ink); font-family:var(--serif); font-weight:500; font-size:27px; }
.empty-state .button { margin-top:12px; }

/* Quiet, accessible utility surfaces. */
.modal-backdrop { position:fixed; inset:0; z-index:500; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(6,23,23,.72); backdrop-filter:blur(8px); animation:fade-in .2s ease; }
.modal { width:min(100%,650px); max-height:calc(100dvh - 48px); display:flex; flex-direction:column; border:1px solid rgba(199,170,113,.6); border-radius:var(--radius); background:var(--paper); color:var(--ink); box-shadow:var(--shadow); overflow:hidden; }
.modal-header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:24px 28px 18px; border-bottom:1px solid var(--line); flex-shrink:0; }
.modal-header h2 { margin:0; font-family:var(--serif); font-weight:500; font-size:27px; letter-spacing:.05em; }
.close-button { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; border:1px solid var(--line); border-radius:50%; background:transparent; font-size:22px; line-height:1; }
.close-button:hover { background:#e6e1d3; }
.modal-content { padding:24px 28px; overflow:auto; overscroll-behavior:contain; }
.modal-content h3 { font-family:var(--serif); font-weight:500; font-size:22px; }
.modal-content p { font-size:14px; line-height:2; }
.modal-content img { width:100%; border-radius:var(--radius); margin-bottom:20px; }
.modal-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; padding:18px 28px 24px; border-top:1px solid var(--line); flex-shrink:0; }
.setting-row { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:17px 0; border-bottom:1px solid var(--line); font-size:14px; }
.setting-row small { display:block; font-size:11px; color:var(--muted); line-height:1.7; }
.setting-row select { max-width:180px; min-height:44px; padding:8px; border:1px solid var(--line); border-radius:3px; background:var(--paper-light); }
.switch { position:relative; width:50px; height:30px; border:1px solid #b7b9a9; border-radius:25px; padding:0; background:#d1d2c6; flex-shrink:0; }
.switch::before { content:""; position:absolute; inset:-8px -3px; }
.switch::after { content:""; position:absolute; width:22px; height:22px; left:3px; top:3px; border-radius:50%; background:var(--white); box-shadow:0 1px 4px #0002; transition:transform .2s; }
.switch[aria-checked="true"],.switch.on,.switch.active { background:var(--ink); border-color:var(--ink); }
.switch[aria-checked="true"]::after,.switch.on::after,.switch.active::after { transform:translateX(20px); }
.setting-row input[type="checkbox"] { accent-color:var(--ink); width:22px; height:22px; }
#toast { position:fixed; z-index:800; bottom:calc(24px + env(safe-area-inset-bottom)); left:50%; max-width:min(90vw,580px); transform:translate(-50%,15px); padding:13px 23px; border:1px solid rgba(199,170,113,.7); border-radius:4px; color:var(--white); background:rgba(18,43,43,.97); box-shadow:0 5px 25px #0002; font-size:13px; text-align:center; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .2s,transform .2s,visibility .2s; }
#toast.show { opacity:1; visibility:visible; transform:translate(-50%,0); }
.loading { display:flex; align-items:center; justify-content:center; gap:14px; min-height:160px; color:var(--muted); font-size:14px; }
.loading::before { content:""; width:20px; height:20px; border:2px solid var(--line); border-top-color:var(--brass); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes kenburns { from { transform:scale(1.025) translate3d(0,0,0); } to { transform:scale(1.09) translate3d(-1%,.5%,0); } }
@keyframes scene-drift { from { transform:scale(1.015); } to { transform:scale(1.065) translate3d(.4%,-.3%,0); } }
@keyframes fade-up { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }
@keyframes spin { to { transform:rotate(360deg); } }
body[data-motion="off"] *,body[data-motion="off"] *::before,body[data-motion="off"] *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }

@media (min-width:1700px) {
  .hero-bg,.hero-veil { height:900px; }
  .hero-layout { min-height:790px; }
}
@media (max-width:1100px) {
  .topbar { padding:0 26px; }
  .hero-layout { padding-left:55px; padding-right:55px; grid-template-columns:1fr .38fr; }
  .hero-title { font-size:82px; }
  .hero-bottom { padding-left:55px; padding-right:55px; }
  .home-section { padding-left:45px; padding-right:45px; }
  .chapter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cast-grid { gap:20px; }
  .cast-card { grid-template-columns:1fr; }
  .cast-photo { aspect-ratio:5/4; }
  .cast-photo img { object-position:50% 24%; }
  .route-row { grid-template-columns:48px 140px 1fr auto; gap:19px; }
  .route-row > img { width:140px; }
}
@media (max-width:900px) {
  .topbar { gap:18px; }
  .menu-toggle { display:grid; place-items:center; margin-left:auto; }
  .topnav { position:absolute; inset:var(--topbar) 0 auto; display:none; justify-content:space-evenly; gap:2px; padding:8px 16px; background:var(--paper); border-bottom:1px solid var(--line); box-shadow:0 12px 25px rgba(9,31,30,.12); }
  .topnav.open { display:flex; }
  .nav-button { flex:1 1 0; min-width:0; font-size:13px; }
  .nav-button::after { left:16px; right:16px; }
}
@media (max-width:800px) {
  .brand-name { font-size:20px; }
  .brand-sub { font-size:8px; }
  .nav-button { font-size:12px; padding-left:6px; padding-right:6px; }
  .hero-layout { grid-template-columns:1fr .2fr; padding:60px 36px 40px; gap:15px; }
  .hero-title { font-size:72px; }
  .hero-subtitle { font-size:23px; }
  .hero-aside { justify-content:flex-end; }
  .journey-seal { display:none; }
  .hero-caption { max-width:135px; }
  .hero-bottom { padding-left:36px; padding-right:36px; overflow-x:auto; }
  .route-peek { min-width:750px; }
  .home-section { padding:60px 32px; }
  .section-heading h2 { font-size:29px; }
  .cast-copy h3 { font-size:21px; }
  .play-shell { padding:27px 25px 32px; }
  .dialogue-layout { grid-template-columns:155px 1fr; }
  .speaker-portrait { height:240px; }
  .dialogue-card { padding:22px 23px 18px 28px; }
  .dialogue-text { font-size:19px; }
  .lore-layout { grid-template-columns:1fr; }
  .lore-photo { min-height:280px; max-height:320px; }
  .lore-copy { padding:28px; }
  .journal-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .route-row { grid-template-columns:42px 100px 1fr; gap:15px; }
  .route-row > img { width:100px; }
  .route-row > .button { grid-column:3; justify-self:start; min-height:44px; }
  .route-row h2,.route-row h3 { font-size:21px; }
}
@media (max-width:600px) {
  :root { --topbar:64px; }
  body { font-size:15px; }
  .topbar { padding:0 14px; gap:8px; }
  .brand { gap:7px; }
  .brand-mark { width:29px; height:29px; font-size:17px; }
  .brand-name { font-size:17px; letter-spacing:.04em; }
  .brand-sub { font-size:6px; letter-spacing:.14em; }
  .topnav { gap:0; padding:7px 9px; overflow:auto; scrollbar-width:none; min-width:0; }
  .topnav::-webkit-scrollbar { display:none; }
  .nav-button { font-size:12px; min-height:44px; padding:10px 6px; }
  .menu-toggle { width:44px; min-width:44px; height:44px; border:0; font-size:21px; }
  .button { padding:12px 20px; font-size:13px; min-height:50px; }
  .hero-bg,.hero-veil { height:760px; }
  .hero-bg img,.hero-bg video { object-position:58% center; }
  .hero-veil { background:linear-gradient(90deg,rgba(6,26,26,.65),rgba(6,26,26,.12)),linear-gradient(0deg,rgba(6,26,26,.82),rgba(6,26,26,.08) 80%); }
  .hero-layout { min-height:640px; display:block; padding:58px 27px 32px; }
  .hero-copy { max-width:100%; padding:0; }
  .hero-copy > .eyebrow { font-size:9px; letter-spacing:.18em; margin-bottom:27px; }
  .hero-title { font-size:clamp(57px,16vw,80px); letter-spacing:.04em; line-height:1.25; margin-bottom:19px; }
  .title-osaka,.title-kojiki { display:block; }
  .hero-subtitle { font-size:21px; line-height:1.8; letter-spacing:.06em; margin-bottom:20px; }
  .hero-description { font-size:12px; line-height:2; max-width:320px; }
  .hero-actions { margin:24px 0 17px; gap:9px; }
  .hero-actions .button { min-width:0; padding:13px 19px; font-size:12px; }
  .hero-actions .primary { min-width:152px; }
  .hero-progress { font-size:10px; }
  .hero-aside { display:none; }
  .hero-bottom { min-height:100px; padding:15px 27px 22px; }
  .route-peek { min-width:720px; gap:10px; }
  .route-stop { font-size:11px; }
  .home-section { padding:46px 24px; }
  .home-section + .home-section { padding-top:8px; }
  .section-heading { gap:14px; margin-bottom:23px; }
  .section-heading h2 { font-size:27px; }
  .section-heading p { font-size:12px; }
  .chapter-grid { gap:25px 16px; }
  .chapter-photo { aspect-ratio:1/1; }
  .chapter-info { padding-top:13px; }
  .chapter-info h3 { font-size:18px; }
  .chapter-info p { font-size:10px; line-height:1.9; }
  .chapter-number { top:9px; left:9px; width:28px; height:28px; font-size:12px; }
  .chapter-state { font-size:10px; }
  .cast-grid { grid-template-columns:1fr; gap:24px; }
  .cast-card { grid-template-columns:105px 1fr; gap:20px; }
  .cast-photo { aspect-ratio:3/4; }
  .cast-copy h3 { font-size:23px; }
  .cast-copy p { font-size:12px; }
  .intro-note { padding:20px; margin-top:30px; font-size:12px; }
  .play-shell { padding:22px 16px 26px; }
  .play-header { gap:12px; }
  .chapter-meta .eyebrow { font-size:9px; letter-spacing:.13em; }
  .chapter-meta h1 { font-size:28px; }
  .chapter-meta p { font-size:10px; }
  .scene-steps { gap:4px; padding-top:7px; max-width:82px; flex-shrink:0; }
  .scene-steps > * { width:15px; height:3px; }
  .play-body { min-height:calc(100svh - var(--topbar) - 168px); }
  .dialogue-layout { display:flex; flex-direction:column; align-items:stretch; margin-top:75px; }
  .speaker-portrait { width:108px; height:136px; margin:0 0 -23px 14px; mask-image:linear-gradient(#000 87%,transparent); -webkit-mask-image:linear-gradient(#000 87%,transparent); }
  .dialogue-card { padding:22px 21px 18px; }
  .speaker-name { font-size:19px; margin-bottom:10px; }
  .speaker-role { font-size:9px; }
  .dialogue-text { font-size:18px; line-height:1.9; min-height:0; margin-bottom:20px; }
  .dialogue-actions { display:grid; grid-template-columns:auto 1fr; gap:9px 12px; padding-top:13px; }
  .dialogue-actions > .button:first-child { grid-column:1; grid-row:2; }
  .dialogue-actions > .button:last-child { grid-column:2; grid-row:2; justify-self:end; }
  .dialogue-actions .button { min-height:46px; font-size:12px; padding:10px 16px; }
  .dialogue-counter { grid-column:1 / -1; grid-row:1; font-size:10px; letter-spacing:.08em; text-align:right; }
  .stage-caption { font-size:8px; margin-top:12px; }
  .explore-layer { height:320px; min-height:300px; margin:10px 0 0; }
  .spot-button { padding:7px 12px 7px 7px; gap:6px; font-size:11px; min-height:44px; max-width:80%; white-space:normal; line-height:1.5; }
  .spot-button::before { width:25px; height:25px; flex-basis:25px; font-size:16px; }
  .paper-panel { padding:20px; }
  .paper-panel h2 { font-size:23px; }
  .paper-panel p { font-size:13px; }
  .choice-card { padding:24px 20px; margin-top:35px; }
  .choice-card h2 { font-size:25px; }
  .choice-card > p { font-size:14px; }
  .choice-options { gap:9px; }
  .choice-button { padding:15px; font-size:13px; min-height:60px; }
  .activity-panel { padding:23px 18px; margin-top:30px; }
  .activity-head h2 { font-size:24px; }
  .activity-head p { font-size:12px; }
  .lore-panel { margin-top:30px; }
  .lore-photo { min-height:220px; }
  .lore-copy { padding:24px 21px; }
  .lore-copy h2 { font-size:26px; }
  .lore-copy > p:not(.eyebrow) { font-size:14px; line-height:2; }
  .fact-block { font-size:13px; line-height:1.95; }
  .source-links { font-size:10px; }
  .chapter-end { margin-top:28px; padding:20px; }
  .postcard { grid-template-columns:1fr; }
  .postcard-image { min-height:210px; }
  .postcard-copy { padding:24px 21px; }
  .postcard-copy h2 { font-size:26px; }
  .postcard-copy p { font-size:13px; }
  .postcard-stamp { width:64px; height:64px; font-size:12px; top:227px; right:12px; }
  .postcard-copy:has(+ .postcard-stamp),.postcard-copy:has(.postcard-stamp) { padding-top:74px; }
  .chapter-end .buttonrow { align-items:stretch; }
  .chapter-end .buttonrow > .button { flex:1 1 auto; }
  .ending-panel { margin-top:35px; padding:34px 22px; }
  .ending-panel h2 { font-size:30px; }
  .ending-panel p { font-size:14px; }
  .page-shell { padding:37px 22px 60px; }
  .page-title { margin-bottom:28px; padding-bottom:24px; }
  .page-title h1 { font-size:33px; }
  .page-title p { font-size:12px; }
  .journal-grid { grid-template-columns:1fr; gap:24px; }
  .journal-card > div:not(.journal-photo),.journal-card .journal-copy { padding:21px; }
  .route-row { grid-template-columns:34px 1fr; gap:12px 16px; padding:23px 0; }
  .route-row > img { width:100%; grid-column:2; aspect-ratio:2/1; }
  .route-row .route-number { width:32px; height:32px; font-size:15px; }
  .route-row > div:not(.route-number) { grid-column:2; }
  .route-row > .button { grid-column:2; }
  .route-row h2,.route-row h3 { font-size:24px; }
  .source-card p { font-size:13px; }
  .modal-backdrop { padding:14px; }
  .modal { max-height:calc(100dvh - 28px); }
  .modal-header { padding:18px 20px 15px; gap:10px; }
  .modal-header h2 { font-size:24px; }
  .modal-content { padding:20px; }
  .modal-content p { font-size:13px; }
  .modal-actions { padding:16px 20px 20px; }
  .modal-actions .button { flex:1; }
  .setting-row { gap:14px; font-size:13px; }
  .setting-row select { max-width:135px; }
  #toast { bottom:calc(16px + env(safe-area-inset-bottom)); padding:12px 17px; width:max-content; font-size:12px; }
}
@media (max-width:360px) {
  .topbar { padding:0 9px; }
  .brand-mark,.brand-sub { display:none; }
  .brand-name { font-size:16px; }
  .nav-button { font-size:11px; padding-left:5px; padding-right:5px; }
  .hero-layout { padding-left:22px; padding-right:22px; }
  .hero-title { font-size:58px; }
  .hero-actions .button { padding-left:14px; padding-right:14px; }
  .chapter-grid { grid-template-columns:1fr; }
  .chapter-photo { aspect-ratio:3/2; }
  .chapter-info h3 { font-size:23px; }
  .chapter-info p { font-size:12px; }
  .dialogue-card { padding-left:17px; padding-right:17px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}
@media print {
  .topbar,.hero-bg,.hero-veil,.stage-image,.stage-shade,.button,.spot-button { display:none!important; }
  #app { padding-top:0; }
  .play-shell,.home-section,.page-shell { background:white; color:black; padding:20px; }
  .dialogue-card,.paper-panel,.lore-panel { background:white; color:black; box-shadow:none; }
}
