/* The whole title menu fits its frame; the page itself remains scrollable. */
.run-seed-controls {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;}
.run-seed-controls label {color:#d9bc78;}
.run-seed-controls input {background:#161616;color:#ead9b4;border:1px solid #75603a;text-align:center;font-family:'Upheaval',monospace;}
#runSeedBadge {border:1px solid #8b7442;background:#18130e;color:#efd99c;padding:4px 8px;font:18.6667px 'Jersey 10 Canvas',sans-serif;cursor:pointer;}
#runSeedBadge[hidden] {display:none;}
#runSeedBadge[data-mode='pause'] {display:block;width:100%;margin-top:5px;}
#runSeedBadge[data-mode='over'] {position:absolute;bottom:12px;left:50%;transform:translateX(-50%);z-index:6;white-space:nowrap;}
#gameWrap:has(#audioMenu[data-mode="title"]) {min-height:460px;}
#audioMenu[data-mode="title"] {top:30% !important;max-height:68% !important;font-size:14px !important;}
#audioMenu[data-mode="title"] button {font-size:14px !important;padding:5px !important;}
/* Pause controls and the canvas inventory share the same reserved layout. */
#audioMenu[data-mode="paused"] {left:var(--pause-audio-left) !important;top:var(--pause-audio-top) !important;bottom:auto !important;width:var(--pause-audio-width) !important;max-height:var(--pause-audio-height) !important;transform:scale(var(--pause-menu-scale)) !important;transform-origin:top left;box-sizing:border-box;}
#audioMenu[data-mode="paused"] label {grid-template-columns:80px minmax(0,1fr) 42px !important;}
#audioMenu[data-mode="paused"] #floorSettings label {grid-template-columns:90px minmax(0,1fr) 42px !important;}
.canvas-wrap:fullscreen:has(#audioMenu[data-mode="title"]),.canvas-wrap.pseudo-fullscreen:has(#audioMenu[data-mode="title"]) {min-height:0;}

/* Player identity is optional: the prefilled random name is ready to play. */
.nickname-controls {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;}
.nickname-controls label {color:#d9bc78;}
.lobby-list {display:grid;grid-template-columns:minmax(0,1fr);gap:2px;}
.lobby-summary {display:flex;justify-content:space-between;gap:6px;color:#f7d36a;font-size:12px;line-height:1.1;}
.lobby-roster {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:2px 8px;margin-top:4px;}
.lobby-person {display:flex;align-items:center;gap:5px;min-width:0;font:18px/1 'Jersey 10 Canvas',sans-serif;}
.lobby-person img {width:22px;height:22px;flex-shrink:0;image-rendering:pixelated;object-fit:contain;}
.lobby-person>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* Pinned-paper main menu: existing controls remain usable on mouse, touch and keys. */
#audioMenu[data-mode="title"] {background:#ddd5c5 !important;color:#352b29 !important;border:3px solid #63554b !important;box-shadow:5px 7px 0 #51483d66;}
@keyframes paper-arrive {from{opacity:0;translate:0 -14px;}to{opacity:1;translate:0 0;}}
/* Native canvas menus replace the visible DOM panels. Back-end controls remain
   available to the game systems, and one invisible input invokes phone keyboards. */

#lobbyMenu,#audioMenu[data-mode="title"] {display:none !important;}
