:root {
  --orange-900: #7a2e00;
  --orange-700: #d45a00;
  --orange-600: #f97316;
  --orange-400: #ffb347;
  --violet-950: #120617;
  --violet-900: #1b0b24;
  --violet-800: #261238;
  --violet-700: #3f215d;
  --violet-500: #7b46b5;
  --moon-100: #fff7db;
  --moon-200: #ffe7a8;
  --fog-100: #faf6ff;
  --fog-200: #efe4ff;
  --fog-300: #dccaf5;
  --ink-900: #190f1d;
  --ink-700: #42294c;
  --ink-500: #755b80;
  --panel: rgba(255, 249, 245, 0.74);
  --panel-strong: rgba(255, 251, 248, 0.9);
  --border: rgba(212, 90, 0, 0.24);
  --shadow-soft: 0 16px 40px rgba(60, 18, 14, 0.16);
  --shadow-card: 0 22px 44px rgba(44, 11, 31, 0.18);
  --ring: rgba(249, 115, 22, 0.28);
  --digit-color: #f97316;
  --digit-shadow: 0 8px 18px rgba(249, 115, 22, 0.18);
  --bg-main:
    radial-gradient(circle at 14% 18%, rgba(255, 181, 71, 0.38), transparent 24%),
    radial-gradient(circle at 86% 14%, rgba(123, 70, 181, 0.18), transparent 22%),
    linear-gradient(150deg, #fff8f1 0%, #fff1e4 38%, #f7eefc 100%);
}

:root[data-theme="night"] {
  --panel: rgba(29, 12, 40, 0.46);
  --panel-strong: rgba(36, 16, 50, 0.74);
  --border: rgba(255, 183, 71, 0.18);
  --ink-900: #fff2dd;
  --ink-700: #f6dcc8;
  --ink-500: #dcb8d9;
  --digit-color: #fff3d2;
  --digit-shadow: 0 8px 20px rgba(255, 179, 71, 0.24);
  --bg-main:
    radial-gradient(circle at 12% 16%, rgba(249, 115, 22, 0.18), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(154, 102, 255, 0.16), transparent 24%),
    linear-gradient(150deg, #110714 0%, #1b0d24 34%, #2c1031 68%, #150916 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", sans-serif;
  color: var(--ink-900);
  background: var(--bg-main);
  overflow-x: hidden;
}

body.countdown-only-fullscreen {
  overflow: hidden;
}

body.countdown-only-fullscreen .site {
  min-height: 100vh;
  padding: clamp(18px, 2.4vw, 34px) clamp(12px, 2vw, 26px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.countdown-only-fullscreen .top-frame,
body.countdown-only-fullscreen .section-block,
body.countdown-only-fullscreen .site-footer,
body.countdown-only-fullscreen .back-top {
  display: none !important;
}

body.countdown-only-fullscreen .hero {
  width: min(1240px, 100%);
  margin: 0 auto;
}

body.countdown-only-fullscreen .decor-stage {
  width: min(1240px, 100%);
  margin: 18px auto 0;
}

body.countdown-only-fullscreen .countdown-panel {
  padding-bottom: 0;
}

a {
  color: inherit;
}

button,
input,
details,
summary {
  font: inherit;
}

.site {
  position: relative;
  min-height: 100vh;
  padding: 30px 36px 48px;
  overflow: hidden;
  isolation: isolate;
}

.bg-wave {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.44;
  animation: driftWave 12s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

.wave-a {
  width: 48vw;
  height: 48vw;
  left: -10vw;
  top: -12vw;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.3), transparent 70%);
}

.wave-b {
  width: 42vw;
  height: 42vw;
  right: -8vw;
  top: 18vh;
  animation-delay: -4s;
  background: radial-gradient(circle, rgba(123, 70, 181, 0.28), transparent 70%);
}

.wave-c {
  width: 50vw;
  height: 34vw;
  left: 26vw;
  bottom: -14vw;
  animation-delay: -8s;
  background: radial-gradient(circle, rgba(255, 231, 168, 0.18), transparent 72%);
}

.top-frame {
  width: min(1340px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 6;
}

.spider-crown {
  width: 100%;
  height: 68px;
  border: 2px solid rgba(249, 115, 22, 0.18);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(circle at 14% 48%, rgba(249, 115, 22, 0.14), transparent 30%),
    radial-gradient(circle at 40% 50%, rgba(123, 70, 181, 0.12), transparent 28%),
    radial-gradient(circle at 68% 46%, rgba(249, 115, 22, 0.12), transparent 28%),
    radial-gradient(circle at 88% 48%, rgba(255, 231, 168, 0.12), transparent 30%);
  position: relative;
  overflow: hidden;
  animation: breathe 6s ease-in-out infinite;
}

.crown-orb,
.crown-moon {
  position: absolute;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.crown-orb:nth-child(1) {
  left: 12%;
  background: var(--orange-400);
}

.crown-orb:nth-child(2) {
  left: 34%;
  background: #b88cff;
}

.crown-orb:nth-child(3) {
  left: 58%;
  background: var(--moon-200);
}

.crown-orb:nth-child(4) {
  left: 82%;
  background: var(--orange-600);
}

.crown-moon {
  right: 50%;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fffdf4 0%, #ffe39c 70%, #ffb347 100%);
  box-shadow: 0 0 0 5px rgba(255, 227, 156, 0.08), 0 0 14px rgba(255, 227, 156, 0.34);
}

.utility-bar {
  margin-top: -2px;
  padding: 20px 24px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-top: none;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, rgba(255, 250, 246, 0.68), rgba(255, 248, 242, 0.5));
  backdrop-filter: blur(14px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

:root[data-theme="night"] .utility-bar {
  background: linear-gradient(180deg, rgba(35, 15, 46, 0.68), rgba(20, 9, 30, 0.52));
  border-color: rgba(255, 183, 71, 0.16);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Cinzel", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange-400);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14), 0 0 14px rgba(249, 115, 22, 0.38);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  position: relative;
}

.control-btn {
  border: 1px solid rgba(249, 115, 22, 0.22);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-900);
  border-radius: 999px;
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 12px;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

:root[data-theme="night"] .control-btn {
  background: rgba(255, 244, 230, 0.08);
  color: var(--ink-900);
}

.control-link {
  text-decoration: none;
}

button.control-btn {
  cursor: pointer;
}

.control-btn:hover,
.control-btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 183, 71, 0.82);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.18);
  outline: none;
}

.share-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 40px));
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  background: rgba(255, 251, 246, 0.96);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
  z-index: 40;
}

.share-popover.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

:root[data-theme="night"] .share-popover {
  background: rgba(24, 11, 34, 0.94);
  border-color: rgba(255, 183, 71, 0.24);
}

.share-title {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-700);
  margin-bottom: 10px;
}

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

.share-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink-900);
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

:root[data-theme="night"] .share-link {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 183, 71, 0.22);
  color: var(--ink-900);
}

.share-link:hover,
.share-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 183, 71, 0.72);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.18);
  outline: none;
}

.share-copy,
.reset-btn {
  border-radius: 12px;
  border: 1px solid rgba(249, 115, 22, 0.24);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(123, 70, 181, 0.12));
  color: var(--ink-900);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.share-copy {
  width: 100%;
  margin-top: 10px;
  min-height: 38px;
  font-size: 0.76rem;
}

:root[data-theme="night"] .share-copy,
:root[data-theme="night"] .reset-btn {
  border-color: rgba(255, 183, 71, 0.28);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(123, 70, 181, 0.18));
  color: var(--ink-900);
}

.share-copy:hover,
.share-copy:focus-visible,
.reset-btn:hover,
.reset-btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 183, 71, 0.76);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.16);
  outline: none;
}

.hero {
  width: min(1240px, 100%);
  margin: 40px auto 0;
  display: grid;
  gap: 34px;
  justify-items: center;
  position: relative;
  z-index: 4;
}

.parallax {
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  transition: transform 0.65s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.intro {
  text-align: center;
  max-width: 940px;
}

.kicker {
  font-family: "Cinzel", serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--ink-700);
}

.intro h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.8rem, 7.4vw, 5.9rem);
  line-height: 1.02;
  margin-top: 16px;
  color: var(--orange-700);
  text-shadow: 0 10px 22px rgba(249, 115, 22, 0.16);
}

:root[data-theme="night"] .intro h1 {
  color: #fff0d0;
  text-shadow: 0 12px 24px rgba(255, 179, 71, 0.18);
}

.subtitle {
  margin: 16px auto 0;
  max-width: 860px;
  line-height: 1.56;
  font-size: clamp(1.04rem, 2.1vw, 1.24rem);
  color: var(--ink-700);
}

.hero-pills {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-pill {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

:root[data-theme="night"] .hero-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 183, 71, 0.16);
}

.countdown-panel {
  width: min(1160px, 100%);
  padding: 34px 10px 24px;
  position: relative;
}

.lantern-string {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto 28px;
  display: flex;
  justify-content: space-between;
  opacity: 0.92;
}

.lantern-string::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(120, 80, 40, 0.22), rgba(120, 80, 40, 0.45), rgba(120, 80, 40, 0.22));
}

.lantern-string span {
  width: 14px;
  height: 20px;
  border-radius: 8px 8px 12px 12px;
  position: relative;
  animation: lanternPulse 2.8s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 179, 71, 0.32));
}

.lantern-string span::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: rgba(60, 34, 22, 0.9);
}

.lantern-string span:nth-child(3n + 1) {
  background: linear-gradient(170deg, #fff2b8, #ffaf3f);
}

.lantern-string span:nth-child(3n + 2) {
  animation-delay: 0.7s;
  background: linear-gradient(170deg, #d7c0ff, #7b46b5);
}

.lantern-string span:nth-child(3n) {
  animation-delay: 1.3s;
  background: linear-gradient(170deg, #ffd8b3, #f97316);
}

.countdown-grid {
  --digit-size: clamp(3.1rem, 8.6vw, 6rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  width: min(1020px, 100%);
  margin-inline: auto;
  gap: 16px;
  align-items: end;
}

.flip-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  transition: transform 0.32s ease, filter 0.32s ease;
}

.flip-card:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 12px rgba(255, 179, 71, 0.16));
}

.flip-card.active {
  filter: drop-shadow(0 0 12px rgba(255, 179, 71, 0.36));
}

.flip-card:not(:last-child)::after {
  content: ":";
  position: absolute;
  right: -10px;
  top: 19%;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.7rem, 5.2vw, 4.1rem);
  line-height: 1;
  color: rgba(249, 115, 22, 0.34);
  pointer-events: none;
}

:root[data-theme="night"] .flip-card:not(:last-child)::after {
  color: rgba(255, 208, 122, 0.52);
}

.number-stage {
  position: relative;
  font-size: var(--digit-size);
  min-width: 2.7em;
  height: 1.24em;
  overflow: hidden;
}

.flip-card[data-unit="days"] .number-stage {
  min-width: 4em;
}

.number-current,
.number-next {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cinzel", serif;
  font-size: 1em;
  line-height: 1.05;
  color: var(--digit-color);
  text-shadow: var(--digit-shadow);
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  will-change: transform, opacity;
}

.number-current {
  transform: translateY(0);
  opacity: 1;
}

.number-next {
  transform: translateY(22%);
  opacity: 0;
}

.flip-card.tick .number-current {
  animation: digitSlideOut 0.26s cubic-bezier(0.23, 0.83, 0.25, 1) both;
}

.flip-card.tick .number-next {
  animation: digitSlideIn 0.26s cubic-bezier(0.2, 0.86, 0.28, 1) both;
}

.flip-card.tick .number-stage {
  filter: drop-shadow(0 0 12px rgba(255, 179, 71, 0.34));
}

.unit {
  margin-top: 2px;
  text-align: center;
  font-family: "Cinzel", serif;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  font-size: 0.69rem;
  color: var(--ink-700);
}

.meta-info {
  margin-top: 28px;
  text-align: center;
  display: grid;
  gap: 8px;
  color: var(--ink-700);
  font-size: 0.96rem;
}

.countdown-seo-copy {
  max-width: 860px;
  margin: 2px auto 0;
  font-size: 0.92rem;
  line-height: 1.72;
  color: var(--ink-500);
}

.decor-stage {
  width: min(1300px, 100%);
  min-height: 286px;
  margin: 34px auto 0;
  position: relative;
  z-index: 5;
}

.moon-halo {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  width: clamp(120px, 18vw, 210px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.92), rgba(255, 231, 168, 0.96) 45%, rgba(255, 179, 71, 0.22) 72%, transparent 73%);
  box-shadow: 0 0 0 18px rgba(255, 231, 168, 0.03), 0 0 34px rgba(255, 231, 168, 0.24);
}

.bat-swarm {
  position: absolute;
  left: 50%;
  top: 18px;
  width: min(440px, 100%);
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: rgba(35, 20, 43, 0.72);
}

:root[data-theme="night"] .bat-swarm {
  color: rgba(255, 232, 206, 0.48);
}

.bat-swarm span {
  animation: batFloat 7s ease-in-out infinite;
}

.bat-swarm span:nth-child(2) {
  animation-delay: -2.2s;
}

.bat-swarm span:nth-child(3) {
  animation-delay: -4.3s;
}

.spooky-wrap {
  position: absolute;
  bottom: 18px;
  width: clamp(142px, 18vw, 230px);
}

.spooky-wrap.left {
  left: 0;
}

.spooky-wrap.right {
  right: 0;
}

.spooky-svg {
  width: 100%;
  filter: drop-shadow(0 12px 18px rgba(12, 6, 20, 0.28));
  animation: floatScene 5.6s ease-in-out infinite;
}

.grave-row {
  width: min(520px, 100%);
  margin: 152px auto 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding-top: 44px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-align: center;
}

.grave-row span {
  padding: 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(249, 115, 22, 0.14);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow-soft);
}

:root[data-theme="night"] .grave-row span {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 183, 71, 0.12);
}

.celebration {
  width: min(920px, 100%);
  margin: 18px auto 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
  position: relative;
  z-index: 7;
}

body.halloween-day .celebration {
  opacity: 1;
  transform: translateY(0);
}

.celebration-orb {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 3rem;
  background: radial-gradient(circle at 35% 35%, #fff4c7, #ffb347 44%, #f97316 74%);
  box-shadow: 0 16px 30px rgba(249, 115, 22, 0.26);
}

.celebration h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.3rem, 6vw, 4rem);
  color: var(--orange-700);
  text-shadow: 0 0 18px rgba(255, 179, 71, 0.38);
}

:root[data-theme="night"] .celebration h2 {
  color: #fff4dd;
}

.celebration p {
  font-size: 1rem;
  color: var(--ink-700);
}

.section-block {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 84px 20px;
  position: relative;
  z-index: 4;
}

.section-header {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 48px;
}

.section-header h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 5vw, 3.3rem);
  color: var(--orange-700);
  line-height: 1.08;
}

:root[data-theme="night"] .section-header h2 {
  color: #ffe8ce;
}

.section-header p {
  margin-top: 12px;
  font-size: 1.02rem;
  color: var(--ink-700);
  line-height: 1.7;
}

.header-stars {
  margin-top: 14px;
  display: inline-flex;
  gap: 8px;
  color: rgba(249, 115, 22, 0.54);
}

:root[data-theme="night"] .header-stars {
  color: rgba(255, 183, 71, 0.6);
}

.stat-grid,
.planner-grid,
.checklist-groups,
.mode-grid,
.seo-link-grid {
  display: grid;
  gap: 18px;
}

.stat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-card,
.planner-card,
.checklist-card,
.mode-card,
.seo-link-card,
.seo-resource-card {
  border-radius: 24px;
  border: 1px solid rgba(249, 115, 22, 0.14);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(255, 251, 248, 0.92), rgba(248, 239, 255, 0.82));
  box-shadow: var(--shadow-soft);
}

:root[data-theme="night"] .stat-card,
:root[data-theme="night"] .planner-card,
:root[data-theme="night"] .checklist-card,
:root[data-theme="night"] .mode-card,
:root[data-theme="night"] .seo-link-card,
:root[data-theme="night"] .seo-resource-card {
  border-color: rgba(255, 183, 71, 0.12);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.08), transparent 30%),
    linear-gradient(135deg, rgba(39, 18, 52, 0.78), rgba(22, 10, 34, 0.72));
}

.stat-card {
  padding: 20px 18px;
  min-height: 184px;
}

.stat-label {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.stat-card strong {
  display: block;
  margin-top: 16px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.1;
  color: var(--orange-700);
}

.stat-copy {
  margin-top: 14px;
  color: var(--ink-700);
  line-height: 1.65;
  font-size: 0.94rem;
}

.planner-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.planner-card,
.mode-card,
.checklist-card {
  padding: 24px 22px;
}

.planner-step {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  background: rgba(255, 255, 255, 0.54);
  color: var(--ink-700);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[data-theme="night"] .planner-step {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 183, 71, 0.14);
}

.planner-card h3,
.checklist-card h3,
.mode-card h3 {
  margin-top: 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  color: var(--orange-700);
}

.planner-card ul,
.mode-card ul {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  padding-left: 18px;
  color: var(--ink-700);
  line-height: 1.7;
}

.checklist-shell {
  max-width: 1060px;
  margin: 0 auto;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(249, 115, 22, 0.16);
  background:
    radial-gradient(circle at top left, rgba(255, 179, 71, 0.14), transparent 22%),
    linear-gradient(135deg, rgba(255, 251, 248, 0.94), rgba(248, 239, 255, 0.84));
  box-shadow: var(--shadow-card);
}

:root[data-theme="night"] .checklist-shell {
  border-color: rgba(255, 183, 71, 0.12);
  background:
    radial-gradient(circle at top left, rgba(255, 179, 71, 0.08), transparent 22%),
    linear-gradient(135deg, rgba(36, 16, 50, 0.84), rgba(20, 10, 32, 0.8));
}

.checklist-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.checklist-progress-label {
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
}

.checklist-toolbar strong {
  display: block;
  margin-top: 4px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--orange-700);
}

.reset-btn {
  padding: 11px 14px;
  min-width: 168px;
}

.progress-track {
  margin-top: 18px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  overflow: hidden;
}

:root[data-theme="night"] .progress-track {
  background: rgba(255, 255, 255, 0.06);
}

.progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb347, #f97316, #7b46b5);
  transition: width 0.35s ease;
}

.checklist-groups {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.checklist-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.check-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px 12px 44px;
  border-radius: 16px;
  border: 1px solid rgba(249, 115, 22, 0.12);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink-900);
  cursor: pointer;
  position: relative;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

:root[data-theme="night"] .check-item {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 183, 71, 0.1);
}

.check-item::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 2px solid rgba(249, 115, 22, 0.4);
  background: transparent;
}

.check-item:hover,
.check-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 183, 71, 0.62);
  outline: none;
}

.check-item.done {
  color: var(--ink-500);
  text-decoration: line-through;
  background: rgba(123, 70, 181, 0.08);
}

.check-item.done::before {
  background: linear-gradient(135deg, #ffb347, #f97316);
  border-color: rgba(249, 115, 22, 0.9);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.08);
}

.check-item.done::after {
  content: "✓";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-58%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.mode-grid,
.seo-link-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mode-card p {
  margin-top: 14px;
  color: var(--ink-700);
  line-height: 1.74;
}

.faq-list {
  max-width: 940px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.faq-item {
  border-radius: 20px;
  border: 1px solid rgba(249, 115, 22, 0.16);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.12), transparent 26%),
    linear-gradient(135deg, rgba(255, 251, 248, 0.92), rgba(248, 239, 255, 0.84));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

:root[data-theme="night"] .faq-item {
  border-color: rgba(255, 183, 71, 0.12);
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.08), transparent 26%),
    linear-gradient(135deg, rgba(36, 16, 50, 0.8), rgba(20, 10, 32, 0.76));
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 22px;
  position: relative;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-900);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(249, 115, 22, 0.12);
  color: var(--orange-700);
  font-size: 1rem;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 22px 20px;
  color: var(--ink-700);
  line-height: 1.72;
}

.seo-resource-card {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 38px);
}

.seo-resource-card p {
  margin-bottom: 16px;
  color: var(--ink-700);
  line-height: 1.8;
}

.seo-resource-card a {
  color: var(--orange-700);
  font-weight: 700;
  text-decoration: none;
}

.seo-resource-card a:hover,
.seo-resource-card a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.seo-link-card {
  display: grid;
  gap: 8px;
  padding: 18px 18px 16px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.seo-link-card strong {
  color: var(--ink-900);
  font-size: 1rem;
}

.seo-link-card span {
  color: var(--ink-700);
  line-height: 1.65;
  font-size: 0.96rem;
}

.seo-link-card:hover,
.seo-link-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 183, 71, 0.72);
  box-shadow: 0 16px 28px rgba(249, 115, 22, 0.14);
  outline: none;
}

.site-footer {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 10px 20px 0;
  border-top: 1px solid rgba(249, 115, 22, 0.12);
  display: grid;
  gap: 18px;
}

.site-footer p {
  font-family: "Cinzel", serif;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-500);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 14px 18px;
  flex-wrap: wrap;
  padding-bottom: 8px;
}

.footer-links a {
  color: var(--ink-700);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--orange-700);
  outline: none;
}

.back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(249, 115, 22, 0.22);
  background: rgba(255, 255, 255, 0.72);
  color: var(--orange-700);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 12;
}

:root[data-theme="night"] .back-top {
  background: rgba(255, 255, 255, 0.08);
  color: #fff3dc;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

.back-top:hover,
.back-top:focus-visible {
  transform: translateY(-4px);
  outline: none;
}

body.js-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
}

body.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@keyframes pulseDot {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.22);
  }
}

@keyframes driftWave {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 16px, 0);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes lanternPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
  }
}

@keyframes digitSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-26%);
  }
}

@keyframes digitSlideIn {
  from {
    opacity: 0;
    transform: translateY(24%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes batFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

@keyframes floatScene {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .planner-grid,
  .checklist-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site {
    padding: 24px 18px 34px;
  }

  .utility-bar {
    padding: 18px;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
  }

  .flip-card:nth-child(2)::after,
  .flip-card:nth-child(4)::after {
    display: none;
  }

  .grave-row {
    margin-top: 134px;
  }

  .mode-grid,
  .seo-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .stat-grid,
  .planner-grid,
  .checklist-groups,
  .mode-grid,
  .seo-link-grid {
    grid-template-columns: 1fr;
  }

  .grave-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .grave-row span:nth-child(4),
  .grave-row span:nth-child(5) {
    display: none;
  }
}

@media (max-width: 640px) {
  .controls {
    justify-content: flex-start;
  }

  .share-popover {
    left: 0;
    right: auto;
    width: min(340px, calc(100vw - 36px));
  }

  .hero {
    margin-top: 28px;
    gap: 24px;
  }

  .hero-pills {
    gap: 8px;
  }

  .hero-pill {
    font-size: 0.76rem;
  }

  .decor-stage {
    min-height: 240px;
  }

  .moon-halo {
    width: 130px;
  }

  .spooky-wrap {
    width: 132px;
  }

  .grave-row {
    margin-top: 120px;
    width: min(360px, 100%);
  }

  .checklist-shell {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .site {
    padding: 18px 14px 30px;
  }

  .utility-bar {
    padding: 16px 14px;
  }

  .control-btn {
    font-size: 0.66rem;
    padding: 8px 10px;
  }

  .countdown-grid {
    gap: 18px 12px;
  }

  .number-stage {
    min-width: 2.3em;
  }

  .flip-card[data-unit="days"] .number-stage {
    min-width: 3.3em;
  }

  .flip-card:not(:last-child)::after {
    right: -8px;
  }

  .section-block {
    padding: 62px 8px;
  }

  .planner-card,
  .checklist-card,
  .mode-card,
  .stat-card {
    padding: 20px 18px;
  }

  .check-item {
    padding-left: 40px;
  }

  .site-footer {
    padding-left: 8px;
    padding-right: 8px;
  }
}
