:root {
  --bg: #f4efe5;
  --bg-soft: #fbf7ef;
  --ink: #1d2430;
  --muted: #5d6777;
  --line: rgba(29, 36, 48, 0.12);
  --panel: rgba(255, 252, 246, 0.86);
  --panel-strong: #fffaf1;
  --accent: #0d6a73;
  --accent-soft: #d8f0f1;
  --warm: #bf5d1f;
  --warm-soft: #f6e3d3;
  --stress: #7a2f35;
  --stress-soft: #f5dfe1;
  --shadow: 0 18px 60px rgba(51, 54, 61, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(13, 106, 115, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(191, 93, 31, 0.12), transparent 32%),
    linear-gradient(180deg, #f9f4ea 0%, #efe7da 100%);
  color: var(--ink);
  font-family: "BIZ UDPGothic", "Yu Gothic", "Hiragino Sans", sans-serif;
  line-height: 1.7;
}

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

p,
li {
  font-size: 1rem;
}

.ambient {
  position: fixed;
  inset: auto;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(42px);
  pointer-events: none;
  opacity: 0.42;
  z-index: 0;
}

.ambient-a {
  top: -8rem;
  right: -8rem;
  background: rgba(13, 106, 115, 0.18);
}

.ambient-b {
  bottom: -10rem;
  left: -10rem;
  background: rgba(191, 93, 31, 0.16);
}

.site-header,
.page-shell {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
}

.compact-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(18px);
  background: rgba(249, 244, 234, 0.82);
  border-bottom: 1px solid rgba(29, 36, 48, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.95rem;
  background: linear-gradient(135deg, var(--accent), #3d96a0);
  color: white;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-copy strong,
h1,
h2,
h3 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "BIZ UDMincho", Georgia, serif;
}

.brand-copy span:last-child {
  color: var(--muted);
  font-size: 0.92rem;
}

.top-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.top-nav a {
  padding: 0.6rem 0.92rem;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.top-nav a:hover,
.top-nav a.is-active {
  background: rgba(13, 106, 115, 0.1);
  color: var(--ink);
  transform: translateY(-1px);
}

.page-shell {
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto 4rem;
}

.home-shell {
  display: grid;
  gap: 1.4rem;
}

.hero-card,
.day-card,
.info-card,
.rail-card,
.lesson-section,
.lesson-footer,
.stack-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: clamp(1.6rem, 3vw, 3rem);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.eyebrow,
.section-kicker,
.day-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.1;
  margin: 0.45rem 0 1rem;
}

.hero-lead {
  max-width: 44rem;
  font-size: 1.08rem;
  color: #384150;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #358992);
  color: #fff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(29, 36, 48, 0.12);
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.day-card,
.info-card {
  padding: 1.3rem;
  border-radius: var(--radius-lg);
}

.day-card h2,
.info-card h2,
.lesson-rail h1,
.lesson-section h2,
.lesson-footer h2 {
  margin: 0.35rem 0 0.8rem;
  line-height: 1.2;
}

.day-card h2 {
  font-size: 1.7rem;
}

.tone-dopamine {
  background:
    linear-gradient(180deg, rgba(216, 240, 241, 0.95), rgba(255, 250, 241, 0.92));
}

.tone-circadian {
  background:
    linear-gradient(180deg, rgba(255, 245, 214, 0.96), rgba(255, 250, 241, 0.92));
}

.tone-stress {
  background:
    linear-gradient(180deg, rgba(245, 223, 225, 0.96), rgba(255, 250, 241, 0.92));
}

.bullet-list,
.number-list {
  margin: 0;
  padding-left: 1.2rem;
}

.bullet-list li + li,
.number-list li + li {
  margin-top: 0.45rem;
}

.spacious li + li {
  margin-top: 0.75rem;
}

.text-link {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 1.2rem;
}

.caution-card {
  background: linear-gradient(180deg, rgba(255, 241, 230, 0.98), rgba(255, 249, 244, 0.92));
}

.lesson-shell {
  display: grid;
  grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
}

.lesson-rail {
  position: sticky;
  top: 5.5rem;
  padding: 1.25rem;
}

.rail-lead {
  color: #384150;
  margin-bottom: 1rem;
}

.rail-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.lesson-links {
  display: grid;
  gap: 0.55rem;
}

.lesson-links a {
  padding: 0.65rem 0.8rem;
  border-radius: 0.85rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
}

.lesson-main {
  display: grid;
  gap: 1rem;
}

.lesson-section,
.lesson-footer {
  padding: 1.4rem;
  border-radius: var(--radius-lg);
}

.lesson-section p:last-child,
.lesson-footer p:last-child {
  margin-bottom: 0;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.comparison-grid > div,
.stack-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.stack-card + .stack-card {
  margin-top: 0.8rem;
}

.chip-row,
.flow-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip-row span,
.flow-banner span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  font-weight: 700;
}

.flow-banner {
  align-items: center;
}

.flow-banner .arrow {
  background: transparent;
  border: 0;
  padding-inline: 0.2rem;
  color: var(--accent);
  min-height: auto;
}

.lesson-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 4px;
  background: transparent;
  z-index: 10;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--warm), var(--accent));
}

@media (max-width: 980px) {
  .panel-grid,
  .info-grid,
  .lesson-shell,
  .comparison-grid,
  .lesson-footer {
    grid-template-columns: 1fr;
  }

  .lesson-rail {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .page-shell {
    width: min(100vw - 1rem, 1180px);
  }

  .hero-card,
  .day-card,
  .info-card,
  .lesson-section,
  .lesson-footer,
  .lesson-rail {
    padding: 1.05rem;
  }

  .hero-card h1 {
    font-size: 2.5rem;
  }
}
