:root { color-scheme: dark; font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif; color: #ecf2f2; background: #08131d; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; min-height: 44px; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .4; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid #efc777; outline-offset: 4px; }
#museum-app { position: relative; width: min(1600px, 100%); min-height: 100svh; margin: auto; padding: 0 32px; display: flex; flex-direction: column; background: #0d1d2b; }
.masthead { height: 90px; flex: 0 0 90px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: .06em; }
.brand { min-height: 44px; }
.touch-copy { display: none; }
#museum-app[data-input="touch"] .touch-copy { display: block; }
#museum-app[data-input="touch"] .pointer-copy { display: none; }
.brand-mark { width: 40px; height: 40px; fill: none; stroke: #e5be79; stroke-width: 1.6; stroke-linecap: round; }
.brand small { display: block; color: #8ca9b6; font-size: 9px; font-weight: 400; letter-spacing: .22em; margin-top: 7px; }
.edition { color: #839eac; font-size: 10px; letter-spacing: .18em; white-space: nowrap; }
.edition b { color: #d7e4e9; font-weight: 400; margin-left: 6px; }
.stage { position: relative; width: 100%; height: min(calc(100svh - 152px), calc((100vw - 64px) * .5625)); min-height: 350px; max-height: 864px; flex: 1 0 auto; overflow: hidden; border: 1px solid #29404e; border-radius: 3px; background: #0b1721; }
#unity-canvas { display: block; width: 100%; height: 100%; background: #0b1721; touch-action: none; }
.entry-overlay { position: absolute; inset: 0; display: flex; align-items: center; padding: 48px clamp(36px, 7vw, 116px); overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 85% 30%, #214b4c55, transparent 64%), linear-gradient(120deg, #112433, #102433 50%, #0c1d28); }
.entry-card { position: relative; z-index: 2; width: min(100%, 620px); max-height: 100%; overflow-y: auto; }
.eyebrow { margin: 0 0 28px; display: flex; align-items: center; gap: 12px; color: #8caea9; font-size: 10px; font-weight: 500; letter-spacing: .25em; }
.eyebrow span { display: inline-block; width: 28px; height: 1px; background: #c2a56c; }
h1 { margin: 0; font-size: clamp(30px, 3.8vw, 58px); font-weight: 500; letter-spacing: .08em; line-height: 1.45; }
.intro { margin: 22px 0 0; font-size: clamp(17px, 1.7vw, 25px); line-height: 1.8; letter-spacing: .08em; color: #d6e5e5; }
.description { margin: 20px 0 28px; color: #9db3be; font-size: 13px; line-height: 2; letter-spacing: .035em; }
.primary-button { display: inline-flex; align-items: center; justify-content: space-between; min-width: 248px; gap: 42px; padding: 17px 24px; border: 1px solid #d8b16d; border-radius: 2px; background: #dec087; color: #11242c; font-size: 14px; font-weight: 700; letter-spacing: .09em; transition: background .15s, transform .15s; }
.primary-button:hover { background: #efd09a; transform: translateY(-1px); }
.primary-button span { font-size: 21px; line-height: 1; font-weight: 400; }
.device-note { color: #859fab; font-size: 11px; line-height: 1.7; margin: 13px 0 0; }
.orbit { position: absolute; z-index: -1; display: block; border: 1px solid #6ba29b25; border-radius: 50%; pointer-events: none; }
.orbit-one { width: 680px; height: 680px; right: -240px; top: calc(50% - 340px); }
.orbit-two { width: 500px; height: 500px; right: -150px; top: calc(50% - 250px); }
.orbit-three { width: 320px; height: 320px; right: -60px; top: calc(50% - 160px); background: radial-gradient(circle, #6cb0a512, transparent 70%); }
.entry-caption { position: absolute; bottom: 28px; right: 32px; color: #668a91; font-size: 9px; letter-spacing: .24em; writing-mode: vertical-rl; }
.loading-label { display: flex; justify-content: space-between; color: #cfddd9; font-size: 13px; margin-bottom: 12px; }
#loading { width: min(100%, 360px); margin-top: 28px; }
progress { display: block; appearance: none; border: none; width: 100%; height: 4px; border-radius: 2px; overflow: hidden; background: #2b414d; accent-color: #dfbd7d; }
progress::-webkit-progress-bar { background: #2b414d; }
progress::-webkit-progress-value { background: #dfbd7d; transition: width .2s; }
progress::-moz-progress-bar { background: #dfbd7d; }
#error-panel { max-width: 480px; }
#error-message { color: #f0c6b4; font-size: 13px; line-height: 1.9; margin: 16px 0 20px; }
.no-script { color: #f0c6b4; font-size: 13px; line-height: 1.8; }
.toolbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex: 0 0 auto; }
.quick-help { color: #8ca5b1; font-size: 10px; line-height: 2; margin: 12px 0; }
.quick-help span { color: #425f70; padding: 0 9px; }
kbd { color: #d2dfe4; font-family: inherit; font-size: 10px; }
.toolbar-actions { display: flex; gap: 16px; flex: 0 0 auto; }
.text-button { min-width: 44px; border: 0; background: transparent; padding: 10px 8px; color: #c3d4dc; font-size: 11px; letter-spacing: .05em; }
.text-button:hover:not(:disabled) { color: #efcd91; }
.text-button span { margin-left: 4px; }
.control-guide { position: absolute; z-index: 5; right: 32px; bottom: 62px; width: min(480px, calc(100% - 64px)); max-height: calc(100% - 160px); overflow: auto; padding: 24px 28px; background: #142b3af5; border: 1px solid #4a6675; border-radius: 3px; box-shadow: 0 12px 70px #0008; }
.guide-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.guide-heading h2 { font-size: 17px; font-weight: 500; letter-spacing: .08em; margin: 0; }
.control-guide dl { margin: 18px 0; }
.control-guide dl div { padding: 10px 0; border-bottom: 1px solid #324955; }
.control-guide dt { font-size: 12px; color: #e0c58f; margin-bottom: 5px; }
.control-guide dd, .control-guide p { font-size: 12px; line-height: 1.8; color: #bfd0d8; margin: 0; }
#museum-app:fullscreen { width: 100%; max-width: none; height: 100%; padding: 0 20px; }
#museum-app:fullscreen .masthead { height: 54px; flex-basis: 54px; }
#museum-app:fullscreen .brand-mark { width: 30px; height: 30px; }
#museum-app:fullscreen .brand small { display: none; }
#museum-app:fullscreen .stage { flex: 1 1 0; height: auto; max-height: none; min-height: 0; }
#museum-app:fullscreen .toolbar { min-height: 46px; }
@media (max-height: 760px) and (min-width: 760px) {
  .masthead { height: 64px; flex-basis: 64px; }
  .stage { height: calc(100svh - 118px); min-height: 300px; }
  .toolbar { min-height: 54px; }
  .entry-overlay { padding-top: 30px; padding-bottom: 30px; }
  .eyebrow { margin-bottom: 16px; }
  h1 { font-size: 38px; }
  .intro { margin-top: 14px; font-size: 20px; line-height: 1.6; }
  .description { margin: 14px 0 20px; font-size: 12px; line-height: 1.8; }
}
@media (max-width: 900px) {
  #museum-app { padding: 0 18px; }
  .masthead { height: 72px; flex-basis: 72px; }
  .brand { font-size: 13px; gap: 8px; }
  .brand small { font-size: 8px; }
  .edition { font-size: 8px; letter-spacing: .1em; }
  .quick-help { max-width: 480px; font-size: 9px; }
  .quick-help span { padding: 0 4px; }
  .entry-overlay { padding: 32px; }
  .entry-caption { display: none; }
  .control-guide { right: 18px; width: min(480px, calc(100% - 36px)); }
}
@media (max-width: 760px), (any-pointer: coarse) {
  #museum-app, #museum-app:fullscreen {
    width: 100%; height: 100svh; height: 100dvh; min-height: 0;
    padding: env(safe-area-inset-top, 0px) max(10px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(10px, env(safe-area-inset-left, 0px));
  }
  .masthead, #museum-app:fullscreen .masthead { height: 56px; flex-basis: 56px; gap: 8px; }
  .brand { font-size: 12px; letter-spacing: .03em; }
  .brand-mark, #museum-app:fullscreen .brand-mark { width: 30px; height: 30px; }
  .brand small, #museum-app:fullscreen .brand small { display: none; }
  .edition { font-size: 8px; letter-spacing: 0; }
  .stage, #museum-app:fullscreen .stage { flex: 1 1 0; height: auto; min-height: 0; max-height: none; }
  .entry-overlay { padding: 28px 22px; }
  .entry-card { overscroll-behavior: contain; scrollbar-width: thin; }
  h1 { font-size: clamp(23px, 6vw, 36px); }
  .intro { font-size: 18px; margin-top: 18px; }
  .description { font-size: 12px; margin: 16px 0 22px; line-height: 1.9; }
  .eyebrow { font-size: 8px; margin-bottom: 20px; }
  .primary-button { min-width: 0; width: min(100%, 320px); min-height: 52px; padding: 14px 20px; gap: 16px; }
  .device-note { font-size: 12px; }
  #museum-app[data-input] .quick-help { display: none; }
  .toolbar, #museum-app:fullscreen .toolbar { min-height: 48px; flex: 0 0 48px; justify-content: flex-end; gap: 4px; }
  .toolbar-actions { gap: 12px; }
  .text-button { font-size: 13px; padding: 10px 12px; }
  .control-guide { right: max(10px, env(safe-area-inset-right, 0px)); bottom: calc(48px + env(safe-area-inset-bottom, 0px)); width: min(480px, calc(100% - max(10px, env(safe-area-inset-right, 0px)) - max(10px, env(safe-area-inset-left, 0px)))); max-height: calc(100% - 104px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); padding: 12px 20px 20px; overscroll-behavior: contain; }
  .guide-heading { position: sticky; top: -12px; margin: -12px -20px 0; padding: 8px 8px 8px 20px; background: #142b3a; z-index: 1; }
  .control-guide dl { margin-top: 8px; }
  .control-guide dt { font-size: 13px; }
  .control-guide dd, .control-guide p { font-size: 13px; }
}
@media (max-height: 500px) and (max-width: 960px), (max-height: 500px) and (any-pointer: coarse) {
  .masthead, #museum-app:fullscreen .masthead { height: 44px; flex-basis: 44px; }
  .entry-overlay { padding: 14px 24px; }
  .entry-card { width: 100%; }
  .eyebrow { margin-bottom: 8px; }
  h1 { font-size: 24px; }
  .intro { display: none; }
  .description { margin: 8px 0 12px; line-height: 1.6; }
  .description br { display: none; }
  .device-note { margin-top: 8px; }
  #museum-app[data-state="loading"] .description, #museum-app[data-state="error"] .description { display: none; }
  #loading { margin-top: 14px; }
  .control-guide { max-height: calc(100% - 92px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* Keep the exhibit close to the viewport edges, including on wide monitors.
   The in-player header supplies the title once the museum has opened. */
#museum-app, #museum-app:fullscreen {
  width: 100%; max-width: none; height: 100svh; height: 100dvh; min-height: 0;
  padding: env(safe-area-inset-top, 0px) max(2px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(2px, env(safe-area-inset-left, 0px));
}
.masthead, #museum-app:fullscreen .masthead { height: 44px; flex-basis: 44px; }
.brand-mark { width: 30px; height: 30px; }
.brand small { display: none; }
#museum-app[data-state="running"] .masthead { display: none; }
.stage, #museum-app:fullscreen .stage { flex: 1 1 0; height: auto; min-height: 0; max-height: none; border: 0; border-radius: 0; }
.toolbar, #museum-app:fullscreen .toolbar { min-height: 44px; flex: 0 0 44px; }
.quick-help { margin: 0 8px; }
.control-guide { right: 4px; bottom: 44px; width: min(480px, calc(100% - 8px)); max-height: calc(100% - 52px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
