@font-face{font-family:Jua;src:url('./vendor/Jua-Regular.ttf') format('truetype');font-display:swap}
:root{--ink:#2b443a;--muted:#52675a;--paper:#fffdf7;--green:#365b47;--accent:#e3ab68;--edge:#d8ddce;--shadow:0 10px 35px #263e3021;--radius:16px;color-scheme:light;font-family:'Segoe UI','Malgun Gothic',sans-serif;color:var(--ink);font-size:14px}
*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#e7eedf}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button{border:0}button:disabled{cursor:wait;opacity:.6}button:hover{filter:brightness(.96)}button:active{transform:translateY(1px)}a{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #b8772c;outline-offset:4px}::selection{background:#c5dcc6;color:#203b2a}input,textarea{caret-color:var(--green)}*{scrollbar-width:thin;scrollbar-color:#acb8a3 #f3f4ed} [hidden]{display:none!important}
#app,#world{position:fixed;inset:0}#world{touch-action:none}canvas{display:block;width:100%;height:100%}#loading{position:absolute;inset:0;display:grid;place-content:center;gap:18px;text-align:center;background:#e7eedf;z-index:20}#loading strong{font:44px Jua}#loading span{color:var(--muted)}
.topbar{position:absolute;top:22px;left:28px;right:28px;height:56px;display:flex;align-items:center;gap:18px;pointer-events:none}.topbar>*{pointer-events:auto}.brand{display:flex;align-items:center;gap:8px;text-decoration:none;font:28px Jua}.brand svg{width:33px;height:33px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.header-divider{height:23px;width:1px;background:#9caf9a}.topbar #location{font-size:14px;font-weight:600}.demo-badge{margin-left:auto;background:#fffdf7db;padding:8px 12px;border-radius:9px;font-size:12px}.icon-button{display:grid;place-items:center;width:40px;height:40px;background:var(--paper);border-radius:50%;flex-shrink:0}.icon-button svg, [data-icon] svg,#scene-link-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.scene-caption{position:absolute;left:42px;top:122px;pointer-events:none}.scene-caption h1{font:36px/1.25 Jua;margin:0 0 12px;letter-spacing:-.025em}.scene-caption p{font-size:14px;line-height:1.85;color:var(--muted);margin:0 0 18px}.text-action{font-weight:600;background:none;padding:0 0 5px;border-bottom:1px solid #6e8272;pointer-events:auto}.text-action span{margin-left:12px}.scene-link{position:absolute;right:36px;top:118px;display:flex;align-items:center;gap:12px;padding:13px 17px;border-radius:12px;background:var(--paper);box-shadow:var(--shadow);font-weight:600}#scene-link-icon{display:flex}.scene-message{position:absolute;left:50%;top:46%;transform:translate(-50%,-100%);padding:10px 18px;background:var(--paper);border-radius:16px 16px 16px 2px;box-shadow:var(--shadow);font:16px Jua;pointer-events:none;transition:opacity .3s;white-space:nowrap}
.movement{position:absolute;bottom:40px;left:42px;display:grid;justify-items:center;gap:12px;user-select:none}.joystick{position:relative;width:124px;height:124px;border:1px solid #fff9;background:#fffdf787;border-radius:50%;touch-action:none;box-shadow:0 4px 20px #42604412}.joystick-ring{position:absolute;inset:29px;border:1px solid #899f864d;border-radius:50%;pointer-events:none}.stick{position:absolute;top:40px;left:40px;width:42px;height:42px;border-radius:50%;background:#fffdf7;box-shadow:0 3px 10px #27433230;pointer-events:none;border:1px solid #e4e7da}.pad{position:absolute;background:transparent;font-size:18px;line-height:1;padding:5px;width:30px;height:30px;color:#4f6854;touch-action:none}.pad.up{left:46px;top:3px}.pad.down{left:46px;bottom:3px}.pad.left{left:3px;top:46px}.pad.right{right:3px;top:46px}.movement-label{font-size:11px;font-weight:600;color:#4f6252}.bottom-area{position:absolute;bottom:29px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:12px}.hint{margin:0;font-size:11px;color:#3d5845;background:#ffffff78;padding:6px 12px;border-radius:6px;white-space:nowrap}.dock{display:flex;align-items:center;padding:9px;gap:5px;background:var(--paper);border-radius:20px;box-shadow:0 12px 35px #233d2d25}.dock button{display:grid;justify-items:center;gap:7px;min-width:87px;padding:10px 9px;border-radius:12px;background:transparent;font-size:11px;font-weight:600;white-space:nowrap}.dock button.active{background:#e5eddf;color:#31513b}.dock button[aria-expanded=true]{background:#f6e9d5;color:#6f4b20}.dock-divider{width:1px;height:31px;margin:0 4px;background:var(--edge)}.save-note{position:absolute;bottom:15px;right:24px;font-size:11px;color:#4e6651}.panel{position:absolute;z-index:5;right:26px;top:94px;width:365px;max-height:calc(100dvh - 217px);padding:24px;background:var(--paper);border-radius:var(--radius);box-shadow:var(--shadow);overflow:auto}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.panel-heading h2{font:25px Jua;margin:0}.panel-heading .icon-button{width:32px;height:32px;background:#edf0e5}.intro{color:var(--muted);font-size:13px;line-height:1.75;margin:0 0 22px}.field{display:grid;gap:8px;margin-bottom:18px}.field>span,.field legend{font-size:12px;font-weight:700}.field input,.field select,.field textarea{width:100%;border:1px solid #ccd5c6;background:#fff;border-radius:9px;padding:11px;color:var(--ink)}.field textarea{resize:vertical;min-height:104px;line-height:1.7}.field input[type=color]{height:42px;padding:4px}.field input[type=range]{accent-color:var(--green);padding:0}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.primary{width:100%;background:var(--green);color:white;border-radius:10px;padding:13px;font-weight:600}.secondary{width:100%;border:1px solid var(--edge);background:#edf1e6;padding:11px;border-radius:10px;margin-top:10px}.small-note{font-size:11px;color:var(--muted);line-height:1.75;margin:12px 0 0}.photo-picker{position:relative;border:1px dashed #9aab94;border-radius:12px;background:#f1f3e9;padding:18px;text-align:center;display:block;cursor:pointer;margin-bottom:22px}.photo-picker input{position:absolute;width:1px;height:1px;opacity:0}.photo-picker:focus-within{outline:3px solid #b8772c;outline-offset:3px}.photo-picker img{max-height:120px;max-width:100%;border-radius:8px;display:block;margin:0 auto 12px}.photo-picker strong{display:block;font-size:13px;margin-bottom:6px}.photo-picker small{font-size:11px;color:var(--muted)}.gift-row{display:grid;grid-template-columns:50px 1fr auto;align-items:center;gap:12px;padding:15px 0;border-top:1px solid var(--edge)}.gift-art{width:48px;height:48px;border-radius:12px;display:grid;place-items:center;background:#eeeeda}.gift-art svg{width:30px;height:30px;stroke-width:1.6;stroke:var(--green);fill:none;stroke-linejoin:round;stroke-linecap:round}.gift-row strong{font-size:13px;display:block;margin-bottom:4px}.gift-row small{font-size:11px;color:var(--muted)}.gift-row button{padding:9px 12px;background:#e5eddf;border-radius:8px;font-size:12px;font-weight:700}.placed-list{margin:18px 0 0;padding:0;list-style:none}.placed-list li{display:flex;justify-content:space-between;align-items:center;font-size:12px;padding:9px 0}.placed-list button{background:none;text-decoration:underline;font-size:11px;color:#6d5140}.letter{border-top:1px solid var(--edge);padding:17px 0}.letter p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.8;margin:9px 0}.letter small{font-size:11px;color:var(--muted)}.letter-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.letter-head strong{font-size:12px}.letter-head button{background:none;font-size:11px;text-decoration:underline;color:var(--muted)}.empty{padding:22px 0;text-align:center;color:var(--muted);font-size:13px;line-height:1.8}.guide{padding-left:18px;color:var(--muted);line-height:1.9;font-size:13px}.guide li{margin-bottom:13px}.guide strong{color:var(--ink)}#toast{position:absolute;z-index:12;bottom:155px;left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);background:#2b443a;color:#fff;padding:13px 21px;border-radius:12px;font-size:13px;box-shadow:var(--shadow);text-align:center;line-height:1.6}.error-message{color:#8b3828;line-height:1.7;font-size:13px}.no-webgl{padding:80px 30px;text-align:center;background:#e7eedf;position:absolute;inset:0}.no-webgl h2{font:28px Jua}
@media(min-width:1000px){body.panel-open .scene-link{right:420px}body.panel-open .scene-caption{opacity:.75}}
@media(max-width:1000px){.scene-caption{top:104px;left:25px}.scene-caption h1{font-size:29px}.scene-caption p{font-size:12px}.movement{left:22px;bottom:155px}.movement-label{display:none}.scene-link{right:24px;top:104px}.save-note{display:none}.hint{font-size:11px}.bottom-area{bottom:max(18px,env(safe-area-inset-bottom));}.panel{top:90px;right:20px;max-height:calc(100dvh - 210px)}}
@media(max-width:600px){.topbar{top:max(14px,env(safe-area-inset-top));left:17px;right:17px;gap:10px;height:42px}.brand{font-size:24px}.brand svg{width:28px}.header-divider{height:18px}.topbar #location{font-size:11px;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.demo-badge{font-size:11px;padding:6px 8px}.icon-button{width:34px;height:34px}.scene-caption{top:89px;left:23px}.scene-caption h1{font-size:28px}.scene-caption p{font-size:11px;margin-bottom:10px;line-height:1.7}.text-action{font-size:11px}.scene-link{top:91px;right:17px;gap:6px;font-size:11px;padding:10px}.scene-link svg{width:17px!important;height:17px!important}.scene-message{font-size:13px;padding:9px 13px}.dock{width:calc(100vw - 24px);justify-content:space-around;gap:0;padding:7px 4px;border-radius:17px}.dock button{min-width:0;padding:10px 7px;font-size:11px;gap:6px}.dock button svg{width:21px;height:21px}.dock-divider{margin:0 3px}.hint{font-size:11px;padding:5px 8px;max-width:95vw;white-space:normal;text-align:center}.movement{bottom:146px;left:22px}.joystick{width:108px;height:108px}.joystick-ring{inset:23px}.stick{left:32px;top:32px}.pad.up{left:38px;top:0}.pad.down{left:38px;bottom:0}.pad.left{left:0;top:38px}.pad.right{right:0;top:38px}.panel{top:74px;right:12px;left:12px;width:auto;max-height:calc(100dvh - 184px);padding:21px}.panel-open .scene-caption,.panel-open .scene-link,.panel-open .movement,.panel-open .scene-message{visibility:hidden}#toast{bottom:132px;width:max-content;font-size:12px}.panel-heading h2{font-size:23px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.sample-note{position:absolute;left:50%;bottom:151px;transform:translateX(-50%);font-size:11px;color:#405541;background:#fffdf7e8;padding:7px 12px;border-radius:7px;text-align:center;max-width:90vw;white-space:nowrap;pointer-events:none}
.niche-list{display:grid;grid-template-columns:1fr 1fr;gap:9px}.niche-list button{padding:12px;display:grid;grid-template-columns:1fr auto;gap:6px;text-align:left;background:#edf0e6;border-radius:9px}.niche-list button span{font-size:11px;color:#52675a}.niche-list button strong{grid-column:1;grid-row:2;font-size:15px}.niche-list button small{font-size:11px;grid-column:2;grid-row:2}.niche-list button[data-niche="A-08"]{background:#f1e2c5}
body[data-scene="niche"] .scene-caption{top:105px}body[data-scene="niche"] .scene-caption h1{font-size:28px}body[data-scene="niche"] .scene-caption p{font-size:12px}body[data-scene="niche"] .scene-caption .text-action{font-size:12px}
@media(max-width:1000px){.sample-note{bottom:145px;font-size:11px}body[data-scene="hall"] .scene-caption{max-width:220px}.scene-caption p{text-shadow:0 1px 4px #f5f5e5}}
@media(max-width:600px){.sample-note{bottom:138px;white-space:normal;width:max-content;max-width:90vw;padding:5px 9px}.scene-caption h1{font-size:24px}body[data-scene="niche"] .scene-caption{top:88px}body[data-scene="niche"] .scene-caption h1{font-size:23px}body[data-scene="niche"] .scene-caption p{font-size:11px}body[data-scene="hall"] .scene-caption p{font-size:11px}.panel-open .sample-note{visibility:hidden}}

.topbar{background:#fffdf7ee;border-radius:12px;padding:0 14px;left:22px;right:22px}.presence-button{margin-left:auto;display:flex;align-items:center;gap:7px;font-size:12px;background:transparent;padding:9px 5px}.presence-dot{width:7px;height:7px;background:#a77d42;border-radius:50%}.presence-button[data-connected=true] .presence-dot{background:#4a7653}.demo-badge{margin-left:0;background:#eee9df}.scene-caption{background:#fffdf7ed;border-radius:12px;padding:18px 21px;top:108px;left:24px}.scene-caption h1{font-size:29px}.scene-caption p{margin-bottom:12px}.scene-link{top:108px;right:24px}.movement-label{background:#fffdf7dd;padding:5px 8px;border-radius:5px}.save-note{background:#fffdf7dd;padding:5px 8px;border-radius:5px}body[data-scene=niche] .scene-caption{top:108px}
@media(max-width:700px){.topbar{left:12px;right:12px;padding:0 10px;gap:9px}.topbar #location,.header-divider,.demo-badge{display:none}.presence-button{font-size:11px}.scene-caption,body[data-scene=niche] .scene-caption{left:14px;top:78px;padding:12px 14px;max-width:210px}.scene-caption h1,body[data-scene=niche] .scene-caption h1{font-size:22px;margin-bottom:6px}.scene-caption p{font-size:11px}.scene-link{right:14px;top:222px;font-size:11px;padding:10px 12px}.text-action{font-size:11px}.sample-note{max-width:calc(100vw - 152px);left:auto;right:14px;bottom:143px;transform:none;text-align:right}.panel-open .presence-button{visibility:hidden}}

.quiet-button,.music-controls button{padding:10px 12px;border-radius:8px;background:#eee9df;font-size:12px;white-space:nowrap}.music-controls{display:flex;align-items:center;gap:8px}.music-controls input{width:65px;accent-color:var(--green)}.scene-caption{max-width:280px}.scene-caption p{font-size:12px}.scene-caption h1{font-size:25px}.niche-list button[data-niche="A-08"]{background:#edf0e6}.niche-list button[data-mine=true]{background:#f1e2c5}.gift-bag{position:absolute;z-index:4;left:50%;transform:translateX(-50%);bottom:146px;background:#fffdf7f5;padding:12px 15px;border-radius:12px;box-shadow:var(--shadow);max-width:620px;width:max-content;max-height:240px;overflow:auto}.bag-heading{display:flex;gap:18px;align-items:center;justify-content:space-between;margin-bottom:8px;font-size:12px}.bag-heading button{background:#e5eddf;padding:8px;border-radius:6px;font-size:11px}.bag-items{display:flex;gap:7px;overflow:auto;max-width:550px}.bag-items button{display:grid;justify-items:center;gap:4px;min-width:62px;padding:7px;background:#f0ecdf;border-radius:8px;font-size:10px}.bag-items button[aria-pressed=true]{background:#cee0cd;outline:2px solid #365b47;outline-offset:-2px}.bag-items svg{height:24px;width:24px;fill:none;stroke:var(--green);stroke-width:1.6}.placed-selector{display:flex;gap:12px;align-items:center;font-size:11px;margin-top:8px}.placed-selector select{padding:7px;min-width:150px;color:var(--ink);background:#fff;border:1px solid var(--edge);border-radius:6px}.placement-controls{display:flex;gap:5px;margin-top:8px}.placement-controls button{background:#e5eddf;padding:10px;min-height:36px;border-radius:6px;font-size:12px}.sample-note{left:auto;right:24px;bottom:20px;transform:none;max-width:250px;white-space:normal}.save-note{display:none}.panel-open .gift-bag{visibility:hidden}.panel{max-height:calc(100dvh - 210px)}.music-controls button[aria-pressed=true]{background:#d8e6d2}.gift-bag:empty{display:none}
@media(max-width:900px){.topbar{gap:7px}.topbar #location,.header-divider{display:none}.scene-caption{max-width:240px}.music-controls input{display:none}.gift-bag{max-width:calc(100vw - 190px);left:auto;right:14px;transform:none;bottom:146px}.bag-items{max-width:100%}.sample-note{bottom:118px;max-width:260px;font-size:10px}}
@media(max-width:600px){.topbar{height:auto;min-height:42px;flex-wrap:wrap;padding:7px 10px;gap:6px}.brand{font-size:22px}.presence-button{font-size:10px;padding:4px}.quiet-button,.music-controls button{padding:7px 9px;font-size:11px}.quiet-button{margin-left:0}.music-controls{margin-left:auto}.topbar #help{width:30px;height:30px}.scene-caption,body[data-scene=niche] .scene-caption{top:114px;max-width:220px;padding:10px 12px}.scene-caption h1,body[data-scene=niche] .scene-caption h1{font-size:21px}.scene-caption p{font-size:10px;margin-bottom:8px}.scene-link{top:227px}.gift-bag{right:12px;bottom:139px;max-width:calc(100vw - 145px);padding:10px;width:235px}.bag-heading{flex-wrap:wrap;gap:6px;font-size:11px}.bag-items button{min-width:58px}.placed-selector{display:grid;gap:5px}.placed-selector select{min-width:0;width:100%}.placement-controls{flex-wrap:wrap}.placement-controls button{padding:9px;min-height:38px}.sample-note{display:none}.panel{top:108px;max-height:calc(100dvh - 220px)}body[data-scene=niche] .gift-bag{max-width:calc(100vw - 24px);width:max-content;left:12px;right:12px;transform:none}.scene-caption{pointer-events:none}.scene-caption .text-action{pointer-events:auto}}
@media(min-width:901px){.gift-bag{left:auto;right:24px;top:190px;bottom:auto;transform:none;width:260px;max-height:calc(100dvh - 350px)}.bag-heading{flex-wrap:wrap;gap:8px}.bag-items{max-width:230px}.placed-selector{display:grid;gap:6px}.placement-controls{flex-wrap:wrap}}
@media(max-width:900px){.sample-note{display:none}}
.pad svg,.placement-controls svg,.shelf-tools svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.text-action svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;margin-left:10px;vertical-align:middle}.shelf-tools{display:flex;gap:6px;margin-top:9px}.shelf-tools button{min-height:40px;padding:9px;background:#e5eddf;border-radius:7px;font-size:12px}.shelf-tools button:first-child{flex:1}.bag-heading,.bag-items button,.placed-selector{font-size:12px}
@media(max-width:600px){body[data-shelf-zoom=true] .scene-caption{display:none}body[data-shelf-zoom=true] .gift-bag{bottom:110px;max-height:215px}body[data-shelf-zoom=true] .scene-link{top:115px}}

/* Compact translucent controls keep the shared space in view. */
:root{--hud-surface:#fffdf766;--hud-active:#dce8d18c}
.topbar{top:max(10px,env(safe-area-inset-top));left:12px;right:auto;height:38px;min-height:0;max-width:calc(100vw - 24px);padding:2px 8px;gap:10px;flex-wrap:nowrap;background:var(--hud-surface);border-radius:10px;box-shadow:none}
.brand{font-size:19px;gap:4px}.brand svg{width:23px;height:23px}.topbar #location,.header-divider{display:none}
.presence-button{margin-left:4px;font-size:12px;padding:6px 4px;gap:5px;white-space:nowrap}.presence-dot{width:5px;height:5px}
.quiet-button,.music-controls button{padding:7px 6px;font-size:11px;background:transparent}.music-controls{margin-left:0;gap:5px}.music-controls input{width:48px}.topbar #help{width:30px;height:30px;background:transparent}.topbar #help svg{width:20px;height:20px}
.scene-caption,body[data-scene=niche] .scene-caption{top:60px;left:12px;width:44px;height:44px;max-width:none;padding:0;background:none;border-radius:0}
.scene-caption h1,.scene-caption p{display:none}.scene-caption .text-action{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:12px;background:var(--hud-surface)}
.text-action svg{margin:0;width:23px;height:23px}
.scene-link,body[data-shelf-zoom=true] .scene-link{top:60px;right:12px;width:44px;height:44px;padding:0;display:grid;place-items:center;border-radius:12px;background:var(--hud-surface);box-shadow:none}
#scene-link-text,.scene-link>[data-icon]{display:none}.scene-link svg{width:23px!important;height:23px!important}
.bottom-area{bottom:max(14px,env(safe-area-inset-bottom));gap:0}.dock{width:auto;padding:3px;gap:2px;border-radius:14px;background:var(--hud-surface);box-shadow:none}
.dock button{min-width:68px;padding:7px 9px;gap:3px;font-size:11px;border-radius:10px}.dock button svg{width:20px;height:20px}.dock button.active,.dock button[aria-expanded=true]{background:var(--hud-active)}.dock-divider{height:22px;margin:0 2px;background:#52675a33}
.movement{left:18px;bottom:20px;gap:0}.joystick{width:88px;height:88px;background:#fffdf72e;border:1px solid #fffdf747;box-shadow:none}.joystick-ring{inset:21px;border-color:#52675a33}.stick{width:30px;height:30px;left:28px;top:28px;background:#fffdf775;border:0;box-shadow:none}.pad{width:26px;height:26px;padding:5px}.pad.up{left:30px;top:0}.pad.down{left:30px;bottom:0}.pad.left{left:0;top:30px}.pad.right{right:0;top:30px}.pad svg{width:16px;height:16px}
.sample-note{display:none}.camera-zoom{position:absolute;right:14px;bottom:85px;display:grid;gap:3px}.camera-zoom button{display:grid;place-items:center;width:38px;height:38px;padding:0;background:var(--hud-surface);border-radius:10px}.camera-zoom svg{width:20px;height:20px}
.panel-open .scene-caption,.panel-open .scene-link,.panel-open .camera-zoom{visibility:hidden}
@media(max-width:600px){
 .topbar{left:10px;max-width:calc(100vw - 20px);padding:2px 6px;gap:4px}.brand{font-size:18px}.brand svg{width:21px;height:21px}.presence-button{margin-left:3px;font-size:11px;padding:5px 3px}.music-controls input{display:none}.quiet-button,.music-controls button{font-size:10px;padding:7px 5px}
 .dock{width:auto;padding:2px;gap:1px}.dock button{width:44px;height:44px;min-width:44px;padding:11px}.dock button>span:last-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.dock-divider{margin:0 2px;height:20px}
 .movement{left:12px;bottom:78px}.joystick{width:76px;height:76px}.joystick-ring{inset:18px}.stick{width:26px;height:26px;left:24px;top:24px}.pad.up,.pad.down{left:24px}.pad.left,.pad.right{top:24px}
 .camera-zoom{right:12px;bottom:78px}.camera-zoom button{width:36px;height:36px}
 .panel{top:60px;max-height:calc(100dvh - 130px)}.gift-bag{bottom:80px}body[data-scene=niche] .gift-bag{bottom:80px}body[data-shelf-zoom=true] .gift-bag{bottom:78px}
}
/* The gift tray stays collapsed until its icon is selected. */
body .gift-bag,body[data-scene=niche] .gift-bag,body[data-shelf-zoom=true] .gift-bag{left:12px;right:auto;top:auto;bottom:80px;transform:none;padding:0;width:44px;max-width:calc(100vw - 72px);max-height:calc(100dvh - 160px);background:transparent;box-shadow:none;overflow:visible;border-radius:12px}
body:not([data-scene=niche]) .gift-bag{bottom:166px}
#bag-toggle{position:relative;display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--hud-surface)}
#bag-toggle svg,.memorial-icon svg,#stand-up svg{width:23px;height:23px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}
.bag-count{position:absolute;right:3px;top:2px;font-size:10px;font-weight:700}
body .gift-bag[data-open=true]{width:min(360px,calc(100vw - 72px));background:#fffdf7ed;padding:8px;overflow:auto}
.bag-content{padding:10px 2px 2px}.bag-heading{gap:8px;line-height:1.5}.bag-items{max-width:100%}.placement-controls{flex-wrap:wrap}.placed-selector select{min-width:0;flex:1}.bag-content button{min-height:38px}
#stand-up{position:absolute;left:112px;bottom:32px;width:44px;height:44px;background:var(--hud-surface);border-radius:12px}.panel-open #stand-up{visibility:hidden}
.memorial-photo{width:100%;max-height:300px;object-fit:contain;display:block;background:#eee8dc;border-radius:8px}.empty-photo{min-height:180px;display:grid;place-content:center;justify-items:center;gap:12px;color:#5e6d60}.empty-photo svg{width:38px;height:38px;stroke:currentColor;stroke-width:1.3;fill:none}.empty-photo p{margin:0;font-size:13px}
.memorial-heading{display:flex;align-items:center;justify-content:space-between;margin:18px 0 24px}.memorial-heading h3{font-size:22px;margin:0 0 6px}.life-dates{margin:0;font-size:12px;color:#626b60;font-variant-numeric:tabular-nums}.memorial-icon,.letter-head .memorial-icon{width:44px;height:44px;flex-shrink:0;padding:10px;display:grid;place-items:center;background:#e7eadd;border-radius:10px;text-decoration:none;color:#345442}
.parent-letter{padding-bottom:22px;border-bottom:1px solid #d9d6c9}.parent-letter p,.memorial-comment p{font-size:14px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere}.memorial-comments{margin-top:22px}.memorial-comments h3,#memorial-editor h3{font-size:15px;margin:0}.memorial-empty{font-size:13px;color:#6c7368;line-height:1.8}.memorial-comment{padding:16px 0;border-bottom:1px solid #e1ded2}.memorial-comment .letter-head{flex-wrap:wrap;justify-content:flex-start}.memorial-comment .letter-head span{font-size:11px;color:#687061;margin-left:auto}.memorial-comment .letter-head button{width:32px;height:32px;padding:7px;min-width:32px}.memorial-comment p{margin:8px 0 0}.memorial-error{margin-bottom:0}#memorial-editor:not(:empty){margin-top:22px;padding-top:18px;border-top:1px solid #d9d6c9}#memorial-editor .letter-head{margin-bottom:14px}.seat-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;border-top:1px solid #d9d6c9;margin-top:20px;padding-top:10px}.seat-list button{font-size:12px;margin:0;min-height:44px}.two-fields>*{min-width:0}.field input[type=date]{min-width:0;padding:10px 6px;font-size:13px}
@media(max-width:600px){#stand-up{left:98px;bottom:94px}.memorial-photo{max-height:270px}.panel{padding:20px}.memorial-heading{margin:16px 0 20px}}
@media(max-width:600px){.quiet-button,.music-controls button{font-size:11px}}
.bag-count,.bag-items button{font-size:11px}

@media(min-width:601px) and (max-width:900px){#stand-up{left:18px;bottom:122px}}

/* Direct pet contact keeps the companion, rather than a form, in the foreground. */
body[data-petting=true] .topbar,body[data-petting=true] .scene-caption,body[data-petting=true] .scene-link,body[data-petting=true] .movement,body[data-petting=true] .camera-zoom,body[data-petting=true] #gift-bag,body[data-petting=true] #pet-bubble,body[data-petting=true] #stand-up{display:none}
#petting-ui{position:absolute;inset:0;pointer-events:none;z-index:5}
.petting-heading{position:absolute;top:max(18px,env(safe-area-inset-top));left:24px;right:24px;display:flex;align-items:center;justify-content:space-between;gap:16px}.petting-heading h1{font-family:Jua,sans-serif;font-size:28px;font-weight:400;margin:0;color:var(--ink)}.petting-heading>div{display:flex;gap:8px}.petting-heading button{pointer-events:auto;width:44px;height:44px;background:var(--hud-surface);border-radius:12px}.petting-heading svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#petting-sound[aria-pressed=false]{opacity:.55}#petting-status{position:absolute;bottom:108px;left:50%;transform:translateX(-50%);font-family:Jua,sans-serif;font-size:20px;margin:0;color:var(--green);white-space:nowrap}
.dock #petting-toggle[aria-pressed=true]{background:#e8eddf;color:var(--green)}
.petting-heart{position:absolute;width:28px;height:28px;color:#c9857c;animation:petting-heart-rise .85s ease-out forwards;transform:translate(-50%,-50%)}.petting-heart svg{width:100%;height:100%;fill:currentColor}
@keyframes petting-heart-rise{from{opacity:1;transform:translate(-50%,-50%) scale(.8)}to{opacity:0;transform:translate(-50%,-220%) scale(1.1)}}
@media(max-width:600px){.petting-heading{left:18px;right:18px;top:max(14px,env(safe-area-inset-top))}.petting-heading h1{font-size:24px}#petting-status{bottom:86px;font-size:18px}}
@media(prefers-reduced-motion:reduce){.petting-heart{animation:none}.petting-heart svg{opacity:.8}}
