:root {
  --forest-deep: #071918;
  --forest: #0f302c;
  --forest-hi: #194d45;
  --cream: #f7f3ea;
  --paper: #fffdf8;
  --ink: #1e2726;
  --dim: #556360;
  --line: #e2d8c5;
  --coral: #d94b3d;
  --coral-hi: #f06856;
  --coral-d: #96281e;
  --gold: #ecc25b;
  --gold-hi: #ffe08a;
  --gold-d: #9c7216;
  --teal: #1d8a74;
  --felt: #164b3d;
  --felt-d: #0b2b23;
  --wood: #7f532c;
  --wood-hi: #a16f40;
  --wood-d: #482b12;
  --r: 18px;
  --sh: 0 1px 0 #fff inset, 0 2px 0 #e2d8c5, 0 12px 28px rgba(15, 36, 32, 0.08);
}

#ad[data-th="snow"] {
  --felt: #183d63;
  --felt-d: #0d213a;
  --wood: #5e6d7e;
  --wood-hi: #8092a6;
  --wood-d: #323c47;
}
#ad[data-th="candy"] {
  --felt: #6a1d39;
  --felt-d: #3c0d1f;
  --wood: #6e3f28;
  --wood-hi: #92583b;
  --wood-d: #3f2012;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.62;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .serif {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

a { color: var(--coral-d); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--coral); }

img { max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 700;
  z-index: 9999;
}
.skip:focus { left: 12px; top: 12px; border-radius: 8px; }

.hide { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap-text { max-width: 750px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top {
  background: rgba(7, 25, 24, 0.9);
  border-bottom: 1px solid rgba(236, 194, 91, 0.14);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
}
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}
.brand:hover { color: var(--gold-hi); }
.site-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: 0 0 auto;
  box-shadow: 0 2px 10px rgba(236, 194, 91, 0.25);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.top-nav a {
  color: rgba(247, 243, 234, 0.86);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.18s;
}
.top-nav a:hover { color: var(--gold-hi); }
.top-nav .nav-cta {
  background: rgba(236, 194, 91, 0.15);
  border: 1px solid rgba(236, 194, 91, 0.48);
  color: var(--gold-hi);
  padding: 5px 13px;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.2s;
}
.top-nav .nav-cta:hover { background: var(--gold); color: var(--forest-deep); }

/* Hero / App Section — Nordic Evergreen + Breathing Aurora Borealis */
.app {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(95% 75% at 15% 5%, rgba(36, 152, 126, 0.32) 0%, transparent 60%),
    radial-gradient(80% 70% at 88% 12%, rgba(236, 194, 91, 0.16) 0%, transparent 55%),
    linear-gradient(175deg, var(--forest-hi) 0%, var(--forest) 45%, var(--forest-deep) 100%);
  color: #fff;
  padding: 26px 16px 50px;
}
.app-full { min-height: calc(100vh - 220px); }

.xdeco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Flowing Aurora Borealis light ribbons */
.xdeco::before,
.xdeco::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  height: 280px;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.36;
  will-change: transform, opacity;
}
.xdeco::before {
  top: -110px;
  background: linear-gradient(90deg, transparent, #2be2b8, #4bc9e6, #ecc25b, transparent);
  animation: auroraDrift 14s ease-in-out infinite alternate;
}
.xdeco::after {
  top: -50px;
  background: linear-gradient(90deg, transparent, #58f0c8, #a78bfa, #f5b963, transparent);
  opacity: 0.22;
  animation: auroraDrift 19s ease-in-out infinite alternate-reverse;
}
@keyframes auroraDrift {
  0% { transform: translateX(-6%) rotate(-2deg) scaleY(0.92); opacity: 0.24; }
  50% { transform: translateX(4%) rotate(1.5deg) scaleY(1.12); opacity: 0.4; }
  100% { transform: translateX(8%) rotate(-1deg) scaleY(0.98); opacity: 0.28; }
}

.xsnow {
  position: absolute;
  inset: -80px 0 0;
  background-image:
    radial-gradient(2px 2px at 12% 18%, rgba(255,255,255,0.72) 50%, transparent 51%),
    radial-gradient(2.6px 2.6px at 34% 62%, rgba(255,255,255,0.5) 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 58% 16%, rgba(255,232,165,0.75) 50%, transparent 51%),
    radial-gradient(2.4px 2.4px at 82% 44%, rgba(255,255,255,0.58) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 24% 84%, rgba(236,194,91,0.65) 50%, transparent 51%),
    radial-gradient(2px 2px at 74% 80%, rgba(255,255,255,0.52) 50%, transparent 51%);
  background-size: 400px 340px;
  animation: snowfall 20s linear infinite;
}
.xs2 {
  background-size: 290px 260px;
  opacity: 0.55;
  animation-duration: 32s;
  animation-direction: reverse;
}
@keyframes snowfall {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(24px, 280px, 0); }
}

#ad {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.hd h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4.2vw, 2.45rem);
  color: #fff;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.35);
}
.hd h1 small {
  display: block;
  margin-top: 5px;
  font-family: "Inter", sans-serif;
  font-size: clamp(0.88rem, 2.2vw, 1.02rem);
  font-weight: 500;
  color: var(--gold-hi);
  letter-spacing: 0;
}
.hd .link {
  background: rgba(255, 253, 248, 0.11);
  border: 1px solid rgba(236, 194, 91, 0.36);
  color: #fffdf8;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.18s, transform 0.15s, border-color 0.18s;
}
.hd .link:hover {
  background: rgba(236, 194, 91, 0.22);
  border-color: var(--gold);
  transform: translateY(-1px);
}

/* Tactile Heirloom Advent Board */
.grid {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 16px),
    radial-gradient(circle at 50% 22%, var(--felt) 0%, var(--felt-d) 100%);
  border: 10px solid var(--wood);
  border-radius: 22px;
  padding: 13px;
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.5),
    inset 0 0 0 2px rgba(236, 194, 91, 0.26),
    0 0 0 2px var(--wood-d),
    0 22px 48px rgba(3, 14, 13, 0.58);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.door {
  position: relative;
  aspect-ratio: 0.92 / 1;
  border: 0;
  padding: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.24s cubic-bezier(0.22, 1.35, 0.36, 1), box-shadow 0.22s ease, filter 0.2s ease;
  color: #fff;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: doorPop 0.42s cubic-bezier(0.22, 1.25, 0.36, 1) backwards;
  animation-delay: calc(var(--i, 0) * 16ms);
}
@keyframes doorPop {
  from { opacity: 0; transform: translateY(10px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.door:hover {
  transform: translateY(-4px) scale(1.06) rotate(-1.5deg);
  z-index: 4;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}
.door:active { transform: translateY(-1px) scale(0.98); }
.door:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.door.empty {
  border: 1.5px dashed rgba(236, 194, 91, 0.36);
  background: rgba(0, 0, 0, 0.18);
}
.door.empty:hover {
  border-color: var(--gold-hi);
  background: rgba(236, 194, 91, 0.16);
}
.door.empty .dnum {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(0.95rem, 2.5vw, 1.25rem);
  color: rgba(255, 248, 230, 0.82);
}

.door.selected {
  border: 2.5px solid #fff !important;
  box-shadow: 0 0 0 3px rgba(236, 194, 91, 0.8), 0 8px 20px rgba(0, 0, 0, 0.38);
  background: rgba(236, 194, 91, 0.24);
  transform: scale(1.06);
  z-index: 5;
}

.door.today-ring {
  box-shadow: 0 0 0 2.5px var(--gold-hi), 0 0 20px rgba(236, 194, 91, 0.72);
  animation: todayPulse 2.6s ease-in-out infinite;
}
@keyframes todayPulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(236, 194, 91, 0.5); }
  50% { box-shadow: 0 0 0 3.5px var(--gold-hi), 0 0 24px rgba(255, 224, 138, 0.85); }
}

.door.ready {
  animation: giftWiggle 2.3s ease-in-out infinite;
}
@keyframes giftWiggle {
  0%, 66%, 100% { transform: rotate(0deg) scale(1); }
  74% { transform: rotate(-4deg) scale(1.06); }
  81% { transform: rotate(4deg) scale(1.07); }
  88% { transform: rotate(-2.5deg) scale(1.03); }
}

.door svg.gift-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.32));
}

.door .d-sticker {
  position: absolute;
  top: -4px;
  right: -4px;
  width: clamp(20px, 4.4vw, 26px);
  height: clamp(20px, 4.4vw, 26px);
  border-radius: 50%;
  background: #fffdf8;
  border: 1.5px solid rgba(156, 114, 22, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(11px, 2.3vw, 14px);
  line-height: 1;
}

.door .d-from {
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: #fffdf8;
  color: var(--ink);
  font-size: clamp(9px, 1.8vw, 11px);
  font-weight: 700;
  line-height: 1.25;
  padding: 2px 3px;
  border-radius: 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
}

.door.opened {
  background: linear-gradient(180deg, #fffefb 0%, #f4e6c7 100%);
  border: 1.5px solid #d5b46e;
  box-shadow: inset 0 2px 6px rgba(130, 90, 20, 0.14), 0 4px 10px rgba(0, 0, 0, 0.22);
}
.door.opened .open-num {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--gold-d);
  margin-bottom: 12px;
}

.door.wrap-gold::after,
.door.wrap-aurora::after,
.door.wrap-frost::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 9px;
  pointer-events: none;
  background: linear-gradient(125deg, transparent 28%, rgba(255, 255, 255, 0.48) 50%, transparent 72%);
  background-size: 240% 240%;
  animation: foilShimmer 3.2s ease-in-out infinite;
}
@keyframes foilShimmer {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

/* Operation Card Panel */
.panel {
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  padding: 22px;
  border: 1px solid rgba(236, 194, 91, 0.45);
  box-shadow: 0 22px 46px rgba(3, 14, 13, 0.44), inset 0 1px 0 #fff;
  animation: panelEnter 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes panelEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel h2, .panel h3 {
  margin: 0 0 8px;
  color: var(--ink);
}
.panel p { margin: 0 0 12px; }
.panel .msg { color: var(--dim); text-align: center; padding: 18px 0; }

.status-box {
  background: linear-gradient(180deg, #f3faf7 0%, #e7f4ef 100%);
  border: 1px solid #bfe0d4;
  border-radius: 15px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.status-box.ready-box {
  background: linear-gradient(180deg, #fff9e6 0%, #ffefc0 100%);
  border-color: #e6c05e;
}
.status-box h2 { font-size: 1.16rem; margin-bottom: 4px; }
.status-box p { margin: 0; font-size: 0.92rem; color: var(--dim); }

/* Twinkling String Lights Progress Bar */
.lights-wrap { margin: 12px 0 14px; text-align: center; }
.lights-svg { width: 100%; height: 28px; display: block; }
.lights-svg .lit-a { animation: bulbTwinkle 2.2s ease-in-out infinite; }
.lights-svg .lit-b { animation: bulbTwinkle 2.2s ease-in-out 1.1s infinite; }
@keyframes bulbTwinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.68; }
}
.lights-cap { font-size: 0.84rem; color: var(--dim); margin-top: 2px; font-weight: 500; }

/* Forms & Inputs */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field input[type="text"],
.field textarea {
  width: 100%;
  border: 2px solid #dfd3bc;
  border-radius: 13px;
  padding: 11px 13px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field input[type="text"]:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3.5px rgba(29, 138, 116, 0.18);
}

.note-area {
  background-color: #fffefb !important;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 27px,
    rgba(212, 196, 162, 0.42) 27px,
    rgba(212, 196, 162, 0.42) 28px
  );
  line-height: 28px !important;
  min-height: 112px;
  resize: vertical;
}
.char-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--dim);
  margin-top: 4px;
}

/* Theme & Wrap Pills */
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  flex: 1 1 auto;
  border: 2px solid #e2d8c5;
  background: #f7f3ea;
  color: var(--ink);
  border-radius: 13px;
  padding: 9px 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.pill:hover { border-color: var(--teal); background: #fff; transform: translateY(-1px); }
.pill.on {
  border-color: var(--teal);
  background: #effaf6;
  color: #0e5344;
  box-shadow: 0 0 0 2.5px rgba(29, 138, 116, 0.18);
}
.pill small { display: block; font-size: 0.74rem; font-weight: 500; color: var(--dim); }

/* Stickers */
.stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.stk-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #e2d8c5;
  background: #f7f3ea;
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1.4, 0.36, 1), border-color 0.15s;
}
.stk-btn:hover { transform: scale(1.12); background: #fff; }
.stk-btn.on {
  border-color: var(--coral);
  background: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(217, 75, 61, 0.22);
}

/* Ideas chips */
.ideas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}
.idea-chip {
  border: 1px solid #dfd3bc;
  background: #faf5e9;
  color: var(--ink);
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.idea-chip:hover { background: #fff; border-color: var(--teal); transform: translateY(-1px); }

/* Checkboxes */
.chk {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9rem;
  margin: 9px 0;
  cursor: pointer;
}
.chk input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--teal); flex: 0 0 auto; }

/* Primary CTA Button with Glossy Sweep */
.btn-main {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(180deg, var(--coral-hi) 0%, var(--coral) 52%, #bd3628 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.34),
    0 4px 0 var(--coral-d),
    0 12px 24px rgba(150, 40, 30, 0.3);
  transition: transform 0.14s ease, filter 0.18s ease, box-shadow 0.14s ease;
}
.btn-main::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transition: left 0.55s ease;
}
.btn-main:hover::after { left: 135%; }
.btn-main:hover { filter: brightness(1.04); color: #fff; transform: translateY(-1px); }
.btn-main:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--coral-d); }
.btn-main:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-main.big { width: auto; padding: 15px 30px; font-size: 1.08rem; }

.btn-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid #d9ccb4;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 0 #e2d8c5;
  transition: all 0.16s ease;
}
.btn-sec:hover { background: #f3faf7; border-color: var(--teal); color: #0e5344; transform: translateY(-1px); }
.btn-sec.full { width: 100%; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row > .btn-main { flex: 1 1 180px; width: auto; }

/* Share grid */
.share-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.share-btn {
  border: 1.5px solid #dfd3bc;
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 9px 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 0 #e4dac8;
  transition: transform 0.16s, border-color 0.16s, background 0.16s;
}
.share-btn:hover { background: #f3faf7; border-color: var(--teal); transform: translateY(-2px); }
.share-btn .ico { font-size: 1.15rem; }

.social-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 12px 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.code-strip {
  background: #f7f3ea;
  border: 1.5px dashed #cbbba0;
  border-radius: 13px;
  padding: 10px 12px;
  text-align: center;
  margin: 12px 0;
  font-size: 0.84rem;
  color: var(--dim);
}
.code-val {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--forest-deep);
  letter-spacing: 0.08em;
  background: #fff;
  padding: 4px 12px;
  border-radius: 9px;
  border: 1.5px solid #d9ccb4;
  margin: 5px 0;
  cursor: pointer;
  transition: transform 0.14s, border-color 0.14s;
}
.code-val:hover { border-color: var(--teal); transform: scale(1.03); }

.mini-card {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 15px;
  background: #f7f3ea;
  border: 1px solid #e2d8c5;
  font-size: 0.88rem;
}
.mini-card h3 { font-size: 1rem; margin: 0 0 6px; }
.mini-card p { margin: 0 0 8px; color: var(--dim); }

.sf-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(90deg, #0d2f2b, #17544a);
  color: #fff;
  border-radius: 13px;
  padding: 9px 13px;
  margin-bottom: 12px;
  font-size: 0.86rem;
  box-shadow: 0 4px 12px rgba(13, 47, 43, 0.22);
}
.sf-bar b { color: var(--gold-hi); }
.sf-bar button {
  border: 1px solid rgba(236, 194, 91, 0.45);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.sf-bar button:hover { background: var(--gold); color: var(--forest-deep); border-color: var(--gold); }

.circle-list { display: flex; flex-direction: column; gap: 8px; }
.circle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid #e2d8c5;
  border-radius: 11px;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}
.circle-item:hover { border-color: var(--teal); transform: translateX(2px); }

.owner-tools {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e8dfd0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.82rem;
}
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--coral-d);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}
.link-btn.danger { color: #a6261d; }

.err-msg {
  background: #fff0ee;
  border: 1px solid #f0b8b2;
  color: #8f2218;
  border-radius: 11px;
  padding: 9px 12px;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.flash {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--forest-deep);
  color: #fff;
  border: 1px solid rgba(236, 194, 91, 0.7);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 999;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  animation: toastIn 0.25s cubic-bezier(0.22, 1.3, 0.36, 1);
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 14px) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* Confetti overlay canvas */
#awf-confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
}

/* Modal / Dialog with spring animation */
.tip {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(5, 20, 19, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.tip-card {
  background: var(--paper);
  color: var(--ink);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.5);
  border: 1.5px solid #dfd3bc;
  position: relative;
  animation: modalSpring 0.3s cubic-bezier(0.22, 1.25, 0.36, 1);
}
@keyframes modalSpring {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.tip-head h3 { margin: 0; font-size: 1.25rem; }

.note-card {
  background-color: #fffefb;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 29px,
    rgba(212, 196, 162, 0.45) 29px,
    rgba(212, 196, 162, 0.45) 30px
  );
  border: 1.5px solid #dfd0b0;
  border-radius: 15px;
  padding: 14px 16px;
  margin: 12px 0;
  box-shadow: inset 0 1px 0 #fff;
}
.note-from {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: var(--coral-d);
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.note-body {
  font-size: 1.05rem;
  line-height: 30px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.note-doodle {
  display: block;
  width: 100%;
  max-height: 165px;
  object-fit: contain;
  margin-top: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e6dcc8;
  padding: 4px;
}

/* Dual-Mode Switcher */
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: #efe9dc;
  margin-bottom: 16px;
}
.mode-tab {
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  background: transparent;
  color: var(--dim);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}
.mode-tab.on {
  background: #fff;
  color: var(--forest);
  box-shadow: 0 2px 8px rgba(15, 48, 44, 0.12);
}

/* Mini Doodle Pad */
.doodle-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 1.5px dashed #cbbba0;
  background: #faf5e9;
  color: var(--ink);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
}
.doodle-toggle:hover { border-color: var(--teal); background: #f3faf7; }
.doodle-wrap {
  border: 1.5px solid #dfd3bc;
  border-radius: 14px;
  padding: 10px;
  background: #fff;
  margin-bottom: 12px;
}
.doodle-cv {
  width: 100%;
  height: 150px;
  display: block;
  border-radius: 10px;
  background: #fffefb;
  border: 1px solid #ebe2cf;
  touch-action: none;
  cursor: crosshair;
}
.doodle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.doodle-colors { display: flex; gap: 6px; align-items: center; }
.dcol {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px #d4c6ab;
  cursor: pointer;
  padding: 0;
}
.dcol.on { box-shadow: 0 0 0 2.5px var(--forest); transform: scale(1.12); }
.doodle-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-hi);
  border: 1px solid var(--gold-d);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* Scratch-off canvas wrapper */
.scratch-box {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
.scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  border-radius: 15px;
}

/* Mini-game canvas */
.game-canvas {
  width: 100%;
  height: 290px;
  display: block;
  border-radius: 15px;
  background: linear-gradient(180deg, #071918 0%, #164b3d 100%);
  border: 2px solid #d5c5a5;
  touch-action: manipulation;
  cursor: pointer;
}

.next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 24px auto 0;
  width: fit-content;
  color: rgba(247, 243, 234, 0.8);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.2s, color 0.2s;
}
.next:hover { color: var(--gold-hi); transform: translateY(2px); }

/* Landing Sections */
.sec { padding: 66px 0; }
.sec:nth-of-type(even) { background: var(--paper); }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 8px;
}
.sec h2 {
  font-size: clamp(1.65rem, 3.6vw, 2.3rem);
  margin: 0 0 12px;
  color: var(--ink);
}
.sec-lede {
  color: var(--dim);
  font-size: 1.04rem;
  margin: 0 0 34px;
  max-width: 620px;
}

/* Scroll reveal enhancement (progressively enhanced by JS, readable without JS) */
.reveal-ready {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-ready.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* How it works */
.how-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.how-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--sh);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.how-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(15, 48, 44, 0.12);
}
.phone {
  margin: 0;
  border-radius: 15px;
  overflow: hidden;
  border: 3px solid var(--forest);
  background: var(--forest-deep);
  aspect-ratio: 9 / 14;
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.how-txt .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.how-txt h3 { margin: 0 0 6px; font-size: 1.1rem; }
.how-txt p { margin: 0; font-size: 0.92rem; color: var(--dim); }

/* Features grid */
.feat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--sh);
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.feat:hover { transform: translateY(-3px); border-color: #b7d7cc; }
.feat .orn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ebf7f3, #fcf2da);
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.feat h3 { margin: 0 0 6px; font-size: 1.12rem; }
.feat p { margin: 0; font-size: 0.94rem; color: var(--dim); }

/* Guide prose */
.prose h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 34px 0 12px;
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; font-size: 1.02rem; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; font-size: 1rem; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-list details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px 18px;
  box-shadow: 0 2px 8px rgba(15, 36, 32, 0.05);
  transition: border-color 0.18s;
}
.faq-list details[open] { border-color: #b6d6cb; }
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-size: 1.35rem;
  color: var(--teal);
  font-weight: 400;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 10px 0 2px; color: var(--dim); font-size: 0.96rem; }

/* CTA Banner */
.cta {
  background:
    radial-gradient(80% 90% at 15% 15%, rgba(43, 226, 184, 0.18), transparent 60%),
    linear-gradient(135deg, var(--forest-deep) 0%, #15453d 100%);
  color: #fff;
  padding: 62px 0;
}
.cta-in {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 34px;
  align-items: center;
}
.cta-art {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
}
.cta-txt h2 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.35rem); margin: 0 0 10px; }
.cta-txt p { color: rgba(247, 243, 234, 0.86); margin: 0 0 20px; font-size: 1.05rem; }
.cta-small { font-size: 0.86rem !important; color: var(--gold-hi) !important; margin: 12px 0 0 !important; }

/* Comments section */
.talk-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--sh);
  margin-bottom: 22px;
}
.talk-form label { display: block; margin-bottom: 12px; }
.talk-form label span { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 5px; }
.talk-form input, .talk-form textarea {
  width: 100%;
  border: 1.5px solid #d9ccb4;
  border-radius: 11px;
  padding: 10px 12px;
  background: #fffefb;
}
.talk-form input:focus, .talk-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29, 138, 116, 0.16);
}
.talk-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.talk-row .btn-main { width: auto; padding: 10px 22px; font-size: 0.95rem; }
.replying { font-size: 0.88rem; background: #edf8f4; padding: 6px 11px; border-radius: 8px; margin: 0 0 10px; }

.talk-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px 16px;
}
.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  margin: 0 0 6px;
  flex-wrap: wrap;
}
.comment-head time { color: var(--dim); font-size: 0.8rem; }
.comment-body { margin: 0 0 8px; font-size: 0.96rem; white-space: pre-wrap; }
.comment-replies {
  margin-top: 10px;
  padding-left: 16px;
  border-left: 2px solid #c9dfd6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Legal / Doc pages */
.page-doc main { flex: 1 0 auto; }
.doc { padding: 44px 20px 68px; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.45rem); margin: 0 0 12px; }
.doc .updated { font-size: 0.88rem; color: var(--dim); margin-bottom: 24px; }

/* Footer */
.bottom {
  margin-top: auto;
  background: var(--forest-deep);
  color: rgba(247, 243, 234, 0.82);
  padding: 42px 0 38px;
  border-top: 1px solid rgba(236, 194, 91, 0.16);
}
.bottom-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.28rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.bottom-note { max-width: 600px; font-size: 0.92rem; margin: 0 0 18px; color: rgba(247, 243, 234, 0.72); }
.bottom-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 18px;
}
.bottom-nav a { color: #fffdf8; font-size: 0.9rem; text-decoration: none; }
.bottom-nav a:hover { color: var(--gold-hi); text-decoration: underline; }
.bottom-small { margin: 0; font-size: 0.82rem; color: rgba(247, 243, 234, 0.55); }

/* Desktop two-column app layout */
@media (min-width: 860px) {
  .app { padding: 32px 24px 54px; }
  #ad {
    grid-template-columns: minmax(0, 1.25fr) minmax(350px, 0.92fr);
    gap: 20px 28px;
  }
  .hd { grid-column: 1 / -1; }
  .grid { gap: 10px; padding: 16px; }
}

@media (max-width: 859px) {
  .how-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-in { grid-template-columns: 1fr; text-align: center; }
  .cta-art { max-width: 240px; margin: 0 auto; }
}

@media (max-width: 560px) {
  .how-list { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .grid { border-width: 7px; padding: 8px; gap: 5px; }
  .panel { padding: 16px; }
  .top-in { min-height: 52px; gap: 8px; }
  .brand { font-size: 0.98rem; gap: 7px; }
  .site-icon { width: 28px; height: 28px; }
  .top-nav { gap: 11px; flex-wrap: nowrap; }
  .top-nav a { font-size: 0.82rem; white-space: nowrap; }
  .top-nav a[href="#how"],
  .top-nav a[href="/#how"],
  .top-nav a[href="#guide"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
