/* 「人生一番賞」海報色系與可讀性層；在既有樣式之後載入。 */
:root {
  --ink: #0d2141;
  --panel: #15345e;
  --panel-2: #1a3c6b;
  --line: #426292;
  --text: #fffdf3;
  --muted: #d5e3f4;
  --gold: #ffdb43;
  --gold-lite: #ffec8d;
  --green: #ffe778;
}
html { scroll-behavior: smooth; }
body { background: #0d2141; font-size: 16px; line-height: 1.5; }
button, a { -webkit-tap-highlight-color: rgba(255,219,67,.28); }
button:focus-visible, a:focus-visible { outline: 3px solid #ffdb43; outline-offset: 3px; }

/* Official poster is an image, not a background: preserve every printed detail. */
.cover {
  background: radial-gradient(ellipse at 81% 41%, #1c4279 0, #10294c 56%, #0b1d37 100%);
  gap: clamp(22px, 3.2vw, 48px);
}
.cover-photo { border-color: #7c9bd0; border-radius: 14px; box-shadow: 0 24px 68px #07142b9c; }
.cover-copy { padding-bottom: clamp(38px, 5vw, 72px); }
.cover-copy::before { height: 4px; width: 66px; background: #ffdb43; }
.cover-event { color: #ffeb83; font-size: 16px; letter-spacing: .035em; line-height: 1.55; font-weight: 650; }
.cover-title { color: #fffdf3; font-size: clamp(42px, 4.9vw, 76px); letter-spacing: .01em; }
.cover-subtitle { color: #ffdb43; font-size: clamp(23px, 2.35vw, 34px); }
.cover-description { max-width: 32em; color: #e8f0fc; font-size: 18px; line-height: 1.72; }
.cover-cta { min-height: 52px; padding: 13px 20px; background: #ffdb43; border-color: #ffe673; color: #10294c; border-radius: 10px; font-size: 16px; }
.cover-cta:hover { background: #ffea82; }
.cover-map-link { min-height: 48px; padding: 10px 3px; color: #fff8df; font-size: 15px; text-decoration-color: #ffdb43; }
.cover-stats { color: #ecf2fa; font-size: 13px; letter-spacing: .015em; }
.cover-scroll { color: #e2ecfa; font-size: 11px; }

.app { grid-template-rows: 86px minmax(0, 1fr) auto; }
.topbar { padding: 0 26px; background: #0d2548; border-bottom-color: #4c70a1; }
.mark { width: 42px; height: 42px; color: #ffdb43; border-color: #ffdb43; font-size: 24px; box-shadow: inset 0 0 0 4px #15345e; }
.brand-title { font-size: 20px; letter-spacing: .02em; }
.brand-sub { color: #d2e2f6; font-size: 11px; letter-spacing: .12em; }
.top-meta { color: #e4edfa; font-size: 13px; }
.top-meta b { color: #ffdb43; }
.content { grid-template-columns: minmax(365px, 27vw) minmax(0, 1fr); }
.sidebar { background: #102a4d; border-right-color: #41628c; }
.side-head { padding: 22px 20px 15px; border-bottom-color: #426292; }
.eyebrow { color: #ffdb43; font-size: 12px; letter-spacing: .1em; }
.side-head h1 { margin: 7px 0; font-size: 24px; }
.side-head p { color: #e2ebf8; font-size: 15px; line-height: 1.65; }
.map-card { padding: 17px 18px; border-bottom-color: #426292; }
.map-card-title { margin-bottom: 11px; }
.map-card-title b { font-size: 18px; }
.approx { color: #142c50; background: #ffec8d; border-color: #ffec8d; font-size: 12px; font-weight: 700; padding: 5px 9px; letter-spacing: 0; }
.map-area { border-color: #8498bd; border-radius: 8px; }
.map-point {
  width: 34px; height: 34px; padding: 0 2px;
  background: #123567; border: 2px solid #ffdb43; color: #fff5bf;
  border-radius: 9px; font-family: Inter, "Noto Sans TC", sans-serif;
  font-size: 13px; font-weight: 800; letter-spacing: 0;
}
.map-point.active { background: #ffdb43; color: #0f2d53; border-color: #fff5ae; }
.map-hint { align-items: flex-start; color: #e2ebf8; font-size: 14px; line-height: 1.5; }
.text-btn { color: #ffeb83; font-size: 14px; font-weight: 700; min-height: 38px; }
.scene-list { padding: 11px 12px; scrollbar-color: #6a83ab transparent; }
.scene-btn { grid-template-columns: 106px 1fr; gap: 13px; min-height: 77px; padding: 9px; margin-bottom: 6px; border-radius: 10px; }
.scene-btn:hover { background: #214575; }
.scene-btn.active { background: #234a80; border-color: #ffdb43; }
.scene-btn img { width: 106px; height: 59px; border-radius: 6px; }
.scene-num { margin-bottom: 5px; color: #ffe879; font-size: 12px; letter-spacing: .05em; }
.scene-name { color: #fff; font-size: 16px; line-height: 1.35; white-space: normal; }
.side-foot { color: #d5e3f4; border-top-color: #426292; font-size: 13px; padding: 13px 18px; line-height: 1.55; }
.stage { padding: 18px 20px; gap: 15px; background: #0b1a30; }
.viewer-wrap { border-color: #4b6f9e; border-radius: 12px; }
.viewer-tag { left: 16px; top: 16px; padding: 8px 11px; border-radius: 6px; border-color: #ffdb43; color: #ffeb83; background: #0a1b32de; font-size: 13px; letter-spacing: 0; }
.scene-caption { left: 18px; bottom: 15px; max-width: 75%; }
.scene-caption b { font-size: 20px; }
.scene-caption span { font-size: 14px; }
.current-label { color: #fff; font-size: 19px; }
.current-desc { color: #d5e3f4; font-size: 14px; }
.nav-btn { min-height: 48px; padding: 11px 16px; background: #193b69; border-color: #8099be; border-radius: 8px; font-size: 15px; font-weight: 700; }
.nav-btn:hover:not(:disabled) { background: #ffdb43; border-color: #ffdb43; color: #0d2548; }
.nav-btn:disabled { opacity: .56; }
.counter { color: #fff; min-width: 65px; font-size: 15px; font-weight: 700; }
.notice { background: #0b1d36; border-top-color: #426292; color: #d5e3f4; font-size: 12px; padding: 11px 18px; line-height: 1.5; }
.map-modal { background: #102a4d; border-color: #7692bb; }
.map-modal-head b { font-size: 22px; }
.map-modal-head span { color: #dce8f7; font-size: 14px; }
.close-btn { min-height: 44px; padding: 10px 15px; background: #224677; border-color: #8498bd; border-radius: 8px; font-size: 15px; }
.map-modal-note { color: #e2ebf8; font-size: 14px; }
.map-modal .map-point { min-width: 40px; min-height: 40px; font-size: 15px; }

@media (max-width: 820px) {
  .cover { gap: 0; padding: 12px 12px 0; }
  .cover-copy { padding: 30px 8px 45px; }
  .cover-event { font-size: 14px; }
  .cover-title { font-size: clamp(35px, 8vw, 52px); }
  .cover-subtitle { font-size: 23px; }
  .cover-description { margin-top: 15px; font-size: 16px; line-height: 1.65; }
  .cover-cta { font-size: 15px; min-height: 48px; }
  .cover-map-link { font-size: 15px; }
  .cover-stats { font-size: 12px; }
  .app { grid-template-rows: 74px auto auto; }
  .topbar { height: 74px; padding: 0 14px; }
  .brand-title { font-size: 16px; }
  .brand-sub { font-size: 10px; }
  .top-meta { font-size: 11px; }
  .stage { height: 64dvh; min-height: 420px; padding: 11px; gap: 10px; }
  .viewer-tag { left: 11px; top: 11px; font-size: 11px; }
  .scene-caption b { font-size: 17px; }
  .scene-caption span { font-size: 12px; }
  .controls-row { align-items: stretch; flex-direction: column; gap: 8px; }
  .current-label { font-size: 18px; }
  .current-desc { max-width: none; font-size: 13px; }
  .controls { justify-content: space-between; }
  .nav-btn { min-height: 43px; padding: 9px 14px; font-size: 14px; }
  .counter { font-size: 14px; }
  .side-head { padding: 19px 16px 12px; }
  .side-head h1 { font-size: 22px; }
  .side-head p { font-size: 15px; }
  .map-card { padding: 15px 16px; }
  .map-card-title b { font-size: 18px; }
  .map-hint { font-size: 14px; }
  .map-point { width: 32px; height: 32px; font-size: 12px; }
  .scene-list { gap: 8px; padding: 13px 12px 17px; }
  .scene-btn { flex-basis: 166px; min-height: 130px; padding: 8px; gap: 7px; }
  .scene-btn img { width: 100%; height: 78px; }
  .scene-num { font-size: 12px; }
  .scene-name { font-size: 15px; }
  .notice { font-size: 12px; }
  .map-modal-inner { padding: 14px; }
  .map-modal-head b { font-size: 18px; }
  .map-modal-head span { font-size: 13px; }
  .map-modal .map-point { width: 35px; height: 35px; min-width: 35px; min-height: 35px; font-size: 12px; }
}
@media (max-width: 405px) {
  .top-meta { display: none; }
  .stage { height: 63dvh; min-height: 405px; }
  .nav-btn { padding: 8px 12px; }
  .counter { min-width: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* 場地圖固定使用完整原圖的 16:9 畫框；避免舊手機樣式把高度拉長，令 01–09 垂直跑位。 */
#miniMap.map-area,
#modalMap.map-area {
  width: 100%;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}
#miniMap.map-area > img,
#modalMap.map-area > img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
}

/* 地圖優先：按 01–09 以前不顯示或載入全景。 */
#tour.app { display: block; height: auto; min-height: 100dvh; }
#tour .topbar { min-height: 86px; }
#tour .content { display: block; }
.map-overview { padding: 28px clamp(18px, 5vw, 78px) 34px; background: #102a4d; border-bottom: 1px solid #41628c; }
.map-overview .side-head { max-width: 1010px; margin-inline: auto; padding: 0 0 18px; border: 0; }
.map-overview .side-head h1 { margin: 9px 0 7px; font-size: clamp(25px, 2.4vw, 34px); }
.map-overview .side-head p { font-size: 17px; }
.map-overview .map-card { max-width: 1010px; margin-inline: auto; padding: 0; border: 0; }
.map-overview .map-card-title { margin-bottom: 11px; }
.map-overview .map-area { width: min(100%, 960px); max-width: 960px; margin-inline: auto; box-shadow: 0 12px 35px #07152e70; }
.map-overview .map-hint { width: min(100%, 960px); margin: 11px auto 0; }
.map-overview .map-point { width: 42px; height: 42px; font-size: 16px; }
#tourBody[hidden] { display: none !important; }
.tour-body { display: grid; grid-template-columns: minmax(330px, 28vw) minmax(0, 1fr); min-height: 650px; }
.tour-body .sidebar { min-height: 610px; }
.scene-list-heading { display: flex; justify-content: space-between; align-items: center; padding: 20px 20px 13px; color: #fff; font-size: 20px; font-weight: 750; border-bottom: 1px solid #426292; }
.scene-list-heading span { color: #ffdb43; font-size: 14px; font-weight: 650; }
.tour-body .stage { min-height: 610px; grid-template-rows: minmax(470px, 1fr) auto 2px; }
.tour-body .viewer-wrap { min-height: 470px; }
#viewerStage { scroll-margin-top: 16px; }
@media (max-width: 820px) {
  #tour.app { min-height: 0; }
  #tour .topbar { min-height: 74px; }
  .map-overview { padding: 22px 14px 23px; }
  .map-overview .side-head { padding: 0 2px 12px; }
  .map-overview .side-head h1 { font-size: 25px; }
  .map-overview .side-head p { font-size: 16px; }
  .map-overview .map-card-title b { font-size: 18px; }
  .map-overview .map-hint { gap: 10px; font-size: 14px; }
  .map-overview .map-point { width: 32px; height: 32px; font-size: 12px; }
  .tour-body { display: flex; flex-direction: column; min-height: 0; }
  .tour-body .stage { order: 0; height: 72dvh; min-height: 470px; grid-template-rows: minmax(0, 1fr) auto 2px; }
  .tour-body .viewer-wrap { min-height: 0; }
  .tour-body .sidebar { order: 1; min-height: 0; }
  .scene-list-heading { font-size: 18px; padding: 16px; }
  #viewerStage { scroll-margin-top: 0; }
}
@media (max-width: 405px) {
  .map-overview .side-head h1 { font-size: 23px; }
  .map-overview .map-hint { flex-wrap: wrap; }
  .tour-body .stage { height: 68dvh; min-height: 450px; }
}

.viewer-map-btn {
  position: absolute; z-index: 6; top: 14px; right: 14px;
  min-height: 44px; padding: 8px 14px;
  border: 1px solid #ffe778; border-radius: 8px;
  background: #102d54e8; color: #fff3a8;
  font-size: 15px; font-weight: 700; cursor: pointer;
  backdrop-filter: blur(8px);
}
.viewer-map-btn:hover { background: #ffdb43; color: #112c52; }
@media (max-width: 820px) {
  .viewer-map-btn { top: 10px; right: 10px; min-height: 42px; font-size: 13px; padding: 7px 11px; }
}

/* Pannellum 自帶標題與本站的場景標題重疊，只保留本站的一份。 */
.viewer-wrap .pnlm-panorama-info { display: none !important; }
