:root{--green:#294d3e;--deep:#1e342e;--cream:#faf7ef;--gold:#e5bd77;--muted:#7f8b7e;--ink:#2e4036;font-family:'Malgun Gothic','Apple SD Gothic Neo',system-ui,sans-serif;color:var(--ink);font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#c5d7d6}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #bf954a;outline-offset:4px}button{touch-action:manipulation}#world{position:fixed;inset:0;width:100%;height:100%;outline:none;touch-action:none}#nameplates{position:fixed;inset:0;pointer-events:none;overflow:hidden}.vignette{position:fixed;inset:0;pointer-events:none;box-shadow:inset 0 0 130px #26372720}#boot{position:fixed;z-index:100;inset:0;background:var(--cream);display:flex;align-items:center;justify-content:center;gap:16px;color:var(--green)}.spinner{width:28px;height:28px;border:2px solid #d8dfd3;border-top-color:var(--green);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}[hidden]{display:none!important}#lobby{position:fixed;inset:0;background:linear-gradient(90deg,#f5f3ebf8 0%,#f5f3ebeb 30%,#f5f3eb45 57%,transparent 80%);overflow:auto}.lobby-brand{display:flex;align-items:center;gap:12px;position:absolute;top:28px;left:4.2%;font-weight:700;font-size:20px;letter-spacing:-.6px}.lobby-brand img{width:26px;height:32px}.lobby-brand small{font-size:11px;font-weight:400;letter-spacing:1px;margin-left:14px;padding-left:18px;border-left:1px solid #b6c0b1}.lobby-card{width:min(390px,90vw);margin:112px 0 65px 7%;position:relative}.eyebrow{display:block;font-size:10px;letter-spacing:2.1px;color:#8e9a82;font-weight:700}h1{font-family:Georgia,'Batang',serif;font-size:42px;font-weight:500;line-height:1.45;letter-spacing:-2px;margin:18px 0 14px;color:#254536}.intro{font-size:13px;line-height:1.9;color:#748070;margin-bottom:22px}.avatar-options{display:grid;grid-template-columns:1fr 1fr;border:0;padding:0;gap:12px;margin:0 0 22px}.avatar-options legend{font-size:0}.avatar-card{position:relative;display:block;cursor:pointer}.avatar-card input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0}.avatar-image{display:block;background:#eeece4;border:1px solid #dedfd3;border-radius:14px 14px 0 0;height:155px;text-align:center;overflow:hidden;transition:background .2s}.avatar-image img{width:100%;height:170px;object-fit:contain;object-position:50% 0;transform:translateY(7px)}.avatar-caption{display:block;background:#fffdf9;border:1px solid #dedfd3;border-top:0;border-radius:0 0 14px 14px;padding:12px 14px;position:relative}.avatar-caption strong{font-size:12px;display:block}.avatar-caption small{font-size:10px;color:#8d9589;display:block;margin-top:4px}.check{position:absolute;right:12px;top:15px;width:21px;height:21px;display:grid;place-items:center;border:1px solid #cdd2c5;border-radius:50%;font-size:12px;color:transparent}.avatar-card:has(input:checked) .avatar-image{border-color:#66816a;background:#e2e9dd}.avatar-card:has(input:checked) .avatar-caption{border-color:#66816a}.avatar-card input:checked~.avatar-caption .check{background:var(--green);border-color:var(--green);color:#fff}.avatar-card:has(input:focus-visible){outline:3px solid #bf954a;outline-offset:4px;border-radius:14px}.name-label{display:block;font-size:12px;font-weight:600;margin-bottom:10px}#nickname{width:100%;height:48px;border:1px solid #cbd2c3;background:#ffffffb8;border-radius:10px;padding:0 15px;font-size:13px;color:var(--green)}input::placeholder{color:#9aa391}#nameHint{display:block;font-size:10px;line-height:1.8;color:#8e9887;margin-top:6px}#joinError{font-size:12px;color:#a44a37;min-height:18px;margin:6px 0}.enter-button{display:flex;width:100%;justify-content:space-between;align-items:center;height:51px;border:0;border-radius:10px;background:var(--green);color:#f8efdc;padding:0 20px;font-weight:600;font-size:13px;box-shadow:0 6px 18px #294d3e15}.enter-button:hover{background:#365d48}.enter-button span:last-child{font-size:22px;font-weight:400}.live-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#80aa7f;box-shadow:0 0 0 3px #80aa7f15;margin-right:8px}.lobby-note{text-align:center;font-size:10px;color:#8d9885;margin-top:18px}.lobby-scene-caption{position:absolute;right:6%;bottom:14%;display:flex;flex-direction:column;text-align:right;gap:9px;color:#fffce9;text-shadow:0 2px 15px #172e2470}.lobby-scene-caption span{font-size:14px}.lobby-scene-caption strong{font-family:Georgia,'Batang',serif;font-size:25px;font-weight:400}.lobby-scene-caption small{font-size:10px;letter-spacing:.5px;margin-top:6px}.lobby-footer{position:fixed;bottom:22px;left:4.2%;font-size:10px;color:#84907d}.lobby-footer b{font-weight:600}#gameUI{position:fixed;inset:0;pointer-events:none}#gameUI button,#gameUI input,#gameUI form,#joystick{pointer-events:auto}.topbar{display:flex;align-items:center;justify-content:space-between;position:absolute;top:22px;left:24px;right:24px;gap:12px}.location-pill,.pill,.circle-button{border:1px solid #fff5d733;background:#203b32e8;color:#fff7e6;box-shadow:0 6px 20px #18332815;backdrop-filter:blur(14px)}.location-pill{border-radius:14px;display:flex;align-items:center;height:54px;gap:12px;padding:0 18px;font-size:13px}.location-pill img{width:21px;height:29px}.location-pill strong{font-size:16px;letter-spacing:-.6px}.divider{height:15px;width:1px;background:#ffffff30;margin:0 4px}.location-dot{width:5px;height:5px;background:var(--gold);border-radius:50%;margin-left:5px}.top-actions{display:flex;align-items:center;gap:9px}.pill{border-radius:24px;min-height:44px;padding:0 17px;font-size:12px}.people-icon{font-size:20px;margin-right:6px;vertical-align:middle}.pill b{color:#f0cf91;font-weight:500}.circle-button{width:43px;height:43px;border-radius:50%;font-size:20px}.welcome-tip{position:absolute;top:98px;left:26px;display:flex;align-items:center;gap:14px;background:#fcfaf0ed;border:1px solid #fffdf7;border-radius:12px;padding:17px 40px 17px 17px;box-shadow:0 4px 30px #2b3f2510;max-width:370px;backdrop-filter:blur(12px)}.tip-icon{font-size:26px;color:#b58d46}.welcome-tip strong{font-size:12px;font-weight:600}.welcome-tip p{font-size:11px;color:#7b8673;margin:6px 0 0;line-height:1.5}.welcome-tip>button{position:absolute;top:8px;right:10px;border:0;background:none;color:#84917e;font-size:19px}.chat-panel{position:absolute;bottom:90px;left:24px;width:330px;background:#20362fe8;border:1px solid #fff5d726;border-radius:15px;color:#f9f4e7;overflow:hidden;box-shadow:0 10px 45px #172d2526;backdrop-filter:blur(16px);pointer-events:auto}.chat-heading{width:100%;display:flex;align-items:center;justify-content:space-between;padding:14px 15px;border:0;background:none;color:inherit;text-align:left;font-size:12px}.chat-heading>small{font-size:9px;color:#a6b5a5;margin-left:auto;margin-right:15px}#messages{height:170px;padding:0 15px 5px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#718879 transparent}.chat-line{padding:5px 0;font-size:12px;line-height:1.65;overflow-wrap:anywhere}.chat-line .chat-name{font-size:10px;color:#c8d9bd;font-weight:600;margin-right:8px}.chat-line.mine .chat-name{color:#eccb8a}.chat-line.system{font-size:10px;color:#9eaf9a;text-align:center;padding:8px 0}.chat-line .chat-time{font-size:9px;color:#9eaf9a;float:right}#chatForm{display:flex;border:1px solid #b6c7ad50;border-radius:9px;gap:8px;margin:8px 12px 0;padding:5px 7px 5px 12px}#chatInput{min-width:0;flex:1;width:100%;background:none;border:0;outline:none;color:#fff7e6;font-size:11px}#chatInput::placeholder{color:#acb9a4}#chatForm button{width:28px;height:28px;border:0;background:#e6c98a;color:#2c4937;border-radius:7px;font-size:19px}#chatPrivacy{font-size:9px;color:#9cac95;margin:7px 14px 11px}.action-dock{position:absolute;left:50%;bottom:29px;transform:translateX(-50%);display:flex;align-items:center;padding:7px 10px;gap:2px;background:#fcfaf1f2;border:1px solid #fff8e8;border-radius:18px;box-shadow:0 5px 35px #263a2c20;backdrop-filter:blur(12px);pointer-events:auto}.action-dock button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:0;background:none;min-width:62px;height:56px;border-radius:11px;color:#4b5d47}.action-dock button:hover,.action-dock button.active{background:#e7ebdf}.action-dock button span{font-size:22px;line-height:1}.action-dock button small{font-size:10px}.action-dock i{width:1px;height:28px;background:#cbd2c1;margin:0 7px}.action-dock button:last-child{min-width:75px}.bottom-hint{position:absolute;bottom:7px;left:50%;transform:translateX(-50%);font-size:9px;color:#3b563ee0;white-space:nowrap;text-shadow:0 1px 4px #fff}.bottom-hint span{padding:0 7px}kbd{font-family:inherit;font-size:9px}.camera-reset{position:absolute;bottom:30px;right:24px;background:#fcfaf1e6;color:#506348;border:1px solid #fff6dd;border-radius:20px;padding:11px 15px;font-size:15px}.camera-reset span{font-size:10px;vertical-align:middle;margin-left:4px}#connectionBar{position:absolute;top:84px;left:50%;transform:translateX(-50%);background:#f4d9a4;color:#654b27;padding:10px 18px;border-radius:9px;font-size:12px;pointer-events:auto;max-width:90vw}.nameplate{position:absolute;top:0;left:0;will-change:transform;text-align:center;white-space:nowrap;transform-origin:bottom center}.nameplate .name{display:inline-flex;gap:6px;align-items:center;padding:4px 9px;border-radius:7px;background:#263d32d9;color:#fff7e9;border:1px solid #ffffff35;box-shadow:0 2px 7px #132a241f;font-size:11px}.nameplate.self .name{background:#fff9e8ed;color:#365139;border-color:#f1d199}.nameplate .me{font-size:8px;color:#9b773a}.nameplate .bubble{max-width:230px;white-space:normal;overflow-wrap:anywhere;margin:0 auto 8px;padding:9px 13px;background:#fffdf3;color:#3b4b38;border-radius:12px;line-height:1.5;font-size:12px;box-shadow:0 3px 15px #253e2520}.nameplate .bubble:empty{display:none}.nameplate.disconnected{opacity:.5}#toast{position:fixed;top:100px;left:50%;transform:translateX(-50%);z-index:80;background:#263f33f2;color:#fff8e6;border:1px solid #edce94;border-radius:11px;padding:12px 21px;font-size:12px;line-height:1.6;max-width:min(90vw,480px);box-shadow:0 6px 30px #263e2520;text-align:center}#interactionHint{position:absolute;top:70%;left:50%;transform:translateX(-50%);border-radius:22px;background:#fff9e9e8;padding:9px 16px;color:#3c543c;font-size:11px}dialog{width:min(520px,calc(100vw - 30px));max-height:calc(100dvh - 50px);overflow:auto;border:1px solid #e4dfcc;border-radius:20px;background:#faf8f0;color:var(--ink);padding:36px;box-shadow:0 20px 100px #0b251e40}dialog::backdrop{background:#142c2770;backdrop-filter:blur(5px)}dialog h2{font-family:Georgia,'Batang',serif;font-size:27px;letter-spacing:-1px;font-weight:500;margin:12px 0 14px}.dialog-close{position:absolute;top:12px;right:15px;width:32px;height:32px;background:none;border:0;font-size:25px;color:#6f806c}.dialog-intro{color:#7d8a74;font-size:12px;line-height:1.9;margin-bottom:24px}.help-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 20px}.help-grid b{font-size:12px;color:#466a47}.help-grid p{font-size:11px;line-height:1.9;color:#7d8975}.primary-button,.secondary-button{width:100%;border:0;border-radius:10px;min-height:44px;padding:12px;background:var(--green);color:#fff7e5;font-size:12px;margin-top:12px}.secondary-button{border:1px solid #c9d2c0;background:none;color:#466047}.soft-note{font-size:10px;line-height:1.9;color:#8b967e;background:#eeeede;border-radius:10px;padding:12px;margin:18px 0 0}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:17px 0;border-bottom:1px solid #e2e5d7;font-size:13px}.setting-row small{display:block;color:#8e9a81;font-size:10px;margin-top:7px}.setting-row select{padding:8px 10px;border-radius:8px;background:#fffdf7;border:1px solid #cbd3c0;color:#466047;font-size:12px}.setting-row input{width:18px;height:18px;accent-color:var(--green)}.person-row{display:flex;align-items:center;gap:14px;padding:10px 0;border-bottom:1px solid #e0e6d6}.person-row img{width:40px;height:48px;object-fit:contain;background:#e7ebdf;border-radius:8px}.person-row>span{font-size:13px;flex:1}.person-row small{display:block;color:#8c987f;font-size:10px;margin-top:4px}.person-row button{background:none;border:1px solid #c0d0b5;border-radius:8px;padding:7px 10px;color:#44613e;font-size:10px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}#joystick,.touch-jump{display:none}
@media(max-height:780px) and (min-width:701px){.lobby-brand{top:20px}.lobby-card{margin-top:83px;margin-bottom:40px}h1{font-size:34px;margin:12px 0 10px}.intro{margin:10px 0 16px}.avatar-image{height:120px}.avatar-image img{height:140px}.avatar-options{margin-bottom:16px}.avatar-caption{padding:9px 12px}.lobby-note{margin-top:12px}.lobby-footer{bottom:12px}}
@media(max-width:900px){.chat-panel{width:280px}.action-dock{left:auto;right:22px;transform:none}.bottom-hint{left:auto;right:24px;transform:none}.camera-reset{bottom:114px}.lobby-card{margin-left:6%}.lobby-scene-caption{right:4%;bottom:11%}.lobby-scene-caption strong{font-size:19px}}
@media(max-width:700px){#lobby{background:linear-gradient(#eff1e9ef,#eff1e9f5);padding-bottom:30px}.lobby-brand{position:relative;top:auto;left:auto;margin:22px 24px;font-size:18px}.lobby-brand small{display:none}.lobby-card{margin:34px auto 25px;width:min(350px,calc(100vw - 44px))}h1{font-size:35px;margin-top:16px}.intro{font-size:12px;margin-bottom:18px}.avatar-image{height:134px}.avatar-image img{height:153px}.avatar-options{margin-bottom:19px}.lobby-scene-caption{display:none}.lobby-footer{position:relative;bottom:auto;left:auto;text-align:center;font-size:9px}.topbar{top:12px;left:12px;right:12px;gap:5px}.location-pill{height:45px;padding:0 10px;gap:7px;border-radius:11px}.location-pill img{width:15px;height:23px}.location-pill strong{font-size:13px}.location-pill .divider{margin:0 1px}.location-pill>span:not(.divider){font-size:10px}.location-dot{display:none}.top-actions{gap:5px}.pill{padding:0 9px;min-height:36px;font-size:10px}.people-icon{display:none}.circle-button{height:34px;width:34px;font-size:17px}.welcome-tip{top:73px;left:12px;max-width:calc(100vw - 24px);padding:12px 32px 12px 12px;gap:10px}.welcome-tip strong{font-size:11px}.welcome-tip p{font-size:10px;margin-top:4px}.tip-icon{font-size:22px}.chat-panel{left:12px;bottom:179px;width:min(290px,calc(100vw - 24px))}.chat-heading{padding:11px 13px;font-size:11px}.chat-heading>small{font-size:8px}#messages{height:110px}.chat-line{font-size:11px}.action-dock{bottom:19px;left:50%;right:auto;transform:translateX(-50%);padding:5px 7px;border-radius:15px;gap:0}.action-dock button{min-width:49px;height:47px;gap:3px}.action-dock button span{font-size:20px}.action-dock button small{font-size:9px}.action-dock button:last-child{min-width:60px}.action-dock i{margin:0 3px;height:22px}.bottom-hint{display:none}#joystick{display:block;position:absolute;left:24px;bottom:86px;width:88px;height:88px;border-radius:50%;border:1px solid #fff4d780;background:#f5f6e74f;backdrop-filter:blur(5px);touch-action:none;pointer-events:auto}#joystickKnob{position:absolute;width:40px;height:40px;top:23px;left:23px;border-radius:50%;background:#284a3bc7;border:1px solid #eee3c5;pointer-events:none}.touch-jump{display:flex;flex-direction:column;justify-content:center;align-items:center;position:absolute;right:25px;bottom:99px;width:57px;height:57px;border-radius:50%;background:#f9f6e9cc;border:1px solid #fff4d7;color:#3c5a40;font-size:27px}.touch-jump small{font-size:9px}.camera-reset{bottom:169px;right:24px;padding:8px 10px;font-size:17px}.camera-reset span{display:none}dialog{padding:28px 22px}dialog h2{font-size:24px}.help-grid{gap:10px 14px}.help-grid p{font-size:10px}#connectionBar{top:65px;font-size:10px}.nameplate .name{font-size:10px;padding:3px 7px}.nameplate .bubble{font-size:11px;max-width:180px}}
.avatar-card input{z-index:2;cursor:pointer}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
/* Explicit seat selection, shared by mouse, keyboard and touch. */
.avatar-study-link{display:inline-block;margin:-8px 0 18px;color:#647e50;font-size:11px;text-underline-offset:4px}
.character-link{display:block;padding:14px 12px;margin-top:12px;border:1px solid #c9d2c0;border-radius:10px;text-align:center;font-size:12px;color:#466047;text-decoration:none}
.run-toggle{position:absolute;bottom:83px;right:24px;background:#fcfaf1ed;color:#496448;border:1px solid #fff7dc;border-radius:22px;padding:10px 15px;font-size:13px}.run-toggle[aria-pressed=true]{background:#365d43;color:#fff8e7;border-color:#dfc486}@media(max-width:700px){.run-toggle{bottom:230px;right:22px;padding:9px 12px}.action-dock button{min-width:43px}.action-dock button:last-child{min-width:58px}}
#seatGuide{position:absolute;top:90px;left:50%;transform:translateX(-50%);border:1px solid #d6ddc8;background:#fffbedee;color:#34553b;padding:11px 20px;border-radius:13px;text-align:center;box-shadow:0 4px 18px #18332618;pointer-events:none;max-width:90vw;width:max-content}#seatGuide strong{display:block;font-size:13px}#seatGuide span{display:block;font-size:10px;color:#6c7d61;margin-top:5px}@media(max-width:700px){#seatGuide{top:68px;padding:9px 12px}#seatGuide strong{font-size:11px}#seatGuide span{font-size:9px}}
#seatDialog{width:min(680px,calc(100vw - 24px))}.seat-stage{padding:11px;text-align:center;background:#e3e8da;color:#466047;border-radius:8px;font-size:12px;margin-bottom:18px}.seat-map-row{display:grid;grid-template-columns:28px repeat(3,minmax(0,1fr)) 18px repeat(3,minmax(0,1fr));gap:6px;margin:8px 0;align-items:center}.seat-row-label{font-size:11px;color:#78866c}.seat-aisle{height:48px;border-left:1px dashed #c2cdb9;justify-self:center}.seat-map-button{border:1px solid #b4c6a6;background:#e7efde;border-radius:8px;min-height:51px;padding:7px 3px;color:#395738;overflow:hidden}.seat-map-button strong{display:block;font-size:11px;font-weight:600}.seat-map-button small{display:block;margin-top:5px;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.seat-map-button:hover:not(:disabled){background:#f6dfaa;border-color:#c69c4d}.seat-map-button.occupied{background:#e2e3df;border-color:#c9cdc5;color:#879080;opacity:1;cursor:not-allowed}.seat-map-button.own{background:#e3daed;border-color:#b9a7cd;color:#6a5482;opacity:1;cursor:default}.seat-map-button.selected{background:#f6dfaa;border-color:#c69c4d}.garden-seat-heading{font-size:12px;margin:24px 0 10px;color:#50694b}#gardenSeatMap{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}#interactionHint{max-width:90vw;text-align:center;line-height:1.6;pointer-events:none}#toast{width:max-content}
@media(max-width:700px){#seatDialog{padding:28px 16px}#seatDialog h2{font-size:21px}.seat-map-row{grid-template-columns:22px repeat(3,minmax(0,1fr)) 10px repeat(3,minmax(0,1fr));gap:4px}.seat-map-button{min-height:49px;padding:6px 2px}.seat-map-button strong{font-size:9px}.seat-map-button small{font-size:8px}.seat-row-label{font-size:10px}#nickname,#chatInput{font-size:16px}}

.motion-controls{position:absolute;right:24px;bottom:83px;display:flex;flex-direction:column;gap:8px;pointer-events:auto}
.motion-controls .run-toggle,.motion-controls .touch-jump,.motion-controls .hop-toggle{position:static;display:flex;align-items:center;justify-content:center;gap:7px;width:128px;height:42px;border-radius:22px;background:#fcfaf1ed;color:#496448;border:1px solid #fff7dc;padding:8px 12px;font-size:15px;touch-action:none;user-select:none}
.motion-controls button span{font-size:11px}
.motion-controls button[aria-pressed=true]{background:#365d43;color:#fff8e7;border-color:#dfc486}
@media(min-width:701px) and (max-width:900px){.motion-controls{bottom:112px}.camera-reset{bottom:266px}}
@media(max-width:700px){.motion-controls{right:16px;bottom:104px;gap:7px}.motion-controls .run-toggle,.motion-controls .touch-jump,.motion-controls .hop-toggle{width:111px;height:38px;padding:7px 10px}.camera-reset{bottom:245px;right:22px}.bottom-hint{display:none}}

.handshake-panel{position:absolute;top:95px;right:24px;width:310px;max-width:calc(100vw - 32px);display:flex;gap:12px;padding:17px;background:#fffbedf5;border:1px solid #e4d4ad;border-radius:15px;color:#304f3b;box-shadow:0 8px 30px #233a3025;pointer-events:auto;z-index:4}
.handshake-icon{font-size:29px}.handshake-panel>div{min-width:0;flex:1}.handshake-panel strong{display:block;font-size:14px;line-height:1.6;overflow-wrap:anywhere}.handshake-panel p{font-size:11px;color:#68785b;line-height:1.75;margin:7px 0 13px;white-space:pre-line}.handshake-buttons{display:flex;gap:7px;flex-wrap:wrap}.handshake-buttons button{min-height:38px;padding:8px 13px;border-radius:9px;border:1px solid #aaba9d;background:#fffdf5;color:#466047;font-size:12px}#handshakeAccept{background:#365d43;color:#fff9e8;border-color:#365d43}#handshakeButton{margin-bottom:12px}
@media(max-width:700px){.handshake-panel{top:89px;left:16px;right:16px;width:auto;padding:13px}.handshake-panel strong{font-size:13px}.handshake-panel p{font-size:11px}}

/* Village hub: a stable four-button dock, with contextual drawers above it. */
#villageDock{position:absolute;bottom:26px;left:50%;transform:translateX(-50%);display:flex;background:#1e342ef2;border:1px solid #81978388;box-shadow:0 8px 25px #101e2445;border-radius:24px;padding:7px 10px;pointer-events:auto;backdrop-filter:blur(12px);z-index:5}
#villageDock button{width:88px;min-height:64px;background:transparent;border:0;border-radius:17px;color:#f6f0dc;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;font-size:13px}
#villageDock button>span{font-size:25px;line-height:1.1}#villageDock button[aria-expanded=true]{background:#ffffff15;color:#f4d38d}#villageDock button:hover{background:#ffffff20}
.destination-context{position:absolute;left:50%;bottom:112px;transform:translateX(-50%);display:flex;align-items:center;flex-direction:column;gap:7px;pointer-events:auto;z-index:3;max-width:90vw}
.travel-cta{border:1px solid #f9df9b;background:#edc87e;color:#293c2e;min-height:47px;min-width:245px;padding:10px 22px;border-radius:24px;font-weight:700;box-shadow:0 5px 20px #26342d30;display:flex;gap:16px;align-items:center;justify-content:center}.travel-cta.travelling{background:#fff8e6}.context-tools{display:flex;gap:8px;justify-content:center}.context-tools button{border:1px solid #d6dfc8;background:#fffaf0eb;color:#3b5946;padding:7px 13px;border-radius:16px;min-height:34px;font-size:12px}
.hud-drawer{position:absolute;bottom:221px;left:50%;transform:translateX(-50%);width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 330px);overflow:auto;background:#fcf8edf5;border:1px solid #eadcb6;border-radius:21px;padding:15px;pointer-events:auto;box-shadow:0 12px 40px #1c352d40;z-index:6;backdrop-filter:blur(14px)}
.drawer-title{display:flex;align-items:center;justify-content:space-between;font-size:15px;color:#35533f;margin-bottom:10px}.drawer-title button{border:0;background:#e8eadc;color:#3e5947;border-radius:50%;width:30px;height:30px;font-size:20px}.hud-drawer .action-dock{position:static;transform:none;display:grid;grid-template-columns:repeat(5,1fr);gap:4px;background:transparent;border:0;box-shadow:none;padding:0;width:auto}.hud-drawer .action-dock button{width:auto;min-height:68px;padding:6px;color:#3e5947}.hud-drawer .action-dock button.active{background:#e2e9d6;border-radius:12px}.hud-drawer .motion-controls{position:static;display:grid;grid-template-columns:repeat(3,1fr);margin-top:12px;gap:7px}.hud-drawer .motion-controls button{width:auto;min-height:43px;height:auto;font-size:18px;padding:8px 6px}.hud-drawer .motion-controls button span{font-size:11px}
#drawerNote{font-size:12px;line-height:1.7;color:#6a7e68;margin:0 0 12px}.community-card{border:1px solid #d7decb;background:#fffdf5;border-radius:13px;padding:13px;margin-top:9px;display:flex;gap:12px;align-items:center}.community-card>div{flex:1;min-width:0}.community-card strong{font-size:14px;display:block;color:#35533f}.community-card small{display:block;font-size:11px;line-height:1.7;color:#78836b;margin-top:5px}.community-card button{border:0;border-radius:12px;background:#365f45;color:#fff7dd;padding:10px 12px;min-height:42px;font-size:12px;flex-shrink:0}.community-card button:disabled{cursor:default}.room-seat-map{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.chat-panel{bottom:28px;max-height:calc(100dvh - 130px)}#messages{max-height:32vh}.bottom-hint{bottom:5px}.camera-reset{bottom:28px}.welcome-tip{max-width:310px}#toast{bottom:220px;z-index:40;max-width:calc(100vw - 32px)}#interactionHint{bottom:218px}#seatGuide{top:95px;max-width:calc(100vw - 32px)}
@media(max-width:1100px){.chat-panel{bottom:206px;max-width:300px;max-height:calc(100dvh - 305px)}#messages{height:180px;max-height:24vh}.camera-reset{right:16px;bottom:32px}}
@media(max-width:700px){#villageDock{bottom:max(14px,env(safe-area-inset-bottom));padding:5px 7px;border-radius:22px}#villageDock button{width:73px;min-height:57px;font-size:12px}#villageDock button>span{font-size:22px}.destination-context{bottom:98px}.travel-cta{min-height:43px;min-width:230px;font-size:13px}.context-tools button{min-height:32px;padding:6px 11px;font-size:11px}.hud-drawer{bottom:202px;max-height:calc(100dvh - 310px);padding:13px}.chat-panel{left:12px;right:12px;width:auto;max-width:none;bottom:204px;max-height:calc(100dvh - 310px)}#messages{height:150px;max-height:23vh}.camera-reset{right:14px;bottom:150px;font-size:11px;padding:8px;min-width:0}#cameraReset span{display:none}#joystick{bottom:103px;left:14px;width:74px;height:74px}#interactionHint,#toast{bottom:204px}.welcome-tip{top:86px;left:12px;max-width:280px}.topbar{left:12px;right:12px;top:14px}.location-pill{padding:12px;font-size:11px}.location-pill strong{font-size:12px}.top-actions{gap:5px}.top-actions .pill{font-size:11px;padding:9px}.top-actions .circle-button{width:34px;height:34px}.location-pill .divider,.location-dot{display:none}#seatGuide{top:83px;padding:10px 14px;font-size:11px}.handshake-panel{top:145px;z-index:8}}
@media(max-width:380px){#villageDock button{width:65px}.location-pill img{display:none}.top-actions .pill .people-icon{display:none}.location-pill{gap:7px}}

#toast,#interactionHint{top:auto;height:auto}#toast{pointer-events:none}#joystickKnob{top:50%;left:50%;margin:-20px 0 0 -20px}

.hud-drawer .action-dock button small{font-size:12px}@media(max-width:700px){#joystick{width:64px;height:64px;left:12px}.context-tools{gap:5px}.context-tools button{font-size:10px;padding:6px 8px}}

#villageDock svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.seat-map-shortcut{display:block;width:100%;border:0;border-top:1px solid #d8decb;color:#526a53;background:transparent;margin-top:10px;padding:12px 4px 3px;font-size:12px}

.place-actions{position:absolute;top:98px;left:24px;width:192px;padding:15px;background:#233e35ed;color:#fff5df;border:1px solid #a8b79580;border-radius:18px;pointer-events:auto;z-index:5;box-shadow:0 6px 24px #15251e30}.place-actions>strong{font-size:15px}.place-actions p{font-size:11px;line-height:1.65;color:#c6d1bd;margin:7px 0 11px}.place-actions button{display:block;width:100%;min-height:42px;border-radius:11px;margin-top:7px;padding:9px;border:1px solid #acb89777;color:#fff7e4;background:#ffffff10;font-size:13px;text-align:left}.place-actions button:hover{background:#ffffff23}.place-actions button[aria-pressed=true]{background:#e6c579;color:#2e4a36}.place-actions button:disabled{opacity:.5;cursor:default}
.activity-panel{position:absolute;top:170px;right:24px;width:340px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 320px);overflow:auto;padding:19px;background:#fff9eaf5;border:1px solid #dbcba4;border-radius:18px;pointer-events:auto;z-index:7;box-shadow:0 8px 28px #18392c40}.activity-panel p{font-size:15px;line-height:2;word-break:keep-all}.activity-panel small{font-size:12px;line-height:1.8;color:#657452}.book-pages{display:flex;justify-content:space-between;align-items:center;gap:9px;margin-top:20px;font-size:12px}.book-pages button{min-height:38px;border:1px solid #c0cdb2;border-radius:10px;background:#f1efdf;color:#36533d;padding:7px 12px}#paintPanel p{font-size:12px;line-height:1.7}#paintCanvas{display:block;width:100%;height:auto;border:1px solid #ccc3a4;border-radius:8px;background:#fffdf1;touch-action:none}#paintColors{display:flex;gap:8px;margin:13px 0}#paintColors button{width:32px;height:32px;border:2px solid #fff5df;border-radius:50%}#paintColors button[aria-pressed=true]{outline:2px solid #3a5a40;outline-offset:2px}#tableTalkButton{margin-bottom:12px}.table-talk-panel{top:95px;right:24px;z-index:10}#seatGuide{left:auto;right:24px;transform:none;max-width:285px}.top-actions #soundToggle[aria-pressed=false]{opacity:.6}.nameplate .name{pointer-events:none}
@media(max-width:700px){.place-actions{left:12px;top:82px;width:144px;padding:11px}.place-actions>strong{font-size:12px}.place-actions p{font-size:10px;margin:6px 0}.place-actions button{min-height:36px;font-size:11px;padding:7px}.activity-panel{left:12px;right:12px;top:auto;bottom:205px;width:auto;max-height:50dvh;padding:15px}.activity-panel p{font-size:14px;line-height:1.8}.table-talk-panel{top:245px;left:12px;right:12px;width:auto}#seatGuide{right:12px;top:85px;max-width:190px;width:calc(100vw - 180px);padding:9px;font-size:10px}#seatGuide strong{font-size:10px}#seatGuide span{font-size:9px}.top-actions{gap:4px}.top-actions .pill{padding:7px;font-size:10px}.top-actions .circle-button{width:30px;height:32px}.location-pill{gap:5px;padding:0 9px}.location-pill strong{font-size:11px}.location-pill img{width:12px}.location-pill>span:not(.divider){font-size:9px}}

/* Movement controls live at an edge; compact screens reserve a separate HUD area. */
#actionTray{left:auto;right:20px;bottom:106px;transform:none;width:220px;max-height:calc(100dvh - 204px);padding:13px;border-radius:17px}
#actionTray .action-dock{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}#actionTray .action-dock button{min-width:0;min-height:58px;height:auto;padding:5px 2px}#actionTray .action-dock button:last-child{min-width:0}#actionTray .motion-controls{grid-template-columns:1fr;gap:6px;margin-top:10px}#actionTray .motion-controls button{min-height:37px;flex-direction:row;gap:7px}#actionTray .drawer-title{font-size:13px}#actionTray .seat-map-shortcut{margin-top:7px;padding-top:10px}
body.movement-open .activity-panel{display:none!important}
@media(max-width:1100px),(max-aspect-ratio:5/4){
 body.movement-open .place-actions,body.movement-open .chat-panel,body.movement-open .welcome-tip,body.movement-open #seatGuide{display:none!important}
}
@media(max-width:1100px) and (min-aspect-ratio:5/4){
 #actionTray{right:12px;width:218px;bottom:96px;max-height:calc(100dvh - 180px);padding:10px}
 body.movement-open{background:#1e342e}body.movement-open #world{top:76px;right:auto;bottom:auto;width:calc(100% - 242px);height:calc(100% - 170px)}
 body.movement-open #nameplates{clip-path:inset(76px 242px 94px 0)}
 body.movement-open #villageDock{bottom:14px}body.movement-open .destination-context{left:auto;right:12px;bottom:calc(104px + var(--movement-menu-height,160px));transform:none;max-width:218px}body.movement-open .travel-cta{display:none}
}
@media(max-aspect-ratio:5/4){
 #actionTray{left:50%;right:auto;transform:translateX(-50%);width:min(520px,calc(100% - 24px));bottom:94px;max-height:calc(100dvh - 200px);padding:9px 10px;border-radius:15px}
 #actionTray .drawer-title{margin-bottom:5px;font-size:12px}#actionTray .drawer-title button{width:26px;height:26px;font-size:18px}
 #actionTray .action-dock{grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}#actionTray .action-dock button{min-height:45px;padding:3px 1px}#actionTray .action-dock button span{font-size:21px}#actionTray .action-dock button small{font-size:10px}
 #actionTray .motion-controls{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:5px;gap:5px}#actionTray .motion-controls button{min-height:35px;padding:5px 3px;font-size:15px}#actionTray .motion-controls button span{font-size:10px}#actionTray .seat-map-shortcut{display:none}
 body.movement-open{background:#1e342e}body.movement-open #world{top:76px;right:auto;bottom:auto;width:100%;height:calc(100% - 76px - var(--movement-reserve,240px))}
 body.movement-open #nameplates{clip-path:inset(76px 0 var(--movement-reserve,240px) 0)}
 body.movement-open .destination-context{bottom:calc(102px + var(--movement-menu-height,130px));left:50%;right:auto;transform:translateX(-50%)}body.movement-open .travel-cta{display:none}
}

@media(max-width:1100px) and (min-aspect-ratio:5/4){
 #actionTray .action-dock button{min-height:43px}#actionTray .motion-controls{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-top:5px}#actionTray .motion-controls button{flex-direction:column;gap:2px;min-height:38px;padding:4px 1px;font-size:15px}#actionTray .motion-controls button span{font-size:9px}#actionTray .seat-map-shortcut{display:none}
}

/* Crisp screen-space seat labels share one exact visual/click rectangle. */
#seatBadges{position:absolute;inset:0;pointer-events:none;z-index:4;overflow:hidden}
#seatBadges .seat-badge{position:absolute;left:0;top:0;width:92px;height:36px;padding:3px 4px;border:2px solid #fff8e4;border-radius:9px;background:#316345;color:#fffbed;font-size:16px;font-weight:700;line-height:1;white-space:nowrap;box-shadow:0 2px 5px #18352830;pointer-events:auto;will-change:transform}
#seatBadges .seat-badge:hover,#seatBadges .seat-badge[data-state=hover],#seatBadges .seat-badge[data-state=selected]{background:#93651d}
#seatBadges .seat-badge:disabled{background:#747c75;opacity:1;cursor:not-allowed}
body:has(#lobby:not([hidden])) #seatBadges{display:none}

/* Stage labels distinguish local actors from visiting members. */
.stage-bot-nameplate{pointer-events:none}
.stage-bot-nameplate .name{font-size:13px;border:1px solid #c9b38b;background:#f6edda;color:#4c4053}

/* Worship controls stay in the left margin; the avatar and centre aisle stay clear. */
#worshipPanel{position:absolute;left:24px;top:94px;width:280px;color:#f5f1dd;background:#203f34ee;border:1px solid #a6b99c55;border-radius:16px;pointer-events:auto;box-shadow:0 8px 24px #12261b25;overflow:hidden;z-index:6}
#worshipExpand{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;padding:14px;border:0;background:none;color:inherit;cursor:pointer}#worshipExpand small{display:block;color:#d7c591;font-size:11px;margin-bottom:5px}#worshipExpand strong{font-size:15px;line-height:1.4}#worshipExpand b{font:600 18px ui-monospace,monospace;color:#f4d082}
.worship-body{padding:0 14px 14px;max-height:calc(100vh - 260px);overflow-y:auto;overscroll-behavior:contain}.worship-body p{font-size:13px;line-height:1.65;margin:8px 0}.worship-body small{font-size:11px;line-height:1.5;color:#ced6c3}.worship-body strong{font-size:14px}.worship-main-actions,.worship-offer-buttons{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0}
.worship-body button{min-height:40px;padding:8px 10px;border:1px solid #d5ddbb66;border-radius:10px;background:#f5ebca;color:#314f3b;font-size:13px;font-weight:600;cursor:pointer}.worship-body button:disabled{opacity:.45;cursor:default}#worshipJoin{flex:1}#worshipGreeting,#worshipVerse,#worshipOffering{border-top:1px solid #b3c69b55;padding-top:12px;margin-top:12px}#worshipCaption{border-left:3px solid #e4c47c;padding:4px 0 4px 11px;margin:14px 0 9px}#worshipCaption p{margin:5px 0}#worshipSpeaker{color:#f0d487}.worship-test-note{color:#e0cda7;font-size:11px!important}.worship-offer-buttons button{flex:1 0 40%}#worshipOfferingResult{display:block;margin-top:8px}#worshipFreeCredits{width:100%}.collapsed .worship-body{display:none}.worship-visible #placeActions{display:none}.movement-open #worshipPanel{display:none}
body:has(#chatPanel:not([hidden])) #worshipPanel .worship-body{max-height:calc(100vh - 550px)}
@media(max-width:700px){#worshipPanel{left:12px;top:73px;width:min(270px,calc(100vw - 24px))}#worshipExpand{padding:9px 12px}#worshipExpand strong{font-size:13px}#worshipExpand small{font-size:10px}.worship-body{max-height:28vh;padding:0 12px 12px}.worship-body p{font-size:12px}.worship-body button{font-size:12px;min-height:40px}body:has(#chatPanel:not([hidden])) #worshipPanel .worship-body{max-height:20vh}}

@media(max-width:700px){body.worship-mobile-open #world{height:calc(100% - min(280px,30vh) - 176px)}body.worship-mobile-open #worshipPanel{top:auto;bottom:104px;width:calc(100vw - 24px)}body.worship-mobile-open #worshipExpand{height:60px}body.worship-mobile-open #worshipPanel .worship-body{height:min(280px,30vh);max-height:min(280px,30vh)!important}}

/* Persistent HUD must not blur the moving WebGL scene on every frame. */
.location-pill,.pill,.circle-button,.chat-panel,#villageDock{backdrop-filter:none;background:#203b32f5}
.hud-drawer{backdrop-filter:none;background:#fcf8ed;color:#294d3e}
#actionTray .drawer-title,#actionTray .action-dock button,#actionTray .action-dock button small{color:#294d3e;opacity:1}
#movementSing{width:100%;min-height:42px;margin-top:10px;border:1px solid #b9c8ad;border-radius:10px;background:#ecf0df;color:#294d3e;font-weight:700}
#movementSing[aria-pressed=true]{background:#294d3e;color:#fff9e8}
.welcome-tip,.action-dock{backdrop-filter:none;background:#f6f2e8fa}
#joystick{backdrop-filter:none}

@media(max-width:700px){#peopleButton{position:relative}#botCount{position:absolute;right:0;top:calc(100% + 5px);white-space:nowrap;border:1px solid #78917d;border-radius:10px;padding:4px 8px;background:#203b32;color:#fff8e7;font-size:10px}}

#worshipToggleText{white-space:nowrap;font-size:11px;font-weight:700;color:#f4d082}#worshipExpand{gap:7px}#worshipExpand>span:first-child{flex:1}#worshipPanel.collapsed .worship-body{display:none}#worshipPanel.collapsed{height:auto}

.welcome-tip{z-index:9}
