:root {
  --text: #e6e9f2;
  --muted: #9aa6c3;
  --border: #233055;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: #000;
  color: var(--text);
  overflow: hidden;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.app {
  height: 100%;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.main {
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 12px;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.52);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel.right {
  width: min(1080px, calc(100vw - 18px));
  height: min(66vh, 620px);
  pointer-events: auto;
  background: rgba(3, 8, 20, 0.44);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.panel.right.hidden {
  width: 40px;
  border: 0;
  background: transparent;
}

.panel.right.hidden .panel-title,
.panel.right.hidden #openAbout,
.panel.right.hidden .guide-widget,
.panel.right.hidden .ask-map-widget,
.panel.right.hidden .live-events-widget,
.panel.right.hidden #chat,
.panel.right.hidden .composer {
  display: none;
}

.mobile-quick-rail {
  display: none;
}

.panel.right.youtube-player-active {
  height: 52px !important;
  min-height: 52px !important;
  overflow: hidden;
}

.panel.right.youtube-player-active.guide-expanded-on-youtube {
  min-height: 240px !important;
  height: min(66vh, 620px) !important;
}

.panel.right.youtube-player-active:not(.guide-expanded-on-youtube) #guideWidget,
.panel.right.youtube-player-active:not(.guide-expanded-on-youtube) #askMapWidget,
.panel.right.youtube-player-active:not(.guide-expanded-on-youtube) #liveEventsWidget,
.panel.right.youtube-player-active:not(.guide-expanded-on-youtube) #chat,
.panel.right.youtube-player-active:not(.guide-expanded-on-youtube) .composer {
  display: none;
}

.panel.right.mode-live .city-only { display: none; }
.panel.right.mode-city .live-only { display: none; }
.panel.right.youtube-mode:not(.guide-expanded-on-youtube) #guideWidget,
.panel.right.youtube-mode:not(.guide-expanded-on-youtube) #askMapWidget,
.panel.right.youtube-mode:not(.guide-expanded-on-youtube) #liveEventsWidget {
  display: none;
}

.youtube-popup {
  position: fixed;
  right: 12px;
  top: 12px;
  bottom: auto;
  width: min(840px, calc(100vw - 24px));
  height: min(78vh, 760px);
  border: 1px solid rgba(130, 177, 255, 0.35);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(6, 14, 30, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 6;
  pointer-events: auto;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  grid-auto-flow: row;
}

#youtubePopup > .youtube-popup-head { grid-row: 1; }
#youtubePopup > .youtube-popup-search { grid-row: 2; }
#youtubePopup > .youtube-player-controls { grid-row: 3; }
#youtubePopup > .youtube-results-list { grid-row: 4; }
#youtubePopup > .youtube-popup-frame { grid-row: 5; }

.youtube-popup.hidden {
  display: none;
}

.youtube-popup.mini {
  width: min(440px, calc(100vw - 24px));
  top: 12px;
  bottom: auto;
  height: min(36vh, 320px);
}

.youtube-popup-head {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: grab;
}

.youtube-popup-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.youtube-popup-head-left {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.youtube-popup-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #84b8ff;
  font-weight: 800;
}

.youtube-popup-title {
  font-size: 12px;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  color: #a8c2f2;
  font-weight: 800;
}

.youtube-now-playing-meta {
  font-size: 11px;
  color: #b8cceb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.youtube-popup-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #000;
  align-self: stretch;
}

.youtube-popup-search {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  background: rgba(8, 16, 34, 0.65);
  align-self: start;
}

.youtube-popup-search.hidden {
  display: none;
}

.youtube-player-controls {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(8, 16, 34, 0.58);
}

.youtube-control-label {
  font-size: 11px;
  font-weight: 700;
  color: #b7caee;
  letter-spacing: 0.2px;
}

.youtube-speed-select {
  min-width: 92px;
}

.youtube-results-list {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 10px;
  max-height: 142px;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(8, 16, 34, 0.45);
  align-self: start;
}

.youtube-results-list.hidden {
  display: none;
}

.youtube-results-item {
  border: 1px solid rgba(130, 177, 255, 0.34);
  border-radius: 9px;
  background: rgba(10, 22, 42, 0.6);
  padding: 6px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  width: 138px;
  min-width: 138px;
}

.youtube-results-item:hover {
  border-color: rgba(130, 177, 255, 0.74);
}

.youtube-results-item.active {
  border-color: rgba(94, 234, 212, 0.8);
  background: rgba(14, 42, 55, 0.62);
}

.youtube-results-title {
  font-size: 11px;
  color: #edf4ff;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.youtube-results-meta {
  font-size: 10px;
  color: #b9c8e6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.youtube-results-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  border: 1px solid rgba(130, 177, 255, 0.24);
  object-fit: cover;
  background: rgba(5, 8, 18, 0.9);
}

.youtube-search-input {
  min-width: 180px;
}

.youtube-popup-iframe-fallback {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.translate-popup {
  width: min(700px, calc(100vw - 24px));
  height: min(62vh, 560px);
}

.translate-popup-body {
  display: grid;
  gap: 10px;
  padding: 10px;
  align-content: start;
  grid-template-rows: auto auto auto 1fr;
  background: rgba(7, 15, 32, 0.72);
  min-height: 0;
  overflow-y: auto;
}

.translate-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.translate-label {
  font-size: 11px;
  color: #b9c8e6;
}

.translate-input {
  width: 100%;
  min-height: 92px;
}

.translate-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.translate-output-wrap {
  border: 1px solid rgba(130, 177, 255, 0.3);
  border-radius: 10px;
  background: rgba(7, 13, 28, 0.7);
  padding: 10px;
  overflow: auto;
}

.translate-output-text {
  color: #e9f2ff;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.translate-output-note {
  color: #b7c8e6;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.meal-popup {
  width: min(760px, calc(100vw - 24px));
  height: min(68vh, 620px);
}

.ar-popup {
  width: min(780px, calc(100vw - 24px));
  height: min(78vh, 760px);
}

.tourist-popup {
  width: min(860px, calc(100vw - 24px));
  height: min(80vh, 780px);
}

.tourist-popup-body {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  padding: 10px;
  background: rgba(7, 15, 32, 0.72);
  min-height: 0;
  overflow: hidden;
}

.tourist-controls {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
}

.tourist-destination-input {
  min-width: 0;
}

.tourist-stream {
  border: 1px solid rgba(130, 177, 255, 0.22);
  border-radius: 12px;
  padding: 8px;
  background: rgba(7, 13, 28, 0.48);
}

.tourist-story-title {
  font-size: 14px;
  font-weight: 700;
  color: #e9f1ff;
}

.tourist-segment-media {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.tourist-segment-image {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(130, 177, 255, 0.26);
  background: rgba(5, 10, 20, 0.8);
  object-fit: cover;
}

.tourist-segment-video {
  width: 100%;
  min-height: 210px;
  border: 1px solid rgba(130, 177, 255, 0.2);
  border-radius: 10px;
  background: #000;
}

.tourist-video-card {
  display: grid;
  gap: 8px;
  align-items: start;
}

.tourist-links-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.tourist-segment-item.is-active {
  border-color: rgba(94, 234, 212, 0.8);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.25) inset, 0 0 18px rgba(56, 189, 248, 0.2);
  background: rgba(11, 36, 46, 0.72);
}

.meal-output-wrap {
  min-height: 220px;
  overflow-y: auto;
}

.meal-popup .translate-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(7, 15, 32, 0.92);
  padding-bottom: 6px;
}

.meal-popup.analysis-expanded {
  height: min(86vh, 820px);
}

.ar-scout-body {
  display: grid;
  grid-template-rows: auto minmax(220px, 42%) 1fr;
  gap: 8px;
  padding: 8px 10px 10px;
  min-height: 0;
}

.ar-scout-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(9, 16, 34, 0.96), rgba(9, 16, 34, 0.76));
  border-radius: 10px;
  padding: 6px;
}

.ar-scout-status {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #cfe0ff;
  font-size: 12px;
}

.ar-scout-status::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 2px solid rgba(173, 206, 255, 0.35);
  border-top-color: #8ec0ff;
  animation: ar-scout-spin 800ms linear infinite;
}

@keyframes ar-scout-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ar-scout-camera-wrap {
  position: relative;
  border: 1px solid rgba(130, 177, 255, 0.28);
  border-radius: 12px;
  overflow: hidden;
  min-height: 220px;
  background: rgba(6, 12, 25, 0.92);
}

.ar-scout-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ar-scout-overlay-hint {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(130, 177, 255, 0.35);
  border-radius: 10px;
  background: rgba(6, 14, 30, 0.75);
  font-size: 12px;
  color: #c9dafc;
}

.ar-scout-list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding-right: 2px;
}

.ar-sight-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.ar-sight-input {
  min-width: 0;
}

.sight-voice-row {
  display: flex;
  justify-content: center;
  margin-top: 2px;
  margin-bottom: 2px;
}

.sight-voice-btn {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  background: radial-gradient(circle at 30% 30%, rgba(78, 156, 255, 0.95), rgba(26, 78, 171, 0.88));
  color: #f5f9ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, opacity 140ms ease;
}

.sight-voice-btn:hover,
.sight-voice-btn:focus-visible {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 0 4px rgba(88, 155, 255, 0.12);
  outline: none;
}

.sight-voice-btn:disabled {
  opacity: 0.52;
  cursor: default;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.sight-voice-btn.is-active {
  background: radial-gradient(circle at 30% 30%, rgba(95, 179, 255, 1), rgba(30, 93, 197, 0.96));
  box-shadow: 0 14px 30px rgba(18, 58, 120, 0.34), 0 0 0 4px rgba(88, 155, 255, 0.16);
}

.sight-voice-btn.is-paused {
  background: radial-gradient(circle at 30% 30%, rgba(60, 110, 190, 0.94), rgba(17, 51, 114, 0.9));
  opacity: 0.88;
}

.ar-scout-item {
  border: 1px solid rgba(130, 177, 255, 0.3);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(12, 22, 44, 0.72);
}

.ar-scout-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.ar-scout-name {
  font-weight: 700;
  color: #e8eeff;
  font-size: 13px;
}

.ar-scout-meta {
  color: #b9c7ea;
  font-size: 11px;
}

.ar-scout-line {
  color: #d6e1ff;
  font-size: 12px;
}

.meal-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 820px) {
  :root {
    --mobile-rail-width: 58px;
  }

  .main {
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .ask-map-input,
  .tv-select,
  .textarea {
    font-size: 16px;
  }

  .panel.right {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, 380px);
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0 14px 14px 0;
    margin-left: 0;
    z-index: 45;
    transform: translateX(0);
    transition: transform 220ms ease;
    padding-top: env(safe-area-inset-top, 0px);
  }

  .panel.right.hidden {
    width: min(86vw, 380px);
    height: 100dvh;
    min-height: 100dvh;
    background: transparent;
    border: 0;
    transform: translateX(calc(-100% + var(--mobile-rail-width)));
  }

  .panel.right.hidden #toggleChat {
    display: none;
  }

  .mobile-quick-rail {
    display: none;
  }

  .panel.right.hidden .mobile-quick-rail {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: 6px;
    width: calc(var(--mobile-rail-width) - 10px);
    bottom: auto;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 9px;
    padding: 8px 5px;
    background: linear-gradient(180deg, rgba(12, 21, 43, 0.82), rgba(6, 12, 28, 0.7));
    border: 1px solid rgba(130, 177, 255, 0.28);
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(2, 8, 24, 0.45), 0 2px 8px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(11px);
    z-index: 71;
  }

  .panel.right.hidden .mobile-quick-rail .icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(140, 186, 255, 0.3);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(18, 30, 55, 0.9), rgba(11, 22, 43, 0.82));
    box-shadow: inset 0 1px 0 rgba(200, 223, 255, 0.12), 0 4px 8px rgba(0, 0, 0, 0.24);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
    font-size: 17px;
    line-height: 1;
  }

  .panel.right.hidden .mobile-quick-rail .icon-btn:active {
    transform: translateY(1px) scale(0.97);
    border-color: rgba(160, 206, 255, 0.55);
    background: linear-gradient(180deg, rgba(26, 42, 72, 0.95), rgba(13, 26, 50, 0.9));
  }

  .panel-header {
    padding: 8px 10px;
  }

  .ask-map-actions {
    gap: 6px;
  }

  .youtube-popup,
  .translate-popup,
  .meal-popup,
  .ar-popup,
  .tourist-popup {
    width: min(100vw - 12px, 760px);
    max-width: calc(100vw - 12px);
    left: 6px !important;
    right: auto !important;
    top: 6px !important;
    border-radius: 10px;
  }

  .youtube-popup {
    height: min(70vh, 620px);
  }

  .translate-popup,
  .meal-popup {
    height: min(72vh, 640px);
  }

  .ar-popup {
    height: min(82vh, 760px);
  }

  .sight-popup {
    height: min(88vh, 820px);
  }

  .tourist-popup {
    height: min(82vh, 760px);
  }

  .tourist-controls {
    grid-template-columns: 1fr;
  }

  .tv-controls {
    grid-template-columns: 1fr;
  }

  .city-signal-grid {
    grid-template-columns: 1fr;
  }

  .tourist-segment-video {
    min-height: 180px;
  }

  .meal-popup.analysis-expanded {
    height: min(90vh, 920px);
  }

  .youtube-popup-head {
    padding: 8px 8px;
  }

  .youtube-popup-head-actions {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .youtube-player-controls {
    gap: 6px;
  }

  .translate-row {
    gap: 6px;
  }

  .translate-actions {
    gap: 6px;
  }

  .tv-select,
  .btn-compact {
    min-height: 34px;
  }

  .sight-popup .ar-scout-body {
    grid-template-rows: auto minmax(180px, 32dvh) auto auto minmax(180px, 1fr);
    gap: 6px;
    padding: 8px 8px 10px;
  }

  .sight-popup .ar-scout-camera-wrap {
    min-height: 180px;
  }

  .sight-popup .ar-scout-list {
    min-height: 180px;
    padding-bottom: 10px;
  }

  .sight-popup .ar-scout-item {
    padding: 10px;
  }

  .sight-popup .ar-scout-line {
    line-height: 1.48;
  }

  .sight-popup .ar-sight-row {
    gap: 6px;
  }

  .sight-popup .sight-voice-row {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 4px 0 8px;
    background: linear-gradient(180deg, rgba(7, 15, 32, 0), rgba(7, 15, 32, 0.8) 40%, rgba(7, 15, 32, 0.96));
  }

  .sight-popup .sight-voice-btn {
    width: 84px;
    height: 84px;
    font-size: 12px;
  }

  .chat {
    padding: 10px;
  }
}

/* City TV mode keeps the area open for upcoming TV controls/features. */
.panel.right.mode-city #liveEventsRail {
  display: none;
}

/* Keep City TV uncluttered for dedicated controls. */
.panel.right.mode-city #eventCategories {
  display: none;
}

.panel.right.hidden .panel-header {
  padding: 0;
  border: 0;
  justify-content: flex-end;
}

.panel.right.hidden #toggleChat {
  position: fixed;
  top: 22px;
  right: 22px;
}

@media (min-width: 821px) {
  .panel.right.hidden {
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

.panel-header {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
}

.panel-title { font-weight: 800; }
.panel-title {
  cursor: pointer;
  user-select: none;
}

.resize-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-right: 2px solid rgba(148, 188, 255, 0.9);
  border-bottom: 2px solid rgba(148, 188, 255, 0.9);
  border-radius: 0 0 10px 0;
  background: linear-gradient(135deg, rgba(10, 20, 42, 0.2), rgba(10, 20, 42, 0.7));
  cursor: nwse-resize;
  z-index: 80;
}

.resize-handle-chat {
  right: 4px;
  bottom: 4px;
}

.resize-handle-youtube {
  right: 6px;
  bottom: 6px;
}

.panel.right.is-resizing,
.youtube-popup.is-resizing {
  user-select: none;
}

.panel.right.is-dragging .panel-header,
.youtube-popup.is-dragging .youtube-popup-head {
  cursor: grabbing;
}

/* Replaced by desktop-style edge/corner resize zones. */
.resize-handle {
  display: none !important;
}

.resize-gutter {
  position: fixed;
  z-index: 40;
  pointer-events: auto;
  background: transparent;
}

.resize-gutter-n,
.resize-gutter-s { cursor: ns-resize; }
.resize-gutter-e,
.resize-gutter-w { cursor: ew-resize; }
.resize-gutter-ne,
.resize-gutter-sw { cursor: nesw-resize; }
.resize-gutter-nw,
.resize-gutter-se { cursor: nwse-resize; }
.panel-header-actions { display: inline-flex; align-items: center; gap: 8px; }

.chat {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 900px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.msg.user {
  align-self: flex-end;
  border-color: rgba(59,130,246,0.35);
  background: rgba(59,130,246,0.12);
}

.msg.assistant {
  align-self: flex-start;
  background: transparent;
}

.msg.system {
  align-self: center;
  max-width: 95%;
  background: rgba(12, 24, 48, 0.55);
  border-color: rgba(130, 177, 255, 0.35);
}

.msg.loading {
  border-style: dashed;
  border-color: rgba(130, 177, 255, 0.35);
  background: rgba(12, 24, 48, 0.35);
}

.typing-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #7eb9ff;
  opacity: 0.35;
  animation: dotPulse 1.1s infinite ease-in-out;
}

.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotPulse {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.28; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.msg .role {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.msg .text {
  white-space: pre-wrap;
  line-height: 1.35;
}

.places-list-title {
  margin-bottom: 7px;
  color: #cfe0ff;
  font-size: 12px;
}

.places-list {
  display: grid;
  gap: 6px;
}

.places-list-item {
  width: 100%;
  border: 1px solid rgba(130, 177, 255, 0.36);
  background: rgba(10, 20, 42, 0.62);
  color: #ecf3ff;
  border-radius: 10px;
  padding: 7px 9px 8px;
  font-size: 12px;
}

.places-list-item:hover {
  border-color: rgba(130, 177, 255, 0.75);
  background: rgba(18, 36, 72, 0.7);
}

.places-list-go {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #ecf3ff;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}

.places-list-go:hover {
  color: #ffffff;
}

.places-list-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.places-list-address {
  color: #b9c8e6;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.places-list-directions {
  color: #7ec8ff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}

.places-list-directions:hover {
  text-decoration: underline;
}

.route-preview-title {
  color: #e7f1ff;
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 600;
}

.route-preview-meta {
  color: #b6c8e8;
  font-size: 11px;
  margin-bottom: 8px;
}

.route-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.route-preview-btn {
  border: 1px solid rgba(125, 249, 255, 0.52);
  background: rgba(12, 36, 61, 0.78);
  color: #dbf6ff;
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.route-preview-btn:hover {
  border-color: rgba(125, 249, 255, 0.95);
  background: rgba(16, 48, 83, 0.92);
}

.youtube-list {
  display: grid;
  gap: 7px;
}

.youtube-list-item {
  border: 1px solid rgba(130, 177, 255, 0.35);
  border-radius: 10px;
  background: rgba(12, 22, 44, 0.65);
  padding: 7px 9px;
}

.youtube-list-item.youtube-active {
  border-color: rgba(94, 234, 212, 0.78);
  background: rgba(14, 42, 55, 0.64);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.34) inset;
}

.youtube-list-top {
  font-size: 12px;
  color: #ecf3ff;
  font-weight: 600;
}

.youtube-list-meta {
  margin-top: 4px;
  color: #b9c8e6;
  font-size: 11px;
}

.youtube-list-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.youtube-play-btn {
  border: 1px solid rgba(130, 177, 255, 0.44);
  background: rgba(20, 38, 72, 0.62);
  color: #e8eeff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.youtube-play-btn:hover {
  border-color: rgba(130, 177, 255, 0.82);
}

.composer {
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 8px;
  background: rgba(2, 6, 18, 0.48);
}

.textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.28);
  color: var(--text);
  border-radius: 14px;
  padding: 11px 12px;
  outline: none;
}

.composer-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid rgba(59,130,246,0.4);
  background: linear-gradient(180deg, rgba(59,130,246,0.95), rgba(29,78,216,0.95));
  color: #fff;
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.btn.secondary {
  border: 1px solid var(--border);
  background: rgba(33, 38, 45, 0.65);
}

.btn.secondary.active {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(5, 150, 105, 0.28);
}

.btn-compact {
  padding: 7px 10px;
  font-weight: 900;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal-card {
  position: relative;
  margin: 8vh auto;
  width: min(1180px, calc(100vw - 24px));
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8, 14, 31, 0.96), rgba(5, 10, 24, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(220, 234, 255, 0.06);
}

.modal-header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 16px 18px 18px;
  color: #d4dff5;
  max-height: min(78vh, 840px);
  overflow-y: auto;
  line-height: 1.58;
}

.modal-body h4 {
  margin: 16px 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c2d8ff;
}

.modal-body p {
  margin: 0 0 10px;
}

.modal-body ul {
  margin: 0 0 8px 18px;
  padding: 0;
}

.modal-body li {
  margin: 0 0 7px;
}

.about-body strong {
  color: #edf4ff;
}

.about-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 250px;
  gap: 14px;
  align-items: start;
}

.about-toc,
.about-side {
  position: sticky;
  top: 2px;
  display: grid;
  gap: 8px;
}

.about-toc {
  background: linear-gradient(180deg, rgba(8, 16, 34, 0.82), rgba(7, 14, 30, 0.78));
  border: 1px solid rgba(130, 177, 255, 0.24);
  border-radius: 12px;
  padding: 10px;
}

.about-toc a {
  color: #bdd2f7;
  text-decoration: none;
  font-size: 12px;
  border: 1px solid rgba(130, 177, 255, 0.18);
  border-radius: 8px;
  background: rgba(13, 24, 47, 0.72);
  padding: 7px 8px;
  line-height: 1.25;
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease, box-shadow 130ms ease;
}

.about-toc a:hover {
  border-color: rgba(150, 198, 255, 0.55);
  background: rgba(18, 31, 58, 0.88);
  transform: translateX(1px);
  box-shadow: 0 4px 10px rgba(5, 12, 28, 0.35);
}

.about-main {
  min-width: 0;
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, rgba(16, 31, 61, 0.14), rgba(10, 22, 45, 0.08));
  border: 1px solid rgba(130, 177, 255, 0.18);
  border-radius: 14px;
  padding: 6px;
  position: relative;
  overflow: hidden;
}

.about-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(120, 165, 230, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 165, 230, 0.12) 1px, transparent 1px);
  background-size: 26px 26px, 26px 26px;
}

.about-main::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 26%;
  top: -28%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.24;
  background: linear-gradient(
    180deg,
    rgba(120, 214, 255, 0),
    rgba(120, 214, 255, 0.18),
    rgba(120, 214, 255, 0)
  );
  animation: about-scanline-sweep 6200ms linear infinite;
}

.about-section {
  background: linear-gradient(180deg, rgba(13, 25, 50, 0.82), rgba(10, 20, 40, 0.78));
  border: 1px solid rgba(130, 177, 255, 0.2);
  border-radius: 12px;
  padding: 12px 12px 10px;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  position: relative;
  z-index: 1;
}

.about-section h4 {
  margin-top: 0;
}

.about-section ul {
  margin-bottom: 0;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.about-feature-card {
  background: rgba(13, 26, 52, 0.74);
  border: 1px solid rgba(130, 177, 255, 0.2);
  border-radius: 10px;
  padding: 9px 10px 8px;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.about-feature-card h5 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d9e8ff;
}

.about-feature-card ul {
  margin: 0 0 0 16px;
}

.about-feature-card li {
  margin-bottom: 6px;
}

.about-flow-diagram {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.about-flow-node {
  min-width: 0;
  border: 1px solid rgba(130, 177, 255, 0.25);
  border-radius: 10px;
  padding: 8px 9px 9px;
  background: linear-gradient(180deg, rgba(15, 30, 58, 0.85), rgba(11, 22, 42, 0.82));
  color: #e8f1ff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.about-flow-node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.about-flow-node-head strong {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.about-flow-state {
  border: 1px solid rgba(130, 177, 255, 0.34);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #dbe9ff;
  background: rgba(13, 27, 52, 0.86);
  white-space: nowrap;
}

.about-flow-node.state-idle .about-flow-state {
  border-color: rgba(156, 189, 235, 0.35);
  color: #d2e4ff;
}

.about-flow-node.state-processing .about-flow-state {
  border-color: rgba(93, 217, 255, 0.6);
  color: #b8f3ff;
  box-shadow: 0 0 10px rgba(93, 217, 255, 0.28);
}

.about-flow-node.state-responding .about-flow-state {
  border-color: rgba(110, 255, 212, 0.62);
  color: #c6ffe9;
  box-shadow: 0 0 10px rgba(110, 255, 212, 0.24);
}

.about-flow-node span {
  display: block;
  margin-top: 4px;
  color: #b9cbed;
  font-size: 11px;
  font-weight: 500;
}

.about-flow-link {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-flow-line {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(98, 138, 197, 0.05), rgba(98, 138, 197, 0.8), rgba(98, 138, 197, 0.05));
}

.about-flow-pulse {
  position: absolute;
  left: 50%;
  top: -1px;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #74d9ff;
  box-shadow: 0 0 10px rgba(116, 217, 255, 0.9), 0 0 20px rgba(116, 217, 255, 0.35);
  animation: about-flow-pulse-down 1250ms linear infinite;
}

.about-flow-link-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ebde8;
  background: rgba(10, 20, 40, 0.76);
  border: 1px solid rgba(130, 177, 255, 0.2);
  border-radius: 999px;
  padding: 2px 8px;
}

.about-flow-link.state-responding .about-flow-pulse {
  background: #7bffd0;
  box-shadow: 0 0 10px rgba(123, 255, 208, 0.9), 0 0 20px rgba(123, 255, 208, 0.36);
}

.about-flow-link.state-responding .about-flow-link-label {
  color: #baf8de;
  border-color: rgba(123, 255, 208, 0.32);
}

@keyframes about-flow-pulse-down {
  0% {
    transform: translate(-50%, 0);
    opacity: 0.7;
  }
  70% {
    transform: translate(-50%, 15px);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, 20px);
    opacity: 0.25;
  }
}

@keyframes about-scanline-sweep {
  0% { top: -28%; }
  100% { top: 108%; }
}

.about-mobile-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.about-mobile-card {
  border: 1px solid rgba(130, 177, 255, 0.22);
  border-radius: 10px;
  background: rgba(12, 24, 47, 0.74);
  padding: 9px 10px;
}

.about-mobile-card h5 {
  margin: 0 0 5px;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d9e8ff;
}

.about-mobile-card p {
  margin: 0;
  font-size: 12px;
  color: #d7e3fb;
  line-height: 1.45;
}

.about-card {
  background: linear-gradient(180deg, rgba(8, 16, 32, 0.84), rgba(7, 14, 29, 0.82));
  border: 1px solid rgba(130, 177, 255, 0.24);
  border-radius: 12px;
  padding: 10px;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.about-panel-title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cfe2ff;
  font-weight: 800;
  margin-bottom: 6px;
}

.about-facts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.about-fact-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid rgba(130, 177, 255, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(14, 28, 56, 0.9), rgba(10, 21, 43, 0.88));
  padding: 5px 9px;
  max-width: 100%;
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease;
}

.about-fact-chip span {
  color: #9db8e8;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.about-fact-chip strong {
  color: #eef4ff;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.about-card p {
  margin: 0;
}

.about-card ul {
  margin: 0 0 0 16px;
}

.about-section:hover,
.about-feature-card:hover,
.about-card:hover,
.about-fact-chip:hover,
.about-mobile-card:hover,
.about-flow-node:hover,
.about-flow-link-label:hover {
  border-color: rgba(156, 202, 255, 0.56);
  box-shadow: 0 8px 16px rgba(5, 12, 28, 0.35);
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  .modal-card {
    margin: 4vh auto;
    width: min(100vw - 12px, 980px);
    border-radius: 12px;
  }
  .modal-body {
    max-height: min(84vh, 880px);
    padding: 14px;
  }
  .about-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .about-toc,
  .about-side {
    position: static;
  }
  .about-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-toc .about-panel-title {
    grid-column: 1 / -1;
  }
  .about-feature-grid {
    grid-template-columns: 1fr;
  }
  .about-mobile-grid {
    grid-template-columns: 1fr;
  }
  .about-main {
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-main::after {
    animation: none;
    opacity: 0.14;
  }
}

/* About panel: enterprise dark (Active Directory style) */
#aboutModal .modal-card {
  border-radius: 6px;
  background: #0f141b;
  border: 1px solid #2a3442;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

#aboutModal .modal-header {
  padding: 8px 10px;
  background: linear-gradient(180deg, #1a2431, #131c27);
  border-bottom: 1px solid #2b3646;
  align-items: flex-start;
}

#aboutModal .modal-title-wrap {
  min-width: 0;
  display: grid;
  gap: 6px;
}

#aboutModal .modal-title {
  font-size: 14px;
  font-weight: 700;
  color: #e6edf7;
  letter-spacing: 0.01em;
}

#aboutModal .modal-body {
  background: #0f141b;
  color: #d5deea;
  line-height: 1.56;
}

#aboutModal .about-layout {
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 12px;
}

#aboutModal .about-main {
  background: #0f151e;
  border: 1px solid #273444;
  border-radius: 4px;
  padding: 6px;
  min-width: 0;
}

#aboutModal .about-main::before,
#aboutModal .about-main::after {
  display: none;
}

#aboutModal .about-toc,
#aboutModal .about-card,
#aboutModal .about-section {
  border-radius: 4px;
  border: 1px solid #2a3748;
  background: #111a24;
  box-shadow: none;
}

#aboutModal .about-toc {
  padding: 8px;
  max-height: min(78vh, 820px);
  overflow-y: auto;
}

#aboutModal .about-hidden {
  display: none !important;
}

#aboutModal .about-panel-title {
  color: #b9c6d8;
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-bottom: 7px;
}

#aboutModal .about-toc a {
  border-radius: 3px;
  border: 1px solid #2f3d50;
  background: #141f2b;
  color: #cfd9e7;
  font-size: 11px;
  padding: 6px 7px;
  transition: none;
}

#aboutModal .about-toc a:hover {
  transform: none;
  box-shadow: none;
  border-color: #4f8ad5;
  background: #1a2b3e;
  color: #e7f0ff;
}

#aboutModal .about-toc a.is-active {
  border-color: #67a9ff;
  background: #1e3248;
  color: #f2f7ff;
}

#aboutModal .about-section {
  padding: 11px 11px 9px;
  transition: none;
}

#aboutModal .about-section h4 {
  margin-bottom: 7px;
  color: #dbe7f8;
  font-size: 11px;
  letter-spacing: 0.12em;
}

#aboutModal .about-section p,
#aboutModal .about-section li {
  font-size: 12.5px;
}

#aboutModal .about-header-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#aboutModal .about-header-fact {
  border: 1px solid #324459;
  background: #132031;
  color: #d7e4f6;
  border-radius: 3px;
  padding: 3px 6px;
  font-size: 10px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

#aboutModal .about-start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#aboutModal .about-start-card {
  border: 1px solid #314256;
  border-radius: 3px;
  background: #132032;
  padding: 8px 9px;
}

#aboutModal .about-start-kicker {
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #a9bdd8;
  margin-bottom: 4px;
  font-weight: 700;
}

#aboutModal .about-start-card p {
  margin: 0;
  font-size: 12px;
  color: #d8e3f1;
  line-height: 1.45;
}

#aboutModal .about-feature-card,
#aboutModal .about-mobile-card {
  border-radius: 3px;
  border: 1px solid #304156;
  background: #121d29;
  transition: none;
}

#aboutModal .about-feature-card h5,
#aboutModal .about-mobile-card h5 {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #d6e4f7;
}

#aboutModal .about-feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 5px 0 8px;
}

#aboutModal .about-feature-meta span {
  border: 1px solid #344a61;
  background: #152537;
  color: #c6d9f1;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

#aboutModal .about-feature-card ol {
  margin: 6px 0 0 17px;
  padding: 0;
}

#aboutModal .about-feature-card ol li {
  margin: 0 0 4px;
  line-height: 1.45;
}

#aboutModal .about-subheading {
  margin: 8px 0 4px;
  color: #dce8f8;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#aboutModal .about-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

#aboutModal .about-detail-card {
  border: 1px solid #304359;
  border-radius: 3px;
  background: #132131;
  padding: 7px 8px;
}

#aboutModal .about-detail-card h6 {
  margin: 0 0 5px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8cee8;
}

#aboutModal .about-detail-card ul {
  margin: 0 0 0 15px;
  padding: 0;
}

#aboutModal .about-detail-card li {
  font-size: 12px;
  margin-bottom: 4px;
}

#aboutModal .about-pro-tip {
  margin-top: 8px;
  border: 1px solid #365074;
  border-radius: 3px;
  background: #16283e;
  color: #dceafe;
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.45;
}

#aboutModal .about-feature-focus .about-feature-grid {
  grid-template-columns: 1fr;
}

#aboutModal .about-feature-focus .about-feature-card {
  width: 100%;
}

@media (max-width: 900px) {
  #aboutModal .about-detail-grid {
    grid-template-columns: 1fr;
  }
}


#aboutModal .about-facts-chips {
  display: grid;
  gap: 6px;
}

#aboutModal .about-fact-chip {
  width: 100%;
  border-radius: 3px;
  border: 1px solid #324459;
  background: #132031;
  padding: 4px 7px;
  display: flex;
  justify-content: space-between;
  transition: none;
}

#aboutModal .about-fact-chip span {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #9eb0c7;
}

#aboutModal .about-fact-chip strong {
  font-size: 10px;
  color: #e4edf9;
}

#aboutModal .about-flow-node {
  border-radius: 3px;
  border: 1px solid #32465d;
  background: #12202e;
}

#aboutModal .about-flow-state {
  border-radius: 3px;
  border: 1px solid #3d546e;
  background: #1a2b3f;
  box-shadow: none !important;
  font-size: 9px;
}

#aboutModal .about-flow-link {
  height: 18px;
}

#aboutModal .about-flow-line {
  width: 1px;
  background: linear-gradient(180deg, rgba(136, 172, 214, 0.08), rgba(136, 172, 214, 0.62), rgba(136, 172, 214, 0.08));
}

#aboutModal .about-flow-pulse {
  width: 6px;
  height: 6px;
  background: #8ebff5;
  box-shadow: none;
  animation-duration: 1700ms;
}

#aboutModal .about-flow-link-label {
  border-radius: 3px;
  border: 1px solid #2e4257;
  background: #102031;
  color: #a9bfda;
  font-size: 9px;
  letter-spacing: 0.1em;
}

#aboutModal .about-section:hover,
#aboutModal .about-feature-card:hover,
#aboutModal .about-card:hover,
#aboutModal .about-fact-chip:hover,
#aboutModal .about-mobile-card:hover,
#aboutModal .about-flow-node:hover,
#aboutModal .about-flow-link-label:hover {
  transform: none;
  box-shadow: none;
  border-color: #3f5269;
}

@media (max-width: 1100px) {
  #aboutModal .about-layout {
    grid-template-columns: 170px minmax(0, 1fr);
  }
  #aboutModal .about-start-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  #aboutModal .about-layout {
    grid-template-columns: 1fr;
  }
  #aboutModal .about-toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #aboutModal .about-toc .about-panel-title {
    grid-column: 1 / -1;
  }
  #aboutModal .about-header-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    display: grid;
    gap: 4px;
  }
}

.guide-widget {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 16, 30, 0.55);
  position: relative;
}

/* Hide avatar/replay row per product preference. */
#guideWidget {
  display: none;
}

.guide-widget-avatar {
  width: 92px;
}

.guide-widget-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.guide-avatar {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #111827;
  overflow: hidden;
  position: relative;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.guide-face-photo {
  width: 100%;
  display: block;
}

.guide-avatar.is-speaking {
  transform: scale(1.02);
  filter: brightness(1.04) saturate(1.05);
  box-shadow: 0 0 26px rgba(59, 130, 246, 0.35);
}

.guide-mouth {
  position: absolute;
  left: 62%;
  top: 56%;
  width: 8.5%;
  height: 1.5%;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  background: #4b0014;
  box-shadow: 0 0 0 1px rgba(255, 180, 190, 0.32), 0 2px 8px rgba(0, 0, 0, 0.35);
  opacity: 0.88;
}

.ask-map-widget {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 14, 27, 0.48);
  display: grid;
  gap: 8px;
}

.ask-map-title {
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #9bb0d8;
  font-weight: 700;
}

.ask-map-input {
  width: 100%;
  border: 1px solid rgba(105, 128, 170, 0.42);
  background: rgba(2, 6, 23, 0.65);
  color: #e8eeff;
  border-radius: 10px;
  padding: 8px 10px;
  outline: none;
}

.ask-input-wrap {
  position: relative;
  min-width: 0;
}

.ask-autocomplete {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(130, 177, 255, 0.26);
  border-radius: 12px;
  background: rgba(6, 14, 28, 0.96);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38);
  max-height: 260px;
  overflow-y: auto;
}

.ask-autocomplete.hidden {
  display: none;
}

.ask-autocomplete-item {
  width: 100%;
  border: 1px solid rgba(130, 177, 255, 0.18);
  border-radius: 10px;
  background: rgba(12, 24, 46, 0.92);
  color: #e8f1ff;
  padding: 8px 9px;
  text-align: left;
  display: grid;
  gap: 3px;
  cursor: pointer;
}

.ask-autocomplete-item:hover,
.ask-autocomplete-item:focus-visible {
  border-color: rgba(125, 211, 252, 0.52);
  background: rgba(18, 34, 62, 0.96);
  outline: none;
}

.ask-autocomplete-title {
  font-size: 12px;
  font-weight: 700;
  color: #eef4ff;
}

.ask-autocomplete-meta {
  font-size: 10px;
  letter-spacing: 0.24px;
  text-transform: uppercase;
  color: #9fc0f4;
}

.ask-map-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.live-events-widget {
  padding: 9px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 13, 27, 0.45);
  display: grid;
  gap: 8px;
}

.live-events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.section-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-head-actions .btn.is-active {
  border-color: rgba(56, 189, 248, 0.72);
  background: rgba(10, 40, 68, 0.82);
  color: #dff6ff;
}

.section-toggle {
  border: 1px solid rgba(130, 177, 255, 0.36);
  background: rgba(8, 18, 36, 0.65);
  color: #dbe7ff;
  border-radius: 8px;
  width: 24px;
  height: 24px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  font-weight: 800;
}

#guideWidget .section-toggle {
  position: absolute;
  top: 9px;
  right: 12px;
}

.guide-widget.collapsed {
  grid-template-columns: 1fr;
  min-height: 44px;
}

.guide-widget.collapsed .guide-widget-avatar,
.guide-widget.collapsed .guide-widget-controls {
  display: none;
}

.ask-map-widget.collapsed .ask-map-input,
.ask-map-widget.collapsed .ask-map-actions {
  display: none;
}

.live-events-widget.collapsed .live-hint,
.live-events-widget.collapsed .tv-controls,
.live-events-widget.collapsed #eventCategories,
.live-events-widget.collapsed #cityInsightPanel,
.live-events-widget.collapsed #liveEventsRail {
  display: none;
}

.live-events-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.event-categories {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tv-controls {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto auto;
  gap: 6px;
  align-items: center;
}

.live-hint {
  font-size: 11px;
  color: #9cb2da;
}

.tv-location-input {
  min-width: 220px;
}

.tv-select {
  border: 1px solid rgba(130, 177, 255, 0.36);
  background: rgba(8, 18, 36, 0.65);
  color: #dbe7ff;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
}

.city-insight-panel {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

.city-insight-card {
  border: 1px solid rgba(130, 177, 255, 0.3);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(10, 22, 44, 0.65);
}

.city-insight-title {
  font-size: 12px;
  font-weight: 700;
  color: #e9f1ff;
  margin-bottom: 4px;
}

.city-insight-line {
  font-size: 11px;
  color: #d6e1ff;
  line-height: 1.35;
}

.ask-search-popup {
  width: min(980px, calc(100vw - 18px));
  height: min(82vh, 760px);
}

.ask-search-popup-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px 12px;
  min-height: 0;
  overflow: hidden;
}

.ask-search-summary-card {
  display: grid;
  gap: 6px;
  padding: 9px 10px 10px;
  border: 1px solid rgba(130, 177, 255, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(14, 30, 56, 0.88), rgba(10, 22, 44, 0.7));
}

.ask-search-summary {
  border: 1px solid rgba(130, 177, 255, 0.18);
  border-radius: 10px;
  background: rgba(6, 14, 28, 0.34);
  padding: 8px 10px;
  color: #e8f1ff;
  font-size: 12px;
  line-height: 1.45;
  max-height: 108px;
  overflow-y: auto;
}

.ask-search-results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.46fr) minmax(0, 0.54fr);
  gap: 12px;
  min-height: 0;
}

.ask-search-popup.is-news-mode .ask-search-results-grid {
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
}

.ask-search-section {
  min-height: 0;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(130, 177, 255, 0.22);
  border-radius: 14px;
  background: rgba(8, 18, 36, 0.5);
}

.ask-search-section-map {
  background: linear-gradient(180deg, rgba(8, 24, 48, 0.72), rgba(8, 18, 36, 0.54));
  border-color: rgba(96, 165, 250, 0.34);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.06);
}

.ask-search-section-web {
  background: linear-gradient(180deg, rgba(9, 18, 34, 0.72), rgba(8, 18, 36, 0.48));
}

.ask-search-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.ask-search-section-kicker {
  font-size: 10px;
  color: #a9bfeb;
  line-height: 1.35;
}

.ask-search-results-list {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
  max-height: none;
  padding-right: 2px;
}

.ask-search-result-card {
  border: 1px solid rgba(130, 177, 255, 0.26);
  border-radius: 12px;
  background: rgba(10, 22, 44, 0.6);
  padding: 9px 10px;
  display: grid;
  gap: 7px;
}

.ask-search-result-card--map {
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(160deg, rgba(11, 34, 66, 0.96), rgba(9, 24, 48, 0.78));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.08);
  min-height: 418px;
  padding: 12px 12px 14px;
  gap: 11px;
}

.ask-search-result-card--web {
  border-color: rgba(130, 177, 255, 0.18);
  background: linear-gradient(180deg, rgba(9, 18, 34, 0.86), rgba(7, 14, 28, 0.72));
}

.ask-search-result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ask-search-result-card--map .live-event-title {
  font-size: 16px;
  line-height: 1.2;
}

.ask-search-result-card--web .live-event-title {
  font-size: 13px;
  line-height: 1.3;
}

.ask-search-place-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ask-search-place-head-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ask-search-place-kicker {
  font-size: 10px;
  color: #a9bfeb;
  line-height: 1.3;
}

.ask-search-photo-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ask-search-photo-frame {
  position: relative;
  min-height: 108px;
  border: 1px solid rgba(130, 177, 255, 0.18);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(3, 10, 20, 0.85);
}

.ask-search-photo-frame--hero {
  grid-column: 1 / -1;
  min-height: 148px;
}

.ask-search-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ask-search-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ask-search-meta-chip {
  border: 1px solid rgba(130, 177, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #cfe1ff;
  font-size: 10px;
  padding: 3px 7px;
  line-height: 1.2;
}

.ask-search-meta-chip--fresh {
  border-color: rgba(74, 222, 128, 0.28);
  color: #d9ffe6;
  background: rgba(20, 83, 45, 0.24);
}

.ask-search-meta-chip--source {
  border-color: rgba(125, 211, 252, 0.2);
  color: #d7ecff;
  background: rgba(8, 37, 68, 0.24);
}

.ask-search-why {
  border-left: 2px solid rgba(125, 211, 252, 0.42);
  padding-left: 10px;
  color: #d7e7ff;
  font-size: 11px;
  line-height: 1.4;
}

.ask-search-inline-narrate {
  min-width: 28px;
  height: 28px;
  border: 1px solid rgba(130, 177, 255, 0.22);
  border-radius: 999px;
  background: rgba(12, 24, 46, 0.78);
  color: #e8f1ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  font-size: 12px;
}

.ask-search-inline-narrate:hover,
.ask-search-inline-narrate:focus-visible {
  border-color: rgba(125, 211, 252, 0.5);
  background: rgba(17, 36, 66, 0.9);
  outline: none;
}

.ask-search-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 900px) {
  .ask-search-popup {
    width: min(100vw - 12px, 980px);
    height: min(84vh, 760px);
  }

  .ask-search-results-grid {
    grid-template-columns: 1fr;
  }

  .ask-search-photo-frame {
    min-height: 76px;
  }

  .ask-search-photo-frame--hero {
    min-height: 104px;
  }

  .ask-search-result-card--map {
    min-height: 0;
    padding: 10px 10px 12px;
    gap: 8px;
  }
}

.city-collection-list {
  display: grid;
  gap: 6px;
}

.city-collection-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(130, 177, 255, 0.24);
  border-radius: 10px;
  background: rgba(8, 18, 36, 0.5);
  color: #e6f0ff;
  padding: 7px 8px;
  cursor: pointer;
  transition: border-color 130ms ease, transform 130ms ease, background 130ms ease;
}

.city-collection-btn:hover {
  border-color: rgba(96, 165, 250, 0.72);
  background: rgba(15, 30, 58, 0.72);
  transform: translateY(-1px);
}

.city-collection-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #edf4ff;
}

.city-collection-note {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.35;
  color: #b8c9ea;
}

.city-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.city-signal-chip {
  border: 1px solid rgba(130, 177, 255, 0.24);
  border-radius: 10px;
  background: rgba(8, 18, 36, 0.55);
  padding: 6px 7px;
}

.city-signal-name {
  color: #b9ccf2;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.city-signal-value {
  color: #e6f0ff;
  font-size: 12px;
  font-weight: 700;
}

.category-chip {
  border: 1px solid rgba(130, 177, 255, 0.36);
  background: rgba(8, 18, 36, 0.65);
  color: #dbe7ff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
}

.category-chip.active {
  border-color: rgba(59, 130, 246, 0.9);
  background: rgba(30, 64, 175, 0.35);
}

.live-event-card {
  min-width: 210px;
  max-width: 230px;
  border-radius: 12px;
  border: 1px solid rgba(130, 177, 255, 0.35);
  background: linear-gradient(145deg, rgba(8, 18, 40, 0.92), rgba(14, 34, 72, 0.86));
  color: #e7eeff;
  padding: 8px 9px;
  cursor: pointer;
  transition: transform 130ms ease, border-color 130ms ease;
}

.live-event-card:hover {
  transform: translateY(-1px);
  border-color: rgba(130, 177, 255, 0.7);
}

.live-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.live-event-badge {
  font-size: 11px;
  color: #9ec2ff;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.live-event-region {
  font-size: 11px;
  color: #c6d7f8;
}

.live-event-title {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  color: #edf3ff;
}

.live-event-actions {
  margin-top: 7px;
  display: flex;
  justify-content: flex-end;
}

.live-event-action-btn {
  border: 1px solid rgba(130, 177, 255, 0.44);
  background: rgba(20, 38, 72, 0.62);
  color: #e8eeff;
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 11px;
  cursor: pointer;
}

.streetview-pane {
  position: fixed;
  left: 12px;
  right: min(1098px, calc(100vw - 6px));
  bottom: 12px;
  top: max(78px, 9vh);
  z-index: 5;
  border: 1px solid rgba(130, 177, 255, 0.3);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(2, 8, 20, 0.92);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-rows: auto 1fr;
}

.streetview-pane.hidden {
  display: none;
}

.streetview-head {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.streetview-title {
  font-size: 12px;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  color: #a8c2f2;
  font-weight: 800;
}

.streetview-canvas {
  width: 100%;
  height: 100%;
}

.btn.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

.news-popup-card {
  max-width: 280px;
  color: #eef3ff;
  background: linear-gradient(145deg, rgba(6, 14, 32, 0.96), rgba(16, 38, 76, 0.94));
  border: 1px solid rgba(109, 155, 255, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.55);
  padding: 10px 11px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.news-popup-kicker {
  color: #8fb7ff;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 10px;
  margin-bottom: 6px;
  font-weight: 700;
}

.news-popup-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.news-popup-region {
  font-size: 11px;
  color: #b9ccf5;
  margin-bottom: 8px;
}

.news-popup-summary {
  font-size: 12px;
  line-height: 1.45;
  color: #e4ecff;
}

.news-popup-link {
  display: inline-block;
  margin-top: 9px;
  color: #7ec8ff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.news-popup-link:hover {
  text-decoration: underline;
}

.news-popup .leaflet-popup-content-wrapper {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.news-popup .leaflet-popup-content {
  margin: 0;
}

.news-popup .leaflet-popup-tip {
  background: rgba(12, 24, 48, 0.95);
}

.emoji-news-marker {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 24, 48, 0.96);
  border: 1px solid rgba(130, 177, 255, 0.82);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.emoji-news-marker span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(130, 177, 255, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 24, 48, 0.92);
  font-size: 18px;
  line-height: 1;
}
