:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #0e100d;
  --panel: #191c17;
  --panel2: #12140f;
  --border: #30362b;
  --text: #f5f1e6;
  --muted: #a8af9f;
  --accent: #ece2c9;
  --accentText: #151713;
  --green: #8ed56f;
  --yellow: #e8ca72;
  --danger: #ff9d9d;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 30% 0%, #252b20 0%, transparent 36%),
    linear-gradient(180deg, #11140f 0%, #0b0d0a 100%);
  color: var(--text);
}
button,input,select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.shell {
  width: min(920px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 56px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 20px;
}
.brand { letter-spacing: .24em; font-weight: 900; font-size: 14px; }
.tagline { margin-top: 4px; color: #7f8778; font-size: 12px; }
.panel {
  background: rgba(25, 28, 23, .97);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: clamp(22px, 4vw, 38px);
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
  margin-bottom: 14px;
}
.auth-panel { max-width: 620px; margin: 7vh auto 0; }
.eyebrow {
  color: #8d9585;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 800;
}
h1 {
  margin: 10px 0 14px;
  font-size: clamp(42px, 8vw, 72px);
  line-height: .98;
  letter-spacing: -.045em;
}
h2 { margin: 8px 0 10px; font-size: clamp(27px, 5vw, 38px); line-height: 1.08; }
.lead { color: #c8cdbf; font-size: 18px; line-height: 1.55; max-width: 680px; }
.muted { color: var(--muted); line-height: 1.5; }
.small { font-size: 13px; }
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 26px 0 18px;
  background: #10120f;
  padding: 5px;
  border-radius: 15px;
}
.tab {
  border: 0;
  padding: 11px;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}
.tab.active { background: #2a2f26; color: var(--text); }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
label { color: var(--muted); font-size: 13px; font-weight: 650; }
input, select {
  width: 100%;
  border: 1px solid #383e33;
  border-radius: 15px;
  background: #10120f;
  color: var(--text);
  padding: 14px 15px;
  outline: none;
}
input:focus, select:focus { border-color: #6d7763; box-shadow: 0 0 0 3px rgba(109,119,99,.12); }
.primary, .secondary, .ghost {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 850;
}
.primary { background: var(--accent); color: var(--accentText); }
.secondary { background: #343a30; color: var(--text); }
.ghost { background: #292e26; color: var(--text); }
button:disabled { opacity: .42; cursor: default; }
.wide { width: 100%; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid #343a30;
  border-radius: 18px;
  background: #12140f;
  color: var(--text);
}
.choice input { width: auto; accent-color: #d9ceb2; }
.choice strong { font-size: 15px; }
.choice span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.choice:has(input:checked) { border-color: #8d977e; background: #20251d; }
.dashboard-head, .voice-heading, .progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.progress-panel { padding-top: 24px; padding-bottom: 24px; }
#progressPercent { font-size: 28px; font-weight: 900; }
.progress-track {
  height: 10px;
  background: #0f110e;
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0 8px;
}
#progressFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7dc260, #c4d69e);
  border-radius: inherit;
  transition: width .35s ease;
}
.save-badge {
  font-size: 12px;
  color: #9aa290;
  background: #11130f;
  border: 1px solid #2c3128;
  border-radius: 999px;
  padding: 8px 11px;
}
.save-badge.saving { color: var(--yellow); }
.save-badge.saved { color: var(--green); }
.status {
  margin-top: 18px;
  background: #10120f;
  border: 1px solid #2b3027;
  border-radius: 18px;
  padding: 15px 17px;
}
.statusline { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #747b6f;
  box-shadow: 0 0 0 7px rgba(116,123,111,.08);
}
.dot.live { background: var(--green); box-shadow: 0 0 0 7px rgba(142,213,111,.10); }
.dot.talking { background: var(--yellow); box-shadow: 0 0 0 7px rgba(232,202,114,.10); }
.meta { color: #858d7e; font-size: 12px; margin-top: 6px; }
.controls { display: flex; gap: 10px; margin-top: 16px; }
.controls .primary { flex: 1; }
.settings, .diagnostics { margin-top: 15px; color: #8f9688; font-size: 13px; }
.settings summary, .diagnostics summary { cursor: pointer; }
.settings .field { margin: 12px 0 8px; }
.meter { height: 6px; margin: 16px 0 0; background: #0f110e; border-radius: 999px; overflow: hidden; }
#meterFill { width: 0; height: 100%; background: var(--green); transition: width .08s linear; }
.conversation-now { display: grid; gap: 10px; margin-top: 16px; }
.box { background: #12140f; border: 1px solid #292f26; border-radius: 16px; padding: 14px 16px; }
.box h3 { margin: 0 0 6px; color: #858d7e; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.box p { margin: 0; min-height: 22px; line-height: 1.48; }
.error { margin-top: 12px; color: var(--danger); white-space: pre-wrap; }
pre { white-space: pre-wrap; word-break: break-word; background: #0c0e0b; padding: 12px; border-radius: 12px; max-height: 260px; overflow: auto; }
.project-list { display: grid; gap: 10px; margin: 18px 0; }
.project-row {
  border: 1px solid #33392f;
  background: #12140f;
  color: var(--text);
  border-radius: 17px;
  padding: 16px;
  text-align: left;
}
.project-row strong { display: block; margin-bottom: 4px; }
.project-row span { color: var(--muted); font-size: 12px; }
@media (max-width: 700px) {
  .shell { width: min(100% - 18px, 920px); padding-top: 10px; }
  .panel { border-radius: 22px; padding: 20px; }
  .choice-grid, .two-col { grid-template-columns: 1fr; }
  .dashboard-head, .voice-heading { align-items: flex-start; }
  .controls { flex-direction: column; }
  .topbar .tagline { display: none; }
}

.gift-panel { max-width: 720px; margin: 4vh auto 0; }
.gift-panel h1 { max-width: 680px; font-size: clamp(38px, 7vw, 62px); }
.gift-notice {
  display: grid;
  gap: 3px;
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid #59634f;
  border-radius: 14px;
  background: #20261c;
}
.gift-notice strong { color: var(--text); }
.gift-notice span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.gift-card-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0 12px;
}
.gift-card-info > div {
  display: grid;
  gap: 4px;
  padding: 15px;
  border: 1px solid #33392f;
  border-radius: 16px;
  background: #11130f;
}
.gift-message {
  margin: 12px 0;
  padding: 16px;
  border-left: 3px solid #8d977e;
  background: #151812;
  border-radius: 0 14px 14px 0;
}
.gift-message p { margin: 7px 0 0; line-height: 1.5; }
.gift-entitlement {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 17px;
  border: 1px solid #343a30;
  border-radius: 18px;
  background: #12140f;
}
.gift-entitlement span {
  color: var(--muted);
  font-size: 14px;
}
.gift-entitlement span::before {
  content: "✓";
  color: var(--green);
  margin-right: 9px;
  font-weight: 900;
}
.gift-actions { margin-top: 18px; }
#giftAuthedActions { display: grid; gap: 14px; margin-top: 20px; }
@media (max-width: 700px) {
  .gift-card-info { grid-template-columns: 1fr; }
}
