.home-shell { width:min(1580px,100%); height:100%; min-height:700px; margin:0 auto; }
.lobby-dashboard { height:100%; min-height:700px; display:grid; grid-template-columns:minmax(0,1fr) clamp(232px,21%,288px); grid-template-rows:minmax(0,1fr) minmax(0,.82fr); gap:14px; }
.lobby-primary,.lobby-sidebar { display:contents; }
.rooms-panel { grid-column:1; grid-row:1; }
.dashboard-chat { grid-column:1; grid-row:2; }
.people-card { grid-column:2; grid-row:1 / span 2; }
.rooms-panel,.dashboard-chat,.people-card { min-width:0; min-height:0; overflow:hidden; border:1px solid rgba(91,137,181,.25); border-radius:17px; background:radial-gradient(circle at 90% -10%,rgba(65,134,194,.1),transparent 33%),linear-gradient(145deg,rgba(12,29,45,.98),rgba(7,20,34,.97)); box-shadow:0 18px 48px rgba(0,0,0,.2),inset 0 1px rgba(255,255,255,.035); }

.rooms-panel { display:grid; grid-template-rows:auto auto minmax(0,1fr); }
.rooms-panel.room-browser { grid-template-rows:auto minmax(0,1fr); }
.rooms-head { min-height:76px; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:14px 24px; border-bottom:1px solid var(--line); }
.rooms-head h1 { margin:3px 0 0; font-size:24px; line-height:1; letter-spacing:-.025em; }.rooms-head p { margin:6px 0 0; color:var(--muted); font-size:11px; }.rooms-help { max-width:230px; color:var(--muted); font-size:10px; line-height:1.45; text-align:right; }
.section-kicker,.toolbar-title > span { color:#5aa0e6; font-size:10px; font-weight:850; letter-spacing:.14em; text-transform:uppercase; }
.room-toolbar {
    min-height:0;
    display:flex;
    align-items:stretch;
    justify-content:center;
    flex-wrap:nowrap;
    gap:10px;
    padding:10px 16px;
    border-bottom:1px solid rgba(126,153,185,.08);
    background:linear-gradient(90deg,rgba(5,17,30,.5),rgba(13,36,55,.28),rgba(5,17,30,.42));
    overflow:hidden;
}
.toolbar-title h2 { margin:4px 0 0; font-size:18px; }.toolbar-title p { margin:5px 0 0; color:var(--muted); font-size:10px; }
.mode-grid {
    flex:0 1 auto;
    display:grid;
    grid-template-columns:repeat(3, minmax(72px, 104px));
    align-items:stretch;
    gap:6px;
    min-width:0;
}
.mode-card { position:relative; min-height:46px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; overflow:hidden; padding:7px 6px; border:1px solid rgba(126,153,185,.18); border-radius:10px; background:linear-gradient(145deg,rgba(14,36,55,.92),rgba(7,20,34,.92)); color:var(--text); font:inherit; text-align:center; cursor:pointer; isolation:isolate; transition:border-color .18s,background .18s,transform .18s,box-shadow .18s; }
.mode-card b { font-size:16px; font-weight:800; line-height:1; font-variant-numeric:tabular-nums; }
.mode-card small { color:var(--muted); font-size:9px; line-height:1; white-space:nowrap; }
.mode-card::after { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(110deg,transparent 30%,rgba(85,166,222,.08)); opacity:0; transition:opacity .18s; }.mode-card:hover { border-color:rgba(104,170,225,.48); transform:translateY(-2px); box-shadow:0 10px 24px rgba(0,0,0,.18); }.mode-card:hover::after { opacity:1; }.mode-card:active { transform:translateY(0) scale(.985); }
.mode-card.is-active { border-color:#589bd9; background:linear-gradient(145deg,rgba(31,76,116,.72),rgba(10,34,55,.96)); box-shadow:0 8px 18px rgba(3,13,23,.28); }.mode-card.is-active b { color:#dff0ff; }.mode-card.is-active small { color:#9cc6e8; }
.room-actions { flex:0 0 auto; display:flex; align-items:stretch; justify-content:center; gap:8px; min-width:0; }
.room-actions .btn { min-height:46px; display:flex; align-items:center; justify-content:center; padding:7px 9px; transition:transform .16s,box-shadow .16s,border-color .16s; }
.room-actions .btn:hover { transform:translateY(-2px); }
.room-actions .primary { box-shadow:0 10px 20px rgba(24,108,188,.18); }
.room-actions .btn b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.room-actions .search-game {
    width:auto;
    min-width:0;
    padding:7px 18px;
}
.room-actions .create-shortcut {
    width:46px;
    min-width:46px;
    flex:0 0 46px;
    padding:0;
    border-color:rgba(145,171,194,.28);
    background:rgba(7,18,29,.72);
    color:#e8eef5;
}
.room-actions .create-shortcut b { font-size:22px; font-weight:500; line-height:1; }
.mode-count-short,
.action-find-short { display:none; }
.mode-count-full,
.action-find-full { display:inline; }

.room-grid { min-height:0; overflow-y:auto; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:9px; margin:0 16px 14px; padding:12px 2px 0 0; scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; }
.lobby-room { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 12px; padding:12px; border:1px solid var(--line); border-radius:11px; background:linear-gradient(135deg,rgba(9,25,40,.9),rgba(5,15,28,.78)); transition:transform .16s,border-color .16s,box-shadow .16s; }.lobby-room:hover { transform:translateY(-1px); border-color:rgba(89,150,205,.34); box-shadow:0 10px 24px rgba(0,0,0,.16); }
.room-card-main { grid-column:1/-1; display:flex; align-items:center; gap:9px; min-width:0; }.room-sigil { width:38px; height:38px; flex:0 0 auto; display:grid; place-items:center; transform:rotate(45deg); border:1px solid rgba(31,130,255,.55); background:radial-gradient(circle,rgba(26,118,241,.2),rgba(6,16,30,.95)); }.room-sigil img { width:21px; height:21px; transform:rotate(-45deg); filter:hue-rotate(190deg) saturate(1.4); }
.room-card-copy { min-width:0; flex:1; }.room-card-copy h3,.room-card-copy p { overflow:hidden; margin:0; text-overflow:ellipsis; white-space:nowrap; }.room-card-copy h3 { font-size:13px; }.room-card-copy p { margin-top:3px; color:var(--muted); font-size:11px; }
.room-card-meta { display:flex; align-items:center; }.room-avatars { display:flex; }.room-avatars i,.room-avatars b { width:25px; height:25px; display:grid; place-items:center; overflow:hidden; margin-right:-6px; border:1px solid #425775; border-radius:50%; background:#0d1b2d; }.room-avatars img { width:100%; height:100%; object-fit:cover; }.room-avatars b { margin-left:4px; color:var(--muted); font-size:10px; }.room-count { margin-left:12px; color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }.room-enter { min-width:82px; min-height:33px; padding:6px 11px; border-color:#187bf4; color:#70b3ff; background:rgba(20,111,229,.11); font-size:11px; }
.room-seat-tokens i { background: radial-gradient(circle at 50% 42%,#6b94b6 0 15%,transparent 16%),radial-gradient(ellipse at 50% 86%,#34536f 0 30%,transparent 31%),#0d1b2d; }

.room-grid:has(> .lobby-empty) { align-content:stretch; }

.lobby-empty {
    position:relative;
    grid-column:1/-1;
    height:100%;
    min-height:260px;
    display:grid;
    place-items:center;
    overflow:hidden;
    padding:0;
    border:1px solid rgba(91,137,181,.18);
    border-radius:13px;
    background:#06111b;
    color:var(--muted);
    isolation:isolate;
}
.lobby-empty > img {
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center 48%;
    opacity:.95;
}
.lobby-empty::before {
    content:'';
    position:absolute;
    inset:0;
    z-index:1;
    background:radial-gradient(ellipse at 50% 52%, rgba(3,10,17,.58), rgba(3,9,16,.84) 74%);
}
.empty-room-content { position:relative; z-index:2; display:grid; justify-items:center; padding:18px 22px; text-align:center; }
.lobby-empty h3 {
    margin:0;
    max-width:20ch;
    color:#f4f6f8;
    font-size:clamp(17px, 1.6vw, 23px);
    font-weight:850;
    line-height:1.3;
    letter-spacing:-.02em;
    text-shadow:0 2px 20px rgba(0,0,0,.75);
    text-wrap:balance;
}
.empty-create { min-height:40px; margin-top:15px; padding:9px 20px; border-color:rgba(120,110,232,.5); color:#eaf1ff; background:linear-gradient(118deg,#6f52d0,#4f76d8 55%,#438ed9); box-shadow:0 10px 24px rgba(60,80,160,.28); font-size:12.5px; }
.empty-create:hover { transform:translateY(-1px); }

.dashboard-chat { display:flex; flex-direction:column; min-height:0; }.dashboard-chat > header { display:none; }
.dashboard-chat #homeChat { flex:1 1 auto; min-height:0; height:100%; padding:0 20px 14px; }.dashboard-chat .community-chat { width:100%; height:100%; min-height:0; margin:0; display:grid; grid-template-rows:auto minmax(0,1fr); border:0; border-radius:0; background:transparent; box-shadow:none; }.dashboard-chat .community-chat-head { min-height:38px; padding:0; border:0; }.dashboard-chat .community-scopes { width:320px; }.dashboard-chat .community-scope { min-height:36px; padding:5px 16px; border-radius:8px; font-size:12px; }.dashboard-chat .community-chat-body { min-height:0; margin-top:8px; border:1px solid rgba(126,153,185,.14); border-radius:11px; background:rgba(7,20,33,.48); }.dashboard-chat .community-thread { min-height:0; }.dashboard-chat .thread-messages { min-height:0; padding:12px; }.dashboard-chat .thread-empty,.dashboard-chat .chat-loading { min-height:170px; font-size:11px; }.dashboard-chat .thread-empty { display:grid; place-content:center; justify-items:center; padding:14px; text-align:center; }.dashboard-chat .thread-empty img { width:180px; max-height:105px; object-fit:cover; border-radius:12px; opacity:.62; filter:saturate(.66); mask-image:radial-gradient(ellipse,black 46%,transparent 78%); }.dashboard-chat .thread-empty b { margin-top:2px; color:var(--text); font-size:13px; }.dashboard-chat .thread-empty span { max-width:38ch; margin-top:5px; color:var(--muted); font-size:11px; line-height:1.45; }.dashboard-chat .community-compose { padding:9px; border-top:1px solid var(--line); }.dashboard-chat .community-input { min-height:44px; padding:12px 58px 12px 12px; font-size:13px; }.dashboard-chat .thread-message p { font-size:12.5px; }

.lobby-side-dock,
.lobby-drawer-scrim,
.side-panel-close { display:none; }

.people-card { display:grid; grid-template-rows:auto minmax(0,1fr); }
.people-head { display:flex; align-items:center; gap:7px; padding:12px 12px 8px; }
.people-head .people-tabs { flex:1 1 auto; min-width:0; margin:0; }
.people-card h2 { margin:3px 0 0; font-size:20px; }
.people-card .online-count { flex:0 0 auto; display:flex; align-items:center; gap:5px; padding:6px 9px; border:1px solid rgba(69,177,166,.2); border-radius:999px; color:var(--muted); font-size:10px; white-space:nowrap; }.people-card .online-count i { width:6px; height:6px; flex:0 0 auto; border-radius:50%; background:var(--cyan); }.people-card .online-count b { color:var(--text); font-size:12px; font-variant-numeric:tabular-nums; }
.people-tabs { display:grid; grid-template-columns:repeat(2,1fr); gap:4px; margin:0 13px; padding:5px; border:1px solid rgba(126,153,185,.11); border-radius:10px; background:rgba(5,16,28,.35); }.people-tabs button { min-height:32px; overflow:hidden; padding:6px 6px; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--muted); font:inherit; font-size:12px; text-overflow:ellipsis; white-space:nowrap; font-weight:750; cursor:pointer; transition:color .16s,background .16s,border-color .16s; }.people-tabs button:hover { color:#dbeaf7; }.people-tabs button.is-active { border-color:rgba(88,157,220,.35); background:rgba(46,100,151,.38); color:#fff; }
.people-list { min-height:0; overflow-y:auto; padding:4px 10px 10px; scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; }.people-list[hidden] { display:none; }.person-row { width:100%; min-height:55px; display:flex; align-items:center; gap:8px; padding:7px 3px; border-bottom:1px solid var(--line); color:var(--text); }.person-row:last-child { border-bottom:0; }.person-main { min-width:0; flex:1 1 auto; display:flex; align-items:center; gap:10px; padding:0; border:0; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }.person-actions { flex:0 0 auto; display:flex; align-items:center; gap:4px; }.person-act { width:26px; height:26px; padding:0; display:grid; place-items:center; border:1px solid transparent; border-radius:8px; cursor:pointer; transition:background .16s,border-color .16s,color .16s; }.person-act svg { width:13px; height:13px; }.person-act:disabled { opacity:.5; cursor:default; }.person-write { border-color:rgba(126,153,185,.26); background:rgba(15,34,54,.5); color:#9db6ce; }.person-write:hover { border-color:rgba(126,166,214,.5); background:rgba(32,66,100,.5); color:#e0edf9; }.person-star { border-color:rgba(126,153,185,.22); background:rgba(15,34,54,.4); color:#8b9db1; }.person-star:hover { border-color:rgba(232,196,107,.45); background:rgba(232,196,107,.12); color:#e8c46b; }.person-star.is-on { border-color:rgba(232,196,107,.5); background:rgba(232,196,107,.14); color:#e8c46b; }
.person-watch { border-color:rgba(88,157,220,.34); background:rgba(46,100,151,.26); color:#a8d3fb; }.person-watch:hover { border-color:rgba(112,179,255,.55); background:rgba(58,124,186,.4); color:#e8f4ff; }
.person-you { margin-left:4px; color:var(--muted); font-size:10px; font-weight:600; }.person-avatar { position:relative; width:34px; height:34px; flex:0 0 auto; overflow:hidden; border:1px solid #294462; border-radius:50%; background:#0d1b2d; }.person-avatar img { width:100%; height:100%; object-fit:cover; }.person-avatar i { position:absolute; right:1px; bottom:1px; width:8px; height:8px; border:2px solid #071321; border-radius:50%; background:var(--cyan); box-shadow:0 0 7px var(--cyan); }.person-copy { min-width:0; flex:1; }.person-copy b,.person-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.person-copy b { font-size:13px; }.person-copy small { margin-top:3px; color:var(--muted); font-size:11px; }.person-row em { flex:0 0 auto; color:#71adf6; font-size:11px; font-style:normal; white-space:nowrap; }.people-empty { height:100%; min-height:190px; display:grid; place-content:center; justify-items:center; padding:20px; text-align:center; }.people-empty b,.people-empty span { display:block; }.people-empty b { font-size:13px; }.people-empty span { max-width:25ch; margin-top:5px; color:var(--muted); font-size:11px; line-height:1.5; }

.mode-card:focus-visible,.room-actions .btn:focus-visible,.people-tabs button:focus-visible,.person-main:focus-visible,.person-act:focus-visible,.room-enter:focus-visible,.empty-create:focus-visible,.side-dock-btn:focus-visible,.side-panel-close:focus-visible { outline:2px solid #77b8ee; outline-offset:2px; }
.person-row { padding-inline:6px; border-radius:8px; transition:background .16s; }.person-row:hover { background:rgba(52,105,151,.13); }
.dashboard-chat .community-chat-body { background:radial-gradient(circle at 50% 38%,rgba(45,103,153,.08),transparent 36%),rgba(7,20,33,.52); }

.rooms-panel.is-assembly { grid-template-rows:minmax(0,1fr); }
.room-assembly { min-height:0; height:100%; display:grid; grid-template-rows:minmax(0,1fr) auto; gap:12px; padding:14px 16px 15px; }
.assembly-roster { min-width:0; min-height:0; display:flex; flex-direction:column; padding:12px 14px; border:1px solid rgba(101,157,207,.17); border-radius:14px; background:rgba(5,17,29,.46); }
.assembly-roster > header {
    display:grid;
    grid-template-columns:auto auto;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    min-height:34px;
}
.assembly-roster > header .section-kicker { margin:0; }
.assembly-head-meta { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.assembly-add-bot {
    width:30px;
    height:30px;
    display:inline-grid;
    place-items:center;
    padding:0;
    border:1px solid rgba(108,153,190,.28);
    border-radius:8px;
    color:#9ec8e8;
    background:rgba(7,18,29,.45);
    font-size:16px;
    line-height:1;
    cursor:pointer;
}
.assembly-add-bot:hover:not(:disabled) { border-color:rgba(120,190,220,.45); color:#d7f0ff; background:rgba(20,48,70,.55); }
.assembly-add-bot:disabled { opacity:.38; cursor:default; }
.assembly-count { color:rgba(158,176,194,.72); font-size:11px; font-weight:650; font-variant-numeric:tabular-nums; letter-spacing:.02em; }
.start-countdown-overlay {
    position:fixed;
    inset:0;
    z-index:90;
    display:grid;
    place-items:center;
    padding:max(14px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    background:rgba(3,9,17,.78);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    animation:start-countdown-in .28s ease-out;
}
.start-countdown-card {
    position:relative;
    width:min(100%, 420px);
    max-height:100%;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    border:1px solid rgba(169,190,211,.28);
    border-radius:22px;
    background:linear-gradient(150deg, #122033, #08131e 72%);
    box-shadow:0 28px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(133,109,232,.12);
}
.start-countdown-art {
    display:block;
    width:100%;
    flex:0 1 auto;
    min-height:0;
    max-height:min(42vh, 300px);
    object-fit:contain;
    object-position:center center;
    background:#06101a;
}
.start-countdown-dial {
    flex:0 0 auto;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:4px;
    padding:18px 20px 22px;
    text-align:center;
    border-top:1px solid rgba(145,171,194,.14);
    background:linear-gradient(180deg, rgba(12,24,36,.96), rgba(6,14,22,.98));
}
.start-countdown-kicker {
    color:#bdda38;
    font-size:11px;
    font-weight:800;
    letter-spacing:.18em;
    text-transform:uppercase;
}
.start-countdown-num {
    min-width:1.2em;
    color:#f4f6f8;
    font-size:clamp(52px, 14vw, 72px);
    font-weight:900;
    line-height:1;
    font-variant-numeric:tabular-nums;
    letter-spacing:-.03em;
    text-shadow:0 0 28px rgba(133,109,232,.35);
}
.start-countdown-dial small {
    color:var(--muted, #8794a2);
    font-size:12px;
    font-weight:650;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.start-countdown-leave {
    min-height:42px;
    margin-top:14px;
    padding:9px 20px;
    border-color:rgba(145,171,194,.26);
    background:rgba(7,18,29,.6);
    color:#c7d3de;
    font-size:13px;
}
.start-countdown-leave:hover { border-color:rgba(200,130,130,.45); color:#f4dada; }
.start-countdown-leave:focus-visible { outline:2px solid #77b8ee; outline-offset:2px; }
.start-countdown-overlay.is-steady { animation:none; }
@keyframes start-countdown-in {
    from { opacity:0; transform:translateY(8px); }
    to { opacity:1; transform:none; }
}
@media (prefers-reduced-motion:reduce) {
    .start-countdown-overlay { animation:none; }
}
.assembly-exit { min-height:30px; padding:5px 10px; border-color:rgba(145,171,194,.18); color:#aebdca; background:rgba(7,18,29,.45); font-size:10px; }
.assembly-exit:hover { border-color:rgba(180,120,120,.35); color:#f0d0d0; }
.assembly-progress { height:4px; overflow:hidden; margin:10px 0 11px; border-radius:999px; background:rgba(116,151,181,.12); }.assembly-progress i { width:var(--room-fill); height:100%; display:block; border-radius:inherit; background:linear-gradient(90deg,#467fb4,#56bdb2); box-shadow:0 0 14px rgba(76,185,173,.25); transition:width .25s; }
.assembly-seat-grid { min-height:0; flex:1 1 auto; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; overflow-y:auto; }.assembly-seat { position:relative; min-width:0; min-height:72px; display:flex; align-items:center; gap:7px; padding:7px; border:1px solid rgba(109,148,181,.16); border-radius:10px; background:linear-gradient(145deg,rgba(16,39,58,.76),rgba(7,21,34,.8)); }.assembly-seat.is-you { border-color:rgba(79,180,174,.5); box-shadow:inset 0 0 18px rgba(64,164,158,.08); }.assembly-seat.is-bot { border-style:dashed; }.assembly-seat:has(.seat-remove-bot) { padding-right:26px; }.assembly-seat.is-empty { opacity:.58; background:rgba(6,18,29,.48); }
.seat-remove-bot {
    position:absolute;
    top:4px;
    right:4px;
    z-index:1;
    width:20px;
    height:20px;
    display:inline-grid;
    place-items:center;
    padding:0;
    border:1px solid rgba(180,120,120,.35);
    border-radius:50%;
    color:#f0d0d0;
    background:rgba(28,12,16,.78);
    font-size:14px;
    line-height:1;
    cursor:pointer;
}
.seat-remove-bot:hover { border-color:rgba(220,140,140,.55); color:#fff; background:rgba(70,24,28,.9); }
.assembly-avatar { position:relative; width:39px; height:39px; flex:0 0 auto; display:grid; place-items:center; overflow:visible; border:1px solid #34536f; border-radius:50%; background:#0b2032; }.assembly-avatar img { width:100%; height:100%; overflow:hidden; border-radius:50%; object-fit:cover; }.assembly-avatar > i { position:absolute; top:-4px; right:-3px; color:#dfbd66; font-size:10px; font-style:normal; filter:drop-shadow(0 0 6px rgba(217,182,92,.35)); }.seat-placeholder { color:#7192aa; font-size:18px; }.assembly-seat-copy { min-width:0; }.assembly-seat-copy b,.assembly-seat-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.assembly-seat-copy b { font-size:9px; }.assembly-seat-copy small { margin-top:3px; color:var(--muted); font-size:7px; }
.seat-placeholder.bot { font-size:10px; font-weight:850; letter-spacing:.04em; }
.assembly-footer { display:flex; align-items:center; justify-content:flex-end; gap:12px; }
.assembly-controls { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.assembly-controls .btn { min-height:39px; padding:7px 12px; font-size:8px; }
.assembly-start { min-width:165px; display:flex; flex-direction:column; }
.assembly-start b { font-size:10px; }
.assembly-start small { margin-top:2px; color:rgba(231,243,251,.7); font-size:6px; }
.assembly-controls button:focus-visible,.assembly-exit:focus-visible,.assembly-add-bot:focus-visible,.seat-remove-bot:focus-visible { outline:2px solid #77b8ee; outline-offset:2px; }

@media (max-width:1100px) {
    .room-assembly { padding-inline:12px; }
    .assembly-seat-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .assembly-seat { min-height:53px; }
}

@media (min-width:761px) and (max-width:1199px) {
    .home-shell { width:100%; height:100%; min-height:0; }
    .lobby-dashboard { height:100%; min-height:0; grid-template-columns:minmax(0,1fr) clamp(256px,28%,300px); grid-template-rows:minmax(0,1.1fr) minmax(0,1fr); }
    .room-toolbar {
        min-height:0;
        justify-content:center;
        gap:8px;
        padding:10px 12px;
    }
    .mode-grid { grid-template-columns:repeat(3, minmax(68px, 96px)); gap:6px; }
    .mode-card { min-height:44px; padding:6px 5px; }
    .mode-card b { font-size:15px; }
    .room-actions .btn { min-height:44px; }
    .room-actions .create-shortcut { width:44px; min-width:44px; flex:0 0 44px; }
    .room-grid { margin-inline:12px; }
    .people-tabs { margin-inline:14px; }
    .people-list { padding-inline:11px; }
    .dashboard-chat #homeChat { padding:0 14px 12px; }
    .dashboard-chat .community-scopes { width:100%; }
}

@media (max-width:760px) {
    #view-game.is-active {
        display:flex;
        flex-direction:column;
        overflow:hidden;
        min-height:0;
    }
    .home-shell {
        flex:1 1 auto;
        width:100%;
        height:100%;
        min-height:0;
        display:flex;
        flex-direction:column;
    }
    .lobby-dashboard {
        position:relative;
        flex:1 1 auto;
        width:100%;
        height:100%;
        min-height:0;
        display:flex;
        flex-direction:column;
        gap:8px;
        padding:0;
        overflow:hidden;
    }
    .lobby-primary {
        display:grid;
        grid-template-rows:minmax(0, 1.08fr) minmax(0, 1fr);
        gap:6px;
        flex:1 1 auto;
        width:100%;
        min-width:0;
        min-height:0;
        overflow:hidden;
    }
    .lobby-sidebar { display:contents; }
    .rooms-panel,
    .dashboard-chat {
        width:100%;
        height:100%;
        min-height:0;
        max-height:none;
        border-radius:12px;
        overflow:hidden;
    }
    .rooms-panel.room-browser,
    .rooms-panel.is-assembly {
        display:flex;
        flex-direction:column;
        min-height:0;
    }
    .rooms-panel.room-browser .room-grid,
    .rooms-panel.is-assembly .room-assembly {
        flex:1 1 auto;
        min-height:0;
    }
    .dashboard-chat {
        display:flex;
        flex-direction:column;
    }
    .lobby-side-dock {
        position:fixed;
        top:42%;
        right:max(8px, env(safe-area-inset-right));
        z-index:40;
        display:flex;
        flex-direction:column;
        gap:8px;
        width:max-content;
        height:auto;
        margin:0;
        padding:0;
        border:0;
        background:transparent;
        box-shadow:none;
        pointer-events:none;
        transform:translateY(-50%);
    }
    .lobby-side-dock .side-dock-btn { pointer-events:auto; }
    .side-dock-btn {
        position:relative;
        width:44px;
        height:44px;
        display:grid;
        place-items:center;
        padding:0;
        border:1px solid rgba(145, 171, 194, .28);
        border-radius:14px;
        background:rgba(5, 14, 23, .94);
        box-shadow:0 10px 28px rgba(0, 0, 0, .35);
        color:var(--text);
        cursor:pointer;
        backdrop-filter:blur(14px);
        transition:border-color .16s, transform .16s, background .16s;
    }
    .side-dock-btn img {
        width:20px;
        height:20px;
        display:block;
        filter:brightness(1.55) saturate(.2);
    }
    .side-dock-btn:hover,
    .side-dock-btn[aria-expanded="true"] {
        border-color:rgba(133, 109, 232, .55);
        background:rgba(28, 34, 58, .96);
        transform:translateX(-2px);
    }
    .side-dock-btn b {
        position:absolute;
        top:-4px;
        right:-4px;
        min-width:18px;
        height:18px;
        display:grid;
        place-items:center;
        padding:0 4px;
        border-radius:999px;
        background:linear-gradient(145deg, #7152d3, #438ed9);
        color:#fff;
        font-size:9px;
        font-weight:800;
        line-height:1;
        box-shadow:0 4px 10px rgba(40, 70, 150, .35);
    }
    .side-dock-btn b:empty,
    .side-dock-btn b[data-count="0"] { display:none; }
    .lobby-drawer-scrim {
        position:fixed;
        inset:0;
        z-index:45;
        display:block;
        border:0;
        margin:0;
        padding:0;
        background:rgba(2, 8, 14, .55);
        opacity:0;
        pointer-events:none;
        transition:opacity .18s ease;
    }
    .lobby-dashboard.is-drawer-open .lobby-drawer-scrim {
        opacity:1;
        pointer-events:auto;
    }
    .people-card {
        position:fixed;
        top:max(10px, env(safe-area-inset-top));
        right:max(8px, env(safe-area-inset-right));
        bottom:calc(78px + env(safe-area-inset-bottom));
        z-index:46;
        width:min(360px, calc(100vw - 28px));
        min-height:0;
        max-height:none;
        display:grid;
        border-radius:16px;
        box-shadow:0 22px 60px rgba(0, 0, 0, .45);
        transform:translateX(112%);
        opacity:0;
        pointer-events:none;
        transition:transform .22s ease, opacity .18s ease;
    }
    .people-card.is-open {
        transform:translateX(0);
        opacity:1;
        pointer-events:auto;
    }
    .people-head {
        position:relative;
        padding-right:48px;
    }
    .side-panel-close {
        position:absolute;
        top:12px;
        right:12px;
        width:34px;
        height:34px;
        display:grid !important;
        place-items:center;
        border:1px solid rgba(145, 171, 194, .22);
        border-radius:10px;
        background:rgba(7, 18, 29, .8);
        color:var(--text);
        font-size:18px;
        line-height:1;
        cursor:pointer;
    }
    .rooms-head { min-height:40px; padding:7px 10px; }.rooms-head h1 { font-size:15px; }.rooms-head p,.rooms-help { display:none; }
    .room-toolbar {
        flex:0 0 auto;
        display:flex;
        align-items:stretch;
        justify-content:stretch;
        gap:6px;
        min-height:0;
        padding:6px 8px;
        border-bottom:0;
        overflow:visible;
    }
    .mode-grid {
        flex:1 1 auto;
        display:grid;
        grid-template-columns:repeat(3, minmax(0, 1fr));
        gap:4px;
        min-width:0;
        max-width:none;
    }
    .room-actions {
        flex:0 0 auto;
        display:flex;
        justify-content:flex-end;
        align-items:stretch;
        gap:5px;
        margin:0;
        min-width:0;
    }
    .mode-card {
        min-height:40px;
        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:center;
        gap:1px;
        padding:4px 2px;
        border-radius:9px;
        text-align:center;
    }
    .mode-card b { font-size:13px; line-height:1; }
    .mode-card small { font-size:8px; line-height:1; }
    .mode-card.is-active {
        border-color:#589bd9;
        background:linear-gradient(145deg,rgba(31,76,116,.72),rgba(10,34,55,.96));
        box-shadow:0 8px 18px rgba(3,13,23,.28);
    }
    .room-actions .btn {
        min-height:40px;
        border-radius:9px;
    }
    .room-actions .search-game { padding:0 12px; }
    .room-actions .btn b {
        font-size:12px;
        line-height:1.15;
        white-space:nowrap;
    }
    .room-actions .primary {
        border-color:rgba(113,162,238,.78);
        background:linear-gradient(118deg,#7152d3 0%,#5d76d8 48%,#438ed9 100%);
        box-shadow:0 8px 18px rgba(42,80,157,.2);
    }
    .room-actions .create-shortcut {
        width:40px;
        min-width:40px;
        flex:0 0 40px;
        border-color:rgba(145,171,194,.28);
        background:rgba(7,18,29,.72);
        color:#e8eef5;
    }
    .room-actions .create-shortcut b { font-size:20px; }
    .mode-count-full,
    .action-find-full { display:none; }
    .mode-count-short,
    .action-find-short { display:inline; }
    .room-grid {
        flex:1 1 auto;
        min-height:0;
        grid-template-columns:1fr;
        margin:0 6px 6px;
        padding-top:4px;
        overflow-y:auto;
    }
    .lobby-empty {
        min-height:100%;
        height:100%;
        margin:0;
    }
    .lobby-empty > img { display:block; }
    .lobby-empty h3 { font-size:18px; }
    .people-list { padding-inline:10px; }
    .dashboard-chat #homeChat { height:100%; min-height:0; padding:0; }
    .dashboard-chat .community-chat { height:100%; min-height:0; display:flex; flex-direction:column; }
    .dashboard-chat .community-chat-head { flex:0 0 auto; min-height:0; padding:6px; }
    .dashboard-chat .community-scopes { width:100%; }
    .dashboard-chat .community-scope { min-height:38px; padding:7px 6px; font-size:13px; }
    .dashboard-chat .community-chat-body {
        flex:1 1 auto;
        min-height:0;
        margin-top:0;
        border:0;
        border-radius:0;
        display:flex;
        flex-direction:column;
    }
    .dashboard-chat .community-thread { flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
    .dashboard-chat .thread-messages { flex:1 1 auto; min-height:0; padding:6px 8px 4px; }
    .dashboard-chat .thread-message { grid-template-columns:34px 64px minmax(0,1fr); gap:4px; padding:2px 0; }
    .dashboard-chat .thread-message b { font-size:12px; }
    .dashboard-chat .thread-message time { font-size:10px; }
    .dashboard-chat .thread-message p { font-size:13px; line-height:1.3; }
    .dashboard-chat .thread-empty { min-height:0; height:100%; }
    .dashboard-chat .thread-empty img { display:none; }
    .dashboard-chat .community-compose { flex:0 0 auto; gap:5px; padding:4px 6px 6px; border-top:0; }
    .dashboard-chat .community-input { min-height:38px; max-height:72px; padding:9px 40px 9px 10px; font-size:13px; }
    .dashboard-chat .community-compose .community-send { width:38px; height:38px; }
    .dashboard-chat .community-compose .emoji-toggle { width:38px; height:38px; }
    .room-assembly { display:flex; flex-direction:column; gap:8px; padding:8px 10px 10px; height:100%; min-height:0; }
    .assembly-roster { flex:1; min-height:0; padding:10px; }
    .assembly-roster > header {
        grid-template-columns:1fr auto;
        gap:6px 8px;
        min-height:0;
    }
    .assembly-add-bot { width:34px; height:34px; font-size:18px; }
    .seat-remove-bot { width:22px; height:22px; font-size:15px; }
    .assembly-count { font-size:12px; }
    .assembly-exit { min-height:34px; padding:6px 11px; font-size:12px; }
    .assembly-seat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); overflow:auto; }
    .assembly-footer { display:flex; flex-direction:column; align-items:stretch; }
    .assembly-controls { width:100%; }
    .assembly-start { width:100%; min-width:0; }
}

@media (max-width:390px) {
    .room-toolbar { gap:5px; padding:6px 7px; }
    .mode-grid { gap:3px; }
    .mode-card { min-height:36px; gap:0; padding:3px 1px; }
    .mode-card b { font-size:12px; }
    .mode-card small { font-size:7px; }
    .room-actions .btn { min-height:36px; }
    .room-actions .search-game { padding:0 10px; }
    .room-actions .btn b { font-size:11px; }
    .room-actions .create-shortcut { width:36px; min-width:36px; flex:0 0 36px; padding:0; }
    .room-actions .create-shortcut b { font-size:18px; }
    .dashboard-chat .community-scope { font-size:12px; }
    .dashboard-chat .thread-message { grid-template-columns:28px 52px minmax(0,1fr); gap:3px; }
    .dashboard-chat .thread-message b { font-size:11px; }
    .dashboard-chat .thread-message p { font-size:12px; }
    .side-dock-btn { width:38px; height:38px; border-radius:12px; }
    .side-dock-btn img { width:17px; height:17px; }
}
