:root {
  --ink: #071a12;
  --panel: rgba(16, 43, 32, 0.8);
  --panel-solid: #102a1f;
  --panel-soft: #123423;
  --line: #2f9d63;
  --line-soft: rgba(61, 220, 132, 0.22);
  --paper: #eaf7ef;
  --paper-dim: #9dc6b1;
  --signal: #3ddc84;
  --signal-hot: #7cffb2;
  --signal-dim: rgba(61, 220, 132, 0.18);
  --shadow: rgba(0, 0, 0, 0.5);
  --warn: #f0a94e;
  --danger: #ff5c5c;
  --on-signal: #062016;
  --glass: rgba(16, 43, 32, 0.55);
  --glass-strong: rgba(9, 26, 19, 0.82);
  --canvas-chip: rgba(9, 26, 19, 0.88);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: Manrope, 'Segoe UI', sans-serif;
}

body {
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(61, 220, 132, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 10%, rgba(47, 157, 99, 0.12), transparent 50%),
    linear-gradient(180deg, #0d2418 0%, var(--ink) 100%);
  background-size: 200% 200%, 200% 200%, 100% 100%;
  animation: ambient-shift 22s ease-in-out infinite;
  overflow-x: hidden;
}

@keyframes ambient-shift {
  0%, 100% { background-position: 0% 0%, 100% 0%, 0 0; }
  50% { background-position: 20% 30%, 70% 40%, 0 0; }
}

.ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.4;
  animation: drift 18s ease-in-out infinite;
}

.orb-a { width: 320px; height: 320px; background: #2fae66; top: 8%; left: -4%; }
.orb-b { width: 360px; height: 360px; background: #1f6b48; right: -8%; top: 30%; animation-delay: -6s; }
.orb-c { width: 260px; height: 260px; background: #3ddc84; bottom: -6%; left: 40%; animation-delay: -11s; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(24px, -18px, 0) scale(1.1); }
}

button, input { font: inherit; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.mono { font-family: 'IBM Plex Mono', monospace; }

.topbar,
.app-shell,
.idle-lock {
  position: relative;
  z-index: 1;
}

.topbar {
  position: relative;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line-soft);
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  transition: box-shadow 0.3s ease;
}

.topbar:hover { box-shadow: 0 6px 24px var(--shadow); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  color: var(--paper);
  text-decoration: none;
}

.brand-seal {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 218, 0, 0.48), 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease;
}

.brand:hover .brand-seal { transform: scale(1.08) rotate(-4deg); }

.brand-accent { color: var(--signal); }

.header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--paper-dim);
}

@keyframes badge-shimmer {
  0%, 40% { transform: translateX(-120%); }
  60%, 100% { transform: translateX(120%); }
}

.auth-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(61, 220, 132, 0.08);
  color: var(--paper);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-button svg { width: 14px; height: 14px; }

.help-button {
  width: 32px;
  height: 32px;
  justify-content: center;
  padding: 0;
  font-weight: 800;
}

.auth-button:hover {
  border-color: var(--signal);
  color: var(--signal-hot);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--shadow);
}

.auth-button:active { transform: translateY(0) scale(0.96); }

.control-plate:disabled { opacity: 0.48; cursor: not-allowed; }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--paper-dim);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.status-dot.is-active {
  background: var(--signal);
  box-shadow: 0 0 0 5px var(--signal-dim);
  animation: pulse-soft 1.8s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 4vw 64px;
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(280px, 0.85fr);
  gap: 22px;
}

.viewer-card,
.info-card {
  background: linear-gradient(180deg, rgba(16, 43, 32, 0.92) 0%, rgba(9, 26, 19, 0.92) 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px var(--shadow);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.viewer-card:hover,
.info-card:hover { box-shadow: 0 28px 70px var(--shadow); }

.info-card > .room-details { order: -2; }

.viewer-card { padding: 22px; }

.viewer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.viewer-head > div:first-child { flex: 1; }
.kicker {
  margin: 0 0 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
}

h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.3vw, 2.05rem);
  font-weight: 750;
  letter-spacing: -0.04em;
  max-width: 18ch;
  line-height: 1.15;
}

.floor-readout {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: var(--paper-dim);
  white-space: nowrap;
}

.floor-readout span {
  color: var(--signal);
  font-weight: 600;
}

.viewer-stage {
  position: relative;
  height: 62vh;
  min-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, #123825 0%, #050f0a 78%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(61, 220, 132, 0.035) 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(61, 220, 132, 0.035) 40px);
  background-size: auto, 40px 40px, 40px 40px;
  animation: stage-grid-drift 22s linear infinite;
  border: 1px solid var(--line-soft);
}

@keyframes stage-grid-drift {
  to { background-position: center, 40px 40px, -40px 40px; }
}

.viewer-stage::before,
.viewer-stage::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--signal);
  opacity: 0.75;
  pointer-events: none;
  z-index: 3;
}
.viewer-stage::before { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.viewer-stage::after { bottom: 12px; right: 12px; border-left: none; border-top: none; }

.scan-line {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  height: 18%;
  background: linear-gradient(180deg, transparent, rgba(61, 220, 132, 0.22), transparent);
  z-index: 2;
  pointer-events: none;
  animation: scan 1.8s linear infinite;
}

.viewer-stage.is-loading .scan-line,
.viewer-stage.is-switching .scan-line { display: block; }

@keyframes scan {
  from { top: -20%; }
  to { top: 100%; }
}

#modelCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.viewer-stage.is-loading::before,
.viewer-stage.is-loading::after,
.viewer-stage.is-switching::before,
.viewer-stage.is-switching::after {
  animation: pulse-bracket 1.4s ease-in-out infinite;
}

@keyframes pulse-bracket {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

.floor-rail {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 4;
}

.floor-plate {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-soft);
  background: var(--glass);
  color: var(--paper-dim);
  border-radius: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.floor-plate:hover { border-color: var(--signal); color: var(--paper); transform: translateY(-2px) scale(1.04); }
.floor-plate:active { transform: translateY(0) scale(0.96); }

.floor-plate.active {
  background: var(--signal);
  color: var(--on-signal);
  border-color: var(--signal);
  box-shadow: 0 8px 22px var(--signal-dim);
  animation: floor-pop 0.35s ease;
}

@keyframes floor-pop {
  0% { transform: scale(0.85); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.viewport-controls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 8px;
  z-index: 4;
}

.control-plate {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border: 1px solid var(--line-soft);
  background: var(--glass);
  color: var(--paper-dim);
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.control-plate svg { width: 15px; height: 15px; flex-shrink: 0; }

.control-plate {
  position: relative;
  overflow: hidden;
}

.control-plate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(61, 220, 132, 0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.5s ease;
  pointer-events: none;
}

.control-plate:hover::before { transform: translateX(120%); }

.control-plate:hover {
  border-color: var(--signal);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px var(--shadow);
}

.control-plate:active { transform: translateY(0) scale(0.97); }

.control-plate.active {
  border-color: var(--signal);
  color: var(--signal-hot);
  background: var(--signal-dim);
  box-shadow: 0 0 0 4px var(--signal-dim);
}


.room-labels {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.room-label[hidden],
.room-area[hidden],
.location-marker[hidden] { display: none !important; }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.staff-help-dialog {
  width: min(620px, calc(100% - 32px));
  max-width: 620px;
  max-height: none;
  overflow: visible;
}
.staff-help-dialog::backdrop {
  background: rgba(3, 10, 7, 0.68);
  backdrop-filter: none;
}
.staff-help-dialog h2 { margin: 0 0 12px; }
.staff-help-dialog .setup-steps { margin: 0; padding-left: 22px; }
.staff-help-dialog .setup-steps li + li { margin-top: 10px; }

.staff-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.room-label {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--signal);
  font: inherit;
  pointer-events: auto;
  animation: pin-drop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.room-area {
  position: absolute;
  min-width: 10px;
  min-height: 10px;
  padding: 0;
  border: 1px solid rgba(61, 220, 132, 0.45);
  border-radius: 4px;
  background: rgba(61, 220, 132, 0.08);
  color: var(--paper);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.room-area span {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: 90%;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--canvas-chip);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.18s ease;
}

.room-area:hover,
.room-area:focus-visible,
.room-area.is-selected {
  border-color: var(--signal);
  background: rgba(61, 220, 132, 0.18);
}

.room-area:hover span,
.room-area:focus-visible span,
.room-area.is-selected span { opacity: 1; }

@keyframes pin-drop {
  from { opacity: 0; transform: translate(-50%, -120%) scale(0.7); }
  to { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}

.marker-pin {
  display: block;
  line-height: 0;
  filter: drop-shadow(0 3px 6px var(--shadow));
  transition: transform 0.18s ease;
}

.room-label:not(:hover):not(.is-selected):not(:focus-visible) .marker-pin {
  animation: pin-bob 2.6s ease-in-out infinite;
}

@keyframes pin-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.room-label:hover .marker-pin,
.room-label:focus-visible .marker-pin,
.room-label.is-selected .marker-pin {
  transform: scale(1.22) translateY(-2px);
}

.room-label.is-selected { color: var(--paper); }

.location-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ff5c5c;
  pointer-events: none;
  z-index: 4;
  animation: pin-drop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.location-marker .marker-pin { filter: drop-shadow(0 3px 8px rgba(255, 45, 45, 0.5)); }

.location-tooltip {
  margin-top: 4px;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: rgba(70, 8, 12, 0.94);
  color: #ffdede;
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255, 45, 45, 0.28);
}

.room-label .marker-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  display: block;
  max-width: 160px;
  overflow: hidden;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: var(--canvas-chip);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  box-shadow: 0 4px 14px var(--shadow);
}

.marker-tooltip {
  position: absolute;
  bottom: 100%;
  margin-bottom: 6px;
  padding: 5px 10px;
  border: 1px solid var(--signal);
  border-radius: 999px;
  background: var(--canvas-chip);
  color: #fff;
  box-shadow: 0 4px 14px var(--shadow);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.room-label.is-selected .marker-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.location-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--warn);
  pointer-events: none;
}

.location-marker .marker-tooltip {
  border-color: var(--danger);
  bottom: calc(100% + 6px);
  opacity: 1;
  color: var(--danger);
  font-weight: 700;
  transform: none;
}

.location-pin {
  line-height: 0;
  position: relative;
}

.location-pin::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid var(--warn);
  border-radius: 50%;
  animation: ping 1.8s ease-out infinite;
}

@keyframes ping {
  0% { transform: scale(0.55); opacity: 0.7; }
  100% { transform: scale(1.45); opacity: 0; }
}

.room-details {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px;
  margin-top: 4px;
  background: rgba(61, 220, 132, 0.05);
}

.room-details h2 {
  margin: 2px 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.room-details .info-line { margin-top: 4px; }

.room-status {
  margin: 0;
  color: var(--signal);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.room-status[data-status='closed'] { color: var(--warn); }

.room-details-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.room-action-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.room-action-btn:hover { border-color: var(--signal); color: var(--signal-hot); }

.room-action-danger { border-color: var(--danger); color: var(--danger); }
.room-action-danger:hover { background: rgba(255, 59, 59, 0.12); color: var(--danger); }

.accessible-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 0.78rem;
  color: var(--paper-dim);
  cursor: pointer;
}

.accessible-toggle input { accent-color: var(--signal); }

.stage-message {
  position: absolute;
  inset: auto 20px 20px 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--canvas-chip);
  border: 1px solid var(--line-soft);
  color: #e7f5ec;
  line-height: 1.55;
  font-size: 0.82rem;
  z-index: 5;
  animation: dialog-in 0.3s ease;
}

.info-card {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: fit-content;
}

.panel-heading {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.field-label {
  margin-top: 2px;
  font-size: 0.95rem;
  color: var(--paper);
  font-weight: 600;
}

.info-divider {
  height: 1px;
  background: var(--line-soft);
  margin: 12px 0 2px;
  transform-origin: left;
  animation: divider-arrive 0.8s ease-out 0.35s both;
}

@keyframes divider-arrive { from { transform: scaleX(0.25); opacity: 0.35; } to { transform: scaleX(1); opacity: 1; } }

.info-line {
  color: var(--paper-dim);
  line-height: 1.65;
  font-size: 0.9rem;
  margin: 0;
}

.info-line-muted { font-size: 0.82rem; opacity: 0.85; }

/* Landing page */
.landing-page { min-height: 100vh; overflow-x: hidden; }
.landing-topbar { position: relative; height: 82px; }
.landing-topbar .brand-seal { width: 42px; height: 42px; }
.landing-nav { display: flex; align-items: center; gap: clamp(18px, 4vw, 48px); }
.landing-nav-link { color: var(--paper-dim); font: 600 0.74rem 'IBM Plex Mono', monospace; text-decoration: none; transition: color 0.2s ease; }
.landing-nav-link:hover { color: var(--paper); }
.landing-nav-link span { color: var(--signal); font-size: 1rem; }
.landing-nav-cta { padding: 11px 15px; border: 1px solid var(--line-soft); border-radius: 8px; color: var(--paper); }
.landing-nav-cta:hover { border-color: var(--signal); }
.landing-main { max-width: 1320px; margin: 0 auto; padding: 42px 5vw 88px; }
.landing-hero { min-height: min(690px, 76vh); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.85fr); align-items: center; gap: 5vw; padding-bottom: 70px; }
.landing-copy { max-width: 680px; }
.landing-copy .kicker { display: flex; align-items: center; gap: 10px; color: var(--paper-dim); font-size: 0.68rem; }
.live-indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 12px var(--signal); }
.landing-copy h1 { max-width: none; margin: 24px 0 22px; font-size: clamp(3.6rem, 7.3vw, 7rem); line-height: 0.94; letter-spacing: -0.075em; }
.landing-copy h1 em, .about-copy h2 em { color: var(--signal); font-style: normal; }
.landing-intro { max-width: 500px; margin: 0 0 30px; color: var(--paper-dim); font-size: clamp(0.95rem, 1.4vw, 1.08rem); line-height: 1.75; }
.landing-actions { display: flex; align-items: center; gap: 22px; }
.landing-cta { display: inline-flex; align-items: center; gap: 32px; padding: 15px 18px; border: 1px solid var(--signal); border-radius: 9px; background: var(--signal); color: var(--on-signal); font: 700 0.76rem 'IBM Plex Mono', monospace; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.4s ease; background-image: linear-gradient(100deg, var(--signal) 0%, var(--signal-hot) 50%, var(--signal) 100%); background-size: 220% 100%; background-position: 0% 0%; }
.landing-cta:hover { transform: translateY(-3px); box-shadow: 0 12px 30px var(--signal-dim); background-position: 100% 0%; }
.landing-cta span { font-size: 1.15rem; }
.landing-note { color: var(--paper-dim); font: 0.64rem/1.6 'IBM Plex Mono', monospace; }
.landing-trust { display: flex; align-items: center; gap: 10px; margin-top: 38px; color: var(--paper-dim); font: 0.64rem 'IBM Plex Mono', monospace; }
.trust-check { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--signal); }
.trust-separator { width: 3px; height: 3px; margin: 0 3px; border-radius: 50%; background: var(--line); }
.landing-reveal { animation: landing-reveal 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms) both; }
@keyframes landing-reveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.landing-visual { position: relative; display: grid; min-height: 460px; place-items: center; isolation: isolate; }
.seal-halo { position: absolute; z-index: -1; width: min(36vw, 430px); aspect-ratio: 1; border: 1px solid rgba(61, 220, 132, 0.12); border-radius: 50%; box-shadow: 0 0 0 35px rgba(61, 220, 132, 0.025), 0 0 0 75px rgba(61, 220, 132, 0.02), inset 0 0 100px rgba(61, 220, 132, 0.045); }
.seal-card { position: relative; display: flex; width: min(330px, 72%); min-height: 360px; flex-direction: column; align-items: center; justify-content: center; padding: 36px 24px; border: 1px solid rgba(61, 220, 132, 0.28); border-radius: 20px; background: linear-gradient(145deg, rgba(19, 51, 37, 0.9), rgba(6, 23, 16, 0.96)); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255,255,255,0.06); transform: rotate(2deg); animation: seal-float 7s ease-in-out infinite; }
.seal-card::before { position: absolute; inset: 10px; border: 1px solid rgba(61, 220, 132, 0.1); border-radius: 13px; content: ''; pointer-events: none; }
.seal-card-label { margin-bottom: 20px; color: var(--signal); font: 0.58rem 'IBM Plex Mono', monospace; letter-spacing: 0.16em; }
.hero-seal { width: min(210px, 78%); aspect-ratio: 1; object-fit: contain; border-radius: 50%; box-shadow: 0 14px 38px rgba(0,0,0,0.35), 0 0 32px rgba(255,218,0,0.09); }
.seal-card strong { margin-top: 19px; font-size: 0.91rem; letter-spacing: -0.02em; }
.seal-location { margin-top: 5px; color: var(--paper-dim); font: 0.64rem 'IBM Plex Mono', monospace; }
@keyframes seal-float { 0%, 100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(-10px) rotate(-1deg); } }
.orbit-label { position: absolute; display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px; border: 1px solid var(--line-soft); border-radius: 7px; background: rgba(9, 26, 19, 0.92); color: var(--paper-dim); box-shadow: 0 8px 22px var(--shadow); font: 0.58rem 'IBM Plex Mono', monospace; letter-spacing: 0.04em; }
.orbit-label i { width: 5px; height: 5px; border-radius: 50%; background: var(--signal); }
.orbit-label b { color: var(--signal); font-weight: 500; }
.orbit-label-one { top: 8%; right: -3%; }
.orbit-label-two { bottom: 19%; left: -1%; }
.orbit-label-three { top: 50%; right: -8%; }
.visual-cross { position: absolute; color: var(--signal); font: 1.2rem 'IBM Plex Mono', monospace; opacity: 0.65; }
.visual-cross-one { top: 12%; left: 15%; }
.visual-cross-two { bottom: 12%; right: 20%; }
.landing-facts { padding: 32px 0 78px; border-top: 1px solid var(--line-soft); }
.fact-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.strip-number { color: var(--signal); font: 0.65rem 'IBM Plex Mono', monospace; letter-spacing: 0.08em; }
.fact-heading p { margin: 0; color: var(--paper-dim); font-size: 0.82rem; }
.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fact-card { position: relative; min-height: 205px; padding: 24px; border: 1px solid var(--line-soft); border-radius: 13px; background: linear-gradient(145deg, rgba(16,43,32,0.68), rgba(7,26,18,0.58)); transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease; }
.fact-card:hover { transform: translateY(-4px); border-color: rgba(61,220,132,0.48); background: linear-gradient(145deg, rgba(19,54,38,0.82), rgba(7,26,18,0.7)); }
.fact-index { position: absolute; top: 22px; right: 22px; color: rgba(157,198,177,0.5); font: 0.6rem 'IBM Plex Mono', monospace; }
.fact-icon { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 9px; color: var(--signal); font-size: 1.2rem; }
.fact-card h2 { margin: 0 0 8px; font-size: 0.95rem; letter-spacing: -0.02em; }
.fact-card p { max-width: 300px; margin: 0; color: var(--paper-dim); font-size: 0.76rem; line-height: 1.65; }
.landing-about { display: grid; grid-template-columns: 0.7fr 1.2fr 0.75fr; align-items: start; gap: 34px; padding: 48px 0 60px; border-top: 1px solid var(--line-soft); }
.about-marker { display: flex; align-items: center; gap: 18px; padding-top: 10px; }
.about-marker .strip-number { white-space: nowrap; }
.about-line { width: 100%; height: 1px; background: var(--line-soft); }
.about-copy h2 { margin: 0 0 27px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -0.06em; }
.about-steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.about-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.about-steps li > span { padding-top: 2px; color: var(--signal); font: 0.62rem 'IBM Plex Mono', monospace; }
.about-steps strong { font-size: 0.77rem; }
.about-steps p { margin: 4px 0 0; color: var(--paper-dim); font-size: 0.7rem; line-height: 1.55; }
.about-map-link { display: flex; align-items: center; gap: 13px; justify-self: end; margin-top: 6px; padding: 15px; border: 1px solid var(--line-soft); border-radius: 11px; color: var(--paper); text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease; }
.about-map-link:hover { transform: translateY(-3px); border-color: var(--signal); }
.about-map-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; background: var(--signal); color: var(--on-signal); font-size: 1.2rem; }
.about-map-link strong, .about-map-link small { display: block; }
.about-map-link strong { font-size: 0.72rem; }
.about-map-link small { margin-top: 4px; color: var(--paper-dim); font: 0.57rem 'IBM Plex Mono', monospace; }
.landing-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 5vw; border-top: 1px solid var(--line-soft); background: rgba(5, 18, 12, 0.45); }
.footer-brand { font-size: 0.9rem; }
.footer-brand .brand-seal { width: 28px; height: 28px; }
.landing-footer p { margin: 0; color: var(--paper-dim); font-size: 0.68rem; }
.footer-location { color: rgba(157,198,177,0.7); font: 0.56rem 'IBM Plex Mono', monospace; letter-spacing: 0.08em; }

.idle-lock {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(3, 10, 7, 0.62);
  backdrop-filter: blur(10px);
}

.idle-lock[hidden] { display: none; }

.idle-card {
  width: min(360px, calc(100% - 32px));
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background: var(--panel-solid);
  animation: dialog-in 0.3s ease;
}

.idle-card h2 {
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

.idle-card p { color: var(--paper-dim); line-height: 1.55; }

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding-top: 22px;
  }

  .topbar { padding: 0 20px; }

  .viewer-stage { min-height: 340px; height: 50vh; }

  .floor-rail { flex-direction: row; top: auto; bottom: 20px; right: 20px; }

  .viewport-controls { flex-wrap: wrap; max-width: calc(100% - 28px); }

  .control-plate span { display: none; }
  .staff-action-row { grid-template-columns: 1fr; }
  .landing-main { padding-top: 28px; }
  .landing-hero { grid-template-columns: 1fr; min-height: auto; gap: 20px; padding-bottom: 52px; }
  .landing-copy { max-width: 760px; }
  .landing-copy h1 { font-size: clamp(4rem, 12vw, 7rem); }
  .landing-visual { min-height: 430px; }
  .seal-halo { width: min(65vw, 390px); }
  .landing-about { grid-template-columns: 1fr 1.5fr; gap: 25px; }
  .about-marker { grid-column: 1 / -1; }
  .about-map-link { justify-self: start; }
}

@media (max-width: 480px) {
  .staff-help-dialog { width: calc(100% - 20px); padding: 18px; }
  .staff-help-dialog .setup-steps { padding-left: 19px; }
  .staff-help-dialog .setup-steps li + li { margin-top: 8px; }
  .landing-topbar { height: 70px; }
  .landing-topbar .brand { gap: 8px; font-size: 0.95rem; }
  .landing-topbar .brand-seal { width: 35px; height: 35px; }
  .landing-nav { gap: 12px; }
  .landing-nav-link { font-size: 0.58rem; }
  .landing-nav-cta { padding: 9px; }
  .landing-main { padding: 25px 20px 55px; }
  .landing-copy h1 { margin-top: 20px; font-size: clamp(3.4rem, 17vw, 5rem); }
  .landing-intro { font-size: 0.9rem; }
  .landing-trust { flex-wrap: wrap; font-size: 0.56rem; }
  .landing-visual { min-height: 370px; }
  .seal-card { width: min(285px, 76%); min-height: 320px; }
  .hero-seal { width: min(180px, 78%); }
  .orbit-label { padding: 7px 8px; font-size: 0.49rem; }
  .orbit-label-one { right: -1%; }
  .orbit-label-three { right: -2%; }
  .fact-heading { display: block; }
  .fact-heading p { margin-top: 8px; }
  .fact-grid { grid-template-columns: 1fr; }
  .fact-card { min-height: 175px; }
  .landing-about { grid-template-columns: 1fr; gap: 22px; }
  .about-marker { grid-column: auto; }
  .about-map-link { justify-self: stretch; }
  .landing-footer { flex-wrap: wrap; padding: 18px 20px; }
  .landing-footer p { order: 2; width: 100%; }
  .footer-location { margin-left: auto; text-align: right; }
}
#entranceEditor { margin-top: 12px; }
#entranceEditor select { margin: 8px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
