:root {
  --ink: #17352e;
  --paper: #f4f0e6;
  --card: #fffdf7;
  --accent: #e25d3f;
  --lime: #c8d95b;
  --line: rgba(23, 53, 46, 0.16);
  --muted: #6e776f;
  --shadow: 0 24px 60px rgba(35, 51, 43, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 3%, rgba(200, 217, 91, 0.27), transparent 30rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, audio { font: inherit; }
button { color: inherit; }

.shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50% 50% 44% 56%;
  color: var(--paper);
  background: var(--ink);
  font-family: Georgia, serif;
  font-size: 20px;
  font-style: italic;
}

.date-block { display: flex; gap: 8px; align-items: baseline; font-size: 11px; letter-spacing: 0.13em; }
.date-block strong { font-size: 12px; }

.hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: end;
  padding: 64px 0 52px;
}

.eyebrow, .section-index {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.hero h1 em { color: var(--accent); font-weight: 500; }
.hero-note { margin: 0 0 6px; color: var(--muted); line-height: 1.8; }

.practice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.passage-card, .recorder-card, .result-panel {
  border: 1px solid rgba(23, 53, 46, 0.09);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.passage-card { padding: clamp(28px, 5vw, 58px); }
.card-heading, .result-title { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.card-heading h2, .result-title h2 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }

.icon-button {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.icon-button:hover { background: var(--paper); }
.speaker-icon { color: var(--accent); font-size: 11px; }

blockquote {
  margin: 48px 0 30px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3vw, 42px);
  line-height: 1.36;
  letter-spacing: -0.025em;
}

.translation {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.8;
}

.recorder-card {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  padding: 34px;
  background: var(--ink);
  color: var(--paper);
}

.recorder-card .section-index { color: var(--lime); }
.recorder-state { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; }
.recorder-state h2 { margin: 24px 0 8px; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.recorder-state p { margin: 0; color: rgba(244, 240, 230, 0.6); font-size: 13px; }
.recorder-state time { margin-top: 16px; color: var(--lime); font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }

.record-orbit {
  display: grid;
  width: 114px;
  height: 114px;
  place-items: center;
  border: 1px solid rgba(200, 217, 91, 0.35);
  border-radius: 50%;
}

.record-button {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 10px rgba(226, 93, 63, 0.12);
}

.record-button span { width: 25px; height: 25px; border-radius: 50%; background: #fff8ee; transition: 180ms ease; }
.is-recording .record-button span { width: 23px; height: 23px; border-radius: 5px; }
.is-recording .record-orbit { animation: pulse 1.5s infinite; }

@keyframes pulse {
  50% { box-shadow: 0 0 0 18px rgba(200, 217, 91, 0.08); }
}

.waveform { display: flex; height: 34px; gap: 4px; align-items: center; justify-content: center; }
.waveform i { width: 3px; height: 6px; border-radius: 4px; background: rgba(244, 240, 230, 0.2); transition: height 80ms linear; }
.is-recording .waveform i { background: var(--lime); }

.recorder-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.primary-button, .secondary-button {
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
}
.primary-button { color: var(--ink); background: var(--lime); }
.secondary-button { color: var(--paper); background: rgba(255,255,255,0.1); }
button:disabled { cursor: not-allowed; opacity: 0.42; }
.privacy-note { margin: 15px 0 0; color: rgba(244,240,230,.42); font-size: 10px; text-align: center; }

.result-panel { margin-top: 18px; padding: clamp(28px, 5vw, 52px); }
.total-score { display: flex; align-items: baseline; color: var(--accent); }
.total-score strong { font-family: Georgia, serif; font-size: 72px; font-weight: 500; line-height: 0.9; }
.total-score span { color: var(--muted); font-size: 13px; }

.score-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 48px; }
.score-item > div:first-child { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 13px; }
.score-track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--paper); }
.score-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width 650ms cubic-bezier(.2,.8,.2,1); }

.correction-box { margin-top: 42px; padding-top: 28px; border-top: 1px solid var(--line); }
.correction-box h3 { margin: 0 0 16px; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.correction-list { display: flex; flex-wrap: wrap; gap: 10px; }
.correction-list p { margin: 0; color: var(--muted); }
.correction-chip { padding: 10px 13px; border-radius: 12px; background: var(--paper); font-size: 13px; }
.correction-chip strong { color: var(--accent); }

.toast {
  position: fixed;
  z-index: 10;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100% - 48px));
  padding: 14px 18px;
  border-radius: 13px;
  color: var(--paper);
  background: #1f302b;
  box-shadow: var(--shadow);
  font-size: 14px;
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 48px; }
  .hero-note { max-width: 460px; }
  .practice-grid { grid-template-columns: 1fr; }
  .score-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 24px, 1160px); padding-top: 18px; }
  .hero { padding: 40px 5px 36px; }
  .hero h1 { font-size: 52px; }
  .passage-card, .recorder-card, .result-panel { border-radius: 20px; }
  .card-heading, .result-title { flex-direction: column; }
  blockquote { margin-top: 36px; font-size: 27px; }
  .recorder-card { min-height: 480px; padding: 28px 22px; }
  .score-list { grid-template-columns: 1fr; }
  .total-score strong { font-size: 62px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
