:root {
  --ink: #25312c;
  --muted: #6f766f;
  --paper: #fbf7ef;
  --paper-deep: #f2eadb;
  --jade: #2f6f5e;
  --moss: #77905f;
  --cinnabar: #b8563c;
  --sky: #d8e6df;
  --line: rgba(37, 49, 44, 0.15);
  --shadow: 0 22px 70px rgba(62, 49, 35, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(216, 230, 223, 0.9), transparent 34rem),
    linear-gradient(135deg, #fbf7ef 0%, #f6efe3 47%, #e8efe9 100%);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: var(--jade);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(47, 111, 94, 0.25);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  background: rgba(251, 247, 239, 0.7);
  border-radius: 8px;
}

.nav-links a {
  padding: 8px 12px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(47, 111, 94, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 430px);
  gap: 28px;
  min-height: 520px;
  align-items: center;
  padding: 44px 0 28px;
}

.hero-copy {
  position: relative;
  padding: 42px 0 36px;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 4px auto auto -18px;
  width: 78px;
  height: 220px;
  border-left: 1px solid rgba(184, 86, 60, 0.35);
  border-top: 1px solid rgba(184, 86, 60, 0.35);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cinnabar);
  font-family: ui-serif, Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.04;
  font-weight: 700;
}

.hero-text {
  max-width: 680px;
  color: #4d5750;
  font-size: 18px;
  line-height: 1.9;
}

.setup-panel,
.story-card,
.daily-side,
.calendar-section,
.system-section,
.editorial-section,
.quality-section {
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.setup-panel {
  padding: 22px;
  border-radius: 8px;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(37, 49, 44, 0.04);
}

.mode-button {
  min-height: 42px;
  border: 0;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}

.mode-button.active {
  color: #fff;
  background: var(--jade);
}

.setup-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 14px;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

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

.age-presets button {
  min-height: 38px;
  border: 1px solid rgba(47, 111, 94, 0.24);
  color: var(--jade);
  background: rgba(216, 230, 223, 0.42);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.age-presets button:hover {
  background: rgba(216, 230, 223, 0.72);
}

.hidden {
  display: none;
}

.primary-button {
  min-height: 50px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--cinnabar), #8e3f30);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(184, 86, 60, 0.22);
}

.privacy-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
  padding: 24px 0;
}

.story-card {
  padding: clamp(22px, 4vw, 42px);
  border-radius: 8px;
}

.story-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.card-kicker {
  margin-bottom: 8px;
  color: var(--cinnabar);
  font-size: 14px;
}

.story-header h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.15;
}

.read-time {
  flex: 0 0 auto;
  padding: 8px 10px;
  color: var(--jade);
  border: 1px solid rgba(47, 111, 94, 0.25);
  border-radius: 999px;
  font-size: 13px;
  background: rgba(216, 230, 223, 0.5);
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 28px;
}

.story-meta span {
  padding: 7px 10px;
  color: #455149;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 234, 219, 0.6);
  font-size: 13px;
}

.editorial-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 26px;
}

.editorial-note div {
  padding: 14px;
  border: 1px solid rgba(47, 111, 94, 0.18);
  border-radius: 8px;
  background: rgba(216, 230, 223, 0.34);
}

.editorial-note span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.editorial-note strong {
  display: block;
  font-size: 16px;
  line-height: 1.45;
}

.story-body {
  color: #303a34;
  font-size: 18px;
  line-height: 2.05;
}

.story-body p {
  margin-bottom: 16px;
}

.reader-note {
  margin-top: 30px;
  padding: 18px;
  border-left: 4px solid var(--jade);
  background: rgba(216, 230, 223, 0.45);
  border-radius: 0 8px 8px 0;
}

.reader-note h3,
.side-block h3,
.safety-block h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.reader-note p,
.side-block p,
.safety-block p {
  margin-bottom: 0;
  color: #536059;
  line-height: 1.8;
}

.check-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  color: #536059;
  font-size: 14px;
  line-height: 1.6;
}

.check-list li::before {
  content: "✓";
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #fff;
  background: var(--jade);
  border-radius: 999px;
  font-size: 12px;
}

.daily-side {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
}

.side-block,
.safety-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.safety-block {
  background: rgba(184, 86, 60, 0.08);
}

.calendar-section,
.system-section,
.editorial-section,
.quality-section {
  margin: 26px 0;
  padding: clamp(22px, 4vw, 38px);
  border-radius: 8px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 22px;
}

.section-heading h2,
.quality-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}

.section-heading p,
.quality-copy p {
  color: var(--muted);
  line-height: 1.8;
}

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.day-card {
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 247, 239, 0.74);
}

.day-card.today {
  color: #fff;
  background: var(--jade);
  border-color: var(--jade);
}

.day-card small {
  display: block;
  margin-bottom: 16px;
  color: inherit;
  opacity: 0.72;
}

.day-card strong {
  display: block;
  margin-bottom: 10px;
  line-height: 1.35;
}

.day-card span {
  display: block;
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.8;
}

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

.stage-grid article {
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(242, 234, 219, 0.45)),
    rgba(255, 255, 255, 0.5);
}

.stage-grid span {
  color: var(--cinnabar);
  font-size: 13px;
}

.stage-grid h3 {
  margin: 12px 0 10px;
  font-size: 24px;
}

.stage-grid p {
  color: var(--muted);
  line-height: 1.8;
}

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

.editorial-grid article {
  min-height: 180px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.editorial-grid strong {
  display: block;
  color: var(--cinnabar);
  font-size: 42px;
  line-height: 1;
}

.editorial-grid span {
  display: block;
  margin: 10px 0;
  color: var(--ink);
  font-weight: 700;
}

.editorial-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.quality-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 60px;
}

.quality-list {
  display: grid;
  gap: 10px;
}

.quality-list div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.quality-list strong {
  color: var(--jade);
}

.quality-list span {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 920px) {
  .hero,
  .today-grid,
  .quality-section {
    grid-template-columns: 1fr;
  }

  .daily-side {
    position: static;
  }

  .calendar-strip,
  .stage-grid,
  .editorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 22px, 1180px);
  }

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

  .nav-links {
    width: 100%;
    overflow-x: auto;
    justify-content: space-between;
  }

  .nav-links a {
    white-space: nowrap;
  }

  .hero {
    min-height: auto;
    padding-top: 18px;
  }

  h1 {
    font-size: 38px;
  }

  .hero-text,
  .story-body {
    font-size: 16px;
  }

  .story-header {
    flex-direction: column;
  }

  .calendar-strip,
  .stage-grid,
  .editorial-grid,
  .editorial-note {
    grid-template-columns: 1fr;
  }

  .quality-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .age-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
