/* Ghana street-game shelf: warm signs, broad scenes and a clear two-column rhythm. */
body.in-lobby .vignette{background:linear-gradient(180deg,#1b2430bd 0%,#26221980 42%,#1a100bda 100%)}
#lobby{width:100%;max-width:1280px;padding:30px 4% 20px;gap:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#a88953 transparent}
.lobby-header{min-height:130px;flex-shrink:0;grid-template-columns:1fr auto 1fr;gap:20px;margin-bottom:28px}
.lobby-header h1{font-size:clamp(36px,4.6vw,64px);line-height:1;letter-spacing:-.025em;text-shadow:2px 3px #b64f30,4px 6px #348064,6px 8px #171711}
.lobby-header h1 span{font-size:.62em;margin-top:6px}
.profile-chip{border:0;background:none;box-shadow:none;padding:0;gap:10px}.profile-chip>span:last-child{display:none}.avatar{display:grid;place-items:center;background:var(--cream);border:3px solid #33230e;color:var(--ink);width:54px;height:54px;border-radius:18px;box-shadow:3px 4px 0 #20150b}.avatar:before,.avatar:after,.avatar i{display:none}.avatar svg{width:31px;height:31px}
.header-actions .round-button{width:48px;height:48px;min-width:48px;min-height:48px;border:2px solid #34240f;box-shadow:3px 4px 0 #21170d}
.game-shelf{flex:none;width:100%;max-width:1160px;margin:0 auto;min-height:0;gap:0;padding:0}
.shelf-top{margin:0 0 18px;align-items:center;gap:20px}.game-shelf .shelf-top p{font-size:16px;line-height:1.5;max-width:290px;color:#fff0d4}.search{border:1px solid #eed9ac66;min-height:46px;background:#251e18a8;padding:10px 16px;box-shadow:none}.search input{width:190px;font:14px Shantell,sans-serif}
#categories{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:10px;margin:0 0 24px;padding:0 0 4px;flex-shrink:0}
.category{flex:0 0 auto;min-height:44px;border:2px solid #35250f;background:#f1deb0;box-shadow:2px 3px 0 #24180c;color:#2c1e0e;font-size:11px;padding:10px 20px;border-radius:999px}
.category.active{background:#f4b83e;color:#21170e;box-shadow:0 3px 0 #bd4b30,2px 5px 0 #24180c}.category:hover{background:#ffe5a9}
.game-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:auto;gap:22px;flex:none;min-height:0;height:auto;overflow:visible}
.game-grid .game-card,.game-grid .game-card:nth-child(n+4){height:auto;aspect-ratio:1.6;min-width:0;min-height:0;border:2px solid #352512;border-radius:20px;box-shadow:3px 5px 0 #25170c,0 12px 22px -12px #0009;background:#44311e;transition:transform .15s,border-color .15s}
.game-card img{object-fit:cover;object-position:center;filter:saturate(.98) contrast(1.02);transform:none}
.game-card:before{background:linear-gradient(transparent 39%,#160e08b3 70%,#160e08f5 100%)}
.game-card:after{top:10px;left:12px;right:12px;opacity:.9}
.game-grid .game-card:hover{border-color:#f1bd51;transform:translateY(-2px);box-shadow:3px 6px 0 #25170c,0 0 0 1px #f1bd51}.game-card:hover img{transform:none}.game-card:active{transform:translateY(1px)}
.game-card .card-tag{display:block;left:16px;right:auto;top:20px;bottom:auto;width:max-content;max-width:calc(100% - 32px);padding:5px 12px;border:1px solid #372711;border-radius:999px;background:#f3e2ba;color:#2a1b0c;font:10px Bungee,sans-serif;line-height:1.4;transform:none;box-shadow:1px 2px 0 #2b1c0d}
.game-grid .card-copy,.game-grid .game-card:nth-child(n+4) .card-copy{left:20px;right:20px;bottom:20px;top:auto;transform:none;padding:0 32px 0 0}
.game-grid .card-copy .game-name,.game-grid .game-card:nth-child(n+4) .game-name{font-size:clamp(21px,2.65vw,35px);line-height:1.1;color:#f5b83d;text-shadow:1px 2px 0 #211407}
.game-grid .card-copy small,.game-grid .game-card:nth-child(n+4) .card-copy small{display:block;font:13px/1.4 Shantell,sans-serif;color:#ffefd4;margin-top:8px}
.game-card .card-play{display:grid;place-items:center;right:18px;bottom:25px;width:26px;height:26px;min-width:0;border:0;border-radius:50%;background:#f1b63e;color:#38230b;font-size:13px;box-shadow:none;transform:none}
.shelf-controls{margin:22px 0 0;min-height:48px;gap:24px}.shelf-controls .round-button{width:42px;height:42px;min-width:42px;min-height:42px;border:2px solid #c5a56b;background:#24190d70;box-shadow:none;color:#f7dfaa}.shelf-controls p{font-size:12px}.shelf-controls #page-count{font-size:14px}
.lobby-footer{flex:0 0 auto;justify-content:center;min-height:62px;gap:26px;padding-top:22px;flex-wrap:wrap}.lobby-footer>div{display:none}.lobby-footer .quiet-button{font-size:12px;color:#f4e5c8;opacity:.9}.lobby-footer .quiet-button:hover{opacity:1}
body.floor-game #joystick{visibility:hidden}body.floor-game .play-bottom{justify-content:flex-end}
#counters-setup .small-copy{grid-column:1/-1;line-height:1.5}
@media(max-width:850px){#lobby{padding:22px 22px 16px}.lobby-header{grid-template-columns:54px 1fr 108px;min-height:112px;margin-bottom:22px;gap:12px}.lobby-header h1{font-size:39px}.header-actions{gap:9px}.game-grid{gap:18px}.game-grid .card-copy,.game-grid .game-card:nth-child(n+4) .card-copy{left:15px;right:14px;bottom:16px;padding-right:20px}.game-grid .card-copy .game-name,.game-grid .game-card:nth-child(n+4) .game-name{font-size:23px}.game-grid .card-copy small,.game-grid .game-card:nth-child(n+4) .card-copy small{font-size:11px}.game-card .card-play{right:13px;bottom:20px;width:21px;height:21px;font-size:11px}.game-card .card-tag{left:13px;top:17px;font-size:8px;padding:4px 9px}.category{font-size:10px;padding:9px 15px}.game-shelf .shelf-top p{font-size:14px;max-width:220px}.search input{width:150px}}
@media(max-width:520px){#lobby{padding:20px 16px 14px}.lobby-header{grid-template-columns:42px 1fr 86px;min-height:92px;gap:7px;margin-bottom:18px}.lobby-header h1{font-size:29px}.lobby-header h1 span{font-size:.6em}.avatar{width:40px;height:44px;border-radius:13px}.avatar svg{width:25px;height:25px}.header-actions{gap:6px}.header-actions .round-button{width:40px;height:44px;min-width:40px;min-height:44px;font-size:18px}.shelf-top{align-items:flex-start;gap:12px;flex-direction:column}.game-shelf .shelf-top p{font-size:14px;max-width:none;margin:0}.search{width:100%}.search input{width:100%}#categories{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;gap:8px;margin-bottom:18px}.category{font-size:9px;padding:9px 14px;min-height:44px}.game-grid{grid-template-columns:1fr;gap:18px}.game-grid .game-card,.game-grid .game-card:nth-child(n+4){aspect-ratio:1.55;border-radius:17px}.game-grid .card-copy .game-name,.game-grid .game-card:nth-child(n+4) .game-name{font-size:26px}.game-grid .card-copy small,.game-grid .game-card:nth-child(n+4) .card-copy small{font-size:12px}.game-card .card-tag{font-size:9px}.lobby-footer{gap:18px}.lobby-footer .quiet-button{font-size:11px}}
@media(prefers-reduced-motion:reduce){.game-card{transition:none}.game-card:hover{transform:none}}
/* Gameplay controls */
#game-hud .action-buttons button{font-size:clamp(10px,1.15vw,15px);line-height:1.15;overflow-wrap:normal;word-break:normal;padding:12px;min-width:76px}
#announcement{max-width:min(650px,86vw);font-size:clamp(12px,1.15vw,16px);line-height:1.5;padding:10px 16px;background:#201a13c9;border:1px solid #ead6ae33;border-radius:12px}
body.floor-game #announcement,body.board-game #announcement{top:auto;bottom:150px}
body.floor-game .score-panel,body.board-game .score-panel{max-width:min(520px,72vw)}
@media(max-width:600px){#game-hud .action-buttons button{width:80px;height:80px;min-width:80px;font-size:11px}#game-hud .action-buttons button small{font-size:9px}body.floor-game #announcement,body.board-game #announcement{bottom:125px}#announcement{font-size:12px}#keyboard-hint{font-size:10px}}

#game-hud .action-buttons button strong{font-size:12px;line-height:1.2;white-space:normal;overflow-wrap:normal;word-break:normal}
#game-hud[data-game="stay"] .action-buttons{display:grid;grid-template-columns:repeat(2,76px);gap:8px}
#game-hud[data-game="stay"] .action-buttons button{width:76px;height:76px;min-width:76px;padding:8px}
@media(max-width:600px){#game-hud .action-buttons button strong{font-size:11px}#game-hud .score-panel{min-width:0;padding:8px 12px}#game-hud .score-panel small{font-size:10px}}

/* On desktop the entire shelf, pager and footer share one viewport. */
#lobby[data-layout="viewport"]{max-width:1920px;height:100dvh;padding:20px 3vw 12px;overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box}
#lobby[data-layout="viewport"] .lobby-header{min-height:80px;height:80px;flex:0 0 80px;margin:0 0 10px}
#lobby[data-layout="viewport"] .lobby-header h1{font-size:42px}
#lobby[data-layout="viewport"] .game-shelf{display:flex;flex-direction:column;flex:1;min-height:0;max-width:none}
#lobby[data-layout="viewport"] .shelf-top{flex:0 0 42px;margin-bottom:10px}
#lobby[data-layout="viewport"] .shelf-top p{max-width:none;font-size:14px;margin:0}
#lobby[data-layout="viewport"] .search{min-height:38px;padding:7px 14px}
#lobby[data-layout="viewport"] #categories{flex-wrap:nowrap;min-height:42px;margin-bottom:14px;gap:9px}
#lobby[data-layout="viewport"] .category{min-height:38px;padding:8px 17px;font-size:10px}
#lobby[data-layout="viewport"] .game-grid{flex:1;min-height:0;height:auto;grid-template-columns:repeat(var(--menu-columns),minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));grid-auto-rows:0;gap:16px}
#lobby[data-layout="viewport"] .game-card{aspect-ratio:auto;height:100%;min-height:0;border-radius:16px}
#lobby[data-layout="viewport"] .card-copy{left:16px;right:12px;bottom:16px;padding-right:24px}
#lobby[data-layout="viewport"] .game-name{font-size:clamp(18px,1.55vw,29px);line-height:1.15}
#lobby[data-layout="viewport"] .card-copy small{font-size:12px;margin-top:6px}
#lobby[data-layout="viewport"] .card-tag{left:13px;top:17px;font-size:8px;padding:4px 9px}
#lobby[data-layout="viewport"] .card-play{right:14px;bottom:18px}
#lobby[data-layout="viewport"] .shelf-controls{flex:0 0 44px;min-height:44px;margin-top:14px;gap:24px}
#lobby[data-layout="viewport"] .shelf-controls p{margin:2px 0 0;font-size:11px}
#lobby[data-layout="viewport"] .lobby-footer{flex:0 0 28px;min-height:28px;padding-top:6px;gap:26px}
#lobby[data-layout="viewport"] .lobby-footer .quiet-button{font-size:11px}
@media(max-height:700px){#lobby[data-layout="viewport"]{padding-top:12px;padding-bottom:8px}#lobby[data-layout="viewport"] .lobby-header{height:58px;min-height:58px;flex-basis:58px;margin-bottom:6px}#lobby[data-layout="viewport"] .lobby-header h1{font-size:30px}#lobby[data-layout="viewport"] .shelf-top{flex-basis:34px;margin-bottom:7px}#lobby[data-layout="viewport"] #categories{margin-bottom:10px;min-height:36px}#lobby[data-layout="viewport"] .category{min-height:34px;padding:5px 14px}#lobby[data-layout="viewport"] .game-grid{gap:12px}#lobby[data-layout="viewport"] .card-copy small{display:none}#lobby[data-layout="viewport"] .shelf-controls{margin-top:10px;flex-basis:38px;min-height:38px}#lobby[data-layout="viewport"] .shelf-controls .round-button{width:36px;height:36px;min-width:36px;min-height:36px}#lobby[data-layout="viewport"] .lobby-footer{flex-basis:23px;min-height:23px}}
/* Keep complete words inside football controls at every screen width. */
body.football-controls #game-hud .action-buttons{grid-template-columns:repeat(3,72px);gap:8px;max-width:none}
body.football-controls #game-hud .action-buttons button{width:72px;height:72px;min-width:72px;min-height:72px;padding:5px}
body.football-controls #game-hud .action-buttons button strong{font-size:10px;overflow-wrap:normal;word-break:normal}
@media(max-width:600px){body.football-controls #game-hud .action-buttons{grid-template-columns:repeat(2,68px);gap:8px}body.football-controls #game-hud .action-buttons button{width:68px;height:68px;min-width:68px;min-height:68px;padding:4px}body.football-controls #game-hud .action-buttons button strong{font-size:9px}}

#lobby[data-layout="viewport"] #no-results{flex:1;min-height:0}
/* Lightweight launch and menu: visible before any 3D asset download. */
body.in-launch,body.in-lobby{background:linear-gradient(#17140b66,#17100cdd),url('assets/previews/football.jpg') center/cover fixed}
body.in-launch #world,body.in-lobby #world{visibility:hidden}
#game-hud{height:100dvh;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
.camera-tools{position:absolute;top:115px;right:max(16px,env(safe-area-inset-right));display:flex;align-items:center;gap:6px;pointer-events:auto;padding:6px;border-radius:12px;background:#231b13d9}
.camera-tools button{min-width:40px;min-height:40px;border:1px solid #d5bc83;border-radius:8px;color:#f3dfb5;background:#34291d;font-size:15px}
.camera-tools label{display:flex;gap:5px;align-items:center;font-size:12px}.camera-tools input{width:85px;accent-color:#f4b83e}
#joystick,.action-buttons,.action-buttons button,[data-move],.camera-tools{touch-action:none;user-select:none;-webkit-user-select:none}
.play-bottom{bottom:max(22px,env(safe-area-inset-bottom));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right))}
body.full-window #lobby,body.full-window #game-hud{height:100dvh}
@media(pointer:coarse){#keyboard-hint,.action-buttons button span{display:none}#joystick{width:116px;height:116px}.action-buttons button{touch-action:none}.camera-tools{top:100px}.match-header{padding:12px}.score-panel{max-width:calc(100vw - 150px)}}
@media(max-height:520px) and (orientation:landscape){.match-header{padding:6px 14px}.score-panel{padding:5px 12px}.score-panel strong{font-size:18px}.camera-tools{top:8px;right:85px}.camera-tools label{font-size:0}.camera-tools input{width:70px}.match-header .score-panel{max-width:260px;margin-right:150px}body.football-controls #game-hud .action-buttons{grid-template-columns:repeat(3,58px);gap:6px}body.football-controls #game-hud .action-buttons button{width:58px;height:58px;min-width:58px;min-height:58px;font-size:9px}#joystick{width:100px;height:100px}#announcement{top:75px;font-size:11px;padding:5px 10px}.play-bottom{bottom:max(12px,env(safe-area-inset-bottom))}}

/* No selection handles or iOS copy callout while holding game controls. */
body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input:not([type]),input[type="text"],input[type="search"],input[type="email"],input[type="url"],input[type="number"],textarea,[contenteditable="true"]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
#world,#game-hud,#game-hud *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}

/* One quiet control, with the full tool set available only when opened. */
.view-options{position:relative;flex:0 0 44px;z-index:12;pointer-events:auto}
.view-options>summary{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;list-style:none;border:2px solid #35230f;border-radius:50%;background:#f2dfb3;color:#35230f;box-shadow:0 3px 0 #24170d;font-family:Bungee,sans-serif;font-size:10px;cursor:pointer;touch-action:manipulation}
.view-options>summary::-webkit-details-marker{display:none}
.view-options[open]>summary{background:#f4b83e}
.view-options>summary:focus-visible,#view-options button:focus-visible{outline:3px solid #fff2c7;outline-offset:3px}
#view-options:not([open])>.camera-tools{display:none}
#view-options>.camera-tools{top:52px;right:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:min(272px,calc(100vw - 48px));max-height:calc(100dvh - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;padding:12px;background:#241b13f5;border:1px solid #b99b63;border-radius:14px;box-shadow:0 8px 24px #0006;overscroll-behavior:contain;touch-action:pan-y}
#view-options .camera-tools button{width:auto;min-width:0;min-height:44px;padding:6px;font-size:11px;line-height:1.25;touch-action:manipulation}
#view-options #camera-button{grid-column:span 2}
#view-options .camera-tools label{grid-column:1/-1;min-height:44px;gap:12px;font-size:12px}
#view-options .camera-tools input{flex:1;min-width:0;width:100%;height:44px;touch-action:none}
#view-options #view-close{grid-column:1/-1;background:#eedcb0;color:#30210f}
@media(max-width:900px),(pointer:coarse),(max-height:520px){
 .match-header{align-items:flex-start;gap:8px;padding-left:0;padding-right:0}
 .match-header>#pause-button{width:44px;height:44px;flex:0 0 44px}
 .match-header .score-panel{min-width:0;flex:1;max-width:360px;margin-right:0}
}

/* Screen orientation lives in View, leaving the action pad clear. */
#orientation-controls{display:none;grid-column:1/-1;padding-bottom:10px;border-bottom:1px solid #b99b634d}
.touch-ui #orientation-controls{display:block}
@media(any-pointer:coarse){#orientation-controls{display:block}}
.orientation-title{display:block;margin-bottom:8px;color:#f2dfb3;font:12px Bungee,sans-serif}
.orientation-choices{display:grid;grid-template-columns:1.2fr 1fr .7fr;gap:5px}
#view-options .orientation-choices button{font-size:10px;padding:6px 3px}
#view-options .orientation-choices button[aria-pressed=true]{background:#f4b83e;color:#30210f;border-color:#f4b83e}
#orientation-status{margin:8px 0 0;color:#e5d4b2;font:12px/1.4 sans-serif;text-align:left}

#view-options .camera-preset-label{display:grid;gap:6px;color:#f2dfb3;font:12px Bungee,sans-serif}
#camera-preset{width:100%;min-width:0;min-height:44px;padding:9px;border:1px solid #b99b63;border-radius:9px;background:#f2dfb3;color:#30210f;font:12px Bungee,sans-serif;touch-action:manipulation}
#camera-preset:focus-visible{outline:3px solid #f4b83e;outline-offset:2px}
