/* local fonts */
:root{color-scheme:dark;--cream:#f8e5bf;--gold:#d7ac66;--ink:#371e12;font-family:Manrope,'Segoe UI',sans-serif;color:var(--cream);background:#20120e}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:2px solid #ffe3a1;outline-offset:5px}button[hidden],[hidden]{display:none!important}#experience{position:relative;height:100dvh;min-height:320px;isolation:isolate;overflow:clip}.room,.room img,.room-shade,.film-grain,#world{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.room{z-index:-3;transform:scale(1.035);transition:transform 1.5s ease,filter 1.5s}.room img{object-fit:cover;object-position:50% 50%}.room-shade{z-index:-2;background:linear-gradient(90deg,#100a08c9 0%,#100a0875 28%,#100a080d 57%,#100a0822),linear-gradient(0deg,#100908e8,transparent 32%,transparent 76%,#10090875)}#world{pointer-events:auto;z-index:0;touch-action:none}#world canvas{display:block;width:100%;height:100%;outline:none}.film-grain{z-index:1;background:radial-gradient(ellipse at 65% 50%,transparent 32%,#160a1122 95%);box-shadow:inset 0 0 150px #0002}
.topbar{position:absolute;top:max(27px,env(safe-area-inset-top));left:4%;right:4%;display:flex;justify-content:space-between;align-items:center;z-index:5}.topbar a{display:flex;gap:12px;align-items:center;text-decoration:none;color:#e1c8a4;font-size:11px;font-weight:600;letter-spacing:.22em}.brand-star{font-size:30px;color:#edcb87}.top-actions{display:flex;gap:10px}.circle-button{background:#251b1280;color:#ecd3a8;border:1px solid #d3ad7244;border-radius:50%;width:38px;height:38px;backdrop-filter:blur(10px);font-size:17px}.circle-button:hover{border-color:#e5c38a}
.scene-copy{position:absolute;z-index:3;top:28%;left:6%;width:32%;pointer-events:none;text-shadow:0 2px 16px #180a09b0;transition:opacity .4s}.eyebrow{font-size:10px;font-weight:700;letter-spacing:.25em;color:#d5b27a;display:block}.scene-copy h1{font:500 clamp(46px,5.15vw,92px)/.98 'Cormorant Garamond',Georgia,serif;letter-spacing:-.035em;margin:22px 0 0;color:#fcebd0;text-wrap:balance}.scene-copy h1:focus{outline:none}.scene-copy h1 em{color:#eec987;font-weight:500}.copy-ornament{display:flex;align-items:center;gap:13px;width:112px;color:#d5a65d;margin:26px 0;font-size:12px}.copy-ornament:before,.copy-ornament:after{content:'';height:1px;flex:1;background:linear-gradient(90deg,transparent,#d5a65d)}.copy-ornament:after{transform:rotate(180deg)}.scene-copy p{font-size:13px;line-height:1.85;color:#d7c6b3;margin:0;max-width:270px}.gesture-hint{position:absolute;z-index:3;bottom:23%;left:66%;transform:translateX(-50%);white-space:nowrap;color:#dbc29e;font-size:10px;letter-spacing:.06em;pointer-events:none;opacity:.8}.gesture-hint span{margin-right:9px;font-size:20px;vertical-align:middle}
.controls{position:absolute;z-index:4;bottom:max(7%,58px);left:43%;right:7%;text-align:center;pointer-events:none}.controls button{pointer-events:auto}.action-row{display:flex;align-items:center;justify-content:center;gap:20px}.primary{display:flex;align-items:center;justify-content:center;gap:30px;min-width:225px;padding:16px 27px;border:1px solid #ffe8bba0;border-radius:5px;color:#3b2414;font-weight:700;font-size:13px;background:linear-gradient(120deg,#f7e2b8,#d1a465);box-shadow:0 7px 28px #08040355,inset 0 1px #fff6;transition:transform .2s,filter .2s}.primary:hover:enabled{filter:brightness(1.1);transform:translateY(-2px)}.primary:disabled{opacity:.55}.primary>span:last-child{font-size:20px;font-weight:400}.secondary{padding:10px 0;background:none;border:0;border-bottom:1px solid #be9d6977;color:#e9d2ae;font-size:11px}.control-hint{font-size:10px;margin:13px 0 0;color:#c9bca6;min-height:16px}.gift-choices{display:flex;justify-content:center;gap:10px;margin-bottom:18px}.gift-choice{display:flex;align-items:center;gap:7px;padding:9px 11px;border:1px solid #e1c7a342;background:#22150de0;backdrop-filter:blur(12px);color:#e2cfaf;border-radius:30px;font-size:10px;transition:.2s}.gift-choice[aria-pressed=true]{border-color:#efc87e;background:#684724cc;color:#fff0d2;box-shadow:0 0 18px #e9af3533}.swatch{width:10px;height:10px;flex-shrink:0;border:1px solid #f9db9c66;border-radius:50%}.swatch.red{background:#a91c30}.swatch.emerald{background:#1e6955}.swatch.cream{background:#efddba}.footnote{position:absolute;z-index:3;bottom:max(20px,env(safe-area-inset-bottom));left:4%;right:4%;display:flex;justify-content:space-between;pointer-events:none;font-size:9px;color:#bdac97;letter-spacing:.06em}
body:is([data-phase=choose],[data-phase=chosen]) .gesture-hint{bottom:29%}body[data-phase=opening] .controls{opacity:0;pointer-events:none}body[data-phase=opening] .controls button{pointer-events:none}body[data-phase=result] .scene-copy h1{font-size:clamp(45px,4.3vw,80px)}body[data-phase=result] .gesture-hint{display:none}body:is([data-phase=opening],[data-phase=result]) .room{filter:brightness(.72);transform:scale(1.08)}
.loading{position:absolute;inset:0;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:25px;background:radial-gradient(ellipse,#302016,#130d0a);font-size:12px;color:#d6b786}.loading-star{font-size:64px;animation:breathe 2s ease-in-out infinite}.fallback{position:absolute;inset:0;z-index:1;pointer-events:none}.fallback-art{position:absolute;left:40%;right:4%;top:15%;bottom:20%;overflow:hidden;border-radius:15px}.fallback-art img{width:100%;height:100%;object-fit:contain}.fallback>p{position:absolute;left:43%;right:7%;top:13%;font-size:11px;color:#ebd6b5;line-height:1.5;text-align:center;background:#20150be8;padding:12px;border-radius:5px}dialog{max-width:min(440px,90vw);border:1px solid #b89252;border-radius:12px;background:#211811;color:#e6d2b2;padding:38px;box-shadow:0 24px 100px #000a}dialog::backdrop{background:#080604aa;backdrop-filter:blur(7px)}dialog h2{font:500 36px/1.1 'Cormorant Garamond',Georgia,serif;color:#f6e4c2;margin:20px 0}dialog p{font-size:13px;line-height:1.8}dialog small{font-size:10px;line-height:1.7;display:block;color:#ac967a}.dialog-close{position:absolute;top:10px;right:15px;color:#e5c898;background:none;border:0;font-size:24px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}@keyframes breathe{50%{opacity:.4;transform:scale(.9)}}
@media(max-aspect-ratio:3/4){.topbar{top:max(18px,env(safe-area-inset-top));left:6%;right:6%}.topbar a{font-size:8px;letter-spacing:.15em;gap:7px}.brand-star{font-size:22px}.circle-button{width:32px;height:32px;font-size:15px}.top-actions{gap:7px}.room-shade{background:linear-gradient(0deg,#140b08ed,transparent 35%,#140b0822 60%,#140b0880)}.scene-copy{top:13%;left:8%;width:84%;text-align:center}.scene-copy h1{font-size:clamp(39px,11vw,64px);margin:12px 0}.eyebrow{font-size:8px}.scene-copy h1 br{display:none}.copy-ornament{margin:14px auto;width:85px;font-size:9px}.scene-copy p{font-size:11px;line-height:1.6;max-width:280px;margin:auto}.controls{left:6%;right:6%;bottom:max(8%,59px)}.primary{padding:13px 22px;min-width:220px;font-size:12px;gap:25px}.action-row{gap:13px}.secondary{font-size:10px}.control-hint{font-size:9px;margin-top:10px}.gift-choices{gap:6px;margin-bottom:12px}.gift-choice{font-size:9px;padding:8px 9px;gap:5px}.swatch{width:8px;height:8px}.gesture-hint{left:50%;bottom:22%;font-size:9px}.gesture-hint span{font-size:17px}body:is([data-phase=choose],[data-phase=chosen]) .gesture-hint{bottom:29%}body[data-phase=result] .scene-copy h1{font-size:42px}body:is([data-phase=choose],[data-phase=chosen],[data-phase=unpacking]) .scene-copy p{display:none}body[data-phase=result] .scene-copy{top:13%}.footnote{left:6%;right:6%;font-size:8px;bottom:max(17px,env(safe-area-inset-bottom))}.fallback-art{left:5%;right:5%;top:30%;bottom:25%}.fallback>p{left:7%;right:7%;top:29%;font-size:10px}.scene-copy .copy-ornament{margin:12px auto}.scene-copy h1 em{white-space:nowrap}}
@media(max-height:560px) and (min-aspect-ratio:3/4){.topbar{top:13px}.scene-copy{top:24%;left:5%;width:30%}.scene-copy h1{font-size:42px;margin-top:10px}.scene-copy p{font-size:10px}.copy-ornament{margin:12px 0}.controls{bottom:43px}.primary{padding:10px 18px;min-width:195px;font-size:11px}.gift-choices{margin-bottom:10px}.control-hint{margin-top:7px;font-size:8px}.footnote{bottom:12px}.gesture-hint{bottom:26%}.topbar a{font-size:9px}.circle-button{width:29px;height:29px}body[data-phase=result] .scene-copy h1{font-size:39px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
/* Box interaction has no visible buttons or name chips. Keyboard focus outlines the box. */
.gift-targets{position:absolute;inset:0;z-index:2;pointer-events:none}
.gift-target{position:absolute;border:0;padding:0;border-radius:12px;background:transparent;pointer-events:none;color:transparent}
.gift-target:focus-visible{outline:2px solid #ffe3a1;outline-offset:5px;box-shadow:0 0 22px #f7cd7033}
body[data-visual-mode=fallback] .gift-target{pointer-events:auto}
/* Keep the typography clear of the 3D objects on narrow screens. */
@media(max-aspect-ratio:3/4){
 .scene-copy{top:11%}
 .scene-copy h1{font-size:clamp(32px,9.8vw,48px)}
 .scene-copy h1 br{display:initial}
 .scene-copy p{font-size:11px;max-width:300px}
 .copy-ornament{display:none}
 body[data-phase=result] .scene-copy{top:11%}
 body[data-phase=result] .scene-copy h1{font-size:clamp(32px,10vw,43px)}
 body[data-phase=result] .scene-copy p{margin-top:14px}
}
@media(max-width:360px) and (max-aspect-ratio:3/4){
 body[data-phase=result] .primary{min-width:0;padding:12px 14px;gap:12px;font-size:11px}
 body[data-phase=result] .secondary{white-space:nowrap}
 body[data-phase=result] .action-row{gap:12px}
}
/* Keep desktop choices beneath the boxes, including short browser windows. */
@media(min-aspect-ratio:3/4) and (max-height:800px){
 body:is([data-phase=choose],[data-phase=chosen]) .controls{bottom:44px}
 body:is([data-phase=choose],[data-phase=chosen]) .control-hint{display:none}
}
/* Velvet invitation: a gold bevel, inset stitching and a small gift seal. */
#primary{position:relative;isolation:isolate;overflow:hidden;min-width:292px;min-height:74px;max-width:100%;padding:15px 31px 15px 22px;gap:17px;border:2px solid transparent;border-radius:14px;color:#fff0ce;background:radial-gradient(ellipse at 40% 0%,#ad35454d,transparent 65%) padding-box,linear-gradient(115deg,#631528,#852235 46%,#4b0f20) padding-box,linear-gradient(135deg,#fff0c4,#d1a454 22%,#8b5b27 46%,#f6d995 70%,#b17b36) border-box;box-shadow:0 6px 0 #301014,0 8px 0 #b0853a77,0 16px 28px #09030380,inset 0 1px 1px #ffffff24,inset 0 -7px 16px #22030d66;text-shadow:0 2px 3px #310913;transition:transform .22s,box-shadow .22s,filter .22s}
#primary::before{content:'';position:absolute;inset:5px;border:1px solid #edc77b55;border-radius:9px;pointer-events:none}
#primary::after{content:'';position:absolute;inset:-60% -50%;background:linear-gradient(110deg,transparent 42%,#fff1c51f 49%,#fff7de4d 50%,#fff1c51f 51%,transparent 58%);transform:translateX(-80%);pointer-events:none;z-index:0}
#primary #primary-label{position:relative;z-index:1;font:600 28px/1.05 'Cormorant Garamond',Georgia,serif;letter-spacing:.015em;white-space:nowrap}
#primary .button-seal{position:relative;z-index:1;display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border:1px solid #f7d797a6;border-radius:50%;color:#42200e;background:radial-gradient(circle at 32% 18%,#fff0c7,#d7ab5f 65%,#9b662d);box-shadow:inset 0 0 0 3px #e4bc734d,0 2px 7px #26050d99}
.button-seal svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
#primary:hover:enabled{transform:translateY(-2px);filter:brightness(1.08);box-shadow:0 8px 0 #301014,0 10px 0 #b0853a88,0 20px 35px #09030388,0 0 28px #d99e3326,inset 0 1px 1px #ffffff35}
#primary:hover:enabled::after,#primary:focus-visible::after{animation:invitation-glint .85s ease-out both}
#primary:active:enabled{transform:translateY(4px);box-shadow:0 2px 0 #301014,0 4px 0 #b0853a66,0 8px 18px #09030377}
#primary:focus-visible{outline:2px solid #fff0b8;outline-offset:6px}
#primary:disabled{opacity:.82;filter:saturate(.65);transform:none;cursor:default}
@keyframes invitation-glint{to{transform:translateX(80%)}}
@media(max-aspect-ratio:3/4){
 #primary{min-width:258px;min-height:66px;padding:13px 23px 13px 18px;gap:13px;border-radius:13px}
 #primary #primary-label{font-size:25px}
 #primary .button-seal{width:32px;height:32px;flex-basis:32px}
 body[data-phase=result] .action-row{flex-direction:column;gap:16px}
 body[data-phase=result] .secondary{font-size:12px}
 body[data-phase=result] #primary #primary-label{font-size:23px}
}
@media(max-height:560px) and (min-aspect-ratio:3/4){#primary{min-height:58px;min-width:244px;padding:10px 23px 10px 17px;gap:12px}#primary #primary-label{font-size:24px}#primary .button-seal{width:30px;height:30px;flex-basis:30px}}
@media(max-width:360px) and (max-aspect-ratio:3/4){#primary{min-width:238px;padding:12px 18px;gap:11px}#primary #primary-label{font-size:23px}body[data-phase=result] #primary #primary-label{font-size:21px}}
@media(prefers-reduced-motion:reduce){#primary{transition:none}#primary:hover:enabled,#primary:active:enabled{transform:none}#primary::after{display:none}}
