:root {
  color-scheme: dark;
  --bg: #06111f;
  --panel: #0b1d31;
  --panel-2: #102840;
  --line: rgba(157, 215, 229, .14);
  --text: #f4fbff;
  --muted: #8ea9b8;
  --cyan: #28d7e5;
  --cyan-2: #12aabd;
  --orange: #ff7b2f;
  --green: #42e0a0;
  --red: #ff6d72;
  --radius: 24px;
  font-family: Inter, "SF Pro Display", "Hiragino Sans", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% -10%, rgba(27, 158, 184, .18), transparent 36rem),
    linear-gradient(180deg, #071626 0%, var(--bg) 38%);
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(40, 215, 229, .45); outline-offset: 2px; }

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 24px 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.brand img { width: 46px; height: 46px; border-radius: 14px; }
.brand b { display: block; letter-spacing: .08em; font-size: 17px; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; letter-spacing: .17em; }
.top-stat { text-align: right; }
.top-stat strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.top-stat strong span { color: var(--muted); font-size: 13px; }
.top-stat small { display: block; color: var(--muted); font-size: 8px; letter-spacing: .13em; }

.shell, .question-shell, .result-shell, .report-shell {
  width: min(100% - 32px, 1000px);
  margin: 0 auto;
  padding-bottom: calc(38px + env(safe-area-inset-bottom));
}
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  min-height: 430px;
  padding: 54px 58px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(120deg, rgba(10, 32, 52, .96), rgba(5, 64, 82, .78)),
    #0a2136;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .24);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -160px auto;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(40, 215, 229, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(40, 215, 229, .035), 0 0 0 140px rgba(40, 215, 229, .025);
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
}
.hero h1, .final-hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -.045em;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p { max-width: 480px; margin: 0 0 30px; color: #b9ccd6; line-height: 1.8; }
.hero-mascot {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  margin: 0 auto;
  border-radius: 28%;
  filter: drop-shadow(0 26px 26px rgba(0,0,0,.34));
}
.primary, .secondary {
  min-height: 54px;
  border-radius: 16px;
  padding: 0 22px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 0;
  background: linear-gradient(135deg, var(--orange), #ff9c42);
  color: #15110f;
  box-shadow: 0 12px 28px rgba(255, 123, 47, .2);
}
.secondary { border: 1px solid var(--line); background: #102238; }
.wide { width: 100%; justify-content: center; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 42px;
}
.stats-grid > div, .result-breakdown > div, .report-score > div {
  min-height: 104px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(11, 29, 49, .78);
}
.stats-grid span, .result-breakdown span, .report-score span { color: var(--muted); font-size: 12px; }
.stats-grid strong, .result-breakdown strong, .report-score strong { display: block; margin-top: 8px; font-size: 30px; }
.stats-grid small, .result-breakdown small, .report-score small { margin-left: 3px; color: var(--muted); font-size: 13px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.section-heading h2, .review-list h2, .skill-report h2 { margin: 7px 0 0; font-size: 25px; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.mission-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mission-card {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 98px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  text-align: left;
  cursor: pointer;
}
.mission-card:disabled { cursor: default; opacity: .45; }
.mission-card--active, .mission-card--ready { border-color: rgba(40, 215, 229, .38); }
.mission-card--complete { background: linear-gradient(135deg, rgba(18, 73, 83, .85), rgba(9, 39, 55, .9)); }
.mission-day {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: #102943;
  color: var(--cyan);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.mission-card--complete .mission-day { background: var(--cyan); color: #05202b; }
.mission-main small, .mission-main b, .mission-main em { display: block; }
.mission-main small { color: var(--orange); font-size: 8px; letter-spacing: .16em; }
.mission-main b { margin: 4px 0; }
.mission-main em { color: var(--muted); font-size: 11px; font-style: normal; }
.mission-score { color: var(--cyan); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.privacy-note { margin-top: 24px; padding: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.privacy-note > span { color: var(--cyan); font-weight: 800; letter-spacing: .14em; }
.privacy-note p { margin: 6px 0; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--muted); text-decoration: underline; cursor: pointer; }

.question-shell { max-width: 760px; }
.question-meta { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 14px 0; }
.back-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); cursor: pointer; }
.question-meta div span, .question-meta div strong { display: block; }
.question-meta div span { color: var(--cyan); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.question-meta div strong { margin-top: 3px; font-size: 16px; }
.question-meta > b { font-size: 20px; }
.question-meta > b small { color: var(--muted); font-size: 11px; }
.progress-track { height: 4px; overflow: hidden; border-radius: 10px; background: #12283d; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--orange)); transition: width .3s ease; }
.audio-stage {
  margin-top: 16px;
  padding: 34px 22px 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 35%, rgba(40, 215, 229, .14), transparent 40%),
    var(--panel);
  text-align: center;
}
.skill-chip { display: inline-block; padding: 7px 12px; border-radius: 999px; background: rgba(40,215,229,.1); color: var(--cyan); font-size: 10px; font-weight: 800; }
.pulse-wrap { display: grid; place-items: center; min-height: 186px; }
.play-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border: 1px solid rgba(40,215,229,.35);
  border-radius: 50%;
  background: linear-gradient(145deg, #123f5d, #09243a);
  box-shadow: 0 0 0 18px rgba(40,215,229,.04), 0 0 50px rgba(40,215,229,.12);
  cursor: pointer;
}
.play-icon { margin-left: 5px; color: var(--cyan); font-size: 30px; }
.sound-bars { display: none; align-items: center; gap: 5px; height: 38px; }
.sound-bars i { width: 5px; border-radius: 5px; background: var(--cyan); animation: wave .75s ease-in-out infinite alternate; }
.sound-bars i:nth-child(1) { height: 18px; }
.sound-bars i:nth-child(2) { height: 34px; animation-delay: -.3s; }
.sound-bars i:nth-child(3) { height: 26px; animation-delay: -.5s; }
.sound-bars i:nth-child(4) { height: 12px; animation-delay: -.1s; }
.is-speaking .play-icon { display: none; }
.is-speaking .sound-bars { display: flex; }
@keyframes wave { to { transform: scaleY(.45); opacity: .5; } }
.audio-stage h1 { margin: 0; font-size: 17px; letter-spacing: .15em; }
.audio-stage p { margin: 8px 0 18px; color: var(--muted); font-size: 11px; }
.speed-switch { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 11px; }
.speed-switch button { border: 0; border-radius: 8px; padding: 8px 13px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 900; cursor: pointer; }
.speed-switch .selected { background: #17344c; color: var(--cyan); }
.answer-stage { padding: 32px 2px 0; }
.question-number { color: var(--orange); font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.answer-stage h2 { margin: 8px 0 20px; font-size: clamp(22px, 4vw, 28px); }
.choices { display: grid; gap: 10px; }
.choice {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0d2136;
  text-align: left;
  cursor: pointer;
}
.choice > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #142e47; color: var(--cyan); font-weight: 900; }
.choice.correct { border-color: rgba(66,224,160,.6); background: rgba(31, 111, 80, .25); }
.choice.correct > span { background: var(--green); color: #05261a; }
.choice.wrong { border-color: rgba(255,109,114,.55); background: rgba(111, 38, 48, .28); }
.choice.wrong > span { background: var(--red); color: #270407; }
.dictation-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.dictation-form input { min-width: 0; height: 58px; border: 1px solid var(--line); border-radius: 15px; padding: 0 18px; background: #0d2136; color: var(--text); font-size: 18px; }
.result-panel { margin-top: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #0d2136; }
.result-panel > span { color: var(--green); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.result-panel--wrong > span { color: var(--orange); }
.result-panel h3 { margin: 6px 0 20px; font-size: 24px; color: var(--green); }
.result-panel--wrong h3 { color: var(--orange); }
.result-panel dl { display: grid; gap: 12px; margin: 0; }
.result-panel dl div { display: grid; grid-template-columns: 54px 1fr; gap: 8px; }
.result-panel dt { color: var(--muted); font-size: 10px; }
.result-panel dd { margin: 0; line-height: 1.6; font-size: 13px; }
.heard-check { display: flex; align-items: center; gap: 10px; margin: -7px 0 20px; padding: 12px; border-radius: 12px; background: rgba(255,123,47,.08); font-size: 12px; }
.heard-check input { width: 20px; height: 20px; accent-color: var(--orange); }
.question-actions, .result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.question-actions .primary, .result-actions .primary { justify-content: center; }

.result-shell { max-width: 760px; }
.result-hero { padding: 54px 24px 30px; text-align: center; }
.score-ring {
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  margin: 22px auto;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) var(--score), #14283b 0);
}
.score-ring::before { content: ""; position: absolute; width: 146px; height: 146px; border-radius: 50%; background: var(--bg); }
.score-ring > div { position: relative; }
.score-ring strong { font-size: 54px; }
.score-ring small { color: var(--muted); }
.result-hero h1 { margin: 0; font-size: 40px; letter-spacing: .04em; }
.result-hero p { max-width: 470px; margin: 12px auto 0; color: var(--muted); line-height: 1.7; }
.result-breakdown, .report-score { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.review-list { margin-top: 34px; }
.review-list > button {
  display: grid;
  grid-template-columns: 94px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.review-list button span { color: var(--orange); font-size: 10px; }
.review-list button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.review-list button em { color: var(--cyan); font-style: normal; }

.report-shell { max-width: 760px; }
.final-hero {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: center;
  margin: 18px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, #0a2439, #08475a);
}
.final-hero img { width: 100%; border-radius: 24%; }
.final-hero h1 { margin: 10px 0; font-size: clamp(38px, 8vw, 64px); }
.final-hero p { color: #b6ced6; font-size: 13px; }
.report-score { grid-template-columns: repeat(3, 1fr); }
.skill-report { margin: 32px 0 20px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.skill-row { display: grid; grid-template-columns: 90px 1fr 42px; align-items: center; gap: 12px; margin-top: 18px; font-size: 12px; }
.skill-row i { height: 7px; overflow: hidden; border-radius: 20px; background: #142b40; }
.skill-row i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--cyan)); }
.skill-row strong { text-align: right; }
.report-tip { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; }

@media (max-width: 700px) {
  .topbar { min-height: 70px; padding-left: 16px; padding-right: 16px; }
  .brand img { width: 42px; height: 42px; }
  .brand b { font-size: 15px; }
  .shell, .question-shell, .result-shell, .report-shell { width: min(100% - 24px, 1000px); }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 34px 24px 24px; }
  .hero h1 { font-size: 43px; }
  .hero p { font-size: 13px; }
  .hero-mascot { width: 66%; margin-top: 28px; }
  .mission-list { grid-template-columns: 1fr; }
  .stats-grid > div, .result-breakdown > div, .report-score > div { min-height: 92px; padding: 17px; }
  .stats-grid strong, .result-breakdown strong, .report-score strong { font-size: 25px; }
  .audio-stage { padding-top: 24px; }
  .pulse-wrap { min-height: 155px; }
  .play-button { width: 104px; height: 104px; }
  .answer-stage { padding-top: 24px; }
  .dictation-form { grid-template-columns: 1fr; }
  .dictation-form .primary { justify-content: center; }
  .final-hero { grid-template-columns: 1fr; text-align: center; }
  .final-hero img { width: 52%; margin: auto; }
  .report-score { grid-template-columns: repeat(3, 1fr); }
  .report-score > div { padding: 12px 10px; }
  .report-score span { font-size: 9px; }
  .report-score strong { font-size: 23px; }
}

@media (max-width: 390px) {
  .brand small { display: none; }
  .hero h1 { font-size: 38px; }
  .hero-mascot { width: 76%; }
  .stats-grid { gap: 7px; }
  .stats-grid > div { padding: 14px 11px; }
  .mission-card { grid-template-columns: 48px 1fr auto; padding: 12px; }
  .mission-day { width: 46px; height: 46px; }
  .question-actions, .result-actions { grid-template-columns: 1fr; }
}

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

