:root {
  --ink: #162231;
  --muted: #617284;
  --line: #d8e1e8;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --glass: rgba(255, 255, 255, 0.56);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-soft: rgba(255, 255, 255, 0.38);
  --glass-border: rgba(255, 255, 255, 0.58);
  --glass-line: rgba(155, 178, 204, 0.34);
  --band: #f4f8fb;
  --band-strong: #e9f1f7;
  --blue: #275f89;
  --blue-deep: #173b5b;
  --green: #2f7d5c;
  --green-deep: #1d5a41;
  --gold: #9b6b1a;
  --red: #a83f3f;
  --scenic: #2563eb;
  --dining: #f08a24;
  --service: #10a97a;
  --shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 10px 28px rgba(18, 32, 49, 0.12);
  --shadow-glass: 0 22px 48px rgba(29, 50, 76, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --radius-card: 14px;
}

@media (max-width: 1100px) {
  .xiaobei-config-hero,
  .config-card-head {
    display: grid;
  }

  .xiaobei-config-avatar {
    width: 100%;
    max-width: none;
  }

  .xiaobei-config-grid {
    grid-template-columns: 1fr;
  }

  .model-manager-head,
  .model-manager-layout {
    display: grid;
  }

  .model-manager-layout {
    grid-template-columns: 1fr;
  }

  .model-manager-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prompt-config-card {
    grid-column: auto;
  }
}

.voice-agent-widget {
  position: static;
  z-index: auto;
  margin-top: 0;
  min-height: 0;
  padding: 0 16px 16px;
  border-radius: 0 0 22px 22px;
  background: #fff;
  font-family: "Microsoft YaHei", sans-serif;
  flex: 1 0 auto;
}

.voice-agent-toggle {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #0f766e;
  box-shadow: 0 14px 36px rgba(15, 118, 110, 0.32);
  cursor: pointer;
}

.voice-agent-toggle span {
  font-weight: 900;
  font-size: 18px;
}

.voice-agent-panel {
  position: static;
  width: 100%;
  height: auto;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.voice-agent-head {
  display: none;
}

.voice-agent-head strong,
.voice-agent-head span {
  display: block;
}

.voice-agent-head span {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.88;
}

.voice-agent-head a {
  color: #ecfeff;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.voice-agent-log {
  min-height: 360px;
  max-height: 480px;
  padding: 16px 18px;
  overflow-y: auto;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.voice-agent-message {
  max-width: min(100%, 560px);
  margin-bottom: 10px;
  padding: 13px 15px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  animation: voiceCardPop 260ms cubic-bezier(0.2, 0.9, 0.25, 1.18) both;
}

.voice-agent-message.user {
  margin-left: auto;
  color: #fff;
  background: linear-gradient(135deg, rgba(91, 92, 255, 0.94), rgba(31, 185, 166, 0.88));
  box-shadow: 0 14px 34px rgba(80, 92, 220, 0.22);
}

.voice-agent-message.bot {
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(239, 246, 255, 0.52)),
    radial-gradient(circle at 10% 8%, rgba(255, 255, 255, 0.95), transparent 42%);
  box-shadow:
    0 18px 46px rgba(31, 41, 55, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.2);
}

.voice-agent-message.bot::before {
  content: "小贝";
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin: 0 0 8px;
  padding: 0 9px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(209, 250, 244, 0.78);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

@keyframes voiceCardPop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.voice-itinerary-options {
  margin: 12px 0 14px;
  padding: 14px;
  border: 1px solid rgba(171, 181, 255, 0.5);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(246, 248, 255, 0.82));
  box-shadow: 0 18px 38px rgba(71, 85, 160, 0.16);
}

.voice-wizard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #202a44;
}

.voice-wizard-head strong {
  font-size: 15px;
  font-weight: 900;
}

.voice-wizard-head span {
  min-width: 48px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #5657ff;
  background: rgba(240, 236, 255, 0.9);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.voice-wizard-track {
  min-height: 236px;
}

.voice-wizard-page {
  display: none;
  gap: 12px;
}

.voice-wizard-page.active {
  display: grid;
}

.voice-wizard-page h4 {
  margin: 0;
  color: #162231;
  font-size: 16px;
  font-weight: 900;
}

.voice-stage-slider {
  width: 100%;
  accent-color: #6567ff;
}

.voice-stage-label {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #1f2a44;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 0 1px rgba(171, 181, 255, 0.35);
  font-weight: 900;
}

.voice-card-grid {
  display: grid;
  gap: 10px;
}

.voice-card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.voice-card-grid.nine,
.voice-card-grid.twelve {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.voice-card-grid.companion {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.voice-card-grid.budget {
  grid-template-columns: 1fr;
}

.voice-card-grid button {
  min-height: 44px;
  padding: 9px 8px;
  border: 1px solid rgba(171, 181, 255, 0.38);
  border-radius: 14px;
  color: #34425d;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.voice-card-grid button.active {
  border-color: rgba(86, 87, 255, 0.62);
  color: #fff;
  background: linear-gradient(135deg, #6567ff, #37b9b0);
  box-shadow: 0 12px 24px rgba(86, 87, 255, 0.22);
}

.voice-itinerary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 8px;
  margin-top: 12px;
}

.voice-itinerary-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: #e8edf7;
  color: #243449;
  font-weight: 800;
  cursor: pointer;
}

.voice-itinerary-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}

.voice-itinerary-actions button[data-action="generate"] {
  background: #5b5cff;
  color: #fff;
}

#voice-agent-input {
  width: 100%;
  min-height: 46px;
  height: 46px;
  margin: 0;
  padding: 0 16px 0 46px;
  resize: none;
  overflow-x: hidden;
  overflow-y: auto;
  border: 3px solid #111827;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  line-height: 40px;
  background: #fff;
  box-sizing: border-box;
  vertical-align: top;
}

#voice-agent-input:hover,
#voice-agent-input:focus {
  transform: none;
  outline: none;
}

#voice-agent-input::placeholder {
  line-height: 40px;
  color: #667085;
}

.xiaobei-input-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 76%) 52px;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 22px auto 0;
}

.xiaobei-input-wrap {
  position: relative;
  margin: 0;
}

.xiaobei-input-row #voice-agent-count {
  position: absolute;
  right: 76px;
  bottom: -14px;
  color: #8792a6;
  font-size: 12px;
}

.input-mic-button {
  position: absolute;
  left: 18px;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  color: #111827;
  background: transparent;
  font-size: 23px;
  cursor: pointer;
}

.send-icon-button {
  width: 52px;
  height: 52px;
  min-height: 52px !important;
  border: 0 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #c084fc, #a855f7) !important;
  box-shadow: 0 14px 28px rgba(168, 85, 247, 0.28);
  font-size: 23px !important;
  line-height: 1;
}

.voice-start-button {
  width: 168px;
  min-height: 44px;
  display: block;
  margin: 14px auto 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #5657ff, #6a5cff);
  box-shadow: 0 16px 30px rgba(86, 87, 255, 0.28);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.voice-agent-actions {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 54px;
  gap: 10px;
  padding: 0;
}

.voice-agent-actions button {
  min-height: 44px;
  border: 1px solid rgba(86, 87, 255, 0.28);
  border-radius: 16px;
  padding: 12px 8px;
  color: #5657ff;
  background: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.voice-agent-actions .location-icon-button {
  min-width: 54px;
  padding: 0;
  border: 0;
  color: #5657ff;
  background: rgba(240, 236, 255, 0.96);
  font-size: 21px;
}

.voice-agent-actions .primary {
  color: #fff;
  background: #5657ff;
}

.voice-agent-actions button.listening {
  color: #fff;
  background: #5657ff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(32, 96, 154, 0.14), transparent 34%),
    linear-gradient(245deg, rgba(22, 137, 116, 0.12), transparent 36%),
    linear-gradient(180deg, #eef7ff 0%, #f8fbfd 48%, #edf8f3 100%);
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(236, 246, 255, 0.48));
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(1.18);
  box-shadow: var(--shadow-glass);
}

.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-block {
  display: grid;
  grid-template-columns: 220px minmax(0, auto);
  grid-template-rows: auto auto auto;
  column-gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-tag {
  grid-row: span 3;
  width: 220px;
  height: 52px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.swu-logo-mark {
  width: 100%;
  height: 48px;
  object-fit: contain;
  display: block;
}

.page-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.page-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  color: var(--muted);
}

.page-tabs button.active {
  color: #135fd6;
  background: rgba(234, 242, 255, 0.76);
  box-shadow: none;
}

.topbar h1 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.topbar p {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.page-version {
  grid-column: 2;
  grid-row: 3;
  width: fit-content;
  margin-top: 3px;
  padding: 2px 8px;
  border: 1px solid rgba(19, 95, 214, 0.12);
  border-radius: 999px;
  color: #135fd6;
  background: rgba(234, 242, 255, 0.7);
  font-size: 11px;
  font-weight: 800;
}

.status-pill {
  min-width: 112px;
  padding: 9px 14px;
  border-radius: 999px;
  text-align: center;
  color: var(--green-deep);
  background: linear-gradient(135deg, rgba(230, 244, 236, 0.78), rgba(239, 248, 242, 0.52));
  border: 1px solid rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 700;
}

.version-pill {
  min-width: 86px;
  color: #135fd6;
  background: linear-gradient(135deg, rgba(234, 242, 255, 0.86), rgba(255, 255, 255, 0.58));
}

.clock-pill {
  min-width: 188px;
  color: #0f766e;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.6));
}

.workspace {
  height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(540px, 1fr) 500px;
  gap: 16px;
  padding: 18px 22px;
  position: relative;
}

.page-view {
  display: none;
}

.page-view.active {
  display: grid;
}

.panel,
.map-shell {
  min-height: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(243, 249, 255, 0.42));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(18px) saturate(1.12);
  overflow: hidden;
}

.panel {
  overflow-y: auto;
  padding: 18px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.left-panel {
  position: fixed;
  z-index: 80;
  left: 18px;
  top: 96px;
  bottom: 18px;
  width: 430px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  justify-items: stretch;
  overflow-y: auto;
  padding: 14px 10px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 16px;
  background: rgba(240, 248, 255, 0.84);
  box-shadow: 0 28px 70px rgba(18, 32, 49, 0.24);
  backdrop-filter: blur(22px) saturate(1.14);
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  transform: translateX(calc(-100% - 34px));
  transition: transform 0.28s ease;
}

.left-panel.open {
  transform: translateX(0);
}

.profile-drawer-toggle {
  position: fixed;
  z-index: 120;
  left: 0;
  top: 50%;
  min-height: 0;
  padding: 16px 9px;
  border: 0;
  border-radius: 0 14px 14px 0;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1558c6);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  cursor: pointer;
}

.left-panel.open + .map-shell,
.left-panel.open ~ .map-shell {
  pointer-events: auto;
}

.profile-drawer-close {
  position: sticky;
  top: 0;
  z-index: 5;
  justify-self: end;
  width: 34px;
  height: 34px;
  margin-bottom: -4px;
  border: 1px solid rgba(155, 178, 204, 0.38);
  border-radius: 50%;
  color: #173b5b;
  background: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.env-dashboard {
  width: 100%;
  max-width: none;
  padding: 14px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(231, 242, 255, 0.68), rgba(246, 251, 248, 0.5)),
    var(--glass);
  backdrop-filter: blur(18px) saturate(1.16);
  box-shadow: var(--shadow-glass);
}

.regional-weather-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.regional-weather-card {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--glass-line);
  border-radius: 10px;
  background: var(--glass-soft);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.regional-weather-card small {
  color: var(--muted);
  font-size: 11px;
}

.regional-weather-card strong {
  color: #152844;
  font-size: 15px;
  font-weight: 900;
}

.regional-weather-card span {
  color: #43546a;
  font-size: 12px;
  line-height: 1.35;
}

.env-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.env-head span {
  color: var(--muted);
  font-size: 10px;
}

.env-head strong {
  color: #145fd7;
  font-size: 13px;
}

.weather-visual {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(19, 95, 214, 0.16);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95), rgba(210, 231, 255, 0.72));
  box-shadow: 0 12px 26px rgba(19, 95, 214, 0.16);
  animation: weather-float 3.4s ease-in-out infinite;
}

.weather-visual span {
  font-size: 27px;
  line-height: 1;
  animation: weather-pulse 2.2s ease-in-out infinite;
}

.weather-visual[data-weather="rain"] {
  background: radial-gradient(circle at 34% 28%, #ffffff, rgba(180, 207, 232, 0.82));
}

.weather-visual[data-weather="hot"],
.weather-visual[data-weather="sun"] {
  background: radial-gradient(circle at 34% 28%, #fff8d9, rgba(255, 215, 125, 0.58));
}

@keyframes weather-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes weather-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

.env-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.env-metric {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--glass-line);
  border-radius: 10px;
  background: var(--glass-soft);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.env-metric small {
  color: var(--muted);
  font-size: 10px;
}

.env-metric strong {
  color: #152844;
  font-size: 12.5px;
  line-height: 1.18;
  font-weight: 700;
  word-break: keep-all;
}

#env-weather-detail {
  font-size: 11.5px;
  line-height: 1.2;
}

.phone-frame {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-glass);
}

.phone-speaker {
  display: none;
}

.phone-screen {
  height: auto;
  overflow: visible;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.54), rgba(247, 251, 255, 0.38));
  backdrop-filter: blur(14px);
}

.phone-top {
  position: sticky;
  top: -12px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -12px -12px 12px;
  padding: 12px;
  border-bottom: 1px solid var(--glass-line);
  background: rgba(250, 252, 253, 0.66);
  backdrop-filter: blur(16px);
}

.phone-top span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.phone-top strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.phone-top button {
  width: 58px;
  height: 32px;
}

.phone-section {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--glass-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.phone-section h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 14px;
}

.phone-section h2::before {
  content: "◇";
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf2ff;
  color: #2563eb;
  font-size: 13px;
}

.preference-section {
  padding: 0;
  border: 0;
  background: transparent;
}

.preference-section h2 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dce5ee;
  font-size: 15px;
  font-weight: 500;
}

.preference-section h2::before {
  content: "♡";
}

.pref-block {
  margin-bottom: 12px;
}

.combo-demo-card {
  padding: 10px;
  border: 1px solid rgba(124, 166, 199, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(236, 248, 255, 0.68), rgba(224, 246, 238, 0.42)),
    rgba(255, 255, 255, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 12px 24px rgba(33, 72, 102, 0.09);
}

.combo-current {
  margin: 8px 0;
  padding: 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(26, 117, 255, 0.14), rgba(37, 177, 137, 0.16));
  color: #0d4265;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.combo-demo-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.combo-demo-list span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(129, 169, 199, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: #244763;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.35;
}

.combo-demo-list b {
  display: block;
  color: #6a7f92;
  font-size: 10.5px;
  font-weight: 800;
}

.combo-demo-card .field-title::before {
  content: "🏷️";
}

.field-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.field-title::before {
  content: "🧭";
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  border-radius: 8px;
  background: rgba(117, 144, 172, 0.16);
  color: #385776;
  font-size: 12px;
}

.pref-block:nth-of-type(1) .field-title::before {
  content: "🧒";
}

.pref-block:nth-of-type(2) .field-title::before {
  content: "🗓️";
}

.pref-block:nth-of-type(3) .field-title::before {
  content: "🪪";
}

.pref-block:nth-of-type(4) .field-title::before {
  content: "🎒";
}

.pref-block:nth-of-type(5) .field-title::before {
  content: "🗺️";
}

.pref-block:nth-of-type(6) .field-title::before {
  content: "⚡";
}

.pref-block:nth-of-type(7) .field-title::before {
  content: "👥";
}

.pref-block:nth-of-type(8) .field-title::before {
  content: "⏱️";
}

.pref-block:nth-of-type(9) .field-title::before {
  content: "💳";
}

.compact-select {
  height: 36px;
  margin-top: 0;
  border-radius: 6px;
  font-size: 13.5px;
}

.tune-block {
  padding: 10px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.tune-block label {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 0;
  color: var(--ink);
}

.tune-block input[type="range"] {
  margin: 5px 0 8px;
}

.phone-actions {
  position: sticky;
  bottom: -12px;
  display: grid;
  gap: 8px;
  margin: 8px -12px -12px;
  padding: 12px;
  border-top: 1px solid #dce5ee;
  background: rgba(250, 252, 253, 0.96);
}

#check-qgis {
  display: none;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compact-grid label {
  margin: 0;
}

.hidden-config {
  display: none;
}

.panel section + section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

label {
  display: block;
  margin: 11px 0;
  color: var(--muted);
  font-size: 14px;
}

select {
  width: 100%;
  height: 38px;
  margin-top: 6px;
  padding: 0 10px;
  border: 1px solid rgba(163, 184, 207, 0.58);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font-size: 13.5px;
}

input[type="range"] {
  width: 100%;
  margin-top: 9px;
  accent-color: var(--blue);
}

.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
}

.field-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 13px 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.preference-section .field-title {
  margin: 0 0 8px;
  font-weight: 800;
}

.field-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.segmented,
.tab-set,
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.energy-slider-card {
  padding: 10px 12px 12px;
  border: 1px solid rgba(163, 184, 207, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.energy-slider-card input[type="range"] {
  width: 100%;
  margin: 4px 0 8px;
  accent-color: var(--blue);
}

.energy-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

.energy-scale span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.option-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chip,
.tab {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  border-color: #c6d1dd;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}

.preference-section .chip,
.preference-section .tab,
.preference-section .check-row {
  position: relative;
  overflow: hidden;
  min-height: 42px;
  justify-content: flex-start;
  margin: 0;
  padding: 0 10px 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.54), rgba(226, 237, 247, 0.32)),
    rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px) saturate(1.18);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 8px 18px rgba(37, 62, 87, 0.06);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.preference-section .chip::after,
.preference-section .tab::after,
.preference-section .check-row::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 4px;
  height: calc(100% - 14px);
  border-radius: 999px;
  background: rgba(95, 130, 156, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
  transition: width 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

.preference-section .chip::before,
.preference-section .tab::before,
.preference-section .check-row::before {
  content: "📍";
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: #3f5368;
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  z-index: 1;
}

.preference-section .chip > *,
.preference-section .tab > *,
.preference-section .check-row > * {
  position: relative;
  z-index: 1;
}

.preference-section .check-row input {
  display: none;
}

.preference-section .check-row:has(input:checked) {
  border-color: rgba(67, 121, 151, 0.5);
  color: #17384e;
  background:
    linear-gradient(135deg, rgba(238, 250, 255, 0.74), rgba(183, 218, 227, 0.38)),
    rgba(255, 255, 255, 0.34);
}

.preference-section .chip.active::before,
.preference-section .tab.active::before,
.preference-section .check-row:has(input:checked)::before {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: none;
}

.tab[data-value="历史文化"]::before {
  content: "🏛️";
}

.tab[data-value="自然风光"]::before {
  content: "⛰️";
}

.tab[data-value="休闲娱乐"]::before {
  content: "🎡";
}

.tab[data-value="美食文创"]::before {
  content: "🍜";
}

.tab[data-value="拍照打卡"]::before {
  content: "📷";
}

.tab[data-value="研学科普"]::before {
  content: "🔬";
}

.tab[data-value="康养放松"]::before {
  content: "🌿";
}

.tab[data-value="亲子互动"]::before {
  content: "🧸";
}

.tab[data-value="演艺活动"]::before {
  content: "🎭";
}

.tab[data-value="购物文创"]::before {
  content: "🛍️";
}

.tab[data-value="户外运动"]::before {
  content: "🥾";
}

.tab[data-value="夜游体验"]::before {
  content: "🌙";
}

.chip[data-value="轻松少走路"]::before,
.chip[data-value="正常游览"]::before,
.chip[data-value="稳步前进"]::before,
.chip[data-value="深度探索"]::before,
.chip[data-value="暴走达人"]::before {
  content: "⚡";
}

.chip[data-value="180"]::before,
.chip[data-value="360"]::before,
.chip[data-value="600"]::before,
.chip[data-value="960"]::before,
.chip[data-value="240"]::before {
  content: "🕒";
}

.chip[data-value="少花钱，多看景"]::before {
  content: "🪙";
}

.chip[data-value="偶尔尝鲜，适度消费"]::before {
  content: "🥢";
}

.chip[data-value="吃喝玩乐，均衡安排"]::before {
  content: "🧺";
}

.chip[data-value="品质体验，舒服优先"]::before {
  content: "☕";
}

.chip[data-value="预算充足，深度体验"]::before {
  content: "💎";
}

.chip[data-value="舒适型"]::before,
.chip[data-value="高档型"]::before,
.chip[data-value="豪华型"]::before {
  content: "🏡";
}

.chip[data-value="gate"]::before {
  content: "🚪";
}

.check-row:has(input[value="一个人"])::before {
  content: "🚶";
}

.check-row:has(input[value="情侣"])::before {
  content: "💞";
}

.check-row:has(input[value="亲子"])::before {
  content: "👨‍👩‍👧";
}

.check-row:has(input[value="老人"])::before {
  content: "🧓";
}

.check-row:has(input[value="朋友"])::before {
  content: "👫";
}

.check-row:has(input[value="团队"])::before {
  content: "🚌";
}

.check-row:has(input[value="无障碍"])::before {
  content: "♿";
}

.chip.active,
.tab.active {
  border-color: rgba(67, 121, 151, 0.5);
  color: #17384e;
  background:
    linear-gradient(135deg, rgba(238, 250, 255, 0.74), rgba(183, 218, 227, 0.38)),
    rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px rgba(27, 55, 78, 0.1);
}

.chip:disabled,
.tab:disabled,
.check-row:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.58;
}

#interest-tabs > * {
  background: rgba(120, 154, 185, 0.16);
}

#intensity-tabs > * {
  background: rgba(190, 148, 112, 0.16);
}

.tag-grid > * {
  background: rgba(143, 169, 132, 0.16);
}

#duration-choice-tabs > * {
  background: rgba(151, 137, 181, 0.16);
}

#budget-tabs > * {
  background: rgba(186, 132, 142, 0.15);
}

#lodging-tabs > * {
  background: rgba(121, 166, 158, 0.16);
}

#start-mode-tabs > * {
  background: rgba(112, 151, 185, 0.16);
}

.preference-section .option-grid > *.active,
.preference-section .option-grid > *:has(input:checked),
#start-mode-tabs > *.active {
  border-color: rgba(43, 91, 116, 0.46);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 6px 14px rgba(30, 54, 74, 0.08);
  filter: saturate(1.08);
}

.preference-section .option-grid > *.active::after,
.preference-section .option-grid > *:has(input:checked)::after,
#start-mode-tabs > *.active::after {
  width: calc(100% - 14px);
  background: linear-gradient(90deg, rgba(112, 174, 190, 0.26), rgba(255, 255, 255, 0.08));
}

.hint-box {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(238, 246, 255, 0.7), rgba(246, 251, 255, 0.42));
  backdrop-filter: blur(12px);
  color: var(--blue-deep);
  font-size: 12px;
  line-height: 1.5;
}

.actions {
  display: grid;
  gap: 10px;
}

button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.42));
  backdrop-filter: blur(12px);
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

button.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, rgba(26, 117, 255, 0.94), rgba(15, 85, 199, 0.9) 58%, rgba(10, 63, 149, 0.9));
  box-shadow: 0 14px 28px rgba(30, 103, 231, 0.28);
}

.map-shell {
  display: grid;
  grid-template-rows: 42px 1fr;
  position: relative;
  background: rgba(255, 255, 255, 0.5);
}

.activity-ticker {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 0 14px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  background: linear-gradient(90deg, rgba(255, 241, 198, 0.72), rgba(255, 248, 223, 0.48) 42%, rgba(234, 244, 255, 0.5));
  backdrop-filter: blur(14px);
  animation: ticker-glow 3.6s ease-in-out infinite;
}

.activity-ticker::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -30%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: skewX(-18deg);
  animation: ticker-sheen 5.2s linear infinite;
  pointer-events: none;
}

.status-strip {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(14px);
}

.status-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 0 20px;
  border-right: 1px solid rgba(155, 178, 204, 0.26);
}

.status-card:last-child {
  border-right: 0;
}

.status-card span {
  color: #738196;
  font-size: 12px;
}

.status-card strong {
  overflow: hidden;
  color: #152844;
  font-size: 17px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#recommendation-status {
  color: #0fad66;
}

.activity-ticker strong {
  z-index: 1;
  color: #8a4d00;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.ticker-window {
  z-index: 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-block;
  min-width: 100%;
  color: #2d3748;
  font-size: 13px;
  font-weight: 700;
  animation: ticker-scroll 26s linear infinite;
}

@keyframes ticker-glow {
  0%, 100% {
    box-shadow: inset 0 0 0 rgba(255, 191, 72, 0);
  }
  50% {
    box-shadow: inset 0 0 24px rgba(255, 191, 72, 0.24);
  }
}

@keyframes ticker-sheen {
  from {
    transform: translateX(0) skewX(-18deg);
  }
  to {
    transform: translateX(520%) skewX(-18deg);
  }
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  background: linear-gradient(90deg, rgba(245, 250, 255, 0.62), rgba(255, 255, 255, 0.38));
  backdrop-filter: blur(14px);
}

.map-toolbar strong {
  display: block;
  color: #173b5b;
  font-size: 15px;
  font-weight: 900;
}

.map-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.legend {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 999px;
}

.dot.boundary {
  background: var(--blue);
}

.dot.basemap {
  background: #b8c5b3;
}

.dot.road {
  background: #8b98a8;
}

.dot.scenic {
  background: var(--scenic);
}

.dot.dining {
  background: var(--dining);
}

.dot.service {
  background: var(--service);
}

.dot.cultural,
.legend-dot.cultural {
  background: #0f766e;
}

.dot.tourism-service,
.legend-dot.tourism-service {
  background: #0284c7;
}

.dot.parking,
.legend-dot.parking {
  background: #334155;
}

.dot.dining-lodging,
.legend-dot.dining-lodging {
  background: #f08a24;
}

.dot.leisure,
.legend-dot.leisure {
  background: #db2777;
}

.dot.park,
.legend-dot.park {
  background: #16a34a;
}

.dot.route {
  background: #0fbd73;
}

.dot.route-in {
  background: #0fbd73;
}

.dot.route-out {
  background: #9bd8a9;
}

.map-legend-corner {
  position: absolute;
  right: 12px;
  bottom: 18px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 4px 8px;
  max-width: 320px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 12px 24px rgba(31, 45, 68, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.64);
  font-size: 11px;
  backdrop-filter: blur(18px) saturate(1.18);
  touch-action: none;
  user-select: none;
  cursor: grab;
  transition:
    left 0.18s ease,
    right 0.18s ease,
    top 0.18s ease,
    bottom 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.map-legend-corner.dragging {
  cursor: grabbing;
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.2);
  transform: scale(1.01);
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}

.map-legend-corner input,
.map-legend-corner label,
.map-legend-corner span {
  user-select: none;
}

.map-legend-corner label,
.map-legend-corner span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 2px 4px;
  border-radius: 999px;
  color: #46566e;
  background: transparent;
}

.map-legend-corner input {
  width: 12px;
  height: 12px;
  margin: 0;
}

.legend-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 999px;
}

.map-legend-corner .legend-park-row {
  grid-column: 1 / -1;
}

.student-layer-panel {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 6;
  display: grid;
  gap: 8px;
  min-width: 156px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
  touch-action: none;
  user-select: none;
  cursor: grab;
  transition:
    left 0.18s ease,
    right 0.18s ease,
    top 0.18s ease,
    bottom 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.student-layer-head {
  display: grid;
  gap: 2px;
}

.student-layer-head strong {
  color: #173b5b;
  font-size: 13px;
  font-weight: 900;
}

.student-layer-head span {
  color: var(--muted);
  font-size: 11px;
}

.student-layer-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #24415e;
  font-size: 12px;
  cursor: pointer;
}

.student-layer-toggle input {
  margin: 0;
}

.student-layer-toggle span {
  flex: 1;
}

.student-layer-panel.dragging {
  cursor: grabbing;
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.2);
  transform: scale(1.01);
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}

.map-legend-corner span,
.map-legend-corner label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.map-legend-corner label {
  cursor: pointer;
}

.map-legend-corner input {
  margin: 0;
}

.legend-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.legend-dot.scenic {
  background: var(--scenic);
}

.legend-dot.dining {
  background: var(--dining);
}

.legend-dot.service {
  background: var(--service);
}

.legend-line {
  width: 18px;
  height: 3px;
  display: inline-block;
  border-radius: 999px;
}

.legend-line.route,
.legend-line.route-in {
  background: #0fbd73;
}

.legend-line.route-out {
  background: #9bd8a9;
}

.legend-line.boundary {
  background: var(--blue);
}

.legend-line.expressway {
  background: rgba(95, 126, 166, 0.3);
}

.legend-line.national-road {
  background: rgba(95, 126, 166, 0.3);
}

.legend-line.provincial-road {
  background: rgba(95, 126, 166, 0.3);
}

.legend-line.secondary-road,
.legend-line.tertiary-road,
.legend-line.other-road,
.legend-line.rural-road {
  background: rgba(95, 126, 166, 0.3);
}

.legend-line.road-network {
  background: rgba(95, 126, 166, 0.3);
}

#map {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(92, 124, 154, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(92, 124, 154, 0.1) 1px, transparent 1px),
    #eef6f0;
  background-size: 36px 36px;
}

.traveler-pulse {
  animation: traveler-pulse 1.6s ease-in-out infinite;
}

@keyframes traveler-pulse {
  0% {
    opacity: 0.45;
    transform: scale(0.78);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0.45;
    transform: scale(0.78);
  }
}

.map-error {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #8a2f2f;
  font-weight: 600;
  text-align: center;
}

.popup {
  position: absolute;
  min-width: 210px;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(16px) saturate(1.16);
  box-shadow: 0 16px 34px rgba(15, 35, 58, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  pointer-events: none;
  display: none;
  z-index: 10;
  font-size: 13px;
}

.popup strong {
  display: block;
  margin-bottom: 4px;
}

.route-interaction-bubble {
  position: absolute;
  width: min(320px, 72vw);
  padding: 13px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(232, 243, 255, 0.3)),
    rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 18px 40px rgba(15, 35, 58, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  pointer-events: none;
  opacity: 0;
  display: none;
  transform: translateY(16px) scale(0.96);
  z-index: 18;
  transition: opacity 0.22s ease, transform 0.24s ease;
}

.route-interaction-bubble.show {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: bubble-slide-in 0.42s cubic-bezier(0.2, 0.9, 0.22, 1.2);
}

.route-interaction-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 16px;
  height: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(244, 250, 255, 0.48);
  backdrop-filter: blur(18px);
  transform: translateX(-50%) rotate(45deg);
}

.route-floating-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  border-radius: 16px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  color: #fff;
  display: grid;
  gap: 8px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.route-floating-row {
  display: grid;
  grid-template-columns: 30px 34px 30px 38px 30px auto;
  gap: 7px;
  align-items: center;
}

.route-floating-row:first-child {
  grid-template-columns: 30px 34px 30px 38px 30px;
}

.route-floating-controls.snapping {
  transition: left 0.22s ease, top 0.22s ease;
}

.route-floating-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.route-floating-controls button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.route-floating-controls .route-floating-mode {
  width: auto;
  min-width: 48px;
  padding: 0 10px;
  font-size: 12px;
  letter-spacing: 0;
}

.route-floating-controls .route-floating-mode.active {
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(37, 99, 235, 0.42);
}

.route-floating-controls .route-floating-label {
  min-width: 34px;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.route-floating-controls strong {
  min-width: 38px;
  text-align: center;
  font-size: 13px;
}

.route-insight-stack {
  position: absolute;
  left: 22px;
  top: clamp(112px, 13vh, 168px);
  z-index: 45;
  width: min(360px, calc(100% - 48px));
  max-height: calc(100% - 136px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, 0.5) transparent;
}

.route-insight-stack.dragging {
  cursor: grabbing;
  transition: none;
}

.route-insight-stack.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
}

.route-insight-card {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  color: #0f172a;
  font-size: 13px;
  line-height: 1.5;
  animation: dock-card-in 0.36s ease both;
}

.route-insight-card-toggle {
  display: block;
  width: 100%;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.route-insight-card strong,
.route-insight-card p,
.route-insight-card span {
  display: block;
}

.route-insight-card strong {
  font-size: 14px;
}

.route-insight-card p {
  margin: 4px 0 0;
  color: #334155;
}

.route-insight-card-detail {
  display: none;
  margin-top: 8px;
  gap: 4px;
  color: #475569;
}

.route-insight-card.expanded .route-insight-card-detail {
  display: grid;
}

.route-poi-bubble {
  position: absolute;
  z-index: 46;
  width: min(390px, 76vw);
  min-width: 330px;
  max-width: none;
  padding: 0;
  border-radius: 26px;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  display: none;
  pointer-events: none;
  writing-mode: horizontal-tb;
  white-space: normal;
  word-break: break-word;
  transform: translateY(14px) scale(0.94);
  transition: opacity 0.22s ease, transform 0.24s ease;
}

.route-poi-bubble.show {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: bubble-slide-in 0.42s cubic-bezier(0.2, 0.9, 0.22, 1.2);
}

.route-poi-info-card {
  width: 100%;
  padding: 26px 28px 24px;
  border: 1px solid rgba(160, 220, 224, 0.82);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(247, 255, 252, 0.97), rgba(235, 249, 255, 0.93));
  backdrop-filter: blur(18px) saturate(1.12);
  box-shadow: 0 22px 46px rgba(15, 65, 88, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #17324d;
}

.route-poi-info-title {
  color: #0f4169;
  font-size: 29px;
  font-weight: 950;
  line-height: 1.15;
}

.route-poi-info-level {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid rgba(18, 171, 161, 0.42);
  border-radius: 8px;
  background: rgba(231, 255, 249, 0.78);
  color: #08796f;
  font-size: 16px;
  font-weight: 900;
}

.route-poi-info-level strong {
  min-width: 0;
  line-height: 1.35;
}

.route-poi-info-level span,
.route-poi-info-row span,
.route-poi-info-section-title span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: linear-gradient(145deg, #21c4b0, #0aa29b);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(10, 162, 155, 0.24);
}

.route-poi-info-section {
  margin-top: 16px;
}

.route-poi-info-section-title {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  color: #07847c;
  font-size: 18px;
  font-weight: 900;
}

.route-poi-info-section-title::after {
  content: "";
  height: 1px;
  border-top: 1px dashed rgba(25, 119, 148, 0.28);
}

.route-poi-info-section p {
  margin: 12px 0 0;
  color: #1e354c;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.9;
}

.route-poi-info-meta {
  display: grid;
  margin-top: 16px;
  border-top: 1px solid rgba(21, 119, 148, 0.18);
}

.route-poi-info-row {
  display: grid;
  grid-template-columns: auto auto 1fr minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid rgba(21, 119, 148, 0.14);
  color: #53657a;
  font-size: 14px;
}

.route-poi-info-row b {
  color: #0a8b83;
  font-size: 16px;
  font-weight: 900;
}

.route-poi-info-row em {
  min-width: 14px;
}

.route-poi-info-row strong {
  min-width: 0;
  color: #22384f;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: right;
}

.route-poi-bubble-ghost {
  position: fixed !important;
  z-index: 999;
  display: block !important;
  pointer-events: none;
  transition: transform 0.62s cubic-bezier(0.2, 0.86, 0.2, 1), opacity 0.62s ease;
}

@media (max-width: 640px) {
  .route-poi-bubble {
    width: min(350px, calc(100vw - 28px));
    min-width: 0;
  }

  .route-poi-info-card {
    padding: 20px;
  }

  .route-poi-info-title {
    font-size: 24px;
  }

  .route-poi-info-row {
    grid-template-columns: auto auto 1fr;
  }

  .route-poi-info-row em {
    display: none;
  }

  .route-poi-info-row strong {
    grid-column: 2 / -1;
    text-align: left;
  }
}

.route-interaction-dock {
  position: absolute;
  top: 112px;
  left: 16px;
  z-index: 14;
  width: 300px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.interaction-dock-card {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(230, 243, 255, 0.24));
  backdrop-filter: blur(18px) saturate(1.18);
  box-shadow: 0 14px 30px rgba(18, 42, 67, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.58);
  animation: dock-card-in 0.36s ease both;
}

.interaction-dock-card strong,
.interaction-dock-card span,
.interaction-dock-card small {
  display: block;
}

.interaction-dock-card strong {
  color: #173b5b;
  font-size: 13px;
  font-weight: 900;
}

.interaction-dock-card span {
  margin-top: 4px;
  color: #22384f;
  font-size: 12px;
  line-height: 1.45;
}

.interaction-dock-card small {
  margin-top: 5px;
  color: #62758a;
  font-size: 11px;
}

.interaction-fly-ghost {
  position: fixed !important;
  z-index: 999;
  display: block !important;
  pointer-events: none;
  transform-origin: top left;
  transition: transform 0.6s cubic-bezier(0.2, 0.84, 0.22, 1), opacity 0.6s ease;
}

.map-profile-panel {
  position: absolute;
  top: 112px;
  right: 22px;
  z-index: 13;
  width: 260px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(224, 241, 255, 0.26)),
    rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(20px) saturate(1.22);
  box-shadow: 0 20px 48px rgba(16, 39, 64, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.map-profile-head {
  display: grid;
  gap: 4px;
}

.map-profile-head span {
  color: #617284;
  font-size: 12px;
}

.map-profile-head strong {
  color: #173b5b;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.map-profile-panel svg {
  width: 100%;
  height: 156px;
  margin-top: 4px;
}

.map-profile-grid {
  fill: rgba(255, 255, 255, 0.28);
  stroke: rgba(23, 59, 91, 0.22);
  stroke-width: 1.4;
}

.map-profile-shape {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(26, 117, 255, 0.72);
  stroke-width: 2;
}

.map-profile-segment {
  opacity: 0.52;
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 0.7;
}

.map-profile-panel circle {
  fill: #ffffff;
  stroke-width: 1.4;
}

.map-profile-panel text {
  fill: #244763;
  font-size: 10px;
  font-weight: 800;
}

.map-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-profile-tags i {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: #255071;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

@keyframes dock-card-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.interaction-node {
  color: #173b5b;
  font-size: 14px;
  font-weight: 900;
}

.interaction-feedback {
  margin-top: 6px;
  color: #22384f;
  font-size: 13px;
  line-height: 1.55;
}

.interaction-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: #5f7185;
  font-size: 11px;
}

.interaction-meta b,
.interaction-meta span {
  font-weight: 800;
}

@keyframes bubble-slide-in {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.93);
  }
  68% {
    opacity: 1;
    transform: translateY(-3px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(248, 251, 253, 0.66), rgba(238, 245, 249, 0.38));
  backdrop-filter: blur(12px);
}

.metric strong {
  display: block;
  font-size: 18px;
  color: var(--blue);
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.result-box {
  white-space: pre-wrap;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.66), rgba(244, 248, 251, 0.42));
  backdrop-filter: blur(12px);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

.route-playback {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.route-playback button {
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  cursor: pointer;
}

.route-playback button:first-child {
  background: linear-gradient(135deg, #1a75ff, #0f62d6 58%, #0b4aa2);
  color: #fff;
  border-color: rgba(26, 117, 255, 0.42);
  box-shadow: 0 10px 18px rgba(26, 117, 255, 0.22);
}

#route-pause {
  display: none;
}

.playback-speed {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.playback-speed input {
  margin: 0;
  accent-color: #1a75ff;
}

.playback-speed b {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.playback-meter {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: #dfe8ee;
  overflow: hidden;
}

.playback-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #1a75ff, #2aa7ff);
}

#route-playback-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.right-panel {
  position: relative;
  background: linear-gradient(135deg, rgba(245, 250, 255, 0.58), rgba(229, 243, 246, 0.32));
  backdrop-filter: blur(18px) saturate(1.1);
}

.right-panel section {
  position: relative;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(14px) saturate(1.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 26px rgba(26, 48, 72, 0.08);
}

.panel-resize-handle,
.card-resize-handle {
  position: absolute;
  z-index: 8;
  border-radius: 999px;
  background: rgba(86, 87, 255, 0.42);
  transition: background 0.15s ease;
}

.panel-resize-handle:hover,
.card-resize-handle:hover {
  background: rgba(86, 87, 255, 0.82);
}

.panel-resize-handle {
  left: -8px;
  top: 16px;
  bottom: 16px;
  width: 8px;
  cursor: ew-resize;
}

.card-resize-handle {
  right: 8px;
  bottom: 8px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
}

.card-resize-handle::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid rgba(255, 255, 255, 0.95);
}

.resizing-active {
  user-select: none;
  cursor: ew-resize;
}

.agent-interaction-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - 112px);
  min-height: calc(100vh - 112px);
  padding: 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.xiaobei-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 14px 0;
  border-radius: 22px 22px 0 0;
  background: #fff;
}

.xiaobei-location-chip,
.xiaobei-weather-chip {
  min-width: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  color: #1f2d4d;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.xiaobei-location-chip {
  cursor: pointer;
}

.xiaobei-location-chip strong,
.xiaobei-weather-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.xiaobei-location-chip span {
  color: #1e3a8a;
  font-size: 15px;
}

.xiaobei-weather-chip span {
  color: #ffb45c;
  font-size: 19px;
  line-height: 1;
}

.xiaobei-location-chip i,
.xiaobei-weather-chip i {
  color: #1f2d4d;
  font-style: normal;
  font-size: 12px;
}
.agent-interaction-head,
.xiaobei-assistant-top {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 14px;
  justify-items: stretch;
  align-items: center;
  margin-bottom: 0;
  padding: 22px 16px 8px;
  border-radius: 22px 22px 0 0;
  background: #fff;
}

.xiaobei-avatar-stage {
  position: relative;
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
}

.xiaobei-avatar-stage img {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: block;
  object-fit: cover;
  object-position: center 28%;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #f2efff;
  box-shadow: 0 16px 30px rgba(41, 45, 68, 0.16);
}

.xiaobei-sound-ring {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: repeating-conic-gradient(from -8deg, rgba(147, 151, 164, 0.65) 0deg 2deg, transparent 2deg 5deg);
  mask: radial-gradient(circle, transparent 0 48px, #000 49px 56px, transparent 57px);
  animation: xiaobeiRingRotate 18s linear infinite;
}

.xiaobei-sound-ring::before,
.xiaobei-sound-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.xiaobei-sound-ring::before {
  inset: -3px;
  opacity: 0;
  background:
    repeating-conic-gradient(from 0deg, rgba(105, 92, 255, 0.92) 0deg 5deg, transparent 5deg 12deg),
    repeating-conic-gradient(from 90deg, rgba(72, 166, 255, 0.65) 0deg 3deg, transparent 3deg 10deg);
  mask: radial-gradient(circle, transparent 0 58px, #000 59px 64px, transparent 65px);
  animation: xiaobeiVoiceRing 4.8s linear infinite;
}

.xiaobei-sound-ring::after {
  inset: -6px;
  background: repeating-conic-gradient(from 24deg, rgba(147, 151, 164, 0.35) 0deg 1deg, transparent 1deg 8deg);
  mask: radial-gradient(circle, transparent 0 62px, #000 63px 68px, transparent 69px);
  animation: xiaobeiRingRotateReverse 24s linear infinite;
}

.xiaobei-avatar-stage[data-state="listening"] .xiaobei-sound-ring,
.xiaobei-avatar-stage[data-state="speaking"] .xiaobei-sound-ring,
.xiaobei-avatar-stage[data-state="thinking"] .xiaobei-sound-ring {
  background: repeating-conic-gradient(from -8deg, rgba(86, 87, 255, 0.78) 0deg 3deg, transparent 3deg 7deg);
  animation-duration: 10s;
}

.xiaobei-avatar-stage[data-state="speaking"] .xiaobei-sound-ring::before {
  opacity: 1;
}

.xiaobei-avatar-stage[data-state="speaking"] .xiaobei-sound-ring::after {
  background:
    repeating-conic-gradient(from 24deg, rgba(124, 92, 255, 0.55) 0deg 2deg, transparent 2deg 8deg),
    repeating-conic-gradient(from 60deg, rgba(72, 166, 255, 0.38) 0deg 2deg, transparent 2deg 12deg);
  animation-duration: 8s;
}

.xiaobei-state-bubble {
  position: absolute;
  z-index: 3;
  right: -22px;
  top: 72px;
  min-width: 88px;
  max-width: 152px;
  padding: 7px 9px 6px;
  border-radius: 16px;
  color: #6567ff;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(60, 65, 90, 0.15);
  transform-origin: 18px 100%;
  animation: xiaobeiBubblePop 0.34s ease;
}

.xiaobei-state-bubble.pop {
  animation: xiaobeiBubblePop 0.34s ease;
}

.state-dots {
  display: flex;
  gap: 4px;
  margin-bottom: 3px;
}

.state-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6567ff;
  animation: xiaobeiDotPulse 1.15s ease-in-out infinite;
}

.state-dots i:nth-child(2) {
  animation-delay: 0.16s;
}

.state-dots i:nth-child(3) {
  animation-delay: 0.32s;
}

.xiaobei-state-bubble strong {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
  white-space: normal;
}

.xiaobei-hero-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.xiaobei-hero-copy > span {
  color: #6567ff;
  font-size: 12px;
  font-weight: 900;
}

.xiaobei-hero-copy h2 {
  margin: 0;
  color: #1f2d4d;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.15;
}

.xiaobei-hero-copy p {
  margin: 0;
  color: #65728a;
  font-size: 13px;
  line-height: 1.55;
}

.xiaobei-mode-pill {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #2563eb;
  background: rgba(232, 239, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.xiaobei-title-block h2 {
  margin: 0;
  color: #202a44;
  font-size: 24px;
  font-weight: 900;
}

.xiaobei-title-block p {
  margin: 8px 0 0;
  color: #5b6b86;
  font-size: 14px;
  font-weight: 700;
}

.xiaobei-intro-block {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(222, 228, 244, 0.8);
}

.xiaobei-intro-block strong {
  color: #162231;
  font-size: 16px;
  font-weight: 900;
}

.xiaobei-intro-block span {
  color: #506078;
  font-size: 14px;
  line-height: 1.75;
}


.xiaobei-scroll-section {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0;
  padding: 18px 12px 24px;
  border: 1px solid rgba(232, 224, 255, 0.8);
  border-radius: 22px;
  background:
    radial-gradient(circle at 16% 10%, rgba(199, 184, 255, 0.20), transparent 34%),
    linear-gradient(180deg, #f7f4ff 0%, #fbfaff 46%, #f2efff 100%);
  box-shadow: 0 16px 34px rgba(108, 99, 255, 0.12);
}

.xiaobei-scroll-section::-webkit-scrollbar {
  width: 8px;
}

.xiaobei-scroll-section::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.72);
}
.agent-gis-summary {
  display: none;
}

.agent-quick-prompts {
  display: grid;
  gap: 8px;
  margin-top: 0;
  padding-top: 0;
}

.agent-quick-prompts h3,
.xiaobei-capability-strip h3,
.xiaobei-input-title strong {
  margin: 0;
  color: #202a44;
  font-size: 15px;
  font-weight: 900;
}

.quick-demand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.agent-quick-prompts button {
  width: 100%;
  min-height: 34px;
  padding: 7px 7px;
  border: 0;
  border-radius: 14px;
  color: #34425d;
  background: #f0f3fb;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.xiaobei-primary-functions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.xiaobei-primary-functions button {
  min-height: 76px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  padding: 10px 10px;
  border: 1px solid rgba(232, 234, 246, 0.92);
  border-radius: 18px;
  color: #1f2d4d;
  background:
    radial-gradient(circle at 12% 10%, rgba(108, 99, 255, 0.11), transparent 36%),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 30px rgba(69, 84, 135, 0.1);
  text-align: left;
  cursor: pointer;
}

.xiaobei-primary-functions i {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.14), rgba(93, 215, 200, 0.18));
  font-style: normal;
  font-size: 15px;
}

.xiaobei-primary-functions strong {
  font-size: 13px;
  font-weight: 950;
}

.xiaobei-primary-functions span {
  color: #7b849a;
  font-size: 11px;
  line-height: 1.3;
}

.xiaobei-benefit-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 255, 255, 0.35), transparent 26%),
    linear-gradient(135deg, #6c63ff, #5dd7c8);
  box-shadow: 0 18px 34px rgba(108, 99, 255, 0.22);
}

.xiaobei-benefit-card span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #eef2ff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 900;
}

.xiaobei-benefit-card strong {
  display: block;
  font-size: 16px;
  font-weight: 950;
}

.xiaobei-benefit-card p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
}

.xiaobei-benefit-card button {
  min-width: 78px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  color: #5657ff;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 950;
  cursor: pointer;
}

.location-service-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(222, 228, 244, 0.8);
}

.location-service-card strong {
  display: block;
  color: #4146d9;
  font-size: 14px;
}

.location-service-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.location-service-card button {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #f0ecff;
  color: #5657ff;
  font-weight: 800;
  cursor: pointer;
}

.xiaobei-input-title {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.xiaobei-input-title span {
  color: #64748b;
  font-size: 13px;
}

.xiaobei-capability-strip {
  display: grid;
  gap: 14px;
}

.xiaobei-capability-strip > div {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.xiaobei-capability-strip span {
  display: grid;
  gap: 7px;
  justify-items: center;
  color: #34425d;
  font-size: 12px;
  font-weight: 800;
}

.xiaobei-capability-strip i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #f0f3fb;
  color: #5657ff;
  font-style: normal;
  font-size: 19px;
}

.xiaobei-disclaimer {
  padding-top: 14px;
  border-top: 1px solid rgba(222, 228, 244, 0.88);
  color: #8a96aa;
  font-size: 12px;
  text-align: center;
}

@keyframes xiaobeiRingRotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes xiaobeiRingRotateReverse {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes xiaobeiVoiceRing {
  0% {
    transform: rotate(0deg) scale(0.98);
    filter: drop-shadow(0 0 0 rgba(105, 92, 255, 0));
  }

  50% {
    transform: rotate(180deg) scale(1.03);
    filter: drop-shadow(0 0 10px rgba(105, 92, 255, 0.42));
  }

  100% {
    transform: rotate(360deg) scale(0.98);
    filter: drop-shadow(0 0 0 rgba(105, 92, 255, 0));
  }
}

@keyframes xiaobeiDotPulse {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.55;
  }

  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes xiaobeiBubblePop {
  0% {
    transform: translateY(8px) scale(0.86);
    opacity: 0;
  }

  68% {
    transform: translateY(-2px) scale(1.04);
    opacity: 1;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.right-panel .section-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #173b5b;
  font-size: 16px;
  font-weight: 900;
}

.right-panel .section-head h2::before {
  content: "🧭";
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(19, 95, 214, 0.12);
  font-size: 15px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
}

.section-head button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  color: #285c91;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.46);
}

.route-cards {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.route-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(248, 251, 255, 0.38));
  backdrop-filter: blur(14px) saturate(1.08);
  box-shadow: 0 12px 24px rgba(31, 49, 77, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

button.route-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.route-option-card:hover {
  border-color: rgba(19, 95, 214, 0.45);
  box-shadow: 0 12px 24px rgba(31, 49, 77, 0.09);
}

.route-card.active {
  border-color: rgba(239, 68, 68, 0.48);
  background: linear-gradient(180deg, rgba(255, 250, 250, 0.72), rgba(255, 245, 245, 0.42));
}

.route-card.secondary {
  border-color: rgba(16, 185, 129, 0.26);
}

.route-card.empty {
  grid-template-columns: 1fr;
}

.route-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.route-card span,
.route-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.route-score {
  min-width: 56px;
  text-align: right;
}

.route-score strong {
  color: #ef4444;
  font-size: 26px;
}

.route-card-actions {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.route-card-actions button {
  min-width: 74px;
  padding: 6px 9px;
  border: 1px solid rgba(15, 96, 198, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #285c91;
  font-size: 12px;
  cursor: pointer;
}

.route-card-actions button.primary {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.route-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.route-tags i {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(238, 244, 255, 0.62);
  color: #285c91;
  font-style: normal;
  font-size: 11px;
}

.route-adjustment-panel,
.corridor-poi-panel {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.route-adjustment-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: #1f3f63;
  font-size: 12px;
}

.route-adjustment-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.route-adjustment-buttons button,
.corridor-action {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(45, 104, 178, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #24527f;
  font-size: 12px;
}

.route-adjustment-buttons button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.corridor-poi-list {
  display: grid;
  gap: 8px;
}

.corridor-poi-card {
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.72);
}

.corridor-poi-card strong,
.corridor-poi-card span,
.corridor-poi-card small {
  display: block;
  line-height: 1.55;
}

.corridor-poi-card span,
.corridor-poi-card small {
  color: var(--muted);
  font-size: 12px;
}

.corridor-poi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.route-detail-box {
  max-height: 210px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 10px;
  background: rgba(251, 253, 255, 0.48);
  backdrop-filter: blur(12px);
  font-size: 12px;
  line-height: 1.65;
}

.route-detail-step {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 7px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.route-detail-step:last-child {
  border-bottom: 0;
}

.route-detail-step b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
}

.route-detail-step span {
  color: var(--ink);
}

.route-detail-step small {
  color: var(--muted);
  white-space: nowrap;
}

.route-detail-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.route-detail-section > b {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.route-detail-section p {
  margin: 5px 0;
  color: #334155;
}

.route-detail-section small {
  color: var(--muted);
}

.alternative-plan-list {
  display: grid;
  gap: 8px;
}

.alternative-plan-card {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.alternative-plan-card strong,
.alternative-plan-card span,
.alternative-plan-card small {
  display: block;
}

.alternative-plan-card button {
  justify-self: start;
  padding: 5px 9px;
  border: 1px solid rgba(15, 96, 198, 0.22);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 12px;
  cursor: pointer;
}

.compact-result {
  max-height: 190px;
  overflow-y: auto;
  font-size: 12px;
}

.crowd-icons {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  vertical-align: -2px;
  max-height: 18px;
  margin-right: 4px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.limit-text {
  margin-left: 4px;
  color: var(--red);
  font-weight: 700;
}

.admin-workspace {
  height: calc(100vh - 78px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(rgba(39, 95, 137, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 125, 92, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
}

#xiaobei-page {
  height: calc(100vh - 78px);
  gap: 12px;
  overflow-y: auto;
  padding-bottom: 28px;
}

#xiaobei-page.page-view:not(.active) {
  display: none;
}

#xiaobei-page.page-view.active {
  display: block;
}

#xiaobei-page > section + section {
  margin-top: 12px;
}

.knowledge-workspace {
  grid-template-rows: minmax(0, 1fr);
}

.knowledge-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.knowledge-frame-card {
  display: block;
  min-height: 0;
  height: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-card);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(239, 248, 255, 0.48)),
    rgba(255, 255, 255, 0.58);
  box-shadow: 0 20px 46px rgba(25, 54, 82, 0.13);
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(1.22);
}

.knowledge-iframe {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 104px);
  border: 0;
  border-radius: 18px;
  background: #ffffff;
}

.admin-header,
.admin-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(239, 248, 255, 0.5)),
    rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-card);
  box-shadow: 0 20px 46px rgba(25, 54, 82, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px) saturate(1.22);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(39, 95, 137, 0.12), rgba(47, 125, 92, 0.08)),
    rgba(255, 255, 255, 0.62);
}

.admin-header h2,
.admin-card h3 {
  margin: 0;
  font-size: 16px;
}

.admin-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.agent-eval-header > div:first-child {
  flex: 1 1 360px;
  min-width: 300px;
}

.agent-export-actions {
  flex: 0 1 720px;
  justify-content: flex-start;
  margin-right: 34px;
}

.agent-export-actions button {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.agent-export-actions #export-agent-evaluation {
  min-width: 176px;
}

.xiaobei-config-hero {
  min-height: 118px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 20px 24px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 26px;
  background:
    radial-gradient(circle at 86% 18%, rgba(13, 148, 136, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.92));
  box-shadow: 0 24px 55px rgba(15, 73, 91, 0.12);
}

.xiaobei-config-hero span,
.config-card-head span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.xiaobei-config-hero h2 {
  margin: 6px 0;
  color: #0f2f3c;
  font-size: clamp(26px, 2.4vw, 38px);
  letter-spacing: -0.05em;
}

.xiaobei-config-hero p {
  max-width: 760px;
  margin: 0;
  color: #496677;
  line-height: 1.8;
}

.xiaobei-config-avatar {
  flex: 0 0 140px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82), 0 18px 38px rgba(12, 79, 91, 0.12);
}

.xiaobei-config-avatar img {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  object-fit: cover;
}

.xiaobei-config-avatar strong {
  color: #0f766e;
}

.xiaobei-config-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.xiaobei-config-section-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(25, 54, 82, 0.08);
}

.xiaobei-config-section-head span {
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
}

.xiaobei-config-section-head h3 {
  margin: 3px 0 0;
  color: #173b5b;
  font-size: 18px;
}

.xiaobei-config-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  border-color: rgba(13, 148, 136, 0.16);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.78)),
    rgba(255, 255, 255, 0.9);
}

.main-config-card {
  border-color: rgba(37, 99, 235, 0.18);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.84)),
    rgba(255, 255, 255, 0.9);
}

.prompt-config-card {
  grid-column: 1 / -1;
  min-height: 300px;
}

.config-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.config-card-head h3 {
  margin: 4px 0 0;
  color: #123b5d;
  font-size: 17px;
}

.config-card-head p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.xiaobei-config-card label {
  display: grid;
  gap: 6px;
  color: #29435b;
  font-size: 13px;
  font-weight: 700;
}

.xiaobei-config-card input,
.xiaobei-config-card select,
.xiaobei-config-card textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
}

.xiaobei-config-card input,
.xiaobei-config-card select {
  min-height: 42px;
  padding: 0 12px;
}

.xiaobei-config-card textarea {
  min-height: 170px;
  padding: 14px;
  line-height: 1.7;
  resize: vertical;
}

.agent-config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.agent-config-actions button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 10px;
  background: rgba(236, 253, 245, 0.84);
  color: #0f766e;
  font-weight: 900;
  cursor: pointer;
}

.agent-config-actions button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: #fff;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.18);
}

.config-link-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: 10px;
  background: rgba(236, 253, 245, 0.86);
  color: #0f766e;
  font-weight: 800;
  text-decoration: none;
}

.model-manager-panel,
.role-manager-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 360px;
  max-height: 44vh;
  padding: 14px;
  border: 1px solid rgba(139, 92, 246, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(245, 243, 255, 0.82), rgba(255, 255, 255, 0.94)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(65, 56, 112, 0.1);
}

.role-manager-panel {
  min-height: auto;
  max-height: none;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.88), rgba(255, 255, 255, 0.94)),
    rgba(255, 255, 255, 0.92);
}

.model-manager-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.model-manager-head span {
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.digital-twin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  grid-auto-rows: minmax(220px, auto);
  gap: 14px;
  min-height: 0;
}

.digital-twin-header {
  border-color: rgba(14, 116, 144, 0.18);
}

.twin-profile-card,
.twin-stage-card,
.twin-agent-card,
.twin-llm-card,
.twin-roadbook-card,
.twin-feedback-card {
  min-height: 0;
  overflow: hidden;
}

.twin-roadbook-card {
  grid-column: span 2;
}

.twin-feedback-card {
  grid-column: span 2;
}

.twin-agent-json {
  max-height: 240px;
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.twin-llm-card {
  display: grid;
  gap: 9px;
}

.twin-llm-card label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.twin-llm-card input {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
}

.twin-llm-card button {
  min-height: 34px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.86);
  color: #1d4ed8;
  font-weight: 900;
  cursor: pointer;
}

.twin-llm-status {
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}

.twin-profile,
.twin-meter-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.twin-profile-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  color: #173b5b;
  font-size: 13px;
}

.twin-profile-item span {
  color: var(--muted);
  font-weight: 800;
}

.twin-meter {
  display: grid;
  grid-template-columns: 76px 1fr 38px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: rgba(239, 246, 255, 0.68);
  color: #173b5b;
  font-size: 13px;
  font-weight: 800;
}

.twin-meter b {
  height: 9px;
  max-width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #0f766e);
}

.twin-meter em {
  color: #0f766e;
  font-style: normal;
  text-align: right;
}

.twin-roadbook-list {
  display: grid;
  gap: 9px;
}

.twin-roadbook-step {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.36);
  color: #173b5b;
  font-size: 13px;
  line-height: 1.55;
}

.twin-roadbook-step:last-child {
  border-bottom: 0;
}

.twin-roadbook-step span {
  color: #2563eb;
  font-weight: 900;
}

.model-manager-head h3 {
  margin: 5px 0;
  color: #182b4d;
  font-size: 20px;
}

.model-manager-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.model-manager-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.model-manager-actions button,
.model-manager-table button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 8px;
  background: rgba(238, 242, 255, 0.86);
  color: #3730a3;
  font-weight: 800;
  cursor: pointer;
}

.model-manager-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 0;
}

.model-manager-nav {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 100%;
  overflow: auto;
}

.model-manager-nav button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #56677a;
  font-weight: 800;
  cursor: pointer;
}

.model-manager-nav button.active {
  background: linear-gradient(135deg, #4f7cff, #7c3aed);
  color: #fff;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.22);
}

.model-manager-table-wrap {
  min-width: 0;
  height: 100%;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: #fff;
}

.model-manager-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  font-size: 12px;
}

.model-manager-table th,
.model-manager-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  text-align: center;
  white-space: nowrap;
}

.model-manager-table th {
  color: #26374c;
  background: rgba(248, 250, 252, 0.92);
  font-weight: 900;
}

.model-manager-table input:not([type="checkbox"]) {
  width: 100%;
  min-width: 120px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.78);
}

.switch-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-row span {
  width: 38px;
  height: 20px;
  position: relative;
  border-radius: 999px;
  background: #cbd5e1;
  transition: 0.2s ease;
}

.switch-row span::after {
  content: "";
  width: 14px;
  height: 14px;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  transition: 0.2s ease;
}

.switch-row input:checked + span {
  background: #4f7cff;
}

.switch-row input:checked + span::after {
  transform: translateX(18px);
}

.role-config-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 1fr);
  gap: 16px;
}

.role-config-left,
.role-config-right {
  display: grid;
  gap: 12px;
}

.role-config-right {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-config-grid label {
  display: grid;
  gap: 6px;
  color: #26374c;
  font-size: 13px;
  font-weight: 800;
}

.role-config-grid input,
.role-config-grid select,
.role-config-grid textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
}

.role-config-grid textarea {
  min-height: 110px;
  padding: 10px;
  line-height: 1.6;
  resize: vertical;
}

.role-template-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.role-template-row button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #e8eeff;
  color: #4f46e5;
  font-weight: 800;
  cursor: pointer;
}

.xiaobei-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(6px);
}

.xiaobei-modal.open {
  display: grid;
}

.xiaobei-modal-card {
  width: min(1440px, 96vw);
  max-height: 92vh;
  position: relative;
  display: grid;
  gap: 18px;
  overflow: auto;
  padding: 34px 42px 28px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid #d6dce6;
  border-radius: 50%;
  background: #fff;
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-title-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 18px;
}

.modal-title-row h2 {
  margin: 0;
  text-align: center;
  color: #25345d;
  font-size: 28px;
  font-weight: 500;
}

.modal-switch {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #4b5563;
}

.xiaobei-modal-card section h3 {
  margin: 0 0 12px;
  color: #25345d;
  font-size: 20px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 10px;
}

.model-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px 28px;
}

.model-edit-grid label {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: #34405c;
}

.model-edit-grid label.wide {
  grid-column: 1 / -1;
}

.model-edit-grid input,
.model-edit-grid textarea,
.param-add-row input {
  width: 100%;
  min-height: 30px;
  border: 1px solid #d1d7e2;
  border-radius: 4px;
  padding: 0 12px;
  color: #374151;
  font: inherit;
}

.model-edit-grid textarea {
  min-height: 82px;
  padding: 8px 12px;
  line-height: 1.5;
}

.params-grid label span {
  text-align: right;
}

.param-add-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

.param-add-row button,
.modal-actions button {
  min-height: 36px;
  padding: 0 28px;
  border: 1px solid #a8c7ff;
  border-radius: 4px;
  background: #e8f1ff;
  color: #1677ff;
  font-weight: 800;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 10px;
}

.modal-actions .primary {
  min-width: 140px;
  background: #e8f1ff;
  color: #1677ff;
}

.agent-key-field {
  min-width: 260px;
  display: grid;
  gap: 4px;
  margin: 0;
}

.agent-key-field span {
  color: var(--muted);
  font-size: 11px;
}

.agent-key-field input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.agent-key-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.agent-key-row button {
  height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.admin-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.route-settings-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.companion-checks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.companion-checks label,
.route-settings-row .check-row {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.verify-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.agent-eval-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(500px, 0.9fr) minmax(560px, 1fr) minmax(560px, 1fr);
  grid-template-rows: minmax(340px, 0.45fr) minmax(420px, 0.55fr);
  gap: 14px;
}

.agent-settings {
  grid-column: 1;
  grid-row: 1 / 3;
  position: sticky;
  top: 0;
  display: block;
  overflow-y: auto;
}

.agent-algorithm-card {
  display: none !important;
}

.agent-score-panel {
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  border-color: rgba(26, 117, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(26, 117, 255, 0.1), rgba(22, 185, 129, 0.08)),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(22, 57, 86, 0.14);
}

.agent-score-panel h3 {
  font-size: 18px;
  color: #123b5d;
}

.agent-chat-panel {
  grid-column: 2;
  grid-row: 2;
}

.agent-timeline-panel {
  grid-column: 3;
  grid-row: 1 / 3;
}

.agent-persona-panel {
  grid-column: 4;
  grid-row: 1 / 3;
}

.agent-settings h4 {
  margin: 16px 0 8px;
  font-size: 13px;
}

.agent-route-box {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(39, 95, 137, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(232, 244, 255, 0.82), rgba(255, 255, 255, 0.48)),
    rgba(255, 255, 255, 0.46);
  color: #1f3d66;
  font-size: 12px;
  line-height: 1.5;
}

.agent-route-box span {
  color: var(--ink);
}

.agent-route-options {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(152, 180, 208, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--muted);
  font-size: 12px;
}

.agent-route-options:empty {
  display: none;
}

.agent-route-options button {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid rgba(152, 180, 208, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.agent-route-options button.active {
  border-color: rgba(27, 112, 211, 0.58);
  background: linear-gradient(135deg, rgba(231, 243, 255, 0.88), rgba(235, 255, 248, 0.66));
  box-shadow: 0 10px 22px rgba(21, 92, 143, 0.12), inset 3px 0 0 rgba(27, 112, 211, 0.76);
}

.agent-route-options span {
  color: var(--muted);
  font-size: 12px;
}

.agent-count-control {
  display: grid;
  gap: 8px;
}

.agent-count-control span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.agent-count-control strong {
  color: var(--blue);
}

.agent-config-preview,
.algorithm-config-box {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(16, 169, 122, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fffb, #eefbf6);
  color: #173b32;
  font-size: 12px;
  line-height: 1.6;
}

.agent-config-preview {
  display: none !important;
}

.algorithm-config-box {
  max-height: none;
  overflow-y: auto;
}

.config-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.config-chip {
  padding: 8px;
  border: 1px solid rgba(184, 219, 224, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.config-chip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.config-chip strong {
  display: block;
  margin-top: 3px;
  color: #10543f;
  font-size: 14px;
}

.config-list {
  margin: 0;
  padding-left: 18px;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.persona-grid label {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid rgba(176, 196, 214, 0.62);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.agent-score-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}

.agent-score-card {
  min-height: 78px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(185, 211, 230, 0.64);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(232, 244, 255, 0.48)),
    rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.agent-score-card:first-child {
  border-color: rgba(27, 112, 211, 0.28);
  background: linear-gradient(180deg, rgba(231, 243, 255, 0.84), rgba(255, 255, 255, 0.58));
}

.agent-score-card span,
.agent-score-card small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.agent-score-card small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.agent-score-card strong {
  color: var(--blue);
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.agent-score-card:first-child strong {
  color: #0f6ec8;
  font-size: 22px;
  line-height: 1.18;
}

.agent-bars {
  min-height: 0;
  display: grid;
  gap: 7px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid rgba(176, 209, 228, 0.56);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.38);
  align-content: start;
}

.agent-bar-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.agent-bar-row.dimension-row {
  grid-template-columns: 90px minmax(0, 1fr) 40px;
}

.agent-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(212, 226, 238, 0.82);
}

.agent-bar i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f6ec8, #12a986);
  box-shadow: 0 0 12px rgba(18, 169, 134, 0.28);
}

.agent-chat-log {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  display: grid;
  gap: 12px;
  padding-right: 4px;
}

.chat-line {
  padding: 14px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(235, 246, 255, 0.48)),
    rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(196, 219, 235, 0.68);
  box-shadow: 0 10px 26px rgba(29, 76, 115, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.chat-line b {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 12px;
}

.chat-line p {
  margin: 0;
  line-height: 1.55;
  font-size: 13px;
}

.live-step.risk-高 {
  border-color: rgba(220, 64, 83, 0.38);
  background: linear-gradient(135deg, rgba(255, 245, 245, 0.78), rgba(255, 255, 255, 0.52));
}

.live-step.risk-中 {
  border-color: rgba(221, 161, 48, 0.4);
  background: linear-gradient(135deg, rgba(255, 250, 235, 0.78), rgba(255, 255, 255, 0.52));
}

.live-samples {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.live-samples span {
  padding: 7px 9px;
  border-radius: 6px;
  background: rgba(239, 247, 255, 0.74);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.45;
}

.agent-persona-result {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-right: 4px;
}

.agent-timeline-result {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  display: grid;
  gap: 12px;
  padding-right: 4px;
}

.agent-timeline-panel .agent-timeline-result {
  height: 100%;
  align-content: start;
}

.agent-data-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.agent-data-summary span {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(235, 246, 255, 0.82), rgba(239, 255, 249, 0.62)),
    rgba(255, 255, 255, 0.48);
  color: var(--muted);
  font-size: 12px;
  border: 1px solid rgba(190, 216, 232, 0.58);
}

.agent-data-summary strong {
  color: var(--blue);
  font-size: 18px;
}

.timeline-list {
  display: grid;
  gap: 10px;
}

.timeline-card {
  padding: 14px;
  border: 1px solid rgba(194, 216, 233, 0.68);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(239, 248, 255, 0.44)),
    rgba(255, 255, 255, 0.48);
  box-shadow: 0 10px 24px rgba(33, 75, 109, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  content-visibility: auto;
  contain-intrinsic-size: 170px;
}

.timeline-card.risk-高 {
  border-color: rgba(220, 64, 83, 0.38);
  background: linear-gradient(135deg, rgba(255, 246, 246, 0.78), rgba(255, 255, 255, 0.5));
}

.timeline-card.risk-中 {
  border-color: rgba(221, 161, 48, 0.4);
  background: linear-gradient(135deg, rgba(255, 251, 240, 0.78), rgba(255, 255, 255, 0.5));
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.timeline-head span {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.timeline-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.timeline-metrics span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf2f7;
  color: var(--muted);
  font-size: 12px;
}

.timeline-card p {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

.llm-tick-detail {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(166, 203, 242, 0.7);
  border-radius: 8px;
  background: rgba(235, 246, 255, 0.8);
  color: #1e3a8a;
  font-size: 12px;
  line-height: 1.5;
}

.llm-tick-detail span {
  display: block;
}

.persona-result-card {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(194, 216, 233, 0.68);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(240, 248, 255, 0.48)),
    rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 24px rgba(33, 75, 109, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  content-visibility: auto;
  contain-intrinsic-size: 150px;
}

.persona-result-card strong,
.persona-result-card span {
  display: block;
}

.persona-result-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.persona-result-card .persona-dimension-note {
  color: #245b7a;
  font-weight: 700;
}

.persona-result-card p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.agent-route-options button:focus-visible,
.persona-result-card:focus-within {
  outline: 3px solid rgba(15, 110, 200, 0.32);
  outline-offset: 2px;
}

button,
.agent-route-options button {
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.agent-route-options button:hover,
.timeline-card:hover,
.chat-line:hover {
  border-color: rgba(15, 110, 200, 0.42);
  box-shadow: 0 16px 32px rgba(33, 75, 109, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

@media (prefers-reduced-motion: reduce) {
  button,
  .agent-route-options button {
    transition: none;
  }
}

.admin-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 16px;
  overflow: hidden;
}

.admin-card.agent-settings {
  display: block;
  overflow-y: auto;
}

.admin-card.agent-score-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
  gap: 10px;
  overflow: hidden;
}

.admin-card.agent-score-panel h3 {
  min-height: 22px;
}

.admin-card.agent-score-panel .agent-score-board,
.admin-card.agent-score-panel .agent-bars {
  min-height: 0;
}

.editor-list {
  min-height: 0;
  margin-top: 12px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
}

.editor-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.4fr) repeat(3, minmax(72px, 0.7fr));
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid #e1e8f0;
  border-radius: 12px;
  background: #fbfdff;
}

.editor-row.wide {
  grid-template-columns: minmax(120px, 0.8fr) minmax(220px, 1.4fr) minmax(90px, 0.5fr);
}

.editor-row label {
  margin: 0;
}

.editor-row input,
.editor-row select {
  width: 100%;
  height: 34px;
  margin-top: 5px;
  padding: 0 8px;
  border: 1px solid #c8d2df;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.editor-row input[type="number"] {
  text-align: right;
}

.editor-row input[data-derived] {
  border-color: rgba(47, 125, 92, 0.22);
  background: rgba(230, 244, 236, 0.72);
  color: #17543c;
  font-weight: 800;
}

.editor-row.route-settings-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tourist-profile-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(92, 124, 154, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(236, 243, 248, 0.92), rgba(247, 251, 249, 0.92));
}

.profile-radar {
  width: 220px;
  height: 220px;
}

.profile-radar svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.profile-radar line {
  stroke: rgba(80, 103, 126, 0.2);
  stroke-width: 1;
}

.profile-radar text {
  fill: #405367;
  font-size: 9px;
  font-weight: 700;
}

.radar-grid {
  fill: none;
  stroke: rgba(80, 103, 126, 0.22);
  stroke-width: 1;
}

.radar-grid.outer {
  stroke: rgba(47, 95, 137, 0.42);
}

.radar-shape {
  fill: rgba(84, 141, 155, 0.28);
  stroke: #2d6b78;
  stroke-width: 2;
}

.profile-radar circle {
  fill: #2d6b78;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-facts strong {
  grid-column: 1 / -1;
  color: #17384e;
  font-size: 16px;
}

.profile-facts span {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid rgba(92, 124, 154, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #405367;
  font-size: 12px;
}

.editor-name {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

.editor-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

@media (max-width: 1180px) {
  .workspace {
    height: auto;
    grid-template-columns: 1fr;
  }

  .right-panel {
    display: grid;
    gap: 16px;
  }

  .map-shell {
    height: 640px;
  }

  .agent-eval-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    overflow: visible;
  }

  .digital-twin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-settings,
  .agent-algorithm-card,
  .agent-score-panel,
  .agent-chat-panel,
  .agent-timeline-panel,
  .agent-persona-panel {
    grid-column: auto;
    grid-row: auto;
    position: static;
  }

  .agent-score-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    height: auto;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .workspace {
    height: auto;
    grid-template-columns: 1fr;
  }

  .digital-twin-grid,
  .twin-roadbook-card,
  .twin-feedback-card {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .admin-workspace {
    height: auto;
    overflow: visible;
    padding: 12px;
  }

  .admin-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: stretch;
  }

  .agent-key-field {
    flex: 1 1 100%;
    min-width: 0;
  }

  .admin-actions button {
    flex: 1 1 140px;
  }

  .admin-card {
    overflow: visible;
  }

  .left-panel {
    left: 12px;
    top: 118px;
    bottom: 12px;
    width: min(430px, calc(100vw - 24px));
    height: auto;
  }

  .phone-frame {
    width: 100%;
    height: auto;
    max-height: none;
  }

  .map-shell {
    height: 520px;
    grid-template-rows: 42px 1fr;
  }

  .profile-drawer-toggle {
    left: 0;
    top: 50%;
  }

  .student-layer-panel {
    top: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
  }

  .map-legend-corner {
    right: 12px;
    bottom: 72px;
    max-width: calc(100% - 24px);
  }

  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 12px;
  }

  .status-card:nth-child(2) {
    border-right: 0;
  }

  .agent-interaction-head {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .xiaobei-profile-copy {
    width: 100%;
  }

  .xiaobei-state-bubble {
    right: -10px;
  }

  .agent-score-board,
  .config-chip-grid,
  .persona-grid,
  .agent-data-summary,
  .agent-persona-result,
  .admin-grid,
  .verify-grid {
    grid-template-columns: 1fr;
  }
}

.map-legend-corner label,
.map-legend-corner span {
  gap: 4px;
}

.map-legend-corner .legend-dot {
  width: 8px;
  height: 8px;
}













/* Premium Apple-like map polish */
.map-shell {
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(105, 92, 255, 0.10), transparent 34%),
    linear-gradient(135deg, rgba(248, 251, 255, 0.74), rgba(228, 244, 248, 0.46));
  box-shadow:
    0 24px 70px rgba(23, 37, 84, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(22px) saturate(1.18);
}

.map-shell::after {
  content: "";
  position: absolute;
  inset: 42px 0 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, transparent 0 46%, rgba(255, 255, 255, 0.08) 62%, rgba(220, 235, 255, 0.12) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(95, 125, 160, 0.05));
  mix-blend-mode: soft-light;
}

#map {
  background: linear-gradient(135deg, #eef5f8, #f8fbff);
}

#map canvas {
  filter: saturate(0.76) contrast(0.94) brightness(1.05);
}

.activity-ticker {
  min-height: 42px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(90deg, rgba(14, 23, 43, 0.86), rgba(36, 50, 84, 0.72) 48%, rgba(50, 83, 115, 0.62)),
    radial-gradient(circle at 8% 50%, rgba(109, 98, 255, 0.42), transparent 30%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(125, 211, 252, 0.22),
    0 16px 40px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(26px) saturate(1.35);
  animation: ticker-aurora 6.8s ease-in-out infinite;
}

.activity-ticker::before {
  width: 18%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), rgba(125, 211, 252, 0.34), transparent);
  animation-duration: 7.2s;
}

.activity-ticker::after {
  content: "";
  position: absolute;
  inset: auto 18px 7px 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.72), rgba(167, 139, 250, 0.68), transparent);
  opacity: 0.72;
  pointer-events: none;
}

.activity-ticker strong {
  color: #dbeafe;
  letter-spacing: 0.01em;
  text-shadow: 0 0 16px rgba(125, 211, 252, 0.34);
}

.ticker-track {
  color: rgba(248, 250, 252, 0.92);
  font-weight: 800;
  text-shadow: 0 0 14px rgba(167, 139, 250, 0.28);
}

@keyframes ticker-aurora {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(125,211,252,0.20), 0 16px 40px rgba(15,23,42,0.16); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), inset 0 -1px 0 rgba(167,139,250,0.34), 0 18px 48px rgba(59,130,246,0.20); }
}

.map-legend-corner,
.student-layer-panel,
.map-profile-panel,
.popup,
.route-interaction-bubble,
.interaction-dock-card {
  border: 1px solid rgba(255, 255, 255, 0.66);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), rgba(238, 246, 255, 0.36)),
    rgba(255, 255, 255, 0.28);
  box-shadow:
    0 18px 46px rgba(21, 38, 72, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(26px) saturate(1.26);
}

.map-profile-panel {
  border-radius: 22px;
}

.map-legend-corner {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.map-legend-corner label,
.map-legend-corner span {
  color: #304258;
}

.legend-line.expressway,
.legend-line.national-road,
.legend-line.provincial-road,
.legend-line.secondary-road,
.legend-line.tertiary-road,
.legend-line.other-road { background: rgba(95, 126, 166, 0.3); }
.legend-line.boundary { background: #5f7ea6; }
.legend-line.road-network { background: rgba(95, 126, 166, 0.3); }

.map-profile-shape {
  stroke: rgba(95, 126, 166, 0.74);
}

/* Xiaobei header bubble moved into copy area */
.xiaobei-hero-copy .xiaobei-state-bubble {
  position: static;
  z-index: 1;
  width: fit-content;
  min-width: 112px;
  max-width: 190px;
  margin: -2px 0 0;
  padding: 7px 12px 7px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 34px rgba(91, 91, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(1.18);
  transform-origin: 18px 100%;
}

.xiaobei-hero-copy .state-dots {
  margin-bottom: 2px;
}

.xiaobei-hero-copy .xiaobei-state-bubble strong {
  font-size: 12px;
  line-height: 1.22;
}

.xiaobei-avatar-stage .xiaobei-state-bubble {
  right: -22px;
  top: 72px;
}


.legend-dot.local-map {
  background: #8b5cf6;
}


/* Movable glass map panels and fixed mic icon */
.map-legend-corner {
  left: 14px;
  right: auto;
  bottom: 14px;
  top: auto;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 5px 7px;
  max-width: 250px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(235, 246, 255, 0.34)), rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 42px rgba(23, 42, 72, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.88), inset 0 -1px 0 rgba(125, 211, 252, 0.16);
  backdrop-filter: blur(28px) saturate(1.32);
  -webkit-backdrop-filter: blur(28px) saturate(1.32);
}

.map-legend-corner::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 32px;
  border-radius: 15px 15px 8px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.58), rgba(255,255,255,0));
  pointer-events: none;
}

.map-legend-corner label,
.map-legend-corner span {
  position: relative;
  min-height: 22px;
  padding: 2px 5px;
  color: rgba(31, 45, 68, 0.82);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.15;
}

.map-legend-corner input {
  width: 11px;
  height: 11px;
  accent-color: #5b6cff;
}

.map-legend-corner .legend-dot {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.46), 0 3px 8px rgba(15, 23, 42, 0.14);
}

.map-legend-corner.dragging,
.map-profile-panel.dragging {
  cursor: grabbing;
  transform: scale(1.015);
  box-shadow: 0 26px 62px rgba(23, 42, 72, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.map-profile-panel {
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: left 0.18s ease, right 0.18s ease, top 0.18s ease, bottom 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.input-mic-button {
  display: grid;
  place-items: center;
  color: #111827;
  font-size: 0 !important;
  line-height: 1;
  overflow: hidden;
}

.input-mic-button::before {
  content: "";
  width: 17px;
  height: 17px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cpath d='M12 19v3'/%3E%3Cpath d='M8 22h8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cpath d='M12 19v3'/%3E%3Cpath d='M8 22h8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.input-mic-button.listening { color: #6557ff; }

.input-mic-button.listening::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(101, 87, 255, 0.13);
  animation: micPulse 1.2s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { transform: scale(0.82); opacity: 0.45; }
  50% { transform: scale(1.08); opacity: 0.9; }
}

.input-mic-button::before {
  position: relative;
  z-index: 1;
}

.input-mic-button::after {
  z-index: 0;
  pointer-events: none;
}

.xiaobei-input-row .input-mic-button {
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  min-height: 32px !important;
  max-height: 32px;
  border-radius: 999px;
  padding: 0 !important;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.xiaobei-input-row .input-mic-button:hover {
  color: #5b5cff;
  background: rgba(91, 92, 255, 0.08);
  box-shadow: 0 0 0 5px rgba(91, 92, 255, 0.12), 0 0 18px rgba(91, 92, 255, 0.28);
}

.xiaobei-input-row .input-mic-button:active {
  transform: translateY(-50%);
}

.xiaobei-input-row .input-mic-button.listening {
  color: #5b5cff;
  background: rgba(91, 92, 255, 0.1);
  box-shadow: 0 0 0 5px rgba(91, 92, 255, 0.12), 0 0 16px rgba(91, 92, 255, 0.25);
}

.xiaobei-input-row .input-mic-button.listening::after {
  animation: none;
  opacity: 0;
}

/* Xiaobei status bubble one-line layout */
.xiaobei-hero-copy .xiaobei-state-bubble {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-width: 0;
  max-width: 260px;
  padding: 7px 13px;
  white-space: nowrap;
}

.xiaobei-hero-copy .state-dots {
  flex: 0 0 auto;
  margin: 0;
}

.xiaobei-hero-copy .xiaobei-state-bubble strong {
  display: inline-block;
  white-space: nowrap;
  overflow: visible;
  font-size: 12px;
  line-height: 1;
}


.benefit-match-panel {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(20, 83, 45, 0.18);
  border-radius: 8px;
  background: rgba(248, 253, 250, 0.78);
  box-shadow: 0 10px 22px rgba(31, 49, 77, 0.08);
}

.benefit-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
}

.benefit-panel-head span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.benefit-panel-head strong {
  font-size: 15px;
}

.benefit-panel-head button,
.benefit-actions button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 7px;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.benefit-package-list {
  display: grid;
  gap: 10px;
}

.benefit-package-card,
.trip-benefit-summary-card,
.benefit-pass-card-inner {
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.benefit-card-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.benefit-card-title span {
  color: #b45309;
  font-size: 12px;
  font-weight: 800;
}

.benefit-package-card p,
.trip-benefit-summary-card p,
.benefit-pass-card-inner p,
.benefit-package-card small {
  margin: 6px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.benefit-tags,
.benefit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.benefit-tags i {
  padding: 3px 7px;
  border-radius: 999px;
  color: #7c2d12;
  background: rgba(255, 237, 213, 0.9);
  font-size: 11px;
  font-style: normal;
}

.benefit-package-card ul,
.trip-benefit-summary-card ol {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding-left: 18px;
  font-size: 12px;
}

.trip-benefit-summary-card li em {
  margin-left: 6px;
  color: #0f766e;
  font-style: normal;
  font-weight: 800;
}

.policy-reminders {
  margin-top: 8px;
  padding: 8px;
  border-radius: 7px;
  background: rgba(254, 249, 195, 0.72);
}

.benefit-pass-card-inner {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.benefit-qr {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 2px solid #0f766e;
  border-radius: 8px;
  color: #0f766e;
  background: repeating-linear-gradient(45deg, #ffffff 0 7px, #ecfdf5 7px 14px);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}

.benefit-city-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.benefit-city-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.benefit-city-grid b,
.benefit-city-grid span {
  font-size: 12px;
}

.benefit-city-grid span {
  color: var(--muted);
}

@media (max-width: 720px) {
  .benefit-pass-card-inner,
  .benefit-city-grid {
    grid-template-columns: 1fr;
  }
}

.trip-simulation-panel {
  margin-top: 16px;
}

.trip-simulation-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.trip-simulation-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(18, 88, 104, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #164257;
  font-weight: 800;
  cursor: pointer;
}

.trip-simulation-tabs button.active {
  border-color: rgba(15, 118, 110, 0.62);
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.trip-simulation-result {
  min-height: 220px;
  max-height: 460px;
  overflow: auto;
}

.trip-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.trip-summary-grid.compact {
  grid-template-columns: repeat(4, minmax(100px, 1fr));
}

.trip-summary-grid div {
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.86);
}

.trip-summary-grid span,
.trip-log-row span,
.trip-interaction-row small {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.trip-summary-grid strong {
  display: block;
  margin-top: 4px;
  color: #0f3f57;
  font-size: 20px;
}

.trip-log-row,
.trip-interaction-row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.trip-log-row {
  grid-template-columns: 72px minmax(160px, 1fr) minmax(120px, 0.7fr);
  align-items: center;
}

.trip-log-row b,
.trip-log-row em {
  color: #173b5b;
  font-style: normal;
}

.trip-cost-table {
  width: 100%;
  border-collapse: collapse;
}

.trip-cost-table th,
.trip-cost-table td {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  text-align: left;
  vertical-align: top;
}

.trip-cost-table th {
  color: #52657a;
  font-size: 12px;
  font-weight: 700;
}

.trip-cost-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.trip-cost-summary strong {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  color: #173b5b;
}

.trip-cost-detail {
  margin: 6px 0 12px;
  padding-left: 18px;
  color: #43566c;
}

.trip-suggestion-list {
  margin: 0;
  padding-left: 18px;
}

.trip-suggestion-list li {
  margin: 8px 0;
}

.twin-timeline-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.twin-timeline-row > span {
  color: #2563eb;
  font-weight: 900;
}

.twin-timeline-row strong,
.twin-node-card strong {
  color: #0f172a;
}

.twin-timeline-row p,
.twin-node-card p,
.twin-report p {
  margin: 4px 0;
  color: #334155;
  line-height: 1.65;
}

.twin-timeline-row small,
.twin-node-card small {
  color: #64748b;
  line-height: 1.55;
}

.twin-node-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #ffffff;
}

.twin-node-card > div {
  display: grid;
  grid-template-columns: 62px 1fr 80px;
  gap: 10px;
  align-items: center;
}

.twin-node-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.twin-node-card em {
  color: #0f766e;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.twin-report h4,
.twin-report h5 {
  margin: 0 0 8px;
  color: #0f172a;
}

.twin-report h5 {
  margin-top: 14px;
  font-size: 14px;
}

.twin-report ul {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  line-height: 1.7;
}

@media (max-width: 820px) {
  .trip-summary-grid,
  .trip-summary-grid.compact,
  .trip-log-row,
  .twin-node-card > div,
  .twin-timeline-row {
    grid-template-columns: 1fr;
  }
}

.route-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.route-detail-head span {
  color: #173b5b;
  font-size: 13px;
  font-weight: 900;
}

.route-detail-head button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.trip-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
}

.trip-detail-simulation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: rgba(240, 253, 250, 0.86);
}

.trip-detail-simulation-card p {
  margin: 0;
  color: #173b5b;
  font-size: 14px;
  line-height: 1.55;
}

.trip-detail-simulation-card button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.trip-detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
}

.trip-detail-summary-grid div,
.trip-detail-ready {
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.86);
}

.trip-detail-summary-grid span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.trip-detail-summary-grid strong {
  display: block;
  margin-top: 4px;
  color: #173b5b;
  font-size: 15px;
}

.trip-detail-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.trip-detail-chain span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(240, 253, 250, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.trip-detail-day {
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.trip-detail-day b,
#trip-detail-services b {
  color: #173b5b;
}

.trip-detail-day p,
#trip-detail-services p,
#trip-detail-simulation p {
  margin: 6px 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}

.trip-detail-ready.ready {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.25);
  background: rgba(236, 253, 245, 0.9);
  font-weight: 900;
}

.trip-detail-ready.not-ready {
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.22);
  background: rgba(255, 251, 235, 0.9);
  font-weight: 900;
}

@media (max-width: 980px) {
  .trip-detail-layout,
  .trip-detail-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Stronger basemap readability */
#map canvas { filter: saturate(1.05) contrast(1.06) brightness(0.99); }


/* Structured scenic spot popup */
.glass-poi-popup {
  width: min(430px, 86vw);
  max-width: 430px;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  color: #172338;
  font-size: 14px;
  z-index: 32;
}

.glass-poi-popup .poi-popup-card {
  position: relative;
  overflow: hidden;
  padding: 28px 28px 22px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(124, 246, 226, 0.22), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(238, 249, 255, 0.58)),
    rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(28px) saturate(1.28);
  box-shadow:
    0 28px 70px rgba(18, 42, 68, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(114, 213, 226, 0.16);
}

.glass-poi-popup .poi-popup-title {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: #0b2b53;
  font-size: 34px;
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: 0;
}

.glass-poi-popup .poi-popup-level {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 9px 14px;
  border: 1px solid rgba(43, 177, 173, 0.34);
  border-radius: 9px;
  background: rgba(237, 254, 255, 0.66);
  color: #0a7a75;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.glass-poi-popup .poi-popup-level span,
.glass-poi-popup .poi-popup-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0aa997, #0f8d88);
  color: #fff;
  font-size: 15px;
  font-style: normal;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 141, 136, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.glass-poi-popup .poi-popup-level strong {
  margin: 0;
  color: #087b75;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 850;
}

.glass-poi-popup .poi-popup-section {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
}

.glass-poi-popup .poi-popup-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: #087b75;
}

.glass-poi-popup .poi-popup-section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  border-bottom: 1px dashed rgba(79, 141, 158, 0.28);
}

.glass-poi-popup .poi-popup-section-title span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(224, 248, 249, 0.8);
  color: #0f8d88;
  font-weight: 900;
}

.glass-poi-popup .poi-popup-section-title b {
  font-size: 20px;
  font-weight: 900;
}

.glass-poi-popup p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #243044;
  font-size: 17px;
  line-height: 1.82;
  font-weight: 560;
}

.glass-poi-popup .poi-popup-meta {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.glass-poi-popup .poi-popup-row {
  display: grid;
  grid-template-columns: 34px 88px 1px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border-top: 1px solid rgba(108, 153, 176, 0.18);
  color: #1f2c3d;
}

.glass-poi-popup .poi-popup-row b {
  color: #0b8079;
  font-size: 18px;
  font-weight: 900;
}

.glass-poi-popup .poi-popup-row em {
  width: 1px;
  height: 24px;
  background: rgba(45, 168, 176, 0.28);
}

.glass-poi-popup .poi-popup-row span:last-child {
  min-width: 0;
  color: #243044;
  font-size: 17px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.glass-poi-popup .poi-popup-landscape {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 92px;
  opacity: 0.23;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(8, 84, 108, 0.22) 0 18%, transparent 19%),
    linear-gradient(135deg, transparent 0 34%, rgba(43, 122, 145, 0.26) 35% 48%, transparent 49%),
    linear-gradient(45deg, transparent 0 38%, rgba(83, 160, 185, 0.20) 39% 54%, transparent 55%);
  clip-path: polygon(0 88%, 12% 66%, 24% 78%, 36% 48%, 49% 72%, 60% 36%, 74% 70%, 86% 52%, 100% 80%, 100% 100%, 0 100%);
}

.glass-poi-popup.compact {
  width: min(300px, 70vw);
}

.glass-poi-popup.compact .poi-popup-card {
  padding: 18px 20px;
  border-radius: 20px;
}

.glass-poi-popup.compact h3 {
  margin: 0 0 6px;
  color: #0b2b53;
  font-size: 18px;
}

.glass-poi-popup.compact p {
  font-size: 14px;
  line-height: 1.5;
}

/* Keep scenic popup below map controls */
.glass-poi-popup {
  max-height: min(560px, calc(100vh - 180px));
  overflow: auto;
  scrollbar-width: thin;
}

.glass-poi-popup::-webkit-scrollbar {
  width: 6px;
}

.glass-poi-popup::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(37, 99, 125, 0.24);
}


/* Digital twin full roadbook */
.digital-twin-workspace {
  position: relative;
  padding: 14px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(125, 211, 252, 0.22), transparent 32%),
    radial-gradient(circle at 92% 8%, rgba(45, 212, 191, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(239, 246, 250, 0.92), rgba(248, 252, 255, 0.96));
}

.digital-twin-workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image:
    linear-gradient(rgba(15, 42, 67, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 42, 67, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08));
}

.digital-twin-workspace > * {
  position: relative;
  z-index: 1;
}

.digital-twin-workspace .digital-twin-header,
.digital-twin-workspace .admin-card,
.digital-twin-workspace .trip-simulation-panel {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 48px rgba(15, 42, 67, 0.08);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.digital-twin-workspace .digital-twin-header {
  align-items: center;
  margin-bottom: 12px;
  padding: 16px 18px;
}

.digital-twin-workspace .digital-twin-header h2,
.digital-twin-workspace .admin-card h3 {
  color: #102033;
}

.digital-twin-workspace .digital-twin-header p {
  color: #667085;
}

.digital-twin-workspace .admin-actions {
  gap: 8px;
}

.digital-twin-workspace .admin-actions button,
.digital-twin-workspace .trip-simulation-tabs button {
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(255, 255, 255, 0.72);
  color: #123047;
  box-shadow: 0 8px 20px rgba(15, 42, 67, 0.05);
}

.digital-twin-workspace .admin-actions button.primary,
.digital-twin-workspace .trip-simulation-tabs button.active {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #0e7490 55%, #0f766e);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.2);
}

.digital-twin-workspace .digital-twin-grid {
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  grid-auto-rows: minmax(260px, auto);
  gap: 12px;
}

.digital-twin-workspace .twin-profile-card,
.digital-twin-workspace .twin-stage-card,
.digital-twin-workspace .twin-agent-card,
.digital-twin-workspace .twin-llm-card,
.digital-twin-workspace .twin-roadbook-card,
.digital-twin-workspace .twin-feedback-card {
  padding: 16px;
}

.digital-twin-workspace .twin-roadbook-card,
.digital-twin-workspace .twin-feedback-card {
  min-height: 300px;
}

.twin-card-subtitle {
  margin-left: 8px;
  color: #0e7490;
  font-size: 12px;
  font-weight: 800;
}

.digital-twin-workspace .twin-profile,
.digital-twin-workspace .twin-meter-list {
  gap: 9px;
}

.digital-twin-workspace .twin-profile-item,
.digital-twin-workspace .twin-meter,
.digital-twin-workspace .twin-agent-json,
.digital-twin-workspace .twin-llm-status,
.digital-twin-workspace .twin-llm-card input,
.digital-twin-workspace .result-box,
.digital-twin-workspace .trip-summary-grid div,
.digital-twin-workspace .twin-node-card {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(248, 252, 255, 0.58);
}

.digital-twin-workspace .twin-profile-item {
  min-height: 54px;
  border-radius: 8px;
}

.digital-twin-workspace .twin-meter {
  min-height: 76px;
  grid-template-columns: 66px 1fr 32px;
  border-radius: 8px;
  background: rgba(235, 244, 252, 0.66);
}

.digital-twin-workspace .twin-meter b {
  height: 8px;
  background: linear-gradient(90deg, #2563eb, #0e7490, #0f766e);
}

.digital-twin-workspace .twin-agent-json {
  min-height: 172px;
  max-height: 214px;
  border-radius: 8px;
}

.digital-twin-workspace .twin-llm-card {
  align-content: start;
}

.digital-twin-workspace .twin-llm-card button {
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.82);
}

.digital-twin-workspace .twin-roadbook-shell,
.digital-twin-workspace #digital-twin-feedback,
.digital-twin-workspace .trip-simulation-result {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.44);
}

.digital-twin-workspace .twin-roadbook-shell {
  min-height: 242px;
  padding: 12px;
}

.digital-twin-workspace #digital-twin-feedback {
  min-height: 242px;
}

.digital-twin-workspace .trip-simulation-panel {
  margin-top: 12px;
  padding: 16px;
}

.digital-twin-workspace .trip-simulation-result {
  min-height: 300px;
  max-height: 560px;
  padding: 14px;
}

.digital-twin-workspace .trip-log-row,
.digital-twin-workspace .trip-interaction-row,
.digital-twin-workspace .twin-timeline-row {
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

.twin-roadbook-list-full {
  max-height: 510px;
  overflow: auto;
  padding-right: 6px;
}

.twin-roadbook-day {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 4px 0 2px;
  padding: 7px 10px;
  border: 1px solid rgba(120, 145, 190, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(145%);
  color: #3153d8;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(36, 60, 120, 0.08);
}

.twin-roadbook-list-full .twin-roadbook-step {
  grid-template-columns: 82px 1fr;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 28px rgba(36, 60, 120, 0.06);
}

.twin-roadbook-list-full .twin-roadbook-step span {
  display: grid;
  gap: 5px;
  align-content: start;
}

.twin-roadbook-list-full .twin-roadbook-step span b {
  color: #2563eb;
  font-size: 13px;
}

.twin-roadbook-list-full .twin-roadbook-step span em {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.1);
  color: #0e7490;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.twin-roadbook-list-full .twin-roadbook-step small {
  display: block;
  margin-top: 5px;
  color: rgba(23, 59, 91, 0.76);
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .digital-twin-workspace .digital-twin-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 760px) {
  .digital-twin-workspace {
    padding: 10px;
  }

  .digital-twin-workspace .digital-twin-grid,
  .digital-twin-workspace .twin-roadbook-card,
  .digital-twin-workspace .twin-feedback-card {
    grid-template-columns: 1fr;
    grid-column: span 1;
  }

  .digital-twin-workspace .digital-twin-header {
    align-items: stretch;
  }

  .twin-roadbook-list-full .twin-roadbook-step {
    grid-template-columns: 1fr;
  }
}

/* Digital twin Apple glass dashboard */
.digital-twin-workspace {
  --twin-bg: #eef4f8;
  --twin-card: rgba(255, 255, 255, 0.58);
  --twin-card-strong: rgba(255, 255, 255, 0.78);
  --twin-stroke: rgba(148, 163, 184, 0.28);
  --twin-stroke-strong: rgba(148, 163, 184, 0.42);
  --twin-text: #102033;
  --twin-muted: #667085;
  --twin-muted-2: #94a3b8;
  --twin-teal: #0f766e;
  --twin-cyan: #0e7490;
  --twin-blue: #2563eb;
  --twin-orange: #f97316;
  --twin-shadow: 0 24px 70px rgba(15, 42, 67, 0.1);
  --twin-shadow-soft: 0 12px 36px rgba(15, 42, 67, 0.08);
  --twin-radius-xl: 28px;
  --twin-radius-lg: 22px;
  --twin-radius-md: 16px;
  position: relative;
  width: min(1760px, calc(100vw - 34px));
  margin: 0 auto;
  padding: 22px 18px 34px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 8%, rgba(125, 211, 252, 0.38), transparent 32%),
    radial-gradient(circle at 86% 12%, rgba(45, 212, 191, 0.22), transparent 34%),
    radial-gradient(circle at 78% 92%, rgba(191, 219, 254, 0.42), transparent 30%),
    linear-gradient(135deg, #eef4f8 0%, #f8fbff 50%, #eaf3f6 100%);
  color: var(--twin-text);
  overflow: visible;
  scroll-behavior: smooth;
}

#digital-twin-page.page-view.active {
  display: block;
  height: auto;
  min-height: calc(100vh - 78px);
  overflow: visible;
}

.digital-twin-workspace::before {
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.05));
}

.digital-twin-workspace .digital-twin-header,
.digital-twin-workspace .admin-card,
.digital-twin-workspace .trip-simulation-panel,
.digital-twin-anchor-nav {
  border: 1px solid var(--twin-stroke);
  border-radius: var(--twin-radius-xl);
  background: var(--twin-card);
  box-shadow: var(--twin-shadow-soft);
  backdrop-filter: blur(26px) saturate(145%);
  -webkit-backdrop-filter: blur(26px) saturate(145%);
}

.digital-twin-workspace .digital-twin-header {
  position: relative;
  top: auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 18px 20px;
}

.digital-twin-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 360px;
}

.digital-twin-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.96), rgba(14, 116, 144, 0.92) 52%, rgba(15, 118, 110, 0.95));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.23);
}

.digital-twin-workspace .digital-twin-header h2 {
  margin: 0;
  color: var(--twin-text);
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1.12;
}

.digital-twin-workspace .digital-twin-header p {
  margin: 5px 0 0;
  color: var(--twin-muted);
  font-size: 14px;
  line-height: 1.45;
}

.digital-twin-anchor-nav {
  position: relative;
  top: auto;
  z-index: 19;
  display: flex;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 16px;
  padding: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.digital-twin-anchor-nav::-webkit-scrollbar {
  display: none;
}

.digital-twin-anchor-nav button {
  padding: 9px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #19405a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.digital-twin-anchor-nav button:hover,
.digital-twin-anchor-nav button.active {
  color: #083344;
  background: rgba(255, 255, 255, 0.72);
}

.digital-twin-workspace .admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.digital-twin-workspace .admin-actions button,
.digital-twin-workspace .trip-simulation-tabs button,
.digital-twin-workspace .twin-llm-card button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--twin-stroke-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #123047;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.digital-twin-workspace .admin-actions button:hover,
.digital-twin-workspace .trip-simulation-tabs button:hover,
.digital-twin-workspace .twin-llm-card button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 24px rgba(15, 42, 67, 0.1);
}

.digital-twin-workspace .admin-actions button.primary,
.digital-twin-workspace .trip-simulation-tabs button.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #0e7490 48%, #0f766e 100%);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.22);
}

.digital-twin-workspace .digital-twin-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 16px;
  align-items: stretch;
}

.digital-twin-workspace .admin-card {
  position: relative;
  min-height: 0;
  padding: 22px;
  overflow: hidden;
}

.digital-twin-workspace .admin-card::after,
.digital-twin-workspace .trip-simulation-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.48), transparent 42%);
  opacity: 0.75;
}

.digital-twin-workspace .admin-card > *,
.digital-twin-workspace .trip-simulation-panel > * {
  position: relative;
  z-index: 1;
}

.digital-twin-workspace .admin-card h3 {
  margin: 0 0 16px;
  color: var(--twin-text);
  font-size: 20px;
}

.digital-twin-workspace .twin-profile-card {
  grid-column: span 4;
  order: 1;
}

.digital-twin-workspace .twin-kpi-card {
  grid-column: span 8;
  order: 2;
}

.digital-twin-workspace .twin-summary-card,
.digital-twin-workspace .twin-feedback-card {
  grid-column: span 6;
}

.digital-twin-workspace .twin-summary-card {
  order: 3;
}

.digital-twin-workspace .twin-feedback-card {
  order: 4;
}

.digital-twin-workspace .twin-roadbook-card {
  grid-column: span 12;
  order: 5;
}

.digital-twin-workspace .twin-debug-card {
  margin-top: 16px;
}

.twin-profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.twin-avatar {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), transparent 28%),
    linear-gradient(145deg, #1d4ed8, #0e7490 52%, #0f766e);
  box-shadow: 0 18px 42px rgba(14, 116, 144, 0.25);
  font-size: 32px;
  font-weight: 950;
}

.twin-profile-head strong {
  display: block;
  color: var(--twin-text);
  font-size: 24px;
  line-height: 1.2;
}

.twin-profile-head p {
  margin: 6px 0 0;
  color: var(--twin-muted);
  font-size: 14px;
  line-height: 1.45;
}

.twin-profile-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.digital-twin-workspace .twin-profile-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  min-height: 74px;
  padding: 12px 13px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.digital-twin-workspace .twin-profile-item span {
  color: var(--twin-muted);
  font-size: 12px;
}

.digital-twin-workspace .twin-profile-item strong {
  color: #123047;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.35;
}

.twin-status-strip {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.1), rgba(37, 99, 235, 0.08));
  color: #155e75;
  font-size: 14px;
  font-weight: 900;
}

.digital-twin-workspace .twin-meter-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.twin-kpi {
  min-height: 128px;
  padding: 17px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.twin-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.twin-kpi-top span {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(14, 116, 144, 0.1);
  color: var(--twin-cyan);
  font-weight: 950;
}

.twin-kpi-top em {
  color: var(--twin-muted-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.twin-kpi strong {
  margin-top: 18px;
  color: #0f2a43;
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 950;
  line-height: 1;
}

.twin-kpi small {
  margin-top: 8px;
  color: var(--twin-muted);
  font-size: 13px;
  font-weight: 800;
}

.twin-live-summary {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 230px;
}

.twin-score-ring {
  --score: 0;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.86) 0 53%, transparent 54%),
    conic-gradient(var(--twin-cyan) 0 calc(var(--score) * 1%), rgba(148, 163, 184, 0.2) calc(var(--score) * 1%) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.twin-score-ring.muted {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.86) 0 53%, transparent 54%),
    conic-gradient(rgba(14, 116, 144, 0.42) 0 66%, rgba(148, 163, 184, 0.2) 66% 100%);
}

.twin-score-ring strong {
  color: #0f2a43;
  font-size: 26px;
  font-weight: 950;
}

.twin-summary-insights {
  display: grid;
  gap: 10px;
}

.twin-summary-insights p,
.digital-twin-workspace #digital-twin-feedback {
  margin: 0;
  padding: 13px 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  color: #24364a;
  font-size: 14px;
  line-height: 1.62;
}

.digital-twin-workspace .twin-roadbook-shell,
.digital-twin-workspace #digital-twin-feedback,
.digital-twin-workspace .trip-simulation-result,
.digital-twin-workspace .twin-agent-json,
.digital-twin-workspace .twin-llm-status,
.digital-twin-workspace .twin-llm-card input {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.56);
}

.digital-twin-workspace .twin-roadbook-shell {
  min-height: 330px;
  padding: 14px;
  overflow: auto;
}

.digital-twin-workspace #digital-twin-feedback {
  min-height: 330px;
  overflow: auto;
}

.digital-twin-workspace .twin-roadbook-list-full {
  display: flex;
  gap: 12px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
}

.digital-twin-workspace .twin-roadbook-day {
  position: static;
  flex: 0 0 auto;
  align-self: flex-start;
  margin: 0;
}

.digital-twin-workspace .twin-roadbook-list-full .twin-roadbook-step {
  flex: 0 0 230px;
  min-height: 178px;
  grid-template-columns: 1fr;
  align-content: start;
  border-radius: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.digital-twin-workspace .twin-roadbook-list-full .twin-roadbook-step span b {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.digital-twin-workspace .twin-agent-json {
  min-height: 300px;
  max-height: 380px;
  border-radius: 18px;
  color: #24364a;
}

.digital-twin-workspace .twin-llm-card {
  gap: 12px;
}

.digital-twin-workspace .twin-llm-status,
.digital-twin-workspace .twin-llm-card input {
  min-height: 42px;
  border-radius: 14px;
}

.digital-twin-workspace .trip-simulation-panel {
  position: relative;
  margin-top: 16px;
  padding: 22px;
  overflow: hidden;
}

.digital-twin-workspace .twin-debug-drawer {
  padding: 0;
  overflow: hidden;
}

.digital-twin-workspace .twin-debug-drawer summary {
  position: relative;
  z-index: 1;
  padding: 18px 22px;
  color: var(--twin-text);
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.digital-twin-workspace .twin-debug-drawer summary::-webkit-details-marker {
  display: none;
}

.digital-twin-workspace .twin-debug-drawer summary::after {
  content: "展开";
  float: right;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--twin-cyan);
  font-size: 12px;
}

.digital-twin-workspace .twin-debug-drawer[open] summary::after {
  content: "收起";
}

.digital-twin-workspace .twin-debug-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 16px;
  padding: 0 22px 22px;
}

.digital-twin-workspace .twin-debug-grid section {
  min-width: 0;
}

.digital-twin-workspace .trip-simulation-tabs {
  gap: 9px;
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.36);
  overflow-x: auto;
  flex-wrap: nowrap;
}

.digital-twin-workspace .trip-simulation-result {
  min-height: 420px;
  max-height: 680px;
  padding: 16px;
  border-radius: 22px;
}

.digital-twin-workspace .trip-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.digital-twin-workspace .trip-summary-grid div,
.digital-twin-workspace .twin-node-card,
.digital-twin-workspace .twin-timeline-row,
.digital-twin-workspace .trip-interaction-row,
.digital-twin-workspace .trip-log-row {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.digital-twin-workspace .twin-timeline-row {
  margin-bottom: 12px;
  padding: 14px;
}

.digital-twin-workspace .twin-node-card {
  margin-bottom: 12px;
  padding: 16px;
}

@media (max-width: 1320px) {
  .digital-twin-workspace .twin-meter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .digital-twin-workspace {
    width: calc(100vw - 18px);
    padding: 14px 10px 24px;
  }

  .digital-twin-workspace .digital-twin-header {
    position: relative;
    top: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .digital-twin-title-group {
    min-width: 0;
  }

  .digital-twin-anchor-nav {
    position: relative;
    top: auto;
  }

  .digital-twin-workspace .digital-twin-grid,
  .digital-twin-workspace .twin-profile-card,
  .digital-twin-workspace .twin-kpi-card,
  .digital-twin-workspace .twin-summary-card,
  .digital-twin-workspace .twin-roadbook-card,
  .digital-twin-workspace .twin-feedback-card,
  .digital-twin-workspace .twin-debug-card {
    grid-template-columns: 1fr;
    grid-column: span 12;
  }

  .twin-live-summary {
    grid-template-columns: 1fr;
  }

  .digital-twin-workspace .twin-debug-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .digital-twin-workspace .admin-card,
  .digital-twin-workspace .trip-simulation-panel {
    padding: 16px;
  }

  .digital-twin-workspace .twin-meter-list,
  .twin-profile-tags,
  .digital-twin-workspace .trip-summary-grid {
    grid-template-columns: 1fr;
  }

  .digital-twin-app-icon,
  .twin-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 24px;
  }
}

.trip-detail-intro {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #173b5b;
  line-height: 1.7;
  white-space: pre-line;
  backdrop-filter: blur(16px) saturate(140%);
}

/* Digital twin fullscreen sidebar dashboard */
#digital-twin-page.page-view.active {
  display: block;
  width: 100vw;
  max-width: none;
}

.digital-twin-workspace {
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 16px clamp(14px, 1.8vw, 28px) 30px;
}

.digital-twin-workspace .digital-twin-header {
  margin: 0 0 14px;
}

.digital-twin-shell {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
}

.digital-twin-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.digital-twin-shell .digital-twin-anchor-nav {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 9px;
  min-width: 0;
  max-height: calc(100vh - 96px);
  padding: 16px;
  overflow: auto;
}

.digital-twin-shell .digital-twin-anchor-nav span {
  display: block;
  margin-bottom: 4px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.digital-twin-shell .digital-twin-anchor-nav button {
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  text-align: left;
}

.digital-twin-workspace .digital-twin-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.digital-twin-workspace .trip-simulation-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.digital-twin-workspace .trip-simulation-panel::after {
  display: none;
}

.digital-twin-workspace .trip-simulation-section {
  min-height: 320px;
}

.digital-twin-workspace .trip-simulation-section h3,
.digital-twin-workspace .trip-detail-embedded h3 {
  margin-bottom: 12px;
}

.digital-twin-workspace .trip-simulation-result {
  min-height: 240px;
  max-height: 460px;
}

.digital-twin-workspace .auto-scroll-panel {
  scroll-behavior: auto;
}

.digital-twin-workspace .auto-scroll-panel:hover,
.digital-twin-workspace .auto-scroll-panel:focus-within {
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.18);
}

.trip-detail-embedded {
  display: grid;
  gap: 14px;
}

.trip-detail-inline-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.trip-detail-inline-head h3,
.trip-detail-inline-head p {
  margin: 0;
}

.trip-detail-inline-head p {
  margin-top: 6px;
  color: #64748b;
}

.digital-twin-workspace .trip-detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) repeat(3, minmax(320px, 1.15fr));
  gap: 14px;
  align-items: stretch;
}

.digital-twin-workspace .trip-detail-layout .admin-card {
  min-height: 280px;
}

.digital-twin-workspace .trip-detail-roadbook-card,
.digital-twin-workspace .trip-detail-service-card,
.digital-twin-workspace .trip-detail-cost-card {
  min-height: 430px;
}

.digital-twin-workspace .trip-detail-roadbook-card .compact-result,
.digital-twin-workspace .trip-detail-service-card .compact-result,
.digital-twin-workspace .trip-detail-cost-card .compact-result {
  min-height: 330px;
  max-height: 360px;
  overflow: auto;
}

@media (max-width: 1280px) {
  .digital-twin-workspace .trip-simulation-panel,
  .digital-twin-workspace .trip-detail-layout {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 1024px) {
  .digital-twin-shell {
    grid-template-columns: 1fr;
  }

  .digital-twin-shell .digital-twin-anchor-nav {
    position: sticky;
    top: 58px;
    z-index: 20;
    display: flex;
    max-height: none;
    overflow-x: auto;
  }

  .digital-twin-shell .digital-twin-anchor-nav span {
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
  }

  .digital-twin-shell .digital-twin-anchor-nav button {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  .trip-detail-inline-head {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .digital-twin-workspace {
    width: 100vw;
    padding: 12px 10px 24px;
  }

  .digital-twin-workspace .trip-simulation-panel,
  .digital-twin-workspace .trip-detail-layout {
    grid-template-columns: 1fr;
  }
}
