/* Refresh-safe multiplayer controls, styled to match the original room. */
.connection-notice,.storage-warning{grid-column:1/-1;padding:13px 17px;border:1px solid #dbc9a9;border-radius:11px;background:#faf0dc;color:#74613c;font-size:12px;line-height:1.7;display:flex;align-items:center;justify-content:space-between;gap:16px}
.connection-notice .chess-small-button{white-space:nowrap;width:auto}.storage-warning{background:#fae9e0;color:#864e34}
.shared-tools{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 24px;background:#eef2e9;border-bottom:1px solid #dfe5d7}
.shared-tools strong{display:block;color:#52664d;font-size:12px;font-weight:600}.shared-tools span{display:block;color:#7b8671;font-size:10px;line-height:1.7;margin-top:3px}.shared-tools code{display:block;color:#64745b;font-family:inherit;font-size:10px;margin-top:4px;overflow-wrap:anywhere}
.shared-actions{display:flex;flex-direction:column;align-items:center;gap:3px;flex-shrink:0}.shared-actions a{text-decoration:none;font-size:11px;padding:10px 13px;white-space:nowrap;background:#fffef9}.shared-actions .text-button{font-size:10px;padding:6px 0}
.people-panel{border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:16px 14px}.people-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.people-heading>span{font-size:10px;white-space:nowrap;color:#77886e}#people-list{list-style:none;margin:12px 0 0;padding:0;max-height:215px;overflow:auto;scrollbar-width:thin}#people-list li+li{margin-top:3px}
.person-in-room{width:100%;border:0;background:transparent;border-radius:8px;display:flex;align-items:center;gap:9px;padding:9px 5px;text-align:left;color:var(--ink)}.person-in-room:hover{background:#f0f3e9}.person-in-room>span:last-child{min-width:0}.person-in-room strong{display:block;font-size:12px;font-weight:600;overflow-wrap:anywhere}.person-in-room small{display:block;font-size:9px;margin-top:4px;color:#8c9584;line-height:1.4}.presence-dot{height:7px;width:7px;background:#739365;border-radius:50%;flex-shrink:0}.person-offline .presence-dot{background:#c7a76f}.person-offline strong{color:#8a907f}.people-hint,.people-empty{font-size:9px;color:#929b87;line-height:1.7}.people-hint{margin-top:10px}.avatar.is-reconnecting{opacity:.5}
.local-help{padding:13px;text-align:left;border:1px solid #e7c7a3;border-radius:10px;background:#fff1d9;color:#7a6545;margin-top:14px;font-size:11px;line-height:1.6}.local-help strong{font-size:12px}.local-help p{margin:7px 0}.local-help a{font-weight:600}
@media(min-width:1101px){.sidebar{gap:18px}.instructions-card{padding-top:12px}.instructions-card .instruction{margin:10px 0}.instructions-card h2{margin-bottom:10px}}
@media(max-width:1100px){.people-panel{grid-column:1/-1;padding:13px 16px}#people-list{display:flex;gap:10px;max-height:140px;flex-wrap:wrap}#people-list li{flex:0 1 200px}#people-list li+li{margin-top:0}.people-hint{margin-top:5px}.demo-tools{grid-column:3;grid-row:1;align-self:end;margin-top:0}}
@media(max-width:700px){.shared-tools{padding:12px 14px;align-items:flex-start;flex-wrap:wrap;gap:10px}.shared-actions{flex-direction:row;gap:14px;flex-wrap:wrap}.shared-tools span{font-size:10px}.shared-tools strong{font-size:12px}.people-panel{padding:13px}.people-panel #people-list{gap:4px 12px}.people-panel #people-list li{flex:1 1 135px}.person-in-room strong{font-size:11px}.demo-tools{grid-column:2;grid-row:2}.connection-notice,.storage-warning{font-size:11px}.connection-notice{flex-wrap:wrap;gap:7px}.site-footer{margin-top:5px}}

.admin-header-button{border:1px solid #d9ddcf;background:#f8f7f1;color:#687461;border-radius:8px;padding:7px 10px;font-size:10px;font-weight:700;letter-spacing:.3px}.admin-header-button:hover{background:#eef1e8}.admin-header-button.active{background:#edf1e8;color:#52684f;border-color:#bcc8b3}.people-row{display:flex;align-items:center;gap:5px}.people-row .person-in-room{flex:1;min-width:0}.admin-kick{border:1px solid #e3c2b4;background:#fff8f4;color:#a55e43;border-radius:7px;padding:6px 8px;font-size:9px;font-weight:700;white-space:nowrap}.admin-kick:hover{background:#f7e7df}.admin-dialog{width:430px}.admin-dialog h2{font-family:Georgia,"Times New Roman",serif;font-size:30px;font-weight:normal;color:#3d533c;margin:10px 0}.admin-dialog>p,.admin-dialog #admin-signed-in p{font-size:12px;line-height:1.7;color:#7e8674}.admin-dialog form{display:grid;gap:8px;margin-top:20px}.admin-dialog label{font-size:10px;font-weight:600;color:#69745f}.admin-dialog input{width:100%;border:1px solid #d9ddcf;background:#fbfcf6;border-radius:9px;padding:11px 12px;color:#344331;outline:none}.admin-dialog input:focus{border-color:#8a9b7b;box-shadow:0 0 0 3px #9eaf8b18}.admin-dialog .primary-button{margin-top:5px}.admin-dialog #admin-signed-in{margin-top:20px;padding-top:17px;border-top:1px solid var(--line)}@media(max-width:700px){.admin-header-button{padding:6px 7px;font-size:9px}.admin-kick{padding:5px 6px}}

/* Vertical Who's Here roster at every viewport. Prevent horizontal scrolling and
   keep moderation controls underneath each player's identity. */
.people-panel{min-width:0;overflow:hidden}
#people-list{display:block!important;width:100%;max-width:100%;overflow-x:hidden!important;overflow-y:auto;overscroll-behavior:contain}
#people-list li{display:block!important;width:100%!important;max-width:100%;min-width:0;flex:none!important}
#people-list li+li{margin-top:4px!important}
.people-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;width:100%;min-width:0;padding:2px 0}
.people-row .person-in-room{flex:1 1 100%;width:100%;min-width:0}
.people-row .private-message-button,.people-row .admin-mute,.people-row .admin-kick{flex:0 0 auto;max-width:100%}
@media(max-width:1100px){#people-list{max-height:260px}.people-panel #people-list{gap:0!important}.people-panel #people-list li{flex:none!important}}
@media(max-width:700px){#people-list{max-height:300px}.people-row .private-message-button,.people-row .admin-mute,.people-row .admin-kick{font-size:9px;white-space:normal}}

/* v19.0 responsive presence/admin controls */
@media(max-width:600px){
  .shared-tools,.shared-actions,.people-row{width:100%;min-width:0}
  .shared-actions{display:flex;flex-wrap:wrap}
  .people-row .private-message-button,.people-row .admin-mute,.people-row .admin-kick{flex:1 1 90px;white-space:normal}
  .admin-dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}
}

/* v23.0 compact, page-flow mobile roster
   On phones/tablets the Who's Online area is not a nested scrolling frame.
   It grows with the page and its moderation buttons wrap into compact rows. */
@media (max-width:900px){
  .people-panel{
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:transparent!important;
    padding:8px 0!important;
    overflow:visible!important;
  }
  #people-list{
    max-height:none!important;
    height:auto!important;
    overflow:visible!important;
    overscroll-behavior:auto!important;
    scrollbar-width:none!important;
  }
  #people-list::-webkit-scrollbar{display:none!important}
  .people-row{
    padding:7px 0!important;
    gap:5px!important;
    border-bottom:1px solid var(--line);
  }
  #people-list li:last-child .people-row{border-bottom:0}
  .people-row .person-in-room{
    padding:5px 2px!important;
    border-radius:0!important;
  }
  .people-hint{margin-top:6px!important}
}
@media (max-width:600px){
  .people-heading{padding:0 2px}
  .people-row .private-message-button,
  .people-row .admin-mute,
  .people-row .admin-kick{
    flex:1 1 calc(50% - 4px)!important;
    min-width:0!important;
    width:auto!important;
    min-height:32px!important;
    padding:5px 6px!important;
    border-radius:6px!important;
    font-size:8px!important;
    line-height:1.15!important;
    white-space:normal!important;
  }
}

/* v24.0 mobile true frameless roster shell. */
@media (max-width:900px){
  .people-panel,
  .people-heading,
  #people-list,
  #people-list>li,
  .people-row{
    background:transparent!important;
    box-shadow:none!important;
    outline:0!important;
  }
  .people-panel{
    width:100%!important;
    margin:0!important;
    padding:6px 0!important;
    border:0!important;
    border-radius:0!important;
    overflow:visible!important;
  }
  #people-list{
    margin:8px 0 0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  #people-list>li,
  .people-row{
    border:0!important;
    border-radius:0!important;
  }
  .people-row{padding:5px 0!important;}
  .person-in-room{background:transparent!important;box-shadow:none!important;}
}
