/* 手机优先的温暖小工具界面 */
:root {
  --bg: #f6f0e6;
  --paper: #fffaf3;
  --ink: #2b2419;
  --muted: #6d6254;
  --line: #e4d8c4;
  --accent: #c45c26;
  --accent-dark: #9a4318;
  --ok: #2f6b4f;
  --warn: #8a4b12;
  --shadow: 0 10px 30px rgba(80, 50, 20, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
body {
  min-height: 100vh;
  padding: 20px 16px 48px;
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
}
.page { max-width: 640px; margin: 0 auto; }
.hero { margin-bottom: 18px; }
.brand-name {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
}
.eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #efe3d2;
  color: var(--accent-dark);
  font-size: 12px;
  letter-spacing: 0.06em;
}
h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.25; font-weight: 700; }
h2 { margin: 0 0 8px; font-size: 18px; }
.lead, .hint { margin: 0 0 14px; color: var(--muted); }
.hint { font-size: 14px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  box-shadow: var(--shadow);
}
.actions { display: flex; gap: 10px; margin-bottom: 14px; }
.btn {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  flex: 1;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:active { background: var(--accent-dark); }
.btn.ghost { background: #efe6d8; color: var(--ink); }
.btn.block { width: 100%; flex: none; margin-top: 8px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn input { display: none; }
.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 22px 12px;
  text-align: center;
  color: var(--muted);
  background: #fbf6ee;
  margin-bottom: 12px;
}
.preview-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eee8dc;
}
.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview-item button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(43, 36, 25, 0.75);
  color: #fff;
  font-size: 16px;
  line-height: 28px;
  padding: 0;
  cursor: pointer;
}
.status { min-height: 1.4em; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.err { color: #9a2b1f; }
.status.loading { color: var(--warn); }

.field-label {
  display: block;
  margin: 6px 0 6px;
  font-size: 13px;
  color: var(--muted);
}
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
  resize: vertical;
  min-height: 84px;
}
#ocr-card { margin-top: 16px; }
#ocr-text { min-height: 180px; }

.key-phrase {
  margin: 0 0 12px;
  padding: 14px 14px;
  background: #fff4e8;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  font-size: 17px;
  font-weight: 650;
}
.analogy { margin: 0 0 14px; color: var(--ink); }
.progress-note {
  margin: 0 0 18px;
  padding: 12px;
  background: #eef5ef;
  border-radius: 12px;
  color: var(--ok);
  font-size: 14px;
}
.question-list { margin: 0; padding: 0 0 0 0; list-style: none; }
.question {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.question:last-child { border-bottom: none; }
.question h3 { margin: 0 0 10px; font-size: 16px; font-weight: 650; }
.choice {
  display: block;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--accent); background: #fff4e8; }
.choice.correct { border-color: var(--ok); background: #eef5ef; }
.choice.wrong { border-color: #9a2b1f; background: #fbeeee; }
.choice input { margin-right: 8px; }
.explain, .blind {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.blind { color: var(--warn); }
.plan-card { margin-top: 16px; }
.plan-list { margin: 0; padding: 0; list-style: none; }
.plan-list li {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: #fbf6ee;
  border-radius: 12px;
  font-size: 14px;
}
.plan-list strong { display: block; margin-bottom: 4px; }
#practice-card, #plan-card { margin-top: 16px; }
