:root {
  --bg: #e8edf5;
  --panel: #ffffff;
  --ink: #1a2332;
  --muted: #6b7a90;
  --line: #d8e0ec;
  --blue: #2f6bff;
  --blue-deep: #1e4fd6;
  --blue-soft: #e8f0ff;
  --green: #1f9d6a;
  --amber: #d97706;
  --red: #e11d48;
  --shadow: 0 10px 30px rgba(28, 49, 89, 0.08);
  --radius: 14px;
  --demo-speed: 1;
  --font: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
  --font-serif: "Source Serif 4", "Noto Serif SC", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #dce7ff 0%, transparent 55%),
    radial-gradient(900px 500px at 90% 0%, #e7f7f0 0%, transparent 50%),
    var(--bg);
}

@media (min-width: 961px) {
  html,
  body {
    overflow: hidden;
  }
}

button,
input,
select {
  font: inherit;
}

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(10px, 1.2vw, 16px);
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(8px, 1vw, 14px);
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

/* —— Top bar —— */
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.top-actions .btn,
.top-actions .progress-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  line-height: 1.25;
}

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  transition: 0.15s ease;
}

.btn:hover {
  border-color: #b7c6de;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.btn.primary:hover {
  background: var(--blue-deep);
}

.btn.active {
  background: var(--blue-soft);
  border-color: #a8c0ff;
  color: var(--blue-deep);
}

.speed-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 2px;
  font-size: 12px;
  color: #64748b;
  user-select: none;
}

.speed-select-label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.speed-select select {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2364748b' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E")
    no-repeat right 8px center;
  border-radius: 999px;
  padding: 6px 26px 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  line-height: 1.2;
}

.speed-select select:focus {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 1px;
}

#btnReplay.active {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}

#btnRewind {
  border-color: #fdba74;
  color: #c2410c;
  background: #fff7ed;
}

#btnRewind:hover {
  border-color: #fb923c;
  background: #ffedd5;
}

.progress-pill {
  font-size: 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  line-height: 1.25;
}

/* —— Dashboard —— */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1vh, 12px);
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}

/* Map-centric stage: full-bleed map + floating glass widgets */
.dashboard.map-stage {
  position: relative;
  display: block;
  gap: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #cfe3f5;
  box-shadow: var(--shadow);
}

.map-stage-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.map-stage-canvas .map-shell {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.map-stage-canvas .map-frame {
  flex: 1 1 auto;
  min-height: 0;
  height: 100% !important;
  border: none;
  border-radius: 18px;
  background: #cfe3f5;
}

.map-stage-canvas .map-host,
.map-stage-canvas .map-canvas,
.map-stage-canvas .leaflet-host {
  height: 100% !important;
  min-height: 0 !important;
  border: none;
  border-radius: 18px;
}


.map-stage-canvas .map-legend {
  display: none;
}

.map-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 6px;
  pointer-events: none;
  box-sizing: border-box;
}

.map-chrome-top,
.map-chrome-mid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  pointer-events: none;
}

.map-chrome-top > *,
.map-chrome-mid > *,
.map-chrome-bottom > * {
  pointer-events: auto;
}

.map-chrome-top {
  flex: 0 0 auto;
}

.map-chrome-top-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.map-chrome-top-row .float-ribbon {
  flex: 1 1 auto;
  min-width: 0;
}

.map-view-controls {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.map-view-btn {
  width: 34px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: #0f172a;
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.map-view-btn-icon {
  display: block;
  flex: 0 0 auto;
}

.map-view-btn:last-child {
  border-bottom: none;
}

.map-view-btn:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.map-view-btn:active {
  background: rgba(37, 99, 235, 0.14);
}

.map-view-btn-clear {
  color: #b91c1c;
  font-size: 14px;
}

.map-view-btn-clear .map-view-btn-icon {
  width: 14px;
  height: 14px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 2px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  user-select: none;
}

.lang-switch-label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lang-switch-bubble {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: #fff;
  line-height: 1;
}

.lang-switch-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch-btn:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.04);
}

.lang-switch-btn.is-active {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.08);
}

.map-view-btn-clear:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

/* Hide Leaflet's default zoom — we use map-view-controls next to the day ribbon. */
.map-stage-canvas .leaflet-control-zoom {
  display: none !important;
}

.map-chrome-mid {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 4px;
  pointer-events: none;
}

.map-chrome-mid > * {
  pointer-events: auto;
}

/* Bottom chrome: compact legend help (no time-dock / always-on legend) */
.map-chrome-bottom {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0;
  flex: 0 0 auto;
  min-width: 0;
  margin-top: auto;
  z-index: 6;
  pointer-events: none;
}

.map-chrome-bottom > * {
  pointer-events: auto;
}

.map-legend-help {
  box-sizing: border-box;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
  padding: 0;
  margin: 0;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(51, 65, 85, 0.9);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.map-legend-help:hover,
.map-legend-help.is-open {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
  transform: none;
}

.map-legend-pop {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: min(340px, calc(100vw - 48px));
  padding: 10px 12px 12px;
  border-radius: 14px;
  z-index: 8;
  animation: map-legend-pop-in 0.2s ease both;
}

.map-legend-pop[hidden] {
  display: none !important;
}

.map-legend-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 750;
  color: #1e3a8a;
}

.map-legend-pop-close {
  border: none;
  background: rgba(15, 23, 42, 0.06);
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}

.map-legend-pop-close:hover {
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

.map-legend-pop .map-legend {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 10px;
  row-gap: 7px;
  margin: 0;
  padding: 0;
  max-width: none;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.map-legend-pop .map-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 11.5px;
  line-height: 1.2;
  color: #334155;
}

@keyframes map-legend-pop-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.map-chrome-bottom-docks {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  pointer-events: none;
}

.map-chrome-bottom-docks > * {
  pointer-events: auto;
  align-self: flex-end;
}

/* Search / notion / calendar — overlay inside mid, above docks, zero layout impact on bottom. */
.map-chrome-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  min-width: 0;
  pointer-events: none;
  z-index: 8;
}

.map-chrome-actions > * {
  pointer-events: auto;
}

.map-chrome-actions .map-action-stage[hidden] {
  display: none !important;
}

.panel-glass {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.float-ribbon {
  position: static;
  padding: 6px 8px;
  border-radius: 14px;
  overflow: hidden;
}

.map-stage .day-chip {
  width: 68px;
  padding: 5px 3px;
  gap: 0;
}

.map-stage .day-chip .day-icon {
  font-size: 13px;
}

.map-stage .day-chip .day-num,
.map-stage .day-chip .day-md,
.map-stage .day-chip .day-label {
  font-size: 10px;
  line-height: 1.2;
}

/* One compact status strip — no separate cards that can collide */
.float-status-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.float-status {
  position: static;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.float-status .status-chip {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-right: 1px solid rgba(148, 163, 184, 0.28);
  transition: background 0.35s ease;
}

.float-status .status-chip:last-child {
  border-right: none;
}

/* Weather is usually short — don't steal equal flex from denser chips. */
.float-status .status-chip[data-status="weather"] {
  flex: 0 0 auto;
  max-width: 4.75rem;
  padding-left: 7px;
  padding-right: 7px;
  gap: 4px;
}

.float-status .status-chip[data-status="visa"] {
  flex: 0.85 1 0;
}

.float-status .status-chip[data-status="budget"] {
  flex: 0.95 1 0;
}

.float-status .status-chip[data-status="rental"] {
  flex: 1.05 1 0;
  min-width: 0;
}

.float-status .status-chip-ico {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1;
}

.float-status .status-chip-val {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: #0f172a;
  overflow: hidden;
}

.float-status .status-chip[data-status="weather"] .status-chip-val {
  flex: 0 1 auto;
  font-size: 11.5px;
}

.float-status .status-chip-val.is-marquee {
  mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 10px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 10px), transparent 100%);
}

.float-status .status-chip-val-text {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}

.float-status .status-chip-val-seg {
  display: inline-block;
}

.float-status .status-chip-val-gap {
  display: inline-block;
  width: 1.75em;
}

.float-status .status-chip-val.is-marquee .status-chip-val-text {
  animation-name: status-chip-marquee;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-delay: 0.8s;
}

/* One-way loop (no ping-pong). */
@keyframes status-chip-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-1 * var(--marquee-distance, 0px)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .float-status .status-chip-val.is-marquee .status-chip-val-text {
    animation: none !important;
  }
  .float-status .status-chip-val {
    mask-image: none;
    -webkit-mask-image: none;
    text-overflow: ellipsis;
  }
  .float-status .status-chip-val-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Budget update sheet — anchored under the budget status chip */
.status-budget-pop {
  position: fixed;
  z-index: 85;
  width: min(268px, calc(100vw - 20px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top center;
  transition:
    opacity calc(0.28s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1),
    transform calc(0.34s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.status-budget-pop.is-in,
.status-budget-pop.is-in-instant {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.status-budget-pop.is-in-instant {
  transition: none;
}

.status-budget-pop.is-out {
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transition:
    opacity calc(0.22s / var(--demo-speed, 1)) ease,
    transform calc(0.22s / var(--demo-speed, 1)) ease;
}

.status-budget-pop-caret {
  position: absolute;
  top: -5px;
  width: 10px;
  height: 10px;
  background: rgba(255, 252, 245, 0.98);
  border-left: 1px solid rgba(253, 230, 138, 0.9);
  border-top: 1px solid rgba(253, 230, 138, 0.9);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: -2px -2px 6px rgba(120, 53, 15, 0.04);
}

.status-budget-pop-inner {
  position: relative;
  padding: 11px 12px 12px;
  border-radius: 14px;
  background:
    linear-gradient(165deg, rgba(255, 252, 245, 0.98) 0%, rgba(255, 255, 255, 0.96) 55%, rgba(255, 251, 235, 0.94) 100%);
  border: 1px solid rgba(253, 230, 138, 0.85);
  box-shadow:
    0 16px 36px rgba(120, 53, 15, 0.1),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.status-budget-pop-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.status-budget-pop-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a16207;
}

.status-budget-pop-loc {
  min-width: 0;
  font-size: 10.5px;
  color: #a8a29e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

.status-budget-pop-hero {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.status-budget-pop-hero-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #a8a29e;
}

.status-budget-pop-hero-val {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #1c1917;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  animation: budget-hero-in calc(0.4s / var(--demo-speed, 1)) cubic-bezier(0.22, 1, 0.36, 1) both;
}

.status-budget-pop-hero.is-ok .status-budget-pop-hero-val {
  color: #b45309;
}

.status-budget-pop-meter {
  height: 5px;
  border-radius: 999px;
  background: rgba(231, 229, 228, 0.9);
  overflow: hidden;
}

.status-budget-pop-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #fbbf24, #d97706 70%, #b45309);
  transition: width calc(0.75s / var(--demo-speed, 1)) cubic-bezier(0.22, 1, 0.36, 1);
}

.status-budget-pop-cap {
  margin-top: 5px;
  margin-bottom: 8px;
  font-size: 10.5px;
  color: #a8a29e;
}

.status-budget-pop-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.status-budget-pop-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(245, 245, 244, 0.95);
  animation: map-action-row-in calc(0.32s / var(--demo-speed, 1)) ease both;
}

.status-budget-pop-cell:nth-child(2) {
  animation-delay: calc(0.05s / var(--demo-speed, 1));
}

.status-budget-pop-cell:nth-child(3) {
  animation-delay: calc(0.1s / var(--demo-speed, 1));
}

.status-budget-pop-cell.is-accent {
  background: rgba(254, 243, 199, 0.55);
  border-color: rgba(253, 230, 138, 0.7);
}

.status-budget-pop-cell-k {
  font-size: 10px;
  font-weight: 600;
  color: #a8a29e;
}

.status-budget-pop-cell-v {
  font-size: 12px;
  font-weight: 700;
  color: #1c1917;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
  .status-budget-pop,
  .status-budget-pop-hero-val,
  .status-budget-pop-meter-fill,
  .status-budget-pop-cell {
    animation: none !important;
    transition: none !important;
  }
}

/* Visa / NZeTA sheet — under the visa status chip */
.status-visa-pop {
  position: fixed;
  z-index: 85;
  width: min(260px, calc(100vw - 20px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top center;
  transition:
    opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.status-visa-pop.is-in,
.status-visa-pop.is-in-instant {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.status-visa-pop.is-in-instant {
  transition: none;
}

.status-visa-pop.is-out {
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.status-visa-pop-caret {
  position: absolute;
  top: -5px;
  width: 10px;
  height: 10px;
  background: rgba(239, 246, 255, 0.98);
  border-left: 1px solid rgba(147, 197, 253, 0.95);
  border-top: 1px solid rgba(147, 197, 253, 0.95);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: -2px -2px 6px rgba(30, 64, 175, 0.05);
}

.status-visa-pop-inner {
  position: relative;
  padding: 11px 12px 12px;
  border-radius: 14px;
  background: linear-gradient(
    165deg,
    rgba(239, 246, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.97) 55%,
    rgba(248, 250, 252, 0.96) 100%
  );
  border: 1px solid rgba(147, 197, 253, 0.9);
  box-shadow:
    0 16px 36px rgba(30, 64, 175, 0.1),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.status-visa-pop-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.status-visa-pop-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eff6ff;
  font-size: 15px;
  flex-shrink: 0;
}

.status-visa-pop-titles {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.status-visa-pop-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3b82f6;
}

.status-visa-pop-product {
  font-size: 14px;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.status-visa-pop-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-visa-pop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.95);
  animation: map-action-row-in calc(0.32s / var(--demo-speed, 1)) ease both;
}

.status-visa-pop-row.is-ok {
  background: rgba(240, 253, 244, 0.75);
  border-color: rgba(187, 247, 208, 0.9);
}

.status-visa-pop-row.is-wait {
  background: rgba(239, 246, 255, 0.7);
  border-color: rgba(191, 219, 254, 0.9);
}

.status-visa-pop-row.is-bad {
  background: rgba(255, 241, 242, 0.75);
  border-color: rgba(254, 205, 211, 0.9);
}

.status-visa-pop-who {
  font-size: 12.5px;
  font-weight: 650;
  color: #0f172a;
}

.status-visa-pop-st {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.status-visa-pop-row.is-ok .status-visa-pop-st {
  color: #15803d;
}

.status-visa-pop-row.is-wait .status-visa-pop-st {
  color: #2563eb;
}

.status-visa-pop-foot {
  margin-top: 8px;
  font-size: 10.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
  .status-visa-pop,
  .status-visa-pop-row {
    animation: none !important;
    transition: none !important;
  }
}

/* Generic status sheet — under matching chip (flight / activity / rental / weather) */
.status-chip-pop {
  position: fixed;
  z-index: 85;
  width: min(260px, calc(100vw - 20px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top center;
  transition:
    opacity calc(0.28s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1),
    transform calc(0.34s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.status-chip-pop.is-in,
.status-chip-pop.is-in-instant {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.status-chip-pop.is-in-instant {
  transition: none;
}

.status-chip-pop.is-out {
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transition:
    opacity calc(0.22s / var(--demo-speed, 1)) ease,
    transform calc(0.22s / var(--demo-speed, 1)) ease;
}

.status-chip-pop-caret {
  position: absolute;
  top: -5px;
  width: 10px;
  height: 10px;
  background: rgba(248, 250, 252, 0.98);
  border-left: 1px solid rgba(148, 163, 184, 0.85);
  border-top: 1px solid rgba(148, 163, 184, 0.85);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: -2px -2px 6px rgba(15, 23, 42, 0.04);
}

.status-chip-pop-inner {
  position: relative;
  padding: 11px 12px 12px;
  border-radius: 14px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 250, 252, 0.97) 55%,
    rgba(241, 245, 249, 0.96) 100%
  );
  border: 1px solid rgba(203, 213, 225, 0.95);
  box-shadow:
    0 16px 36px rgba(15, 23, 42, 0.1),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.status-chip-pop-flight .status-chip-pop-inner {
  border-color: rgba(165, 180, 252, 0.95);
  background: linear-gradient(
    165deg,
    rgba(238, 242, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.97) 60%,
    rgba(248, 250, 252, 0.96) 100%
  );
}

.status-chip-pop-flight .status-chip-pop-caret {
  background: rgba(238, 242, 255, 0.98);
  border-color: rgba(165, 180, 252, 0.95);
}

.status-chip-pop-rental .status-chip-pop-inner {
  border-color: rgba(125, 211, 252, 0.95);
}

.status-chip-pop-weather .status-chip-pop-inner {
  border-color: rgba(147, 197, 253, 0.95);
}

.status-chip-pop-activity .status-chip-pop-inner {
  border-color: rgba(167, 243, 208, 0.95);
}

.status-chip-pop-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.status-chip-pop-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 15px;
  flex-shrink: 0;
}

.status-chip-pop-flight .status-chip-pop-ico {
  background: #eef2ff;
}

.status-chip-pop-activity .status-chip-pop-ico {
  background: #ecfdf5;
}

.status-chip-pop-titles {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.status-chip-pop-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.status-chip-pop-hero {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-chip-pop-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
}

.status-chip-pop-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 7px;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.9);
  opacity: 0;
  animation: statusChipPopRowIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes statusChipPopRowIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-chip-pop-k {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  flex-shrink: 0;
}

.status-chip-pop-v {
  font-size: 11.5px;
  font-weight: 650;
  color: #334155;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip-pop-foot {
  margin-top: 8px;
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .status-chip-pop,
  .status-chip-pop-row {
    animation: none !important;
    transition: none !important;
  }
  .status-chip-pop-row {
    opacity: 1;
  }
}

/* Soft status sync pill → arcs into status chip (legacy; unused) */
.status-sync {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 80;
  pointer-events: none;
  will-change: transform, opacity, filter;
  transform-origin: center center;
}

.status-sync-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  max-width: min(320px, 70vw);
  padding: 8px 12px 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 14px 36px rgba(15, 23, 42, 0.14),
    0 2px 0 rgba(255, 255, 255, 0.85) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.status-sync-from-stage .status-sync-pill {
  box-shadow:
    0 18px 44px rgba(15, 23, 42, 0.18),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
}

.status-sync-budget .status-sync-pill {
  border-color: rgba(253, 230, 138, 0.85);
}

.status-sync-flight .status-sync-pill {
  border-color: rgba(191, 219, 254, 0.9);
}

.status-sync-weather .status-sync-pill {
  border-color: rgba(186, 230, 253, 0.9);
}

.status-sync-rental .status-sync-pill {
  border-color: rgba(253, 230, 138, 0.95);
}

.status-sync-activity .status-sync-pill {
  border-color: rgba(187, 247, 208, 0.95);
}

.status-sync-ico {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 14px;
  background: #f8fafc;
}

.status-sync-budget .status-sync-ico {
  background: #fffbeb;
}

.status-sync-flight .status-sync-ico {
  background: #eff6ff;
}

.status-sync-rental .status-sync-ico {
  background: #fffbeb;
}

.status-sync-visa .status-sync-pill {
  border-color: rgba(191, 219, 254, 0.95);
}

.status-sync-visa .status-sync-ico {
  background: #eff6ff;
}

.status-sync-activity .status-sync-ico {
  background: #f0fdf4;
}

.status-sync-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.status-sync-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.status-sync-val {
  font-size: 12.5px;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-chip.status-chip-landed {
  animation: status-chip-land calc(1s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.status-chip.status-chip-landed::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 10px;
  pointer-events: none;
  animation: status-chip-ring calc(1s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1);
}

.status-chip.status-chip-landed-budget {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98) 0%, rgba(255, 255, 255, 0.7) 100%);
}

.status-chip.status-chip-landed-budget::after {
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35);
}

.status-chip.status-chip-landed-flight {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98) 0%, rgba(255, 255, 255, 0.7) 100%);
}

.status-chip.status-chip-landed-flight::after {
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35);
}

.status-chip.status-chip-landed-weather {
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.98) 0%, rgba(255, 255, 255, 0.7) 100%);
}

.status-chip.status-chip-landed-weather::after {
  box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.35);
}

.status-chip.status-chip-landed-rental {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98) 0%, rgba(255, 255, 255, 0.7) 100%);
}

.status-chip.status-chip-landed-rental::after {
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35);
}

.status-chip.status-chip-landed-visa {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98) 0%, rgba(255, 255, 255, 0.7) 100%);
}

.status-chip.status-chip-landed-visa::after {
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35);
}

.status-chip.status-chip-landed-activity {
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.98) 0%, rgba(255, 255, 255, 0.7) 100%);
}

.status-chip.status-chip-landed-activity::after {
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35);
}

.status-chip-val-flash {
  animation: status-val-flash 0.95s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes status-chip-land {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  35% {
    transform: scale(1.045);
    filter: brightness(1.04);
  }
  70% {
    transform: scale(0.99);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes status-chip-ring {
  0% {
    opacity: 0.85;
    box-shadow: 0 0 0 0 currentColor;
    transform: scale(0.96);
  }
  45% {
    opacity: 0.55;
    box-shadow: 0 0 0 6px currentColor;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    box-shadow: 0 0 0 10px transparent;
    transform: scale(1.02);
  }
}

.status-chip.status-chip-landed-budget::after {
  color: rgba(245, 158, 11, 0.28);
}

.status-chip.status-chip-landed-flight::after {
  color: rgba(59, 130, 246, 0.28);
}

.status-chip.status-chip-landed-weather::after {
  color: rgba(14, 165, 233, 0.28);
}

.status-chip.status-chip-landed-rental::after {
  color: rgba(245, 158, 11, 0.28);
}

.status-chip.status-chip-landed-visa::after {
  color: rgba(59, 130, 246, 0.28);
}

.status-chip.status-chip-landed-activity::after {
  color: rgba(34, 197, 94, 0.28);
}

@keyframes status-val-flash {
  0% {
    opacity: 0;
    transform: translateY(7px);
    filter: blur(2px);
  }
  55% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: none;
  }
}

.float-status .status-chip-val {
  /* overflow host — text lives in .status-chip-val-text */
}

@media (prefers-reduced-motion: reduce) {
  .status-chip.status-chip-landed,
  .status-chip.status-chip-landed::after,
  .status-chip-val-flash {
    animation-duration: 0.01ms !important;
  }
}

/* Fixed toast rail — tool call feedback only (messages / mutations stay off-map) */
.map-toast-rail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: min(380px, 62%);
  max-height: min(46vh, 340px);
  overflow: hidden;
  pointer-events: none;
}

.map-toast-rail .map-pulse-card {
  pointer-events: none;
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.map-toast-rail .map-pulse-card.is-leaving {
  animation: map-pulse-leave calc(0.45s / var(--demo-speed, 1)) ease forwards;
}

.float-events {
  position: static;
  align-self: flex-end;
  width: min(300px, 34%);
  max-height: min(42vh, 320px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  min-height: 0;
}

.float-events-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  flex-shrink: 0;
}

.float-events-head h2 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e3a8a;
}

.float-toggle {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  color: #334155;
  cursor: pointer;
}

.float-events .stream-item {
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.22);
}

.float-events .event-stream {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 12px 10px;
  background: transparent;
  overflow: auto;
}

.float-events.collapsed {
  max-height: none;
  height: auto;
  width: auto;
  min-width: 148px;
}

.float-events.collapsed .event-stream {
  display: none;
}

.float-info {
  align-self: flex-end;
  margin-left: auto;
  width: min(360px, 46%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  min-width: 0;
}

.float-info-legend.map-legend,
.float-info .map-legend {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  display: grid;
  grid-template-columns: repeat(4, max-content);
  column-gap: 12px;
  row-gap: 6px;
  justify-content: start;
  align-items: center;
  margin: 0;
  padding: 0;
  max-width: none;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.float-info-legend.map-legend > span,
.float-info .map-legend > span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.2;
}

.float-info-plan h3 {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 700;
}

.float-info-plan ul {
  margin: 0;
  padding-left: 16px;
  color: #3b4a63;
  line-height: 1.4;
  font-size: 11px;
}

.float-info-plan {
  max-height: 140px;
  overflow: auto;
}

.float-plan {
  display: none;
}


.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.day-ribbon-wrap {
  padding: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.day-ribbon {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: thin;
}

.day-chip {
  flex: 0 0 auto;
  width: 84px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(247, 249, 252, 0.42);
  border-radius: 12px;
  padding: 8px 6px;
  display: grid;
  gap: 2px;
  justify-items: center;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.day-chip .day-icon {
  font-size: 16px;
}

.day-chip .day-num {
  font-size: 11px;
  font-weight: 700;
}

.day-chip .day-md {
  font-size: 11px;
  color: var(--muted);
}

.day-chip .day-label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.day-chip.pre,
.day-chip.prep {
  background: #eef2ff;
  border-style: dashed;
}

.day-chip.past {
  opacity: 0.72;
  background: #f3f4f6;
}

.day-chip.upcoming {
  opacity: 0.9;
}

.day-chip.locked {
  opacity: 0.38;
  cursor: not-allowed;
  background: #eef1f5;
  border-style: dashed;
  filter: grayscale(0.35);
}

.day-chip.locked:hover {
  transform: none;
  box-shadow: none;
}

.day-chip.active {
  background: #e8efff;
  border: 2px solid var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.16);
}

.day-chip.active .day-num {
  color: var(--blue-deep);
}

.day-chip.active .day-label {
  color: var(--blue-deep);
  font-weight: 700;
}

.day-chip.pre.active,
.day-chip.prep.active {
  background: #e8efff;
  border-style: solid;
}

.bubble-time {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.55;
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}

.bubble.user .bubble-time {
  color: rgba(255, 255, 255, 0.78);
  opacity: 1;
}

.bubble.system .bubble-time {
  opacity: 0.7;
  margin-bottom: 2px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  flex-shrink: 0;
}

.status-card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  display: flex;
  gap: 10px;
  min-height: 92px;
}

.status-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-soft);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.status-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.status-value {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.status-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
}

.content-grid > .panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.section-title {
  margin: 0;
  padding: 14px 16px 0;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.event-stream {
  /* Map-side timeline removed — tool flow is in the phone chat. */
  display: none !important;
}

.stream-item {
  display: grid;
  grid-template-columns: 72px 28px 1fr;
  gap: 8px;
  align-items: start;
  padding: 10px;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid transparent;
}

.stream-item.kind-mut {
  background: #fff7ed;
  border-color: #fed7aa;
}

.stream-item.kind-world,
.stream-item.kind-app {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.stream-item.kind-weather {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.stream-item.kind-user {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.stream-item.kind-agent-tool {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.stream-item.kind-agent-reply {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.stream-item.kind-agent-state {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.stream-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding-top: 2px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  white-space: pre-line;
}

.stream-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.stream-who {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}

.stream-body {
  font-size: 12px;
  color: #3b4a63;
  line-height: 1.45;
}

.map-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.map-side > #mapPanel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.map-shell {
  margin: 12px 14px 0;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.map-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: clamp(140px, 22vh, 280px);
  height: auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #cfe3f5;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  padding-top: 2px;
  font-size: 11px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.map-legend i {
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 4px;
  vertical-align: middle;
  border-radius: 2px;
}

.map-legend .lg-done {
  background: #1e3a8a;
  height: 4px;
}

.map-legend .lg-route {
  background: transparent;
  border-top: 2px dashed #3b82f6;
  height: 0;
}

.map-legend .lg-road {
  background: #64748b;
  height: 4px;
}

.map-legend .lg-ferry {
  background: #0284c7;
  border-top: 2px dashed #38bdf8;
  height: 0;
}

.map-legend .lg-spur {
  background: #7c3aed;
  border-top: 2px dotted #a78bfa;
  height: 0;
}

.map-legend .lg-close {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e11d48;
}

.map-legend .lg-check {
  background: transparent;
  border-top: 2px dashed rgba(56, 189, 248, 0.75);
  height: 0;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.45);
}

.map-legend .lg-live {
  background: #16a34a;
  height: 4px;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.25);
}

.map-legend .lg-flight {
  background: transparent;
  border-top: 2px dashed #94a3b8;
  height: 0;
}

/* Animated current route (SVG path via Leaflet className) */
.route-live-line {
  stroke-dasharray: 18 16;
  animation: route-dash 2.4s linear infinite;
}

/* Planned / not-yet-driven itinerary — static dashes (no march animation) */
.route-planned-line {
  stroke-linecap: round;
}

/* Agent thinking / tool-driven route preview */
.route-planning-line {
  stroke-dasharray: 12 10;
  stroke-linecap: round;
  animation: route-dash 1.15s linear infinite;
  filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.45));
}

.route-planning-adjust {
  filter: drop-shadow(0 0 4px rgba(217, 119, 6, 0.5));
}

.route-planning-blocked {
  filter: drop-shadow(0 0 4px rgba(225, 29, 72, 0.5));
}

.route-planning-checking {
  filter:
    drop-shadow(0 0 3px rgba(56, 189, 248, 0.85))
    drop-shadow(0 0 12px rgba(14, 165, 233, 0.4));
  animation: route-dash 1.35s linear infinite;
}

.route-planning-clear {
  filter: drop-shadow(0 0 4px rgba(22, 163, 74, 0.45));
}

.flight-plan-line {
  stroke-dasharray: 8 12;
  animation: route-dash 2.8s linear infinite;
  filter: drop-shadow(0 0 1.5px rgba(165, 180, 252, 0.28));
}

.flight-flown-line {
  stroke-linecap: round;
  filter: drop-shadow(0 0 1.5px rgba(148, 163, 184, 0.22));
}

.flight-live-line {
  stroke-linecap: round;
  filter: drop-shadow(0 0 2px rgba(148, 163, 184, 0.3));
}

.map-flight-plane-wrap {
  background: transparent !important;
  border: none !important;
}

.map-flight-plane {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
  /* ✈️ emoji noses ~NE (45°); subtract so --brg (geo bearing from N) matches destination. */
  transform: rotate(calc(var(--brg, 135deg) - 45deg));
  transform-origin: center center;
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.35));
  transition: transform 0.12s linear;
}

.map-drive-hop-wrap {
  background: transparent !important;
  border: none !important;
}

.map-drive-hop-car {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.35));
  animation: drive-hop-bob 0.35s ease-in-out infinite alternate;
}

@keyframes drive-hop-bob {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-2px);
  }
}

@keyframes route-dash {
  to {
    stroke-dashoffset: -26;
  }
}

.map-planning-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(37, 99, 235, 0.28);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 600;
  color: #1e3a8a;
  pointer-events: none;
}

.map-planning-badge[hidden] {
  display: none !important;
}

.map-agent-plan-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 11.5px;
  font-weight: 650;
  color: #6d28d9;
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

.map-agent-plan-badge.is-fading {
  opacity: 0;
  transform: translateY(-4px);
}

.map-agent-plan-badge[hidden] {
  display: none !important;
}

.map-planning-badge[data-mode="adjust"] {
  border-color: rgba(217, 119, 6, 0.4);
  color: #9a3412;
}

.map-planning-badge[data-mode="blocked"] {
  border-color: rgba(225, 29, 72, 0.4);
  color: #9f1239;
}

.map-planning-badge[data-mode="checking"] {
  border-color: rgba(56, 189, 248, 0.45);
  color: #0369a1;
  background: rgba(224, 242, 254, 0.72);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.map-planning-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
  animation: planning-dot 1.2s ease-out infinite;
}

.map-planning-badge[data-mode="adjust"] .map-planning-dot {
  background: #d97706;
}

.map-planning-badge[data-mode="blocked"] .map-planning-dot {
  background: #e11d48;
}

.map-planning-badge[data-mode="checking"] .map-planning-dot {
  background: #38bdf8;
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5);
}

@keyframes planning-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.map-legend .lg-plan {
  background: transparent;
  border-top: 2px dashed #2563eb;
  height: 0;
}

.map-legend .lg-stay {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.45);
}

.map-stay-wrap {
  background: transparent !important;
  border: none !important;
}

.map-stay-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transform: translateY(-2px);
}

.map-stay-day {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(160deg, #c4b5fd, #a78bfa);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.28);
  border: 2px solid #fff;
}

.map-stay-marker.is-multi .map-stay-day {
  min-width: 40px;
  padding: 0 8px;
  background: linear-gradient(160deg, #a78bfa, #7c3aed);
  letter-spacing: 0;
}

.map-stay-marker.is-multi .map-stay-name {
  max-width: 88px;
}

.map-stay-name {
  max-width: 72px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-left: none; /* avoid looking like a "|" before MM/DD */
  color: #6d28d9;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

/* —— Map action overlays: search / notion / calendar —— */
.map-action-stage {
  width: min(520px, 96%);
  max-height: min(28vh, 220px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}

.map-action-stage.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Hand off to status-sync fly: fade up slightly instead of hard cut. */
.map-action-stage.is-handing-off {
  opacity: 0;
  transform: translateY(-14px) scale(0.96);
  transition:
    opacity 0.2s ease,
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.map-action-stage[hidden] {
  display: none !important;
}

.map-action-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  padding: 10px 12px 12px;
  max-height: min(28vh, 220px);
  display: flex;
  flex-direction: column;
}

.map-action-status {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 999px;
  padding: 3px 9px;
}

.map-action-stage.is-done .map-action-status {
  color: #15803d;
  background: #ecfdf5;
}

.map-action-search-logo {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.map-action-search-logo span {
  color: #2563eb;
}

.map-action-search-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-action-search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid #dbe3f0;
  background: #f8fafc;
  min-height: 38px;
}

.map-action-search-ico {
  font-size: 14px;
}

.map-action-search-query {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.map-action-caret {
  color: #2563eb;
  animation: blink 1s step-end infinite;
}

.map-action-search-meta {
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
}

.map-action-search-results {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 110px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.map-action-search-row {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  animation: map-action-row-in 0.35s ease both;
}

.map-action-search-row-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1d4ed8;
}

.map-action-search-row-snip {
  margin-top: 2px;
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
}

.map-action-search-row-url {
  margin-top: 2px;
  font-size: 10px;
  color: #16a34a;
}

.map-action-notion-head,
.map-action-cal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.map-action-notion-ico,
.map-action-cal-ico {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 18px;
}

.map-action-notion-app,
.map-action-cal-app {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.map-action-notion-title,
.map-action-cal-title {
  font-size: 13px;
  font-weight: 750;
  color: #0f172a;
}

.map-action-notion-body {
  position: relative;
  max-height: 88px;
  overflow: hidden;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1 1 auto;
  min-height: 0;
}

.map-action-notion-stream {
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
}

.map-action-cal-event {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 48px;
}

.map-action-cal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, #fff7ed 0%, #f8fafc 100%);
  border: 1px solid #fed7aa;
  animation: map-action-row-in 0.35s ease both;
}

.map-action-cal-label {
  font-size: 12px;
  font-weight: 600;
  color: #78716c;
  flex: 0 0 auto;
}

.map-action-cal-value {
  font-size: 13px;
  font-weight: 750;
  color: #9a3412;
  text-align: right;
}

.map-action-cal-foot {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #fed7aa;
  font-size: 11.5px;
  font-weight: 700;
  color: #c2410c;
}

.map-action-cal-foot.show {
  display: flex;
}

.map-action-notion-caret {
  display: inline-block;
  margin-left: 1px;
  color: #2563eb;
  font-weight: 700;
  animation: map-action-caret-blink 0.7s steps(1) infinite;
}

.map-action-stage.is-done .map-action-notion-caret {
  display: none;
}

@keyframes map-action-caret-blink {
  50% {
    opacity: 0;
  }
}

.map-action-notion-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  color: #15803d;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.map-action-notion-foot.show {
  opacity: 1;
  transform: translateY(0);
}

.map-action-notion-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 800;
}

.map-action-notion-line,
.map-action-cal-line {
  font-size: 12px;
  line-height: 1.45;
  color: #334155;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f8fafc;
  border-left: 3px solid #2563eb;
  animation: map-action-row-in 0.35s ease both;
}

.map-action-cal-line {
  border-left-color: #d97706;
}

/* —— Budget wallet cinematic —— */
.map-action-budget {
  padding-top: 12px;
}

.map-action-budget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.map-action-budget-app {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a8a29e;
}

.map-action-budget-title {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  color: #1c1917;
  letter-spacing: -0.01em;
}

.map-action-budget-hero {
  padding: 10px 12px 12px;
  border-radius: 12px;
  background: linear-gradient(165deg, #fafaf9 0%, #f5f5f4 100%);
  border: 1px solid #e7e5e4;
  margin-bottom: 8px;
}

.map-action-budget-hero-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #a8a29e;
  letter-spacing: 0.02em;
}

.map-action-budget-hero-value {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #1c1917;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  animation: budget-hero-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.map-action-budget-meter {
  margin-top: 10px;
  height: 4px;
  border-radius: 999px;
  background: #e7e5e4;
  overflow: hidden;
}

.map-action-budget-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #d6d3d1, #78716c);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.map-action-budget-meter-cap {
  margin-top: 6px;
  font-size: 10.5px;
  color: #a8a29e;
}

.map-action-budget-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.map-action-budget-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #f5f5f4;
  animation: map-action-row-in 0.32s ease both;
}

.map-action-budget-label {
  font-size: 10px;
  font-weight: 600;
  color: #a8a29e;
}

.map-action-budget-value {
  font-size: 12.5px;
  font-weight: 700;
  color: #292524;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-action-budget-foot {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f5f5f4;
  font-size: 11px;
  font-weight: 600;
  color: #78716c;
}

.map-action-write {
  min-width: min(280px, 86vw);
  max-width: min(340px, 92vw);
}

.map-action-write-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.map-action-write-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: #fff7ed;
  flex-shrink: 0;
}

.map-action-write-app {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.map-action-write-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.map-action-write-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-action-write-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #f1f5f9;
  animation: map-action-row-in 0.32s ease both;
}

.map-action-write-label {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}

.map-action-write-value {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-action-write-foot {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.map-action-write-foot.show {
  display: flex;
}

.map-action-budget-foot.show {
  display: flex;
}

@keyframes budget-hero-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Flight boarding-pass cinematic —— */
.map-action-flight {
  position: relative;
  padding: 12px 12px 12px 16px;
  overflow: hidden;
}

.map-action-flight-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.map-action-flight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.map-action-flight-app {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.map-action-flight-no {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.map-action-flight-badge {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 3px 9px;
  animation: flight-badge-in 0.4s ease both;
}

.map-action-flight-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  font-size: 12.5px;
  font-weight: 650;
  color: #0f172a;
}

.map-action-flight-route.is-empty {
  display: none;
}

.map-action-flight-route > span:first-child {
  text-align: left;
}

.map-action-flight-route > span:last-child {
  text-align: right;
}

.map-action-flight-plane {
  color: #64748b;
  font-size: 13px;
  animation: flight-plane-nudge 1.6s ease-in-out infinite;
}

.map-action-flight-rows {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-action-flight-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 72px;
  padding: 6px 8px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid #f1f5f9;
  animation: map-action-row-in 0.3s ease both;
}

.map-action-flight-label {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}

.map-action-flight-value {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.map-action-flight-foot {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.map-action-flight-foot.show {
  display: flex;
}

@keyframes flight-badge-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes flight-plane-nudge {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
}

/* —— Weather cinematic —— */

/* —— Weather service cinematic —— */
.map-action-weather-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.map-action-weather-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(160deg, #e0f2fe, #bae6fd);
  font-size: 18px;
  flex-shrink: 0;
}

.map-action-weather-app {
  font-size: 11px;
  font-weight: 700;
  color: #0369a1;
  letter-spacing: 0.02em;
}

.map-action-weather-title {
  font-size: 13.5px;
  font-weight: 750;
  color: #0f172a;
}

.map-action-weather-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.map-action-weather-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f0f9ff 0%, #f8fafc 100%);
  border: 1px solid #bae6fd;
  animation: map-action-row-in 0.35s ease both;
}

.map-action-weather-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.map-action-weather-value {
  font-size: 13px;
  font-weight: 750;
  color: #0c4a6e;
  text-align: right;
}

.map-action-weather-foot {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #bae6fd;
  font-size: 11.5px;
  font-weight: 700;
  color: #0369a1;
}

.map-action-weather-foot.show {
  display: flex;
}

@keyframes map-action-row-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.map-emoji-icon {
  background: transparent !important;
  border: none !important;
}

.map-emoji {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 5px rgba(15, 23, 42, 0.28));
}

.activity-emoji.pulse .map-emoji {
  animation: emoji-pulse 1.6s ease-in-out infinite;
}

.traveler-emoji .map-emoji {
  animation: emoji-bob 0.9s ease-in-out infinite;
}

/* —— Distinct "现在 / you are here" marker —— */
.map-here-wrap {
  background: transparent !important;
  border: none !important;
}

.map-here-marker {
  position: relative;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: none;
}

.map-here-orb {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.map-here-pulse,
.map-here-pulse-late {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  border: 2px solid rgba(22, 163, 74, 0.55);
  animation: map-here-pulse 2.2s ease-out infinite;
}

.map-here-pulse-late {
  animation-delay: 1.1s;
  border-color: rgba(34, 197, 94, 0.4);
}

.map-here-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffffff 0%, #ecfdf5 100%);
  border: 3px solid #16a34a;
  box-shadow:
    0 0 0 3px rgba(22, 163, 74, 0.18),
    0 8px 20px rgba(15, 23, 42, 0.28);
}

.map-here-emoji {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.15));
}

/* Hang under the orb, slightly overlapping the circle rim */
.map-here-tag {
  position: absolute;
  left: 50%;
  bottom: -7px;
  z-index: 4;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.45);
}

/* Activity label under the overlapping 「现在」 tag */
.map-here-caption {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  max-width: 88px;
  margin-top: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(22, 163, 74, 0.28);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
  color: #14532d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* English activity phrases are longer — show fuller text, wrap to 2 lines */
.map-here-wrap.is-en .map-here-caption {
  max-width: 150px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
  border-radius: 10px;
}

@keyframes map-here-pulse {
  0% {
    transform: scale(0.72);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.55);
    opacity: 0;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

/* Transient timeline feedback on the map */
.map-event-pulse {
  background: transparent !important;
  border: none !important;
}

.map-event-ping {
  background: transparent !important;
  border: none !important;
}

.map-ping-ico {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-size: 18px;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.3));
  animation: map-pulse-enter 0.35s ease both;
}

.map-ping-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.5);
  animation: map-pulse-ring 1.2s ease-out infinite;
}

/* Weather tool: emoji floats above the place pin / here-orb */
.map-weather-emoji-wrap {
  background: transparent !important;
  border: none !important;
}

.map-weather-emoji {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  transform-origin: 50% 100%;
  animation: map-weather-pop 0.45s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.map-weather-emoji.is-leaving {
  animation: map-weather-leave 0.4s ease forwards;
}

.map-weather-emoji-ico {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.12));
}

.map-weather-emoji-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.55);
  animation: map-pulse-ring 1.15s ease-out infinite;
}

@keyframes map-weather-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.6);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes map-weather-leave {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.85);
  }
}

.map-pulse-card {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 280px;
  min-width: 160px;
  padding: 8px 12px 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform-origin: 50% 100%;
  animation: map-pulse-enter calc(0.45s / var(--demo-speed, 1)) cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.map-pulse-ring {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.55);
  animation: map-pulse-ring 1.4s ease-out infinite;
  pointer-events: none;
}

.map-pulse-ico {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  margin-top: 1px;
}

.map-pulse-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-top: 1px;
}

.map-pulse-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.map-pulse-detail {
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

/* SMS / email: emoji ping on the traveler marker (shake, no text bubble) */
.map-sms-ping-wrap {
  background: transparent !important;
  border: none !important;
}

.map-sms-ping {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.28));
  animation: map-sms-ping-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.map-sms-ping.is-leaving {
  animation: map-sms-ping-out 0.35s ease forwards;
}

.map-sms-ping-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #fbbf24;
  font-size: 20px;
  line-height: 1;
  animation: map-sms-shake 0.42s ease-in-out 4;
}

@keyframes map-sms-ping-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.6);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes map-sms-ping-out {
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.85);
  }
}

@keyframes map-sms-shake {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  12% {
    transform: translateX(-4px) rotate(-10deg);
  }
  24% {
    transform: translateX(4px) rotate(10deg);
  }
  36% {
    transform: translateX(-3px) rotate(-8deg);
  }
  48% {
    transform: translateX(3px) rotate(8deg);
  }
  60% {
    transform: translateX(-2px) rotate(-4deg);
  }
  72% {
    transform: translateX(2px) rotate(4deg);
  }
}

/* Place-anchored message bubble — tip sits on latlng (0×0 Leaflet icon) */
.map-place-bubble-wrap,
.map-sms-wrap {
  background: transparent !important;
  border: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: visible !important;
}

.map-place-bubble-anchor,
.map-sms-anchor {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.map-place-bubble {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 140px;
  max-width: 220px;
  margin: 0 0 10px;
  padding: 8px 11px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: map-place-bubble-in 0.4s cubic-bezier(0.2, 0.9, 0.2, 1) both;
  transform-origin: 50% 100%;
}

.map-place-bubble.is-leaving {
  animation: map-place-bubble-out 0.45s ease forwards;
}

.map-place-bubble-ico {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  margin-top: 1px;
}

.map-place-bubble-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.map-place-bubble-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  word-break: break-word;
}

.map-place-bubble-detail {
  font-size: 10.5px;
  font-weight: 500;
  color: #475569;
  line-height: 1.35;
  word-break: break-word;
}

/* Tip apex lands on latlng (anchor bottom = 0) */
.map-place-bubble-pin {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: rgba(255, 255, 255, 0.95);
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  transform: rotate(45deg);
  box-shadow: 2px 2px 4px rgba(15, 23, 42, 0.06);
}

/* —— Map SMS / 邮件 bubble (amber, matches phone chat) —— */
.map-sms-bubble {
  position: relative;
  width: min(240px, 92vw);
  margin: 0 0 10px;
  padding: 8px 10px 10px;
  border-radius: 16px 16px 16px 6px;
  background: linear-gradient(165deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid rgba(217, 119, 6, 0.32);
  box-shadow: 0 12px 28px rgba(180, 83, 9, 0.16);
  animation: map-sms-in 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
  transform-origin: 50% 100%;
}

.map-sms-bubble.is-leaving {
  animation: map-sms-out 0.4s ease forwards;
}

.map-sms-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.map-sms-badge {
  flex-shrink: 0;
  padding: 1px 7px;
  border-radius: 999px;
  background: #d97706;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.map-sms-bubble.is-mail .map-sms-badge {
  background: #b45309;
}

.map-sms-from {
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-sms-body {
  font-size: 12px;
  font-weight: 560;
  color: #78350f;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.map-sms-pin {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: #fef3c7;
  border-right: 1px solid rgba(217, 119, 6, 0.32);
  border-bottom: 1px solid rgba(217, 119, 6, 0.32);
  transform: rotate(45deg);
}

@keyframes map-sms-in {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.82);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes map-sms-out {
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.94);
  }
}

@keyframes map-place-bubble-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes map-place-bubble-out {
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.94);
  }
}

.map-pulse-label {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.2;
}

.map-event-pulse.is-leaving .map-pulse-card {
  animation: map-pulse-leave calc(0.5s / var(--demo-speed, 1)) ease forwards;
}

.pulse-weather .map-pulse-ring {
  border-color: rgba(14, 165, 233, 0.55);
}
.pulse-routine .map-pulse-ring,
.pulse-agent_tool .map-pulse-ring {
  border-color: rgba(22, 163, 74, 0.55);
}
.pulse-agent_state .map-pulse-ring,
.pulse-app_notification .map-pulse-ring {
  border-color: rgba(217, 119, 6, 0.55);
}
.pulse-notification .map-pulse-ring {
  border-color: rgba(225, 29, 72, 0.45);
}

@keyframes map-pulse-enter {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.72);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes map-pulse-leave {
  to {
    opacity: 0;
    transform: translateY(-18px) scale(0.9);
  }
}

@keyframes map-pulse-ring {
  0% {
    transform: scale(0.7);
    opacity: 0.85;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

.home-status-tag {
  background: transparent !important;
  border: none !important;
}

.home-status-pill {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.activity-status-tag {
  background: transparent !important;
  border: none !important;
}

.activity-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 4px 10px 4px 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  transform-origin: left center;
}

.activity-status-pill.pulse {
  animation: emoji-pulse 1.6s ease-in-out infinite;
}

.activity-status-emoji {
  font-size: 15px;
  line-height: 1;
}

.hotel-mark-wrap {
  background: transparent !important;
  border: none !important;
}

.hotel-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  pointer-events: auto;
}

.hotel-mark-face {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff7ed;
  border: 1.5px solid #f97316;
  box-shadow: 0 1px 4px rgba(194, 65, 12, 0.2);
}

.hotel-mark-emoji {
  font-size: 11px;
  line-height: 1;
  display: block;
  transform: translateY(0.5px);
}

.hotel-mark-ring,
.hotel-mark-burst {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

.hotel-mark.is-flash .hotel-mark-ring,
.hotel-mark.is-flash-cancel .hotel-mark-ring {
  opacity: 1;
  border: 2px solid rgba(249, 115, 22, 0.55);
  animation: hotelMarkRing calc(0.9s / var(--demo-speed, 1)) ease-out infinite;
}

.hotel-mark.is-flash .hotel-mark-burst,
.hotel-mark.is-flash-cancel .hotel-mark-burst {
  opacity: 1;
  background: rgba(251, 146, 60, 0.3);
  animation: hotelMarkBurst calc(0.65s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hotel-mark.is-flash .hotel-mark-face {
  animation: hotelMarkPop calc(0.55s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hotel-mark.is-flash-cancel .hotel-mark-face,
.hotel-mark.is-cancel .hotel-mark-face {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 1px 4px rgba(185, 28, 28, 0.25);
  animation: hotelMarkShake calc(0.55s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hotel-mark.is-flash-cancel .hotel-mark-ring {
  border-color: rgba(239, 68, 68, 0.6);
}

.hotel-mark.is-flash-cancel .hotel-mark-burst {
  background: rgba(248, 113, 113, 0.35);
}

.hotel-mark.is-remove .hotel-mark-face {
  animation: hotelMarkRemove 0.32s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.hotel-mark.is-remove .hotel-mark-ring,
.hotel-mark.is-remove .hotel-mark-burst {
  opacity: 0;
}

@keyframes hotelMarkPop {
  0% {
    opacity: 0;
    transform: scale(0.35);
  }
  70% {
    opacity: 1;
    transform: scale(1.18);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes hotelMarkShake {
  0% {
    opacity: 0.6;
    transform: scale(0.85);
  }
  35% {
    opacity: 1;
    transform: scale(1.12) rotate(-7deg);
  }
  70% {
    transform: scale(1.04) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

@keyframes hotelMarkRing {
  0% {
    transform: scale(0.85);
    opacity: 0.85;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

@keyframes hotelMarkBurst {
  0% {
    transform: scale(0.5);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@keyframes hotelMarkRemove {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.2);
  }
}

/* Legacy hotel FX card styles kept for older cached bundles; unused by current pin. */
.hotel-badge {
  background: transparent !important;
  border: none !important;
}

.hotel-badge-pill {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1.5px solid #fb923c;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}

/* Hotel book / cancel cinematic pin + info card */
.map-hotel-fx-wrap {
  background: transparent !important;
  border: none !important;
}

.map-hotel-fx {
  position: relative;
  width: 220px;
  height: 110px;
  pointer-events: none;
}

.map-hotel-fx-pin {
  position: absolute;
  left: 8px;
  bottom: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(165deg, #fff 0%, #fff7ed 100%);
  border: 2.5px solid #f97316;
  box-shadow:
    0 10px 24px rgba(194, 65, 12, 0.28),
    0 0 0 4px rgba(251, 146, 60, 0.22);
  transform-origin: center bottom;
}

.map-hotel-fx-h {
  font-size: 20px;
  font-weight: 800;
  color: #ea580c;
  line-height: 1;
  font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
}

.map-hotel-fx-ring,
.map-hotel-fx-burst {
  position: absolute;
  left: 8px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  pointer-events: none;
}

.map-hotel-fx-ring {
  border: 2px solid rgba(249, 115, 22, 0.55);
  animation: hotelFxRing 1.1s ease-out infinite;
}

.map-hotel-fx-burst {
  background: rgba(251, 146, 60, 0.28);
  animation: hotelFxBurst 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.map-hotel-fx-card {
  position: absolute;
  left: 58px;
  top: 12px;
  z-index: 3;
  min-width: 140px;
  max-width: 160px;
  padding: 8px 10px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(253, 186, 116, 0.95);
  box-shadow: 0 12px 28px rgba(154, 52, 18, 0.16);
  transform-origin: left center;
}

.map-hotel-fx-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ea580c;
  margin-bottom: 2px;
}

.map-hotel-fx.is-cancel .map-hotel-fx-kicker {
  color: #dc2626;
}

.map-hotel-fx.is-cancel .map-hotel-fx-pin {
  border-color: #ef4444;
  box-shadow:
    0 10px 24px rgba(185, 28, 28, 0.25),
    0 0 0 4px rgba(248, 113, 113, 0.2);
}

.map-hotel-fx.is-cancel .map-hotel-fx-h {
  color: #dc2626;
}

.map-hotel-fx.is-cancel .map-hotel-fx-ring {
  border-color: rgba(239, 68, 68, 0.55);
}

.map-hotel-fx.is-cancel .map-hotel-fx-card {
  border-color: rgba(252, 165, 165, 0.95);
}

.map-hotel-fx-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-hotel-fx-meta {
  margin-top: 2px;
  font-size: 10.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-hotel-fx.is-book .map-hotel-fx-pin {
  animation: hotelFxPopIn calc(0.55s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.map-hotel-fx.is-book .map-hotel-fx-card {
  animation: hotelFxCardIn calc(0.45s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.map-hotel-fx.is-cancel .map-hotel-fx-pin {
  animation: hotelFxShakeIn calc(0.5s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.map-hotel-fx.is-cancel .map-hotel-fx-card {
  animation: hotelFxCardIn calc(0.4s / var(--demo-speed, 1)) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.map-hotel-fx.is-card-out .map-hotel-fx-card {
  animation: hotelFxCardOut calc(0.35s / var(--demo-speed, 1)) ease forwards;
}

.map-hotel-fx.is-settle .map-hotel-fx-pin {
  animation: hotelFxSettle calc(0.45s / var(--demo-speed, 1)) ease forwards;
}

.map-hotel-fx.is-settle .map-hotel-fx-ring,
.map-hotel-fx.is-settle .map-hotel-fx-burst {
  opacity: 0;
}

.map-hotel-fx.is-remove .map-hotel-fx-pin {
  animation: hotelFxRemove 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.map-hotel-fx.is-remove .map-hotel-fx-ring,
.map-hotel-fx.is-remove .map-hotel-fx-burst {
  opacity: 0;
}

@keyframes hotelFxPopIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.35);
  }
  70% {
    opacity: 1;
    transform: translateY(-4px) scale(1.12);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hotelFxShakeIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1.08) rotate(-6deg);
  }
  70% {
    transform: scale(1.02) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

@keyframes hotelFxCardIn {
  from {
    opacity: 0;
    transform: translateX(-8px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes hotelFxCardOut {
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
}

@keyframes hotelFxSettle {
  to {
    transform: scale(0.72);
    opacity: 0.85;
  }
}

@keyframes hotelFxRemove {
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.2);
  }
}

@keyframes hotelFxRing {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

@keyframes hotelFxBurst {
  0% {
    transform: scale(0.4);
    opacity: 0.55;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-hotel-fx-pin,
  .map-hotel-fx-card,
  .map-hotel-fx-ring,
  .map-hotel-fx-burst {
    animation: none !important;
  }
}

@keyframes emoji-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

@keyframes emoji-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.map-canvas,
.map-host,
.leaflet-host {
  height: 100%;
  min-height: clamp(140px, 22vh, 280px);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  background: #cfe3f5;
  border: 1px solid var(--line);
  z-index: 0;
}

.map-frame .map-host,
.map-frame .map-canvas {
  height: 100%;
  border: none;
  border-radius: 0;
}

.map-fallback {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.map-banner {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  bottom: auto;
  max-width: min(88%, 320px);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255, 245, 245, 0.96);
  color: #9f1239;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  padding: 6px 8px 6px 10px;
  font-size: 11px;
  line-height: 1.35;
  z-index: 450;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  animation: map-banner-in 0.25s ease-out;
}

.map-banner[hidden] {
  display: none !important;
}

.map-banner-text {
  flex: 1;
  min-width: 0;
}

.map-banner-dismiss {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: -2px -2px 0 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #9f1239;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.map-banner-dismiss:hover {
  opacity: 1;
  background: rgba(159, 18, 57, 0.08);
}

@keyframes map-banner-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.closure-tag {
  background: transparent !important;
  border: none !important;
  z-index: 450 !important;
}

.closure-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 241, 242, 0.96);
  color: #be123c;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  line-height: 1.2;
  pointer-events: auto;
}

.closure-tag-left .closure-pill {
  transform: translateX(0);
}

.closure-tag-right .closure-pill {
  transform: translateX(0);
}

.closure-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e11d48;
  flex-shrink: 0;
}

/* Traffic-check result pills on planning overlay */
.check-tag {
  background: transparent !important;
  border: none !important;
  /* Let pill size to content — Leaflet iconSize is set in JS to match. */
  overflow: visible !important;
}

.check-tag .check-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: none;
  width: max-content;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
  pointer-events: auto;
  animation: check-pill-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}

.check-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.check-pill-checking {
  background: rgba(240, 249, 255, 0.96);
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.check-pill-checking::before {
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.check-pill-blocked {
  background: rgba(255, 241, 242, 0.96);
  color: #be123c;
  border: 1px solid #fecdd3;
}
.check-pill-blocked::before {
  background: #e11d48;
}

.check-pill-clear {
  background: rgba(240, 253, 244, 0.96);
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.check-pill-clear::before {
  background: #22c55e;
}

.check-pill-warn {
  background: rgba(255, 251, 235, 0.96);
  color: #b45309;
  border: 1px solid #fde68a;
}
.check-pill-warn::before {
  background: #f59e0b;
}

@keyframes check-pill-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.plan-block,
.impact-box {
  margin: 10px 14px 14px;
  font-size: 12px;
  flex-shrink: 0;
}

.plan-block h3,
.impact-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
}

.plan-block ul,
.impact-box ul {
  margin: 0;
  padding-left: 18px;
  color: #3b4a63;
  line-height: 1.5;
}

.impact-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 10px 12px;
}

.impact-hint {
  margin: 8px 0 0;
  color: var(--amber);
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(26, 35, 50, 0.92);
  color: #e8eef8;
  border-radius: var(--radius);
  font-size: 12px;
  flex-shrink: 0;
}

.footer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  opacity: 0.92;
}

.footer-bar .btn {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* —— Phone —— */
.phone-col {
  display: flex;
  align-items: stretch;
  position: relative;
  top: auto;
  height: 100%;
  max-height: 100%;
  align-self: stretch;
  min-height: 0;
  min-width: 0;
}

.phone {
  width: 100%;
  height: 100%;
  max-height: 100%;
  background: #0f172a;
  border-radius: 30px;
  padding: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.phone-screen {
  background: #f4f7fb;
  border-radius: 22px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  position: relative;
}

.phone-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), #60a5fa);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.phone-header h2 {
  margin: 0;
  font-size: 14px;
}

.agent-status {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--green);
}

.agent-status.offline {
  color: var(--amber);
}

.chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Avoid width jump when the vertical scrollbar appears mid-stream. */
  scrollbar-gutter: stable;
}

.bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  animation: rise 0.2s ease;
  box-sizing: border-box;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.bubble.agent {
  align-self: flex-start;
  /* Stable width — don't shrink/grow as thinking / tools stream in. */
  width: 92%;
  max-width: 92%;
  background: #fff;
  border: 1px solid var(--line);
}

.bubble.user {
  align-self: flex-end;
  width: 92%;
  max-width: 92%;
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.bubble.system {
  align-self: center;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  max-width: 95%;
  text-align: center;
}

/* Incoming SMS / Mail cards in phone chat — Messages / Mail style */
.bubble.sms-in {
  align-self: flex-start;
  max-width: 90%;
  padding: 0;
  background: transparent;
  border: none;
  animation: sms-arrive 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
}

.bubble.sms-in .sms-shell.imessage-card {
  padding: 8px 10px 10px;
  border-radius: 18px 18px 18px 5px;
  background: #e9e9eb;
  border: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.bubble.sms-in .sms-shell.mail-card {
  padding: 10px 12px 11px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.bubble.sms-in .sms-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.bubble.sms-in .sms-meta > div {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.bubble.sms-in .sms-badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: #34c759;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.bubble.sms-in.mail-in .mail-card-meta em,
.bubble.sms-in.mail-in .sms-badge {
  background: #0a84ff;
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
}

.bubble.sms-in .sms-from {
  font-size: 12px;
  font-weight: 700;
  color: #111;
}

.bubble.sms-in .sms-text {
  font-size: 13.5px;
  line-height: 1.45;
  color: #111;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble.sms-in .mail-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.bubble.sms-in .mail-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.bubble.sms-in .mail-card-meta strong {
  font-size: 12.5px;
  color: #111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bubble.sms-in .mail-card-subject {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin-bottom: 3px;
}

.bubble.sms-in.mail-in .sms-text {
  font-size: 12px;
  color: #4b5563;
}

.bubble.sms-in .bubble-time {
  text-align: left;
  margin-bottom: 4px;
}

@keyframes sms-arrive {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.9);
  }
  55% {
    opacity: 1;
    transform: translateY(-3px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

.bubble.welcome-guide {
  align-self: stretch;
  max-width: 100%;
  background: linear-gradient(165deg, #f0f6ff 0%, #ffffff 55%);
  border: 1px solid #c7d7fe;
  padding: 12px 12px 10px;
  text-align: left;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.welcome-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 8px;
}

.welcome-steps {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.welcome-steps li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.welcome-steps li.active {
  color: #1e293b;
  font-weight: 600;
}

.welcome-steps li.done {
  color: #059669;
}

.welcome-steps .ws-num {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.welcome-steps li.active .ws-num {
  background: #2563eb;
  color: #fff;
}

.welcome-steps li.done .ws-num {
  background: #10b981;
  color: #fff;
}

.welcome-status {
  font-size: 11.5px;
  padding: 6px 8px;
  border-radius: 8px;
  margin-bottom: 10px;
  line-height: 1.35;
}

.welcome-status.ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.welcome-status.warn {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

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

.welcome-btn {
  flex: 1 1 auto;
  min-width: 7.5em;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: var(--ink);
}

.welcome-btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.welcome-btn.ghost:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.welcome-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.welcome-foot {
  margin-top: 8px;
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.4;
}

#btnAutoplay.guide-pulse {
  animation: guide-pulse 1.2s ease-in-out 3;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.28);
}

@keyframes guide-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

.bubble-name {
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 4px;
  opacity: 0.75;
}

.bubble.user .bubble-name {
  color: rgba(255, 255, 255, 0.85);
}

.bubble.streaming .answer-text:not(:empty)::after,
.bubble.streaming .bubble-text:not(.answer-text)::after {
  content: "▍";
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* —— Agent turn: thinking + tools as a timeline rail —— */
.agent-turn {
  width: 92%;
  max-width: 92%;
  min-width: 0;
}

.turn-header-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 10px;
  padding: 7px 11px;
  border-radius: 10px;
  background: linear-gradient(90deg, #fffbeb 0%, #f8fafc 100%);
  border: 1px solid rgba(217, 119, 6, 0.28);
  font-size: 12px;
  color: #92400e;
}

.turn-header-bar[hidden] {
  display: none !important;
}

.turn-header-bar .turn-header-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

.turn-header-bar .turn-header-label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.turn-header-bar .turn-header-value {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: #78350f;
}

.agent-rail {
  position: relative;
  margin: 2px 0 12px;
  padding: 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.agent-rail[hidden] {
  display: none !important;
}

.rail-step {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 10px;
  align-items: stretch;
  position: relative;
}

.rail-gutter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
}

.rail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c5cedc;
  box-shadow: 0 0 0 3px #fff;
  z-index: 1;
  flex: 0 0 auto;
}

.rail-dot.think {
  background: #64748b;
  width: 7px;
  height: 7px;
}

.rail-line {
  flex: 1 1 auto;
  width: 1px;
  margin-top: 4px;
  background: #e2e8f0;
  min-height: 12px;
}

.rail-step:last-child .rail-line,
.rail-think .rail-line {
  display: none;
}

.rail-body {
  min-width: 0;
  padding: 2px 0 10px;
}

/* Thinking — collapsed by default; click header to expand quote */
.rail-think .rail-body {
  padding-bottom: 6px;
}

.rail-think-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 2px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.rail-think-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 0;
}

.rail-think-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.rail-think-secs {
  font-size: 10.5px;
  color: #cbd5e1;
}

.rail-think-chevron {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  margin-left: 8px;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4.5px solid #cbd5e1;
  transition: transform 0.15s ease;
}

.rail-think.is-collapsed .rail-think-chevron {
  transform: rotate(-90deg);
}

.rail-think-body {
  margin-top: 4px;
}

.rail-think.is-collapsed .rail-think-body {
  display: none !important;
}

.rail-think-quote {
  margin: 0;
  padding: 0 0 0 10px;
  border-left: 2px solid #cbd5e1;
}

.rail-think-summary {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 13.5px;
  line-height: 1.55;
  color: #334155;
  font-style: italic;
}

.rail-think-full {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 12.5px;
  line-height: 1.6;
  color: #64748b;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow: auto;
}

.rail-think-full[hidden] {
  display: none !important;
}

.rail-think-more {
  margin-top: 6px;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rail-think-more[hidden] {
  display: none !important;
}

.rail-think.thinking .rail-think-label {
  background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 45%, #94a3b8 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: think-shimmer 1.4s linear infinite;
}

@keyframes think-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* 「正在使用工具」— one white card: header + tool rows */
.tool-panel {
  margin: 2px 0 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tool-panel[hidden] {
  display: none !important;
}

.tool-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: #111827;
}

.tool-panel.is-collapsed .tool-panel-head {
  border-bottom: none;
}

.tool-panel-title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #111827;
}

/* CSS chevron: ▾ expanded / ▸ collapsed — avoids font caret glitches */
.tool-panel-chevron {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  margin-left: 8px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #9ca3af;
  transition: transform 0.15s ease;
}

.tool-panel.is-collapsed .tool-panel-chevron {
  transform: rotate(-90deg);
}

.tool-panel-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 8px 8px;
  background: #fff;
}

.tool-panel.is-collapsed .tool-panel-body,
.tool-panel.is-collapsed .rail-collapse-wrap {
  display: none !important;
}

.tool-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 16px;
  align-items: center;
  column-gap: 8px;
  padding: 5px 4px;
  border-radius: 8px;
}

.tool-step.is-collapsed-away {
  display: none !important;
}

.tool-step.is-group:hover {
  background: #f9fafb;
}

.tool-step-ico {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #eff6ff;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.tool-step-main {
  min-width: 0;
  padding-top: 0;
}

.tool-step-static {
  display: block;
  min-width: 0;
}

.tool-step-hit {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.tool-step-title {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  line-height: 1.25;
}

.tool-step-count {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
}

.tool-step-sub {
  margin-top: 1px;
  font-size: 10.5px;
  color: #6b7280;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-step-status {
  width: 15px;
  height: 15px;
  margin-top: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.tool-step-status.ok {
  background: #22c55e;
  color: #fff;
}

.tool-step-status.err {
  background: #ef4444;
  color: #fff;
}

.tool-step-status.pending {
  background: transparent;
  border: 1.5px solid #e5e7eb;
}

.tool-spin {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #d1d5db;
  border-top-color: #3b82f6;
  animation: tool-spin 0.7s linear infinite;
}

@keyframes tool-spin {
  to {
    transform: rotate(360deg);
  }
}

.tool-step-children {
  margin-top: 6px;
  padding-left: 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tool-step-children[hidden] {
  display: none !important;
}

.tool-step-child {
  font-size: 11px;
  color: #6b7280;
  padding: 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-collapse-wrap {
  padding: 4px 6px 8px;
}

.rail-collapse-wrap[hidden] {
  display: none !important;
}

.rail-collapse-btn {
  border: 1px dashed #d1d5db;
  background: #f9fafb;
  color: #6b7280;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.rail-collapse-btn:hover {
  border-color: #9ca3af;
  color: #374151;
}

.bubble.state-card {
  max-width: 94%;
  align-self: stretch;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
}

.bubble.state-card.clickable {
  cursor: pointer;
}

.bubble.state-card.clickable:hover {
  border-color: #93c5fd;
  background: #f0f7ff;
}

.state-card-inner {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.state-card-icon {
  font-size: 16px;
  line-height: 1.2;
}

.state-card-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #111827;
}

.state-card-body {
  margin-top: 2px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.4;
  word-break: break-word;
}

.state-card-hint {
  margin-top: 4px;
  font-size: 10px;
  color: #3b82f6;
}

.answer-text {
  word-break: break-word;
  font-size: 13.5px;
  line-height: 1.55;
}

.md-body {
  word-break: break-word;
}

.md-body > :first-child {
  margin-top: 0;
}

.md-body > :last-child {
  margin-bottom: 0;
}

.md-body p {
  margin: 0 0 0.55em;
  line-height: 1.5;
}

.md-body ul,
.md-body ol {
  margin: 0.35em 0 0.7em;
  padding-left: 1.25em;
}

.md-body li {
  margin: 0.2em 0;
  line-height: 1.45;
}

.md-body li > p {
  margin: 0;
}

.md-body strong {
  font-weight: 700;
  color: #111827;
}

.md-body em {
  font-style: italic;
}

.md-body hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0.75em 0;
}

.md-body h1,
.md-body h2,
.md-body h3,
.md-body h4 {
  margin: 0.7em 0 0.35em;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.md-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 4px;
}

.md-body pre {
  margin: 0.5em 0;
  padding: 8px 10px;
  background: #f3f4f6;
  border-radius: 8px;
  overflow: auto;
  font-size: 11px;
  line-height: 1.4;
}

.md-body pre code {
  background: none;
  padding: 0;
}

.md-body a {
  color: var(--blue-deep);
  text-decoration: underline;
}

.md-body blockquote {
  margin: 0.5em 0;
  padding: 2px 0 2px 10px;
  border-left: 3px solid #d1d5db;
  color: #4b5563;
}

.md-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.55em 0 0.75em;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafbfc;
}

.md-body table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  line-height: 1.4;
}

.md-body thead th {
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 700;
}

.md-body th,
.md-body td {
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.md-body td:first-child,
.md-body th:first-child {
  white-space: normal;
  min-width: 6em;
  max-width: 11em;
}

.md-body td:last-child,
.md-body th:last-child {
  white-space: normal;
  min-width: 5em;
}

.md-body tbody tr:hover {
  background: #f0f7ff;
}

.md-body tbody tr:last-child th,
.md-body tbody tr:last-child td {
  border-bottom: none;
}

.md-body tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.7);
}

.quick-chips {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 0 10px 6px;
  flex-shrink: 0;
}

.chip {
  flex: 0 0 auto;
  border: 1px solid #c7d5ef;
  background: #fff;
  color: var(--blue-deep);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  cursor: pointer;
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 8px;
  background: #fff;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.chat-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  outline: none;
  font-size: 12px;
  line-height: 1.3;
  min-height: 0;
  height: 32px;
}

.chat-form input:focus {
  border-color: #93b4ff;
}

.chat-form button {
  border: none;
  background: var(--blue);
  color: #fff;
  border-radius: 999px;
  padding: 0 12px;
  height: 32px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.phone-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 4px 8px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  flex-shrink: 0;
}

.phone-nav span.active {
  color: var(--blue);
  font-weight: 700;
}

.phone-nav button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  padding: 4px 2px 2px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
}

.phone-nav button.active {
  color: var(--blue);
  font-weight: 700;
}

.phone-nav button.flash {
  background: rgba(37, 99, 235, 0.08);
}

.phone-nav .nav-ico {
  font-size: 16px;
  line-height: 1.1;
}

.phone-nav .nav-label {
  line-height: 1.1;
}

.phone-nav .nav-badge {
  position: absolute;
  top: 0;
  right: calc(50% - 18px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 0 0 1.5px #fff;
  pointer-events: none;
}

.phone-toast {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 56px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(226, 232, 240, 0.98);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.phone-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: phone-toast-pop 0.35s ease;
}

.phone-toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  animation: none;
}

.phone-toast[hidden] {
  display: none !important;
}

@keyframes phone-toast-pop {
  0% {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.phone-toast-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-toast-app {
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.02em;
}

.phone-toast-more {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
}

.phone-toast-close {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.phone-toast-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

.phone-toast-body {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.phone-screens {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.phone-screen-pane {
  flex: 1 1 auto;
  min-height: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.phone-screen-pane.active {
  display: flex;
}

.phone-pane-head {
  padding: 10px 14px 6px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}

.phone-pane-head h3 {
  margin: 0;
  font-size: 13px;
}

.phone-pane-head p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.trip-ledger,
.notion-ledger {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px 14px;
}

.phone-mail-app {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f2f2f7;
}

.phone-mail-chrome {
  display: grid;
  grid-template-columns: 52px 1fr 36px;
  align-items: center;
  padding: 8px 12px 6px;
  background: rgba(248, 248, 250, 0.94);
  border-bottom: 1px solid #e5e5ea;
}

.phone-mail-chrome h3 {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.phone-mail-ghost {
  appearance: none;
  border: 0;
  background: transparent;
  color: #007aff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  text-align: left;
  cursor: default;
}

.phone-mail-compose {
  text-align: right;
  font-size: 15px;
}

.phone-mail-search {
  margin: 8px 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #e5e5ea;
  color: #8e8e93;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mail-inbox {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 12px;
  background: #fff;
}

.phone-mail-empty {
  padding: 40px 20px;
  text-align: center;
  color: #8e8e93;
  font-size: 12px;
  display: grid;
  gap: 6px;
  justify-items: center;
}

.phone-mail-empty span {
  font-size: 28px;
}

.phone-mail-empty strong {
  color: #111;
  font-size: 14px;
}

.mail-item {
  border: 0;
  border-bottom: 1px solid #f1f1f4;
  border-radius: 0;
  background: #fff;
  margin: 0;
  overflow: hidden;
}

.mail-item summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  grid-template-rows: auto auto auto;
  column-gap: 10px;
  row-gap: 2px;
  padding: 11px 14px;
  align-items: start;
}

.mail-item summary::-webkit-details-marker {
  display: none;
}

.mail-item.unread {
  background: #f7faff;
}

.mail-item.unread .mail-subject,
.mail-item.unread .mail-from {
  font-weight: 750;
  color: #0f172a;
}

.mail-avatar {
  grid-row: 1 / span 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--av, #0a84ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  margin-top: 1px;
}

.mail-avatar.sm {
  width: 26px;
  height: 26px;
  font-size: 11px;
  grid-row: auto;
  margin-top: 0;
}

.mail-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  grid-column: 2;
}

.mail-from {
  font-size: 12.5px;
  font-weight: 650;
  color: #111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-time {
  font-size: 11px;
  color: #8e8e93;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  grid-column: 2;
  justify-self: end;
}

.mail-item summary .mail-time {
  grid-column: 2;
}

.mail-subject {
  grid-column: 2;
  font-size: 12.5px;
  font-weight: 600;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-preview {
  grid-column: 2;
  font-size: 11.5px;
  color: #8e8e93;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-unread-dot {
  grid-column: 3;
  grid-row: 1 / span 3;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #007aff;
  align-self: center;
}

.mail-body {
  padding: 0 14px 12px 60px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
  white-space: normal;
  border-top: 1px solid #eef0f3;
  padding-top: 12px;
  margin-top: 0;
  background: #fafafa;
}

.mail-body-head strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #111;
}

.mail-body-meta {
  display: grid;
  gap: 2px;
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 10px;
}

.mail-body-text {
  color: #1f2937;
}

.mail-body-actions {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  color: #007aff;
  font-size: 11px;
  font-weight: 650;
}

.mail-item.mail-flash {
  box-shadow: inset 0 0 0 2px rgba(10, 132, 255, 0.35);
  animation: mail-flash-pulse 1.1s ease;
}

@keyframes mail-flash-pulse {
  0% {
    box-shadow: inset 0 0 0 0 rgba(10, 132, 255, 0.45);
  }
  100% {
    box-shadow: inset 0 0 0 2px rgba(10, 132, 255, 0);
  }
}

.ledger-empty {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  padding: 10px 4px 14px;
}

.ledger-day {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
  overflow: hidden;
}

.ledger-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
}

.ld-date {
  color: var(--ink);
}

.ld-count {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
}

.ledger-day-body {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}

.ledger-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 2px 6px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.35;
}

.ledger-row .lr-ico {
  grid-row: 1 / span 2;
  align-self: start;
}

.ledger-row .lr-main {
  font-weight: 600;
  color: var(--ink);
}

.ledger-row .lr-meta {
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
}

.ledger-row.cancelled .lr-main {
  text-decoration: line-through;
  color: #94a3b8;
  font-weight: 500;
}

.ledger-row.cancelled .lr-meta {
  color: #e11d48;
}

.ledger-row.delayed .lr-meta {
  color: #c2410c;
}

.ledger-row.flight {
  border-left: 3px solid #38bdf8;
}

.ledger-row.hotel {
  border-left: 3px solid #a78bfa;
}

.ledger-row.hotel.surged .lr-meta {
  color: #c2410c;
}

.ledger-row.cal {
  border-left: 3px solid #94a3b8;
}

.ledger-row.rental {
  border-left: 3px solid #f59e0b;
}

.ledger-row.rental.active .lr-meta {
  color: #b45309;
}

.ledger-row.rental.returned .lr-meta {
  color: #64748b;
}

.ledger-row.rental.incident {
  border-left-color: #f43f5e;
  opacity: 0.95;
}

.ledger-row.visa {
  border-left: 3px solid #22c55e;
}

.ledger-row.visa.approved .lr-meta {
  color: #15803d;
}

.ledger-row.visa.processing .lr-meta {
  color: #ca8a04;
}

.ledger-row.order {
  border-left: 3px solid #0ea5e9;
}

.ledger-row.order.delivered .lr-meta {
  color: #0369a1;
}

.notion-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
  overflow: hidden;
}

.notion-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
}

.notion-section > summary::-webkit-details-marker {
  display: none;
}

.notion-section ul {
  margin: 0;
  padding: 0 10px 10px 28px;
  font-size: 11px;
  line-height: 1.45;
  color: #334155;
}

.notion-section li.muted {
  color: var(--muted);
  list-style: none;
  margin-left: -14px;
}

/* —— Phone settings (演示控制台) —— */
.phone-settings {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 18px;
  -webkit-overflow-scrolling: touch;
}

.phone-settings .console-onboard {
  margin: 0 0 12px;
  padding: 10px 12px 8px;
  border-radius: 12px;
  background: linear-gradient(160deg, #eff6ff, #f8fafc);
  border: 1px solid #bfdbfe;
}

.phone-settings .console-onboard[hidden] {
  display: none !important;
}

.phone-settings .console-onboard-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 5px;
}

.phone-settings .console-onboard ol {
  margin: 0;
  padding-left: 1.15em;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
}

.phone-settings .console-onboard-note {
  margin: 7px 0 0;
  font-size: 11px;
  color: #64748b;
}

.phone-settings .hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 12px;
}

.phone-settings .provider-hint {
  margin-top: -2px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.phone-settings .field {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--ink);
}

.phone-settings .field-hint {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.phone-settings .field input,
.phone-settings .field select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}

.phone-settings .field.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  grid-template-columns: none;
}

.phone-settings .field.check input {
  width: auto;
  margin-top: 2px;
  padding: 0;
}

.phone-settings .console-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
  padding-bottom: 4px;
}

.phone-settings .console-actions .btn.primary {
  grid-column: 1 / -1;
}

.phone-settings .console-actions .btn {
  width: 100%;
  justify-content: center;
}

/* legacy drawer tokens kept for any residual class refs */
.console-onboard-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 6px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
}

.field input,
.field select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.field.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  grid-template-columns: none;
}

.field.check input {
  width: auto;
  margin-top: 2px;
  padding: 0;
}

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

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 50;
}

body.is-busy .btn.primary {
  opacity: 0.8;
}

@media (min-width: 961px) and (max-width: 1280px) {
  .app {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 10px;
    padding: 8px 10px;
  }

  .map-stage .day-chip {
    width: 58px;
    padding: 4px 2px;
  }

  .float-info {
    width: min(220px, 30%);
  }

  .float-info-plan {
    max-height: 96px;
  }
}

/* Narrow / DevTools-split: keep map + phone both on screen, no float overlap */
@media (max-width: 960px) {
  html,
  body {
    overflow: hidden;
    height: 100%;
  }

  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) minmax(280px, 42dvh);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    gap: 8px;
    padding: 8px;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .dashboard,
  .dashboard.map-stage {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  .float-status {
    overflow-x: auto;
  }

  .float-status .status-chip {
    flex: 0 0 auto;
    max-width: 132px;
  }

  .map-toast-rail {
    width: min(300px, 78%);
  }

  .float-events:not(.collapsed) {
    width: min(260px, 56%);
    max-height: min(36vh, 240px);
  }

  .float-info {
    width: min(200px, 44%);
    max-height: min(34vh, 200px);
    overflow: auto;
  }

  .float-info-plan {
    display: none;
  }

  .map-stage .day-chip {
    width: 56px;
  }

  .phone-col {
    position: relative;
    top: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    height: 100%;
    max-height: none;
    min-height: 0;
    align-self: stretch;
  }

  .phone {
    border-radius: 18px;
    padding: 8px;
    height: 100%;
    max-height: 100%;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 6px;
    gap: 6px;
    grid-template-rows: auto minmax(0, 1fr) minmax(300px, 48dvh);
  }

  .dashboard.map-stage {
    border-radius: 14px;
  }

  .float-status .status-chip {
    padding: 6px 8px;
    max-width: 112px;
  }

  .float-events.collapsed {
    min-width: 128px;
  }

  .top-actions .btn {
    padding: 5px 9px;
    font-size: 11px;
  }

  .map-chrome-bottom {
    gap: 0;
  }

  .map-chrome-bottom-docks {
    gap: 8px;
  }

  .float-info {
    display: none;
  }
}

@media (min-width: 961px) and (max-height: 760px) {
  .app {
    gap: 8px;
    padding: 8px;
  }

  .float-status .status-chip {
    padding: 5px 8px;
  }

  .map-stage .day-chip {
    width: 54px;
    padding: 3px 2px;
  }

  .float-ribbon {
    padding: 4px 6px;
  }

  .map-overlay {
    padding: 8px 8px 4px;
    gap: 6px;
  }
}

/* Very short viewports: shrink phone share so map stays usable */
@media (max-height: 620px) and (max-width: 960px) {
  .app {
    grid-template-rows: auto minmax(0, 1fr) minmax(220px, 38dvh);
  }
}

/* ===== Ecommerce Manus-style cockpit ===== */
:root {
  --agent-teal: #5fbfb0;
  --agent-teal-deep: #3d9b8a;
  --agent-teal-soft: #e8f7f4;
  --agent-mint-bg: #eef7f5;
  --ecom-bg: var(--agent-mint-bg);
  --ecom-card: #ffffff;
  --ecom-line: #dceae6;
  --ecom-ink: #1a1d23;
  --ecom-muted: #7a8a86;
  --ecom-blue: var(--agent-teal);
  --ecom-blue-deep: var(--agent-teal-deep);
  --ecom-green: #3d9b8a;
  --ecom-red: #c45c5c;
  --ecom-radius: 18px;
  --ecom-shadow: 0 1px 0 rgba(16, 40, 36, 0.03);
  --ecom-shadow-lg: 0 14px 36px rgba(30, 70, 62, 0.08);
}

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

.scenario-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.scenario-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.scenario-btn.is-active {
  background: var(--ink);
  color: #fff;
}

.ecom-cockpit {
  display: none;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  height: 100%;
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: 0;
}

body[data-scenario="ecom"] .app {
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  max-width: 1680px;
  background: transparent;
  gap: 10px;
}

body[data-scenario="ecom"] {
  background: #eef0f4;
}

body[data-scenario="ecom"] .dashboard {
  display: none !important;
}

body[data-scenario="ecom"] .phone-col:not(.is-ecom-console) {
  display: none !important;
}

body[data-scenario="ecom"] .ecom-cockpit:not([hidden]) {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-column: 1;
  grid-row: 2;
}

.ecom-side-rail {
  grid-column: 1;
  grid-row: 1 / 3;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 10px 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--ecom-shadow-lg);
}

.ecom-side-rail button {
  min-height: 48px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #667085;
  cursor: pointer;
}

.ecom-side-rail button:hover,
.ecom-side-rail button.is-active {
  color: var(--agent-teal-deep, #3d9b8a);
  background: var(--agent-teal-soft, #e8f7f4);
}

.ecom-side-rail button:disabled {
  opacity: 0.38;
  cursor: default;
}

.ecom-side-rail button:disabled:hover {
  color: #667085;
  background: transparent;
}

.ecom-side-rail button span {
  font-size: 16px;
  line-height: 1;
}

.ecom-side-rail button small {
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.ecom-side-rail .ecom-rail-collapse {
  min-height: 32px;
  margin-top: auto;
  border: 1px solid var(--ecom-line);
  background: #fff;
}

.ecom-top {
  grid-column: 2;
  grid-row: 1;
}

.ecom-body {
  grid-column: 2;
  grid-row: 2;
}

body[data-scenario="ecom"] .phone-col.is-ecom-console {
  display: flex !important;
  position: fixed;
  z-index: 80;
  right: 16px;
  top: 64px;
  bottom: 16px;
  width: min(420px, calc(100vw - 24px));
  box-shadow: 0 18px 50px rgba(20, 35, 70, 0.22);
}

.ecom-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: var(--ecom-shadow-lg);
  flex: 0 0 auto;
  height: 62px;
  min-height: 62px;
  max-height: 62px;
  overflow: hidden;
}

.ecom-brand-block {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-right: 14px;
  margin-right: 2px;
  border-right: 1px solid var(--ecom-line);
  flex: 0 0 auto;
  max-width: 168px;
  min-width: 0;
}

.ecom-brand-text {
  min-width: 0;
  overflow: hidden;
}

.ecom-brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1a1d23, #2d3340);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  flex: 0 0 auto;
  letter-spacing: -0.02em;
}

.ecom-brand-name {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--ecom-ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecom-brand-sub {
  font-size: 10.5px;
  color: var(--ecom-muted);
  max-width: 128px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.ecom-project {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  flex: 0 1 200px;
  max-width: 220px;
}

.ecom-project-label {
  font-size: 10px;
  color: var(--ecom-muted);
  line-height: 1.1;
}

.ecom-project-icon {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px;
  max-height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  border: 1px solid var(--ecom-line);
  font-size: 14px;
  overflow: hidden;
  flex: 0 0 32px;
  padding: 0;
}

.ecom-project-icon.has-img {
  /* keep fixed box — do NOT stretch to 100% */
  width: 32px !important;
  height: 32px !important;
}

.ecom-project-icon img {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px;
  max-height: 32px;
  object-fit: cover;
  display: block;
}

.ecom-project-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--ecom-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.ecom-project-id {
  font-size: 10px;
  color: var(--ecom-muted);
  font-family: var(--font-mono);
}

.ecom-top-kpis {
  display: grid;
  grid-template-columns:
    minmax(92px, 1.2fr)
    minmax(92px, 1.2fr)
    minmax(72px, 0.9fr)
    minmax(58px, 0.7fr)
    minmax(118px, 1.45fr);
  align-items: stretch;
  gap: 0;
  min-width: 0;
  width: 100%;
  max-width: 720px;
  flex: 1 1 520px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--agent-line, #dceae6);
  overflow: hidden;
  height: 48px;
}

.ecom-top-kpis.is-dual {
  border-color: #b9ddd6;
  background: linear-gradient(180deg, #f7fbfa 0%, #fff 100%);
}

.ecom-top-kpis.is-syncing {
  box-shadow: inset 0 0 0 1px rgba(18, 183, 106, 0.28);
}

.ecom-kpi-dual-cue {
  display: none;
}

.ecom-kpi-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.ecom-kpi-beat b {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  color: #98a2b3;
  background: #fff;
}

.ecom-kpi-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-kpi-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-kpi-beat i {
  width: 4px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-top-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: 0;
  border-right: 1px solid transparent;
  border-radius: 0;
  padding: 7px 12px;
  min-width: 0;
  overflow: hidden;
  box-shadow: inset -1px 0 0 #e8eeec;
}

.ecom-top-kpi.is-dual.is-changed .ecom-kpi-fresh {
  background: #fff4e5;
  color: #b54708;
}

.ecom-top-kpi:last-child {
  border-right: 0;
  box-shadow: none;
  padding-right: 14px;
}

.ecom-top-kpi:first-child {
  padding-left: 14px;
}

.ecom-kpi-label,
.ecom-top-kpi span.ecom-kpi-label {
  display: block;
  min-width: 0;
  max-width: 100%;
  height: 14px;
  margin: 0;
  padding-right: 0;
  overflow: hidden;
  color: #7a8a86;
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0.01em;
  line-height: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ecom-top-kpi.is-changed .ecom-kpi-label {
  padding-right: 34px;
}

.ecom-kpi-fresh {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 1;
  padding: 0 5px;
  border-radius: 999px;
  background: #e8f7f4;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0;
}

.ecom-top-kpi.is-dual.is-changed .ecom-kpi-fresh {
  background: #fff4e5;
  color: #b54708;
}

.ecom-kpi-value,
.ecom-top-kpi strong.ecom-kpi-value {
  display: block;
  min-width: 0;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ecom-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 720;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.ecom-top-kpi .delta,
.ecom-top-kpi .warn {
  display: none;
}

.ecom-top-kpi.warn {
  background: linear-gradient(180deg, #fff8f1 0%, #fffaf6 100%);
}

.ecom-top-kpi.is-changed {
  animation: ecomKpiChanged 0.8s ease-out;
}

@keyframes ecomKpiChanged {
  0% { background: #eef8f5; }
  100% { background: transparent; }
}

.ecom-top-kpi.warn.is-changed {
  animation: ecomKpiWarnChanged 0.8s ease-out;
}

@keyframes ecomKpiWarnChanged {
  0% { background: #fff1e6; }
  100% { background: linear-gradient(180deg, #fff8f1 0%, #fffaf6 100%); }
}

.ecom-top-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.ecom-top-right .ecom-btn-primary,
.ecom-top-right .ecom-btn-ghost {
  white-space: nowrap;
  padding: 6px 10px;
}

.ecom-auto-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ecom-muted);
  cursor: pointer;
  user-select: none;
}

.ecom-auto-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ecom-auto-toggle i {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: 0.2s;
}

.ecom-auto-toggle i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
}

.ecom-auto-toggle input:checked + i {
  background: var(--ecom-green);
}

.ecom-auto-toggle input:checked + i::after {
  left: 18px;
}

.ecom-icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--ecom-line);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #667085;
}

.ecom-icon-btn:hover {
  background: #f7f8fa;
}

.ecom-badge {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--ecom-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.ecom-icon-btn .ecom-badge {
  position: absolute;
  top: -4px;
  right: -4px;
}

.ecom-owner {
  font-size: 12px;
  font-weight: 650;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--ecom-blue-deep);
  border: 1px solid #bfdbfe;
}

.ecom-body {
  display: grid;
  grid-template-columns: minmax(360px, 42%) minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  flex: 1 1 auto;
  height: 100%;
  overflow: hidden;
}

.ecom-body-manus {
  grid-template-columns: minmax(340px, 43%) minmax(0, 1fr);
}

.ecom-dyn-rail {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-width: 0;
  flex: 1 1 420px;
  max-width: min(720px, 100%);
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
}

.ecom-dyn-rail.is-kpi-tick {
  background: transparent;
  animation: none;
}

.ecom-dyn-rail.is-sense {
  background: transparent;
  animation: none;
}

.ecom-rail-watch {
  display: none !important;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 3px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  font-size: 10px;
  color: #475467;
  line-height: 1.3;
}

.ecom-rail-watch[hidden] {
  display: none !important;
}

.ecom-rail-watch.is-live {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #3d9b8a;
}

.ecom-rail-watch.is-warn {
  background: #fffaeb;
  border-color: #fecd89;
  color: #b54708;
}

.ecom-rail-watch-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.ecom-rail-watch-beat b {
  width: 13px;
  height: 13px;
  margin: 0;
  padding: 0;
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
  box-shadow: none;
}

.ecom-rail-watch-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-rail-watch-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-rail-watch-beat i {
  width: 4px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-rail-watch span {
  flex: 0 0 auto;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-weight: 700;
  font-size: 9px;
}

.ecom-rail-watch em {
  font-style: normal;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.ecom-rail-watch-next {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff6ed;
  color: #c4320a;
  white-space: nowrap;
}

.ecom-rail-watch b {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 9px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #c7d7fe;
}

@keyframes ecomDynSense {
  0% { box-shadow: inset 0 0 0 1px #fecd89; }
  100% { box-shadow: none; }
}

@keyframes ecomDynTick {
  0% { box-shadow: inset 0 0 0 1px #b2ddff; }
  100% { box-shadow: none; }
}

.ecom-monitors {
  display: none;
  flex-wrap: nowrap;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
}

.ecom-monitors.is-dual {
  gap: 4px;
}

.ecom-monitor-empty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 3px 8px;
  border-radius: 8px;
  background: #fffaeb;
  border: 1px solid #fecd89;
  color: #b54708;
  font-size: 10px;
  font-weight: 600;
}

.ecom-monitor-empty em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: #b54708;
}

.ecom-monitor-empty b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.ecom-monitor-empty > i {
  margin-left: auto;
  flex: 0 0 auto;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--agent-teal-deep, #3d9b8a);
  box-shadow: inset 0 0 0 1px #c7d7fe;
}

.ecom-monitor-empty-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.ecom-monitor-empty-beat b {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  color: #98a2b3;
  background: #fff7ed;
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
}

.ecom-monitor-empty-beat b.is-on {
  color: #fff;
  background: #b54708;
}

.ecom-monitor-empty-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-monitor-empty-beat i {
  width: 4px;
  height: 1px;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: #fecd89;
  box-shadow: none;
  color: transparent;
}

.ecom-monitor-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 5px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 550;
  border: 0;
  background: transparent;
  color: #667085;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
}

.ecom-monitor-chip.is-dual {
  box-shadow: inset 0 0 0 1px rgba(171, 239, 198, 0.7);
}

.ecom-monitor-phase {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 999px;
  background: #fffaeb;
  color: #b54708;
}

.ecom-monitor-chip b {
  min-width: 0;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecom-monitor-chip time {
  flex: 0 0 auto;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.05);
  color: #98a2b3;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.ecom-monitor-chip.is-fresh time {
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
}

.ecom-monitor-chip.is-warn time,
.ecom-monitor-chip.is-danger time,
.ecom-monitor-chip.is-ok time {
  background: rgba(255, 255, 255, 0.55);
}

.ecom-monitor-chip:first-child {
  animation: ecomChipIn 0.22s ease;
}

.ecom-monitor-chip.is-fresh {
  animation: ecomChipFresh 0.55s ease-out;
}

.ecom-monitor-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #98a2b3;
}

.ecom-monitor-chip:not(:last-child)::after {
  content: "→";
  margin-left: 4px;
  color: #d0d5dd;
  font-weight: 400;
}

.ecom-monitor-chip.is-warn {
  background: #fffaeb;
  color: #b54708;
}

.ecom-monitor-chip.is-danger {
  background: #fef3f2;
  color: #b42318;
}

.ecom-monitor-chip.is-ok {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-monitor-chip.is-info {
  background: transparent;
  color: #667085;
}

.ecom-monitor-chip.is-warn::before { background: #f79009; }
.ecom-monitor-chip.is-danger::before { background: #f04438; }
.ecom-monitor-chip.is-ok::before { background: #12b76a; }
.ecom-monitor-chip.is-info::before { background: var(--ecom-blue); }

@keyframes ecomChipIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@keyframes ecomChipFresh {
  0% { transform: translateY(-3px) scale(0.98); box-shadow: 0 0 0 0 rgba(247, 144, 9, 0.28); }
  60% { box-shadow: 0 0 0 5px rgba(247, 144, 9, 0); }
  100% { transform: none; box-shadow: none; }
}

.ecom-stage-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--agent-teal-deep, #3d9b8a);
  background: #eff4ff;
  border: 0;
  border-radius: 999px;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  padding: 5px 8px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}

.ecom-stage-chip em {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.ecom-stage-chip > b {
  flex: 0 0 auto;
  font-weight: 700;
}

.ecom-stage-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.ecom-stage-beat b {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  color: #98a2b3;
  background: rgba(255, 255, 255, 0.85);
}

.ecom-stage-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-stage-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-stage-beat i {
  width: 4px;
  height: 1px;
  padding: 0;
  border-radius: 0;
  background: #d0d5dd;
  box-shadow: none;
}

.ecom-stage-chip > i {
  flex: 0 0 auto;
  font-style: normal;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: #3d9b8a;
  font-size: 9px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #abefc6;
}

.ecom-stage-chip.is-live {
  background: #ecfdf3;
  color: #3d9b8a;
  box-shadow: inset 0 0 0 1px #abefc6;
}

.ecom-stage-chip.is-warn {
  background: #fffaeb;
  color: #b54708;
  box-shadow: inset 0 0 0 1px #fecd89;
}

.ecom-stage-chip.is-warn i {
  color: #b54708;
  box-shadow: inset 0 0 0 1px #fecd89;
}

.ecom-bench-strip button.is-busy::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ecom-blue);
  box-shadow: 0 0 0 3px rgba(59, 111, 245, 0.18);
  animation: ecomPulse 1.2s ease-in-out infinite;
}

.ecom-wall.is-dock-tip .ecom-wall-label {
  color: #3d9b8a;
}

.ecom-wall.is-dock-tip .ecom-wall-label span {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-bell {
  display: block;
  width: 14px;
  height: 14px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a2.1 2.1 0 0 0 2-2h-4a2.1 2.1 0 0 0 2 2Zm6-6V11a6 6 0 1 0-12 0v5l-2 2v1h16v-1l-2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a2.1 2.1 0 0 0 2-2h-4a2.1 2.1 0 0 0 2 2Zm6-6V11a6 6 0 1 0-12 0v5l-2 2v1h16v-1l-2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  color: #667085;
}

.ecom-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--ecom-card);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  box-shadow: var(--ecom-shadow-lg);
  overflow: hidden;
}

.ecom-chat-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--ecom-line);
  background: #fff;
}

.ecom-plan-strip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 8px;
  border-bottom: 1px solid #eef0f3;
  background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
}

.ecom-plan-strip.is-advancing {
  animation: ecomPlanAdvance 0.85s ease-out;
}

.ecom-parallel-strip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 6px;
  border-bottom: 1px solid #eef0f3;
  background: linear-gradient(90deg, #fffaf3 0%, #f3fbf9 55%, #fff 100%);
  font-size: 11px;
  color: #667085;
}

.ecom-parallel-strip[hidden] {
  display: none !important;
}

.ecom-parallel-strip.is-on {
  animation: ecomParallelIn 0.35s ease-out;
}

@keyframes ecomParallelIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.ecom-parallel-human,
.ecom-parallel-agent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ecom-parallel-human i,
.ecom-parallel-agent i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.ecom-parallel-human i {
  background: #f79009;
  box-shadow: 0 0 0 3px rgba(247, 144, 9, 0.16);
}

.ecom-parallel-agent i {
  background: var(--ecom-blue);
  box-shadow: 0 0 0 3px rgba(95, 191, 176, 0.18);
  animation: ecomPulse 1.4s ease-in-out infinite;
}

.ecom-parallel-human em,
.ecom-parallel-agent em {
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecom-parallel-strip.is-human-tick .ecom-parallel-human em {
  color: #b54708;
  animation: ecomComposerHumanTick 0.55s ease-out;
}

.ecom-parallel-strip.is-human-tick .ecom-parallel-human i {
  box-shadow: 0 0 0 4px rgba(247, 144, 9, 0.28);
}

.ecom-parallel-agent em {
  color: var(--ecom-blue-deep);
  font-weight: 600;
}

.ecom-parallel-sep {
  width: 1px;
  height: 12px;
  background: #e4e7ec;
  flex: 0 0 auto;
}

.ecom-parallel-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #98a2b3;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.ecom-parallel-meta[hidden] {
  display: none !important;
}

.ecom-parallel-meta.is-tick {
  animation: ecomParallelMetaTick 0.45s ease-out;
}

@keyframes ecomParallelMetaTick {
  from { opacity: 0.55; transform: translateX(3px); }
  to { opacity: 1; transform: none; }
}

.ecom-beat-rail {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ecom-beat-rail b {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.ecom-beat-rail b.is-on {
  color: #fff;
  background: var(--ecom-blue);
  box-shadow: 0 0 0 3px rgba(59, 111, 245, 0.14);
}

.ecom-beat-rail b.is-done {
  color: #3d9b8a;
  background: #ecfdf3;
}

.ecom-beat-rail i {
  width: 6px;
  height: 1px;
  background: #e4e7ec;
  flex: 0 0 auto;
}

.ecom-parallel-mode {
  font-style: normal;
  font-weight: 700;
  color: #667085;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f2f4f7;
  white-space: nowrap;
}

.ecom-parallel-mode.is-observing {
  color: #175cd3;
  background: #eff8ff;
}

.ecom-parallel-mode.is-planning {
  color: #5925dc;
  background: #f4f3ff;
}

.ecom-parallel-mode.is-acting,
.ecom-parallel-mode.is-communicating {
  color: var(--agent-teal-deep, #3d9b8a);
  background: #eff4ff;
}

.ecom-parallel-mode.is-verified {
  color: #3d9b8a;
  background: #ecfdf3;
}

.ecom-parallel-prog {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #98a2b3;
  font-variant-numeric: tabular-nums;
}

.ecom-parallel-prog i {
  display: inline-block;
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: #e4e7ec;
  position: relative;
  overflow: hidden;
}

.ecom-parallel-prog i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 0%);
  background: var(--ecom-blue);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.ecom-parallel-prog b {
  font-weight: 600;
  font-size: 10px;
  color: #667085;
}

.ecom-tool-why {
  margin: 0 0 6px;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
}

.ecom-plan-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 10px;
  color: #667085;
}

.ecom-plan-meta strong {
  color: #344054;
  font-weight: 600;
}

.ecom-plan-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.ecom-plan-beat b {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-plan-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-plan-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-plan-beat i {
  width: 4px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-plan-beat-cue {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 9px;
  font-weight: 700;
}

.ecom-plan-meta em {
  display: inline-block;
  width: 44px;
  height: 3px;
  border-radius: 999px;
  background: #e4e7ec;
  position: relative;
  overflow: hidden;
  font-style: normal;
}

.ecom-plan-meta em::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 0%);
  background: var(--ecom-blue);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.ecom-plan-acts {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.ecom-plan-act {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #f2f4f7;
  color: #98a2b3;
  font-size: 10px;
  line-height: 1.4;
}

.ecom-plan-act.is-done {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-plan-act.is-active {
  background: #eff4ff;
  border-color: #b2c5ff;
  color: #175cd3;
  font-weight: 600;
}

.ecom-plan-now {
  display: grid;
  justify-items: end;
  gap: 1px;
  min-width: 0;
  text-align: right;
}

.ecom-plan-now b {
  color: #101828;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.ecom-plan-now small {
  color: #667085;
  font-size: 10px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecom-plan-watch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 220px;
  margin: 2px 0 0;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  color: #475467;
  font-size: 10px;
  line-height: 1.3;
}

.ecom-plan-watch span {
  flex: 0 0 auto;
  font-weight: 700;
  color: #667085;
}

.ecom-plan-watch em {
  min-width: 0;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-plan-watch.is-ok {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #3d9b8a;
}

.ecom-plan-watch.is-ok span {
  color: #3d9b8a;
}

.ecom-plan-watch.is-warn {
  background: #fffaeb;
  border-color: #fecd89;
  color: #b54708;
}

.ecom-plan-watch.is-warn span {
  color: #b54708;
}

.ecom-plan-watch.is-pulse {
  animation: ecomBenchPulse 0.75s ease-out;
}

.ecom-plan-strip.is-watch-warn {
  background: linear-gradient(180deg, #fffaf0 0%, #fff 100%);
}

@keyframes ecomPlanAdvance {
  0% { background: #eef4ff; }
  100% { background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%); }
}

@media (max-width: 1180px) {
  .ecom-brand-block {
    max-width: 160px;
    padding-right: 10px;
  }
  .ecom-brand-sub {
    display: none;
  }
  .ecom-dyn-rail {
    flex-basis: 360px;
    max-width: 560px;
  }
  .ecom-top-kpis {
    grid-template-columns:
      minmax(78px, 1.15fr)
      minmax(78px, 1.15fr)
      minmax(64px, 0.9fr)
      minmax(52px, 0.7fr)
      minmax(96px, 1.35fr);
  }
  .ecom-top-kpi {
    padding-inline: 10px;
  }
  .ecom-plan-strip {
    grid-template-columns: 1fr auto;
  }
  .ecom-plan-acts { display: none; }
}

.ecom-chat .ecom-agent-bar {
  border-bottom: 0;
  background: transparent;
  padding: 12px 14px 4px;
}

.ecom-chat .ecom-center-tabs {
  padding: 4px 10px 0;
  border-bottom: 0;
  gap: 0;
}

.ecom-chat .ecom-center-tabs button {
  border-radius: 8px 8px 0 0;
  padding: 8px 12px;
  font-weight: 550;
}

.ecom-chat .ecom-center-tabs button.is-active {
  background: #f7f8fa;
}

.ecom-chat-mode-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  padding: 0;
}

.ecom-chat-mode-tabs > span,
.ecom-mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(260px, 48vw);
  min-height: 26px;
  padding: 4px 11px 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f3f6f5;
  color: #6b7874;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none;
}

.ecom-mode-chip > i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #aebcbb;
}

.ecom-mode-chip > em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-mode-chip > em > b {
  font-weight: 500;
  color: #8a9793;
  margin-right: 4px;
}

.ecom-chat-mode-tabs > span.is-active,
.ecom-mode-chip.is-active {
  border-color: transparent;
  background: #f3f6f5;
  color: #6b7874;
}

.ecom-chat-mode-tabs > span.is-live,
.ecom-mode-chip.is-live {
  border-color: rgba(95, 191, 176, 0.35);
  background: linear-gradient(180deg, #f3fbf9 0%, #e8f7f4 100%);
  color: var(--agent-teal-deep, #3d9b8a);
  font-weight: 650;
}

.ecom-mode-chip.is-live > i {
  background: var(--agent-teal, #5fbfb0);
  box-shadow: 0 0 0 3px rgba(95, 191, 176, 0.18);
  animation: ecomModeDotPulse 1.6s ease-in-out infinite;
}

.ecom-mode-chip.is-live > em > b {
  color: #6aa89c;
}

.ecom-chat-mode-tabs > span.is-pulse,
.ecom-mode-chip.is-pulse {
  animation: ecomModeChipPulse 0.55s ease-out;
}

@keyframes ecomModeChipPulse {
  0% { transform: scale(0.995); opacity: 0.82; }
  100% { transform: none; opacity: 1; }
}

@keyframes ecomModeDotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(95, 191, 176, 0.14); }
  50% { box-shadow: 0 0 0 5px rgba(95, 191, 176, 0.22); }
}

.ecom-tool-next {
  margin-top: 8px;
}

.ecom-chat .ecom-stream-wrap {
  flex: 1;
  min-height: 0;
}

.ecom-chat .ecom-messages {
  background: #fff;
  padding: 20px 18px;
  gap: 12px;
}

.ecom-chat > .ecom-plan-strip,
.ecom-chat > .ecom-parallel-strip,
.ecom-chat > .ecom-composer-hint,
.ecom-chat #ecomAgentTask,
.ecom-chat #ecomAgentActivity {
  display: none !important;
}

.ecom-chat .ecom-stream-who {
  color: #667085;
  font-weight: 500;
  font-size: 11px;
}

.ecom-chat .ecom-stream-item.mine + .ecom-stream-item.mine {
  margin-top: -3px;
}

.ecom-chat .ecom-stream-item.mine + .ecom-stream-item.mine .ecom-stream-who,
.ecom-chat .ecom-stream-item.kind-world .ecom-stream-who,
.ecom-chat .ecom-stream-item.kind-mutation .ecom-stream-who,
.ecom-chat .ecom-stream-item.kind-notify .ecom-stream-who,
.ecom-chat .ecom-stream-item.kind-discovery .ecom-stream-who,
.ecom-chat .ecom-stream-item.kind-stage .ecom-stream-who {
  display: none;
}

.ecom-chat .ecom-stream-item.kind-world,
.ecom-chat .ecom-stream-item.kind-mutation,
.ecom-chat .ecom-stream-item.kind-notify,
.ecom-chat .ecom-stream-item.kind-discovery,
.ecom-chat .ecom-stream-item.kind-stage {
  gap: 0;
}

.ecom-chat .ecom-msg-bubble {
  border: 0;
  background: #f4f6f8;
  box-shadow: none;
  border-radius: 4px 14px 14px 14px;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.5;
  color: #1a1d23;
}

.ecom-chat .ecom-stream-item.mine .ecom-msg-bubble {
  background: #f4f6f8;
  color: #1a1d23;
}

.ecom-chat .ecom-stream-item:not(.ecom-stream-event):not(.ecom-stream-output) {
  width: fit-content;
  max-width: 88%;
}

.ecom-chat .ecom-stream-item:not(.mine):not(.ecom-stream-event):not(.ecom-stream-output) {
  align-self: flex-end;
  align-items: flex-end;
}

.ecom-chat .ecom-msg-card.is-simple {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  padding: 10px 12px;
  border-color: #e4e7ec;
  background: #fff;
  box-shadow: none;
}

.ecom-chat .ecom-msg-card.is-simple .ecom-msg-card-body {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: #344054;
  font-weight: 500;
}

.ecom-chat .ecom-msg-card.is-simple .ecom-msg-card-btn {
  flex: 0 0 auto;
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #344054;
}

.ecom-stream-empty.is-simple {
  background: transparent;
  border: 0;
}

.ecom-chat .ecom-stream-item:not(.mine) .ecom-msg-bubble {
  margin-left: auto;
  border-color: var(--ecom-blue);
  background: var(--ecom-blue);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.ecom-chat .ecom-stream-event {
  position: relative;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  width: 100%;
  max-width: 100%;
  padding: 0 2px;
}

.ecom-chat .ecom-event-marker {
  width: 7px;
  height: 7px;
  margin-top: 12px;
  border-radius: 50%;
  background: #98a2b3;
  box-shadow: 0 0 0 3px #f2f4f7;
}

.ecom-chat .ecom-event-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
}

.ecom-chat .ecom-event-copy strong {
  flex: 0 0 auto;
  color: #667085;
  font-size: 10px;
  font-weight: 700;
}

.ecom-chat .ecom-event-copy p {
  min-width: 0;
  margin: 0;
  color: #475467;
  font-size: 12px;
  line-height: 1.45;
}

.ecom-chat .ecom-stream-event.kind-world .ecom-event-marker {
  background: #f79009;
  box-shadow: 0 0 0 3px #fffaeb;
}

.ecom-chat .ecom-stream-event.kind-notify .ecom-event-marker {
  background: #2e90fa;
  box-shadow: 0 0 0 3px #eff8ff;
}

.ecom-chat .ecom-stream-event.kind-discovery .ecom-event-marker {
  background: #12b76a;
  box-shadow: 0 0 0 3px #ecfdf3;
}

/* Legacy block kept inert; teal timeline rules below own the stream layout. */
.ecom-chat .ecom-stream-output {
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* arrive animation unified under .streamItemIn below */

.ecom-chat .ecom-rich {
  border: 1px solid #e4e7ec;
  background: #fff;
  box-shadow: none;
  border-radius: 14px;
}

.ecom-chat .ecom-rich-world,
.ecom-chat .ecom-rich-mutation,
.ecom-chat .ecom-rich-notify,
.ecom-chat .ecom-rich-discovery {
  border-color: #e4e7ec;
  border-left: 3px solid #98a2b3;
  background: #fff;
}

.ecom-chat .ecom-rich-world.is-warn {
  border-left-color: #f79009;
}

.ecom-chat .ecom-rich-world.is-danger,
.ecom-chat .ecom-rich-mutation {
  border-left-color: #f04438;
}

.ecom-chat .ecom-rich-world.is-ok {
  border-left-color: #12b76a;
}

.ecom-chat .ecom-rich-notify,
.ecom-chat .ecom-rich-discovery {
  border-left-color: var(--ecom-blue);
}

.ecom-chat .ecom-rich .ecom-pill,
.ecom-chat .ecom-rich .ecom-pill.is-live,
.ecom-chat .ecom-rich .ecom-pill.is-done {
  border: 1px solid #e4e7ec;
  background: #f8f9fb;
  color: #475467;
}

.ecom-chat .ecom-rich-notify .ecom-pill,
.ecom-chat .ecom-tool-card-head code {
  color: var(--ecom-blue-deep);
}

.ecom-chat .ecom-msg-card {
  border: 1px solid #e4e7ec;
  background: #fff;
}

.ecom-chat .ecom-msg-card-label {
  color: var(--ecom-blue-deep);
}

.ecom-chat .ecom-tool-card {
  border: 1px solid #e4e7ec;
  box-shadow: none;
}

.ecom-chat .ecom-tool-card-head {
  border-bottom: 1px solid #e4e7ec;
  background: #f8f9fb;
}

.ecom-result-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid #e4e7ec;
  border-radius: 13px;
  background: #fff;
}

.ecom-result-card.is-arrive {
  animation: ecomResultArrive 0.42s ease-out;
}

@keyframes ecomResultArrive {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.ecom-result-card.is-highlight {
  border-color: #b2c5ff;
  box-shadow: inset 3px 0 0 var(--ecom-blue);
}

.ecom-result-meta {
  display: block;
  margin-top: 3px;
  color: #98a2b3;
  font-size: 10px;
  font-style: normal;
}

.ecom-result-thumb,
.ecom-result-icon {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid #eaecf0;
  background: #f2f4f7;
}

.ecom-result-icon {
  display: grid;
  place-items: center;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.ecom-result-copy {
  min-width: 0;
}

.ecom-result-copy span,
.ecom-result-copy strong,
.ecom-result-copy small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ecom-result-copy span {
  margin-bottom: 2px;
  color: #667085;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.ecom-result-copy strong {
  color: #344054;
  font-size: 12px;
}

.ecom-result-copy small {
  margin-top: 3px;
  color: #98a2b3;
  font-size: 10px;
}

.ecom-result-card > button {
  padding: 5px 9px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #475467;
  font-size: 10px;
  cursor: pointer;
}

.ecom-result-card > button:hover {
  border-color: #8eabff;
  color: var(--ecom-blue-deep);
}

.ecom-playground {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--ecom-card);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  box-shadow: var(--ecom-shadow-lg);
  overflow: hidden;
}

.ecom-play-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ecom-line);
  flex: 0 0 auto;
  background: #fff;
}

.ecom-play-kicker {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ecom-muted);
}

.ecom-play-head h2 {
  margin: 3px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ecom-ink);
  letter-spacing: -0.02em;
}

.ecom-play-status {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 11px;
  line-height: 16px;
  height: 16px;
  max-width: 380px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-play-status-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

.ecom-play-status-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.ecom-play-status-beat b {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-play-status-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
  box-shadow: 0 0 0 2px #c7d7fe;
}

.ecom-play-status-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-play-status-beat i {
  width: 6px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-play-status-pill,
.ecom-play-status-next,
.ecom-play-status-watch {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.ecom-play-status-pill {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-play-status.is-acting .ecom-play-status-pill {
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
}

.ecom-play-status-next {
  background: #fff6ed;
  color: #c4320a;
}

.ecom-play-status-watch {
  background: #f2f4f7;
  color: #475467;
}

.ecom-play-status-watch.is-warn {
  background: #fffaeb;
  color: #b54708;
}

.ecom-play-status-watch.is-ok {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-play-status.is-live {
  color: #344054;
}

.ecom-play-status.is-tick {
  color: #175cd3;
  animation: none;
}

.ecom-bench-strip button.is-next-hint {
  box-shadow: inset 0 0 0 1px #fdc6a0;
  background: #fffaf3;
}

.ecom-bench-strip button.is-next-hint::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f79009;
  box-shadow: 0 0 0 3px rgba(247, 144, 9, 0.18);
  animation: ecomPulse 1.4s ease-in-out infinite;
}

@keyframes ecomStatusTick {
  from { opacity: 0.35; transform: translateY(2px); }
  to { opacity: 1; transform: none; }
}

.ecom-bench-strip button {
  position: relative;
}

.ecom-bench-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #f04438;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.ecom-play-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 20px;
  background:
    radial-gradient(900px 320px at 10% -10%, #e8f7f4 0%, transparent 60%),
    #f7f8fa;
}

#ecomPlayground .ecom-card-beat-row,
#ecomPlayground .ecom-stage-dual,
#ecomPlayground .ecom-sheet-beat,
#ecomPlayground .ecom-sheet-dual,
#ecomPlayground .ecom-comms-beat,
#ecomPlayground .ecom-comms-dual,
#ecomPlayground .ecom-agentic-beat,
#ecomPlayground .ecom-agentic-dual {
  display: none !important;
}

.ecom-play-empty {
  height: 100%;
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ecom-muted);
  font-size: 13px;
  padding: 24px;
  line-height: 1.6;
}

.ecom-play-panel {
  max-width: 760px;
  margin: 0 auto;
  animation: ecomPlayPanelIn 0.22s ease-out;
}

@keyframes ecomPlayPanelIn {
  from { opacity: 0.55; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

html.is-replay-fast .ecom-play-panel {
  animation: none;
}

.ecom-play-panel img.ecom-play-hero {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--ecom-line);
  display: block;
  box-shadow: var(--ecom-shadow-lg);
}

.ecom-play-panel .ecom-rich {
  box-shadow: var(--ecom-shadow-lg);
  border: 0;
  border-radius: 16px;
}

/* Right-side collaboration app: supplier / design / ops conversations */
.ecom-comms-app {
  height: 100%;
  min-height: 480px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--ecom-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--ecom-shadow-lg);
}

.ecom-comms-contacts {
  min-width: 0;
  padding: 10px 8px;
  overflow: auto;
  background: #f8f9fb;
  border-right: 1px solid var(--ecom-line);
}

.ecom-comms-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 12px;
  color: #667085;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ecom-comms-brand span {
  color: #98a2b3;
  font-size: 13px;
  letter-spacing: 0;
}

.ecom-comms-contact {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin: 2px 0;
  padding: 9px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ecom-ink);
  text-align: left;
  cursor: pointer;
}

.ecom-comms-contact:hover,
.ecom-comms-contact.is-active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}

.ecom-comms-contact.is-active {
  box-shadow: inset 3px 0 0 var(--ecom-blue), 0 1px 3px rgba(16, 24, 40, 0.08);
}

.ecom-comms-contact.is-unread {
  background: #fffaf5;
}

.ecom-comms-contact.is-unread strong {
  color: #b54708;
}

.ecom-comms-contact.is-unread b {
  animation: ecomUnreadPulse 1.2s ease-in-out infinite;
}

@keyframes ecomUnreadPulse {
  50% { transform: scale(1.08); }
}

.ecom-app-msg.is-new .ecom-app-bubble {
  animation: ecomMsgArriveSoft 0.42s cubic-bezier(0.22, 0.8, 0.28, 1);
}

@keyframes ecomMsgArrive {
  from { opacity: 0.55; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes ecomMsgArriveSoft {
  from { opacity: 0.72; }
  to { opacity: 1; }
}

.ecom-comms-contact img,
.ecom-comms-contact .avatar-letter {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: #e9efff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 12px;
  font-weight: 750;
}

.ecom-comms-contact span {
  min-width: 0;
}

.ecom-contact-row,
.ecom-contact-preview {
  display: flex !important;
  align-items: center;
  gap: 6px;
}

.ecom-contact-row time {
  margin-left: auto;
  color: #98a2b3;
  font-size: 9px;
  font-weight: 400;
}

.ecom-contact-preview small {
  flex: 1;
  min-width: 0;
}

.ecom-contact-preview b {
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eaf0ff;
  color: var(--ecom-blue);
  font-size: 9px;
}

.ecom-comms-contact strong,
.ecom-comms-contact small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ecom-comms-contact strong {
  font-size: 12px;
  line-height: 1.4;
}

.ecom-comms-contact small {
  margin-top: 2px;
  color: #98a2b3;
  font-size: 10px;
}

.ecom-comms-thread {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.ecom-comms-thread > header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--ecom-line);
  background: rgba(255, 255, 255, 0.92);
}

.ecom-comms-thread > header strong {
  font-size: 13px;
}

.ecom-comms-intent {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #eef2f6;
  background: #f8fafc;
  color: #475467;
  font-size: 11px;
  line-height: 1.35;
}

.ecom-comms-intent span {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-weight: 700;
  font-size: 10px;
}

.ecom-comms-intent em {
  font-style: normal;
  color: #344054;
}

.ecom-comms-intent.is-live {
  background: #eff8ff;
  border-bottom-color: #b2ddff;
}

.ecom-comms-intent.is-live span {
  background: #d1e9ff;
}

.ecom-comms-dual {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 10px;
  border-bottom: 1px solid #eef2f6;
  background: #ecfdf3;
  color: #3d9b8a;
  font-size: 10px;
}

.ecom-comms-dual i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.14);
  flex: 0 0 auto;
}

.ecom-comms-dual em {
  font-style: normal;
  font-weight: 600;
  min-width: 0;
}

.ecom-comms-dual b {
  margin-left: auto;
  flex: 0 0 auto;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff;
  color: #3d9b8a;
  box-shadow: inset 0 0 0 1px #abefc6;
}

.ecom-comms-dual b.is-warn {
  color: #b54708;
  box-shadow: inset 0 0 0 1px #fecd89;
}

.ecom-comms-app.is-dual {
  box-shadow: inset 0 0 0 1px #abefc6;
  border-radius: 12px;
}

.ecom-comms-beat {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 5px 10px;
  border-bottom: 1px solid #eef2f6;
  background: #f8fafc;
  font-size: 10px;
  color: #475467;
}

.ecom-comms-beat b {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-comms-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-comms-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-comms-beat i {
  width: 5px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-comms-beat em {
  font-style: normal;
  font-weight: 600;
  color: #667085;
}

.ecom-comms-next {
  margin: 0;
  padding: 5px 10px;
  border-bottom: 1px solid #eef2f6;
  font-size: 10px;
}

.ecom-app-composer.is-agent {
  color: #3d9b8a;
  background: #ecfdf3;
}

.ecom-app-composer.is-agent span {
  font-weight: 600;
}

.ecom-comms-thread > header small {
  margin-left: auto;
  color: #98a2b3;
  font-size: 10px;
}

.ecom-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 3px #d1fadf;
}

.ecom-app-messages {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background:
    radial-gradient(600px 260px at 100% 0%, rgba(232, 238, 255, 0.7), transparent 60%),
    #f7f8fa;
}

.ecom-app-msg {
  width: min(82%, 520px);
  margin-bottom: 14px;
}

.ecom-app-msg.is-mine {
  margin-left: auto;
}

.ecom-app-msg-who {
  display: block;
  margin: 0 6px 5px;
  color: #98a2b3;
  font-size: 10px;
}

.ecom-app-msg.is-mine .ecom-app-msg-who {
  text-align: right;
}

.ecom-app-bubble {
  padding: 11px 13px;
  border: 1px solid #e4e7ec;
  border-radius: 13px 13px 13px 4px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.ecom-app-msg.is-mine .ecom-app-bubble {
  border-color: #c7d7fe;
  border-radius: 13px 13px 4px 13px;
  background: #eaf0ff;
  color: #1d2939;
}

.ecom-app-bubble.is-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 42px;
  padding: 10px 12px;
}

.ecom-app-bubble.is-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #98a2b3;
  animation: ecomThinkDot 1s ease-in-out infinite;
}

.ecom-app-bubble.is-typing i:nth-child(2) { animation-delay: 0.15s; }
.ecom-app-bubble.is-typing i:nth-child(3) { animation-delay: 0.3s; }

.ecom-app-msg.is-typing {
  animation: ecomMsgArriveSoft 0.36s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.ecom-app-msg .ecom-rich {
  max-width: none;
  margin: 0;
}

.ecom-app-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #98a2b3;
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

.ecom-app-empty strong {
  color: #344054;
  font-size: 13px;
}

.ecom-app-empty small {
  max-width: 260px;
  color: #98a2b3;
  line-height: 1.5;
}

.ecom-empty-illustration {
  width: 48px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 18px 18px 18px 5px;
  background: linear-gradient(145deg, #5b82ff, #8da8ff);
  color: #fff;
  font-weight: 800;
  letter-spacing: 2px;
  box-shadow: 13px -8px 0 -5px #fff, 13px -8px 0 -3px #d0d5dd;
}

.ecom-app-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 12px;
  padding: 9px 10px 9px 13px;
  border: 1px solid var(--ecom-line);
  border-radius: 12px;
  color: #98a2b3;
  font-size: 11px;
  background: #fff;
}

.ecom-app-composer span {
  flex: 1;
}

.ecom-app-composer button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 9px;
  background: var(--ecom-blue);
  color: #fff;
}

@media (max-width: 900px) {
  .ecom-comms-app {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .ecom-comms-brand,
  .ecom-comms-contact span {
    display: none;
  }

  .ecom-comms-contact {
    display: grid;
    place-items: center;
    grid-template-columns: 1fr;
  }
}

.ecom-play-foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--ecom-line);
  padding: 8px 10px;
  height: 72px;
  overflow: hidden;
  background: #fff;
}

.ecom-play-foot .ecom-wall {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 7px;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #d0d5dd transparent;
}

.ecom-play-foot .ecom-wall-chip {
  flex: 0 0 156px;
  min-width: 0;
  max-width: 156px;
  border-radius: 11px;
  border-color: #e4e7ec;
  background: #fff;
  padding: 5px 7px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ecom-play-foot .ecom-wall-chip:hover {
  background: #fff;
  border-color: #b2c5ff;
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.ecom-play-foot .ecom-wall-chip.is-highlight {
  border-color: #8eabff;
  background: #f7f9ff;
  box-shadow: inset 0 0 0 1px rgba(59, 111, 245, 0.08);
}

.ecom-play-foot .ecom-wall-chip {
  position: relative;
}

.ecom-play-foot .ecom-wall-chip.is-new {
  border-color: #84caff;
  background: #f0f9ff;
  animation: ecomWallArrive 0.55s ease-out;
}

.ecom-wall-new {
  position: absolute;
  top: 4px;
  right: 5px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--ecom-blue);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  line-height: 1.5;
}

@keyframes ecomWallArrive {
  from { opacity: 0; transform: translateX(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.ecom-wall-label {
  position: sticky;
  left: 0;
  z-index: 2;
  flex: 0 0 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 0 8px 0 4px;
  border-right: 1px solid #e4e7ec;
  background: #fff;
}

.ecom-wall-label strong {
  color: #344054;
  font-size: 11px;
}

.ecom-wall-label span {
  width: fit-content;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 9px;
  text-align: center;
}

.ecom-wall-live {
  width: fit-content;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #3d9b8a;
  font-size: 9px;
  font-weight: 700;
}

.ecom-wall-dual {
  width: fit-content;
  font-style: normal;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 9px;
  font-weight: 700;
}

.ecom-wall-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.ecom-wall-beat b {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-wall-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-wall-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-wall-beat i {
  width: 4px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-wall-tip {
  font-style: normal;
  font-size: 9px;
  line-height: 1.25;
  color: #667085;
  max-width: 80px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ecom-wall.is-live {
  background: linear-gradient(90deg, #f6fffb 0%, #fff 42%);
}

.ecom-wall.is-live .ecom-wall-label {
  background: #f6fffb;
}

.ecom-wall-chip.is-dual {
  box-shadow: inset 0 0 0 1px rgba(171, 239, 198, 0.75);
}

.ecom-result-card.is-dual {
  box-shadow: inset 0 0 0 1px #abefc6;
}

.ecom-wall-empty {
  display: flex;
  align-items: center;
  color: #98a2b3;
  font-size: 11px;
}

.ecom-tool-card {
  border: 0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.ecom-tool-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 650;
  color: #344054;
}

.ecom-tool-card.is-dual {
  box-shadow: inset 0 0 0 1px #b2ddff, 0 1px 2px rgba(16, 24, 40, 0.04);
}

.ecom-tool-beat {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ecom-tool-beat b {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #98a2b3;
  background: #fff;
}

.ecom-tool-beat b.is-on {
  color: #fff;
  background: var(--ecom-blue);
  box-shadow: 0 0 0 3px rgba(59, 111, 245, 0.14);
}

.ecom-tool-beat b.is-done {
  color: #3d9b8a;
  background: #ecfdf3;
}

.ecom-tool-beat i {
  width: 5px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-tool-dual {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding: 5px 7px;
  border-radius: 8px;
  background: #ecfdf3;
  color: #3d9b8a;
  font-size: 11px;
}

.ecom-tool-dual i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.14);
  flex: 0 0 auto;
}

.ecom-tool-dual em {
  font-style: normal;
  font-weight: 600;
}

.ecom-tool-card-head .spin {
  width: 12px;
  height: 12px;
  border: 2px solid #d0d5dd;
  border-top-color: var(--ecom-blue);
  border-radius: 50%;
  animation: ecomSpin 0.8s linear infinite;
}

.ecom-tool-card.is-done .spin {
  display: none;
}

.ecom-tool-card-body {
  padding: 10px 12px 12px;
  font-size: 12px;
  color: #475467;
  line-height: 1.5;
}

.ecom-tool-card-body code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: #f7f8fa;
  padding: 2px 6px;
  border-radius: 5px;
  color: #344054;
}

.ecom-tool-args {
  margin-bottom: 8px;
  color: #475467;
  font-size: 12px;
  line-height: 1.45;
}

.ecom-tool-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.ecom-tool-steps li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #98a2b3;
  font-size: 11px;
}

.ecom-tool-steps li i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #d0d5dd;
  background: #fff;
  flex: 0 0 auto;
}

.ecom-tool-steps li.is-active {
  color: #175cd3;
  font-weight: 600;
}

.ecom-tool-steps li.is-active i {
  border-color: var(--ecom-blue);
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(59, 111, 245, 0.12);
}

.ecom-tool-steps li.is-done {
  color: #3d9b8a;
}

.ecom-tool-steps li.is-done i {
  border-color: #12b76a;
  background: #12b76a;
  box-shadow: inset 0 0 0 1.5px #fff;
}

.ecom-tool-check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-flex;
  position: relative;
}

.ecom-tool-check.is-ok {
  background: #12b76a;
}

.ecom-tool-check.is-ok::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.ecom-tool-check.is-bad {
  background: #f04438;
}

.ecom-tool-card.is-failed .ecom-tool-card-head {
  background: #fef3f2;
}

@keyframes ecomSpin {
  to { transform: rotate(360deg); }
}

.ecom-left,
.ecom-center,
.ecom-right {
  background: var(--ecom-card);
  border: 1px solid var(--ecom-line);
  border-radius: var(--ecom-radius);
  box-shadow: var(--ecom-shadow);
  min-height: 0;
  overflow: hidden;
}

.ecom-left {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 10px;
}

.ecom-sku-card {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--ecom-line);
}

.ecom-sku-thumb {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px;
  max-height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff7ed;
  font-size: 12px;
  overflow: hidden;
  flex: 0 0 40px;
}

.ecom-sku-thumb.has-img {
  width: 40px !important;
  height: 40px !important;
}

.ecom-sku-thumb img {
  width: 40px !important;
  height: 40px !important;
  object-fit: cover;
  display: block;
}

.ecom-sku-card strong {
  display: block;
  font-size: 12px;
}

.ecom-sku-card span {
  font-size: 10px;
  color: var(--ecom-muted);
  font-family: var(--font-mono);
}

.ecom-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ecom-nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
}

.ecom-nav button.is-active,
.ecom-nav button:hover {
  background: #eff6ff;
  color: var(--ecom-blue-deep);
  font-weight: 650;
}

.ecom-flow-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
  border-top: 1px solid var(--ecom-line);
}

.ecom-flow-head strong {
  font-size: 12px;
}

.ecom-flow-head span {
  font-size: 11px;
  color: var(--ecom-muted);
  line-height: 1.35;
}

.ecom-task-flow {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ecom-flow-progress {
  font-size: 11px;
  color: var(--ecom-blue-deep);
  font-weight: 650;
}

.ecom-flow-step {
  border: 1px solid var(--ecom-line);
  border-radius: 10px;
  padding: 8px;
  background: #fafafa;
}

.ecom-flow-step.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.ecom-flow-step.is-done {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.ecom-flow-step-top {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 6px;
  align-items: center;
}

.ecom-flow-step-top .n {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  background: #e5e7eb;
  color: #374151;
}

.ecom-flow-step.is-active .n {
  background: var(--ecom-blue);
  color: #fff;
}

.ecom-flow-step.is-done .n {
  background: var(--ecom-green);
  color: #fff;
}

.ecom-flow-step-top strong {
  font-size: 12px;
}

.ecom-flow-step-top em {
  font-style: normal;
  font-size: 10px;
  color: var(--ecom-muted);
}

.ecom-flow-step.is-active .ecom-flow-step-top em {
  color: var(--ecom-green);
  font-weight: 650;
}

.ecom-flow-step ul {
  margin: 8px 0 0;
  padding: 0 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ecom-flow-step li {
  font-size: 11px;
  color: var(--ecom-muted);
}

.ecom-flow-step li.is-on {
  color: var(--ecom-blue-deep);
  font-weight: 700;
}

.ecom-flow-step li.is-ok {
  color: var(--ecom-green);
}

.ecom-left-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ecom-btn-primary,
.ecom-btn-ghost {
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ecom-btn-primary {
  background: var(--ecom-blue);
  color: #fff;
  border-color: var(--ecom-blue);
  box-shadow: 0 1px 2px rgba(61, 155, 138, 0.28);
}

.ecom-btn-primary:hover {
  background: var(--ecom-blue-deep);
}

#ecomBtnReplay.is-idle-pulse {
  animation: ecomReplayPulse 1.8s ease-in-out infinite;
}

#ecomBtnReplay.is-running {
  background: var(--agent-teal-deep, #3d9b8a);
  box-shadow: inset 0 0 0 1px #b9e8df, 0 0 0 3px rgba(95, 191, 176, 0.2);
  pointer-events: none;
  opacity: 0.92;
}

#ecomBtnReplay.is-running::after {
  content: " · · ·";
  letter-spacing: 0.08em;
  font-weight: 700;
}

@keyframes ecomReplayPulse {
  0%, 100% { box-shadow: 0 1px 2px rgba(61, 155, 138, 0.28); }
  50% { box-shadow: 0 0 0 4px rgba(59, 111, 245, 0.18), 0 1px 2px rgba(61, 155, 138, 0.28); }
}

.ecom-btn-ghost {
  background: #fff;
  border-color: var(--ecom-line);
  color: #344054;
}

.ecom-btn-ghost:hover {
  background: #f7f8fa;
}

.ecom-center {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ecom-center-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--ecom-line);
  padding-right: 8px;
  min-width: 0;
}

.ecom-center-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 10px 0;
  border-bottom: 0;
  overflow-x: auto;
  min-width: 0;
  flex: 1;
}

.ecom-bench-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 4px;
  background: #f7f8fa;
  border-radius: 10px;
  border: 1px solid var(--ecom-line);
}

.ecom-bench-strip button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: #667085;
  font-size: 13px;
}

.ecom-bench-strip button.is-active {
  background: #fff;
  border-color: #d0d5dd;
  color: var(--ecom-blue-deep);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.ecom-bench-strip button.is-pulse {
  animation: ecomBenchPulse 0.75s ease-out;
}

@keyframes ecomBenchPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 111, 245, 0.35); transform: scale(1); }
  40% { box-shadow: 0 0 0 6px rgba(59, 111, 245, 0); transform: scale(1.08); }
  100% { box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06); transform: scale(1); }
}

.ecom-center-tabs button {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--ecom-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.ecom-center-tabs button.is-active {
  color: var(--ecom-blue-deep);
  font-weight: 700;
  border-bottom-color: var(--ecom-blue);
}

.ecom-agent-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border-bottom: 0;
  font-size: 12px;
}

.ecom-agent-bar strong {
  display: block;
  color: var(--ecom-ink);
  font-weight: 700;
}

.ecom-agent-bar span {
  color: var(--ecom-muted);
}

.ecom-agent-activity {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  border-left: none;
  font-size: 10px;
  color: #667085;
  background: transparent;
  transition: color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.ecom-agent-activity.has-beat {
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px #e4e7ec;
}

.ecom-agent-activity.is-dual.has-beat {
  background: #ecfdf3;
  box-shadow: inset 0 0 0 1px #abefc6;
}

.ecom-activity-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  margin-left: 2px;
}

.ecom-activity-beat b {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-activity-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-activity-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-activity-beat i {
  width: 4px;
  height: 1px;
  border-radius: 0;
  background: #d0d5dd;
  box-shadow: none;
}

.ecom-agent-activity > i:first-child {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #98a2b3;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.ecom-agent-activity em {
  color: #667085;
  font-style: normal;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecom-agent-mode {
  margin-left: 2px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ecom-agent-activity.is-observing .ecom-agent-mode {
  background: #eff8ff;
  color: #175cd3;
}

.ecom-agent-activity.is-planning .ecom-agent-mode {
  background: #f4f3ff;
  color: #5925dc;
}

.ecom-agent-activity.is-acting .ecom-agent-mode,
.ecom-agent-activity.is-communicating .ecom-agent-mode {
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
}

.ecom-agent-activity.is-verified .ecom-agent-mode {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-agent-activity.is-dual {
  background: #f0fdf4;
}

.ecom-agent-activity.is-dual .ecom-agent-mode {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-agent-activity:not(.is-idle) > i:first-child {
  background: var(--ecom-blue);
  box-shadow: 0 0 0 3px rgba(59, 111, 245, 0.12);
  animation: ecomActivityPulse 1.1s ease-in-out infinite;
}

.ecom-agent-activity.is-verified > i:first-child {
  background: #12b76a;
  box-shadow: none;
  animation: none;
}

@keyframes ecomActivityPulse {
  50% { opacity: 0.42; }
}

.ecom-play-stage.is-switching {
  animation: ecomSurfaceSwitch 0.22s ease-out;
}

@keyframes ecomSurfaceSwitch {
  from { opacity: 0.72; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ecom-play-stage.is-switching,
  .ecom-agent-activity > i:first-child,
  .ecom-live-dot,
  .ecom-wave i,
  .ecom-agentic-step .dot,
  .ecom-top-kpi.is-changed {
    animation: none !important;
  }
}

.ecom-eta {
  margin-left: auto;
  color: var(--ecom-muted);
  font-size: 11px;
}

.ecom-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d0d5dd;
  flex: 0 0 auto;
}

.ecom-live-dot.is-on {
  background: var(--ecom-blue);
  box-shadow: 0 0 0 4px rgba(59, 111, 245, 0.18);
  animation: ecomPulse 1.4s ease-in-out infinite;
}

.ecom-live-dot.is-on[data-mode="observing"] {
  background: #f79009;
  box-shadow: 0 0 0 4px rgba(247, 144, 9, 0.18);
}

.ecom-live-dot.is-on[data-mode="planning"],
.ecom-live-dot.is-on[data-mode="acting"],
.ecom-live-dot.is-on[data-mode="communicating"] {
  background: var(--ecom-blue);
}

.ecom-live-dot.is-on[data-mode="verified"] {
  background: #12b76a;
  box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.18);
  animation: none;
}

@keyframes ecomPulse {
  50% { transform: scale(1.15); }
}

.ecom-stream-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ecom-messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #fcfcfd, #f8fafc);
}

.ecom-stream-empty,
.ecom-muted {
  color: var(--ecom-muted);
  font-size: 12px;
  text-align: center;
  padding: 18px 8px;
}

.ecom-stream-empty {
  display: grid;
  gap: 6px;
  place-items: center;
  padding: 28px 16px;
}

.ecom-stream-empty strong {
  color: #344054;
  font-size: 13px;
}

.ecom-stream-empty p {
  margin: 0;
  max-width: 320px;
  line-height: 1.45;
}

.ecom-stream-empty.is-dual {
  background: linear-gradient(180deg, #eff8ff 0%, transparent 70%);
  border-radius: 14px;
}

.ecom-stream-empty-stage {
  font-style: normal;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #3d9b8a;
  font-size: 10px;
  font-weight: 700;
}

.ecom-stream-empty-beat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ecom-stream-empty-beat + .ecom-stream-empty-stage {
  margin-left: 6px;
}

.ecom-stream-empty-beat b {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #667085;
  background: #f2f4f7;
}

.ecom-stream-empty-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-stream-empty-beat i {
  width: 8px;
  height: 1px;
  background: #e4e7ec;
}

.ecom-stream-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(720px, 100%);
}

.ecom-stream-who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.ecom-stream-kind,
.ecom-stream-dual {
  font-style: normal;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.ecom-stream-kind {
  background: #f2f4f7;
  color: #667085;
}

.ecom-stream-kind.kind-stage {
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
}

.ecom-stream-kind.kind-world,
.ecom-stream-kind.kind-notify {
  background: #eff8ff;
  color: #175cd3;
}

.ecom-stream-kind.kind-discovery,
.ecom-stream-kind.kind-wrapup {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-stream-kind.kind-tool,
.ecom-stream-kind.kind-call {
  background: #f4f3ff;
  color: #5925dc;
}

.ecom-stream-dual {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-stream-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  flex: 0 0 auto;
  background: #f1f5f9;
}

.ecom-stream-avatar.is-letter {
  display: grid;
  place-items: center;
  font-size: 10px;
  color: #475569;
}

.ecom-msg-bubble {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--ecom-line);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ecom-stream-item.mine .ecom-msg-bubble {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.ecom-msg-card {
  padding: 12px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.ecom-msg-card-label {
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ecom-msg-card-body {
  margin: 6px 0;
  font-weight: 650;
  font-size: 13px;
}

.ecom-msg-card-btn {
  border: 0;
  background: var(--ecom-ink);
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}

.ecom-msg-card.is-dual {
  box-shadow: inset 3px 0 0 #12b76a;
}

.ecom-msg-card-beat {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  min-width: 0;
}

.ecom-msg-card-beat .ecom-thinking-beat {
  flex: 0 0 auto;
}

.ecom-msg-card-beat > em {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #475467;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.ecom-msg-card-next {
  display: block;
  margin: 0 0 8px;
  color: #344054;
  font-style: normal;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 600;
}

.ecom-msg-dual-foot {
  display: block;
  margin-top: 2px;
  padding-left: 2px;
  color: #3d9b8a;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.ecom-rich {
  background: #fff;
  border: 1px solid var(--ecom-line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--ecom-shadow);
}

.ecom-rich-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.ecom-rich-head strong {
  font-size: 13px;
}

.ecom-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--ecom-blue-deep);
}

.ecom-pill.is-live {
  background: #dcfce7;
  color: #047857;
}

.ecom-pill.is-done {
  background: #f1f5f9;
  color: #64748b;
}

.ecom-rich-world.is-danger,
.ecom-rich-mutation {
  border-color: #fecaca;
  background: #fff1f2;
}

.ecom-rich-world.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.ecom-rich-world.is-ok {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.ecom-rich-notify,
.ecom-rich-discovery {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.ecom-rich-discovery {
  border-left: 3px solid var(--ecom-blue);
}

.ecom-rich-world .muted,
.ecom-rich-mutation .muted,
.ecom-rich-discovery .muted {
  margin: 0;
  font-size: 11px;
  color: #64748b;
}

.ecom-agent-activity.is-observing {
  color: #b54708;
  background: #fffaeb;
}

.ecom-agent-activity.is-planning {
  color: var(--agent-teal-deep, #3d9b8a);
  background: #eef4ff;
}

.ecom-agent-activity.is-acting,
.ecom-agent-activity.is-communicating {
  color: #175cd3;
  background: #eff8ff;
}

.ecom-agent-activity.is-verified {
  color: #3d9b8a;
  background: #ecfdf3;
}

.ecom-thinking {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 8px 0 2px 18px;
  padding: 7px 12px;
  width: fit-content;
  max-width: min(420px, 92%);
  border: 1px solid #dceae6;
  border-radius: 999px;
  background: #f7fbfa;
  color: #667085;
  font-size: 11px;
  animation: ecomThinkIn 0.16s ease-out;
  will-change: opacity;
}

.ecom-thinking.is-leaving,
.wedding-thinking.is-leaving {
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.24s ease, transform 0.24s ease;
  pointer-events: none;
}

.ecom-thinking i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #98a2b3;
  animation: ecomThinkDot 1s ease-in-out infinite;
}

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

.ecom-thinking em {
  font-style: normal;
  color: #475467;
}

.ecom-thinking-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.ecom-thinking-copy small {
  color: #98a2b3;
  font-size: 10px;
  line-height: 1.3;
}

.ecom-thinking.is-dual {
  border-color: #b2ddff;
  background: linear-gradient(90deg, #f8fafc 0%, #eff8ff 100%);
}

.ecom-thinking-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.ecom-thinking-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.ecom-thinking-beat b {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-thinking-beat b.is-on {
  color: #fff;
  background: #5925dc;
  box-shadow: 0 0 0 2px #d9d6fe;
}

.ecom-thinking-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-thinking-beat i {
  width: 5px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-thinking-dual,
.ecom-thinking-mode,
.ecom-thinking-stage {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.01em;
}

.ecom-thinking-dual {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-thinking-mode {
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
}

.ecom-thinking-stage {
  background: #f2f4f7;
  color: #667085;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-play-empty.is-standby {
  display: grid;
  gap: 8px;
  place-content: center;
  text-align: center;
  padding: 28px 22px;
  color: #667085;
}

.ecom-play-empty.is-standby strong {
  color: #101828;
  font-size: 14px;
}

.ecom-play-empty.is-standby p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  max-width: 360px;
}

.ecom-standby-chips {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.ecom-standby-chips li {
  position: relative;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  border: 1px solid #e4e7ec;
  font-size: 10px;
  color: #475467;
}

.ecom-standby-chips li.is-next {
  background: #eff4ff;
  border-color: #b2ddff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-weight: 700;
}

.ecom-standby-chips li.is-next b {
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--agent-teal-deep, #3d9b8a);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.ecom-standby-chips li.is-next.is-pulse {
  animation: ecomStandbyNextPulse 1.4s ease-in-out infinite;
}

@keyframes ecomStandbyNextPulse {
  50% { box-shadow: 0 0 0 4px rgba(53, 56, 205, 0.12); }
}

.ecom-standby-beat {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  margin: 8px 0 0;
  max-width: 380px;
}

.ecom-standby-beat b {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-standby-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
  box-shadow: 0 0 0 2px #c7d7fe;
}

.ecom-standby-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-standby-beat i {
  width: 8px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-standby-beat em {
  flex: 1 1 100%;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: #475467;
  text-align: center;
}

.ecom-standby-dual {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  max-width: 360px;
  font-size: 11px;
  color: #3d9b8a;
}

.ecom-standby-dual i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.16);
  animation: ecomPulse 1.4s ease-in-out infinite;
  flex: 0 0 auto;
}

.ecom-standby-dual em {
  font-style: normal;
  font-weight: 600;
}

.ecom-play-empty.is-standby.is-live {
  background: linear-gradient(180deg, #f3fbf9 0%, #fff 70%);
  border-radius: 14px;
}

.ecom-standby-stage,
.ecom-standby-watch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 0;
  max-width: 380px;
  font-size: 11px;
  line-height: 1.35;
}

.ecom-standby-stage span,
.ecom-standby-watch span {
  padding: 1px 6px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 10px;
  font-weight: 700;
}

.ecom-standby-stage em,
.ecom-standby-watch em {
  font-style: normal;
  color: #344054;
  font-weight: 600;
}

.ecom-standby-stage small {
  color: #98a2b3;
}

.ecom-standby-watch.is-ok span {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-standby-watch.is-warn span {
  background: #fffaeb;
  color: #b54708;
}

@keyframes ecomThinkIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes ecomThinkDot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.ecom-rich-table td.is-flash {
  animation: ecomCellFlash 1.1s ease-out;
}

.ecom-sheet-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.ecom-sheet-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
}

.ecom-sheet-chip em {
  font-style: normal;
  color: #98a2b3;
}

.ecom-sheet-chip b {
  color: #101828;
  font-weight: 650;
}

.ecom-sheet-panel.is-verifying {
  box-shadow: inset 0 0 0 1px rgba(18, 183, 106, 0.22);
  border-radius: 12px;
}

.ecom-sheet-panel.is-dual {
  box-shadow: inset 0 0 0 1px #abefc6;
  border-radius: 12px;
}

.ecom-sheet-panel.is-dual.is-verifying {
  box-shadow: inset 0 0 0 1px rgba(18, 183, 106, 0.45);
}

.ecom-sheet-beat {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0 0 8px;
  font-size: 11px;
  color: #475467;
}

.ecom-sheet-beat b {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-sheet-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-sheet-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-sheet-beat i {
  width: 6px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-sheet-beat em {
  font-style: normal;
  font-weight: 600;
  color: #667085;
}

.ecom-sheet-verify {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
}

.ecom-sheet-verify.is-fresh {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #3d9b8a;
}

.ecom-sheet-verify i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.ecom-sheet-dual {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #ecfdf3;
  color: #3d9b8a;
  font-size: 11px;
  line-height: 1.35;
}

.ecom-sheet-dual.is-fresh {
  box-shadow: inset 0 0 0 1px #abefc6;
}

.ecom-sheet-dual i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.14);
  flex: 0 0 auto;
}

.ecom-sheet-dual em {
  font-style: normal;
  font-weight: 600;
  min-width: 0;
}

.ecom-sheet-dual b {
  margin-left: auto;
  flex: 0 1 auto;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  color: #667085;
}

.ecom-sheet-dual b.is-warn {
  color: #b54708;
}

.ecom-sheet-dual b.is-ok {
  color: #3d9b8a;
}

.ecom-sheet-next {
  margin: 0 0 8px;
}

.ecom-call-surface.is-dual {
  box-shadow: inset 0 0 0 1px #abefc6;
  border-radius: 12px;
  padding: 2px;
}

.ecom-call-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: 8px 0;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f8fafc;
  color: #475467;
  font-size: 11px;
}

.ecom-call-summary span,
.ecom-call-summary b {
  font-weight: 700;
}

.ecom-call-summary em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.ecom-call-summary.is-live span {
  color: #175cd3;
}

.ecom-call-summary.is-done span {
  color: #3d9b8a;
}

.ecom-call-beat {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 11px;
  color: #475467;
}

.ecom-call-beat b {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-call-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-call-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-call-beat i {
  width: 5px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-call-beat em {
  font-style: normal;
  font-weight: 600;
  color: #667085;
}

.ecom-call-next {
  margin: 0 0 8px;
}

.ecom-call-dual {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #ecfdf3;
  color: #3d9b8a;
  font-size: 11px;
}

.ecom-call-dual.is-live {
  background: #eff8ff;
  color: #175cd3;
}

.ecom-call-dual i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(23, 92, 211, 0.12);
  flex: 0 0 auto;
}

.ecom-call-dual.is-done i {
  background: #12b76a;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.14);
}

.ecom-call-dual em {
  font-style: normal;
  font-weight: 600;
  min-width: 0;
}

.ecom-call-dual b {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font-size: 10px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #d0d5dd;
}

.ecom-result-next {
  display: block;
  margin-top: 4px;
  color: #344054;
  font-style: normal;
  font-size: 11px;
  line-height: 1.35;
}

.ecom-result-beat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  min-width: 0;
}

.ecom-result-copy .ecom-result-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  margin-bottom: 0;
  overflow: visible;
  white-space: nowrap;
  text-overflow: unset;
  text-transform: none;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.ecom-result-beat b {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-result-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-result-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-result-beat i {
  width: 4px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-result-beat-row > em {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #475467;
  font-style: normal;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 600;
}

.ecom-sheet-chip.is-flash {
  border-color: #84caff;
  background: #f0f9ff;
  animation: ecomCellFlash 1.1s ease-out;
}

.ecom-chat .ecom-rich-notify .muted {
  margin: 5px 0 0;
  font-size: 11px;
  color: #667085;
}

.ecom-notify-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: min(320px, 72vw);
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.12);
}

.ecom-notify-panel.is-dual {
  border-color: #abefc6;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.12), inset 0 0 0 1px rgba(171, 239, 198, 0.45);
}

.ecom-notify-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.ecom-notify-dual {
  margin-left: auto;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
}

.ecom-notify-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow: auto;
}

.ecom-notify-panel li {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border-left: 3px solid #98a2b3;
  font-size: 11px;
}

.ecom-notify-panel li.is-warn { border-left-color: #f79009; background: #fffaeb; }
.ecom-notify-panel li.is-danger { border-left-color: #f04438; background: #fef3f2; }
.ecom-notify-panel li.is-ok { border-left-color: #12b76a; background: #ecfdf3; }
.ecom-notify-panel li.is-info { border-left-color: var(--ecom-blue); background: #eff8ff; }

.ecom-notify-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 10px;
  color: #98a2b3;
  line-height: 1.35;
}

.ecom-notify-hint.is-live {
  color: #3d9b8a;
  background: #ecfdf3;
  border-radius: 6px;
  padding: 5px 7px;
}

.ecom-notify-hint > span {
  min-width: 0;
}

.ecom-notify-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.ecom-notify-beat b {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  color: #98a2b3;
  background: #fff;
}

.ecom-notify-beat b.is-on {
  color: #fff;
  background: #175cd3;
}

.ecom-notify-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-notify-beat i {
  width: 4px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-notify-panel li.is-dual {
  box-shadow: inset 0 0 0 1px rgba(171, 239, 198, 0.55);
}

.ecom-notify-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.ecom-notify-phase {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 999px;
  background: #eff8ff;
  color: #175cd3;
}

.ecom-notify-panel li.is-phase-logged .ecom-notify-phase {
  background: #f4f3ff;
  color: #5925dc;
}

.ecom-notify-panel li.is-phase-verified .ecom-notify-phase {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-notify-foot {
  margin: 8px 0 0;
  padding-top: 7px;
  border-top: 1px dashed #e4e7ec;
  font-size: 10px;
  color: #667085;
}

.ecom-notify-panel li > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ecom-notify-panel li b {
  color: #475467;
  font-weight: 600;
}

.ecom-notify-panel li time {
  color: #98a2b3;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.ecom-notify-panel li > span,
.ecom-notify-panel .muted {
  color: #667085;
}

.ecom-auto-toggle {
  display: none;
}

@keyframes ecomCellFlash {
  0% { background: #dbeafe; color: #175cd3; }
  100% { background: transparent; }
}

.ecom-flow-step[data-stage^="disrupt"].is-active {
  background: #fff1f2;
  border-color: #fecaca;
}

.ecom-flow-step[data-stage^="disrupt"].is-active .n {
  background: #ef4444;
}

.ecom-rich-call.is-ended .ecom-wave {
  background: #f1f5f9;
  opacity: 0.55;
}

.ecom-rich-call.is-ended .ecom-wave i {
  animation: none;
  height: 6px;
  background: #94a3b8;
}

.ecom-timer {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ecom-muted);
}

.ecom-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eff6ff;
}

.ecom-wave i {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--ecom-blue);
  animation: ecomWave 0.9s ease-in-out infinite;
}

.ecom-wave i:nth-child(2) { animation-delay: 0.08s; }
.ecom-wave i:nth-child(3) { animation-delay: 0.16s; }
.ecom-wave i:nth-child(4) { animation-delay: 0.24s; }
.ecom-wave i:nth-child(5) { animation-delay: 0.32s; }
.ecom-wave i:nth-child(6) { animation-delay: 0.4s; }
.ecom-wave i:nth-child(7) { animation-delay: 0.48s; }

@keyframes ecomWave {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

.ecom-transcript p {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.45;
}

.ecom-transcript .muted {
  color: var(--ecom-muted);
}

.ecom-call-note {
  margin: 8px 0 0;
  font-size: 12px;
}

/* Live ASR transcript under call card */
.ecom-stream-panel {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--ecom-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--ecom-shadow-lg);
}

.ecom-stream-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ecom-line);
  background: #fafbfc;
}

.ecom-stream-hint {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--ecom-muted);
  text-transform: uppercase;
}

.ecom-stream-log {
  height: 190px;
  min-height: 190px;
  max-height: 190px;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7f8fa;
}

.ecom-stream-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 13px;
  line-height: 1.5;
}

.ecom-stream-line .who {
  font-size: 11px;
  font-weight: 700;
  color: #667085;
  padding-top: 2px;
}

.ecom-stream-line.is-agent .who { color: var(--agent-teal-deep, #3d9b8a); }
.ecom-stream-line.is-peer .who { color: #3d9b8a; }

.ecom-stream-line .text {
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  color: #1a1d23;
  border: 1px solid var(--ecom-line);
}

.ecom-stream-line.is-typing .text {
  border-color: #c7d7fe;
  box-shadow: 0 0 0 3px rgba(59, 111, 245, 0.08);
}

.ecom-stream-line .asr-tag {
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ecom-call-topic,
.ecom-call-speaking {
  margin: 0 0 6px;
  font-size: 11px;
  color: #667085;
}

.ecom-call-speaking {
  color: #175cd3;
  min-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecom-call-speaking.is-idle {
  color: #98a2b3;
}

.ecom-call-intent {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 0 0 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  font-size: 11px;
  color: #344054;
  line-height: 1.35;
}

.ecom-call-intent span {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 10px;
  font-weight: 700;
}

.ecom-call-extract {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 8px 0 6px;
}

.ecom-call-extract span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 6px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  min-width: 0;
}

.ecom-call-extract span em {
  font-style: normal;
  font-size: 9px;
  color: #98a2b3;
}

.ecom-call-extract span b {
  font-size: 11px;
  color: #98a2b3;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-call-extract span.is-on {
  background: #ecfdf3;
  border-color: #abefc6;
}

.ecom-call-extract span.is-on b {
  color: #3d9b8a;
}

.ecom-call-extract span.is-pop {
  animation: ecomBenchPulse 0.7s ease-out;
}

.ecom-wave.is-speak-agent {
  background: #ecfdf3;
}

.ecom-wave.is-speak-agent i {
  background: #12b76a;
}

.ecom-wave.is-speak-peer {
  background: #eff8ff;
}

.ecom-call-speaking.is-live {
  margin: 0 0 6px;
  color: #175cd3;
  font-size: 11px;
  font-weight: 600;
}

.ecom-call-asr {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 10px;
  color: #667085;
}

.ecom-call-asr i {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #e4e7ec;
  position: relative;
  overflow: hidden;
}

.ecom-call-asr i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--c, 86%);
  background: linear-gradient(90deg, #84caff, var(--agent-teal-deep, #3d9b8a));
  border-radius: inherit;
  transition: width 0.18s ease;
}

.ecom-call-asr em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: #344054;
  text-align: right;
}

.ecom-stream-line .asr-tag {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 9px;
}

.ecom-rich-call.is-live .ecom-call-speaking::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #f79009;
  vertical-align: middle;
  animation: ecomPulse 1s ease-in-out infinite;
}

/* Agentic pack / video editing surface */
.ecom-agentic-surface {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(200px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.ecom-agentic-canvas {
  position: relative;
  min-width: 0;
}

.ecom-agentic-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.ecom-agentic-why {
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #eef0f3;
  font-size: 11px;
  line-height: 1.35;
  color: #344054;
}

.ecom-agentic-why span {
  display: inline-block;
  margin-right: 6px;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 600;
}

.ecom-agentic-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 11px;
  color: #475467;
}

.ecom-agentic-meta.is-dual {
  padding: 6px 7px;
  border-radius: 10px;
  background: #f6fffb;
  box-shadow: inset 0 0 0 1px #abefc6;
}

.ecom-agentic-surface.is-dual {
  box-shadow: inset 0 0 0 1px #abefc6;
  border-radius: 12px;
}

.ecom-agentic-beat {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 2px 0 0;
}

.ecom-agentic-beat b {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-agentic-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-agentic-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-agentic-beat i {
  width: 5px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-agentic-beat em {
  font-style: normal;
  font-weight: 600;
  color: #667085;
  font-size: 10px;
}

.ecom-agentic-hands {
  padding: 2px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-weight: 700;
  font-size: 10px;
}

.ecom-agentic-hands.is-on {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-agentic-hands.is-done {
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
}

.ecom-agentic-count,
.ecom-agentic-pct {
  font-variant-numeric: tabular-nums;
  color: #344054;
  font-weight: 600;
}

.ecom-agentic-next {
  flex: 1 1 100%;
  margin: 0;
  font-style: normal;
  color: #667085;
  line-height: 1.35;
}

.ecom-agentic-dual {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  padding: 5px 7px;
  border-radius: 8px;
  background: #ecfdf3;
  color: #3d9b8a;
  font-size: 10px;
  line-height: 1.35;
}

.ecom-agentic-dual.is-busy {
  background: #eff8ff;
  color: #175cd3;
}

.ecom-agentic-dual i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(23, 92, 211, 0.12);
  flex: 0 0 auto;
}

.ecom-agentic-dual.is-done i {
  background: #12b76a;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.14);
}

.ecom-agentic-dual em {
  font-style: normal;
  font-weight: 600;
}

.ecom-agentic-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 8px;
}

.ecom-agentic-checks span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 5px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-agentic-checks span i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.ecom-agentic-checks span.is-on {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #3d9b8a;
}

#ecomNotifyBtn.is-ping {
  animation: ecomNotifyPing 0.9s ease-out;
}

#ecomNotifyBtn.is-warn {
  box-shadow: 0 0 0 3px rgba(247, 144, 9, 0.22);
}

#ecomNotifyBtn.is-danger {
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.22);
}

@keyframes ecomNotifyPing {
  0% { transform: scale(1); }
  35% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.ecom-agentic-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  background: rgba(26, 29, 35, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  padding: 5px 9px;
  border-radius: 999px;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecom-agentic-badge.static {
  position: static;
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
  max-width: none;
}

.ecom-call-topic {
  display: flex;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 11px;
  color: #475467;
  line-height: 1.4;
}

.ecom-call-topic span {
  flex: 0 0 auto;
  color: #98a2b3;
}

.ecom-call-terms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 8px 0 6px;
}

.ecom-call-terms span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 5px 6px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
}

.ecom-call-terms em {
  font-style: normal;
  font-size: 10px;
  color: #98a2b3;
}

.ecom-call-terms b {
  font-size: 11px;
  color: #101828;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecom-rich-call.is-digest {
  border-left: 3px solid #12b76a;
  background: linear-gradient(180deg, #f6fffb 0%, #fff 100%);
}

@media (max-width: 800px) {
  .ecom-call-terms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ecom-asr-meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 10px;
  color: #667085;
}

.ecom-asr-meter i {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #e4e7ec;
  position: relative;
  overflow: hidden;
}

.ecom-asr-meter i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--c, 80%);
  background: linear-gradient(90deg, #84caff, var(--agent-teal-deep, #3d9b8a));
  border-radius: inherit;
  transition: width 0.18s ease;
}

.ecom-asr-meter em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: #344054;
}

.ecom-agentic-cursor {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 40%);
  width: 14px;
  height: 14px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ecom-blue);
  box-shadow: 0 0 0 4px rgba(59, 111, 245, 0.2);
  z-index: 3;
  transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1), top 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.ecom-agentic-cursor::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 10px;
  height: 14px;
  background: var(--ecom-blue);
  clip-path: polygon(0 0, 100% 70%, 55% 70%, 70% 100%, 45% 100%, 30% 70%, 0 70%);
  opacity: 0.9;
}

.ecom-agentic-cursor.is-click {
  animation: ecomCursorClick 0.28s ease-out;
}

@keyframes ecomCursorClick {
  0% { transform: scale(1); box-shadow: 0 0 0 4px rgba(59, 111, 245, 0.2); }
  50% { transform: scale(0.86); box-shadow: 0 0 0 8px rgba(59, 111, 245, 0.12); }
  100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(59, 111, 245, 0.2); }
}

.ecom-agentic-progress {
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.ecom-agentic-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7aa2ff, var(--ecom-blue));
  border-radius: inherit;
  transition: width 0.35s ease;
}

.ecom-agentic-log {
  background: #fff;
  border: 1px solid var(--ecom-line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.ecom-agentic-step {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: #667085;
  line-height: 1.4;
}

.ecom-agentic-step .dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #d0d5dd;
  flex: 0 0 auto;
}

.ecom-agentic-step.is-done {
  color: #344054;
}

.ecom-agentic-step.is-done .dot {
  background: var(--ecom-green);
}

.ecom-agentic-step.is-active {
  color: var(--ecom-ink);
  font-weight: 600;
}

.ecom-agentic-step.is-active .dot {
  background: var(--ecom-blue);
  box-shadow: 0 0 0 3px rgba(59, 111, 245, 0.18);
  animation: ecomPulse 1.2s ease-in-out infinite;
}

.ecom-play-hero.is-scrubbing,
.ecom-video-frame.is-scrubbing img {
  animation: ecomScrub 1.8s ease-in-out infinite;
}

@keyframes ecomScrub {
  0%, 100% { filter: saturate(1) brightness(1); transform: scale(1); }
  50% { filter: saturate(1.08) brightness(1.03); transform: scale(1.012); }
}

.ecom-edit-timeline.has-playhead {
  position: relative;
  overflow: hidden;
}

.ecom-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f04438;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
  transition: left 0.2s linear;
  pointer-events: none;
}

.ecom-clip.is-on {
  outline: 2px solid rgba(59, 111, 245, 0.35);
  outline-offset: -2px;
}

.ecom-clip.is-cutting {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--ecom-blue);
  animation: ecomPulse 1s ease-in-out infinite;
}

@media (max-width: 900px) {
  .ecom-agentic-surface {
    grid-template-columns: 1fr;
  }
}

.ecom-rich-table table,
.ecom-sense {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.ecom-rich-table th,
.ecom-rich-table td,
.ecom-sense th,
.ecom-sense td {
  padding: 8px 6px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
}

.ecom-rich-table th,
.ecom-sense th {
  color: var(--ecom-muted);
  font-weight: 650;
  background: #f8fafc;
}

.ecom-rich-table .stars {
  color: #f59e0b;
  letter-spacing: 1px;
}

.ecom-rich-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.ecom-cost-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.ecom-cost-grid div {
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.ecom-cost-grid .total {
  grid-column: 1 / -1;
  background: #eff6ff;
  font-weight: 700;
}

.ecom-margin {
  font-size: 12px;
  margin: 0 0 8px;
}

.ecom-sense tr.is-pick {
  background: #ecfdf5;
  font-weight: 650;
}

.ecom-pack-canvas {
  border-radius: 12px;
  background: #efe6da;
  display: grid;
  place-items: center;
  min-height: 160px;
  margin-bottom: 8px;
  overflow: hidden;
}

.ecom-pack-canvas.is-anim .ecom-pack-box,
.ecom-pack-canvas.is-anim .ecom-pack-photo {
  animation: ecomPulse 1.4s ease-in-out infinite;
}

.ecom-pack-photo {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.ecom-pack-box {
  width: 120px;
  aspect-ratio: 3/4;
  border-radius: 10px;
  background: linear-gradient(160deg, #6b3f2a, #3d2418 70%);
  color: #f3ebe2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}

.ecom-pack-logo {
  font-family: var(--font-serif);
  color: #c4a35a;
  letter-spacing: 0.1em;
}

.ecom-pack-sub { font-size: 10px; }
.ecom-pack-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #c4a35a;
  color: #2c211c;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}

.ecom-pack-swatches {
  display: flex;
  gap: 6px;
}

.ecom-pack-swatches i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c);
}

.ecom-agentic-surface.is-edit {
  grid-template-columns: minmax(0, 1fr) 172px;
  gap: 10px;
}

.ecom-editor {
  overflow: hidden;
  border: 1px solid #303541;
  border-radius: 12px;
  background: #181b22;
  color: #d8dce5;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  font-size: 10px;
}

.ecom-editor-toolbar {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid #303541;
  background: #20242d;
}

.ecom-editor-toolbar .ecom-editor-logo {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #5b7fff;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.ecom-editor-toolbar strong {
  color: #f2f4f7;
  font-size: 10px;
}

.ecom-editor-toolbar > span:not(.ecom-editor-logo),
.ecom-editor-toolbar small {
  color: #8f96a6;
  font-size: 8px;
}

.ecom-editor-toolbar i { flex: 1; }

.ecom-editor-workspace {
  height: 224px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
}

.ecom-media-bin {
  min-width: 0;
  padding: 7px 6px;
  border-right: 1px solid #303541;
  overflow: hidden;
  background: #1d2028;
}

.ecom-media-bin-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #aab0bd;
}

.ecom-media-bin-head span { color: #697181; }

.ecom-media-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #9299a8;
}

.ecom-media-item.is-active {
  border-color: #5b7fff;
  background: rgba(91, 127, 255, 0.1);
  color: #e6e9ef;
}

.ecom-media-item img {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  object-fit: cover;
  background: #0f1117;
}

.ecom-media-item span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 8px;
}

.ecom-program-monitor {
  min-width: 0;
  display: grid;
  grid-template-rows: 25px minmax(0, 1fr) 29px;
}

.ecom-monitor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border-bottom: 1px solid #2b303a;
  color: #979eac;
  font-size: 8px;
}

.ecom-viewer-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 7px;
  background:
    linear-gradient(45deg, #171a20 25%, transparent 25%) 0 0 / 10px 10px,
    linear-gradient(45deg, transparent 75%, #171a20 75%) 0 0 / 10px 10px,
    #12151b;
}

.ecom-vertical-preview {
  position: relative;
  height: 156px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #080a0d;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.ecom-vertical-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ecom-vertical-preview .safe {
  position: absolute;
  pointer-events: none;
  border: 1px dashed rgba(255, 255, 255, 0.28);
}

.ecom-vertical-preview .safe-x { inset: 8% 7%; }
.ecom-vertical-preview .safe-y { inset: 14% 13%; }

.ecom-preview-caption {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 13%;
  padding: 3px 4px;
  background: rgba(0, 0, 0, 0.54);
  color: #fff;
  font-size: 7px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 1px 2px #000;
}

.ecom-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-top: 1px solid #2b303a;
  color: #8d94a3;
}

.ecom-transport button {
  width: 22px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: #333947;
  color: #fff;
  font-size: 8px;
}

.ecom-transport code {
  margin-left: 7px;
  color: #f2f4f7;
  font: 9px var(--font-mono);
}

.ecom-transport small {
  color: #697181;
  font-size: 7px;
}

.ecom-timeline-shell {
  border-top: 1px solid #303541;
  background: #1d2028;
}

.ecom-timeline-toolbar {
  height: 25px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 8px;
  border-bottom: 1px solid #303541;
  color: #8f96a6;
}

.ecom-timeline-toolbar strong {
  margin-left: 3px;
  overflow: hidden;
  color: #c8cdd7;
  font-size: 8px;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ecom-timeline-toolbar small {
  margin-left: auto;
  color: #697181;
}

.ecom-track-layout {
  height: 116px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
}

.ecom-track-labels {
  display: grid;
  grid-template-rows: 21px 42px 25px 28px;
  border-right: 1px solid #303541;
  color: #737b8b;
  text-align: center;
}

.ecom-track-labels::before { content: ""; }

.ecom-track-labels span {
  display: grid;
  place-items: center;
  border-top: 1px solid #2a2f39;
  font: 8px var(--font-mono);
}

.ecom-timeline-canvas {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.ecom-time-ruler {
  height: 21px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 0 4px 3px;
  border-bottom: 1px solid #303541;
  color: #626a79;
  font: 7px var(--font-mono);
  background: repeating-linear-gradient(90deg, transparent 0 24px, #363b46 25px, transparent 26px);
}

.ecom-track { border-bottom: 1px solid #292e37; }

.ecom-video-track {
  height: 42px;
  display: flex;
  gap: 2px;
  padding: 2px;
}

.ecom-editor-clip {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #465063;
  border-radius: 3px;
  background:
    linear-gradient(rgba(20, 24, 31, 0.46), rgba(20, 24, 31, 0.68)),
    var(--thumb) center / cover;
  color: #e9ecf2;
}

.ecom-editor-clip.is-on { border-color: #6688ff; }

.ecom-editor-clip.is-cutting {
  border-color: #ffcc66;
  box-shadow: 0 0 0 1px #ffcc66;
}

.ecom-editor-clip span,
.ecom-editor-clip small {
  position: absolute;
  left: 3px;
  right: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 7px;
}

.ecom-editor-clip span { bottom: 10px; }
.ecom-editor-clip small { bottom: 2px; color: #aeb5c1; font-family: var(--font-mono); }

.ecom-caption-track {
  height: 25px;
  display: flex;
  gap: 3px;
  align-items: center;
  padding: 2px 4px;
}

.ecom-caption-track span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 3px 4px;
  border-radius: 2px;
  background: #7357bd;
  color: #f2ebff;
  font-size: 6px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ecom-audio-track {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 2px 4px;
  background: rgba(39, 139, 93, 0.12);
}

.ecom-audio-track i {
  flex: 1 1 1px;
  height: var(--h);
  max-height: 19px;
  min-width: 1px;
  background: #42b883;
  opacity: 0.75;
}

.ecom-editor .ecom-playhead {
  top: 17px;
  bottom: 0;
  z-index: 5;
  width: 1px;
  background: #ff5d55;
  box-shadow: none;
}

.ecom-editor .ecom-playhead b {
  position: absolute;
  top: 0;
  left: -4px;
  width: 9px;
  height: 6px;
  background: #ff5d55;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.ecom-editor > .ecom-edit-bar {
  height: 23px;
  margin: 0;
  border-top: 1px solid #303541;
  border-radius: 0;
  background: #20242d;
  color: #9da4b2;
  font-size: 8px;
}

.ecom-editor > .ecom-edit-bar i {
  background: #5275ee;
  opacity: 0.2;
  transition: width 0.2s linear;
}

.ecom-editor > .ecom-edit-bar b {
  position: relative;
  z-index: 1;
  margin-left: auto;
  color: #cbd1dc;
  font: 8px var(--font-mono);
}

.ecom-edit-inspector {
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 11px;
  background: #fff;
}

.ecom-edit-inspector div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 8px;
  border-bottom: 1px solid #f0f1f3;
  font-size: 9px;
}

.ecom-edit-inspector div:last-child { border-bottom: 0; }
.ecom-edit-inspector span { color: #98a2b3; }

.ecom-edit-inspector strong {
  color: #475467;
  font: 9px var(--font-mono);
  white-space: nowrap;
}

.ecom-edit-timeline {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr 0.7fr;
  gap: 6px;
  margin: 10px 0 8px;
}

.ecom-clip {
  padding: 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
  color: #fff;
  text-align: center;
}

.ecom-clip.c1 { background: #0ea5e9; }
.ecom-clip.c2 { background: #10b981; }
.ecom-clip.c3 { background: #a855f7; }
.ecom-clip.c4 { background: #f59e0b; color: #1a2332; }

.ecom-edit-bar {
  position: relative;
  height: 26px;
  border-radius: 8px;
  background: #eef2f7;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 11px;
  color: var(--ecom-muted);
}

.ecom-edit-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #93c5fd, #3b82f6);
  opacity: 0.35;
}

.ecom-rich-file pre,
.ecom-rich-doc pre,
.ecom-rich-xhs pre,
.ecom-rich-video pre,
.ecom-rich-pack pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}

.ecom-rich-pack.is-digest,
.ecom-rich-edit.is-digest,
.ecom-rich-table.is-digest,
.ecom-rich-price.is-digest {
  border-left: 3px solid #12b76a;
  background: linear-gradient(180deg, #f6fffb 0%, #fff 100%);
  padding: 9px 11px;
}

.ecom-rich-pack.is-digest.is-dual,
.ecom-rich-edit.is-digest.is-dual,
.ecom-rich-call.is-digest.is-dual,
.ecom-rich-table.is-digest.is-dual,
.ecom-rich-price.is-digest.is-dual {
  box-shadow: inset 0 0 0 1px #abefc6;
}

.ecom-rich-price.is-warn {
  border-left-color: #f79009;
  background: linear-gradient(180deg, #fffaeb 0%, #fff 100%);
}

.ecom-rich-price.is-danger {
  border-left-color: #f04438;
  background: linear-gradient(180deg, #fef3f2 0%, #fff 100%);
}

.ecom-rich-table tr.is-pick td {
  background: #eff8ff;
}

.ecom-pick-tag {
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.ecom-rich-pack.is-digest .muted,
.ecom-rich-edit.is-digest .muted {
  margin: 5px 0 0;
  font-size: 11px;
  color: #667085;
}

.ecom-deliv-panel.is-dual {
  box-shadow: inset 0 0 0 1px #abefc6;
  border-radius: 12px;
}

.ecom-deliv-panel .ecom-deliv-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ecom-deliv-panel .ecom-stage-dual {
  margin: 0 0 10px;
}

.ecom-deliv-panel .ecom-deliv-meta strong {
  font-size: 13px;
  color: #101828;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-deliv-panel .ecom-deliv-meta time {
  font-size: 10px;
  color: #98a2b3;
  font-variant-numeric: tabular-nums;
}

.ecom-deliv-summary {
  margin: 10px 0 0;
  font-size: 12px;
  color: #344054;
  line-height: 1.45;
}

.ecom-deliv-body {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef0f3;
  white-space: pre-wrap;
  font: inherit;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
  max-height: 220px;
  overflow: auto;
}

.ecom-rich-file.is-highlight,
.ecom-rich-doc.is-highlight,
.ecom-rich-xhs.is-highlight,
.ecom-rich-pack.is-highlight {
  background: linear-gradient(160deg, #ecfdf5, #fff);
  border-color: #6ee7b7;
}

.ecom-rich-xhs {
  padding: 0;
  overflow: hidden;
}

.ecom-xhs-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 0;
}

.ecom-xhs-logo {
  font-size: 12px;
  font-weight: 800;
  color: #ff2442;
  letter-spacing: 0.02em;
}

.ecom-xhs-cover {
  margin-top: 8px;
  background: #111;
}

.ecom-xhs-cover img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

.ecom-xhs-meta {
  padding: 12px;
}

.ecom-xhs-meta strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.ecom-xhs-stats {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
}

.ecom-video-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
  background: #0f172a;
}

.ecom-video-frame img {
  width: 100%;
  display: block;
  max-height: 220px;
  object-fit: cover;
  opacity: 0.92;
}

.ecom-video-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  padding-left: 2px;
}

.ecom-video-dur {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
}

.ecom-doc-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 8px;
  align-items: start;
}

.ecom-doc-preview img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  display: block;
  background: #fff;
}

.ecom-doc-preview-sm {
  grid-template-columns: 1fr;
  max-width: 280px;
}

.ecom-doc-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ecom-doc-side b {
  font-size: 13px;
}

.ecom-doc-side > span {
  font-size: 11px;
  color: var(--ecom-muted);
}

.ecom-welcome {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: auto;
  padding: 18px;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(4px);
}

.ecom-welcome[hidden] {
  display: none !important;
}

.ecom-welcome-card {
  max-width: 480px;
  margin: 24px auto;
  padding: 22px 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--ecom-line);
  box-shadow: var(--ecom-shadow-lg);
}

.ecom-welcome-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ecom-blue-deep);
}

.ecom-welcome-card h3 {
  margin: 8px 0 6px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.ecom-welcome-card > p {
  margin: 0 0 10px;
  color: var(--ecom-muted);
  font-size: 13px;
}

.ecom-welcome-dual {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 7px 9px;
  border-radius: 10px;
  background: linear-gradient(90deg, #fffaf3 0%, #eff8ff 55%, #ecfdf3 100%);
  font-size: 11px;
  color: #475467;
}

.ecom-welcome-human,
.ecom-welcome-agent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ecom-welcome-human i,
.ecom-welcome-agent i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.ecom-welcome-human i {
  background: #f79009;
  box-shadow: 0 0 0 3px rgba(247, 144, 9, 0.16);
}

.ecom-welcome-agent i {
  background: var(--ecom-blue);
  box-shadow: 0 0 0 3px rgba(95, 191, 176, 0.18);
}

.ecom-welcome-human em,
.ecom-welcome-agent em {
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.ecom-welcome-sep {
  width: 1px;
  height: 12px;
  background: #d0d5dd;
  flex: 0 0 auto;
}

.ecom-welcome-beat,
.ecom-wrapup-beat {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 12px;
  font-size: 11px;
  color: #667085;
}

.ecom-welcome-beat b,
.ecom-wrapup-beat b {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-welcome-beat b.is-on {
  color: #fff;
  background: var(--ecom-blue);
}

.ecom-wrapup-beat b.is-done {
  color: #3d9b8a;
  background: #ecfdf3;
}

.ecom-welcome-beat i,
.ecom-wrapup-beat i {
  width: 8px;
  height: 1px;
  background: #e4e7ec;
}

.ecom-welcome-beat em,
.ecom-wrapup-beat em {
  margin-left: 4px;
  font-style: normal;
  color: #475467;
}

.ecom-welcome-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 14px;
}

.ecom-welcome-acts span {
  padding: 2px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 10px;
  font-weight: 600;
}

.ecom-welcome-card ol {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}

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

.ecom-composer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--ecom-line);
  background: #fff;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.ecom-composer.is-replay-locked {
  background: #f8fafc;
  opacity: 0.92;
}

.ecom-composer.is-replay-locked input {
  color: #98a2b3;
  cursor: not-allowed;
}

.ecom-composer.is-replay-locked button {
  opacity: 0.55;
  cursor: not-allowed;
}

.ecom-composer-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-top: 1px solid #e4e7ec;
  background: linear-gradient(90deg, #f8fafc 0%, #eff8ff 48%, #ecfdf3 100%);
  font-size: 11px;
  color: #475467;
}

.ecom-composer-hint[hidden] {
  display: none !important;
}

.ecom-composer-hint.is-tick .ecom-composer-hint-agent em {
  color: #3d9b8a;
}

.ecom-composer-hint.is-human-tick .ecom-composer-hint-human em {
  color: #b54708;
  animation: ecomComposerHumanTick 0.55s ease-out;
}

@keyframes ecomComposerHumanTick {
  0% {
    transform: translateY(2px);
    opacity: 0.55;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

.ecom-composer-hint-human,
.ecom-composer-hint-agent,
.ecom-composer-hint-done {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ecom-composer-hint-human i,
.ecom-composer-hint-agent i,
.ecom-composer-hint-done i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #98a2b3;
}

.ecom-composer-hint-human i {
  background: #f79009;
  box-shadow: 0 0 0 3px rgba(247, 144, 9, 0.16);
}

.ecom-composer-hint-agent i {
  background: var(--ecom-blue);
  box-shadow: 0 0 0 3px rgba(95, 191, 176, 0.18);
  animation: ecomPulse 1.2s ease-in-out infinite;
}

.ecom-composer-hint-done i {
  background: #12b76a;
}

.ecom-composer-hint em {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-composer-hint-sep {
  width: 1px;
  height: 12px;
  background: #d0d5dd;
  flex: 0 0 auto;
}

.ecom-composer-hint-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #98a2b3;
  font-size: 10px;
}

.ecom-composer-hint-meta em {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #667085;
  font-weight: 600;
}

.ecom-composer-hint-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.ecom-composer-hint-beat b {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-composer-hint-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-composer-hint-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-composer-hint-beat i {
  width: 5px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-composer-hint-next {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff6ed;
  color: #c4320a;
  white-space: nowrap;
  flex: 0 0 auto;
}

.ecom-composer-hint-mode {
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  flex: 0 0 auto;
}

.ecom-composer-hint-mode.is-observing {
  background: #eff8ff;
  color: #175cd3;
}

.ecom-composer-hint-mode.is-planning {
  background: #f4f3ff;
  color: #5925dc;
}

.ecom-composer-hint-mode.is-acting,
.ecom-composer-hint-mode.is-communicating {
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
}

.ecom-composer-hint-mode.is-verified {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-composer-hint.is-done {
  justify-content: space-between;
  background: #ecfdf3;
  border-top-color: #abefc6;
  color: #3d9b8a;
}

.ecom-composer-hint-btn {
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  background: #3d9b8a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}

.ecom-composer-hint-btn:hover {
  filter: brightness(1.05);
}

.ecom-chat .ecom-rich-stage,
.ecom-rich-stage {
  border: 1px solid #e4e7ec;
  border-left: 3px solid var(--ecom-blue);
  border-radius: 12px;
  background: #f8faff;
  padding: 9px 11px;
}

.ecom-rich-stage .ecom-rich-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ecom-rich-stage .ecom-rich-head em {
  margin-left: auto;
  font-style: normal;
  color: #98a2b3;
  font-size: 10px;
}

.ecom-rich-stage .muted {
  margin: 5px 0 0;
  font-size: 11px;
  color: #667085;
}

.ecom-rich-stage .ecom-stage-aside {
  margin: 4px 0 0;
  font-size: 10px;
  color: #98a2b3;
}

.ecom-stage-dual {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 7px 0 0;
  padding: 5px 7px;
  border-radius: 8px;
  background: #ecfdf3;
  color: #3d9b8a;
  font-size: 11px;
}

.ecom-stage-dual i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.16);
  flex: 0 0 auto;
}

.ecom-stage-dual em {
  font-style: normal;
  font-weight: 600;
  min-width: 0;
}

.ecom-stage-dual b {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 10px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #c7d7fe;
}

.ecom-card-beat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 7px 0 0;
  min-width: 0;
}

.ecom-card-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.ecom-card-beat b {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-card-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-card-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-card-beat i {
  width: 5px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-card-beat-row > em {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #475467;
  font-style: normal;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 600;
}

.ecom-stage-watch {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 6px 0 0;
  font-size: 11px;
  color: #475467;
  line-height: 1.35;
}

.ecom-stage-watch span {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 10px;
  font-weight: 700;
}

.ecom-stage-watch em {
  font-style: normal;
}

.ecom-stage-watch.is-ok span {
  background: #ecfdf3;
  color: #3d9b8a;
}

.ecom-stage-watch.is-warn span {
  background: #fffaeb;
  color: #b54708;
}

.ecom-rich-stage .ecom-next-action {
  margin: 6px 0 0;
}

.ecom-stage-next {
  margin: 7px 0 0;
  padding: 0 0 0 16px;
  display: grid;
  gap: 3px;
  color: #475467;
  font-size: 11px;
}

.ecom-stage-next li.is-now {
  color: #175cd3;
  font-weight: 600;
}

/* Prefer a soft chat fade — avoid hard opacity flashes. */
.ecom-stream-item.is-arrive:not(.ecom-chat .ecom-stream-item) {
  animation: streamItemInSoft 0.38s cubic-bezier(0.22, 0.8, 0.28, 1);
}

@keyframes ecomStreamArrive {
  from { opacity: 0.55; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* Keep a gentle fade even in 8× replay — don't snap in. */
html.is-replay-fast .ecom-stream-item.is-arrive,
html.is-replay-fast .wedding-stream-item.is-arrive {
  animation: streamItemInSoft 0.26s ease-out !important;
}

html.is-replay-fast .ecom-thinking,
html.is-replay-fast .wedding-thinking {
  animation: weddingThinkIn 0.22s ease-out !important;
}

html.is-replay-fast .wedding-track-window {
  transition-duration: 0.18s;
}

.ecom-rich-wrapup {
  border: 1px solid #b7ebc6;
  border-left: 3px solid #12b76a;
  border-radius: 12px;
  background: linear-gradient(180deg, #f6fffb 0%, #fff 100%);
  padding: 10px 12px;
}

.ecom-wrapup-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 0;
}

.ecom-wrapup-trail span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecfdf3;
  border: 1px solid #abefc6;
  color: #3d9b8a;
  font-size: 10px;
  font-weight: 600;
}

.ecom-wrapup-trail span i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.ecom-wrapup-dual {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 8px 0 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  font-size: 11px;
  color: #344054;
  line-height: 1.35;
}

.ecom-wrapup-dual span {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 10px;
  font-weight: 700;
}

.ecom-wrapup-dual em {
  font-style: normal;
}

.ecom-wrapup-beat {
  margin: 8px 0 0;
  padding: 5px 7px;
  border-radius: 8px;
  background: #ecfdf3;
}

.ecom-wrapup-kinds {
  margin: 6px 0 0;
  font-size: 11px;
}

.ecom-plan-strip.is-complete {
  background: linear-gradient(180deg, #ecfdf3 0%, #fff 100%);
}

.ecom-wall-chip.is-wave {
  animation: ecomWallCelebrate 1.2s ease-out;
}

.ecom-wrapup-stats {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.ecom-wrapup-stats li {
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e4e7ec;
  min-width: 0;
}

.ecom-wrapup-stats span {
  color: #98a2b3;
  font-size: 10px;
}

.ecom-wrapup-stats b {
  color: #101828;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecom-rich-wrapup .muted {
  margin: 8px 0 0;
  font-size: 11px;
  color: #667085;
}

.ecom-wrapup-actions {
  margin-top: 10px;
}

.ecom-wrapup-actions .ecom-btn-primary {
  width: 100%;
}

.ecom-plan-strip.is-live {
  background: linear-gradient(180deg, #f3fbf9 0%, #fff 100%);
}

.ecom-plan-live {
  padding: 1px 6px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #3d9b8a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ecom-plan-steps {
  padding: 1px 6px;
  border-radius: 999px;
  background: #eff4ff;
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ecom-plan-next-bench {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  font-size: 11px;
  color: #475467;
}

.ecom-plan-next-bench span {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff6ed;
  color: #c4320a;
  font-size: 10px;
  font-weight: 700;
}

.ecom-plan-next-bench em {
  font-style: normal;
  font-weight: 700;
  color: #344054;
}

.ecom-plan-next-bench i {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  color: #3d9b8a;
  font-weight: 600;
}

.ecom-wall.is-celebrate {
  animation: ecomWallCelebrate 1.4s ease-out;
}

@keyframes ecomWallCelebrate {
  0% { box-shadow: inset 0 0 0 0 rgba(18, 183, 106, 0.0); }
  35% { box-shadow: inset 0 0 0 2px rgba(18, 183, 106, 0.35); }
  100% { box-shadow: none; }
}

.ecom-composer input {
  flex: 1;
  border: 1px solid var(--ecom-line);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
  background: #f7f8fa;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ecom-composer input:focus {
  background: #fff;
  border-color: #b2ccff;
  box-shadow: 0 0 0 3px rgba(59, 111, 245, 0.12);
}

.ecom-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ecom-card-wall {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ecom-card-wall .ecom-wall {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.ecom-card-snapshot {
  flex: 0 0 auto;
}

.ecom-snapshot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.ecom-snapshot.is-dual {
  box-shadow: inset 3px 0 0 #12b76a;
  padding-left: 8px;
}

.ecom-snap-dual {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.ecom-snap-beat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.ecom-snap-beat b {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  color: #98a2b3;
  background: #f2f4f7;
}

.ecom-snap-beat b.is-on {
  color: #fff;
  background: var(--agent-teal-deep, #3d9b8a);
}

.ecom-snap-beat b.is-done {
  color: #3d9b8a;
  background: #dcfae6;
}

.ecom-snap-beat i {
  width: 4px;
  height: 1px;
  background: #d0d5dd;
}

.ecom-snap-dual > em {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #3d9b8a;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.ecom-snap-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.ecom-snap-row span {
  color: var(--ecom-muted);
}

.ecom-snap-row strong {
  font-variant-numeric: tabular-nums;
  color: var(--ecom-ink);
}

.ecom-snap-row.is-alert strong {
  color: var(--ecom-red);
}

.ecom-snap-sku {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ecom-line);
  margin-bottom: 2px;
}

.ecom-snap-sku img {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px;
  max-height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1f5f9;
  flex: 0 0 40px;
}

.ecom-snap-sku strong {
  display: block;
  font-size: 12px;
}

.ecom-snap-sku small {
  color: var(--ecom-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.ecom-budget-bar {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.ecom-budget-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  border-radius: inherit;
}

.ecom-budget-bar.is-hot i {
  background: linear-gradient(90deg, #fdb022, #f04438);
}

.ecom-snap-hint {
  margin: 6px 0 0;
  font-size: 10px;
  color: #b54708;
}

.ecom-next-action {
  margin: 6px 0 0;
  padding: 5px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  color: #344054;
  font-size: 11px;
  line-height: 1.35;
}

.ecom-rich-world.is-danger .ecom-next-action {
  background: #fff5f5;
  border-color: #fecaca;
  color: #b42318;
}

.ecom-rich-world.is-warn .ecom-next-action {
  background: #fffaeb;
  border-color: #fecd89;
  color: #b54708;
}

.ecom-card {
  background: var(--ecom-card);
  border: 1px solid var(--ecom-line);
  border-radius: var(--ecom-radius);
  box-shadow: var(--ecom-shadow);
  padding: 10px;
}

.ecom-card header h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.ecom-svg-line {
  width: 100%;
  height: 96px;
  display: block;
}

.ecom-legend {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 10px;
  color: var(--ecom-muted);
  margin-top: 4px;
}

.ecom-legend i {
  width: 10px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 4px;
}

.ecom-legend i.s { background: #3b82f6; }
.ecom-legend i.p { background: #10b981; }

.ecom-chart-donut {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
}

.ecom-donut {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  mask: radial-gradient(circle at center, transparent 38%, #000 39%);
  -webkit-mask: radial-gradient(circle at center, transparent 38%, #000 39%);
}

.ecom-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.ecom-donut-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ecom-donut-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ecom-donut-legend b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.ecom-orders {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.ecom-order-row .av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e0e7ff;
  font-size: 11px;
  font-weight: 700;
}

.ecom-order-row strong {
  display: block;
  font-size: 12px;
}

.ecom-order-row small {
  color: var(--ecom-muted);
  font-size: 10px;
}

.ecom-order-row .amt {
  text-align: right;
  font-size: 12px;
  font-weight: 700;
}

.ecom-order-row .amt em {
  display: block;
  font-style: normal;
  font-size: 10px;
  font-weight: 650;
}

.ecom-order-row .amt em.paid { color: var(--ecom-blue); }
.ecom-order-row .amt em.shipped { color: var(--ecom-green); }

.ecom-inv {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ecom-inv-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--ecom-line);
  font-size: 11px;
}

.ecom-inv-row em {
  grid-column: 1 / -1;
  font-style: normal;
  color: var(--ecom-muted);
}

.ecom-inv-row.is-alert {
  background: #fff1f2;
  border-color: #fecaca;
}

.ecom-inv-row.is-alert em {
  color: var(--ecom-red);
}

.ecom-wall {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ecom-wall-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--ecom-line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  cursor: pointer;
}

.ecom-wall-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-wall-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.ecom-wall-copy strong,
.ecom-wall-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ecom-wall-copy strong {
  color: #344054;
  font-size: 10.5px;
  font-weight: 650;
}

.ecom-wall-copy small {
  color: #98a2b3;
  font-size: 9px;
}

.ecom-wall-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #f1f5f9;
  border: 1px solid #eaecf0;
}

.ecom-wall-kind {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2f4f7;
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
}

.ecom-wall-chip.is-highlight {
  border-color: #6ee7b7;
  background: #ecfdf5;
}

@media (max-width: 1100px) {
  .ecom-body,
  .ecom-body-manus {
    grid-template-columns: minmax(300px, 43%) minmax(0, 1fr);
  }
}

@media (max-width: 800px) {
  body[data-scenario="ecom"] .ecom-cockpit:not([hidden]) {
    grid-template-columns: 1fr;
  }
  .ecom-side-rail {
    display: none;
  }
  .ecom-top,
  .ecom-body {
    grid-column: 1;
  }
  .ecom-top {
    flex-wrap: wrap;
    max-height: none;
  }
  .ecom-dyn-rail {
    order: 3;
    width: 100%;
  }
  .ecom-body,
  .ecom-body-manus {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 45%) minmax(0, 1fr);
  }
  .ecom-playground {
    min-height: 240px;
  }
}

/* ===== Wedding fixed-date cockpit ===== */
:root {
  --wedding-bg: var(--agent-mint-bg, #eef7f5);
  --wedding-card: #ffffff;
  --wedding-line: #dceae6;
  --wedding-ink: #1a1d23;
  --wedding-muted: #7a8a86;
  --wedding-red: var(--agent-teal, #5fbfb0);
  --wedding-red-soft: var(--agent-teal-soft, #e8f7f4);
  --wedding-gold: #6a9e94;
  --wedding-green: var(--agent-teal-deep, #3d9b8a);
  --wedding-amber: #c45c5c;
  --wedding-danger: #c45c5c;
  --wedding-shadow: 0 14px 36px rgba(30, 70, 62, 0.08);
}

.wedding-cockpit {
  display: none;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

body[data-scenario="wedding"] {
  background: var(--wedding-bg);
}

body[data-scenario="wedding"] .app {
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  max-width: 1680px;
  gap: 10px;
}

body[data-scenario="wedding"] .dashboard,
body[data-scenario="wedding"] .phone-col:not(.is-ecom-console) {
  display: none !important;
}

body[data-scenario="wedding"] .top-actions #progressLabel,
body[data-scenario="wedding"] .top-actions #btnAutoplay,
body[data-scenario="wedding"] .top-actions #btnReplay,
body[data-scenario="wedding"] .top-actions #btnConsole {
  display: none;
}

body[data-scenario="wedding"] .phone-col.is-ecom-console {
  display: flex !important;
  position: fixed;
  z-index: 80;
  right: 16px;
  top: 64px;
  bottom: 16px;
  width: min(420px, calc(100vw - 24px));
  box-shadow: 0 18px 50px rgba(67, 53, 40, 0.2);
}

body[data-scenario="wedding"] .wedding-cockpit:not([hidden]) {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-rows: 62px 42px minmax(0, 1fr);
  gap: 8px;
}

.wedding-top {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(460px, 1fr) auto;
  align-items: center;
  gap: 12px;
  height: 62px;
  min-height: 62px;
  max-height: 62px;
  padding: 8px 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: var(--wedding-shadow);
}

.wedding-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding-right: 12px;
  border-right: 1px solid var(--wedding-line);
}

.wedding-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  color: #fff;
  background: var(--wedding-red);
  font-family: var(--font-serif);
  font-size: 18px;
}

.wedding-brand div {
  display: grid;
  min-width: 0;
}

.wedding-brand strong,
.wedding-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-brand strong {
  font-size: 13px;
}

.wedding-brand div > span {
  color: var(--wedding-muted);
  font-size: 10px;
}

.wedding-top-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  height: 44px;
}

.wedding-kpi {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 5px 9px;
  overflow: hidden;
  border: 1px solid var(--wedding-line);
  border-radius: 10px;
  background: #fff;
}

.wedding-kpi small,
.wedding-kpi span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-kpi small {
  color: var(--wedding-muted);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.wedding-kpi span {
  color: var(--wedding-ink);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wedding-kpi.is-fixed span {
  color: var(--wedding-red);
}

.wedding-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.wedding-stage-chip {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  overflow: hidden;
  color: var(--wedding-muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-btn {
  min-height: 32px;
  border: 1px solid var(--wedding-line);
  border-radius: 9px;
  padding: 6px 11px;
  background: #fff;
  color: var(--wedding-ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.wedding-btn.primary {
  border-color: var(--wedding-red);
  color: #fff;
  background: var(--wedding-red);
}

.wedding-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.wedding-track-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  overflow: hidden;
}

.wedding-track-pill {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 11px;
  background: rgba(255, 253, 249, 0.9);
}

.wedding-track-pill b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: var(--wedding-red);
  background: var(--wedding-red-soft);
  font-size: 10px;
}

.wedding-track-pill span,
.wedding-track-pill em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-track-pill span {
  font-size: 10px;
  font-weight: 700;
}

.wedding-track-pill em {
  color: var(--wedding-muted);
  font-size: 9px;
  font-style: normal;
}

.wedding-track-pill.is-active {
  border-color: #b9ddd6;
  background: var(--agent-teal-soft, #e8f7f4);
}

.wedding-track-pill.is-done {
  border-color: #cddfd6;
  background: #f6faf7;
}

.wedding-body {
  display: grid;
  grid-template-columns: minmax(330px, 34%) minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.wedding-chat,
.wedding-playground {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  background: var(--wedding-card);
  box-shadow: var(--wedding-shadow);
}

.wedding-chat {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) 62px;
}

.wedding-chat-head,
.wedding-play-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--wedding-line);
}

.wedding-chat-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wedding-chat-head strong {
  font-size: 12px;
}

.wedding-chat-head > span,
.wedding-play-head > div > span {
  color: var(--wedding-muted);
  font-size: 10px;
  font-weight: 700;
}

.wedding-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b7c7c3;
}

.wedding-live-dot.is-live {
  background: var(--wedding-green);
  box-shadow: 0 0 0 3px rgba(95, 191, 176, 0.18);
}

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

.wedding-welcome,
.wedding-messages {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.wedding-welcome {
  display: grid;
  align-content: center;
  padding: 24px;
  color: var(--wedding-muted);
}

.wedding-welcome[hidden] {
  display: none;
}

.wedding-messages {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
}

.wedding-message,
.wedding-stream-item {
  max-width: 88%;
  color: var(--wedding-ink);
  font-size: 12px;
  line-height: 1.55;
}

.wedding-message.is-user,
.wedding-stream-item.mine {
  align-self: flex-end;
  padding: 8px 11px;
  border-radius: 12px 12px 3px 12px;
  background: var(--wedding-red);
  color: #fff;
}

.wedding-message.is-agent,
.wedding-stream-item:not(.mine):not(.wedding-event):not(.wedding-output):not(.wedding-inbound-tip) {
  align-self: flex-start;
  padding: 0 2px;
}

.wedding-event {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  color: var(--wedding-muted);
}

.wedding-event::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: #b7c7c3;
}

.wedding-event.is-risk::before,
.wedding-event.kind-mutation::before {
  background: var(--wedding-amber);
}

.wedding-event.is-verified::before,
.wedding-event.kind-discovery::before {
  background: var(--wedding-green);
}

.wedding-output {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #cddfd6;
  border-radius: 10px;
  color: var(--wedding-green);
  background: #f5faf7;
  font-size: 11px;
  font-weight: 700;
}

.wedding-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--wedding-line);
}

.wedding-composer input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--wedding-line);
  border-radius: 10px;
  padding: 0 11px;
  outline: 0;
  background: #fff;
  color: var(--wedding-ink);
  font-size: 12px;
}

.wedding-composer input:focus {
  border-color: #c9a9a0;
  box-shadow: 0 0 0 3px rgba(166, 61, 64, 0.08);
}

.wedding-playground {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) 62px;
}

.wedding-play-head,
.wedding-workspace,
.wedding-play-foot {
  width: 100%;
  min-width: 0;
}

.wedding-play-head h2 {
  max-width: 420px;
  margin: 2px 0 0;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-play-head small {
  display: block;
  width: 320px;
  min-height: 14px;
  max-height: 14px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--wedding-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-workspace-tabs {
  display: flex;
  min-width: 0;
  gap: 4px;
}

.wedding-workspace-tabs button {
  min-width: 48px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--wedding-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.wedding-workspace-tabs button.is-active {
  color: var(--wedding-red);
  background: var(--wedding-red-soft);
}

.wedding-workspace {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  scrollbar-gutter: stable;
}

.wedding-panel,
.wedding-track-grid,
.wedding-ledger-panel,
.wedding-contract-panel,
.wedding-booking-panel,
.wedding-calendar-panel {
  min-height: 100%;
}

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

.wedding-panel-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16px;
}

.wedding-panel-head span,
.wedding-status {
  color: var(--wedding-muted);
  font-size: 10px;
}

.wedding-cards,
.wedding-track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wedding-card,
.wedding-track-card,
.wedding-auth-card,
.wedding-diff-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--wedding-line);
  border-radius: 12px;
  background: #fff;
}

.wedding-card h3,
.wedding-card h4,
.wedding-track-card h3,
.wedding-track-card h4 {
  margin: 0 0 6px;
  font-size: 12px;
}

.wedding-card p,
.wedding-track-card p {
  margin: 0;
  color: var(--wedding-muted);
  font-size: 10px;
  line-height: 1.5;
}

.wedding-progress {
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8e1;
}

.wedding-progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--wedding-red);
  transition: width calc(0.24s / var(--demo-speed)) ease;
}

.wedding-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10px;
}

.wedding-table th,
.wedding-table td {
  padding: 8px 7px;
  overflow: hidden;
  border-bottom: 1px solid var(--wedding-line);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-table th {
  color: var(--wedding-muted);
  font-weight: 600;
}

.wedding-money {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.wedding-pill,
.wedding-lock {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--wedding-muted);
  background: #eef5f3;
  font-size: 9px;
  font-weight: 700;
}

.wedding-pill.is-risk,
.wedding-lock.is-paid {
  color: var(--wedding-red);
  background: var(--wedding-red-soft);
}

.wedding-pill.is-ok {
  color: var(--wedding-green);
  background: #edf6f1;
}

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

.wedding-diff-old,
.wedding-diff-new {
  min-height: 128px;
  padding: 12px;
  border: 1px solid var(--wedding-line);
  border-radius: 11px;
  background: #fff;
  font-size: 11px;
}

.wedding-diff-new {
  border-color: #b9ddd6;
  background: #f7fbfa;
}

.wedding-auth-card {
  border-color: #b9ddd6;
  background: var(--agent-teal-soft, #e8f7f4);
}

.wedding-auth-card strong {
  color: var(--wedding-red);
}

.wedding-play-foot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 8px 12px;
  border-top: 1px solid var(--wedding-line);
}

.wedding-play-foot > span {
  color: var(--wedding-muted);
  font-size: 9px;
  font-weight: 700;
}

.wedding-wall {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.wedding-wall-chip {
  flex: 0 1 150px;
  min-width: 0;
  padding: 7px 9px;
  overflow: hidden;
  border: 1px solid var(--wedding-line);
  border-radius: 9px;
  background: #fff;
  color: var(--wedding-ink);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-is-arrive {
  animation: weddingFadeIn calc(0.18s / var(--demo-speed)) ease-out;
}

@keyframes weddingFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 1180px) {
  .scenario-btn {
    padding-inline: 9px;
  }

  .wedding-top {
    grid-template-columns: 48px minmax(390px, 1fr) auto;
  }

  .wedding-brand div,
  .wedding-btn.ghost {
    display: none;
  }

  .wedding-brand {
    padding-right: 7px;
  }
}

@media (max-width: 880px) {
  body[data-scenario="wedding"] .wedding-cockpit:not([hidden]) {
    grid-template-rows: 62px 42px minmax(0, 1fr);
  }

  .wedding-top {
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .wedding-brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .wedding-top-kpis {
    grid-template-columns: repeat(3, minmax(80px, 1fr));
  }

  .wedding-top-kpis > :nth-child(4) {
    display: none;
  }

  .wedding-stage-chip {
    display: none;
  }

  .wedding-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(250px, 42%) minmax(0, 1fr);
  }

  .wedding-playground {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .brand {
    display: none;
  }

  .scenario-switch {
    max-width: 100%;
  }

  .scenario-btn {
    padding-inline: 8px;
    font-size: 10px;
  }

  .wedding-top {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .wedding-brand {
    padding-right: 7px;
  }

  .wedding-brand div {
    display: none;
  }

  .wedding-top-kpis {
    grid-template-columns: repeat(2, minmax(80px, 1fr));
  }

  .wedding-top-kpis > :nth-child(n + 3) {
    display: none;
  }

  .wedding-track-pill {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .wedding-track-pill em {
    display: none;
  }

  .wedding-play-head small {
    width: 180px;
  }

  .wedding-workspace-tabs button {
    min-width: 34px;
    padding-inline: 5px;
  }

  .wedding-cards,
  .wedding-track-grid,
  .wedding-diff-grid {
    grid-template-columns: 1fr;
  }
}

/* Wedding runtime component aliases */
.wedding-kpi-note {
  overflow: hidden;
  color: var(--wedding-muted);
  font-size: 8px;
  font-style: normal;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-stream-item.is-user {
  align-self: flex-start;
  max-width: 92%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--wedding-ink);
}

.wedding-stream-item.is-agent {
  align-self: flex-start;
  padding: 0 2px;
}

.wedding-stream-item.is-arrive {
  animation: streamItemInSoft 0.4s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.wedding-stream-who {
  margin-bottom: 2px;
  color: var(--wedding-muted);
  font-size: 9px;
  font-weight: 700;
}

.wedding-stream-item.is-user .wedding-stream-who {
  color: var(--wedding-muted);
  text-align: left;
  justify-content: flex-start;
}

.wedding-msg-bubble {
  white-space: pre-wrap;
}

.wedding-stream-event {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  color: var(--wedding-muted);
}

.wedding-event-marker {
  width: 6px;
  height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: #b7c7c3;
}

.wedding-stream-event.kind-notify .wedding-event-marker {
  background: var(--wedding-gold);
}

.wedding-stream-event.kind-discovery .wedding-event-marker {
  background: var(--wedding-green);
}

.wedding-stream-event.kind-mutation .wedding-event-marker,
.wedding-stream-event.kind-auth .wedding-event-marker {
  background: var(--wedding-red);
}

.wedding-event-copy {
  display: flex;
  min-width: 0;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f6f2ed;
}

.wedding-event-copy strong {
  flex: 0 0 auto;
  color: var(--wedding-gold);
  font-size: 9px;
}

.wedding-event-copy p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--wedding-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-stream-output {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 8px 9px;
  border: 1px solid #cddfd6;
  border-radius: 10px;
  background: #f5faf7;
}

.wedding-inbound-tip {
  align-self: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 1px 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: block !important;
}

.wedding-inbound-tip-btn {
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 5px 4px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  font: inherit;
  box-shadow: none;
  transition: background 0.12s ease;
}

.wedding-inbound-tip-btn:hover {
  background: rgba(60, 60, 67, 0.05);
  transform: none;
  box-shadow: none;
}

.wedding-inbound-tip-ico {
  width: 16px;
  height: 16px;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  font-size: 12px;
  opacity: 0.85;
}

.wedding-inbound-tip-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: nowrap;
}

.wedding-inbound-tip-copy strong {
  flex: 0 1 auto;
  max-width: 42%;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-inbound-tip-copy em {
  flex: 1 1 auto;
  min-width: 0;
  font-style: normal;
  font-size: 11px;
  color: #9aa3af;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-inbound-tip-go {
  width: auto;
  box-sizing: border-box;
  justify-self: end;
  text-align: right;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #3d9b8a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(61, 155, 138, 0.35);
}

.wedding-output-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: #fff;
  background: var(--wedding-green);
  font-size: 10px;
}

.wedding-output-copy {
  display: grid;
  min-width: 0;
}

.wedding-output-copy span {
  color: var(--wedding-muted);
  font-size: 8px;
}

.wedding-output-copy strong {
  overflow: hidden;
  color: var(--wedding-ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-output-btn {
  border: 0;
  border-radius: 7px;
  padding: 5px 7px;
  color: var(--wedding-green);
  background: #e9f4ee;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.wedding-stream-empty {
  display: grid;
  place-items: center;
  align-content: center;
  height: 100%;
  color: var(--wedding-muted);
  text-align: center;
}

.wedding-stream-empty strong {
  color: var(--wedding-ink);
  font-family: var(--font-serif);
  font-size: 15px;
}

.wedding-stream-empty p {
  margin: 4px 0 0;
  font-size: 10px;
}

.wedding-thinking {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  margin: 8px 0 4px 20px;
  color: var(--wedding-muted);
  font-size: 11px;
  opacity: 1;
  transform: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.wedding-thinking.is-enter {
  opacity: 0;
  transform: translateY(4px);
}

.wedding-thinking i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9bb0aa;
  animation: weddingThinkDot 1.15s ease-in-out infinite;
}

.wedding-thinking i:nth-child(2) { animation-delay: 0.18s; }
.wedding-thinking i:nth-child(3) { animation-delay: 0.36s; }

.wedding-thinking span {
  margin-left: 4px;
}

@keyframes weddingThinkIn {
  from { opacity: 0.35; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

@keyframes weddingThinkDot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.wedding-workspace-panel {
  min-height: 100%;
}

.wedding-panel-head strong {
  color: var(--wedding-ink);
  font-family: var(--font-serif);
  font-size: 16px;
}

.wedding-track-list,
.wedding-booking-list,
.wedding-calendar-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.wedding-track-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid var(--wedding-line);
  border-radius: 10px;
  background: #fff;
}

.wedding-track-row.is-active {
  border-color: #b9ddd6;
  background: var(--agent-teal-soft, #e8f7f4);
}

.wedding-track-row.is-done {
  border-color: #cddfd6;
  background: #f6faf7;
}

.wedding-track-id {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--wedding-red);
  background: var(--wedding-red-soft);
  font-size: 10px;
  font-weight: 800;
}

.wedding-track-name {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-track-row em {
  color: var(--wedding-muted);
  font-size: 9px;
  font-style: normal;
}

.wedding-track-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.wedding-track-facts > span {
  display: grid;
  padding: 8px 9px;
  border-radius: 9px;
  background: #f6f2ed;
}

.wedding-track-facts small {
  color: var(--wedding-muted);
  font-size: 8px;
}

.wedding-track-facts b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-ledger-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.wedding-ledger-hero > div {
  display: grid;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--wedding-line);
  border-radius: 10px;
  background: #fff;
}

.wedding-ledger-hero span {
  color: var(--wedding-muted);
  font-size: 8px;
}

.wedding-ledger-hero b {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-ledger-hero b.is-warn {
  color: var(--wedding-red);
}

.wedding-ledger-meter {
  height: 6px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8e1;
}

.wedding-ledger-meter i {
  display: block;
  width: var(--pct);
  height: 100%;
  border-radius: inherit;
  background: var(--wedding-red);
  transition: width calc(0.2s / var(--demo-speed)) ease;
}

.wedding-ledger-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9px;
}

.wedding-ledger-table th,
.wedding-ledger-table td {
  padding: 7px 6px;
  overflow: hidden;
  border-bottom: 1px solid var(--wedding-line);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-ledger-table th {
  color: var(--wedding-muted);
}

.wedding-status-pill {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--wedding-muted);
  background: #eef5f3;
  font-size: 8px;
  font-weight: 700;
}

.wedding-status-pill.is-paid {
  color: var(--wedding-red);
  background: var(--wedding-red-soft);
}

.wedding-status-pill.is-auth {
  color: var(--wedding-amber);
  background: #fbf2e8;
}

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

.wedding-contract-col {
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--wedding-line);
  border-radius: 12px;
  background: #fff;
}

.wedding-contract-col.is-changed {
  border-color: #d8aaa1;
  background: #fff8f6;
}

.wedding-contract-col h3 {
  margin: 0 0 14px;
  font-size: 11px;
}

.wedding-contract-col p {
  margin: 7px 0;
  font-size: 10px;
}

.wedding-contract-col b {
  color: var(--wedding-red);
  font-family: var(--font-mono);
  font-size: 20px;
}

.wedding-contract-warn,
.wedding-contract-foot {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--wedding-red);
  background: var(--wedding-red-soft);
  font-size: 10px;
}

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

.wedding-booking-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(180px, 1fr);
  gap: 8px 14px;
  align-items: center;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--wedding-line);
  border-radius: 10px;
  background: #fff;
}

.wedding-booking-row.is-mismatch {
  border-color: #d8aaa1;
  background: #fff8f6;
}

.wedding-booking-vendor,
.wedding-booking-status {
  display: grid;
  gap: 2px;
}

.wedding-booking-vendor strong {
  font-size: 10px;
}

.wedding-booking-vendor small,
.wedding-booking-status span,
.wedding-booking-preview,
.wedding-booking-foot {
  color: var(--wedding-muted);
  font-size: 8px;
}

.wedding-booking-status {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wedding-booking-preview {
  grid-column: 1 / -1;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.wedding-calendar-list li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  min-height: 38px;
  align-items: center;
  padding: 7px 10px;
  border-left: 3px solid var(--wedding-line);
  border-radius: 0 9px 9px 0;
  background: #fff;
}

.wedding-calendar-list li.is-fixed {
  border-left-color: var(--wedding-red);
}

.wedding-calendar-list li.is-unavailable {
  border-left-color: var(--wedding-red);
  color: var(--wedding-red);
  background: #fff8f6;
  text-decoration: line-through;
}

.wedding-calendar-list time {
  color: var(--wedding-muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.wedding-calendar-list span {
  font-size: 10px;
  font-weight: 700;
}

.wedding-calendar-meta {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.wedding-calendar-meta span,
.wedding-date-fixed {
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--wedding-muted);
  background: #f6f2ed;
  font-size: 9px;
}

.wedding-wall-chips {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.wedding-wall-label,
.wedding-wall-empty {
  flex: 0 0 auto;
  color: var(--wedding-muted);
  font-size: 8px;
}

/* Wedding app-like chat and calendar surfaces */
.wedding-agent-copy {
  display: grid;
  gap: 1px;
}

.wedding-agent-copy small {
  color: var(--wedding-muted);
  font-size: 8px;
  font-weight: 500;
}

.wedding-stream-item.is-user,
.wedding-stream-item.is-agent {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  max-width: 92%;
  padding: 0;
  border-radius: 0;
  color: var(--wedding-ink);
  background: transparent;
}

.wedding-stream-item.is-user {
  flex-direction: row; /* avatar on the left — couple speaks as a person in the thread */
  align-self: flex-start;
}

.wedding-message-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid var(--wedding-line);
  border-radius: 9px;
  color: var(--wedding-red);
  background: var(--wedding-red-soft);
  font-size: 8px;
  font-weight: 800;
}

img.wedding-message-avatar,
.wedding-message-avatar.is-photo {
  display: block;
  object-fit: cover;
  padding: 0;
  color: transparent;
  background: #eef5f3;
  border-color: #dceae6;
}

.wedding-stream-item.is-agent .wedding-message-avatar {
  color: #fff;
  border-color: var(--wedding-red);
  background: var(--wedding-red);
}

.wedding-message-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.wedding-stream-who {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 3px;
}

.wedding-stream-who time {
  color: #9aa8a4;
  font-size: 8px;
  font-weight: 500;
}

.wedding-stream-item.is-user .wedding-stream-who {
  justify-content: flex-start;
  color: var(--wedding-muted);
}

.wedding-msg-bubble {
  padding: 8px 10px;
  border: 1px solid var(--wedding-line);
  border-radius: 11px 11px 11px 3px;
  color: var(--wedding-ink);
  background: #f3f8f6;
  font-size: 11px;
  line-height: 1.55;
}

.wedding-stream-item.is-user .wedding-msg-bubble {
  border-color: #cfe5e0;
  border-radius: 11px 11px 11px 3px;
  color: #1c2422;
  background: #f7fbfa;
}

.wedding-calendar-app {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(220px, 0.86fr);
  gap: 10px;
  min-height: 0;
  height: 100%;
}

.wedding-workspace-panel,
.wedding-calendar-board {
  height: 100%;
  min-height: 0;
}

.wedding-calendar-board {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.wedding-month,
.wedding-agenda {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--wedding-line);
  border-radius: 11px;
  background: #fff;
}

.wedding-month {
  padding: 9px;
}

.wedding-month-toolbar,
.wedding-agenda-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
}

.wedding-month-toolbar strong,
.wedding-agenda-head strong {
  font-size: 10px;
}

.wedding-month-toolbar button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 7px;
  color: var(--wedding-muted);
  background: #eef5f3;
}

.wedding-month-weekdays,
.wedding-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.wedding-month-weekdays {
  margin: 5px 0 2px;
}

.wedding-month-weekdays span {
  color: var(--wedding-muted);
  font-size: 7px;
  text-align: center;
}

.wedding-month-grid {
  grid-auto-rows: 22px;
  gap: 1px 0;
}

.wedding-month-grid > span {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #5f6e6a;
  font-size: 8px;
}

.wedding-month-grid > span.has-event:not(.is-fixed)::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--wedding-gold);
}

.wedding-month-grid > span.is-fixed {
  color: #fff;
  background: var(--wedding-red);
  font-weight: 800;
}

.wedding-agenda {
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  padding: 8px 9px;
}

.wedding-agenda-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--wedding-line);
}

.wedding-agenda-head span {
  color: var(--wedding-muted);
  font-size: 7px;
}

.wedding-agenda .wedding-calendar-list {
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.wedding-agenda .wedding-calendar-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 6px;
  min-height: 29px;
  padding: 5px 2px;
  border: 0;
  border-bottom: 1px solid #f0ebe5;
  border-radius: 0;
  background: transparent;
}

.wedding-agenda .wedding-calendar-list time {
  color: var(--wedding-red);
  font-size: 8px;
}

.wedding-agenda .wedding-calendar-list span {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-agenda .wedding-calendar-list em {
  color: var(--wedding-muted);
  font-size: 7px;
  font-style: normal;
  white-space: nowrap;
}

.wedding-agenda .wedding-calendar-list li.is-unavailable span,
.wedding-agenda .wedding-calendar-list li.is-unavailable em {
  color: var(--wedding-red);
  text-decoration: line-through;
}

/* Wedding typography audit: no functional text below 10px */
.wedding-cockpit {
  font-size: 12px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

.wedding-brand strong {
  font-size: 14px;
}

.wedding-brand div > span {
  font-size: 11px;
}

.wedding-kpi small {
  font-size: 10px;
  line-height: 1.15;
}

.wedding-kpi > span {
  font-size: 13px;
  line-height: 1.2;
}

.wedding-kpi-note {
  font-size: 10px;
  line-height: 1.05;
}

.wedding-stage-chip {
  font-size: 11px;
}

.wedding-btn {
  font-size: 12px;
}

.wedding-track-pill b,
.wedding-track-pill span {
  font-size: 11px;
}

.wedding-track-pill em {
  font-size: 10px;
}

.wedding-chat-head strong {
  font-size: 13px;
}

.wedding-chat-head > span,
.wedding-play-head > div > span {
  font-size: 11px;
}

.wedding-agent-copy small {
  font-size: 10px;
}

.wedding-stream-empty strong {
  font-size: 16px;
}

.wedding-stream-empty p {
  font-size: 11px;
}

.wedding-message-avatar {
  font-size: 10px;
}

.wedding-stream-who,
.wedding-stream-who time {
  font-size: 10px;
}

.wedding-msg-bubble {
  font-size: 12px;
}

.wedding-event-copy strong {
  font-size: 10px;
}

.wedding-event-copy p {
  font-size: 11px;
}

.wedding-output-copy span {
  font-size: 10px;
}

.wedding-output-copy strong {
  font-size: 11px;
}

.wedding-output-btn,
.wedding-thinking,
.wedding-wall-chip,
.wedding-wall-label,
.wedding-wall-empty {
  font-size: 10px;
}

.wedding-composer input {
  font-size: 12px;
}

.wedding-play-head h2 {
  font-size: 18px;
}

.wedding-play-head small {
  font-size: 10px;
}

.wedding-workspace-tabs button {
  font-size: 11px;
}

.wedding-panel-head strong {
  font-size: 17px;
}

.wedding-panel-head span,
.wedding-status {
  font-size: 10px;
}

.wedding-track-id {
  font-size: 11px;
}

.wedding-track-name {
  font-size: 12px;
}

.wedding-track-row em {
  font-size: 10px;
}

.wedding-track-facts small {
  font-size: 10px;
}

.wedding-track-facts b {
  font-size: 11px;
}

.wedding-ledger-hero span {
  font-size: 10px;
}

.wedding-ledger-hero b {
  font-size: 12px;
}

.wedding-ledger-table {
  font-size: 10px;
}

.wedding-status-pill {
  font-size: 10px;
}

.wedding-contract-col h3 {
  font-size: 12px;
}

.wedding-contract-col p,
.wedding-contract-warn,
.wedding-contract-foot {
  font-size: 11px;
}

.wedding-booking-vendor strong {
  font-size: 11px;
}

.wedding-booking-vendor small,
.wedding-booking-status span,
.wedding-booking-preview,
.wedding-booking-foot {
  font-size: 10px;
}

.wedding-date-fixed {
  font-size: 10px;
}

.wedding-month,
.wedding-agenda {
  border-color: #e4d9ce;
  box-shadow: 0 4px 14px rgba(67, 53, 40, 0.05);
}

.wedding-month {
  padding: 10px 11px;
}

.wedding-month-toolbar,
.wedding-agenda-head {
  min-height: 28px;
}

.wedding-month-toolbar strong,
.wedding-agenda-head strong {
  font-size: 12px;
}

.wedding-month-weekdays {
  margin: 4px 0 2px;
}

.wedding-month-weekdays span {
  font-size: 10px;
  font-weight: 600;
}

.wedding-month-weekdays span:first-child,
.wedding-month-weekdays span:last-child {
  color: var(--wedding-red);
}

.wedding-month-grid {
  grid-auto-rows: 23px;
  gap: 1px 0;
}

.wedding-month-grid > span {
  font-size: 10px;
  font-weight: 500;
}

.wedding-month-grid > span.is-fixed {
  width: 23px;
  height: 23px;
  justify-self: center;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(166, 61, 64, 0.24);
}

.wedding-agenda {
  padding: 9px 10px;
  background: #fcfaf7;
}

.wedding-agenda-head span {
  font-size: 10px;
}

.wedding-agenda .wedding-calendar-list li {
  position: relative;
  grid-template-columns: 7px 40px minmax(0, 1fr) auto;
  gap: 6px;
  min-height: 34px;
  padding: 6px 2px;
}

.wedding-agenda .wedding-calendar-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wedding-gold);
}

.wedding-agenda .wedding-calendar-list li.is-fixed::before {
  background: var(--wedding-red);
}

.wedding-agenda .wedding-calendar-list li.is-booked::before {
  background: var(--wedding-green);
}

.wedding-agenda .wedding-calendar-list li.is-unavailable::before {
  background: #b7c7c3;
}

.wedding-agenda .wedding-calendar-list time,
.wedding-agenda .wedding-calendar-list em {
  font-size: 10px;
}

.wedding-agenda .wedding-calendar-list span {
  font-size: 11px;
}

.wedding-play-foot > span {
  font-size: 10px;
}

/* Wedding parallel operations wall: five stable mini-app windows. */
.wedding-parallel-desktop {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}

.wedding-parallel-windows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}

.wedding-track-window {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e6efec;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  contain: layout paint;
  transition:
    border-color 0.28s ease,
    background-color 0.28s ease,
    box-shadow 0.28s ease;
}

.wedding-track-window:nth-child(5) {
  grid-column: 2 / -1;
}

.wedding-track-window.is-focus {
  border-color: #b9ddd6;
  background: #fff;
  box-shadow: inset 3px 0 0 var(--agent-teal, #5fbfb0);
  animation: none;
}

.wedding-track-window.is-alert {
  border-color: rgba(196, 92, 92, 0.45);
  background: #fffaf8;
  box-shadow: inset 3px 0 0 #c45c5c;
}

.wedding-track-window.is-done {
  border-color: #dceae6;
  background: #fbfdfc;
}

.wedding-window-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 23px;
  padding: 0 10px;
  border-bottom: 1px solid #eef3f1;
  background: #fff;
}

.wedding-window-bar > b {
  overflow: hidden;
  color: #2b3331;
  font-size: 11px;
  font-weight: 650;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.wedding-window-bar > em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  color: #6b7874;
  background: #f3f6f5;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.22s ease, background-color 0.22s ease;
}

.wedding-mini-workbench {
  transition: opacity 0.16s ease;
}

.wedding-window-bar > em > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b7c7c3;
}

.wedding-track-window.is-running .wedding-window-bar > em {
  color: var(--agent-teal-deep, #3d9b8a);
  background: var(--agent-teal-soft, #e8f7f4);
}

.wedding-track-window.is-running .wedding-window-bar > em > i {
  background: var(--agent-teal, #5fbfb0);
  animation: wedding-window-live 1.8s ease-in-out infinite;
}

.wedding-track-window.is-focus .wedding-window-bar > em {
  color: var(--agent-teal-deep, #3d9b8a);
  background: var(--agent-teal-soft, #e8f7f4);
}

.wedding-track-window.is-focus .wedding-window-bar > em > i {
  background: var(--agent-teal, #5fbfb0);
}

.wedding-track-window.is-done .wedding-window-bar > em {
  color: #5f6e6a;
  background: #eef3f1;
}

.wedding-track-window.is-alert .wedding-window-bar {
  background: #fffaf8;
}

.wedding-track-window.is-alert .wedding-window-bar > em {
  color: #b42318;
  background: #fff1f0;
}

.wedding-window-mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  color: var(--agent-teal-deep, #3d9b8a);
  background: var(--agent-teal-soft, #e8f7f4);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
}

.wedding-window-controls {
  display: none;
}

.wedding-window-body {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px;
  height: calc(100% - 23px);
  min-height: 0;
  padding: 5px;
}

.wedding-window-evidence {
  position: relative;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 7px;
  background: #e4eeeb;
}

.wedding-window-evidence img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(0.96);
}

.wedding-window-evidence figcaption {
  position: absolute;
  inset: auto 0 0;
  overflow: hidden;
  padding: 9px 5px 4px;
  color: #fff;
  background: linear-gradient(transparent, rgba(35, 29, 26, 0.74));
  font-size: 8px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-track-window.is-focus .wedding-window-evidence::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0 42%, rgba(255, 255, 255, 0.44) 50%, transparent 58%);
  content: "";
  pointer-events: none;
  transform: translateY(-100%);
  animation: wedding-evidence-scan 900ms 120ms ease-out 1;
}

.wedding-window-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  overflow: hidden;
}

.wedding-window-copy strong,
.wedding-window-copy span,
.wedding-window-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-window-copy strong {
  color: var(--wedding-ink);
  font-size: 11px;
}

.wedding-window-copy span {
  color: #5f6e6a;
  font-size: 10px;
}

.wedding-window-copy small {
  color: var(--wedding-muted);
  font-size: 9px;
}

.wedding-track-window.is-alert .wedding-window-copy strong {
  color: var(--wedding-red);
}

.wedding-window-metric {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border-radius: 7px;
  background: #f2ece6;
}

.wedding-window-metric span {
  color: var(--wedding-muted);
  font-size: 8px;
}

.wedding-window-metric strong {
  font-family: var(--font-serif);
  font-size: 18px;
}

.wedding-window-metric > i {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #ddd3ca;
}

.wedding-window-metric > i::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  border-radius: inherit;
  background: var(--wedding-red);
  content: "";
  transition: width 420ms ease;
}

.wedding-parallel-sync {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-top: 8px;
  padding: 8px 12px 8px 46px;
  overflow: hidden;
  border: 1px solid #dfd6ce;
  border-radius: 10px;
  background: linear-gradient(90deg, #f7f2ed, #fffaf7);
}

.wedding-parallel-sync > span {
  color: var(--wedding-muted);
  font-size: 10px;
  font-weight: 700;
}

.wedding-parallel-sync > strong {
  color: var(--wedding-red);
  font-family: var(--font-serif);
  font-size: 16px;
}

.wedding-parallel-sync > em {
  color: #625a54;
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.wedding-sync-lines {
  position: absolute;
  inset: 5px auto 5px 9px;
  display: grid;
  width: 28px;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.wedding-sync-lines i {
  position: relative;
  border-radius: 99px;
  background: linear-gradient(var(--wedding-red), #dfc6bd);
  opacity: 0.68;
}

.wedding-sync-lines i::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--wedding-red);
  content: "";
  transform: translate(-50%, 1px);
}

@keyframes wedding-window-focus {
  from {
    opacity: 0.76;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wedding-window-live {
  0%,
  100% {
    opacity: 0.42;
  }
  50% {
    opacity: 1;
  }
}

@keyframes wedding-evidence-scan {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100%);
  }
}

@media (max-width: 640px) {
  .wedding-parallel-windows {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: 112px;
  }

  .wedding-track-window:nth-child(5) {
    grid-column: auto;
  }

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

  .wedding-parallel-sync > em {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wedding-track-window.is-focus,
  .wedding-track-window.is-running .wedding-window-bar > em > i,
  .wedding-track-window.is-focus .wedding-window-evidence::after {
    animation: none;
  }
}

/* Unified workbench shell: one white stage, inset track grid. */
.wedding-playground {
  display: block;
  overflow: hidden;
  border: 1px solid var(--wedding-line, #dceae6);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 70, 62, 0.06);
}

.wedding-workspace {
  height: 100%;
  padding: 10px;
  overflow: hidden;
  background: #fff;
}

.wedding-parallel-desktop {
  display: block;
  height: 100%;
  min-height: 0;
}

.wedding-parallel-windows {
  height: 100%;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e8eeec;
  border-radius: 12px;
  background: #f5f9f8;
}

.wedding-window-bar {
  height: 30px;
}

.wedding-window-body {
  grid-template-columns: minmax(78px, 34%) minmax(0, 1fr);
  gap: 8px;
  height: calc(100% - 30px);
  padding: 8px 10px 10px;
}

.wedding-window-copy {
  gap: 4px;
}

@media (max-width: 640px) {
  .wedding-workspace {
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .wedding-parallel-windows {
    height: auto;
    grid-auto-rows: 132px;
  }
}

/* Each track is a live mini-workbench, not a summary card. */
.wedding-parallel-windows {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.wedding-track-window:nth-child(5) {
  grid-column: 1 / -1;
}

.wedding-mini-workbench {
  display: block;
  height: calc(100% - 30px);
  padding: 8px 10px 10px;
  overflow: hidden;
  background: #fff;
}

.wedding-mini-toolbar {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  height: 19px;
  margin-bottom: 4px;
  color: #5f6e6a;
}

.wedding-mini-toolbar > span {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  color: #fff;
  background: var(--agent-teal, #5fbfb0);
  font-size: 9px;
}

.wedding-mini-toolbar strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-mini-toolbar em {
  color: var(--wedding-muted);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.wedding-mini-contract {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr) 56px;
  align-items: stretch;
  gap: 3px;
  height: 41px;
}

.wedding-mini-contract section,
.wedding-mini-contract aside {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  padding: 4px 5px;
  border: 1px solid var(--wedding-line, #dceae6);
  border-radius: 6px;
  background: #f7fbfa;
}

.wedding-mini-contract section.is-changed {
  border-color: #b9ddd6;
  background: var(--agent-teal-soft, #e8f7f4);
}

.wedding-mini-contract small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--wedding-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-mini-contract b {
  font-family: var(--font-serif);
  font-size: 15px;
}

.wedding-mini-contract span {
  align-self: end;
  color: var(--wedding-muted);
  font-size: 8px;
}

.wedding-mini-contract > i {
  align-self: center;
  color: #8a9793;
  font-size: 10px;
  font-style: normal;
}

/* Pin the Agent-found strip lower in the card (more air under table counts). */
.wedding-mini-workbench:has(.wedding-mini-contract) {
  display: flex;
  flex-direction: column;
}

.wedding-mini-contract + .wedding-mini-chatline {
  margin-top: auto;
}

.wedding-mini-chatline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-height: 27px;
  margin-top: 4px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #f3f8f6;
}

.wedding-mini-chatline > i {
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--agent-teal-deep, #3d9b8a);
  background: #dceae6;
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.wedding-mini-chatline > p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #4a5552;
  font-size: 9px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wedding-mini-chatline.is-risk {
  background: #fff4f2;
}

.wedding-mini-progress {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  height: 18px;
  overflow: hidden;
  border-radius: 5px;
  background: #e8eeec;
}

.wedding-mini-progress > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  background: linear-gradient(90deg, #a8d4cb 0%, var(--agent-teal, #5fbfb0) 100%);
  transition: width 420ms ease;
}

.wedding-mini-progress span,
.wedding-mini-progress em {
  position: relative;
  padding: 0 6px;
  font-size: 8px;
  font-style: normal;
}

.wedding-mini-chat {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.wedding-mini-chat p {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 5px;
  margin: 0;
  padding: 3px 5px;
  overflow: hidden;
  border-radius: 6px 6px 6px 2px;
  color: #4a5552;
  background: #f3f6f5;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-mini-chat p.is-user {
  border-radius: 6px 6px 2px;
  background: var(--agent-teal-soft, #e8f7f4);
}

.wedding-mini-chat p.is-risk {
  color: var(--wedding-danger, #c45c5c);
}

.wedding-mini-chat p b {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
}

.wedding-mini-photo {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 6px;
  height: 43px;
}

.wedding-mini-photo img {
  width: 64px;
  height: 43px;
  border-radius: 6px;
  object-fit: cover;
}

.wedding-mini-photo > div {
  display: grid;
  gap: 3px;
}

.wedding-mini-photo span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  padding: 2px 4px;
  border-radius: 5px;
  color: var(--wedding-muted);
  background: #f3f6f5;
  font-size: 8px;
}

.wedding-mini-photo span b {
  overflow: hidden;
  color: #3d4643;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wedding-mini-photo span.is-risk {
  background: #fff4f2;
}

.wedding-mini-calendar {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 6px;
}

.wedding-mini-month {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 5px;
  border-radius: 6px;
  background: #eef5f3;
}

.wedding-mini-month strong {
  grid-column: 1 / -1;
  font-size: 9px;
}

.wedding-mini-month span {
  position: relative;
  display: grid;
  place-items: center;
  height: 18px;
  border-radius: 4px;
  font-size: 8px;
}

.wedding-mini-month span.has-event {
  color: #fff;
  background: var(--agent-teal, #5fbfb0);
}

.wedding-mini-month span.is-cancelled {
  color: #8a9793;
  text-decoration: line-through;
  background: #dceae6;
}

.wedding-mini-calendar ol {
  display: grid;
  align-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wedding-mini-calendar li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  padding: 4px 5px;
  border-radius: 5px;
  background: #f3f6f5;
  font-size: 8px;
}

.wedding-mini-calendar li.is-risk {
  color: var(--wedding-danger, #c45c5c);
  background: #fff4f2;
}

.wedding-mini-calendar li em {
  font-style: normal;
}

.wedding-mini-ledger {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 170px;
  gap: 8px;
  height: 74px;
}

.wedding-mini-budget {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  padding: 7px 9px;
  overflow: hidden;
  border-radius: 7px;
  background: #eef5f3;
}

.wedding-mini-budget span {
  grid-column: 1 / -1;
  color: var(--wedding-muted);
  font-size: 8px;
}

.wedding-mini-budget b {
  font-family: var(--font-serif);
  font-size: 15px;
}

.wedding-mini-budget em {
  align-self: end;
  color: var(--wedding-muted);
  font-size: 8px;
  font-style: normal;
}

.wedding-mini-budget i {
  position: absolute;
  inset: auto auto 0 0;
  width: var(--value);
  height: 4px;
  background: var(--agent-teal, #5fbfb0);
  transition: width 420ms ease;
}

.wedding-mini-ledger ul {
  display: grid;
  align-content: center;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wedding-mini-ledger li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 5px;
  padding: 3px 5px;
  border-bottom: 1px solid #e4eeeb;
  font-size: 8px;
}

.wedding-mini-ledger li b {
  font-size: 8px;
}

.wedding-mini-ledger li em {
  color: var(--wedding-muted);
  font-style: normal;
}

.wedding-mini-auth {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px;
  border-radius: 7px;
  background: #f3f8f6;
  border: 1px solid var(--wedding-line, #dceae6);
}

.wedding-mini-auth strong {
  font-size: 9px;
}

.wedding-mini-auth span {
  color: var(--wedding-muted);
  font-size: 8px;
}

.wedding-mini-auth.is-risk {
  color: var(--wedding-danger, #c45c5c);
  background: #fff4f2;
  border-color: #e2b4b4;
}

@media (max-width: 640px) {
  .wedding-parallel-windows {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .wedding-track-window:nth-child(5) {
    grid-column: auto;
  }

  .wedding-mini-ledger {
    grid-template-columns: 1fr 1fr;
  }

  .wedding-mini-auth {
    display: none;
  }
}

.wedding-mini-toolbar em,
.wedding-mini-contract small,
.wedding-mini-contract span,
.wedding-mini-chatline > i,
.wedding-mini-chatline > p,
.wedding-mini-progress span,
.wedding-mini-progress em,
.wedding-mini-chat p,
.wedding-mini-chat p b,
.wedding-mini-photo span,
.wedding-mini-photo span b,
.wedding-mini-month strong,
.wedding-mini-month span,
.wedding-mini-calendar li,
.wedding-mini-budget span,
.wedding-mini-budget em,
.wedding-mini-ledger li,
.wedding-mini-ledger li b,
.wedding-mini-auth strong,
.wedding-mini-auth span {
  font-size: 10px;
}

/* ===== Shared Agent log + teal workbench skin (ecom / wedding) ===== */
.ecom-chat,
.wedding-chat,
.ecom-playground,
.wedding-playground {
  border-radius: 20px;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(30, 70, 62, 0.08);
  background: #fff;
}

.ecom-agent-copy,
.wedding-agent-copy {
  display: grid;
  gap: 2px;
}

.ecom-agent-copy small,
.wedding-agent-copy small {
  color: var(--agent-muted, #7a8a86);
  font-size: 11px;
  font-weight: 500;
}

.ecom-chat .ecom-agent-bar,
.wedding-chat-head {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--agent-line, #dceae6);
}

.ecom-chat-head {
  padding: 12px 16px 12px 18px;
  border-bottom: 1px solid var(--agent-line, #dceae6);
}

.ecom-chat .ecom-agent-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border-bottom: 0;
  min-width: 0;
}

.ecom-chat .ecom-agent-bar strong,
.wedding-chat-head strong {
  color: #111;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.01em;
}

.ecom-live-dot,
.wedding-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b7c7c3;
}

.ecom-live-dot.is-on,
.wedding-live-dot.is-live {
  background: var(--agent-teal, #5fbfb0);
  box-shadow: 0 0 0 4px rgba(95, 191, 176, 0.18);
}

.wedding-chat-head > span {
  color: #9aa8a4;
  font-size: 12px;
  font-weight: 600;
}

.ecom-chat .ecom-messages,
.wedding-messages {
  gap: 14px;
  padding: 18px 20px 22px;
  background: #fff;
  scroll-behavior: auto;
  overflow-anchor: none;
}

.ecom-chat .ecom-stream-item,
.wedding-stream-item {
  contain: layout paint;
}

.ecom-chat .ecom-stream-item.is-arrive,
.wedding-stream-item.is-arrive {
  animation: streamItemInSoft 0.4s cubic-bezier(0.22, 0.8, 0.28, 1);
}

@keyframes streamItemIn {
  from { opacity: 0.4; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

@keyframes streamItemInSoft {
  from { opacity: 0.55; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.ecom-log-bullet,
.wedding-log-bullet {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--agent-teal, #5fbfb0);
  box-shadow: 0 0 0 3px rgba(95, 191, 176, 0.12);
}

.ecom-log-bullet.is-done,
.wedding-log-bullet.is-done {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  background: var(--agent-teal-deep, #3d9b8a);
  box-shadow: 0 0 0 3px rgba(61, 155, 138, 0.14);
}

.ecom-log-bullet.is-event,
.wedding-log-bullet.is-event {
  width: 6px;
  height: 6px;
  margin-top: 8px;
  background: #c5d5d1;
  box-shadow: none;
}

.ecom-chat .ecom-stream-item.mine.is-agent-log,
.ecom-chat .ecom-stream-output,
.ecom-chat .ecom-stream-event,
.wedding-stream-item.is-agent,
.wedding-stream-output,
.wedding-stream-event {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  background: transparent;
  color: var(--agent-ink, #1a1d23);
}

.ecom-message-stack,
.wedding-message-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ecom-chat .ecom-stream-item.mine.is-agent-log .ecom-stream-who,
.wedding-stream-item.is-agent .wedding-stream-who {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: var(--agent-teal, #5fbfb0);
  font-size: 12px;
  font-weight: 650;
}

.ecom-chat .ecom-stream-item.mine.is-agent-log .ecom-stream-who time,
.wedding-stream-item.is-agent .wedding-stream-who time {
  color: var(--agent-teal, #5fbfb0);
  font-size: 12px;
  font-weight: 650;
}

.ecom-chat .ecom-stream-item.mine.is-agent-log .ecom-msg-bubble,
.wedding-stream-item.is-agent .wedding-msg-bubble {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1c2422;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: none;
}

.ecom-chat .ecom-stream-item.mine.is-agent-log {
  align-items: start;
  align-self: stretch;
}

.ecom-chat .ecom-stream-event,
.wedding-stream-event {
  padding: 0;
  margin: 0;
}

.ecom-chat .ecom-event-marker,
.wedding-event-marker,
.ecom-chat .ecom-output-icon,
.wedding-output-icon {
  display: none;
}

.ecom-chat .ecom-event-copy,
.wedding-event-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ecom-chat .ecom-event-copy strong,
.wedding-event-copy strong {
  color: #8a9a96;
  font-size: 11px;
  font-weight: 650;
}

.ecom-chat .ecom-event-copy p,
.wedding-event-copy p {
  margin: 0;
  color: #5f6e6a;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: normal;
  text-overflow: unset;
  overflow: visible;
}

.ecom-chat .ecom-stream-output,
.wedding-stream-output {
  margin: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ecom-output-row,
.wedding-output-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e6efec;
  border-radius: 10px;
  background: #fafcfb;
}

.ecom-chat .ecom-output-copy,
.wedding-output-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ecom-chat .ecom-output-copy span,
.wedding-output-copy span {
  color: #8a9a96;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ecom-chat .ecom-output-copy strong,
.wedding-output-copy strong {
  overflow: hidden;
  color: #1c2422;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-chat .ecom-stream-output .ecom-msg-card-btn,
.wedding-output-btn {
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid #cfe5e0;
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--agent-teal-deep, #3d9b8a);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.ecom-chat .ecom-stream-output .ecom-msg-card-btn:hover,
.wedding-output-btn:hover {
  border-color: #b9ddd6;
  background: var(--agent-teal-soft, #e8f7f4);
  color: var(--agent-teal-deep, #3d9b8a);
}

.wedding-stream-item.is-user .wedding-msg-bubble {
  border-color: #dceae6;
  background: #f3f8f6;
  color: #1c2422;
}

.wedding-stream-item.is-user .wedding-message-avatar {
  color: var(--agent-teal-deep, #3d9b8a);
  border-color: #cfe5e0;
  background: var(--agent-teal-soft, #e8f7f4);
}

.wedding-stream-item.is-user img.wedding-message-avatar,
.wedding-stream-item.is-user .wedding-message-avatar.is-photo {
  color: transparent;
  background: #eef5f3;
  border-color: #dceae6;
}

.wedding-track-pill.is-active {
  border-color: #b9ddd6;
  background: #f3fbf9;
}

.wedding-track-pill.is-done {
  border-color: #c5ddd7;
  background: #f5fbf9;
}

.wedding-mini-contract section.is-changed {
  border-color: #b9ddd6;
  background: var(--agent-teal-soft, #e8f7f4);
}

.wedding-mini-chatline.is-risk,
.wedding-mini-chat p.is-risk,
.wedding-mini-photo span.is-risk,
.wedding-mini-calendar li.is-risk,
.wedding-mini-auth.is-risk {
  border-color: #e2b4b4;
  background: #fff4f2;
  color: var(--wedding-danger, #c45c5c);
}

.wedding-btn.primary,
.ecom-btn-primary {
  background: var(--agent-teal, #5fbfb0);
  border-color: var(--agent-teal, #5fbfb0);
}

.wedding-btn.primary:hover,
.ecom-btn-primary:hover {
  background: var(--agent-teal-deep, #3d9b8a);
  border-color: var(--agent-teal-deep, #3d9b8a);
}

.ecom-playground {
  background: #fff;
}

.wedding-playground {
  background: #fff;
  border: 1px solid var(--wedding-line, #dceae6);
  box-shadow: 0 10px 28px rgba(30, 70, 62, 0.06);
}

.ecom-play-kicker,
.wedding-workspace .wedding-panel-head span,
.wedding-workspace-tabs button.is-active {
  color: var(--agent-teal-deep, #3d9b8a);
}

.wedding-workspace-tabs button.is-active {
  border-bottom-color: var(--agent-teal, #5fbfb0);
}

.ecom-bench-strip button.is-active,
.ecom-comms-contact.is-active {
  background: var(--agent-teal-soft, #e8f7f4);
  color: var(--agent-teal-deep, #3d9b8a);
  border-color: #b9ddd6;
}

.ecom-brand-mark {
  background: var(--agent-teal, #5fbfb0);
  color: #fff;
}

.wedding-brand-mark {
  display: none !important;
}

/* ===== Wedding ecom-style single playground ===== */
.wedding-body-manus {
  grid-template-columns: minmax(320px, 36%) minmax(0, 1fr);
}

.wedding-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wedding-agent-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wedding-chat-mode-tabs {
  flex: 0 0 auto;
}

.wedding-mode-chip {
  /* inherits .ecom-mode-chip */
}

.wedding-playground {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.wedding-play-foot,
.wedding-wall {
  display: none !important;
}

.wedding-play-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--wedding-line, #dceae6);
  background: #fff;
}

.wedding-play-kicker {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--agent-teal-deep, #3d9b8a);
}

.wedding-play-head h2 {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 720;
  color: #14201d;
}

.wedding-play-status {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #7a8a86;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wedding-bench-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.wedding-bench-strip button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #d5e5e0;
  background: #f7fbfa;
  color: #5a6d68;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  position: relative;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.wedding-bench-strip .w-tab-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
  font-size: 16px;
  line-height: 1;
  color: initial;
  filter: none;
  -webkit-text-fill-color: initial;
}

.wedding-bench-strip button.is-active {
  background: var(--agent-teal-soft, #e8f7f4);
  color: var(--agent-teal-deep, #3d9b8a);
  border-color: #b9ddd6;
}

.wedding-bench-strip button.is-active .w-tab-emoji {
  transform: scale(1.06);
}

.wedding-bench-strip button.has-badge::after {
  content: attr(data-badge);
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #d97757;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.wedding-play-stage {
  min-height: 0;
  overflow: auto;
  background: linear-gradient(180deg, #f7fbfa 0%, #fff 48px);
  transition: min-height 0.18s ease;
}

.wedding-play-stage.is-switching {
  overflow: hidden;
}

.wedding-play-stage.is-switching .wedding-workspace-panel {
  animation: weddingSurfaceSwitch 0.2s ease-out;
  will-change: opacity;
}

@keyframes weddingSurfaceSwitch {
  from { opacity: 0.92; }
  to { opacity: 1; }
}

.wedding-play-stage .wedding-workspace-panel {
  height: 100%;
  min-height: 0;
}

.wedding-play-foot {
  border-top: 1px solid var(--wedding-line, #dceae6);
  padding: 8px 12px;
  background: #fff;
  max-height: 88px;
  overflow: auto;
}

.wedding-comms-app {
  height: 100%;
  min-height: 360px;
}

.wedding-menu-board,
.wedding-runbook-board {
  padding: 14px 16px 18px;
}

/* —— Wedding Mail / Messages dual apps —— */
.w-msg-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 12px 10px;
  padding: 3px;
  border-radius: 12px;
  background: #e8eeec;
}

.w-msg-seg button {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  color: #5a6d68;
  cursor: pointer;
}

.w-msg-seg button.is-active {
  background: #fff;
  color: #14201d;
  box-shadow: 0 1px 3px rgba(20, 40, 36, 0.12);
}

.w-msg-seg em,
.w-msg-seg i {
  font-style: normal;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}

.w-msg-seg em {
  background: #ff3b30;
  color: #fff;
}

.w-msg-seg i {
  background: #d5e2de;
  color: #3d534e;
}

.w-msg-seg-ico {
  font-size: 13px;
  line-height: 1;
}

.w-mail-app,
.w-sms-app {
  margin: 10px 12px 12px;
  border: 1px solid #d5e3df;
  border-radius: 16px;
  background: #f2f4f7;
  overflow: hidden;
  min-height: 460px;
  height: calc(100% - 22px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 28px rgba(24, 48, 42, 0.08);
}

.w-msg-seg {
  display: none !important;
}

.w-mail-chrome,
.w-sms-chrome {
  display: grid;
  grid-template-columns: 64px 1fr 40px;
  align-items: center;
  padding: 10px 12px 8px;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5e7eb;
}

.w-mail-chrome strong,
.w-sms-chrome strong {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.w-chrome-ghost {
  appearance: none;
  border: 0;
  background: transparent;
  color: #007aff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: default;
  padding: 0;
  text-align: left;
}

.w-mail-chrome .w-chrome-ghost:last-child,
.w-sms-chrome .w-chrome-ghost:last-child {
  text-align: right;
  font-size: 16px;
}

.w-mail-search,
.w-sms-search {
  margin: 0 12px 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.w-mail-split,
.w-sms-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 38%) 1fr;
  background: #fff;
}

.w-mail-list,
.w-sms-list {
  border-right: 1px solid #eceff3;
  overflow-y: auto;
  max-height: 460px;
  background: #fff;
}

.w-mail-row,
.w-sms-row {
  width: 100%;
  appearance: none;
  border: 0;
  border-bottom: 1px solid #f1f3f5;
  background: #fff;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: start;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.w-mail-row:hover,
.w-sms-row:hover {
  background: #f8fafc;
}

.w-mail-row.is-active,
.w-sms-row.is-active {
  background: #eaf2ff;
}

.w-mail-row.is-unread .w-mail-subject,
.w-sms-row.is-unread strong {
  font-weight: 750;
  color: #0f172a;
}

.w-mail-row.is-warn {
  box-shadow: inset 3px 0 0 #ff9f0a;
}

.w-mail-row.is-arriving {
  animation: w-mail-arrive 0.55s ease;
  background: #fff8e8;
  box-shadow: inset 3px 0 0 #f5a524;
}

.w-mail-row.is-reading {
  background: #eaf2ff;
  box-shadow: inset 3px 0 0 #0a84ff;
}

.w-mail-reader.is-reading {
  outline: 2px solid rgba(10, 132, 255, 0.28);
  outline-offset: -2px;
}

.w-mail-reading-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #0a84ff;
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.w-mail-reading-chip[hidden] {
  display: none !important;
}

@keyframes w-mail-arrive {
  0% {
    transform: translateX(-8px);
    background: #ffe8a8;
  }
  100% {
    transform: none;
  }
}

.w-mail-avatar,
.w-sms-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--av, #0a84ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.w-mail-avatar.lg,
.w-sms-avatar.lg {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.w-mail-main,
.w-sms-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.w-mail-top,
.w-sms-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.w-mail-top strong,
.w-sms-top strong {
  font-size: 13px;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w-mail-top time,
.w-sms-top time {
  font-size: 11px;
  color: #8b949e;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.w-mail-subject {
  font-size: 12.5px;
  font-weight: 600;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w-mail-preview,
.w-sms-preview {
  font-size: 11.5px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w-mail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #007aff;
  margin-top: 12px;
}

.w-sms-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #34c759;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  margin-top: 8px;
}

.w-mail-reader,
.w-sms-thread {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  max-height: 460px;
}

.w-mail-reader.is-empty,
.w-sms-thread.is-empty {
  align-items: center;
  justify-content: center;
  color: #9aa3ad;
  font-size: 13px;
}

.w-mail-reader-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #eef1f4;
}

.w-mail-reader-head h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

.w-mail-reader-meta {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: start;
}

.w-mail-reader-meta strong {
  display: block;
  font-size: 13px;
  color: #111827;
}

.w-mail-reader-meta small {
  display: block;
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

.w-mail-addr {
  color: #9ca3af !important;
}

.w-mail-reader-meta time {
  font-size: 11px;
  color: #8b949e;
}

.w-mail-toolbar {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  font-size: 11px;
  color: #007aff;
  font-weight: 600;
}

.w-mail-reader-body {
  padding: 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #1f2937;
  overflow-y: auto;
  white-space: normal;
}

.w-sms-thread {
  background: #e9e9eb;
}

.w-sms-thread-head {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  background: rgba(248, 248, 250, 0.94);
  border-bottom: 1px solid #d8d8dc;
}

.w-sms-thread-head strong {
  display: block;
  font-size: 14px;
  color: #111;
}

.w-sms-thread-head small {
  font-size: 11px;
  color: #6b7280;
}

.w-sms-signal {
  font-size: 14px;
  opacity: 0.7;
}

.w-sms-thread-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.w-sms-daychip {
  align-self: center;
  margin: 0 0 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: #4b5563;
  font-size: 10px;
  font-weight: 600;
}

.w-sms-bubble-wrap {
  align-self: flex-start;
  max-width: 86%;
  display: grid;
  gap: 3px;
}

.w-sms-bubble {
  padding: 9px 12px;
  border-radius: 18px 18px 18px 5px;
  background: #fff;
  color: #111;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.w-sms-bubble.is-warn {
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #fdba74;
}

.w-sms-bubble-wrap time {
  font-size: 10px;
  color: #6b7280;
  padding-left: 6px;
}

.w-sms-composer {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px 10px;
  background: #f2f2f7;
  border-top: 1px solid #d8d8dc;
}

.w-sms-composer span {
  padding: 9px 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #d1d1d6;
  color: #9ca3af;
  font-size: 12px;
}

.w-sms-composer button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #34c759;
  color: #fff;
  font-size: 14px;
  cursor: default;
}

.w-app-empty {
  padding: 48px 20px;
  text-align: center;
  color: #6b7280;
}

.w-app-empty-ico {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.w-app-empty strong {
  display: block;
  color: #111827;
  font-size: 14px;
  margin-bottom: 4px;
}

.w-app-empty small {
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .w-mail-split,
  .w-sms-split {
    grid-template-columns: 1fr;
  }
  .w-mail-reader,
  .w-sms-thread {
    border-top: 1px solid #eceff3;
    min-height: 220px;
  }
}

.wedding-menu-hero,
.wedding-ledger-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.wedding-menu-hero > div,
.wedding-runbook-list li {
  border: 1px solid #dceae6;
  border-radius: 12px;
  background: #fff;
}

.wedding-menu-hero > div {
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.wedding-menu-hero span {
  font-size: 11px;
  color: #7a8a86;
}

.wedding-menu-hero b {
  font-size: 16px;
  color: #14201d;
}

.wedding-menu-dishes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.wedding-menu-dishes li {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--agent-teal-soft, #e8f7f4);
  color: var(--agent-teal-deep, #3d9b8a);
  font-size: 13px;
  font-weight: 600;
}

.wedding-runbook-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.wedding-runbook-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.wedding-runbook-list li em {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  background: #eef5f3;
  color: #5a6d68;
}

.wedding-runbook-list li.is-done {
  border-color: #b9ddd6;
  background: #f3fbf9;
}

.wedding-runbook-list li.is-done em {
  background: var(--agent-teal, #5fbfb0);
  color: #fff;
}

.wedding-runbook-list li b {
  font-size: 11px;
  font-weight: 700;
  color: #7a8a86;
}

.wedding-runbook-list li.is-done b {
  color: var(--agent-teal-deep, #3d9b8a);
}

.wedding-runbook-handoff {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #14201d;
  color: #e8f7f4;
  font-size: 12px;
  line-height: 1.45;
}

.wedding-closeout-board {
  padding: 14px 16px 18px;
}

.wedding-closeout-focus {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #dceae6;
  background: #f7fbfa;
  display: grid;
  gap: 4px;
}

.wedding-closeout-focus.is-live {
  border-color: #8ecfc3;
  background: linear-gradient(180deg, #eefaf7, #f7fbfa);
}

.wedding-closeout-focus span {
  font-size: 11px;
  font-weight: 700;
  color: #5a6d68;
  letter-spacing: 0.02em;
}

.wedding-closeout-focus strong {
  font-size: 15px;
  color: #14201d;
}

.wedding-closeout-focus p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #5a6d68;
}

.wedding-closeout-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.wedding-closeout-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #dceae6;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.wedding-closeout-list li em {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  background: #eef5f3;
  color: #5a6d68;
}

.wedding-closeout-list li div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wedding-closeout-list li strong {
  font-size: 13px;
  color: #14201d;
}

.wedding-closeout-list li small {
  font-size: 11px;
  color: #7a8a86;
  line-height: 1.35;
}

.wedding-closeout-list li b {
  font-size: 11px;
  font-weight: 700;
  color: #7a8a86;
  white-space: nowrap;
}

.wedding-closeout-list li.is-active {
  border-color: #8ecfc3;
  box-shadow: 0 0 0 1px rgba(95, 191, 176, 0.25);
}

.wedding-closeout-list li.is-done {
  border-color: #b9ddd6;
  background: #f3fbf9;
}

.wedding-closeout-list li.is-done em {
  background: var(--agent-teal, #5fbfb0);
  color: #fff;
}

.wedding-closeout-list li.is-done b {
  color: var(--agent-teal-deep, #3d9b8a);
}

.wedding-closeout-list li.is-flash {
  transform: translateY(-1px);
  border-color: #5fbfb0;
  background: #e8f7f4;
}

.wedding-closeout-done {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #14201d;
  color: #e8f7f4;
  font-size: 12px;
  line-height: 1.45;
}

.ecom-app-msg.is-scam .ecom-app-bubble {
  border-color: #f0c9a8;
  background: #fff6ef;
}

@media (max-width: 1100px) {
  .wedding-body-manus {
    grid-template-columns: 1fr;
  }
  .wedding-comms-app {
    min-height: 280px;
  }
}

.wedding-comms-contact img.wedding-comms-avatar,
.ecom-comms-contact img.wedding-comms-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 36px;
  background: #eef5f3;
}

.wedding-files-board, .wedding-web-board { padding: 14px 16px 18px; }
.wedding-files-list { list-style:none; margin:12px 0 0; padding:0; display:grid; gap:8px; }
.wedding-file-row {
  display:grid; grid-template-columns:52px minmax(0,1fr); gap:10px; align-items:start;
  padding:12px 14px; border:1px solid #dceae6; border-radius:12px; background:#fff;
}
.wedding-file-row.is-hot { border-color:#5fbfb0; background:#f3fbf9; }
.wedding-file-row em {
  font-style:normal; font-size:10px; font-weight:800; color:#3d9b8a;
  background:#e8f7f4; border-radius:8px; padding:6px 0; text-align:center;
}
.wedding-file-row strong { display:block; font-size:13px; color:#14201d; }
.wedding-file-row small { color:#7a8a86; font-size:11px; }
.wedding-file-row p { margin:6px 0 0; font-size:12px; color:#5a6d68; line-height:1.4; }
.wedding-web-chrome {
  display:flex; align-items:center; gap:6px; padding:8px 10px; margin-top:10px;
  border:1px solid #dceae6; border-radius:10px 10px 0 0; background:#f4f7f6;
}
.wedding-web-chrome i { width:8px; height:8px; border-radius:50%; background:#c9d6d2; }
.wedding-web-chrome em { font-style:normal; font-size:11px; color:#7a8a86; margin-left:6px; }
.wedding-web-body {
  border:1px solid #dceae6; border-top:0; border-radius:0 0 10px 10px;
  padding:14px; background:#fff; display:grid; gap:10px;
}
.wedding-web-body.is-mismatch { background:#fff8f3; border-color:#f0c9a8; }
.wedding-web-body p { margin:0; display:flex; justify-content:space-between; gap:12px; font-size:13px; }
.wedding-web-body span { color:#7a8a86; }
.wedding-web-note { font-size:12px !important; color:#8a5a3a !important; display:block !important; }
.wedding-calendar-list li.is-unavailable { opacity:.55; text-decoration:line-through; }

/* ===== Apple-like Ledger / Calendar apps ===== */
.w-ledger-app,
.w-cal-app {
  --w-app-bg: #f2f2f7;
  --w-app-card: #ffffff;
  --w-app-ink: #1c1c1e;
  --w-app-muted: #8e8e93;
  --w-app-line: rgba(60, 60, 67, 0.12);
  --w-app-blue: #007aff;
  --w-app-green: #34c759;
  --w-app-orange: #ff9500;
  --w-app-red: #ff3b30;
  --w-app-radius: 16px;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px 14px;
  overflow: auto;
  background:
    linear-gradient(180deg, #fafafa 0%, var(--w-app-bg) 120px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  color: var(--w-app-ink);
  -webkit-font-smoothing: antialiased;
}

.w-app-nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.w-app-nav > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.w-app-nav strong {
  font-size: 28px;
  font-weight: 740;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.w-app-nav span {
  color: var(--w-app-muted);
  font-size: 13px;
  font-weight: 500;
}

.w-app-nav-chip {
  flex: 0 0 auto;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(60, 60, 67, 0.08);
  color: var(--w-app-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.w-app-nav-chip.is-accent {
  background: rgba(0, 122, 255, 0.12);
  color: var(--w-app-blue);
}

.w-ledger-app {
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.w-ledger-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 14px;
  align-items: center;
  padding: 18px 18px 16px;
  border-radius: var(--w-app-radius);
  background: var(--w-app-card);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
}

.w-ledger-balance {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.w-ledger-balance > span {
  color: var(--w-app-muted);
  font-size: 13px;
  font-weight: 600;
}

.w-ledger-balance > b {
  font-size: 34px;
  font-weight: 720;
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.w-ledger-balance > small {
  color: var(--w-app-muted);
  font-size: 12px;
  font-weight: 500;
}

.w-ledger-ring {
  --pct: 0;
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    conic-gradient(var(--w-app-blue) calc(var(--pct) * 1%), rgba(60, 60, 67, 0.12) 0);
  display: grid;
  place-items: center;
}

.w-ledger-ring i {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.w-ledger-ring em {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.w-ledger-meter {
  height: 6px;
  border-radius: 999px;
  background: rgba(60, 60, 67, 0.1);
  overflow: hidden;
}

.w-ledger-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5ac8fa, var(--w-app-blue));
  transition: width 0.35s ease;
}

.w-ledger-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.w-ledger-stats article {
  display: grid;
  gap: 4px;
  padding: 12px 12px 11px;
  border-radius: 14px;
  background: var(--w-app-card);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.w-ledger-stats span {
  color: var(--w-app-muted);
  font-size: 11px;
  font-weight: 600;
}

.w-ledger-stats b {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.w-ledger-stats b.is-warn {
  color: var(--w-app-red);
}

.w-ledger-group {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: var(--w-app-radius);
  background: var(--w-app-card);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.w-ledger-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  color: var(--w-app-muted);
  font-size: 12px;
  font-weight: 650;
  text-transform: none;
}

.w-ledger-group ul {
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
  overflow: auto;
  min-height: 0;
}

.w-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--w-app-line);
}

.w-ledger-row:last-child {
  border-bottom: 0;
}

.w-ledger-row.is-flash {
  animation: wLedgerFlash 0.7s ease;
}

@keyframes wLedgerFlash {
  from { background: rgba(0, 122, 255, 0.1); }
  to { background: transparent; }
}

.w-ledger-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.w-ledger-row-main strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w-ledger-row-main small {
  color: var(--w-app-muted);
  font-size: 12px;
}

.w-ledger-row-side {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.w-ledger-row-side b {
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.w-ledger-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: rgba(60, 60, 67, 0.08);
  color: var(--w-app-muted);
}

.w-ledger-pill.is-paid {
  background: rgba(52, 199, 89, 0.14);
  color: #248a3d;
}

.w-ledger-pill.is-auth {
  background: rgba(255, 149, 0, 0.16);
  color: #c93400;
}

.w-ledger-pill.is-planned {
  background: rgba(0, 122, 255, 0.12);
  color: var(--w-app-blue);
}

.w-cal-app {
  grid-template-rows: auto minmax(0, 1fr);
}

.w-cal-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(240px, 0.9fr);
  gap: 12px;
}

.w-cal-month,
.w-cal-agenda {
  min-height: 0;
  border-radius: var(--w-app-radius);
  background: var(--w-app-card);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 0 10px 28px rgba(15, 23, 42, 0.04);
}

.w-cal-month {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: 14px 14px 12px;
  gap: 8px;
}

.w-cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.w-cal-toolbar strong {
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.w-cal-toolbar button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(60, 60, 67, 0.08);
  color: var(--w-app-blue);
  font-size: 18px;
  line-height: 1;
  opacity: 0.55;
}

.w-cal-weekdays,
.w-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.w-cal-weekdays span {
  text-align: center;
  color: var(--w-app-muted);
  font-size: 11px;
  font-weight: 650;
  padding: 4px 0;
}

.w-cal-weekdays span:first-child,
.w-cal-weekdays span:last-child {
  color: var(--w-app-red);
}

.w-cal-grid {
  align-content: start;
  gap: 4px 2px;
  min-height: 0;
}

.w-cal-day {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 3px;
  min-height: 42px;
  padding-top: 4px;
  border-radius: 12px;
}

.w-cal-day.is-blank {
  visibility: hidden;
}

.w-cal-day b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

.w-cal-day.is-fixed b {
  color: #fff;
  background: var(--w-app-red);
  font-weight: 720;
  box-shadow: 0 6px 14px rgba(255, 59, 48, 0.28);
}

.w-cal-dots {
  display: flex;
  gap: 3px;
  justify-content: center;
  min-height: 5px;
}

.w-cal-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--w-app-blue);
}

.w-cal-dots i.is-fixed {
  background: var(--w-app-red);
}

.w-cal-dots i.is-unavailable {
  background: var(--w-app-orange);
}

.w-cal-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 0;
  color: var(--w-app-muted);
  font-size: 11px;
}

.w-cal-legend > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 4px;
}

.w-cal-legend > span.is-fixed {
  background: var(--w-app-red);
}

.w-cal-legend > span.is-event {
  background: var(--w-app-blue);
}

.w-cal-agenda {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.w-cal-agenda > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.w-cal-agenda > header strong {
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.w-cal-agenda > header span {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(60, 60, 67, 0.1);
  color: var(--w-app-muted);
  font-size: 12px;
  font-weight: 700;
}

.w-cal-agenda ol {
  list-style: none;
  margin: 0;
  padding: 4px 10px 12px;
  overflow: auto;
  min-height: 0;
  display: grid;
  gap: 6px;
  align-content: start;
}

.w-cal-event {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 14px;
  background: #f7f7f9;
}

.w-cal-event.is-fixed {
  background: rgba(255, 59, 48, 0.08);
}

.w-cal-event.is-unavailable {
  opacity: 0.62;
}

.w-cal-event-date {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 6px 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--w-app-line);
}

.w-cal-event.is-fixed .w-cal-event-date {
  background: var(--w-app-red);
  color: #fff;
  box-shadow: none;
}

.w-cal-event-date small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--w-app-muted);
}

.w-cal-event.is-fixed .w-cal-event-date small {
  color: rgba(255, 255, 255, 0.82);
}

.w-cal-event-date b {
  font-size: 18px;
  font-weight: 740;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.w-cal-event-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.w-cal-event-body strong {
  font-size: 14px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w-cal-event-body span {
  color: var(--w-app-muted);
  font-size: 12px;
}

.w-cal-event.is-unavailable .w-cal-event-body strong,
.w-cal-event.is-unavailable .w-cal-event-body span {
  text-decoration: line-through;
}

@media (max-width: 1180px) {
  .w-cal-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(220px, 1fr);
  }
  .w-app-nav strong {
    font-size: 24px;
  }
  .w-ledger-balance > b {
    font-size: 28px;
  }
}

/* Wedding IM thinking + tool cards */
.wedding-think-card,
.wedding-tool-card {
  max-width: min(92%, 520px);
  border: 1px solid #dceae6;
  border-radius: 14px;
  background: #f7fbfa;
  overflow: hidden;
}

.wedding-think-card-head,
.wedding-tool-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #e5efec;
  color: #3d9b8a;
  font-size: 11px;
  font-weight: 750;
}

.wedding-think-card-head i,
.wedding-tool-card-head .spin {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5fbfb0;
  box-shadow: 0 0 0 4px rgba(95, 191, 176, 0.18);
}

.wedding-tool-card-head .spin {
  border: 2px solid rgba(95, 191, 176, 0.25);
  border-top-color: #3d9b8a;
  background: transparent;
  animation: weddingToolSpin 0.8s linear infinite;
}

@keyframes weddingToolSpin {
  to { transform: rotate(360deg); }
}

.wedding-think-card p {
  margin: 0;
  padding: 10px 12px 12px;
  color: #445854;
  font-size: 12px;
  line-height: 1.55;
}

.wedding-tool-card-head code {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f7f4;
  color: #2f6f64;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.wedding-tool-card-body {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
}

.wedding-tool-why {
  margin: 0;
  color: #5a6d68;
  font-size: 12px;
  line-height: 1.45;
}

.wedding-tool-args {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5efec;
  color: #314540;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-word;
}

.wedding-tool-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.wedding-tool-steps li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: #7a8a86;
  font-size: 11px;
}

.wedding-tool-steps li i {
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border-radius: 50%;
  border: 1.5px solid #c9d6d2;
  background: #fff;
}

.wedding-tool-steps li.is-done {
  color: #2f6f64;
}

.wedding-tool-steps li.is-done i {
  border-color: #3d9b8a;
  background: #3d9b8a;
  box-shadow: inset 0 0 0 2px #fff;
}

.wedding-tool-steps li.is-active {
  color: #1c2422;
  font-weight: 650;
}

.wedding-tool-steps li.is-active i {
  border-color: #5fbfb0;
  background: #5fbfb0;
  box-shadow: 0 0 0 3px rgba(95, 191, 176, 0.2);
}

.wedding-tool-next {
  margin: 0;
  color: #3d9b8a;
  font-size: 11px;
  font-weight: 650;
}

.wedding-tool-check {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.wedding-tool-check.is-ok {
  background: #34c759;
}

.wedding-tool-check.is-bad {
  background: #ff3b30;
}

.wedding-tool-card.is-done {
  background: #f3fbf9;
}

.wedding-tool-card.is-failed {
  background: #fff7f5;
  border-color: #f0c9bc;
}

.wedding-log-bullet.is-think {
  background: #5fbfb0;
}

.wedding-log-bullet.is-tool {
  background: #0a84ff;
}

.wedding-stream-item.kind-thinking .wedding-message-stack,
.wedding-stream-item.kind-tool .wedding-message-stack {
  max-width: min(94%, 560px);
}
