:root{--ui-radius:4px;--ui-border:#b7c0b0}
/* Portrait phone first; desktop grows the same court without stretching it. */
html,body.mobile3d{background:#e8e5df;color:#293e3c}
.mobile3d #stage{width:100vw;height:100dvh;min-height:180px;background:#f5f1e8;box-shadow:0 0 70px #283b3520}
@media(min-width:761px){.mobile3d #stage{width:min(100vw,82dvh)}}
#court3d{position:absolute;left:0;top:52px;width:100%;height:calc(100% - 124px);pointer-events:none}
.mobile3d #game{position:absolute;inset:0;z-index:1}
.mobile3d.three-ready #game{opacity:0}
.mobile3d #hud{z-index:2}
#clubHeader{position:absolute;top:env(safe-area-inset-top,0px);left:0;right:0;height:52px;padding:4px 14px;display:flex;align-items:center;justify-content:space-between;background:#f5f1e8;z-index:3;pointer-events:none}
#clubHeader img{width:58px;height:36px;object-fit:contain;filter:brightness(0) saturate(100%);opacity:.8}
#clubHeader .club-title{font-size:12px;font-weight:800;letter-spacing:2px;color:#344844}
#clubHeader .club-title small{display:none}
#clubHeader button{pointer-events:auto;width:46px;height:46px;border:1px solid #d8ddd2;border-radius:50%;background:#f5f1e8;color:#324943;cursor:pointer;font-size:19px}
.mobile3d #deck{background:#f5f1e8;border-top:1px solid #d4dcd0;height:calc(72px + env(safe-area-inset-bottom,0px))}
.mobile3d #scoreboard{bottom:calc(26px + env(safe-area-inset-bottom,0px));color:#283c36;gap:12px}
.mobile3d #scoreboard .num{background:transparent;box-shadow:none;color:#a9475c;font-size:31px;padding:0 2px;min-width:30px}
.mobile3d #scoreboard .num::after{display:none}
.mobile3d #srvB{border-left-color:#a9475c}.mobile3d #srvT{border-right-color:#a9475c}
.mobile3d #hint{top:auto!important;bottom:calc(54px + env(safe-area-inset-bottom,0px));max-width:94%;white-space:normal;width:max-content;background:transparent;color:#344a41;font-size:11px;padding:0;border-radius:0;animation:none;border:0;text-align:center}
.mobile3d #hintTip{display:none}
.mobile3d #mute{z-index:4;bottom:calc(23px + env(safe-area-inset-bottom,0px));color:#344a41;background:transparent;min-width:44px;min-height:44px}
#inputGuide{position:absolute;bottom:calc(7px + env(safe-area-inset-bottom,0px));width:100%;text-align:center;font-size:11px;letter-spacing:1px;color:#63796d;pointer-events:none;z-index:3}
#inputGuide .keyboard{display:none}
/* Opaque thumb space beneath the court; controls sit at its lower edge. */
@media(max-width:600px) and (min-aspect-ratio:1/3) and (max-aspect-ratio:5/6){
  .mobile3d #deck{display:block;height:calc(var(--thumb-space,52px) + env(safe-area-inset-bottom,0px));background:#f5f1e8;border-top:1px solid #d4dcd0;pointer-events:none}
  .mobile3d #clubHeader{height:44px;top:auto;bottom:calc(8px + env(safe-area-inset-bottom,0px));padding:0 10px;background:transparent;justify-content:flex-end}
  .mobile3d #clubHeader img,.mobile3d #clubHeader .yonshinWordmark,.mobile3d #clubHeader .club-title{display:none}
  .mobile3d #clubHeader button{width:44px;height:44px;background:#f5f1e8df}
  .mobile3d #scoreboard{top:auto;bottom:calc(8px + env(safe-area-inset-bottom,0px));height:44px;gap:8px;background:#f5f1e8df;border-radius:var(--ui-radius);padding:0 14px;width:max-content;margin-inline:auto}
  .mobile3d #scoreboard .num{font-size:23px;min-width:22px}
  .mobile3d #scoreboard .lbl{font-size:11px}
  .mobile3d #mute{top:auto;bottom:calc(8px + env(safe-area-inset-bottom,0px));left:10px;right:auto;width:44px;height:44px;background:#f5f1e8df;border-radius:50%}
  .mobile3d #hint{bottom:calc(54px + env(safe-area-inset-bottom,0px));font-size:12px;background:#f5f1e8d9;border-radius:var(--ui-radius);padding:4px 10px}
  .mobile3d #inputGuide{display:none}
}
@media(pointer:fine){#inputGuide .keyboard{display:inline}#inputGuide .touch{display:none}}
.mobile3d #menu{padding:95px 22px 28px;justify-content:flex-start;background:linear-gradient(#f5f1e8 0%,#f5f1e8ed 12%,#f5f1e800 24%,#f5f1e800 65%,#f5f1e8f8 85%);color:#2c433b;gap:4px;pointer-events:auto}
.mobile3d #menuBall,.mobile3d #menuMore{display:none}
.mobile3d #menuTitle{font-size:clamp(32px,8vw,43px);letter-spacing:5px;font-weight:900}
.mobile3d #menuSub{font-size:10px;letter-spacing:2px;margin-top:9px}
.mobile3d #menuBtns{margin-top:auto;width:100%;display:grid;grid-template-columns:1fr 1fr;gap:10px;pointer-events:auto}
.mobile3d .menuBtn{border-radius:var(--ui-radius);box-shadow:none;letter-spacing:0;font-size:14px;min-height:48px;border:1px solid var(--ui-border);background:#f5f1e8;color:#304d3c}
.mobile3d #mSolo{grid-column:1/-1;background:#304e41;color:#fff9ec;border:none;font-size:18px;min-height:58px;letter-spacing:3px}
.mobile3d #m2p,.mobile3d #mOnline{font-size:12px}
#venueNote{font-size:11px;letter-spacing:1px;line-height:1.8;margin:12px 0 0;color:#586d61}
.mobile3d #oppSel,.mobile3d #online{background:#f5f1e8;color:#304a3d}
.mobile3d #online{padding:calc(32px + env(safe-area-inset-top,0px)) 22px 24px;overflow-y:auto;justify-content:center}
.mobile3d #onlineTitle{font-size:25px;letter-spacing:2px;color:#304a3d}
.mobile3d #onlineHost,.mobile3d #onlineJoin{width:100%;max-width:330px}
.mobile3d #roomCode{color:#a33a59;font-size:30px;letter-spacing:4px;margin-bottom:14px}
.mobile3d #qrWrap{background:#fff;padding:12px;border:1px solid #deddd4;border-radius:var(--ui-radius);align-self:center}
.mobile3d #qrCode{width:210px;height:210px;max-width:65vw;max-height:65vw}
.mobile3d #qrHint{color:#344a41;font-size:12px;opacity:1;max-width:240px;white-space:normal;line-height:1.5}
.mobile3d #hostStatus,.mobile3d #joinStatus{color:#526858;font-size:14px;line-height:1.6;margin:10px 0}
.mobile3d #btnShareRoom{background:#304e41;color:#fff9ed;min-height:50px}
.mobile3d #online .linkBtn{color:#526858;min-height:44px}
.mobile3d #netHintTxt{font-size:11px;color:#6b7b6f;max-width:300px;line-height:1.6}
.mobile3d #joinInput{color:#304e41;border:1px solid #b9c7bd;background:#fffdf6;min-height:52px;font-size:20px;width:100%}
.mobile3d #oppTitle{color:#304a3d}
.mobile3d .oppCard{background:#e4e8de;color:#304a3d;border:1px solid #c2cebf;box-shadow:none}
.mobile3d #msg{top:44%;width:max-content;max-width:86%;padding:12px 22px;border-radius:var(--ui-radius);background:#f5f1e8f5;color:#304e41;text-shadow:none;pointer-events:none;box-shadow:0 4px 18px #152c2520}
.mobile3d #msgMain{color:#304e41!important;font-size:23px;letter-spacing:0}
.mobile3d #msgSub{font-size:14px;color:#5c6259}
.mobile3d #scoreboard .num.pop{animation:scoreLift .24s ease-out}
@keyframes scoreLift{50%{transform:translateY(-3px) scale(1.12)}100%{transform:none}}
@media(prefers-reduced-motion:reduce){.mobile3d #scoreboard .num.pop{animation:none}}
#load3d,#pause3d{position:absolute;inset:0;z-index:70;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;background:#f5f1e8;color:#304e41;text-align:center;padding:30px}
#load3d img{width:130px;filter:brightness(0);opacity:.8}
#load3d h1{font-size:22px;letter-spacing:4px;margin:10px 0}
#load3d p,#pause3d p{font-size:13px;line-height:1.8;color:#66796c}
#load3d a{color:#304e41;padding:14px}
#pause3d{background:#f5f1e8f5;z-index:60}
#pause3d[hidden],#load3d[hidden]{display:none}
#pause3d button{min-height:52px;width:220px;border:1px solid #c2cebf;border-radius:var(--ui-radius);background:#f5f1e8;color:#304e41;font:700 16px inherit;cursor:pointer}
#pause3d #resume3d{background:#304e41;color:#fff9ec}
#pause3d{overflow-y:auto;gap:12px}
#pause3d h2{margin:0}
#pause3d p{margin:0}
#controlHelp{max-width:290px;text-align:left;border-block:1px solid #d4dcd0;padding:14px 0}
#controlHelp strong{font-size:15px}
#controlHelp p{margin-top:8px;line-height:1.8}
#controlHelp .keyboardHelp{display:none}
@media(pointer:fine){#controlHelp .keyboardHelp{display:block}}
@media(max-height:600px){#pause3d{padding:16px}#controlHelp{padding:8px 0}#controlHelp p{font-size:12px}}
.mobile3d.mode2p #clubHeader{display:contents}
.mobile3d.mode2p #clubHeader>.yonshinWordmark,.mobile3d.mode2p #clubHeader>img,.mobile3d.mode2p #clubHeader .club-title,.mobile3d.mode2p #inputGuide{display:none}
.mobile3d.mode2p #pauseButton{position:absolute;left:6px;top:50%;transform:translateY(-50%);z-index:4;background:#f5f1e8}
.mobile3d.mode2p #deck{display:none}
.mobile3d.mode2p #scoreboard{bottom:auto;color:#fff9ee}
.mobile3d.mode2p #scoreboard .num{background:#f5f1e8;color:#344a41;font-size:22px;padding:1px 5px}
.mobile3d.mode2p #hint{bottom:auto;top:68%!important}
.mobile3d.mode2p #mute{top:50%;bottom:auto;background:#f5f1e8}
button:focus-visible,a:focus-visible{outline:3px solid #bb6070;outline-offset:4px}
@media(max-height:650px){.mobile3d #menu{padding-top:70px;padding-bottom:16px}.mobile3d #menuTitle{font-size:30px}.mobile3d #menuSub{margin-bottom:0}#venueNote{margin-top:4px}.mobile3d .menuBtn{min-height:44px}.mobile3d #mSolo{min-height:50px}}
@media(prefers-reduced-motion:reduce){.mobile3d *{animation:none!important;transition:none!important}}
#selectionDock{margin-top:auto;width:100%;background:#f5f1e8ed;border-radius:var(--ui-radius);padding:10px 8px}
#selectionDock .ownCharacterLabel{font-size:19px;line-height:1.4;margin-bottom:12px;color:#304e41}
#ownProfile{cursor:pointer;border-radius:var(--ui-radius);padding:6px;min-height:44px}
#ownProfile:focus-visible{outline:3px solid #bb6070;outline-offset:3px}
@media(hover:hover){#ownProfile:hover{background:#e6eadd}}
.characterProfile{display:flex;gap:16px;align-items:center;text-align:left;color:#304e41}
.characterProfile>div{flex:1;min-width:0}
.characterProfile h3{font-size:19px;margin:0 0 8px}
.characterProfile p{font-size:13px;line-height:1.7;margin:0 0 8px}
.characterProfile small{font-size:11px;color:#657365}
.profilePortrait{position:relative;display:block;width:100px;height:124px;flex-shrink:0;overflow:hidden;border-radius:var(--ui-radius);background:#e4e8de}
.profilePortrait img{position:absolute;width:230%;max-width:none;height:auto;left:50%;top:0;transform:translateX(-50%)}
.changeCharacter{display:block;margin:10px 0 16px auto;min-height:44px;padding:8px 16px;color:#304e41;background:#fffdf6;border:1px solid var(--ui-border);border-radius:var(--ui-radius);font:600 13px system-ui;cursor:pointer}
#characterPicker{box-sizing:border-box;width:min(480px,100%);max-width:100%;max-height:90dvh;margin:auto auto 0;border:0;border-radius:var(--ui-radius);padding:20px 20px max(20px,env(safe-area-inset-bottom));background:#f5f1e8;color:#304e41;overflow:auto}
#characterPicker::backdrop{background:rgba(25,38,32,.48)}
.pickerHeader{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}
.pickerHeader h2{margin:0;font-size:22px}
#pickerClose{width:44px;height:44px;border:1px solid var(--ui-border);background:transparent;border-radius:50%;color:#304e41;cursor:pointer}
#pickerProfile{margin-bottom:24px}
#characterPicker [hidden]{display:none!important}
#pickerConfirm{width:100%;min-height:50px;border:0;border-radius:var(--ui-radius);margin-top:14px;background:#304e41;color:#fff9ec;font:700 16px system-ui;cursor:pointer}
#characterPicker #rivalCast button{min-height:44px}
@media(min-width:700px){#characterPicker{margin:auto;border-radius:var(--ui-radius)}}
.mobile3d #menu [hidden]{display:none!important}
.mobile3d #m2p{grid-column:1/-1;font-size:15px;min-height:48px}
#soloSetup{width:100%;max-width:440px;margin:auto;pointer-events:auto;text-align:left}
.mobile3d #menu:has(#soloSetup:not([hidden])){background:#f5f1e8}
#soloSetup h2{font-size:25px;margin:8px 0 12px;text-align:center}
#soloBack{background:none;border:0;color:#304e41;min-height:44px;padding:8px 0;font:inherit;cursor:pointer}
#matchPreview{display:flex;justify-content:center;align-items:center;gap:22px;margin:0 0 20px}
#matchPreview>div{display:flex;flex-direction:column;align-items:center;gap:3px}
#matchPreview img{width:88px;height:98px;object-fit:cover;object-position:center 25%;border-radius:var(--ui-radius);background:#e4e8de}
#matchPreview small{font-size:11px;color:#617267}
#matchPreview strong{font-size:13px}
#matchPreview>b{color:#a14d68;font-size:17px}
#rivalCast{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:18px}
#rivalCast button{position:relative;padding:0 0 7px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);overflow:hidden;background:#e8e9e1;color:#344a41;font:600 11px system-ui;cursor:pointer;min-height:44px}
#rivalCast img{display:block;width:100%;height:64px;object-fit:cover;object-position:center 25%;margin-bottom:6px}
#rivalCast button[aria-pressed=true]{background:#304e41;color:#fff9ec;border-color:#304e41}
#rivalCast button[aria-pressed=true]::after,#gameCast button[aria-pressed=true]::after{content:'✓';position:absolute;right:4px;top:4px;border-radius:50%;background:#304e41;color:#fff;padding:1px 4px;font-size:11px}
#gameCast button{position:relative}
#soloSetup #gameOpponents button{min-height:44px}
#soloStart{width:100%;min-height:52px;margin-top:22px;border:0;border-radius:var(--ui-radius);background:#304e41;color:#fff9ec;font:700 17px system-ui;cursor:pointer}
@media(max-height:650px){#matchPreview img{width:66px;height:65px}#matchPreview{margin-bottom:10px}#rivalCast{margin-bottom:10px}#rivalCast img{height:45px}#soloStart{margin-top:12px}#soloSetup h2{margin:0 0 6px}}
.selectionLabel{font-size:11px;text-align:left;color:#52695c;margin:0 0 6px;font-weight:700}
#gameCast{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:9px}
#gameCast button{padding:0 0 6px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);overflow:hidden;background:#e8e9e1;color:#344a41;font:600 11px system-ui;cursor:pointer}
#gameCast img{display:block;width:100%;height:72px;object-fit:cover;object-position:center 25%;margin-bottom:5px}
/* Frame the existing full-body art around the face, with space for the hair. */
#gameCast .portraitFrame,#rivalCast .portraitFrame,#matchPreview .portraitFrame{display:block;position:relative;overflow:hidden;height:82px;width:100%;background:#e4e8de;margin-bottom:6px}
#matchPreview .portraitFrame{width:96px;height:104px;border-radius:var(--ui-radius)}
#gameCast .portraitFrame img,#rivalCast .portraitFrame img,#matchPreview .portraitFrame img{position:absolute;display:block;width:230%;max-width:none;height:auto;left:50%;top:0;transform:translateX(-50%);margin:0;border-radius:0;object-fit:contain}
@media(max-height:700px){#gameCast .portraitFrame,#rivalCast .portraitFrame{height:62px}#matchPreview .portraitFrame{width:80px;height:82px}}
#gameCast button[aria-pressed=true],#gameOpponents button[aria-pressed=true]{border-color:#304e41;background:#304e41;color:#fff9ed}
#gameOpponents{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
#gameOpponents button{min-height:40px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);color:#304e41;background:#fffdf6;font:600 12px system-ui;cursor:pointer}
.mobile3d #menuBtns{margin-top:9px}
.mobile3d #menu{padding-top:85px;padding-bottom:16px}
.mobile3d #venueNote{margin-top:7px;font-size:10px}
@media(max-height:700px){.mobile3d #menu{padding:68px 14px 8px}.mobile3d #menuTitle{font-size:27px}.mobile3d #menuSub{font-size:8px;margin-top:3px}#gameCast img{height:48px}#gameCast button{font-size:10px}#selectionDock{padding:8px}#gameCast{margin-bottom:6px}.selectionLabel{margin-bottom:4px}#gameOpponents button{min-height:36px}.mobile3d #venueNote{display:none}.mobile3d #mSolo{min-height:48px}}




/* Shared generated portrait composition across profiles, picker and match preview. */
.profilePortrait{width:104px;height:104px;background:#f4f1e8}
.profilePortrait img,#gameCast .portraitFrame img,#rivalCast .portraitFrame img,#matchPreview .portraitFrame img{position:static;display:block;width:100%;height:100%;max-width:100%;object-fit:cover;transform:none;margin:0;border-radius:0}
#gameCast .portraitFrame,#rivalCast .portraitFrame{height:auto;aspect-ratio:1;background:#f4f1e8}
#matchPreview .portraitFrame{width:96px;height:96px;background:#f4f1e8}
.characterProfile h3{font-size:20px;line-height:1.25}
.characterProfile small{display:block;font-size:12px;line-height:1.6}
/* Match setup: both seats use the same deliberate, tappable card. */
#soloSetup .characterProfile{position:relative;padding:12px 32px 12px 12px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:#fffdf6;cursor:pointer;margin-bottom:12px;gap:12px}
#soloSetup .characterProfile::after{content:'›';position:absolute;right:12px;font-size:26px;color:#526858}
#soloSetup .characterProfile:hover{border-color:#304e41;background:#edf1e8}
#soloSetup .characterProfile:focus-visible{outline:3px solid #b87654;outline-offset:3px}
#soloSetup .profilePortrait{width:76px;height:76px;flex:0 0 76px}
#soloSetup .characterProfile p{display:none}
#soloSetup .characterProfile h3{margin-bottom:5px;font-size:18px}
#soloSetup .selectionLabel{font-size:16px;margin-top:12px}
.selectionHint{text-align:center;color:#657365;font-size:13px;margin:0 0 12px}
#soloSetup #matchPreview{font-size:12px;margin:8px 0;color:#657365}
#joinDock{width:100%;max-width:330px;border-top:1px solid #cdd5ca;padding-top:16px;margin-top:12px;display:grid;grid-template-columns:1fr;gap:8px}
#joinDock label{font-size:15px;font-weight:600}
#joinDock input{box-sizing:border-box;width:100%;min-height:46px;font-size:16px;background:#fffdf6;color:#304e41;border:1px solid #aebead;border-radius:var(--ui-radius);padding:10px}
#joinDock .menuBtn{width:100%;margin:0;min-height:46px}
.mobile3d #online{justify-content:flex-start}
.mobile3d #onlineTitle{margin-bottom:16px}
.mobile3d #roomCode{font-size:23px;margin-bottom:0}
.mobile3d #qrCode{width:168px;height:168px}
.mobile3d #hostStatus,.mobile3d #joinStatus{margin:0;min-height:22px;font-size:13px}
.mobile3d #netHintTxt{font-size:12px;margin-top:12px}
.mobile3d #netHintTxt{position:static;flex-shrink:0;opacity:1;padding-bottom:env(safe-area-inset-bottom,0px)}
.mobile3d #online>*{flex-shrink:0}
.mobile3d #onlineHost{gap:8px}
/* Mode first; character selection belongs to each match setup. */
.mobile3d #menuBtns{width:min(320px,100%);gap:12px;margin-top:auto}
.mobile3d #menu:not(:has(#soloSetup:not([hidden]))){padding-bottom:calc(54px + env(safe-area-inset-bottom,0px))}
.mobile3d #mSolo,.mobile3d #m2p{font-size:17px;min-height:54px}
.mobile3d #online #selectionDock{width:100%;max-width:330px;box-sizing:border-box;margin:0 0 18px;padding:0;background:none;border:0}
#online .ownCharacterLabel{font-size:15px;margin-bottom:8px}
#online #ownProfile{padding:10px 30px 10px 10px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:#fffdf6;position:relative;gap:12px}
#online #ownProfile::after{content:'›';position:absolute;right:12px;font-size:24px}
#online #ownProfile[aria-disabled=true]{opacity:.65;cursor:default}
#online .profilePortrait{width:60px;height:60px;flex:0 0 60px}
#online .characterProfile h3{font-size:18px;margin:0 0 4px}
#online .characterProfile p{display:none}
#online .characterProfile small{font-size:11px;line-height:1.5}
.mobile3d #online>#hostCancel{align-self:center;width:100%;max-width:330px;text-align:left;margin:0 0 8px;min-height:36px}
.mobile3d #online{padding-top:calc(16px + env(safe-area-inset-top,0px))}
/* Invite first, then choose a player; joining is a secondary disclosure. */
.mobile3d #online #selectionDock{margin:18px 0 12px;padding-top:16px;border-top:1px solid #d4dbd0}
#joinDock{display:block;margin-top:0;padding:0;border-top:0;border-bottom:1px solid #d4dbd0}
#joinDock summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:4px 0;cursor:pointer;list-style:none;font-size:14px;font-weight:600;color:#526858;text-align:left}
#joinDock summary::-webkit-details-marker{display:none}
#joinDock summary span{font-size:20px;font-weight:400}
#joinDock[open] summary span{transform:rotate(45deg)}
#joinDock summary:focus-visible{outline:3px solid #b87654;outline-offset:3px;border-radius:var(--ui-radius)}
#joinDock .joinFields{display:grid;gap:10px;padding:4px 0 14px;text-align:left}
#joinDock label{font-size:13px}
.mobile3d #online #netHintTxt{margin-top:10px;font-size:11px}
/* Arcade match setup: mirrored player plates around one VS. */
#soloSetup .arcadeHeading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
#soloSetup .arcadeHeading h2{font-size:21px;margin:0}
.arcadeHeading>span{font-size:10px;letter-spacing:2px;color:#7b8578}
#soloSetup .difficultyLabel{text-align:left;font-size:12px;font-weight:700;color:#687565;margin:0 0 7px}
#soloSetup .versusArena{position:relative;margin-top:18px;padding:0;background:transparent}
#soloSetup .rivalSeat,#soloSetup .playerSeat{width:100%;margin:0;position:relative}
#soloSetup .seatLabel{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:800;letter-spacing:1px;margin:0 0 6px;color:#304d40}
#soloSetup .seatLabel::before{content:'';width:22px;height:3px;background:currentColor;transform:skewX(-25deg)}
#soloSetup .rivalSeat .seatLabel{justify-content:flex-end;color:#996144}
#soloSetup #rivalProfile,#soloSetup #soloOwnProfile{display:flex;align-items:center;gap:14px;width:100%;margin:0;padding:12px 28px 12px 12px;border:1px solid #c5cfbf;border-radius:var(--ui-radius);background:#e8eddf;text-align:left;position:relative;min-height:140px;transition:transform 160ms ease-out,background 160ms ease-out}
#soloSetup #rivalProfile{flex-direction:row-reverse;padding:12px 12px 12px 28px;background:#f0e7db;border-color:#d9c8b6;text-align:right}
#soloSetup #rivalProfile>div,#soloSetup #soloOwnProfile>div{min-width:0;flex:1}
#soloSetup #rivalProfile .profilePortrait,#soloSetup #soloOwnProfile .profilePortrait{width:108px;height:120px;flex:0 0 108px;border:0;border-radius:2px;background:#f7f4eb;overflow:hidden}
#soloSetup #rivalProfile h3,#soloSetup #soloOwnProfile h3{font-size:clamp(20px,3vw,26px);font-weight:900;line-height:1.15;margin:0 0 7px;letter-spacing:.5px}
#soloSetup #rivalProfile p,#soloSetup #soloOwnProfile p{display:block;font-size:12px;line-height:1.5;color:#657365;margin:0 0 6px}
#soloSetup #rivalProfile small,#soloSetup #soloOwnProfile small{display:block;font-size:12px;line-height:1.5;font-weight:700;color:#304d40}
#soloSetup #rivalProfile::after,#soloSetup #soloOwnProfile::after{top:50%;right:9px;transform:translateY(-50%)}
#soloSetup #rivalProfile::after{content:'‹';left:9px;right:auto}
#soloSetup #rivalProfile:hover{background:#e9ddcc}
#soloSetup #soloOwnProfile:hover{background:#dce6d3}
#soloSetup .characterProfile:active{transform:scale(.985)}
#soloSetup .characterProfile:focus-visible{outline:3px solid #657e59;outline-offset:3px}
#soloSetup #matchPreview{display:flex;align-items:center;justify-content:center;font-size:38px;font-weight:900;font-style:italic;letter-spacing:2px;color:#af6542;line-height:1;margin:10px 0;gap:16px}
#soloSetup #matchPreview::before,#soloSetup #matchPreview::after{content:'';height:2px;flex:1;background:#c2cbbb;transform:rotate(-6deg)}
#soloSetup .matchVenue{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:12px;font-size:12px;color:#657365}
#soloSetup .matchVenue strong{font-size:14px;letter-spacing:2px;color:#304d40}
#soloSetup #soloStart{margin-top:10px}
@media(max-width:420px){#soloSetup #rivalProfile,#soloSetup #soloOwnProfile{gap:10px}#soloSetup #rivalProfile .profilePortrait,#soloSetup #soloOwnProfile .profilePortrait{width:86px;height:108px;flex-basis:86px}}
@media(max-height:720px){#soloSetup .arcadeHeading{margin-bottom:6px}#soloSetup .versusArena{margin-top:10px}#soloSetup .seatLabel{margin-bottom:4px}#soloSetup #matchPreview{font-size:28px;margin:6px 0}#soloSetup #rivalProfile,#soloSetup #soloOwnProfile{min-height:106px;padding-top:8px;padding-bottom:8px}#soloSetup #rivalProfile .profilePortrait,#soloSetup #soloOwnProfile .profilePortrait{width:80px;height:96px;flex-basis:80px}#soloSetup .matchVenue{margin-top:8px}}
@media(prefers-reduced-motion:reduce){#soloSetup .characterProfile{transition:none}}

.yonshinWordmark{font-family:serif;letter-spacing:3px;color:#796031;font-size:18px;font-weight:700}
.yonshinVenue #clubHeader{background:#eef2ee}
.yonshinVenue #game{opacity:0}
.yonshinVenue #load3d .yonshinWordmark{font-size:32px}

/* Venue choice belongs to the home screen; the actual court stays visible. */
.mobile3d #homeVenue:not([hidden]) + #menuBtns{margin-top:10px}

/* One game identity; the venue is a stage, not a separate title screen. */
.mobile3d #menu::before{content:'PICKLEBALL ARCADE';position:absolute;top:28px;left:50%;transform:translateX(-50%);font-size:10px;font-weight:900;letter-spacing:4px;color:#526859;white-space:nowrap}
#homeVenue{margin-top:auto;width:min(340px,100%);padding:12px 14px 10px;background:#f8f5edee;border:1px solid #b7bdaa;border-top:3px solid #355445;border-radius:var(--ui-radius);box-shadow:0 4px 0 #304d4014;color:#304d40}
#homeVenue[hidden]{display:none}
.stageSelectLabel{display:flex;justify-content:space-between;font-size:9px;font-weight:900;letter-spacing:2px;color:#687362}
.stageSelectMain{display:flex;align-items:center;gap:8px;margin:5px 0}
.stageIdentity{flex:1;text-align:center;min-width:0}
.stageIdentity strong{display:block;font-size:23px;font-weight:900;letter-spacing:2px}
.stageIdentity small{display:block;font-size:10px;margin-top:3px;color:#697265}
#homeVenue .stageArrow{width:44px;height:48px;padding:0;border:0;background:transparent;color:#355445;font-size:32px;cursor:pointer}
.stageChoices{display:flex;gap:6px}
#homeVenue .stageChoices button{flex:1;min-height:36px;border:1px solid #bdc4b7;background:transparent;color:#596956;font:inherit;font-size:11px;font-weight:700;cursor:pointer;border-radius:2px}
.stageChoices button span{font-size:9px;opacity:.65;margin-right:4px}
#homeVenue .stageChoices button[aria-pressed="true"]{background:#355445;color:#fff8e8;border-color:#355445}
#homeVenue button:focus-visible{outline:3px solid #b88235;outline-offset:3px}
#homeVenue button:hover{filter:brightness(1.12)}
@media(max-height:700px){#homeVenue{padding:7px 10px}.stageIdentity strong{font-size:19px}.stageSelectMain{margin:1px 0}.stageIdentity small{display:none}}

/* Shared initial and character-loading presentation. Motion conveys waiting, not a fabricated percentage. */
#bootGuard.arcadeLoading,#load3d.arcadeLoading{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:28px;text-align:center;color:#304e41;background:radial-gradient(ellipse at 50% 45%,#fffdf5 0%,#f5f1e8 65%);font-family:inherit}
#load3d.arcadeLoading[hidden]{display:none}
.arcadeLoading .loadingEyebrow{font-size:10px;letter-spacing:5px;font-weight:800;color:#6e7a68}
.arcadeLoading h1,#load3d.arcadeLoading h1{font-size:clamp(29px,7vw,40px);letter-spacing:6px;margin:12px 0 32px;font-weight:900}
.loadingCourt{position:relative;width:180px;height:116px;border:2px solid #718878;border-radius:var(--ui-radius);background:linear-gradient(90deg,transparent 49.5%,#71887888 49.5%,#71887888 50.5%,transparent 50.5%);box-shadow:0 10px 28px #304e410a;margin-bottom:28px;overflow:hidden}
.loadingCourt:before,.loadingCourt:after{content:'';position:absolute;left:0;right:0;height:1px;background:#71887888;top:32%}
.loadingCourt:after{top:68%}
.loadingNet{position:absolute;left:0;right:0;top:50%;height:2px;background:#304e41}
.loadingBall{position:absolute;width:12px;height:12px;left:22%;top:70%;border-radius:50%;background:#d4b65b;box-shadow:0 2px 3px #304e4133;animation:loadingRally 1.8s ease-in-out infinite}
@keyframes loadingRally{0%,100%{transform:translate(0,0) scale(.9)}50%{transform:translate(84px,-68px) scale(1.12)}}
.loadingStage{font-size:14px;font-weight:800;letter-spacing:2px}
.arcadeLoading p,#load3d.arcadeLoading p{font-size:12px;color:#6d7b6b;margin:10px 0 14px;min-height:22px}
.loadingTrack{width:150px;height:3px;background:#dce1d4;overflow:hidden;border-radius:2px}
.loadingTrack i{display:block;width:45%;height:100%;background:#58735b;animation:loadingSweep 1.8s ease-in-out infinite alternate}
@keyframes loadingSweep{from{transform:translateX(-70%)}to{transform:translateX(200%)}}
.loadingTip{margin-top:30px;font-size:11px;color:#7a8173;letter-spacing:1px}
.arcadeLoading .loadingRetry{margin-top:20px;border:0;background:transparent;color:#71806e;font:inherit;font-size:11px;padding:12px;cursor:pointer;text-decoration:underline;text-underline-offset:4px}
@media(prefers-reduced-motion:reduce){.loadingBall,.loadingTrack i{animation:none}.loadingBall{left:65%;top:20%}}

/* The court tour shares the game canvas and keeps the home controls out of its way. */
#homeVenue .inspectVenueButton{display:block;width:100%;min-height:36px;margin:5px 0 -3px;border:0;background:transparent;color:#526957;font:inherit;font-size:12px;cursor:pointer;text-decoration:underline;text-underline-offset:4px}
#venueInspect[hidden]{display:none}
#venueInspect{position:absolute;inset:0;z-index:50;pointer-events:none;color:#304d40}
#venueInspect header{position:absolute;top:14px;left:16px;right:16px;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;background:#f8f5edf0;border-top:3px solid #355445;box-shadow:0 3px 14px #24352b14;pointer-events:auto}
#venueInspect h2{font-size:22px;margin:3px 0 0}#venueInspect small{font-size:10px;letter-spacing:.18em}
#venueInspect button{min-height:42px;padding:9px 14px;border:1px solid #b7bdaa;background:#f8f5ed;color:#304d40;border-radius:var(--ui-radius);font:inherit;font-size:13px;cursor:pointer}
#venueInspect footer{position:absolute;bottom:16px;left:12px;right:12px;display:grid;justify-items:center;gap:8px}
#venueInspect nav{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;pointer-events:auto}
#venueInspect nav button[aria-pressed="true"]{background:#355445;color:#fff8e8;border-color:#355445}
#venueInspect p{margin:0;padding:5px 10px;background:#f8f5ede8;font-size:11px;border-radius:var(--ui-radius)}
#venueInspect button:focus-visible{outline:3px solid #b88235;outline-offset:3px}
.inspectingVenue #menu,.inspectingVenue #hud,.inspectingVenue #clubHeader,.inspectingVenue #deck,.inspectingVenue #mute,.inspectingVenue #pauseButton{visibility:hidden!important;pointer-events:none!important}
@media(max-width:600px){#venueInspect header{top:10px;left:10px;right:10px;padding:10px 12px}#venueInspect h2{font-size:19px}#venueInspect footer{bottom:20px}#venueInspect nav button{font-size:12px;padding:8px 10px}}
.inspectingVenue #inputGuide{visibility:hidden!important}.inspectingVenue #game{pointer-events:none!important}.inspectingVenue #court3d{pointer-events:auto!important}

/* One home control family: stage card above two bottom-aligned play actions. */
.mobile3d #homeVenue{width:min(340px,100%);padding:10px 12px 12px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:#f8f5edf5;box-shadow:0 3px 12px #304d4010}
#homeVenue .stageSelectLabel{align-items:center;gap:8px;letter-spacing:1.4px}
#homeVenue .stageSelectLabel>span:nth-child(2){display:none}
#homeVenue .inspectVenueButton{display:flex;align-items:center;justify-content:center;gap:6px;width:auto;min-height:44px;margin:-4px -4px -4px auto;padding:8px 10px;border:1px solid #d6dace;border-radius:var(--ui-radius);background:#eeeee4;color:#355445;font:inherit;font-size:12px;font-weight:700;letter-spacing:0;text-decoration:none;cursor:pointer}
#homeVenue .inspectVenueButton svg{width:19px;height:19px}
#homeVenue .inspectVenueButton:disabled{opacity:.45;cursor:wait}
#homeVenue .stageSelectMain{margin:8px 0 10px}
#homeVenue .stageArrow{border:1px solid #d5dbce;border-radius:var(--ui-radius);background:#ffffff60;width:36px;min-height:44px;height:44px;font-size:27px}
#homeVenue .stageIdentity strong{font-size:22px;letter-spacing:1px}
#homeVenue .stageChoices{gap:4px;padding:3px;background:#e7eadd;border-radius:var(--ui-radius)}
#homeVenue .stageChoices button{min-height:44px;border:0;border-radius:var(--ui-radius);font-size:12px}
#homeVenue .stageChoices button[aria-pressed="true"]{background:#fffdf5;color:#304d40;box-shadow:0 1px 4px #304d401a}
.mobile3d #menuBtns{width:min(340px,100%);gap:8px}
.mobile3d #mSolo,.mobile3d #m2p{display:flex;align-items:center;justify-content:space-between;min-height:62px;padding:10px 18px;border-radius:var(--ui-radius);letter-spacing:0;text-align:left;transition:background .15s,transform .15s}
.mobile3d #mSolo{background:#304e41;border:1px solid #304e41;color:#fff9ec}
.mobile3d #m2p{background:#f8f5edf5;border:1px solid #aebcae;color:#304e41}
.homeActionLabel{display:grid;gap:3px}
.homeActionLabel small{font-size:9px;font-weight:700;letter-spacing:1.6px;opacity:.7}
.homeActionLabel strong{font-size:17px;font-weight:800;letter-spacing:1px}
.homeActionArrow{font-size:22px;font-weight:400}
.mobile3d #mSolo:hover{background:#3e6151}.mobile3d #m2p:hover{background:#e8ecdf}
.mobile3d #menuBtns button:focus-visible{outline:3px solid #b88235;outline-offset:3px}
.mobile3d #menuBtns button:active{transform:translateY(1px)}
@media(max-height:700px){.mobile3d #homeVenue{padding:6px 10px 8px}#homeVenue .stageSelectMain{margin:4px 0}#homeVenue .stageIdentity strong{font-size:19px}.mobile3d #mSolo,.mobile3d #m2p{min-height:52px;padding:7px 16px}}
@media(prefers-reduced-motion:reduce){.mobile3d #mSolo,.mobile3d #m2p{transition:none}}
/* Connected arcade lobby replaces the invitation panel. */
#online #roomCode,#online #onlineHome,#online #onlineJoin{display:none!important}
#online.selectingMatch #onlineHost{display:none!important}
#matchLobby[hidden]{display:none}
#matchLobby{width:min(360px,100%);display:flex;flex-direction:column;gap:10px}
#matchLobby #selectionDock{width:100%;margin:0;padding:0}
#matchLobby .characterProfile{width:100%;min-height:94px;background:#fffdf5;border:1px solid #bdc9b8;border-radius:var(--ui-radius);padding:12px}
#matchLobby .characterProfile p{display:none}
#matchLobby .characterProfile h3{font-size:22px}
#matchLobby .profilePortrait{width:76px;height:76px;flex:0 0 76px}
#matchLobby .lobbyRemote{padding:12px;background:#e9ecdf;border-radius:var(--ui-radius)}
#matchLobby .lobbyRemote .characterProfile{background:transparent;border:0;padding:6px 0}
.lobbyEyebrow{text-align:center;font-size:10px;letter-spacing:3px;color:#647c68}
.lobbyVS{text-align:center;font-size:27px;font-weight:900;font-style:italic;color:#9f514d;line-height:1}
#remoteReady{margin:3px 0 0;text-align:right;font-size:12px;color:#42624b}
#lobbyStatus,#connectionStatus{text-align:center;font-size:13px;color:#536650;line-height:1.5}
#confirmMatch,#copyInvite{min-height:46px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);font:inherit;cursor:pointer}
#confirmMatch{background:#304e41;color:#fff9ed;padding:14px;font-weight:800}
#confirmMatch:disabled{opacity:.6;cursor:default}
#copyInvite{background:transparent;color:#304e41;width:100%;margin-top:8px}
#online #btnShareRoom{width:100%}
#matchLobby button:focus-visible,#copyInvite:focus-visible{outline:3px solid #b88235;outline-offset:3px}
#matchLobby #ownProfile[aria-disabled="true"]{opacity:.75;cursor:default}

#connectionStatus:empty{display:none}
.mobile3d #online.selectingMatch{gap:12px}
.mobile3d #online.selectingMatch #onlineTitle{margin:0 0 8px}
.mobile3d #online #matchLobby #selectionDock{max-width:none;margin:8px 0 0;padding:0;border:0}
#lobbyStatus{margin:8px 0}
#retryConnection{min-height:44px;border:1px solid var(--ui-border);background:#fffdf6;color:#304e41;border-radius:var(--ui-radius);padding:8px 24px;font:inherit}
#retryConnection[hidden]{display:none}

/* Keep small finger movements on character cards from starting image drags. */
#characterPicker button,#soloOwnProfile,#rivalProfile{touch-action:manipulation}
#characterPicker img,#soloOwnProfile img,#rivalProfile img{pointer-events:none;-webkit-user-drag:none;user-select:none}
#characterPicker{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#venueInspect .tourModes{position:absolute;top:100px;left:16px;right:16px;z-index:2}
#venueInspect.showGallery{background:#edece4;pointer-events:auto}
#venueInspect .tourGallery{position:absolute;inset:154px 16px 20px;display:flex;flex-direction:column;gap:12px;pointer-events:auto}
#venueInspect .tourGallery[hidden],#venueInspect footer[hidden]{display:none}
#venueInspect .tourGallery figure{margin:0;flex:1;min-height:0;display:flex;flex-direction:column;gap:8px;align-items:center}
#venueInspect .tourGallery img{display:block;width:100%;flex:1;min-height:0;object-fit:contain;touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-drag:none}
#venueInspect .tourGallery figure{touch-action:pan-y pinch-zoom;user-select:none}
#venueInspect .tourGallery figcaption{font-size:12px;color:#526459;flex-shrink:0}
#venueInspect .tourGallery nav{flex-shrink:0}
@media(max-width:600px){#venueInspect .tourModes{top:92px}#venueInspect .tourGallery{inset:146px 8px 20px}}
@media(max-height:500px){#venueInspect header{top:8px;padding:6px 12px}#venueInspect h2{font-size:16px}#venueInspect .tourModes{top:72px}#venueInspect .tourGallery{inset:122px 12px 8px;gap:4px}}
#pickerAbilities{margin:0 0 18px;text-align:left}
.abilityHeading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:6px;font-size:13px}
.abilityHeading>span{font-size:11px;color:#80623e}
.abilityTable{width:100%;border-collapse:collapse;font-size:13px}
.abilityTable th{text-align:left;font-weight:500;width:32%;padding:4px 0}
.abilityTable td{padding:4px 0}
.abilityTable td:last-child{width:48px;text-align:right;font-variant-numeric:tabular-nums}
.abilityBars{display:flex;gap:4px;padding-right:16px}
.abilityBars i{display:block;flex:1;height:6px;background:#dcded2;border-radius:1px}
.abilityBars .filled{background:#496653}
.abilityMax{font-size:11px;color:#6c756b}
.abilityTable .secondaryShot>*{padding-top:10px}
.abilityTraits{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #d7d9ca;margin-top:10px;padding-top:10px;font-size:12px}
.abilityTraits b{margin-left:6px}
#pickerAbilities .abilityLegend{margin:7px 0 0;font-size:11px;color:#6c756b}
#characterPicker #pickerProfile{margin-bottom:16px;min-height:62px;align-items:flex-start}
#characterPicker #pickerProfile h3{font-size:23px;margin:0 0 6px}
#characterPicker #pickerProfile p{margin:0;font-size:12px;line-height:1.6}
#characterPicker .pickerHeader{margin-bottom:14px}
#characterPicker #gameCast .portraitFrame,#characterPicker #rivalCast .portraitFrame{height:58px;aspect-ratio:auto;margin-bottom:4px}
#characterPicker #gameCast .portraitFrame img,#characterPicker #rivalCast .portraitFrame img{object-position:center 20%}
#characterPicker #pickerConfirm{position:static;margin-top:12px;box-shadow:none}
#characterPicker #gameCast,#characterPicker #rivalCast{gap:8px}
#characterPicker #gameCast button:focus-visible,#characterPicker #rivalCast button:focus-visible{outline:3px solid #b88235;outline-offset:2px}
#inputGuide .rallySkillHint{display:block;color:#876426;font-size:11px;margin-top:3px}
#inputGuide .rallySkillHint[hidden]{display:none}
/* Scalable arcade stage selection */
#homeVenue .stageIdentity{border:0;background:transparent;color:#304d40;font:inherit;cursor:pointer;padding:6px 0;min-height:54px}
#homeVenue .stageIdentity small{font-size:11px;letter-spacing:1px;display:block}
#homeVenue .stageArrow{width:44px;flex-shrink:0}
#homeVenue .stageSelectMain{margin:4px 0 0;touch-action:pan-y}
#homeVenue .inspectVenueButton{min-height:36px;border:0;background:transparent;padding:4px 6px}
#stagePicker{box-sizing:border-box;width:min(960px,calc(100% - 32px));max-height:88dvh;padding:clamp(18px,3vw,32px);border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:#f6f3e9;color:#304d40;overflow:auto;overscroll-behavior:contain}
#stagePicker::backdrop{background:#122b25bb}
.stagePickerHeader{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;border-bottom:1px solid #ccd1c2;padding-bottom:18px}
.stagePickerHeader span{font-size:11px;font-weight:900;letter-spacing:3px;color:#697563}
.stagePickerHeader h2{font-size:clamp(24px,4vw,34px);margin:5px 0 0;letter-spacing:2px}
.stagePickerHeader button{width:44px;height:44px;border:1px solid var(--ui-border);border-radius:50%;background:transparent;color:#304d40;font-size:20px;cursor:pointer}
.stageGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.stageCard{min-width:0;padding:0 0 14px;text-align:left;font:inherit;color:#304d40;background:transparent;border:0;border-bottom:3px solid #d7dacc;cursor:pointer}
.stageImage{position:relative;aspect-ratio:4/3;overflow:hidden;background:#dce0d3;border-radius:var(--ui-radius)}
.stageImage img{width:100%;height:100%;object-fit:cover;transition:transform .2s ease-out}
.stageImage span{position:absolute;top:9px;left:9px;background:#f6f3e9;color:#304d40;padding:5px 8px;font-size:11px;font-weight:800}
.stageCard strong{display:block;font-size:18px;margin:12px 0 5px}
.stageCard small{display:block;font-size:11px;color:#66725f}
.stageCard[aria-pressed="true"]{border-color:#355445}
.stageCard[aria-pressed="true"] .stageImage{outline:3px solid #355445;outline-offset:-3px}
.stageCard[aria-pressed="true"] .stageImage span{background:#355445;color:#fff9e8}
.stageCard:hover img{transform:scale(1.035)}
#stagePicker button:focus-visible{outline:3px solid #ac7529;outline-offset:4px}
@media(max-width:600px){.stageGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}.stageCard strong{font-size:15px}.stageCard small{font-size:10px}.stagePickerHeader{margin-bottom:18px}}
@media(prefers-reduced-motion:reduce){.stageImage img{transition:none}}
#lineBrowserGate{position:fixed;inset:0;z-index:10001;background:#f6f3e9;color:#304d40;display:grid;place-items:center;padding:24px;overflow:auto;font-family:inherit}
#lineBrowserGate>div{max-width:420px;width:100%;text-align:center}
#lineBrowserGate small{font-size:12px;letter-spacing:3px;font-weight:800}
#lineBrowserGate h1{font-size:28px;margin:24px 0 16px}
#lineBrowserGate p{font-size:15px;line-height:1.8}
#lineBrowserGate a,#lineBrowserGate button{display:block;box-sizing:border-box;width:100%;padding:15px 18px;margin:12px 0;border:1px solid #bec8b8;border-radius:var(--ui-radius);font:inherit;font-weight:700;text-decoration:none;color:#304d40;background:transparent;cursor:pointer}
#lineBrowserGate a{background:#304d40;color:#fff8e8;border-color:#304d40}
#lineBrowserGate #lineBrowserHelp{font-size:13px;color:#5d6e60;margin-top:22px}
#lineBrowserGate #lineBrowserContinue{font-size:13px;border:0;text-decoration:underline}
#lineBrowserGate :focus-visible{outline:3px solid #ac7529;outline-offset:3px}
#venueInspect .tourMapLink{display:inline-flex;align-items:center;justify-content:center;min-height:42px;box-sizing:border-box;padding:9px 12px;border:1px solid #b7bdaa;border-radius:var(--ui-radius);background:#f8f5ed;color:#304d40;font-size:12px;text-decoration:none}
#venueInspect .tourMapLink:hover{background:#e8ecdf}
#venueInspect .tourMapLink:focus-visible{outline:3px solid #b88235;outline-offset:3px}
#venueInspect .tourStages{top:150px;display:flex;gap:6px;flex-wrap:wrap}
@media(max-width:600px){#venueInspect .tourStages{top:144px}#venueInspect .tourStages button{font-size:12px;padding:8px 10px}}
@media(max-height:500px){#venueInspect .tourStages{top:118px}}

.mobile3d #feedbackLink{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:3px 8px;color:#496254;font-size:11px;text-underline-offset:3px;flex-shrink:0}.mobile3d #feedbackLink[hidden]{display:none}.mobile3d #feedbackLink:focus-visible{outline:2px solid #b88235;outline-offset:2px}

/* Home: one quiet control dock leaves the live court in view. */
.mobile3d #menu{padding:40px 24px 24px;gap:0;background:linear-gradient(180deg,#f5f1e8 0%,#f5f1e8e8 12%,#f5f1e800 28%,#f5f1e800 68%,#f5f1e8b8 100%)}
.mobile3d #menu::before{content:none}
.mobile3d #menuTitle{font-size:clamp(30px,5vw,42px);letter-spacing:.12em;line-height:1.2;margin:0}
.mobile3d #menuSub{font-size:10px;letter-spacing:.16em;margin:10px 0 0;color:#526859}
#homeDock{box-sizing:border-box;width:min(448px,100%);margin-top:auto;padding:12px 24px 8px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:#f8f5ed;color:#304e41;flex-shrink:0}
#homeDock[hidden]{display:none}
.mobile3d #homeDock #homeVenue{width:100%;margin:0;padding:0 0 12px;border:0;border-radius:0;background:transparent;box-shadow:none}
#homeDock .stageSelectLabel{font-size:11px;font-weight:500;letter-spacing:0;color:#647466;min-height:36px}
#homeDock .stageSelectLabel>span:nth-child(2){display:none}
#homeDock #homeVenue .inspectVenueButton{margin:0 -8px 0 auto;min-height:44px;padding:8px;border:0;background:transparent;font-size:11px}
#homeDock #homeVenue .stageSelectMain{display:flex;align-items:center;margin:0;gap:8px}
#homeDock #homeVenue .stageArrow{width:44px;height:44px;border:0;border-radius:50%;background:transparent;color:#536b5d;font-size:28px}
#homeDock #homeVenue .stageArrow:hover{background:#e8ecdf}
#homeDock #homeVenue .stageIdentity{flex:1;min-width:0;min-height:64px;padding:4px 0}
#homeDock #homeVenue .stageIdentity strong{font-size:clamp(18px,4.5vw,23px);letter-spacing:.02em;line-height:1.3}
#homeDock #homeVenue .stageIdentity small{display:block;font-size:11px;letter-spacing:0;margin-top:5px;color:#66776b}
.mobile3d #homeDock #menuBtns{display:grid;grid-template-columns:1fr 1fr;width:100%;margin:0;gap:8px}
.mobile3d #homeDock #mSolo,.mobile3d #homeDock #m2p{grid-column:auto;min-height:56px;justify-content:center;padding:12px 8px;border-radius:var(--ui-radius);gap:8px;box-shadow:none}
#homeDock .homeActionLabel small,#homeDock .homeActionArrow{display:none}
#homeDock .homeActionLabel strong{font-size:15px;letter-spacing:.02em}
.mobile3d #homeDock #m2p{background:transparent;border-color:var(--ui-border)}
.mobile3d #homeDock #m2p:hover{background:#e8ecdf}
.homeFooter{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
.mobile3d #homeDock #venueNote{display:block;margin:0;max-width:260px;font-size:10px;line-height:1.5;letter-spacing:0;text-align:left;color:#66776b}
.mobile3d #homeDock #feedbackLink{font-size:11px;min-height:44px;padding:0 0 0 8px;white-space:nowrap;text-decoration:none;color:#425e4d}
.mobile3d #homeDock #feedbackLink:hover{text-decoration:underline}
@media(max-width:480px){.mobile3d #menu{padding:32px 16px max(16px,env(safe-area-inset-bottom))}#homeDock{padding:8px 16px 4px}.mobile3d #homeDock #venueNote{max-width:210px;font-size:10px}.mobile3d #menuSub{font-size:9px}}
@media(max-height:660px){.mobile3d #menu{padding-top:20px;padding-bottom:8px}.mobile3d #menuTitle{font-size:28px}.mobile3d #menuSub{margin-top:6px}#homeDock{padding-top:4px}#homeDock #homeVenue .stageIdentity{min-height:48px}.mobile3d #homeDock #mSolo,.mobile3d #homeDock #m2p{min-height:48px}.mobile3d #homeDock #homeVenue{padding-bottom:8px}}
@media(max-height:440px) and (min-width:600px){.mobile3d #menu{align-items:flex-start;padding:20px}.mobile3d #menuTitle{font-size:26px}#homeDock{width:340px;align-self:flex-end;margin-top:8px}.mobile3d #menu{overflow-y:auto}}
.mobile3d:has(#menu:not(.hidden)) #hud,.mobile3d:has(#menu:not(.hidden)) #pauseButton,.mobile3d:has(#menu:not(.hidden)) #inputGuide,.mobile3d:has(#menu:not(.hidden)) #clubHeader{visibility:hidden}
.mobile3d:has(#menu:not(.hidden)) #mute{top:20px;bottom:auto;right:16px;min-width:44px;min-height:44px}
.mobile3d #menu:not(:has(#soloSetup:not([hidden]))){padding-bottom:max(16px,env(safe-area-inset-bottom))}
/* Game introduction and feedback, kept outside the play controls. */
.mobile3d #menuTitle{font-size:clamp(26px,5.5vw,42px);letter-spacing:-.025em}
.mobile3d #menuSub{letter-spacing:.06em;font-size:12px}
.mobile3d #homeDock #feedbackLink{border:0;background:transparent;font-family:inherit;cursor:pointer}
#aboutGame{box-sizing:border-box;width:min(620px,calc(100% - 24px));max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:var(--ui-radius);background:#f8f5ed;color:#304e41;overflow:auto;overscroll-behavior:contain}
#aboutGame::backdrop{background:#152d27b8}
#aboutGame>header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 28px;background:#f8f5ed;border-bottom:1px solid #d8dccf;z-index:1}
#aboutGame h2{font-size:16px;margin:0;font-weight:600}
#aboutGame .aboutClose{min-height:44px;padding:8px 12px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:transparent;color:inherit;font:inherit;cursor:pointer}
.aboutBody{padding:28px 32px 36px}.aboutBody h3{font-size:22px;line-height:1.45;margin:0 0 12px;letter-spacing:0}.aboutBody p{font-size:15px;line-height:1.9;margin:0 0 16px;color:#4b6053}.aboutBody section{margin-top:32px}.aboutBody section h3{font-size:18px}
.aboutEmail{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;min-height:48px;box-sizing:border-box;align-items:center;padding:14px 16px;margin-top:24px;border-radius:var(--ui-radius);background:#304e41;color:#fff9ec;text-decoration:none;font-size:14px}.aboutEmail span{font-size:14px}.aboutVersion{margin:24px 0 0;font-size:12px;letter-spacing:.06em;color:#8aa093;text-align:right}#aboutGame :focus-visible{outline:3px solid #b88235;outline-offset:3px}
@media(max-width:480px){#aboutGame>header{padding:12px 20px}.aboutBody{padding:24px 20px 28px}.aboutBody h3{font-size:21px}.mobile3d #homeDock #venueNote{max-width:180px}.arcadeLoading h1{font-size:28px}}

/* Shared control typography across home, setup, dialogs and play. */
.mobile3d button,.mobile3d input,.mobile3d select{font-family:inherit}
.mobile3d :is(.menuBtn,#soloStart,#pickerConfirm,#confirmMatch,#copyInvite,#retryConnection,.aboutClose,.aboutEmail){font-weight:700;letter-spacing:.02em}

/* Generated brand lettering; fixed aspect ratio prevents layout shifts. */
.mobile3d #menuTitle{width:min(340px,80%);line-height:0;margin:0 auto}
.gameWordmark{display:block;width:100%;height:auto}
.wordmarkEnglish{display:block;margin-bottom:18px;color:#202832;font-family:inherit;font-size:10px;font-weight:700;line-height:1.4;letter-spacing:.32em;text-align:center;text-indent:.32em}
.wordmarkChinese{display:block;position:relative;aspect-ratio:2172 / 606;overflow:hidden}
.wordmarkChinese .gameWordmark{position:absolute;top:-19.47195%;left:0}
.mobile3d #menuSub[hidden]{display:none}
@media(max-width:480px){.mobile3d #menuTitle{width:min(300px,86%)}.wordmarkEnglish{font-size:9px;margin-bottom:16px}}
@media(max-height:660px){.mobile3d #menuTitle{width:240px;max-width:75%}}

@media(min-width:481px) and (min-height:661px){.mobile3d #menu{padding-top:24px}}
