:root {
  --bg1: #0a0f2c; --bg2: #1b1247; --bg3: #2a1240;
  --gold: #f6d98f; --gold2: #d9a441; --ink: #f6f2ea; --mute: #b9b4cf;
  --red: #d8404f; --green: #2f9a73; --glass: rgba(255,255,255,.08); --line: rgba(255,255,255,.16);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --ease: cubic-bezier(.22,1,.36,1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg1); color-scheme: dark; }
body {
  margin: 0; min-height: 100dvh; font-family: var(--sans); color: var(--ink);
  background: radial-gradient(1200px 700px at 80% -10%, #3b2a7a55, transparent 60%),
              radial-gradient(900px 600px at 0% 20%, #7a1f4a33, transparent 60%),
              linear-gradient(180deg, var(--bg1), var(--bg2) 55%, var(--bg3));
  background-attachment: fixed; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
#snow, #confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
#confetti { z-index: 60; }
.stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .2; animation: tw 3s ease-in-out infinite; }
@keyframes tw { 50% { opacity: .95; transform: scale(1.6); } }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 2; text-align: center; padding: 0 20px 8px; max-width: 760px; margin: 0 auto; }
.garland { height: 64px; margin: 0 -20px 4px; position: relative; }
.garland svg { width: 100%; height: 64px; overflow: visible; display: block; }
.bulb { animation: bulb 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes bulb { 0%,100% { opacity: .55; filter: none; } 50% { opacity: 1; filter: drop-shadow(0 0 5px currentColor); } }
.eyebrow { margin: 14px 0 6px; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
h1 {
  margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 8vw, 60px); line-height: 1.06; text-wrap: balance; letter-spacing: -.02em;
  background: linear-gradient(100deg, #fff 20%, var(--gold) 45%, #fff 60%, var(--gold) 85%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }
.lead { text-wrap: pretty; margin: 12px auto 0; max-width: 560px; color: var(--mute); font-size: clamp(14px, 2.6vw, 17.5px); line-height: 1.45; }
@media (max-width: 480px) { .garland { height: 48px; } .garland svg { height: 48px; } .progress { margin-top: 16px; } .eyebrow { margin-top: 8px; } .hero { padding-bottom: 0; } main { padding-top: 14px; } }
.lead b { color: var(--ink); font-weight: 600; }
.progress {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 22px; padding: 10px 20px 10px 12px; text-align: left;
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.progress strong { display: block; font-size: 15px; } .progress small { color: var(--mute); font-size: 12.5px; }
.ring { position: relative; width: 46px; height: 46px; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.rt { stroke: rgba(255,255,255,.14); }
.rv { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: 97.4; transition: stroke-dashoffset 1.2s var(--ease); }

/* ---------- grid ---------- */
main { position: relative; z-index: 2; max-width: 1000px; margin: 0 auto; padding: 18px 16px 40px; }
/* rotating halo of special doors must not widen the page (only matters when main spans the viewport) */
@media (max-width: 1040px) { main { overflow-x: clip; } }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
@media (min-width: 940px) { .grid { grid-template-columns: repeat(6, 1fr); gap: 20px; } }

.door {
  --c1: #b32a40; --c2: #6f1428; position: relative; display: block; width: 100%; aspect-ratio: 3 / 4.1; padding: 0; border: 0; background: none;
  cursor: pointer; perspective: 700px; font: inherit; color: inherit; border-radius: 22px;
  animation: pop .7s var(--ease) backwards; animation-delay: calc(var(--i) * 28ms + 150ms);
  transition: transform .35s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.grid.static .door { animation: none; }
li:nth-child(6n+2) .door { --c1: #1f7a5c; --c2: #0d4034; }
li:nth-child(6n+3) .door { --c1: #2e5aa8; --c2: #14295a; }
li:nth-child(6n+4) .door { --c1: #8a3b9a; --c2: #42144f; }
li:nth-child(6n+5) .door { --c1: #c4572c; --c2: #712a12; }
li:nth-child(6n+6) .door { --c1: #1c7f8c; --c2: #0b3f4a; }
.door:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.door:active { transform: scale(.97); transition-duration: .12s; }
@media (hover: hover) and (pointer: fine) { .door:hover { transform: translateY(-4px) scale(1.02); } }
.door:active { transform: scale(.97); transition-duration: .12s; }

.room {
  position: absolute; inset: 0; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(circle at 50% 62%, #fff3c4 0%, #ffd36b 22%, #b5661f 62%, #4a1d16 100%); box-shadow: inset 0 0 30px rgba(0,0,0,.5), 0 14px 30px -12px rgba(0,0,0,.7);
  overflow: hidden; isolation: isolate; z-index: 0;
}
.room::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 70%, rgba(255,240,180,.55), transparent 55%); animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.gifts { position: relative; z-index: 1; display: flex; gap: 6px; align-items: flex-end; justify-content: center; }
.gift { width: clamp(30px, 8vw, 44px); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 700; color: #4a1d16; }
.gift svg { width: 100%; height: auto; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.g-box { fill: #c33a47; } .g-lid { fill: #e04a58; } .g-rib { fill: var(--gold); } .g-bow { fill: var(--gold); }
.gift.open svg { opacity: .35; filter: grayscale(1) drop-shadow(0 0 0 #000); }
.gift.open svg { animation: none; }
.gift:not(.open) svg { animation: bob 2.6s ease-in-out infinite; }
.gift:nth-child(2) svg { animation-delay: .5s; }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-3deg); } }
.mine-tag { position: relative; z-index: 1; font-size: 10.5px; font-weight: 700; color: #4a1d16; background: rgba(255,255,255,.65); padding: 2px 8px; border-radius: 999px; }

.leaf {
  position: absolute; inset: 0; z-index: 1; border-radius: 22px; transform-origin: 0 50%; transition: transform .8s var(--ease); backface-visibility: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), transparent 38%),
    linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: inset 0 0 0 2px rgba(246,217,143,.75), inset 0 0 0 5px rgba(0,0,0,.25), inset 0 0 0 6.5px rgba(246,217,143,.35), 0 10px 24px -10px rgba(0,0,0,.7);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1px; color: var(--gold); overflow: hidden;
}
.leaf::before { /* inner panel */ content: ""; position: absolute; inset: 11px; border-radius: 14px; border: 1px solid rgba(246,217,143,.4); background: radial-gradient(circle at 50% 38%, rgba(255,255,255,.1), transparent 60%); }
.leaf::after { /* knob */ content: ""; position: absolute; right: 11px; top: 52%; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff6d4, var(--gold2)); box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.corner { position: absolute; width: 17px; height: 17px; color: var(--gold); fill: none; opacity: .9; }
.corner.tl { top: 8px; left: 8px; } .corner.tr { top: 8px; right: 8px; transform: scaleX(-1); }
.corner.bl { bottom: 8px; left: 8px; transform: scaleY(-1); } .corner.br { bottom: 8px; right: 8px; transform: scale(-1); }
.sym { width: 16px; height: 16px; fill: currentColor; opacity: .85; position: relative; z-index: 1; margin-bottom: 2px; }
.num { position: relative; z-index: 1; font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 8vw, 46px); line-height: 1; color: #fff3cc; text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 18px rgba(246,217,143,.45); }
.who { position: relative; z-index: 1; margin-top: 5px; font-size: clamp(9.5px, 2.4vw, 11.5px); font-weight: 600; letter-spacing: .02em; color: var(--gold); padding: 0 8px; line-height: 1.2; }
.wd { position: absolute; z-index: 2; left: 50%; bottom: -1px; transform: translateX(-50%); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,243,204,.65); display: none; }

@media (hover: hover) and (pointer: fine) { .door.free:hover .leaf { transform: rotateY(-26deg); } }
.door.free:focus-visible .leaf { transform: rotateY(-26deg); }
.door.part .leaf { transform: rotateY(-26deg); }
.door.full .leaf { transform: rotateY(-78deg); }
@media (hover: hover) and (pointer: fine) { .door.full:hover .leaf { transform: rotateY(-70deg); } }
.door.special::before { /* festive halo */ content: ""; position: absolute; inset: -5px; border-radius: 27px; background: conic-gradient(from 0deg, var(--gold), transparent 30%, var(--red) 55%, transparent 80%, var(--gold)); filter: blur(7px); opacity: .6; animation: spin 7s linear infinite; z-index: -1; }
@keyframes spin { to { transform: rotate(360deg); } }
.badge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: linear-gradient(180deg, #fff1bf, var(--gold2)); color: #5a2a05; padding: 3px 9px; border-radius: 999px; box-shadow: 0 3px 8px rgba(0,0,0,.4); }
li { position: relative; }

/* sparkle on hover */
.spark { position: absolute; pointer-events: none; z-index: 4; width: 10px; height: 10px; background: var(--gold); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: sp .9s ease-out forwards; }
@keyframes sp { from { opacity: 1; transform: translate(0,0) scale(.4) rotate(0); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(120deg); } }

/* ---------- how ---------- */
.how { display: grid; gap: 12px; margin-top: 40px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how div { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.how b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #4a2205; font-size: 14px; }
.how p { margin: 0; color: var(--mute); font-size: 14.5px; line-height: 1.45; } .how em { color: var(--ink); font-style: normal; font-weight: 600; }
footer { position: relative; z-index: 2; text-align: center; color: var(--mute); font-size: 12.5px; padding: 0 16px 32px; opacity: .8; }

/* ---------- dialog ---------- */
body:has(dialog[open]) { overflow: hidden; }
dialog {
  border: 1px solid var(--line); padding: 0; width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; color: var(--ink);
  border-radius: 28px; background: linear-gradient(180deg, rgba(40,28,92,.92), rgba(22,16,58,.94)); backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.18);
}
dialog[open] { animation: sheet .5s var(--ease); }
dialog::backdrop { background: rgba(5,6,24,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .3s ease; }
@keyframes sheet { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes fade { from { opacity: 0; } }
.dl { padding: 26px 24px 22px; position: relative; }
.x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: var(--ink); font-size: 18px; cursor: pointer; line-height: 1; }
.x:hover { background: rgba(255,255,255,.22); }
.dl .dn { font-family: var(--serif); font-size: 54px; line-height: 1; margin: 0; color: var(--gold); font-weight: 700; }
.dl .dd { margin: 4px 0 18px; color: var(--mute); font-size: 15px; }
.dl .dd b { color: var(--ink); }
.slots { display: grid; gap: 10px; margin-bottom: 16px; }
.slot { position: relative; display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; border: 1.5px solid var(--line); background: rgba(255,255,255,.06); cursor: pointer; transition: border-color .25s, background .25s, transform .25s var(--ease); }
.slot:hover { transform: translateY(-1px); }
.slot input { position: absolute; opacity: 0; }
.slot:has(input:checked) { border-color: var(--gold); background: rgba(246,217,143,.12); box-shadow: 0 0 0 4px rgba(246,217,143,.12); }
.slot:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.slot svg { width: 38px; height: 38px; flex: none; }
.slot small { display: block; color: var(--mute); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.slot strong { font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.slot.taken { opacity: .55; cursor: default; } .slot.taken:hover { transform: none; } .slot.taken svg { filter: grayscale(1); }
.slot .tick { margin-left: auto; font-size: 12px; font-weight: 700; color: #9fe3c6; }
.slot .radio { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.slot:has(input:checked) .radio { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 4px #2b1d63; }
.fld { display: block; margin-bottom: 12px; }
.fld span { display: block; font-size: 12.5px; color: var(--mute); margin: 0 0 6px 4px; font-weight: 600; }
.fld input { width: 100%; font: inherit; font-size: 16px; color: var(--ink); padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(0,0,0,.22); transition: border-color .2s, box-shadow .2s; }
.fld input::placeholder { color: #8a85a8; }
.fld input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(246,217,143,.16); }
.hp { position: absolute; left: -9999px; }
.btn { width: 100%; margin-top: 6px; padding: 15px 20px; font: inherit; font-size: 17px; font-weight: 650; border: 0; border-radius: 16px; cursor: pointer; color: #3d1b03; background: linear-gradient(180deg, #ffe9a8, #e2ad4a); box-shadow: 0 8px 20px -8px rgba(226,173,74,.7), inset 0 1px 0 rgba(255,255,255,.6); transition: transform .2s var(--ease), filter .2s; }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); } .btn:active { transform: scale(.98); } .btn[disabled] { opacity: .6; cursor: wait; }
.btn.ghost { background: rgba(255,255,255,.1); color: var(--ink); box-shadow: none; font-size: 15px; margin-top: 10px; }
.btn.danger { background: rgba(216,64,79,.18); color: #ffb3bb; box-shadow: none; font-size: 15px; }
.err { min-height: 18px; margin: 4px 4px 0; color: #ffb3bb; font-size: 14px; }
.note { margin: 14px 4px 0; color: var(--mute); font-size: 12.5px; line-height: 1.45; }
.done { text-align: center; padding: 14px 4px 4px; }
.done .big { width: 96px; margin: 0 auto 6px; animation: giftpop .8s var(--ease); } .done .big svg { width: 100%; filter: drop-shadow(0 6px 14px rgba(0,0,0,.4)); }
@keyframes giftpop { from { transform: scale(.2) rotate(-25deg); opacity: 0; } 60% { transform: scale(1.15) rotate(6deg); } }
.done h2 { margin: 8px 0 6px; font-family: var(--serif); font-size: 28px; } .done p { margin: 0 0 6px; color: var(--mute); line-height: 1.5; } .done p b { color: var(--gold); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; z-index: 80; padding: 12px 20px; border-radius: 999px; background: rgba(30,22,80,.95); border: 1px solid var(--line); font-size: 14.5px; pointer-events: none; transition: .45s var(--ease); max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- landing ---------- */
.landing .choose { position: relative; z-index: 2; min-height: 100dvh; display: grid; align-content: center; justify-items: center; text-align: center; padding: 24px; }
.pick { display: grid; gap: 14px; margin-top: 28px; width: min(420px, 100%); }
.pick a { text-decoration: none; color: var(--ink); padding: 22px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: transform .3s var(--ease), border-color .3s; }
.pick a:hover { transform: translateY(-3px); border-color: var(--gold); }
.pick b { display: block; font-family: var(--serif); font-size: 44px; color: var(--gold); } .pick span { color: var(--mute); }

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

/* ---------- festive layer ---------- */
body { background:
  radial-gradient(900px 500px at 50% -8%, rgba(255,190,90,.22), transparent 65%),
  radial-gradient(1200px 700px at 85% 0%, #3b2a7a66, transparent 60%),
  radial-gradient(900px 600px at 0% 25%, #8a1f3c55, transparent 60%),
  radial-gradient(900px 700px at 100% 75%, #0f6a4a44, transparent 60%),
  linear-gradient(180deg, #0a0f2c, #1b1247 45%, #2a1038 80%, #3a1226); background-attachment: fixed; }
.aurora { position: fixed; inset: 0 0 auto 0; height: 55vh; z-index: 0; pointer-events: none; opacity: .5; filter: blur(40px);
  background: linear-gradient(100deg, transparent 5%, rgba(60,220,160,.45) 30%, rgba(120,90,255,.4) 55%, rgba(255,80,120,.35) 80%, transparent 95%);
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); animation: aur 14s ease-in-out infinite alternate; }
@keyframes aur { from { transform: translateX(-6%) skewX(-6deg); opacity: .35; } to { transform: translateX(6%) skewX(5deg); opacity: .6; } }
.bokeh { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bokeh i { position: absolute; border-radius: 50%; filter: blur(22px); opacity: .13; animation: bk 10s ease-in-out infinite alternate; }
@keyframes bk { to { transform: translate(24px, -30px) scale(1.25); opacity: .22; } }

.orn { position: absolute; top: 14px; width: 0; height: 0; transform-origin: 0 0; animation: sway 4.2s ease-in-out infinite alternate; }
.orn::before { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: var(--len); background: rgba(246,217,143,.7); }
.orn::after { content: ""; position: absolute; left: -13px; top: var(--len); width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0 8%, var(--a) 14%, var(--b) 72%); box-shadow: 0 6px 14px -4px var(--b), inset 0 -3px 6px rgba(0,0,0,.3); }
@keyframes sway { from { transform: rotate(7deg); } to { transform: rotate(-7deg); } }
.hol { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; margin: 0 8px; fill: #3fc08b; filter: drop-shadow(0 0 6px rgba(63,192,139,.5)); }
.hol:last-child { transform: scaleX(-1); }

.cap { position: absolute; left: 4px; right: 4px; top: -5px; height: 11px; z-index: 3; pointer-events: none; border-radius: 14px 14px 4px 4px;
  background: linear-gradient(180deg, #fff, #dfe9ff); box-shadow: 0 3px 6px rgba(0,0,0,.35); }
.cap::after { content: ""; position: absolute; left: 3px; right: 3px; bottom: -6px; height: 7px;
  background: radial-gradient(circle at 6px 0, #dfe9ff 5.5px, transparent 6.2px) 0 0 / 12px 7px repeat-x; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }

.forest { position: relative; z-index: 2; height: 150px; margin-top: 0; pointer-events: none; }
.forest svg { width: 100%; height: 100%; display: block; }
.tl { animation: tl 2.6s ease-in-out infinite; } @keyframes tl { 50% { opacity: .25; } }
footer { padding-bottom: 28px; }
@media (max-width: 480px) { .orn { top: 8px; transform: scale(.8); } .orn:nth-of-type(2n) { display: none; } .forest { height: 110px; } }
@media (prefers-reduced-motion: reduce) { .aurora, .bokeh i { animation: none; } }

/* ---------- door opening ---------- */
.door.opening { z-index: 5; transform: scale(1.06) !important; }
.door.opening .leaf { transition: transform .7s cubic-bezier(.3,1.25,.5,1); transform: rotateY(-108deg) !important; }
.door.opening .room::after { animation: none; opacity: 1; background: radial-gradient(circle at 50% 60%, rgba(255,246,200,.95), rgba(255,200,90,.5) 45%, transparent 75%); }
.door.opening .gift svg { animation: none; transform: scale(1.18); transition: transform .5s var(--ease); }
.door.opening::after { content: ""; position: absolute; left: 50%; top: 52%; width: 60%; aspect-ratio: 1; margin: -30% 0 0 -30%; border-radius: 50%; z-index: 6; pointer-events: none;
  background: radial-gradient(circle, rgba(255,240,170,.9), rgba(255,190,80,.45) 40%, transparent 70%); animation: flash .8s ease-out forwards; }
@keyframes flash { from { transform: scale(.3); opacity: 1; } to { transform: scale(5.5); opacity: 0; } }
.door.opening .cap { transition: transform .5s var(--ease), opacity .5s; transform: translateY(-4px) scale(.96); }
dialog[open] { animation: sheet .55s cubic-bezier(.2,1.1,.3,1); }
@keyframes sheet { from { opacity: 0; transform: translateY(18px) scale(.82); filter: brightness(1.8); } }

/* reserved / partly reserved doors: teacher name + clear status */
.door.part .leaf, .door.full .leaf { transform: rotateY(-89deg); }
@media (hover: hover) and (pointer: fine) { .door.full:hover .leaf { transform: rotateY(-89deg); } }
.room { gap: 4px; }
.gift { width: auto; min-width: clamp(34px, 9vw, 46px); }
.gift svg { width: clamp(30px, 8vw, 40px); position: relative; }
.gift.taken { position: relative; }
.gift .chk { position: absolute; top: -4px; right: calc(50% - clamp(15px, 4vw, 20px) - 6px); width: 16px; height: 16px; border-radius: 50%; background: #1f8a5c; color: #fff; font-size: 10px; line-height: 16px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.gname { font-size: clamp(9px, 2.5vw, 10.5px); font-weight: 700; line-height: 1.1; text-align: center; }
.gift.open { opacity: 1; }
.gift.open svg { opacity: .3; }
.gift.open .gname { opacity: .6; text-decoration: line-through; text-decoration-thickness: 1px; }
.rnum { position: absolute; top: 20px; left: 11px; z-index: 1; font-family: var(--serif, Georgia, serif); font-size: 19px; font-weight: 700; color: #4a1d16; opacity: .9; }
.status { position: relative; z-index: 1; font-size: 10px; font-weight: 800; letter-spacing: 0; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.status.full { background: #1f8a5c; color: #fff; }
.status.part { background: #ffd36b; color: #4a1d16; box-shadow: 0 0 0 1.5px #b5661f inset; }
.slot.taken { opacity: 1; background: rgba(31,138,92,.14); border-color: rgba(159,227,198,.45); }
.slot.taken strong { opacity: .85; }
.slot .tick { font-size: 12.5px; text-align: right; }
.partial { margin: 0 0 12px; padding: 9px 12px; border-radius: 12px; background: rgba(255,211,107,.14); border: 1px solid rgba(255,211,107,.4); color: #ffe7a8; font-size: 13.5px; line-height: 1.35; }
