/* The site's left column (public/site-sidebar.js). The page's <main> is never moved or narrowed: on wide screens the
   column sits in the empty margin left of it (the script measures that margin), otherwise it's a one-line strip at the
   top of the page that opens in place. */
.site-sidebar { min-width: 0; color: var(--ink); }
.site-sidebar-panels { display: grid; gap: 0.9rem; }
.site-panel { min-width: 0; padding: 0.95rem 1rem; border: 1px solid var(--line); border-radius: 20px;
  background: color-mix(in srgb, var(--cream) 88%, transparent); }
.site-panel-title { margin: 0 0 0.6rem; color: var(--ink); font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.site-panel-empty, .site-panel-note { margin: 0; color: var(--ink-soft); font-size: 0.8rem; line-height: 1.45; }
.site-player-list + .site-panel-note { margin-top: 0.55rem; }
.site-player-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.site-player-list > li { min-width: 0; }
.site-player { display: flex; align-items: center; gap: 0.4rem; min-width: 0; padding: 0.35rem 0.5rem; border-radius: 10px;
  color: var(--ink); font-size: 0.86rem; text-decoration: none; }
.site-player:hover, .site-player:focus-visible { background: color-mix(in srgb, var(--teal) 12%, transparent); }
.site-player-name { min-width: 0; overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.site-player .profile-presence { flex: none; margin-left: auto; padding: 0.05rem 0.5rem; font-size: 0.7rem; }
.site-player-when { flex: none; margin-left: auto; color: var(--ink-soft); font-size: 0.74rem; }

/* A name shown by its player's choice: their Discord name carries the Discord logo */
.player-name.is-discord { display: inline-flex; align-items: center; gap: 0.3em; max-width: 100%; vertical-align: bottom; }
.player-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discord-name-mark { width: 1.05em; height: 1.05em; flex: none; color: #5865f2; }

/* Docked in the empty margin left of the page (<main> is min(1180px, 92vw), centred), staying in view while the
   page scrolls: up to 288px wide, 16px from the page and from the window's edge. site-sidebar.js docks it from 1644px. */
.site-sidebar.is-docked { --site-margin: calc((100vw - 1180px) / 2); --site-sidebar-width: min(288px, calc(var(--site-margin) - 32px));
  position: fixed; z-index: 2; top: calc(58px + 1.5rem); left: calc(var(--site-margin) - 16px - var(--site-sidebar-width));
  width: var(--site-sidebar-width); max-height: calc(100vh - 58px - 3rem); overflow-y: auto; scrollbar-width: thin; }
.site-sidebar.is-docked .site-sidebar-toggle { display: none; }

/* Otherwise one line ("2 online · 5 joined this week") that opens the panels in place */
.site-sidebar:not(.is-docked) { margin: 0.75rem 0 0; }
.site-sidebar:not(.is-docked) .site-sidebar-toggle { display: flex; align-items: center; gap: 0.6rem; width: 100%; min-height: 2.5rem; padding: 0.45rem 0.95rem;
  border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--cream) 88%, transparent);
  color: var(--ink); font: inherit; font-size: 0.86rem; font-weight: 750; text-align: left; cursor: pointer; }
.site-sidebar-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.site-sidebar-summary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-sidebar-chevron { flex: none; transition: transform 0.15s ease; }
.site-sidebar.is-open .site-sidebar-chevron { transform: rotate(180deg); }
.site-sidebar:not(.is-docked):not(.is-open) .site-sidebar-panels { display: none; }
.site-sidebar:not(.is-docked).is-open .site-sidebar-panels { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: 0.6rem; }
@media (prefers-reduced-motion: reduce) {
  .site-sidebar-chevron { transition: none; }
}
