/* hub.css -- the Play Hub's shared look: every page (the lounge, the admin pages, Privacy, Terms, spectators)
   links it first, then its own style sheet. Styled after www.intvprime.com: white page, its dark menu bar with a
   red rule, and section headings as white-on-red tabs sitting on a red line. Colours are sampled from the site;
   fonts are the site's Michroma (headings, menu) and Signika (text), and MT Intellivised for the tabs and the
   slogan. Change the theme here. */
@font-face { font-family: "MT Intellivised"; src: url("/lounge/MT-Intellivised.otf") format("opentype"); font-display: swap; }
:root {
  --hub-bg: #ffffff;
  --hub-bg-2: #f5f5f5;          /* quiet fills: inputs, cards, hovers */
  --hub-panel: #ffffff;
  --hub-line: #d9d9d9;
  --hub-ink: #333333;           /* the site's body text */
  --hub-ink-strong: #141414;    /* the site's tagline */
  --hub-muted: #6b6b6b;
  --hub-red: #b60203;           /* the site's tab red */
  --hub-red-dark: #8f0102;
  --hub-red-ink: #ffffff;
  --hub-nav: #0f1720;           /* the site's menu bar */
  --hub-nav-rule: #980f0d;      /* the red line under it */
  --hub-accent: var(--hub-red);
  --hub-accent-ink: var(--hub-red-ink);
  --hub-link: #b60203;
  --hub-good: #1e7a34;
  --hub-warn: #b0500e;
  --hub-display: "Michroma", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --hub-tab-font: "MT Intellivised", "Michroma", "Segoe UI", "Helvetica Neue", Arial, sans-serif;   /* section tabs; @font-face in index.html */
  --hub-font: "Signika", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --hub-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --hub-radius: 4px;
  --hub-width: 1100px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--hub-bg);
  color: var(--hub-ink);
  font: 16px/1.55 var(--hub-font);
}
a { color: var(--hub-link); }
a:hover { color: var(--hub-red-dark); }
code { font-family: var(--hub-mono); font-size: .9em; background: var(--hub-bg-2); padding: 1px 4px; border-radius: 3px; overflow-wrap: anywhere; }
.wrap { max-width: var(--hub-width); margin: 0 auto; padding: 0 16px; }
.hint { color: var(--hub-muted); font-size: .88em; }
[hidden] { display: none !important; }

/* masthead: the site's header image on white, then its dark menu bar with a red rule */
.masthead { background: #fff; }
.masthead > .wrap { padding-top: 10px; padding-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 18px; }
.brand a { color: inherit; text-decoration: none; }
.brand-logo { flex: none; }
.brand-logo img { display: block; width: 120px; height: 120px; }
/* the Play Hub mark, vertically centred on the square, with its name centred under it */
.brand-hub { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.brand-hub img { display: block; width: 230px; max-width: 100%; height: auto; }
.brand-hub-name { font: 400 22px/1 var(--hub-tab-font); color: #000; letter-spacing: .02em; white-space: nowrap; }
@media (max-width: 640px) {
  .brand { gap: 10px; }
  .brand-logo img { width: 72px; height: 72px; }
  .brand-hub img { width: 130px; }
  .brand-hub-name { font-size: 15px; }
}

.brandtext { font: 400 28px var(--hub-display); color: var(--hub-nav); }
.navbar { background: var(--hub-nav); border-bottom: 3px solid var(--hub-nav-rule); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; min-height: 52px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.sitenav { display: flex; gap: 28px; }
.sitenav a {
  color: #fff; text-decoration: none; font: 400 14px var(--hub-display); text-transform: uppercase; letter-spacing: .02em;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.sitenav a:hover, .sitenav a:focus-visible { border-bottom-color: var(--hub-red); outline: none; }
.login { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #fff; font-size: 14px; }
.loginbar-label { font: 400 11px var(--hub-display); text-transform: uppercase; letter-spacing: .08em; color: #c9ced6; }
.providers { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.provider {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35); background: #fff;
  cursor: pointer; padding: 0;
}
.provider img { width: 18px; height: 18px; display: block; }
.provider:hover, .provider:focus-visible { border-color: var(--hub-red); box-shadow: 0 0 0 2px var(--hub-red); outline: none; }
.provider[disabled] { opacity: .35; cursor: not-allowed; box-shadow: none; }
.whoami { color: #fff; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.whoami img { width: 16px; height: 16px; background: #fff; border-radius: 50%; padding: 1px; }
.login .linkbtn { color: #fff; text-decoration: underline; }
.login .linkbtn:hover { color: #ffd6d6; }

.pagetitle { font: 400 30px/1.25 var(--hub-display); margin: 28px 0 6px; color: var(--hub-ink-strong); }
.pagetitle-by { font-size: 18px; color: var(--hub-muted); white-space: nowrap; }
/* Hub Members for visitors: names are drawn as pixel blocks (the API sends masked names; see renderPlayers) */
.players canvas.pixel { display: inline-block; height: 16px; vertical-align: middle; image-rendering: pixelated; }

.flash { padding: 10px 14px; border-radius: var(--hub-radius); background: var(--hub-bg-2); border-left: 4px solid var(--hub-red); }
.flash.error { border-left-color: var(--hub-warn); color: var(--hub-warn); }
.caps { margin: 6px 0 0; }
.caps.full { color: var(--hub-warn); }


.box { background: var(--hub-panel); margin: 26px 0 22px; min-width: 0; }

.box h2 { margin: 0 0 16px; border-bottom: 2px solid var(--hub-red); line-height: 0; }
.box h2 span {
  display: inline-block; max-width: 100%;
  background: var(--hub-red); color: var(--hub-red-ink);
  font: 400 14px/1.2 var(--hub-tab-font); text-transform: uppercase; letter-spacing: .02em;
  padding: 10px 16px 9px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom;
}
.box h3 { font: 400 13px var(--hub-display); text-transform: uppercase; margin: 18px 0 8px; color: var(--hub-ink-strong); }

label, .field { display: block; margin: 0 0 12px; font-weight: 600; font-size: 13px; }
.fieldlabel { display: block; margin-bottom: 4px; }
input, select {
  display: block; width: 100%; margin-top: 4px;
  background: #fff; color: var(--hub-ink);
  border: 1px solid var(--hub-line); border-radius: 4px; padding: 8px 10px;
  font: 15px var(--hub-font);
}
input:focus, select:focus { outline: 2px solid var(--hub-red); outline-offset: 0; border-color: transparent; }
#vcode { font-family: var(--hub-mono); text-transform: uppercase; }
fieldset { border: 1px dashed var(--hub-line); border-radius: 4px; padding: 8px 10px 4px; margin: 0 0 12px; min-width: 0; }
legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.idrow { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.idrow input { margin-top: 0; }

.btn {
  background: var(--hub-red); color: var(--hub-red-ink); border: 0; border-radius: 4px;
  padding: 11px 20px; font: 400 12px var(--hub-display); text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
}
.btn:hover { background: var(--hub-red-dark); }
.btn:focus-visible { outline: 2px solid var(--hub-ink); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: progress; }
.btn.small { padding: 9px 12px; font-size: 11px; }
.linkbtn { background: none; border: 0; color: var(--hub-link); cursor: pointer; padding: 2px 0; font: inherit; font-size: 13px; font-weight: 600; }
.linkbtn:hover { color: var(--hub-red-dark); text-decoration: underline; }
.chip { display: inline-block; background: #fff; border: 1px solid var(--hub-line); border-radius: 12px; padding: 1px 9px; margin: 2px 4px 2px 0; font: 12px var(--hub-mono); color: var(--hub-ink); cursor: pointer; }
.chip:hover { border-color: var(--hub-red); color: var(--hub-red); }
.provider-pill { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.provider-pill img { width: 16px; height: 16px; }
/* Your Info: the sign-in this registration belongs to, first and 2pt larger than the other labels */
.field.social { font-size: calc(13px + 2pt); }
.field.social .provider-pill img { width: 18px; height: 18px; }


.inline { display: flex; gap: 8px; align-items: flex-end; }
.inline label { flex: 1; margin: 0; }

/* players are "Alias (Console Tag)": the Console Tag a step quieter */
.akey { color: var(--hub-muted); font-weight: 400; }
.ok { color: var(--hub-good); }
.pending { color: var(--hub-warn); }

/* above the players list: find a player, and how many there are */
.tabletools { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 10px; }
.tabletools input[type=search] { max-width: 280px; margin: 0; padding: 6px 10px; font-size: 14px; }
.tablewrap { overflow-x: auto; }
table.players { width: 100%; border-collapse: collapse; font-size: 14px; }
.players th, .players td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--hub-line); white-space: nowrap; }
.players th { color: #fff; font: 400 10px var(--hub-display); text-transform: uppercase; letter-spacing: .04em; background: var(--hub-nav); padding: 0; }
/* every header sorts: the whole cell is the button; the arrow shows the column and the direction */
.players th button.sort {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 10px; margin: 0;
  background: none; border: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer;
}
.players th.num button.sort { justify-content: flex-end; }
.players th button.sort::after { content: "\2195"; font: 400 11px var(--hub-font); opacity: .35; }
.players th[aria-sort="ascending"] button.sort::after { content: "\25B2"; opacity: 1; color: #ff9b9b; }
.players th[aria-sort="descending"] button.sort::after { content: "\25BC"; opacity: 1; color: #ff9b9b; }
.players th button.sort:hover { background: #1c2733; }
.players th button.sort:focus-visible { outline: 2px solid var(--hub-red); outline-offset: -2px; }
.players th .tz { text-transform: none; letter-spacing: 0; font: 400 10px var(--hub-font); color: #9aa3ad; }
.players td .akey { font-size: 13px; }
.players td.num, .players th.num { text-align: right; font-variant-numeric: tabular-nums; }
.players td.stamp { font-family: var(--hub-mono); font-size: 13px; }
.players tbody tr:hover { background: #fcf3f3; }

/* footer: Buy Me a Coffee bottom-left, the trademark notice bottom-right */
.footer { border-top: 3px solid var(--hub-nav-rule); margin-top: 32px; padding: 14px 0 22px; color: var(--hub-muted); }
.footer .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.footer .coffee { flex: none; min-height: 50px; display: flex; align-items: center; }
.footer .legal { flex: 1 1 280px; max-width: 520px; margin: 0 0 0 auto; text-align: right; font-size: 4pt; line-height: 1.35; color: var(--hub-muted); }
@media (max-width: 600px) { .footer .legal { text-align: left; margin-left: 0; max-width: none; } }

.whoplays { margin: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.whoplays input[type=search] { margin-top: 0; }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; margin: 0; cursor: pointer; }
.check input { display: inline-block; width: auto; margin: 3px 0 0; flex: none; accent-color: var(--hub-red); }
.check input:focus { outline: 2px solid var(--hub-red); outline-offset: 2px; }
.allusers { font-weight: 700; padding-bottom: 6px; border-bottom: 1px solid var(--hub-line); }
.checklist { max-height: 210px; overflow-y: auto; display: grid; gap: 2px; padding-right: 4px; }
.checklist .check { padding: 3px 4px; border-radius: 3px; font-family: var(--hub-mono); font-size: 13px; }
.checklist .check:hover { background: var(--hub-bg-2); }
.checklist .you { color: var(--hub-red); font-family: var(--hub-font); font-size: 12px; font-weight: 600; }
.checklist.disabled { opacity: .45; }

/* The header shared by the lounge and the admin pages: the Intv Prime square and the Play Hub logo, --brand-h tall
   (210px on a desktop). To their right, .header-right: the picture box (.header-slot) and under it the slogan line,
   level with the logo's "PLAY HUB" lettering and tucked 30% of --brand-h back under the logo's blank lower right.
   The slogan's size follows the width it has (container query units), so it always fits on one line. */
:root { --brand-h: 210px; --slogan-k: 21.2; }   /* --slogan-k: the slogan's width in font sizes (measured) */
.brand { flex: 0 0 auto; align-items: center; }
.brand-logo img { width: var(--brand-h); height: var(--brand-h); }
.brand-hub img { width: auto; height: var(--brand-h); max-width: none; }
.header-right { flex: 1 1 auto; min-width: 0; align-self: center; height: var(--brand-h); margin-left: 4px;   /* 16px row gap + 4 = 20px from the logo */
  display: flex; flex-direction: column; container-type: inline-size; }
.header-slot { flex: 0 0 86%; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.header-slot { padding: 10px 16px; box-sizing: border-box; }   /* a little white space all round the picture */
.header-slot img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.masthead .slogan-line { position: relative; z-index: 1; margin: auto 0 calc(var(--brand-h) * .015) calc(var(--brand-h) * -.30);
  font: 400 min(calc(var(--brand-h) * .16), calc((100cqi + var(--brand-h) * .30) / var(--slogan-k) * .98))/1.1 var(--hub-tab-font);
  letter-spacing: .02em; color: #000; white-space: nowrap; text-align: left; }
@media (max-width: 1100px) { :root { --brand-h: 150px; } }
@media (max-width: 640px) {
  /* Phone: the two logos centred on one line, then the picture box and the slogan under them, full width. */
  :root { --brand-h: 76px; }
  .masthead > .wrap { flex-wrap: wrap; justify-content: center; }
  .header-right { flex: 1 1 100%; height: auto; margin: 0; }
  .header-slot { flex: none; aspect-ratio: 4 / 1; }
  .header-slot:empty { display: none; }
  .masthead .slogan-line { margin: 6px 0 0; text-align: center; font-size: min(18px, calc(100cqi / var(--slogan-k) * .98)); }
}
