:root {
  --ink: #17202a;
  --ink-soft: #344253;
  --muted: #727b86;
  --paper: #fbf7ef;
  --page: #efe6d7;
  --card: #fffdf8;
  --line: rgba(23, 32, 42, 0.14);
  --line-strong: rgba(23, 32, 42, 0.28);
  --accent: #b4452f;
  --accent-soft: #fff0ea;
  --green: #236b4b;
  --red: #a83d32;
  --shadow: 0 20px 70px rgba(33, 28, 20, 0.12);
  --font-reader: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", serif;
  --font-ui: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 12% 0%, rgba(180, 69, 47, 0.12), transparent 24rem),
    linear-gradient(90deg, rgba(23, 32, 42, 0.035) 1px, transparent 1px),
    linear-gradient(var(--page), #f7efe4 42%, #efe6d7);
  background-size: auto, 34px 34px, auto;
}

button,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 12px 0 20px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-kicker,
.metric-card span,
.chip,
.mode-card,
.route,
.question-meta,
.choice-hint,
.star,
.actions button {
  font-family: var(--font-ui);
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.05em;
}

h1 {
  font-family: var(--font-reader);
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.02;
}

h2 {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.12;
}

#subtitle,
#mode-caption {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 8px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.78);
  padding: 12px 14px;
  box-shadow: 0 8px 28px rgba(33, 28, 20, 0.08);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  display: block;
  margin-top: 3px;
  font-size: 24px;
  line-height: 1;
}

.metric-card.clock-card strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.metric-card.good {
  border-color: rgba(35, 107, 75, 0.24);
  background: #eaf5ee;
}

.metric-card.good strong {
  color: var(--green);
}

.metric-card.bad {
  border-color: rgba(168, 61, 50, 0.24);
  background: #fff0ec;
}

.metric-card.bad strong {
  color: var(--red);
}

.studio {
  display: grid;
  gap: 14px;
}

.section-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.45fr) minmax(0, 1fr);
  gap: 12px 26px;
  align-items: end;
  border-top: 1px solid var(--line-strong);
  padding-top: 18px;
}

.section-copy #mode-caption {
  margin: 0;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mode-card,
.chip,
.star,
.actions button {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.86);
  color: var(--ink);
}

.mode-card {
  display: grid;
  gap: 4px;
  min-height: 84px;
  border-radius: 18px;
  padding: 14px 15px;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.mode-card:hover {
  transform: translateY(-2px);
}

.mode-card.active {
  border-color: var(--accent);
  background: #17202a;
  color: white;
}

.mode-name {
  font-size: 19px;
  font-weight: 800;
}

.mode-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mode-card.active .mode-note {
  color: rgba(255, 255, 255, 0.72);
}

.mode-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: inherit;
  font-size: 12px;
  opacity: 0.82;
}

.control-strip {
  position: sticky;
  top: 10px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(251, 247, 239, 0.9);
  padding: 9px;
  box-shadow: 0 12px 34px rgba(33, 28, 20, 0.1);
  backdrop-filter: blur(14px);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.star,
.actions button {
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
}

.chip.active,
.actions .primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.chip.danger {
  color: var(--red);
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  max-width: 900px;
  margin: 4px auto 0;
}
