﻿@font-face {
  font-family: "Be Vietnam Pro";
  src: url("fonts/be-vietnam-pro-400-vietnamese.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("fonts/be-vietnam-pro-400-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("fonts/be-vietnam-pro-700-vietnamese.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("fonts/be-vietnam-pro-700-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-display-vietnamese.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-display-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+FEFF, U+FFFD;
}

:root {
  --background: #fff7e8;
  --foreground: #42100f;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
}

button,
input {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.site-shell {
  --paper: #fff7e8;
  --paper-deep: #f9e5bf;
  --ink: #3d0e0d;
  --muted: #77504a;
  --primary: #9e151a;
  --primary-deep: #6e0d12;
  --accent: #e8ad39;
  --accent-soft: #f8d98e;
  --card: rgba(255, 250, 237, 0.9);
  --shadow: rgba(86, 12, 12, 0.16);
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 27%, rgba(255, 255, 255, 0.9) 0, transparent 34%),
    linear-gradient(135deg, var(--paper), var(--paper-deep));
  transition: background 300ms ease, color 300ms ease;
}

.festival-effects {
  position: fixed;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pointer-glow {
  position: fixed;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  opacity: var(--pointer-active, 0);
  background: radial-gradient(
    circle 210px at var(--pointer-x, 50%) var(--pointer-y, 45%),
    color-mix(in srgb, var(--accent) 18%, transparent),
    color-mix(in srgb, var(--primary) 6%, transparent) 48%,
    transparent 72%
  );
  transition: opacity 220ms ease;
}

.site-shell[data-theme="apricot"] {
  --paper: #fff9dc;
  --paper-deep: #f8e6a4;
  --ink: #4d250d;
  --muted: #7a5c32;
  --primary: #b63b18;
  --primary-deep: #792610;
  --accent: #e2a800;
  --accent-soft: #f4d466;
  --card: rgba(255, 253, 232, 0.9);
  --shadow: rgba(115, 75, 5, 0.16);
}

.site-shell[data-theme="midnight"] {
  --paper: #111f42;
  --paper-deep: #071128;
  --ink: #fff3d1;
  --muted: #d0c2a6;
  --primary: #ef8a2f;
  --primary-deep: #bd451e;
  --accent: #f4cb70;
  --accent-soft: #9f7527;
  --card: rgba(13, 28, 60, 0.86);
  --shadow: rgba(0, 0, 0, 0.32);
}

.paper-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(90deg, transparent 49.5%, color-mix(in srgb, var(--primary) 5%, transparent) 50%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, color-mix(in srgb, var(--primary) 4%, transparent) 50%, transparent 50.5%);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.site-shell::before,
.site-shell::after {
  content: "";
  position: absolute;
  width: 36vw;
  height: 36vw;
  min-width: 330px;
  min-height: 330px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.site-shell::before {
  top: -25vw;
  left: -14vw;
  box-shadow: 0 0 0 42px color-mix(in srgb, var(--accent) 5%, transparent), 0 0 0 84px color-mix(in srgb, var(--primary) 3%, transparent);
}

.site-shell::after {
  right: -18vw;
  bottom: -27vw;
  box-shadow: 0 0 0 50px color-mix(in srgb, var(--primary) 4%, transparent), 0 0 0 100px color-mix(in srgb, var(--accent) 3%, transparent);
}

.topbar {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 48% 52%;
  color: #fff9e9;
  background: var(--primary);
  border: 2px solid var(--accent);
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--primary-deep) 55%, transparent), 0 5px 16px var(--shadow);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  transform: rotate(-4deg);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.01em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.settings-trigger {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--shadow) 55%, transparent);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.settings-trigger:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--card);
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logout-link {
  padding: 7px 2px;
  color: var(--muted);
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.logout-link:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.settings-icon {
  color: var(--primary);
  width: 13px;
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.hero {
  position: relative;
  z-index: 2;
  width: min(1050px, calc(100% - 40px));
  flex: 1;
  margin: 0 auto;
  padding: 26px 0 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-copy {
  width: min(760px, 100%);
  animation: rise-in 650ms ease both;
}

.eyebrow {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 32px;
  height: 1px;
  background: var(--accent);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: var(--primary);
  text-wrap: balance;
  text-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 22%, transparent);
}

.lead {
  max-width: 610px;
  margin: 18px auto 28px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  font-style: italic;
}

.countdown-card {
  position: relative;
  width: min(930px, 100%);
  padding: 27px 42px 24px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  border-radius: 30px;
  background: var(--card);
  box-shadow: 0 24px 70px var(--shadow), inset 0 0 0 5px color-mix(in srgb, var(--accent) 7%, transparent);
  backdrop-filter: blur(12px);
  animation: rise-in 650ms 90ms ease both;
}

.countdown-card::before,
.countdown-card::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(transparent, var(--accent), transparent);
  opacity: 0.55;
}

.countdown-card::before { left: 15px; }
.countdown-card::after { right: 15px; }

.moon-seal {
  position: absolute;
  top: -18px;
  right: 29px;
  width: 74px;
  height: 74px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  color: var(--primary-deep);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  box-shadow: 0 7px 18px var(--shadow), inset 0 0 0 5px color-mix(in srgb, var(--paper) 55%, transparent);
  transform: rotate(5deg);
}

.moon-seal span {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.moon-seal strong {
  font-size: 13px;
  letter-spacing: 0.03em;
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 19px;
}

.card-kicker {
  padding: 5px 10px;
  color: #fff9e9;
  background: var(--primary);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.target-date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}

.countdown-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.unit-wrap {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.time-unit {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-unit strong {
  font-family: var(--font-display);
  font-size: clamp(45px, 7.5vw, 78px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.time-unit span {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.separator {
  position: absolute;
  right: -4px;
  top: clamp(10px, 1.5vw, 19px);
  z-index: 2;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  animation: pulse 1s steps(1) infinite;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 23px;
}

.card-footer p {
  flex: none;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-style: italic;
}

.ornament-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--accent));
  opacity: 0.6;
}

.ornament-line:last-child {
  transform: scaleX(-1);
}

.celebration {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.celebration > span {
  color: var(--accent);
  font-size: 22px;
}

.celebration strong {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 54px);
}

.celebration p {
  margin: 6px 0 0;
  color: var(--muted);
}

.edit-link {
  margin-top: 22px;
  padding: 8px 4px;
  color: var(--primary);
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: gap 180ms ease, border-color 180ms ease;
}

.edit-link span { margin-left: 6px; transition: margin-left 180ms ease; }
.edit-link:hover { border-color: var(--primary); }
.edit-link:hover span { margin-left: 11px; }

footer {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 17px 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: var(--muted);
  border-top: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.footer-flower { color: var(--accent); font-size: 14px; }

.lantern {
  position: absolute;
  z-index: 1;
  width: 78px;
  height: 91px;
  border-radius: 42% 42% 46% 46%;
  background: linear-gradient(90deg, #760810, #b7131d 25%, #d8272d 50%, #b7131d 75%, #760810);
  border-top: 5px solid #e3aa36;
  border-bottom: 5px solid #e3aa36;
  box-shadow: 0 12px 32px var(--shadow);
  transform-origin: 50% -80px;
  animation: lantern-sway 4s ease-in-out infinite alternate;
}

.lantern::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -40px;
  width: 2px;
  height: 35px;
  background: #e3aa36;
  box-shadow: -5px 4px 0 -1px #e3aa36, 5px 4px 0 -1px #e3aa36;
}

.lantern::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -85px;
  width: 1px;
  height: 80px;
  background: color-mix(in srgb, var(--primary) 50%, transparent);
}

.lantern span {
  position: absolute;
  inset: 14px 27px;
  border-left: 1px solid rgba(248, 206, 107, 0.78);
  border-right: 1px solid rgba(248, 206, 107, 0.78);
  border-radius: 50%;
}

.lantern-left { left: 5vw; top: 150px; }
.lantern-right { right: 5vw; top: 116px; width: 58px; height: 69px; animation-delay: -1.7s; }

.plum-branch {
  position: absolute;
  z-index: 1;
  width: 230px;
  height: 2px;
  background: var(--primary-deep);
  opacity: 0.72;
  transform: rotate(-31deg);
}

.branch-left { left: -40px; bottom: 140px; }
.branch-right { right: -50px; top: 310px; transform: scaleX(-1) rotate(-31deg); }

.plum-branch i {
  position: absolute;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 5px dotted var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--paper) 65%, transparent);
}

.plum-branch i:nth-child(1) { left: 20%; top: -10px; }
.plum-branch i:nth-child(2) { left: 45%; top: -20px; }
.plum-branch i:nth-child(3) { left: 69%; top: -6px; }
.plum-branch i:nth-child(4) { left: 88%; top: -19px; }

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(24, 5, 6, 0.56);
  backdrop-filter: blur(9px);
  animation: fade-in 180ms ease both;
}

.settings-panel {
  position: relative;
  width: min(580px, 100%);
  max-height: calc(100svh - 48px);
  overflow: auto;
  padding: 32px;
  color: #351412;
  background: #fff9ea;
  border: 1px solid rgba(158, 21, 26, 0.22);
  border-radius: 27px;
  box-shadow: 0 30px 90px rgba(31, 4, 5, 0.32), inset 0 0 0 5px rgba(232, 173, 57, 0.08);
  animation: panel-in 240ms ease both;
}

.close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #6f4b45;
  border: 1px solid rgba(158, 21, 26, 0.17);
  border-radius: 50%;
  background: #fffdf6;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 46px 29px 0;
}

.panel-stamp {
  width: 53px;
  height: 53px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff5d8;
  background: #9e151a;
  border-radius: 15px;
  font-family: var(--font-display);
  font-size: 26px;
  box-shadow: inset 0 0 0 3px rgba(255, 245, 216, 0.17);
}

.panel-heading p {
  margin: 0 0 4px;
  color: #a16f2c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 27px;
  letter-spacing: -0.02em;
}

.field-label,
fieldset legend {
  display: block;
  margin: 0 0 8px;
  color: #67443e;
  font-size: 12px;
  font-weight: 800;
}

.text-input {
  width: 100%;
  height: 50px;
  margin-bottom: 20px;
  padding: 0 15px;
  color: #351412;
  border: 1px solid rgba(110, 13, 18, 0.19);
  border-radius: 13px;
  background: #fffdf8;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.text-input:hover,
.text-input:focus {
  border-color: #d69d2d;
  box-shadow: 0 0 0 4px rgba(232, 173, 57, 0.11);
}

fieldset {
  margin: 1px 0 0;
  padding: 0;
  border: 0;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.theme-option {
  position: relative;
  min-width: 0;
  padding: 13px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid rgba(110, 13, 18, 0.14);
  border-radius: 15px;
  background: #fffdf8;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.theme-option:hover {
  transform: translateY(-2px);
  border-color: rgba(158, 21, 26, 0.34);
}

.theme-option.selected,
.theme-option:has(input:checked) {
  border-color: #b27d24;
  background: linear-gradient(145deg, #fffef9, #fff5d9);
  box-shadow: 0 0 0 3px rgba(232, 173, 57, 0.14), 0 9px 22px rgba(158, 21, 26, 0.1);
  animation: theme-select 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.theme-option::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -35px;
  right: -35px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(232, 173, 57, 0.14);
  transform: scale(0);
  transition: transform 320ms ease;
}

.theme-option.selected::after,
.theme-option:has(input:checked)::after {
  transform: scale(1);
}

.theme-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swatches { display: flex; }
.swatches i {
  width: 19px;
  height: 19px;
  border: 2px solid #fffdf8;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(53, 20, 18, 0.12);
}
.swatches i + i { margin-left: -5px; }

.theme-copy { min-width: 0; display: grid; gap: 2px; text-align: left; }
.theme-copy strong { font-size: 12px; }
.theme-copy small { overflow: hidden; color: #84645e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.radio-mark {
  position: absolute;
  top: 13px;
  right: 12px;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(110, 13, 18, 0.23);
  border-radius: 50%;
}

.selected .radio-mark,
.theme-option:has(input:checked) .radio-mark {
  border: 4px solid #9e151a;
  background: #fffdf8;
  animation: radio-pop 340ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.selected .swatches i,
.theme-option:has(input:checked) .swatches i {
  animation: swatch-bloom 380ms ease both;
}

.selected .swatches i:nth-child(2),
.theme-option:has(input:checked) .swatches i:nth-child(2) { animation-delay: 45ms; }

.selected .swatches i:nth-child(3),
.theme-option:has(input:checked) .swatches i:nth-child(3) { animation-delay: 90ms; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(110, 13, 18, 0.1);
}

.cancel-button,
.save-button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.cancel-button {
  color: #765650;
  border: 1px solid rgba(110, 13, 18, 0.16);
  background: transparent;
}

.save-button {
  min-width: 134px;
  color: #fff9e9;
  border: 1px solid #7b0f13;
  background: #9e151a;
  box-shadow: 0 7px 18px rgba(110, 13, 18, 0.18);
}

.save-button:hover { background: #7f1014; }

.login-panel {
  width: min(470px, 100%);
}

.login-error {
  margin: -7px 0 14px;
  color: #a00e15;
  font-size: 12px;
  font-weight: 700;
}

.credential-hint {
  margin-top: -3px;
  padding: 12px 14px;
  color: #765650;
  border: 1px dashed rgba(158, 21, 26, 0.2);
  border-radius: 12px;
  background: rgba(232, 173, 57, 0.08);
  font-size: 11px;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lantern-sway {
  from { transform: rotate(-2deg); }
  to { transform: rotate(3deg); }
}

@keyframes pulse {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.38; }
}

@keyframes theme-select {
  0% { transform: translateY(-1px) scale(0.97); }
  60% { transform: translateY(-3px) scale(1.025); }
  100% { transform: translateY(-2px) scale(1); }
}

@keyframes radio-pop {
  0% { transform: scale(0.45); }
  100% { transform: scale(1); }
}

@keyframes swatch-bloom {
  0% { transform: translateY(3px) scale(0.7); }
  100% { transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .lantern { opacity: 0.45; transform: scale(0.78); }
  .lantern-left { left: 1vw; }
  .lantern-right { right: 1vw; }
  .countdown-card { padding-left: 28px; padding-right: 28px; }
  .branch-left, .branch-right { opacity: 0.3; }
}

@media (max-width: 640px) {
  .topbar { width: calc(100% - 32px); padding: 17px 0; }
  .brand-mark { width: 43px; height: 43px; font-size: 16px; }
  .brand-copy small { display: none; }
  .settings-trigger { padding: 0 14px; font-size: 13px; }
  .logout-link { display: none; }
  .hero { width: calc(100% - 24px); padding-top: 31px; }
  .eyebrow { margin-bottom: 11px; font-size: 10px; }
  .lead { margin-top: 14px; margin-bottom: 22px; font-size: 15px; }
  .countdown-card { padding: 25px 13px 19px; border-radius: 23px; }
  .countdown-card::before, .countdown-card::after { display: none; }
  .moon-seal { top: -20px; right: 17px; width: 60px; height: 60px; }
  .time-unit strong { font-size: clamp(34px, 12vw, 52px); }
  .time-unit span { margin-top: 6px; font-size: 8px; letter-spacing: 0.13em; }
  .separator { top: 7px; right: -2px; }
  .card-footer { gap: 9px; margin-top: 20px; }
  .card-footer p { max-width: 210px; font-size: 10px; }
  footer { width: calc(100% - 32px); flex-wrap: wrap; gap: 7px; text-align: center; }
  footer span:last-child { width: 100%; }
  .lantern, .plum-branch { display: none; }
  .modal-backdrop { align-items: end; padding: 0; }
  .settings-panel { width: 100%; max-height: 92svh; padding: 27px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 25px 25px 0 0; }
  .panel-heading { margin-bottom: 24px; }
  .theme-options { grid-template-columns: 1fr; }
  .theme-option { padding: 11px 13px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
  .radio-mark { position: static; }
  .form-actions { position: sticky; bottom: 0; margin-left: -4px; margin-right: -4px; padding: 16px 4px 0; background: #fff9ea; }
}

@media (prefers-reduced-motion: reduce) {
  .festival-effects { display: none; }
  .pointer-glow { display: none; }

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