/* PAGE 2 ONLY — lobby reference implementation. Do not style #home here. */
#lobby.lobby-page{position:relative;width:min(980px,calc(100% - 48px));margin:26px auto 0;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;z-index:1}
#lobby .lobby-title{font-size:48px;line-height:1;margin:0 0 28px;letter-spacing:-2px}
/* Builder removed the subtitle node. Render it from Page-2 CSS so Page 1 remains untouched. */
#lobby .lobby-title::after{content:"Invite your friends and choose the player pool.";display:block;margin-top:8px;font-size:15px;line-height:1.45;font-weight:400;letter-spacing:0;color:#888}
#lobby .lobby-grid{display:grid!important;grid-template-columns:1.18fr .82fr;gap:10px;align-items:stretch;position:relative;clear:both}
#lobby .lobby-managers-panel,#lobby .lobby-side-card{background:#151515;border:1px solid #555;border-radius:7px}
#lobby .lobby-managers-panel{padding:12px 16px;display:flex;flex-direction:column;min-height:420px;overflow:hidden}
#lobby .lobby-panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
#lobby .lobby-panel-head h2,#lobby .lobby-side-card h2{font-size:19px;letter-spacing:0;margin:0}
#lobby .joined-count{font-size:10px;color:#ddd}
#lobby .manager-list{display:flex;flex-direction:column;border:1px solid #444;border-radius:5px;overflow:hidden}
#lobby .manager-row{height:31px;display:flex;align-items:center;border-bottom:1px solid #444;padding:0 9px;gap:10px;font-size:12px;background:#171717}
#lobby .manager-row:last-child{border-bottom:0}
#lobby .manager-avatar{width:23px;height:23px;flex:0 0 23px;border-radius:50%;display:grid;place-items:center;background:#d46d20;color:#fff;font-size:11px;font-weight:800}
#lobby .manager-row.empty .manager-avatar{background:transparent;border:1px dashed #555;color:transparent}
#lobby .manager-row.empty .manager-name{color:#ddd}
#lobby .manager-name{font-weight:500;white-space:nowrap}
#lobby .manager-tags{display:flex;gap:5px}
#lobby .manager-tag{font-size:7px;line-height:14px;padding:0 6px;border:1px solid #555;border-radius:3px;color:#bbb}
#lobby .manager-status{margin-left:auto;display:flex;align-items:center;gap:5px;font-size:9px;color:#ddd}
#lobby .status-dot{width:5px;height:5px;border-radius:50%;background:#888}#lobby .status-dot.ready{background:#63c875}#lobby .status-dot.wait{background:#888}
#lobby .minimum-note{font-size:9px;color:#777;margin:7px 0 5px}
#lobby .lobby-actions{display:flex!important;flex-direction:row!important;gap:12px!important;margin-top:auto!important;width:100%!important;align-items:stretch!important}
#lobby .lobby-actions button,#lobby .lobby-actions #start{box-sizing:border-box!important;position:static!important;float:none!important;flex:1 1 0!important;width:0!important;min-width:0!important;height:46px!important;min-height:46px!important;max-height:46px!important;margin:0!important;padding:0 12px!important;border-radius:6px!important;font-size:17px!important;line-height:1!important;font-weight:800!important;white-space:nowrap!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
#lobby .lobby-actions #start.hidden,#lobby .lobby-actions #lobbyReady.hidden{display:none!important}
#lobby #start,#lobby #lobbyReady{background:#d46d20;border-color:#e58a4b;color:#fff}
#lobby #lobbyReady.active{background:#2d7b3d;border-color:#63c875}
#lobby .leave-lobby{background:#151515;border-color:#555;color:#fff}
#lobby .lobby-side{display:grid;grid-template-rows:auto 1fr;gap:5px;min-width:0}
#lobby .lobby-side-card{padding:10px 16px;border-color:#b75b16;background:#15130f;min-width:0}
#lobby .invite-card{min-height:123px}
#lobby .side-card-head{display:flex;align-items:center;justify-content:space-between}
#lobby .host-only{margin-left:0;margin-right:0;font-size:7px;padding:3px 7px;border:1px solid #555;border-radius:3px;color:#aaa}
#lobby .side-help{font-size:9px;color:#777;margin:1px 0 5px}
#lobby .invite-code-wrap{position:relative}
#lobby #roomCode{height:38px;margin:0;display:flex;align-items:center;justify-content:center;border:1px solid #555;border-radius:5px;background:#171717;font-size:26px;letter-spacing:8px;font-weight:800}
#lobby .code-eye{position:absolute;right:8px;top:4px;width:31px;height:31px;padding:4px;border:0;background:transparent}
#lobby .code-eye svg{display:block;width:100%;height:100%}
#lobby .copy-invite{height:28px;width:100%;margin-top:6px;padding:0;background:#eee4d5;color:#111;border-color:#777;font-size:17px;font-weight:800}
#lobby .invite-foot{font-size:8px;font-style:italic;color:#777;text-align:center;margin:3px 0 0}
#lobby .settings-card{padding-top:11px}
#lobby .settings-name{display:none!important}
#lobby .lobby-setting-label{display:block;margin:6px 0 5px;font-size:11px;font-weight:600}
#lobby .lobby-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
#lobby .lobby-setting-btn{height:28px;min-width:0;padding:0 5px;border-radius:5px;font-size:11px;font-weight:500;line-height:1.05;overflow:hidden}
#lobby .lobby-setting-btn.active{background:rgba(203,104,34,.5);border-color:#cb6822}
#lobby .lobby-bottom-settings{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:8px;margin-top:5px}
#lobby .lobby-two-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;min-width:0}
#lobby .lobby-two-choice button:first-child{border-radius:5px 0 0 5px}#lobby .lobby-two-choice button:last-child{border-radius:0 5px 5px 0}
#lobby .setting-foot{font-size:7px;font-style:italic;color:#777;margin-top:3px}
#lobby .lobby-error{margin:3px 0 0;min-height:12px;font-size:10px}
/* The lobby HTML has exactly two valid direct grid children. Anything else is stale Builder markup and must never render. */
#lobby .lobby-grid > *{display:none!important}
#lobby .lobby-grid > .lobby-managers-panel{display:flex!important}
#lobby .lobby-grid > .lobby-side{display:grid!important}
/* Only the settings card inside the right-hand column is valid. */
#lobby .settings-card{display:none!important}
#lobby .lobby-grid > .lobby-side > .settings-card{display:flex!important;flex-direction:column!important;gap:5px!important}
/* Only title + grid belong directly under Page 2. */
#lobby.lobby-page > *{display:none!important}
#lobby.lobby-page > .lobby-title{display:block!important}
#lobby.lobby-page > .lobby-grid{display:grid!important}
@media(max-width:900px){#lobby.lobby-page{width:calc(100% - 28px)}#lobby .lobby-grid{grid-template-columns:1fr}#lobby .lobby-managers-panel{min-height:400px}}
