:root {
  --paper: #f4f0e8;
  --paper-deep: #ece4d8;
  --surface: rgba(252, 249, 243, 0.82);
  --surface-strong: rgba(248, 244, 237, 0.96);
  --ink: #1f2a36;
  --muted: #5c6470;
  --line: rgba(70, 78, 88, 0.16);
  --accent: #b79a5f;
  --accent-soft: #d8c39a;
  --coral: #8a6e3b;
  --sky: #2e4157;
  --sage: #6e7b61;
  --berry: #253240;
  --sun: #c6aa70;
  --shadow: 0 24px 60px rgba(28, 35, 44, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at 14% 18%, rgba(183, 154, 95, 0.16), transparent 22%),
    radial-gradient(circle at 85% 16%, rgba(46, 65, 87, 0.12), transparent 24%),
    radial-gradient(circle at 70% 72%, rgba(110, 123, 97, 0.08), transparent 22%),
    linear-gradient(180deg, #f8f5ef 0%, #e9dfd1 100%);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  letter-spacing: 0;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.7), transparent 24%),
    radial-gradient(circle at 80% 22%, rgba(255, 255, 255, 0.36), transparent 20%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 42%),
    repeating-linear-gradient(
      0deg,
      rgba(70, 78, 88, 0.03) 0,
      rgba(70, 78, 88, 0.03) 1px,
      transparent 1px,
      transparent 14px
    );
}

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

.page-shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}

.home-shell {
  display: grid;
  gap: 14px;
  overflow: clip;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr);
  align-items: end;
  gap: 18px;
  min-height: min(20svh, 188px);
  position: relative;
  z-index: 1;
}

.home-celebration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.celebration-piece {
  position: absolute;
  top: var(--top, 120px);
  left: var(--left);
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(var(--rotate)) scale(0.86);
  animation: celebrationBurst var(--duration) cubic-bezier(0.2, 0.8, 0.22, 1) infinite;
  animation-delay: var(--delay);
  filter: drop-shadow(0 10px 18px rgba(31, 42, 54, 0.08));
  will-change: transform, opacity;
}

.celebration-piece-flag {
  width: 34px;
  height: 48px;
  transform-origin: top center;
}

.celebration-piece-flag::before,
.celebration-piece-flag::after {
  content: "";
  position: absolute;
}

.celebration-piece-flag::before {
  left: 15px;
  top: 0;
  width: 2px;
  height: 46px;
  background: linear-gradient(180deg, rgba(79, 87, 99, 0.9), rgba(79, 87, 99, 0.25));
}

.celebration-piece-flag::after {
  left: 17px;
  top: 4px;
  width: 22px;
  height: 14px;
  border-radius: 3px 4px 4px 2px;
  background: linear-gradient(180deg, var(--tone-a), var(--tone-b));
  clip-path: polygon(0 0, 100% 0, 72% 48%, 100% 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.celebration-piece-confetti {
  width: var(--size);
  height: calc(var(--size) * 0.7);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--tone-a), var(--tone-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.celebration-piece-confetti.is-round {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
}

.celebration-piece-confetti.is-ribbon {
  width: calc(var(--size) * 1.45);
  height: calc(var(--size) * 0.44);
  border-radius: 999px;
}

.celebration-piece-firework {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 252, 244, 0.98) 0 30%, transparent 32%);
  animation-name: celebrationFirework;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--tone-a) 55%, white));
}

.celebration-piece-firework::before,
.celebration-piece-firework::after {
  content: "";
  position: absolute;
  inset: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
}

.celebration-piece-firework::before {
  width: 84px;
  height: 84px;
  background:
    radial-gradient(circle, transparent 0 50%, rgba(255, 255, 255, 0.26) 52% 56%, transparent 58%),
    radial-gradient(circle at 50% 0%, var(--tone-a) 0 8%, transparent 9%),
    radial-gradient(circle at 85% 15%, var(--tone-b) 0 7%, transparent 8%),
    radial-gradient(circle at 100% 50%, var(--tone-a) 0 8%, transparent 9%),
    radial-gradient(circle at 84% 84%, var(--tone-c, var(--tone-b)) 0 7%, transparent 8%),
    radial-gradient(circle at 50% 100%, var(--tone-b) 0 8%, transparent 9%),
    radial-gradient(circle at 15% 84%, var(--tone-a) 0 7%, transparent 8%),
    radial-gradient(circle at 0% 50%, var(--tone-c, var(--tone-b)) 0 8%, transparent 9%),
    radial-gradient(circle at 15% 15%, var(--tone-b) 0 7%, transparent 8%);
  animation: fireworkBloom var(--duration) ease-out infinite;
  animation-delay: var(--delay);
}

.celebration-piece-firework::after {
  width: 128px;
  height: 128px;
  background:
    radial-gradient(circle at 50% 4%, rgba(255, 249, 236, 0.95) 0 4%, transparent 5%),
    radial-gradient(circle at 68% 11%, var(--tone-c, var(--tone-a)) 0 3.2%, transparent 4.2%),
    radial-gradient(circle at 84% 24%, var(--tone-b) 0 3.6%, transparent 4.6%),
    radial-gradient(circle at 96% 50%, var(--tone-a) 0 4%, transparent 5%),
    radial-gradient(circle at 84% 76%, var(--tone-c, var(--tone-b)) 0 3.2%, transparent 4.2%),
    radial-gradient(circle at 68% 89%, var(--tone-a) 0 3.6%, transparent 4.6%),
    radial-gradient(circle at 50% 96%, rgba(255, 249, 236, 0.92) 0 4%, transparent 5%),
    radial-gradient(circle at 32% 89%, var(--tone-b) 0 3.6%, transparent 4.6%),
    radial-gradient(circle at 16% 76%, var(--tone-c, var(--tone-a)) 0 3.2%, transparent 4.2%),
    radial-gradient(circle at 4% 50%, var(--tone-a) 0 4%, transparent 5%),
    radial-gradient(circle at 16% 24%, var(--tone-b) 0 3.6%, transparent 4.6%),
    radial-gradient(circle at 32% 11%, var(--tone-c, var(--tone-b)) 0 3.2%, transparent 4.2%);
  animation: fireworkSparkle var(--duration) ease-out infinite;
  animation-delay: var(--delay);
}

@keyframes celebrationBurst {
  0% {
    opacity: 0;
    transform: translate3d(0, 56px, 0) rotate(var(--rotate)) scale(0.72);
  }

  10% {
    opacity: 0.95;
    transform: translate3d(8px, 20px, 0) rotate(calc(var(--rotate) + 18deg)) scale(1);
  }

  32% {
    opacity: 0.96;
    transform: translate3d(-14px, -36px, 0) rotate(calc(var(--rotate) - 14deg)) scale(1.02);
  }

  58% {
    opacity: 0.82;
    transform: translate3d(18px, -86px, 0) rotate(calc(var(--rotate) + 26deg)) scale(0.98);
  }

  82% {
    opacity: 0.28;
    transform: translate3d(-10px, -138px, 0) rotate(calc(var(--rotate) - 10deg)) scale(0.9);
  }

  100% {
    opacity: 0;
    transform: translate3d(6px, -168px, 0) rotate(calc(var(--rotate) + 8deg)) scale(0.82);
  }
}

@keyframes celebrationFirework {
  0%,
  18%,
  100% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.2);
  }

  22% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(0.78);
  }

  36% {
    opacity: 0.9;
    transform: translate3d(0, 0, 0) scale(1);
  }

  58% {
    opacity: 0.18;
    transform: translate3d(0, 0, 0) scale(1.08);
  }
}

@keyframes fireworkBloom {
  0%,
  18%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.12);
  }

  24% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.38);
  }

  38% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.92);
  }

  62% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes fireworkSparkle {
  0%,
  20%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }

  28% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.52);
  }

  44% {
    opacity: 0.86;
    transform: translate(-50%, -50%) scale(1);
  }

  70% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.12);
  }
}

.timeline-shell {
  position: relative;
  display: grid;
  gap: 44px;
  padding: 20px 0 36px;
}

.timeline-shell::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(183, 154, 95, 0.7), rgba(110, 123, 97, 0.42) 40%, rgba(46, 65, 87, 0.52));
  opacity: 0.55;
  box-shadow: 0 0 0 10px rgba(247, 242, 234, 0.4);
}

.week-cluster {
  position: relative;
  display: grid;
  justify-items: center;
}

.week-cluster-right {
  transform: translateX(130px);
}

.week-cluster-left {
  transform: translateX(-130px);
}

.week-orbit {
  position: relative;
  width: 310px;
  height: 310px;
}

.week-core {
  position: absolute;
  inset: 50%;
  width: 124px;
  height: 124px;
  margin: -62px 0 0 -62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 250, 244, 0.98), rgba(224, 211, 186, 0.98));
  border: 6px solid rgba(248, 243, 235, 0.98);
  box-shadow: 0 22px 42px rgba(31, 42, 54, 0.18);
  z-index: 1;
}

.week-core-label {
  color: #7f6a3b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.week-core strong {
  color: #253240;
  font-size: 38px;
  line-height: 1;
}

.week-orbit::before {
  content: "";
  position: absolute;
  inset: 35px;
  border-radius: 50%;
  border: 3px dashed rgba(246, 239, 227, 0.88);
  opacity: 0.92;
}

.week-day {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: -37px 0 0 -37px;
  border-radius: 50%;
  border: 5px solid rgba(247, 242, 234, 0.98);
  box-shadow: 0 16px 28px rgba(31, 42, 54, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, opacity 180ms ease;
  color: #f7feff;
  text-decoration: none;
  z-index: 2;
}

.week-day-top {
  transform: rotate(0deg) translateY(-118px);
}

.week-day-top-right {
  transform: rotate(51.43deg) translateY(-118px);
}

.week-day-right {
  transform: rotate(102.86deg) translateY(-118px);
}

.week-day-bottom-right {
  transform: rotate(154.29deg) translateY(-118px);
}

.week-day-bottom-left {
  transform: rotate(205.71deg) translateY(-118px);
}

.week-day-left {
  transform: rotate(257.14deg) translateY(-118px);
}

.week-day-top-left {
  transform: rotate(308.57deg) translateY(-118px);
}

.week-day:hover {
  filter: brightness(1.04);
  box-shadow: 0 24px 38px rgba(31, 42, 54, 0.24);
}

.week-day-ordinary {
  background: linear-gradient(160deg, #33485e, #1f2a36);
}

.week-day-holiday {
  background: linear-gradient(160deg, #c6aa70, #9f824d);
}

.week-day-special {
  background: linear-gradient(160deg, #6e7b61, #485243);
}

.week-day-glow {
  position: relative;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.92), transparent 54%);
}

.week-day-number {
  position: relative;
  z-index: 1;
  color: #f7feff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.week-day.is-opened {
  filter: saturate(1.12);
  box-shadow: 0 20px 40px rgba(183, 154, 95, 0.24);
}

.week-day.is-opened::after,
.week-day.is-opened::before {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.week-day.is-opened::after {
  inset: -10px;
  border: 2px dashed rgba(248, 242, 233, 0.92);
}

.week-day.is-opened::before {
  inset: -18px;
  border: 3px solid rgba(183, 154, 95, 0.32);
}

.week-day.is-future {
  opacity: 0.34;
  filter: grayscale(0.18) saturate(0.66);
}

.week-day.is-future {
  pointer-events: none;
  cursor: default;
}

.week-day.is-opened.is-future {
  opacity: 0.34;
  filter: grayscale(0.18) saturate(0.66);
}

.week-day.is-empty {
  opacity: 0.18;
  filter: grayscale(0.28) saturate(0.5);
  pointer-events: none;
}

.week-day.is-available {
  opacity: 1;
}

.page-header,
.overview-card,
.story-card,
.phrase-card,
.carousel-card,
.day-card {
  border: 1px solid var(--line);
  border-radius: 18px 14px 20px 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.home-hero,
.hero-copy {
  padding: 8px 2px 6px;
  position: relative;
}

.home-hero::after,
.hero-copy::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 96px;
  height: 96px;
  border-radius: 48% 52% 44% 56%;
  background:
    radial-gradient(circle at 30% 30%, rgba(183, 154, 95, 0.24), transparent 56%),
    radial-gradient(circle at 70% 65%, rgba(46, 65, 87, 0.14), transparent 48%);
  filter: blur(10px);
  opacity: 0.82;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
strong {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 0.96;
  max-width: 16ch;
}

.flag-title {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(100%, 420px);
  max-width: 420px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(115, 80, 26, 0.18);
  box-shadow:
    0 16px 34px rgba(30, 42, 58, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(58, 76, 96, 0.08), rgba(58, 76, 96, 0) 36%, rgba(58, 76, 96, 0.1));
}

.flag-title-line {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 5px 18px 6px;
  font-size: clamp(16px, 2.1vw, 24px);
  line-height: 1;
  font-weight: 800;
  text-wrap: balance;
  position: relative;
  overflow: hidden;
}

.flag-title-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 38%, rgba(34, 43, 57, 0.08)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 18%, rgba(255, 255, 255, 0.12) 52%, rgba(255, 255, 255, 0) 76%);
  pointer-events: none;
}

.flag-title-red {
  background: linear-gradient(180deg, #b4332a, #8e211c);
  color: #f7f2ea;
}

.flag-title-gold {
  background: linear-gradient(180deg, #e0bf68, #cfa243);
  color: #39270d;
}

h2 {
  margin: 0;
  font-size: 22px;
}

.summary {
  max-width: 46ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.hero-meta,
.day-card-meta,
.day-card-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin: 0 0 14px;
}

.overview-card,
.page-header,
.phrase-card,
.story-card {
  padding: 20px;
}

.home-intro .overview-card {
  padding: 16px 18px;
  align-self: stretch;
  align-content: center;
}

.page-header,
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ghost-link,
.pager-link,
.day-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
}

.ghost-link,
.pager-link {
  border: 1px solid var(--line);
  background: rgba(247, 242, 234, 0.92);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.42);
}

.day-pill {
  background: linear-gradient(135deg, var(--accent-soft), #e6d6b7);
  color: #5f4a22;
  font-size: 13px;
  font-weight: 800;
}

.days-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.day-card-number {
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.progress-label,
.progress-note {
  font-size: 13px;
  line-height: 1.4;
}

.type-pill,
.date-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
}

.type-pill {
  font-weight: 800;
}

.type-pill-ordinary {
  background: rgba(46, 65, 87, 0.12);
  color: #2e4157;
}

.type-pill-holiday {
  background: rgba(183, 154, 95, 0.18);
  color: #7c6431;
}

.type-pill-special {
  background: rgba(110, 123, 97, 0.16);
  color: #55604a;
}

.date-pill {
  background: rgba(248, 244, 237, 0.92);
  border: 1px solid rgba(70, 78, 88, 0.12);
  color: var(--muted);
}

.overview-card p,
.phrase-row p,
.story-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.day-layout {
  display: grid;
  gap: 18px;
}

.carousel-card {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(250, 247, 241, 0.96), rgba(236, 227, 213, 0.94));
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background:
    radial-gradient(circle at 20% 15%, rgba(183, 154, 95, 0.18), transparent 26%),
    radial-gradient(circle at 80% 25%, rgba(46, 65, 87, 0.14), transparent 28%),
    #d8cfbf;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
}

.carousel-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.carousel-meta {
  display: grid;
  gap: 10px;
  padding: 16px 18px 18px;
}

.carousel-caption {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-style: italic;
}

.carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(44, 42, 51, 0.22);
}

.carousel-dot.is-active {
  width: 28px;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
}

.phrase-card {
  display: grid;
  gap: 16px;
  background:
    radial-gradient(circle at top right, rgba(183, 154, 95, 0.12), transparent 28%),
    rgba(249, 246, 240, 0.92);
}

.phrase-row {
  display: grid;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.phrase-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.phrase-label {
  color: var(--berry);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.phrase-row strong {
  font-size: 26px;
  line-height: 1.2;
}

.phrase-audio {
  width: 100%;
  margin-top: 6px;
  height: 38px;
  border-radius: 999px;
  filter: sepia(0.22) saturate(0.84);
}

.story-card {
  display: grid;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(251, 248, 243, 0.98), rgba(239, 231, 220, 0.94));
}

.story-card p {
  font-size: 18px;
}

.overview-card {
  display: grid;
  gap: 10px;
  background:
    radial-gradient(circle at 85% 20%, rgba(46, 65, 87, 0.12), transparent 22%),
    radial-gradient(circle at 16% 80%, rgba(183, 154, 95, 0.14), transparent 18%),
    rgba(249, 246, 240, 0.94);
}

.day-lock-card {
  margin-top: 8px;
  padding: 22px;
  border: 1px solid rgba(183, 154, 95, 0.28);
  box-shadow: 0 18px 38px rgba(31, 42, 54, 0.12);
}

.day-lock-card h2 {
  margin: 0;
  font-size: 28px;
}

.overview-progress {
  display: grid;
  gap: 8px;
}

.overview-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.overview-progress-value {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.overview-progress-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.overview-progress-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(46, 65, 87, 0.12);
  box-shadow: inset 0 1px 3px rgba(31, 42, 54, 0.12);
}

.overview-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(216, 195, 154, 0.92), rgba(183, 154, 95, 0.96));
  box-shadow: 0 0 18px rgba(183, 154, 95, 0.18);
  transition: width 240ms ease;
}

.superuser-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-top: 2px;
  cursor: pointer;
  user-select: none;
}

.superuser-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.superuser-toggle-ui {
  position: relative;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: rgba(46, 65, 87, 0.18);
  border: 1px solid rgba(70, 78, 88, 0.2);
  box-shadow: inset 0 1px 2px rgba(31, 42, 54, 0.12);
  transition: background 180ms ease, border-color 180ms ease;
}

.superuser-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(248, 244, 237, 0.98);
  box-shadow: 0 2px 6px rgba(31, 42, 54, 0.16);
  transition: transform 180ms ease;
}

.superuser-toggle input:checked + .superuser-toggle-ui {
  background: linear-gradient(135deg, rgba(216, 195, 154, 0.78), rgba(183, 154, 95, 0.92));
  border-color: rgba(140, 111, 52, 0.45);
}

.superuser-toggle input:checked + .superuser-toggle-ui::after {
  transform: translateX(20px);
}

.superuser-toggle-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.progress-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px 14px 20px 12px;
  background:
    radial-gradient(circle at right top, rgba(183, 154, 95, 0.12), transparent 26%),
    rgba(249, 245, 238, 0.94);
  box-shadow: var(--shadow);
}

.progress-label {
  margin: 0 0 6px;
  color: var(--berry);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.progress-value {
  display: block;
  font-size: 20px;
  line-height: 1.3;
}

.progress-button[disabled] {
  opacity: 0.6;
}

.pager {
  padding-bottom: 20px;
}

.pager-link.is-disabled {
  opacity: 0.45;
}

.day-page[data-day-type="ordinary"] .hero-copy::after {
  background:
    radial-gradient(circle at 30% 30%, rgba(46, 65, 87, 0.2), transparent 56%),
    radial-gradient(circle at 70% 65%, rgba(183, 154, 95, 0.14), transparent 48%);
}

.day-page[data-day-type="holiday"] .hero-copy::after {
  background:
    radial-gradient(circle at 30% 30%, rgba(198, 170, 112, 0.28), transparent 56%),
    radial-gradient(circle at 70% 65%, rgba(183, 154, 95, 0.18), transparent 48%);
}

.day-page[data-day-type="special"] .hero-copy::after {
  background:
    radial-gradient(circle at 30% 30%, rgba(110, 123, 97, 0.24), transparent 56%),
    radial-gradient(circle at 70% 65%, rgba(46, 65, 87, 0.16), transparent 48%);
}

@media (max-width: 640px) {
  .page-shell {
    padding-inline: 16px;
  }

  .home-celebration {
    inset: 0;
  }

  .home-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: min(20svh, 122px);
    gap: 10px;
  }

  .home-hero {
    padding-block: 2px;
  }

  .home-hero::after {
    width: 56px;
    height: 56px;
    top: -2px;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .home-intro .overview-card {
    min-width: 152px;
    padding: 10px 12px;
    gap: 8px;
  }

  .home-intro .overview-card h2 {
    font-size: 14px;
  }

  .timeline-shell::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .week-cluster-right {
    transform: translateX(34px);
  }

  .week-cluster-left {
    transform: translateX(-34px);
  }

  .week-orbit {
    width: 248px;
    height: 248px;
  }

  .week-core {
    width: 104px;
    height: 104px;
    margin: -52px 0 0 -52px;
  }

  .week-core strong {
    font-size: 32px;
  }

  .week-day {
    width: 58px;
    height: 58px;
    margin: -29px 0 0 -29px;
    border-width: 4px;
  }

  .week-day-number {
    font-size: 18px;
  }

  .week-day-top {
    transform: rotate(0deg) translateY(-94px);
  }

  .week-day-top-right {
    transform: rotate(51.43deg) translateY(-94px);
  }

  .week-day-right {
    transform: rotate(102.86deg) translateY(-94px);
  }

  .week-day-bottom-right {
    transform: rotate(154.29deg) translateY(-94px);
  }

  .week-day-bottom-left {
    transform: rotate(205.71deg) translateY(-94px);
  }

  .week-day-left {
    transform: rotate(257.14deg) translateY(-94px);
  }

  .week-day-top-left {
    transform: rotate(308.57deg) translateY(-94px);
  }

  h1 {
    font-size: 22px;
    max-width: none;
  }

  .flag-title {
    width: min(100%, 248px);
    max-width: 248px;
    border-radius: 14px;
  }

  .flag-title-line {
    min-height: 28px;
    padding: 4px 12px 5px;
    font-size: 14px;
  }

  .summary {
    display: none;
  }

  .overview-progress {
    gap: 6px;
  }

  .overview-progress-value {
    font-size: 14px;
  }

  .overview-progress-meta {
    font-size: 11px;
  }

  .overview-progress-bar {
    height: 8px;
  }

  .superuser-toggle {
    gap: 8px;
  }

  .superuser-toggle-ui {
    width: 40px;
    height: 24px;
  }

  .superuser-toggle-ui::after {
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
  }

  .superuser-toggle input:checked + .superuser-toggle-ui::after {
    transform: translateX(16px);
  }

  .superuser-toggle-text {
    display: none;
  }

  .story-card p {
    font-size: 17px;
  }

  .progress-card {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header,
  .pager {
    flex-direction: column;
    align-items: stretch;
  }

  .ghost-link,
  .pager-link,
  .day-pill {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .celebration-piece {
    animation: none;
  }
}
