:root {
  --night-top: #091820;
  --night-mid: #102833;
  --night-bot: #1a3f47;
  --cream: #fbf5e8;
  --cream-alt: #f3ead7;
  --paper: #fffdf7;
  --line: #e4d8be;
  --ink: #1e2428;
  --muted: #5a6369;
  --gold: #f4c55b;
  --gold-deep: #b97d19;
  --berry: #dc3f52;
  --berry-hi: #f16173;
  --berry-deep: #a52234;
  --pine: #1c6b4d;
  --pine-dark: #114331;
  --display: "Fraunces", Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "Plus Jakarta Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 10px 30px rgba(13, 27, 34, 0.08);
  --shadow-card: 0 18px 44px rgba(7, 20, 26, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--gold); color: var(--night-top); padding: 0.6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 0.75rem; }

.container { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.container.narrow { width: min(820px, calc(100% - 2rem)); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 24, 32, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(244, 197, 91, 0.14);
  color: #f6efe0;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--display); font-weight: 700; font-size: 1.25rem; white-space: nowrap; }
.brand-mark { font-size: 1.35rem; filter: drop-shadow(0 2px 6px rgba(244, 197, 91, 0.35)); }
.nav-links { display: flex; align-items: center; gap: 1.25rem; font-size: 0.92rem; font-weight: 600; color: rgba(246, 239, 224, 0.84); }
.nav-links a { padding: 0.35rem 0.25rem; transition: color 0.15s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-pill, .lang-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  height: 36px; padding: 0 0.75rem; border-radius: 999px; white-space: nowrap; flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fbf5e8; font-size: 0.85rem; font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}
.icon-pill:hover, .lang-pill:hover { background: rgba(244, 197, 91, 0.18); border-color: rgba(244, 197, 91, 0.5); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.72rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 0.95rem; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:disabled { opacity: 0.65; cursor: wait; }
.btn-lg { padding: 0.88rem 1.55rem; font-size: 1rem; }
.btn-sm { padding: 0.48rem 0.95rem; font-size: 0.85rem; }
.btn-primary {
  background: linear-gradient(180deg, var(--berry-hi) 0%, var(--berry) 55%, var(--berry-deep) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(220, 63, 82, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-secondary {
  background: var(--paper); color: var(--ink); border-color: var(--line);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.btn-secondary:hover { background: #fff; border-color: var(--gold-deep); }
.btn-night {
  background: rgba(255, 255, 255, 0.1); color: #fbf5e8; border-color: rgba(255, 255, 255, 0.22);
}
.btn-night:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(244, 197, 91, 0.55); }
.btn-gold {
  background: linear-gradient(180deg, #fae094 0%, #e7b13d 100%);
  color: #362205; box-shadow: 0 6px 16px rgba(231, 177, 61, 0.3);
}
.btn-ghost { background: transparent; color: inherit; border-color: rgba(255, 255, 255, 0.24); }
.btn-danger { background: #b92336; color: #fff; }

/* Night Sky Hero & Calendar Backdrop */
.hero-night, .calendar-night, .subpage-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(244, 197, 91, 0.14), transparent 36%),
    radial-gradient(circle at 82% 18%, rgba(77, 173, 160, 0.15), transparent 40%),
    linear-gradient(180deg, var(--night-top) 0%, var(--night-mid) 52%, var(--night-bot) 100%);
  color: #fbf5e8;
}
.hero-night { padding: 0.75rem 0 6.5rem; }
.calendar-night { padding: 0.75rem 0 4.5rem; min-height: calc(100vh - 64px); }
.subpage-hero { padding: 3rem 0 3.25rem; text-align: center; }
.subpage-hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 0.75rem 0 0.85rem; }
.subpage-hero .hero-subtitle { margin-inline: auto; }

.snow-hills {
  position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 84px; display: block; pointer-events: none;
}

/* Snowfall */
.snowfall { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.flake {
  position: absolute; top: -12px; border-radius: 50%; background: rgba(255, 255, 255, 0.78);
  animation: snowFall linear infinite;
}
@keyframes snowFall {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.85; }
  90% { opacity: 0.7; }
  100% { transform: translateY(720px) translateX(28px); opacity: 0; }
}

/* Fairy Lights Progress Wire */
.fairy-lights {
  position: relative; display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0.5rem 1.15rem; margin-bottom: 0.4rem;
}
.fairy-lights::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0.55rem; height: 2px;
  background: rgba(255, 255, 255, 0.18); border-radius: 2px;
}
.bulb {
  position: relative; width: 11px; height: 14px; border-radius: 50% 50% 45% 45%;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
.bulb::before {
  content: ""; position: absolute; top: -4px; left: 3px; width: 4px; height: 4px;
  background: #4e5d64; border-radius: 1px;
}
.bulb.is-lit.b-1 { background: #ff6c80; box-shadow: 0 0 12px 3px rgba(255, 108, 128, 0.75); }
.bulb.is-lit.b-2 { background: #ffd266; box-shadow: 0 0 12px 3px rgba(255, 210, 102, 0.75); }
.bulb.is-lit.b-3 { background: #5ce0a0; box-shadow: 0 0 12px 3px rgba(92, 224, 160, 0.72); }
.bulb.is-lit.b-4 { background: #75c8ff; box-shadow: 0 0 12px 3px rgba(117, 200, 255, 0.75); }
.bulb.is-lit.b-5 { background: #d49bff; box-shadow: 0 0 12px 3px rgba(212, 155, 255, 0.75); }

/* Hero Grid */
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2.25rem; align-items: start;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.36rem 0.85rem; border-radius: 999px;
  background: rgba(244, 197, 91, 0.14); border: 1px solid rgba(244, 197, 91, 0.36);
  color: #fde197; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em;
}
.hero-title {
  margin-top: 0.9rem; font-size: clamp(2.15rem, 4vw, 3.35rem); line-height: 1.08;
}
.hero-title span { display: block; }
.hero-accent { color: var(--gold); font-size: 0.72em; margin-top: 0.22rem; font-weight: 600; }
.hero-subtitle {
  margin-top: 0.95rem; font-size: 1.03rem; color: rgba(246, 239, 224, 0.85); max-width: 52ch;
}

/* Create Form Card */
.create-card {
  margin-top: 1.45rem; padding: 1.35rem; border-radius: var(--radius-lg);
  background: var(--paper); color: var(--ink);
  box-shadow: var(--shadow-card); border: 1px solid rgba(244, 197, 91, 0.35);
}
.field-group { margin-bottom: 1rem; }
.field-group > label, .field-label { display: block; font-size: 0.86rem; font-weight: 700; margin-bottom: 0.42rem; color: #2b3438; }
.create-card input[type="text"], .modal-card input[type="text"], .modal-card input[type="url"], .modal-card textarea, .code-card input {
  width: 100%; padding: 0.76rem 0.95rem; border-radius: var(--radius-sm);
  border: 1.5px solid #d9cfb8; background: #fff; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.create-card input:focus, .modal-card input:focus, .modal-card textarea:focus, .code-card input:focus {
  outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(28, 107, 77, 0.16);
}
.theme-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.theme-chip {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.52rem 0.7rem;
  border-radius: 12px; border: 1.5px solid #e3d9c3; background: #fbf8f1;
  cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.theme-chip input { position: absolute; opacity: 0; pointer-events: none; }
.theme-chip.is-selected { border-color: var(--pine); background: #eef7f3; box-shadow: 0 0 0 2px rgba(28, 107, 77, 0.14); }
.theme-swatch { display: inline-block; width: 22px; height: 22px; border-radius: 7px; border: 2px solid transparent; flex: none; }
.theme-name { font-size: 0.84rem; font-weight: 700; }
.create-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.3rem; }
.code-inline-link { font-size: 0.86rem; font-weight: 700; color: var(--pine); }
.code-inline-link:hover { text-decoration: underline; }
.form-error { color: #b92336; font-size: 0.88rem; font-weight: 600; margin: 0.35rem 0 0.6rem; }

/* Advent Board Stage & 4 Themes */
.board-stage {
  border-radius: 26px; padding: 1.15rem; position: relative;
  box-shadow: 0 24px 60px rgba(4, 14, 19, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  border: 8px solid #8a5b32;
}
.board-stage.theme-evergreen {
  background:
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 10px 10px,
    radial-gradient(circle at 50% 0%, #205745 0%, #103227 72%, #0b221a 100%);
  border-color: #9e7438;
}
.board-stage.theme-gingerbread {
  background:
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 10px 10px,
    radial-gradient(circle at 50% 0%, #9b2638 0%, #6d1624 72%, #4c0d18 100%);
  border-color: #8b5630;
}
.board-stage.theme-frost {
  background:
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 12px 12px,
    radial-gradient(circle at 50% 0%, #274d8c 0%, #16305c 72%, #0e1e3f 100%);
  border-color: #7ca7d4;
}
.board-stage.theme-candy {
  background:
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 10px 10px,
    radial-gradient(circle at 50% 0%, #a22f62 0%, #6d1840 72%, #4a0e2b 100%);
  border-color: #d96682;
}

.board-stage-header, .board-meta-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.85rem; flex-wrap: wrap; color: rgba(255, 250, 238, 0.92);
}
.demo-title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.demo-pill {
  padding: 0.22rem 0.65rem; border-radius: 999px; font-size: 0.74rem; font-weight: 700;
  background: rgba(244, 197, 91, 0.2); border: 1px solid rgba(244, 197, 91, 0.45); color: #fde4a1;
}
.demo-caption, .board-tz-foot {
  margin-top: 0.85rem; font-size: 0.82rem; color: rgba(255, 248, 232, 0.78); text-align: center;
}

/* 24-Door Grid */
.advent-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.55rem;
}
.door {
  position: relative; aspect-ratio: 1 / 1.04; border-radius: 14px; border: 0; padding: 0.35rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; transition: transform 0.18s cubic-bezier(.22,1,.36,1), box-shadow 0.18s;
  color: #fff; text-align: center;
}
.door:hover { transform: translateY(-3px) rotate(-1.5deg); z-index: 3; }
.door:active { transform: scale(0.94); }

.door-empty {
  background: rgba(0, 0, 0, 0.24);
  border: 1.5px dashed rgba(255, 245, 222, 0.3);
  color: rgba(255, 248, 232, 0.78);
}
.door-empty:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--gold); color: #fff; }
.door-num { font-family: var(--display); font-size: 1.15rem; font-weight: 700; }
.door-plus { font-size: 0.82rem; opacity: 0.7; margin-top: 0.1rem; }

/* Gift Wraps */
.wrap-classic {
  background: linear-gradient(145deg, #db3d50 0%, #a91e31 100%);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.wrap-gold {
  background: linear-gradient(135deg, #fce295 0%, #e1a632 52%, #b77715 100%);
  color: #3d2204;
  box-shadow: 0 6px 16px rgba(244, 197, 91, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.wrap-frost {
  background: linear-gradient(145deg, #74b4eb 0%, #376ca8 100%);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.wrap-plaid {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.12) 0 8px, transparent 8px 18px),
    repeating-linear-gradient(0deg, rgba(244,197,91,0.16) 0 6px, transparent 6px 18px),
    linear-gradient(145deg, #1f7351 0%, #114530 100%);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.28);
}
.wrap-candy {
  background: repeating-linear-gradient(135deg, #d93f6a 0 9px, #fff4f7 9px 15px);
  color: #4f1126;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.28);
}

.door-ribbon-v {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 10px; transform: translateX(-50%);
  background: rgba(248, 211, 114, 0.85); pointer-events: none;
}
.door-ribbon-h {
  position: absolute; left: 0; right: 0; top: 50%; height: 10px; transform: translateY(-50%);
  background: rgba(248, 211, 114, 0.85); pointer-events: none;
}
.wrap-gold .door-ribbon-v, .wrap-gold .door-ribbon-h { background: rgba(169, 30, 49, 0.78); }
.wrap-frost .door-ribbon-v, .wrap-frost .door-ribbon-h { background: rgba(255, 255, 255, 0.78); }
.wrap-candy .door-ribbon-v, .wrap-candy .door-ribbon-h { background: rgba(196, 31, 69, 0.75); }

.door-tag {
  position: absolute; top: 5px; left: 5px; z-index: 2;
  min-width: 22px; height: 20px; padding: 0 5px; border-radius: 6px;
  background: #fffaf0; color: #2b222a; font-family: var(--display); font-size: 0.78rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
}
.door-sticker {
  position: relative; z-index: 2; font-size: 1.45rem; line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.28));
}
.door-extra-badge {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 21px; height: 21px; border-radius: 999px;
  background: rgba(10, 24, 32, 0.82); font-size: 0.7rem;
  display: grid; place-items: center;
}
.door-sender {
  position: relative; z-index: 2; margin-top: 0.28rem; max-width: 92%;
  padding: 0.1rem 0.42rem; border-radius: 999px;
  background: rgba(12, 22, 28, 0.76); color: #fff; font-size: 0.67rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.door-reaction-pill {
  position: absolute; bottom: 4px; right: 4px; z-index: 3;
  font-size: 0.82rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

/* Ready / Today Glow & Opened State */
.door-today, .door-ready {
  outline: 2.5px solid #ffe082;
  animation: doorGlow 2.4s ease-in-out infinite;
}
@keyframes doorGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 224, 130, 0.7), 0 6px 14px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(255, 224, 130, 0.18), 0 8px 20px rgba(255, 210, 102, 0.45); }
}
.door-opened {
  background: #fff9ec !important; color: var(--ink) !important;
  border: 2px solid #e6d5af;
  box-shadow: inset 0 2px 8px rgba(80, 56, 15, 0.12);
}
.door-opened .door-ribbon-v, .door-opened .door-ribbon-h { display: none; }
.door-opened .door-sender { background: #ede2c9; color: #3a3128; }

/* Cream Editorial Sections */
.cream-section { padding: clamp(3rem, 6vw, 4.75rem) 0; background: var(--cream); }
.cream-alt { background: var(--cream-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.4rem; }
.section-head h2 { font-size: clamp(1.85rem, 3.4vw, 2.55rem); color: #162328; }
.section-head p { margin-top: 0.55rem; color: var(--muted); font-size: 1.02rem; }

.steps-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.15rem;
}
.step-card, .feature-card, .guide-card, .promo-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 1.35rem; box-shadow: var(--shadow-soft);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: #14382c; color: var(--gold); font-family: var(--display); font-weight: 700; margin-bottom: 0.85rem;
}
.step-card h3, .feature-card h3, .guide-card h3 { font-size: 1.18rem; margin-bottom: 0.45rem; }
.step-card p, .feature-card p, .guide-card p { font-size: 0.94rem; color: var(--muted); }

.features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.feature-icon { font-size: 1.85rem; margin-bottom: 0.6rem; }

.promo-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.promo-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.65rem; padding: 1.75rem; }
.promo-ideas { background: linear-gradient(145deg, #fffdf7 0%, #f9f0dc 100%); }
.promo-games { background: linear-gradient(145deg, #f3faf7 0%, #e5f3ec 100%); }
.promo-kicker { font-size: 0.82rem; font-weight: 800; color: var(--pine); text-transform: uppercase; letter-spacing: 0.05em; }
.promo-card h3 { font-size: 1.45rem; }
.promo-card p { color: var(--muted); margin-bottom: 0.4rem; }

.guide-stack { display: flex; flex-direction: column; gap: 1rem; }
.guide-card h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }

/* FAQ Accordion */
.faq-list { display: flex; flex-direction: column; gap: 0.7rem; }
.faq-item {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.faq-item summary {
  font-weight: 700; font-size: 1.02rem; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--berry); font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin-top: 0.75rem; color: var(--muted); font-size: 0.95rem; }

/* Bottom CTA */
.bottom-cta {
  padding: 4rem 0; text-align: center; color: #fbf5e8;
  background: linear-gradient(135deg, #102a33 0%, #174337 100%);
}
.bottom-cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.65rem); }
.bottom-cta p { margin: 0.7rem 0 1.5rem; color: rgba(251, 245, 232, 0.82); }

/* Calendar Page Specific */
.cal-loading, .cal-missing { text-align: center; padding: 5rem 1rem; }
.spinner {
  width: 40px; height: 40px; margin: 0 auto 1rem; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.passphrase-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.2rem; margin-bottom: 1.25rem; border-radius: var(--radius-md);
  background: rgba(244, 197, 91, 0.16); border: 1px solid rgba(244, 197, 91, 0.55);
}
.pass-code {
  display: inline-block; margin-top: 0.35rem; padding: 0.25rem 0.65rem; border-radius: 8px;
  background: rgba(9, 24, 32, 0.7); color: #ffe399; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.04em;
}
.pass-actions { display: flex; gap: 0.5rem; }

.cal-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  margin-bottom: 1.15rem;
}
.cal-badges { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.role-badge, .code-badge {
  padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
}
.role-badge { background: rgba(244, 197, 91, 0.2); color: #fde49b; border: 1px solid rgba(244, 197, 91, 0.4); }
.code-badge { background: rgba(255, 255, 255, 0.1); color: #e2f0f2; font-family: monospace; letter-spacing: 0.06em; }
.cal-title { font-size: clamp(2rem, 4.2vw, 3.1rem); }
.cal-subtitle { margin-top: 0.35rem; color: rgba(246, 239, 224, 0.82); max-width: 56ch; }

.cal-countdown-box {
  padding: 0.75rem 1.15rem; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  text-align: right; min-width: 200px;
}
.countdown-label { display: block; font-size: 0.76rem; color: rgba(255, 245, 225, 0.72); }
.countdown-clock { font-family: var(--display); font-size: 1.35rem; color: var(--gold); }

.cal-toolbar {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; margin-bottom: 1.2rem;
}
.board-inline-tools { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.theme-mini-dot {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.45);
  transition: transform 0.15s;
}
.theme-mini-dot.is-active { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 0 2px var(--gold); }
.dot-sep { opacity: 0.5; margin-inline: 0.35rem; }

/* Modals */
.modal-dialog {
  padding: 0; border: 0; background: transparent; max-width: min(560px, calc(100vw - 1.5rem)); width: 100%;
  overflow: visible;
}
.modal-dialog::backdrop { background: rgba(7, 17, 23, 0.72); backdrop-filter: blur(5px); }
.modal-card {
  position: relative; background: var(--paper); color: var(--ink);
  border-radius: 24px; padding: 1.65rem; max-height: calc(100vh - 2.5rem); overflow-y: auto;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.42); border: 1px solid var(--line);
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem; width: 34px; height: 34px;
  border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink);
  display: grid; place-items: center; font-weight: 700;
}
.modal-close:hover { background: var(--cream-alt); }
.modal-kicker { font-size: 0.78rem; font-weight: 800; color: var(--berry); text-transform: uppercase; letter-spacing: 0.06em; }
.modal-title { font-size: 1.65rem; margin: 0.25rem 0 0.45rem; padding-right: 2rem; }
.modal-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.1rem; }

.composer-form { display: flex; flex-direction: column; gap: 0.95rem; }
.composer-form textarea { min-height: 92px; resize: vertical; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.check-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.check-row input { width: 17px; height: 17px; accent-color: var(--pine); }
.prompt-btn {
  border: 1px dashed var(--gold-deep); background: #fff8e6; color: #7a4e09;
  padding: 0.32rem 0.7rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
}
.prompt-btn:hover { background: #fcecc0; }
.char-counter { font-size: 0.78rem; color: var(--muted); }

.sticker-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.35rem; }
.sticker-btn {
  height: 42px; border-radius: 10px; border: 1.5px solid #e5dac2; background: #fff; font-size: 1.3rem;
}
.sticker-btn.is-selected { border-color: var(--berry); background: #fff0f2; transform: scale(1.06); }

.wrap-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
.wrap-btn {
  padding: 0.42rem 0.25rem; border-radius: 10px; border: 1.5px solid #e5dac2; background: #fff;
  font-size: 0.75rem; font-weight: 700; text-align: center;
}
.wrap-btn.is-selected { border-color: var(--pine); background: #ebf7f2; }

.extra-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; }
.extra-tab {
  padding: 0.45rem 0.35rem; border-radius: 10px; border: 1.5px solid #e5dac2; background: #fff;
  font-size: 0.8rem; font-weight: 700;
}
.extra-tab.is-selected { border-color: var(--pine); background: var(--pine); color: #fff; }
.extra-panel {
  padding: 0.85rem; border-radius: 12px; background: #f8f2e4; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.55rem;
}

/* Mini Doodle Pad */
.doodle-canvas {
  width: 100%; height: 170px; background: #fff; border: 1.5px solid #d5c7ab; border-radius: 10px;
  touch-action: none; cursor: crosshair; display: block;
}
.doodle-tools { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.doodle-colors { display: flex; gap: 0.35rem; }
.color-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.2); }
.color-dot.is-active { box-shadow: 0 0 0 2.5px var(--pine); transform: scale(1.1); }

/* Opened Letter Reveal Card */
.reveal-card {
  padding: 1.35rem; border-radius: 18px; background: linear-gradient(180deg, #fffdf7 0%, #f8eed9 100%);
  border: 2px solid #e4cfa0; text-align: center; margin-bottom: 1rem;
}
.reveal-sticker { font-size: 2.6rem; margin-bottom: 0.45rem; display: block; animation: popIn 0.45s cubic-bezier(.22,1.3,.36,1); }
@keyframes popIn { 0% { transform: scale(0.3) rotate(-14deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.reveal-message { font-family: var(--display); font-size: 1.3rem; line-height: 1.45; color: #1b2226; white-space: pre-wrap; margin: 0.5rem 0 0.8rem; }
.reveal-from { font-size: 0.9rem; font-weight: 700; color: var(--pine); }

.reveal-extra-box {
  margin-top: 0.95rem; padding: 0.85rem; border-radius: 14px; background: #fff; border: 1px dashed #d1bc91;
}
.reveal-doodle-svg { width: 100%; max-width: 300px; height: auto; display: block; margin: 0.35rem auto 0; border-radius: 8px; background: #fffdf9; }
.coupon-ticket {
  border: 2px dashed var(--berry); background: #fff6f7; padding: 0.8rem; border-radius: 12px;
}
.coupon-ticket strong { display: block; color: var(--berry-deep); font-size: 1.05rem; }

.reaction-row { display: flex; align-items: center; justify-content: center; gap: 0.45rem; flex-wrap: wrap; margin: 0.85rem 0; }
.react-btn {
  padding: 0.38rem 0.7rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 1rem;
  transition: transform 0.14s, border-color 0.14s;
}
.react-btn:hover { transform: scale(1.1); }
.react-btn.is-active { border-color: var(--berry); background: #fff0f2; }

.reveal-actions { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }

/* Ideas Page */
.filter-pills, .game-tabs { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.35rem; }
.filter-pill {
  padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1); color: #fbf5e8; font-weight: 700; font-size: 0.88rem;
}
.filter-pill.is-active { background: var(--gold); color: #241904; border-color: var(--gold); }
.idea-group { margin-bottom: 2.5rem; }
.idea-group-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.idea-group-head h2 { font-size: 1.6rem; }
.idea-badge { padding: 0.2rem 0.65rem; border-radius: 999px; background: #e8f4ee; color: var(--pine); font-size: 0.78rem; font-weight: 700; }
.idea-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.idea-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.05rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.75rem;
}
.idea-card p { font-size: 0.96rem; color: var(--ink); }
.copy-idea-btn {
  align-self: flex-start; padding: 0.35rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-size: 0.8rem; font-weight: 700; color: var(--pine);
}
.copy-idea-btn:hover { background: #eef7f3; border-color: var(--pine); }

/* Code Lookup Page */
.code-hero { min-height: calc(100vh - 180px); display: flex; align-items: center; }
.code-card {
  max-width: 440px; margin: 1.75rem auto 0; padding: 1.5rem; border-radius: 22px;
  background: var(--paper); color: var(--ink); text-align: left; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 0.85rem;
}
.code-big-input {
  text-align: center; font-family: monospace; font-size: 1.6rem !important; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
}

/* Mini Games */
.game-panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 1.25rem;
  box-shadow: var(--shadow-soft);
}
.game-hud {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-bottom: 0.85rem; margin-bottom: 0.85rem; border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.canvas-wrap { position: relative; border-radius: 16px; overflow: hidden; background: #0d222b; }
#catch-canvas { width: 100%; height: auto; display: block; touch-action: none; }
.canvas-overlay {
  position: absolute; inset: 0; background: rgba(9, 24, 32, 0.82); color: #fbf5e8;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem;
  text-align: center; padding: 1.5rem;
}
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.65rem; max-width: 460px; margin: 0 auto; }
.mem-card {
  aspect-ratio: 1; border-radius: 14px; border: 2px solid #d9cba9; background: #14382c; color: #fff;
  font-size: 2rem; display: grid; place-items: center; transition: transform 0.2s, background 0.2s;
}
.mem-card.is-flipped, .mem-card.is-matched { background: #fffaf0; color: var(--ink); border-color: var(--gold-deep); }
.mem-card.is-matched { opacity: 0.78; }
.rush-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; max-width: 420px; margin: 0 auto; }
.rush-slot {
  aspect-ratio: 1; border-radius: 16px; border: 2px solid var(--line); background: #f3ead7;
  font-size: 2.3rem; display: grid; place-items: center; transition: transform 0.1s, background 0.15s;
}
.rush-slot.has-gift { background: #fff5dc; border-color: var(--gold-deep); transform: scale(1.03); }
.rush-slot.has-coal { background: #2c2d31; border-color: #111; }
.game-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
  margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--line);
}
.game-tip { font-size: 0.82rem; color: var(--muted); }

.subpage-cta-box {
  margin-top: 2.5rem; padding: 2rem; border-radius: 22px; text-align: center;
  background: linear-gradient(135deg, #102a33 0%, #174337 100%); color: #fbf5e8;
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
}
.subpage-cta-box .btn-secondary { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.3); }

/* Footer */
.site-footer {
  background: #0a1a21; color: rgba(246, 239, 224, 0.78); padding: 2.5rem 0;
  border-top: 1px solid rgba(244, 197, 91, 0.14);
}
.footer-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-brand { color: #fbf5e8; }
.footer-note { margin-top: 0.5rem; font-size: 0.9rem; max-width: 38ch; }
.footer-copy { margin-top: 0.6rem; font-size: 0.8rem; opacity: 0.65; }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: 0.9rem; font-weight: 600; }
.footer-links a:hover { color: var(--gold); }

/* Toast & Confetti */
.toast-region {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none;
}
.toast {
  background: #102833; color: #fffaf0; border: 1px solid rgba(244, 197, 91, 0.5);
  padding: 0.68rem 1.2rem; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35); animation: toastIn 0.25s ease;
}
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.confetti-piece {
  position: fixed; width: 10px; height: 10px; pointer-events: none; z-index: 300;
  border-radius: 2px; animation: confettiDrop 1.25s cubic-bezier(.15,.7,.35,1) forwards;
}
@keyframes confettiDrop {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

.my-cal-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.8rem; }
.my-cal-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.85rem 1rem; border-radius: 14px; background: #fff; border: 1px solid var(--line);
}
.my-cal-item:hover { border-color: var(--pine); }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .nav-inner { gap: 0.5rem; }
  .brand { font-size: 1.05rem; gap: 0.35rem; }
  .nav-actions { gap: 0.35rem; }
  .icon-pill, .lang-pill { height: 32px; padding: 0 0.55rem; font-size: 0.78rem; }
  #my-calendars-btn span:last-child { display: none; }
  .theme-chip { padding: 0.45rem 0.52rem; gap: 0.42rem; }
  .theme-swatch { width: 18px; height: 18px; }
  .theme-name { font-size: 0.76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .advent-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.45rem; }
  .door-sticker { font-size: 1.2rem; margin-top: 0.35rem; }
  .door-tag { min-width: 19px; height: 18px; font-size: 0.72rem; }
  .steps-grid, .features-grid, .promo-pair, .idea-cards { grid-template-columns: 1fr; }
  .wrap-grid { grid-template-columns: repeat(3, 1fr); }
  .extra-tabs { grid-template-columns: repeat(2, 1fr); }
  .cal-countdown-box { text-align: left; width: 100%; }
  .bulb:nth-child(even) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .flake, .door-today, .door-ready, .confetti-piece { animation: none !important; }
}
