@font-face { font-family: Rubik; src: url('/static/fonts/Rubik.ttf') format('truetype'); font-style: normal; font-weight: 300 900; font-display: swap; }
:root {
  color-scheme: light;
  --sirius-blue: #1b4886;
  --sirius-blue-deep: #17264d;
  --sirius-sky: #59b9e6;
  --sirius-sky-soft: #dff2fb;
  --sirius-teal: #3fa8a6;
  --sirius-coral: #ff8586;
  --ink: #172238;
  --muted: #657286;
  --line: rgba(27, 72, 134, .15);
  --line-strong: rgba(27, 72, 134, .28);
  --panel: rgba(255, 255, 255, .92);
  --bg: #edf5fa;
  --shadow: 0 18px 55px rgba(27, 72, 134, .11);
  font-family: Rubik, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; background: var(--bg); color: var(--ink); }
body {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 2%, rgba(89, 185, 230, .17), transparent 27%),
    linear-gradient(135deg, #f9fcfe 0%, #eff7fb 48%, #e7f3f9 100%);
}
button, input { font: inherit; }
button { cursor: pointer; }

.ambient { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; }
.ambient-one { width: 38vw; height: 38vw; background: rgba(45, 150, 207, .18); top: -25vw; right: -5vw; }
.ambient-two { width: 28vw; height: 28vw; background: rgba(63, 168, 166, .13); bottom: -21vw; left: -8vw; }
.network-field {
  position: fixed;
  right: -7vw;
  bottom: -17vw;
  width: 58vw;
  height: 54vw;
  pointer-events: none;
  opacity: .34;
  transform: rotate(-13deg);
  background-image:
    radial-gradient(circle, rgba(89, 185, 230, .9) 0 1.4px, transparent 1.8px),
    linear-gradient(35deg, transparent 49.6%, rgba(89, 185, 230, .13) 50%, transparent 50.4%),
    linear-gradient(145deg, transparent 49.6%, rgba(27, 72, 134, .10) 50%, transparent 50.4%);
  background-size: 29px 29px, 116px 116px, 116px 116px;
  mask-image: radial-gradient(ellipse at center, #000 10%, rgba(0,0,0,.72) 47%, transparent 73%);
}

.shell {
  width: min(1800px, calc(100% - 40px));
  height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}
.topbar {
  flex: 0 0 auto;
  min-height: 92px;
  margin-top: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 30px rgba(27,72,134,.07);
  backdrop-filter: blur(18px);
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 17px; min-width: 340px; }
.sirius-logo { display: inline-flex; flex-direction: column; color: var(--sirius-blue); line-height: .9; white-space: nowrap; }
.sirius-logo b { font-size: 34px; font-weight: 540; letter-spacing: -.055em; }
.sirius-logo small { margin-top: 6px; color: #10151e; font-size: 10px; font-weight: 680; letter-spacing: .035em; }
.brand-divider { width: 1px; height: 44px; background: var(--line-strong); }
.product-name b { display: block; color: var(--sirius-blue-deep); font-size: 16px; letter-spacing: .12em; }
.product-name small { display: block; color: var(--muted); margin-top: 5px; font-size: 12px; }

.session-state { color: var(--muted); display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 13px; }
.sound-controls { display: grid; grid-template-columns: auto auto; align-items: center; gap: 6px 14px; margin-left: 10px; }
.repeat-control { display: flex; align-items: center; gap: 7px; color: #526175; font-size: 11px; }
.repeat-control input { accent-color: var(--sirius-blue); width: 16px; height: 16px; }
.audio-test {
  justify-self: end;
  color: var(--sirius-blue);
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 650;
}
.audio-test:hover, .audio-test:focus { border-color: var(--sirius-sky); background: var(--sirius-sky-soft); outline: 0; }
.audio-hint { grid-column: 1 / -1; min-height: 13px; color: #88701a; font-size: 10px; text-align: right; }
.live-dot { width: 9px; height: 9px; background: #e0a930; border-radius: 50%; box-shadow: 0 0 0 5px rgba(224,169,48,.12); }
.live-dot.online { background: var(--sirius-teal); box-shadow: 0 0 0 5px rgba(63,168,166,.13); }

.stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: stretch;
  gap: 18px;
  padding: 18px 0 12px;
  overflow: hidden;
}
.conversation {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.dialog-column-head { flex: 0 0 auto; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.dialog-column-head { position: relative; }
.new-dialog { display: none; margin-top: 12px; padding: 7px 10px; color: #1b4886; background: #fff; border: 1px solid #ccdfeb; border-radius: 7px; font-size: 11px; }
.has-dialog:not(.call-active) .new-dialog { display: inline-block; }
.eyebrow { color: var(--sirius-sky); font-size: 11px; font-weight: 760; letter-spacing: .14em; margin: 0 0 9px; }
h1 { color: var(--sirius-blue); font-size: clamp(30px, 2.6vw, 48px); line-height: 1.03; letter-spacing: -.042em; margin: 0; font-weight: 650; max-width: 940px; }
.dialog-feed { flex: 1; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  padding: 12px 9px 12px 0;
  scrollbar-color: rgba(27,72,134,.28) transparent;
}
.starter-prompts {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(20px, 3.4vw, 52px);
  margin-top: 14px;
  border: 1px solid rgba(89,185,230,.38);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 5%, rgba(89,185,230,.2), transparent 31%),
    linear-gradient(145deg, rgba(223,242,251,.72), rgba(255,255,255,.94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 16px 38px rgba(27,72,134,.07);
}
.starter-kicker { margin: 0 0 10px; color: var(--sirius-teal); font-size: 10px; font-weight: 780; letter-spacing: .13em; }
.starter-prompts h2 { max-width: 720px; margin: 0; color: var(--sirius-blue); font-size: clamp(28px, 2.25vw, 42px); line-height: 1.08; letter-spacing: -.035em; }
.starter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 25px; }
.starter-grid button {
  min-height: 68px;
  padding: 13px 17px;
  color: var(--sirius-blue-deep);
  border: 1px solid rgba(27,72,134,.2);
  border-left: 5px solid var(--sirius-sky);
  border-radius: 5px 15px 15px 5px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 8px 22px rgba(27,72,134,.07);
  font-size: clamp(14px, 1.1vw, 18px);
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  transition: .18s ease;
}
.starter-grid button:nth-child(2n) { border-left-color: var(--sirius-coral); }
.starter-grid button:hover, .starter-grid button:focus-visible { border-color: var(--sirius-sky); background: #fff; transform: translateY(-2px); outline: 0; box-shadow: 0 12px 28px rgba(27,72,134,.12); }
.starter-grid button:disabled { opacity: .48; cursor: wait; transform: none; }
.has-dialog .starter-prompts, .call-active .starter-prompts { display: none; }
body:not(.has-dialog):not(.call-active) .dialog-feed { display: none; }
.dialog-feed > :first-child { margin-top: auto; }
.dialog-empty {
  margin: auto 0 0;
  padding: 30px;
  color: #7a8799;
  font-size: clamp(24px, 2vw, 34px);
  border: 1px dashed rgba(89,185,230,.55);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(223,242,251,.66), rgba(255,255,255,.9));
}
.dialogue-panel {
  flex: 0 0 auto;
  margin-top: 11px;
  padding: 16px 21px 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--sirius-sky);
  border-radius: 4px 18px 18px 4px;
  background: linear-gradient(100deg, #e9f6fc, #f8fcfe);
}
.visitor-panel { margin-right: 8%; }
.assistant-panel {
  margin-left: 7%;
  margin-right: 0;
  min-height: 92px;
  color: #fff;
  border-color: rgba(23,38,77,.08);
  border-left-color: var(--sirius-coral);
  background:
    linear-gradient(125deg, rgba(89,185,230,.17), transparent 38%),
    var(--sirius-blue);
  box-shadow: 0 12px 30px rgba(27,72,134,.12);
}
.dialogue-panel.interrupted { opacity: .67; }
.dialogue-panel.interrupted::after { content: "ответ прерван"; display: block; margin-top: 9px; color: #ffd2d2; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.speaker-label { display: block; color: #687b90; font-size: 10px; font-weight: 780; letter-spacing: .14em; margin-bottom: 9px; }
.visitor-panel .speaker-label { color: var(--sirius-blue); }
.assistant-panel .speaker-label { color: #bfe9fb; }
.transcript { margin: 0; color: var(--sirius-blue-deep); font-size: clamp(24px, 2vw, 38px); font-weight: 620; line-height: 1.16; min-height: 36px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.transcript.active { color: var(--sirius-blue); }
.transcript.live-listening { animation: liveTranscriptPulse 1.05s ease-in-out infinite alternate; }
.dialogue-panel.announcement { margin-left: 14%; border-left-color: var(--sirius-coral); }
.call-active #connectionDot { box-shadow: 0 0 0 7px rgba(63,168,166,.13); }
.visitor-speaking .visitor-panel:last-of-type { border-color: rgba(89,185,230,.62); box-shadow: 0 10px 28px rgba(50,139,188,.13); }
.visitor-speaking .orb-core { animation: visitorListening 760ms ease-in-out infinite alternate; }
.assistant-speaking .orb-core { animation: assistantSpeaking 520ms ease-in-out infinite alternate; }
@keyframes liveTranscriptPulse { from { opacity: .64; } to { opacity: 1; } }
@keyframes visitorListening { from { transform: scale(.94); box-shadow: 0 0 0 12px rgba(89,185,230,.08); } to { transform: scale(1.04); box-shadow: 0 0 0 28px rgba(89,185,230,.17); } }
@keyframes assistantSpeaking { from { transform: scale(.96); } to { transform: scale(1.025); } }
.answer { color: #fff; font-size: clamp(25px, 2.05vw, 39px); font-weight: 545; line-height: 1.17; max-width: 1100px; min-height: 36px; letter-spacing: -.029em; overflow-wrap: anywhere; }
.answer:empty { display: none; }
.assistant-panel:has(.answer:empty) { opacity: .5; }
.has-dialog h1 { opacity: .78; }
.answer.error { color: #ffe1e1; }
.suggestions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.suggestions button {
  color: var(--sirius-blue);
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 11px 15px;
  border-radius: 999px;
  transition: .18s ease;
}
.suggestions button:hover { border-color: var(--sirius-sky); background: var(--sirius-sky-soft); transform: translateY(-1px); }

.visual { min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; overflow-y: auto; padding: 2px 4px 2px 0; scrollbar-gutter: stable; }
.visual-heading { width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 0 5px; }
.visual-heading span { color: var(--sirius-sky); font-size: 10px; font-weight: 760; letter-spacing: .14em; }
.visual-heading b { color: var(--sirius-blue); font-size: 13px; font-weight: 600; }
.route-map[hidden] { display: none; }
.route-map-landmark {
  max-width: 150px;
  padding: 4px 7px;
  color: #17345f;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(35,124,169,.28);
  border-radius: 7px;
  box-shadow: 0 5px 13px rgba(19,58,93,.16);
  font-size: 9px;
  font-weight: 690;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}
.route-map {
  width: 100%;
  min-height: 340px;
  max-height: 570px;
  flex: 1 1 500px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.96);
  border-radius: 19px;
  background: rgba(255,255,255,.91);
  box-shadow: 0 16px 42px rgba(27,72,134,.1);
}
.visual.route-active .visual-heading,
.visual.route-active .orb,
.visual.route-active .telemetry { display: none; }
.visual.route-active .pipeline { flex: 0 0 auto; }
.visual.route-active .cards { flex: 0 0 auto; }
.route-map-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 15px 17px 11px; }
.route-map-head span { color: var(--sirius-sky); font-size: 10px; font-weight: 780; letter-spacing: .14em; }
.route-map-head b { max-width: 70%; color: var(--sirius-blue); font-size: 16px; line-height: 1.2; text-align: right; }
.route-map-canvas { position: relative; flex: 1 1 auto; min-height: 225px; margin: 0 10px; overflow: hidden; border: 1px solid rgba(89,185,230,.28); border-radius: 16px; background: #eaf6fa; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.route-map-canvas > canvas { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; transition: opacity .3s ease; }
.route-map-canvas > svg { position: relative; z-index: 1; display: block; width: 100%; height: 100%; min-height: 225px; transition: opacity .3s ease; }
.route-map-3d { position: absolute; z-index: 2; inset: 0; overflow: hidden; opacity: 0; background: linear-gradient(160deg, #eef9fc, #dceff5); transition: opacity .35s ease; }
.route-map.maplibre-ready .route-map-3d { opacity: 1; }
.route-map.maplibre-ready .route-map-canvas > canvas,
.route-map.maplibre-ready .route-map-canvas > svg { opacity: 0; }
.route-map-3d .maplibregl-canvas { cursor: default; }
.route-map-place { display: flex; align-items: center; gap: 7px; max-width: 235px; padding: 6px 9px 6px 7px; color: var(--sirius-blue-deep); border: 1px solid rgba(255,255,255,.96); border-radius: 10px; background: rgba(255,255,255,.92); box-shadow: 0 8px 22px rgba(23,65,101,.18); pointer-events: none; }
.route-map-place i { width: 12px; height: 12px; flex: 0 0 auto; border: 3px solid #fff; border-radius: 50%; background: var(--sirius-teal); box-shadow: 0 0 0 2px rgba(63,168,166,.24); }
.route-map-place-finish i { background: var(--sirius-coral); box-shadow: 0 0 0 2px rgba(255,133,134,.24); }
.route-map-place b { overflow: hidden; font-size: 10px; font-weight: 760; line-height: 1.16; text-overflow: ellipsis; white-space: nowrap; }
.route-map-walker { position: relative; width: 24px; height: 24px; border: 4px solid #fff; border-radius: 50%; background: var(--sirius-blue); box-shadow: 0 5px 16px rgba(27,72,134,.35), 0 0 0 8px rgba(89,185,230,.22); pointer-events: none; }
.route-map-walker i { position: absolute; inset: -11px; border: 2px solid rgba(27,72,134,.24); border-radius: 50%; animation: mapWalkerPulse 1.25s ease-out infinite; }
.route-map-walker span { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #fff; transform: translate(-50%,-50%); }
@keyframes mapWalkerPulse { from { opacity: .85; transform: scale(.55); } to { opacity: 0; transform: scale(1.35); } }
.route-map-context path { fill: none; stroke: #beddea; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: .32; }
.route-map-track { fill: none; stroke: #cbdde8; stroke-width: 18; stroke-linecap: round; stroke-linejoin: round; }
.route-map-progress { fill: none; stroke: url(#routeStroke); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; filter: url(#routeGlow); transition: stroke-dashoffset .12s linear; }
.route-map-pin { stroke: #fff; stroke-width: 7; }
.route-map-pin-start { fill: var(--sirius-teal); }
.route-map-pin-end { fill: var(--sirius-coral); }
.route-map-marker-halo { fill: rgba(89,185,230,.24); transform-origin: center; animation: routePulse 1.25s ease-in-out infinite alternate; }
.route-map-marker { fill: var(--sirius-blue); stroke: #fff; stroke-width: 6; filter: url(#routeGlow); }
.route-map-label { fill: var(--sirius-blue-deep); font-size: 25px; font-weight: 720; paint-order: stroke; stroke: rgba(255,255,255,.94); stroke-width: 8px; stroke-linejoin: round; }
.route-map-label-end { text-anchor: end; }
@keyframes routePulse { to { opacity: .25; transform: scale(1.35); } }
.route-progress-badge { position: absolute; z-index: 4; left: 14px; bottom: 13px; display: flex; align-items: center; gap: 8px; padding: 7px 11px; color: var(--sirius-blue); border: 1px solid rgba(255,255,255,.9); border-radius: 999px; background: rgba(255,255,255,.91); box-shadow: 0 7px 20px rgba(27,72,134,.10); font-size: 10px; font-weight: 680; }
.route-progress-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--sirius-teal); box-shadow: 0 0 0 5px rgba(63,168,166,.13); }
.route-map.is-speaking .route-progress-badge i { background: var(--sirius-coral); box-shadow: 0 0 0 5px rgba(255,133,134,.15); animation: routePulse 650ms ease-in-out infinite alternate; }
.route-map-legend { position: absolute; z-index: 4; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; padding: 6px 9px; color: #62758a; border: 1px solid rgba(255,255,255,.92); border-radius: 9px; background: rgba(255,255,255,.90); box-shadow: 0 7px 20px rgba(27,72,134,.08); font-size: 8px; font-weight: 650; }
.route-map-legend span { display: inline-flex; align-items: center; gap: 4px; }
.route-map-legend i { display: inline-block; width: 12px; height: 8px; flex: 0 0 auto; }
.legend-building { border: 1px solid #aebfca; background: #dce7ed; }
.legend-path { height: 0 !important; border-top: 2px dashed #d2af69; }
.legend-bridge { height: 0 !important; border-top: 4px solid #3fa8a6; box-shadow: 0 -2px 0 rgba(255,255,255,.9), 0 2px 0 rgba(255,255,255,.9); }
.route-map-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 9px 10px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.route-map-meta > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; background: #fff; }
.route-map-meta small { color: #7b8798; font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.route-map-meta b { color: var(--sirius-blue); font-size: 13px; }
.route-map-address { margin: 9px 14px 0; color: #4f5f73; font-size: 11px; font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-map-source { margin: 5px 14px 11px; color: #8793a3; font-size: 8px; line-height: 1.3; }
.route-map-source a { color: var(--sirius-blue); text-decoration: none; }
.orb { flex: 0 0 auto; width: min(17.5vw, 220px); aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.orb::after {
  content: "";
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  background-image: radial-gradient(circle, rgba(255,255,255,.72) 0 1px, transparent 1.5px);
  background-size: 13px 13px;
  opacity: .62;
  mask-image: radial-gradient(circle, #000, transparent 74%);
}
.orb-core { width: 45%; aspect-ratio: 1; overflow: hidden; border-radius: 50%; clip-path: circle(50%); background: radial-gradient(circle at 34% 28%, #bfeaff, #4aaedc 31%, #1b4886 70%, #17264d); box-shadow: 0 0 0 12px rgba(89,185,230,.08), 0 20px 55px rgba(27,72,134,.30); transition: .35s ease; }
.orb.working .orb-core { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(89,185,230,.12), 0 22px 65px rgba(27,72,134,.4); }
.orb.barge .orb-core { background: radial-gradient(circle at 35% 30%, #ffd9d9, #ff8586 34%, #913d57 75%); box-shadow: 0 0 70px rgba(255,133,134,.42); }
.orb-ring { position: absolute; border: 1px solid rgba(27,72,134,.27); border-radius: 50%; }
.ring-a { inset: 14%; animation: spin 14s linear infinite; border-left-color: transparent; }
.ring-b { inset: 3%; border-style: dashed; opacity: .45; animation: spin 28s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.wave { position: absolute; z-index: 2; display: flex; align-items: center; gap: 5px; }
.wave i { width: 4px; height: 14px; border-radius: 3px; background: #fff; opacity: .9; animation: voice .78s ease-in-out infinite alternate; }
.wave i:nth-child(2), .wave i:nth-child(6) { animation-delay: -.35s; }
.wave i:nth-child(3), .wave i:nth-child(5) { animation-delay: -.12s; }
.wave i:nth-child(4) { animation-delay: -.58s; }
@keyframes voice { to { height: 43px; } }
.orb:not(.working) .wave i { animation-play-state: paused; height: 8px; opacity: .52; }

.pipeline { width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pipeline span {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #68778c;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .05em;
  overflow-wrap: anywhere;
  text-align: center;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 10px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 7px 18px rgba(27,72,134,.06);
}
.pipeline i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #aab4c0; }
.pipeline span.ok { color: var(--sirius-blue); }
.pipeline span.ok i { background: var(--sirius-teal); box-shadow: 0 0 0 4px rgba(63,168,166,.13); }
.pipeline span.working i { background: #e0a930; box-shadow: 0 0 0 4px rgba(224,169,48,.13); }
.pipeline span.fallback i { background: var(--sirius-coral); box-shadow: 0 0 0 4px rgba(255,133,134,.13); }
.pipeline span.error { color: #b53642; }
.pipeline span.error i { background: #e84450; box-shadow: 0 0 0 4px rgba(232,68,80,.13); }

.telemetry { width: 100%; border: 1px solid rgba(255,255,255,.96); background: rgba(255,255,255,.86); border-radius: 16px; overflow: hidden; box-shadow: 0 12px 32px rgba(27,72,134,.08); }
.telemetry-head, .context-line { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 11px 14px; color: var(--muted); font-size: 11px; }
.telemetry-head b { color: var(--sirius-blue); font-size: 12px; letter-spacing: .04em; }
.asr-lanes { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.asr-lanes p { margin: 0; padding: 9px 14px; display: grid; grid-template-columns: 130px 1fr; gap: 12px; font-size: 11px; }
.asr-lanes span, .context-line span { color: #7b8798; letter-spacing: .04em; }
.asr-lanes b, .context-line b { color: var(--sirius-blue); font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cards { width: 100%; display: grid; grid-template-columns: 1fr; align-content: start; gap: 9px; min-height: 0; }
.card { padding: 15px 17px; border: 1px solid rgba(255,255,255,.96); border-top: 4px solid var(--sirius-sky); border-radius: 14px; background: rgba(255,255,255,.88); min-height: 106px; display: flex; flex-direction: column; box-shadow: 0 10px 28px rgba(27,72,134,.07); }
.card h3 { margin: 0 0 8px; color: var(--sirius-blue); font-size: 19px; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); line-height: 1.4; font-size: 13px; }
.card .meta { margin-top: auto; padding-top: 14px; color: var(--sirius-teal); font-size: 12px; font-weight: 600; }
.card a { color: var(--sirius-blue); text-decoration: none; margin-top: 8px; font-size: 12px; }

.controls { flex: 0 0 auto; padding: 9px 0 0; border-top: 1px solid var(--line); }
.composer { display: grid; grid-template-columns: 1fr auto; padding: 7px; border: 1px solid var(--line-strong); background: #f8fbfd; border-radius: 16px; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.composer:focus-within { border-color: var(--sirius-sky); box-shadow: 0 0 0 4px rgba(89,185,230,.12); }
.composer input { min-width: 0; background: transparent; border: 0; outline: 0; color: var(--ink); font-size: 18px; padding: 13px 16px; }
.composer input::placeholder { color: #8c98a8; }
.composer button { border: 0; color: #fff; background: var(--sirius-blue); border-radius: 11px; padding: 0 23px; font-weight: 700; display: flex; align-items: center; gap: 13px; }
.composer button:hover { background: #23579d; }
.composer button:disabled { opacity: .45; cursor: wait; }
.composer button b { font-size: 22px; font-weight: 400; }

footer { flex: 0 0 auto; min-height: 42px; display: flex; justify-content: space-between; align-items: center; color: #718095; font-size: 10px; letter-spacing: .04em; }
#demoEvent { opacity: .16; color: var(--sirius-coral); border: 1px solid currentColor; background: transparent; border-radius: 6px; padding: 6px 10px; font-size: 9px; transition: opacity .2s; }
#demoEvent:hover, #demoEvent:focus { opacity: 1; }
.live-phone-mode .controls, .live-phone-mode #demoEvent { display: none; }

.login {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 20%, rgba(89,185,230,.38), transparent 34%),
    linear-gradient(135deg, #17264d, #1b4886 54%, #176aa2);
}
.login::before {
  content: "";
  position: absolute;
  width: 64vw;
  height: 64vw;
  right: -18vw;
  bottom: -34vw;
  transform: rotate(-10deg);
  opacity: .45;
  background-image: radial-gradient(circle, rgba(143,221,251,.9) 0 1.7px, transparent 2px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, #000 14%, transparent 70%);
}
.login.hidden { display: none; }
.login-panel { position: relative; width: min(460px, calc(100% - 40px)); padding: 42px; background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.9); border-radius: 24px; box-shadow: 0 40px 110px rgba(3,24,57,.36); }
.login-logo { margin-bottom: 34px; }
.login-logo b { font-size: 40px; }
.login-logo small { font-size: 11px; }
.login-panel h2 { color: var(--sirius-blue); font-size: 36px; margin: 0 0 12px; letter-spacing: -.035em; }
.login-panel > p:not(.eyebrow):not(.login-error) { color: var(--muted); line-height: 1.5; margin-bottom: 27px; }
.login-panel input { width: 100%; color: var(--ink); background: #f4f8fb; border: 1px solid var(--line-strong); border-radius: 12px; padding: 16px; outline: 0; }
.login-panel input:focus { border-color: var(--sirius-sky); box-shadow: 0 0 0 4px rgba(89,185,230,.12); }
.login-panel button { width: 100%; border: 0; border-radius: 12px; padding: 16px; margin-top: 12px; background: var(--sirius-blue); color: #fff; font-weight: 700; }
.login-panel button:hover { background: #23579d; }
.login-error { min-height: 20px; color: #c63847; font-size: 13px; margin: 14px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; }

@media (max-width: 1180px) {
  .stage { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .brand { min-width: 0; }
  .product-name small { display: none; }
  .session-state > #sessionLabel { max-width: 150px; }
  .pipeline span { gap: 4px; padding: 4px 2px; font-size: 8px; letter-spacing: .02em; }
}

@media (min-width: 981px) and (max-height: 850px), (min-width: 981px) and (max-width: 1180px) {
  .visual.has-cards:not(.route-active) { gap: 9px; }
  .visual.has-cards:not(.route-active) .orb,
  .visual.has-cards:not(.route-active) .telemetry { display: none; }
  .visual.has-cards:not(.route-active) .pipeline { flex: 0 0 auto; }
  .visual.has-cards:not(.route-active) .cards { flex: 1 1 auto; }
  .visual.has-cards:not(.route-active) .card { min-height: 0; padding: 12px 15px; }
  .visual.has-cards:not(.route-active) .card h3 { margin-bottom: 5px; font-size: 17px; line-height: 1.16; }
  .visual.has-cards:not(.route-active) .card p { font-size: 12px; line-height: 1.3; }
  .visual.has-cards:not(.route-active) .card .meta { padding-top: 8px; }
  .visual.has-cards:not(.route-active) .card a { margin-top: 5px; }
}

@media (max-width: 980px) {
  body { overflow: auto; }
  .shell { width: min(100% - 28px, 780px); height: auto; min-height: 100vh; }
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .session-state { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .sound-controls { width: 100%; grid-template-columns: 1fr 1fr; margin-left: 0; }
  .audio-hint { text-align: left; }
  .stage { grid-template-columns: 1fr; padding-top: 14px; gap: 14px; overflow: visible; }
  .conversation { height: min(760px, calc(100vh - 150px)); }
  .visual { order: 2; overflow: visible; }
  .visual.has-cards:not(.route-active) .orb,
  .visual.has-cards:not(.route-active) .telemetry { display: none; }
  .visual.has-cards:not(.route-active) .cards { align-content: start; }
  .route-map { min-height: 480px; max-height: none; flex-basis: 480px; }
  .route-map-canvas { min-height: 330px; }
  .route-map-canvas svg { min-height: 330px; }
  .orb { width: 220px; }
  h1 { font-size: clamp(38px, 8vw, 62px); }
  footer span:first-child { display: none; }
}

@media (max-width: 620px) {
  .shell { width: calc(100% - 18px); }
  .topbar { margin-top: 8px; padding: 12px; }
  .sirius-logo b { font-size: 28px; }
  .sirius-logo small { font-size: 8px; }
  .brand-divider { height: 36px; }
  .product-name b { font-size: 12px; }
  .conversation { padding: 17px; border-radius: 19px; }
  .starter-prompts { padding: 20px; }
  .starter-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 18px; }
  .starter-grid button { min-height: 54px; }
  .composer button span { display: none; }
  .composer button { padding: 0 17px; }
  .answer { font-size: 23px; }
  .transcript { font-size: 25px; }
  .repeat-control span { max-width: 190px; }
  .sound-controls { grid-template-columns: 1fr; }
  .audio-test { justify-self: start; }
  .audio-hint { grid-column: 1; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visual-heading { align-items: flex-start; flex-direction: column; }
  .route-map { min-height: 410px; flex-basis: 410px; }
  .route-map-canvas { min-height: 260px; }
  .route-map-canvas svg { min-height: 260px; }
  .route-map-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .route-map-head b { max-width: 100%; text-align: left; }
  .route-map-legend { display: none; }
  footer { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* Exhibition composition: dialogue remains 60% at every desktop size. */
.topbar { min-height: 76px; gap: 20px; padding: 14px 22px; background: #fff; box-shadow: none; }
.official-logo { width: 166px; height: auto; display: block; flex: 0 0 auto; }
.brand { min-width: 0; gap: 20px; }
.brand-divider { height: 38px; }
.product-name b { font-size: 12px; letter-spacing: .09em; }
.product-name small { font-size: 11px; }
.session-state { min-width: 0; font-size: 11px; }
#sessionLabel { max-width: 180px; }
.sound-settings { position: relative; margin-left: 14px; color: var(--sirius-blue); }
summary { cursor: pointer; font-size: 12px; font-weight: 500; padding: 10px 12px; border-radius: 9px; }
summary:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #59b9e6; outline-offset: 3px; }
.sound-settings summary { border: 1px solid var(--line); white-space: nowrap; }
.sound-controls { position: absolute; z-index: 8; top: 48px; right: 0; width: 310px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 20px; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.repeat-control { font-size: 14px; }
.audio-hint { text-align: left; line-height: 1.5; }
.stage { gap: 20px; padding: 20px 0 10px; }
.conversation { padding: 24px 28px 20px; border-radius: 20px; box-shadow: 0 8px 32px #1b488609; }
.eyebrow { color: #4e7caa; letter-spacing: .1em; font-size: 10px; }
h1 { font-size: clamp(24px, 2vw, 36px); letter-spacing: -.025em; font-weight: 550; }
.starter-prompts { border: 0; box-shadow: none; border-radius: 16px; padding: clamp(22px, 2.5vw, 46px); background: linear-gradient(140deg, #e9f4fb, #f7fbfd 70%); }
.starter-prompts h2 { font-weight: 500; font-size: clamp(28px, 2.3vw, 44px); line-height: 1.17; letter-spacing: -.035em; }
.starter-kicker { font-size: 10px; color: #4c739a; font-weight: 500; letter-spacing: .06em; }
.starter-invitation { font-size: 15px; line-height: 1.5; color: #59718b; margin: 15px 0 4px; }
.starter-grid { gap: 12px; margin-top: 26px; }
.starter-grid button { border: 1px solid #ccdfeb; border-left: 3px solid #59b9e6; border-radius: 4px 12px 12px 4px; box-shadow: none; font-weight: 450; font-size: clamp(14px,1.15vw,20px); line-height: 1.4; padding: 16px; min-height: 80px; }
.starter-grid button:nth-child(2n) { border-left-color: #59b9e6; }
.dialog-feed { gap: 12px; padding-top: 20px; }
.dialogue-panel { margin-top: 0; padding: 18px 22px; border: 0; border-radius: 2px 16px 16px; }
.visitor-panel { background: #edf4f8; margin-right: 10%; }
.assistant-panel { background: #1b4886; margin-left: 6%; box-shadow: none; border-radius: 16px 2px 16px 16px; }
.speaker-label { font-size: 9px; font-weight: 500; letter-spacing: .1em; }
.transcript, .answer { font-size: clamp(20px,1.55vw,30px); line-height: 1.43; font-weight: 400; letter-spacing: -.015em; white-space: pre-wrap; min-height: 0; }
.dialogue-panel.interrupted { opacity: 1; }
.dialogue-panel.interrupted::after { font-size: 10px; letter-spacing: .03em; text-transform: none; color: #d5e7ff; }
.suggestions { gap: 7px; }
.suggestions button { font-size: clamp(12px,.9vw,16px); line-height: 1.4; text-align: left; border-radius: 10px; padding: 9px 12px; }
.suggestions button:disabled { cursor: default; color: #657e98; background: #f6f9fc; border-color: #dbe5ee; transform: none; }
.visual { align-items: stretch; padding: 0; gap: 14px; scrollbar-gutter: auto; min-width: 0; }
.display-status { flex: 0 0 auto; display: flex; align-items: center; gap: 16px; padding: 20px 22px; border: 1px solid #d9e6f0; border-radius: 18px; background: #fff; }
.status-caption { font-size: 9px; letter-spacing: .12em; color: #6d87a1; }
.display-status h2 { margin: 5px 0 0; font-size: clamp(22px,1.7vw,32px); line-height: 1.2; font-weight: 500; color: #1b4886; letter-spacing: -.025em; }
.status-beacon { width: 13px; height: 13px; border-radius: 50%; background: #3fa8a6; box-shadow: 0 0 0 7px #3fa8a616; flex: 0 0 auto; }
[data-phase="thinking"] .status-beacon, [data-phase="recognizing"] .status-beacon { background: #db9f33; box-shadow: 0 0 0 7px #db9f3318; }
[data-phase="ended"] .status-beacon { background: #8399b1; box-shadow: 0 0 0 7px #8399b118; }
.visual-heading { display: flex; align-items: flex-start; flex-direction: column; padding: 38px 30px 0; gap: 15px; }
.visual-heading span { color: #4b779f; font-size: 10px; }
.visual-heading b { color: #1b4886; font-weight: 450; font-size: clamp(26px,2.3vw,42px); line-height: 1.13; letter-spacing: -.035em; }
.visual-heading p { max-width: 380px; margin: 0; color: #688099; font-size: clamp(14px,1.05vw,18px); line-height: 1.6; }
.orb { align-self: center; margin: auto; opacity: .9; }
.visual.has-cards .visual-heading, .visual.has-cards .orb { display: none; }
.diagnostics { width: 100%; flex: 0 0 auto; margin-top: auto; color: #637c95; border-top: 1px solid #d5e1eb; }
.diagnostics summary { font-size: 11px; }
.diagnostics .pipeline { gap: 4px; margin: 5px 0; }
.diagnostics .telemetry { box-shadow: none; border: 0; }
.visual.route-active .telemetry { display: block; }
.cards { gap: 12px; }
.cards:empty { display: none; }
.card { padding: 18px 22px; border: 1px solid #dae7ef; border-left: 4px solid #59b9e6; border-radius: 3px 14px 14px 3px; min-height: 0; box-shadow: none; background: #fff; }
.card h3 { font-size: clamp(17px,1.25vw,23px); line-height: 1.25; font-weight: 550; margin-bottom: 8px; overflow-wrap: anywhere; }
.card p { font-size: clamp(13px,1vw,17px); line-height: 1.5; }
.card .meta { color: #356377; font-size: 12px; font-weight: 450; padding-top: 10px; }
.card a { font-size: 12px; line-height: 1.35; text-underline-offset: 3px; }
.card a:hover { text-decoration: underline; }
.route-map { border: 1px solid #d9e6f0; border-radius: 17px; max-height: none; min-height: 400px; flex: 1 0 430px; box-shadow: none; }
.route-map-head { gap: 8px; flex-wrap: wrap; padding: 15px; }
.route-map-head span { font-size: 9px; flex: 1 1 auto; }
.route-map-head b { order: 2; flex: 0 0 100%; max-width: 100%; text-align: left; font-size: clamp(17px,1.3vw,24px); font-weight: 500; }
#mapMode { border: 1px solid #c5d8e6; border-radius: 7px; padding: 6px 9px; background: #fff; color: #1b4886; font-size: 11px; }
.route-map-canvas { min-height: 250px; border-radius: 10px; }
.route-map-meta { border-radius: 8px; }
.route-map-meta b { font-size: 15px; }
.route-map-meta small { font-size: 9px; }
.route-map-address { white-space: normal; font-size: 12px; line-height: 1.4; }
.route-map-source { font-size: 9px; line-height: 1.4; }
.route-map-legend { display: none; }
.route-map-place b { white-space: normal; overflow: visible; text-overflow: clip; max-width: 155px; font-size: 10px; }
.visual.route-active .card { padding: 13px 16px; }
footer { min-height: 34px; font-size: 10px; color: #667d94; }
@media (min-width: 981px) and (max-height: 850px) {
  .conversation { padding: 21px 24px 16px; }
  .starter-prompts { padding: 22px; }
  .starter-grid { margin-top: 20px; }
  .starter-grid button { padding: 13px; min-height: 74px; }
  .display-status { padding: 16px 20px; }
  .visual-heading { padding-top: 24px; }
  .route-map { flex-basis: 380px; min-height: 380px; }
  .route-map-canvas { min-height: 210px; }
  .visual.route-active .cards { display: grid; }
  .visual.has-cards:not(.route-active) .card { padding: 15px 18px; }
  .visual.has-cards:not(.route-active) .card h3 { font-size: 17px; line-height: 1.3; }
  .visual.has-cards:not(.route-active) .card p { font-size: 12px; line-height: 1.45; }
}
@media (max-width: 1180px) and (min-width: 981px) {
  .shell { width: calc(100% - 28px); }
  .stage { gap: 16px; }
  .topbar { padding: 14px 18px; }
  .brand { gap: 14px; }
  .official-logo { width: 142px; }
  .product-name b { font-size: 11px; }
  .starter-prompts h2 { font-size: 28px; }
  .starter-invitation { font-size: 14px; }
  .conversation { padding: 20px; }
}
@media (max-width: 980px) {
  .topbar { gap: 12px; }
  .session-state { width: auto; margin-left: auto; }
  .session-state #sessionLabel, .session-state .live-dot { display: none; }
  .stage { grid-template-columns: 1fr; overflow: visible; }
  .conversation { height: 700px; max-height: 80vh; min-height: 540px; }
  .visual { overflow: visible; }
  .visual-heading, .visual .orb { display: none; }
  .route-map { flex-basis: auto; min-height: 560px; }
  .route-map-canvas { min-height: 350px; }
  .display-status h2 { font-size: 25px; }
  .starter-prompts h2 { font-size: 38px; }
  .starter-grid button { font-size: 18px; }
  footer { flex-wrap: wrap; gap: 12px; padding: 14px 0; }
}
@media (max-width: 620px) {
  .official-logo { width: 130px; }
  .product-name, .brand-divider { display: none; }
  .sound-settings { margin-left: 0; }
  .sound-controls { width: min(310px, 85vw); }
  .conversation { min-height: 640px; max-height: none; padding: 18px; }
  .starter-prompts { padding: 18px; }
  .starter-prompts h2 { font-size: 29px; }
  .starter-grid button { font-size: 16px; min-height: 64px; }
  .dialogue-panel { padding: 16px; }
  .transcript, .answer { font-size: 20px; }
  .route-map-head { flex-direction: row; }
  .route-map { min-height: 500px; }
  .route-map-canvas { min-height: 310px; }
}
