@charset "UTF-8";
:root{color-scheme:light;--gold:#edc581;--ink:#342e36;--cream:#fff6e8;--panel:#fcf5eaf5}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:#06152a;color:var(--cream);font:14px/1.5 Tahoma,"Leelawadee UI",sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer;touch-action:manipulation;min-height:44px;color:inherit}button:disabled{opacity:.6;cursor:wait}input,select,textarea{color:var(--ink)}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #71d9ff;outline-offset:4px}[hidden]{display:none!important}.backdrop{position:fixed;inset:0;background:url('../img/river-scene.png') center/cover no-repeat;z-index:0}.backdrop:after{content:'';position:absolute;inset:0;background:linear-gradient(#02132c22,transparent 40%)}#water{position:fixed;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}#fireworks,#lanterns{position:fixed;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;overflow:hidden}main{position:relative;z-index:3;width:100%;height:100svh;pointer-events:none}.hero{position:absolute;left:50%;top:20px;transform:translateX(-50%);text-align:center;width:max-content;max-width:80%;text-shadow:0 3px 15px #00112b;pointer-events:none}.flourish{height:40px}.flourish img{width:180px;height:45px;filter:drop-shadow(0 3px 5px #6e380c)}h1{font-size:clamp(38px,4.5vw,72px);font-weight:900;line-height:1.3;margin:4px 0 0;color:#ffe0a1;text-shadow:0 -1px #fff6d9,1px 3px #a76a26,2px 6px #6a2335,0 8px 25px #041327}.hero p{margin:7px 0 0;font-size:16px}.hero .subtitle{font-size:11px;letter-spacing:1px;color:#e7d6b8;margin-top:7px}.divider{font:13px Georgia,serif;color:var(--gold);margin-top:12px}.toolbar{position:fixed;top:22px;right:24px;display:flex;gap:8px;z-index:15}.toolbar button,.secondary{border:1px solid #e4c38664;border-radius:30px;background:#06172bdc;color:#ffe5b7;padding:9px 16px;backdrop-filter:blur(10px);font-size:12px}.toolbar button:hover,.secondary:hover{background:#1b3049}.skip-link{position:fixed;top:-100px;left:20px;background:#fff;color:#122c43;z-index:100;border:0;padding:10px}.skip-link:focus{top:10px}.river{position:absolute;inset:0;overflow:hidden;pointer-events:none}#boats{position:absolute;inset:0}.boat{position:absolute;left:0;top:0;width:var(--size);border:0;background:none;padding:0;pointer-events:auto;will-change:transform;transform-origin:50% 70%;min-height:44px;isolation:isolate}.sprite{display:block;width:100%;aspect-ratio:1.097;background-image:url('../img/festival-atlas.png');background-size:400% 322%;background-repeat:no-repeat;filter:drop-shadow(0 3px 3px #160f1f66)}.row-1{background-position-y:0}.row-2{background-position-y:45.4%}.col-0{background-position-x:0}.col-1{background-position-x:33.3333%}.col-2{background-position-x:66.6667%}.col-3{background-position-x:100%}.boat>.sprite:not(.reflection){position:relative;z-index:2}.boat .reflection{position:absolute;top:62%;left:0;transform:scaleY(-.45) skewX(-5deg);filter:blur(1.3px);opacity:.3;z-index:-1;mask-image:linear-gradient(transparent,#000);animation:reflection 3.7s ease-in-out infinite alternate}.wake{position:absolute;left:-30%;top:67%;width:145%;height:19%;border-radius:50%;border:1px solid #f6db9b45;box-shadow:0 3px 8px #e2ad5420;z-index:0;transform:rotate(-3deg)}.wake:before,.wake:after{content:'';position:absolute;inset:-5px -8px;border:1px solid #e5c88329;border-radius:50%}.wake:after{inset:-10px -17px;opacity:.5}.launch-ring{position:absolute;top:63%;left:-15%;width:130%;height:25%;border:2px solid #ffdf9e;border-radius:50%;animation:landing-ripple 2.4s ease-out forwards;pointer-events:none}.boat-label{position:absolute;top:95%;left:50%;transform:translateX(-50%);display:block;font-size:10px;line-height:1.5;white-space:nowrap;max-width:145px;overflow:hidden;text-overflow:ellipsis;border-radius:12px;background:#06172bd6;border:1px solid #d4b37665;padding:4px 9px;color:#fff2d7;box-shadow:0 3px 10px #0003}.boat-label small{display:none;font-size:10px;font-weight:normal;max-width:145px;overflow:hidden;text-overflow:ellipsis}.boat.own .boat-label{border-color:#ffdb9a;background:#10233bf0}.boat.own .boat-label small,.boat:hover .boat-label small,.boat:focus-visible .boat-label small{display:block}.boat:hover,.boat:focus-visible{z-index:30!important}.boat:hover .boat-label{max-width:200px}.boat.simulated .boat-label{opacity:.85}.boat.simulated:not(:hover):not(:focus-visible) .boat-label{font-size:9px}.emotion-heart:after{content:'♡';position:absolute;right:0;top:-20px;font:42px Georgia;color:#ffbaca;text-shadow:0 0 13px #f381a1;animation:heart 3s ease-out infinite}.river-dock{position:absolute;left:50%;bottom:24px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);text-align:center;pointer-events:auto;z-index:35}.dock-actions{display:flex;gap:10px;align-items:center;justify-content:center}#status{font-size:11px;margin:0 0 12px;text-shadow:0 2px 5px #00132c,0 0 10px #00132c;color:#fff3dc;background:#06172b9c;border-radius:15px;padding:4px 13px;display:inline-block}#status:empty{display:none}.release{display:flex;align-items:center;justify-content:center;gap:20px;min-height:54px;padding:10px 28px;border:1px solid #ffe1a0;box-shadow:inset 0 0 0 3px #fff2c326,0 5px 30px #06152b80;border-radius:30px;background:linear-gradient(130deg,#e5b361,#b87527 65%,#955117);color:#fff5de;font-size:17px;font-weight:bold;text-shadow:0 1px #9f621e;transition:filter .2s}.release:hover{filter:brightness(1.12)}footer{position:absolute;bottom:32px;left:26px;color:#ffe3a6;font-size:11px;text-shadow:0 2px 9px #000;pointer-events:none}footer strong{font-size:21px;font-weight:500;letter-spacing:1px}footer .counter{padding:7px 13px;border-left:1px solid #dfb56770;background:linear-gradient(90deg,#03162dc9,transparent)}.ceremony{position:absolute;right:24px;top:86px;bottom:110px;width:378px;max-width:calc(100% - 32px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#bb8d45 transparent;background:var(--panel);border:1px solid #ecc485;border-radius:25px;color:var(--ink);box-shadow:0 18px 70px #00112b99;pointer-events:auto;z-index:40;backdrop-filter:blur(20px)}.panel-heading{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;background:#fbf3e7f5;border-bottom:1px solid #dfc59e;padding:17px 20px 13px}.panel-heading h2{font-size:19px;margin:2px 0 0}.eyebrow{font-size:10px;color:#9c773e;letter-spacing:1px}#close-form{background:transparent;border:1px solid #d7bb96;border-radius:22px;color:#79572c;width:68px;font-size:20px}#close-form span{font-size:11px}.form-card{padding:20px 22px 0}.crest{display:none}label{display:block;font-size:13px;font-weight:700;margin-bottom:5px}label span{font-weight:400}input,textarea,select{width:100%;min-height:44px;padding:10px 12px;background:#fffdf7;border:1px solid #ddcbb6;border-radius:10px}input::placeholder,textarea::placeholder{color:#928a86;font-size:12px}textarea{resize:vertical;min-height:75px;max-height:140px;line-height:1.5}small{display:block;color:#8e7a62;font-size:10px;margin:4px 0 12px}.label-row{display:flex;align-items:center;justify-content:space-between}.label-row>span{color:#947d63;font-size:10px}.error{font-size:11px;color:#b53341;margin:5px 0 10px}[aria-invalid=true]{border-color:#b53341}.wish-tools{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:-8px}.wish-tools button{border:0;background:transparent;color:#996223;padding:0;font-size:11px;text-decoration:underline;text-underline-offset:3px}.wish-tools span{font-size:9px;color:#97866e}.krathong-field{border:0;border-top:1px solid #ddc5a1;padding:0;margin:6px 0 0}.krathong-field legend{text-align:center;font-size:12px;padding:0 12px;font-weight:bold}.choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:10px}.choice{margin:0;cursor:pointer;position:relative}.choice input{position:absolute;width:1px;height:1px;min-height:0;opacity:0;padding:0}.tile{display:flex;flex-direction:column;align-items:center;border:1px solid #e1d4c4;border-radius:12px;padding:4px;background:#fff9ef}.tile .sprite{width:100%;max-width:62px}.choice-name{font-size:9px;line-height:1.4;color:#79654d;font-weight:normal}.choice input:checked+.tile{border:2px solid #c79042;padding:3px;background:#fff0d4;box-shadow:0 0 0 2px #ca964c17}.choice input:checked+.tile:after{content:'✓';position:absolute;top:3px;right:5px;color:#8a5f20;font-size:11px}.choice input:focus-visible+.tile{outline:3px solid #3088ad;outline-offset:3px}details{margin-top:13px;border-top:1px solid #decaac}summary{cursor:pointer;min-height:44px;align-content:center;font-size:11px;color:#866436}summary span{font-size:10px;color:#a68a65}.activity-options{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:5px 0 12px}.activity-options label{font-size:11px;align-self:center}.activity-options select{font-size:12px;padding:7px}.activity-options>div{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:center}#release{width:calc(100% - 44px);margin:12px 22px 22px;min-height:50px;font-size:16px}.composer-open #open-form{background:#152b44;border-color:#b79b68;font-size:13px}.composer-open .river-dock{left:calc((100% - 400px)/2)}dialog{background:#fcf5e9;border:1px solid #d4aa64;border-radius:24px;padding:32px;color:var(--ink);width:min(430px,calc(100% - 32px));max-height:85svh;overflow:auto;text-align:center;box-shadow:0 20px 80px #0008}dialog::backdrop{background:#02162a99;backdrop-filter:blur(5px)}dialog .close{position:absolute;right:9px;top:7px;font-size:28px;color:#7f5c28;background:transparent;border:0;width:44px}#dialog-art .sprite{width:120px;margin:0 auto 12px}dialog h2{font-size:22px;overflow-wrap:anywhere}#dialog-wish{line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px}dialog .secondary{background:#f8e7cb;color:#78531c;border-color:#cba970}.lantern{position:absolute;bottom:45%;width:var(--width);height:calc(var(--width)*1.4);border-radius:35% 35% 25% 25%;background:linear-gradient(#b74c20,#f7a43b 65%,#ffe9a1);box-shadow:0 0 15px #ffb94f77;animation:rise var(--time) linear forwards}.lantern:after{content:'';position:absolute;bottom:-2px;left:30%;width:40%;height:7px;border-radius:50%;background:#fff7c3}.paused *,.paused *:before,.paused *:after{animation-play-state:paused!important}.water-unavailable .backdrop:after{background:linear-gradient(#02132c22,transparent 40%)}
@keyframes reflection{to{transform:scaleY(-.39) skewX(6deg);opacity:.22}}@keyframes landing-ripple{from{transform:scale(.4);opacity:.9}to{transform:scale(2.6);opacity:0}}@keyframes heart{to{transform:translateY(-30px);opacity:0}}@keyframes rise{to{transform:translate(65px,-110vh) rotate(8deg);opacity:0}}
@media(max-width:1050px){.hero{top:24px;left:30px;transform:none;text-align:left;max-width:60%}.flourish{display:none}.hero h1{font-size:46px}.hero p{font-size:13px}.hero .subtitle{font-size:10px;letter-spacing:0}.divider{display:none}.toolbar{right:16px;top:22px}.toolbar button{font-size:10px;padding:8px 11px}.ceremony{right:16px;width:350px;top:85px;bottom:100px}.composer-open .river-dock{left:calc((100% - 350px)/2)}.river-dock{bottom:25px}footer{bottom:26px;left:17px}footer strong{font-size:17px}.composer-open footer{display:none}}
@media(max-width:600px){.backdrop{background-image:url('../img/river-scene-mobile.png');background-position:center top}.hero{top:75px;left:50%;transform:translateX(-50%);text-align:center;max-width:95%;width:100%}.hero h1{font-size:clamp(39px,11.8vw,62px)}.hero p{font-size:12px;margin-top:8px}.hero .subtitle{display:none}.flourish{display:block;height:28px}.flourish img{width:125px;height:32px}.toolbar{top:12px;right:12px;gap:6px}.toolbar button{min-height:40px;font-size:10px}footer{top:17px;left:10px;bottom:auto}footer .counter{padding:4px 8px;border:0;background:#06172b9e;border-radius:18px;font-size:9px}footer strong{font-size:15px}.river-dock,.composer-open .river-dock{left:50%;bottom:max(18px,env(safe-area-inset-bottom));width:calc(100% - 24px);max-width:none}.dock-actions{gap:8px}.river-dock .release{font-size:15px;min-height:51px;padding:9px 20px}.dock-actions .secondary{padding:8px 12px;font-size:10px}#status{font-size:10px;max-width:100%;margin-bottom:9px;padding:5px 10px}.ceremony{top:auto;bottom:0;left:0;right:0;width:100%;max-width:100%;max-height:87svh;border-radius:24px 24px 0 0;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -10px 60px #00152b99}.panel-heading{padding:13px 20px}.panel-heading h2{font-size:18px}.form-card{padding:16px 22px 0}.tile .sprite{max-width:59px}.composer-open .river-dock{display:none}.boat-label{font-size:9px;max-width:125px;padding:3px 7px}.boat-label small{font-size:8px;max-width:125px}.boat.simulated:not(:hover):not(:focus-visible) .boat-label{font-size:8px}.boat .reflection{opacity:.2}}
@media(max-height:500px) and (min-width:601px){.hero{top:14px}.hero h1{font-size:33px}.hero p{font-size:10px}.hero .subtitle{display:none}.toolbar{top:12px}.ceremony{top:12px;bottom:12px}.river-dock{bottom:12px}footer{bottom:12px}.composer-open .toolbar{right:390px}}
@media(prefers-reduced-motion:reduce){body:not(.motion-enabled) *,body:not(.motion-enabled) *:before,body:not(.motion-enabled) *:after{animation:none!important;transition:none!important}}
/* Riverside landing and articulated pose layers. */

.pose{position:absolute;inset:0;background-image:url('../img/people-poses.png');background-size:400% 300%;background-repeat:no-repeat;background-position-x:0}.man .pose{background-position-x:33.3333%}.girl .pose{background-position-x:66.6667%}.boy .pose{background-position-x:100%}.pose-rest{background-position-y:0;opacity:1}.pose-hold{background-position-y:50%;opacity:0}.pose-reach{background-position-y:100%;opacity:0}.lead .pose-rest{opacity:var(--rest)}.lead .pose-hold{opacity:var(--hold)}.lead .pose-reach{opacity:var(--reach)}
.boat.held{opacity:1;filter:brightness(1)!important}.boat.held .reflection,.boat.held .wake,.boat.held .boat-label{display:none}.boat>.sprite:not(.reflection){mask-image:linear-gradient(#000 0 88%,#000b 93%,transparent 98%)}.boat.held>.sprite{mask-image:none}.boat:after{content:'';position:absolute;left:15%;top:77%;width:70%;height:8%;background:#10253666;border-radius:50%;filter:blur(1px)}.boat.held:after{display:none}.wake{top:80%;height:12%;border-color:#e5c88d66}.boat .reflection{top:75%;opacity:.25}.boat-label{top:102%}


/* Opaque, readable wish cards across both dark and reflected water. */
.boat-label,.boat.own .boat-label,.boat.simulated:not(:hover):not(:focus-visible) .boat-label{background:#fff4df;color:#352a20;border:1px solid #bc914f;opacity:1;box-shadow:0 3px 12px #05162b55;white-space:normal;overflow:visible;text-overflow:clip;width:170px;max-width:170px;font-size:11px;overflow-wrap:anywhere;line-height:1.6}
.boat-label small,.boat.own .boat-label small{color:#4d3b29;max-width:none;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.65;margin:3px 0 0;font-size:11px}
.boat:not(:focus-visible):not(:hover) .boat-label small{display:none}.boat:hover .boat-label,.boat:focus-visible .boat-label{width:min(250px,68vw);max-width:min(250px,68vw)}
#dialog-wish{background:#fff9ed;color:#342a21;border:1px solid #e2c69a;border-radius:14px;padding:16px}dialog{background:#fff3dd}#status{background:#fff1d8;color:#48351f;text-shadow:none;border:1px solid #cba368}
@media(max-width:600px){.boat-label,.boat.own .boat-label,.boat.simulated:not(:hover):not(:focus-visible) .boat-label{width:112px;max-width:112px;font-size:10px}.boat-label small{font-size:11px}}
/* A composed group shares one supporting hand anchor and one release clock. */
.person.lead.ensemble{left:24px;bottom:-8px;width:285px;height:185px}.ensemble .pose{background-image:url('../img/group-poses.png');background-size:400% 300%}.ensemble-2 .pose{background-position-x:0}.ensemble-3 .pose{background-position-x:33.3333%}.ensemble-4 .pose{background-position-x:66.6667%}.ensemble-5 .pose{background-position-x:100%}


.pose-emotion{background-image:url('../img/emotion-poses.png?v=4')!important;opacity:var(--emotion,0);background-position-x:0}.ensemble .pose-emotion{background-size:600% 300%!important}.emotion-heart:after{display:none}#characters[data-phase="emotion"][data-emotion="heart"]:after{display:block;right:6px;top:-28px;font-size:28px;opacity:var(--emotion)}
.boat-label{margin-left:var(--label-shift,0px)}

@media(max-width:600px){.river-dock{bottom:calc(12px + env(safe-area-inset-bottom))}#status{max-width:calc(100vw - 32px);font-size:10px}.hero{top:68px}#characters[data-phase="emotion"][data-emotion="heart"]:after{right:8px;top:-15px}}
@media(max-width:350px){.hero h1{font-size:37px}.toolbar{gap:3px;right:7px}.toolbar button{padding:7px 8px}footer strong{font-size:13px}}
@media(max-height:500px) and (min-width:601px){.river-dock{left:auto;right:18px;transform:none;max-width:50%;bottom:12px}.composer-open .river-dock{display:none}}

/* Shared deck coordinates keep the seated baseline fixed during every pose. */
#pier-stage{position:absolute;left:0;bottom:calc(100px + env(safe-area-inset-bottom));width:clamp(320px,30vw,440px);aspect-ratio:3/2;z-index:18;pointer-events:none}
#pier-stage #pier{position:absolute;background:url('../img/riverside-pier.svg?v=2') center/100% 100% no-repeat;left:0;bottom:0;width:100%;height:50%;z-index:0}
#pier-stage #characters{position:absolute;inset:0;width:100%;height:100%;max-width:none;opacity:1;z-index:1;filter:none;--rest:1;--hold:0;--reach:0}
#pier-stage #characters:before{content:'';position:absolute;left:13%;bottom:20%;width:64%;height:2%;background:#1c100d99;border-radius:50%;filter:blur(2px)}
#pier-stage .person.lead{position:absolute;animation:none!important;background:none;left:34%;bottom:20.8333%;width:43.0556%;height:64.5833%;margin:0;filter:drop-shadow(0 2px 1px #28180e88)}
#pier-stage .person.lead.ensemble{left:7%;bottom:20.8333%;width:72.2222%;height:77.0833%}
/* The source sheets have unequal rows. Crop each pose without adjacent fragments. */
#pier-stage .woman .pose:not(.pose-emotion){background-size:326.126% var(--sheet-height);background-position-x:0}
#pier-stage .man .pose:not(.pose-emotion){background-size:413.714% var(--sheet-height);background-position-x:40.528%}
#pier-stage .person:not(.ensemble) .pose-rest{--sheet-height:273.552%;background-position-y:0}
#pier-stage .person:not(.ensemble) .pose-hold{--sheet-height:280.620%;background-position-y:56.795%}
#pier-stage .person:not(.ensemble) .pose-reach{--sheet-height:359.603%;background-position-y:100%;height:78%;top:auto;bottom:0;transform:none}
#pier-stage .ensemble .pose-rest{background-size:400% 282.078%;background-position-y:0}
#pier-stage .ensemble .pose-hold{background-size:400% 317.544%;background-position-y:51.747%;height:92%;top:auto;bottom:0}
#pier-stage .ensemble .pose-reach{background-size:400% 318.475%;background-position-y:100%;height:84%;top:auto;bottom:0;transform:none}
#pier-stage #characters[data-phase="emotion"][data-emotion="heart"]:after{right:12%;top:5%}
@media(max-width:1050px){#pier-stage{width:clamp(290px,39vw,380px);bottom:calc(100px + env(safe-area-inset-bottom))}}
@media(max-width:600px){#pier-stage{width:min(80vw,320px);bottom:calc(108px + env(safe-area-inset-bottom))}.hero{max-width:calc(100% - 24px);top:72px}.hero h1{font-size:clamp(32px,10vw,52px)}.dock-actions{gap:8px}.dock-actions .secondary{padding:9px 12px}.river-dock .release{font-size:15px;padding:10px 22px}}
@media(max-height:500px) and (min-width:601px){#pier-stage{width:min(34vw,260px);bottom:68px}.hero{max-width:52%}.hero h1{font-size:32px}}




/* On compact screens only personal boats carry persistent name labels. */
@media(max-width:1050px){.boat.simulated .boat-label{display:none!important}}
