:root {
  color-scheme: light;
  --ink: #18201d;
  --muted: #66736d;
  --line: #d8dfda;
  --paper: #fbfcf9;
  --panel: #ffffff;
  --sage: #dbe9df;
  --teal: #0d766e;
  --teal-dark: #095c56;
  --amber: #f4c95d;
  --blue: #d9e8ff;
  --rose: #f6dddd;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(219, 233, 223, 0.72), rgba(251, 252, 249, 0.96) 38%),
    var(--paper);
  color: var(--ink);
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 20px 24px;
}

.screen {
  display: flex;
  min-height: calc(100vh - 52px);
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.mark {
  color: var(--ink);
  font-size: 1.18rem;
}

.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(24, 32, 29, 0.08);
}

.hero {
  padding: 26px 22px;
}

.panel {
  padding: 18px;
}

.headline {
  margin: 0;
  font-size: clamp(2rem, 10vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.subhead {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

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

.fact {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 650;
}

.fact::before {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--teal);
  content: "";
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.button {
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button-primary {
  background: var(--teal);
  color: #ffffff;
}

.button-primary:hover:not(:disabled) {
  background: var(--teal-dark);
}

.button-secondary {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.button-danger {
  border-color: #d98d8d;
  background: var(--rose);
  color: #7d2424;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
}

.progress-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  height: 7px;
  margin-top: 12px;
}

.progress-step {
  border-radius: 999px;
  background: #d6ddd9;
}

.progress-step.is-active,
.progress-step.is-complete {
  background: var(--teal);
}

.sentence-card {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 24px 18px;
  text-align: center;
}

.sentence {
  margin: 0;
  font-size: clamp(1.8rem, 8vw, 2.55rem);
  font-weight: 850;
  line-height: 1.16;
  letter-spacing: 0;
}

.record-area {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.record-button {
  width: 136px;
  height: 136px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
}

.record-button.is-recording {
  background: #b33838;
}

.status {
  min-height: 24px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.status-error {
  color: #8e2d2d;
}

.spinner {
  width: 72px;
  height: 72px;
  margin: 26vh auto 18px;
  border: 8px solid var(--sage);
  border-top-color: var(--teal);
  border-radius: 999px;
  animation: spin 1s linear infinite;
}

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

.center {
  text-align: center;
}

.profile {
  display: grid;
  gap: 9px;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

.profile-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.profile-row.is-focus {
  color: var(--ink);
  font-weight: 850;
}

.status-pill {
  border-radius: 999px;
  background: var(--blue);
  padding: 5px 9px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.comparison {
  display: grid;
  gap: 14px;
}

.flow-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--paper);
}

.flow-block.is-natural {
  border-color: #a7cbbd;
  background: #eef7f2;
}

.block-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.block-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.play-button {
  min-width: 70px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 800;
}

.flow-text {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 820;
  line-height: 1.42;
}

.coach-note {
  border-left: 5px solid var(--amber);
}

.coach-note p {
  margin: 0 0 10px;
  line-height: 1.45;
}

.coach-note p:last-child {
  margin-bottom: 0;
}

.agreement {
  display: grid;
  gap: 10px;
}

.agreement-question {
  margin: 0;
  font-weight: 850;
}

.agreement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.confirmation {
  display: grid;
  min-height: 48vh;
  place-items: center;
  text-align: center;
}

.confirmation p {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1.28;
}

@media (max-width: 360px) {
  .app-shell {
    padding-inline: 14px;
  }

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