/* =========================================================
   Escape from Station — Mock Stylesheet
   デザイン書.md §11 コンポーネント / §12 画面仕様 の実装
   ========================================================= */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--efs-font);
  background: var(--efs-bg-base);
  color: var(--efs-ink-primary);
  -webkit-font-smoothing: antialiased;
  transition: background var(--efs-motion-standard), color var(--efs-motion-standard);
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* =========================================================
   1. レビュー用シェル（プロダクトUIではない）
   ========================================================= */

.shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 320px;
  grid-template-rows: 64px minmax(0, 1fr);
  grid-template-areas: "top top top" "nav stage spec";
  height: 100vh;
}

.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: var(--efs-space-4);
  padding: 0 var(--efs-space-5);
  background: var(--efs-bg-surface);
  border-bottom: 1px solid var(--efs-line-default);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: var(--efs-space-3);
  font: var(--efs-title-m);
  letter-spacing: .01em;
}

.topbar__mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--efs-ink-primary);
  display: grid; place-items: center;
  color: var(--efs-accent-signal);
}
.topbar__mark svg { width: 18px; height: 18px; }

.topbar__ver {
  font: var(--efs-caption);
  color: var(--efs-ink-tertiary);
  border: 1px solid var(--efs-line-default);
  border-radius: var(--efs-radius-pill);
  padding: 3px 8px;
}

.topbar__spacer { flex: 1; }

.seg {
  display: inline-flex;
  background: var(--efs-bg-sunken);
  border-radius: var(--efs-radius-pill);
  padding: 3px;
  gap: 2px;
}
.seg button {
  font: var(--efs-label-m);
  color: var(--efs-ink-secondary);
  padding: 6px 14px;
  border-radius: var(--efs-radius-pill);
  transition: background var(--efs-motion-micro), color var(--efs-motion-micro);
  white-space: nowrap;
}
.seg button[aria-pressed="true"] {
  background: var(--efs-bg-surface);
  color: var(--efs-ink-primary);
  box-shadow: var(--efs-shadow-card);
}

/* --- 左：画面リスト --- */
.nav {
  grid-area: nav;
  overflow-y: auto;
  padding: var(--efs-space-4);
  background: var(--efs-bg-surface);
  border-right: 1px solid var(--efs-line-default);
}
.nav__title {
  font: var(--efs-label-m);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--efs-ink-tertiary);
  margin: var(--efs-space-2) var(--efs-space-2) var(--efs-space-3);
}
.nav__item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: var(--efs-space-3);
  align-items: start;
  width: 100%;
  text-align: left;
  padding: var(--efs-space-3);
  border-radius: var(--efs-radius-md);
  margin-bottom: 2px;
  transition: background var(--efs-motion-micro);
}
.nav__item:hover { background: var(--efs-bg-sunken); }
.nav__item[aria-current="true"] { background: var(--efs-accent-signal-soft); }
.nav__item[aria-current="true"] .nav__id { background: var(--efs-accent-signal); color: var(--efs-ink-on-accent); }
.nav__id {
  font: var(--efs-label-m);
  background: var(--efs-bg-sunken);
  color: var(--efs-ink-secondary);
  border-radius: var(--efs-radius-sm);
  padding: 5px 0;
  text-align: center;
}
.nav__name { display: block; font: var(--efs-title-m); }
.nav__desc { display: block; font: var(--efs-caption); color: var(--efs-ink-tertiary); margin-top: 2px; }

.nav__legend {
  margin-top: var(--efs-space-5);
  padding: var(--efs-space-4);
  border-radius: var(--efs-radius-md);
  background: var(--efs-bg-sunken);
  font: var(--efs-caption);
  color: var(--efs-ink-secondary);
}
.nav__legend b { display: block; font: var(--efs-label-m); margin-bottom: 6px; color: var(--efs-ink-primary); }

/* --- 中央：ステージ --- */
.stage {
  grid-area: stage;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: var(--efs-space-8);
  background:
    radial-gradient(120% 90% at 50% 0%, var(--efs-bg-surface) 0%, transparent 70%),
    var(--efs-bg-base);
}
.stage[data-mode="gallery"] {
  display: block;
  padding: var(--efs-space-8);
}
#stageInner { width: 100%; }
.stage[data-mode="flow"] #stageInner { display: flex; justify-content: center; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--efs-space-8) var(--efs-space-6);
  align-items: start;
}
.gallery__cell { display: flex; flex-direction: column; align-items: center; gap: var(--efs-space-3); }
.gallery__cap { font: var(--efs-label-m); color: var(--efs-ink-secondary); text-align: center; }
.gallery__cap b { display: block; font: var(--efs-title-m); color: var(--efs-ink-primary); }
.gallery__frame { position: relative; width: 285px; height: 617px; flex: none; }
.gallery__frame .phone { position: absolute; top: 0; left: 0; transform: scale(.73); transform-origin: top left; }

/* --- 右：仕様パネル --- */
.spec {
  grid-area: spec;
  overflow-y: auto;
  padding: var(--efs-space-5);
  background: var(--efs-bg-surface);
  border-left: 1px solid var(--efs-line-default);
}
.spec h2 { font: var(--efs-title-l); margin: 0 0 var(--efs-space-1); }
.spec .spec__sub { font: var(--efs-body-m); color: var(--efs-ink-secondary); margin-bottom: var(--efs-space-5); }
.spec dl { margin: 0; }
.spec dt {
  font: var(--efs-label-m);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--efs-ink-tertiary);
  margin-top: var(--efs-space-4);
}
.spec dd { margin: 4px 0 0; font: var(--efs-body-m); color: var(--efs-ink-primary); }
.spec dd code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  background: var(--efs-bg-sunken);
  padding: 1px 5px;
  border-radius: 5px;
}
.spec__rule {
  margin-top: var(--efs-space-5);
  padding: var(--efs-space-4);
  border-radius: var(--efs-radius-md);
  border: 1px solid var(--efs-line-default);
  border-left: 3px solid var(--efs-accent-signal);
  font: var(--efs-body-m);
  color: var(--efs-ink-secondary);
}

/* =========================================================
   2. Phone frame
   ========================================================= */

.phone {
  position: relative;
  width: 390px;
  height: 844px;
  border-radius: 46px;
  background: var(--efs-bg-base);
  box-shadow:
    0 0 0 10px #1a2320,
    0 0 0 11px #384741,
    0 30px 70px rgba(15, 26, 21, .28);
  overflow: hidden;
  flex: none;
}
[data-theme="dark"] .phone { box-shadow: 0 0 0 10px #05100b, 0 0 0 11px #22332b, 0 30px 70px rgba(0,0,0,.6); }

.phone__notch {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 118px; height: 30px;
  background: #101815;
  border-radius: var(--efs-radius-pill);
  z-index: 60;
}

.statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  font: var(--efs-label-m);
  color: var(--efs-ink-primary);
  z-index: 55;
  pointer-events: none;
}
.statusbar__right { display: flex; align-items: center; gap: 6px; }
.statusbar__right svg { width: 15px; height: 15px; }

.homebar {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 134px; height: 5px;
  border-radius: var(--efs-radius-pill);
  background: var(--efs-ink-primary);
  opacity: .22;
  z-index: 58;
  pointer-events: none;
}

/* 画面切替 */
.screen { position: absolute; inset: 0; display: none; }
.screen[data-active="true"] { display: block; }

/* =========================================================
   3. 2.5D 模型層（デザイン書 §8）
   ========================================================= */

.modelzone {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(90% 60% at 50% 22%, var(--efs-bg-surface) 0%, var(--efs-bg-base) 72%);
}

.model {
  position: absolute;
  left: 50%;
  top: var(--model-top, 34%);
  width: 300px; height: 300px;
  margin-left: -150px;
  perspective: 1400px;
  transform: scale(var(--model-scale, 1));
  transform-origin: 50% 30%;
  transition: transform var(--efs-motion-layer), top var(--efs-motion-layer), opacity var(--efs-motion-layer);
}

.model__stack {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--efs-model-tilt-x)) rotateZ(var(--efs-model-spin-z));
}

.floor {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--lvl) * var(--efs-model-gap)));
  transition: opacity var(--efs-motion-layer);
}
.floor[data-state="active"]   { opacity: 1; }
.floor[data-state="onroute"]  { opacity: .55; }
.floor[data-state="off"]      { opacity: .22; }

.floor__face, .floor__side {
  position: absolute;
  inset: 0;
  width: 300px; height: 300px;
}
.floor__side { transform: translateZ(calc(var(--efs-model-thick) * -1)); }

.floor__face .plan-fill { fill: var(--efs-model-face-top); stroke: var(--efs-model-edge); stroke-width: 1.4; }
.floor[data-state="active"] .floor__face .plan-fill { stroke: var(--efs-line-strong); stroke-width: 1.8; }
.floor__side .plan-fill { fill: var(--efs-model-face-side); stroke: none; }
.floor__face .plan-void { fill: var(--efs-model-void); stroke: var(--efs-model-edge); stroke-width: .8; }
.floor__side .plan-void { fill: var(--efs-model-face-side); stroke: none; }

/* 経路 */
.route-glow {
  fill: none;
  stroke: var(--efs-accent-signal-glow);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.route-line {
  fill: none;
  stroke: var(--efs-accent-signal);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: routeDraw var(--efs-motion-route) forwards;
}
@keyframes routeDraw { to { stroke-dashoffset: 0; } }
.route-tick { fill: var(--efs-accent-signal); opacity: .85; }
.route-done { stroke: var(--efs-accent-signal); opacity: .35; }

/* 縦動線：階間を結ぶ垂直の破線（rotateX(-90deg) で Z 方向に立てる） */
.vlink {
  position: absolute;
  width: 2.5px;
  height: var(--efs-model-gap);
  left: var(--vx);
  top: calc(var(--vy) - var(--efs-model-gap));
  transform-origin: 50% 100%;
  transform: translateZ(calc(var(--lvl) * var(--efs-model-gap))) rotateX(-90deg);
  background: repeating-linear-gradient(
    to bottom,
    var(--efs-accent-signal) 0 4px,
    transparent 4px 9px
  );
}

/* 現在地 / 目的地 */
.mk {
  position: absolute;
  left: var(--mx); top: var(--my);
  transform: translate(-50%, -50%) translateZ(calc(var(--lvl) * var(--efs-model-gap) + 2px));
  transform-style: preserve-3d;
}
.mk__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--efs-accent-signal);
  box-shadow: 0 0 0 3px var(--efs-bg-surface);
}
.mk__pulse {
  position: absolute;
  left: 50%; top: 50%;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 2px solid var(--efs-accent-signal);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(.35); opacity: .9; }
  70%  { transform: scale(1);   opacity: 0; }
  100% { transform: scale(1);   opacity: 0; }
}
.mk--vague .mk__dot { background: transparent; border: 2px solid var(--efs-state-warn); box-shadow: none; }
.mk--vague .mk__pulse { border-style: dashed; border-color: var(--efs-state-warn); animation: none; transform: scale(1); opacity: .8; }

/* 目的地ピン（模型に刺さる／ラベルはビルボードで正面を向く） */
.pin {
  position: absolute;
  left: var(--mx); top: var(--my);
  transform:
    translateZ(calc(var(--lvl) * var(--efs-model-gap) + 1px))
    rotateZ(calc(var(--efs-model-spin-z) * -1))
    rotateX(calc(var(--efs-model-tilt-x) * -1))
    translate(-50%, -100%);
  display: flex; flex-direction: column; align-items: center;
  white-space: nowrap;
}
.pin__chip {
  font: var(--efs-label-m);
  background: var(--efs-ink-primary);
  color: var(--efs-bg-surface);
  padding: 4px 9px;
  border-radius: var(--efs-radius-sm);
  white-space: nowrap;
}
.pin__stem { width: 1.5px; height: 18px; background: var(--efs-ink-primary); }
.pin--goal .pin__chip { background: var(--efs-accent-signal); color: var(--efs-ink-on-accent); }
.pin--goal .pin__stem { background: var(--efs-accent-signal); }

/* 階ラベル */
.floorTag {
  position: absolute;
  left: 6px; top: 132px;
  font: var(--efs-label-m);
  color: var(--efs-ink-tertiary);
  transform: translateZ(calc(var(--lvl) * var(--efs-model-gap)));
}

/* 階スライダー（S6） */
.floorSlider {
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px;
  background: var(--efs-bg-surface);
  border: 1px solid var(--efs-line-default);
  border-radius: var(--efs-radius-pill);
  padding: 8px 6px;
  box-shadow: var(--efs-shadow-card);
  z-index: 20;
}
.floorSlider button {
  width: 40px; height: 40px;
  border-radius: var(--efs-radius-pill);
  font: var(--efs-label-l);
  color: var(--efs-ink-secondary);
  transition: background var(--efs-motion-micro), color var(--efs-motion-micro);
}
.floorSlider button[aria-pressed="true"] {
  background: var(--efs-accent-signal);
  color: var(--efs-ink-on-accent);
}

/* =========================================================
   4. サイン層（デザイン書 §11.1, §9）
   ========================================================= */

.sign {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--sign-h, 62%);
  background: var(--efs-bg-surface);
  border-radius: var(--efs-radius-xl) var(--efs-radius-xl) 0 0;
  box-shadow: var(--efs-shadow-sign);
  padding: var(--efs-space-3) var(--efs-space-5) var(--efs-space-6);
  display: flex;
  flex-direction: column;
  transition: height var(--efs-motion-layer);
  z-index: 30;
}
.sign--flat {
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  padding-top: 60px;
}

.sign__handle {
  width: 36px; height: 4px;
  border-radius: var(--efs-radius-pill);
  background: var(--efs-line-strong);
  margin: 0 auto var(--efs-space-4);
  flex: none;
  cursor: grab;
}
.sign__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}
.sign__body::-webkit-scrollbar { display: none; }

/* =========================================================
   5. コンポーネント
   ========================================================= */

/* --- OfflineBadge §11.12 --- */
.offbadge {
  display: inline-flex; align-items: center; gap: 6px;
  font: var(--efs-label-m);
  color: var(--efs-accent-signal-ink);
  background: var(--efs-accent-signal-soft);
  border-radius: var(--efs-radius-pill);
  padding: 6px 11px;
  white-space: nowrap;
}
.offbadge svg { width: 15px; height: 15px; }

/* --- SearchField §11.4 --- */
.searchfield {
  display: flex; align-items: center; gap: var(--efs-space-3);
  height: 52px;
  background: var(--efs-bg-sunken);
  border-radius: var(--efs-radius-md);
  padding: 0 var(--efs-space-4);
  flex: none;
}
.searchfield svg { width: 22px; height: 22px; color: var(--efs-ink-tertiary); flex: none; }
.searchfield span { font: var(--efs-body-l); color: var(--efs-ink-tertiary); flex: 1; }
.searchfield span.is-filled { color: var(--efs-ink-primary); }

/* --- PictoTile §11.3 --- */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--efs-space-3);
}
.tile {
  height: 104px;
  background: var(--efs-bg-surface);
  border: 1px solid var(--efs-line-default);
  border-radius: var(--efs-radius-lg);
  box-shadow: var(--efs-shadow-card);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--efs-space-2);
  transition: background var(--efs-motion-micro), transform var(--efs-motion-micro);
}
.tile:active { background: var(--efs-accent-signal-soft); transform: scale(.98); }
.tile svg { width: 40px; height: 40px; color: var(--efs-ink-primary); }
.tile span { font: var(--efs-label-l); color: var(--efs-ink-secondary); }

/* --- QuickPill（二次入口：トイレ / その他の情報） --- */
.quickrow { display: flex; gap: var(--efs-space-3); margin-top: var(--efs-space-3); }
.quick {
  flex: 1;
  height: 54px;
  display: flex; align-items: center; justify-content: center; gap: var(--efs-space-2);
  border: 1px solid var(--efs-line-default);
  border-radius: var(--efs-radius-pill);
  background: var(--efs-bg-surface);
  font: var(--efs-label-l);
  color: var(--efs-ink-secondary);
  transition: background var(--efs-motion-micro);
}
.quick:active { background: var(--efs-accent-signal-soft); }
.quick svg { width: 22px; height: 22px; color: var(--efs-ink-primary); flex: none; }

/* --- WifiCard（S4 その他の情報） --- */
.wifi {
  background: var(--efs-accent-signal-soft);
  border-radius: var(--efs-radius-lg);
  padding: var(--efs-space-4) var(--efs-space-5);
}
.wifi__head { display: flex; align-items: center; gap: var(--efs-space-3); }
.wifi__head svg { width: 24px; height: 24px; color: var(--efs-accent-signal-ink); flex: none; }
.wifi__head b { font: var(--efs-title-m); color: var(--efs-ink-primary); }
.wifi__ssid {
  font: var(--efs-label-l);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  background: var(--efs-bg-surface);
  border-radius: var(--efs-radius-sm);
  padding: 8px 12px;
  margin: var(--efs-space-3) 0;
  display: block;
}
.wifi__steps { margin: 0; padding-left: 18px; }
.wifi__steps li { font: var(--efs-body-m); color: var(--efs-ink-secondary); margin-bottom: 3px; }
.wifi__note { font: var(--efs-caption); color: var(--efs-accent-signal-ink); margin: var(--efs-space-3) 0 0; }

/* --- InfoRow（施設情報の行） --- */
.inforow {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: var(--efs-space-3);
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: var(--efs-space-2) 0;
  border-bottom: 1px solid var(--efs-line-default);
  text-align: left;
}
.inforow > svg { width: 26px; height: 26px; color: var(--efs-ink-primary); }
.inforow b { display: block; font: var(--efs-title-m); font-weight: 600; }
.inforow small { display: block; font: var(--efs-body-m); color: var(--efs-ink-secondary); }

/* --- RouteProfile セグメント（縦動線の使い方を選ぶ） --- */
.segroute {
  display: flex;
  gap: 4px;
  background: var(--efs-bg-sunken);
  border-radius: var(--efs-radius-pill);
  padding: 4px;
}
.segroute button {
  flex: 1;
  height: 40px;
  border-radius: var(--efs-radius-pill);
  font: var(--efs-label-m);
  color: var(--efs-ink-secondary);
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: background var(--efs-motion-micro), color var(--efs-motion-micro);
}
.segroute button svg { width: 17px; height: 17px; }
.segroute button[aria-pressed="true"] {
  background: var(--efs-bg-surface);
  color: var(--efs-ink-primary);
  box-shadow: var(--efs-shadow-card);
}

/* --- 縦動線の内訳チップ --- */
.vsum { display: flex; gap: var(--efs-space-2); flex-wrap: wrap; margin-top: var(--efs-space-3); }
.vsum span {
  display: inline-flex; align-items: center; gap: 6px;
  font: var(--efs-label-m);
  background: var(--efs-bg-sunken);
  color: var(--efs-ink-secondary);
  border-radius: var(--efs-radius-pill);
  padding: 6px 11px;
}
.vsum span svg { width: 16px; height: 16px; color: var(--efs-ink-primary); }
.vsum span[data-key="true"] { background: var(--efs-accent-signal-soft); color: var(--efs-accent-signal-ink); }
.vsum span[data-key="true"] svg { color: var(--efs-accent-signal-ink); }

/* --- LandmarkCue（ステップナビの目印手がかり） --- */
.cues { display: grid; gap: 2px; margin-top: var(--efs-space-4); }
.cue {
  display: grid;
  grid-template-columns: 32px 62px 1fr auto;
  gap: var(--efs-space-2);
  align-items: center;
  min-height: 46px;
  padding: var(--efs-space-2) 0;
  border-top: 1px solid var(--efs-line-default);
}
.cue > svg { width: 24px; height: 24px; }
.cue__role { font: var(--efs-label-m); }
.cue__name { font: var(--efs-title-m); }
.cue__where { font: var(--efs-body-m); color: var(--efs-ink-tertiary); text-align: right; }
.cue--target > svg, .cue--target .cue__role { color: var(--efs-accent-signal-ink); }
.cue--pass   > svg, .cue--pass   .cue__role { color: var(--efs-ink-tertiary); }
.cue--over   > svg, .cue--over   .cue__role { color: var(--efs-state-warn); }

/* --- 縦動線チップ（模型層に立てる） --- */
.vchip {
  position: absolute;
  left: var(--mx); top: var(--my);
  transform:
    translateZ(calc(var(--lvl) * var(--efs-model-gap)))
    rotateZ(calc(var(--efs-model-spin-z) * -1))
    rotateX(calc(var(--efs-model-tilt-x) * -1))
    translate(-50%, -50%);
  display: flex; align-items: center; gap: 5px;
  background: var(--efs-bg-surface);
  border: 1px solid var(--efs-accent-signal);
  border-radius: var(--efs-radius-pill);
  padding: 3px 8px 3px 5px;
  font: var(--efs-label-m);
  color: var(--efs-accent-signal-ink);
  white-space: nowrap;
}
.vchip svg { width: 15px; height: 15px; }

/* --- ConfidenceChip §11.9 --- */
.conf {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px;
  border-radius: var(--efs-radius-pill);
  padding: 0 13px;
  font: var(--efs-label-m);
}
.conf svg { width: 16px; height: 16px; }
.conf--fixed { background: var(--efs-accent-signal-soft); color: var(--efs-accent-signal-ink); }
.conf--vague { background: transparent; border: 1.5px solid var(--efs-state-warn); color: var(--efs-state-warn); }
.conf--none  { background: transparent; border: 1.5px solid var(--efs-line-strong); color: var(--efs-ink-secondary); }

/* --- Buttons --- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: var(--efs-space-2);
  height: 56px;
  width: 100%;
  border-radius: var(--efs-radius-pill);
  font: var(--efs-label-l);
  font-size: 16px;
  transition: transform var(--efs-motion-micro), opacity var(--efs-motion-micro);
  flex: none;
}
.btn:active { transform: scale(.985); }
.btn--primary { background: var(--efs-accent-signal); color: var(--efs-ink-on-accent); }
.btn--ghost { background: transparent; color: var(--efs-ink-secondary); border: 1.5px solid var(--efs-line-default); }
.btn--text { height: 44px; color: var(--efs-accent-signal-ink); font: var(--efs-label-l); }
.btn svg, .btn--text svg { width: 20px; height: 20px; flex: none; }
.btn[disabled] { opacity: .4; pointer-events: none; }

/* --- POIRow §11.5 --- */
.poi {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: var(--efs-space-3);
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: var(--efs-space-3) 0;
  border-bottom: 1px solid var(--efs-line-default);
  text-align: left;
}
.poi__ic {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--efs-accent-signal-soft);
  display: grid; place-items: center;
  color: var(--efs-accent-signal-ink);
}
.poi__ic svg { width: 24px; height: 24px; }
.poi__name { font: var(--efs-title-m); }
.poi__where { font: var(--efs-body-m); color: var(--efs-ink-secondary); margin-top: 1px; }
.poi__meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.poi__dist { font: var(--efs-label-m); color: var(--efs-ink-tertiary); }

/* --- FloorBadge §11.6 --- */
.fbadge {
  font: var(--efs-label-m);
  font-variant-numeric: tabular-nums;
  background: var(--efs-bg-sunken);
  color: var(--efs-ink-secondary);
  border-radius: var(--efs-radius-sm);
  padding: 3px 8px;
}
.fbadge--here { background: var(--efs-accent-signal-soft); color: var(--efs-accent-signal-ink); }

/* --- AnchorPicker §11.10 --- */
.anchors { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--efs-space-3); }
.anchor {
  height: 108px;
  border: 1px solid var(--efs-line-default);
  border-radius: var(--efs-radius-lg);
  background: var(--efs-bg-surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--efs-space-2);
  padding: var(--efs-space-2);
  transition: border-color var(--efs-motion-micro), background var(--efs-motion-micro);
}
.anchor:active, .anchor[aria-pressed="true"] {
  border-color: var(--efs-accent-signal);
  background: var(--efs-accent-signal-soft);
}
.anchor__art {
  width: 52px; height: 52px;
  border-radius: var(--efs-radius-md);
  background: var(--efs-bg-sunken);
  display: grid; place-items: center;
  color: var(--efs-ink-primary);
}
.anchor__art svg { width: 30px; height: 30px; }
.anchor span { font: var(--efs-label-m); text-align: center; line-height: 1.35; color: var(--efs-ink-primary); }
.anchor[disabled] { opacity: .45; }

.sectitle {
  display: flex; align-items: baseline; gap: var(--efs-space-2);
  font: var(--efs-label-m);
  letter-spacing: .06em;
  color: var(--efs-ink-tertiary);
  text-transform: uppercase;
  margin: var(--efs-space-5) 0 var(--efs-space-3);
}
.sectitle:first-child { margin-top: 0; }
.sectitle em { font: var(--efs-caption); font-style: normal; text-transform: none; letter-spacing: 0; }

/* --- StepInstruction §11.2 --- */
.step {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--efs-space-4);
  align-items: center;
}
.step__arrow { width: 72px; height: 72px; color: var(--efs-accent-signal); }
.step__arrow svg { width: 72px; height: 72px; }
.signstrip__row > svg { width: 28px; height: 28px; }
.step__text { font: var(--efs-sign-xl); letter-spacing: -.01em; }
.step__dist { font: var(--efs-num-xl); font-variant-numeric: tabular-nums; color: var(--efs-accent-signal-ink); margin-top: var(--efs-space-4); }
.step__dist small { font: var(--efs-title-l); color: var(--efs-ink-secondary); margin-left: 6px; }
.step__next {
  display: flex; align-items: center; gap: var(--efs-space-2);
  font: var(--efs-body-m);
  color: var(--efs-ink-secondary);
  padding: var(--efs-space-3) 0;
  border-top: 1px solid var(--efs-line-default);
  margin-top: var(--efs-space-4);
}
.step__next svg { width: 18px; height: 18px; color: var(--efs-ink-tertiary); }

.progress {
  height: 6px;
  border-radius: var(--efs-radius-pill);
  background: var(--efs-bg-sunken);
  overflow: hidden;
  flex: none;
}
.progress i { display: block; height: 100%; background: var(--efs-accent-signal); border-radius: inherit; transition: width var(--efs-motion-standard); }

/* --- RouteSummary §11.7 --- */
.rsum { display: flex; align-items: baseline; gap: var(--efs-space-3); }
.rsum__time { font: var(--efs-num-l); font-variant-numeric: tabular-nums; }
.rsum__meta { font: var(--efs-body-l); color: var(--efs-ink-secondary); }
.rsum__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--efs-line-strong); }

/* --- FloorProfile §11.8 --- */
.fprof {
  background: var(--efs-bg-sunken);
  border-radius: var(--efs-radius-md);
  padding: var(--efs-space-4) var(--efs-space-3);
  margin-top: var(--efs-space-4);
}
.fprof svg { width: 100%; height: 92px; }
.fprof .fp-label { font: var(--efs-label-m); fill: var(--efs-ink-tertiary); }
.fprof .fp-line { fill: none; stroke: var(--efs-accent-signal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fprof .fp-rail { stroke: var(--efs-line-strong); stroke-width: 1; stroke-dasharray: 2 4; }
.fprof .fp-node { fill: var(--efs-accent-signal); }
.fprof .fp-goal { fill: none; stroke: var(--efs-accent-signal); stroke-width: 2.5; }
.fprof .fp-ic { fill: var(--efs-ink-secondary); }

/* --- toggle row --- */
.optrow {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--efs-space-3) 0;
  border-top: 1px solid var(--efs-line-default);
  font: var(--efs-body-l);
}
.switch {
  width: 48px; height: 28px;
  border-radius: var(--efs-radius-pill);
  background: var(--efs-bg-sunken);
  border: 1px solid var(--efs-line-default);
  position: relative;
  transition: background var(--efs-motion-micro);
  flex: none;
}
.switch::after {
  content: ""; position: absolute;
  top: 2px; left: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--efs-bg-surface);
  box-shadow: var(--efs-shadow-card);
  transition: transform var(--efs-motion-micro);
}
.switch[aria-pressed="true"] { background: var(--efs-accent-signal); border-color: transparent; }
.switch[aria-pressed="true"]::after { transform: translateX(20px); }

/* --- DownloadCard §11.13 --- */
.dl {
  background: var(--efs-bg-surface);
  border: 1px solid var(--efs-line-default);
  border-radius: var(--efs-radius-lg);
  padding: var(--efs-space-5);
  box-shadow: var(--efs-shadow-card);
}
.dl__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--efs-space-3); }
.dl__name { font: var(--efs-title-l); }
.dl__size { font: var(--efs-body-l); color: var(--efs-ink-secondary); font-variant-numeric: tabular-nums; }
.dl__promise {
  font: var(--efs-body-m);
  color: var(--efs-ink-secondary);
  margin-top: var(--efs-space-3);
  padding-top: var(--efs-space-3);
  border-top: 1px solid var(--efs-line-default);
}
.dl__list { list-style: none; margin: var(--efs-space-4) 0 0; padding: 0; display: grid; gap: var(--efs-space-2); }
.dl__list li { display: flex; align-items: center; gap: var(--efs-space-3); font: var(--efs-body-m); color: var(--efs-ink-secondary); }
.dl__list svg { width: 18px; height: 18px; color: var(--efs-line-strong); flex: none; }
.dl__list li[data-done="true"] { color: var(--efs-ink-primary); }
.dl__list li[data-done="true"] svg { color: var(--efs-accent-signal); }

.hero {
  font: var(--efs-sign-l);
  letter-spacing: -.01em;
  margin: 0 0 var(--efs-space-3);
}
.lede { font: var(--efs-body-l); color: var(--efs-ink-secondary); margin: 0 0 var(--efs-space-5); }

.spacer { flex: 1; min-height: var(--efs-space-4); }

/* 模型が薄く覗く部分（S1）にかぶせる床グラデ */
.modelfade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--efs-bg-base));
  pointer-events: none;
  z-index: 10;
}

/* S6 の下端サインストリップ */
.signstrip {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--efs-bg-surface);
  border-radius: var(--efs-radius-xl) var(--efs-radius-xl) 0 0;
  box-shadow: var(--efs-shadow-sign);
  padding: var(--efs-space-3) var(--efs-space-5) var(--efs-space-6);
  z-index: 30;
}
.signstrip__row { display: flex; align-items: center; gap: var(--efs-space-3); }
.signstrip__row svg { width: 28px; height: 28px; color: var(--efs-accent-signal); flex: none; }
.signstrip__row b { font: var(--efs-title-m); }
.signstrip__row span { font: var(--efs-body-m); color: var(--efs-ink-secondary); margin-left: auto; font-variant-numeric: tabular-nums; }

/* 押せる場所のヒント（レビュー用。プロダクトUIではない） */
.shell[data-hints="on"] .hot {
  outline: 2px dashed var(--efs-state-info);
  outline-offset: 2px;
  border-radius: var(--efs-radius-md);
}

@media (max-width: 1280px) {
  .shell { grid-template-columns: 232px minmax(0,1fr) 0; grid-template-areas: "top top top" "nav stage stage"; }
  .spec { display: none; }
}

/* プロダクトページ埋め込み用 */
body.embed-phone {
  background: transparent;
}

.shell.embed-phone {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  grid-template-areas: "stage";
  height: 100vh;
  min-height: 100%;
}

.shell.embed-phone .topbar,
.shell.embed-phone .nav,
.shell.embed-phone .spec {
  display: none;
}

.shell.embed-phone .stage {
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.shell.embed-phone #stageInner {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100%;
}

.shell.embed-phone .phone {
  box-shadow: none;
}
