/*
 * hub/hub.css — styles for index.html (hub, body.hub) and privacy.html.
 * Dark comms-tent theme for kids on phones first (360 px up), tablet and desktop too.
 * The room art (assets/bg/hub_comms.webp) always fills the viewport height; the game cards are
 * drawn as glowing cyan screens in the same tones. Pink #ff2d9b marks PP only. Touch targets 56 px+.
 * Classes are created by hub/hub.js; static structure lives in index.html.
 * Layout switch at 1080 px: below it the phone layout (.mainnav is a fixed bottom tab bar), from
 * 1080 px up the desktop layout with a top nav. Between phones and 1080 px there is no other step: hub/scale.js
 * zooms the phone layout smoothly with the width (1x up to 560 px, up to 1.5x on tablets).
 * Animations are switched off under prefers-reduced-motion (block at the end of this file).
 */

/* Fonts: Bungee (the client's game titles) for game names, buttons and big numbers;
   Monument Extended Ultrabold for the LAB AGENTS HQ wordmark and the Top Agents title. */
@font-face { font-family: "Bungee"; src: url("/fonts/Bungee-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Monument Extended"; src: url("/fonts/MonumentExtended-Ultrabold.otf") format("opentype"); font-weight: 100 900; font-display: swap; }
/* Commissioner: the MrBeast Lab wiki's face, used inside the drawers (character-page look). */
@font-face { font-family: "Commissioner"; src: url("/fonts/Commissioner-Variable.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --font-title: "Bungee", "Monument Extended", system-ui, sans-serif;
  --font-mark: "Monument Extended", "Bungee", system-ui, sans-serif;
  --bg: #050d11;
  --bg-2: #081519;
  --panel: rgba(8, 24, 30, 0.82);
  --panel-2: #0f2a33;
  --line: rgba(127, 230, 242, 0.22);
  --line-strong: rgba(127, 230, 242, 0.6);
  --text: #eafcff;
  --muted: #9cc0c8;
  --pp: #ff2d9b;
  --pp-2: #ff7ad9;
  --pp-soft: rgba(255, 45, 155, 0.16);
  --lab: #8aeaf5;
  --lab-soft: rgba(127, 230, 242, 0.14);
  --glow: rgba(127, 230, 242, 0.45);
  --blue: #07bce8; /* platform hero blue (wiki-style ME / Top Agents drawers, hover glows) */
  /* Hover glow on the name step (character rings, name buttons), in the platform blue: a tight solid layer
     plus a wide halo, so it reads clearly on the dark room. */
  --hover-glow: 0 0 16px 2px var(--blue), 0 0 56px 8px color-mix(in srgb, var(--blue) 75%, transparent);
  --bezel: #0b1b21;
  --lime: #c8ff3a;
  --gold: #ffd23f;
  --purple: #8b5cff;
  --danger: #ff5a6e;
  --r-lg: 28px;
  --r: 20px;
  --tap: 56px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: calc(100dvh / var(--zoom, 1)); /* page pixels: hub/scale.js zooms the page on wider phones and tablets */
  /* clip (not hidden): hidden would make body a scroll container and break position: sticky (You row) */
  overflow-x: clip;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background-color: var(--bg);
  padding-bottom: var(--safe-b);
}
/* Comms-tent room art: fixed, always covers the full viewport height (sides crop on phones),
   with a dark gradient on top so cards and text stay readable. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: var(--bg) url("/assets/bg/hub_comms.webp") center top / cover no-repeat;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(5, 13, 17, 0.3), rgba(5, 13, 17, 0.5) 55%, rgba(5, 13, 17, 0.82));
}
@media (max-width: 800px) {
  body::before { background-image: url("/assets/bg/hub_comms_1280.webp"); background-position: center 30%; }
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--lab); }
a:hover { color: #9cf0ff; }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); font-weight: 900; }
h2 { font-size: 1.25rem; font-weight: 900; }
p { margin: 0; }
img { max-width: 100%; }

:focus-visible { outline: 3px solid var(--lab); outline-offset: 3px; border-radius: 12px; }
/* View headings get focus from hub.js route() for screen readers only; no visible ring needed. */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, main[tabindex="-1"]:focus { outline: none; } /* focused by route() only to move the reading position: no ring */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 8px; top: -80px; z-index: 60; background: var(--lab); color: #001018; padding: 14px 18px; border-radius: 12px; font-weight: 800; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; justify-content: center; justify-items: center; }

/* Icons: inline SVG from hub.js icon(); size follows font-size. */
.ico { width: 1.25em; height: 1.25em; flex: none; display: block; }
[data-icon] { display: inline-flex; }

/* ---------------- splash ---------------- */

.splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: #000; opacity: 1; transition: opacity 1s ease; }
.splash img { width: min(72vw, 520px); height: auto; transform: scale(1); transition: transform 0.55s cubic-bezier(0.5, 0, 0.75, 0), opacity 0.45s ease 0.1s; }
/* Ready: the logo zooms out first, then the black fades over 1 s. */
.splash.zoom img { transform: scale(0.3); opacity: 0; }
.splash.out { opacity: 0; pointer-events: none; }

/* ---------------- header + main nav ---------------- */

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) 22px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.82) 55%, rgba(0, 0, 0, 0) 100%);
  border-bottom: 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-height: var(--tap); }
.brand:hover { color: var(--text); }
.brand-mark { width: 40px; height: 40px; flex: none; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255, 45, 155, 0.65)); }
.brand-text { margin-left: 10px; font-family: var(--font-mark); font-weight: 900; font-size: 2rem; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }

.mainnav { display: flex; gap: 8px; margin-left: auto; }
/* Player chip, top right on every size: avatar + name, opens the ME drawer. */
.me-chip {
  display: inline-flex; align-items: center; gap: 10px; min-height: 60px; padding: 6px 24px 6px 6px; margin-left: 12px;
  border-radius: 999px; background: rgba(0, 0, 0, 0.55); border: 2px solid #fff;
  color: #fff; text-decoration: none; font-family: "Commissioner", system-ui, sans-serif; font-weight: 800; letter-spacing: 0.01em; max-width: 46vw;
}
.me-chip:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.me-chip[aria-current="page"] { background: #fff; color: #000; }
.me-chip .avatar { border-radius: 50%; }
.me-chip .avatar-q { box-shadow: none; }
.me-chip-name { font-size: 1.26rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* same size as TOP AGENTS */
.nav-item {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 60px; padding: 0 22px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-family: var(--font-title); font-weight: 400; font-size: 1.26rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { color: var(--text); background: var(--lab-soft); }
.nav-item[aria-current="page"] { color: #fff; background: var(--lab-soft); box-shadow: none; }
.nav-ico { font-size: 1.3rem; }

/* Phones: the same top bar; the wordmark goes, the Top Agents link shrinks to its icon + short label. */
@media (max-width: 1079.98px) {
  .hub .top { padding-left: var(--gutter); padding-right: var(--gutter); }
  .hub .brand-text { display: none; }
  .hub .brand-mark { width: 44px; height: 44px; }
  .hub .top { gap: 8px; }
  .hub .mainnav { margin-left: auto; }
  .hub .nav-item { padding: 0 10px; min-width: var(--tap); }
  .hub .nav-label { display: none; }
  .hub .me-chip { margin-left: 0; flex: 0 1 auto; min-width: 0; max-width: calc(100vw - 2 * var(--gutter) - 120px); padding-right: 16px; }
}

/* Tablets (700 px up, still the phone layout): the LAB AGENTS HQ wordmark comes back, smaller so it fits next to
   Top Agents and the player chip. The page is zoomed there (hub/scale.js), so 0.9rem shows at about 18-22 px. */
@media (min-width: 700px) and (max-width: 1079.98px) {
  .hub .brand { flex: none; gap: 0; } /* never squeezed under Top Agents */
  .hub .brand-text { display: inline; margin-left: 8px; font-size: 0.9rem; letter-spacing: 0; }
  .hub .me-chip { max-width: none; } /* takes all the room left: main-character names fit in full, very long ones end in … */
  .hub .me-chip-name { font-size: 1.1rem; }
}

/* Name step (focus mode): no top bar, so its close button in the top-left corner is free. */
body.focus-mode .top { display: none; }

/* ---------------- intro after picking a name (hub.js playIntro) ---------------- */
.brand { transition: transform 0.8s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.8s ease; }
.mainnav { transition: opacity 0.8s ease; }
.me-chip { transition: border-color 0.6s ease, background 0.6s ease; }
.me-chip .me-chip-name, .me-chip .avatar { transition: opacity 0.6s ease; }
body.intro .top { position: fixed; left: 0; right: 0; top: 0; z-index: 30; }
body.intro-hide .brand { transform: translateX(-120%); opacity: 0; }
body.intro-hide .mainnav { opacity: 0; }
body.intro-hide .me-chip { border-color: transparent; background: transparent; }
body.intro-hide .me-chip .me-chip-name, body.intro-hide .me-chip .avatar { opacity: 0; }
.intro-flyer { position: fixed; z-index: 60; margin: 0; border-radius: 50%; pointer-events: none; transition: left 1.2s cubic-bezier(0.55, 0, 0.3, 1), top 1.2s cubic-bezier(0.55, 0, 0.3, 1), width 1.2s cubic-bezier(0.55, 0, 0.3, 1), height 1.2s cubic-bezier(0.55, 0, 0.3, 1); }
.name-btn.drop { transform: translateY(120vh); transition: transform 0.7s cubic-bezier(0.5, 0, 0.75, 0); }
.fade-out { opacity: 0; transition: opacity 0.5s ease; }
.fade-out-slow { opacity: 0; transition: opacity 1.5s ease; }
.games > li.enter { animation: card-up 0.8s cubic-bezier(0.2, 0.9, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes card-up { from { transform: translateY(100vh); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- layout ---------------- */

main { max-width: 1120px; margin: 0 auto; padding: 16px var(--gutter) 48px; outline: none; }

/* Jimmy (index.html #jimmy-side, assets/jimmy-slide.webp cropped right at his feet so he stands on the screen
   edge with no gap): wide desktops only, in the free space between the left edge and the game
   cards, anchored to the bottom. --jimmy-space is that space (main is 1120 px wide and centred, cards start
   one gutter in); the picture is at most its natural 238 px and keeps 12 px clear on each side. Shown only
   when that leaves it at least 160 px wide: (1456 - 1120) / 2 + 16 - 24 = 160, so never on tablets or phones.
   hub.js slideJimmy() adds .in 1 s after the page has loaded and the picture is decoded; it slides in from the
   left border. Only on the PLAY screen and its drawers (body[data-view] set by hub.js route()). */
.jimmy-side { display: none; }
@media (min-width: 1456px) {
  .jimmy-side {
    --jimmy-space: calc((100vw - 1120px) / 2 + var(--gutter));
    --jimmy-w: min(238px, calc(var(--jimmy-space) - 24px));
    display: block; position: fixed; bottom: 0; left: calc((var(--jimmy-space) - var(--jimmy-w)) / 2); z-index: 0;
    width: var(--jimmy-w); height: auto; pointer-events: none; user-select: none;
    transform: translateX(calc(-100% - var(--jimmy-space))); visibility: hidden;
    transition: transform 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.05), visibility 0s linear 0.9s;
  }
  .jimmy-side.in { transform: none; visibility: visible; transition: transform 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.05), visibility 0s; }
  body:not([data-view="home"]):not([data-view="board"]):not([data-view="me"]) .jimmy-side { display: none; }
}
.view { display: grid; gap: 20px; min-width: 0; }
.view[hidden] { display: none; }
.view > * { min-width: 0; }
.view-title { display: flex; align-items: center; gap: 12px; }
.view-title [data-icon] { color: var(--gold); font-size: 1.1em; }
.sub { color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-weight: 800; font-size: 1.05rem; text-decoration: none; justify-self: start; }
.small-link { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 12px; font-weight: 800; color: var(--lab); text-decoration: none; justify-self: center; }
.small-link[hidden] { display: none; }
/* <button> version of .small-link (ME drawer "Cookie settings") */
.small-link-btn { appearance: none; border: 0; background: transparent; font: inherit; font-weight: 800; cursor: pointer; }

@media (min-width: 1080px) {
  main { padding-top: 24px; }
  .view { gap: 24px; }
}

/* ---------------- buttons, chips ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 0 24px; border-radius: 999px;
  border: 2px solid transparent; font: inherit; font-weight: 900; font-size: 1.05rem;
  text-decoration: none; cursor: pointer; color: var(--text); background: var(--panel-2);
  transition: transform 0.1s, filter 0.15s, background 0.15s;
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(0.96); }
.btn.primary { background: var(--pp); color: #fff; box-shadow: 0 8px 24px rgba(255, 45, 155, 0.38); }
.btn.primary:hover { color: #fff; filter: brightness(1.08); }
.btn.ghost { background: var(--lab-soft); color: var(--text); border-color: var(--line-strong); }
.btn.ghost:hover { color: var(--text); background: rgba(77, 227, 255, 0.2); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--danger); border-color: rgba(255, 90, 110, 0.55); }
.btn.wide { width: 100%; }
.btn.big { min-height: 64px; font-size: 1.2rem; }
.btn.huge { min-height: 76px; font-size: 1.6rem; letter-spacing: 0.04em; }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn[hidden] { display: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.stack { display: grid; gap: 12px; }

.pp-chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--pp-soft); border: 1px solid rgba(255, 45, 155, 0.5);
  font-weight: 900; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: #fff;
}
.pp-chip b { color: var(--pp-2); font-size: 0.85em; }
.pp-dot { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff 0 18%, var(--pp-2) 40%, var(--pp) 70%); box-shadow: 0 0 10px var(--pp); flex: none; }
.chip-plain { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--panel-2); font-weight: 900; }
.chip-plain .ico { color: var(--gold); }
.go-chip { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--lab-soft); color: var(--lab); flex: none; font-size: 1.1rem; }

.round-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--panel); color: var(--text);
  cursor: pointer; font-size: 1.2rem;
}
.round-btn:disabled { opacity: 0.35; cursor: default; }

/* ---------------- avatars ---------------- */

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: 50%; object-fit: contain; object-position: 50% 50%;
  background: none; font-weight: 900; color: #fff;
}
/* The fandom art already carries its own circle: the image is shown as is, no box behind it. */
img.avatar, .pod img.avatar, .pod1 img.avatar, .pod3 img.avatar, .tf img.avatar, .id-face img.avatar { border-radius: 50%; box-shadow: none; }
.avatar-xs { width: 28px; height: 28px; font-size: 0.8rem; }
.avatar-sm { width: 44px; height: 44px; font-size: 1.05rem; }
.avatar-md { width: 60px; height: 60px; font-size: 1.4rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }
.avatar-xl { width: 104px; height: 104px; font-size: 2.6rem; }
.avatar-xxl { width: clamp(132px, 40vw, 170px); height: clamp(132px, 40vw, 170px); font-size: 4rem; }
.avatar-tile { border-radius: 50%; background: hsl(var(--tile-hue, 200) 65% 38%); }
.avatar-q { background: none; color: var(--lab); border: 0; } /* no look yet: just the question mark */

/* ---------------- banners, toast, confirm ---------------- */

.banner[hidden] { display: none; }
.banner-link {
  display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 18px;
  border-radius: 999px; background: var(--pp-soft); border: 2px solid rgba(255, 45, 155, 0.55);
  color: #fff; font-weight: 900; font-size: 1.05rem; text-decoration: none;
}
.banner-link:hover { color: #fff; }
.banner-link .ico { color: var(--pp-2); font-size: 1.2rem; }
.banner-link .chev { margin-left: auto; }
.banner-text { display: grid; gap: 2px; flex: 1 1 220px; }
.banner-text strong { font-size: 1.1rem; }
.banner-text span { color: #ffd6eb; }

.toast {
  position: fixed; left: 50%; z-index: 50;
  bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px);
  padding: 16px 24px; border-radius: 999px;
  background: #1b1430; border: 2px solid var(--pp); color: #fff;
  font-weight: 900; font-size: 1.1rem; text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 45, 155, 0.35);
}
.toast[hidden] { display: none; }
.toast.pop { animation: toast-in 0.28s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes toast-in { from { transform: translate(-50%, 20px) scale(0.9); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
@media (max-width: 1079.98px) {
  .hub .toast { bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
}

.confirm { display: grid; gap: 12px; padding: 16px; border-radius: var(--r); background: #24121c; border: 2px solid var(--danger); font-weight: 700; }

/* ---------------- PLAY: game screens ---------------- */

.foot-link { text-align: center; padding: 8px 0 0; }
.foot-link a { color: var(--muted); font-size: 0.85rem; font-weight: 700; text-decoration: none; }
.foot-link a:hover { color: var(--text); }

/* One 16:9 "monitor" per game, styled like the screens in the room art: dark bezel, cyan edge
   light, soft glow. Phones: stacked. Tablet: 2 columns. Desktop: 3 columns, this week's game
   spans two of them. Only released games plus the next coming-soon card are rendered. */
.games { --games-gap: 18px; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--games-gap); }
.games > li { display: flex; min-width: 0; flex: 0 0 100%; }
/* Phones: one column; this week's game is the full width and the other cards 10 % narrower, centered. */
@media (max-width: 1079.98px) { .games > li { flex-basis: 90%; } .games > li.current { flex-basis: 100%; } }
.games-empty { padding: 24px; border-radius: var(--r); background: var(--panel); color: var(--muted); justify-content: center; }
/* Earlier games sit above this week's full-row card, the coming-soon games below it; rows are centered. */
@media (min-width: 1080px) {
  .games { --games-gap: 22px; }
  .games > li { flex-basis: calc((100% - var(--games-gap)) / 2); }
  .games > li.current { flex-basis: 100%; }
}
@media (min-width: 1080px) {
  .games > li { flex-basis: calc((100% - 2 * var(--games-gap)) / 3); }
  .games > li.current { flex-basis: 100%; }
}

.screen {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate;
  border-radius: 28px; padding: 0; font: inherit; text-align: left; cursor: pointer; color: #fff; text-decoration: none;
  background: var(--bezel);
  border: 3px solid var(--lab);
  box-shadow: 0 0 28px var(--glow), 0 14px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.screen:hover { color: #fff; box-shadow: 0 0 40px var(--glow), 0 14px 44px rgba(0, 0, 0, 0.6); }
.screen:active { transform: scale(0.985); }
/* Playable cards grow a little on hover (coming-soon cards do not). */
@media (hover: hover) { .screen:not(.locked):hover { transform: scale(1.025); } } /* mouse only: on touch :hover sticks after a tap */
.screen:not(.locked):active { transform: scale(1.01); }
.screen.current { animation: screen-glow 3s ease-in-out infinite; }
@keyframes screen-glow {
  0%, 100% { box-shadow: 0 0 36px rgba(127, 230, 242, 0.5), 0 18px 50px rgba(0, 0, 0, 0.65); }
  50% { box-shadow: 0 0 60px rgba(127, 230, 242, 0.8), 0 18px 50px rgba(0, 0, 0, 0.65); }
}
.screen-art { position: absolute; inset: 0; z-index: -1; border-radius: 24px; overflow: hidden; background: linear-gradient(160deg, hsl(var(--ep-hue, 190) 60% 30%), #06161b); }
.screen-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; display: block; }
/* faint scanlines, like the monitors in the room */
.screen-art::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 4px);
}
.screen-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    /* top-left corner: black fading diagonally to clear at the card's halfway line; the far half is untouched */
    linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 100%),
    linear-gradient(to top, rgba(4, 16, 21, 0.95) 0%, rgba(4, 16, 21, 0.5) 34%, rgba(4, 16, 21, 0) 60%);
}

/* Top left: release date, plain text. Top right: PLAY (or the bell on a coming-soon card). */
.screen-date { position: absolute; top: 28px; left: 32px; z-index: 1; font-weight: 900; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); white-space: nowrap; }
.play-chip, .notify-chip { position: absolute; top: 24px; right: 24px; }
.screen-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 4px; padding: 28px 32px 32px; }
.screen-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lab); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.screen-eyebrow .ico { width: 1em; height: 1em; }
.screen-name { font-family: var(--font-title); font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight: 400; line-height: 1.05; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8); overflow-wrap: break-word; }
.current .screen-name { font-size: clamp(1.8rem, 6vw, 3rem); }
@media (max-width: 1079.98px) { .screen-name { font-size: clamp(1.4rem, 5.5vw, 2rem); } }
.play-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; color: #fff;
  font-family: var(--font-title); font-size: 1.05rem; font-weight: 400; letter-spacing: 0.06em;
}
.play-chip .ico { width: 1.1em; height: 1.1em; }
/* This week: magenta. Older games: white outline. */
.play-chip.primary {
  /* Identical to the games' START button: white face, pink-to-blue gradient border, black outline, gold ripple. */
  min-height: 56px; padding: 0 28px; font-size: 1.3rem; color: #000; text-transform: uppercase; letter-spacing: 1px;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(to bottom, #ff1fae, #00aeef) border-box;
  border: 2px solid transparent; outline: 3px solid #000; outline-offset: 0;
  transition: background 0.2s, color 0.2s;
}
/* Hovering any playable card: its PLAY button pulses like the games' START button. */
.screen:not(.locked):hover .play-chip, .screen:not(.locked):focus-visible .play-chip { animation: btn-ripple 1.4s ease-out infinite; }
/* Hovering the card turns it magenta. */
.screen.current:hover .play-chip.primary, .screen.current:focus-visible .play-chip.primary {
  /* The PP tank's pink: #fa9adf highlight to #e267bb body (sampled from assets/pp-logo.webp). */
  color: #fff; background: linear-gradient(180deg, #fa9adf, #e267bb) padding-box, linear-gradient(180deg, #fa9adf, #e267bb) border-box;
  box-shadow: 0 10px 34px rgba(226, 103, 187, 0.6);
}
@keyframes btn-ripple { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 100% { box-shadow: 0 0 0 1.2rem rgba(255, 255, 255, 0); } } /* white pulse */
.play-chip.secondary { background: rgba(138, 234, 245, 0.5); border: 3px solid #fff; }

/* Coming soon: the art stays visible but darker and see-through; lock in the eyebrow; "Remind Me" top right. */
.screen.locked { cursor: pointer; border-color: rgba(138, 234, 245, 0.55); box-shadow: 0 0 16px rgba(127, 230, 242, 0.2), 0 14px 40px rgba(0, 0, 0, 0.6); }
.screen.locked .screen-art img { filter: brightness(0.45) saturate(0.7); opacity: 0.55; }
.screen.locked .screen-name { color: #d7e9ec; }
.notify-chip.on { background: rgba(255, 255, 255, 0.85); color: #052126; }

/* Locked tap: bounce (reduced motion: outline flash instead, see end of file). */
.bounce { animation: bounce 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes bounce { 0% { transform: translateY(0); } 30% { transform: translateY(-12px) rotate(-2deg); } 55% { transform: translateY(0) rotate(1.5deg); } 75% { transform: translateY(-5px); } 100% { transform: translateY(0); } }

/* ---------------- TOP AGENTS ---------------- */

.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 22px; border-radius: 999px;
  border: 2px solid var(--line-strong); background: var(--panel); color: var(--text);
  font: inherit; font-weight: 900; font-size: 1.1rem; cursor: pointer; white-space: nowrap;
}
.pill .ico { color: var(--gold); }
.pill[aria-pressed="true"] { background: var(--lab); border-color: var(--lab); color: #001219; }
.pill[aria-pressed="true"] .ico { color: #001219; }
.pill-row .pill { flex: 1 1 0; }
@media (min-width: 1080px) { .pill-row .pill { flex: 0 0 auto; min-width: 180px; } }

.ep-picker {
  display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter);
  scrollbar-width: none;
}
.ep-picker::-webkit-scrollbar { display: none; }
.ep-dot {
  flex: none; width: var(--tap); height: var(--tap); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--line-strong); background: var(--panel); color: var(--text);
  font: inherit; font-size: 1.35rem; font-weight: 900; cursor: pointer;
}
.ep-dot[aria-pressed="true"] { background: var(--pp); border-color: var(--pp); color: #fff; box-shadow: 0 6px 18px rgba(255, 45, 155, 0.45); }
.ep-dot.locked { color: var(--muted); border-style: dashed; font-size: 1.05rem; }

.filter-row { display: flex; flex-wrap: wrap; gap: 10px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); flex: 1 1 auto; }
.seg[hidden] { display: none; }
.seg .pill { border: 0; background: transparent; padding: 0 16px; font-size: 1rem; flex: 1 1 0; min-height: 52px; }
.seg .pill[aria-pressed="true"] { background: var(--pp); color: #fff; }
.seg .pill[aria-pressed="true"] .ico { color: #fff; }
@media (min-width: 1080px) { .seg { flex: 0 0 auto; } }

.board-title { color: var(--muted); font-size: 1.05rem; }
.board-title b { color: var(--lab); font-weight: 900; }

/* Podium: DOM order 1-2-3, shown as 2-1-3 */
.podium { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; }
.podium:empty { display: none; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; grid-row: 1; }
.pod1 { grid-column: 2; }
.pod2 { grid-column: 1; }
.pod3 { grid-column: 3; }
.pod-face { position: relative; display: inline-flex; padding-top: 4px; }
.pod1 .pod-face { padding-top: 26px; }
.pod .avatar { box-shadow: 0 0 0 4px #dfe8f5, 0 8px 20px rgba(0, 0, 0, 0.5); }
.pod1 .avatar { box-shadow: 0 0 0 4px var(--gold), 0 0 30px rgba(255, 210, 63, 0.5); }
.pod3 .avatar { box-shadow: 0 0 0 4px #e8a36b, 0 8px 20px rgba(0, 0, 0, 0.5); }
.pod .avatar-xl { width: clamp(84px, 24vw, 112px); height: clamp(84px, 24vw, 112px); }
.pod .avatar-lg { width: clamp(64px, 18vw, 84px); height: clamp(64px, 18vw, 84px); }
.crown { position: absolute; top: -2px; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; color: var(--gold); filter: drop-shadow(0 2px 8px rgba(255, 210, 63, 0.6)); }
.pod-name { font-weight: 900; font-size: clamp(0.8rem, 3.4vw, 1.05rem); line-height: 1.15; overflow-wrap: anywhere; max-width: 100%; }
.pod.me .pod-name { color: var(--pp-2); }
.pod-val { font-weight: 900; color: var(--pp-2); font-variant-numeric: tabular-nums; font-size: clamp(0.85rem, 3.4vw, 1.05rem); }
.pod-step {
  width: 100%; display: grid; place-items: start center; padding-top: 8px;
  border-radius: 18px 18px 8px 8px; font-size: 2rem; font-weight: 900;
  background: linear-gradient(180deg, rgba(223, 232, 245, 0.35), rgba(223, 232, 245, 0.06));
  height: 84px;
}
.pod1 .pod-step { height: 116px; background: linear-gradient(180deg, rgba(255, 210, 63, 0.55), rgba(255, 210, 63, 0.08)); color: #fff6cf; }
.pod3 .pod-step { height: 64px; background: linear-gradient(180deg, rgba(232, 163, 107, 0.45), rgba(232, 163, 107, 0.06)); }

.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.board:empty { display: none; }
.row-item {
  display: grid; grid-template-columns: 40px 44px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 64px; padding: 8px 16px 8px 10px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line);
}
.row-item.me { border: 2px solid var(--pp); background: linear-gradient(90deg, rgba(255, 45, 155, 0.18), var(--panel)); }
.rank { font-weight: 900; font-size: 1.25rem; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who-name { font-weight: 800; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-flag { flex: none; font-size: 1.15rem; }
.val { font-weight: 900; color: var(--pp-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.board-empty { display: grid; gap: 14px; justify-items: center; padding: 28px 20px; text-align: center; font-weight: 800; font-size: 1.15rem; border-radius: var(--r-lg); background: var(--panel); border: 2px dashed var(--line-strong); }
.board-empty[hidden] { display: none; }
.big-lock { display: inline-flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 900; }
.big-lock .ico { color: var(--muted); font-size: 1.6rem; }

/* Sticky "You" row: a wrapper around one board row (.row-item.you-self, built by hub.js boardRow()); sits above the bottom tab bar on phones. */
.you-row {
  position: sticky; bottom: 16px; z-index: 5;
  border-radius: 999px; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
}
.you-row[hidden] { display: none; }
@media (max-width: 1079.98px) {
  .hub .you-row { bottom: calc(var(--nav-h) + var(--safe-b) + 10px); }
}

/* ---------------- drawers (ME, TOP AGENTS): the wiki character-page look (light mode) ---------------- */

/* Values from the MrBeast Lab wiki stylesheet: hero blue #07BCE8, Commissioner, kicker letter-spacing .5em,
   name as an accent-white-accent gradient, fact boxes rgba(255,255,255,.35) with a rgba(6,19,26,.16) border. */
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(2, 8, 10, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade-in 0.3s ease both; }
.drawer-backdrop[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  --c: #4cc9e6;
  --c2: #ff4fc3;
  --box: rgba(255, 255, 255, 0.35);
  --box-line: rgba(6, 19, 26, 0.16);
  --row-bg: color-mix(in srgb, #fff 35%, var(--blue)); /* board row colour: --box laid over the drawer blue, as one solid colour (avatar outlines use it too) */
  --ink: #06131a;
  --ink-soft: #123540;
  --pink: #e24c9c;
  position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(440px, 100vw);
  display: flex; flex-direction: column; min-width: 0;
  font-family: "Commissioner", system-ui, sans-serif;
  color: var(--ink); background: var(--blue);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.55);
  transform: translateX(100%); visibility: hidden;
  /* Always on its own layer: otherwise the browser promotes it when the slide starts and drops it when it ends,
     re-drawing the title and tabs each time (they blinked once or twice as the drawer opened). */
  will-change: transform; backface-visibility: hidden;
  /* Smooth ease-out that lands crisply. The old 0.75s cubic-bezier(0.16, 1, 0.3, 1) looked stopped at ~0.45s but
     crept the last 5px for another 0.3s; Safari draws text softer between whole pixels, so the title looked faded
     until it landed. This curve spends ~0.14s in that last stretch. */
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.5s;
}
.drawer.open { transform: none; visibility: visible; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s; }
body.drawer-open { overflow: hidden; }
.drawer-close {
  position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 9;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(6, 19, 26, 0.45); border: 0; color: #fff; font-size: 1.2rem; cursor: pointer;
}
.drawer-close:hover { background: rgba(6, 19, 26, 0.7); }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; display: grid; gap: 20px; align-content: start; padding: 0 20px calc(28px + var(--safe-b)); }
.drawer-body > * { min-width: 0; }
#me-body { display: grid; gap: 20px; }
.drawer-title { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: calc(16px + env(safe-area-inset-top, 0px)); padding: 0 64px 0 0; font-family: var(--font-mark); font-weight: 900; font-size: 1.25rem; text-transform: uppercase; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.drawer-title [data-icon] { color: var(--gold); }
#board-h { padding-left: 2px; font-family: var(--font-title); font-weight: 400; font-size: calc(1.25rem + 4px); } /* Top 10 Agents: the game-title font (Bungee, like .screen-name), no icon, 4px larger than the other drawer titles, nudged 2px right */
.drawer .muted { color: var(--ink-soft); }

/* Hero: backdrop layer at 50 %, radial accent glow, floating avatar with drop shadows, then kicker / name / sub. */
.profile-hero { position: relative; isolation: isolate; margin: 0 -20px; padding: calc(28px + env(safe-area-inset-top, 0px)) 20px 24px; text-align: center; overflow: clip; }
.profile-layer { position: absolute; inset: -12% 0; z-index: 0; opacity: 0.5; background: url("/assets/bg/mbl_parallax_back.webp") center / cover no-repeat; pointer-events: none; }
.profile-hero::before { content: ""; position: absolute; left: 50%; top: 40px; width: min(560px, 90%); aspect-ratio: 1; transform: translateX(-50%); z-index: 1; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--c) 55%, transparent) 0%, color-mix(in srgb, var(--c2) 22%, transparent) 42%, transparent 70%); filter: blur(6px); }
.profile-hero::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(7, 188, 232, 0.25) 0%, rgba(7, 188, 232, 0) 40%, rgba(7, 188, 232, 0.85) 80%, var(--blue) 100%); }
.id-face { position: relative; z-index: 3; display: block; width: min(360px, 72%); margin: 0 auto; padding: 0; border: 0; background: none; cursor: pointer; animation: mbl-in 0.8s ease-out both; }
.id-face .avatar { display: block; width: 100%; height: auto; aspect-ratio: 1; max-width: none; filter: brightness(1) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 26px color-mix(in srgb, var(--c) 45%, transparent)); transition: filter 0.2s ease; animation: mblc-float 6s ease-in-out 1s infinite; }
/* Hover / focus / picker open: the picture itself gets darker (brightness on the img, no dark circle)
   and a white pen shows in the middle; a tap opens the avatar picker. */
.id-face:hover .avatar, .id-face:focus-visible .avatar, .id-face[aria-expanded="true"] .avatar { filter: brightness(0.6) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 26px color-mix(in srgb, var(--c) 45%, transparent)); }
.id-face::after { content: ""; position: absolute; inset: 0 0 auto; aspect-ratio: 1; /* the avatar square, centred on the face */ background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l1-4L16 5l3 3L8 19z'/%3E%3Cpath d='M14 7l3 3'/%3E%3C/svg%3E") center / 22% no-repeat; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
.id-face:hover::after, .id-face:focus-visible::after, .id-face[aria-expanded="true"]::after { opacity: 1; }
@keyframes mbl-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mblc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.profile-title { position: relative; z-index: 4; margin-top: -6px; animation: mbl-in 0.8s ease-out 0.25s both; }
.profile-kicker { font-size: clamp(11px, 1.3vw, 16px); font-weight: 800; letter-spacing: 0.5em; text-transform: uppercase; color: #fff; margin-bottom: 6px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.id-name { max-width: 100%; font-family: "Commissioner", system-ui, sans-serif; font-weight: 800; text-transform: none; line-height: 0.95; letter-spacing: -1px; font-size: clamp(32px, calc(10vw - 2px), 54px); overflow-wrap: anywhere; word-break: break-word; background: linear-gradient(90deg, var(--c) 0%, #ffffff 50%, var(--c2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }

/* Sections: kicker + light fact boxes (the wiki's light-mode .pp-fact). */
.profile-section { display: grid; gap: 12px; }
.profile-section + .profile-section { margin-top: 24px; } /* extra air above MY BEST ACHIEVEMENTS */
.profile-section .profile-kicker { margin: 0; font-size: 16.8px; letter-spacing: 3px; text-align: center; }
.pp-facts { display: grid; grid-template-columns: 1fr; gap: 12px; }
.pp-fact { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 999px; padding: 14px 22px; text-align: left; background: var(--box); border: 1px solid var(--box-line); }
.pp-fact-label { font-size: 15.4px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-soft); }
/* PP values: white with a thick black outline (the game-title treatment). One shared class (.pp-outline) for the stat
   boxes, the achievements rank, the #1 hero total and the board rows (.val); the size is set per element,
   the outline thickness through --pp-stroke (default 5px). */
.pp-outline { color: #fff; font-weight: 900; -webkit-text-stroke: var(--pp-stroke, 5px) #000; paint-order: stroke fill; text-transform: uppercase; letter-spacing: 0.5px; }
.pp-fact-value, .b-rank { margin: 0; font-size: 26px; line-height: 1.1; }

.bests { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bests .best { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px 0 10px; border-radius: 999px; background: var(--box); border: 1px solid var(--box-line); color: var(--ink); font-weight: 800; }
/* Episode pill ("Ep. 1"): black, as wide as its text. */
.b-ep { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; display: grid; place-items: center; background: #000; color: #fff; font-size: 0.95rem; font-weight: 800; white-space: nowrap; }
.b-pp { font-variant-numeric: tabular-nums; }
.b-rank { margin-left: auto; }
.drawer .btn { min-height: 48px; border-radius: 999px; border: 1px solid var(--box-line); outline: 0; font-family: inherit; font-size: 1rem; font-weight: 800; letter-spacing: 0; text-transform: uppercase; color: var(--ink); background: var(--box); }
.drawer .btn:hover { background: rgba(255, 255, 255, 0.5); }
.drawer .btn.primary { background: var(--pink); border-color: transparent; color: #fff; }
.drawer .small-link { min-height: 36px; color: var(--ink-soft); font-size: 0.9rem; justify-self: center; }

/* Avatar picker: floats under the picture. */
/* Black, attached to <body> (outside .drawer), so it defines its own pink. Scrolls inside when taller than the screen. */
.look-pop { --pink: #e24c9c; position: fixed; z-index: 300; display: grid; gap: 12px; overflow-y: auto; /* max-height is set by hub.js (it knows the page zoom) */ overscroll-behavior: contain; padding: 16px; border-radius: 18px; background: #000; border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5); animation: pop-in 0.18s ease-out both; }
.look-pop .profile-kicker { margin: 0; color: #fff; text-shadow: none; font-size: 12px; letter-spacing: 3px; text-align: center; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* 3 avatars per row; each button is a circle, so the ring on the current look is a true circle. */
.avatar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.avatar-btn { position: relative; display: grid; place-items: center; aspect-ratio: 1; min-height: var(--tap); padding: 4px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; transition: transform 0.15s; }
.avatar-btn .avatar { width: 100%; height: 100%; }
@media (hover: hover) { .avatar-btn:hover { transform: scale(1.06); } } /* mouse only: on touch :hover sticks after a tap */
.avatar-btn[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--pink); }
.avatar-btn[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: -2px; right: -2px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--pink); color: #fff; font-weight: 900; font-size: 0.85rem; border: 2px solid #000;
}
.panel { display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.drawer .panel { background: var(--box); border: 1px solid var(--box-line); color: var(--ink); }

/* TOP AGENTS inside its drawer: light boxes, This week / Overall toggle, World / My country. */
/* Solid fill (--row-bg = --box over the drawer blue): the #1 hero's backdrop loads in behind the tabs after the
   board request, and a see-through fill made the tabs look like they were fading in. Solid, they never change. */
.toggle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--row-bg); border: 1px solid var(--box-line); }
.toggle .pill { border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); min-height: 44px; padding: 0 8px; font-family: inherit; font-size: 0.82rem; font-weight: 800; letter-spacing: 0; text-transform: uppercase; white-space: nowrap; }
.toggle .pill .ico { color: var(--ink-soft); }
.toggle .pill[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.toggle .pill[aria-pressed="true"] .ico { color: var(--gold); }
.drawer .ep-picker { margin: 0; padding: 0; gap: 6px; overflow: visible; flex-wrap: wrap; }
.drawer .ep-dot { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; background: var(--box); border: 1px solid var(--box-line); color: var(--ink); font-family: inherit; font-size: 1rem; font-weight: 800; }
.drawer .ep-dot[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.drawer .ep-dot.locked { color: var(--ink-soft); }
.drawer .filter-row { gap: 8px; }
.drawer .seg { padding: 4px; border-radius: 999px; background: var(--box); border: 1px solid var(--box-line); }
.drawer .seg .pill { border-radius: 999px; color: var(--ink-soft); font-family: inherit; font-size: 0.95rem; font-weight: 800; letter-spacing: 0; text-transform: uppercase; min-height: 44px; }
.drawer .seg .pill .ico { color: var(--ink-soft); }
.drawer .seg .pill[aria-pressed="true"] { background: var(--ink); color: #fff; }
.drawer .seg .pill[aria-pressed="true"] .ico { color: #fff; }
.drawer .board-title { color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; text-align: center; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.drawer .board-title b { color: #fff; }
.drawer .podium { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 8px; margin: 0 -8px; }
/* Podium portraits: the profile hero look (backdrop at 50 %, accent glow, drop shadow, float), #1 wears the crown. */
.drawer .pod { position: relative; isolation: isolate; gap: 2px; padding: 14px 4px 10px; border-radius: 18px; overflow: clip; background: none; border: 0; color: #fff; }
.drawer .pod::before { content: ""; position: absolute; inset: -12% 0; z-index: -2; opacity: 0.5; background: url("/assets/bg/mbl_parallax_back.webp") center / cover no-repeat; }
.drawer .pod::after { content: ""; position: absolute; left: 50%; top: 8%; width: 110%; aspect-ratio: 1; transform: translateX(-50%); z-index: -1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 55%, transparent) 0%, color-mix(in srgb, var(--c2) 22%, transparent) 42%, transparent 70%); filter: blur(6px); }
.drawer .pod1 { grid-column: 2; } .drawer .pod2 { grid-column: 1; } .drawer .pod3 { grid-column: 3; }
.drawer .pod-face { padding-top: 18px; }
.drawer .pod .avatar, .drawer .pod1 .avatar, .drawer .pod3 .avatar { width: clamp(72px, 22vw, 104px); height: clamp(72px, 22vw, 104px); box-shadow: none; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 18px color-mix(in srgb, var(--c) 45%, transparent)); animation: mblc-float 6s ease-in-out 1s infinite; }
.drawer .pod1 .avatar { width: clamp(88px, 26vw, 120px); height: clamp(88px, 26vw, 120px); }
.drawer .crown { top: -6px; width: 44px; height: 44px; }
.drawer .pod-rank { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); margin-top: 4px; }
.drawer .pod-name { font-weight: 800; font-size: 0.85rem; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
.drawer .pod-val { font-weight: 800; font-size: 0.85rem; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
.drawer .pod-step { display: none; }
/* Rows 4-20 (and the country rows): fully rounded pills, rank in a pink chip. */
.drawer .board { gap: 8px; }
/* Every board row, the player's own You row included, uses this one rule; .you-self only changes the background (--row-bg). */
.drawer .row-item { grid-template-columns: auto 44px minmax(0, 1fr) auto; gap: 8px; min-height: 60px; padding: 6px 18px 6px 8px; background: var(--row-bg); border: 1px solid var(--box-line); border-radius: 999px; color: var(--ink); }
.drawer .row-item.you-self { --row-bg: #e8f5fc; }
.drawer .row-item.me { box-shadow: inset 0 0 0 2px var(--pink); }
.drawer .rank-chip { display: inline-grid; place-items: center; min-width: 48px; height: 36px; padding: 0 10px; border-radius: 999px; background: #000; color: #fff; font-weight: 800; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
/* Rank chips are black; only the sticky You row keeps the pink chip. */
.drawer .row-item.you-self .rank-chip { background: var(--pink); }
.drawer .who-name { color: var(--ink); }
/* Right-hand PP text: the shared outlined style (.pp-outline), a little thinner stroke for the smaller size. */
.drawer .row-item .val { --pp-stroke: 4px; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.drawer .row-item .val .unit { margin-left: 0.4em; } /* extra room between the number and "PP" (the outline eats the normal space) */
/* By Country: big flag, then the avatar stack (flag, avatars, PP; no country name). */
.drawer .country-row { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.drawer .country-row .who-flag { font-size: 2.3rem; line-height: 1; }
/* Avatars overlap by half their width (margin = -50%), the first one on top (hub.js sets z-index descending); the 2px outline is the row colour. */
.drawer .faces { display: inline-flex; align-items: center; min-width: 0; }
.drawer .faces .avatar { position: relative; width: 40px; height: 40px; margin-left: -20px; box-shadow: 0 0 0 2px var(--row-bg); }
.drawer .faces .avatar:first-child { margin-left: 0; }
.drawer .board-empty { background: var(--box); border: 1px solid var(--box-line); border-radius: 18px; color: var(--ink); }

/* ---------------- name step (full screen) ---------------- */

/* Screen height in page pixels: hub/scale.js zooms the page (--zoom), which would otherwise multiply 100dvh and
   make the step taller than the screen on tablets. */
.view-focus { min-height: calc(100dvh / var(--zoom, 1) - 64px); align-content: center; justify-items: center; }
.close-btn {
  position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); z-index: 10;
  width: var(--tap); height: var(--tap); border-radius: 50%; display: grid; place-items: center;
  background: var(--panel); border: 2px solid var(--line-strong); color: var(--text); font-size: 1.3rem;
}
.close-btn:hover { color: var(--text); }
.focus-card { position: relative; z-index: 1; display: grid; gap: 14px; width: 100%; max-width: 520px; justify-items: center; text-align: center; padding-top: 48px; }
.focus-card[hidden] { display: none; }
.step-h { font-family: var(--font-title); font-weight: 400; font-size: 1.1rem; letter-spacing: 0.04em; color: #fff; }
/* Characters: phones 2 columns x 5 rows; tablet/desktop 2 rows of 5 at twice the size (180 px). */
.avatar-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 360px; }
/* The button is exactly the picture plus its 3px padding, so the selection ring below can be sized from it. */
.avatar-pick { display: grid; place-items: center; justify-self: center; width: 100%; max-width: 118px; }
.avatar-pick .avatar { width: 100%; max-width: 112px; height: auto; aspect-ratio: 1; } /* phones: 25% smaller than 150px */
/* Phones and tablets: characters and names side by side, so the whole step fits on one screen with no scrolling
   (a phone browser often leaves only ~660px of height). Left: the ten characters in two close columns (five rows).
   Right: six names, filling the same height as the five character rows. SHOW MORE sits under the names.
   --av (picture size) is the smaller of what the width and the height allow, in page pixels: hub/scale.js zooms
   the page on wider screens and sets --zoom, so the screen size is divided by it. ~232px of the width goes to the
   page margins, the gap and a name column of at least ~170px; ~220px of the height to the titles (with 10px
   under each), SHOW MORE and the gaps. */
@media (max-width: 1079.98px) {
  #name-step {
    --av: clamp(48px, min((100vw / var(--zoom, 1) - 232px) / 2 - 6px, (100dvh / var(--zoom, 1) - 220px) / 5 - 10px), 84px);
    --row: calc(var(--av) + 6px);
    padding-top: 52px; /* clear of the close button at the top left */
    grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ha hn" "av names" ". more";
    column-gap: 12px; row-gap: 8px; align-items: start; max-width: 560px;
  }
  #name-step > .step-h:first-child { grid-area: ha; }
  #name-h { grid-area: hn; }
  #name-step .step-h { font-size: 0.8rem; line-height: 1.2; align-self: end; margin-bottom: 10px; }
  .avatar-row { grid-area: av; grid-template-columns: repeat(2, var(--row)); grid-auto-rows: var(--row); column-gap: 6px; row-gap: 6px; width: auto; max-width: none; }
  /* Fixed width and height (not aspect-ratio): Safari stretched the buttons taller than wide under the page zoom. */
  .avatar-pick { width: var(--row); height: var(--row); max-width: none; aspect-ratio: auto; }
  .avatar-pick .avatar { width: var(--av); max-width: none; }
  /* Six rows in the height of the five character rows (5 x --row + 4 gaps of 6px = 6 rows + 5 gaps). */
  #name-list { grid-area: names; grid-auto-rows: calc((5 * var(--row) - 6px) / 6); gap: 6px; }
  #name-list .name-btn { min-height: 0; height: 100%; padding: 4px 10px; border-radius: 16px; font-size: clamp(0.8rem, calc(var(--av) * 0.22), 1.15rem); }
  #name-refresh { grid-area: more; justify-self: center; } /* centred under the names column */
}
@media (min-width: 1080px) {
  .avatar-row { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 1000px; }
  /* Up to 180px pictures, smaller on short windows so the five names and SHOW MORE stay on screen
     (~520px of the height goes to the page padding, titles, five 56px names, SHOW MORE and the gaps; the rest
     is two rows of characters). */
  .avatar-pick { max-width: clamp(96px, calc((100dvh - 520px) / 2), 186px); }
  .avatar-pick .avatar { max-width: clamp(90px, calc((100dvh - 520px) / 2 - 6px), 180px); }
  #view-name .focus-card { max-width: 1000px; padding-top: 16px; } /* the close button sits far to the left here */
  #view-name .name-list { gap: 8px; }
  #view-name .name-btn { min-height: 56px; }
  #name-list, #name-refresh { max-width: 520px; width: 100%; }
}
/* aspect-ratio + appearance: none keep the button an exact square on iOS Safari, which otherwise can
   give a button a taller box than its picture (the ring below then turned into an oval). */
.avatar-pick { position: relative; isolation: isolate; aspect-ratio: 1; padding: 3px; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: transform 0.15s; -webkit-appearance: none; appearance: none; }
/* Grow on hover with a mouse only: on touch screens :hover sticks after a tap and left the avatar enlarged. */
@media (hover: hover) { .avatar-pick:hover { transform: scale(1.06); } }
/* Ring (hover and selection): drawn behind the character art (z-index -1 inside the button's own stacking
   context), just outside the picture's circle (82% of the button width minus its 3px padding). Sized from the
   width only, with aspect-ratio 1, and centred, so it stays a true circle even if the button's box
   is ever taller or shorter than it is wide. */
.avatar-pick::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: calc((100% - 6px) * 0.82); height: auto; aspect-ratio: 1;
  translate: -50% -50%; z-index: -1; border-radius: 50%;
  border: 3px solid transparent; transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.avatar-pick[aria-checked="true"]::before { border-color: var(--blue); box-shadow: none; } /* picked: solid platform blue, no glow */
/* Hover (mouse/trackpad only, so taps never leave a stuck ring): a white ring with a blue glow on the
   characters not picked; the picked one keeps its blue ring while hovered. */
@media (hover: hover) {
  .avatar-pick:not([aria-checked="true"]):hover::before, .avatar-pick:not([aria-checked="true"]):focus-visible::before { border-color: #fff; box-shadow: var(--hover-glow); }
}
/* During the intro the picked character flies away (hub.js playIntro()); its ring fades instead of staying behind. */
.avatar-pick.flying::before { border-color: transparent; box-shadow: none; }
.show-more { background: none; border: 0; color: #fff; font-family: var(--font-title); font-weight: 400; font-size: 0.95rem; letter-spacing: 0.06em; min-height: var(--tap); padding: 0 16px; cursor: pointer; text-decoration: none; }
.name-hero { display: grid; place-items: center; animation: float 3.2s ease-in-out infinite; }
.name-hero .avatar { box-shadow: 0 0 0 4px var(--lab), 0 0 40px rgba(77, 227, 255, 0.5); }
.name-hero.big .avatar { box-shadow: 0 0 0 5px var(--pp), 0 0 60px rgba(255, 45, 155, 0.6); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.name-list { display: grid; gap: 10px; width: 100%; grid-template-columns: 1fr; }
/* 24 names: two columns once there is room, the list scrolls inside the full-screen step */
/* Bright character colours (Kevin cyan, FlyTrap lime, Banana yellow, EchoWing purple, Panthar blue, pink), black text. */
.name-btn.c1, .name-btn.c7, .name-btn.c13, .name-btn.c19 { background: #5fd0ff; }
.name-btn.c2, .name-btn.c8, .name-btn.c14, .name-btn.c20 { background: #b4f04a; }
.name-btn.c3, .name-btn.c9, .name-btn.c15, .name-btn.c21 { background: #ffcb3d; }
.name-btn.c4, .name-btn.c10, .name-btn.c16, .name-btn.c22 { background: #c39bff; }
.name-btn.c5, .name-btn.c11, .name-btn.c17, .name-btn.c23 { background: #6fb4ff; }
.name-btn.c6, .name-btn.c12, .name-btn.c18, .name-btn.c24 { background: #ff8fd0; }
/* Phones show six names a page, so an offer runs to c29; the same six colours continue. */
.name-btn.c25 { background: #5fd0ff; }
.name-btn.c26 { background: #b4f04a; }
.name-btn.c27 { background: #ffcb3d; }
.name-btn.c28 { background: #c39bff; }
.name-btn.c29 { background: #6fb4ff; }
.name-btn {
  display: flex; align-items: center; justify-content: center; min-height: 68px; padding: 8px 18px;
  border-radius: 22px; border: 0; font: inherit; font-family: "Commissioner", system-ui, sans-serif; font-weight: 800; font-size: clamp(1.1rem, 5vw, 1.45rem); /* mixed case (Bungee is caps only) */
  letter-spacing: 0.01em; overflow-wrap: anywhere; cursor: pointer; color: #08101c;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
/* Hover (mouse/trackpad only): a little bigger, a lighter fill (white wash over the colour, text unchanged)
   and the same white ring and blue glow as the character rings. Skips disabled, loading and picked buttons. */
@media (hover: hover) {
  .name-btn:not(:disabled):not(.skeleton):not(.picking):not([aria-pressed="true"]):hover, .name-btn:not(:disabled):not(.skeleton):not([aria-pressed="true"]):focus-visible {
    transform: scale(1.04);
    background-image: linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22));
    /* 3px white ring = the character ring's border; a box-shadow, so the layout never shifts. */
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.18), 0 0 0 3px #fff, var(--hover-glow);
  }
}
.name-btn:active { transform: scale(0.97); }
/* A press keeps its squeeze on mouse devices too (the hover rule above is more specific than .name-btn:active). */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .name-btn:not(:disabled):not(.skeleton):not(.picking):not([aria-pressed="true"]):hover:active { transform: scale(0.97); }
}
/* Chosen name: the same solid platform-blue 3px ring as the chosen character, no glow (kept while saving). */
.name-btn[aria-pressed="true"] { box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.18), 0 0 0 3px var(--blue); }
.name-btn.c0 { background: #ff8fd0; }
.name-btn.c1 { background: #5fd0ff; }
.name-btn.c2 { background: #b4f04a; }
.name-btn.c3 { background: #ffcb3d; }
.name-btn.c4 { background: #c39bff; }
.name-btn:disabled { opacity: 0.45; cursor: default; }
.name-btn.picking { opacity: 1; animation: pulse 0.7s ease-in-out infinite; }
.name-btn.skeleton { background: linear-gradient(90deg, var(--panel) 20%, var(--panel-2) 50%, var(--panel) 80%); background-size: 300% 100%; animation: shimmer 1.2s linear infinite; box-shadow: none; }
/* Intro (hub.js playIntro): the chosen name stays in place and fades out smoothly over 1 s. After .name-btn:disabled so it wins. */
.name-btn.fade-away { opacity: 0; transition: opacity 1s ease; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.done-hi { font-size: 1.3rem; font-weight: 800; color: var(--muted); margin-top: 6px; }
.done-name {
  font-size: clamp(2rem, 10vw, 3.2rem); line-height: 1.05; overflow-wrap: anywhere;
  background: linear-gradient(90deg, var(--lab), var(--pp-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
#name-done .btn.huge { margin-top: 12px; }
.pop { animation: popin 0.35s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes popin { from { transform: scale(0.8); } to { transform: scale(1); } }

/* ---------------- QR login ---------------- */

.scan-box { position: relative; width: min(100%, 380px); aspect-ratio: 1; justify-self: center; border-radius: var(--r-lg); overflow: hidden; background: #000; border: 2px solid var(--line-strong); display: grid; place-items: center; }
.scan-box video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-box video[hidden] { display: none; }
.scan-frame { position: absolute; inset: 18%; border: 4px solid var(--lab); border-radius: 22px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25); }
.scan-msg { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(7, 9, 15, 0.82); text-align: center; font-weight: 800; }
.file-btn { position: relative; }

/* ---------------- privacy page + footer ---------------- */

.doc { position: relative; z-index: 1; max-width: 760px; display: grid; gap: 14px; }
/* Privacy page titles use the game-title font. */
.doc h1, .doc h2 { font-family: var(--font-title); font-weight: 400; letter-spacing: 0.01em; }
.doc-veil {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 25%, rgba(0, 0, 0, 0.5) 75%, rgba(0, 0, 0, 0) 100%);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 25%, #000 75%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 25%, #000 75%, transparent 100%);
}
.doc ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.doc h2 { margin-top: 12px; }
.doc code { background: var(--panel-2); padding: 1px 6px; border-radius: 6px; }
.foot { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter) calc(32px + var(--safe-b)); color: var(--muted); font-size: 0.95rem; display: grid; gap: 4px; }

/* ---------------- wide screens ---------------- */

@media (min-width: 1080px) {
  .identity .avatar-xl { width: 128px; height: 128px; }
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  .jimmy-side, .jimmy-side.in { transition: none; } /* appears in place, no slide */
  .play-chip.primary, .screen.current, .name-hero, .name-btn.picking, .name-btn.skeleton, .toast.pop, .pop { animation: none; }
  .bounce { animation: flash 0.6s steps(2, jump-none) 1; }
  .btn, .screen, .nav-item, .name-btn { transition: none; }
  .btn:active, .screen:active, .screen:not(.locked):hover, .name-btn:active { transform: none; }
  /* Hover keeps its lighter fill and glow, without the grow (same selector as the hover rule so it wins). */
  .name-btn:not(:disabled):not(.skeleton):not(.picking):not([aria-pressed="true"]):hover, .name-btn:not(:disabled):not(.skeleton):not([aria-pressed="true"]):focus-visible { transform: none; }
  .screen:hover .play-chip { animation: none; }
}
@keyframes flash { 0%, 100% { outline: 3px solid transparent; } 50% { outline: 3px solid var(--pp); outline-offset: 3px; } }

/* ---------------- Top Agents: #1 hero (profile look at half size), crown on top ---------------- */
#board-hero { margin: 0 -20px; }
.board-hero-card { margin: 0; padding-top: 24px; padding-bottom: 8px; } /* #board-hero already carries the -20px side margins; a second pair pushed the hero 20px past the drawer */
.board-hero-card .hero-face { position: relative; z-index: 3; width: min(180px, 36%); margin: 18px auto 0; }
.board-hero-card .hero-face .avatar { display: block; width: 100%; height: auto; aspect-ratio: 1; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 22px color-mix(in srgb, var(--c) 45%, transparent)); animation: mblc-float 6s ease-in-out 1s infinite; }
.board-hero-card .hero-crown { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); width: 56px; height: 56px; color: var(--gold); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)); z-index: 4; }
.board-hero-card .id-name { font-size: clamp(16px, calc(5vw - 1px), 27px); line-height: 1.05; }
/* By Country #1: flag beside the name in its own colours (hub.js renderBoardHero flagText). */
.board-hero-card .hero-name-row { display: flex; align-items: center; justify-content: center; gap: 0.35em; }
.board-hero-card .hero-flag { flex: none; font-size: clamp(20px, calc(6vw - 1px), 32px); line-height: 1; }
.board-hero-card .profile-kicker { font-size: 11px; }
.hero-total { --pp-stroke: 4px; margin-top: 6px; font-size: 20px; } /* colour/outline from .pp-outline */
/* The hero's backdrop picture and gradient run up to the very top of the drawer, behind the title and the tabs.
   --above (set by hub.js fitBoardHeroTop) = the distance from the drawer body's top to #board-hero. The clip-path
   opens the hero upward by that much but still clips the sides and the bottom, so nothing spills over the rows. */
#view-board .drawer-body { position: relative; }
#view-board .drawer-title, #board-pills { position: relative; z-index: 1; }
#board-hero { position: relative; z-index: 0; }
/* No entrance fade on the board hero: it sits right under the tabs, and fading it in read as the top of the drawer fading. */
.board-hero-card .profile-title { animation: none; }
.board-hero-card { overflow: visible; clip-path: inset(calc(-1 * var(--above, 0px)) 0 0 0); }
.board-hero-card .profile-layer { top: calc(-1 * var(--above, 0px)); }
.board-hero-card::after { top: calc(-1 * var(--above, 0px)); }
/* Only the player's own row, and only inside the top 10, is white. */
.drawer .row-item.me-top { --row-bg: #fff; border-color: #fff; }

/* ---------------- #k= link: "Log in with this QR code?" question (hub.js confirmLinkLogin) ---------------- */
.link-confirm { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: var(--gutter); background: rgba(5, 13, 17, 0.88); }
.link-confirm-card { display: grid; gap: 14px; width: min(100%, 420px); padding: 22px; border-radius: var(--r-lg); background: var(--panel); border: 2px solid var(--line-strong); text-align: center; }
.link-confirm-msg { margin: 0; font-size: 1.25rem; font-weight: 800; line-height: 1.3; }
