:root {
  --ink: #111b2f;
  --muted: #657083;
  --panel: #f5efe2;
  --panel-strong: #ffffff;
  --line: #d9cdb8;
  --shadow: 0 18px 50px rgba(10, 12, 18, 0.24);
  --accent: #b44832;
  --accent-2: #09224a;
  --accent-3: #c8a24b;
  --good: #287a58;
  --warn: #b35f25;
  --danger: #a83a3a;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(200, 162, 75, 0.18), transparent 36%),
    linear-gradient(240deg, rgba(180, 72, 50, 0.14), transparent 34%),
    #08162e;
  overflow: hidden;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.game-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  height: 100dvh;
  min-height: 680px;
}

.world-pane {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}

.topbar {
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 260px) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  color: white;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.78) 47% 53%, transparent 53%),
    linear-gradient(0deg, transparent 47%, rgba(255, 255, 255, 0.78) 47% 53%, transparent 53%);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
}

.brand-lockup strong,
.clock-chip strong,
.route-heading strong,
.panel-heading strong,
.money-row strong {
  display: block;
}

.eyebrow,
.destination-switch span,
.clock-chip span,
.route-heading span,
.panel-heading span,
.small-label,
.summary-grid span {
  margin: 0;
  color: color-mix(in srgb, currentColor 64%, transparent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.destination-switch,
.clock-chip,
.icon-button,
.text-button,
.primary-button,
.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
}

.destination-switch,
.clock-chip {
  min-height: 48px;
  padding: 7px 11px;
  background: rgba(12, 14, 19, 0.42);
  backdrop-filter: blur(18px);
}

.destination-switch {
  display: grid;
  gap: 3px;
}

.destination-switch select {
  width: 100%;
  min-width: 0;
  color: white;
  background: transparent;
  border: 0;
  outline: 0;
  font-weight: 800;
}

.destination-switch option {
  color: var(--ink);
  background: white;
}

.clock-chip {
  display: grid;
  justify-items: end;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: white;
  background: rgba(12, 14, 19, 0.42);
  backdrop-filter: blur(18px);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-button.is-active {
  color: #171717;
  background: #f7d56b;
  border-color: #f7d56b;
}

.scene-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.media-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #101216;
  opacity: 0;
  transition: opacity 220ms ease;
}

.media-backdrop.has-image,
.media-backdrop.has-video {
  opacity: 1;
}

.media-backdrop img,
.media-backdrop video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
}

.media-backdrop.has-image img,
.media-backdrop.has-video video {
  display: block;
}

.media-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 7, 13, 0.2), rgba(4, 7, 13, 0.1) 46%, rgba(4, 7, 13, 0.72)),
    linear-gradient(90deg, rgba(4, 7, 13, 0.42), transparent 42%);
}

#travelCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.scene-wrap.has-media #travelCanvas {
  opacity: 0.44;
  mix-blend-mode: soft-light;
}

.scene-wrap.media-failed #travelCanvas {
  opacity: 1;
  mix-blend-mode: normal;
}

.media-credit {
  position: absolute;
  bottom: 12px;
  right: 14px;
  z-index: 3;
  max-width: min(220px, calc(100% - 28px));
  padding: 4px 9px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(10, 12, 18, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.media-credit[hidden] {
  display: none;
}

.media-credit:hover,
.media-credit:focus-visible {
  color: white;
  border-color: rgba(255, 255, 255, 0.46);
  opacity: 1;
}

.weather-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  max-width: min(360px, calc(100% - 36px));
  padding: 8px 11px;
  color: white;
  background: rgba(10, 12, 18, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  font-size: 0.84rem;
  font-weight: 800;
}

.scene-caption {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  width: min(560px, calc(100% - 44px));
  color: white;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.scene-caption h1 {
  margin: 4px 0 8px;
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.scene-caption p {
  max-width: 60ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.98rem, 1.45vw, 1.2rem);
  line-height: 1.5;
}

.hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #16181c;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid color-mix(in srgb, var(--accent) 88%, white);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.hotspot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}

.hotspot span {
  position: absolute;
  bottom: 45px;
  left: 50%;
  width: max-content;
  max-width: 160px;
  padding: 5px 8px;
  color: white;
  background: rgba(10, 12, 18, 0.58);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.hotspot:hover span,
.hotspot:focus-visible span {
  opacity: 1;
}

.hotspot.is-seen {
  background: #f8d96b;
}

.route-strip {
  display: grid;
  grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px 18px;
  color: white;
  background: rgba(10, 12, 18, 0.86);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.route-line {
  display: grid;
  grid-template-columns: repeat(var(--stops, 4), minmax(80px, 1fr));
  gap: 8px;
  min-width: 0;
}

.route-stop {
  position: relative;
  min-width: 0;
  padding-top: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-stop::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--accent-3);
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  transform: translateX(-50%);
}

.route-stop::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 50%;
  width: calc(100% + 8px);
  height: 2px;
  background: rgba(255, 255, 255, 0.24);
  z-index: -1;
}

.route-stop:first-child::after {
  display: none;
}

.route-stop.is-current::before {
  width: 14px;
  height: 14px;
  top: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent);
}

.route-stop.is-complete::before {
  background: var(--good);
}

.travel-pane {
  display: grid;
  grid-template-rows: none;
  grid-auto-rows: min-content;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  background: var(--panel);
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.status-panel,
.brief-panel,
.coach-panel,
.kit-panel,
.log-panel {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 24, 31, 0.08);
}

.status-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.stat-row,
.money-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
}

.stat-row span,
.money-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.stat-row strong,
.money-row strong {
  font-size: 0.86rem;
  text-align: right;
}

.meter {
  height: 9px;
  overflow: hidden;
  background: #ece7dd;
  border-radius: 999px;
}

.meter i {
  display: block;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
  border-radius: inherit;
  transition: width 260ms ease, background 260ms ease;
}

.money-row {
  grid-template-columns: 76px minmax(0, 1fr);
  padding-top: 3px;
  border-top: 1px solid var(--line);
}

.brief-panel,
.coach-panel,
.log-panel {
  display: grid;
  grid-template-rows: none;
  grid-auto-rows: min-content;
  min-height: 0;
  padding: 14px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-heading span {
  color: var(--muted);
}

#briefText {
  margin: 0 0 12px;
  color: #353941;
  line-height: 1.48;
}

.choice-list {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  overflow: visible;
  padding-right: 2px;
}

.choice-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 10px;
  color: var(--ink);
  background: #f8f6f0;
  border: 1px solid color-mix(in srgb, var(--line) 76%, var(--accent));
  border-radius: 8px;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.choice-button:hover,
.choice-button:focus-visible {
  background: white;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.choice-button:disabled {
  color: #8c9098;
  background: #eeeeee;
  border-color: #e0e0e0;
  cursor: not-allowed;
  transform: none;
}

.choice-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: white;
  background: var(--accent-2);
  border-radius: 8px;
}

.choice-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.choice-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.92rem;
}

.choice-copy span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.coach-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.local-line {
  margin: 0;
  padding: 11px 12px;
  color: #233047;
  background: #f8f4ec;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.response-label {
  display: grid;
  gap: 7px;
}

.response-label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.response-label textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 10px 11px;
  line-height: 1.4;
}

.response-label textarea:focus {
  border-color: var(--accent-3);
  box-shadow: 0 0 0 3px rgba(200, 162, 75, 0.22);
}

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

.coach-actions .primary-button {
  min-height: 38px;
}

#coachFeedback {
  margin: 0;
  color: #465064;
  font-size: 0.82rem;
  line-height: 1.38;
}

.kit-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.kit-block {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.kit-block:last-child {
  border-bottom: 0;
}

.kit-block strong {
  display: block;
  margin-top: 4px;
  font-size: 1.02rem;
}

.kit-block p {
  margin: 4px 0 0;
  color: #444953;
  font-size: 0.87rem;
  line-height: 1.42;
}

.kit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.kit-tag {
  padding: 5px 8px;
  color: #293039;
  background: #eef2ef;
  border: 1px solid #d7dfd7;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.kit-tag.is-missing {
  color: #6e4a2f;
  background: #f3e6da;
  border-color: #e5c9ad;
}

.log-panel {
  grid-template-rows: none;
  grid-auto-rows: min-content;
}

.text-button {
  min-height: 31px;
  padding: 0 10px;
  color: var(--ink);
  background: #f6f1e9;
  border-color: var(--line);
  font-size: 0.78rem;
  font-weight: 900;
}

#logList {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: auto;
}

#logList li {
  padding: 8px 9px;
  color: #373b44;
  background: #faf8f3;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.end-dialog {
  width: min(560px, calc(100vw - 28px));
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.end-dialog::backdrop {
  background: rgba(9, 10, 13, 0.68);
  backdrop-filter: blur(8px);
}

.end-card {
  position: relative;
  padding: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.close-dialog {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: #f4f0e9;
  border-color: var(--line);
}

.end-card h2 {
  margin: 6px 46px 8px 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.end-card p {
  margin: 0;
  color: #444953;
  line-height: 1.5;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.summary-grid div {
  padding: 12px;
  background: #f8f6f0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.summary-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1.2rem;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0 14px;
  font-weight: 900;
}

.primary-button {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.secondary-button {
  color: var(--ink);
  background: #f6f1e9;
  border-color: var(--line);
}

.noscript-message {
  position: fixed;
  inset: 20px;
  z-index: 20;
  display: grid;
  place-items: center;
  margin: 0;
  color: white;
  background: #101216;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .game-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(620px, 72dvh) auto;
    height: auto;
    min-height: 100dvh;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .destination-switch {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .travel-pane {
    grid-template-rows: auto auto auto auto auto;
    border-left: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 640px) {
  .game-shell {
    grid-template-rows: minmax(560px, 66dvh) auto;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    padding: 10px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .clock-chip,
  .icon-button {
    min-height: 42px;
    height: 42px;
  }

  .icon-button {
    width: 42px;
  }

  .scene-caption {
    right: 14px;
    bottom: 14px;
    width: calc(100% - 28px);
  }

  .media-credit {
    bottom: 10px;
    right: 12px;
    max-width: 130px;
    padding: 4px 8px;
    font-size: 0.58rem;
  }

  #sceneKicker {
    display: none;
  }

  .scene-caption h1 {
    margin-top: 0;
    font-size: clamp(1.95rem, 10vw, 2.55rem);
    line-height: 1;
  }

  .scene-caption p {
    font-size: 0.9rem;
    line-height: 1.38;
  }

  .route-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .route-line {
    grid-template-columns: repeat(var(--stops, 4), minmax(64px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .travel-pane {
    padding: 10px;
  }

  .status-panel {
    gap: 8px;
  }

  .stat-row,
  .money-row {
    grid-template-columns: 70px minmax(0, 1fr) 38px;
  }

  .money-row {
    grid-template-columns: 70px minmax(0, 1fr);
  }

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

  .coach-actions {
    grid-template-columns: 1fr;
  }
}


.voice-block {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.voice-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--accent-3, #c8a24b);
  background: transparent;
  color: var(--accent-3, #c8a24b);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.voice-button:hover,
.voice-button:focus-visible {
  background: var(--accent-3, #c8a24b);
  color: #0b1e3f;
}

.voice-button.is-active {
  background: var(--accent-3, #c8a24b);
  color: #0b1e3f;
}

.voice-mount {
  margin-top: 12px;
  min-height: 64px;
}

/* ---- Intro / onboarding overlay -------------------------------------- */
body.intro-open {
  overflow: hidden;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(120% 120% at 50% 0%, rgba(9, 34, 74, 0.82), rgba(9, 15, 28, 0.94));
  backdrop-filter: blur(10px);
  overflow-y: auto;
}

.intro-overlay[hidden] {
  display: none;
}

.intro-card {
  width: min(560px, 100%);
  background: var(--panel-strong, #fff);
  color: var(--ink, #111b2f);
  border: 1px solid color-mix(in srgb, var(--accent-2, #09224a) 18%, transparent);
  border-radius: 20px;
  padding: 32px 30px;
  box-shadow: 0 28px 80px rgba(5, 12, 28, 0.55);
}

.intro-title {
  margin: 10px 0 0;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.intro-lede {
  margin: 12px 0 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--ink, #111b2f) 78%, transparent);
}

.intro-steps {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.intro-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.intro-step-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent, #b44832);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.intro-steps strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
}

.intro-steps p {
  margin: 2px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink, #111b2f) 72%, transparent);
}

.intro-route-pick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 24px 0 0;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: color-mix(in srgb, var(--ink, #111b2f) 60%, transparent);
}

.intro-route-pick select {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink, #111b2f);
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent-2, #09224a) 28%, transparent);
  background: #fff;
}

.intro-start {
  margin-top: 18px;
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 14px 20px;
}

.intro-foot {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--ink, #111b2f) 58%, transparent);
}

/* ---- Choice result / feedback card ----------------------------------- */
.result-card {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid color-mix(in srgb, var(--ink, #111b2f) 14%, transparent);
  background: color-mix(in srgb, var(--panel-strong, #fff) 92%, transparent);
}

.result-strong {
  border-color: color-mix(in srgb, #1f9d57 60%, transparent);
  background: color-mix(in srgb, #1f9d57 12%, var(--panel-strong, #fff));
}

.result-workable {
  border-color: color-mix(in srgb, var(--accent-3, #c8a24b) 60%, transparent);
  background: color-mix(in srgb, var(--accent-3, #c8a24b) 12%, var(--panel-strong, #fff));
}

.result-misstep {
  border-color: color-mix(in srgb, var(--accent, #b44832) 55%, transparent);
  background: color-mix(in srgb, var(--accent, #b44832) 10%, var(--panel-strong, #fff));
}

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

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.9rem;
}

.result-strong .result-badge {
  color: #157a42;
}
.result-workable .result-badge {
  color: color-mix(in srgb, var(--accent-3, #c8a24b) 75%, #5a4a14);
}
.result-misstep .result-badge {
  color: var(--accent, #b44832);
}

.result-you {
  font-size: 0.76rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--ink, #111b2f) 60%, transparent);
}

.result-outcome {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink, #111b2f);
}

.result-teach {
  margin: 6px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink, #111b2f) 80%, transparent);
}

.result-deltas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.delta {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink, #111b2f) 8%, transparent);
  color: color-mix(in srgb, var(--ink, #111b2f) 70%, transparent);
}

.delta.up {
  background: color-mix(in srgb, #1f9d57 18%, transparent);
  color: #157a42;
}

.delta.down {
  background: color-mix(in srgb, var(--accent, #b44832) 16%, transparent);
  color: var(--accent, #b44832);
}

.result-coach {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink, #111b2f) 62%, transparent);
}

/* ---- Live host invite ------------------------------------------------ */
.voice-invite {
  margin: 0 0 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink, #111b2f) 78%, transparent);
}

.voice-button svg {
  margin-right: 2px;
  vertical-align: -2px;
}

/* ---- Inline live conversation (SDK) ---------------------------------- */
.voice-mount {
  margin-top: 12px;
}

.voice-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--ink, #111b2f) 72%, transparent);
}

.voice-status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink, #111b2f) 35%, transparent);
  flex: 0 0 auto;
}

.voice-status[data-mode="connecting"]::before {
  background: var(--accent-3, #c8a24b);
  animation: voicePulse 1s ease-in-out infinite;
}

.voice-status[data-mode="listening"]::before {
  background: #1f9d57;
  animation: voicePulse 1.4s ease-in-out infinite;
}

.voice-status[data-mode="speaking"]::before {
  background: var(--accent, #b44832);
  animation: voicePulse 0.7s ease-in-out infinite;
}

.voice-status[data-mode="error"]::before {
  background: var(--accent, #b44832);
}

@keyframes voicePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

.voice-transcript {
  display: grid;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 2px;
}

.vt-line {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink, #111b2f);
}

.vt-who {
  font-weight: 800;
  color: color-mix(in srgb, var(--ink, #111b2f) 55%, transparent);
}

.vt-user .vt-who {
  color: color-mix(in srgb, var(--accent-2, #09224a) 80%, transparent);
}

.vt-ai .vt-who {
  color: color-mix(in srgb, var(--accent, #b44832) 85%, transparent);
}
