@font-face {
  font-family: Montserrat;
  src: url('/fonts/Montserrat-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url('/fonts/Montserrat-SemiBold.ttf') format('truetype');
  font-weight: 600 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --page: #faf8f2;
  --panel: #fffdf8;
  --soft: #f1ece1;
  --line: #ddd6c8;
  --text: #33332b;
  --muted: #786c59;
  --brand: #c13b16;
  --accent: #fa4616;
  --success: #236744;
  --danger: #a83732;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font:
    16px/1.5 Montserrat,
    sans-serif;
  -webkit-text-size-adjust: 100%;
}
button,
input,
summary {
  font: inherit;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font:
    400 36px/44px Georgia,
    'Times New Roman',
    serif;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
}
.top-nav,
.topbar {
  min-height: 80px;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.brand-logo {
  display: block;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
}
.status-pill,
.status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.status-dot,
.dot {
  width: 7px;
  height: 7px;
  background: var(--line);
  border-radius: 50%;
}
.status-dot.connected,
.dot.connected {
  background: var(--success);
}
.status-dot.connecting,
.dot.connecting {
  background: var(--accent);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn,
.icon-btn,
.cart-close-btn {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover,
.icon-btn:hover {
  background: var(--soft);
}
.btn-primary,
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover,
.btn.primary:hover {
  background: #a93213;
}
.btn-danger {
  color: var(--danger);
}
.icon-btn {
  width: 48px;
  padding: 12px;
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.mic-toggle-btn.muted {
  color: var(--danger);
  background: #f9e9e4;
}
#disconnectBtn:disabled {
  display: none;
}
.content-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 352px;
  gap: 24px;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 32px 32px;
}
.content-area > main {
  min-width: 0;
}
.stage {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: clamp(480px, calc(100dvh - 238px), 640px);
}
.hero-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 24px;
  text-align: center;
}
.hero-copy {
  max-width: 360px;
}
.hero-copy p {
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
  margin-top: 8px;
}
.hero-actions {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
}
.hero-note {
  font-size: 12px;
  color: var(--muted);
}
.cart-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  min-width: 0;
  height: clamp(480px, calc(100dvh - 238px), 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cart-panel-header {
  padding: 24px;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.cart-count {
  min-width: 24px;
  height: 24px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}
.cart-content {
  padding: 0 24px;
  min-height: 0;
  flex: 1;
  overflow: auto;
}
.cart-empty {
  padding: 48px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}
.cart-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.cart-item-price {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cart-item-options,
.cart-item-special,
.cart-item-incomplete-info {
  grid-column: 1 / -1;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.cart-item-badge {
  display: inline-block;
  margin: 4px 0;
  padding: 2px 6px;
  color: #805c16;
  background: #f6edd8;
  border-radius: 4px;
  font-size: 11px;
}
.cart-summary {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-summary-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.cart-summary-label {
  color: var(--muted);
}
.cart-close-btn,
.cart-toggle-btn {
  display: none;
}
.session-panel {
  display: none;
}
.session-panel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.visualizer-row {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
}
.visualizer-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.visualizer-label {
  font-size: 12px;
  font-weight: 600;
}
.audio-visualizer {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  overflow: hidden;
}
.bar {
  background: #b4ad9e;
  width: 3px;
  max-height: 32px;
  border-radius: 2px;
  flex-shrink: 1;
}
.agent-visualizer .bar {
  background: var(--accent);
}
.transcript {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: smooth;
}
.transcript-entry,
.message {
  width: fit-content;
  max-width: 88%;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 18px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.transcript-entry::before,
.message::before {
  content: attr(data-speaker);
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--muted);
}
.transcript-entry.user,
.message.user {
  margin-left: auto;
  background: var(--soft);
  border-color: transparent;
}
.transcript-entry.system,
.message.system {
  display: none;
}
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}
input {
  min-height: 48px;
  min-width: 0;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 16px;
}
input::placeholder {
  color: var(--muted);
}
.chat-input {
  flex: 1;
}
.settings-backdrop,
.cart-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: #17171466;
  z-index: 30;
}
.settings-backdrop.visible {
  display: block;
}
.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--panel);
  z-index: 40;
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.18s ease;
  overflow: auto;
}
.settings-panel.open {
  transform: translateX(0);
  visibility: visible;
}
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.settings-header p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.settings-body {
  padding: 24px;
  display: grid;
  gap: 24px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.settings-card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}
.settings-card-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.notice {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 16px;
  background: #f6edd8;
  border: 1px solid #dfcda7;
  color: #674910;
  border-radius: 6px;
  font-size: 14px;
}
/* Support uses the same visitor-facing shell; operator setup is collapsed. */
.support-test main {
  display: grid;
  grid-template-columns: 352px minmax(0, 1fr);
  gap: 32px;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 32px;
}
.setup h1 {
  font-size: 36px;
  line-height: 44px;
}
.setup-copy {
  font-size: 14px;
  color: var(--muted);
  margin-top: 24px;
  max-width: 320px;
}
.session-settings {
  margin-top: 32px;
}
.session-settings summary {
  cursor: pointer;
  font-size: 12px;
  min-height: 44px;
  padding: 12px 0;
  color: var(--muted);
}
.actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.actions #connectBtn {
  flex-basis: 100%;
}
.actions #clearBtn {
  padding-inline: 0;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-size: 12px;
}
.meters {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}
.meter-label {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
#micLevelText,
#agentLevelText {
  display: none;
}
.meter {
  height: 4px;
  margin-top: 8px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  width: 0;
  background: #b4ad9e;
}
.meter-fill.agent {
  background: var(--accent);
}
.conversation {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 200px);
  min-height: 480px;
}
.conversation-head {
  min-height: 74px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.conversation .transcript {
  padding: 24px;
}
.empty {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 100px 16px;
}
/* Access page shares the same typography, logo and controls. */
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
}
.login-card .brand {
  margin-bottom: 48px;
}
.login-card h1 {
  font-size: 32px;
  line-height: 40px;
  margin-bottom: 12px;
}
.login-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}
.login-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.login-card .btn {
  width: 100%;
  margin-top: 16px;
}
.login-card .err {
  color: var(--danger);
  margin: 16px 0 0;
}
@media (max-width: 1050px) {
  .content-area {
    grid-template-columns: minmax(0, 1fr) 288px;
  }
}
@media (max-width: 760px) {
  .top-nav,
  .topbar {
    padding: 16px;
    min-height: 80px;
    gap: 12px;
  }
  .status-pill,
  .status {
    order: 3;
    width: 100%;
    margin: 0;
  }
  .nav-actions {
    margin-left: auto;
  }
  .page-intro {
    padding: 24px 16px;
  }
  h1 {
    font-size: 28px;
    line-height: 36px;
  }
  .content-area {
    display: block;
    padding: 0 16px 24px;
  }
  .stage {
    height: max(440px, calc(100dvh - 252px));
  }
  .hero-panel {
    padding: 24px 16px;
  }
  .hero-copy .welcome-line {
    font-size: 18px;
    line-height: 26px;
  }
  .cart-toggle-btn {
    display: flex;
    width: auto;
  }
  .cart-panel {
    display: none;
  }
  .cart-panel.open {
    display: flex;
    position: fixed;
    z-index: 40;
    inset: 0 0 0 auto;
    width: min(380px, 100%);
    height: 100dvh;
    border-radius: 0;
  }
  .cart-panel.open + .cart-backdrop.visible {
    display: block;
  }
  .cart-close-btn {
    display: inline-flex;
    margin-left: auto;
    width: 48px;
    padding: 0;
  }
  .transcript-entry,
  .message {
    max-width: 100%;
    font-size: 16px;
    padding: 12px 16px;
  }
  .transcript {
    padding: 16px;
  }
  .conversation-head,
  .cart-panel-header {
    padding: 16px;
    min-height: 60px;
  }
  .visualizer-row {
    gap: 16px;
    padding: 12px 16px;
  }
  .visualizer-container {
    gap: 8px;
  }
  .chat-input-row {
    padding: 16px;
  }
  .support-test main {
    display: block;
    padding: 24px 16px;
  }
  .setup {
    margin-bottom: 24px;
  }
  .support-test .conversation {
    height: 60dvh;
  }
}
@media (max-width: 540px) {
  .top-nav .nav-actions {
    margin: 0;
    width: 100%;
  }
  .top-nav .status-pill {
    width: auto;
    margin-left: auto;
    order: 0;
  }
  .top-nav .nav-actions #settingsBtn {
    margin-left: auto;
  }
  .chat-input-row {
    flex-wrap: wrap;
  }
  .chat-input {
    width: calc(100% - 56px);
  }
  .chat-send-btn {
    margin-left: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* Match components/ui/dinevate-logo.tsx, including its original wordmark typography. */
.brand-wordmark {
  font-family: Montserrat, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #000;
}

.page-intro {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 32px 32px 24px;
}
.page-intro p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

.hero-copy .welcome-line {
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  margin: 0;
}

.cart-item-quantity {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
