:root { --font-head: "Kodchasan", "Bai Jamjuree", "Leelawadee UI", system-ui, sans-serif;
  --font-letter: "Itim", "Bai Jamjuree", cursive, sans-serif;
 
  --bg: #fff8f3; --ink: #2b1a3a; --muted: #7a6a80; --card: #ffffff; --line: #eedfe3;
  --accent: #e0457b; --accent-ink: #ffffff; --err: #b3261e;
  --rose-a: #f7a1b8; --rose-b: #e0457b; --mint-a: #a8e6cf; --mint-b: #3aa17e;
  --mid-a: #3b3f8f; --mid-b: #12142e; --gold-a: #f5d77a; --gold-b: #b8860b;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Bai Jamjuree", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif; background: var(--bg);
  color: var(--ink); line-height: 1.6; }
body.recipient { background: radial-gradient(circle at 50% 20%, #fff 0, var(--bg) 70%); }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
.top { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 14px 16px; max-width: 720px; margin: 0 auto; }
.brand { font-weight: 800; letter-spacing: .18em; color: var(--ink); text-decoration: none; }
.tag { color: var(--muted); font-size: 13px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px; }
h1 { font-size: clamp(22px, 5vw, 32px); line-height: 1.3; margin: .4em 0; }
.lead { color: var(--muted); font-size: 17px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin: 12px 0; }
.btn { display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px;
  padding: 10px 18px; font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.big { padding: 14px 26px; font-size: 17px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.pay-options { display: flex; flex-wrap: wrap; gap: 10px; }
.pay-options form { margin: 0; }
.error { color: var(--err); background: #fdecea; border-radius: 10px; padding: 10px 12px; }
.warn { color: var(--muted); font-size: 13px; margin-top: 16px; }
.wait { background: #fff4d6; border-radius: 10px; padding: 10px 12px; }
.hero { text-align: center; padding: 24px 0 8px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
.steps div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 8px; text-align: center; }
.steps b { display: block; color: var(--accent); font-size: 20px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
input, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; width: 100%; background: #fff; color: var(--ink); }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0; display: grid; gap: 8px; }
fieldset.locked { opacity: .45; }
legend { font-weight: 700; padding: 0 6px; }
.plan, .theme-pick { display: flex !important; gap: 10px; align-items: center; font-weight: 400 !important; }
.plan input, .theme-pick input { width: auto; }
.themes { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.theme-pick { border-radius: 12px; padding: 10px; color: #fff; }
.theme-pick.locked { opacity: .4; }
.theme-pick.theme-rose { background: linear-gradient(135deg, var(--rose-a), var(--rose-b)); }
.theme-pick.theme-mint { background: linear-gradient(135deg, var(--mint-a), var(--mint-b)); }
.theme-pick.theme-midnight { background: linear-gradient(135deg, var(--mid-a), var(--mid-b)); }
.theme-pick.theme-gold { background: linear-gradient(135deg, var(--gold-a), var(--gold-b)); }
.share { display: grid; gap: 12px; justify-items: center; }
.qr svg { width: 220px; height: 220px; background: #fff; border-radius: 12px; }
.link-row { display: flex; gap: 8px; width: 100%; }

/* item picker (studio) */
.item-picker { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.item-pick { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 10px; cursor: pointer; background: #fff; }
.item-pick input { width: auto; }
.item-pick .item-img { width: 44px; height: 44px; flex: none; }
.item-pick:has(input:checked) { border-color: var(--accent); background: #fff0f5; }
.item-pick.locked { opacity: .4; cursor: not-allowed; }

/* ---------------------------------------------------------------- the gift */
.stage { padding: 12px 0 32px; }
.gift, .box-wrap.theme-rose { --a: var(--rose-a); --b: var(--rose-b); --ribbon: #fff4f7; --c1: #e0457b; --c2: #f7a1b8; --c3: #ffd166; --c4: #ffffff;
  --paper: radial-gradient(rgba(255,255,255,.38) 17%, transparent 19%) 0 0 / 18px 18px, linear-gradient(135deg, var(--a), var(--b)); }
.gift { position: relative; overflow: hidden; text-align: center; border-radius: 22px; padding: 24px 16px 28px;
  background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--a) 28%, #fff)); border: 1px solid var(--line); }
.theme-mint { --a: var(--mint-a); --b: var(--mint-b); --ribbon: #fffbe6; --c1: #3aa17e; --c2: #a8e6cf; --c3: #fff3b0; --c4: #ffffff;
  --paper: repeating-linear-gradient(45deg, rgba(255,255,255,.28) 0 7px, transparent 7px 15px), linear-gradient(135deg, var(--a), var(--b)); }
.theme-midnight { --a: var(--mid-a); --b: var(--mid-b); --ribbon: #dfe2f2; --c1: #ffe9a8; --c2: #b9c2ff; --c3: #ffffff; --c4: #8f7cff;
  --paper: radial-gradient(#fff 1px, transparent 1.6px) 0 0 / 22px 22px, radial-gradient(#ffe9a8 1px, transparent 1.6px) 11px 11px / 22px 22px,
    linear-gradient(135deg, var(--a), var(--b)); }
.theme-midnight.gift { background: radial-gradient(circle at 50% 30%, #4a4fa8, var(--mid-b) 75%); color: #f3eefc; }
.theme-gold { --a: var(--gold-a); --b: var(--gold-b); --ribbon: #8b1e3f; --c1: #f5d77a; --c2: #b8860b; --c3: #8b1e3f; --c4: #fff6d5;
  --paper: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 45%, transparent 55%) -200% 0 / 300% 100%,
    linear-gradient(135deg, var(--a), var(--b)); }
.to { font-size: 20px; font-weight: 700; position: relative; z-index: 5; }

.box-wrap { position: relative; width: 240px; height: 290px; margin: 0 auto; }
.box-art { position: absolute; left: 20px; bottom: 0; width: 200px; height: 210px; display: block; border: 0; background: none;
  padding: 0; cursor: pointer; z-index: 3; -webkit-tap-highlight-color: transparent; }
.box-art.waiting { cursor: default; }
.box-art .shadow { position: absolute; left: 30px; right: 30px; bottom: 0; height: 18px; border-radius: 50%;
  background: radial-gradient(rgba(0,0,0,.28), transparent 70%); }
.box-art .body { position: absolute; left: 22px; right: 22px; bottom: 10px; height: 118px; border-radius: 8px; z-index: 1;
  background: var(--paper); box-shadow: inset -16px 0 0 rgba(0,0,0,.10), inset 0 10px 12px rgba(0,0,0,.12); }
.box-art .lid { position: absolute; left: 12px; right: 12px; bottom: 122px; height: 40px; border-radius: 8px; z-index: 4;
  background: var(--paper); filter: brightness(1.04); box-shadow: 0 6px 10px rgba(0,0,0,.18), inset -16px 0 0 rgba(0,0,0,.08);
  transform-origin: 20% 100%; transition: transform .8s cubic-bezier(.2,.9,.3,1.2), opacity .8s ease .2s; }
.box-art .ribbon-v { position: absolute; left: 50%; top: 0; bottom: 0; width: 24px; margin-left: -12px; background: var(--ribbon);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.box-art .bow { position: absolute; left: 50%; top: -30px; width: 0; height: 0; }
.box-art .loop { position: absolute; top: 0; width: 46px; height: 32px; border: 9px solid var(--ribbon); border-radius: 50%;
  box-shadow: 0 2px 3px rgba(0,0,0,.12); }
.box-art .loop.l { right: 2px; transform: rotate(-22deg); }
.box-art .loop.r { left: 2px; transform: rotate(22deg); }
.box-art .knot { position: absolute; left: -11px; top: 9px; width: 22px; height: 20px; border-radius: 7px; background: var(--ribbon);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.10); }
.box-art .glow { position: absolute; left: 50%; bottom: 120px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(255,255,255,.95), color-mix(in srgb, var(--c3) 70%, transparent) 40%, transparent 70%);
  opacity: 0; transition: transform 1s ease-out, opacity 1s ease-out; }
.box-art .sparkle { position: absolute; width: 14px; height: 14px; z-index: 5; opacity: 0; background: var(--c4);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 2.4s ease-in-out infinite; }
.theme-rose .box-art .sparkle, .box-wrap.theme-rose .box-art .sparkle { background: var(--c3); }
.box-art .s1 { left: 2px; top: 60px; } .box-art .s2 { right: 0; top: 40px; animation-delay: .6s; }
.box-art .s3 { left: 20px; bottom: 30px; animation-delay: 1.2s; } .box-art .s4 { right: 14px; bottom: 50px; animation-delay: 1.8s; }
.theme-gold .box-art .body { animation: shine 3.2s linear infinite; }

/* waiting */
.box-art.closed { animation: float 3s ease-in-out infinite; }
.box-art.closed .lid { animation: jiggle 2.8s ease-in-out infinite; }
.theme-gold .box-art.closed .lid { animation: jiggle 2.8s ease-in-out infinite, shine 3.2s linear infinite; }
.box-art.opening { animation: rattle .45s linear; }
/* opened */
.box-art.opened { cursor: default; }
.box-art.opened .lid { transform: translate(70px, -150px) rotate(38deg); opacity: 0; animation: none; }
.box-art.opened .glow { opacity: 1; transform: scale(26); }
.box-art.opened .sparkle { display: none; }

/* things inside the box */
.contents { position: absolute; left: 50%; bottom: 130px; width: 0; height: 0; z-index: 2; }
.item { position: absolute; left: -45px; top: -45px; width: 90px; height: 90px;
  opacity: 0; transform: translate(0, 40px) scale(.2);
  --x: calc((var(--i) - (var(--n) - 1) / 2) * 84px); --y: -96px;
  filter: drop-shadow(0 8px 8px rgba(0,0,0,.20)); }
.item img { width: 100%; height: 100%; display: block; }
.contents.show .item { animation: rise-out .9s cubic-bezier(.2,.9,.3,1.3) forwards, bob 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * .35s), calc(.9s + var(--i) * .35s); }

/* confetti */
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.confetti i { position: absolute; left: 50%; top: 52%; width: 8px; height: 13px; border-radius: 2px; background: var(--c);
  animation: burst var(--d) cubic-bezier(.15,.7,.4,1) forwards; }

.hint { opacity: .75; position: relative; z-index: 5; }
.reveal { position: relative; z-index: 5; }
.reveal.show { animation: unfold .8s ease both; }
.inside { font-size: 14px; opacity: .8; }
.letter { background: rgba(255,255,255,.88); color: var(--ink); border-radius: 16px; padding: 18px 16px; margin: 8px auto;
  max-width: 460px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.message { font-size: 19px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }
.from { font-style: italic; opacity: .8; margin: 0; }
.note { display: block; width: 100%; max-width: 460px; margin: 10px auto; padding: 12px; border-radius: 12px; border: 1px dashed var(--b);
  background: rgba(255, 255, 255, .7); color: var(--ink); font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.note.opened { border-style: solid; cursor: default; animation: unfold .5s ease both; }
.badge { font-size: 12px; opacity: .6; margin-top: 18px; letter-spacing: .1em; position: relative; z-index: 5; }
.countdown { font-size: 22px; font-weight: 700; }
.hero .box-wrap { height: 230px; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes jiggle { 0%, 78%, 100% { transform: rotate(0); } 82% { transform: rotate(-4deg) translateY(-3px); }
  86% { transform: rotate(3deg) translateY(-2px); } 90% { transform: rotate(-2deg); } 94% { transform: rotate(1deg); } }
@keyframes rattle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 40% { transform: rotate(6deg); }
  60% { transform: rotate(-4deg); } 80% { transform: rotate(3deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@keyframes shine { from { background-position: -200% 0, 0 0; } to { background-position: 200% 0, 0 0; } }
@keyframes rise-out { from { opacity: 0; transform: translate(0, 40px) scale(.2); } 60% { opacity: 1; }
  to { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes burst { 0% { transform: translate(-50%, -50%) rotate(0); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)); opacity: 0; } }
@keyframes unfold { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .box-art.closed, .box-art.closed .lid, .box-art .sparkle, .box-art.opening, .theme-gold .box-art .body,
  .theme-gold .box-art.closed .lid, .reveal.show, .note.opened { animation: none !important; }
  .box-art .lid, .box-art .glow { transition: none; }
  .contents.show .item { animation: none; opacity: 1; transform: translate(var(--x), var(--y)); }
}

/* ---------------------------------------------------------------- Secret Box */
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .08em; font-size: 13px; text-transform: uppercase; margin: 0; }
.form.left { text-align: left; }
.small-text { font-size: 12px; }
.btn.link { border: 0; background: none; color: var(--muted); text-decoration: underline; }
.box-wrap.small { transform: scale(.72); transform-origin: 50% 0; height: 220px; margin-bottom: -40px; }
.secret .link-row { max-width: 520px; margin: 0 auto; }
.score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 4px 0 8px; }
.score div { display: grid; }
.score b { font-size: 17px; }
.score span { color: var(--muted); font-size: 13px; }
.score .heart { font-size: 22px; animation: beat 1.6s ease-in-out infinite; }
.count-badge { position: absolute; right: 22px; top: 40px; z-index: 6; min-width: 34px; height: 34px; border-radius: 17px;
  background: var(--accent); color: #fff; font-weight: 800; line-height: 34px; box-shadow: 0 4px 10px rgba(224,69,123,.4); }
.box-wrap.pulse .box-art { animation: rattle .5s linear 2; }
.float-heart { position: absolute; left: 50%; top: 60px; font-size: 30px; z-index: 7; animation: float-up 1.3s ease-out forwards; }
.box-wrap.almost::before { content: ""; position: absolute; inset: 20px 0 0; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(255, 214, 102, .55), transparent 65%); animation: breathe 2.4s ease-in-out infinite; }
.my-items { text-align: left; max-width: 520px; margin: 16px auto 0; }
.my-items ul { list-style: none; padding: 0; }
.my-items li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.reveal-cards { display: grid; gap: 12px; justify-items: center; }
.reveal-card { background: rgba(255,255,255,.92); color: var(--ink); border-radius: 18px; padding: 16px; width: min(320px, 100%);
  box-shadow: 0 12px 30px rgba(0,0,0,.14); }
.reveal-card img { width: 120px; height: 120px; display: block; margin: 0 auto; filter: drop-shadow(0 8px 8px rgba(0,0,0,.18)); }
.reveal-card .step { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.reveal-card .item-name { font-size: 20px; font-weight: 800; margin: 6px 0 0; }
.reveal-card .by { margin: 2px 0; color: var(--accent); font-weight: 600; }
.reveal-card .clue { font-style: italic; margin: 6px 0 0; overflow-wrap: anywhere; }
.reveal-card.theirs { border: 2px solid var(--b); }
.reveal-card.pop { animation: card-pop .7s cubic-bezier(.2,.9,.3,1.3) both; }
.reveal-card.all { width: min(240px, 100%); }
.reveal-card.all .step { display: none; }
.the-end { margin-top: 8px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
@keyframes float-up { from { opacity: 1; transform: translate(-50%, 0) scale(.6); } to { opacity: 0; transform: translate(-50%, -90px) scale(1.3); } }
@keyframes breathe { 0%, 100% { opacity: .5; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes card-pop { from { opacity: 0; transform: translateY(30px) scale(.7) rotate(-4deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .score .heart, .box-wrap.pulse .box-art, .float-heart, .box-wrap.almost::before, .reveal-card.pop { animation: none !important; }
}

/* ---------------------------------------------------------------- love letter */
.letter-write textarea { font-family: var(--font-letter); font-size: 17px; line-height: 30px;
  padding-top: 4px; background-attachment: local;
  background: repeating-linear-gradient(#fffdf7 0 29px, #f1dfe4 29px 30px); }
.letter-btn { display: inline-flex; align-items: center; gap: 8px; margin: 10px auto; background: #fff0f5; border-color: #f4a3bb;
  color: #b3123e; font-weight: 700; animation: beat 2.4s ease-in-out infinite; }
.letter-paper { border: 0; padding: 0; background: none; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.letter-paper::backdrop { background: rgba(43, 26, 58, .55); }
.letter-paper[open] { animation: unfold .6s ease both; }
.letter-paper .paper { text-align: left; color: #3a2a2f; border-radius: 6px; padding: 28px 26px 22px; max-height: calc(100vh - 120px); overflow: auto;
  font-family: var(--font-letter); font-size: 18px; line-height: 30px;
  background: repeating-linear-gradient(#fffdf7 0 29px, #f1dfe4 29px 30px); box-shadow: 0 20px 50px rgba(0,0,0,.3);
  border-left: 3px solid #f4a3bb; }
.letter-paper .dear { font-weight: 700; margin: 0 0 6px; }
.letter-paper .letter-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.letter-paper .sign { text-align: right; margin: 14px 0 0; }
.letter-paper form { text-align: center; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .letter-btn, .letter-paper[open] { animation: none; } }
/* ---------------------------------------------------------------- typography (set B) */
h1, h2, .brand, .to, .btn.big, .steps b, .score b, .item-name, .count-badge, .countdown, legend, .eyebrow {
  font-family: var(--font-head); }
h1, h2, .brand, .to, .item-name { font-weight: 700; }
.brand { letter-spacing: .14em; }
/* ---------------------------------------------------------------- meanings + polaroid */
.meaning { display: block; font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.35; }
.reveal-card .meaning { font-size: 14px; margin: 2px 0 0; }
.meaning-line { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0; font-size: 15px; }
.photo-write input[type=file] { padding: 8px; background: #fff; }
.polaroid { background: #fff; padding: 10px 10px 8px; margin: 12px auto; width: min(260px, 82%); box-shadow: 0 10px 26px rgba(0,0,0,.22);
  transform: rotate(-3deg); transition: transform .35s ease, width .35s ease; cursor: zoom-in; color: #3a2a2f; }
.polaroid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #eee; }
.polaroid figcaption { font-family: var(--font-letter); font-size: 18px; text-align: center; padding-top: 8px; min-height: 26px;
  overflow-wrap: anywhere; }
.polaroid.zoomed { transform: rotate(0); width: min(460px, 96%); cursor: zoom-out; }
.reveal-card .polaroid { width: 100%; }
.item.polaroid-mini { background: #fff; padding: 5px 5px 14px; box-shadow: 0 6px 14px rgba(0,0,0,.25); rotate: -6deg; }
.item.polaroid-mini img { width: 100%; height: 100%; object-fit: cover; }
.my-items .thumb { object-fit: cover; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
/* footer links + legal pages */
.foot-links { margin-bottom: 6px; line-height: 1.8; }
.foot a { color: inherit; }
.legal { max-width: 720px; margin: 0 auto; line-height: 1.75; }
.legal h1 { font-family: var(--font-head, inherit); }
.legal h2 { font-size: 1.1rem; margin-top: 1.6em; }
.legal .updated { color: var(--muted); font-size: 13px; }

/* owner pages (/admin) */
.admin h1 { font-size: 1.3rem; } .admin h2 { font-size: 1.1rem; margin-top: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-search { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.admin-search label { flex: 1 1 260px; } .admin-search input { width: 100%; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.admin-stats div { border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.admin-stats b { display: block; font-size: 1.4rem; } .admin-stats span { color: var(--muted); font-size: .85rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
.admin-table th, .admin-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin .ok { color: #2e7d4f; }
.findings { padding-left: 0; list-style: none; }
.findings li { padding: 8px 10px; border-radius: 10px; margin-bottom: 6px; background: #f6f1f4; }
.findings .f-refund { background: #fdecec; } .findings .f-no_refund { background: #eaf6ee; } .findings .f-check { background: #fff6e0; }
.timeline { padding-left: 0; list-style: none; font-size: .92rem; }
.timeline li { padding: 6px 0; border-bottom: 1px dashed var(--line); overflow-wrap: anywhere; }
.timeline .s-browser { color: var(--muted); } .timeline .mark { display: inline-block; width: 1.2em; }

/* consent before payment, report links, owner request list */
.pay-form { display: grid; gap: 12px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.6; text-align: left; }
.agree input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.report-link { text-align: center; font-size: 13px; margin: 18px 0 0; }
.report-link a { color: var(--muted); }
.req { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.req.overdue { border-color: var(--err); }
.req p { margin: 4px 0; }
.req-detail { white-space: pre-wrap; background: rgba(0,0,0,.03); padding: 8px; border-radius: 8px; }
.req-actions { display: grid; gap: 8px; margin-top: 8px; }
.req-actions form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.req-actions input[name=resolution] { flex: 1 1 200px; }
.small-text { font-size: 13px; }
.form select { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; width: 100%; background: #fff; color: var(--ink); }
.agree input { width: 18px; padding: 0; }

/* ---------------------------------------------------------------- scenes: wish cake, stitch card, photo booth */
.btn.small { padding: 6px 14px; font-size: 14px; }
.btn.ghost { background: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: auto; margin-top: 6px; }
.cake-opts[hidden] { display: none; }
.flavor-row, .thread-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.flavor-pick { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.flavor-pick input { width: auto; }
.flavor-pick:has(input:checked) { border-color: var(--accent); background: #fff0f5; }
.flavor-pick.locked, .thread-pick.locked { opacity: .35; cursor: not-allowed; }
.thread-pick { position: relative; cursor: pointer; }
.thread-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.thread-pick i { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--t);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.15); border: 3px solid #fff; outline: 1px solid var(--line); }
.thread-pick:has(input:checked) i { outline: 3px solid var(--accent); }
.thread-pick:has(input:focus-visible) i { outline: 3px dashed var(--accent); }

/* fabric: linen weave + dashed border, used by the drawing pad and the card */
.stitch-pad, .stitch-card { background: repeating-linear-gradient(0deg, rgba(120,100,80,.07) 0 1px, transparent 1px 4px),
  repeating-linear-gradient(90deg, rgba(120,100,80,.07) 0 1px, transparent 1px 4px), #f6f1e7;
  border-radius: 10px; box-shadow: 0 4px 14px rgba(60,40,30,.18); outline: 2px dashed #6b86c9; outline-offset: -12px; }
.stitch-pad { width: min(100%, 340px); aspect-ratio: 1; margin: 8px auto; touch-action: none; }
.stitch-pad canvas { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.stitch-card { width: min(88%, 320px); margin: 14px auto; padding: 0 0 10px; }
.stitch-card svg { width: 100%; height: auto; display: block; aspect-ratio: 1; }
.stitch-text { font-family: var(--font-letter); color: #c0344d; font-size: 20px; letter-spacing: .06em; margin-top: -8px;
  text-decoration: underline dashed rgba(192,52,77,.4); text-underline-offset: 6px; }

.cake-scene { position: relative; z-index: 5; margin: 6px auto 4px; }
.cake-title { font-weight: 700; margin: 4px 0 8px; }
.cake { --cream: #fffaf0; --sponge: #f2c27b; --top: #fff3dd; position: relative; width: 250px; height: 250px; margin: 0 auto; }
.flavor-chocolate .cake { --sponge: #7a4a2e; --top: #5b3420; --cream: #f8e9d8; }
.flavor-strawberry .cake { --sponge: #f3a6b6; --top: #ffd6df; --cream: #fff7f9; }
.flavor-matcha .cake { --sponge: #9cc27a; --top: #d9ecc4; --cream: #fbfff5; }
.cake .plate { position: absolute; left: 4px; right: 4px; bottom: 10px; height: 26px; border-radius: 50%;
  background: radial-gradient(#fff 55%, #e7e2ea 70%); box-shadow: 0 6px 10px rgba(0,0,0,.15); }
.cake .cake-body { position: absolute; left: 24px; right: 24px; bottom: 22px; height: 92px; border-radius: 0 0 50% 50% / 0 0 26px 26px;
  background: linear-gradient(90deg, rgba(0,0,0,.10), transparent 30%, transparent 70%, rgba(0,0,0,.14)), var(--sponge); overflow: hidden; }
.cake .drip { position: absolute; left: 0; right: 0; top: 0; height: 30px;
  background: radial-gradient(circle at 17px 12px, var(--top) 10px, transparent 11px) 0 4px / 34px 30px repeat-x,
    linear-gradient(var(--top) 0 12px, transparent 12px); }
.cake .cake-top { position: absolute; left: 24px; right: 24px; bottom: 96px; height: 40px; border-radius: 50%; z-index: 2;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.5) 0, transparent 60%), var(--top);
  display: flex; align-items: center; justify-content: center; }
.cake .dollop { position: absolute; width: 22px; height: 18px; border-radius: 50% 50% 45% 45%; background: var(--cream);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.06); bottom: -6px; }
.cake .dollop::after { content: ""; position: absolute; left: 6px; top: -7px; width: 10px; height: 10px; border-radius: 50%; background: #d7263d; }
.cake .d1 { left: 2px; } .cake .d2 { left: 42px; bottom: -10px; } .cake .d3 { left: 90px; bottom: -12px; }
.cake .d4 { right: 42px; bottom: -10px; } .cake .d5 { right: 2px; }
.cake .topper { display: flex; gap: 2px; z-index: 3; transform: translateY(-2px); }
.cake .cookie { display: inline-grid; place-items: center; width: 20px; height: 24px; border-radius: 5px; font: 800 15px/1 var(--font-head);
  color: #8a5326; background: #e8b06a; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15), 0 2px 2px rgba(0,0,0,.2); }
.cake .gap { width: 6px; }
.cake .candles { position: absolute; left: 40px; right: 40px; bottom: 120px; height: 84px; display: flex; justify-content: center;
  align-items: flex-end; gap: 6px; z-index: 1; }
.candle { position: relative; width: 12px; height: 56px; border: 0; padding: 0; cursor: pointer; border-radius: 3px 3px 0 0;
  background: repeating-linear-gradient(135deg, #fff 0 5px, #ff8fb1 5px 9px); -webkit-tap-highlight-color: transparent; }
.candle:nth-child(3n+2) { background: repeating-linear-gradient(135deg, #fff 0 5px, #7cc6ff 5px 9px); }
.candle:nth-child(3n) { background: repeating-linear-gradient(135deg, #fff 0 5px, #ffd166 5px 9px); }
.candle::after { content: ""; position: absolute; inset: -18px -10px 0; }  /* bigger tap target */
.candle .flame { position: absolute; left: 50%; top: -24px; width: 14px; height: 22px; margin-left: -7px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff 0 20%, #ffd54a 35%, #ff9800 70%, transparent 72%); filter: drop-shadow(0 0 6px #ffb300);
  transform-origin: 50% 100%; animation: flicker .25s ease-in-out infinite alternate; transition: opacity .3s, transform .3s; }
.candle.out .flame { opacity: 0; transform: scale(.2); animation: none; }
.candle .smoke { position: absolute; left: 50%; top: -18px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: rgba(180,176,184,.6); opacity: 0; }
.candle.out .smoke { animation: smoke 1.4s ease-out forwards; }
.cake-scene.sway .candle:not(.out) .flame { animation-duration: .07s; }
@keyframes flicker { from { transform: scaleY(1) rotate(-3deg); } to { transform: scaleY(1.1) rotate(3deg); } }
@keyframes smoke { 0% { opacity: .8; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-40px) scale(3); } }
.cake-scene.done { animation: cake-away .7s ease forwards; }
@keyframes cake-away { to { opacity: 0; transform: scale(.85); } }
.cake-actions { margin-top: 8px; }
.theme-midnight .cake-actions .muted { color: #cfc8e6; }

.booth-cta { margin: 18px 0 4px; }
.booth { border: 0; border-radius: 20px; padding: 16px; width: min(94vw, 420px); max-height: 94vh; overflow: auto; text-align: center; }
.booth::backdrop { background: rgba(43, 26, 58, .6); }
.booth-title { font: 800 18px var(--font-head); letter-spacing: .1em; margin: 0 0 8px; }
.booth-cam { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #222; }
.booth-cam[hidden] { display: none; }
.booth-cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.booth-count { position: absolute; inset: 0; display: grid; place-items: center; font: 800 72px var(--font-head); color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.booth-count[hidden] { display: none; }
.booth-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.booth-flash.on { animation: flash .35s ease-out; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
.booth-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; }
.booth-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); }
.booth-dots i.done { background: #fff; }
.booth-strip { width: auto; max-width: 100%; max-height: 60vh; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.booth-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .candle .flame, .cake-scene.done, .booth-flash.on { animation: none; } }
.booth [hidden], .cake-scene [hidden], .cake-scene[hidden], .booth-cta[hidden] { display: none !important; }
.form label.check, .form label.flavor-pick { display: flex; font-weight: 500; }
.form label.flavor-pick { font-weight: 600; padding: 6px 14px; }
.form label.thread-pick { display: block; }
.cake-opts { display: grid; gap: 12px; margin-top: 8px; }
.form .cake-opts input[type=range] { width: 100%; }

/* ---------------------------------------------------------------- add-on tiles (easy, big tap targets) */
.extras { display: grid; gap: 10px; }
.form label.extra-tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 18px;
  background: #fff; cursor: pointer; font-weight: 500; -webkit-tap-highlight-color: transparent; transition: border-color .2s, background .2s; }
.extra-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.extra-tile .tile-icon { font-size: 34px; line-height: 1; flex: none; }
.extra-tile .tile-text { display: grid; flex: 1; }
.extra-tile .tile-text b { font-size: 17px; }
.extra-tile .tile-text small { color: var(--muted); font-size: 14px; }
.extra-tile .tile-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.extra-tile:has(input:checked) { border-color: var(--accent); background: #fff0f5; }
.extra-tile:has(input:checked) .tile-check { background: var(--accent); border-color: var(--accent); }
.extra-tile:has(input:checked) .tile-check::after { content: "✓"; color: #fff; font-weight: 800; }
.extra-tile:has(input:focus-visible) { outline: 3px dashed var(--accent); outline-offset: 2px; }
.extra-opts { display: grid; gap: 12px; padding: 4px 6px 12px; }
.extra-opts[hidden] { display: none; }
.opt-label { font-weight: 600; margin: 0; }
.form label.opt-label { display: grid; gap: 6px; }
.opt-label small { font-weight: 400; }
.form input, .form textarea { font-size: 16px; }  /* no zoom-in on iPhone */
.flavor-pick .swatch { width: 18px; height: 18px; border-radius: 50%; background: #f2c27b; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.flavor-chocolate .swatch { background: #7a4a2e; }
.flavor-strawberry .swatch { background: #f3a6b6; }
.flavor-matcha .swatch { background: #9cc27a; }
.flavor-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.form label.flavor-pick { position: relative; padding: 10px 16px; font-size: 15px; }
.stepper { display: inline-flex; align-items: center; gap: 14px; }
.stepper .step { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-size: 26px; line-height: 1;
  color: var(--ink); cursor: pointer; }
.stepper .step:active { background: #fff0f5; }
.stepper output { min-width: 28px; text-align: center; font: 800 26px var(--font-head); }
.stitch-pad { position: relative; }
.pad-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #a3917c; font-size: 17px; pointer-events: none; }
.pad-hint[hidden] { display: none; }
.thread-pick i { width: 34px; height: 34px; }
.pad-actions { display: flex; gap: 8px; }
.extra-note { margin: 4px 2px 0; font-size: 15px; }
.btn.big { min-height: 52px; }

/* ---------------------------------------------------------------- 21 Nov: hidden means hidden (letter / photo bug) */
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- studio in three steps */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wizard-bar { display: flex; gap: 6px; list-style: none; padding: 0; margin: 4px 0 14px; }
.wizard-bar li { flex: 1; text-align: center; font-size: 13px; color: var(--muted); padding: 8px 4px; border-radius: 12px; background: #f7eef2;
  cursor: pointer; line-height: 1.3; }
.wizard-bar li b { display: block; font: 800 16px var(--font-head); }
.wizard-bar li.now { background: var(--accent); color: #fff; }
.wizard-bar li.done { background: #fde3ec; color: var(--accent); }
.step { display: grid; gap: 14px; }
.wizard-on .step + .step { margin-top: 0; }
.form:not(.wizard-on) .step + .step { border-top: 1px dashed var(--line); padding-top: 16px; }
.step-title { font-size: 20px; margin: 0; }
.step-help { margin: -6px 0 0; }
.step-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 4px; }
.step-nav .btn.primary { flex: 1; }
.step-nav .btn.ghost { flex: none; }

/* items: a picture grid instead of a long list */
.form .item-picker { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.form .item-picker legend { grid-column: 1 / -1; }
.form label.item-pick { position: relative; display: flex !important; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; gap: 4px; padding: 10px 4px 8px; border-radius: 14px; font-size: 13px; line-height: 1.25; min-height: 96px; }
.item-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.item-pick .item-img { width: 52px; height: 52px; }
.item-pick .meaning { display: none; font-size: 11px; color: var(--muted); }
.item-pick:has(input:checked) .meaning { display: block; }
.item-pick:has(input:checked)::after { content: "✓"; position: absolute; top: 4px; right: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px; line-height: 20px; }
.item-pick:has(input:focus-visible) { outline: 3px dashed var(--accent); }
.themes { grid-template-columns: 1fr 1fr; }
.themes legend { grid-column: 1 / -1; }

.more-opts { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.more-opts summary { cursor: pointer; font-weight: 600; }
.more-opts[open] { display: grid; gap: 12px; }

.plan-card { border: 2px solid var(--line); border-radius: 16px; padding: 14px; cursor: pointer; }
.plan-card:has(input:checked) { border-color: var(--accent); background: #fff0f5; }
.plan-card small { display: block; color: var(--muted); font-size: 14px; }
.plan-note { background: #fff7d6; border-radius: 12px; padding: 10px 12px; margin: 0; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 40px); opacity: 0; z-index: 50; max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------------------------------------------------------------- seasonal themes (21 Nov 2026) */
.theme-christmas { --a: #e04a3f; --b: #1f7a4a; --ribbon: #ffd166; --c1: #e04a3f; --c2: #2e9b5f; --c3: #ffd166; --c4: #ffffff;
  --paper: radial-gradient(#fff 1.2px, transparent 1.8px) 0 0 / 16px 16px, linear-gradient(135deg, #e04a3f, #a8231b); }
.theme-christmas.gift { background: linear-gradient(170deg, #fff, #fdecea 45%, #e3f4ea); }
.theme-pick.theme-christmas { background: linear-gradient(135deg, #e04a3f, #1f7a4a); }
.theme-newyear { --a: #26206b; --b: #0d0b2e; --ribbon: #f4d35e; --c1: #f4d35e; --c2: #ff6b9c; --c3: #7cc6ff; --c4: #ffffff;
  --paper: radial-gradient(#f4d35e 1px, transparent 1.6px) 0 0 / 18px 18px, linear-gradient(135deg, #3b2f9e, #16123a); }
.theme-newyear.gift { background: radial-gradient(circle at 50% 25%, #3b2f9e, #0d0b2e 75%); color: #f3eefc; }
.theme-pick.theme-newyear { background: linear-gradient(135deg, #3b2f9e, #0d0b2e); }
.theme-newyear .cake-actions .muted, .theme-newyear .booth-cta .muted { color: #cfc8e6; }

/* falling snow on Christmas boxes (two layers of dots drifting down) */
.gift.theme-christmas::before, .gift.theme-christmas::after { content: ""; position: absolute; inset: -40px 0 0; pointer-events: none; z-index: 1;
  background: radial-gradient(#fff 2px, transparent 2.6px) 0 0 / 46px 46px, radial-gradient(#fff 1.4px, transparent 2px) 20px 12px / 34px 34px;
  opacity: .85; animation: snow 9s linear infinite; }
.gift.theme-christmas::after { opacity: .5; animation-duration: 14s; background-size: 60px 60px, 26px 26px; }
@keyframes snow { from { background-position: 0 0, 20px 12px; } to { background-position: 30px 460px, -10px 352px; } }
/* fireworks on New Year boxes (a few bursts, reuses the confetti pieces) */
.confetti.fireworks i { width: 5px; height: 5px; border-radius: 50%; box-shadow: 0 0 6px var(--c); }

/* ---------------------------------------------------------------- sharing and "they opened it" */
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 12px 0 4px; }
.btn.line { background: #06c755; border-color: #06c755; color: #fff; font-weight: 700; }
.opened-box { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #fff7fb; border: 1px dashed var(--line); text-align: left; }
.opened-title { margin: 0; font-weight: 600; }
.opened-steps { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
.opened-steps time { color: var(--muted); margin-left: 6px; }
.send-back { display: grid; gap: 6px; justify-items: center; margin: 22px 0 4px; }
.theme-midnight .send-back a.small-text, .theme-newyear .send-back a.small-text { color: #dcd5f2; }
.demo-note { text-align: center; background: #fff3c4; border-radius: 999px; padding: 6px 14px; font-size: 14px; margin: 0 auto 8px; width: fit-content; max-width: 100%; }

/* ---------------------------------------------------------------- home page */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 18px; }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } .features figure { display: grid; grid-template-columns: 110px 1fr; align-items: center; } }
.features figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.features img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.features figcaption { padding: 10px 12px 12px; font-size: 14px; color: var(--muted); }
.features figcaption b { display: block; color: var(--ink); font-size: 15px; }
.season-banner { display: block; text-align: center; text-decoration: none; font-weight: 700; color: #fff; padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(90deg, #e04a3f, #1f7a4a 55%, #26206b); margin: 0 0 6px; }

/* ---------------------------------------------------------------- owner: market test numbers */
.funnel { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.funnel th, .funnel td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.funnel th:first-child, .funnel td:first-child { text-align: left; }
.funnel .bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--accent); vertical-align: middle; margin-right: 6px; }

/* ---------------------------------------------------------------- price decided by the box (21 Nov 2026) */
.price-intro { margin: -4px 0 10px; font-size: 14px; color: var(--muted); }
.price-bar { position: sticky; bottom: 0; z-index: 20; margin: 6px -20px -20px; padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 20px -14px rgba(43, 26, 58, .4); display: grid; gap: 8px;
  border-radius: 0 0 18px 18px; }
.price-now { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now .price-label { font-size: 14px; color: var(--muted); }
.price-now b { font: 800 24px var(--font-head); color: var(--ink); }
.price-bar.paid .price-now b { color: var(--accent); }
.price-bar:not(.paid) [data-price-sub] { display: none; }
.price-why { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.price-why .why-label { color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #f3c2d3; background: #fff0f5; color: var(--ink);
  border-radius: 999px; padding: 3px 6px 3px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.chip b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #f3c2d3; color: #7a2347; font-size: 11px; }
.chip:focus-visible { outline: 3px dashed var(--accent); }

/* photo booth: strip or polaroid */
.booth-modes { display: flex; gap: 6px; justify-content: center; margin: 0 0 10px; }
.booth-modes .mode { border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 12px;
  font: inherit; font-size: 14px; cursor: pointer; }
.booth-modes .mode.on { border-color: var(--accent); background: #fff0f5; font-weight: 600; }
.booth-cam.square { aspect-ratio: 1; }

.booth-frames { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 0 0 10px; }
.booth-frames .frame { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 4px 10px 4px 6px; font: inherit; font-size: 13px; cursor: pointer; }
.booth-frames .frame.on { border-color: var(--accent); background: #fff0f5; font-weight: 600; }
.booth-frames .frame[disabled] { opacity: .5; cursor: not-allowed; }
.booth-frames .sw { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15); }
.sw-classic { background: #fffdf8; } .sw-hearts { background: radial-gradient(#f26b95 30%, #ffe1ea 32%) 0 0 / 9px 9px; }
.sw-film { background: #1f1b22; } .sw-gold { background: linear-gradient(135deg, #fbe7a1, #d9a92c); }
.sw-snow { background: radial-gradient(#fff 25%, #c9302c 28%) 0 0 / 8px 8px; }
.sw-xmas { background: radial-gradient(#ffd166 22%, transparent 26%) 0 0 / 9px 9px, #174d33; }
.frames-note { margin: -4px 0 8px; text-align: center; }

/* ---------------------------------------------------------------- polaroid maker */
.polaroid-page { display: grid; gap: 12px; }
.pick-photo { justify-self: center; cursor: pointer; }
.pm-empty { display: grid; place-items: center; padding: 8px 0; }
.pm-sample { width: 200px; aspect-ratio: 600 / 730; background: #fffdf8; box-shadow: 0 10px 24px -8px rgba(43,26,58,.35); transform: rotate(-2deg);
  padding: 12px 12px 48px; display: grid; }
.pm-sample span { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #fde6ee 0 10px, #fff3f7 10px 20px);
  color: var(--muted); font-size: 14px; }
.pm-editor { display: grid; gap: 12px; }
.pm-preview { width: min(100%, 360px); height: auto; justify-self: center; border-radius: 12px; touch-action: none; cursor: grab; }
.pm-frames .frame.locked { opacity: .75; }
.pm-bgs { display: flex; gap: 8px; flex-wrap: wrap; }
.pm-bg { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; outline: 1px solid var(--line); cursor: pointer; }
.pm-bg.on { outline: 3px solid var(--accent); }
.pm-unlock { border: 2px dashed var(--accent); border-radius: 16px; padding: 12px; background: #fff7fb; }
.pm-unlock .pay-form { display: grid; gap: 10px; }
.pm-export { justify-self: stretch; }
.pm-result { width: min(100%, 360px); justify-self: center; border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
p.ok { color: #23845f; font-weight: 600; }
.polaroid-banner { display: block; text-align: center; text-decoration: none; font-weight: 700; color: var(--ink); padding: 12px 14px;
  border-radius: 16px; background: #fffdf8; border: 2px solid var(--line); margin: 6px 0; }

/* ---------------------------------------------------------------- home: polaroid maker, big (owner: "too small") */
.polaroid-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; margin: 18px 0 22px; padding: 22px 18px;
  border-radius: 24px; background: radial-gradient(circle at 20% 20%, #fff 0, #ffe6ef 55%, #fcd3e1 100%); border: 1px solid var(--line); overflow: hidden; }
@media (max-width: 620px) { .polaroid-feature { grid-template-columns: 1fr; text-align: center; padding: 18px 14px 22px; } }
.pf-stack { position: relative; display: block; height: 300px; }
.pf-pic { position: absolute; width: 190px; height: auto; left: 50%; top: 50%; border-radius: 6px; box-shadow: 0 14px 28px -10px rgba(43,26,58,.45);
  transition: transform .35s ease; }
.pf-pic.p1 { transform: translate(-50%, -50%) rotate(-4deg); z-index: 3; }
.pf-pic.p2 { transform: translate(-95%, -52%) rotate(-14deg) scale(.88); z-index: 2; }
.pf-pic.p3 { transform: translate(-5%, -48%) rotate(11deg) scale(.88); z-index: 1; }
.pf-stack:hover .p1 { transform: translate(-50%, -54%) rotate(-2deg); }
.pf-stack:hover .p2 { transform: translate(-105%, -52%) rotate(-17deg) scale(.88); }
.pf-stack:hover .p3 { transform: translate(5%, -48%) rotate(14deg) scale(.88); }
.pf-text { display: grid; gap: 10px; }
.pf-new { margin: 0; justify-self: start; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; padding: 3px 12px; border-radius: 999px; }
.pf-text h2 { margin: 0; font-size: clamp(24px, 6vw, 32px); line-height: 1.25; }
.pf-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 16px; }
.pf-steps li { display: flex; gap: 10px; align-items: center; }
.pf-steps b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--accent);
  font-family: var(--font-head); box-shadow: 0 2px 6px rgba(224,69,123,.25); flex: none; }
.pf-btn { justify-self: start; }
.pf-note { margin: 0; font-size: 13px; color: var(--muted); }
@media (max-width: 620px) {
  .pf-new, .pf-btn { justify-self: center; }
  .pf-steps { justify-content: center; }
  .pf-stack { height: 270px; }
  .pf-pic { width: 170px; }
}
@media (prefers-reduced-motion: reduce) { .pf-pic { transition: none; } }
.pf-text { position: relative; z-index: 4; }
@media (min-width: 621px) { .pf-pic.p2 { transform: translate(-88%, -52%) rotate(-12deg) scale(.84); } .pf-pic.p3 { transform: translate(-14%, -48%) rotate(10deg) scale(.84); }
  .pf-stack:hover .p2 { transform: translate(-96%, -52%) rotate(-15deg) scale(.84); } .pf-stack:hover .p3 { transform: translate(-6%, -48%) rotate(13deg) scale(.84); } }

.sw-flowers { background: radial-gradient(#f7a1b8 35%, #fbf6ec 38%) 0 0 / 9px 9px; }
.sw-stickers { background: linear-gradient(135deg, #a8e6cf 0 33%, #ffd166 33% 66%, #c9b8ff 66%); }

/* photo tool: polaroid or photo booth sheet */
.pm-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pm-mode { display: grid; gap: 2px; border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 10px; font: inherit; color: var(--ink); cursor: pointer; }
.pm-mode b { font-size: 16px; } .pm-mode small { color: var(--muted); }
.pm-mode.on { border-color: var(--accent); background: #fff0f5; }
.pm-slots { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pm-slots .slot { position: relative; width: 62px; height: 62px; border-radius: 12px; border: 3px solid #fff; outline: 1px solid var(--line);
  background: #f6eef2 center / cover no-repeat; cursor: pointer; padding: 0; }
.pm-slots .slot.on { outline: 3px solid var(--accent); }
.pm-slots .slot.add { display: grid; place-items: center; font-size: 28px; color: var(--accent); background: #fff0f5; }
.pm-slots .slot-del { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: 11px; display: grid; place-items: center; }
.sw-sheet_black { background: #0d0b0e; } .sw-sheet_white { background: #fbfaf7; }
.sw-sheet_pink { background: radial-gradient(#f26b95 30%, #ffd6e3 32%) 0 0 / 8px 8px; }
.sw-sheet_gold { background: linear-gradient(135deg, #17110c 50%, #d9a92c 50%); }

.pm-split { display: flex; gap: 8px; justify-content: center; }
.pm-split button { border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.pm-split button.on { border-color: var(--accent); background: #fff0f5; font-weight: 600; }

/* language switch (i18n.py): a soft pill in the brand pink, the chosen language slides into a filled bubble */
.top { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand lang" "tag tag"; align-items: center; row-gap: 2px; }
.top .brand { grid-area: brand; } .top .tag { grid-area: tag; } .top .lang-switch { grid-area: lang; }
@media (min-width: 640px) { .top { grid-template-columns: auto 1fr auto; grid-template-areas: "brand tag lang"; column-gap: 12px; } }
.lang-switch { justify-self: end; display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: #fff;
  border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 2px 0 var(--line); font: 600 13px/1 var(--font-head); }
.lang-switch::before { content: "🌐"; font-size: 14px; padding: 0 3px 0 6px; }
.lang-switch a { padding: 6px 12px; border-radius: 999px; color: var(--muted); text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .15s ease; }
.lang-switch a:not(.on):hover, .lang-switch a:not(.on):focus-visible { background: #fff0f5; color: var(--accent); }
.lang-switch a:active { transform: scale(.94); }
.lang-switch a.on { background: var(--accent); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.14); }
.lang-switch a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .lang-switch a { transition: none; } }

/* English legal pages: "Thai version prevails" note */
.legal-note { background: #fff4d6; border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--muted); }
