/* ============================================================
   設計語彙：冷調臨床白、單一品牌藍；潔淨藍／汙物橘只在有意義處出現。
   最醒目的元素是「電梯面板」式的樓層數字（Roboto Light）。
   ============================================================ */
body.page-logistics { height: 100vh; overflow: hidden; }

/* ---------- 版面 ---------- */
.layout { height: calc(100vh - var(--head-h)); display: grid; grid-template-columns: 220px 1fr 380px; }

/* ---------- 樓層：電梯面板 ---------- */
.floors { background: var(--surface); border-right: 1px solid var(--line); padding: 28px 20px 20px; display: flex; flex-direction: column; overflow-y: auto; }
.nav-title { font-size: 13px; color: var(--muted); padding: 0 0 14px 4px; }
#floor-nav { position: relative; display: flex; flex-direction: column; }
#floor-nav::before { /* 梯井線 */
  content: ""; position: absolute; left: 13px; top: 22px; bottom: 22px; width: 1px; background: var(--line);
}
.floor-btn {
  position: relative; display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; align-items: start;
  text-align: left; width: 100%; padding: 12px 6px 14px 0; border-radius: 10px;
}
.floor-btn::before { /* 樓層點 */
  content: ""; grid-row: 1 / span 2; justify-self: center; margin-top: 14px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 1.5px solid #BCC8D0;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.floor-btn .code {
  font-family: var(--en); font-weight: 300; font-size: 30px; line-height: 1.15; letter-spacing: -.01em;
  color: #9AA8B2; transition: color .3s var(--ease);
}
.floor-btn .meta { grid-column: 2; display: flex; flex-direction: column; gap: 6px; }
.floor-btn .meta b { font-family: var(--zh); font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color .3s var(--ease); }
.floor-btn > .code { grid-column: 2; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-family: var(--zh); font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 6px;
  color: color-mix(in srgb, var(--c) 82%, black); background: color-mix(in srgb, var(--c) 9%, white);
}
.floor-btn:hover .code { color: var(--ink-2); }
.floor-btn.visible::before { background: var(--brand); border-color: var(--brand); transform: scale(1.35); box-shadow: 0 0 0 4px var(--wash); }
.floor-btn.visible .code { color: var(--brand-deep); font-weight: 400; }
.floor-btn.visible .meta b { color: var(--ink); }
.floor-btn.context:not(.visible)::before { border-color: var(--brand); }
.nav-note { margin-top: auto; font-size: 12px; line-height: 1.8; color: var(--muted); padding: 24px 4px 0; }

/* ---------- 舞台 ---------- */
.stage-wrap { position: relative; overflow: hidden; background: var(--stage); }
#stage { position: absolute; inset: 0; }
#stage canvas { display: block; }
#stage canvas, .label-layer { transition: opacity .28s var(--ease); }
#stage.fading canvas, #stage.fading .label-layer { opacity: 0; transition-duration: .18s; }
.label-layer { position: absolute; inset: 0; pointer-events: none; }

.zlabel {
  pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 6px;
  font-family: var(--zh); font-size: 12px; color: var(--ink-2); white-space: nowrap;
  background: rgba(255,255,255,.94); border-radius: 99px; padding: 3px 10px 3px 7px;
  box-shadow: 0 1px 2px rgba(20,36,48,.08); transition: background .2s, color .2s;
}
.zlabel i { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.zlabel:hover { color: var(--brand-deep); }
.zlabel.active { background: var(--brand-deep); color: #fff; }
.zlabel.subtle { pointer-events: none; background: transparent; box-shadow: none; font-size: 11px; color: var(--muted); }
.elabel { font-family: var(--zh); font-size: 11px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,.94); padding: 2px 8px 2px 3px; border-radius: 6px; white-space: nowrap; }
.elabel b { color: #fff; font: 500 10px var(--en); padding: 1px 5px; border-radius: 4px; }
.pinlabel { font-family: var(--zh); font-size: 11px; font-weight: 500; color: var(--c); background: #fff; box-shadow: inset 0 0 0 1.5px var(--c); padding: 1px 8px; border-radius: 99px; }

.crumb {
  position: absolute; top: 18px; left: 20px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  font-family: var(--zh); font-size: 13px; max-width: calc(100% - 420px);
}
.crumb button { padding: 4px 8px; border-radius: 6px; color: var(--ink-2); transition: background .2s, color .2s; }
.crumb button:hover { background: rgba(255,255,255,.8); color: var(--brand-deep); }
.crumb span { font-weight: 500; padding: 4px 8px; color: var(--ink); }
.crumb em { font-style: normal; color: #B3BEC6; }

.tools { position: absolute; top: 16px; right: 20px; display: flex; gap: 8px; align-items: center; }
.tools button, .playback button {
  font-family: var(--zh); font-size: 13px; padding: 7px 13px; border-radius: 8px;
  background: rgba(255,255,255,.92); color: var(--ink-2); box-shadow: 0 1px 2px rgba(20,36,48,.08);
  transition: background .2s, color .2s;
}
.tools button:hover, .playback button:hover { color: var(--brand-deep); background: #fff; }
.tools button.on { color: var(--brand-deep); background: var(--wash); }
.tools .seg { position: relative; display: flex; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.92); box-shadow: 0 1px 2px rgba(20,36,48,.08); margin-right: 4px; }
.tools .seg button { background: none; box-shadow: none; padding: 5px 12px; position: relative; z-index: 1; }
.tools .seg button.on { color: #fff; background: var(--brand-deep); }
.plan-mode #tool-net { opacity: .45; pointer-events: none; }
.net-legend {
  position: absolute; top: 64px; right: 20px; display: flex; flex-direction: column; gap: 6px;
  background: rgba(255,255,255,.95); border-radius: 10px; padding: 12px 14px; font-family: var(--zh); font-size: 12px; color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(20,36,48,.08);
}
.net-legend span { display: flex; align-items: center; gap: 10px; }
.net-legend i { width: 18px; height: 3px; border-radius: 2px; }
.net-legend i.ring.door { width: 9px; height: 9px; border-radius: 50%; background: #0F5F86; margin: 0 4.5px; }

.toasts { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast {
  font-family: var(--zh); font-size: 13px; padding: 7px 16px; border-radius: 99px; background: var(--ink); color: #fff; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(20,36,48,.16); animation: tin .3s var(--ease); transition: opacity .4s, transform .4s var(--ease);
}
.toast.door { background: #0F5F86; }
.toast.elev { background: #5B4AA8; }
.toast.ok { background: var(--ok); }
.toast.out { opacity: 0; transform: translateY(-6px); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px) scale(.98); } }

.status {
  position: absolute; left: 20px; bottom: 20px; width: 240px; background: rgba(255,255,255,.96);
  border-radius: 12px; padding: 14px 16px; font-family: var(--zh); font-size: 13px; box-shadow: 0 6px 20px rgba(20,36,48,.08);
}
.st-top { display: flex; align-items: center; gap: 8px; }
.st-top i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.st-top b { font: 500 14px var(--en); }
.st-top span { margin-left: auto; font: 400 13px var(--en); color: var(--brand-deep); }
.st-state { margin: 4px 0 10px; color: var(--ink-2); }
.bar { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar span { display: block; height: 100%; transition: width .15s linear; }
.status small { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; }

.playback { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; }
.playback #btn-play { background: var(--brand-deep); color: #fff; min-width: 88px; }
.playback .follow.on { background: var(--wash); color: var(--brand-deep); }
.speed { display: flex; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.92); box-shadow: 0 1px 2px rgba(20,36,48,.08); }
.speed button { background: none; box-shadow: none; padding: 4px 10px; font-family: var(--en); }
.speed button.on { background: var(--wash); color: var(--brand-deep); }

/* ---------- 右側面板 ---------- */
.panel { background: var(--surface); border-left: 1px solid var(--line); padding: 36px 32px 40px; overflow-y: auto; font-family: var(--zh); }
.panel.enter > * { animation: rise .42s var(--ease) both; }
.panel.enter > *:nth-child(2) { animation-delay: .03s; }
.panel.enter > *:nth-child(3) { animation-delay: .06s; }
.panel.enter > *:nth-child(n+4) { animation-delay: .09s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.floor-head h2 { margin: 0 0 14px; font-size: 22px; font-weight: 500; display: flex; align-items: baseline; gap: 14px; }
.floor-head h2 b { font: 300 52px/1 var(--en); letter-spacing: -.02em; color: var(--brand-deep); }
.lead { margin: 0; font-size: 14px; line-height: 1.85; color: var(--ink-2); max-width: 34em; }
.sec { margin: 36px 0 12px; font-size: 13px; font-weight: 500; color: var(--muted); }

.zones { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.zone-btn {
  width: 100%; text-align: left; display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 8px 10px; margin-left: -10px; border-radius: 8px; font-size: 14px; color: var(--ink);
  transition: background .2s, color .2s;
}
.zone-btn em { font: 400 12px var(--en); font-style: normal; color: var(--brand); }
.zone-btn:hover { background: var(--paper); }
.zone-btn.on { background: var(--wash); color: var(--brand-deep); font-weight: 500; }
.zone-info { margin: 14px 0 0; font-size: 13px; line-height: 1.8; color: var(--ink-2); padding-left: 12px; border-left: 2px solid var(--brand); animation: rise .35s var(--ease); }

.scs { display: flex; flex-direction: column; gap: 4px; }
.sc-card {
  position: relative; text-align: left; display: flex; flex-direction: column; gap: 3px;
  padding: 14px 14px 14px 18px; margin-left: -14px; border-radius: 10px; transition: background .25s var(--ease);
}
.sc-card::before { content: ""; position: absolute; left: 4px; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--c); transition: top .25s var(--ease), bottom .25s var(--ease); }
.sc-card:hover { background: var(--paper); }
.sc-card:hover::before { top: 12px; bottom: 12px; }
.sc-top { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.sc-top .who { font-family: var(--en); font-weight: 500; color: var(--c); }
.sc-top .cross { color: var(--muted); }
.sc-card b { font-size: 15px; font-weight: 500; }
.sc-route { font-size: 13px; color: var(--muted); }
.empty { font-size: 13px; color: var(--muted); }

.back { font-size: 13px; color: var(--muted); margin: -8px 0 24px -6px; padding: 4px 8px; border-radius: 6px; transition: background .2s, color .2s; }
.back:hover { color: var(--brand-deep); background: var(--paper); }
.back span { font-size: 16px; margin-right: 2px; }
.sc-head .who { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 500 13px var(--en); color: var(--c); }
.sc-head .who i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.sc-head h2 { margin: 0 0 14px; font-size: 24px; font-weight: 500; line-height: 1.4; }
.facts { margin: 28px 0 0; display: flex; flex-direction: column; gap: 12px; }
.facts div { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: baseline; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; font-size: 13px; color: var(--ink); }
.route { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.route em { font-style: normal; color: #B3BEC6; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.steps li { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; font-size: 13.5px; line-height: 1.7; color: var(--muted); padding: 8px 0; transition: color .3s var(--ease); }
.steps .n {
  width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); font: 400 11px var(--en); transition: background .3s var(--ease), color .3s, box-shadow .3s;
}
.steps li.done { color: var(--ink-2); }
.steps li.done .n { box-shadow: inset 0 0 0 1px #9CCDE5; color: var(--brand-deep); }
.steps li.active { color: var(--ink); }
.steps li.active .n { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--wash); }
.note { margin-top: 36px; font-size: 12px; line-height: 1.8; color: var(--muted); }


/* ---------- 結果頁：人事時地物 ---------- */
.res-head { margin-bottom: 28px; }
.res-ok { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--ok); }
.res-ok svg { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 12%, white); }
.res-head h2 { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.4; }
.w5 { margin: 0; display: flex; flex-direction: column; }
.w5 > div { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: baseline; padding: 14px 0; }
.w5 > div + div { box-shadow: 0 -1px 0 var(--line); }
.w5 dt { font: 300 26px/1.2 var(--en); color: var(--c); }
html[lang="en"] .w5 dt, html[lang="ja"] .w5 dt { font-size: 13px; font-weight: 500; line-height: 1.9; }
.w5 dd { margin: 0; font-size: 14px; line-height: 1.8; color: var(--ink); }
.w5 dd b { font: 500 15px var(--en); }
.w5 .sub { display: block; font-size: 12.5px; color: var(--muted); }
.w5 .handover { display: block; margin-top: 4px; }
.w5 .handover em { font-style: normal; color: var(--muted); margin: 0 6px; }
.panel.enter .w5 > div { animation: rise .45s var(--ease) both; }
.panel.enter .w5 > div:nth-child(2) { animation-delay: .06s; }
.panel.enter .w5 > div:nth-child(3) { animation-delay: .12s; }
.panel.enter .w5 > div:nth-child(4) { animation-delay: .18s; }
.panel.enter .w5 > div:nth-child(5) { animation-delay: .24s; }
.metrics { list-style: none; margin: 28px 0 0; padding: 18px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; box-shadow: 0 -1px 0 var(--line); }
.metrics li { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 3px; }
.metrics b { font: 300 30px/1.1 var(--en); color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.metrics small { font-size: 12px; color: var(--ink-2); }
.metrics span { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.res-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.res-actions button, .to-result {
  font-size: 13.5px; padding: 9px 14px; border-radius: 9px; color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, color .2s, box-shadow .2s;
}
.res-actions button:hover, .to-result:hover { color: var(--brand-deep); box-shadow: inset 0 0 0 1px var(--hit-hover); }
.res-actions .primary { background: var(--brand-deep); color: #fff; box-shadow: none; }
.res-actions .primary:hover { background: var(--brand-press); color: #fff; box-shadow: none; }
.to-result { margin-top: 16px; color: var(--brand-deep); }

/* ---------- 窄螢幕 ---------- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 190px 1fr 330px; }
  .panel { padding: 28px 24px; }
}
@media (max-width: 860px) {
  body.page-logistics { height: auto; overflow: auto; }
  .layout { height: auto; display: flex; flex-direction: column; }
  .floors { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .nav-title, .nav-note, #floor-nav::before, .floor-btn::before, .chips { display: none; }
  #floor-nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .floor-btn { display: flex; gap: 8px; align-items: baseline; flex: none; width: auto; padding: 6px 12px; }
  .floor-btn .code { font-size: 22px; }
  .floor-btn.visible { background: var(--wash); }
  .stage-wrap { height: 62vh; }
  .crumb { max-width: calc(100% - 32px); top: 64px; left: 12px; }
  .tools { right: 12px; left: 12px; justify-content: flex-end; flex-wrap: wrap; }
  .status { width: 200px; left: 12px; bottom: 12px; }
  .panel { border-left: 0; padding: 24px 16px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; animation: none !important; }
}

/* 機器人頭頂光標：名稱膠囊＋向下的針，底端對準機器人頭頂 */
.rpin { pointer-events: none; }
.rpin-in { display: flex; flex-direction: column; align-items: center; transform: translateY(-50%); }
.rpin-in b { font: 500 11px var(--en); color: #fff; background: var(--c); padding: 3px 10px; border-radius: 99px; box-shadow: 0 3px 8px rgba(0,0,0,.2); white-space: nowrap; }
.rpin-in i { width: 2px; height: 16px; background: var(--c); }
.rpin-in i::after { content: ''; display: block; width: 8px; height: 8px; margin: 14px 0 0 -3px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); animation: rpin 1.6s ease-in-out infinite; }
@keyframes rpin { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--c) 12%, transparent); } }
@media (prefers-reduced-motion: reduce) { .rpin-in i::after { animation: none; } }
/* 機器人光標永遠在最上層（CSS2D 會依遠近設定 z-index，這裡強制蓋過區域標籤） */
.label-layer .rpin { z-index: 9999 !important; }

/* 醫院外觀：建築上的樓層標籤與右側樓層清單 */
.ext-tag { pointer-events: auto; display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px 5px 8px; border: 0; border-radius: 999px; background: rgba(255,255,255,.94); box-shadow: 0 2px 10px rgba(20,40,60,.16); font: 500 12px/1.2 var(--sans, inherit); color: var(--ink, #1E2328); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.ext-tag b { font: 600 13px/1 var(--en, inherit); color: var(--brand-deep); }
.ext-tag:hover, .ext-tag:focus-visible { background: var(--brand-deep); color: #fff; outline: none; }
.ext-tag:hover b, .ext-tag:focus-visible b { color: #fff; }
.ext-head h2 { font-size: 26px; }
.ext-floors { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 2px; }
.ext-floors button { width: 100%; display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 4px; align-items: baseline; padding: 10px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ext-floors button:hover { background: var(--hover, rgba(18,138,190,.07)); }
.ext-floors b { grid-row: span 2; font: 300 26px/1 var(--en, inherit); color: var(--brand-deep); }
.ext-floors .nm { font-weight: 500; }
.ext-floors .chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* 開場動畫的略過鈕 */
.intro-skip { position: absolute; right: 16px; bottom: 16px; z-index: 5; padding: 7px 14px; border: 0; border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 2px 10px rgba(20,40,60,.14); font: 500 12px/1 inherit; color: var(--muted, #5B6670); cursor: pointer; }
.intro-skip:hover { color: var(--brand-deep); }

/* 結果頁精簡：數字放前面、條列收緊、操作按鈕固定在面板底部，不用往下滑 */
.panel.is-result { padding-top: 22px; padding-bottom: 0; }
.panel.is-result .back { margin-bottom: 12px; }
.is-result .res-head { margin-bottom: 14px; }
.is-result .res-ok { margin-bottom: 6px; }
.is-result .res-head h2 { font-size: 20px; line-height: 1.35; }
.is-result .metrics { margin: 0 0 6px; padding: 12px 0; box-shadow: 0 -1px 0 var(--line), 0 1px 0 var(--line); }
.is-result .metrics b { font-size: 24px; }
.is-result .w5 > div { grid-template-columns: 40px 1fr; gap: 12px; padding: 9px 0; }
.is-result .w5 dt { font-size: 19px; line-height: 1.5; }
html[lang="en"] .is-result .w5 dt, html[lang="ja"] .is-result .w5 dt { font-size: 12px; line-height: 2; }
.is-result .w5 dd { font-size: 13.5px; line-height: 1.65; }
.is-result .w5 dd b { font-size: 14px; }
.is-result .note { margin: 10px 0 0; font-size: 11.5px; line-height: 1.7; }
.is-result .res-actions { position: sticky; bottom: 0; z-index: 2; margin: 14px -32px 0; padding: 14px 32px 18px; background: var(--surface); box-shadow: 0 -1px 0 var(--line); }

/* 結果頁：人、機、環、流（簡約條列：左側大字、細分隔線，只用機器人色當重點色） */
.r4-list { display: flex; flex-direction: column; }
.r4 { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: baseline; padding: 10px 0; }
.r4 + .r4 { box-shadow: 0 -1px 0 var(--line); }
.r4-k { font: 300 22px/1.3 var(--zh); color: var(--c); }
html[lang="en"] .r4 { grid-template-columns: 84px 1fr; }
html[lang="en"] .r4-k { font: 500 12.5px/1.9 var(--en); }
.r4-v { min-width: 0; font-size: 13.5px; line-height: 1.65; color: var(--ink); }
.r4-v p { margin: 0; }
.r4-v .sub { display: block; font-size: 12.5px; color: var(--muted); }
.r4-v .robots { font: 500 14px var(--en); }
.r4-v .handover em { font-style: normal; color: var(--muted); margin: 0 6px; }
.r4-v .route { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; }
.r4-v .route em { font-style: normal; color: var(--muted); }
.r4-v .clss { display: inline-flex; flex-wrap: wrap; gap: 10px; margin-left: 10px; }
.r4-v .cls { display: inline-flex; align-items: center; gap: 5px; }
.r4-v .cls::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--d); }
.r4-v .kv { list-style: none; margin: 6px 0 0; padding: 0; display: flex; gap: 20px; }
.r4-v .kv li { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 3px; }
.r4-v .kv b { font: 300 20px/1.15 var(--en); color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.r4-v .kv small { font-size: 11.5px; color: var(--ink-2); }
.r4-v .kv span { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); }
.r4-v .chain { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 2px; font-size: 12.5px; color: var(--muted); }
.r4-v .chain li + li::before { content: "→"; margin: 0 5px 0 3px; }
.panel.enter .r4 { animation: rise .45s var(--ease) both; }
.panel.enter .r4:nth-child(2) { animation-delay: .06s; }
.panel.enter .r4:nth-child(3) { animation-delay: .12s; }
.panel.enter .r4:nth-child(4) { animation-delay: .18s; }
.is-result .res-head { margin-bottom: 8px; }
.panel.is-result { padding-top: 16px; }
.panel.is-result .back { margin-bottom: 8px; }
.is-result .note { margin-top: 6px; line-height: 1.6; }
.is-result .res-actions { padding-top: 12px; padding-bottom: 14px; }

/* 交管讓行：機器人光標上方出現小標籤 */
.rpin-y { display: none; margin-bottom: 4px; padding: 2px 8px; border-radius: 99px; background: #fff; color: #B87A1F; box-shadow: 0 2px 6px rgba(0,0,0,.15), inset 0 0 0 1px #EBD3AE; font: 500 10.5px/1.3 var(--zh); font-style: normal; white-space: nowrap; }
.rpin.yield .rpin-y { display: block; }

/* ---------- 可點擊元素區隔：白底細框線＋右側箭頭，滑過時框線轉品牌色 ---------- */
.floor-btn { transition: background .2s; }
.floor-btn:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.zones { gap: 6px 8px; }
.zone-btn {
  margin-left: 0; padding: 9px 10px 9px 12px; border-radius: 10px; align-items: center;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hit-line); transition: box-shadow .2s, background .2s, color .2s;
}
.zone-btn > span { flex: 1; min-width: 0; }
.zone-btn::after { content: "›"; font-size: 16px; line-height: 1; color: var(--muted); transition: transform .2s, color .2s; }
.zone-btn:hover { background: var(--surface); color: var(--brand-deep); box-shadow: inset 0 0 0 1px var(--hit-hover); }
.zone-btn:hover::after { color: var(--brand-deep); transform: translateX(2px); }
.zone-btn.on { background: var(--wash); box-shadow: inset 0 0 0 1.5px var(--brand); }
.scs { gap: 8px; }
.sc-card {
  margin-left: 0; padding: 13px 34px 13px 18px; border-radius: 12px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hit-line); transition: box-shadow .2s, background .2s;
}
.sc-card::after { content: "›"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; line-height: 1; color: var(--muted); transition: transform .2s, color .2s; }
.sc-card:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hit-hover), 0 4px 14px rgba(20,36,48,.06); }
.sc-card:hover::after { color: var(--brand-deep); transform: translate(3px, -50%); }
.ext-floors { gap: 6px; }
.ext-floors button { position: relative; padding-right: 34px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hit-line); transition: box-shadow .2s; }
.ext-floors button::after { content: "›"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--muted); }
.ext-floors button:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hit-hover), 0 4px 14px rgba(20,36,48,.06); }
.back { margin-left: 0; padding: 5px 12px 5px 9px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hit-line); }
.back:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hit-hover); }
.crumb button { background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px var(--hit-line); }
.crumb button:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--hit-hover); }
.tools button, .playback button { box-shadow: inset 0 0 0 1px var(--hit-line), 0 1px 2px rgba(20,36,48,.06); }
.tools button:hover, .playback button:hover { box-shadow: inset 0 0 0 1px var(--hit-hover), 0 1px 2px rgba(20,36,48,.06); }
.tools .seg { box-shadow: inset 0 0 0 1px var(--hit-line), 0 1px 2px rgba(20,36,48,.06); }
.tools .seg button, .tools .seg button:hover { box-shadow: none; }
.playback #btn-play, .tools button.on { box-shadow: none; }
.ext-tag { box-shadow: 0 2px 10px rgba(20,40,60,.16), inset 0 0 0 1px var(--hit-hover); }

/* 外觀模式：不顯示右側面板，3D 區延伸到右緣 */
body.ext-mode .layout { grid-template-columns: 220px 1fr 0; }
body.ext-mode .panel { display: none; }

/* 情境卡片：左側機器人色條直接蓋在卡片左邊框上（跟著圓角），不再內縮 */
.sc-card::before { display: none; }
.sc-card { box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1px var(--hit-line); }
.sc-card:hover { box-shadow: inset 4px 0 0 var(--c), inset 0 0 0 1px var(--hit-hover), 0 4px 14px rgba(20,36,48,.06); }
@media (max-width: 1180px) { body.ext-mode .layout { grid-template-columns: 190px 1fr 0; } }

/* 物流頁的載入畫面：蓋住頁首以下整個區域；3D 與標籤層都包在 .layout 的堆疊裡，不會穿出載入畫面 */
.layout { isolation: isolate; }
.boot { position: fixed; inset: var(--head-h) 0 0 0; z-index: 60; }

/* ============================================================
   2026-11 調整：直接進樓層、選中樓層更明顯、情境卡「開始模擬」、任務完成橫幅、引導卡、手機版結果彈窗
   ============================================================ */
/* 右側：樓層說明條列 */
.floor-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.floor-points li { position: relative; padding-left: 16px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.floor-points li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* 情境卡：標題改成行動句，卡片右下角放明顯的「開始模擬」 */
.sec-pick { font-size: 15px; font-weight: 500; color: var(--ink); margin-top: 32px; }
.sc-card { padding: 14px 16px 14px 18px; gap: 4px; transition: box-shadow .2s, transform .2s var(--ease); }
.sc-card::after { display: none; }
.sc-card:hover { transform: translateY(-2px); }
.sc-go {
  align-self: flex-start; margin-top: 8px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px 6px 10px; border-radius: 99px; background: var(--c); color: #fff; font-size: 13px; font-weight: 500;
  transition: filter .2s, gap .2s;
}
.sc-go svg { width: 12px; height: 12px; fill: currentColor; }
.sc-card:hover .sc-go { filter: brightness(1.08); gap: 8px; }
.sc-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 模擬中、結果頁的機器人名稱 */
.res-head .who { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font: 500 13px var(--en); color: var(--c); }
.res-head .who i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* 任務完成：整條綠色橫幅 */
.res-banner {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 14px; border-radius: 12px;
  background: var(--ok); color: #fff; animation: bannerIn .5s var(--ease) both;
}
.res-banner b { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; }
.res-banner small { display: block; font-size: 12.5px; opacity: .92; line-height: 1.5; }
.res-check { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); }
.res-check svg { width: 22px; height: 22px; }
.res-check path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: tick .45s .2s var(--ease) forwards; }
@keyframes bannerIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes tick { to { stroke-dashoffset: 0; } }
.is-result .res-head { margin-bottom: 6px; }

/* 結果頁按鈕：看其他情境（主要）＋重播圖示 */
.res-actions { align-items: center; }
.res-actions .primary { flex: 1; padding: 11px 16px; font-size: 14px; }
.res-actions .icon-btn { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border-radius: 10px; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 引導卡：蓋在 3D 區上方 */
.guide { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 16px; background: rgba(237,241,243,.55); backdrop-filter: blur(2px); animation: fadeIn .3s var(--ease); }
.guide[hidden] { display: none; }
.guide-card { width: min(340px, 100%); background: var(--surface); border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 18px 48px rgba(20,36,48,.18); font-family: var(--zh); animation: rise .4s var(--ease) both; }
.guide-card h2 { margin: 0 0 14px; font-size: 17px; font-weight: 700; }
.guide-card ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: g; }
.guide-card li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-2); }
.g-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--wash); color: var(--brand-deep); }
.g-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.guide-card li:nth-child(2) .g-ico svg { fill: currentColor; }
.guide-ok { width: 100%; padding: 10px 0; border-radius: 10px; background: var(--brand-deep); color: #fff; font-size: 14px; font-weight: 500; transition: background .2s; }
.guide-ok:hover { background: var(--brand-press); }
@keyframes fadeIn { from { opacity: 0; } }

/* 手機版結果彈窗（桌機不會開啟） */
.res-sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; background: rgba(20,36,48,0); transition: background .3s var(--ease); font-family: var(--zh); }
.res-sheet[hidden] { display: none; }
.res-sheet.open { background: rgba(20,36,48,.38); }
.res-sheet-in {
  position: relative; width: 100%; max-height: 86vh; overflow-y: auto; background: var(--surface);
  border-radius: 18px 18px 0 0; padding: 20px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  transform: translateY(100%); transition: transform .35s var(--ease);
}
.res-sheet.open .res-sheet-in { transform: none; }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--muted); background: var(--paper); z-index: 3; }
.res-sheet .res-banner { margin-right: 44px; }
.res-sheet .res-actions { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); margin: 14px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -1px 0 var(--line); }
.res-sheet .note { font-size: 11.5px; }

@media (max-width: 860px) {
  .tools { top: 12px; }
}
/* 3D 標籤層自成一層，引導卡與工具列才蓋得住它 */
#stage { z-index: 0; }

/* 3D 區精簡：圖例、左下進度卡、播放列（暫停／跟隨鏡頭）都不顯示；跟隨鏡頭維持預設開啟 */
.net-legend, .status, .playback { display: none !important; }

/* 樓層簡述：兩句 */
.floor-desc { display: flex; flex-direction: column; gap: 6px; }
.floor-desc p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--ink-2); }

/* 手機版結果彈窗：上方抓取條，點暗色區域關閉 */
.sheet-grip { display: block; width: 40px; height: 4px; margin: -8px auto 14px; border-radius: 2px; background: var(--line); }
.res-sheet .res-banner { margin-right: 0; }

/* 手機版：左右留白加寬 */
@media (max-width: 860px) {
  .floors { padding: 12px 20px; }
  .panel { padding: 24px 20px 36px; }
  .res-sheet-in { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  .res-sheet .res-actions { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
}

/* 左側樓層：電梯按鈕。選中的整塊填滿品牌藍、白字；其他是白底細框。不再顯示梯井線、樓層點與情境標籤 */
#floor-nav { gap: 8px; }
#floor-nav::before, .floor-btn::before { display: none; }
.floor-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 10px 14px; border-radius: 12px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hit-line); transition: background .2s, box-shadow .2s;
}
.floor-btn .code { font-size: 26px; line-height: 1.1; font-weight: 300; color: #A3B0B9; transition: color .2s; }
.floor-btn .meta { gap: 0; }
.floor-btn .meta b { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.floor-btn:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hit-hover); }
.floor-btn:hover .code { color: var(--brand-deep); }
.floor-btn.visible, .floor-btn.visible:hover { background: var(--brand-deep); box-shadow: 0 4px 14px color-mix(in srgb, var(--brand-deep) 28%, transparent); }
.floor-btn.visible .code, .floor-btn.visible .meta b { color: #fff; font-weight: 400; }
.floor-btn.visible .meta b { font-weight: 500; }
.floor-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 860px) {
  #floor-nav { gap: 6px; }
  .floor-btn { width: auto; flex: none; gap: 6px; align-items: baseline; padding: 7px 14px; border-radius: 99px; }
  .floor-btn .code { font-size: 17px; font-weight: 400; }
  .floor-btn .meta b { font-size: 13px; white-space: nowrap; }
}

/* 電腦版：樓層按鈕下方列出這層的情境標籤（手機版不顯示，維持在 860px 以下的隱藏規則） */
.floor-btn { align-items: flex-start; }
.floor-btn .code { margin-top: 1px; }
.floor-btn .meta { gap: 6px; min-width: 0; }
.floor-btn .chips { display: flex; gap: 4px; flex-wrap: wrap; opacity: 1; }
.floor-btn .chip { font-size: 11.5px; padding: 3px 7px; }
.floor-btn.visible .chip { color: #fff; background: rgba(255,255,255,.18); }
@media (max-width: 860px) {
  .floor-btn { align-items: baseline; }
  .floor-btn .chips { display: none; }
}

/* ============================================================
   情境卡：左側大播放鍵（機器人代表色），整張卡片可點
   ============================================================ */
.sc-card { flex-direction: row; align-items: center; gap: 14px; padding: 13px 16px 13px 14px; }
.sc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sc-play {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--c) 30%, transparent);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.sc-play svg { width: 20px; height: 20px; fill: currentColor; margin-left: 2px; }
.sc-card:hover .sc-play { transform: scale(1.08); box-shadow: 0 5px 16px color-mix(in srgb, var(--c) 38%, transparent); }
.sc-go { display: none; }

/* 收合條只在手機版出現 */
.m-bar { display: none; }

/* ============================================================
   手機版：樓層固定在上方 → 3D → 下方面板（瀏覽時選情境；模擬中收成一條，可展開）
   ============================================================ */
@media (max-width: 860px) {
  body.page-logistics { height: 100vh; height: 100dvh; overflow: hidden; }
  .layout { height: calc(100vh - var(--head-h)); height: calc(100dvh - var(--head-h)); display: flex; flex-direction: column; }
  .floors { flex: none; }
  .stage-wrap { flex: 1 1 auto; height: auto; min-height: 140px; }
  .panel {
    flex: none; max-height: 40dvh; overflow-y: auto; overscroll-behavior: contain;
    border: 0; border-radius: 18px 18px 0 0; margin-top: -14px; position: relative; z-index: 2;
    box-shadow: 0 -6px 24px rgba(20,36,48,.10);
    padding: 8px 20px calc(14px + env(safe-area-inset-bottom));
    transition: max-height .32s var(--ease);
  }
  .panel::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 10px; }

  /* 瀏覽：樓層名稱、一行說明（點一下展開）、橫向滑動的情境卡 */
  .floor-head h2 { margin: 0 0 4px; font-size: 16px; gap: 10px; }
  .floor-head h2 b { font-size: 28px; }
  .floor-desc { gap: 4px; cursor: pointer; }
  .floor-desc p { font-size: 13px; line-height: 1.6; }
  .floor-desc:not(.open) p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .floor-desc:not(.open) p + p { display: none; }
  .sec-pick { margin: 12px 0 8px; font-size: 13px; color: var(--muted); }
  .scs { flex-direction: row; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 2px 20px 6px; scrollbar-width: none; }
  .scs::-webkit-scrollbar { display: none; }
  .sc-card { flex: 0 0 76%; scroll-snap-align: start; gap: 10px; padding: 10px 12px; }
  .sc-card:hover { transform: none; }
  .sc-play { width: 38px; height: 38px; }
  .sc-play svg { width: 17px; height: 17px; }
  .sc-card b { font-size: 14px; }
  .sc-route { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }

  /* 模擬中：只顯示收合條 */
  .m-play .panel { max-height: 30dvh; padding-top: 8px; }
  .m-play:not(.m-open) .panel > *:not(.m-bar) { display: none; }
  .m-bar { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: 2px 0 4px; }
  .m-top { display: flex; align-items: baseline; gap: 10px; }
  .m-top b { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-step { flex: none; font: 400 12px var(--en); color: var(--muted); }
  .m-chev { flex: none; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-top: 1.5px solid var(--muted); transform: rotate(-45deg) translateY(2px); transition: transform .25s var(--ease); }
  .m-now { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-prog { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
  .m-prog i { display: block; height: 100%; width: 0; background: var(--c); border-radius: 2px; transition: width .2s linear; }

  /* 模擬中展開：路線、時段、完整步驟 */
  .m-play.m-open .panel { max-height: 62dvh; }
  .m-open .m-chev { transform: rotate(135deg) translateY(2px); }
  .m-open .m-now { display: none; }
  .m-open .panel .back { margin: 10px 0 0; }
  .m-open .panel .sc-head { display: none !important; }
  .m-open .panel .facts { margin-top: 14px; }
  .m-open .panel .sec { margin-top: 18px; }
}
/* 手機版情境卡橫向列：捲動對齊時保留左右 20px，第一張不會貼齊左邊；最後一張右側也留白 */
@media (max-width: 860px) {
  .scs { scroll-padding-inline: 20px; }
  .scs::after { content: ""; flex: 0 0 10px; }
}

/* 任務完成橫幅：淡綠底、綠字，打勾圖示用實心綠圓 */
.res-banner { background: color-mix(in srgb, var(--ok) 11%, white); color: color-mix(in srgb, var(--ok) 80%, black); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 22%, white); padding: 10px 14px; }
.res-banner b { font-size: 16px; }
.res-check { width: 30px; height: 30px; background: var(--ok); color: #fff; }
.res-check svg { width: 19px; height: 19px; }

/* 電腦版左側樓層卡片：略高、間距加大 */
@media (min-width: 861px) {
  #floor-nav { gap: 12px; }
  .floor-btn { padding: 15px 14px 16px; }
}

/* 電腦版結果頁：「看其他情境／重播」固定在面板最底部；左右延伸寬度跟著面板留白，窄螢幕不會超出 */
.panel { --pad-x: 32px; }
@media (max-width: 1180px) { .panel { --pad-x: 24px; } }
@media (min-width: 861px) {
  .panel.is-result { display: flex; flex-direction: column; padding-bottom: 0; }
  .panel.is-result > * { flex: none; }
  .is-result .res-actions {
    position: sticky; bottom: 0; z-index: 2;
    margin: auto calc(-1 * var(--pad-x)) 0; padding: 14px var(--pad-x) 20px;
    background: var(--surface); box-shadow: 0 -1px 0 var(--line);
  }
  .is-result .r4-list { margin-bottom: 16px; }
}

/* 右側面板樓層條列：固定兩點，前方綠色打勾（與情境方案頁的機型重點同一種樣式） */
.floor-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.floor-points li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.6; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.floor-points li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (max-width: 860px) {
  .floor-points { gap: 4px; }
  .floor-points li { font-size: 13px; padding-left: 22px; }
  .floor-points li::before { width: 16px; height: 16px; background-size: 12px; }
}

/* ============================================================
   手機版調整：樓層列不露捲軸、右側淡出提示可滑；3D 標籤縮小，減少重疊
   ============================================================ */
@media (max-width: 860px) {
  #floor-nav { scrollbar-width: none; padding: 2px 0 6px; margin-bottom: -4px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
  #floor-nav::-webkit-scrollbar { display: none; }
  #floor-nav::after { content: ""; flex: 0 0 24px; }
  .zlabel { font-size: 10.5px; gap: 4px; padding: 2px 8px 2px 5px; }
  .zlabel i { width: 6px; height: 6px; }
  .elabel { font-size: 10px; }
  /* 3D／平面圖切換只佔右上角，不再橫跨整個 3D 區上緣擋住手指 */
  .tools { left: auto; }
}

/* 按鈕統一為圓角矩形（--btn-r 定義在 site.css）；圓形播放鍵與圖示點維持圓形 */
.back, .res-actions button, .res-actions .icon-btn, .to-result, .guide-ok, .tools button, .playback button, .intro-skip { border-radius: var(--btn-r); }
@media (max-width: 860px) { .floor-btn { border-radius: var(--btn-r); } }

/* 按下情境後、需要的樓層還在背景建置時：情境卡暫時不可再點，游標顯示等待 */
.sc-preparing .scs, .sc-preparing .sc-card { cursor: progress; }
.sc-preparing .sc-card { opacity: .6; pointer-events: none; transition: opacity .2s; }
