/* ============ Site chrome ============ */
:root {
  --ink: #2a1630; --ink-2: #5b4660; --paper: #f8f3ea; --card: #fffdf8; --line: #e6dccb;
  --accent: #d9482b; --accent-2: #b8862f; --ok: #2f7a55;
  --ui: 'Instrument Sans', system-ui, sans-serif; --disp: 'Fraunces', Georgia, serif;
}
* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; }
body { font-family: var(--ui); color: var(--ink); background: #170d1b; -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

.btn { border: 0; border-radius: 999px; padding: 12px 22px; background: var(--ink); color: #fff; font-weight: 600; letter-spacing: .01em; transition: transform .15s, background .15s; }
a.btn { display: inline-block; text-decoration: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.accent { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.light { background: #fff; color: var(--ink); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .field select { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); }
.hint { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 200; transition: .3s; font-size: 14px; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Home */
.home { min-height: 100%; position: relative; overflow: hidden; color: #fff; display: grid; place-items: center; padding: 48px 16px 200px;
  background: radial-gradient(90% 70% at 50% 0%, #4a2050 0%, #1d0f22 60%, #120914 100%); }
.home-inner { position: relative; z-index: 2; text-align: center; max-width: 820px; }
.home h1 { font-family: var(--disp); font-weight: 400; font-size: clamp(48px, 9vw, 104px); margin: 0; letter-spacing: -.02em; line-height: .95; }
.home h1 em { color: #f2b84b; }
.home .lede { font-size: clamp(16px, 2.2vw, 20px); opacity: .85; max-width: 560px; margin: 18px auto 36px; line-height: 1.5; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .choices { grid-template-columns: 1fr; } }
.choice { text-align: left; border: 0; border-radius: 22px; padding: 26px; color: var(--ink); background: var(--paper); position: relative; overflow: hidden; transition: transform .25s; min-height: 170px; }
.choice:hover { transform: translateY(-4px) rotate(-.5deg); }
.choice b { display: block; font-family: var(--disp); font-size: 28px; font-weight: 500; margin-bottom: 6px; }
.choice span { color: var(--ink-2); font-size: 15px; line-height: 1.45; display: block; max-width: 85%; }
.choice .door-ico { position: absolute; right: 18px; top: 18px; width: 54px; height: 54px; border-radius: 8px; background: var(--accent); perspective: 200px; }
.choice .door-ico::after { content: '7'; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--disp); font-size: 26px; color: #fff; background: #f2b84b; border-radius: 8px; transform-origin: left; transition: transform .5s; }
.choice:hover .door-ico::after { transform: rotateY(-70deg); }
.choice.recv .door-ico { background: #2c6e8f; }
.choice.recv .door-ico::after { content: '24'; background: #1b1838; }
.marquee { position: absolute; left: 0; right: 0; bottom: 18px; height: 160px; overflow: hidden; z-index: 1; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marq 70s linear infinite; }
.marquee .thumb { width: 220px; height: 150px; border-radius: 12px; flex: none; }
@keyframes marq { to { transform: translateX(-50%); } }

/* Generic page */
.page { min-height: 100%; background: var(--paper); padding: 28px 16px 60px; }
.page-inner { max-width: 1180px; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.brand { font-family: var(--disp); font-size: 24px; text-decoration: none; color: var(--ink); }
.brand em { color: var(--accent); }
.page h2 { font-family: var(--disp); font-weight: 500; font-size: clamp(30px, 4.5vw, 46px); margin: 0 0 6px; letter-spacing: -.01em; }
.page .sub { color: var(--ink-2); margin: 0 0 26px; font-size: 17px; }

.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.design-card { border: 0; padding: 0; background: var(--card); border-radius: 18px; overflow: hidden; text-align: left; box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(40, 10, 40, .4); transition: transform .25s, box-shadow .25s; }
.design-card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 var(--line), 0 20px 40px -18px rgba(40, 10, 40, .5); }
.design-card.selected { box-shadow: 0 0 0 3px var(--accent), 0 20px 40px -18px rgba(40, 10, 40, .5); }
.design-card .meta { padding: 14px 16px 16px; }
.design-card .meta b { font-family: var(--disp); font-size: 21px; font-weight: 500; }
.design-card .meta .tag { float: right; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 4px 8px; border-radius: 99px; background: #f1e7d6; color: var(--ink-2); margin-top: 4px; }
.design-card .meta p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.thumb { position: relative; overflow: hidden; height: 190px; background: #000; }
.thumb .scene { position: absolute; left: 0; top: 0; width: 1000px; height: 700px; min-height: 0; transform-origin: top left; pointer-events: none; }

.modal-ov { position: fixed; inset: 0; z-index: 100; background: rgba(20, 8, 24, .55); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fadeIn .25s; }
.modal { background: var(--paper); border-radius: 20px; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 26px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); animation: rise .35s cubic-bezier(.2,.9,.3,1.2); }
.modal h3 { font-family: var(--disp); font-weight: 500; font-size: 28px; margin: 0 0 4px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.97); } }

/* Editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 420px; min-height: 100vh; background: var(--paper); }
@media (max-width: 1000px) { .editor { grid-template-columns: 1fr; } }
.editor .stage-wrap { position: sticky; top: 0; height: 100vh; overflow: hidden; }
@media (max-width: 1000px) { .editor .stage-wrap { position: relative; height: auto; min-height: 70vh; } }
.editor .stage-wrap .scene { height: 100%; }
.stage-bar { position: absolute; z-index: 20; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; pointer-events: none; }
.stage-bar > * { pointer-events: auto; }
.chip { background: rgba(255,255,255,.92); color: var(--ink); border-radius: 99px; padding: 8px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.15); text-decoration: none; }
.chip.saved::before { content: '● '; color: var(--ok); }
.chip.saving::before { content: '● '; color: var(--accent-2); }
.panel { background: var(--paper); border-left: 1px solid var(--line); padding: 20px 22px 60px; overflow: auto; height: 100vh; }
@media (max-width: 1000px) { .panel { height: auto; border-left: 0; } }
.panel h2 { font-family: var(--disp); font-weight: 500; font-size: 28px; margin: 0; }
.panel .for { color: var(--ink-2); margin: 2px 0 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tab { border: 0; background: #efe6d6; color: var(--ink-2); border-radius: 99px; padding: 8px 13px; font-size: 14px; font-weight: 600; }
.tab.on { background: var(--ink); color: #fff; }
.tab .count { display: inline-block; background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 6px; margin-left: 4px; }
.progress { height: 8px; background: #eadfcc; border-radius: 99px; overflow: hidden; margin: 6px 0 18px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #f2b84b); border-radius: 99px; transition: width .5s; }
.door-list { display: grid; gap: 6px; }
.door-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: var(--card); border-radius: 12px; border: 1.5px solid transparent; text-align: left; }
.door-row:hover, .door-row.sel { border-color: var(--ink); }
.door-row .d { width: 38px; height: 38px; border-radius: 9px; background: #efe6d6; display: grid; place-items: center; font-family: var(--disp); font-size: 17px; }
.door-row.filled .d { background: var(--ink); color: #fff; }
.door-row .t { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.door-row .t small { display: block; color: var(--ink-2); font-size: 12px; }
.door-row .k { font-size: 18px; }
.sugg { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 10px 12px; background: var(--card); border-radius: 12px; margin-bottom: 6px; align-items: start; }
.sugg input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ink); }
.sugg b { font-size: 14px; display: block; }
.sugg p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.sugg .ty { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; }
.box { background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 14px; border: 1px solid var(--line); }
.box h4 { margin: 0 0 6px; font-family: var(--disp); font-weight: 500; font-size: 19px; }
.copyline { display: flex; gap: 8px; align-items: center; background: #f3ecdf; border-radius: 10px; padding: 8px 8px 8px 12px; margin: 8px 0; font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; }
.copyline span { flex: 1; }
.code-big { font-family: var(--disp); font-size: 34px; letter-spacing: .06em; }
.reply-item { background: var(--card); border-radius: 14px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--line); }
.reply-item b { font-family: var(--disp); font-weight: 500; }
.reply-item video { width: 100%; border-radius: 10px; margin-top: 8px; background: #000; }
.mini-designs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mini-designs .design-card .thumb { height: 110px; }
.mini-designs .design-card .meta { padding: 8px 10px; }
.mini-designs .design-card .meta b { font-size: 15px; }
.mini-designs .design-card .meta p, .mini-designs .design-card .meta .tag { display: none; }
.fill-ways { margin-bottom: 18px; }
.bulk-hero { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 22px 18px; border-radius: 16px; cursor: pointer; border: 2px dashed #d9a441; background: linear-gradient(160deg, #fff8e8, #fbefd6); transition: .2s; }
.bulk-hero b { font-family: var(--disp); font-weight: 500; font-size: 21px; }
.bulk-hero span { color: var(--ink-2); font-size: 14px; line-height: 1.4; max-width: 300px; }
.bulk-hero span.btn { color: #fff; margin-top: 6px; }
.bulk-hero:hover, .bulk-hero.over { border-color: var(--ink); transform: translateY(-1px); }
.fill-alt { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.fill-alt .btn { flex: 1; }
.drop-zone { border: 2px dashed #cdbfa6; border-radius: 14px; padding: 22px; text-align: center; color: var(--ink-2); background: #fbf7ef; cursor: pointer; transition: .2s; }
.drop-zone.over { border-color: var(--ink); background: #f3ecdf; }
.media-prev { max-width: 100%; max-height: 200px; border-radius: 10px; display: block; margin-top: 6px; }
details.claude { margin-top: 18px; }
details.claude summary { cursor: pointer; font-weight: 600; }

/* Receive */
.recv-page { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(90% 70% at 50% 0%, #4a2050 0%, #1d0f22 60%, #120914 100%); }
.recv-card { width: min(440px, 100%); background: var(--paper); border-radius: 22px; padding: 30px; text-align: center; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); }
.recv-card h2 { font-family: var(--disp); font-weight: 500; font-size: 32px; margin: 0 0 6px; }
.recv-card input.code { text-align: center; font-family: var(--disp); font-size: 30px; letter-spacing: .1em; text-transform: uppercase; }
.err { color: var(--accent); font-size: 14px; min-height: 20px; margin: 6px 0; }
.recv-view { height: 100vh; position: relative; }
.recv-view .scene { height: 100%; }
.recv-hud { position: absolute; z-index: 30; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.recv-hud > * { pointer-events: auto; }
.banner { position: absolute; z-index: 30; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(255,255,255,.95); color: var(--ink); border-radius: 16px; padding: 12px 18px; box-shadow: 0 10px 30px rgba(0,0,0,.25); text-align: center; max-width: calc(100% - 32px); font-size: 15px; }
.banner b { font-family: var(--disp); font-weight: 500; font-size: 18px; }
.testbar { position: absolute; z-index: 30; right: 14px; bottom: 14px; background: rgba(0,0,0,.7); color: #fff; padding: 8px 10px; border-radius: 12px; font-size: 12px; display: flex; gap: 6px; align-items: center; }
.testbar input { background: #fff; color: #000; border: 0; border-radius: 6px; padding: 3px 6px; }
@media (max-width: 640px) {
  .testbar { left: 14px; right: 14px; top: 54px; bottom: auto; justify-content: center; flex-wrap: wrap; padding: 6px 8px; }
  .recv-view .scene { padding-top: 110px; padding-bottom: 96px; }
  .banner { font-size: 13px; padding: 9px 14px; bottom: 14px; } .banner b { font-size: 15px; }
}

/* ============ The gift card that pops out of a door ============ */
.gift-ov { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(10, 4, 14, .6); backdrop-filter: blur(5px); animation: fadeIn .3s; overflow: auto; }
.gift { position: relative; width: min(540px, 100%); background: #fffdf8; border-radius: 20px; padding: 0 0 22px; box-shadow: 0 40px 90px -20px rgba(0,0,0,.6); animation: giftIn .7s cubic-bezier(.2,1.3,.4,1) both; margin: auto; }
@keyframes giftIn { 0% { opacity: 0; transform: translateY(60px) scale(.3) rotate(-10deg); } 60% { opacity: 1; } 100% { transform: none; } }
.gift .g-head { padding: 22px 26px 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.gift .g-day { font-family: var(--disp); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.gift .g-x { border: 0; background: #f1e8d8; border-radius: 99px; width: 34px; height: 34px; font-size: 18px; flex: none; }
.gift .g-body { padding: 0 26px; }
.gift h3 { font-family: var(--disp); font-weight: 500; font-size: 30px; margin: 0 0 10px; line-height: 1.1; }
.gift p { font-size: 17px; line-height: 1.55; margin: 0 0 12px; white-space: pre-wrap; }
.gift .g-media { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 12px; background: #111; display: block; margin-bottom: 12px; }
.gift .punch { border: 0; width: 100%; padding: 16px; border-radius: 14px; background: #f3ecdf; font-family: var(--disp); font-size: 20px; transition: .3s; }
.gift .punch.shown { background: #2a1630; color: #fff; animation: pop .4s; }
@keyframes pop { 50% { transform: scale(1.04); } }
.gift .meme { position: relative; border-radius: 12px; overflow: hidden; min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; text-align: center; margin-bottom: 12px;
  background: radial-gradient(circle at 30% 30%, #f2b84b, #d9482b 60%, #6b1f3d); background-size: cover; background-position: center; }
.gift .meme span { font-family: 'Anton', Impact, sans-serif; font-size: clamp(24px, 6vw, 36px); color: #fff; text-transform: uppercase; line-height: 1.05; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 0 2px 0 #000; }
.gift .kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.gift .reply { margin: 18px 26px 0; padding-top: 16px; border-top: 1px dashed var(--line); }
.gift .reply h4 { margin: 0 0 8px; font-family: var(--disp); font-weight: 500; font-size: 19px; }
.gift .reply textarea { width: 100%; min-height: 80px; border-radius: 12px; border: 1.5px solid var(--line); padding: 10px 12px; resize: vertical; }
.gift .reply .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.gift .reply video { width: 100%; border-radius: 12px; margin-top: 8px; background: #000; max-height: 300px; }
.gift .sent { color: var(--ok); font-weight: 600; font-size: 14px; }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #e0242b; animation: blink 1s infinite; margin-right: 6px; }
@keyframes blink { 50% { opacity: .2; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 130; overflow: hidden; }
.confetti i { position: absolute; left: 50%; top: 50%; width: 9px; height: 14px; border-radius: 2px; animation: burst 1.3s cubic-bezier(.1,.8,.3,1) forwards; }
@keyframes burst { 0% { transform: translate(-50%, -50%) rotate(0); opacity: 1; } 100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)); opacity: 0; } }

/* ============ Unwrap overlay ============ */
.wrap-ov { position: absolute; inset: 0; z-index: 60; overflow: hidden; }
.wrap-half { position: absolute; top: -5%; bottom: -5%; width: 52%; background: var(--paper-art, #b8336a); box-shadow: inset 0 0 120px rgba(0,0,0,.25); transition: transform 1.1s cubic-bezier(.6,0,.3,1); }
.wrap-l { left: 0; clip-path: polygon(0 0, 100% 0, 96% 6%, 100% 12%, 95% 19%, 99% 26%, 94% 33%, 99% 40%, 95% 47%, 100% 54%, 94% 61%, 99% 68%, 95% 75%, 100% 82%, 95% 89%, 99% 95%, 96% 100%, 0 100%); }
.wrap-r { right: 0; clip-path: polygon(4% 0, 100% 0, 100% 100%, 4% 100%, 1% 95%, 5% 89%, 0 82%, 5% 75%, 1% 68%, 6% 61%, 0 54%, 5% 47%, 1% 40%, 6% 33%, 1% 26%, 5% 19%, 0 12%, 4% 6%); }
.ribbon-v, .ribbon-h { position: absolute; background: var(--ribbon, #f2c14e); box-shadow: 0 0 0 1px rgba(0,0,0,.08), inset 0 0 0 3px rgba(255,255,255,.18); transition: transform .5s ease-in .35s; }
.ribbon-v { left: 50%; top: 0; bottom: 0; width: 54px; margin-left: -27px; transform-origin: center top; }
.ribbon-h { top: 50%; left: 0; right: 0; height: 54px; margin-top: -27px; transform-origin: left center; }
.bigbow { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transition: transform .5s cubic-bezier(.5,-0.5,.7,1), opacity .4s; }
.bigbow i { position: absolute; width: 120px; height: 74px; border-radius: 50%; border: 18px solid var(--ribbon, #f2c14e); top: -37px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.bigbow i:nth-child(1) { right: 6px; transform: rotate(-22deg); }
.bigbow i:nth-child(2) { left: 6px; transform: rotate(22deg); }
.bigbow b { position: absolute; width: 40px; height: 40px; left: -20px; top: -20px; border-radius: 10px; background: var(--ribbon, #f2c14e); box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.gift-tag { position: absolute; left: 50%; top: 50%; transform: translate(26px, 40px) rotate(6deg); background: #fffdf5; color: var(--ink); padding: 20px 26px 22px; border-radius: 6px 6px 6px 6px; box-shadow: 0 14px 30px rgba(0,0,0,.35); text-align: center; min-width: 230px; transition: transform .6s, opacity .4s; font-family: var(--disp); }
.gift-tag::before { content: ''; position: absolute; top: 10px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; box-shadow: inset 0 0 0 2px #bba; }
.gift-tag small { display: block; font-family: var(--ui); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-top: 14px; }
.gift-tag div { font-size: 26px; margin: 2px 0 12px; }
.gift-tag .btn { font-family: var(--ui); }
@media (max-width: 640px) { .gift-tag { transform: translate(-50%, 60px) rotate(3deg); } .bigbow i { width: 90px; height: 56px; border-width: 14px; top: -28px; } }
.wrap-ov.go .bigbow { transform: translateY(-140px) scale(1.4) rotate(40deg); opacity: 0; }
.wrap-ov.go .gift-tag { transform: translate(60px, 160px) rotate(30deg); opacity: 0; }
.wrap-ov.go .ribbon-v { transform: scaleY(0); }
.wrap-ov.go .ribbon-h { transform: scaleX(0); }
.wrap-ov.go .wrap-l { transform: translateX(-108%) rotate(-5deg); transition-delay: .7s; }
.wrap-ov.go .wrap-r { transform: translateX(108%) rotate(5deg); transition-delay: .7s; }

/* ============ Scenes and calendars (shared) ============ */
.scene { position: relative; overflow: hidden; min-height: 100%; display: grid; place-items: center; padding: 70px 16px 60px; background: var(--bg, #333); }
.stage { position: relative; width: min(var(--cal-w, 820px), 100%); z-index: 2; }
.floor { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: var(--floor, transparent); z-index: 0; }
.cal { position: relative; z-index: 2; background: var(--box); padding: var(--pad, 18px); border-radius: var(--radius, 6px); box-shadow: var(--box-shadow, 0 40px 70px -30px rgba(0,0,0,.65), 0 2px 0 rgba(0,0,0,.2)); }
.cal-title { text-align: center; margin: 0 0 var(--title-gap, 14px); font-family: var(--f-head, var(--disp)); color: var(--title-c, #fff); font-size: clamp(15px, 2.4vw, 24px); letter-spacing: var(--title-ls, .08em); }
.cal-title:empty { display: none; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap, 10px); }
@media (max-width: 640px) { .recv-view .grid, .editor .grid { grid-template-columns: repeat(4, 1fr); } }
.door { position: relative; display: block; aspect-ratio: var(--door-ar, 1); border: 0; padding: 0; background: transparent; perspective: 700px; color: inherit; -webkit-tap-highlight-color: transparent; }
.door .inside { position: absolute; inset: 0; border-radius: var(--door-r, 4px); background: var(--inside, #1b1416); box-shadow: inset 0 6px 16px rgba(0,0,0,.55); display: grid; place-items: center; overflow: hidden; color: var(--inside-c, #fff); font-size: clamp(16px, 2.8vw, 30px); }
.door .inside img, .door .inside video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.door .inside .in-num { position: absolute; left: 7%; top: 5%; font-size: 11px; font-family: var(--ui); opacity: .75; z-index: 1; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.door .cover { position: absolute; z-index: 2; inset: 0; border-radius: var(--door-r, 4px); background: var(--door, #ddd); display: grid; place-items: center; transform-origin: left center; box-shadow: var(--door-shadow, inset 0 0 0 1px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.25)); transition: transform .95s cubic-bezier(.2,.75,.25,1), opacity .6s, box-shadow .6s, filter .3s; will-change: transform; }
.open-swing .door.is-open .cover > *, .open-flip .door.is-open .cover > * { opacity: 0; transition: opacity .2s .25s; }
.open-swing .door.is-open .cover, .open-flip .door.is-open .cover { filter: brightness(.7); }
.num { font-family: var(--f-num, var(--disp)); color: var(--num, #222); font-size: clamp(14px, 2.6vw, 30px); line-height: 1; position: relative; z-index: 2; }
.num b { font-weight: inherit; display: inline-block; }
.cover .bow { display: none; }
.door:hover .cover { filter: brightness(1.06); }
.door:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 6px; }
.door.is-locked .cover { filter: saturate(.8); }
.door.shake .cover { animation: shake .45s; }
@keyframes shake { 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(2deg); } }
.door.is-today .cover { animation: todayGlow 1.8s ease-in-out infinite; }
@keyframes todayGlow { 50% { box-shadow: 0 0 0 3px var(--glow, #ffd76a), 0 0 26px 6px var(--glow, #ffd76a); } }
.door.is-filled::after { content: ''; position: absolute; right: 6%; top: 6%; width: 9px; height: 9px; border-radius: 50%; background: #3ad07a; box-shadow: 0 0 0 2px #fff; z-index: 5; }
.door.is-selected { outline: 3px solid #fff; outline-offset: 3px; border-radius: 6px; }
.cal.enter .door { animation: doorIn .55s cubic-bezier(.2,1.3,.4,1) backwards; animation-delay: calc(var(--i) * 28ms + .1s); }
@keyframes doorIn { from { opacity: 0; transform: translateY(14px) scale(.85); } }
.cal.enter { animation: calIn 1s cubic-bezier(.2,1,.3,1) backwards; }
@keyframes calIn { from { opacity: 0; transform: translateY(40px) scale(.94); } }

/* How doors open */
.open-swing .door.is-open .cover { transform: rotateY(-108deg); box-shadow: 10px 0 18px rgba(0,0,0,.35); }
.open-drawer .door.is-open .cover { transform: translateY(64%) scale(1.06); box-shadow: 0 -10px 18px rgba(0,0,0,.35); z-index: 3; }
.open-lift .door.is-open .cover { transform: translateY(-45%) scale(1.3); opacity: 0; }
.open-flip .door.is-open .cover { transform-origin: center top; transform: rotateX(112deg); }
.open-untie .door .cover { transition-delay: .3s; }
.open-untie .door.is-open .cover { transform: translateY(-115%) rotate(-10deg); opacity: 0; }
.open-drop .door .cover { transition: transform .75s cubic-bezier(.55,0,.9,.4), opacity .3s .5s; }
.open-drop .door.is-open .cover { transform: translateY(190%) rotate(18deg); opacity: 0; }
.open-swing .door.is-open:hover .cover, .open-flip .door.is-open:hover .cover { filter: none; }

/* ============ 1. The Atelier ============ */
.d-atelier { --bg: radial-gradient(110% 80% at 50% 25%, #c99145 0%, #8f5d22 52%, #4d2f10 100%); --floor: linear-gradient(#9b6a2a, #6b4416); --cal-w: 680px;
  --box: #1d1a17; --pad: 8px; --gap: 5px; --radius: 3px; --door: linear-gradient(#f6f0e5, #ebe2d1); --door-r: 1px; --num: #6e5d4b; --f-num: 'Cormorant Garamond', serif; --inside: #241e18;
  --title-c: #f6f0e5; --f-head: 'Cormorant Garamond', serif; --title-ls: .02em; --glow: #fff2c8; --paper-art: repeating-linear-gradient(45deg, #efe7d8 0 14px, #e6dccb 14px 28px); --ribbon: #1d1a17; }
.d-atelier .cal-title { font-style: italic; font-size: clamp(18px, 3vw, 30px); }
.d-atelier .num { font-style: italic; font-weight: 300; font-size: clamp(18px, 3.4vw, 40px); align-self: end; justify-self: start; padding: 0 0 8% 12%; }
.d-atelier .cover::before { content: ''; position: absolute; top: 0; left: 50%; width: 20%; height: 10%; transform: translateX(-50%); background: #1d1a17; border-radius: 0 0 99px 99px; }
.d-atelier .p-wing { position: absolute; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, #efe7d8, #f6f0e5); z-index: 1; display: grid; place-content: center; text-align: center; font-family: 'Cormorant Garamond', serif; color: #3a2f25; padding: 10px; box-shadow: 0 30px 50px -25px rgba(0,0,0,.6); }
.d-atelier .p-wing-l { right: 100%; transform-origin: right center; transform: perspective(900px) rotateY(32deg); }
.d-atelier .p-wing-r { left: 100%; transform-origin: left center; transform: perspective(900px) rotateY(-32deg); }
.d-atelier .p-wing em { font-size: clamp(11px, 1.6vw, 17px); }
.d-atelier .p-wing b { font-weight: 400; font-size: clamp(18px, 3.2vw, 36px); line-height: 1; }
.d-atelier .p-wing-r span { border: 1px solid #b9ab95; padding: 18px 10px; font-style: italic; font-size: clamp(12px, 1.8vw, 20px); }
.d-atelier .p-ribbon { position: absolute; right: -18%; bottom: -16px; width: 26%; height: 22px; border-radius: 50%; border-top: 4px solid #1d1a17; transform: rotate(-6deg); z-index: 1; }
@media (max-width: 760px) { .d-atelier .p-wing { display: none; } }

/* ============ 2. Gilded Fan (art deco) ============ */
.d-deco { --bg: radial-gradient(circle at 18% 22%, rgba(255,205,120,.5) 0 5px, transparent 7px), radial-gradient(circle at 82% 16%, rgba(255,205,120,.45) 0 7px, transparent 9px), radial-gradient(circle at 70% 38%, rgba(255,190,110,.35) 0 4px, transparent 6px), radial-gradient(circle at 10% 60%, rgba(255,205,120,.4) 0 6px, transparent 8px),
  repeating-linear-gradient(180deg, #6e4224 0 54px, #4f2d16 54px 58px), #5c351c;
  --floor: linear-gradient(#e2a93a, #c47a1e); --cal-w: 640px;
  --box: #1c1a3a; --pad: 16px; --gap: 8px; --radius: 4px; --box-shadow: 0 0 0 3px #c9a24a, 0 0 0 6px #1c1a3a, 0 0 0 7px #c9a24a, 0 40px 70px -30px rgba(0,0,0,.7);
  --door: radial-gradient(circle at 50% 108%, transparent 0 22%, #d4ad55 22% 24%, transparent 24% 40%, #d4ad55 40% 42%, transparent 42% 60%, #d4ad55 60% 61.5%, transparent 61.5%),
          repeating-conic-gradient(from -90deg at 50% 108%, #e2553b 0 7deg, #1c1a3a 7deg 15deg, #2c7290 15deg 22deg, #1c1a3a 22deg 30deg), #1c1a3a;
  --door-shadow: inset 0 0 0 1.5px #c9a24a; --door-ar: .82; --num: #e7c66d; --f-num: 'Poiret One', serif; --inside: radial-gradient(#3a2c55, #120f24);
  --title-c: #e7c66d; --f-head: 'Poiret One', serif; --title-ls: .3em; --paper-art: repeating-conic-gradient(from 0deg at 50% 100%, #1c1a3a 0 8deg, #c9a24a 8deg 10deg); --ribbon: #e2553b; }
.d-deco .num { width: 46%; aspect-ratio: 1; background: #1c1a3a; border: 1.5px solid #c9a24a; transform: rotate(45deg); display: grid; place-items: center; font-size: clamp(12px, 2vw, 22px); font-weight: 700; }
.d-deco .num b { transform: rotate(-45deg); }
.d-deco .p-crest { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); color: #c9a24a; font-size: 22px; }

/* ============ 3. Bonbon Box ============ */
.d-bonbon { --bg: radial-gradient(120% 90% at 50% 20%, #fbf9f6, #e3ddd6 70%, #cfc8bf); --cal-w: 700px;
  --box: radial-gradient(circle, #c99572 0 1px, transparent 1.6px) 0 0/26px 26px, radial-gradient(circle, rgba(201,149,114,.5) 0 .8px, transparent 1.3px) 13px 13px/26px 26px, #141214;
  --pad: 26px; --gap: 18px; --radius: 10px; --box-shadow: 0 0 0 6px #0d0c0d, 0 40px 60px -25px rgba(0,0,0,.6);
  --door-r: 50%; --inside: radial-gradient(circle, #3b2a1a 0 40%, #6b5130 41% 46%, #1a120b 47%); --num: #e0a986; --f-num: 'Cormorant Garamond', serif;
  --door-shadow: 0 6px 10px rgba(0,0,0,.6), inset 0 -6px 10px rgba(0,0,0,.35); --glow: #ffd2b0; --title-c: #e0a986;
  --paper-art: radial-gradient(circle, #c99572 0 1.5px, transparent 2px) 0 0/22px 22px, #141214; --ribbon: #c99572; }
.d-bonbon .cover { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.9) 0 5%, rgba(255,255,255,.25) 12%, transparent 22%),
  conic-gradient(from calc(var(--h) * 1deg), transparent 0 30%, hsl(calc(var(--h) + 60) 80% 70% / .7) 30% 38%, transparent 38% 70%, hsl(calc(var(--h) + 180) 70% 60% / .6) 70% 76%, transparent 76%),
  radial-gradient(circle at 45% 40%, hsl(var(--h) 72% 58%), hsl(calc(var(--h) + 30) 65% 32%) 78%); }
.d-bonbon .num { position: absolute; right: -16%; bottom: -14%; font-size: clamp(12px, 1.9vw, 20px); font-weight: 600; }
.d-bonbon .door.is-open .num { opacity: 0; }
.d-bonbon .p-lid { position: absolute; left: 4%; right: 4%; bottom: 99%; height: 120px; background: linear-gradient(#0d0c0d, #232023); transform-origin: bottom; transform: perspective(600px) rotateX(58deg); border-radius: 8px 8px 0 0; box-shadow: inset 0 0 0 2px #2e292e; }
.d-bonbon .p-foil { position: absolute; width: 34px; height: 26px; background: linear-gradient(135deg, #f6d27a, #b98a2c 50%, #f9e3a3); clip-path: polygon(10% 20%, 60% 0, 100% 30%, 85% 90%, 30% 100%, 0 60%); z-index: 3; }
.d-bonbon .f1 { left: -60px; bottom: -40px; transform: rotate(20deg); }
.d-bonbon .f2 { right: -50px; bottom: 10px; transform: rotate(-30deg) scale(.8); }
.d-bonbon .f3 { right: -80px; bottom: -50px; background: linear-gradient(135deg, #e3a1b8, #a5385d 50%, #f2c3d3); }

/* ============ 4. Color Block ============ */
.d-cube { --bg: linear-gradient(#97214c, #6a1233 70%); --floor: linear-gradient(#f6a5c6, #ef86b1); --cal-w: 640px;
  --box: #121212; --pad: 8px; --gap: 6px; --radius: 6px; --door-r: 3px; --num: #121212; --f-num: 'Fraunces', serif; --inside: #121212;
  --door-shadow: inset 0 -5px 0 rgba(0,0,0,.12); --glow: #fff; --paper-art: conic-gradient(#f7a8c4 25%, #1e7a5f 0 50%, #9b8cf2 0 75%, #d8283c 0) 0 0/140px 140px; --ribbon: #121212; }
.d-cube .door:nth-child(5n+1) .cover { background: #f7a8c4; }
.d-cube .door:nth-child(5n+2) .cover { background: #1e7a5f; --num: #fff; }
.d-cube .door:nth-child(5n+3) .cover { background: #9b8cf2; }
.d-cube .door:nth-child(5n+4) .cover { background: #d8283c; --num: #fff; }
.d-cube .door:nth-child(5n+5) .cover { background: #e9479a; --num: #fff; }
.d-cube .num { font-weight: 600; font-style: italic; font-size: clamp(16px, 3vw, 34px); }
.d-cube .p-step { position: absolute; background: linear-gradient(#f9b6d1, #f08fb8); z-index: 3; border-radius: 3px; box-shadow: 0 -2px 0 #fcc9dd inset, 0 20px 30px -15px rgba(110, 18, 51, .5); }
.d-cube .s1 { left: -12%; bottom: -60px; width: 30%; height: 80px; }
.d-cube .s2 { right: -10%; bottom: -40px; width: 26%; height: 110px; }
.d-cube .s3 { right: 14%; bottom: -70px; width: 22%; height: 50px; }

/* ============ 5. Folk Drawers ============ */
.d-folk { --bg: radial-gradient(70% 60% at 50% 30%, #2b6b5f 0%, #1d4a43 60%, #12322d 100%); --floor: linear-gradient(#24584f, #183d37); --cal-w: 700px;
  --box: #3b1d3b; --pad: 12px; --gap: 8px; --radius: 6px; --door-r: 3px; --num: #3b1d3b; --f-num: 'Abril Fatface', serif; --inside: #1a0d1a;
  --door-shadow: inset 0 0 0 2px rgba(0,0,0,.18), 0 3px 0 rgba(0,0,0,.35); --glow: #f2c14e; --title-c: #f6e7c8; --f-head: 'Abril Fatface', serif; --title-ls: .04em;
  --paper-art: radial-gradient(#f2c14e 3px, transparent 3.5px) 0 0/22px 22px, #b8336a; --ribbon: #e8792b; }
.d-folk .door:nth-child(5n+1) .cover { background: conic-gradient(from 45deg, #6b2f6b 25%, #9a5a9a 0 50%, #6b2f6b 0 75%, #9a5a9a 0) 0 0/20px 20px; }
.d-folk .door:nth-child(5n+2) .cover { background: repeating-linear-gradient(90deg, #e8792b 0 8px, #cf5f17 8px 16px); }
.d-folk .door:nth-child(5n+3) .cover { background: radial-gradient(circle at 50% 0, #2f8a77 0 9px, #1f6b5e 10px) 0 0/20px 13px; }
.d-folk .door:nth-child(5n+4) .cover { background: radial-gradient(#f2c14e 2px, transparent 2.6px) 0 0/14px 14px, #b8336a; }
.d-folk .door:nth-child(5n+5) .cover { background: linear-gradient(135deg, #e9b552 25%, transparent 25%) -10px 0/20px 20px, linear-gradient(225deg, #e9b552 25%, transparent 25%) -10px 0/20px 20px, #c4852a; }
.d-folk .num { background: #f6e7c8; width: 50%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(13px, 2.2vw, 24px); box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.d-folk .p-arch { position: absolute; left: 50%; bottom: 96%; width: 60%; aspect-ratio: 2/1; transform: translateX(-50%); border-radius: 999px 999px 0 0; background: repeating-conic-gradient(from -90deg at 50% 100%, #2f8a77 0 7deg, #e48aa8 7deg 14deg); z-index: 1; }
.d-folk .p-tissue { position: absolute; z-index: 3; width: 90px; height: 50px; background: radial-gradient(circle at 30% 50%, #ff7fb5 0 30%, transparent 32%), radial-gradient(circle at 70% 40%, #ff5aa0 0 34%, transparent 36%), radial-gradient(circle at 50% 70%, #ff8cc0 0 30%, transparent 32%); }
.d-folk .t1 { left: -40px; bottom: -20px; }
.d-folk .t2 { right: -30px; bottom: 30%; }

/* ============ 6. Robin's Egg ============ */
.d-robin { --bg: linear-gradient(#efebe6, #e5e0d9 72%); --floor: linear-gradient(#ddd6cc, #cfc7bb); --cal-w: 680px;
  --box: transparent; --pad: 0; --gap: 12px; --box-shadow: none; --door-r: 3px; --inside: #fbf8f2; --inside-c: #2a1630;
  --door: linear-gradient(#86d9d1 0 20%, #6fc6be 20% 21.5%, #81d4cc 21.5%); --door-shadow: 0 10px 16px -8px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.05);
  --num: #c43a2b; --f-num: 'Fraunces', serif; --glow: #ff8a6b; --paper-art: #81d4cc; --ribbon: #e2553b; }
.d-robin .cover::before, .d-robin .cover::after { content: ''; position: absolute; background: #e2553b; transition: transform .3s ease-in; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.d-robin .cover::before { left: 50%; top: 0; bottom: 0; width: 12%; transform: translateX(-50%); transform-origin: top; }
.d-robin .cover::after { top: 50%; left: 0; right: 0; height: 12%; transform: translateY(-50%); transform-origin: left; }
.d-robin .cover .bow { display: block; position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 2; transition: transform .3s; }
.d-robin .cover .bow::before, .d-robin .cover .bow::after { content: ''; position: absolute; width: 18px; height: 12px; top: -6px; border-radius: 50%; border: 4px solid #e2553b; }
.d-robin .cover .bow::before { right: 0; transform: rotate(-20deg); }
.d-robin .cover .bow::after { left: 0; transform: rotate(20deg); }
.d-robin .door.is-open .cover::before { transform: translateX(-50%) scaleY(0); }
.d-robin .door.is-open .cover::after { transform: translateY(-50%) scaleX(0); }
.d-robin .door.is-open .cover .bow { transform: scale(0) rotate(90deg); }
.d-robin .num { position: absolute; right: 6%; bottom: 8%; background: #fff; padding: 3px 7px; border-radius: 3px; font-size: clamp(11px, 1.7vw, 17px); font-weight: 600; transform: rotate(-8deg); box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.d-robin .door:nth-child(7n+3) .cover { --door: linear-gradient(#fdfdfb 0 20%, #e9e6df 20% 21.5%, #f7f5f0 21.5%); background: var(--door); }
.d-robin .door:nth-child(9n+5) .cover { background: linear-gradient(#e2546b 0 20%, #c9405a 20% 21.5%, #dd4c64 21.5%); }
.d-robin .door:nth-child(9n+5) .cover::before, .d-robin .door:nth-child(9n+5) .cover::after { background: #fff; }
.d-robin .p-fan { position: absolute; border-radius: 50%; z-index: 0; background: repeating-conic-gradient(var(--c) 0 10deg, color-mix(in srgb, var(--c) 80%, #000) 10deg 20deg); }
.d-robin .fa1 { --c: #f4c84a; width: 150px; height: 150px; right: -110px; top: -90px; }
.d-robin .fa2 { --c: #f39ac0; width: 110px; height: 110px; right: -40px; top: -120px; }
.d-robin .fa3 { --c: #48a47d; width: 130px; height: 130px; left: -110px; top: -40px; }
@media (max-width: 760px) { .d-robin .p-fan { display: none; } }

/* ============ 7. Night Sky ============ */
.d-celestial { --bg: radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 72%, #fff, transparent), radial-gradient(1.5px 1.5px at 44% 12%, #fff, transparent), radial-gradient(1px 1px at 62% 40%, #fff, transparent), radial-gradient(2px 2px at 78% 22%, #fff, transparent), radial-gradient(1px 1px at 88% 66%, #fff, transparent), radial-gradient(1px 1px at 6% 88%, #fff, transparent), radial-gradient(1.5px 1.5px at 52% 90%, #fff, transparent), radial-gradient(1px 1px at 92% 92%, #fff, transparent),
  radial-gradient(ellipse at 50% 120%, #2d4690 0%, #0e1738 55%, #060a1c 100%); --cal-w: 700px;
  --box: linear-gradient(135deg, transparent 49.6%, rgba(214,178,94,.25) 49.8% 50.2%, transparent 50.4%) 0 0/120px 120px, #0f1a3d; --pad: 22px; --gap: 12px; --radius: 16px;
  --box-shadow: inset 0 0 0 1px #d6b25e, 0 0 60px rgba(120,150,255,.25), 0 40px 70px -30px rgba(0,0,0,.8);
  --door: radial-gradient(circle at 50% 50%, #18295e, #101c45); --door-r: 10px; --door-shadow: inset 0 0 0 1px rgba(214,178,94,.6);
  --num: #e6c873; --f-num: 'Cinzel', serif; --inside: radial-gradient(circle, #ffe6a3 0%, #e9a94a 40%, #4a2a66 100%); --glow: #a9c1ff;
  --title-c: #e6c873; --f-head: 'Cinzel', serif; --title-ls: .2em; --paper-art: radial-gradient(1.5px 1.5px, #fff, transparent) 0 0/30px 30px, #0f1a3d; --ribbon: #d6b25e; }
.d-celestial .cover { grid-template-rows: 1fr auto; padding: 14% 0 10%; }
.d-celestial .cover::before { content: ''; width: 42%; aspect-ratio: 1; border-radius: 50%; background: #f3e3b0; box-shadow: inset calc(var(--ph) * 1px) 0 0 0 #13214d, 0 0 12px rgba(243,227,176,.35); }
.d-celestial .num { font-size: clamp(11px, 1.8vw, 18px); font-weight: 700; }
.d-celestial .p-stars { position: absolute; inset: -60vh -60vw; background: radial-gradient(2px 2px at 30% 40%, #fff8, transparent), radial-gradient(2px 2px at 70% 60%, #fff8, transparent); animation: twinkle 4s ease-in-out infinite; pointer-events: none; z-index: 0; }
@keyframes twinkle { 50% { opacity: .3; } }
.d-celestial .p-moon { position: absolute; right: -90px; top: -110px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff7dc, #e9d79c 60%, #c8b06a); box-shadow: 0 0 60px rgba(255,240,200,.45); z-index: 0; }
.d-celestial .p-shoot { position: absolute; left: -10%; top: -60px; width: 160px; height: 2px; background: linear-gradient(90deg, transparent, #fff); transform: rotate(-18deg); animation: shoot 6s ease-in infinite; z-index: 0; opacity: 0; }
@keyframes shoot { 0%, 80% { opacity: 0; transform: translate(0, 0) rotate(-18deg); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(420px, 140px) rotate(-18deg); } }
@media (max-width: 760px) { .d-celestial .p-moon { right: 0; top: -100px; width: 70px; height: 70px; } }

/* ============ 8. Pâtisserie ============ */
.d-patisserie { --bg: linear-gradient(#5f9ad3, #a9cdea 75%, #d8e9f6); --cal-w: 640px;
  --box: #f1b52f; --pad: 16px; --gap: 9px; --radius: 18px; --box-shadow: inset 0 -10px 0 rgba(0,0,0,.08), 0 40px 60px -30px rgba(20,40,80,.6);
  --door-r: 999px 999px 4px 4px; --door-ar: .76; --num: #fff; --f-num: 'DM Serif Display', serif; --inside: linear-gradient(#ffe8b0, #f4b860); --inside-c: #5a2a10;
  --door-shadow: inset 0 0 0 2px rgba(0,0,0,.08); --glow: #fff; --title-c: #6d3d0e; --f-head: 'DM Serif Display', serif; --title-ls: .06em;
  --paper-art: linear-gradient(60deg, #2b3d6b 25%, transparent 25%) 0 0/60px 100px, linear-gradient(-60deg, #d6532f 25%, transparent 25%) 0 0/60px 100px, #f1b52f; --ribbon: #fff; }
.d-patisserie .door:nth-child(5n+1) .cover { background: #d6532f; }
.d-patisserie .door:nth-child(5n+2) .cover { background: #2b3d6b; }
.d-patisserie .door:nth-child(5n+3) .cover { background: #f5e8cb; --num: #2b3d6b; }
.d-patisserie .door:nth-child(5n+4) .cover { background: #b8432a; }
.d-patisserie .door:nth-child(5n+5) .cover { background: #9cc3e4; --num: #2b3d6b; }
.d-patisserie .cover { grid-template-rows: 1fr auto; padding: 30% 0 14%; }
.d-patisserie .cover::before { content: '✶'; color: #f6dc8a; font-size: clamp(12px, 2vw, 22px); }
.d-patisserie .num { font-size: clamp(16px, 2.8vw, 30px); }
.d-patisserie .cal::before { content: ''; position: absolute; left: 24%; right: 24%; bottom: 100%; height: 22%; border-radius: 14px 14px 0 0; box-shadow: inset 0 -8px 0 rgba(0,0,0,.08);
  background: radial-gradient(circle, #f6dc8a 0 2px, transparent 2.5px) 0 0/22px 22px, linear-gradient(transparent 58%, #2b3d6b 58% 74%, transparent 74%), #f1b52f; }
.d-patisserie .stage { margin-top: 10%; }
.d-patisserie .p-peaks { position: absolute; left: -60vw; right: -60vw; bottom: -45vh; height: 60vh; background: linear-gradient(#fff, #dfe8f1); clip-path: polygon(0 60%, 12% 30%, 20% 45%, 33% 8%, 44% 38%, 52% 22%, 63% 50%, 74% 15%, 86% 42%, 100% 25%, 100% 100%, 0 100%); z-index: 0; }
.d-patisserie .p-tray { position: absolute; left: -8%; right: -8%; bottom: -26px; height: 40px; border-radius: 50%; background: linear-gradient(#f4f6f8, #a8b2bc 60%, #e9edf0); box-shadow: 0 16px 20px -10px rgba(0,0,0,.4); z-index: 1; }
.d-patisserie .p-glove { display: none; }

/* ============ 9. Post Office ============ */
.d-pobox { --bg: repeating-linear-gradient(180deg, #8a5a32 0 36px, #77492a 36px 38px), #8a5a32; --floor: linear-gradient(#4a2e1a, #2e1c10); --cal-w: 680px;
  --box: linear-gradient(#7a5c2c, #5c4420); --pad: 14px; --gap: 8px; --radius: 4px; --box-shadow: inset 0 0 0 2px #a8853f, 0 40px 60px -30px rgba(0,0,0,.7);
  --door: linear-gradient(150deg, #f0d48a, #c49a45 45%, #8f6a28 100%); --door-r: 2px; --door-shadow: inset 0 0 0 1px #6b4f1e, inset 0 2px 0 rgba(255,255,255,.5), 0 2px 3px rgba(0,0,0,.4);
  --num: #4b3714; --f-num: 'Courier Prime', monospace; --inside: #1c140c; --glow: #ffe9a8; --title-c: #f0d48a; --f-head: 'Courier Prime', monospace; --title-ls: .3em;
  --paper-art: repeating-linear-gradient(-45deg, #fff 0 18px, #d9482b 18px 36px, #fff 36px 54px, #2c4f8f 54px 72px); --ribbon: #a8853f; }
.d-pobox .cover::before { content: ''; position: absolute; left: 22%; right: 22%; top: 12%; height: 32%; border-radius: 2px; background: linear-gradient(135deg, rgba(255,255,255,.25) 0 30%, transparent 30%), #2a2118; box-shadow: inset 0 0 0 2px #6b4f1e; }
.d-pobox .cover::after { content: ''; position: absolute; right: 14%; bottom: 14%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #f6e2a8 0 25%, #b48a3a 30% 60%, #6b4f1e 64%); }
.d-pobox .num { position: absolute; left: 12%; bottom: 12%; font-weight: 700; font-size: clamp(12px, 2vw, 20px); text-shadow: 0 1px 0 rgba(255,255,255,.45); }
.d-pobox .p-counter { position: absolute; left: -20%; right: -20%; bottom: -70px; height: 60px; background: linear-gradient(#5a3a20, #3c2614); border-top: 6px solid #6e4a2a; z-index: 3; box-shadow: 0 -6px 20px rgba(0,0,0,.4); }
.d-pobox .p-stamp { position: absolute; right: -28px; top: -30px; width: 74px; height: 88px; background: #fdf6e3; border: 5px dotted #fdf6e3; outline: 1px solid #d9c9a0; display: grid; place-items: center; font: 700 11px 'Courier Prime', monospace; color: #2c4f8f; transform: rotate(9deg); z-index: 3; box-shadow: 0 6px 12px rgba(0,0,0,.35); text-align: center; }

/* ============ 10. Vending Machine ============ */
.d-vending { --bg: radial-gradient(60% 50% at 50% 30%, #3c4250, #20232b 70%, #121419); --cal-w: 620px;
  --box: linear-gradient(#0f1218, #0f1218) padding-box, #c8102e; --pad: 22px 22px 70px; --gap: 8px; --radius: 22px;
  --box-shadow: 0 0 0 10px #c8102e, inset 0 0 0 3px #222, 0 0 80px rgba(120,200,255,.18), 0 50px 70px -30px rgba(0,0,0,.8);
  --door-r: 6px; --door-ar: .9; --num: #20232b; --f-num: 'VT323', monospace; --inside: #0f1218; --glow: #6cf;
  --title-c: #7ff2ff; --f-head: 'VT323', monospace; --title-ls: .2em; --paper-art: repeating-linear-gradient(90deg, #c8102e 0 40px, #a00c25 40px 80px); --ribbon: #fff; }
.d-vending .cal { background: #c8102e; }
.d-vending .grid { background: linear-gradient(#0f1218 calc(100% - 4px), #39404d 0) 0 0/100% calc(25% + 2px), #0f1218; padding: 12px; border-radius: 8px; box-shadow: inset 0 0 0 3px #2a2f3a, inset 0 0 40px rgba(120,200,255,.15); }
.d-vending .cal-title { text-shadow: 0 0 10px #3cf, 0 0 2px #fff; font-size: clamp(22px, 4vw, 38px); }
.d-vending .cal::after { content: 'PUSH'; position: absolute; left: 22px; right: 22px; bottom: 16px; height: 40px; border-radius: 6px; background: #111; color: #555; font: 14px 'VT323', monospace; display: grid; place-items: center; letter-spacing: .3em; box-shadow: inset 0 4px 10px #000; }
.d-vending .door::before { content: ''; position: absolute; left: 6%; right: 6%; bottom: 10%; height: 12%; background: repeating-linear-gradient(100deg, #b9c0cc 0 2px, transparent 2px 7px); border-radius: 50%; z-index: 0; opacity: .8; }
.d-vending .cover { inset: 6% 16% 24%; border-radius: 8px 8px 4px 4px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.2), inset 4px 0 0 rgba(255,255,255,.25); }
.d-vending .door:nth-child(6n+1) .cover { background: linear-gradient(#ffcc33, #f0a500); }
.d-vending .door:nth-child(6n+2) .cover { background: linear-gradient(#ff5d73, #d62f4d); }
.d-vending .door:nth-child(6n+3) .cover { background: linear-gradient(#57d6a3, #20a774); }
.d-vending .door:nth-child(6n+4) .cover { background: linear-gradient(#6ca6ff, #3368d6); }
.d-vending .door:nth-child(6n+5) .cover { background: linear-gradient(#c78bff, #8b48e0); }
.d-vending .door:nth-child(6n+6) .cover { background: linear-gradient(#ff9b4f, #e5631a); }
.d-vending .num { background: #f2f2f2; padding: 2px 6px; border-radius: 3px; font-size: clamp(14px, 2.4vw, 24px); }
.d-vending .inside { inset: 6% 16% 24%; box-shadow: inset 0 0 0 1px #2a2f3a; }
.d-vending .p-floor-tiles { position: absolute; left: -60vw; right: -60vw; bottom: -50vh; height: 46vh; background: conic-gradient(#d9d4c7 25%, #2b2b2b 0 50%, #d9d4c7 0 75%, #2b2b2b 0) 0 0/60px 60px; transform: perspective(500px) rotateX(55deg); transform-origin: top; z-index: 0; opacity: .7; }
.d-vending .p-panel { position: absolute; left: calc(100% + 10px); top: 80px; width: 70px; height: 200px; background: #a50d26; border-radius: 0 14px 14px 0; z-index: 1; display: grid; place-items: center; gap: 10px; padding: 14px 0; }
.d-vending .p-panel i { display: block; }
.d-vending .p-panel .slot { width: 10px; height: 34px; background: #111; border-radius: 4px; box-shadow: 0 0 0 4px #ccc; }
.d-vending .p-panel .keys { width: 44px; height: 60px; background: radial-gradient(circle, #ddd 0 4px, transparent 5px) 0 0/14.6px 15px; }
.d-vending .p-panel .tray { width: 40px; height: 20px; background: #111; border-radius: 4px; }
@media (max-width: 860px) { .d-vending .p-panel { display: none; } }

/* ============ 11. Card Catalog ============ */
.d-catalog { --bg: linear-gradient(180deg, transparent 0 18%, #1f3a2e 18%), repeating-linear-gradient(90deg, #7c2d2d 0 22px, #2d4a6b 22px 40px, #c49a3e 40px 52px, #3f5e3a 52px 76px, #5a2e4a 76px 92px, #1f1f1f 92px 96px), #1f3a2e; --floor: linear-gradient(#5a3b22, #3a2414); --cal-w: 660px;
  --box: linear-gradient(#6b4423, #55361b); --pad: 14px; --gap: 7px; --radius: 4px; --box-shadow: inset 0 0 0 3px #4a2e16, 0 40px 60px -30px rgba(0,0,0,.7);
  --door: repeating-linear-gradient(92deg, rgba(90,50,20,.12) 0 2px, transparent 2px 11px), linear-gradient(#d29c62, #b97f45); --door-r: 2px; --door-ar: 1.3;
  --door-shadow: inset 0 0 0 1px rgba(60,30,10,.35), inset 0 2px 0 rgba(255,255,255,.25), 0 2px 3px rgba(0,0,0,.4);
  --num: #2b2118; --f-num: 'Special Elite', monospace; --inside: #20160e; --glow: #ffe9a8; --title-c: #f1e8d2; --f-head: 'Special Elite', monospace; --title-ls: .12em;
  --paper-art: repeating-linear-gradient(0deg, #f6f0e0 0 26px, #a9c4e0 26px 27px), #f6f0e0; --ribbon: #b23a2e; }
.d-catalog .num { position: absolute; top: 16%; left: 24%; right: 24%; background: #f4ecd8; border: 2px solid #b8963e; border-radius: 2px; padding: 3px 0; text-align: center; font-size: clamp(11px, 1.8vw, 18px); }
.d-catalog .cover::after { content: ''; position: absolute; left: 40%; right: 40%; bottom: 16%; height: 22%; border-radius: 0 0 99px 99px; background: linear-gradient(#e8cf85, #9c7a2e); box-shadow: 0 2px 2px rgba(0,0,0,.4); }
.d-catalog .p-lamp { position: absolute; left: -120px; bottom: 30px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, rgba(255,230,160,.6), transparent 70%); z-index: 0; }

/* ============ 12. Snowy Cabin ============ */
.d-cabin { --bg: radial-gradient(circle at 15% 30%, rgba(255,210,120,.55) 0 4px, transparent 6px), radial-gradient(circle at 22% 50%, rgba(255,210,120,.5) 0 5px, transparent 7px), radial-gradient(circle at 8% 66%, rgba(255,210,120,.45) 0 4px, transparent 6px), radial-gradient(circle at 86% 26%, rgba(255,210,120,.5) 0 5px, transparent 7px), radial-gradient(circle at 92% 54%, rgba(255,210,120,.45) 0 4px, transparent 6px),
  linear-gradient(#22324f, #3a4a66 70%); --floor: linear-gradient(#f4f7fb, #dfe7f0); --cal-w: 620px;
  --box: linear-gradient(#ecd5a8, #dfc28c); --pad: 14px; --gap: 7px; --radius: 3px; --box-shadow: inset 0 0 0 2px #c9a56a, 0 30px 40px -25px rgba(0,0,0,.6);
  --door: linear-gradient(#f3e3c0, #e8d3a6); --door-r: 2px; --door-shadow: inset 0 0 0 1.5px #c9a56a, 0 2px 0 rgba(120,80,30,.3);
  --num: #9a5520; --f-num: 'Alegreya', serif; --inside: radial-gradient(circle, #ffe2a0, #e48a2c 70%, #a24d12); --inside-c: #4a2008; --glow: #ffcf6a;
  --paper-art: radial-gradient(circle, #fff 0 3px, transparent 3.5px) 0 0/30px 30px, #b3262d; --ribbon: #2f6b43; }
.d-cabin .num { font-weight: 800; font-size: clamp(14px, 2.4vw, 26px); }
.d-cabin .cover::after { content: ''; position: absolute; left: 12%; top: 50%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: #a8773b; transform: translateY(-50%); }
.d-cabin .stage { margin-top: 22%; }
.d-cabin .p-roof { position: absolute; left: 0; right: 0; bottom: calc(100% - 2px); height: 0; padding-bottom: 38%; z-index: 1; background: linear-gradient(#ecd5a8, #dfc28c); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.d-cabin .p-roof::before { content: ''; position: absolute; inset: 0; background: linear-gradient(#fff, #fff) top/100% 0; clip-path: polygon(50% 0, 100% 100%, 92% 100%, 88% 88%, 84% 92%, 80% 80%, 76% 84%, 50% 14%, 24% 84%, 20% 80%, 16% 92%, 12% 88%, 8% 100%, 0 100%); background: #fff; }
.d-cabin .p-roof i { position: absolute; left: 50%; bottom: 14%; width: 26%; height: 44%; transform: translateX(-50%); background: radial-gradient(circle at 50% 70%, #ffe7a8, #f39a2e 70%); clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%); box-shadow: 0 0 30px #ffb44a; }
.d-cabin .p-tree { position: absolute; left: -32%; bottom: -10px; width: 28%; aspect-ratio: .7; background: radial-gradient(circle, #ffd27a 0 2px, transparent 3px) 0 0/22px 26px, linear-gradient(#1f4a33, #163826); clip-path: polygon(50% 0, 65% 22%, 58% 22%, 78% 48%, 68% 48%, 95% 85%, 5% 85%, 32% 48%, 22% 48%, 42% 22%, 35% 22%); z-index: 1; }
.d-cabin .p-snow { position: absolute; inset: -80vh -80vw; pointer-events: none; z-index: 4; background: radial-gradient(2px 2px at 10% 10%, #fff, transparent), radial-gradient(3px 3px at 30% 50%, #fffc, transparent), radial-gradient(2px 2px at 60% 20%, #fff, transparent), radial-gradient(2.5px 2.5px at 80% 70%, #fffd, transparent), radial-gradient(2px 2px at 45% 85%, #fff, transparent); background-size: 260px 260px; animation: snow 14s linear infinite; opacity: .8; }
@keyframes snow { to { background-position: 40px 260px, -30px 260px, 20px 260px, -40px 260px, 10px 260px; } }
@media (max-width: 760px) { .d-cabin .p-tree { display: none; } }

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

/* Early-open warning */
.gift.peek { width: min(440px, 100%); padding: 30px 28px 26px; text-align: center; }
.gift.peek .peek-emoji { font-size: 46px; animation: pop .5s; }
.gift.peek h3 { font-size: 26px; margin: 10px 0 10px; }
.gift.peek .hint { margin: 0 0 20px; font-size: 14px; }
.peek-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
