/* ============================================================
   Dear Santa: scrapbook on thick cardstock
   Flat colours, paper grain, tape, stickers. No gradients-as-decoration, no glow.
   ============================================================ */
:root {
  --font-display: 'Bagel Fat One', 'DM Sans', system-ui, sans-serif;
  --font-hand: 'Caveat', 'Comic Sans MS', cursive;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* cardstock palette */
  --cream: #F7EEDC;
  --paper: #FFFBF2;
  --kraft: #D3AE84;
  --pink: #F4A7B0;
  --sky: #9CC3E6;
  --mint: #BFE3CF;
  --mustard: #F2B33D;
  --tomato: #D9483B;
  --tangerine: #EF7D32;
  --cobalt: #2F5DA8;
  --pine: #2E7D4F;
  --ink: #2B2118;
  --ink-soft: rgba(43, 33, 24, .55);

  /* defaults = home (mustard sheet) */
  --bg-solid: var(--mustard);
  --on-bg: var(--ink);
  --accent: var(--tomato);
  --on-accent: var(--paper);
  --tape: var(--pink);
  --sheet2: var(--sky);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .13 0 0 0 0 .09 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --fibers: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .35' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .22 -.04'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");

  --lift: 0 1px 0 rgba(43, 33, 24, .14), 0 12px 18px -12px rgba(43, 33, 24, .55);
  --lift-sm: 0 1px 0 rgba(43, 33, 24, .14), 0 6px 10px -6px rgba(43, 33, 24, .5);
  --sticker: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(1px 3px 2px rgba(43, 33, 24, .3));
}

/* ---------- sheets (themes) ---------- */
body[data-theme='tomato']    { --bg-solid: var(--tomato);    --on-bg: var(--paper); --accent: var(--pine);   --tape: var(--mustard); --sheet2: var(--mint); }
body[data-theme='tangerine'] { --bg-solid: var(--tangerine); --on-bg: var(--ink);   --accent: var(--cobalt); --tape: var(--sky);     --sheet2: var(--pink); }
body[data-theme='mustard']   { --bg-solid: var(--mustard);   --on-bg: var(--ink);   --accent: var(--tomato); --tape: var(--pink);    --sheet2: var(--sky); }
body[data-theme='cobalt']    { --bg-solid: var(--cobalt);    --on-bg: var(--paper); --accent: var(--tangerine); --on-accent: var(--ink); --tape: var(--mustard); --sheet2: var(--pink); }
body[data-theme='pine']      { --bg-solid: var(--pine);      --on-bg: var(--paper); --accent: var(--tomato); --tape: var(--mustard); --sheet2: var(--pink); }
body[data-page='lost']       { --bg-solid: var(--cobalt);    --on-bg: var(--paper); --accent: var(--tangerine); --on-accent: var(--ink); --tape: var(--mustard); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--mustard); overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; overflow-x: clip;
  font-family: var(--font-body); color: var(--on-bg); background: transparent;
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: var(--fibers), var(--grain), var(--bg-solid);
  transition: background-color .5s ease;
}
[hidden] { display: none !important; }
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; opacity: .9; }
#app { position: relative; z-index: 2; max-width: 1160px; margin: 0 auto; padding: 4px 20px 70px; outline: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
.muted { color: var(--ink-soft); }
.art-wrap .art { width: 100%; height: auto; display: block; overflow: visible; }
.sticker { filter: var(--sticker); }

/* a piece of washi tape, reusable */
.tape, .card::before, .paper-wrap::before, #toast::before {
  content: ''; position: absolute; z-index: 3; width: 96px; height: 26px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.28) 0 6px, transparent 6px 14px), var(--tape);
  opacity: .9;
  clip-path: polygon(3% 0, 97% 6%, 100% 30%, 97% 52%, 100% 78%, 96% 100%, 4% 94%, 0 70%, 3% 48%, 0 22%);
}

/* ---------- bunting ---------- */
.bunting {
  position: relative; z-index: 3; display: flex; justify-content: space-between;
  list-style: none; margin: 0; padding: 0 6px; height: 74px; overflow: hidden; pointer-events: none;
}
.bunting::before {
  content: ''; position: absolute; left: -2%; right: -2%; top: -46px; height: 64px;
  border-bottom: 2px solid rgba(43, 33, 24, .55); border-radius: 0 0 50% 50% / 0 0 26px 26px;
}
.bunting li {
  width: 40px; height: 46px; margin-top: calc(14px + var(--drop));
  background: var(--grain), var(--c);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0; animation: flutter 3.6s ease-in-out var(--delay) infinite;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.15));
}
@keyframes flutter { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }

/* ---------- top bar ---------- */
.topbar { position: relative; z-index: 5; display: flex; align-items: center; gap: 14px; max-width: 1160px; margin: -6px auto 0; padding: 0 20px 10px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-bg); }
.logo-hat { width: 38px; height: 38px; filter: var(--sticker); transform: rotate(-8deg); transition: transform .3s; }
.logo:hover .logo-hat { transform: rotate(8deg) scale(1.1); }
.logo-text { font-family: var(--font-display); font-size: 1.45rem; white-space: nowrap; letter-spacing: .01em; }

.countdown {
  margin-left: auto; position: relative; display: flex; align-items: baseline; gap: 6px;
  padding: 6px 16px 6px 18px; color: var(--ink); background: var(--grain), var(--paper);
  transform: rotate(2deg); box-shadow: var(--lift-sm);
  /* ticket stub: punched notches on both ends */
  mask: radial-gradient(circle 7px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle 7px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.cd-num { font-family: var(--font-display); font-size: 1.5rem; color: var(--tomato); line-height: 1; }
.cd-label { font-family: var(--font-hand); font-size: 1.3rem; font-weight: 700; line-height: 1; white-space: nowrap; }
.lang-toggle {
  width: 50px; height: 50px; flex-shrink: 0; border-radius: 50%; border: 0; cursor: pointer;
  font-family: var(--font-display); font-size: 1rem; color: var(--ink);
  background: var(--grain), var(--paper); box-shadow: var(--lift-sm), inset 0 0 0 5px var(--paper), inset 0 0 0 7px var(--tomato);
  transform: rotate(-6deg); transition: transform .3s cubic-bezier(.3,1.7,.5,1);
}
.lang-toggle:hover { transform: rotate(12deg) scale(1.08); }

/* ---------- sticker-letter titles ---------- */
.sticker-title { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.25; }
.sticker-title .word { display: inline-block; white-space: nowrap; margin-right: .12em; }
.sticker-title .lt {
  display: inline-block; padding: .02em .16em .06em; margin: .05em .03em; color: var(--ink);
  background: var(--grain), var(--c, var(--paper));
  transform: rotate(var(--r)); box-shadow: var(--lift-sm);
  animation: slap .5s cubic-bezier(.3,1.7,.5,1) both; animation-delay: calc(var(--k) * 55ms + .1s);
  transition: transform .2s cubic-bezier(.3,1.7,.5,1);
}
.sticker-title .lt:hover { transform: rotate(calc(var(--r) * -2)) translateY(-4px) scale(1.08); }
.sticker-title .c0 { --c: var(--paper); } .sticker-title .c1 { --c: var(--pink); } .sticker-title .c2 { --c: var(--sky); }
.sticker-title .c3 { --c: var(--mint); } .sticker-title .c4 { --c: #FFE08A; } .sticker-title .c5 { --c: #F6C9A0; }
.sticker-title .c1 { border-radius: 50% 50% 8px 8px / 30% 30% 8px 8px; }
.sticker-title .c3 { border-radius: 4px 14px 4px 14px; }
@keyframes slap { from { opacity: 0; transform: rotate(calc(var(--r) * 4)) scale(1.9); } 70% { opacity: 1; } }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 4px; padding: 12px 22px; cursor: pointer; text-decoration: none;
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .01em;
  transform: rotate(-1deg); box-shadow: var(--lift-sm);
  transition: transform .2s cubic-bezier(.3,1.7,.5,1), box-shadow .2s;
}
.btn:hover { transform: rotate(1deg) translateY(-3px); box-shadow: var(--lift); }
.btn:active { transform: rotate(0) translateY(1px); box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn:focus-visible, .icon-btn:focus-visible, .star-btn:focus-visible, .icon-action:focus-visible, .lang-toggle:focus-visible, .swatch input:focus-visible + .swatch-paper {
  outline: 3px dashed var(--ink); outline-offset: 4px;
}
.btn-primary { background: var(--grain), var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink-soft); font-family: var(--font-body); font-weight: 600; }
.btn-elf { background: var(--grain), var(--pine); color: var(--paper); }
.btn-small { padding: 7px 14px; font-size: .92rem; }
.btn-big { padding: 16px 30px; font-size: 1.35rem; }
.btn-gift, .btn-env { display: inline-block; width: 30px; height: 30px; animation: jiggle 2.4s ease-in-out infinite; }
.btn-env { width: 46px; }
.btn .art { width: 100%; height: 100%; display: block; }
.btn.pop { animation: pop .4s; }
@keyframes jiggle { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-10deg) translateY(-3px); } 88% { transform: rotate(8deg); } }

/* ---------- paper cards ---------- */
.card {
  position: relative; color: var(--ink); background: var(--grain), var(--paper);
  border-radius: 3px; padding: 30px 28px 26px; box-shadow: var(--lift);
  transform: rotate(var(--rot, 0deg));
}
.card::before { top: -13px; left: calc(50% - 48px); transform: rotate(-3deg); }
.card-title {
  display: inline-block; margin: 0 0 18px -6px; padding: 4px 14px 6px;
  font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.1;
  color: var(--on-accent); background: var(--grain), var(--accent);
  transform: rotate(-2deg); box-shadow: var(--lift-sm);
}
.section-title { font-family: var(--font-hand); font-weight: 700; font-size: 2rem; margin: 0 0 8px; color: var(--on-bg); }

/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-weight: 600; font-size: .95rem; }
.field.grow { flex: 1; margin-bottom: 0; }
input:not([type='radio']):not([type='range']), textarea {
  width: 100%; padding: 12px 14px; border-radius: 3px; font-weight: 400; font-size: 1rem;
  border: 2px solid rgba(43, 33, 24, .7); background: #fff; color: var(--ink);
  transition: box-shadow .15s, transform .15s;
}
input:focus, textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--tape); transform: translate(-1px, -1px); }
input::placeholder, textarea::placeholder { color: rgba(43,33,24,.42); }
textarea { resize: vertical; }

.theme-picker { border: 0; padding: 0; margin: 0 0 22px; }
.theme-picker legend { font-weight: 600; font-size: .95rem; margin-bottom: 10px; padding: 0; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-size: .8rem; font-weight: 600; text-align: center; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-paper {
  position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 2px; box-shadow: var(--lift-sm);
  transition: transform .25s cubic-bezier(.3,1.7,.5,1);
}
.swatch:nth-child(odd) .swatch-paper { transform: rotate(-3deg); }
.swatch:nth-child(even) .swatch-paper { transform: rotate(2deg); }
.swatch-tomato .swatch-paper { background: var(--fibers), var(--grain), var(--tomato); }
.swatch-tangerine .swatch-paper { background: var(--fibers), var(--grain), var(--tangerine); }
.swatch-mustard .swatch-paper { background: var(--fibers), var(--grain), var(--mustard); }
.swatch-cobalt .swatch-paper { background: var(--fibers), var(--grain), var(--cobalt); }
.swatch-pine .swatch-paper { background: var(--fibers), var(--grain), var(--pine); }
.swatch:hover .swatch-paper { transform: rotate(0) translateY(-4px); }
.swatch input:checked + .swatch-paper { transform: rotate(0) translateY(-6px) scale(1.06); box-shadow: var(--lift); }
.swatch input:checked + .swatch-paper::after {
  content: '✓'; position: absolute; right: -8px; top: -8px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: var(--ink); background: var(--paper);
  box-shadow: var(--lift-sm); animation: slap .35s cubic-bezier(.3,1.7,.5,1); --r: 0deg;
}

/* ---------- HOME ---------- */
.home-hero { position: relative; min-height: 430px; display: grid; place-items: center; padding: 10px 0 0; }
.hero-center { position: relative; z-index: 2; text-align: center; max-width: 640px; }
.hero-title { font-size: clamp(3rem, 9vw, 6.2rem); }
.tagline { font-family: var(--font-hand); font-weight: 700; font-size: 2.1rem; margin: 4px 0 18px; transform: rotate(-2deg); }
.note {
  position: relative; display: inline-block; max-width: 520px; margin: 0; padding: 20px 26px 18px;
  font-size: 1.05rem; line-height: 1.55; color: var(--ink); background: var(--grain), var(--paper);
  transform: rotate(1.5deg); box-shadow: var(--lift-sm);
  /* torn bottom edge */
  clip-path: polygon(0 0, 100% 0, 100% 92%, 96% 97%, 91% 93%, 86% 99%, 80% 94%, 74% 98%, 68% 93%, 61% 99%, 55% 94%, 48% 98%, 42% 93%, 35% 99%, 29% 94%, 22% 98%, 16% 93%, 10% 99%, 5% 94%, 0 98%);
  animation: pop-in .6s cubic-bezier(.3,1.6,.5,1) .7s both;
}
.home-hero .sticker { position: absolute; z-index: 1; }
.hero-santa { width: 170px; right: 2%; top: 6px; transform: rotate(9deg); animation: bob 4s ease-in-out infinite; }
.hero-tree { width: 130px; left: 3%; top: 150px; animation: rock 5s ease-in-out infinite; }
.hero-gift { width: 92px; left: 13%; top: 20px; animation: bob 3.4s ease-in-out .8s infinite; }
.hero-ginger { width: 96px; right: 14%; top: 250px; animation: rock 3.2s ease-in-out infinite; }
.hero-snowman { width: 110px; left: 14%; top: 300px; animation: bob 4.4s ease-in-out 1.4s infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes rock { 0%, 100% { rotate: -5deg; } 50% { rotate: 5deg; } }

.doodle { position: absolute; color: var(--on-bg); opacity: .8; pointer-events: none; }
.doodle path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.d1 { width: 48px; left: 30%; top: 8px; transform: rotate(-12deg); }
.d1 path { animation-delay: .4s; }
.d2 { width: 56px; right: 26%; top: 60px; } .d2 path { animation-delay: .7s; }
.d3 { width: 40px; left: 5%; top: 60px; } .d3 path { animation-delay: 1s; }
.d4 { width: 44px; right: 4%; top: 260px; } .d4 path { animation-delay: 1.2s; }
.d5 { width: 40px; left: 26%; top: 380px; transform: rotate(10deg); } .d5 path { animation-delay: 1.4s; }
.d6 { width: 70px; right: 28%; top: 390px; } .d6 path { animation-delay: 1.6s; }

.home-grid { position: relative; max-width: 560px; margin: 50px auto 0; }
.start-card { --rot: -1deg; padding: 36px 32px 30px; }
.start-card::after { content: ''; position: absolute; inset: 10px; border: 2px dashed rgba(43,33,24,.22); pointer-events: none; }
.start-card .btn-big { width: 100%; margin-top: 4px; }
.start-here {
  position: absolute; left: -170px; top: 40px; width: 160px; color: var(--on-bg); text-align: center;
  font-family: var(--font-hand); font-weight: 700; font-size: 1.9rem; transform: rotate(-8deg);
}
.start-here .doodle { position: relative; width: 90px; margin: -4px auto 0; opacity: 1; transform: rotate(-20deg); }
.start-here .doodle path { animation-delay: 1.8s; }

.my-lists { margin: 60px auto 0; max-width: 900px; text-align: center; }
.tags { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 20px 26px; justify-content: center; }
.gift-tag { position: relative; transform-origin: 6px 50%; animation: swing 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.8s); }
.gift-tag a {
  display: flex; align-items: center; gap: 10px; padding: 10px 22px 12px 30px; text-decoration: none;
  font-family: var(--font-hand); font-weight: 700; font-size: 1.6rem; line-height: 1;
  color: var(--paper); background: var(--fibers), var(--grain), var(--tag, var(--tomato));
  clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 50%);
  filter: drop-shadow(0 3px 2px rgba(0,0,0,.2));
}
.gift-tag.theme-tomato { --tag: var(--tomato); } .gift-tag.theme-tangerine { --tag: var(--tangerine); }
.gift-tag.theme-mustard { --tag: var(--mustard); } .gift-tag.theme-cobalt { --tag: var(--cobalt); } .gift-tag.theme-pine { --tag: var(--pine); }
.gift-tag.theme-mustard a, .gift-tag.theme-tangerine a { color: var(--ink); }
.tag-hole { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-solid); box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.tag-forget {
  position: absolute; top: -10px; right: -10px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: var(--paper); color: var(--ink); cursor: pointer; font-weight: 700; box-shadow: var(--lift-sm);
  opacity: 0; transition: opacity .2s, transform .2s;
}
.gift-tag:hover .tag-forget, .tag-forget:focus-visible { opacity: 1; }
.tag-forget:hover { transform: rotate(90deg); }
@keyframes swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* ---------- EDIT ---------- */
.greeting { display: flex; align-items: center; gap: 22px; margin: 6px 0 26px; }
.greet-santa { width: 100px; flex-shrink: 0; transform: rotate(-6deg); animation: bob 4s ease-in-out infinite; }
.speech {
  position: relative; padding: 14px 24px 16px; color: var(--ink); background: var(--grain), var(--paper);
  font-family: var(--font-hand); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.1;
  border: 2.5px solid var(--ink); border-radius: 26px; transform: rotate(-1.5deg);
  animation: pop-in .6s cubic-bezier(.3,1.6,.5,1) .3s both;
}
.speech p { margin: 0; }
.speech::before {
  content: ''; position: absolute; left: -16px; top: 50%; width: 22px; height: 22px; background: var(--paper);
  border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: translateY(-50%) rotate(45deg) skew(10deg, 10deg);
}
.greet-name { color: var(--tomato); }

.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; align-items: start; }
.col-letter, .col-wishes { display: flex; flex-direction: column; gap: 34px; }
.theme-card { --rot: 1deg; background: var(--grain), var(--sheet2); }
.theme-card::before { display: none; }
.theme-card .theme-picker { margin: 0; }
.wishes-card { --rot: .6deg; background: var(--fibers), var(--grain), var(--kraft); }
.add-card { --rot: -.8deg; background: var(--grain), var(--sheet2); }
.add-card::before { left: 24px; transform: rotate(-8deg); }

/* the letter: notebook page torn out, held by a paper clip */
.paper-wrap { position: relative; filter: drop-shadow(0 1px 0 rgba(43,33,24,.15)) drop-shadow(0 12px 12px rgba(43,33,24,.3)); transform: rotate(-1.2deg); transform-origin: 50% 0; }
.paper-wrap::before { left: auto; right: 34%; top: -10px; transform: rotate(4deg); width: 80px; }
.paper-wrap .clip { position: absolute; z-index: 4; width: 30px; left: 36px; top: -26px; transform: rotate(-4deg); }
.paper {
  position: relative; color: #23305e; padding: 46px 30px 30px 66px;
  background:
    radial-gradient(circle 7px at 22px 50%, var(--bg-solid) 96%, #0000) 0 22px / 44px 34px repeat-y,
    linear-gradient(90deg, #0000 50px, rgba(217,72,59,.55) 50px 52px, #0000 52px),
    repeating-linear-gradient(180deg, #0000 0 33px, rgba(47,93,168,.25) 33px 34px) 0 12px,
    var(--grain), var(--paper);
  clip-path: polygon(0 10px, 3% 4px, 7% 9px, 11% 2px, 15% 8px, 19% 3px, 23% 10px, 27% 4px, 31% 8px, 35% 1px, 39% 9px, 43% 4px, 47% 8px, 51% 2px, 55% 9px, 59% 3px, 63% 8px, 67% 1px, 71% 9px, 75% 4px, 79% 10px, 83% 3px, 87% 8px, 91% 2px, 95% 9px, 100% 4px, 100% 100%, 0 100%);
}
.dear { font-family: var(--font-hand); font-weight: 700; font-size: 2.2rem; margin: 0 0 0; line-height: 34px; }
.letter-text, .letter-read {
  display: block; font-family: var(--font-hand); font-weight: 500; font-size: 1.65rem; line-height: 34px;
  background: transparent !important; border: 0 !important; box-shadow: none !important; transform: none !important;
  padding: 0 !important; color: #23305e !important; min-height: 170px; overflow: hidden; resize: none;
}
.letter-read { white-space: pre-wrap; margin: 0; min-height: 0; }
.signature { font-family: var(--font-hand); font-weight: 700; font-size: 1.8rem; margin: 14px 0 10px; display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; }
.sig-input {
  width: auto !important; max-width: 200px; font-family: var(--font-hand) !important; font-weight: 700; font-size: 1.8rem !important;
  border: 0 !important; border-bottom: 2px dashed rgba(35,48,94,.4) !important; border-radius: 0 !important;
  background: transparent !important; padding: 0 4px !important; color: #23305e !important; text-align: center; box-shadow: none !important; transform: none !important;
}
.stamp-slot { position: absolute; top: -30px; right: -22px; z-index: 5; }
.postmark {
  width: 110px; height: 110px; border-radius: 50%; color: var(--tomato); border: 3px solid currentColor;
  box-shadow: inset 0 0 0 4px transparent, inset 0 0 0 6px currentColor;
  display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-14deg);
  font-family: var(--font-display); text-align: center; background: rgba(255,251,242,.55);
  mask: var(--grain), linear-gradient(#000, #000); mask-composite: exclude;
}
.pm-top { font-size: .72rem; letter-spacing: .1em; }
.pm-mid { font-size: 1.9rem; line-height: 1; }
.pm-date { font-family: var(--font-body); font-weight: 700; font-size: .62rem; max-width: 82px; line-height: 1.1; }
.postmark.thump { animation: thump .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes thump { 0% { transform: scale(2.6) rotate(-30deg); opacity: 0; } 60% { transform: scale(.92) rotate(-12deg); opacity: 1; } 100% { transform: scale(1) rotate(-14deg); } }

/* naughty / nice */
.nice-meter, .nice-read { margin-top: 20px; padding: 14px 16px; background: var(--grain), #FFE9B8; transform: rotate(.8deg); box-shadow: var(--lift-sm); color: var(--ink); }
.nice-read { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nice-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.nice-title { font-weight: 600; }
.nice-face { font-size: 1.8rem; display: inline-block; transform: scale(var(--s, 1)); transition: transform .2s; }
.nice-level { font-family: var(--font-hand); font-weight: 700; font-size: 1.5rem; }
.nice-ends { display: flex; justify-content: space-between; font-size: .82rem; color: var(--ink-soft); margin-top: 6px; }
.nice-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 14px; cursor: pointer; border-radius: 0;
  background: linear-gradient(90deg, var(--tomato) var(--v, 50%), rgba(43,33,24,.16) var(--v, 50%));
  box-shadow: inset 0 0 0 2px rgba(43,33,24,.6);
}
.nice-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 34px; height: 34px; border: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 28 28'%3E%3Cpath fill='%23F2B33D' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round' d='M12 1.5 L15 8.6 L22.6 9.2 L16.8 14.2 L18.6 21.6 L12 17.6 L5.4 21.6 L7.2 14.2 L1.4 9.2 L9 8.6 Z'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,.3)); transition: transform .2s;
}
.nice-slider::-moz-range-thumb {
  width: 34px; height: 34px; border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 28 28'%3E%3Cpath fill='%23F2B33D' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round' d='M12 1.5 L15 8.6 L22.6 9.2 L16.8 14.2 L18.6 21.6 L12 17.6 L5.4 21.6 L7.2 14.2 L1.4 9.2 L9 8.6 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nice-slider:active::-webkit-slider-thumb { transform: scale(1.25) rotate(36deg); }

/* wishes: paper labels stuck on kraft */
.wishes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.wish {
  position: relative; display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px 14px 14px; background: var(--grain), var(--paper); box-shadow: var(--lift-sm);
  transition: transform .25s cubic-bezier(.3,1.7,.5,1);
}
.wish:nth-child(3n+1) { transform: rotate(-.8deg); } .wish:nth-child(3n+2) { transform: rotate(.6deg); } .wish:nth-child(3n) { transform: rotate(-.3deg); }
.wish:hover { transform: rotate(0) translateY(-2px); }
.wish::before {
  content: ''; position: absolute; left: -10px; top: -8px; width: 46px; height: 18px; transform: rotate(-35deg);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.3) 0 5px, transparent 5px 10px), var(--tape); opacity: .9;
  clip-path: polygon(4% 0, 96% 8%, 100% 50%, 96% 100%, 2% 92%, 0 50%);
}
.wish:nth-child(even)::before { background-color: var(--pink); left: auto; right: -10px; transform: rotate(30deg); }
.wish-icon { width: 58px; height: 58px; display: grid; place-items: center; font-size: 2.2rem; filter: var(--sticker); transform: rotate(-6deg); }
.wish:hover .wish-icon { animation: jiggle 1s ease-in-out; }
.wish-body { min-width: 0; }
.wish-title { margin: 0; font-family: var(--font-body); font-size: 1.12rem; font-weight: 600; overflow-wrap: anywhere; }
.wish-note { margin: 2px 0 0; font-family: var(--font-hand); font-weight: 500; font-size: 1.35rem; line-height: 1.1; color: #23305e; overflow-wrap: anywhere; white-space: pre-wrap; }
.wish-link { display: inline-block; margin-top: 4px; font-size: .88rem; color: var(--cobalt); overflow-wrap: anywhere; }
.stars-display { display: flex; align-items: center; gap: 1px; margin-top: 6px; flex-wrap: wrap; }
.star-mini { width: 17px; }
.star.on { fill: var(--mustard); }
.star.off { fill: rgba(43,33,24,.14); }
.stars-label { font-size: .8rem; margin-left: 8px; color: var(--ink-soft); font-weight: 600; }
.wish.s3 .stars-label {
  margin-left: 10px; padding: 1px 7px; color: var(--tomato); font-family: var(--font-display); font-weight: 400; font-size: .72rem; letter-spacing: .04em;
  border: 2px solid currentColor; transform: rotate(-4deg); display: inline-block;
}
.wish-actions { display: grid; grid-template-columns: repeat(2, 32px); gap: 4px; }
.icon-action {
  width: 32px; height: 32px; border-radius: 3px; border: 0; cursor: pointer; font-size: .85rem; color: var(--ink);
  background: var(--grain), var(--cream); transition: transform .15s;
}
.icon-action:hover { transform: scale(1.12) rotate(-8deg); background-color: #FFE08A; }
.icon-action.danger:hover { background-color: var(--pink); }
.wish.editing { display: block; transform: none; padding: 20px; }
.wish.editing::before { display: none; }
.wish.claimed { background: var(--grain), #E3F3E9; }
.elf-area { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.elf-badge { font-weight: 600; font-size: .88rem; color: var(--pine); padding: 4px 10px; border: 2px dashed currentColor; transform: rotate(-2deg); animation: slap .35s cubic-bezier(.3,1.7,.5,1) both; --r: -2deg; }
.elf-badge.mine { color: var(--ink); background: #FFE08A; border-style: solid; border-color: transparent; }
.elf-form { display: flex; flex-direction: column; gap: 6px; width: 220px; }
.elf-form input { padding: 8px 10px !important; font-size: .9rem !important; }

.empty-wishes { text-align: center; padding: 6px 0 0; font-family: var(--font-hand); font-weight: 700; font-size: 1.6rem; }
.empty-elf { width: 110px; margin: 0 auto 6px; transform: rotate(-6deg); animation: bob 3.6s ease-in-out infinite; }

.wish-form .wish-form-top { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 16px; }
.wish-form-preview { width: 60px; height: 60px; flex-shrink: 0; display: grid; place-items: center; font-size: 2.4rem; filter: var(--sticker); transform: rotate(-6deg); }
.wish-form-preview.pop { animation: pop .45s cubic-bezier(.3,1.8,.5,1); }
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.icon-btn {
  aspect-ratio: 1; border-radius: 3px; border: 0; font-size: 1.45rem; cursor: pointer;
  background: var(--grain), rgba(255,251,242,.7); transition: transform .2s cubic-bezier(.3,1.8,.5,1);
}
.icon-btn:hover { transform: scale(1.14) rotate(-8deg); }
.icon-btn.on { background: var(--grain), var(--paper); transform: scale(1.12) rotate(4deg); box-shadow: var(--lift-sm), inset 0 0 0 2px var(--ink); }
.stars-input { display: flex; align-items: center; gap: 2px; }
.star-btn { width: 42px; height: 42px; padding: 3px; border: 0; background: none; cursor: pointer; transition: transform .2s cubic-bezier(.3,1.8,.5,1); }
.star-btn .art { width: 100%; height: 100%; fill: rgba(43,33,24,.16); transition: fill .15s; }
.star-btn.on .art { fill: var(--mustard); filter: drop-shadow(0 0 0 #fff) drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff); }
.star-btn:hover { transform: scale(1.2) rotate(15deg); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* send */
.send-zone { text-align: center; margin: 54px 0 34px; }
.btn-send { background: var(--grain), var(--paper); color: var(--ink); font-size: 1.6rem; padding: 18px 34px; transform: rotate(-2deg); box-shadow: var(--lift), inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--tomato); }
.btn-send::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(-45deg, var(--tomato) 0 10px, transparent 10px 20px, var(--cobalt) 20px 30px, transparent 30px 40px);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); padding: 6px; }
.btn-send:hover { transform: rotate(1deg) translateY(-4px) scale(1.03); }
.sent-note { position: relative; max-width: 500px; margin: 26px auto 0; padding: 16px 22px; color: var(--ink); background: var(--grain), var(--mint); transform: rotate(1deg); box-shadow: var(--lift-sm); }
.sent-note h3 { margin: 0 0 4px; font-family: var(--font-hand); font-weight: 700; font-size: 1.9rem; }
.sent-note p { margin: 0; }

.share-card { --rot: .6deg; max-width: 680px; margin: 0 auto; background: var(--fibers), var(--grain), var(--kraft);
  /* pinking-shear bottom edge */
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%;
  padding-bottom: 40px;
}
.share-card::before { display: none; }
.copy-field { display: flex; gap: 8px; margin: 12px 0; }
.copy-field input { font-size: .88rem !important; }
.secret { margin-top: 14px; }
.secret summary { cursor: pointer; font-weight: 600; }
.danger-zone { text-align: center; margin-top: 34px; }
.link-danger { background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--on-bg); opacity: .8; font-size: .92rem; }
.link-danger:hover { opacity: 1; }

.save-status {
  position: fixed; bottom: 18px; left: 18px; z-index: 60; padding: 8px 16px 8px 26px; color: var(--ink);
  font-weight: 600; font-size: .88rem; background: var(--grain), var(--paper);
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); filter: drop-shadow(0 3px 2px rgba(0,0,0,.2));
}
.save-status[data-state='saving'] { background-color: #FFE08A; }
.save-status[data-state='error'] { background-color: var(--pink); }

/* send animation */
.paper-wrap.folding { animation: fold 1.2s ease-in forwards; }
.paper-wrap.unfold { animation: unfold .7s cubic-bezier(.3,1.5,.5,1); }
@keyframes fold {
  0% { transform: rotate(-1.2deg); }
  45% { transform: perspective(900px) rotateX(75deg) scale(.9); }
  100% { transform: perspective(900px) rotateX(90deg) scale(.25) translateY(-160px); opacity: 0; }
}
@keyframes unfold { from { transform: scale(.7) rotate(-6deg); opacity: 0; } to { transform: rotate(-1.2deg); opacity: 1; } }
.send-overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; align-content: center; pointer-events: none; }
.send-env { width: 230px; filter: var(--sticker); animation: env-fly 3s ease-in-out forwards; }
.send-text { font-family: var(--font-hand); font-weight: 700; font-size: 2.6rem; color: var(--ink); background: var(--grain), var(--paper); padding: 2px 18px; transform: rotate(-2deg); margin: 18px 0 0; box-shadow: var(--lift-sm); animation: fade-up 3s ease-in-out forwards; }
.send-env .flap { transform-origin: 100px 24px; animation: flap-close .4s ease-in 1s forwards; transform: scaleY(-1); }
@keyframes flap-close { to { transform: scaleY(1); } }
@keyframes env-fly {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  20% { transform: scale(1.1) rotate(4deg); opacity: 1; }
  30%, 45% { transform: scale(1) rotate(-3deg); }
  55% { transform: scale(1) rotate(3deg); }
  100% { transform: translate(60vw, -70vh) scale(.2) rotate(40deg); opacity: 0; }
}
@keyframes fade-up { 0%, 10% { opacity: 0; translate: 0 10px; } 25%, 75% { opacity: 1; translate: 0 0; } 100% { opacity: 0; } }

/* ---------- PUBLIC VIEW ---------- */
.view-head { display: grid; grid-template-columns: 110px 1fr 100px; gap: 22px; align-items: center; margin: 6px 0 34px; }
.view-title { font-size: clamp(2rem, 5vw, 3.4rem); }
.view-head .lead { margin: 14px 0 0; max-width: 620px; font-size: 1.05rem; line-height: 1.5; }
.view-elf { width: 100%; transform: rotate(-8deg); animation: bob 4s ease-in-out infinite; }
.view-ginger { width: 100%; animation: rock 3.4s ease-in-out infinite; }
.peek-banner { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 0; padding: 12px 16px; color: var(--ink); font-weight: 600; background: var(--grain), var(--paper); box-shadow: var(--lift-sm); transform: rotate(-1deg); }
.view-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 36px; align-items: start; }
.view-grid > :only-child { grid-column: 1 / -1; max-width: 720px; margin: 0 auto; width: 100%; }
.cta { text-align: center; margin-top: 50px; }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: 30px 0; }
.lost-art { width: 190px; margin: 0 auto 20px; transform: rotate(-6deg); }
.lost-title { font-size: clamp(1.8rem, 5vw, 3rem); margin-bottom: 14px; }
.lost .lead { margin: 0 auto 28px; font-size: 1.1rem; }

/* ---------- SVG art micro-animations ---------- */
.blink { transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.pompom { transform-box: fill-box; transform-origin: center; animation: pompom 2s ease-in-out infinite; }
@keyframes pompom { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-3px, 4px); } }
.ornaments .o1 { animation: orn 2.4s steps(1) infinite; }
.ornaments .o2 { animation: orn 2.4s steps(1) .8s infinite; }
.ornaments .o3 { animation: orn 2.4s steps(1) 1.6s infinite; }
@keyframes orn { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.tree-star { transform-box: fill-box; transform-origin: center; animation: star-turn 4s ease-in-out infinite; }
@keyframes star-turn { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) scale(1.1); } }
.elf-bell, .scarf-tail { transform-box: fill-box; transform-origin: 50% 0; animation: bell 1.6s ease-in-out infinite; }
@keyframes bell { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(18deg); } }
.legs-front, .legs-back { transform-box: fill-box; transform-origin: 50% 0; }
.flyby-sleigh .legs-front { animation: gallop .5s ease-in-out infinite; }
.flyby-sleigh .legs-back { animation: gallop .5s ease-in-out .25s infinite; }
@keyframes gallop { 0%, 100% { transform: rotate(-25deg); } 50% { transform: rotate(25deg); } }
.flyby-sleigh .d1 { animation: deer-bob .5s ease-in-out infinite; }
.flyby-sleigh .d2 { animation: deer-bob .5s ease-in-out .15s infinite; }
@keyframes deer-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }

/* ---------- sleigh flyby (a sticker on a dotted flight path) ---------- */
#flyby { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.flyby-sleigh { position: absolute; top: 20vh; left: 0; width: 280px; animation: flyby 10s cubic-bezier(.45,.05,.55,.95) forwards; }
.flyby-sleigh > .art { transform: scaleX(-1); filter: var(--sticker); }
.flyby-letter { position: absolute; width: 48px; right: 40px; top: -12px; filter: var(--sticker); animation: rock 1s ease-in-out infinite; }
.flyby-trail { position: absolute; right: 100%; top: 72%; width: 240px; height: 0; border-top: 3px dashed var(--on-bg); opacity: .65; transform: rotate(4deg); }
@keyframes flyby {
  0% { transform: translate(-340px, 30vh) rotate(-10deg); }
  50% { transform: translate(50vw, 0) rotate(-4deg); }
  100% { transform: translate(calc(100vw + 340px), -12vh) rotate(-12deg); }
}

/* ---------- paper confetti ---------- */
.confetti {
  position: fixed; z-index: 80; width: 11px; height: 11px; border-radius: 50%; background: var(--c); pointer-events: none;
  box-shadow: 0 1px 0 rgba(0,0,0,.15); animation: confetti var(--dur) cubic-bezier(.2,.6,.4,1) forwards;
}
.confetti:nth-child(3n) { border-radius: 1px; width: 8px; height: 14px; }
.confetti.star-bit { width: 14px; height: 14px; border-radius: 0; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
@keyframes confetti {
  0% { transform: translate(-50%, -50%) rotate(0); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 280px)) rotate(var(--r)); opacity: 0; }
}
.sparkle { position: fixed; z-index: 80; pointer-events: none; color: var(--c); font-size: 1rem; animation: sparkle .8s ease-out forwards; }
@keyframes sparkle { from { transform: translate(-50%, -50%) scale(.4); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2) rotate(90deg); opacity: 0; } }

/* ---------- generic motion ---------- */
.pop-in { animation: pop-in .6s cubic-bezier(.3,1.6,.5,1) both; }
.delay-1 { animation-delay: .1s; } .delay-2 { animation-delay: .2s; } .delay-3 { animation-delay: .3s; }
@keyframes pop-in { from { opacity: 0; translate: 0 26px; scale: .95; } }
.stagger .wish { animation: stick .55s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i) * 70ms + .25s); }
.wish.drop-in { animation: stick .6s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes stick { from { opacity: 0; translate: 0 -30px; rotate: -8deg; scale: 1.12; } }
.wiggle { animation: wiggle .6s ease-in-out !important; }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 20% { rotate: -3deg; } 40% { rotate: 3deg; } 60% { rotate: -2deg; } 80% { rotate: 1deg; } }
.poof { animation: poof .45s ease-in forwards !important; }
@keyframes poof { to { scale: .2; rotate: 20deg; opacity: 0; } }
.shake { animation: shake .45s ease-in-out; }
@keyframes shake { 0%, 100% { translate: 0; } 20% { translate: -10px; } 40% { translate: 9px; } 60% { translate: -6px; } 80% { translate: 4px; } }
@keyframes pop { 0% { scale: 1; } 40% { scale: 1.3; } 100% { scale: 1; } }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 90; max-width: calc(100vw - 40px); padding: 14px 24px;
  color: var(--ink); font-weight: 600; text-align: center; background: var(--grain), var(--paper); box-shadow: var(--lift);
  transform: translate(-50%, 160%) rotate(-2deg); opacity: 0; visibility: hidden;
  transition: transform .45s cubic-bezier(.3,1.6,.5,1), opacity .3s, visibility .3s;
}
#toast::before { width: 60px; height: 20px; top: -10px; left: calc(50% - 30px); }
#toast.show { transform: translate(-50%, 0) rotate(-1deg); opacity: 1; visibility: visible; }
#toast.error { background: var(--grain), var(--pink); }
#toast.success { background: var(--grain), var(--mint); }

.footer { position: relative; z-index: 3; text-align: center; padding: 26px 20px 30px; font-family: var(--font-hand); font-weight: 700; font-size: 1.4rem; color: var(--on-bg); opacity: .85; }


/* ---------- photos: cut-out stickers ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.photo-wrap { position: relative; }
.photo-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 150px; padding: 18px; cursor: pointer; text-align: center; color: var(--ink);
  background: rgba(255, 251, 242, .55); border: 2.5px dashed rgba(43, 33, 24, .55);
  transition: background .2s, transform .25s cubic-bezier(.3,1.7,.5,1);
}
.photo-drop:hover, .photo-drop:focus-visible { background: rgba(255, 251, 242, .85); outline: none; }
.photo-drop:focus-visible { border-color: var(--ink); }
.photo-drop.over { background: var(--paper); transform: rotate(-1deg) scale(1.02); border-style: solid; }
.photo-scissors { font-size: 2rem; line-height: 1; display: inline-block; transform: rotate(-90deg); }
.photo-drop.empty:hover .photo-scissors, .photo-drop.over .photo-scissors { animation: snip .35s ease-in-out 3; }
@keyframes snip { 50% { transform: rotate(-90deg) scaleX(.7); } }
.photo-title { font-family: var(--font-hand); font-weight: 700; font-size: 1.55rem; line-height: 1.05; }
.photo-hint { font-size: .82rem; color: var(--ink-soft); font-weight: 400; }

.photo-drop.busy { cursor: progress; background: rgba(255, 251, 242, .85); border-style: solid; border-color: transparent; }
.photo-raw { position: relative; padding: 8px; }
.photo-raw img { display: block; max-width: 100%; max-height: 170px; filter: saturate(.6) brightness(1.05); opacity: .85; animation: breathe-img 1.4s ease-in-out infinite; }
@keyframes breathe-img { 50% { opacity: .6; } }
.snip-line {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--ink) 50%, #0000 0) 0 0 / 14px 2.5px repeat-x,
    linear-gradient(90deg, var(--ink) 50%, #0000 0) 0 100% / 14px 2.5px repeat-x,
    linear-gradient(0deg, var(--ink) 50%, #0000 0) 0 0 / 2.5px 14px repeat-y,
    linear-gradient(0deg, var(--ink) 50%, #0000 0) 100% 0 / 2.5px 14px repeat-y;
  animation: ants .6s linear infinite;
}
@keyframes ants { to { background-position: 14px 0, -14px 100%, 0 -14px, 100% 14px; } }
.snip { position: absolute; font-size: 1.6rem; line-height: 1; animation: snip-around 2.4s linear infinite; }
@keyframes snip-around {
  0% { left: -8px; top: -14px; rotate: 0deg; }
  25% { left: calc(100% - 14px); top: -14px; rotate: 0deg; }
  26% { rotate: 90deg; }
  50% { left: calc(100% - 14px); top: calc(100% - 14px); rotate: 90deg; }
  51% { rotate: 180deg; }
  75% { left: -8px; top: calc(100% - 14px); rotate: 180deg; }
  76% { rotate: 270deg; }
  100% { left: -8px; top: -14px; rotate: 270deg; }
}

.photo-drop.done { background: transparent; border-color: transparent; min-height: 0; padding: 10px 10px 4px; }
.photo-drop.done:hover { border-color: rgba(43, 33, 24, .3); }
.photo-result { display: block; max-width: 78%; max-height: 190px; width: auto; height: auto; }
.photo-result.is-cutout { filter: var(--sticker); transform: rotate(-4deg); }
.photo-result.is-photo { padding: 8px 8px 26px; background: #fff; box-shadow: var(--lift-sm); transform: rotate(3deg); }
.slap-in { animation: slap-photo .55s cubic-bezier(.3,1.7,.5,1) both; }
@keyframes slap-photo { from { opacity: 0; scale: 1.6; rotate: 18deg; } 60% { opacity: 1; } }
.photo-remove {
  position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  font-size: 1.2rem; font-weight: 700; color: var(--ink); background: var(--paper); box-shadow: var(--lift-sm);
  transition: transform .2s;
}
.photo-remove:hover { transform: rotate(90deg) scale(1.1); }

.wish.has-photo { grid-template-columns: 150px 1fr auto; padding-top: 18px; padding-bottom: 18px; }
.wish-photo { display: grid; place-items: center; min-height: 96px; }
.wish-photo img { display: block; max-width: 150px; max-height: 130px; width: auto; height: auto; transition: transform .3s cubic-bezier(.3,1.7,.5,1); }
.wish-photo .is-cutout { filter: var(--sticker); transform: rotate(-5deg); }
.wish-photo .is-photo { padding: 5px 5px 16px; background: #fff; box-shadow: var(--lift-sm); transform: rotate(-3deg); max-width: 96px; }
.wish:hover .wish-photo img { transform: rotate(4deg) scale(1.08); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .start-here { display: none; }
  .hero-tree { left: -1%; } .hero-snowman { left: 2%; top: 340px; } .hero-ginger { right: 2%; }
  .edit-grid, .view-grid { grid-template-columns: 1fr; }
  .view-head { grid-template-columns: 90px 1fr; }
  .view-ginger { display: none; }
}
@media (max-width: 640px) {
  #app { padding: 4px 14px 60px; }
  .bunting { height: 56px; }
  .bunting li { width: 30px; height: 34px; }
  .topbar { gap: 8px; padding: 0 12px 8px; }
  .logo-text { font-size: 1.15rem; }
  .logo-hat { width: 30px; height: 30px; }
  .countdown { padding: 5px 12px; }
  .cd-num { font-size: 1.2rem; } .cd-label { font-size: 1.1rem; }
  .lang-toggle { width: 42px; height: 42px; font-size: .9rem; }
  .home-hero { min-height: 0; padding-top: 120px; }
  .hero-santa { width: 104px; right: 4px; top: -6px; }
  .hero-gift { width: 62px; left: 8px; top: 20px; }
  .hero-tree, .hero-snowman, .hero-ginger, .d4, .d5, .d6 { display: none; }
  .d2 { right: 34%; top: 10px; } .d1 { left: 28%; top: 54px; }
  .tagline { font-size: 1.7rem; }
  .note { font-size: 1rem; padding: 16px 18px; }
  .home-grid { margin-top: 36px; }
  .start-card { padding: 30px 20px 24px; }
  .swatches { gap: 8px; }
  .swatch { font-size: .68rem; }
  .greet-santa { width: 70px; }
  .paper { padding: 42px 16px 22px 52px; background-position: -8px 22px, -8px 0, 0 12px, 0 0, 0 0; }
  .stamp-slot { right: -6px; top: -40px; }
  .postmark { width: 84px; height: 84px; }
  .pm-mid { font-size: 1.4rem; }
  .wish { grid-template-columns: 46px 1fr; padding-right: 12px; }
  .wish-icon { width: 46px; height: 46px; font-size: 1.8rem; }
  .wish.has-photo { grid-template-columns: 1fr; }
  .wish.has-photo .wish-photo { padding: 4px 0 2px; }
  .wish-photo img { max-width: 78%; max-height: 170px; }
  .wish-actions { grid-column: 1 / -1; grid-template-columns: repeat(4, 38px); justify-content: end; }
  .elf-area { grid-column: 1 / -1; align-items: stretch; }
  .elf-form { width: 100%; }
  .copy-field { flex-direction: column; }
  .view-head { grid-template-columns: 70px 1fr; gap: 14px; }
  .flyby-sleigh { width: 190px; }
  .card { padding: 26px 18px 22px; }
}

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