:root {
  --surface-app: #fff8f0;
  --surface-soft: #f9f6f2;
  --surface-card: #ffffff;
  --surface-accent-soft: #fff0ee;
  --text-primary: #0d1b2a;
  --text-muted: rgba(13, 27, 42, 0.55);
  --accent-primary: #f7687a;
  --accent-deep: #c23b2b;
  --accent-gold: #d4a032;
  --shadow-card: 0 3px 14px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface-app);
  color: var(--text-primary);
  font-family: "Plus Jakarta Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.coach-shell {
  min-height: 100dvh;
  padding: 20px;
}

.coach-hero,
.layout-grid {
  max-width: 1180px;
  margin: 0 auto;
}

.topbar,
.brand,
.locale-control,
.section-head,
.chat-input,
.voice-button,
.send-button,
.recipe-meta,
.coach-actions {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

.brand {
  gap: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  border-radius: 50%;
  background: var(--surface-accent-soft);
}

.locale-control {
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
}

.locale-control select {
  border: 1.5px solid rgba(13, 27, 42, 0.1);
  border-radius: 999px;
  background: var(--surface-card);
  color: var(--text-primary);
  padding: 9px 12px;
  font-weight: 800;
}

.hero-copy {
  max-width: 720px;
  padding-bottom: 20px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

#hero-subtitle {
  max-width: 590px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.6;
}

.safety-card,
.side-panel,
.chat-panel,
.recipe-card,
.transcript-preview {
  background: var(--surface-card);
  border: 1.5px solid rgba(13, 27, 42, 0.08);
  box-shadow: var(--shadow-card);
}

.safety-card {
  max-width: 1180px;
  margin: 14px auto 18px;
  border-radius: 18px;
  padding: 14px 16px;
}

.safety-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: var(--accent-deep);
}

.safety-card p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 18px;
}

.side-panel,
.chat-panel {
  border-radius: 22px;
  padding: 16px;
}

.side-panel {
  display: grid;
  gap: 20px;
  align-content: start;
}

.section-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: 13px;
  font-weight: 900;
}

.link-button {
  background: transparent;
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 900;
}

.mode-list,
.prompt-list,
.recent-list {
  display: grid;
  gap: 8px;
}

.mode-button,
.prompt-button,
.recent-item {
  width: 100%;
  border-radius: 15px;
  background: var(--surface-soft);
  color: var(--text-primary);
  padding: 11px 12px;
  text-align: left;
}

.mode-button strong,
.recent-item strong {
  display: block;
  font-size: 12px;
}

.mode-button small,
.recent-item small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.mode-button.active {
  background: var(--surface-accent-soft);
  color: var(--accent-primary);
  outline: 2px solid rgba(247, 104, 122, 0.22);
}

.prompt-button {
  border: 1.5px solid rgba(247, 104, 122, 0.16);
  background: white;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.chat-panel {
  min-height: 650px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 12px;
}

.message-list {
  min-height: 420px;
  max-height: 64dvh;
  overflow-y: auto;
  padding: 2px;
}

.message {
  max-width: 84%;
  margin-bottom: 12px;
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  animation: popIn 0.22s ease both;
}

.message.user {
  margin-left: auto;
  background: var(--accent-primary);
  color: white;
  border-bottom-right-radius: 5px;
}

.message.assistant {
  background: var(--surface-soft);
  border-bottom-left-radius: 5px;
}

.message.status {
  background: var(--surface-accent-soft);
  color: var(--accent-deep);
  font-weight: 800;
}

.recipe-card {
  max-width: 620px;
  margin: 8px 0 16px;
  border-radius: 20px;
  overflow: hidden;
}

.recipe-card-header {
  padding: 18px;
  background: #0d1b2a;
  color: white;
}

.recipe-card-header h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.recipe-meta {
  flex-wrap: wrap;
  gap: 7px;
}

.recipe-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
}

.recipe-body {
  padding: 16px 18px;
}

.recipe-body h4 {
  margin: 16px 0 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recipe-body li {
  margin-bottom: 8px;
  color: rgba(13, 27, 42, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.coach-actions {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.primary-button,
.secondary-button {
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 900;
}

.primary-button {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 16px rgba(247, 104, 122, 0.28);
}

.secondary-button {
  background: var(--surface-accent-soft);
  color: var(--accent-primary);
}

.transcript-preview {
  border-radius: 18px;
  padding: 14px;
}

.transcript-preview textarea,
.chat-input textarea {
  width: 100%;
  resize: none;
  border: 1.5px solid rgba(13, 27, 42, 0.1);
  border-radius: 16px;
  color: var(--text-primary);
  background: white;
  padding: 12px 13px;
}

.transcript-preview textarea {
  margin-bottom: 10px;
}

.chat-input {
  gap: 9px;
}

.voice-button {
  min-width: 106px;
  justify-content: center;
  gap: 7px;
  align-self: stretch;
  border-radius: 18px;
  background: var(--surface-accent-soft);
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 900;
}

.voice-button svg,
.send-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.voice-button[data-state="recording"] {
  background: var(--accent-deep);
  color: white;
}

.send-button {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 16px rgba(247, 104, 122, 0.32);
}

.hidden {
  display: none;
}

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

@media (max-width: 820px) {
  .coach-shell {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

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

  .side-panel {
    order: 2;
  }

  .chat-panel {
    min-height: 620px;
  }

  .message {
    max-width: 94%;
  }

  .chat-input {
    align-items: stretch;
  }

  .voice-button {
    min-width: 86px;
  }
}
