:root {
  --bg: #f7efe5;
  --bg-deep: #ead8c3;
  --paper: rgba(255, 250, 244, 0.88);
  --paper-strong: #fffaf4;
  --ink: #2c1d18;
  --muted: #6f5a50;
  --line: rgba(115, 82, 64, 0.18);
  --accent: #bb5a4c;
  --accent-soft: #e0a66d;
  --shadow: 0 24px 60px rgba(71, 44, 31, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --content-width: min(1120px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.82), transparent 32%),
    radial-gradient(circle at top right, rgba(255, 217, 183, 0.64), transparent 26%),
    linear-gradient(180deg, #f9f0e8 0%, #f2e4d5 52%, #f7efe5 100%);
  font-family: "Georgia", "Noto Serif SC", "Songti SC", "STSong", serif;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.18;
  pointer-events: none;
}

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

button {
  font: inherit;
}

.page-glow {
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.page-glow-left {
  top: -10rem;
  left: -10rem;
  background: rgba(240, 161, 124, 0.35);
}

.page-glow-right {
  right: -8rem;
  top: 12rem;
  background: rgba(222, 191, 146, 0.38);
}

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

.site-header {
  width: var(--content-width);
  margin: 0 auto;
  padding: 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand,
.site-nav a,
.link-button {
  background: rgba(255, 250, 244, 0.62);
  border: 1px solid rgba(117, 80, 62, 0.12);
  backdrop-filter: blur(10px);
}

.brand {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a,
.link-button {
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  transition: transform 180ms ease, background-color 180ms ease;
}

.site-nav a:hover,
.link-button:hover,
.site-nav a:focus-visible,
.link-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible {
  transform: translateY(-2px);
}

.link-button {
  cursor: pointer;
}

main {
  width: var(--content-width);
  margin: 0 auto;
  padding-bottom: 72px;
}

.access-gate {
  position: relative;
  z-index: 1;
  width: var(--content-width);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0 56px;
  display: grid;
  place-items: center;
}

.access-card {
  width: min(100%, 560px);
  padding: clamp(28px, 6vw, 46px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(224, 166, 109, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(255, 250, 244, 0.94), rgba(251, 241, 229, 0.82));
  border: 1px solid rgba(117, 80, 62, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.access-kicker {
  letter-spacing: 0.14em;
}

.access-card h1 {
  margin: 10px 0 0;
  font-size: clamp(2.2rem, 4.8vw, 4rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.access-copy {
  margin: 20px 0 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.access-form {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.access-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.access-input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(117, 80, 62, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.access-input:focus {
  outline: none;
  border-color: rgba(187, 90, 76, 0.44);
  box-shadow: 0 0 0 4px rgba(187, 90, 76, 0.1);
  background: rgba(255, 255, 255, 0.92);
}

.access-submit {
  width: fit-content;
  border: none;
  cursor: pointer;
}

.access-submit[disabled] {
  opacity: 0.72;
  cursor: progress;
}

.access-error {
  min-height: 1.6em;
  margin: 14px 0 0;
  color: var(--accent);
}

.access-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero {
  min-height: calc(100vh - 96px);
  padding: 72px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow,
.section-kicker,
.hero-card-label,
.entry-date {
  margin: 0;
  color: var(--accent);
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#hero-title,
.section-head h2,
.closing-card h2 {
  margin: 10px 0 0;
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.section-head h2,
.closing-card h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  max-width: 13ch;
}

.hero-summary {
  margin: 24px 0 0;
  max-width: 32rem;
  font-size: 1.12rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.primary-button {
  background: var(--ink);
  color: #fff6f0;
  box-shadow: 0 12px 26px rgba(44, 29, 24, 0.16);
}

.secondary-button {
  border: 1px solid rgba(117, 80, 62, 0.18);
  background: rgba(255, 255, 255, 0.3);
  color: var(--ink);
}

.hero-card,
.closing-card,
.entry-card,
.letter-card {
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(255, 250, 244, 0.94), rgba(251, 241, 229, 0.8));
  border: 1px solid rgba(117, 80, 62, 0.12);
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -2rem -2rem auto;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 166, 109, 0.18), transparent 70%);
}

.hero-card-note {
  margin: 12px 0 18px;
  font-size: 1.08rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.hero-stats div {
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(117, 80, 62, 0.1);
}

.hero-stats dt {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-stats dd {
  margin: 8px 0 0;
  font-size: 1.2rem;
}

.quote-band {
  margin: 8px auto 72px;
  padding: 22px 26px;
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 250, 244, 0.72);
  border: 1px solid rgba(117, 80, 62, 0.12);
  backdrop-filter: blur(10px);
}

.quote-band p {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  text-align: center;
}

.day-nav-section {
  padding-top: 28px;
}

.day-nav-head h2 {
  max-width: 16ch;
}

.day-nav-helper {
  margin: 0;
  max-width: 44rem;
  color: var(--muted);
}

.day-nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.day-tab {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(117, 80, 62, 0.14);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.74);
  color: var(--muted);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.day-tab:hover,
.day-tab:focus-visible,
.day-tab.is-active {
  transform: translateY(-2px);
  border-color: rgba(187, 90, 76, 0.32);
  background: rgba(255, 247, 239, 0.96);
  color: var(--ink);
}

.day-toggle-button {
  min-height: 44px;
}

.playlist-section {
  padding-top: 28px;
}

.playlist-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: start;
}

.playlist-player-card,
.playlist-list-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: rgba(255, 250, 244, 0.82);
  border: 1px solid rgba(117, 80, 62, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.playlist-player-card {
  position: sticky;
  top: 24px;
}

.playlist-label,
.playlist-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.playlist-player-card h3 {
  margin: 12px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.playlist-meta {
  margin: 10px 0 0;
  color: var(--muted);
}

.playlist-audio {
  width: 100%;
  margin-top: 20px;
}

.playlist-note {
  margin: 16px 0 0;
  color: var(--muted);
}

.playlist-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.playlist-list {
  display: grid;
  gap: 12px;
}

.playlist-track {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(117, 80, 62, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.playlist-track:hover,
.playlist-track:focus-visible,
.playlist-track.is-active {
  transform: translateY(-2px);
  border-color: rgba(187, 90, 76, 0.34);
  background: rgba(255, 247, 239, 0.96);
  box-shadow: 0 14px 28px rgba(71, 44, 31, 0.08);
}

.playlist-track-index {
  align-self: center;
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.playlist-track-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.playlist-track-title {
  font-size: 1.02rem;
}

.playlist-track-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.letter-section,
.timeline-section,
.closing-section {
  padding-top: 28px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.letter-card {
  position: relative;
  padding: clamp(28px, 6vw, 48px);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #fffaf4 0%, #fcf4e9 100%);
  border: 1px solid rgba(117, 80, 62, 0.14);
}

.tape {
  position: absolute;
  width: 128px;
  height: 30px;
  top: -10px;
  background: rgba(242, 219, 184, 0.78);
  border: 1px solid rgba(117, 80, 62, 0.1);
  transform: rotate(-8deg);
  opacity: 0.75;
}

.tape-right {
  right: 44px;
  transform: rotate(8deg);
}

.tape-left {
  left: 44px;
}

.letter-body p {
  margin: 0;
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
}

.letter-body p + p {
  margin-top: 18px;
}

.letter-body p:last-child {
  font-size: 1.18rem;
  color: var(--accent);
}

.timeline-shell {
  position: relative;
  padding: 12px 0;
}

.timeline-shell.is-all .timeline-line {
  display: none;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background:
    linear-gradient(180deg, rgba(187, 90, 76, 0) 0%, rgba(187, 90, 76, 0.4) 10%, rgba(187, 90, 76, 0.22) 90%, rgba(187, 90, 76, 0) 100%);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.timeline-item {
  position: relative;
  width: calc(50% - 24px);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 36px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent), var(--accent-soft));
  box-shadow: 0 0 0 7px rgba(247, 239, 229, 0.88);
}

.timeline-item:nth-child(odd) {
  margin-right: auto;
}

.timeline-item:nth-child(odd)::before {
  right: -31px;
}

.timeline-item:nth-child(even) {
  margin-left: auto;
}

.timeline-item:nth-child(even)::before {
  left: -31px;
}

.timeline-item-stacked {
  width: 100%;
  margin-left: 0;
  padding-left: 46px;
}

.timeline-item-stacked::before {
  left: 12px;
  right: auto;
}

.entry-card {
  --tilt: -0.7deg;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 244, 0.78);
  border: 1px solid rgba(117, 80, 62, 0.12);
  transform: rotate(var(--tilt));
  backdrop-filter: blur(10px);
}

.timeline-item:nth-child(even) .entry-card {
  --tilt: 0.7deg;
}

.timeline-item-stacked .entry-card {
  --tilt: 0deg;
}

.entry-date {
  color: var(--muted);
  letter-spacing: 0.08em;
}

.entry-time {
  margin: 8px 0 0;
  font-size: clamp(1.6rem, 2vw, 2rem);
  line-height: 1;
}

.entry-body {
  margin-top: 18px;
}

.entry-body p {
  margin: 0;
}

.entry-body p + p {
  margin-top: 12px;
}

.entry-media {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.entry-photo {
  margin: 0;
  width: min(100%, var(--photo-width, 100%));
  padding: 12px 12px 18px;
  background: var(--paper-strong);
  border-radius: 20px;
  border: 1px solid rgba(117, 80, 62, 0.08);
  box-shadow: 0 16px 32px rgba(71, 44, 31, 0.08);
}

.entry-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.entry-photo figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.timeline-list-all {
  gap: 0;
}

.day-group + .day-group {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid rgba(117, 80, 62, 0.12);
}

.day-group-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.day-group-title {
  margin: 10px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.05;
}

.day-group-meta,
.day-group-note {
  margin: 10px 0 0;
  color: var(--muted);
}

.day-group-note {
  max-width: 48rem;
}

.day-group-list {
  position: relative;
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.day-group-list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18px;
  width: 1px;
  background: linear-gradient(180deg, rgba(187, 90, 76, 0.1), rgba(187, 90, 76, 0.26), rgba(187, 90, 76, 0.1));
}

.closing-section {
  padding: 72px 0 24px;
}

.closing-card {
  padding: clamp(28px, 6vw, 48px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(224, 166, 109, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 250, 244, 0.92), rgba(250, 238, 225, 0.9));
  border: 1px solid rgba(117, 80, 62, 0.14);
}

.closing-card p {
  max-width: 42rem;
}

.closing-domain {
  margin-top: 24px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.noscript-note {
  width: var(--content-width);
  margin: 0 auto 40px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

::selection {
  background: rgba(187, 90, 76, 0.18);
}

@media (max-width: 900px) {
  .access-gate {
    padding-top: 24px;
  }

  .access-submit {
    width: 100%;
  }

  .site-header {
    padding-top: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 44px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .quote-band {
    border-radius: 30px;
    margin-bottom: 56px;
  }

  .day-nav-shell {
    align-items: stretch;
  }

  .day-tabs {
    gap: 10px;
  }

  .day-tab,
  .day-toggle-button {
    width: 100%;
    justify-content: center;
  }

  .playlist-shell {
    grid-template-columns: 1fr;
  }

  .playlist-player-card {
    position: static;
  }

  .timeline-line {
    left: 18px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 46px;
  }

  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    margin-left: 0;
  }

  .timeline-item:nth-child(odd)::before,
  .timeline-item:nth-child(even)::before {
    left: 12px;
    right: auto;
  }

  .entry-card,
  .timeline-item:nth-child(even) .entry-card {
    --tilt: 0deg;
  }

  .tape {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .site-nav a,
  .link-button,
  .primary-button,
  .secondary-button {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
