:root {
  --bg: #f6f0e6;
  --bg-2: #fffaf3;
  --surface: rgba(255,255,255,0.9);
  --surface-2: #fffefb;
  --ink: #162033;
  --muted: #677387;
  --line: rgba(22, 32, 51, 0.08);
  --yellow: #ffdb4d;
  --yellow-deep: #f3bc00;
  --navy: #17355f;
  --navy-soft: #edf4ff;
  --purple-soft: #f4efff;
  --purple-ink: #6047d3;
  --green-soft: #ebf8ef;
  --green: #258757;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Open Sans", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #fff1ad 0%, transparent 22%),
    radial-gradient(circle at top right, #f1e8ff 0%, transparent 18%),
    linear-gradient(180deg, var(--bg) 0%, #ece1d1 100%);
}
body, button { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button { font: inherit; }
.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.phone-wrap { position: relative; width: min(100vw - 32px, 390px); height: 780px; }
.device-shadow {
  position: absolute;
  inset: 28px 14px -12px;
  border-radius: 48px;
  background: rgba(20, 24, 33, 0.18);
  filter: blur(28px);
}
.phone-shell {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 10px;
  border-radius: 38px;
  background: linear-gradient(180deg, #20242d 0%, #090b10 100%);
  box-shadow: 0 28px 100px rgba(0,0,0,0.26);
}
.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 132px;
  height: 24px;
  border-radius: 0 0 16px 16px;
  background: #080a0f;
}
.screen {
  height: 100%;
  padding: 14px 14px 18px;
  border-radius: 29px;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-2) 0%, #f7efe2 100%);
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.statusbar, .appbar, .scene-head, .input-actions, .footer-actions, .progress-card, .feedback-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.statusbar { font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.status-icons { display: flex; gap: 6px; }
.appbar { margin-bottom: 14px; }
.appbar-copy { text-align: center; }
.appbar-copy p { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.appbar-copy strong { font-size: 14px; color: var(--navy); }
.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(23, 53, 95, 0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
  color: var(--navy);
  font-size: 18px;
}
.icon-button.ghost { font-size: 16px; }
.progress-card, .scene-card, .chat-card, .feedback-card {
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.92);
  box-shadow: 0 10px 28px rgba(42,49,69,0.08);
  margin-bottom: 12px;
}
.progress-card {
  padding: 16px;
  align-items: flex-start;
  background: linear-gradient(180deg, #fff7d4 0%, #fff1bc 100%);
  border-color: rgba(255, 219, 77, 0.4);
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--navy);
  font-weight: 800;
}
.eyebrow.soft { color: var(--purple-ink); }
.progress-copy h1, .feedback-card h2 {
  margin: 0 0 10px;
  font-family: "Fredoka", "Open Sans", system-ui, sans-serif;
  letter-spacing: -0.02em;
}
.progress-copy h1 { font-size: 27px; line-height: 1.05; }
.progress-copy p:last-child { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.progress-pill {
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
  text-align: center;
}
.progress-pill strong { display: block; font-size: 20px; }
.progress-pill span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.scene-card {
  padding: 14px 16px;
  background: rgba(255,255,255,0.82);
}
.scene-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}
.scene-tag.soft { background: var(--purple-soft); color: var(--purple-ink); }
.scene-text { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.chat-card {
  padding: 14px;
  background: linear-gradient(180deg, #fffdfa 0%, #fff8eb 100%);
}
.chat-bubble {
  max-width: 84%;
  padding: 12px 14px;
  border-radius: 18px 18px 18px 8px;
  background: white;
  border: 1px solid #f1e7d7;
}
.chat-bubble p { margin: 4px 0 0; line-height: 1.45; }
.speaker { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.coach-strip {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #f7f2ff;
  border: 1px solid #ebe2ff;
}
.coach-label { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--purple-ink); }
.coach-strip p { margin: 0; color: #40376b; line-height: 1.45; }
.reply-panel {
  margin-top: 12px;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid #f1e7d7;
}
.reply-label { margin: 0 0 8px; font-size: 12px; color: var(--muted); font-weight: 700; }
.reply-box {
  min-height: 72px;
  padding: 14px;
  border-radius: 18px;
  background: var(--navy);
  color: white;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip {
  min-height: 34px;
  padding: 7px 12px;
  border: none;
  border-radius: 999px;
  background: #f1f4f9;
  color: #3b4a61;
  font-weight: 700;
}
.chip.active { background: #fff1bc; color: #704d00; }
.input-actions { margin-top: 12px; justify-content: flex-start; }
.mini-btn {
  min-height: 40px;
  border: none;
  border-radius: 14px;
  padding: 10px 14px;
  background: #f4f6fa;
  color: var(--ink);
  font-weight: 700;
}
.mini-btn.record {
  background: var(--yellow);
  color: #4b3600;
}
.feedback-card {
  padding: 16px;
  align-items: flex-start;
  background: var(--green-soft);
  border-color: #d9f0e0;
}
.feedback-card h2 { font-size: 24px; line-height: 1.05; }
.feedback-card p { margin: 0; color: #3b6a4d; line-height: 1.45; }
.feedback-badge {
  white-space: nowrap;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(37, 135, 87, 0.12);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}
.footer-actions { margin-top: 2px; }
.cta {
  flex: 1;
  min-height: 54px;
  border: none;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 700;
}
.cta.primary {
  background: linear-gradient(180deg, var(--yellow) 0%, var(--yellow-deep) 100%);
  color: #4b3600;
  box-shadow: 0 10px 22px rgba(241, 187, 0, 0.26);
}
.cta.secondary {
  background: var(--navy-soft);
  color: var(--navy);
}
@media (max-width: 420px) {
  .progress-card { flex-direction: column; }
  .progress-pill { align-self: flex-start; }
  .footer-actions { flex-direction: column; }
  .cta { width: 100%; }
}
