/* A small visible player stays in one corner and leaves the visit interactive. */
.corner-media{position:fixed;z-index:50;left:var(--edge-left,14px);top:calc(var(--bar) + 8px);width:min(300px,34vw);min-width:200px;overflow:hidden;border:1px solid #d9c39177;border-radius:13px;background:#1a2b23f5;box-shadow:0 10px 30px #0005;color:#f6eacf;font:400 12px/1.35 var(--ui)}
.corner-media-head{display:flex;align-items:center;gap:8px;padding:5px 7px 5px 10px;min-height:33px}
.corner-media-head strong{flex:1;font-weight:650;font-size:13px;min-width:0}
.corner-media-head button{flex:none;border:0;background:#fff1c614;color:#f6eacf;border-radius:50%;width:28px;height:28px;font:22px var(--ui);cursor:pointer}
.corner-media-video{width:100%;aspect-ratio:16/9;background:#141a14}
.corner-media-video iframe{display:block;width:100%;height:100%;border:0}
.corner-media-foot{display:flex;align-items:center;gap:8px;padding:5px 9px;color:#c9c2a9;font-size:11px}
.corner-media-foot span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.corner-media-foot a{color:#ead3a2;text-decoration:underline;flex:none}
/* A lightly lit branch at the edge of the shrine; the full branch opens only on request. */
.wish-tree-peek{position:absolute;z-index:4;left:var(--edge-left);bottom:calc(var(--edge-bottom) + 80px);width:clamp(68px,7vw,115px);padding:0;border:0;background:none;color:#f5e0ae;cursor:pointer;filter:drop-shadow(0 2px 5px #14221888)}
.wish-mini-art{display:block;position:relative;width:100%;aspect-ratio:380/430}
.wish-branches{width:100%;height:100%;display:block;overflow:visible}
.wish-mini-flower{position:absolute;left:44%;top:32%;width:33%;filter:drop-shadow(0 0 6px #ffdcb699)}
.wish-mini-flower svg{width:100%;height:auto}
.wish-mini-label{display:block;padding:5px 7px;margin-top:-4px;border:1px solid #d9be7c66;border-radius:12px;background:#20171165;font:650 12px/1.3 var(--ui);text-shadow:0 1px 3px #000;backdrop-filter:blur(4px)}
.wish-tree-peek:is(:hover,:focus-visible) .wish-mini-flower{filter:drop-shadow(0 0 12px #ffdab8);transform:translateY(-2px)}
.wish-dialog,.wish-compose-dialog{width:min(1000px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid #b79a70;border-radius:23px;background:#f8f2e6;color:#473d2c;box-shadow:0 18px 80px #10251b77;overflow:auto;overscroll-behavior:contain;font:16px/1.5 var(--ui)}
.wish-compose-dialog{width:min(600px,calc(100vw - 24px))}
.wish-dialog::backdrop,.wish-compose-dialog::backdrop{background:#17130fbc;backdrop-filter:blur(4px)}
.wish-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 24px 15px;border-bottom:1px solid #ddcfb7;background:#fbf7ee}
.wish-head h2{font:400 clamp(24px,3.5vw,37px)/1.2 var(--serif);color:#4d3b25;margin:0}
.wish-kicker{margin:0 0 4px;font:700 12px/1.3 var(--ui);letter-spacing:.09em;text-transform:uppercase;color:#856742}
.wish-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.99fr)}
.wish-tree-canvas{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;padding:20px 6px 21px;isolation:isolate;background:radial-gradient(ellipse at 51% 46%,#79633c44,transparent 65%),linear-gradient(155deg,#172b25a6,#241c12dc 64%,#211b16f0),var(--wish-scene) center/cover #292b21;overflow:hidden;color:#fae6c3}
.wish-vision{position:relative;padding:0 4px;text-align:center;text-shadow:0 1px 8px #130e0a}
.wish-vision p{margin:0;font:400 clamp(17px,2.1vw,24px)/1.4 var(--serif)}
.wish-stage{position:relative;width:min(calc(100% - 16px),404px,calc(51dvh * .88372));aspect-ratio:380/430;container-type:size}
.wish-stage>.wish-branches,.wish-petals{position:absolute;inset:0}
.wish-stage>.wish-branches{filter:drop-shadow(0 8px 12px #160f0c66);pointer-events:none}
.wish-petal{position:absolute;z-index:1;transform:translate(-50%,-14%);width:clamp(42px,17cqw,75px);aspect-ratio:100/90;border:0;padding:0;background:none;color:#f4d7ad;cursor:pointer}
.wish-petal::before{content:'';position:absolute;left:50%;bottom:86%;height:var(--thread-length);width:1px;background:linear-gradient(#d8b88799,#f4d5a0c2);pointer-events:none}
.wish-hanging-flower{display:block;position:relative;width:100%;height:100%;filter:drop-shadow(0 3px 5px #20100aaa);transition:transform .24s,filter .24s;transform-origin:top center}
.wish-hanging-flower svg{width:100%;height:100%;display:block;overflow:visible}
.wish-petal:is(:hover,:focus-visible,[aria-pressed=true]){z-index:3;outline:0}
.wish-petal:is(:hover,:focus-visible,[aria-pressed=true]) .wish-hanging-flower{transform:scale(1.12);filter:drop-shadow(0 0 9px #ffd7aeb3)}
.wish-petal.mine::after{content:'';position:absolute;bottom:0;left:calc(50% - 3px);width:6px;height:6px;border-radius:50%;background:#ffe9a3;box-shadow:0 0 9px #ffeeae}
.wish-petal.is-blooming{z-index:4}
.wish-petal.is-blooming .wish-hanging-flower{animation:wish-lantern-bloom 1.65s cubic-bezier(.23,.67,.21,1) both}
.wish-leaf-petal{transform-origin:50px 72px}
.wish-petal.is-blooming .left{animation:wish-left-petal 1.45s cubic-bezier(.2,.65,.25,1) both}
.wish-petal.is-blooming .right{animation:wish-right-petal 1.45s cubic-bezier(.2,.65,.25,1) both}
@keyframes wish-lantern-bloom{0%{opacity:0;transform:scale(.4)}25%{opacity:1;transform:scale(.72);filter:drop-shadow(0 0 4px #ffe0b8)}75%{transform:scale(1.18);filter:drop-shadow(0 0 18px #ffdda9)}100%{transform:scale(1.12);filter:drop-shadow(0 0 9px #ffd7aeb3)}}
@keyframes wish-left-petal{0%,25%{transform:rotate(30deg) scaleX(.46)}100%{transform:rotate(0) scaleX(1)}}
@keyframes wish-right-petal{0%,25%{transform:rotate(-30deg) scaleX(.46)}100%{transform:rotate(0) scaleX(1)}}
.wish-tree-count{margin:0;text-align:center;font:600 13px/1.5 var(--ui);letter-spacing:.02em;color:#f0deba}
.wish-reading{padding:20px 22px;min-width:0}
.wish-top-actions,.wish-form-actions{display:flex;gap:8px;flex-wrap:wrap}
.wish-button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:9px 14px;border:1px solid #bca888;border-radius:999px;background:transparent;color:#574435;font:700 14px/1.35 var(--ui);cursor:pointer;text-align:center}
.wish-button.primary{background:#6b4938;color:#fff8e7;border-color:#6b4938}
.wish-button:hover{background:#f0e4cd}
.wish-button.primary:hover{background:#81563f}
.wish-button:disabled{cursor:wait;opacity:.6}
.wish-filters{display:flex;gap:6px;border-bottom:1px solid #ddcfb7;margin:13px 0 8px}
.wish-filters button{min-height:42px;padding:5px 10px;border:0;border-bottom:2px solid transparent;background:none;color:#705e48;font:650 13px var(--ui);cursor:pointer}
.wish-filters button[aria-pressed=true]{border-color:#8b5640;color:#6a3829}
.wish-status{margin:9px 0;color:#756448;font-size:13px;line-height:1.5}
.wish-status:empty{display:none}
.wish-arrival{padding:12px 14px;margin:12px 0;border-radius:14px;background:#efe2cd;border:1px solid #dcc39f;color:#61442e}
.wish-arrival strong{font:650 17px var(--serif)}
.wish-arrival p{margin:3px 0 0;font-size:13px}
.wish-arrival button{border:0;background:transparent;color:#6b4938;text-decoration:underline;text-underline-offset:3px;padding:5px 0;min-height:36px;cursor:pointer;font:700 13px var(--ui)}
.wish-selected{padding:14px 17px;border:1px solid #dac8ab;border-radius:15px;background:#fffcf5}
.wish-note-label{font:700 11px var(--ui);text-transform:uppercase;letter-spacing:.12em;color:#986745}
#wishSelectedMessage{white-space:pre-wrap;overflow-wrap:anywhere;font:400 18px/1.65 var(--serif);margin:6px 0 0}
.wish-signature{text-align:right;font-size:13px;color:#79674e;margin:10px 0 0;overflow-wrap:anywhere}
.wish-small-actions{display:flex;gap:2px 15px;flex-wrap:wrap;margin-top:7px}
.wish-small-actions button{min-height:38px;padding:4px 0;border:0;background:none;color:#68533a;font:14px var(--ui);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.wish-list{margin-top:10px;display:grid;max-height:180px;overflow:auto;scrollbar-width:thin}
.wish-list-item{display:block;text-align:left;padding:9px 2px;min-height:44px;border:0;border-bottom:1px solid #e1d6c3;background:none;color:#716047;font:13px/1.5 var(--ui);cursor:pointer;overflow-wrap:anywhere}
.wish-list-item[aria-pressed=true]{color:#704530;font-weight:700}
.wish-pages{display:flex;gap:8px;justify-content:space-between;margin-top:8px}
.wish-empty{padding:14px 0;font:400 18px/1.6 var(--serif);color:#725b40}
.wish-form-body{padding:16px 24px 23px}
.wish-form-intro,.prayer-wish-invite{display:flex;align-items:center;gap:12px;padding:8px 11px;margin:0 0 13px;border-radius:13px;background:#f1e7d6;color:#644c36}
.wish-form-intro p,.prayer-wish-invite p{margin:0;font:14px/1.5 var(--ui)}
.wish-form-intro span,.prayer-wish-invite>span{width:40px;flex:none}
.wish-form-intro svg,.prayer-wish-invite svg{display:block;width:100%;height:auto}
.prayer-wish-invite strong{font:650 17px var(--serif)}
.wish-form-body .field-label{font-size:14px;gap:6px;margin-bottom:12px}
.wish-form-body input:not([type=checkbox]),.wish-form-body textarea{width:100%;min-width:0;min-height:44px;padding:9px 11px;border:1px solid #c8b596;border-radius:11px;color:#473d2c;background:#fffdf7;font:400 16px/1.5 var(--ui);resize:vertical}
.wish-consent{display:flex;align-items:flex-start;gap:9px;font-size:14px;line-height:1.45;color:#574734;margin:10px 0 14px}
.wish-consent input{width:18px;height:18px;flex:none;accent-color:#764f39;margin:2px 0}
.wish-consent small{display:block;margin-top:3px;font-size:12px;color:#6f5b45}
#prayerHangLotus{display:inline-flex;margin-top:9px;width:100%}
#prayerForm:has(#prayerHangLotus:not([hidden])) .sheet-submit{background:transparent;color:#634d36;border:1px solid #c4b094;box-shadow:none}
/* A received lotus opens deliberately, revealing the greeting only after the touch. */
.sen-unfold{display:grid;place-items:center;width:100%;min-height:460px;border:1px solid #d8c29888;border-radius:25px;background:linear-gradient(#19382a22,#173426cc),url('images/vuon-ho-sen.webp') center/cover;color:#fff2d2;cursor:pointer;padding:40px 20px;font:400 26px/1.4 var(--serif);overflow:hidden;position:relative;isolation:isolate}
.sen-unfold-label{position:relative;z-index:2;margin-top:12px;text-shadow:0 2px 7px #12251c88}
.bloom-lotus{display:block;position:relative;width:230px;height:230px;perspective:700px;filter:drop-shadow(0 10px 22px #11291b44)}
.bloom-petal{position:absolute;left:calc(50% - 42px);bottom:26px;width:84px;height:156px;border:1px solid #f9d8c4aa;border-radius:65% 65% 45% 45%;transform-origin:50% 95%;background:linear-gradient(125deg,#fff4d7 0%,#efb5bb 33%,#c77c95 87%);box-shadow:inset 7px 4px 12px #fff0d159,inset -8px -6px 16px #9d56732e;transform:rotate(var(--bud-turn)) rotateY(var(--bud-y,0deg)) scaleX(.55);transition:transform 1.4s cubic-bezier(.2,.65,.25,1)}
.bloom-petal:nth-child(2n){background:linear-gradient(150deg,#ffebd3,#e4a9ba 56%,#a76b84)}
.bloom-petal.inner{width:65px;height:141px;left:calc(50% - 32.5px);bottom:29px;z-index:3}
.bloom-core{position:absolute;width:42px;height:26px;left:calc(50% - 21px);bottom:46px;border-radius:50%;background:radial-gradient(ellipse,#f8e3a4,#c49c50);box-shadow:0 0 22px #ffe4ab80;opacity:0;transition:opacity 1.4s}
.sen-unfold.is-blooming .bloom-petal{transform:rotate(var(--open-turn)) rotateY(var(--open-y,0deg)) scaleX(.98)}
.sen-unfold.is-blooming .bloom-core{opacity:1}
.sen-unfold.is-blooming .sen-unfold-label{opacity:0;transition:opacity .4s}
.sen-reveal{animation:sen-message-reveal .7s ease-out both}
@keyframes sen-message-reveal{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
.lotus-recipient-view.is-unopened .lotus-received-actions,.lotus-recipient-view.is-unopened .lotus-received-note{display:none}
@media(orientation:landscape) and (max-height:580px){
 .corner-media{width:220px;min-width:0;border-radius:10px}
 .corner-media-head{min-height:27px;padding:3px 5px 3px 8px}.corner-media-head strong{font-size:12px}.corner-media-head button{width:24px;height:24px;font-size:20px}
 .corner-media-foot{font-size:10px;padding:3px 7px}
 .wish-tree-peek{width:56px;bottom:calc(var(--edge-bottom) + 68px)}
 .wish-mini-label{display:none}
 .wish-dialog,.wish-compose-dialog{max-height:calc(100dvh - 16px)}
 .wish-head{padding:12px 16px 9px}.wish-head h2{font-size:24px}.wish-kicker{font-size:10px}
 .wish-layout{grid-template-columns:.9fr 1.1fr}.wish-tree-canvas{justify-content:flex-start;padding:13px 5px 14px}.wish-stage{width:min(100%,275px,calc((100dvh - 140px) * .88372))}.wish-vision p{font-size:17px}.wish-reading{padding:12px 16px}
 .wish-form-body{padding:12px 16px}.wish-form-body textarea{min-height:76px;height:76px}.wish-form-body .field-label{margin-bottom:9px}.wish-form-intro{display:none}.prayer-wish-invite p{font-size:12px}.prayer-wish-invite{margin-bottom:7px;padding:4px 8px}.prayer-wish-invite>span{width:28px}
 .sen-unfold{min-height:270px}.bloom-lotus{width:190px;height:190px}.bloom-petal{height:136px}.bloom-petal.inner{height:125px}
 #prayerHangLotus{min-height:36px;padding:7px 10px;margin-top:6px}
}
@media(orientation:portrait) and (max-width:700px){
 .corner-media{width:210px;min-width:0;top:calc(var(--bar) + 8px)}
 .wish-tree-peek{width:56px;bottom:calc(var(--edge-bottom) + 125px)}
 .wish-mini-label{display:none}
 .wish-layout{grid-template-columns:1fr}.wish-tree-canvas{padding:12px 5px}.wish-stage{width:min(75%,255px,36dvh)}.wish-reading{border-top:1px solid #ddcfb7;padding:15px 17px}
 .wish-head{padding:16px}.wish-form-body{padding:16px}.wish-form-actions .wish-button{flex:1 1 auto}
 .sen-unfold{min-height:440px;font-size:23px}.bloom-lotus{width:210px;height:210px}
}
@media(prefers-reduced-motion:reduce){.bloom-petal,.bloom-core,.sen-reveal,.wish-petal,.wish-hanging-flower,.wish-petal.is-blooming .wish-leaf-petal{transition:none!important;animation:none!important}}

.temple-screen:has(#san-chua:not([hidden]) .scene-portal-rail:not([hidden])) .corner-media{top:calc(var(--bar) + 56px)}
@media(orientation:landscape) and (max-height:360px){.corner-media{width:200px}.corner-media-foot span{display:none}}
