/* V9 physical book. Art is a rectified face, never a product photo. */
:root{--book-green:#203f35;--book-red:#a83c32;--book-cream:#f4e7c9;--book-gold:#d0aa65}
#gift-v7{max-width:1120px;padding:20px 28px;color:var(--book-green)}
#gift-house{height:277px}
.gift-face{height:277px;border:2px solid var(--book-red);box-shadow:inset 0 0 0 2px var(--book-gold);background:var(--book-green)}
.gift-front{padding:0;transform:translateZ(24px);overflow:hidden;border-radius:5px 9px 9px 5px}
.gift-front::before,.gift-front::after{display:none}
.gift-cover-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}
#gift-personal{position:absolute;top:89.7%;left:21%;width:66%;height:6.5%;display:flex;align-items:center;justify-content:center;font-size:clamp(9px,1.2vw,11px);line-height:1.05;color:var(--book-green);overflow:hidden;overflow-wrap:anywhere;padding:0 4px;max-width:none;text-shadow:0 0 2px #f4e7c9;background:var(--book-cream);border:1px solid var(--book-gold);border-radius:14px}
#gift-avatar{position:absolute;z-index:2;left:5%;top:89%;width:25px;height:25px;border:1px solid var(--book-gold);background:var(--book-cream)}
.gift-back{transform:rotateY(180deg) translateZ(24px);color:var(--book-cream);padding:18px}
.gift-back::before{display:none}.gift-back img{width:78px;height:100px}.gift-back .gift-mini-windows{display:none}.gift-back::after{background:var(--book-red)}
.gift-left,.gift-right{width:48px;margin-left:-24px;background:var(--book-red);color:var(--book-gold);font-size:9px;box-shadow:inset 0 0 0 2px #d0aa6555}
.gift-left{transform:rotateY(-90deg) translateZ(120px)}.gift-right{transform:rotateY(90deg) translateZ(120px)}
.gift-left::before,.gift-right::before,.gift-face.gift-top::before,.gift-face.gift-top::after{display:none}
.gift-top,.gift-bottom{height:48px;top:-24px;background:var(--book-red);border-color:var(--book-red);box-shadow:inset 0 0 0 2px #d0aa6555;transform:rotateX(90deg)}
.gift-bottom{top:253px;transform:rotateX(-90deg)}
[data-gift-phase=unfolded] #gift-stage{display:grid;grid-template-columns:minmax(0,.86fr) minmax(0,1fr);gap:0;align-items:stretch;padding:0;background:var(--book-red);border:8px solid var(--book-red);border-radius:5px;box-shadow:3px 8px 0 #792c25,6px 12px 0 #b08d60,0 20px 30px #52342029;isolation:auto}
#gift-stage .calendar-section{outline:0;border:0;max-width:100%;min-width:0;margin:0;padding:16px 12px 14px;background:var(--book-red);border-radius:0;box-shadow:inset 6px 0 8px #54231e33;color:var(--book-cream)}
#gift-stage .calendar-section::after,#gift-stage .calendar-section::before{display:none}
[data-gift-phase=unfolded] .gift-calendar-lid{display:block;position:relative;inset:auto;height:auto;min-width:0;border:0;border-radius:0;background:var(--book-green);box-shadow:inset -4px 0 8px #0004}
.gift-calendar-lid::after{display:none}
.gift-inside-art{width:100%;height:100%;position:absolute;inset:0;object-fit:fill;display:block}
#gift-stage .calendar-heading{display:block;padding:0 0 14px;text-align:left}
#gift-stage .calendar-heading h2{font-size:20px;color:var(--book-cream);margin:3px 0 8px}
#gift-stage .calendar-heading p:not(.kicker),#gift-stage .progress-wrap{color:var(--book-cream)}
#gift-stage .calendar-heading .kicker{color:var(--book-gold);font-size:9px}
#gift-stage .calendar-heading p:not(.kicker){font-size:11px;line-height:1.6;margin:4px 0}
#gift-stage .release-status{color:var(--book-cream)}
#gift-stage .progress-wrap{display:flex;align-items:center;gap:8px;margin:8px 0 0;padding:0;font-size:11px}
#gift-stage progress{margin:0;width:90px;height:6px}
#gift-stage #doors{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(5,minmax(44px,1fr));gap:6px;padding:0}
#gift-stage #doors .door{min-width:44px;min-height:44px;aspect-ratio:1;border:0;padding:0;border-radius:2px;background:#e9dcc0;box-shadow:inset 2px 2px 5px #3b201c99;perspective:2000px;overflow:visible}
#gift-stage #doors .door::before,#gift-stage #doors .door::after{display:none}
#gift-stage #doors .door-cover{inset:0;border:0;border-radius:2px;box-shadow:1px 2px 3px #30191477;background:var(--book-cream);transform-origin:left center}
#gift-stage #doors .door-cover img{border-radius:2px;object-fit:contain}
#gift-stage #doors .door-cover img[hidden]{display:none!important}
#gift-stage #doors .door-cover::after{border-radius:2px;background:var(--book-cream);border:1px solid #ad8b59}
#gift-stage #doors .door:disabled{cursor:not-allowed}
#gift-stage #doors .door:disabled .door-cover img{opacity:1;filter:none}
#gift-stage #doors .door-knob{display:none}
#gift-stage #doors .door-date{position:absolute;left:3px;top:3px;z-index:7;min-width:18px;min-height:18px;padding:1px 4px;border:1px solid #cbb07a;background:#fff6df;color:#4b3024;border-radius:3px;font:700 13px/1.15 Georgia,serif;pointer-events:none;box-shadow:0 1px 2px #2b150e33}
#gift-stage #doors .door-lock{top:auto;bottom:2px;right:2px;padding:1px 3px;font-size:9px;border:0;border-radius:2px;background:#fff6dff2;color:#4b3024;box-shadow:none}
#gift-stage #doors .door[data-day="25"] .door-lock{display:none}
#gift-stage #doors .door[data-open=peek] .door-cover{transform:rotateY(-32deg)}
#gift-stage #doors .door[data-open=true] .door-cover{transform:rotateY(-116deg)}
#gift-stage #doors .door:disabled .door-cover{transform:rotateY(0deg)}
#gift-stage #doors .door-reveal{inset:3px;border:0;border-radius:1px;overflow:hidden;background:var(--book-cream)}
#gift-stage #doors .preview-paper{width:100%;height:100%;inset:0;display:grid;place-items:center;color:var(--book-gold);font:700 30px Georgia,serif}
#gift-stage #doors .preview-paper img{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}
#gift-stage #doors .done-mark{bottom:2px;left:2px;right:2px;font-size:9px;padding:2px;z-index:8}
.mystery-glyph{position:absolute;inset:0;display:grid;place-items:center;font:700 clamp(30px,5vw,65px)/1 Georgia,serif;color:#ae803b;text-shadow:1px 2px 0 #f7edcf;transform:translateZ(2px);backface-visibility:hidden}
#gift-stage .calendar-bottom{display:block;margin:14px 0 0;font-size:10px;line-height:1.6;color:var(--book-cream)}
#gift-stage .calendar-bottom>span{display:block}
#mystery-dialog{position:fixed;inset:0;margin:auto;width:min(420px,calc(100vw - 32px));height:fit-content;max-height:85dvh;overflow:auto;padding:28px;border:2px solid var(--book-gold);border-radius:8px;background:var(--book-cream);color:var(--book-green);text-align:center}
#mystery-dialog::backdrop{background:#172f29b8;animation:none}#mystery-dialog h2{font-size:24px}#mystery-dialog p{line-height:1.7}#mystery-close{min-width:88px;min-height:44px;background:var(--book-green);color:var(--book-cream);border:0;border-radius:5px;padding:8px 18px}
[data-gift-phase=unfolding] #gift-stage{padding:0}
[data-gift-phase=unfolding] #gift-stage .calendar-section{left:46%;top:0;width:54%}
[data-gift-phase=unfolding] .gift-calendar-lid{left:0;top:0;width:46%;height:100%;border:0;background:var(--book-green)}
@media(max-width:750px){
 #gift-v7{padding:12px 10px 24px}
 [data-gift-phase=unfolded] #gift-stage{display:block;border-width:6px}
 [data-gift-phase=unfolded] .gift-calendar-lid{height:105px;overflow:hidden}
 .gift-inside-art{object-fit:cover;object-position:center 45%}
 #gift-stage .calendar-section{padding:14px 6px;box-shadow:inset 0 5px 7px #45271c33}
 #gift-stage .calendar-heading h2{font-size:18px}#gift-stage .calendar-heading .kicker{font-size:8px}
 #gift-stage #doors{gap:5px}#gift-stage #doors .door-date{font-size:11px;left:2px;top:2px;min-height:16px;min-width:16px;padding:1px 3px}
 #gift-stage #doors .door-lock{font-size:8px;padding:1px 2px}
 [data-gift-phase=unfolding] #gift-stage .calendar-section{left:0;top:105px;width:100%}
 [data-gift-phase=unfolding] .gift-calendar-lid{width:100%;height:105px}
}
/* One shared spine keeps the actual grid attached throughout unfolding. */
#gift-book-spread{display:none}
[data-gift-phase=unfolded] #gift-stage{display:block;padding:0;border:0;background:transparent;box-shadow:none}
[data-gift-phase=unfolded] #gift-book-spread,[data-gift-phase=unfolding] #gift-book-spread{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;gap:0;position:relative;width:100%;background:var(--book-red);border:7px solid var(--book-red);border-radius:5px;box-shadow:3px 8px 0 #792c25,6px 12px 0 #b08d60,0 20px 30px #52342029;transform-style:preserve-3d;transform-origin:75% 0}
[data-gift-phase=unfolding] #gift-stage{perspective:1600px}
[data-gift-phase=unfolding] #gift-rotate-surface,[data-gift-phase=unfolding] #gift-stage::after{display:none}
[data-gift-phase=unfolding] #gift-stage .calendar-section{display:block;position:relative;inset:auto;width:100%;transform:none;clip-path:none;z-index:0}
[data-gift-phase=unfolded] .gift-calendar-lid,[data-gift-phase=unfolding] .gift-calendar-lid{display:block;position:relative;inset:auto;width:100%;height:auto;border:0;border-radius:0;transform-style:preserve-3d;transform-origin:right center;background:var(--book-green);z-index:1}
.gift-inside-art{backface-visibility:hidden;transform:translateZ(1px)}
.gift-unfold-back{position:absolute;inset:0;backface-visibility:hidden;transform:rotateY(180deg) translateZ(1px);background:var(--book-green);overflow:hidden}
.gift-unfold-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}
#gift-unfold-name{position:absolute;top:89.7%;left:21%;width:66%;height:6.5%;display:grid;place-items:center;font-size:clamp(9px,1.2vw,14px);overflow:hidden;color:var(--book-green);background:var(--book-cream);border:1px solid var(--book-gold);border-radius:20px}
#gift-unfold-avatar{position:absolute;left:5%;top:89%;width:10%;aspect-ratio:1;border-radius:50%;object-fit:cover;border:1px solid var(--book-gold)}
@media(max-width:750px){
 [data-gift-phase=unfolded] #gift-book-spread,[data-gift-phase=unfolding] #gift-book-spread{display:block;border-width:6px;transform-origin:50% 0}
 [data-gift-phase=unfolding] .gift-calendar-lid{position:absolute;left:-100%;top:0;width:100%;height:100%;overflow:visible}
 [data-gift-phase=unfolded] .gift-calendar-lid{height:105px;overflow:hidden}
 [data-gift-phase=unfolded] .gift-inside-art{object-fit:contain}
}
@media(prefers-reduced-motion:reduce){#gift-stage *,#gift-house{animation-duration:0s!important;transition-duration:0s!important}}
