html, body, #viewer { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #b7c3cd; }
body { font-family: system-ui, "Yu Gothic UI", sans-serif; color: #17251b; }
/* 初期入口のみ。体験開始後は既存UIへ引き渡す。 */
.portal-open > .ui-shell, .portal-open > #mouse-state, .portal-open > #status { visibility: hidden; }
.portal-open #viewer { pointer-events: none; }
#experience-portal { position: fixed; z-index: 10; inset: 0; pointer-events: auto; background: linear-gradient(90deg, rgba(239,242,229,.95), rgba(239,242,229,.86) 38%, rgba(239,242,229,0) 78%); }
#experience-portal[hidden] { display: none; }
.portal-content { box-sizing: border-box; width: min(650px, 59vw); height: 100%; overflow-y: auto; padding: clamp(20px, 3vw, 44px); scrollbar-width: thin; }
.portal-eyebrow { color: #487361; font-size: 13px; font-weight: 750; letter-spacing: .12em; margin-bottom: 12px; }
#portal-title { font-size: clamp(25px, 2.9vw, 39px); line-height: 1.3; letter-spacing: .02em; margin: 0 0 16px; }
#portal-title span { font-size: .57em; font-weight: 650; }
.portal-intro { font-size: 14px; line-height: 1.8; color: #4d6055; margin-bottom: 20px; }
#portal-loading { color: #51675b; }
#portal-choices { border: 0; padding: 0; margin: 0; min-width: 0; }
.portal-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.portal-category { margin: 0 0 22px; }
.portal-category h2 { font-size: 14px; margin: 0 0 10px; letter-spacing: .05em; }
.portal-category h2 small { display: inline; font-size: 10px; font-weight: 500; color: #796547; }
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.portal-card { text-align: left; display: flex; flex-direction: column; gap: 7px; padding: 15px; border: 1px solid rgba(70,105,86,.19); border-radius: 13px; background: rgba(255,255,250,.86); box-shadow: 0 3px 12px rgba(24,53,38,.035); transition: background .18s, transform .18s; }
.portal-card strong { font-size: 14px; line-height: 1.5; }
.portal-card > span:not(.portal-symbol) { font-size: 12px; color: #647266; font-weight: 400; line-height: 1.6; }
.portal-card em { margin-top: auto; font-style: normal; font-size: 11px; color: #42755a; }
.portal-symbol { color: #60977b; font-size: 23px; line-height: 1; }
.portal-featured { background: #e1eddf; border-color: #a7c6ad; }
.portal-wide { grid-column: 1 / -1; }
.portal-card:enabled:hover { background: #fafff5; transform: translateY(-2px); }
.portal-card:focus-visible, .portal-enter:focus-visible { outline: 3px solid #b58a40; outline-offset: 3px; }
.portal-card:disabled { cursor: default; opacity: .65; box-shadow: none; }
.portal-future .portal-card { padding: 12px; background: rgba(238,239,228,.7); border-style: dashed; }
.portal-enter { width: 100%; background: #286947; color: #fff; border-color: #286947; margin-bottom: 12px; }
.portal-footnote { font-size: 11px; color: #596b5f; line-height: 1.6; }
@media (max-width: 800px) {
  .portal-content { width: min(560px, 88vw); padding: 22px; }
  #experience-portal { background: linear-gradient(90deg, rgba(239,242,229,.95), rgba(239,242,229,.85) 65%, transparent); }
}
@media (max-width: 440px) {
  .portal-content { width: 90vw; padding: 18px; }
  .portal-grid { grid-template-columns: 1fr; }
}
.ui-shell { position: fixed; z-index: 2; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; pointer-events: none; }
.landscape-row, .mode-row, .kofun-tour, .auto-tour, .life-tour, .narration-tools, .viewer-tools, .ancient-note { pointer-events: auto; border-radius: 10px; background: rgba(255,255,255,.92); box-shadow: 0 2px 12px rgba(0,0,0,.18); }
.landscape-row, .mode-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; }
.landscape-row { order: 0; width: 100%; }
.mode-row { order: 2; }
.kofun-tour { order: 3; display: flex; align-items: center; gap: 7px; padding: 7px 9px; }
.kofun-tour label { color: #3f5545; font-size: 13px; font-weight: 800; white-space: nowrap; }
.kofun-tour select { min-height: 36px; max-width: 164px; padding: 6px 28px 6px 9px; border: 1px solid #c8d0c5; border-radius: 6px; background: #f8faf7; color: #25422f; font: inherit; font-size: 13px; font-weight: 700; }
.auto-tour { order: 4; display: flex; align-items: center; gap: 5px; padding: 7px 8px; }
.auto-tour span { padding: 0 3px; color: #3f5545; font-size: 13px; font-weight: 800; white-space: nowrap; }
.auto-tour button { min-height: 36px; padding: 5px 9px; font-size: 12px; }
.auto-tour button:disabled { opacity: .5; cursor: default; }
.life-tour { order: 5; display: flex; align-items: center; gap: 5px; padding: 7px 8px; }
.life-tour span { padding: 0 3px; color: #3f5545; font-size: 13px; font-weight: 800; white-space: nowrap; }
.life-tour button { min-height: 36px; padding: 5px 9px; font-size: 12px; }
.life-tour button:disabled { opacity: .5; cursor: default; }
.guided-tour-tools { order: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 7px 8px; pointer-events: auto; border-radius: 10px; background: rgba(255,255,255,.92); box-shadow: 0 2px 12px rgba(0,0,0,.18); }
.guided-tour-tools span { color: #3f5545; font-size: 13px; font-weight: 800; }
.guided-tour-tools button { min-height: 36px; padding: 5px 9px; font-size: 12px; }
.guided-tour-tools button:disabled { opacity: .5; cursor: default; }
.guided-tour-active #helicopter-panel .helicopter-altitude-controls,
.guided-tour-active #helicopter-panel > button,
.guided-tour-active #helicopter-panel .flight-controls { display: none; }
.narration-tools { order: 6; display: flex; align-items: center; gap: 5px; padding: 7px 8px; }
.narration-tools span { padding: 0 3px; color: #3f5545; font-size: 13px; font-weight: 800; white-space: nowrap; }
.narration-tools button { min-height: 36px; padding: 5px 9px; font-size: 12px; }
.narration-tools button.active { color: #fff; border-color: #226b44; background: #226b44; }
.viewer-tools { order: 6; padding: 10px 12px; max-width: 360px; }
.ancient-note { order: 1; margin: 0; padding: 8px 10px; color: #68451f; font-size: 13px; }
.ui-label { padding: 0 5px; color: #3f5545; font-size: 13px; font-weight: 800; }
h1 { margin: 0 0 4px; font-size: 18px; }
p { margin: 0 0 8px; font-size: 12px; line-height: 1.45; }
button { min-height: 42px; padding: 8px 13px; border: 1px solid #c8d0c5; border-radius: 7px; background: #f8faf7; color: #25422f; font-weight: 750; cursor: pointer; }
button small { display: block; margin-top: 1px; font-size: 10px; font-weight: 650; }
.landscape-button { min-width: 104px; font-size: 16px; }
.landscape-button.active, .mode-button.active { border-color: #226b44; background: #226b44; color: #fff; }
.mode-button { min-width: 86px; font-size: 13px; }
.mode-button:not(.active) small { color: #87602d; }
.viewer-tools button { background: #226b44; color: #fff; border-color: #226b44; }
.viewer-tools button + button { margin-left: 8px; background: #6b3722; border-color: #6b3722; }
#mouse-state { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 8px 12px; border-radius: 6px; background: rgba(255,255,255,.92); box-shadow: 0 2px 10px rgba(0,0,0,.15); font-size: 13px; font-weight: 700; }
#mouse-state.active { background: #226b44; color: #fff; }
#status { position: fixed; right: 16px; bottom: 16px; padding: 8px 10px; border-radius: 6px; color: #fff; background: rgba(0,0,0,.64); font-size: 13px; }
#auto-tour-label { position: fixed; z-index: 3; top: 94px; left: 16px; margin: 0; padding: 7px 10px; border-radius: 7px; color: #f7f5ec; background: rgba(35,77,64,.86); box-shadow: 0 2px 9px rgba(22,45,36,.24); font-size: 13px; font-weight: 800; }
#narration-caption { position: fixed; z-index: 4; right: 50%; bottom: 66px; width: min(620px, calc(100vw - 32px)); margin: 0; padding: 10px 14px; transform: translateX(50%); border-radius: 9px; color: #f8f5e9; background: rgba(24,38,33,.88); box-shadow: 0 3px 12px rgba(0,0,0,.24); font-size: 14px; font-weight: 700; line-height: 1.55; text-align: center; }
#cityhall-view { position: fixed; z-index: 1; inset: 0; pointer-events: none; }
#cityhall-view p { margin: 0; font-size: 12px; line-height: 1.45; }
.cityhall-switcher, .cityhall-lobby-info, #virtual-rise { position: absolute; right: 16px; border-radius: 6px; color: #eef2ef; background: rgba(21,30,32,.72); }
.cityhall-switcher { top: 218px; display: flex; gap: 4px; padding: 5px; pointer-events: auto; }
.city-view-button { min-height: 34px; padding: 5px 9px; color: #eaf0ea; border-color: rgba(230,240,232,.28); background: rgba(255,255,255,.10); font-size: 12px; }
.city-view-button.active { color: #fff; border-color: #5d9a74; background: #2d7049; }
.city-view-button small { font-size: 9px; }
.cityhall-lobby-info { top: 271px; padding: 7px 9px; }
#cityhall-view strong { font-size: 13px; }
#cityhall-view span { color: #d5e3d2; }
#virtual-rise { top: 271px; width: min(310px, calc(100vw - 32px)); padding: 9px; pointer-events: auto; }
#virtual-rise strong { display: block; margin: 7px 0; color: #f3e6b0; }
#virtual-rise button { min-height: 32px; margin: 2px 3px 0 0; padding: 5px 8px; color: #f5f7f4; border-color: rgba(230,240,232,.32); background: rgba(255,255,255,.12); font-size: 11px; }
#virtual-rise button:disabled { opacity: .48; cursor: default; }
#balloon-view { position: fixed; z-index: 1; inset: 0; pointer-events: none; }
#balloon-panel { position: absolute; top: 218px; right: 16px; width: min(302px, calc(100vw - 32px)); padding: 9px; border-radius: 7px; color: #f7f2e7; background: rgba(39,43,38,.78); pointer-events: auto; }
#balloon-panel p { margin: 0; font-size: 12px; }
#balloon-panel p span { color: #ead49a; font-size: 10px; }
#balloon-altitude { display: block; margin: 7px 0; color: #f4df9b; font-size: 13px; }
#balloon-panel button { min-height: 32px; margin: 2px 3px 0 0; padding: 5px 8px; color: #fffaf0; border-color: rgba(240,226,191,.35); background: rgba(255,255,255,.13); font-size: 11px; }
#balloon-panel button:disabled { opacity: .48; cursor: default; }
#balloon-panel label { display: block; margin-top: 7px; color: #e9e4d8; font-size: 11px; }
#plane-view { position: fixed; z-index: 1; inset: 0; pointer-events: none; }
#plane-panel { position: absolute; top: 218px; right: 16px; width: min(302px, calc(100vw - 32px)); padding: 9px; border-radius: 7px; color: #f2f5f5; background: rgba(26,35,40,.78); pointer-events: auto; }
#plane-panel p { margin: 0 0 4px; font-size: 12px; }
#plane-panel p span { margin-left: 6px; color: #bee1c7; font-size: 11px; }
#plane-panel button { min-height: 32px; margin: 5px 3px 0 0; padding: 5px 8px; color: #f5f8fa; border-color: rgba(210,227,232,.36); background: rgba(255,255,255,.13); font-size: 11px; }
.plane-speed-selector { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 4px; align-items: center; margin: 7px 0 1px; color: #c7d7da; font-size: 10px; }
#plane-panel .plane-speed-selector button { min-height: 28px; margin: 0; padding: 4px 3px; font-size: 10px; }
#plane-panel .plane-speed-selector button small { display: block; margin-top: 1px; color: #bdd7ca; font-size: 8px; }
#plane-panel .plane-speed-selector button.active { color: #f8fbf7; border-color: #afc9af; background: rgba(93,137,109,.62); box-shadow: inset 0 0 0 1px rgba(231,245,226,.18); }
.air-experience-switcher { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(238,241,232,.16); color: #cbd9d1; font-size: 10px; }
.air-experience-switcher > span { margin-right: 2px; }
#plane-panel .air-experience-switcher button, #helicopter-panel .air-experience-switcher button { min-height: 27px; margin: 0; padding: 4px 7px; font-size: 10px; }
.air-experience-switcher button[aria-pressed="true"] { color: #f8fbf7; border-color: #afc9af; background: rgba(93,137,109,.62); box-shadow: inset 0 0 0 1px rgba(231,245,226,.18); }
.air-experience-switcher .air-experience-return { margin-left: auto !important; color: #dce9dd; background: rgba(255,255,255,.08) !important; }
#helicopter-view { position: fixed; z-index: 1; inset: 0; pointer-events: none; }
#helicopter-panel { position: absolute; top: 218px; right: 16px; width: min(302px, calc(100vw - 32px)); padding: 10px; border-radius: 7px; color: #f1f5f3; background: rgba(30,42,38,.80); pointer-events: auto; }
#helicopter-panel p { margin: 0 0 5px; font-size: 12px; }
#helicopter-panel p span { margin-left: 6px; color: #c6e5cd; font-size: 11px; }
.helicopter-altitude-controls { display: flex; gap: 6px; margin: 8px 0; }
#helicopter-panel button { min-height: 34px; margin: 3px 3px 0 0; padding: 6px 9px; color: #f5f8f5; border-color: rgba(207,230,212,.38); background: rgba(255,255,255,.13); font-size: 12px; }
.helicopter-altitude-controls button { flex: 1; min-height: 42px; margin: 0; font-size: 14px; font-weight: 800; }
#kaiju-hud { position: fixed; z-index: 5; top: 94px; right: 16px; display: grid; gap: 7px; min-width: 190px; padding: 13px 15px; border: 1px solid rgba(255,221,115,.65); border-radius: 9px; color: #fff7d7; background: rgba(34,42,37,.88); box-shadow: 0 4px 18px rgba(0,0,0,.28); }
#kaiju-hud[hidden], #kaiju-result[hidden] { display: none; }
#kaiju-hud strong { color: #ffd86b; font-size: 14px; letter-spacing: .08em; }
#kaiju-hud span { font-size: 17px; font-weight: 850; }
#kaiju-hud small { color: #dfe8df; font-size: 11px; }
#kaiju-hud kbd { padding: 2px 6px; border: 1px solid #fff3be; border-radius: 4px; background: #1c2922; color: #fff; }
#kaiju-result { position: fixed; z-index: 7; top: 50%; left: 50%; display: grid; gap: 10px; width: min(420px, calc(100vw - 40px)); box-sizing: border-box; padding: 30px; transform: translate(-50%, -50%); border: 2px solid #e8c460; border-radius: 14px; color: #fff8d8; background: rgba(24,35,30,.94); box-shadow: 0 16px 55px rgba(0,0,0,.45); text-align: center; }
#kaiju-result strong { color: #ffd86b; font-size: 29px; letter-spacing: .08em; }
#kaiju-result span { font-size: 16px; font-weight: 750; }
#kaiju-result div { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
#kaiju-result button { min-height: 38px; color: #203b30; background: #f5efd6; }
@media (max-width: 700px) {
  .kaiju-game-active #helicopter-panel { display: none; }
  #kaiju-hud { top: 74px; right: 8px; }
}
.flight-controls { margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(238,241,232,.16); }
.control-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.control-row + .control-row { margin-top: 5px; }
.control-row.primary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.helicopter-controls .control-row.primary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.key-command { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 20px; padding: 2px 4px; border: 1px solid rgba(236,241,234,.26); border-radius: 4px; color: #edf2ee; background: rgba(255,255,255,.08); font-size: 9px; line-height: 1; white-space: nowrap; }
.key-command kbd { min-width: 17px; padding: 2px 3px; border: 1px solid rgba(250,251,244,.45); border-radius: 3px; color: #fffaf0; background: rgba(17,25,23,.45); font: 700 9px/1 system-ui, sans-serif; text-align: center; }
.control-row.primary .key-command { min-height: 24px; color: #fffdf4; background: rgba(255,255,255,.14); font-size: 10px; }
.control-row.primary .key-command kbd { font-size: 10px; }
.control-row.support { color: #d2ddd5; font-size: 9px; line-height: 1.15; }
.control-row.support > span:not(.key-command) { padding: 2px 3px; }
.landmark-toggle { min-width: 128px; color: #234d40; border-color: #aec1b6; background: #f7f5ec; }
.landmark-toggle.active { color: #fff; border-color: #234d40; background: #234d40; }
#landmark-layer { position: fixed; z-index: 3; inset: 0; pointer-events: none; }
.landmark-marker { position: absolute; display: flex; align-items: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: #26352e; pointer-events: auto; cursor: pointer; transform: translate(-50%, -100%); }
.landmark-plaque { position: relative; display: grid; width: 26px; height: 32px; place-items: center; border: 1px solid rgba(255,255,255,.96); border-left: 4px solid #234d40; border-radius: 5px 5px 3px 3px; background: #f7f5ec; box-shadow: 0 2px 6px rgba(30,48,40,.24); font-size: 10px; font-weight: 900; }
.landmark-marker.modern .landmark-plaque { border-left-color: #506c78; }
.landmark-plaque::after { content: ""; position: absolute; top: 31px; left: 10px; width: 2px; height: 11px; background: #234d40; }
.landmark-marker.modern .landmark-plaque::after { background: #506c78; }
.landmark-name { max-width: 150px; margin-left: 5px; padding: 3px 5px; border-radius: 4px; background: rgba(247,245,236,.96); box-shadow: 0 1px 5px rgba(30,48,40,.18); font-size: 12px; font-weight: 750; white-space: nowrap; }
.landmark-marker.near .landmark-name { font-size: 14px; }
.landmark-marker.compact .landmark-name { display: none; }
.landmark-marker.selected .landmark-plaque, .landmark-marker.selected .landmark-name { outline: 2px solid #b8883d; outline-offset: 1px; }
.landmark-marker.selected .landmark-plaque::after { width: 3px; background: #b8883d; }
#landmark-hint { position: fixed; z-index: 3; top: 94px; right: 16px; margin: 0; padding: 6px 9px; border-radius: 6px; color: #26352e; background: rgba(247,245,236,.96); box-shadow: 0 1px 6px rgba(30,48,40,.18); font-size: 11px; }
#landmark-panel { position: fixed; z-index: 4; top: 292px; right: 16px; width: min(300px, calc(100vw - 32px)); max-height: calc(100vh - 308px); padding: 16px; overflow: auto; border-radius: 12px; border-top: 5px solid #234d40; background: rgba(247,245,236,.98); box-shadow: 0 4px 18px rgba(25,42,34,.25); color: #26352e; }
#landmark-panel h2 { margin: 3px 44px 10px 0; font-size: 20px; }
#landmark-panel h3 { margin: 12px 0 3px; color: #234d40; font-size: 13px; }
#landmark-panel p { margin: 0; font-size: 13px; line-height: 1.55; }
#landmark-meta { color: #627169; font-size: 11px !important; font-weight: 750; }
#landmark-close { position: absolute; top: 9px; right: 9px; min-height: 36px; padding: 5px 9px; color: #234d40; border-color: #b8c7bd; background: #fff; font-size: 11px; }
@media (max-width: 700px) { #landmark-panel { top: auto; right: 8px; bottom: 50px; left: 8px; width: auto; max-height: 45vh; } #landmark-hint { top: auto; right: 8px; bottom: 52px; } #auto-tour-label { top: auto; bottom: 58px; left: 8px; } #narration-caption { bottom: 94px; font-size: 13px; } }
@media (max-width: 700px) { .ui-shell { top: 8px; left: 8px; right: 8px; } .viewer-tools { display: none; } .landscape-button { min-width: 94px; } .mode-row { gap: 4px; } .mode-button { min-width: 76px; } }

/* 上部の操作は既存DOMをまとめたネイティブ折りたたみ。状態表示もCSSだけで追従する。 */
.ui-shell { align-items: center; gap: 6px 8px; }
.ui-shell .landscape-row { width: auto; padding: 5px; gap: 5px; }
.landscape-row .landscape-button { min-height: 44px; min-width: 88px; padding: 5px 10px; font-size: 14px; }
.landscape-row #landmark-toggle { min-height: 42px; padding: 5px 9px; font-size: 12px; }
.landscape-row #exit-mouse { color: #fff; background: #6b3722; border-color: #6b3722; }
.control-menu { position: relative; order: 1; pointer-events: auto; border: 1px solid #d6ddd1; border-radius: 9px; background: rgba(250,252,248,.95); box-shadow: 0 2px 9px #17251b18; }
.control-menu > summary { min-height: 44px; padding: 4px 12px; box-sizing: border-box; cursor: pointer; color: #43534a; font-size: 12px; user-select: none; }
.control-menu > summary::marker { color: #54725f; }
.control-menu > summary:focus-visible { outline: 2px solid #226b44; outline-offset: 3px; border-radius: 8px; }
.current-state { display: block; padding-left: 13px; color: #234d40; font-size: 13px; line-height: 1.4; }
.control-menu[open] { border-color: #87a48e; background: #eef4ec; }
.menu-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 5; width: 350px; max-width: calc(100vw - 24px); max-height: calc(100vh - 160px); overflow-y: auto; box-sizing: border-box; padding: 10px; border: 1px solid #cbd7c9; border-radius: 12px; background: rgba(250,252,248,.98); box-shadow: 0 8px 28px #13261d33; }
.menu-panel > .mode-row, .menu-panel > .kofun-tour, .menu-panel > .auto-tour, .menu-panel > .life-tour, .menu-panel > .guided-tour-tools, .menu-panel > .ship-approach-tools, .menu-panel > .narration-tools, .menu-panel > .viewer-tools { margin: 0; padding: 10px 3px; background: transparent; box-shadow: none; border-radius: 0; }
.menu-panel > * + * { border-top: 1px solid #dde5d9; }
.menu-panel .mode-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.menu-panel .mode-row .ui-label { grid-column: 1 / -1; padding: 0 0 3px; }
.menu-panel .mode-button { min-width: 0; min-height: 42px; padding: 7px; }
.menu-panel .kofun-tour { justify-content: space-between; }
.menu-panel .viewer-tools { display: block; max-width: none; }
.menu-panel h1 { font-size: 13px; margin-bottom: 6px; }
.menu-panel .viewer-tools p { color: #5a6b5e; font-size: 12px; }
.menu-panel .auto-tour, .menu-panel .life-tour { flex-wrap: wrap; }
.menu-panel .auto-tour > span, .menu-panel .life-tour > span { flex: 1 0 100%; padding-bottom: 4px; }
.menu-panel .guided-tour-tools > span { display: none; }
.menu-panel .guided-tour-tools { gap: 6px; }
.ship-approach-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ship-approach-tools > span { flex: 1 0 100%; padding: 0 3px; color: #3f5545; font-size: 13px; font-weight: 800; }
.ship-approach-tools > small { color: #617167; font-size: 11px; }
.ship-approach-tools button { min-height: 34px; padding: 5px 9px; font-size: 12px; }
.ship-approach-tools button:disabled { opacity: .5; cursor: default; }
.sound-menu { margin-left: auto; box-shadow: none; background: rgba(250,252,248,.82); }
.sound-menu > summary { min-height: 38px; padding-top: 10px; color: #5d6b62; }
.sound-menu .menu-panel { right: 0; left: auto; width: 290px; }
.menu-panel .narration-tools { flex-wrap: wrap; }
.menu-panel .narration-tools > span { display: none; }
.ui-shell .ancient-note { order: 3; flex-basis: auto; max-width: 100%; padding: 5px 9px; font-size: 11px; box-shadow: none; }
.current-mode, .tour-kofun, .tour-life, .tour-ship { display: none; }
.ui-shell[data-active-mode="free"] .current-free,
.ui-shell[data-active-mode="cityhall"] .current-cityhall,
.ui-shell[data-active-mode="balloon"] .current-balloon,
.ui-shell[data-active-mode="plane"] .current-plane,
.ui-shell[data-active-mode="helicopter"] .current-helicopter,
.ui-shell[data-active-mode="ship"] .current-ship { display: inline; }
.ui-shell:has(#auto-tour-next:not(:disabled)) .tour-kofun,
.ui-shell:has(#life-tour-next:not(:disabled)) .tour-life,
.ui-shell:has(#ship-approach-stop:not(:disabled)) .tour-ship { display: inline; }
.ui-shell:has(#auto-tour-next:not(:disabled)) .tour-idle,
.ui-shell:has(#life-tour-next:not(:disabled)) .tour-idle,
.ui-shell:has(#ship-approach-stop:not(:disabled)) .tour-idle { display: none; }
.ui-shell:has(#auto-tour-next:not(:disabled)) .tours-menu,
.ui-shell:has(#life-tour-next:not(:disabled)) .tours-menu,
.ui-shell:has(#ship-approach-stop:not(:disabled)) .tours-menu { border-color: #689875; background: #e5f0e4; }
#auto-tour-label { top: auto; bottom: 58px; }
@media (max-width: 900px) {
  .ui-shell .landscape-row { flex-basis: 100%; }
  .control-menu { position: static; }
  .control-menu .menu-panel { top: 110px; left: 0; right: auto; max-height: calc(100vh - 180px); }
  .ui-shell .ancient-note { flex-basis: 100%; }
}
@media (max-width: 440px) {
  .landscape-row .ui-label { display: none; }
  .landscape-row .landscape-button { min-width: 74px; }
  .control-menu > summary { padding-right: 7px; padding-left: 7px; }
  .current-state { font-size: 12px; }
}

/* 体験を順に見せる、スクロール型の初期ポータル。 */
#experience-portal { overflow-y: auto; background: transparent; scroll-behavior: smooth; }
.portal-content { width: 100%; height: auto; overflow: visible; padding: 0; background: linear-gradient(90deg, rgba(13,36,30,.86), rgba(13,36,30,.40) 48%, rgba(13,36,30,.04)); color: #fffdf3; }
.portal-content > .portal-eyebrow { padding: 26px 5vw 0; margin: 0 0 7px; color: #dfdfba; }
#portal-title { padding: 0 5vw; font-size: 20px; line-height: 1.35; margin: 0; }
#portal-title br { display: none; }
#portal-title span { font-size: 12px; margin-left: 12px; display: inline-block; }
#portal-loading { padding: 12px 5vw; color: #fff4cb; }
.portal-hero { box-sizing: border-box; min-height: calc(100svh - 100px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 45px 8vw 30px; }
.portal-hero .portal-eyebrow { color: #e7d395; }
.portal-hero h2 { font-size: clamp(42px, 5.8vw, 86px); line-height: 1.19; letter-spacing: -.035em; margin: 0 0 25px; text-shadow: 0 3px 30px #15352866; }
.portal-hero h2 span { color: #d2e5b5; }
.portal-hero p { font-size: 16px; line-height: 1.85; color: #f1f1df; }
.portal-hero-start { display: inline-block; margin-top: 18px; background: #e8d39a; border: 0; color: #193c30; border-radius: 50px; padding: 17px 28px; font-size: 17px; text-decoration: none; }
.portal-hero-start span { margin-left: 26px; }
.portal-scroll { color: #e7eddf; font-size: 12px; margin-top: 40px; text-underline-offset: 6px; }
.portal-sea { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 490px; background: #183e48; }
.portal-sea-art { position: relative; overflow: hidden; min-height: 280px; background: radial-gradient(ellipse at 55% 20%, #d2dfcd99, transparent 56%), linear-gradient(172deg, #7da8aa 0%, #446f78 49%, #345661 50%, #1b414b 100%); }
.portal-sea-art::before, .portal-sea-art::after { content: ''; position: absolute; width: 130%; height: 180px; left: -10%; border-top: 2px solid #d5e8df66; border-radius: 50%; transform: rotate(-9deg); top: 60%; box-shadow: 0 -15px 0 -14px #c8dfd655, 0 -35px 0 -34px #c8dfd644; }
.portal-sea-art::after { top: 82%; transform: rotate(8deg); }
.portal-sea-art > span { position: absolute; bottom: 40px; left: 8vw; font-size: 15px; letter-spacing: .13em; }
.portal-sea-copy { padding: 65px 6vw; }
.portal-sea-copy .portal-eyebrow { color: #bed6ce; }
.portal-sea-copy h2 { font-size: clamp(32px, 3.8vw, 54px); line-height: 1.3; margin: 15px 0 22px; }
.portal-sea-copy p { font-size: 14px; line-height: 1.9; }
.portal-sea-copy button { margin: 22px 0 12px; background: #edf0de; border: none; padding: 14px 23px; border-radius: 30px; }
.portal-sea-copy small { display: block; font-size: 11px; color: #c3d5d1; }
.portal-category { margin: 0; padding: 64px 8vw; background: #f1f1e7; color: #203b30; }
.portal-category h2 { font-size: clamp(23px, 3vw, 36px); margin-bottom: 26px; }
.portal-grid { gap: 20px; grid-template-columns: repeat(2, minmax(0,1fr)); }
[aria-labelledby="portal-sky"] .portal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal-card { padding: 28px; min-height: 200px; border-radius: 7px; gap: 13px; }
.portal-card strong { font-size: 20px; }
.portal-card > span:not(.portal-symbol) { font-size: 14px; }
.portal-symbol { font-size: 42px; }
.portal-card[data-vehicle="helicopter"] { background: #dce7cf; min-height: 245px; }
.portal-card[data-portal="balloon"] { background: #e0e8d0; min-height: 245px; }
.portal-city-view { padding-top: 20px; }
.portal-city-view .portal-grid { grid-template-columns: minmax(0, 1fr); max-width: 50%; }
[aria-labelledby="portal-time"] { padding-top: 20px; }
.portal-wide { grid-column: auto; background: #e8e0cf; }
.portal-future { background: #213e33; color: #f3f1dc; }
.portal-future .portal-eyebrow { color: #c1d19e; }
.portal-future .portal-card { padding: 25px; background: #2e4d40; color: #f5f1db; opacity: 1; border: 1px solid #71806b; }
.portal-future .portal-card span, .portal-future .portal-card em { color: #d1dac3; }
.portal-enter { display: block; width: auto; margin: 30px auto; padding: 15px 30px; }
.portal-footnote { color: #eeeede; text-align: center; padding: 0 20px 30px; margin: 0; }
.portal-hero-start:focus-visible, .portal-sea button:focus-visible { outline: 3px solid #fff; outline-offset: 5px; }
@media (max-width: 800px) {
  .portal-sea { grid-template-columns: 1fr; }
  .portal-sea-art { min-height: 190px; }
  .portal-sea-copy { padding: 35px 8vw; }
  [aria-labelledby="portal-sky"] .portal-grid { grid-template-columns: 1fr 1fr; }
  .portal-card[data-vehicle="helicopter"] { grid-column: 1 / -1; min-height: 190px; }
  .portal-city-view .portal-grid { max-width: none; }
  .portal-category { padding: 40px 6vw; }
  .portal-card { padding: 20px; }
  .portal-content { background: linear-gradient(90deg, #102f27df, #102f2744); }
}
@media (max-width: 480px) {
  .portal-grid, [aria-labelledby="portal-sky"] .portal-grid { grid-template-columns: 1fr; }
  .portal-hero p { font-size: 14px; }
  .portal-hero-start { font-size: 15px; padding: 15px 22px; }
}
@media (prefers-reduced-motion: reduce) { #experience-portal { scroll-behavior: auto; } }

/* 採用済みトップページを学習側に保持した、入口だけの表示切替。 */
#portal-learning[hidden], #portal-games[hidden] { display: none; }
.portal-mode-switch { position: sticky; top: 0; z-index: 1; display: flex; gap: 8px; padding: 14px 5vw; margin-top: 15px; background: rgba(24,51,43,.96); }
.portal-mode-switch button { min-height: 48px; padding: 8px 22px; border: 1px solid #93a899; background: transparent; color: #f3f1dc; border-radius: 8px; font-size: 15px; }
.portal-mode-switch small { display: block; margin-top: 3px; font-size: 11px; font-weight: 400; }
.portal-mode-switch button[aria-pressed="true"] { background: #e8d39a; color: #193c30; border-color: #e8d39a; }
.portal-mode-switch button:focus-visible, .portal-learning-return:focus-visible { outline: 3px solid #e8d39a; outline-offset: 3px; }
.portal-games { min-height: 60vh; box-sizing: border-box; }
.portal-games-intro { line-height: 1.9; color: #d1dac3; margin-bottom: 30px; }
.portal-games .portal-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.portal-learning-return { margin-top: 28px; background: #edf0de; color: #234d40; padding: 12px 22px; border: 0; border-radius: 30px; }
.portal-future button.portal-card:enabled:hover { background: #3b5f4f; }
.portal-games .portal-kaiju-card { border-color: #e3bd63; background: #375f4d; }
.portal-games .portal-kaiju-card:disabled { opacity: .55; }
.portal-experience-picker { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(11, 31, 25, .48); }
.portal-experience-picker[hidden] { display: none; }
.portal-experience-picker-card { width: min(460px, 100%); padding: 32px; color: #203b30; border-radius: 12px; background: #f7f7ee; box-shadow: 0 20px 70px rgba(0, 0, 0, .28); }
.portal-experience-picker-card .portal-eyebrow { color: #557663; }
.portal-experience-picker-card h2 { margin: 8px 0 10px; font-size: 30px; }
.portal-experience-picker-card > p:not(.portal-eyebrow) { margin: 0 0 22px; color: #647266; line-height: 1.7; }
.portal-experience-picker-options { display: grid; gap: 12px; }
.portal-experience-picker-options button { display: grid; gap: 6px; padding: 18px; text-align: left; color: #203b30; border: 1px solid #cdd9c5; border-radius: 8px; background: #fffef8; }
.portal-experience-picker-options button:hover { background: #e7efdb; }
.portal-experience-picker-options strong { font-size: 18px; }
.portal-experience-picker-options span { color: #617266; font-size: 13px; line-height: 1.55; }
.portal-experience-picker-back { margin-top: 18px; padding: 9px 3px; color: #426d57; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.portal-experience-picker-options button:focus-visible, .portal-experience-picker-back:focus-visible { outline: 3px solid #b58a40; outline-offset: 3px; }
@media (max-width: 700px) {
  .portal-mode-switch button { flex: 1; padding: 8px 10px; }
  .portal-games .portal-grid { grid-template-columns: 1fr; }
}

/* Portal navigation and persistent attribution, including the entry screen. */
.portal-home-link { position:fixed; top:8px; right:8px; z-index:1000; padding:9px 12px; border-radius:8px; background:#15324a; color:white; font-size:14px; text-decoration:none; }
.data-credit { position:fixed; bottom:0; right:0; z-index:1000; padding:4px 8px; max-width:100%; box-sizing:border-box; background:rgba(255,255,255,.92); color:#223; font-size:10px; line-height:1.4; }
.data-credit a { color:#154d72; }
.helicopter-controls button, #helicopter-up, #helicopter-down { touch-action:none; }
@media (max-width:900px) { .ui-shell { top:52px; } .portal-content { padding-top:60px; } }