:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --white: #fffefa;
  --raised: #f1f2ec;
  --ink: #202523;
  --secondary: #555e57;
  --muted: #69716b;
  --line: rgba(32, 37, 35, .12);
  --blue: #283ada;
  --lite-blue: #ebedfe;
  --positive: #247553;
  --negative: #a0392f;
  --ease: cubic-bezier(.22, 1, .36, 1);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  color: var(--ink);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; background: var(--paper); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color 140ms var(--ease), background-color 140ms var(--ease), border-color 140ms var(--ease); }
button:focus-visible, canvas:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.icon { display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; }
.icon svg { width: 100%; height: 100%; stroke-width: 1.5; }
.masthead { height: 64px; padding: 0 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: flex; align-items: center; gap: 16px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.wordmark img { width: 88px; height: auto; display: block; }
.separator { width: 1px; height: 24px; background: var(--line); }
.header-actions { display: flex; align-items: center; gap: 24px; }
.office-status { margin: 0; color: var(--muted); font-size: 13px; line-height: 20px; font-variant-numeric: tabular-nums; }
.office-status[data-connected="true"] { color: var(--positive); }
.quiet { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--secondary); font-size: 14px; line-height: 20px; }
.quiet:hover { color: var(--blue); background: var(--raised); }
.tour { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; padding: 16px 24px 24px; height: calc(100dvh - 64px); min-height: 0; }
.viewport { position: relative; isolation: isolate; height: 100%; min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #d4d5ce; }
.model { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.model:active { cursor: grabbing; }
.model:focus-visible { outline-offset: -4px; }
.stage-toolbar { position: absolute; inset: 16px 16px auto; display: flex; align-items: start; justify-content: space-between; gap: 12px; pointer-events: none; }
.stage-toolbar > * { pointer-events: auto; }
.modes, .square { background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(32, 37, 35, .06); }
.modes { display: flex; gap: 4px; padding: 4px; }
.modes button { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; }
.modes button:hover { background: var(--raised); }
.modes button[aria-pressed="true"] { background: #263339; color: #fff; }
.stage-actions { display: flex; gap: 8px; }
.square { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 8px; color: var(--secondary); }
.square:hover { background: var(--raised); color: var(--blue); }
.stage-footer { position: absolute; inset: auto 16px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "hint walk" "voice voice"; align-items: end; gap: 12px; pointer-events: none; }
.stage-hint { grid-area: hint; justify-self: start; max-width: 360px; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--secondary); font-size: 13px; line-height: 20px; }
.walk-controls { grid-area: walk; display: grid; grid-template-columns: repeat(3, 44px); gap: 4px; pointer-events: auto; }
.walk-controls button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--white); touch-action: none; }
.walk-controls button:first-child { grid-column: 2; }
.walk-controls button:nth-child(2) { grid-column: 1; }
.walk-controls button:active { background: var(--lite-blue); color: var(--blue); }
.voice-controls { grid-area: voice; justify-self: start; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; max-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 4px 16px rgba(32, 37, 35, .06); pointer-events: auto; }
.microphone, .enable-audio { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); font-size: 14px; line-height: 20px; font-weight: 500; }
.microphone:hover { border-color: #aab2a9; }
.microphone[aria-pressed="true"] { color: var(--positive); background: #e8f3ec; border-color: #b0cdbb; }
.microphone:disabled { color: var(--muted); }
.microphone-state { color: var(--secondary); font-size: 12px; font-weight: 400; }
.microphone[aria-pressed="true"] .microphone-state { color: var(--positive); }
.voice-status { flex: 1 1 160px; max-width: 320px; margin: 0; color: var(--secondary); font-size: 13px; line-height: 20px; }
.voice-status[data-problem="true"] { color: var(--negative); }
.enable-audio { color: #182aa9; background: var(--lite-blue); border-color: #cbd1f9; }
.help { position: absolute; top: 80px; right: 16px; z-index: 2; width: min(304px, calc(100% - 32px)); padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 8px 24px rgba(32, 37, 35, .08); }
.help strong { font-size: 16px; line-height: 24px; font-weight: 500; }
.help dl { display: grid; gap: 4px; margin: 12px 0 0; }
.help dt { font-size: 14px; line-height: 20px; font-weight: 500; }
.help dd { margin: 0 0 8px; color: var(--secondary); font-size: 14px; line-height: 20px; }
.help dd:last-child { margin-bottom: 0; }
.waiting { position: absolute; inset: 0; z-index: -1; display: grid; place-content: center; overflow: hidden; }
.waiting img { position: absolute; width: 100%; height: 100%; object-fit: contain; }
.waiting p { z-index: 1; max-width: 368px; margin: min(52vh, 448px) 16px 0; padding: 12px 16px; border-radius: 8px; background: var(--white); color: var(--secondary); text-align: center; font-size: 14px; line-height: 20px; }
.panel { align-self: stretch; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); overflow: auto; }
.panel-title { margin-bottom: 24px; }
.panel h1 { margin: 0; font-size: 24px; line-height: 28px; font-weight: 500; }
.panel-title p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 20px; font-variant-numeric: tabular-nums; }
.panel-title p span { margin: 0 4px; }
.panel h2 { margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 500; }
.people-section { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.people-list { display: grid; gap: 8px; list-style: none; padding: 0; margin: 0; }
.person-row { display: grid; grid-template-columns: 12px minmax(0, 1fr); align-items: start; gap: 12px; min-width: 0; min-height: 44px; padding: 4px 0; }
.person-icon { display: block; width: 12px; height: 12px; margin-top: 4px; border: 2px solid var(--white); border-radius: 50%; background: var(--marker); outline: 1px solid var(--line); }
.person-details { min-width: 0; }
.person-heading { display: flex; align-items: baseline; gap: 8px; }
.person-name { min-width: 0; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.person-self { flex-shrink: 0; color: var(--muted); font-size: 12px; line-height: 16px; }
.person-microphone { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; line-height: 20px; }
.person-microphone::before { content: ""; display: block; width: 4px; height: 4px; border-radius: 50%; background: #88918a; }
.person-row[data-speaking="true"] .person-microphone { color: var(--positive); }
.person-row[data-speaking="true"] .person-microphone::before { background: var(--positive); }
.people-empty { margin: 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.entry-screen { position: absolute; inset: 0; z-index: 3; display: grid; place-items: safe center; overflow: auto; padding: 24px; background: rgba(231, 231, 226, .2); backdrop-filter: blur(3px); }
.entry-form { width: min(100%, 352px); padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 8px 24px rgba(32, 37, 35, .08); }
.entry-form h1 { margin: 0 0 8px; font-size: 28px; line-height: 32px; font-weight: 500; }
.entry-description { margin: 0 0 24px; color: var(--secondary); font-size: 14px; line-height: 20px; }
.entry-form label { display: block; margin-bottom: 8px; font-size: 14px; line-height: 20px; font-weight: 500; }
.entry-form input { display: block; width: 100%; min-height: 48px; padding: 12px; border: 1px solid #b7bfb5; border-radius: 8px; background: #fff; font-size: 16px; line-height: 24px; }
.entry-form input::placeholder { color: var(--muted); }
.entry-form button { width: 100%; min-height: 48px; margin-top: 12px; padding: 12px 16px; border: 0; border-radius: 8px; background: var(--blue); color: #fff; font-size: 14px; line-height: 20px; font-weight: 500; }
.entry-form button:hover { background: #1e2fb9; }
.entry-form button:disabled { opacity: .65; }
.entry-error { margin: 12px 0 0; color: var(--negative); font-size: 14px; line-height: 20px; }
.plan-wrap { position: relative; height: 176px; }
#plan { display: block; width: 100%; height: 100%; border-radius: 8px; background: #f4f5ef; }
#map-pins { position: absolute; inset: 0; pointer-events: none; }
.map-pin { position: absolute; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 8px; background: transparent; transform: translate(-50%, -50%); pointer-events: auto; }
.map-pin::after { content: ""; position: absolute; inset: 6px; border: 2px solid var(--white); border-radius: 50%; background: #728188; box-shadow: 0 1px 2px rgba(32, 37, 35, .14); }
.map-pin:hover::after, .map-pin[aria-current="true"]::after { background: var(--blue); }
.stops-section { margin-top: 24px; }
.stops { display: grid; gap: 4px; }
.stops button { display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; text-align: left; font-size: 14px; line-height: 20px; }
.stops button:hover { background: var(--raised); }
.stops button[aria-current="true"] { color: #182aa9; border-color: #cbd1f9; background: var(--lite-blue); }
.stop-dot { width: 8px; height: 8px; border: 1px solid #728188; border-radius: 50%; }
.stops button[aria-current="true"] .stop-dot { border-color: var(--blue); background: var(--blue); }
.viewport:fullscreen, .viewport.fullscreen { border: 0; border-radius: 0; }
.viewport.fullscreen { position: fixed; inset: 0; z-index: 20; width: 100%; height: 100%; }
.software-model { position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; pointer-events: none; }
@media (max-width: 960px) {
  .tour { grid-template-columns: minmax(0, 1fr) 248px; gap: 12px; padding-right: 16px; padding-left: 16px; }
}
@media (max-width: 760px) {
  .masthead { padding: 0 12px; }
  .wordmark { gap: 12px; }
  .wordmark img { width: 72px; }
  .header-actions { gap: 8px; }
  .help-label { display: none; }
  .tour { grid-template-columns: 1fr; height: auto; padding: 12px 12px 24px; }
  .viewport { height: max(480px, 70dvh); }
  .panel { display: grid; grid-template-columns: 1fr; align-items: start; gap: 16px; }
  .panel-title { grid-column: 1 / -1; margin: 0; }
  .people-section { grid-column: 1 / -1; margin: 0; padding-bottom: 16px; }
  .stops-section { margin: 0; }
  .stage-toolbar { inset: 12px 12px auto; gap: 8px; }
  .modes button { padding: 8px; font-size: 13px; line-height: 20px; }
  .stage-footer { inset: auto 12px 12px; gap: 8px; }
  .stage-hint { max-width: 208px; padding: 8px; font-size: 12px; line-height: 16px; }
  .voice-controls { width: 100%; gap: 8px; }
  .voice-status { flex-basis: 112px; font-size: 13px; line-height: 20px; }
  .plan-wrap { height: 176px; }
}
@media (max-width: 360px) {
  .wordmark { gap: 8px; font-size: 12px; }
  .office-status { max-width: 80px; font-size: 12px; line-height: 16px; text-align: right; }
  .stage-toolbar { flex-wrap: wrap; }
  .stage-actions { margin-left: auto; }
  .panel { grid-template-columns: 1fr; }
  .voice-status { flex-basis: 100%; }
}
@media (max-height: 600px) {
  .stage-hint { display: none; }
  .walk-controls { display: flex; }
  .walk-controls button[data-key="ArrowLeft"] { order: -1; }
}
@media (max-height: 600px) and (max-width: 760px) {
  .viewport { height: calc(100dvh - 88px); min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
