:root {
  --ink: #f4f1e8;
  --ink-soft: #d1d5cf;
  --muted: #99a5a1;
  --gold: #d6b36a;
  --gold-bright: #f0db9d;
  --vermillion: #9d3328;
  --teal: #78c9b6;
  --panel: rgba(9, 16, 18, .78);
  --panel-strong: rgba(8, 14, 16, .94);
  --line: rgba(238, 218, 166, .16);
  --line-strong: rgba(238, 218, 166, .32);
  --shadow: 0 26px 90px rgba(0, 0, 0, .48);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; }
html { background: #091012; }
body {
  background: #091012;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button, select { touch-action: manipulation; }
button:focus-visible, select:focus-visible, input:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}
.hidden { display: none !important; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #172226; touch-action: none; cursor: grab; }
#world:active { cursor: grabbing; }
.noscript { position: fixed; z-index: 999; inset: 0; display: grid; place-items: center; padding: 28px; background: #111a1c; text-align: center; }

.cinematic-grade, .vignette { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cinematic-grade { background: linear-gradient(180deg, rgba(255, 224, 164, .04), transparent 37%, rgba(2, 17, 20, .08)); mix-blend-mode: soft-light; }
.vignette { box-shadow: inset 0 0 170px rgba(0, 0, 0, .34), inset 0 -120px 150px rgba(0, 5, 7, .28); }

/* Intro */
.intro { position: absolute; inset: 0; z-index: 60; display: grid; align-items: center; padding: calc(32px + var(--safe-top)) calc(28px + var(--safe-right)) calc(30px + var(--safe-bottom)) calc(28px + var(--safe-left)); overflow: auto; isolation: isolate; }
.intro-bg { position: absolute; z-index: -4; inset: -3%; background: url("assets/concept-edo.jpg") 56% center / cover no-repeat; filter: saturate(.76) contrast(1.08) brightness(.78); transform: scale(1.035); animation: introDrift 20s ease-out both; }
.intro-shade { position: absolute; z-index: -3; inset: 0; background: linear-gradient(90deg, rgba(2, 7, 9, .97) 0%, rgba(3, 9, 11, .89) 36%, rgba(3, 8, 10, .28) 69%, rgba(3, 8, 10, .55) 100%), linear-gradient(0deg, rgba(2, 6, 8, .92), transparent 55%); }
.intro-grid { position: absolute; z-index: -2; inset: 0; opacity: .13; background-image: linear-gradient(rgba(237, 218, 171, .25) 1px, transparent 1px), linear-gradient(90deg, rgba(237, 218, 171, .25) 1px, transparent 1px); background-size: 78px 78px; mask-image: linear-gradient(90deg, #000, transparent 68%); }
.intro-content { width: min(690px, 100%); margin-left: clamp(0px, 5.4vw, 88px); position: relative; }
.intro-brandline { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(20px, 4vh, 40px); }
.intro-logo { width: 62px; height: 62px; border-radius: 15px; object-fit: cover; box-shadow: 0 14px 40px rgba(0, 0, 0, .4), 0 0 0 1px rgba(241, 219, 162, .3); }
.eyebrow { margin: 0 0 6px; font: 800 10px/1.3 Georgia, serif; letter-spacing: .22em; color: var(--gold-bright); }
.edition { margin: 0; font-size: 9px; letter-spacing: .22em; color: #a8b3ae; }
.edition span { color: var(--ink); margin-left: 5px; }
.intro h1 { display: flex; align-items: flex-start; gap: clamp(13px, 2vw, 30px); margin: 0; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-weight: 700; line-height: .88; text-shadow: 0 12px 46px #000; }
.title-ja { font-size: clamp(64px, 9.5vw, 126px); letter-spacing: .025em; }
.title-year { padding-top: .14em; font: 500 clamp(25px, 3.9vw, 52px)/1 Georgia, serif; letter-spacing: .07em; color: var(--gold); }
.subtitle { max-width: 660px; margin: 24px 0 12px; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: clamp(19px, 2.2vw, 31px); line-height: 1.55; letter-spacing: .045em; text-shadow: 0 3px 20px #000; }
.intro-summary { max-width: 600px; margin: 0; color: #c6ceca; font-size: 12px; line-height: 1.9; letter-spacing: .025em; }
.intro-features { display: flex; flex-wrap: wrap; gap: 1px; width: fit-content; margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: rgba(5, 12, 14, .48); backdrop-filter: blur(14px); }
.intro-features span { min-width: 108px; padding: 9px 12px; border-right: 1px solid var(--line); color: #afb9b4; font-size: 9px; letter-spacing: .06em; }
.intro-features span:last-child { border: 0; }
.intro-features b { color: var(--gold-bright); font: 700 13px Georgia, serif; margin-right: 4px; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.primary, .ghost, .retry-btn, .setting-buttons button { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 19px; background: rgba(11, 20, 22, .68); backdrop-filter: blur(16px); font-weight: 800; font-size: 12px; letter-spacing: .08em; }
.primary { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; min-width: 202px; color: #17140d; background: linear-gradient(135deg, #e3c77f, #a57a35); border-color: #ecdca8; box-shadow: 0 16px 40px rgba(0, 0, 0, .37), inset 0 1px rgba(255, 255, 255, .3); }
.primary i { font: 400 20px/1 Georgia, serif; }
.primary:active, .ghost:active { transform: scale(.98); }
.ghost { background: rgba(7, 14, 16, .54); }
.intro-footnote { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: #9ea9a5; font-size: 9px; line-height: 1.5; }
.confidence-key { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.intro-coordinate { position: absolute; right: calc(28px + var(--safe-right)); bottom: calc(22px + var(--safe-bottom)); display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .52); font: 9px Georgia, serif; letter-spacing: .12em; }
.intro-coordinate i { width: 38px; height: 1px; background: rgba(255, 255, 255, .32); }
@keyframes introDrift { from { transform: scale(1.09); } to { transform: scale(1.035); } }

/* Loading */
.loading { position: absolute; z-index: 55; inset: 0; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 36%, rgba(29, 43, 45, .94), rgba(3, 8, 10, .99) 72%); }
.loading-card { width: min(410px, 100%); text-align: center; }
.loading-emblem { position: relative; width: 82px; height: 82px; margin: 0 auto 22px; display: grid; place-items: center; }
.loading-emblem img { width: 54px; height: 54px; object-fit: cover; border-radius: 13px; opacity: .9; }
.loader-ring { position: absolute; inset: 0; border: 1px solid rgba(255, 255, 255, .12); border-top-color: var(--gold); border-right-color: rgba(214, 179, 106, .5); border-radius: 50%; animation: spin 1.15s linear infinite; }
.loading-copy small { display: block; margin-bottom: 9px; color: var(--gold); font: 800 8px Georgia, serif; letter-spacing: .24em; }
.loading-copy strong { display: block; font-family: "Yu Mincho", serif; font-size: 21px; letter-spacing: .04em; }
.loading-copy > span { display: block; min-height: 18px; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.loading-track { width: 100%; height: 2px; margin-top: 24px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.loading-track i { display: block; width: 8%; height: 100%; background: linear-gradient(90deg, #947038, var(--gold-bright)); box-shadow: 0 0 14px rgba(240, 219, 157, .65); transition: width .4s ease; }
.retry-btn { margin-top: 20px; color: #17140d; background: var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }

/* HUD */
.hud { position: absolute; z-index: 26; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: calc(11px + var(--safe-top)) calc(12px + var(--safe-right)) 9px calc(12px + var(--safe-left)); pointer-events: none; background: linear-gradient(180deg, rgba(2, 7, 9, .75), rgba(2, 7, 9, .15) 75%, transparent); }
.hud > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(16, 25, 27, .83), rgba(5, 11, 13, .62)); backdrop-filter: blur(20px) saturate(1.12); box-shadow: 0 12px 36px rgba(0, 0, 0, .24); text-align: left; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.brand-copy { display: block; }
.brand strong { display: block; font-family: "Yu Mincho", serif; font-size: 14px; letter-spacing: .08em; }
.brand strong em { color: var(--gold); font: 600 11px Georgia, serif; }
.brand small { display: block; margin-top: 2px; color: #98a39f; font: 700 7px Georgia, serif; letter-spacing: .15em; }
.hud-actions { display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 16px; background: rgba(5, 11, 13, .58); backdrop-filter: blur(20px) saturate(1.15); box-shadow: 0 12px 36px rgba(0, 0, 0, .22); }
.pill, .icon-btn { min-height: 42px; border: 0; border-radius: 11px; background: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: background .18s ease, transform .18s ease; }
.pill { padding: 0 14px; font-size: 11px; font-weight: 800; }
.mode-pill { background: linear-gradient(135deg, rgba(214, 179, 106, .2), rgba(255, 255, 255, .035)); }
.mode-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-bright); box-shadow: 0 0 12px var(--gold-bright); }
.icon-btn { min-width: 52px; padding: 5px 9px; flex-direction: column; gap: 2px; }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: #e7e9e3; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn em { color: #aab4b0; font-size: 7px; font-style: normal; font-weight: 800; letter-spacing: .08em; }
.pill:active, .icon-btn:active { transform: scale(.96); background: rgba(255, 255, 255, .1); }

/* Status surfaces */
.timeline { position: absolute; z-index: 18; top: calc(74px + var(--safe-top)); left: 50%; width: min(390px, calc(100vw - 190px)); transform: translateX(-50%); padding: 9px 13px 8px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg, rgba(8, 15, 17, .7), rgba(8, 15, 17, .5)); backdrop-filter: blur(16px); box-shadow: 0 10px 34px rgba(0, 0, 0, .19); }
.timeline-head { display: flex; justify-content: space-between; align-items: center; color: #aeb8b4; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.timeline-head span { display: flex; align-items: center; gap: 7px; }
.timeline-head i { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.timeline-head strong { color: var(--gold-bright); font: 700 12px Georgia, serif; }
.timeline input { width: 100%; height: 15px; margin: 4px 0 0; accent-color: var(--gold); }
.timeline-labels { display: flex; justify-content: space-between; color: #788681; font: 7px Georgia, serif; }
.quick-nav { position: absolute; z-index: 18; top: 50%; left: calc(14px + var(--safe-left)); display: flex; flex-direction: column; gap: 6px; transform: translateY(-50%); }
.quick-nav p { margin: 0 0 2px; padding: 0 5px; }
.quick-nav p span, .quick-nav p b { display: block; }
.quick-nav p span { color: var(--gold); font: 700 7px Georgia, serif; letter-spacing: .18em; }
.quick-nav p b { margin-top: 2px; font-family: "Yu Mincho", serif; font-size: 12px; }
.quick-nav button { position: relative; display: grid; grid-template-columns: 25px 1fr; grid-template-rows: auto auto; width: 150px; min-height: 47px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(145deg, rgba(7, 14, 16, .78), rgba(7, 14, 16, .49)); backdrop-filter: blur(13px); box-shadow: 0 9px 28px rgba(0, 0, 0, .2); text-align: left; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.quick-nav button > span { grid-row: 1 / 3; align-self: center; color: var(--gold); font: 700 11px Georgia, serif; }
.quick-nav button b { font-family: "Yu Mincho", serif; font-size: 11px; }
.quick-nav button i { color: #7f8d88; font: 700 6px Georgia, serif; letter-spacing: .14em; }
.quick-nav button.active { border-color: rgba(240, 219, 157, .46); background: linear-gradient(135deg, rgba(171, 127, 54, .8), rgba(63, 47, 26, .78)); }
.quick-nav button.active i { color: #efe3c5; }
.location-panel { position: absolute; z-index: 30; top: calc(82px + var(--safe-top)); right: calc(14px + var(--safe-right)); width: min(365px, calc(100vw - 28px)); padding: 20px; border: 1px solid var(--line-strong); border-radius: 20px; background: linear-gradient(150deg, rgba(15, 25, 27, .94), rgba(5, 11, 13, .9)); backdrop-filter: blur(24px) saturate(1.12); box-shadow: var(--shadow); animation: panelIn .25s ease both; overflow: hidden; }
.location-panel::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--gold-bright), transparent 74%); }
.panel-kicker { display: flex; justify-content: space-between; margin-right: 34px; color: #788681; font: 700 7px Georgia, serif; letter-spacing: .16em; }
.panel-kicker b { color: #a7b1ad; }
.close-panel { position: absolute; top: 9px; right: 9px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: #bbc3bf; font-size: 24px; }
.confidence-row { display: flex; align-items: center; gap: 8px; margin-top: 13px; color: #bac3bf; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.confidence-dot, .confidence-cards i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.confirmed { background: #7dd2bf; color: #7dd2bf; }
.estimated { background: #edc46f; color: #edc46f; }
.conceptual { background: #df8d78; color: #df8d78; }
.location-panel h2 { margin: 12px 0 3px; font-family: "Yu Mincho", serif; font-size: 28px; letter-spacing: .035em; }
.location-panel #locationEra { margin: 0 0 12px; color: var(--gold-bright); font-size: 11px; }
.location-panel #locationDescription { margin: 0; color: #d9dedb; font-size: 12px; line-height: 1.85; }
.panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 17px; }
.panel-actions button { min-height: 43px; padding: 8px 11px; border: 1px solid #d6b56f; border-radius: 11px; color: #17140d; background: linear-gradient(135deg, #d8b668, #a57a37); font-size: 11px; font-weight: 800; }
.panel-actions .subtle, .subtle { color: #e6e9e4; border-color: var(--line); background: rgba(255, 255, 255, .055); }
.panel-actions .compact { grid-column: 1 / -1; min-height: 36px; color: #abb5b1; }
@keyframes panelIn { from { opacity: 0; transform: translateY(9px) scale(.985); } to { opacity: 1; transform: none; } }

/* Camera controls */
.camera-nav { position: absolute; z-index: 22; left: 50%; bottom: calc(17px + var(--safe-bottom)); display: flex; align-items: center; gap: 4px; padding: 5px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 17px; background: rgba(5, 11, 13, .72); backdrop-filter: blur(20px) saturate(1.15); box-shadow: 0 15px 46px rgba(0, 0, 0, .34); }
.camera-nav-btn { min-width: 62px; height: 44px; padding: 0 11px; border: 0; border-radius: 11px; background: rgba(255, 255, 255, .055); display: flex; align-items: center; justify-content: center; gap: 7px; }
.camera-nav-btn span { color: var(--gold-bright); font-size: 17px; }
.camera-nav-btn b { font-size: 9px; letter-spacing: .06em; }
.camera-nav-btn:active { transform: scale(.96); background: rgba(255, 255, 255, .13); }
.camera-nav-btn:disabled { opacity: .32; cursor: default; }
.camera-place { min-width: 177px; height: 44px; padding: 5px 14px; border-left: 1px solid rgba(255, 255, 255, .09); display: flex; flex-direction: column; justify-content: center; }
.camera-place small { color: #86938e; font: 700 7px Georgia, serif; letter-spacing: .14em; }
.camera-place strong { max-width: 195px; margin-top: 2px; overflow: hidden; color: #f3e9d1; font-family: "Yu Mincho", serif; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.compass { position: absolute; z-index: 19; top: calc(78px + var(--safe-top)); right: calc(17px + var(--safe-right)); width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 50%; background: rgba(5, 11, 13, .56); backdrop-filter: blur(14px); display: grid; place-items: center; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); }
.compass::before, .compass::after { content: ""; position: absolute; background: rgba(255, 255, 255, .12); }
.compass::before { width: 1px; height: 36px; }.compass::after { width: 36px; height: 1px; }
#compassNeedle { position: relative; z-index: 1; min-width: 28px; color: var(--gold-bright); font: 800 10px/1 Georgia, serif; text-align: center; }
.compass small { position: absolute; top: 55px; padding: 2px 6px; border-radius: 20px; color: #8f9d98; background: rgba(4, 10, 12, .64); font-size: 7px; white-space: nowrap; }
.desktop-hint { position: absolute; z-index: 17; right: calc(18px + var(--safe-right)); bottom: calc(20px + var(--safe-bottom)); padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 999px; color: #9ca7a3; background: rgba(5, 11, 13, .54); backdrop-filter: blur(12px); font-size: 8px; }
.desktop-hint b { color: #e8ded0; font-size: 8px; }.desktop-hint i { display: inline-block; width: 3px; height: 3px; margin: 0 6px 2px; border-radius: 50%; background: #687570; }
.control-help { position: absolute; z-index: 31; left: 50%; bottom: calc(94px + var(--safe-bottom)); max-width: calc(100vw - 30px); padding: 12px 42px 12px 15px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 15px; background: rgba(6, 13, 15, .9); backdrop-filter: blur(17px); box-shadow: 0 14px 42px rgba(0, 0, 0, .34); animation: panelIn .25s ease both; }
.control-help strong, .control-help span { display: block; }.control-help strong { margin-bottom: 3px; color: var(--gold-bright); font-size: 10px; }.control-help span { color: #c6ceca; font-size: 9px; white-space: nowrap; }
.control-help button { position: absolute; top: 7px; right: 7px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.horizon-guide { position: absolute; z-index: 18; top: 50%; left: 50%; width: min(42vw, 270px); height: 34px; transform: translate(-50%, -50%); pointer-events: none; opacity: .18; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .75)); }
.horizon-guide::before, .horizon-guide::after { content: ""; position: absolute; top: 16px; width: calc(50% - 24px); height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .82)); }
.horizon-guide::before { left: 0; }.horizon-guide::after { right: 0; transform: scaleX(-1); }
.horizon-guide i, .horizon-guide b, .horizon-guide span { position: absolute; background: rgba(255, 255, 255, .75); }
.horizon-guide i { top: 12px; left: 50%; width: 1px; height: 9px; }.horizon-guide b { top: 13px; left: calc(50% - 42px); width: 1px; height: 7px; }.horizon-guide span { top: 13px; right: calc(50% - 42px); width: 1px; height: 7px; }

/* Touch controls */
.mobile-controls { position: absolute; z-index: 21; inset: 0; pointer-events: none; }
.joystick { position: absolute; left: calc(15px + var(--safe-left)); bottom: calc(17px + var(--safe-bottom)); width: 126px; height: 126px; pointer-events: auto; touch-action: none; filter: drop-shadow(0 15px 30px rgba(0, 0, 0, .32)); }
.joystick-ring { position: absolute; inset: 0; border: 1px solid rgba(238, 220, 176, .27); border-radius: 50%; background: radial-gradient(circle at 50% 42%, rgba(230, 215, 176, .11), rgba(5, 12, 14, .62)); box-shadow: inset 0 0 38px rgba(255, 255, 255, .035), 0 0 0 8px rgba(3, 9, 11, .14); }
.joystick-ring::before, .joystick-ring::after { content: ""; position: absolute; top: 50%; left: 50%; background: rgba(255, 255, 255, .08); transform: translate(-50%, -50%); }.joystick-ring::before { width: 1px; height: 72%; }.joystick-ring::after { width: 72%; height: 1px; }
.joystick-knob { position: absolute; top: 36px; left: 36px; width: 54px; height: 54px; border: 1px solid rgba(255, 255, 255, .86); border-radius: 50%; background: radial-gradient(circle at 35% 27%, rgba(255, 255, 255, .94), rgba(191, 199, 190, .66)); box-shadow: 0 9px 28px rgba(0, 0, 0, .44), inset 0 -5px 12px rgba(0, 0, 0, .12); will-change: transform; }
.joystick-caption { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .5); font: 700 7px Georgia, serif; letter-spacing: .2em; text-shadow: 0 2px 6px #000; }
.flight-controls { position: absolute; top: 49%; right: calc(14px + var(--safe-right)); display: flex; flex-direction: column; align-items: center; gap: 7px; transform: translateY(-50%); pointer-events: auto; filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .34)); }
.lift-btn { width: 52px; height: 52px; border: 1px solid rgba(239, 220, 172, .28); border-radius: 16px; background: linear-gradient(145deg, rgba(18, 29, 32, .82), rgba(4, 11, 13, .76)); backdrop-filter: blur(14px); display: grid; place-items: center; align-content: center; touch-action: none; }
.lift-btn span { color: var(--gold-bright); font-size: 21px; line-height: 20px; }.lift-btn small { color: #bdc7c2; font-size: 7px; letter-spacing: .08em; }.lift-btn.active { transform: scale(.94); background: rgba(171, 128, 58, .87); }
.altitude-readout { min-width: 52px; padding: 6px 4px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; background: rgba(4, 10, 12, .68); backdrop-filter: blur(12px); text-align: center; }
.altitude-readout small, .altitude-readout strong { display: block; }.altitude-readout small { color: #81908b; font: 700 7px Georgia, serif; letter-spacing: .14em; }.altitude-readout strong { margin-top: 2px; color: var(--gold-bright); font: 700 11px Georgia, serif; }
.action-stack { position: absolute; right: calc(14px + var(--safe-right)); bottom: calc(15px + var(--safe-bottom)); display: flex; gap: 9px; pointer-events: auto; }
.round-btn { width: 56px; height: 56px; border: 1px solid rgba(238, 220, 176, .28); border-radius: 50%; background: linear-gradient(145deg, rgba(18, 29, 32, .82), rgba(5, 12, 14, .76)); box-shadow: 0 10px 28px rgba(0, 0, 0, .32); font-family: "Yu Mincho", serif; font-size: 17px; font-weight: 900; }
.round-btn small { display: block; margin-top: -1px; color: #a9b4af; font: 700 7px sans-serif; }.round-btn.active { color: #17140d; background: linear-gradient(145deg, #dfbd71, #987039); }.round-btn:active { transform: scale(.94); }
.speed-btn { color: var(--gold-bright); }.speed-btn::after { content: "速度"; display: block; margin-top: 1px; color: #a9b4af; font: 700 7px/1 sans-serif; }
.look-hint { position: absolute; right: calc(21px + var(--safe-right)); bottom: calc(84px + var(--safe-bottom)); padding: 5px 8px; border-radius: 9px; color: rgba(255, 255, 255, .62); background: rgba(4, 10, 12, .48); font-size: 8px; line-height: 1.5; text-align: center; text-shadow: 0 2px 6px #000; }
.flight-readout { position: absolute; top: calc(76px + var(--safe-top)); left: 50%; display: flex; align-items: center; gap: 8px; padding: 6px 10px; transform: translateX(-50%); border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; color: #aebbb7; background: rgba(4, 10, 12, .5); backdrop-filter: blur(12px); font: 700 7px Georgia, serif; letter-spacing: .12em; text-shadow: 0 1px 5px #000; }
.flight-readout span:first-child { color: var(--gold-bright); }.flight-readout i { width: 3px; height: 3px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.flight-crosshair { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); opacity: .26; }
.flight-crosshair::before, .flight-crosshair::after, .flight-crosshair i::before, .flight-crosshair i::after { content: ""; position: absolute; background: rgba(255, 255, 255, .74); box-shadow: 0 0 5px rgba(0, 0, 0, .7); }
.flight-crosshair::before { top: 16px; left: 0; width: 10px; height: 1px; }.flight-crosshair::after { top: 16px; right: 0; width: 10px; height: 1px; }.flight-crosshair i::before { top: 0; left: 16px; width: 1px; height: 10px; }.flight-crosshair i::after { bottom: 0; left: 16px; width: 1px; height: 10px; }.flight-crosshair b { position: absolute; top: 15px; left: 15px; width: 4px; height: 4px; border: 1px solid rgba(255, 255, 255, .8); border-radius: 50%; }

/* Modals */
.modal { position: absolute; z-index: 50; inset: 0; display: grid; place-items: center; padding: calc(20px + var(--safe-top)) calc(16px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(16px + var(--safe-left)); background: rgba(1, 5, 7, .74); backdrop-filter: blur(11px); animation: fadeIn .18s ease both; }
.modal-card { width: min(760px, 100%); max-height: 100%; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 23px; background: linear-gradient(145deg, #182527, #091113); box-shadow: 0 36px 110px rgba(0, 0, 0, .62); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 21px 14px; border-bottom: 1px solid var(--line); }
.modal-head small { color: var(--gold); font: 700 8px Georgia, serif; letter-spacing: .17em; }.modal-head h2 { margin: 4px 0 0; font-family: "Yu Mincho", serif; font-size: 23px; }
.modal-close { flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, .045); font-size: 23px; }
.modal-close:active { transform: scale(.95); background: rgba(255, 255, 255, .1); }
.map-stage { padding: 16px 18px 8px; }.map-stage svg { display: block; width: 100%; max-height: min(58vh, 560px); border-radius: 17px; filter: drop-shadow(0 13px 38px rgba(0, 0, 0, .3)); }
.map-pin { cursor: pointer; }.map-pin circle { fill: #8e2f27; stroke: #fff0d0; stroke-width: 5; transition: fill .15s ease; }.map-pin text { fill: #fff; font: 700 19px sans-serif; text-anchor: middle; pointer-events: none; }.map-label { fill: #423c32; font: 700 21px "Yu Mincho", serif; }
.map-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; color: #c7cfcb; font-size: 9px; }.map-legend span { display: flex; align-items: center; gap: 6px; }.map-legend i { width: 13px; height: 7px; border-radius: 3px; }.map-legend .blue { background: #78949d; }.map-legend .earth { background: #a49f79; }.map-legend .stone { background: #eee7d4; }
.map-note { margin: 0 18px 17px; color: #919d98; font-size: 9px; line-height: 1.6; }
.setting-scroll, .help-scroll, .about-scroll { max-height: calc(100dvh - 138px); overflow: auto; overscroll-behavior: contain; }
.setting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 18px; }
.setting-grid > label { min-width: 0; min-height: 74px; padding: 12px 13px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 13px; background: rgba(255, 255, 255, .025); display: flex; flex-direction: column; justify-content: space-between; gap: 9px; font-size: 11px; }
.setting-grid label > span { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; }.setting-grid label > span small { color: #86938e; font-size: 8px; font-weight: 500; }.setting-grid output { color: var(--gold-bright); font: 700 10px Georgia, serif; }
.setting-grid select { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: #fff; background: #0a1416; }
.setting-grid input[type="range"] { width: 100%; accent-color: var(--gold); }.setting-grid input[type="checkbox"] { flex: 0 0 auto; width: 25px; height: 25px; accent-color: var(--gold); }
.setting-grid .toggle-setting { min-height: 66px; flex-direction: row; align-items: center; justify-content: space-between; }.toggle-setting > span { display: flex !important; flex-direction: column; justify-content: center !important; }.toggle-setting b { color: #e9e8e0; font-size: 11px; }.comfort-setting { grid-column: 1 / -1; border-color: rgba(214, 179, 106, .23) !important; }
.setting-buttons { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; }.setting-buttons button { min-height: 43px; font-size: 10px; }.setting-buttons button:first-child { color: #17140d; background: linear-gradient(135deg, #d9b86c, #a47a39); border-color: #e4ca8c; }
.help-card { width: min(700px, 100%); }.help-scroll { padding: 18px; }.help-hero { display: flex; align-items: center; gap: 15px; padding: 16px; border: 1px solid rgba(214, 179, 106, .25); border-radius: 15px; background: linear-gradient(135deg, rgba(214, 179, 106, .1), rgba(255, 255, 255, .02)); }.help-hero > span { color: var(--gold-bright); font: 700 28px Georgia, serif; }.help-hero b { font-family: "Yu Mincho", serif; font-size: 15px; }.help-hero p { margin: 4px 0 0; color: #aab5b0; font-size: 10px; line-height: 1.6; }
.help-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }.help-grid article { min-width: 0; padding: 15px 10px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 13px; background: rgba(255, 255, 255, .025); text-align: center; }.help-grid i { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 9px; border: 1px solid var(--line); border-radius: 50%; color: var(--gold-bright); font-style: normal; }.help-grid b { display: block; font-size: 10px; }.help-grid p { margin: 4px 0 0; color: #899691; font-size: 8px; line-height: 1.5; }
.help-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }.help-modes > div { padding: 14px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 13px; }.help-modes span { color: var(--gold); font: 700 7px Georgia, serif; letter-spacing: .15em; }.help-modes b { display: block; margin-top: 4px; font-family: "Yu Mincho", serif; font-size: 13px; }.help-modes p { margin: 5px 0 0; color: #9eaaa5; font-size: 9px; line-height: 1.65; }.help-start { width: 100%; margin-top: 12px; border-radius: 12px; }
.about-card { width: min(680px, 100%); }.about-scroll { padding: 20px 22px 27px; }.about-scroll .lead { margin-top: 0; font-family: "Yu Mincho", serif; font-size: 17px; line-height: 1.8; }.about-scroll h3 { margin: 24px 0 7px; color: var(--gold-bright); font-size: 14px; }.about-scroll p, .about-scroll li { color: #cbd2cf; font-size: 11px; line-height: 1.9; }.confidence-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }.confidence-cards > div { padding: 13px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 13px; display: flex; flex-direction: column; gap: 6px; }.confidence-cards b { font-size: 11px; }.confidence-cards span { color: #9ea9a5; font-size: 9px; line-height: 1.65; }.small-note { padding: 13px; border-left: 3px solid var(--gold); background: rgba(255, 255, 255, .04); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.toast { position: absolute; z-index: 70; left: 50%; bottom: calc(92px + var(--safe-bottom)); max-width: min(520px, calc(100vw - 28px)); padding: 10px 15px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 999px; color: #edf0ea; background: rgba(5, 12, 14, .92); backdrop-filter: blur(16px); box-shadow: 0 13px 42px rgba(0, 0, 0, .42); font-size: 10px; line-height: 1.5; text-align: center; }
.restore-ui { position: absolute; z-index: 80; right: calc(16px + var(--safe-right)); top: calc(16px + var(--safe-top)); min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(5, 12, 14, .68); backdrop-filter: blur(14px); font-size: 10px; font-weight: 800; }
body.ui-hidden .hud, body.ui-hidden .timeline, body.ui-hidden .quick-nav, body.ui-hidden .mobile-controls, body.ui-hidden .desktop-hint, body.ui-hidden .camera-nav, body.ui-hidden .compass, body.ui-hidden .horizon-guide, body.ui-hidden .location-panel, body.ui-hidden .control-help { display: none !important; }

@media (hover: hover) and (pointer: fine) {
  .pill:hover, .icon-btn:hover, .camera-nav-btn:hover, .modal-close:hover { background: rgba(255, 255, 255, .1); }
  .quick-nav button:hover { transform: translateX(4px); border-color: rgba(240, 219, 157, .34); background: rgba(25, 37, 39, .84); }
  .map-pin:hover circle { fill: #b34536; }
  .primary:hover { filter: brightness(1.06); }
}

@media (max-width: 980px) {
  .timeline { width: min(340px, calc(100vw - 300px)); }
  .quick-nav button { width: 137px; }
  .desktop-hint { display: none !important; }
}

@media (max-width: 760px) {
  .desktop-only { display: none; }
  .intro { align-items: end; padding: calc(24px + var(--safe-top)) calc(18px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(18px + var(--safe-left)); }
  .intro-bg { background-position: 62% center; }
  .intro-shade { background: linear-gradient(0deg, rgba(2, 7, 9, .98) 0%, rgba(2, 7, 9, .82) 58%, rgba(2, 7, 9, .25) 100%); }
  .intro-grid { display: none; }
  .intro-content { margin: 0; }
  .intro-brandline { margin-bottom: 16px; }.intro-logo { width: 49px; height: 49px; border-radius: 12px; }.eyebrow { font-size: 8px; }.edition { font-size: 7px; }
  .intro h1 { gap: 11px; }.title-ja { font-size: clamp(54px, 17vw, 72px); }.title-year { font-size: clamp(24px, 7vw, 32px); }
  .subtitle { margin: 15px 0 8px; font-size: 18px; line-height: 1.5; }.intro-summary { max-width: 520px; font-size: 10px; line-height: 1.75; }
  .intro-features { width: 100%; margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); }.intro-features span { min-width: 0; padding: 8px 5px; border-right: 1px solid var(--line); text-align: center; font-size: 7px; }.intro-features b { display: block; margin: 0 0 2px; font-size: 11px; }
  .intro-actions { margin-top: 15px; }.intro-actions > * { flex: 1; min-width: 130px; }.primary { min-width: 0; }.intro-footnote { font-size: 8px; }.intro-coordinate { display: none; }

  .hud { align-items: flex-start; padding-left: calc(8px + var(--safe-left)); padding-right: calc(8px + var(--safe-right)); }
  .brand { min-height: 44px; padding: 4px; border-radius: 14px; }.brand-mark { width: 36px; height: 36px; }.brand-copy { display: none; }
  .hud-actions { padding: 3px; border-radius: 14px; }.pill, .icon-btn { min-height: 38px; }.pill { padding: 0 10px; font-size: 10px; }.icon-btn { min-width: 39px; padding: 4px 7px; }.icon-btn em { display: none; }.icon-btn svg { width: 16px; height: 16px; }
  .timeline { top: calc(59px + var(--safe-top)); left: calc(8px + var(--safe-left)); width: calc(100vw - 115px - var(--safe-left) - var(--safe-right)); padding: 7px 9px; transform: none; }.timeline-head span { font-size: 7px; }.timeline-labels { display: none; }
  .quick-nav { display: none !important; }
  .compass { top: calc(62px + var(--safe-top)); right: calc(9px + var(--safe-right)); width: 43px; height: 43px; }.compass::before { height: 30px; }.compass::after { width: 30px; }.compass small { display: none; }
  .flight-readout { top: calc(105px + var(--safe-top)); font-size: 6px; }
  .location-panel { top: auto; right: calc(9px + var(--safe-right)); bottom: calc(102px + var(--safe-bottom)); left: calc(9px + var(--safe-left)); width: auto; max-height: min(55dvh, 480px); padding: 16px; overflow: auto; }.location-panel h2 { margin-top: 9px; font-size: 22px; }.location-panel #locationDescription { font-size: 11px; line-height: 1.68; }.panel-actions { position: sticky; bottom: -16px; padding-top: 9px; background: linear-gradient(transparent, rgba(7, 14, 16, .97) 34%); }
  .camera-nav { bottom: calc(84px + var(--safe-bottom)); z-index: 20; }.camera-nav-btn { min-width: 48px; height: 42px; padding: 0 9px; }.camera-nav-btn b { display: none; }.camera-place { display: none; }
  .horizon-guide { width: 48vw; opacity: .14; }
  .control-help { bottom: calc(91px + var(--safe-bottom)); }.control-help span { white-space: normal; line-height: 1.5; }
  .joystick { width: 116px; height: 116px; }.joystick-knob { top: 33px; left: 33px; width: 50px; height: 50px; }
  .flight-controls { right: calc(12px + var(--safe-right)); }.action-stack { right: calc(12px + var(--safe-right)); bottom: calc(13px + var(--safe-bottom)); }.round-btn { width: 53px; height: 53px; }.look-hint { right: calc(18px + var(--safe-right)); bottom: calc(79px + var(--safe-bottom)); }
  .modal { align-items: end; padding: calc(12px + var(--safe-top)) calc(8px + var(--safe-right)) calc(8px + var(--safe-bottom)) calc(8px + var(--safe-left)); }.modal-card { width: 100%; max-height: min(91dvh, 780px); border-radius: 21px 21px 14px 14px; }.modal-head { padding: 15px 15px 11px; }.modal-head h2 { font-size: 20px; }.modal-close { width: 44px; height: 44px; }.map-stage { padding: 10px; }.map-stage svg { max-height: 49dvh; }.map-note { margin: 0 12px 13px; }
  .setting-scroll, .help-scroll, .about-scroll { max-height: calc(91dvh - 70px); }.setting-grid { grid-template-columns: 1fr; padding: 13px; }.comfort-setting { grid-column: auto; }.setting-buttons { padding: 0 13px 14px; }.setting-buttons button { flex: 1; min-width: 130px; }
  .help-scroll { padding: 13px; }.help-grid { grid-template-columns: 1fr 1fr; }.help-modes { grid-template-columns: 1fr; }.about-scroll { padding: 16px; }.confidence-cards { grid-template-columns: 1fr; }
  .toast { bottom: calc(92px + var(--safe-bottom)); border-radius: 14px; font-size: 9px; }
}

@media (min-width: 761px) { .mobile-controls { display: none !important; } }

@media (max-width: 760px) and (max-height: 650px) {
  .intro { align-items: center; }.intro-brandline { margin-bottom: 10px; }.intro-logo { width: 42px; height: 42px; }.title-ja { font-size: 48px; }.title-year { font-size: 23px; }.subtitle { margin: 10px 0 5px; font-size: 15px; }.intro-summary { font-size: 9px; line-height: 1.55; }.intro-features { margin-top: 8px; }.intro-actions { margin-top: 10px; }.intro-footnote { display: none; }
  .joystick { width: 94px; height: 94px; bottom: calc(10px + var(--safe-bottom)); }.joystick-knob { top: 26px; left: 26px; width: 42px; height: 42px; }.joystick-caption { display: none; }
  .flight-controls { top: 50%; gap: 5px; }.lift-btn { width: 43px; height: 43px; border-radius: 13px; }.altitude-readout { min-width: 43px; padding: 4px; }.action-stack { bottom: calc(9px + var(--safe-bottom)); }.round-btn { width: 47px; height: 47px; }.look-hint, .flight-readout, .control-help { display: none !important; }.camera-nav { bottom: calc(66px + var(--safe-bottom)); }.location-panel { bottom: calc(70px + var(--safe-bottom)); max-height: 64dvh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
