/* F&B floor plan — editor (floor.html) and the POS table picker (terminal.html) */
.fl-stage { position: relative; flex: none; background-color: var(--sp-surface); background-image: radial-gradient(circle, var(--sp-border-strong) 1px, transparent 1.4px); background-size: var(--g, 20px) var(--g, 20px); background-position: calc(var(--g, 20px) / -2) calc(var(--g, 20px) / -2); border-radius: var(--sp-radius); box-shadow: inset 0 0 0 1px var(--sp-border); }
.fl-stage:not(.is-edit) { background-image: none; }
.fl-item { position: absolute; box-sizing: border-box; user-select: none; touch-action: none; display: flex; align-items: center; justify-content: center; font-size: var(--sp-fs-xs); color: var(--sp-text); }
.is-edit .fl-item { cursor: grab; }
.is-edit .fl-item:active { cursor: grabbing; }
.fl-lbl { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; pointer-events: none; text-align: center; padding: 0 2px; max-width: 100%; }
.fl-lbl b { font-size: var(--sp-fs-sm); font-weight: 700; }
.fl-lbl small { font-size: var(--sp-fs-3xs); color: var(--sp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.fl-lbl iconify-icon { font-size: var(--sp-fs-lg); }

/* tables + chairs */
.fl-table { background: var(--sp-surface-2); border: 2px solid var(--sp-border-strong); border-radius: var(--sp-radius-sm); box-shadow: var(--sp-shadow-xs); }
.fl-table.fl-s-round { border-radius: 50%; }
.fl-table.fl-s-booth { border-radius: var(--sp-radius-sm) var(--sp-radius-sm) var(--sp-radius-xl) var(--sp-radius-xl); background: var(--sp-violet-soft); border-color: var(--sp-violet); }
.fl-chair { position: absolute; width: 14px; height: 14px; border-radius: var(--sp-radius-2xs); background: var(--sp-border-strong); pointer-events: none; }
.fl-table.is-ordered { background: var(--sp-warning-soft); border-color: var(--sp-warning); }
.fl-table.is-ordered .fl-chair { background: var(--sp-warning); }
.fl-table.is-ready { background: var(--sp-success-soft); border-color: var(--sp-success); }
.fl-table.is-ready .fl-chair { background: var(--sp-success); }
.fl-table.is-free.is-pick:hover, .fl-table.is-pick:hover { border-color: var(--sp-primary); }
.fl-item.is-pick { cursor: pointer; }
.fl-item.is-pick:focus-visible { outline: 2px solid var(--sp-primary); outline-offset: 3px; }
.fl-table.is-picked { border-color: var(--sp-primary); box-shadow: 0 0 0 3px var(--sp-primary-ring); background: var(--sp-primary-soft); }

/* structures */
.fl-wall { background: var(--sp-text-2); border-radius: 2px; }
.fl-door { background: repeating-linear-gradient(45deg, var(--sp-primary-soft-2) 0 6px, var(--sp-primary-soft) 6px 12px); border: 2px solid var(--sp-primary); border-radius: var(--sp-radius-2xs); color: var(--sp-primary-text); }
.fl-door .fl-lbl { flex-direction: row; gap: 4px; }
.fl-struct { background: var(--sp-surface-3); border: 2px dashed var(--sp-border-strong); border-radius: var(--sp-radius-sm); color: var(--sp-muted); }
.fl-t-kitchen { background: var(--sp-amber-soft); border-color: var(--sp-amber); color: var(--sp-warning-text); }
.fl-t-counter { background: var(--sp-primary-soft); border: 2px solid var(--sp-primary); color: var(--sp-primary-text); }
.fl-t-counter .fl-lbl { flex-direction: row; gap: 5px; }
.fl-t-toilet { background: var(--sp-cyan-soft); border-color: var(--sp-cyan); color: var(--sp-cyan); }
.fl-t-stairs { background: repeating-linear-gradient(0deg, var(--sp-surface-3) 0 7px, var(--sp-border) 7px 9px); border-style: solid; }
.fl-t-plant { background: var(--sp-success-soft); border: 0; border-radius: 50%; color: var(--sp-success); }

/* selection */
.fl-item.is-sel { outline: calc(2px / var(--z, 1)) solid var(--sp-primary); outline-offset: calc(3px / var(--z, 1)); z-index: var(--sp-z-raised); }
.fl-item.is-clash { outline: calc(2px / var(--z, 1)) solid var(--sp-danger); outline-offset: calc(2px / var(--z, 1)); }
.fl-rz { position: absolute; right: calc(-9px / var(--z, 1)); bottom: calc(-9px / var(--z, 1)); width: calc(16px / var(--z, 1)); height: calc(16px / var(--z, 1)); border-radius: calc(5px / var(--z, 1)); background: var(--sp-primary); border: calc(2px / var(--z, 1)) solid var(--sp-surface); cursor: nwse-resize; z-index: 6; touch-action: none; }

/* editor layout */
.fe-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr) 270px; gap: 12px; align-items: start; }
.fe-grid > section { min-width: 0; }
.fe-pal, .fe-insp { padding: 14px; }
.fe-pal h4 { font-size: var(--sp-fs-2xs); text-transform: uppercase; letter-spacing: .06em; color: var(--sp-subtle); margin: 14px 0 8px; }
.fe-pal h4:first-child { margin-top: 0; }
.fe-pal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fe-chip { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; border: 1px solid var(--sp-border); border-radius: var(--sp-radius); background: var(--sp-surface); color: var(--sp-text); font-size: var(--sp-fs-2xs); font-weight: 600; text-align: center; line-height: 1.15; touch-action: none; cursor: grab; }
.fe-chip iconify-icon { font-size: var(--sp-fs-xl); color: var(--sp-primary); }
.fe-chip:hover { border-color: var(--sp-primary); background: var(--sp-primary-soft); }
.fe-ghost { position: fixed; z-index: var(--sp-z-top); pointer-events: none; padding: 8px 12px; border-radius: var(--sp-radius); background: var(--sp-text); color: var(--sp-surface); font-size: var(--sp-fs-xs); font-weight: 600; box-shadow: var(--sp-shadow-lg); display: flex; gap: 6px; align-items: center; transform: translate(-50%, -120%); }
.fe-canvas { padding: 12px; }
.fe-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.fe-shop { font-size: var(--sp-fs-md); font-weight: 700; border: 1px solid transparent; background: transparent; border-radius: var(--sp-radius-sm); padding: 4px 8px; min-width: 0; width: 240px; max-width: 100%; color: var(--sp-text); }
.fe-shop:hover, .fe-shop:focus { border-color: var(--sp-border-strong); background: var(--sp-surface); outline: 0; }
.fe-levels { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.fe-lv { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--sp-radius-pill); border: 1px solid var(--sp-border); background: var(--sp-surface); font-size: var(--sp-fs-xs); font-weight: 600; color: var(--sp-muted); }
.fe-lv.is-on { background: var(--sp-text); color: var(--sp-surface); border-color: var(--sp-text); }
.fe-lv small { font-weight: 500; opacity: .75; }
.fe-lv.is-add { border-style: dashed; color: var(--sp-primary-text); }
.fe-scroll { overflow: auto; border-radius: var(--sp-radius); background: var(--sp-surface-2); padding: 22px; height: 66vh; min-height: 380px; }
.fe-sizer { position: relative; flex: none; }
.fe-sizer > .fl-stage { position: absolute; left: 0; top: 0; }
.fe-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: var(--sp-fs-xs); color: var(--sp-muted); }
.fe-legend i { display: inline-block; width: 10px; height: 10px; border-radius: var(--sp-radius-2xs); margin-right: 5px; vertical-align: -1px; }
.fe-insp h3 { font-size: var(--sp-fs-base); margin: 0 0 10px; }
.fe-insp label { font-size: var(--sp-fs-xs); font-weight: 600; color: var(--sp-muted); margin: 10px 0 4px; display: block; }
.fe-row { display: flex; gap: 8px; align-items: center; }
.fe-row > * { flex: 1; min-width: 0; }
.fe-step { display: flex; align-items: center; border: 1px solid var(--sp-border-strong); border-radius: var(--sp-radius-sm); overflow: hidden; background: var(--sp-surface); }
.fe-step button { width: 34px; height: 34px; border: 0; background: var(--sp-surface-2); color: var(--sp-text); font-size: var(--sp-fs-lg); line-height: 1; }
.fe-step b { flex: 1; text-align: center; font-variant-numeric: tabular-nums; }
.fe-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; }
.fe-hint { font-size: var(--sp-fs-xs); color: var(--sp-muted); background: var(--sp-surface-2); border-radius: var(--sp-radius); padding: 10px 12px; margin-top: 12px; line-height: 1.45; }
.fe-warn { font-size: var(--sp-fs-xs); color: var(--sp-danger-text); background: var(--sp-danger-soft); border-radius: var(--sp-radius); padding: 8px 10px; margin-top: 10px; }
.fe-tlist { display: grid; gap: 4px; margin-top: 6px; }
.fe-tl { display: flex; justify-content: space-between; gap: 8px; font-size: var(--sp-fs-xs); padding: 6px 8px; border-radius: var(--sp-radius-sm); background: var(--sp-surface-2); }

/* POS table picker */
.pt-views { margin-bottom: 10px; }
.pt-map { overflow: hidden; border-radius: var(--sp-radius); background: var(--sp-surface-2); padding: 22px; }
.pt-lvls { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pt-lvls button { border: 0; border-radius: var(--sp-radius-pill); height: 28px; padding: 0 12px; font-size: var(--sp-fs-xs); font-weight: 600; background: var(--sp-surface-2); color: var(--sp-muted); }
.pt-lvls button.is-on { background: var(--sp-text); color: var(--sp-surface); }
.pt-tinfo { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 10px; border-radius: var(--sp-radius); background: var(--sp-primary-soft); color: var(--sp-primary-text); font-size: var(--sp-fs-xs); }
.pt-tinfo b { font-weight: 700; }
.pt-tinfo a { margin-left: auto; font-weight: 600; color: inherit; white-space: nowrap; }

@media (max-width: 1199.98px) { .fe-grid { grid-template-columns: 180px minmax(0, 1fr); } .fe-insp { grid-column: 1 / -1; } }
@media (max-width: 767.98px) { .fe-grid { grid-template-columns: 1fr; } .fe-pal-grid { grid-template-columns: repeat(4, 1fr); } }

/* POS: the table map takes the receipts column so it stays readable */
.pt-layout.is-map { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.pt-layout.is-map .pt-side { display: none; }
@media (max-width: 767.98px) { .pt-layout.is-map { grid-template-columns: 1fr; } }

/* Library dropdown (components/sp-select.js) inside the floor + POS panels */
.sp-select-menu { max-height: 300px; overflow: auto; }
.sp-select-grp { padding: 8px 10px 4px; font-size: var(--sp-fs-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sp-subtle); }
.sp-select-grp:first-child { padding-top: 4px; }
.fe-insp .sp-select-btn, .pt-cart-h .sp-select-btn { min-height: 34px; padding: 5px 10px; }
.pt-cart-h .sp-select { flex: 0 1 62%; min-width: 0; }
.pt-cart-h .sp-select-menu { left: auto; min-width: 100%; width: max-content; max-width: 320px; }
.pt-adj .sp-select { margin-bottom: .5rem; }
.pt-adj .sp-select-btn { min-height: 34px; padding: 5px 10px; }

/* Zoom / grid toolbar */
.fe-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.fe-zoom { display: inline-flex; align-items: center; padding: 3px; gap: 2px; border-radius: var(--sp-radius); background: var(--sp-surface-3); }
.fe-zoom button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; height: 30px; padding: 0 9px; border: 0; border-radius: var(--sp-radius-sm); background: transparent; color: var(--sp-text-2); font-size: var(--sp-fs-xs); font-weight: 600; }
.fe-zoom button:hover { background: var(--sp-surface); color: var(--sp-text); }
.fe-zoom button.pct { min-width: 54px; font-variant-numeric: tabular-nums; }
.fe-zoom button.pct.is-on { background: var(--sp-primary); color: #fff; }
.fe-snap { display: inline-flex; align-items: center; gap: 8px; font-size: var(--sp-fs-xs); font-weight: 600; color: var(--sp-muted); }
.fe-snap > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.fe-snap .sp-select { width: 168px; }
.fe-snap .sp-select-btn { min-height: 34px; padding: 5px 10px; }
.fe-dim { font-size: var(--sp-fs-xs); color: var(--sp-muted); margin-top: 6px; }

/* Full view */
html.fe-noscroll, html.fe-noscroll body { overflow: hidden; }
.fe-wrap.is-full { position: fixed; inset: 0; z-index: var(--sp-z-overlay); background: var(--sp-bg); padding: 12px; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.fe-wrap.is-full .fe-barcard { margin-bottom: 12px !important; }
.fe-wrap.is-full .fe-grid { min-height: 0; height: 100%; }
.fe-wrap.is-full .fe-grid > section { height: 100%; min-height: 0; overflow: auto; }
.fe-wrap.is-full .fe-canvas { display: flex; flex-direction: column; overflow: hidden; }
.fe-wrap.is-full .fe-scroll, .fe-wrap.is-full .fe-3d { flex: 1; height: auto; min-height: 0; max-height: none; }
@media (max-width: 767.98px) {
  .fe-wrap.is-full { overflow: auto; display: block; }
  .fe-wrap.is-full .fe-grid { height: auto; }
  .fe-wrap.is-full .fe-grid > section { height: auto; }
  .fe-wrap.is-full .fe-canvas { height: 78vh; }
}

/* 3D walk-in — the scene takes the whole card; panels float on top of it */
.fe-grid.is-3d { grid-template-columns: minmax(0, 1fr); }
.fe-grid.is-3d > .fe-pal, .fe-grid.is-3d > .fe-insp { display: none; }
.fe-grid.is-3d > .fe-canvas { padding: 0; overflow: hidden; }
.fe-3d-shell { position: relative; height: clamp(520px, calc(100vh - 220px), 1000px); border-radius: inherit; overflow: hidden; background: var(--sp-surface-3); isolation: isolate; }
.fe-wrap.is-full .fe-3d-shell { flex: 1; height: auto; min-height: 0; }
.fe-3d { position: absolute; inset: 0; overflow: hidden; background: var(--sp-surface-3); touch-action: none; }
.fe-glass { background: color-mix(in srgb, var(--sp-surface) 84%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border: 1px solid color-mix(in srgb, var(--sp-border) 80%, transparent); box-shadow: 0 8px 24px rgba(15, 20, 30, .14); }
[data-bs-theme="dark"] .fe-glass { box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }

/* top bar: camera + actions */
.fe-3d-top { position: absolute; left: 14px; right: 14px; top: 14px; z-index: 4; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; pointer-events: none; }
.fe-3d-top > * { pointer-events: auto; }
.fe-3d-seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--sp-radius-md); }
.fe-3d-seg button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: var(--sp-radius); background: transparent; color: var(--sp-text-2); font-size: var(--sp-fs-sm); font-weight: 600; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.fe-3d-seg button iconify-icon { font-size: var(--sp-fs-md); }
.fe-3d-seg button:hover { background: color-mix(in srgb, var(--sp-text) 7%, transparent); color: var(--sp-text); }
.fe-3d-seg button.is-on { background: var(--sp-primary); color: #fff; box-shadow: var(--sp-shadow-btn); }
.fe-3d-acts { display: flex; gap: 8px; }
.fe-3d-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; min-width: 44px; padding: 0 14px; border-radius: var(--sp-radius-md); color: var(--sp-text); font-size: var(--sp-fs-sm); font-weight: 600; cursor: pointer; list-style: none; transition: background .15s ease, border-color .15s ease; }
.fe-3d-btn::-webkit-details-marker { display: none; }
.fe-3d-btn iconify-icon { font-size: var(--sp-fs-lg); }
.fe-3d-btn:hover { background: var(--sp-surface); }
.fe-3d-btn.is-on { border-color: var(--sp-primary); color: var(--sp-primary-text); background: color-mix(in srgb, var(--sp-primary-soft) 90%, transparent); }
.fe-3d-btn:focus-visible, .fe-3d-seg button:focus-visible, .fe-3d-row:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--sp-primary-ring); }

/* tables drawer */
.fe-3d-drawer { position: absolute; z-index: 3; top: 72px; right: 14px; bottom: 72px; width: 300px; display: flex; flex-direction: column; border-radius: var(--sp-radius-lg); overflow: hidden; opacity: 0; transform: translateX(calc(100% + 20px)); pointer-events: none; transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s ease; }
.has-drawer .fe-3d-drawer { opacity: 1; transform: none; pointer-events: auto; }
.fe-3d-dh { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 10px 16px; }
.fe-3d-dh small { display: flex; align-items: center; gap: 4px; font-size: var(--sp-fs-3xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sp-subtle); }
.fe-3d-dh b { display: block; font-size: var(--sp-fs-md); letter-spacing: -.01em; }
.fe-3d-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 14px; }
.fe-3d-stats div { padding: 8px 10px; border-radius: var(--sp-radius); background: color-mix(in srgb, var(--sp-surface-3) 70%, transparent); }
.fe-3d-stats b { display: block; font-size: var(--sp-fs-lg); font-variant-numeric: tabular-nums; line-height: 1.2; }
.fe-3d-stats span { font-size: var(--sp-fs-2xs); color: var(--sp-muted); }
.fe-3d-dl { padding: 14px 16px 6px; font-size: var(--sp-fs-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sp-subtle); }
.fe-3d-list { flex: 1; min-height: 0; overflow: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.fe-3d-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: var(--sp-radius); background: transparent; color: var(--sp-text); text-align: left; font-size: var(--sp-fs-xs); transition: background .15s ease; }
.fe-3d-row:hover { background: color-mix(in srgb, var(--sp-text) 6%, transparent); }
.fe-3d-row.is-on { background: var(--sp-primary-soft); }
.fe-3d-row > iconify-icon { color: var(--sp-subtle); font-size: var(--sp-fs-base); }
.fe-3d-tag { flex-shrink: 0; min-width: 38px; height: 26px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: var(--sp-radius-sm); font-size: var(--sp-fs-xs); font-weight: 700; background: var(--sp-surface-3); color: var(--sp-text); }
.is-ordered > .fe-3d-tag { background: var(--sp-warning-soft); color: var(--sp-warning-text); }
.is-ready > .fe-3d-tag { background: var(--sp-success-soft); color: var(--sp-success-text); }
.fe-3d-meta { flex: 1; min-width: 0; color: var(--sp-muted); }
.fe-3d-st { display: inline-flex; align-items: center; gap: 5px; font-size: var(--sp-fs-xs); font-weight: 600; color: var(--sp-muted); }
.fe-3d-st i, .fe-3d-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--sp-border-strong); }
.is-ordered .fe-3d-st { color: var(--sp-warning-text); } .is-ordered .fe-3d-st i, .fe-3d-legend .is-ordered i { background: var(--sp-warning); }
.is-ready .fe-3d-st { color: var(--sp-success-text); } .is-ready .fe-3d-st i, .fe-3d-legend .is-ready i { background: var(--sp-success); }
.fe-3d-note { margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--sp-divider); font-size: var(--sp-fs-2xs); line-height: 1.45; color: var(--sp-muted); }

/* bottom: legend + controls help */
.fe-3d-foot { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 4; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; pointer-events: none; }
.fe-3d-foot > * { pointer-events: auto; }
.fe-3d-legend { display: inline-flex; align-items: center; gap: 16px; height: 44px; padding: 0 16px; border-radius: var(--sp-radius-md); font-size: var(--sp-fs-xs); font-weight: 500; color: var(--sp-text-2); }
.fe-3d-legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.fe-3d-legend b { font-variant-numeric: tabular-nums; color: var(--sp-text); }
.fe-3d-help { position: relative; }
.fe-3d-help[open] > summary { border-color: var(--sp-primary); color: var(--sp-primary-text); }
.fe-3d-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 6; width: 290px; padding: 14px; border-radius: var(--sp-radius-lg); animation: fe-pop .2s ease; }
@keyframes fe-pop { from { opacity: 0; transform: translateY(-6px); } }

/* picked table card */
.fe-3d .fe-3d-tip { left: 50%; top: auto; bottom: 72px; transform: translateX(-50%); width: max-content; max-width: min(460px, calc(100% - 28px)); flex-wrap: nowrap; gap: 12px; padding: 10px 10px 10px 12px; border-radius: var(--sp-radius-lg); animation: fe-tip .25s ease; }
@keyframes fe-tip { from { opacity: 0; transform: translate(-50%, 8px); } }
.fe-3d .fe-3d-tip .fe-3d-tag { height: 34px; min-width: 44px; font-size: var(--sp-fs-sm); }
.fe-3d-tip.is-ordered .fe-3d-tag { background: var(--sp-warning-soft); color: var(--sp-warning-text); }
.fe-3d-tip.is-ready .fe-3d-tag { background: var(--sp-success-soft); color: var(--sp-success-text); }
.fe-3d-tip-txt { min-width: 0; }
.fe-3d-tip-txt b { display: block; font-size: var(--sp-fs-sm); }
.fe-3d-tip-txt span { display: block; font-size: var(--sp-fs-xs); color: var(--sp-muted); }
.fe-3d .fe-3d-hint { bottom: 72px; }
.fe-3d .fe-3d-pad { bottom: 72px; }

@media (max-width: 767.98px) {
  .fe-3d-shell { height: clamp(460px, 72vh, 720px); }
  .fe-3d-seg button { padding: 0 10px; }
  .fe-3d-seg button span, .fe-3d-btn span { display: none; }
  .fe-3d-btn { padding: 0; }
  .fe-3d-drawer { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 62%; transform: translateY(calc(100% + 20px)); z-index: var(--sp-z-raised); }
  .fe-3d-legend { gap: 10px; padding: 0 12px; font-size: var(--sp-fs-2xs); }
  .fe-3d-top { left: 10px; right: 10px; top: 10px; }
  .fe-3d-foot { left: 10px; right: 10px; bottom: 10px; }
  .fe-3d-shell.is-walk .fe-3d-legend { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .fe-3d-drawer, .fe-3d-pop, .fe-3d .fe-3d-tip { transition: none; animation: none; } }
.fe-3d-canvas { display: block; width: 100%; height: 100%; outline: 0; cursor: grab; }
.fe-3d.is-walk .fe-3d-canvas { cursor: crosshair; }
.fe-3d-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--sp-muted); font-size: var(--sp-fs-sm); text-align: center; padding: 24px; }
.fe-3d-msg iconify-icon { font-size: var(--sp-fs-3xl); color: var(--sp-primary); }
.fe-3d-msg.is-err iconify-icon { color: var(--sp-danger); }
.fe-3d-tip { position: absolute; left: 12px; top: 12px; z-index: 3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: calc(100% - 24px); padding: 10px 12px; border-radius: var(--sp-radius-md); background: var(--sp-surface); border: 1px solid var(--sp-border); box-shadow: var(--sp-shadow-lg); font-size: var(--sp-fs-xs); }
.fe-3d-tip b { font-size: var(--sp-fs-md); }
.fe-3d-tip span { color: var(--sp-muted); }
.fe-3d-hint { display: none; position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 2; padding: 6px 12px; border-radius: var(--sp-radius-pill); background: rgba(20, 24, 32, .72); color: #fff; font-size: var(--sp-fs-xs); font-weight: 600; pointer-events: none; white-space: nowrap; }
.fe-3d.is-walk .fe-3d-hint { display: block; }
.fe-3d-pad { display: none; position: absolute; left: 14px; bottom: 14px; z-index: 3; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(2, 44px); gap: 6px; }
.fe-3d-pad button { border: 0; border-radius: var(--sp-radius-md); background: rgba(20, 24, 32, .62); color: #fff; font-size: var(--sp-fs-base); touch-action: none; }
.fe-3d-pad [data-p="f"] { grid-column: 2; grid-row: 1; } .fe-3d-pad [data-p="l"] { grid-column: 1; grid-row: 2; } .fe-3d-pad [data-p="b"] { grid-column: 2; grid-row: 2; } .fe-3d-pad [data-p="r"] { grid-column: 3; grid-row: 2; }
@media (hover: none), (max-width: 767.98px) { .fe-3d.is-walk .fe-3d-pad { display: grid; } .fe-3d.is-walk .fe-3d-hint { display: none; } }
.fe-keys { display: grid; gap: 8px; font-size: var(--sp-fs-xs); color: var(--sp-text-2); }
.fe-keys > div { display: flex; align-items: center; gap: 6px; }
.fe-keys span:last-child { margin-left: 4px; color: var(--sp-muted); }
.fe-keys kbd { min-width: 24px; padding: 2px 6px; border-radius: var(--sp-radius-xs); border: 1px solid var(--sp-border-strong); background: var(--sp-surface); color: var(--sp-text); font-size: var(--sp-fs-2xs); font-weight: 700; text-align: center; box-shadow: 0 1px 0 var(--sp-border-strong); }
.fe-mouse iconify-icon { font-size: var(--sp-fs-xl); color: var(--sp-primary); }
.fe-tl.is-btn { border: 0; width: 100%; text-align: left; color: var(--sp-text); }
.fe-tl.is-btn:hover { background: var(--sp-primary-soft); }

/* changing floor on the stairs: a short fade with where you are going */
.fe-3d-fade { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #0b0c0f; color: #fff; opacity: 0; pointer-events: none; transition: opacity .32s ease; }
.fe-3d-fade.is-on { opacity: 1; }
.fe-3d-fade span { font-size: var(--sp-fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.fe-3d-fade b { font-size: var(--sp-fs-2xl); font-weight: 700; letter-spacing: -.02em; }
@media (prefers-reduced-motion: reduce) { .fe-3d-fade { transition: none; } }
