:root {
  color-scheme: light;
  --bg: #f7f4ea;
  --panel: #fffdf8;
  --ink: #2b241f;
  --muted: #6f655d;
  --line: #e8ddd0;
  --accent: #d96c3d;
  --accent-soft: #ffe6d8;
  --green: #2f8f67;
  --green-soft: #def7ea;
  --red: #bf4c4c;
  --red-soft: #fde5e5;
  --shadow: 0 18px 40px rgba(69, 48, 30, 0.12);
  --radius: 24px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 226, 199, 0.85), transparent 28%),
    radial-gradient(circle at bottom right, rgba(216, 235, 214, 0.95), transparent 24%),
    var(--bg);
  color: var(--ink);
}

.app {
  width: min(760px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero,
.card,
.result-panel,
.topbar,
.result {
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(232, 221, 208, 0.85);
  box-shadow: var(--shadow);
}

.hero,
.result {
  border-radius: 30px;
  padding: 28px 22px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

h1,
h2 {
  line-height: 1.3;
}

.intro,
.summary {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-meta span,
.badge,
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #fff6eb;
  color: #7f5539;
  font-size: 14px;
  font-weight: 600;
}

.primary-btn,
.secondary-btn,
.choice-btn {
  border: 0;
  border-radius: 18px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.primary-btn,
.secondary-btn {
  margin-top: 22px;
  min-height: 52px;
  padding: 0 20px;
  font-weight: 700;
}

.primary-btn {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 24px rgba(217, 108, 61, 0.28);
}

.secondary-btn {
  background: #f2ebe2;
  color: var(--ink);
}

.primary-btn:active,
.secondary-btn:active,
.choice-btn:active {
  transform: scale(0.98);
}

.hidden {
  display: none !important;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  border-radius: 24px;
  padding: 18px;
}

.score-pill strong {
  font-size: 20px;
  color: var(--accent);
}

.card {
  border-radius: 30px;
  padding: 22px;
}

.question-lead {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.sentence-box,
.visual-box,
.feedback,
.result-panel {
  margin-top: 18px;
}

.sentence-box,
.visual-box {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  background: #fffaf4;
}

.sentence {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  line-height: 1.6;
}

.underline {
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-decoration-color: #e2a778;
  text-underline-offset: 7px;
}

.visual-box {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 190px;
}

.visual-emoji {
  font-size: 74px;
  line-height: 1;
}

.visual-label {
  color: var(--muted);
  font-size: 14px;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.choice-btn {
  min-height: 58px;
  font-size: 24px;
  font-weight: 800;
}

.choice-btn.yes {
  background: var(--green-soft);
  color: var(--green);
}

.choice-btn.no {
  background: var(--red-soft);
  color: var(--red);
}

.feedback {
  border-radius: 22px;
  padding: 16px 16px 18px;
  line-height: 1.7;
  color: var(--ink);
}

.feedback.good {
  background: var(--green-soft);
}

.feedback.fix {
  background: #fff1df;
}

.feedback strong {
  color: var(--accent);
}

.result {
  margin-top: 8px;
}

.result-panel {
  border-radius: 24px;
  padding: 18px;
}

.mistake-list {
  margin: 14px 0 0;
  padding-left: 20px;
  line-height: 1.8;
}

.mistake-list li + li {
  margin-top: 12px;
}

.result-actions {
  display: flex;
  justify-content: center;
}

@media (max-width: 640px) {
  .app {
    width: calc(100vw - 20px);
    padding-top: 14px;
  }

  .hero,
  .card,
  .result {
    padding: 20px 16px;
    border-radius: 24px;
  }

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

  .choice-row {
    grid-template-columns: 1fr;
  }
}
