/* v0.9.32: main menu in stages (body[data-hublv] 0-3, set by hubLevel) and the global chat popup. */
body[data-hublv="0"] .hub :is(.hub-today, .hub-wk, [data-t=events]),
body:is([data-hublv="0"], [data-hublv="1"]) .hub :is(.hub-board, [data-t=clubs], [data-t=boards], .hub-help),
body:is([data-hublv="0"], [data-hublv="1"]) .topbar .tb-chat,
body:is([data-hublv="0"], [data-hublv="1"], [data-hublv="2"]) .hub :is(.hub-season, .hub-cup, .hb-i),
body:is([data-hublv="0"], [data-hublv="1"], [data-hublv="2"]) .topbar .tb-season,
body.chat-off .tb-chat { display: none !important; }

.hub-soon { border-color: var(--acc-line); }
.hub-soon > b { display: block; margin-top: 4px; font: 800 17px var(--f-display); letter-spacing: 0.04em; text-transform: uppercase; color: #fff; }
.hub-soon .hb-bar { margin-top: 8px; }

/* global chat: a centred popup over the menu */
.gchat-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(4, 6, 11, 0.62); animation: gcIn .18s ease-out both; }
@keyframes gcIn { from { opacity: 0; } to { opacity: 1; } }
.gc-card { width: min(560px, 100%); height: min(580px, 100%); display: flex; flex-direction: column; background: #0e1219; border: 1px solid var(--acc-line); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); overflow: hidden; animation: gcUp .22s var(--ease) both; }
@keyframes gcUp { from { transform: translateY(14px) scale(.98); } to { transform: none; } }
.gc-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.gc-head > svg { width: 22px; height: 22px; color: var(--acc); flex: none; }
.gc-title { flex: 1; min-width: 0; display: grid; }
.gc-title b { font: 800 19px var(--f-display); letter-spacing: 0.06em; text-transform: uppercase; color: #fff; }
.gc-title small { color: var(--dim); font-size: 12px; line-height: 1.3; }
.gc-x { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--txt); font-size: 22px; line-height: 1; cursor: pointer; }
.gc-x:hover { border-color: var(--acc); color: var(--acc); }
.gc-list { list-style: none; margin: 0; padding: 12px 14px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; }
.gc-list li { max-width: 86%; align-self: flex-start; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 6px 10px 7px; }
.gc-list li.me { align-self: flex-end; background: rgba(255, 204, 0, 0.12); border-color: rgba(255, 204, 0, 0.35); border-radius: 12px 12px 4px 12px; }
.gc-list li.muted { opacity: 0.55; }
.gc-list li.gc-empty { align-self: center; max-width: none; margin: auto 0; background: none; border: 0; color: var(--dim); text-align: center; }
.gc-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; }
.gc-meta b { color: var(--acc); font-weight: 800; overflow-wrap: anywhere; }
.gc-meta small { color: var(--dim); }
.gc-acts { margin-left: auto; display: flex; gap: 2px; }
.gc-acts button { background: none; border: 1px solid transparent; color: var(--dim); font-size: 11.5px; padding: 1px 6px; border-radius: 6px; cursor: pointer; }
.gc-acts button:hover:not(:disabled) { border-color: var(--line-2); color: var(--txt); }
.gc-acts button:disabled { opacity: 0.4; cursor: default; }
.gc-list p { margin: 2px 0 0; font-size: 14px; line-height: 1.35; color: var(--txt); overflow-wrap: anywhere; }
.gc-foot { border-top: 1px solid var(--line); padding: 10px 14px 12px; display: grid; gap: 8px; }
.gc-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.gc-presets .chip { flex: none; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--txt); font-weight: 800; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.gc-presets .chip:hover { border-color: var(--acc-line); }
.gc-form { display: flex; gap: 8px; }
.gc-form input { flex: 1; min-width: 0; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.06); color: var(--txt); padding: 0 12px; font: inherit; font-size: 14px; }
.gc-form input:focus { outline: none; border-color: var(--acc); }
.gc-foot.wait :is(.chip, .gc-send) { opacity: 0.45; pointer-events: none; }
.gc-note { margin: 0; min-height: 1.3em; font-size: 12.5px; color: var(--dim); }
.gc-note.warn { color: #fca5a5; }
.gc-guest { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gc-guest p { margin: 0; flex: 1; min-width: 200px; color: var(--txt-2); font-size: 13.5px; }
@media (max-height: 480px) {
  .gchat-modal { padding: 8px; }
  .gc-card { height: calc(100vh - 16px); height: calc(100dvh - 16px); }
  .gc-head { padding: 8px 10px 8px 14px; }
  .gc-title small { display: none; }
  .gc-foot { padding: 8px 12px 10px; gap: 6px; }
  .gc-presets .chip { padding: 4px 10px; font-size: 12px; }
  .gc-form input { height: 36px; }
}
