:root {
  color-scheme: light;
  --paper: #efe6d6;
  --card: #fffdf8;
  --ink: #1c1915;
  --muted: #6d6458;
  --line: #e4d8c4;
  --teal: #0f4c5c;
  --teal-deep: #0b3944;
  --good: #1b7f4e;
  --good-bg: #e5f4eb;
  --bad: #9b2335;
  --bad-bg: #f8e8e6;
  --amber: #8a5a12;
  --shadow: 0 16px 40px rgba(70, 48, 20, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 36%),
    var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.sheet {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 22px 18px 48px;
}

.sheet.wide { width: min(880px, 100%); }

.loading { color: var(--muted); }

.top { margin-bottom: 16px; }

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 13px;
  letter-spacing: 0.14em;
}

h1 {
  margin: 4px 0 8px;
  font-family: "Palatino Linotype", "Songti SC", serif;
  font-size: 36px;
  line-height: 1.1;
  font-weight: 600;
}

h2 { margin: 0 0 12px; font-size: 18px; }

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.dots { display: flex; gap: 6px; margin: 14px 0; }

.dots i {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--line);
}

.dots i.on { background: var(--teal); }
.dots i.bad { background: var(--bad); }
.dots i.good { background: var(--good); }

.stem {
  margin: 8px 0 18px;
  font-family: "Palatino Linotype", "Songti SC", serif;
  font-size: 26px;
  line-height: 1.45;
}

.subject {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 13px;
}

.options, .actions { display: grid; gap: 10px; }

.option, button, .link-button {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  text-align: left;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

.option { cursor: pointer; }
.option.selected { border-color: var(--teal); background: #e7f1f3; }

button.primary, .link-button {
  width: 100%;
  background: var(--teal);
  color: white;
  border-color: transparent;
  text-align: center;
  text-decoration: none;
  display: grid;
  place-items: center;
  cursor: pointer;
}

button.primary:disabled,
button.secondary:disabled { opacity: 0.55; }

input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 16px;
  font: inherit;
  font-size: 20px;
}

.feedback { border-radius: 18px; padding: 16px; margin-bottom: 12px; }
.feedback.good { background: var(--good-bg); }
.feedback.bad { background: var(--bad-bg); }
.feedback strong { display: block; font-size: 22px; margin-bottom: 6px; }
.feedback .good { color: var(--good); }
.feedback .bad { color: var(--bad); }

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: var(--shadow);
}

.banner {
  background: var(--bad-bg);
  color: var(--bad);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0;
}

.banner.quiet { background: #f3ead7; color: var(--amber); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--card); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 28px; font-family: "Palatino Linotype", serif; }
.stat span { color: var(--muted); font-size: 13px; }

.chart { height: 240px; }

.bar-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px; align-items: center; margin: 8px 0; }
.bar { height: 8px; background: #f0e4d0; border-radius: 99px; }
.bar span { display: block; height: 100%; background: var(--teal); border-radius: 99px; }

.checkin { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.checkin div { text-align: center; color: var(--muted); font-size: 12px; }
.checkin i {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 4px;
  border-radius: 50%;
  background: var(--line);
}
.checkin div.on i { background: var(--teal); }
.checkin div.on { color: var(--ink); }

.clock { font-variant-numeric: tabular-nums; color: var(--teal); font-weight: 650; }
.lead { margin: 0 0 14px; font-size: 18px; line-height: 1.5; }
.steps { margin: 0 0 16px; padding-left: 1.2em; }
.steps li { margin: 8px 0; font-size: 16px; line-height: 1.45; }
.coach { margin: 0 0 12px; color: var(--teal-deep); font-size: 15px; line-height: 1.45; }
.stack { display: grid; gap: 10px; }
button.secondary, button.text-button {
  width: 100%;
  text-align: center;
  cursor: pointer;
  background: transparent;
  box-shadow: none;
}
button.text-button { min-height: 44px; border: 0; color: var(--muted); font-size: 14px; }
.account-row { margin: 16px 0 0; }
.account-row input { margin: 8px 0; }
label.field span { display: block; margin-bottom: 6px; }
textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  padding: 12px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.choices label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.hint { color: var(--muted); font-size: 14px; }
.text-link { color: var(--teal); }
.footer-link { display: block; margin-top: 22px; color: var(--muted); font-size: 13px; }
.wrong-stem { font-size: 20px; }
.door { margin-top: 8px; }
.empty { color: var(--muted); }

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; }
  h1 { font-size: 32px; }
  .stem { font-size: 24px; }
}
