:root {
  color-scheme: light;
  --bg: #f5f1e7;
  --paper: #fffdf8;
  --ink: #1d2433;
  --muted: #6b7280;
  --accent: #1f7a5c;
  --accent-soft: #dff3ea;
  --border: rgba(29, 36, 51, 0.12);
  --shadow: 0 18px 50px rgba(40, 52, 74, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(31, 122, 92, 0.08), transparent 28%),
    linear-gradient(180deg, #f8f4eb 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.card + .card {
  margin-top: 16px;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(31, 122, 92, 0.08);
}

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

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
}

.intro {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.7;
}

.hero-meta,
.toolbar,
.actions,
.meta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-meta {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.question-counter {
  font-weight: 700;
}

.question-body {
  margin-top: 18px;
}

.question-image {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
}

.question-stem {
  margin-top: 16px;
  font-size: 20px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.question-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.option-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(29, 36, 51, 0.08);
  font-size: 18px;
  line-height: 1.6;
}

.option-button {
  width: 100%;
  text-align: left;
  color: var(--ink);
  background: #f8fafc;
  min-height: 56px;
}

.option-button.is-selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(31, 122, 92, 0.18);
}

.answer-label,
.reference-title {
  display: block;
  margin-top: 18px;
  margin-bottom: 8px;
  font-weight: 700;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 132px;
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 14px;
  font-size: 18px;
  line-height: 1.7;
  background: #fff;
}

button {
  appearance: none;
  border: none;
  border-radius: 16px;
  min-height: 48px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
}

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

button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.reference {
  margin-top: 16px;
  border-radius: 18px;
  background: var(--accent-soft);
  padding: 14px;
}

.reference-answer {
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff3cd;
  color: #8a6100;
  font-size: 13px;
  font-weight: 700;
}

.empty h2 {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }

  .question-stem,
  .option-item,
  textarea,
  .reference-answer {
    font-size: 18px;
  }

  .toolbar,
  .actions,
  .meta-panel {
    flex-wrap: wrap;
  }

  button {
    flex: 1 1 140px;
  }
}
