/* inter-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* inter-cyrillic-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* inter-greek-ext-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2) format('woff2-variations');
  unicode-range: U+1F00-1FFF;
}

/* inter-greek-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-greek-wght-normal-CkhJZR-_.woff2) format('woff2-variations');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* inter-vietnamese-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* inter-latin-ext-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* inter-latin-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-latin-wght-normal-Dx4kXJAl.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* changa-arabic-wght-normal */
@font-face {
  font-family: 'Changa Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/changa-arabic-wght-normal-DJiiU_3s.woff2) format('woff2-variations');
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}

/* changa-latin-ext-wght-normal */
@font-face {
  font-family: 'Changa Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/changa-latin-ext-wght-normal-JRb8CoJ_.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* changa-latin-wght-normal */
@font-face {
  font-family: 'Changa Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/changa-latin-wght-normal-I7bYpVnT.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* noto-sans-arabic-arabic-wght-normal */
@font-face {
  font-family: 'Noto Sans Arabic Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/noto-sans-arabic-arabic-wght-normal-BhzieyvS.woff2) format('woff2-variations');
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}

/* noto-sans-arabic-math-wght-normal */
@font-face {
  font-family: 'Noto Sans Arabic Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/noto-sans-arabic-math-wght-normal-pS2d8anF.woff2) format('woff2-variations');
  unicode-range: U+0302-0303,U+0305,U+0307-0308,U+0310,U+0312,U+0315,U+031A,U+0326-0327,U+032C,U+032F-0330,U+0332-0333,U+0338,U+033A,U+0346,U+034D,U+0391-03A1,U+03A3-03A9,U+03B1-03C9,U+03D1,U+03D5-03D6,U+03F0-03F1,U+03F4-03F5,U+2016-2017,U+2034-2038,U+203C,U+2040,U+2043,U+2047,U+2050,U+2057,U+205F,U+2070-2071,U+2074-208E,U+2090-209C,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2100-2112,U+2114-2115,U+2117-2121,U+2123-214F,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B7,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+3030,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE00-1EEFF;
}

/* noto-sans-arabic-symbols-wght-normal */
@font-face {
  font-family: 'Noto Sans Arabic Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/noto-sans-arabic-symbols-wght-normal-BJ6p-EzA.woff2) format('woff2-variations');
  unicode-range: U+0001-000C,U+000E-001F,U+007F-009F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+2800-28FF,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B00-2BFF,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F000-1F0FF,U+1F100-1F1AD,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F700-1F7FF,U+1F800-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8BB,U+1F8C0-1F8C1,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FA89,U+1FA8F-1FAC6,U+1FACE-1FADC,U+1FADF-1FAE9,U+1FAF0-1FAF8,U+1FB00-1FBFF;
}

/* noto-sans-arabic-latin-ext-wght-normal */
@font-face {
  font-family: 'Noto Sans Arabic Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/noto-sans-arabic-latin-ext-wght-normal-CIz31GGw.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* noto-sans-arabic-latin-wght-normal */
@font-face {
  font-family: 'Noto Sans Arabic Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/noto-sans-arabic-latin-wght-normal-BQEJrIpl.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* VS+ portal design tokens and primitives.
 *
 * One source of truth for surface, text, state, spacing, radius and type across the
 * five sites. Imported once from main.tsx.
 *
 * Rules this file holds to:
 *   1. Colour means state. Green, amber and red say live, needs-attention, broken.
 *      Blue means "this is an action". Nothing is coloured for decoration.
 *   2. Radius encodes hierarchy rather than being one flat number: 14px for the single
 *      raised surface on a screen, 10px for panels, 6px for controls.
 *   3. Spacing comes off an 8px scale. Half steps exist only for control padding.
 *   4. Sentence case. No tracked-out caps, no arrows glued onto link text.
 *
 * The custom properties are the shared base of every site, and the primitives are all
 * class-scoped behind a vsp- prefix. Rule 1 holds on the studio and staff consoles without
 * exception. The brand tokens below are a layer on top for the player and marketing sites.
 */

:root {
  /* ---- Surfaces. A blue-charcoal ground, deliberately lifted off black so panels
     separate by their own value instead of needing a border on everything. ---- */
  --vs-sunk: #0a1017;      /* below ground: the nav rail and page header recede */
  --vs-void: #0d141b;      /* page ground */
  --vs-deck: #16202b;      /* raised surface: panels and cards */
  --vs-deck-hi: #1d2836;   /* hover on a raised surface */
  --vs-rail: #26333f;      /* a border you are meant to see */
  --vs-rail-soft: #1b2734; /* a hairline inside a surface */

  /* ---- Text ---- */
  /* Every value below clears WCAG AA (4.5:1) against --vs-deck, the lightest surface any
     of them sits on. --vs-deck is the worst case; on --vs-void and --vs-sunk they are better. */
  --vs-chalk: #e7edf3;     /* primary, 13.9:1 on deck */
  --vs-dim: #8b9fae;       /* secondary, 6.0:1 on deck */
  --vs-faint: #7d93a4;     /* tertiary, 5.2:1 on deck */
  --vs-prose: #a9bacb;     /* paragraphs on the marketing site, 8.3:1 on deck: --vs-dim reads as a caption at that length */

  /* ---- State. Only these carry colour. ---- */
  --vs-on: #35d67f;        /* live, healthy, done: 8.7:1 */
  --vs-warn: #f5a524;      /* needs attention: 8.1:1 */
  --vs-fault: #ff6b6b;     /* broken, destructive: 5.9:1 */

  /* Action blue splits in two because one value cannot both read as text on a dark surface
     and carry white text on top of itself. --vs-act is the ink; --vs-act-fill is the fill. */
  --vs-act: #4a8cf7;       /* action as text, icon, border or focus ring: 5.0:1 on deck */
  --vs-act-fill: #2f6fe0;  /* action as a filled button: white on it is 4.7:1 */
  --vs-act-fill-hi: #2560cc; /* hover darkens rather than lightens, or white would fail */
  --vs-act-ink: #ffffff;

  /* A destructive confirmation is the one place red is a fill. Dark ink on it, because white on
     this red fails contrast, and hover lightens for the same reason. */
  --vs-fault-fill-hi: #ff8484;
  --vs-fault-ink: #26090b;

  /* ---- Brand. The logo's two arcs, kept apart from the state colours on purpose: red here is the logo, and --vs-fault
     is something broken. These belong to brand moments on the player and marketing sites (a hero, the sign-in frame, a
     rank-up, a share card) and never appear on a studio or staff data screen, where red has to keep meaning broken.
     The blue is lifted from the artwork's original #0000f0, which is 2:1 on the page ground; this one is 4.9:1, level
     with the red. ---- */
  --vs-brand-red: #fa353a;
  --vs-brand-blue: #3f7dff;
  --vs-brand-red-wash: rgba(250, 53, 58, 0.16);
  --vs-brand-blue-wash: rgba(63, 125, 255, 0.16);

  /* Grounds for a game with no landscape art. Dark enough for an icon of any colour to sit on, and part of the same layer. */
  --vs-tint-1: #1b2a48;
  --vs-tint-2: #3b1d2a;
  --vs-tint-3: #17352f;
  --vs-tint-4: #2e2547;
  --vs-tint-5: #3a2c17;
  --vs-tint-6: #20313d;

  /* Rank metals, for the emblems. */
  --vs-rank-bronze: #c98a58;
  --vs-rank-silver: #b9c6d3;
  --vs-rank-gold: #efc14f;
  --vs-rank-platinum: #69d7cd;
  --vs-rank-diamond: #7fb0ff;
  --vs-rank-master: #ff7a7f;

  --vs-on-wash: rgba(53, 214, 127, 0.1);
  --vs-warn-wash: rgba(245, 165, 36, 0.1);
  --vs-fault-wash: rgba(255, 107, 107, 0.1);
  --vs-act-wash: rgba(74, 140, 247, 0.1);

  /* ---- Radius. Hierarchy, not a single rule. ---- */
  --vs-r-sm: 6px;
  --vs-r-md: 10px;
  --vs-r-lg: 14px;
  --vs-r-pill: 999px;

  /* ---- Space, off an 8px scale ---- */
  --vs-s1: 0.25rem;
  --vs-s2: 0.5rem;
  --vs-s3: 0.75rem;
  --vs-s4: 1rem;
  --vs-s5: 1.5rem;
  --vs-s6: 2rem;
  --vs-s7: 3rem;

  /* ---- Type. --vs-font is reading text and --vs-font-display is headings and stand-alone figures. Each stack covers
     Latin and Arabic: the browser only downloads the Arabic file when Arabic text is on the page, because each font-face
     carries a unicode-range. main.tsx imports the files from @fontsource (SIL Open Font License), so they are served from
     our own host and no player's address reaches a font CDN. The system faces at the end show while those load. ---- */
  --vs-font: "Inter Variable", "Noto Sans Arabic Variable", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --vs-font-display: "Changa Variable", "Inter Variable", "Noto Sans Arabic Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --vs-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;

  /* ---- Text sizes. Six steps, and a page picks from these rather than its own fractions. Nothing a person has to read
     is below the 13px step. ---- */
  --vs-text-sm: 0.8125rem;  /* 13: hints, table sub-lines, small print */
  --vs-text-base: 0.875rem; /* 14: tables and body text */
  --vs-text-md: 1rem;       /* 16: lead lines and panel headings that lead a page */
  --vs-text-lg: 1.125rem;   /* 18: section headings */
  --vs-text-xl: 1.5rem;     /* 24: the page title */
  --vs-text-2xl: 1.75rem;   /* 28: a stand-alone figure */

  /* ---- Shell metrics ---- */
  --vs-rail-w: 232px;

  --vs-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* A focus ring that stays visible on every surface: a dark spacer, then the action
   colour. Applied by primitives; reach for it directly on bespoke controls.
   Listed one by one rather than wrapped in :where(), which contributes no specificity and
   would lose `outline: none` to index.css `button:focus-visible`, stacking two rings. */
.vsp-focus:focus-visible,
.vsp-btn:focus-visible,
.vsp-select:focus-visible,
.vsp-seg-btn:focus-visible,
.vsp-menu-item:focus-visible,
.vsp-icon-btn:focus-visible,
.vsp-th-sort:focus-visible,
.vsp-count:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-void), 0 0 0 4px var(--vs-act);
}

.vsp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- Buttons */

.vsp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--vs-s2);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

/* colour is restated on every hover rule below. Without it the global `a:hover` wins on
   any Link that carries these classes and the label turns Vite-template indigo. */
.vsp-btn:hover:not(:disabled) {
  background: var(--vs-deck-hi);
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}

/* Grey and flat, not a faded copy of the live button: a dimmed blue still read as something to press, and its label
   fell to about 2.5:1. Colours are restated here so this beats every variant below. */
.vsp-btn:disabled {
  background: var(--vs-void);
  border-color: var(--vs-rail-soft);
  color: var(--vs-faint);
  cursor: not-allowed;
}

.vsp-btn--primary {
  background: var(--vs-act-fill);
  border-color: var(--vs-act-fill);
  color: var(--vs-act-ink);
}

.vsp-btn--primary:hover:not(:disabled) {
  background: var(--vs-act-fill-hi);
  border-color: var(--vs-act-fill-hi);
  color: var(--vs-act-ink);
}

.vsp-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--vs-dim);
}

.vsp-btn--ghost:hover:not(:disabled) {
  background: var(--vs-deck-hi);
  border-color: transparent;
  color: var(--vs-chalk);
}

.vsp-btn--danger {
  color: var(--vs-fault);
  border-color: transparent;
  background: transparent;
}

.vsp-btn--danger:hover:not(:disabled) {
  background: var(--vs-fault-wash);
  border-color: transparent;
  color: var(--vs-fault);
}

/* A quiet button stays quiet when it cannot be pressed: no box appears around it. */
.vsp-btn--ghost:disabled,
.vsp-btn--danger:disabled {
  background: transparent;
  border-color: transparent;
}

.vsp-btn--sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8125rem;
}

/* Square button for a lone glyph. Needs an aria-label at the call site. */
.vsp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck);
  color: var(--vs-dim);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.vsp-icon-btn:hover {
  background: var(--vs-deck-hi);
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}

/* ---------------------------------------------------------------- Badges and lamps */

.vsp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--vs-r-pill);
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
  color: var(--vs-dim);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.vsp-badge--ok {
  color: var(--vs-on);
  border-color: rgba(53, 214, 127, 0.35);
  background: var(--vs-on-wash);
}

.vsp-badge--warn {
  color: var(--vs-warn);
  border-color: rgba(245, 165, 36, 0.35);
  background: var(--vs-warn-wash);
}

.vsp-badge--fault {
  color: var(--vs-fault);
  border-color: rgba(255, 107, 107, 0.35);
  background: var(--vs-fault-wash);
}

/* The state dot. The only thing on a screen allowed to move on its own, and only
   when something really is live right now. */
.vsp-lamp {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.vsp-lamp--on {
  color: var(--vs-on);
  box-shadow: 0 0 0 0 rgba(53, 214, 127, 0.55);
  animation: vsp-pulse 2.4s ease-out infinite;
}

.vsp-lamp--warn { color: var(--vs-warn); }
.vsp-lamp--fault { color: var(--vs-fault); }
.vsp-lamp--idle { color: var(--vs-faint); }

@keyframes vsp-pulse {
  70% { box-shadow: 0 0 0 7px rgba(53, 214, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 214, 127, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .vsp-lamp--on { animation: none; }
}

/* ---------------------------------------------------------------- Panels */

.vsp-panel {
  background: var(--vs-deck);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  padding: var(--vs-s5);
  min-width: 0;
}

.vsp-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--vs-s4);
  margin-bottom: var(--vs-s4);
  flex-wrap: wrap;
}

.vsp-panel-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--vs-chalk);
}

.vsp-panel-sub {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

/* ---------------------------------------------------------------- Notices */

.vsp-notice {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  padding: var(--vs-s3) var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-inline-start: 3px solid var(--vs-act);
  border-radius: var(--vs-r-md);
  background: var(--vs-act-wash);
  font-size: 0.875rem;
  color: var(--vs-chalk);
}

.vsp-notice--warn {
  border-inline-start-color: var(--vs-warn);
  background: var(--vs-warn-wash);
}

.vsp-notice--fault {
  border-inline-start-color: var(--vs-fault);
  background: var(--vs-fault-wash);
}

.vsp-notice--ok {
  border-inline-start-color: var(--vs-on);
  background: var(--vs-on-wash);
}

/* ---------------------------------------------------------------- Selects */

/* color-scheme is what makes the native option list render dark on Windows and Linux.
   Without it the popup is white regardless of what the closed control looks like. */
.vsp-select {
  color-scheme: dark;
  appearance: none;
  padding-block: 0.4rem;
  padding-inline: 0.7rem 2rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background-color: var(--vs-deck);
  background-image: linear-gradient(45deg, transparent 50%, var(--vs-dim) 50%),
    linear-gradient(135deg, var(--vs-dim) 50%, transparent 50%);
  background-position: calc(100% - 15px) center, calc(100% - 10px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--vs-chalk);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  max-width: 100%;
}

/* background-position has no logical form, so the arrow is placed by hand in RTL. The
   padding above already flips on its own. */
[dir='rtl'] .vsp-select {
  background-position: 15px center, 10px center;
  background-image: linear-gradient(135deg, transparent 50%, var(--vs-dim) 50%),
    linear-gradient(45deg, var(--vs-dim) 50%, transparent 50%);
}

.vsp-select:hover {
  border-color: var(--vs-faint);
}

/* For a select that sits inside a section head next to a heading, not on its own. */
.vsp-select--sm {
  padding-block: 0.25rem;
  font-size: 0.8125rem;
  max-width: 11rem;
}

/* ---------------------------------------------------------------- Segmented control */

.vsp-seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
}

.vsp-seg-btn {
  padding: 0.25rem 0.7rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--vs-dim);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.vsp-seg-btn:hover {
  color: var(--vs-chalk);
}

.vsp-seg-btn[aria-pressed='true'] {
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
}

/* ---------------------------------------------------------------- Overflow menu */

.vsp-menu-wrap {
  position: relative;
}

.vsp-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 13rem;
  padding: var(--vs-s1);
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.vsp-menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: var(--vs-r-sm);
  background: transparent;
  color: var(--vs-chalk);
  font: inherit;
  font-size: 0.875rem;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}

.vsp-menu-item:hover:not(:disabled) {
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
}

.vsp-menu-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vsp-menu-item--danger {
  color: var(--vs-fault);
}

.vsp-menu-item--danger:hover:not(:disabled) {
  background: var(--vs-fault-wash);
  color: var(--vs-fault);
}

.vsp-menu-note {
  padding: 0.35rem 0.65rem 0.5rem;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--vs-faint);
}

.vsp-menu-sep {
  height: 1px;
  margin: var(--vs-s1) 0;
  background: var(--vs-rail-soft);
  border: none;
}

/* ---------------------------------------------------------------- Tables */

.vsp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.vsp-table th,
.vsp-table td {
  padding: 0.55rem 0.75rem;
  text-align: start;
  border-bottom: 1px solid var(--vs-rail-soft);
}

.vsp-table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vs-dim);
  border-bottom-color: var(--vs-rail);
}

.vsp-table tbody tr:last-child :is(th, td) {
  border-bottom: none;
}

.vsp-table tbody tr:hover {
  background: var(--vs-deck-hi);
}

/* Numbers right-align so digits stack in a column and the eye can compare down it. */
.vsp-table :is(th, td).vsp-num {
  text-align: end;
}

.vsp-table th[scope='row'] {
  font-weight: 550;
  color: var(--vs-chalk);
}

/* Horizontal overflow clips vertically as well, so leave room for a focus ring on
   anything interactive inside and pull the space back out of the layout.
   position: relative makes this the containing block of anything absolutely positioned inside,
   such as a vsp-sr column label. Without it that label is placed against the page, not the
   scroller, so a table wider than a phone widened the whole page instead of scrolling. */
.vsp-scroll-x {
  position: relative;
  overflow-x: auto;
  margin-inline: calc(var(--vs-s2) * -1);
  padding-inline: var(--vs-s2);
  margin-block: -4px;
  padding-block: 4px;
}

/* A sortable column head: a real <button> inside <th aria-sort>, so the header stays a
   header to a screen reader and the sort is reachable by keyboard. It reads as the header
   text, not as a button. Every box property the index.css button defaults touch is
   restated here, because those defaults would otherwise draw a grey pill in the thead.
   The chevron only shows on the active column; elsewhere it keeps its space so the label
   does not jump when the sort moves. */
.vsp-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.1rem 0.2rem;
  margin-inline: -0.2rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  white-space: nowrap;
  cursor: pointer;
}

.vsp-th-sort:hover {
  background: transparent;
  border-color: transparent;
  color: var(--vs-chalk);
}

.vsp-th-sort-icon {
  flex: none;
  opacity: 0;
  transition: transform 0.15s, opacity 0.15s;
}

.vsp-th-sort:hover .vsp-th-sort-icon {
  opacity: 0.5;
}

.vsp-table th[aria-sort='ascending'],
.vsp-table th[aria-sort='descending'] {
  color: var(--vs-chalk);
}

th[aria-sort='ascending'] .vsp-th-sort-icon,
th[aria-sort='descending'] .vsp-th-sort-icon {
  opacity: 1;
}

th[aria-sort='ascending'] .vsp-th-sort-icon {
  transform: rotate(180deg);
}

.vsp-table :is(th, td).vsp-num .vsp-th-sort {
  flex-direction: row-reverse;
}

@media (prefers-reduced-motion: reduce) {
  .vsp-th-sort-icon { transition: none; }
}

/* ---------------------------------------------------------------- Pager */

/* Where the reader is on the left, the way to move on the right. The buttons are vsp-btn
   --sm; the pager only lays them out. */
.vsp-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s2) var(--vs-s4);
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--vs-dim);
  font-variant-numeric: tabular-nums;
}

.vsp-pager-status {
  margin: 0;
}

.vsp-pager-controls {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
}

.vsp-pager-page {
  padding-inline: var(--vs-s1);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Search */

/* A compact search box for a toolbar, sized to sit on one line with vsp-select--sm rather
   than the 44px form field. The glyph is decoration; the accessible name comes from a
   vsp-sr label at the call site. */
.vsp-search {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  min-width: 0;
}

.vsp-search-icon {
  position: absolute;
  inset-inline-start: 0.6rem;
  color: var(--vs-faint);
  pointer-events: none;
}

.vsp-search-input {
  width: 100%;
  min-height: 2rem;
  box-sizing: border-box;
  padding-block: 0.3rem;
  padding-inline: 2rem 0.7rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
  color: var(--vs-chalk);
  font: inherit;
  font-size: 0.8125rem;
  color-scheme: dark;
}

.vsp-search-input::placeholder {
  color: var(--vs-faint);
}

.vsp-search-input:hover {
  border-color: var(--vs-faint);
}

.vsp-search-input:focus {
  outline: none;
  border-color: var(--vs-act);
  box-shadow: 0 0 0 3px var(--vs-act-wash);
}

/* ---------------------------------------------------------------- Count chip */

/* A number with its label that doubles as a one-click filter. It is a toggle, so it takes
   aria-pressed, and the pressed state is drawn in action blue because choosing it is the
   action; the number itself never carries state colour. */
.vsp-count {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
  margin: 0;
  padding: var(--vs-s3) var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.vsp-count:hover:not(:disabled) {
  background: var(--vs-deck-hi);
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}

.vsp-count[aria-pressed='true'] {
  border-color: var(--vs-act);
  background: var(--vs-act-wash);
}

.vsp-count[aria-pressed='true']:hover:not(:disabled) {
  background: var(--vs-act-wash);
  border-color: var(--vs-act);
  color: var(--vs-chalk);
}

/* Disabled only while there is nothing to count yet, so it stays at full strength rather
   than greying out a strip that is about to fill in. */
.vsp-count:disabled {
  cursor: default;
}

.vsp-count-value {
  font-family: var(--vs-font-display);
  font-size: 1.375rem;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.vsp-count-label {
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--vs-dim);
}

.vsp-count-hint {
  font-size: 0.75rem;
  color: var(--vs-faint);
}

/* ---------------------------------------------------------------- Misc */

.vsp-code {
  font-family: var(--vs-mono);
  font-size: 0.8125rem;
  color: var(--vs-chalk);
}

.vsp-muted {
  color: var(--vs-dim);
}

.vsp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--vs-s2);
  padding: var(--vs-s6) var(--vs-s4);
  text-align: center;
  color: var(--vs-dim);
  font-size: 0.875rem;
}

.vsp-empty-title {
  color: var(--vs-chalk);
  font-size: 0.9375rem;
  font-weight: 600;
}

.vsp-empty-art {
  display: inline-flex;
  color: var(--vs-faint);
}

/* A button sized for a thumb: the player site's actions are 44px tall. */
.vsp-btn--touch {
  min-height: 44px;
  padding-inline: var(--vs-s4);
}

.vsp-notice-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
}

/* ---------------------------------------------------------------- Game art */

.vsp-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vsp-art--tint-1 { background: var(--vs-tint-1); }
.vsp-art--tint-2 { background: var(--vs-tint-2); }
.vsp-art--tint-3 { background: var(--vs-tint-3); }
.vsp-art--tint-4 { background: var(--vs-tint-4); }
.vsp-art--tint-5 { background: var(--vs-tint-5); }
.vsp-art--tint-6 { background: var(--vs-tint-6); }

.vsp-art-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Whole and uncropped, however its proportions fall. */
.vsp-art-icon {
  max-width: 62%;
  max-height: 72%;
  object-fit: contain;
  border-radius: var(--vs-r-sm);
}

.vsp-art-initials {
  font-family: var(--vs-font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--vs-chalk);
  opacity: 0.55;
}

/* ---------------------------------------------------------------- Rank emblems */

.vsp-rank { flex: none; color: var(--vs-rank-silver); }
.vsp-rank--bronze { color: var(--vs-rank-bronze); }
.vsp-rank--silver { color: var(--vs-rank-silver); }
.vsp-rank--gold { color: var(--vs-rank-gold); }
.vsp-rank--platinum { color: var(--vs-rank-platinum); }
.vsp-rank--diamond { color: var(--vs-rank-diamond); }
.vsp-rank--master { color: var(--vs-rank-master); }
.vsp-rank--none { color: var(--vs-faint); }

.vsp-rank-shield { fill: currentColor; fill-opacity: 0.2; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.vsp-rank-line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vsp-rank-mark { fill: currentColor; }

/* ---------------------------------------------------------------- A live event: the brand's red, on the player site */

.vsp-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--vs-r-pill);
  background: var(--vs-sunk);
  color: var(--vs-chalk);
  font-size: var(--vs-text-sm);
  font-weight: 700;
  line-height: 1.5;
}

.vsp-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vs-brand-red);
  animation: vsp-live-pulse 1.8s ease-out infinite;
}

@keyframes vsp-live-pulse {
  0% { box-shadow: 0 0 0 0 var(--vs-brand-red-wash); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .vsp-live::before { animation: none; }
}

/* ---------------------------------------------------------------- Loading placeholders */

.vsp-skeletons {
  display: flex;
  gap: 0.7rem;
  overflow: hidden;
}

.vsp-skeletons--tile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vsp-skeletons--row {
  flex-direction: column;
}

.vsp-skeleton {
  position: relative;
  display: block;
  flex: none;
  overflow: hidden;
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
}

.vsp-skeleton--card { width: 220px; height: 196px; }
.vsp-skeleton--avatar { width: 56px; height: 56px; border-radius: 50%; }
.vsp-skeleton--tile { height: 168px; }
.vsp-skeleton--row { width: 100%; height: 56px; }

.vsp-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--vs-deck-hi), transparent);
  transform: translateX(-100%);
  animation: vsp-shimmer 1.4s ease-in-out infinite;
}

@keyframes vsp-shimmer {
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .vsp-skeleton::after { animation: none; display: none; }
}

/* ---------------------------------------------------------------- Forms
 *
 * One field shape for the whole portal. A control is 44px tall, sits on a surface one
 * step darker than the panel behind it so it reads as somewhere to type, and carries its
 * label above and its explanation below.
 */

.vsp-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.vsp-label {
  display: flex;
  /* Explicit: App.css sets `form label { flex-direction: column }` on the bare element,
     which a class that only declares `display: flex` does not override. */
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--vs-chalk);
}

.vsp-label-optional {
  font-weight: 400;
  color: var(--vs-faint);
}

.vsp-hint {
  margin: 0;
  font-size: var(--vs-text-sm);
  line-height: 1.5;
  color: var(--vs-dim);
  max-width: 66ch;
}

.vsp-error {
  margin: 0;
  font-size: var(--vs-text-sm);
  line-height: 1.5;
  color: var(--vs-fault);
}

.vsp-input,
.vsp-textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  box-sizing: border-box;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  /* One step darker than the panel, not black. */
  background: var(--vs-void);
  color: var(--vs-chalk);
  font: inherit;
  font-size: 0.9375rem;
  color-scheme: dark;
}

.vsp-textarea {
  min-height: 8rem;
  font-family: var(--vs-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  resize: vertical;
}

.vsp-input::placeholder,
.vsp-textarea::placeholder {
  color: var(--vs-faint);
}

.vsp-input:hover,
.vsp-textarea:hover {
  border-color: var(--vs-faint);
}

.vsp-input:focus,
.vsp-textarea:focus {
  outline: none;
  border-color: var(--vs-act);
  box-shadow: 0 0 0 3px var(--vs-act-wash);
}

.vsp-input[aria-invalid='true'],
.vsp-textarea[aria-invalid='true'] {
  border-color: var(--vs-fault);
}

/* The select primitive already exists above; this matches its metrics to the inputs. */
.vsp-select--field {
  width: 100%;
  min-height: 44px;
  background-color: var(--vs-void);
  font-size: 0.9375rem;
}

/* Two fields that belong together, on one row until there is no room. */
.vsp-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--vs-s4);
}

@media (max-width: 560px) {
  .vsp-form-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Toggle ---- */

.vsp-switch {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--vs-s3);
  cursor: pointer;
}

.vsp-switch input {
  appearance: none;
  flex: none;
  width: 38px;
  height: 22px;
  margin: 0;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-pill);
  background: var(--vs-void);
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}

.vsp-switch input::after {
  content: '';
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--vs-dim);
  transition: transform 0.15s, background 0.15s;
}

.vsp-switch input:checked {
  background: var(--vs-act-fill);
  border-color: var(--vs-act-fill);
}

.vsp-switch input:checked::after {
  background: #fff;
  transform: translateX(16px);
}

[dir='rtl'] .vsp-switch input:checked::after {
  transform: translateX(-16px);
}

.vsp-switch input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-deck), 0 0 0 4px var(--vs-act);
}

.vsp-switch-text {
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--vs-chalk);
}

@media (prefers-reduced-motion: reduce) {
  .vsp-switch input,
  .vsp-switch input::after {
    transition: none;
  }
}

/* ---- Selection cards: a radio group that shows what each option means ---- */

.vsp-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--vs-s2);
}

.vsp-choice {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--vs-s3);
  padding: var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-void);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.vsp-choice:hover {
  border-color: var(--vs-faint);
}

.vsp-choice input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.vsp-choice:has(input:checked) {
  border-color: var(--vs-act);
  background: var(--vs-act-wash);
}

.vsp-choice:has(input:focus-visible) {
  box-shadow: 0 0 0 2px var(--vs-deck), 0 0 0 4px var(--vs-act);
}

.vsp-choice-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck-hi);
  color: var(--vs-dim);
}

.vsp-choice:has(input:checked) .vsp-choice-mark {
  background: var(--vs-act);
  color: var(--vs-act-ink);
}

.vsp-choice-body {
  min-width: 0;
}

.vsp-choice-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

.vsp-choice-why {
  display: block;
  margin-top: 0.1rem;
  font-size: var(--vs-text-sm);
  line-height: 1.45;
  color: var(--vs-dim);
}

/* ---- Sticky action bar ---- */

.vsp-actionbar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--vs-s2);
  padding: var(--vs-s3) var(--vs-s4);
  margin-top: var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.35);
  flex-wrap: wrap;
}

.vsp-actionbar-msg {
  margin: 0;
  margin-inline-end: auto;
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.vsp-actionbar-msg--error {
  color: var(--vs-fault);
}

/* ================================================================ Admin page pattern
 *
 * The frame every admin page shares, top to bottom:
 *   1. breadcrumbs, on detail pages only
 *   2. a head: one h1 that matches the nav label, one line saying what the page is for, and
 *      at most one primary button
 *   3. notices
 *   4. optional summary chips (vsp-count), each applying one filter
 *   5. tabs, held in the URL
 *   6. panels, each a toolbar, a table and a pager
 * The React side lives in src/components/admin. Page stylesheets only lay these out.
 */

.vsp-page {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s5);
  min-width: 0;
  color: var(--vs-chalk);
  font-family: var(--vs-font);
}

/* A column of things inside a panel: toolbar, table, pager. */
.vsp-stack {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  min-width: 0;
}

/* ---------------------------------------------------------------- Page head */

.vsp-page-head {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
}

.vsp-page-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--vs-s3) var(--vs-s4);
  flex-wrap: wrap;
}

.vsp-page-head-text {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s1);
  min-width: 0;
}

.vsp-page-title-row {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  flex-wrap: wrap;
  min-width: 0;
}

.vsp-page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--vs-chalk);
  overflow-wrap: anywhere;
}

.vsp-page-sub {
  margin: 0;
  max-width: 72ch;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--vs-dim);
}

.vsp-page-actions {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- Breadcrumbs */

.vsp-crumbs {
  display: flex;
  align-items: center;
  gap: var(--vs-s1);
  flex-wrap: wrap;
  color: var(--vs-faint);
  font-size: 0.8125rem;
}

.vsp-crumbs-item {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s1);
}

.vsp-crumb {
  color: var(--vs-dim);
  text-decoration: none;
  border-radius: 4px;
}

a.vsp-crumb:hover {
  color: var(--vs-chalk);
  text-decoration: underline;
}

.vsp-crumb[aria-current='page'] {
  color: var(--vs-chalk);
  font-weight: 550;
}

/* ---------------------------------------------------------------- Tabs */

/* A rule that runs the full content width, with the active tab sitting on it. Tabs are links,
   so each one has an address and the back button walks through them. */
.vsp-tabs-scroll {
  overflow-x: auto;
  border-bottom: 1px solid var(--vs-rail-soft);
  scrollbar-width: thin;
}

.vsp-tabs {
  display: flex;
  gap: var(--vs-s1);
  min-width: max-content;
}

.vsp-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s2);
  padding: 0.55rem var(--vs-s3);
  border-bottom: 2px solid transparent;
  color: var(--vs-dim);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.vsp-tab:hover {
  color: var(--vs-chalk);
}

/* The strip scrolls horizontally, and overflow clips vertically too, so an outset ring would be
   cut off at the top and bottom. This one sits inside the tab. */
.vsp-tab:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: -3px;
  border-radius: var(--vs-r-sm) var(--vs-r-sm) 0 0;
}

.vsp-tab[aria-current='page'],
.vsp-tab.vsp-tab--active {
  color: var(--vs-chalk);
  border-bottom-color: var(--vs-act);
}

/* How many things in a tab need staff. A number, not a state, so it stays neutral. */
.vsp-tab-count {
  min-width: 1.25rem;
  padding: 0 0.35rem;
  border-radius: var(--vs-r-pill);
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  font-size: 0.6875rem;
  font-weight: 650;
  line-height: 1.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .vsp-tab { transition: none; }
}

/* ---------------------------------------------------------------- Toolbar */

/* Search and filters on the left, the result count and Clear on the right. Wraps to as many
   lines as it needs rather than squeezing controls. */
.vsp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s2) var(--vs-s4);
  flex-wrap: wrap;
}

.vsp-toolbar-group {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
  min-width: 0;
}

.vsp-toolbar-group--grow {
  flex: 1 1 24rem;
}

.vsp-toolbar .vsp-search {
  flex: 1 1 14rem;
  max-width: 22rem;
}

.vsp-toolbar-count {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--vs-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Summary chips */

/* Four across, two by two on narrow screens, so the chips never leave one stranded on its own row. A page with a
   different number of chips sets --vsp-summary-columns. */
.vsp-summary {
  display: grid;
  grid-template-columns: repeat(var(--vsp-summary-columns, 4), minmax(0, 1fr));
  gap: var(--vs-s3);
}

@media (max-width: 760px) {
  .vsp-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------------------------------------------------------- Notices, continued */

/* The text beside a notice's icon, taking the room so a trailing Retry sits at the end. */
.vsp-notice-text {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
}

.vsp-notice > svg {
  flex: none;
}

/* ---------------------------------------------------------------- Badges, continued */

/* Finished without effect: void, cancelled, declined, archived. Present, but nothing to do. */
.vsp-badge--quiet {
  color: var(--vs-faint);
  border-color: var(--vs-rail-soft);
  background: transparent;
}

/* ---------------------------------------------------------------- Dialog */

/* One confirmation shape for the whole portal, on a native <dialog> opened with showModal, so
   focus is trapped and returned by the browser. It names the action, the object and any amount.
   Cancel comes first, and a server refusal shows inside the dialog rather than behind it. */
.vsp-dialog {
  box-sizing: border-box;
  width: min(30rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: var(--vs-s5);
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-lg);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  font-family: var(--vs-font);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.vsp-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.vsp-dialog-title {
  margin: 0 0 var(--vs-s2);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--vs-chalk);
  overflow-wrap: anywhere;
}

.vsp-dialog-form {
  display: block;
  max-width: none;
}

/* margin is reset because the class also goes on a single <p>. */
.vsp-dialog-body {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--vs-dim);
  overflow-wrap: anywhere;
}

.vsp-dialog-body p {
  margin: 0 0 var(--vs-s2);
}

.vsp-dialog-body > :last-child {
  margin-bottom: 0;
}

.vsp-dialog-body strong {
  color: var(--vs-chalk);
  font-weight: 600;
}

.vsp-dialog-fields {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  margin-top: var(--vs-s4);
}

.vsp-dialog-error {
  margin-top: var(--vs-s4);
}

.vsp-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--vs-s2);
  flex-wrap: wrap;
  margin-top: var(--vs-s5);
}

.vsp-btn--danger-fill {
  background: var(--vs-fault);
  border-color: var(--vs-fault);
  color: var(--vs-fault-ink);
  font-weight: 650;
}

.vsp-btn--danger-fill:hover:not(:disabled) {
  background: var(--vs-fault-fill-hi);
  border-color: var(--vs-fault-fill-hi);
  color: var(--vs-fault-ink);
}

/* ---------------------------------------------------------------- Forms, continued */

/* A textarea for words rather than code: a reason, a note, a reply. */
.vsp-textarea.vsp-textarea--prose {
  min-height: 5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.vsp-checkbox {
  display: flex;
  /* Restated: App.css sets `form label { flex-direction: column }` on the bare element. */
  flex-direction: row;
  align-items: flex-start;
  gap: var(--vs-s2);
  font-size: 0.875rem;
  color: var(--vs-chalk);
  cursor: pointer;
}

.vsp-checkbox input {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0 0;
  accent-color: var(--vs-act-fill);
  color-scheme: dark;
  cursor: pointer;
}

.vsp-checkbox input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-deck), 0 0 0 4px var(--vs-act);
}

/* Fields laid out in a responsive grid inside a panel or a dialog. */
.vsp-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--vs-s4);
  align-items: start;
}

.vsp-form-actions {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- Tables, continued */

.vsp-table {
  transition: opacity 0.15s;
}

/* Reloading in place: the old rows stay readable but plainly out of date. */
.vsp-table.vsp-table--busy {
  opacity: 0.6;
}

/* The last column: one visible action, then a More menu if there are others. */
.vsp-table :is(th, td).vsp-actions-cell {
  width: 1%;
  text-align: end;
  white-space: nowrap;
}

.vsp-table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--vs-s1);
}

/* ---- Headline figures ---- */

/* A row of three or four figures that answer the page's question. A dl: dt is what it is, dd holds vsp-stat-main and,
   under it, an optional vsp-stat-sub or link. */
.vsp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--vs-s3);
  margin: 0;
}

.vsp-stats > div {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s1);
  padding: var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  min-width: 0;
}

/* Inside a panel the figures need their own step of contrast. */
.vsp-panel .vsp-stats > div {
  background: var(--vs-void);
}

.vsp-stats dt {
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

.vsp-stats dd {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  min-width: 0;
}

.vsp-stat-main {
  font-size: var(--vs-text-lg);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.vsp-stat-sub {
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

@media (max-width: 760px) {
  .vsp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- Extra detail on demand ---- */

/* A closed section: technical details, advanced timers, an option's small print. Read with one click, out of the way
   until then. Uses a real details element, so the keyboard and screen readers need nothing extra. */
.vsp-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  list-style: none;
  cursor: pointer;
  font-size: var(--vs-text-base);
  font-weight: 550;
  color: var(--vs-dim);
  border-radius: var(--vs-r-sm);
}

.vsp-disclosure > summary::-webkit-details-marker {
  display: none;
}

.vsp-disclosure > summary::before {
  content: "";
  width: 0;
  height: 0;
  flex: none;
  border-inline-start: 5px solid currentColor;
  border-block: 4px solid transparent;
  transition: transform 0.15s ease;
}

.vsp-disclosure[open] > summary::before {
  transform: rotate(90deg);
}

[dir='rtl'] .vsp-disclosure[open] > summary::before {
  transform: rotate(-90deg);
}

.vsp-disclosure > summary:hover {
  color: var(--vs-chalk);
}

.vsp-disclosure > summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-deck), 0 0 0 4px var(--vs-act);
}

@media (prefers-reduced-motion: reduce) {
  .vsp-disclosure > summary::before {
    transition: none;
  }
}

/* A second line under a cell's main value: an id, a date, a failure reason. */
.vsp-table-sub {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.75rem;
  color: var(--vs-faint);
}

/* A total row under a money column. */
.vsp-table tfoot :is(th, td) {
  border-top: 1px solid var(--vs-rail);
  border-bottom: none;
  font-weight: 600;
  color: var(--vs-chalk);
}

@media (prefers-reduced-motion: reduce) {
  .vsp-table { transition: none; }
}

/* ---------------------------------------------------------------- Key and value list */

.vsp-kv {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr);
  gap: var(--vs-s2) var(--vs-s4);
  margin: 0;
  font-size: 0.875rem;
}

.vsp-kv dt {
  color: var(--vs-dim);
}

.vsp-kv dd {
  margin: 0;
  color: var(--vs-chalk);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .vsp-kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
  }

  .vsp-kv dd {
    margin-bottom: var(--vs-s2);
  }
}

/* ---------------------------------------------------------------- Thumbnail */

/* A small square image or its initials. The caller sets the size inline. */
.vsp-thumb {
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  font-size: 0.6875rem;
  font-weight: 650;
}

.vsp-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------------------- Toast */

/* A brief confirmation that needs no answer, such as "Copied". Anything staff must read belongs
   in a notice instead, because a toast disappears. */
.vsp-toast {
  position: fixed;
  inset-block-end: var(--vs-s5);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 70;
  margin: 0;
  padding: var(--vs-s2) var(--vs-s4);
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-size: 0.8125rem;
  color: var(--vs-chalk);
  pointer-events: none;
}

[dir='rtl'] .vsp-toast {
  transform: translateX(50%);
}

/* ---------------------------------------------------------------- Phone targets */

/* Anything a thumb presses is at least 44px tall on a phone. min-height rather than padding, so a label that wraps still
   grows, and a desktop keeps its compact rows. */
@media (max-width: 760px) {
  .vsp-btn,
  .vsp-select,
  .vsp-seg-btn,
  .vsp-tab,
  .vsp-count,
  .vsp-menu-item,
  .vsp-th-sort,
  .vsp-search {
    min-height: 44px;
  }

  .vsp-disclosure > summary {
    min-height: 44px;
  }

  .vsp-icon-btn {
    width: 44px;
    height: 44px;
  }

  a.vsp-crumb {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .vsp-checkbox {
    align-items: center;
    min-height: 44px;
  }

  .vsp-checkbox input {
    width: 1.375rem;
    height: 1.375rem;
    margin: 0;
  }
}
:root {
  /* The one place the page's type is set. Before this, only five stylesheets read the token, so changing it moved the
     studio and staff consoles and left the player, advertiser and marketing sites on the template's stack. */
  font-family: var(--vs-font);
  line-height: 1.5;
  font-weight: 400;
  color-scheme: dark;
  color: var(--vs-chalk);
  background-color: var(--vs-void);

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* :where() keeps these Vite starter defaults for elements nothing else styles, while
   giving them zero specificity so any class rule wins. Before this, `a:hover` at (0,1,1)
   beat `.vsp-btn` at (0,1,0) and turned button labels indigo on hover. */
/* Sixty-two links across the portal have no other text-decoration source, so this is
   what keeps them from being underlined. Nineteen depend on the colour. */
:where(a) {
  font-weight: 500;
  color: var(--vs-act);
  text-decoration: inherit;
}
:where(a:hover) {
  color: var(--vs-chalk);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--vs-void);
}

:where(h1) {
  font-size: 3.2em;
  line-height: 1.1;
}

/* Zero specificity like the rest of this file. A heading with its own font-family still wins, and none has one. */
:where(h1, h2, h3) {
  font-family: var(--vs-font-display);
}

/* A form control does not inherit the page's type by default. It falls back to the browser's Arial, which is why the
   search and sign-in boxes never matched the text around them. */
:where(input, select, textarea) {
  font-family: inherit;
}

:where(button) {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
/* 270 of 318 buttons declare no hover border of their own, so every one of them was
   flashing the Vite template indigo. */
:where(button:hover) {
  border-color: var(--vs-faint);
}

/* 275 of 318 buttons have no focus ring of their own, which is why the starter rule could
   not simply be deleted. This is the same ring the vsp- primitives draw, so keyboard
   focus is visible everywhere rather than only on the redesigned screens. The primitives
   set `outline: none` at higher specificity and draw their own, so nothing doubles up. */
:where(button:focus-visible) {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

/* Portal is always dark; ignore light scheme so no white flash */
/* Token-only (scripts/check-token-colours.mjs). */

.not-found {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--vs-s3);
  padding: var(--vs-s5) var(--vs-s4);
  box-sizing: border-box;
  text-align: center;
  background: var(--vs-void);
  color: var(--vs-chalk);
}

.not-found-logo {
  width: 96px;
  height: auto;
  margin-bottom: var(--vs-s3);
}

.not-found h1 {
  margin: 0;
  font-size: 1.75rem;
}

.not-found p {
  margin: 0;
  color: var(--vs-dim);
}

.not-found-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--vs-s2);
  margin-top: var(--vs-s4);
}
.banner-ad {
  flex-shrink: 0;
  width: 100%;
  min-height: 50px;
  max-height: 90px;
  background: var(--vs-deck);
  border-top: 1px solid var(--vs-rail);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.banner-ad--loading {
  min-height: 40px;
  font-size: 0.75rem;
  color: var(--vs-faint);
}

/* The sponsor image, scaled to fit the strip without cropping or stretching. */
.banner-ad-img {
  display: block;
  max-width: 100%;
  max-height: 90px;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* Says it is an advert, on every advert. Fixed in the corner so the creative keeps the whole strip. */
.banner-ad {
  position: relative;
}
.banner-ad-tag {
  position: absolute;
  top: 2px;
  inset-inline-start: 4px;
  padding: 0 0.35rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--vs-chalk);
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.banner-ad-link {
  display: block;
  max-width: 100%;
}
.banner-ad-link:focus-visible {
  outline: 2px solid var(--vs-chalk);
  outline-offset: -2px;
}

.banner-ad-html {
  width: 100%;
  max-height: 90px;
  overflow: hidden;
  padding: 0.25rem;
  font-size: 0.8rem;
  line-height: 1.3;
}
.banner-ad-html img {
  max-height: 80px;
  width: auto;
  display: block;
  margin: 0 auto;
}

/* The question about ads, above the banner until it is answered. */
.banner-consent {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.6rem 1rem;
  background: var(--vs-deck);
  border-top: 1px solid var(--vs-rail);
}

.banner-consent-text {
  flex: 1 1 16rem;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--vs-dim);
}

.banner-consent-text a,
.banner-consent-text a:hover {
  color: var(--vs-act);
}

.banner-consent-actions {
  display: flex;
  gap: 0.5rem;
}

.banner-consent-btn {
  min-height: 44px;
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--vs-faint);
  background: transparent;
  color: var(--vs-chalk);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.banner-consent-btn:hover {
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}

.banner-consent-btn--yes,
.banner-consent-btn--yes:hover {
  background: var(--vs-act-fill);
  border-color: var(--vs-act-fill);
  color: var(--vs-act-ink);
}
/*
 * The player site's frame. A phone layout below 50rem, with the header and tab bar always on screen and the page
 * scrolling between them. From 50rem up it is a real desktop shell: a rail down the side instead of the tab bar, and
 * the page given the width of the window instead of a phone-sized strip.
 */

.play-layout {
  /* The one page gutter. Pages add no side padding of their own, or the content shifts between tabs. */
  --play-gutter: var(--vs-s4);

  min-height: 100vh;
  min-height: 100dvh;
  background: var(--vs-void);
  color: var(--vs-chalk);
  display: flex;
  justify-content: center;
}

/* A fixed height, so main is what scrolls and the banner and tab bar stay put. With only a minimum height the page grew
   past the screen and the tab bar went with it, 1,474 pixels down on an 812 pixel phone. */
.play-layout-inner {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Off screen until a keyboard reaches it, like the studio portal's. Lets someone past the header in one key press. */
.play-skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 60;
  padding: var(--vs-s2) var(--vs-s4);
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  border-end-end-radius: var(--vs-r-sm);
  font-size: 0.875rem;
}

.play-skip:focus,
.play-skip:hover {
  inset-inline-start: 0;
  color: var(--vs-act-ink);
}

/* Focus lands here from the skip link only. The whole page drawn in a focus ring would say nothing useful. */
.play-layout-main:focus {
  outline: none;
}

.play-layout-header {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: var(--vs-s1) var(--play-gutter);
  padding-inline-start: max(var(--play-gutter), env(safe-area-inset-left));
  padding-inline-end: max(var(--play-gutter), env(safe-area-inset-right));
  padding-top: max(var(--vs-s1), env(safe-area-inset-top));
  background: var(--vs-sunk);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.play-layout-header-left {
  min-width: 0;
}

.play-layout-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
}

.play-layout-logo-link--center {
  grid-column: 2;
  justify-self: center;
}

.play-layout-logo {
  height: 28px;
  width: auto;
}

.play-layout-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--vs-s1);
}

.play-layout-dev-link {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--vs-dim);
  text-decoration: none;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
}

.play-layout-dev-link:hover {
  color: var(--vs-chalk);
  border-color: var(--vs-faint);
}

.play-layout-bell,
.play-layout-bell:visited {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--vs-dim);
  text-decoration: none;
  background: none;
}
.play-layout-bell:hover,
.play-layout-bell:focus-visible {
  color: var(--vs-chalk);
  text-decoration: none;
}
.play-layout-bell-count {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 2px;
  min-width: 1.125rem;
  padding: 0 0.2rem;
  border-radius: var(--vs-r-pill);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.125rem;
  text-align: center;
  color: var(--vs-act-ink);
  background: var(--vs-act-fill);
}

/* 44 pixels to press, with the picture itself at 32 in the middle of it. */
.play-layout-avatar-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.play-layout-avatar {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}
.play-layout-avatar-placeholder {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--vs-dim);
  background: var(--vs-deck-hi);
}

.play-layout-main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--play-gutter);
  padding-bottom: var(--vs-s2);
}

/* Every page gets a readable column. The few with a grid to fill, listed further down, take more of the window. */
.play-layout-main > * {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
}

/* main is the scroller now, so body's overflow lock no longer stops the page moving behind a dialog. */
.play-layout-main:has(.sheet-scrim, dialog[open]) {
  overflow: hidden;
}

/* A conversation fills the space between the bars and scrolls its own messages. */
.play-layout-main:has(> .pct) {
  padding: 0;
  overflow: hidden;
}

.play-layout-bottom-nav {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: var(--vs-s1) 0;
  padding-bottom: max(var(--vs-s1), env(safe-area-inset-bottom));
  background: var(--vs-sunk);
  border-top: 1px solid var(--vs-rail-soft);
}

.play-layout-nav-item,
.play-layout-nav-item:visited {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.25rem 0.5rem;
  font-weight: 500;
  color: var(--vs-dim);
  text-decoration: none;
  border-radius: var(--vs-r-md);
}
.play-layout-nav-item:hover {
  color: var(--vs-chalk);
}
/* Action blue, the ink for an active indicator. The logo's own blue measures about 2:1 on this bar. */
.play-layout-nav-item--active,
.play-layout-nav-item--active:visited,
.play-layout-nav-item--active:hover {
  color: var(--vs-act);
}
.play-layout-nav-item--active .play-layout-nav-label {
  font-weight: 600;
}
.play-layout-nav-label {
  color: inherit;
  font-size: 0.75rem;
}

@media (min-width: 37.5rem) {
  .play-layout {
    --play-gutter: var(--vs-s5);
  }
}

/* ---- the desktop shell ------------------------------------------------------------------- */

@media (min-width: 50rem) {
  .play-layout-inner {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .play-layout-header {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: auto 1fr auto;
  }

  .play-layout-header-left {
    display: none;
  }

  .play-layout-logo-link--center {
    grid-column: 1;
    justify-self: start;
  }

  .play-layout-main {
    grid-column: 2;
    grid-row: 2;
    /* So the page does not jump sideways when a dialog takes the scrollbar away. */
    scrollbar-gutter: stable;
    padding-block: var(--vs-s5);
  }

  /* The banner and its consent line: whatever else the shell holds sits under the page. */
  .play-layout-inner > :not(.play-layout-header, .play-layout-main, .play-layout-bottom-nav, .play-skip) {
    grid-column: 2;
  }

  .play-layout-bottom-nav {
    grid-column: 1;
    grid-row: 2 / span 3;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: var(--vs-s1);
    padding: var(--vs-s3);
    border-top: 0;
    border-inline-end: 1px solid var(--vs-rail-soft);
    overflow-y: auto;
  }

  .play-layout-nav-item,
  .play-layout-nav-item:visited {
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--vs-s3);
    padding: var(--vs-s2) var(--vs-s3);
  }

  .play-layout-nav-item:hover {
    background: var(--vs-deck);
    color: var(--vs-chalk);
  }

  .play-layout-nav-item--active,
  .play-layout-nav-item--active:visited,
  .play-layout-nav-item--active:hover {
    background: var(--vs-deck);
    color: var(--vs-chalk);
  }

  .play-layout-nav-item--active svg {
    color: var(--vs-act);
  }

  .play-layout-nav-label {
    font-size: 0.9375rem;
  }

  /* The pages with a grid to fill. */
  .play-layout-main > .ph,
  .play-layout-main > .pg,
  .play-layout-main > .pe {
    max-width: 76rem;
  }

  .play-layout-main > .gd,
  .play-layout-main > .pevd,
  .play-layout-main > .play-tg,
  .play-layout-main > .play-tg-detail {
    max-width: 60rem;
  }
}
/*
 * The small set of parts every player page shares: the page head, the row of filters, the three-dot button, and the two
 * rules the whole site depends on. Buttons are vsp-btn with vsp-btn--touch, and an empty list is EmptyState with an icon,
 * so neither has a second version here.
 */

/* Nothing else in the portal sets this, so width 100 percent plus padding ran off the side of every card. */
.play-layout,
.play-layout *,
.play-layout *::before,
.play-layout *::after {
  box-sizing: border-box;
}

/* A starter rule in App.css makes every form a 360 pixel column. That suits a sign-in box and nothing on this site. */
.play-layout form {
  max-width: none;
}

/*
 * What players and studios type can be in either script, so it sets its own direction with dir="auto". Its alignment
 * still follows the page: an English name in an Arabic list sits on the right like the rest. Zero specificity, so a class
 * that aligns its own text wins.
 */
:where(.play-layout [dir='auto']) {
  text-align: match-parent;
}

/* ---- page head --------------------------------------------------------------------------- */

.play-head {
  margin-bottom: var(--vs-s4);
}

.play-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--vs-s3);
}

.play-head-text {
  min-width: 0;
}

.play-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--vs-chalk);
  overflow-wrap: anywhere;
}

.play-desc {
  margin: var(--vs-s1) 0 0;
  max-width: 60ch;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--vs-dim);
}

.play-head-action {
  flex: none;
}

/* 44 pixels to press, with the extra height taken back out of the space around it so it looks no bigger than a line of
   text. The chevron points the way back in either reading direction. */
.play-back,
.play-back:visited {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s1);
  min-height: 44px;
  margin-block: -0.5rem 0;
  margin-inline-start: -0.25rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--vs-dim);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
}

.play-back:hover,
.play-back:focus-visible {
  background: none;
  border-color: transparent;
  color: var(--vs-chalk);
  text-decoration: none;
}

.play-back svg {
  flex: none;
  transform: scaleX(-1);
}

[dir='rtl'] .play-back svg {
  transform: none;
}

/* ---- filters ----------------------------------------------------------------------------- */

.play-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
  margin-bottom: var(--vs-s3);
}

.play-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s2);
  min-height: 44px;
  padding: 0 var(--vs-s3);
  border-radius: var(--vs-r-pill);
  border: 1px solid var(--vs-rail);
  background: transparent;
  color: var(--vs-dim);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.play-tab:hover {
  background: var(--vs-deck);
  border-color: var(--vs-rail);
  color: var(--vs-chalk);
}

.play-tab--on,
.play-tab--on:hover {
  background: var(--vs-deck);
  border-color: var(--vs-act);
  color: var(--vs-chalk);
}

.play-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.375rem;
  border-radius: var(--vs-r-pill);
  background: var(--vs-rail);
  color: var(--vs-chalk);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.play-tab--on .play-tab-count {
  background: var(--vs-act-wash);
  color: var(--vs-act);
}

/* The fill rather than the ink behind white: the ink measured 3.29:1. */
.play-tab-count--due {
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
}

/* ---- row menu ---------------------------------------------------------------------------- */

.play-more {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--vs-r-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--vs-dim);
  cursor: pointer;
}

.play-more svg {
  flex: none;
}

.play-more:hover:not(:disabled) {
  background: var(--vs-deck-hi);
  border-color: var(--vs-rail);
  color: var(--vs-chalk);
}

.play-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.play-layout .vsp-menu-item {
  min-height: 44px;
}

/* Every button on this site is sized for a thumb, including the small ones the shared panels bring with them. */
.play-layout .vsp-btn,
.sheet .vsp-btn {
  min-height: 44px;
}

/* ---- thumb-sized targets ------------------------------------------------------------------ */

/* A small control looks the same and presses like a large one: the invisible box is at least 44 pixels each way. */
.ph-link,
.pct-more,
.pevd-game,
.play-profile-name-edit {
  position: relative;
}

.ph-link::after,
.pct-more::after,
.pevd-game::after,
.play-profile-name-edit::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 44px);
  height: max(100%, 44px);
  transform: translate(-50%, -50%);
}

.play-tab:focus-visible,
.play-back:focus-visible,
.play-more:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}
/* Password reset and email verification screens. They sit inside the shared sign-in frame
   (components/auth/AuthFrame.css); this file only adds what those screens need beyond it. Token-only. */

.recovery-label-text {
  display: block;
}

.recovery-message {
  margin: var(--vs-s5) 0;
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: start;
  overflow-wrap: anywhere;
  color: var(--vs-chalk);
}

.recovery-message p {
  margin: 0 0 0.6rem;
}

.recovery-message p:last-child {
  margin-bottom: 0;
}

.recovery-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--vs-dim);
}

/* A Link styled as the frame's main button. Colour is restated on hover because a link's own hover colour would
   otherwise show through against the blue fill. */
.recovery-button-link {
  display: block;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  color: var(--vs-act-ink);
}

.recovery-button-link:hover,
.recovery-button-link:focus {
  color: var(--vs-act-ink);
  text-decoration: none;
}

.recovery-secondary {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  box-sizing: border-box;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: transparent;
  color: var(--vs-chalk);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.recovery-secondary:hover {
  border-color: var(--vs-faint);
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
}

.recovery-button-link:focus-visible,
.recovery-secondary:focus-visible,
.recovery-forgot:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

/* "Forgot password?" under the password field on the sign-in screens. */
.recovery-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: -0.6rem 0 0;
}

.recovery-forgot,
.recovery-forgot:hover {
  color: var(--vs-act);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.recovery-forgot:hover {
  text-decoration: underline;
}
.auth-lang {
  align-self: flex-end;
  display: flex;
  gap: 6px;
}

.auth-lang-btn {
  min-height: 32px;
  padding: 4px 12px;
  border-radius: var(--vs-r-pill);
  border: 1px solid var(--vs-rail);
  background: transparent;
  color: var(--vs-dim);
  font-size: 0.8125rem;
  cursor: pointer;
}

.auth-lang-btn:hover {
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}

.auth-lang-btn--on,
.auth-lang-btn--on:hover {
  border-color: var(--vs-faint);
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  font-weight: 600;
}

.auth-lang-btn:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}
/* The sign-in frame and its forms. Token-only (scripts/check-token-colours.mjs). The photo's red and blue light is the
   brand's own, so the panel is one of the few places --vs-brand-red and --vs-brand-blue appear. */

.auth-frame {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--vs-void);
  color: var(--vs-chalk);
}

/* ---------------------------------------------------------------- The panel */

.auth-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  padding: var(--vs-s5) var(--vs-s4);
  background: var(--vs-sunk) url('/images/auth-panel.webp') center 22% / cover no-repeat;
}

.auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.82));
}

/* The seam: the logo's two arcs meeting. */
.auth-panel::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vs-brand-red) 50%, var(--vs-brand-blue) 50%);
}

.auth-logo {
  width: 72px;
  height: auto;
  display: block;
}

.auth-logo--plain {
  width: 96px;
  margin-inline: auto;
  margin-bottom: var(--vs-s5);
}

.auth-pitch-title {
  margin: 0;
  font-family: var(--vs-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--vs-chalk);
}

.auth-points {
  margin: var(--vs-s3) 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--vs-chalk);
}

.auth-points li {
  position: relative;
  padding-inline-start: var(--vs-s4);
}

.auth-points li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vs-brand-red);
}

.auth-points li:nth-child(even)::before {
  background: var(--vs-brand-blue);
}

.auth-games {
  margin: var(--vs-s4) 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: var(--vs-s2);
}

.auth-game {
  width: 56px;
  height: 56px;
  flex: none;
  overflow: hidden;
  border-radius: var(--vs-r-md);
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
}

.auth-game img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Part way through something, a phone needs the form, not the pitch. */
.auth-frame--compact .auth-pitch {
  display: none;
}

/* ---------------------------------------------------------------- The form side */

.auth-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--vs-s4);
  padding: var(--vs-s5) var(--vs-s4);
  box-sizing: border-box;
}

.auth-column {
  width: 100%;
  max-width: 400px;
  margin-block: auto;
}

.auth-title {
  margin: 0 0 var(--vs-s2);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--vs-chalk);
}

.auth-sub {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--vs-dim);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  max-width: none;
  margin-top: var(--vs-s5);
}

.auth-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--vs-chalk);
}

.auth-optional {
  font-weight: 400;
  color: var(--vs-dim);
}

.auth-input {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  box-sizing: border-box;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  font-size: 1rem;
  color: var(--vs-chalk);
  background: var(--vs-sunk);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input::placeholder {
  color: var(--vs-faint);
}

.auth-input:focus {
  border-color: var(--vs-act);
  box-shadow: 0 0 0 2px var(--vs-act-wash);
}

.auth-input[aria-invalid='true'] {
  border-color: var(--vs-fault);
}

.auth-password-wrap {
  position: relative;
  display: block;
}

.auth-password-wrap .auth-input {
  padding-inline-end: 2.75rem;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 6px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  color: var(--vs-dim);
  cursor: pointer;
}

.auth-password-toggle:hover {
  color: var(--vs-chalk);
  border-color: transparent;
}

.auth-field-error,
.auth-error {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--vs-fault);
}

/* Why the person was sent back to sign in (the second step). It explains; nothing failed, so not the error red. */
.auth-notice {
  margin: 0;
  padding: 0.625rem 0.75rem;
  border-inline-start: 3px solid var(--vs-act);
  border-radius: var(--vs-r-sm);
  background: var(--vs-act-wash);
  color: var(--vs-chalk);
  font-size: 0.875rem;
  line-height: 1.45;
}

.auth-btn {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  border: 1px solid transparent;
  border-radius: var(--vs-r-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-btn:hover:not(:disabled) {
  background: var(--vs-act-fill-hi);
  color: var(--vs-act-ink);
  border-color: transparent;
}

.auth-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* The other way in, the same size as the main button: someone who came to join should not have to hunt for it. */
.auth-btn--secondary,
.auth-btn--secondary:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid var(--vs-rail);
  color: var(--vs-chalk);
  text-decoration: none;
}

.auth-btn--secondary:hover:not(:disabled) {
  background: var(--vs-deck-hi);
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}

.auth-btn:focus-visible,
.auth-password-toggle:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

.auth-terms {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--vs-dim);
}

.auth-terms input {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.1rem 0 0;
  accent-color: var(--vs-act-fill);
}

.auth-terms a,
.auth-terms a:hover {
  color: var(--vs-act);
}

.auth-footer {
  margin-top: var(--vs-s5);
  text-align: center;
  font-size: 0.9375rem;
  color: var(--vs-dim);
}

.auth-footer > p {
  margin: 0 0 var(--vs-s2);
}

.auth-footer a:not(.auth-btn) {
  color: var(--vs-act);
  font-weight: 500;
}

.auth-footer a:not(.auth-btn):hover {
  color: var(--vs-chalk);
}

.auth-legal {
  display: flex;
  gap: var(--vs-s4);
  font-size: 0.8125rem;
}

.auth-legal a,
.auth-legal a:hover {
  color: var(--vs-dim);
}

.auth-legal a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- Room for the panel */

@media (min-width: 60rem) {
  .auth-frame {
    flex-direction: row;
  }

  /* Held in view while a long form, such as setting up the second step, scrolls beside it. */
  .auth-panel {
    position: sticky;
    top: 0;
    align-self: flex-start;
    box-sizing: border-box;
    height: 100vh;
    height: 100dvh;
    flex: 1 1 52%;
    justify-content: space-between;
    padding: var(--vs-s7);
  }

  .auth-panel::after {
    inset-inline: auto 0;
    inset-block: 0;
    width: 3px;
    height: auto;
    background: linear-gradient(180deg, var(--vs-brand-red) 50%, var(--vs-brand-blue) 50%);
  }

  .auth-logo {
    width: 96px;
  }

  .auth-pitch-title {
    font-size: 2.5rem;
    max-width: 14em;
  }

  .auth-points {
    font-size: 1.0625rem;
  }

  .auth-frame--compact .auth-pitch {
    display: block;
  }

  .auth-side {
    flex: 1 1 48%;
    padding: var(--vs-s6);
  }
}
/* Two-step verification: the sign-in step, the setup steps and the Security page.
 *
 * Token-only (scripts/check-token-colours.mjs). On the sign-in screens these sit inside the shared frame and reuse
 * its form, input and button classes (AuthFrame.css, Recovery.css); this file only adds what those screens never
 * needed: method cards, the QR code, the key, the code list. */

/* ---------------------------------------------------------------- Shared pieces */

.tfa-form {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  max-width: none;
  text-align: start;
}

.tfa-error {
  margin: 0;
}

.tfa-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--vs-chalk);
}

.tfa-para {
  margin: 0 0 var(--vs-s3);
}

/* A code is read and typed in groups, so it gets fixed-width digits and room between them. */
.tfa-code-input {
  font-family: var(--vs-mono);
  letter-spacing: 0.08em;
}

.tfa-code-input--digits {
  font-size: 1.25rem;
  letter-spacing: 0.3em;
  text-align: center;
}

.tfa-heading {
  margin: 0 0 var(--vs-s2);
  font-size: 1rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

/* Focus is moved here by script so a screen reader starts at the explanation; it is not a control. */
.tfa-focus-target:focus {
  outline: none;
}

.tfa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
}

.tfa-actions > * {
  margin-top: 0;
}

/* On the sign-in screens the frame's secondary buttons are full width with a top margin; side by side they share
   the row instead. */
.auth-frame .tfa-actions > * {
  flex: 1 1 10rem;
}

.tfa-actions--end {
  justify-content: flex-end;
}

/* On the Security page a button keeps its own width instead of stretching across the panel. */
.tfa-panel :is(.tfa-form, .tfa-codes, .tfa-method, .tfa-step) > .vsp-btn {
  align-self: flex-start;
}

.tfa-alternatives {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
}

.tfa-alternatives:empty {
  display: none;
}

.tfa-alternatives > * {
  margin-top: 0;
}

/* "Back to sign in" in the frame's footer: a button, because going back has to clear the challenge and keep the
   page's own state, but it reads as the footer link it replaces. */
.tfa-text-button {
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.tfa-text-button:hover {
  color: var(--vs-chalk);
  border: none;
}

.tfa-text-button:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- Choosing a method */

.tfa-methods {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tfa-method {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  padding: var(--vs-s4);
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
}

.tfa-method > button {
  margin-top: var(--vs-s1);
}

.tfa-method-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

.tfa-method-sub {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--vs-dim);
}

/* ---------------------------------------------------------------- Authenticator setup */

/* An ordered list for screen readers; each step's own sentence says what to do, so no numbers are drawn. */
.tfa-steps {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tfa-step {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
}

.tfa-step-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--vs-chalk);
}

.tfa-qr-wrap {
  display: flex;
  justify-content: center;
}

.tfa-qr {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--vs-r-sm);
}

/* Scanners need dark modules on a light ground, so these two are the one place the light text colour is a fill. */
.tfa-qr-light {
  fill: var(--vs-chalk);
}

.tfa-qr-dark {
  fill: var(--vs-sunk);
}

.tfa-link-button {
  text-align: center;
  text-decoration: none;
}

.tfa-link-button:hover {
  text-decoration: none;
}

.tfa-key-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vs-s2);
}

.tfa-key {
  flex: 1 1 14rem;
  min-width: 0;
  padding: var(--vs-s2) var(--vs-s3);
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
  color: var(--vs-chalk);
  font-family: var(--vs-mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  user-select: all;
}

.tfa-key-copy {
  flex: 0 0 auto;
  width: auto;
  margin-top: 0;
}

/* ---------------------------------------------------------------- Backup codes */

.tfa-codes {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  text-align: start;
}

.tfa-codes-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--vs-s2) var(--vs-s5);
  margin: 0;
  padding: var(--vs-s3) var(--vs-s4) var(--vs-s3) 2.25rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-md);
  background: var(--vs-void);
  color: var(--vs-faint);
  font-size: 0.8rem;
}

.tfa-code {
  font-family: var(--vs-mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--vs-chalk);
}

@media (max-width: 340px) {
  .tfa-codes-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------------------------------------------------------------- Security page */

.tfa-security {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  max-width: 44rem;
}

.tfa-panel {
  max-width: 44rem;
}

/* A panel that is only its head (status with nothing to press) should not keep the gap meant for content below. */
.tfa-security .vsp-panel-head:last-child {
  margin-bottom: 0;
}

.tfa-change-list {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tfa-change-list li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--vs-s1);
}

.tfa-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vs-s2);
}

/* The player Security page, inside the play layout. */
.tfa-play-page {
  padding-block: 0.25rem 1.5rem;
  color: var(--vs-chalk);
}
.play-privacy {
  padding-block: 0.25rem 1.5rem;
}

.play-privacy-section {
  border: 1px solid var(--vs-rail);
  border-radius: 12px;
  padding: 1.125rem;
  margin-bottom: 1rem;
}

/* The destructive half is marked by a warm border rather than a filled panel, so the page does not
   read as an alert before the person has chosen anything. */
.play-privacy-section--danger {
  border-color: var(--vs-fault);
}

.play-privacy-heading {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
}

.play-privacy-sub {
  color: var(--vs-dim);
  margin: 0 0 0.875rem;
  line-height: 1.5;
  font-size: 0.925rem;
}

.play-privacy-notes {
  margin: 0 0 1rem;
  padding-inline-start: 1.1rem;
  color: var(--vs-dim);
  font-size: 0.875rem;
  line-height: 1.6;
}

.play-privacy-notes li {
  margin-bottom: 0.4rem;
}

.play-privacy-blockers {
  background: var(--vs-warn-wash);
  border: 1px solid var(--vs-warn);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.play-privacy-blockers-lead {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.play-privacy-blockers ul {
  margin: 0;
  padding-inline-start: 1.1rem;
  color: var(--vs-dim);
}

.play-privacy-btn {
  appearance: none;
  min-height: 44px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  border-radius: var(--vs-r-sm);
  padding: 0.6rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.play-privacy-btn:hover:not(:disabled) {
  border-color: var(--vs-dim);
  color: var(--vs-chalk);
}

/* The button that opens the page in a browser is a link. */
a.play-privacy-btn {
  display: inline-block;
  text-decoration: none;
}

.play-privacy-btn:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

.play-privacy-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.play-privacy-btn--danger {
  border-color: var(--vs-fault);
  color: var(--vs-fault);
}

.play-privacy-btn--danger:hover:not(:disabled) {
  border-color: var(--vs-fault);
}

.play-privacy-btn--quiet {
  color: var(--vs-dim);
}

.play-privacy-confirm {
  margin-top: 1rem;
}

.play-privacy-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.play-privacy-input {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  margin-bottom: 0.875rem;
}

.play-privacy-input:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 1px;
}

.play-privacy-confirm-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.play-privacy-error {
  color: var(--vs-fault);
  font-size: 0.9rem;
  margin: 0.75rem 0 0;
  line-height: 1.5;
}

/* Blocked players, on the page that shares this stylesheet's look. */
.play-blocked-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.play-blocked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--vs-rail);
  border-radius: 10px;
}

.play-blocked-name {
  font-weight: 600;
  color: var(--vs-chalk);
  overflow-wrap: anywhere;
}
/**
 * Play home — mobile first.
 *
 * The page chrome gets out of the way so that faces and game art carry the personality: no outer
 * panel around each section, headings sitting directly on the page ground, and saturated blue kept
 * for actions alone. Every list is a horizontal rail that bleeds to the screen edge and shows part
 * of the next card, which is what tells a thumb there is more to the right.
 *
 * Hover colours and borders are restated rather than inherited: index.css still carries Vite's
 * starter rules for bare `a` and `button`, and an `a:hover` there outranks a bare class here.
 *
 * Written with logical properties throughout, because this portal ships in Arabic and the whole
 * layout mirrors.
 *
 * From 50rem up the rails become grids and who is around moves to a column at the side.
 */

.ph {
  padding-block: 0.25rem 1.5rem;
}

.ph-side:not(:empty) {
  margin-bottom: 1.75rem;
}

/* ---- header ------------------------------------------------------------------------------ */

/* The same red and blue photograph as the sign-in frame, with the seam along the bottom edge. */
.ph-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 112px;
  margin-bottom: 1.35rem;
  padding: 0.9rem 1rem;
  overflow: hidden;
  border-radius: 14px;
  background: var(--vs-sunk) url('/images/auth-panel.webp') center 28% / cover no-repeat;
}

.ph-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
}

.ph-hero::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vs-brand-red) 50%, var(--vs-brand-blue) 50%);
}

.ph-greeting {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--vs-chalk);
  overflow-wrap: anywhere;
}

/* ---- section scaffolding ----------------------------------------------------------------- */

.ph-section {
  margin-bottom: 1.75rem;
}
.ph-section:last-child {
  margin-bottom: 0;
}

.ph-prize,
.ph-prize:visited {
  display: block;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--vs-warn);
  border-radius: var(--vs-r-md);
  color: var(--vs-chalk);
  text-decoration: none;
  background: var(--vs-warn-wash);
}
.ph-prize:hover,
.ph-prize:focus-visible {
  color: var(--vs-chalk);
  text-decoration: none;
  border-color: var(--vs-warn);
  background: var(--vs-deck-hi);
}
.ph-prize-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}
.ph-prize-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--vs-dim);
}

.ph-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.ph-head h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--vs-chalk);
}

.ph-subhead {
  margin: 1.1rem 0 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--vs-dim);
}

/* A text link, not a filled button: "see all" is never the thing you most want someone to do. */
.ph-link,
.ph-link:visited {
  flex: none;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--vs-act);
  text-decoration: none;
  background: none;
}
.ph-link:hover,
.ph-link:focus-visible {
  color: var(--vs-chalk);
  text-decoration: underline;
}

.ph-muted {
  margin: 0;
  font-size: 0.88rem;
  color: var(--vs-faint);
}

/* ---- empty states ------------------------------------------------------------------------ */

/* A new player's first look at Home: the logo's two arcs along the top edge, and the two steps that fill the page. */
.ph .vsp-notice {
  margin-bottom: 1.35rem;
}

.ph-welcome {
  margin-block: 0 1.4rem;
  padding: 1rem;
  border: 1px solid var(--vs-rail);
  border-top: 3px solid var(--vs-brand-red);
  border-bottom: 3px solid var(--vs-brand-blue);
  border-radius: 12px;
  background: var(--vs-deck);
}

.ph-welcome h2 {
  margin: 0 0 0.25rem;
  color: var(--vs-chalk);
  font-size: 1.2rem;
}

.ph-welcome p {
  margin: 0 0 0.85rem;
  color: var(--vs-dim);
  font-size: 0.9rem;
}

.ph-welcome-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---- rails ------------------------------------------------------------------------------- */

.ph-rail {
  display: flex;
  gap: 0.7rem;
  margin: 0;
  padding: 0.15rem 0 0.3rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;

  /* Bleed past the page gutter so a card can sit against the screen edge. */
  margin-inline: calc(var(--play-gutter) * -1);
  padding-inline: var(--play-gutter);
  scroll-padding-inline-start: var(--play-gutter);
}
.ph-rail::-webkit-scrollbar {
  display: none;
}
.ph-rail > li {
  scroll-snap-align: start;
}

/* The arrows sit against the page gutter, so they overlap the edge of a card rather than the
   middle of one. Only rendered for a hovering fine pointer, so they never steal space on a phone. */
.ph-rail-wrap {
  position: relative;
}

.ph-rail-btn {
  position: absolute;
  inset-block-start: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--vs-rail);
  background: var(--vs-sunk);
  color: var(--vs-chalk);
  cursor: pointer;
  opacity: 0.72;
  z-index: 2;
}
.ph-rail-btn:hover {
  opacity: 1;
  background: var(--vs-sunk);
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}
.ph-rail-btn:disabled {
  opacity: 0.22;
  cursor: default;
}
/* Centred is right for the friends rail, which is one row of faces. On the taller rails it lands
   squarely on the card title, so those anchor to the artwork band instead. Cards stop growing at a
   fixed width and the rails become grids at 50rem, so a fixed offset tracks the art closely enough. */
.ph-rail-wrap:has(.ph-rail--events) .ph-rail-btn,
.ph-rail-wrap:has(.ph-rail--discover) .ph-rail-btn {
  inset-block-start: 5.1rem;
  transform: none;
}

.ph-rail-btn--prev {
  inset-inline-start: -0.4rem;
}
.ph-rail-btn--next {
  inset-inline-end: -0.4rem;
}

/* Mirrored automatically: the glyphs point along the reading direction. */
[dir='rtl'] .ph-rail-btn svg {
  transform: scaleX(-1);
}

/* ---- 1. friends -------------------------------------------------------------------------- */

.ph-friend {
  flex: none;
  width: 4.75rem;
}

.ph-friend-tap,
.ph-friend-tap:visited {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0;
  color: var(--vs-chalk);
  text-decoration: none;
  background: none;
}
.ph-friend-tap:hover,
.ph-friend-tap:focus-visible {
  color: var(--vs-chalk);
  text-decoration: none;
}
.ph-friend-tap:hover .ph-avatar {
  border-color: var(--vs-faint);
}

.ph-avatar-wrap {
  position: relative;
  display: block;
  line-height: 0;
}

.ph-avatar {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck-hi);
}

.ph-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1;
  color: var(--vs-dim);
}

/* Green means one specific, provable thing: this person is in a game right now. */
.ph-dot {
  position: absolute;
  inset-block-end: 1px;
  inset-inline-end: 1px;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--vs-on);
  border: 2px solid var(--vs-void); /* punches back to the page ground so the dot reads as a cut-out */
}

.ph-friend-name {
  max-width: 100%;
  font-size: 0.76rem;
  font-weight: 550;
  line-height: 1.2;
  text-align: center;
  color: var(--vs-chalk);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph-friend-game {
  max-width: 100%;
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: center;
  color: var(--vs-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- 2. events --------------------------------------------------------------------------- */

/* 80% leaves a deliberate sliver of the next card visible. */
.ph-event {
  flex: none;
  width: 80%;
  max-width: 20rem;
  border: 1px solid var(--vs-rail);
  border-radius: 14px;
  background: var(--vs-deck);
  overflow: hidden;
}

.ph-event-art {
  aspect-ratio: 16 / 9;
}

.ph-live-badge {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
}

.ph-event-body {
  padding: 0.8rem 0.85rem 0.9rem;
}

.ph-event-name {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--vs-chalk);
}

.ph-event-game {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  color: var(--vs-dim);
}
.ph-event-game-icon {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;
  object-fit: cover;
  flex: none;
}

.ph-event-when {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--vs-chalk);
}

.ph-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
}

.ph-chip {
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--vs-dim);
  background: var(--vs-deck-hi);
}
.ph-chip--prize {
  color: var(--vs-warn);
  background: var(--vs-warn-wash);
}

.ph-event-sponsor {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  color: var(--vs-faint);
}

.ph-event-go {
  width: 100%;
}

/* ---- 3. discovery ------------------------------------------------------------------------ */

/* Narrower than an event card: two and a bit fit, so the row reads as a browse strip. */
.ph-discover {
  flex: none;
  width: 42%;
  max-width: 10.5rem;
}

.ph-discover-tap,
.ph-discover-tap:visited {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--vs-chalk);
  text-decoration: none;
  background: none;
}
.ph-discover-tap:hover,
.ph-discover-tap:focus-visible {
  color: var(--vs-chalk);
  text-decoration: none;
}
.ph-discover-tap:hover .ph-cover {
  border-color: var(--vs-faint);
}

.ph-cover {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck-hi);
  overflow: hidden;
}
.ph-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ph-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vs-faint);
}

.ph-discover-title {
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--vs-chalk);
}

.ph-discover-sub {
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--vs-dim);
}

/* ---- shared ------------------------------------------------------------------------------ */

.ph a:focus-visible,
.ph button:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

@media (min-width: 30rem) {
  .ph-event {
    width: 72%;
  }
}

/* The live event sits in the hero on a computer, so it is not repeated in the grid below. */
.ph-feature {
  display: none;
}

/* ---- side column: recent chats ----------------------------------------------------------- */

.ph-chats {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph-chat,
.ph-chat:visited {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  min-height: 44px;
  padding: var(--vs-s2);
  border-radius: var(--vs-r-md);
  color: var(--vs-chalk);
  text-decoration: none;
}
.ph-chat:hover,
.ph-chat:focus-visible {
  background: var(--vs-deck);
  color: var(--vs-chalk);
  text-decoration: none;
}

.ph-chat-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ph-chat-name,
.ph-chat-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph-chat-name {
  font-size: 0.875rem;
  font-weight: 600;
}

.ph-chat-preview {
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

/* ---- the computer layout ------------------------------------------------------------------ */

@media (min-width: 50rem) {
  .ph-hero {
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--vs-s5);
    min-height: 13rem;
    padding: var(--vs-s5);
    background-position: center 30%;
  }

  .ph-greeting {
    font-size: 2rem;
  }

  .ph-feature {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--vs-s2);
    width: min(24rem, 50%);
    padding: var(--vs-s4);
    border-radius: var(--vs-r-lg);
    background: rgba(0, 0, 0, 0.55);
  }

  .ph-feature-name {
    margin: 0;
    font-family: var(--vs-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--vs-chalk);
    overflow-wrap: anywhere;
  }

  .ph-feature-sub {
    margin: 0;
    font-size: 0.875rem;
    color: var(--vs-chalk);
  }

  .ph-event--featured {
    display: none;
  }

  /* With nothing else in it, the rail the live event left is not held open as a gap under its heading. */
  .ph-rail-wrap:has(> .ph-rail--events > .ph-event--featured:only-child),
  .ph-rail-wrap:has(> .ph-rail--events > .ph-event--featured:only-child) + .ph-subhead,
  .ph-section:has(> .ph-rail-wrap > .ph-rail--events > .ph-event--featured:only-child):not(:has(.ph-subhead)) {
    display: none;
  }

  /* The side column gives way on a small tablet, so the page keeps room for a whole event card beside it. */
  .ph-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(13rem, 24vw, 18rem);
    gap: var(--vs-s6);
    align-items: start;
  }

  /* A new player has nobody to list, so the column is not held open for nothing. */
  .ph-body:has(.ph-side:empty) {
    grid-template-columns: minmax(0, 1fr);
  }

  .ph-main {
    grid-column: 1;
    grid-row: 1;
  }

  .ph-side {
    grid-column: 2;
    grid-row: 1;
  }

  .ph-side:not(:empty) {
    margin-bottom: 0;
  }

  .ph-side .ph-section:last-child {
    margin-bottom: 0;
  }

  /* A rail stops being a rail: everything fits, so nothing scrolls sideways and the arrows have no reason to appear. */
  .ph-rail {
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .ph-rail--events {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
    gap: var(--vs-s4);
  }

  .ph-rail--discover {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: var(--vs-s4);
  }

  .ph-event,
  .ph-discover {
    width: auto;
    max-width: none;
  }

  /* The event's button sits at the foot of its card, whatever the cards beside it have to say. */
  .ph-event {
    display: flex;
    flex-direction: column;
  }

  .ph-event-body {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .ph-event-go {
    margin-top: auto;
  }

  /* Who is around, as a list down the side: picture, then name over what they are doing. */
  .ph-rail--friends {
    flex-direction: column;
    gap: var(--vs-s1);
  }

  .ph-friend {
    width: auto;
  }

  .ph-friend-tap,
  .ph-friend-tap:visited {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--vs-s3);
    row-gap: 0;
    align-items: center;
    padding: var(--vs-s1) var(--vs-s2);
    border-radius: var(--vs-r-md);
  }

  a.ph-friend-tap:hover,
  a.ph-friend-tap:focus-visible {
    background: var(--vs-deck);
  }

  .ph-avatar-wrap {
    grid-row: 1 / span 2;
  }

  .ph-avatar {
    width: 2.5rem;
    height: 2.5rem;
  }

  .ph-friend-name,
  .ph-friend-game {
    text-align: start;
  }

  .ph-friend-name {
    align-self: end;
    font-size: 0.875rem;
  }

  .ph-friend-game {
    align-self: start;
    font-size: 0.8125rem;
  }

  /* A long friends list stops at a sensible height. See all is right above it. */
  .ph-rail--friends > li:nth-child(n + 11) {
    display: none;
  }
}
/* Support tickets, shared by the developer portal (Support.tsx), the player portal (PlaySupport.tsx) and the admin
   console (AdminSupportTickets.tsx). Every portal is dark.

   This file used to read light-theme variables (--card-bg, --text, --border, --primary) that nothing defines, so it
   always fell back to its light defaults: near-white reply bubbles and forms under the dark theme's light text, dark
   text on the dark page, and near-white rows on hover. Replies were unreadable in all three portals. It now uses the
   design tokens from styles/tokens.css, which are defined on :root for every host.

   Hover rules restate colour and border-colour because index.css still carries Vite defaults (a:hover, button:hover)
   that outrank a bare class. */

.support-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem;
}
.support-crumbs {
  margin-bottom: 1rem;
}
.support-page h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.support-desc,
.support-loading,
.support-empty {
  color: var(--vs-dim);
  margin-bottom: 1rem;
}
.support-admin-link {
  margin-bottom: 1rem;
}
.support-admin-link a {
  color: var(--vs-act);
  text-decoration: none;
  font-weight: 500;
}
.support-admin-link a:hover {
  color: var(--vs-act);
  text-decoration: underline;
}
.support-error {
  color: var(--vs-fault);
  margin-bottom: 0.5rem;
}
.support-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--vs-r-sm);
  border: 1px solid var(--vs-act-fill);
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  cursor: pointer;
  font-size: 0.9375rem;
}
.support-btn:hover:not(:disabled) {
  background: var(--vs-act-fill-hi);
  border-color: var(--vs-act-fill-hi);
  color: var(--vs-act-ink);
}
.support-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.support-btn--new {
  margin-bottom: 1.5rem;
}
.support-btn--secondary {
  background: transparent;
  border-color: var(--vs-rail);
  color: var(--vs-chalk);
  margin-inline-start: 0.5rem;
}
.support-btn--secondary:hover:not(:disabled) {
  background: var(--vs-deck-hi);
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}
.support-form {
  background: var(--vs-deck);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--vs-chalk);
}
.support-form h2 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}
.support-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--vs-dim);
}
.support-input,
.support-reply-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
  color: var(--vs-chalk);
  font: inherit;
  font-size: 0.9375rem;
}
.support-input::placeholder,
.support-reply-input::placeholder {
  color: var(--vs-faint);
}
.support-input:focus,
.support-reply-input:focus {
  outline: 2px solid var(--vs-act);
  outline-offset: 1px;
  border-color: var(--vs-act);
}
.support-form-actions {
  margin-top: 1rem;
}
.support-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--vs-faint);
}
.support-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.support-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: inherit;
}
.support-list-item:hover {
  background: var(--vs-deck-hi);
  border-color: var(--vs-rail);
  color: inherit;
}
.support-list-subject {
  flex: 1;
  font-weight: 500;
}
.support-list-date {
  font-size: 0.875rem;
  color: var(--vs-dim);
}
.support-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  background: var(--vs-rail-soft);
  color: var(--vs-chalk);
}
/* Status labels arrive in sentence case ("Waiting for you"), so the badge leaves their case alone. */
.support-badge--staff {
  background: var(--vs-act-wash);
  color: var(--vs-act);
}
.support-detail {
  margin-top: 1rem;
}
.support-detail-subject {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.support-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--vs-dim);
}
.support-detail-date {
  margin-inline-start: auto;
}
.support-detail-description {
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--vs-rail-soft);
}
.support-replies {
  margin-bottom: 1rem;
}
.support-reply {
  padding: 0.75rem;
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  border: 1px solid var(--vs-rail-soft);
  color: var(--vs-chalk);
  margin-bottom: 0.5rem;
}
.support-reply--staff {
  background: var(--vs-act-wash);
  border-inline-start: 3px solid var(--vs-act);
}
.support-reply-meta {
  font-size: 0.8125rem;
  color: var(--vs-dim);
  margin-bottom: 0.25rem;
}
.support-reply-body {
  margin: 0;
  white-space: pre-wrap;
}
.support-reply-form {
  margin-top: 1rem;
}
.support-reply-input {
  margin-bottom: 0.5rem;
  resize: vertical;
}
.play-support.support-page {
  max-width: 44rem;
  padding: 0.25rem 0 4rem;
}

/* These fields are shared with the studio portal, where a mouse does not need the height. */
.play-support .support-input {
  min-height: 44px;
}

/* On a phone the title gets the whole line, with the status and date beneath it. Side by side the title had the least
   room of the three and ran down the row a word at a time. */
@media (max-width: 30rem) {
  .play-support .support-list-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--vs-s2) var(--vs-s3);
  }

  .play-support .support-list-subject {
    grid-column: 1 / -1;
  }

  .play-support .support-list-date {
    justify-self: end;
  }
}
/**
 * The player's games grid.
 *
 * Two columns on a phone. Four made each card about 70px wide, which is narrower than most game
 * names and left the artwork, the only thing that tells cards apart at a glance, smaller than the
 * text under it.
 *
 * Same design tokens as the rest of the player site, so moving between tabs does not feel like moving between apps.
 */

.pg {

  padding-block: 0.25rem 1.5rem;
}

/* ---- search and sort --------------------------------------------------------------------- */

/* Search and the view toggle on one row, so the games start as high up the screen as they can. */
.pg-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pg-search {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  border-radius: var(--vs-r-md);
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  font-size: 0.9rem;
}
.pg-search::placeholder {
  color: var(--vs-faint);
}
.pg-search:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 1px;
  border-color: transparent;
}

/* View toggle. Icon-only, because the two shapes say it faster than two words would, with the
   words kept for screen readers and as the tooltip. */
.pg-toggle {
  display: flex;
  gap: 0.25rem;
}

.pg-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--vs-r-md);
  border: 1px solid var(--vs-rail);
  background: transparent;
  color: var(--vs-faint);
  cursor: pointer;
}
.pg-toggle-btn:hover {
  color: var(--vs-chalk);
  background: var(--vs-deck);
}
.pg-toggle-btn--on {
  color: var(--vs-chalk);
  background: var(--vs-deck-hi);
  border-color: var(--vs-rail);
}

.pg-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- grid -------------------------------------------------------------------------------- */

.pg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The grid stretches the item, but the card inside it has to fill that height too, or a two-line
   name on one card leaves its neighbour short and the badges stop lining up across the row. */
.pg-item {
  display: flex;
  min-width: 0;
}
.pg-card {
  flex: 1;
}

.pg-card,
.pg-card:visited {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  padding: 0.6rem;
  border-radius: 14px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  text-decoration: none;
}
.pg-card:hover,
.pg-card:focus-visible {
  background: var(--vs-deck-hi);
  border-color: var(--vs-rail);
  color: var(--vs-chalk);
  text-decoration: none;
}
/* The whole card is the target, so it needs to acknowledge a press. */
.pg-card:active {
  transform: scale(0.985);
  background: var(--vs-deck);
}
.pg-card:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

/* One square frame for every game, whatever shape its logo is. Contain keeps a wordmark readable where cover would slice
   the ends off it. The card is the frame: a second dark tile inside it was noise. */
.pg-art {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--vs-r-md);
  overflow: hidden;
}
.pg-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pg-art-fallback {
  background: var(--vs-deck-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--vs-faint);
}

/* Two lines of room. A name is the thing a player is looking for, so it gets the space before the
   badge does, and only truncates after actually running out of it. */
.pg-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--vs-chalk);
}

.pg-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.pg-platform {
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--vs-faint);
}

/* ---- list view ----------------------------------------------------------------------------- */

/* Same markup as the grid, laid out along the row instead of down the card. Artwork shrinks to a
   thumbnail because in a list the name is what you are scanning, not the picture. */
.pg-grid--list {
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.pg-grid--list .pg-card {
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.6rem;
}

.pg-grid--list .pg-art {
  flex: none;
  width: 3.2rem;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}
.pg-grid--list .pg-art-fallback {
  font-size: 1.1rem;
}

.pg-grid--list .pg-text {
  flex: 1;
  min-width: 0;
}

/* One line here: the row is as wide as the screen, so a name that does not fit in one is rare, and
   two-line rows would make the list harder to scan than the grid it is an alternative to. */
.pg-grid--list .pg-name {
  -webkit-line-clamp: 1;
  line-clamp: 1;
  font-size: 0.88rem;
}

.pg-grid--list .pg-badge {
  flex: none;
  align-self: center;
  margin-top: 0;
}

/* ---- status ------------------------------------------------------------------------------ */

.pg-badge {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.45;
}
.pg-badge--ok {
  color: var(--vs-on);
  background: var(--vs-on-wash);
}

/* The tick lives here rather than in the translated string: it is the same mark in every
   language, and keeping it out of the copy stops it being dropped or doubled by a translator. */
.pg-badge--ok::before {
  content: '\2713\00a0';
}
.pg-badge--todo {
  color: var(--vs-act);
  background: var(--vs-act-wash);
}
/* ---- messages ---------------------------------------------------------------------------- */

.pg-muted {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--vs-faint);
}

.pg-error {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.88rem;
  color: var(--vs-fault);
}

@media (min-width: 37.5rem) {
  .pg-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pg-grid--list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 50rem) {
  .pg-grid {
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: var(--vs-s4);
  }
  .pg-grid--list {
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    gap: var(--vs-s2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pg-card:active {
    transform: none;
  }
}
/**
 * The event card, wherever it appears.
 *
 * Same charcoal surface and hairline as every other card in the play portal. The only card that
 * carries an accent is a live one, because that is the only one where being noticed is the point.
 */

.pev {
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
}

.pev--live {
  border-color: var(--vs-on);
}

/* Still readable, clearly over. Hiding ended events entirely would leave a player wondering where
   the thing they played last week went. A quieter name, not a see-through card: the small print has no contrast to spare. */
.pev--ended .pev-name {
  color: var(--vs-dim);
}

.pev-link,
.pev-link:visited {
  display: block;
  color: inherit;
  text-decoration: none;
  background: none;
}
.pev-link:hover,
.pev-link:focus-visible {
  color: inherit;
  text-decoration: none;
}
.pev-link:hover .pev-name,
.pev-link:focus-visible .pev-name {
  text-decoration: underline;
}

.pev-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.pev-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--vs-chalk);
}

.pev-state {
  flex: none;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
}
.pev-state--live {
  color: var(--vs-void);
  background: var(--vs-on);
}
.pev-state--upcoming {
  color: var(--vs-act);
  background: var(--vs-act-wash);
}
.pev-state--ended {
  color: var(--vs-dim);
  background: var(--vs-deck-hi);
}

.pev-game {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.4rem 0 0;
  font-size: 0.79rem;
  color: var(--vs-dim);
}
.pev-game-icon {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 4px;
  object-fit: cover;
}

.pev-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.45rem 0 0;
}

.pev-chip {
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--vs-dim);
  background: var(--vs-deck-hi);
}

/* What can be won is the reason to open the card, so it is not left in the small print. */
.pev-chip--prize {
  color: var(--vs-warn);
  background: var(--vs-warn-wash);
}

.pev-when {
  font-size: 0.78rem;
  color: var(--vs-dim);
}

.pev-sponsor {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--vs-faint);
}
/**
 * The events page shell. The cards themselves are PlayEventCard, shared with the game page.
 */

.pe {
  padding-block: 0.25rem 1.5rem;
}

.pe-group {
  margin-bottom: 1.5rem;
}
.pe-group:last-child {
  margin-bottom: 0;
}

.pe-group-title {
  margin: 0 0 0.6rem;
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--vs-dim);
}

.pe-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 50rem) {
  .pe-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: var(--vs-s3);
  }
}

.pe a:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}
/* A sheet over the page. Bottom-anchored on a phone, a centred panel once there is room. */

/* Padding counts inside the width, or a full-width field runs off the side of the sheet. */
.sheet,
.sheet *,
.sheet *::before,
.sheet *::after {
  box-sizing: border-box;
}

.sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.66);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.sheet {
  width: 100%;
  max-width: 34rem;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--vs-deck);
  color: var(--vs-chalk);
  border: 1px solid var(--vs-rail);
  border-bottom: 0;
  border-radius: var(--vs-r-lg) var(--vs-r-lg) 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  animation: sheet-rise 180ms ease-out;
}

/* Motion here reports what just happened, so it goes when someone has asked for less of it. */
@media (prefers-reduced-motion: reduce) {
  .sheet {
    animation: none;
  }
}

@keyframes sheet-rise {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s3);
  padding: var(--vs-s4) var(--vs-s4) var(--vs-s3);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.sheet-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

/* Same reason as the row icons: an SVG in a flex button shrinks unless told not to. */
.sheet-close svg {
  flex: none;
}

.sheet-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--vs-r-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--vs-dim);
  cursor: pointer;
}

.sheet-close:hover {
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  border-color: var(--vs-rail);
}

.sheet-close:focus-visible,
.sheet:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

.sheet-body {
  padding: var(--vs-s4);
}

@media (min-width: 40rem) {
  .sheet-scrim {
    align-items: center;
    padding: var(--vs-s4);
  }

  .sheet {
    border-bottom: 1px solid var(--vs-rail);
    border-radius: var(--vs-r-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}
.share-card-block {
  margin: 0.75rem 0 0.25rem;
}

.share-card-btn {
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  border-radius: var(--vs-r-sm);
  border: none;
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.share-card-btn:hover:not(:disabled) {
  background: var(--vs-act-fill-hi);
  border-color: transparent;
  color: var(--vs-act-ink);
}

.share-card-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Inside the sheet: the card at full width, then what can be done with it. */
.share-card-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  border-radius: var(--vs-r-md);
  background: var(--vs-sunk);
}

.share-card-msg {
  margin: var(--vs-s3) 0 0;
  font-size: 0.875rem;
  color: var(--vs-chalk);
}

.share-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
  margin-top: var(--vs-s3);
}

/* Compact trigger: secondary to the thing it shares, so it reads as a control rather than the point of the section. */
.share-card-block--compact {
  display: inline-flex;
  flex: none;
  margin: 0;
}

.share-card-btn--compact {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--vs-rail);
  background: transparent;
  color: var(--vs-dim);
  font-size: 0.8125rem;
  font-weight: 550;
  white-space: nowrap;
}

.share-card-btn--compact:hover:not(:disabled) {
  color: var(--vs-chalk);
  background: var(--vs-deck-hi);
  border-color: var(--vs-faint);
}
/**
 * The event page, and the player screens that share its look: prizes, inbox, invite and profile blocks.
 * Colours come from the design tokens.
 */

.pevd {
  padding-block: 0.25rem 1.5rem;
}

.pevd-muted {
  margin: 0;
  font-size: 0.88rem;
  color: var(--vs-dim);
}
.pevd-error {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--vs-fault);
}

.pevd-hero {
  padding-bottom: 0.9rem;
}
.pevd-art {
  height: 150px;
  margin-bottom: 0.75rem;
  border-radius: var(--vs-r-lg);
}
.pevd-state {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: var(--vs-r-pill);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--vs-chalk);
  background: var(--vs-sunk);
}
.pevd-state--on-art {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
}

.pevd-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--vs-chalk);
}
.pevd-when {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--vs-dim);
}
.pevd-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.6rem 0 0;
}
.pevd-game,
.pevd-game:visited {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--vs-chalk);
  text-decoration: none;
  background: none;
}
.pevd-game:hover,
.pevd-game:focus-visible {
  color: var(--vs-act);
  text-decoration: underline;
}
.pevd-game-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: cover;
}
.pevd-chip {
  padding: 0.1rem 0.5rem;
  border-radius: var(--vs-r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vs-dim);
  background: var(--vs-deck);
}
.pevd-chip--prize {
  color: var(--vs-warn);
  background: var(--vs-warn-wash);
}
.pevd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.pevd-sponsor {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
}
.pevd-sponsor-logo {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--vs-r-sm);
  object-fit: contain;
}
.pevd-sponsor-text {
  flex: 1;
  min-width: 0;
}
.pevd-sponsor-name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--vs-chalk);
}

.pevd-won {
  margin-bottom: 0.9rem;
  padding: 0.75rem;
  border: 1px solid var(--vs-warn);
  border-radius: var(--vs-r-md);
  background: var(--vs-warn-wash);
}
.pevd-won-title {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--vs-chalk);
}

.pevd-mine {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--vs-r-md);
  background: var(--vs-act-wash);
}
.pevd-mine-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--vs-dim);
}
.pevd-mine-rank {
  font-size: 1.1rem;
  color: var(--vs-chalk);
}
.pevd-mine-gap {
  font-size: 0.85rem;
  color: var(--vs-chalk);
}

.pevd-section {
  margin-bottom: 1.3rem;
}
.pevd-h2 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 650;
  color: var(--vs-chalk);
}
.pevd-h3 {
  margin: 0.75rem 0 0.4rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--vs-dim);
}

.pevd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  color: var(--vs-chalk);
}
.pevd-table th {
  padding: 0.3rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: start;
  color: var(--vs-dim);
  border-bottom: 1px solid var(--vs-rail);
}
.pevd-table td {
  padding: 0.42rem 0.4rem;
  border-bottom: 1px solid var(--vs-rail-soft);
}
.pevd-row--me td {
  background: var(--vs-act-wash);
}
.pevd-rank {
  width: 2.6rem;
  font-weight: 650;
  color: var(--vs-dim);
}
.pevd-table .pevd-num {
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.pevd-score {
  font-weight: 650;
}
.pevd-name {
  font-weight: 550;
  /* A very long name wraps. Held on one line it pushed the score, the point of the row, off the side of a phone. */
  overflow-wrap: anywhere;
}
.pevd-you {
  margin-inline-start: 0.4rem;
  padding: 0 0.4rem;
  border-radius: var(--vs-r-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--vs-act-ink);
  background: var(--vs-act-fill);
}
.pevd-detail {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--vs-dim);
}
.pevd-gap-row td {
  padding: 0.1rem 0.4rem;
  text-align: center;
  color: var(--vs-faint);
  border-bottom: none;
}
.pevd-more {
  margin-top: 0.6rem;
}

.pevd-bracket-group {
  margin-top: 0.6rem;
}
.pevd-bracket {
  display: flex;
  gap: 0.6rem;
  padding-bottom: 0.4rem;
  overflow-x: auto;
}
.pevd-round {
  flex: 0 0 150px;
  min-width: 0;
}
.pevd-round-title {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--vs-dim);
}
.pevd-match {
  margin-bottom: 0.45rem;
  overflow: hidden;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck);
}
.pevd-match--mine {
  border-color: var(--vs-act);
}
.pevd-match-tag {
  margin: 0;
  padding: 0.12rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--vs-dim);
  background: var(--vs-sunk);
}
.pevd-side {
  margin: 0;
  padding: 0.28rem 0.45rem;
  overflow: hidden;
  font-size: 0.8rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--vs-dim);
}
.pevd-side + .pevd-side {
  border-top: 1px solid var(--vs-rail-soft);
}
.pevd-side--won {
  font-weight: 700;
  color: var(--vs-chalk);
}

.pevd-prizes {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pevd-prize {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--vs-r-sm);
  font-size: 0.86rem;
  color: var(--vs-dim);
  background: var(--vs-deck);
}
.pevd-prize-reward {
  font-weight: 650;
  color: var(--vs-warn);
}

/* ---- lists on the other player screens ---- */

.pevd-title--page {
  margin-bottom: 0.9rem;
}
.pevd-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pevd-card {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
}
.pevd-card--unread {
  border-color: var(--vs-act);
}
.pevd-card-link,
.pevd-card-link:visited {
  display: block;
  color: var(--vs-chalk);
  text-decoration: none;
  background: none;
}
.pevd-card-link:hover,
.pevd-card-link:focus-visible {
  color: var(--vs-chalk);
  text-decoration: none;
}
.pevd-card-link:hover .pevd-card-title,
.pevd-card-link:focus-visible .pevd-card-title {
  text-decoration: underline;
}
.pevd-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--vs-chalk);
}
.pevd-card-sub {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--vs-dim);
}
.pevd-status {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.05rem 0.5rem;
  border-radius: var(--vs-r-pill);
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--vs-warn);
  background: var(--vs-warn-wash);
}
.pevd-status--done {
  color: var(--vs-on);
  background: var(--vs-on-wash);
}
.pevd-empty {
  padding: 1rem 0;
}
.pevd-invite {
  text-align: center;
}
.pevd-invite-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 0.6rem;
  overflow: hidden;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vs-chalk);
  background: var(--vs-deck-hi);
}
.pevd-invite-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pevd-invite .pevd-actions {
  justify-content: center;
}
/** The competitive part of a player's profile. Colours come from the design tokens. */

.ppb-headline {
  padding: 0.85rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-lg);
  background: var(--vs-deck);
}
.ppb-rank {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.ppb-rank-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--vs-chalk);
}
.ppb-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--vs-dim);
}
.ppb-record {
  display: flex;
  gap: 1.5rem;
  margin: 0.8rem 0 0;
}
.ppb-record dt {
  font-size: 0.75rem;
  color: var(--vs-dim);
}
.ppb-record dd {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--vs-chalk);
}
.ppb-section {
  margin-top: 1.15rem;
}
.ppb-h2 {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--vs-chalk);
}
.ppb-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ppb-row,
.ppb-row:visited {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  color: var(--vs-chalk);
  text-decoration: none;
  background: var(--vs-deck);
}
.ppb-row:hover,
.ppb-row:focus-visible {
  color: var(--vs-chalk);
  text-decoration: none;
  border-color: var(--vs-rail);
  background: var(--vs-deck-hi);
}
.ppb-row--game {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.ppb-row-main {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--vs-chalk);
}
.ppb-row--game .ppb-row-main {
  flex: 1;
  min-width: 0;
}
.ppb-game-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--vs-r-sm);
  object-fit: cover;
}
.ppb-game-icon--blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--vs-chalk);
  background: var(--vs-deck-hi);
}
.play-games {
  padding-block: 0.25rem 1.5rem;
}

.play-games-error {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--vs-fault);
}

.play-games-muted {
  margin: 0;
  font-size: 0.9rem;
  color: var(--vs-faint);
}

.play-games-card-icon-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--vs-r-md);
  background: var(--vs-deck-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vs-chalk);
}

.play-add-games-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.play-add-games-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--vs-deck);
  border: 1px solid var(--vs-rail);
}

.play-add-games-icon-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-add-games-icon {
  max-width: 48px;
  max-height: 48px;
  border-radius: 8px;
  object-fit: contain;
}

.play-add-games-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.play-add-games-name {
  font-weight: 600;
  color: var(--vs-chalk);
}

.play-add-games-note {
  font-size: 0.8125rem;
}
/**
 * One game's page. The game's own tint and icon supply the only colour that changes between pages, so every game gets its
 * own character without anyone having to author a cover for it.
 */

.gd {

  padding-block: 0.25rem 1.5rem;
}

/* ---- banner ------------------------------------------------------------------------------- */

.gd-banner {
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: 14px;
  border: 1px solid var(--vs-rail);
  overflow: hidden;
  isolation: isolate;
}

.gd-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem;
}

.gd-banner-icon {
  flex: none;
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 12px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-sunk);
  overflow: hidden;
}
.gd-banner-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
  box-sizing: border-box;
}
.gd-banner-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--vs-faint);
}

.gd-banner-text {
  min-width: 0;
}

.gd-banner-title {
  margin: 0 0 0.2rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--vs-chalk);
}

/* This line replaced the game's slug, which was an internal identifier and meant nothing to a
   player. It carries the platform and the account they are actually playing as. */
.gd-banner-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.3;
}

.gd-banner-platform {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  font-weight: 600;
}

.gd-banner-account {
  color: var(--vs-chalk);
}
.gd-banner-account--todo {
  color: var(--vs-warn);
}

/* ---- sections ----------------------------------------------------------------------------- */

.gd-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gd-section {
  margin-bottom: 1.6rem;
}
.gd-section:last-child {
  margin-bottom: 0;
}

.gd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.gd-h2 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 650;
  color: var(--vs-chalk);
}
.gd-section-head .gd-h2 {
  margin: 0;
}

.gd-muted {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--vs-faint);
}
.gd-muted:last-child {
  margin-bottom: 0;
}

.gd-error {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--vs-fault);
}

/* ---- stat tiles ---------------------------------------------------------------------------- */

/* The number leads and the label explains it, which is the opposite of the sentence this replaced
   ("Matches: 4 Wins: 2 Kills: 0"), where the labels were the loudest part. */
.gd-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
  gap: 0.5rem;
}

.gd-tile {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
}

.gd-tile-value {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--vs-chalk);
  font-variant-numeric: tabular-nums;
}

.gd-tile-label {
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--vs-dim);
}

.gd-stat-rest {
  margin: 0.6rem 0 0;
}

.gd-stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--vs-rail-soft);
}
.gd-stat-row:last-child {
  border-bottom: none;
}
.gd-stat-row dt {
  font-size: 0.83rem;
  color: var(--vs-dim);
}
.gd-stat-row dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--vs-chalk);
  font-variant-numeric: tabular-nums;
}

/* ---- events -------------------------------------------------------------------------------- */

.gd-events {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- friends -------------------------------------------------------------------------------- */

.gd-friends {
  display: flex;
  gap: 0.7rem;
  margin: 0;
  padding: 0.1rem 0 0.2rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.gd-friends::-webkit-scrollbar {
  display: none;
}

.gd-friend {
  flex: none;
  width: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.gd-friend-avatar-wrap {
  position: relative;
  display: block;
  line-height: 0;
}

.gd-friend-avatar {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck-hi);
}
.gd-friend-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1;
  color: var(--vs-dim);
}

/* Green means the one thing the platform can actually prove: they are in this game right now. */
.gd-friend-dot {
  position: absolute;
  inset-block-end: 0;
  inset-inline-end: 0;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--vs-on);
  border: 2px solid var(--vs-void);
}

.gd-friend-name {
  max-width: 100%;
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: center;
  color: var(--vs-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gd-disconnect {
  margin-top: 0.25rem;
}

.gd-footnote {
  margin-top: 0.4rem;
  font-size: 0.76rem;
}

.gd a:focus-visible,
.gd button:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

@media (min-width: 50rem) {
  .gd-events {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: var(--vs-s3);
  }
}
/**
 * Friends.
 *
 * A quiet list with one loud thing in it: the green mark on somebody who is in a game right now,
 * which is the only fact on this page that changes what you do next. Everything else stays flat so
 * that mark is the thing the eye lands on.
 *
 * Rows are separated by a hairline rather than boxed as cards. Fifty people in fifty boxes reads as
 * fifty objects; the same fifty in one column reads as a list of people, which is what it is.
 */

.pf {
  padding-block: 0.25rem 1.5rem;
}

.pf-add--inline {
  margin-top: var(--vs-s3);
}

/* ---------- search ---------- */

.pf-search {
  display: block;
  margin-bottom: var(--vs-s4);
}

.pf-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pf-search-input {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--vs-s3);
  border-radius: var(--vs-r-md);
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  font: inherit;
  font-size: 0.9375rem;
}

.pf-search-input::placeholder {
  color: var(--vs-faint);
}

/* ---------- list ---------- */

.pf-note {
  margin: 0 0 var(--vs-s2);
  color: var(--vs-faint);
  font-size: 0.8125rem;
}

.pf-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pf-row {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  min-height: 68px;
  padding: var(--vs-s2) 0;
  border-bottom: 1px solid var(--vs-rail-soft);
}

.pf-row:last-child {
  border-bottom: 0;
}

.pf-avatar-wrap {
  position: relative;
  flex: none;
  width: 52px;
  height: 52px;
}

.pf-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--vs-deck-hi);
  border: 1px solid var(--vs-rail);
  color: var(--vs-dim);
  font-size: 1rem;
  font-weight: 600;
}

/* Ringed in the page ground so it reads as sitting on top of the picture, not inside it.
   Logical inset, or it stays on the same physical corner in Arabic while the row mirrors around
   it, and the dashboard shows the identical badge on the opposite corner of the same avatar. */
.pf-dot {
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--vs-void);
  background: var(--vs-rail);
}

/* In a game and online share the green. Which of the two it is gets said in words underneath,
   where naming the game tells somebody far more than a second colour could. */
.pf-dot--ingame,
.pf-dot--online {
  background: var(--vs-on);
}

/* Away is a hollow ring rather than a filled grey circle: filled reads as another state with its
   own colour, hollow reads as the absence of one. It also survives being looked at by somebody who
   cannot tell the green from the grey. */
.pf-dot--offline {
  background: var(--vs-void);
  box-shadow: inset 0 0 0 2px var(--vs-rail);
}

.pf-identity {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-name {
  color: var(--vs-chalk);
  font-size: 0.9375rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-activity {
  color: var(--vs-dim);
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Quieter than "Online", because a list of absent people should not be the loudest thing here. */
.pf-activity--away {
  color: var(--vs-faint);
}

.pf-activity--link {
  color: var(--vs-act);
  text-decoration: none;
}

.pf-activity--link:hover {
  text-decoration: underline;
}

/* ---------- row actions ---------- */

/**
 * Icons inside a flex button must be told not to shrink.
 *
 * An SVG is a flex item like any other, and its flex base size is not simply its width attribute,
 * so these were being squashed to about a quarter of their width while keeping their full height.
 * On screen that is not a small icon, it is a speck: the message glyph read as a dot and the
 * overflow menu as a thin smear. The button around it was the right size throughout, which is what
 * made it easy to miss when measuring the button rather than what is drawn inside it.
 */
.pf-msg svg,
.pf-empty-art {
  flex: none;
}

.pf-msg {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--vs-r-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--vs-dim);
  cursor: pointer;
}

/**
 * Messaging is the main action on this row and it does not exist yet, so the slot is held rather
 * than hidden. The first attempt coloured it --vs-rail, which measured 1.6:1 against the page and
 * was invisible on screen: the row read as having no main action at all, which is the opposite of
 * what this page is for. Visible enough to be understood as the place messages will live, quiet
 * enough not to be mistaken for something that works today.
 */
.pf-msg:disabled {
  color: var(--vs-faint);
  border-color: var(--vs-rail-soft);
  opacity: 0.75;
  cursor: not-allowed;
}

/* ---------- requests ---------- */

.pf-section {
  margin-bottom: var(--vs-s5);
}

.pf-section-title {
  margin: 0 0 var(--vs-s2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--vs-dim);
}

/* A grid, so the name stays beside the picture and is cut to one line however long it is. A wrapping row put a long name
   on a line of its own below the picture. */
.pf-row--request {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  min-height: 60px;
}

.pf-req-actions {
  display: flex;
  gap: var(--vs-s2);
  flex: none;
}

/* ---------- buttons ---------- */

/* ---------- states ---------- */

.pf-muted {
  color: var(--vs-dim);
  font-size: 0.9375rem;
}

.pf-empty-filter {
  padding: var(--vs-s5) 0;
}

.pf-error {
  margin: 0 0 var(--vs-s3);
  color: var(--vs-fault);
  font-size: 0.875rem;
}

.pf-sent {
  margin: 0 0 var(--vs-s3);
  color: var(--vs-on);
  font-size: 0.875rem;
}

.pf-empty {
  padding: var(--vs-s6) 0;
  text-align: center;
}

.pf-empty-art {
  color: var(--vs-rail);
  margin-bottom: var(--vs-s3);
}

.pf-empty-line {
  margin: 0;
  color: var(--vs-chalk);
  font-size: 1rem;
  font-weight: 600;
}

/* ---------- add form ---------- */

.pf-addform-label {
  display: block;
  margin-bottom: var(--vs-s2);
  color: var(--vs-chalk);
  font-size: 0.875rem;
  font-weight: 600;
}

.pf-addform-hint {
  margin: var(--vs-s2) 0 var(--vs-s4);
  color: var(--vs-faint);
  font-size: 0.8125rem;
}

.pf-addform-send {
  width: 100%;
}

/* ---------- focus ---------- */

.pf-search-input:focus-visible,
.pf-msg:focus-visible,
.pf-activity--link:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

/* On a phone the buttons take a second row, lined up under the name rather than under the picture. */
@media (max-width: 30rem) {
  .pf-row--request {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .pf-req-actions,
  .pf-req-cancel {
    grid-column: 2;
    justify-self: start;
  }
}
.pf-name--link,
.pf-name--link:visited {
  color: inherit;
  text-decoration: none;
  background: none;
}
.pf-name--link:hover,
.pf-name--link:focus-visible {
  color: inherit;
  text-decoration: underline;
}

.pf-invite {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--vs-rail);
}
.pf-invite-hint {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: var(--vs-dim);
  overflow-wrap: anywhere;
}
.pf-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
/**
 * Chats: the list, and one conversation.
 *
 * The list follows Friends: a column of people separated by hairlines, not a stack of cards. The only loud thing
 * is the unread count, because it is the only fact on the screen that changes which row you open.
 *
 * The thread is the one place in this app where the content is the interface, so it takes the whole column and
 * the chrome around it stays quiet. Bubbles are asymmetric on purpose: yours are filled and sit to the end of the
 * line, theirs are a flat surface at the start of it. That is enough to tell them apart without a colour per
 * person, which stops meaning anything past three people in a room.
 *
 * Everything reads inline-start and inline-end rather than left and right, because this portal renders in Arabic
 * with the whole layout mirrored, and a conversation that mirrors its own direction is the point.
 */

.pc {
  padding-block: 0.25rem 1.5rem;
}

.pc-muted {
  color: var(--vs-faint);
  font-size: 0.875rem;
}

.pc-error {
  color: var(--vs-fault);
  font-size: 0.875rem;
}

/* ---------- empty ---------- */

/* ---------- list ---------- */

.pc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pc-list li + li .pc-row {
  border-top: 1px solid var(--vs-rail-soft);
}

.pc-row {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  padding: var(--vs-s3) var(--vs-s2);
  color: var(--vs-chalk);
  text-decoration: none;
  min-width: 0;
}

.pc-row:hover {
  background: var(--vs-deck);
  color: var(--vs-chalk);
}

.pc-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  font-size: 0.875rem;
  font-weight: 650;
  overflow: hidden;
}

.pc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pc-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.pc-row-top,
.pc-row-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--vs-s3);
  min-width: 0;
}

.pc-row-name {
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-row-when {
  flex: none;
  font-size: 0.75rem;
  color: var(--vs-faint);
  font-variant-numeric: tabular-nums;
}

.pc-row-preview {
  font-size: 0.875rem;
  color: var(--vs-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-unread {
  flex: none;
  min-width: 1.25rem;
  padding: 0 0.35rem;
  border-radius: var(--vs-r-pill);
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- thread ---------- */

.pct {
  display: flex;
  flex-direction: column;
  /* All of main, which the layout gives no padding on this page. The list inside is what scrolls. */
  height: 100%;
  min-height: 0;
}

.pct-head {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  padding: var(--vs-s1) var(--vs-s4);
  border-bottom: 1px solid var(--vs-rail-soft);
  flex: none;
}

/* 44 pixels to press. The negative margin keeps the arrow where a line of text would start. */
.pct-back,
.pct-back:visited {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-inline-start: calc(var(--vs-s3) * -1);
  color: var(--vs-dim);
  text-decoration: none;
}

.pct-back:hover {
  color: var(--vs-chalk);
}

.pct-back svg {
  transform: scaleX(-1);
}

[dir='rtl'] .pct-back svg {
  transform: none;
}

.pct-head-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pct-head-more {
  margin-inline-end: calc(var(--vs-s2) * -1);
}

.pct-head-name {
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--vs-chalk);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pct-head-sub {
  font-size: 0.75rem;
  color: var(--vs-faint);
}

.pct-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--vs-s4);
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  overscroll-behavior: contain;
}

.pct-centre {
  text-align: center;
  margin: auto 0;
}

.pct-more {
  align-self: center;
  margin-bottom: var(--vs-s3);
  padding: 0.3rem var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-pill);
  background: transparent;
  color: var(--vs-dim);
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
}

.pct-more:hover:not(:disabled) {
  color: var(--vs-chalk);
  border-color: var(--vs-rail);
  background: transparent;
}

.pct-day {
  margin: var(--vs-s3) 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--vs-faint);
}

.pct-msg {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  max-width: 82%;
}

.pct-msg--mine {
  align-self: flex-end;
  align-items: flex-end;
}

.pct-msg-sender {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s2);
  margin-top: var(--vs-s2);
  font-size: 0.75rem;
  color: var(--vs-faint);
}

.pct-msg-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: var(--vs-deck-hi);
  color: var(--vs-dim);
  font-size: 0.75rem;
  font-weight: 650;
  overflow: hidden;
}

.pct-msg-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pct-bubble {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  font-size: 0.9375rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  /* A finger resting here opens the sheet for this message. iOS would put its own callout over it. */
  -webkit-touch-callout: none;
}

.pct-msg--mine .pct-bubble {
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
}

.pct-bubble--gone {
  background: transparent;
  border: 1px dashed var(--vs-rail-soft);
  color: var(--vs-faint);
  font-style: italic;
}

.pct-msg--mine .pct-bubble--gone {
  background: transparent;
  color: var(--vs-faint);
}

.pct-text {
  display: block;
}

/* Always a line of its own, at the end of the bubble: placed after the words, it wrapped alone whenever a line nearly
   filled the bubble. The ink is solid, because the blue bubble leaves no contrast to fade it by. */
.pct-time {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: end;
  color: var(--vs-dim);
  font-variant-numeric: tabular-nums;
}

.pct-msg--mine .pct-time {
  color: var(--vs-act-ink);
}

.pct-msg--mine .pct-bubble--gone .pct-time {
  color: var(--vs-faint);
}

.pct-error {
  margin: 0;
  padding: var(--vs-s2) var(--vs-s4);
  color: var(--vs-fault);
  font-size: 0.8125rem;
}

/* ---------- composer ---------- */

.pct-composer {
  display: flex;
  gap: var(--vs-s2);
  padding: var(--vs-s3) var(--vs-s4);
  border-top: 1px solid var(--vs-rail-soft);
  flex: none;
  /* App.css styles every bare form as a 360px column. A class outranks that rule, but only for the
     properties it restates, so direction and width are restated here or the composer stacks. */
  flex-direction: row;
  max-width: none;
  width: auto;
  align-items: center;
}

.pct-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0.55rem var(--vs-s3);
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-pill);
  background: var(--vs-sunk);
  color: var(--vs-chalk);
  font-size: 0.9375rem;
  font-family: inherit;
}

.pct-input:focus {
  outline: none;
  border-color: var(--vs-act);
}

.pct-readonly {
  margin: 0;
  padding: var(--vs-s4);
  border-top: 1px solid var(--vs-rail-soft);
  color: var(--vs-faint);
  font-size: 0.8125rem;
  text-align: center;
}

/* ---------- report and block ---------- */

/*
 * Taking back your own message. It sits beside the bubble and only shows for a mouse or a keyboard, because a word under
 * every line is clutter. On a touch screen the long press does the same job, so a thumb cannot land on it by accident.
 */
.pct-flag {
  position: absolute;
  inset-block-end: 2px;
  inset-inline-end: 100%;
  margin-inline-end: var(--vs-s2);
  padding: 0;
  border: none;
  background: transparent;
  color: var(--vs-dim);
  font-size: 0.75rem;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: underline;
  opacity: 0;
}

.pct-msg:hover .pct-flag,
.pct-flag:focus-visible {
  opacity: 1;
}

.pct-flag:hover {
  color: var(--vs-chalk);
  background: transparent;
  border-color: transparent;
}

@media (hover: none) {
  .pct-flag {
    pointer-events: none;
  }
}

.pct-done {
  margin: 0;
  padding: var(--vs-s2) var(--vs-s4);
  color: var(--vs-on);
  font-size: 0.8125rem;
}

/* The inside of the shared Sheet, which is what brings it up from the bottom where a thumb is. */
.pct-sheet {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
}

.pct-sheet-title {
  margin: 0 0 var(--vs-s2);
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--vs-chalk);
}

.pct-sheet-label {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.pct-sheet-select {
  min-height: 44px;
  padding: 0.5rem var(--vs-s3);
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-sunk);
  color: var(--vs-chalk);
  font-size: 0.9375rem;
  font-family: inherit;
}

.pct-sheet-btn {
  min-height: 44px;
  padding: 0.6rem var(--vs-s4);
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.pct-sheet-btn:hover:not(:disabled) {
  background: var(--vs-rail);
  border-color: var(--vs-rail);
  color: var(--vs-chalk);
}

.pct-sheet-btn--danger {
  border-color: transparent;
  background: var(--vs-fault);
  color: var(--vs-fault-ink);
}

.pct-sheet-btn--danger:hover:not(:disabled) {
  background: var(--vs-fault-fill-hi);
  border-color: transparent;
  color: var(--vs-fault-ink);
}

.pct-sheet-btn--quiet {
  border-color: transparent;
  background: transparent;
  color: var(--vs-dim);
}

.pct-sheet-btn--quiet:hover:not(:disabled) {
  background: transparent;
  border-color: transparent;
  color: var(--vs-chalk);
}

.pct-sheet-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Choosing which message, when the panel was opened from the header. */
.pct-pick {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pct-pick-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-height: 44px;
  padding: var(--vs-s2) var(--vs-s3);
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-sunk);
  color: var(--vs-chalk);
  font-family: inherit;
  text-align: start;
  cursor: pointer;
}

.pct-pick-row:hover {
  background: var(--vs-deck-hi);
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}

.pct-pick-name {
  font-size: 0.8125rem;
  font-weight: 650;
}

.pct-pick-body {
  overflow: hidden;
  font-size: 0.875rem;
  color: var(--vs-dim);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* What blocking actually does, said before it is done rather than after. */
.pct-sheet-note {
  margin: var(--vs-s2) 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--vs-faint);
}

/* ---------- head and requests ---------- */

/*
 * The only thing on this screen waiting on the reader, so it is the only thing louder than a conversation. It
 * sits above the list rather than in it, because it is not a conversation and a row that looked like one would
 * be opened expecting messages.
 */
.pc-requests {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  margin-bottom: var(--vs-s4);
  padding: var(--vs-s3);
  border: 1px solid var(--vs-act);
  border-radius: var(--vs-r-md);
  background: var(--vs-act-wash);
  color: var(--vs-chalk);
  font-size: 0.875rem;
  text-decoration: none;
}

.pc-requests:hover {
  color: var(--vs-chalk);
  background: var(--vs-act-wash);
  filter: brightness(1.15);
}

.pc-requests-count {
  display: grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  flex: none;
  padding: 0 0.35rem;
  border-radius: var(--vs-r-pill);
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/**
 * A roster row: face, name, role. Same charcoal surface as every other card in the play portal.
 */

.mr {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
}

.mr-avatar-wrap {
  flex: none;
  line-height: 0;
}

.mr-avatar {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck-hi);
}

.mr-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1;
  color: var(--vs-dim);
}

/* An account that cannot be read is dimmer than one that simply has no picture, so the two states
   are distinguishable at a glance. */
.mr-avatar--gone {
  color: var(--vs-faint);
  border-style: dashed;
}

.mr-text {
  flex: 1;
  min-width: 0;
}

.mr-name {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

/* The cut has to be on the name itself: a flex row ignores text-overflow. */
.mr-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mr-name--gone {
  font-weight: 500;
  font-style: italic;
  color: var(--vs-faint);
}

.mr-you {
  flex: none;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  font-style: normal;
  color: var(--vs-chalk);
  background: var(--vs-deck-hi);
}

.mr-role {
  flex: none;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.5;
}
/* Only the owner gets a colour. Three coloured badges in one list is noise, and the role that
   actually changes what someone can do is the one worth marking. */
.mr-role--owner {
  color: var(--vs-warn);
  background: var(--vs-warn-wash);
}
.mr-role--officer {
  color: var(--vs-act);
  background: var(--vs-act-wash);
}
.mr-role--member {
  color: var(--vs-dim);
  background: var(--vs-deck-hi);
}

.mr-action {
  flex: none;
  display: flex;
  align-items: center;
}
/**
 * The way into a team's or guild's conversation.
 *
 * This replaced the placeholder that held the slot while chat was being built, and it keeps that panel's shape so
 * the page around it does not shift. What changes is the register: the dashed border and the dimmed everything
 * said "a room being built", and a door into a real conversation should not look provisional. Solid edge, live
 * button, one accent.
 */

.ce {
  padding: 0.85rem 0.9rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--vs-rail-soft);
  background: var(--vs-deck);
}

.ce-title {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 650;
  color: var(--vs-chalk);
}

.ce-desc {
  margin: 0 0 0.75rem;
  font-size: 0.83rem;
  line-height: 1.4;
  color: var(--vs-dim);
}

.ce-open {
  width: 100%;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border-radius: var(--vs-r-sm);
  border: none;
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  font-size: 0.84rem;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
}

.ce-open:hover:not(:disabled) {
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  filter: brightness(1.08);
}

.ce-open:disabled {
  opacity: 0.6;
  cursor: default;
}

.ce-error {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--vs-fault);
}
.play-tg {
  padding-block: 0.25rem 1.5rem;
}

.play-tg-error {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--vs-fault);
}

.play-tg-muted {
  margin: 0;
  font-size: 0.9rem;
  color: var(--vs-faint);
}

.play-tg-section {
  margin-bottom: 1.25rem;
}

.play-tg-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.play-tg-section h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

.play-tg-section-header h2 {
  margin: 0;
}

.play-tg-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.play-tg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--vs-rail-soft);
  font-size: 0.95rem;
  color: var(--vs-chalk);
}

.play-tg-tag {
  margin-inline-start: 0.25rem;
  font-size: 0.875rem;
  color: var(--vs-dim);
}

.play-tg-meta {
  font-size: 0.85rem;
  color: var(--vs-dim);
}

.play-tg-item-actions {
  display: flex;
  gap: 0.5rem;
}

.play-tg-invites {
  margin-bottom: 1.25rem;
}

.play-tg-invites h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

.play-tg-create {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.play-tg-create-actions {
  display: flex;
  gap: 0.5rem;
}

/* Sits above its own field, so it says what the field is for after somebody has started typing. */
.play-tg-label {
  display: block;
  font-size: 0.875rem;
  color: var(--vs-dim);
}

/* Guild detail */
.play-tg-detail {
  padding-block: 0.25rem 1.5rem;
}

.play-tg-detail-desc {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--vs-dim);
}

.play-tg-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

/* ---- roster and the detail header ---------------------------------------------------------- */

/* Rows are MemberRow, which brings its own styling. This is only the stack they sit in. */
.play-tg-roster {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Field and action on one line, wrapping to two when the field would be too narrow to read an
   address in. Stretch rather than centre: a centred column of controls inside a left-aligned page
   reads as a mistake, which is what it looked like. */
.play-tg-invite {
  display: flex;
  /* Stated because a global form rule makes every form a column, which turned the box's width below into its height. */
  flex-direction: row;
  max-width: none;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}
.play-tg-invite .vsp-input {
  flex: 1 1 11rem;
  width: auto;
  min-width: 0;
  margin: 0;
}
.play-tg-invite .vsp-btn {
  flex: 0 0 auto;
}

/* The way into chat is a panel of its own, so the roster under it needs room. */
.play-tg-detail .ce {
  margin-bottom: 1.25rem;
}

/* Confirmation of something that worked, so it is green rather than the error red beside it. */
.play-tg-note {
  margin: 0.5rem 0 0;
  font-size: 0.83rem;
  color: var(--vs-on);
}

/* How many of a quota are used, next to the button it governs. */
.play-tg-quota {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.78rem;
  color: var(--vs-faint);
}
.play-tg-quota--full {
  color: var(--vs-warn);
}

/* ---- team cards ----------------------------------------------------------------------------- */

/* The list was a name and a role on one line, which made every team look identical and gave the
   badge, the game and the people no room at all. Full-width cards instead, badge leading. */
.tc-item {
  list-style: none;
  margin-bottom: var(--vs-s2);
}

.tc {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem;
  border-radius: 14px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.tc:hover:not(:disabled) {
  background: var(--vs-deck-hi);
  border-color: var(--vs-rail);
}
.tc:active:not(:disabled) {
  transform: scale(0.99);
}
.tc:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}
.tc:disabled {
  opacity: 0.6;
  cursor: default;
}

.tc-badge {
  flex: none;
  display: block;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 12px;
  border: 1px solid var(--vs-rail);
  background: radial-gradient(circle at 50% 40%, var(--vs-deck-hi) 0%, var(--vs-deck-hi) 70%);
  overflow: hidden;
}
.tc-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.3rem;
  box-sizing: border-box;
}
.tc-badge-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--vs-faint);
}

.tc-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.tc-title {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}

.tc-name {
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The tag is an abbreviation of the name beside it, so it is a quiet label rather than a second
   title competing with the first. */
.tc-tag {
  flex: none;
  padding: 0.02rem 0.3rem;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--vs-dim);
  background: var(--vs-deck-hi);
}

.tc-game {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--vs-dim);
  min-width: 0;
}
.tc-game-icon {
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 3px;
  object-fit: cover;
}
.tc-game span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-people {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.12rem;
}

/* Overlapped, so four faces cost the width of about two. */
.tc-faces {
  display: flex;
}
.tc-face {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--vs-deck);
  background: var(--vs-deck-hi);
  margin-inline-start: -0.45rem;
}
.tc-face:first-child {
  margin-inline-start: 0;
}
.tc-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tc-face-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--vs-faint);
}
.tc:hover:not(:disabled) .tc-face {
  border-color: var(--vs-deck-hi);
}

.tc-count {
  font-size: 0.75rem;
  color: var(--vs-dim);
}

.tc-owner {
  flex: none;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--vs-warn);
  background: var(--vs-warn-wash);
}

@media (prefers-reduced-motion: reduce) {
  .tc:active:not(:disabled) {
    transform: none;
  }
}

@media (min-width: 50rem) {
  .play-tg-section > .play-tg-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    gap: var(--vs-s3);
  }

  .play-tg .tc-item {
    margin-bottom: 0;
  }
}
/* "Confirm your email address" notice. The portal look is the shared vsp-notice; the player look matches the
   play settings cards. */

.evn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.evn-text {
  flex: 1 1 16rem;
  min-width: 0;
}

.evn-title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.evn-body {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.evn--portal .evn-title {
  color: var(--vs-chalk);
}

.evn--portal .evn-body {
  color: var(--vs-dim);
}

.evn--player {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.evn--player .evn-title {
  color: #fff;
  font-size: 1rem;
}

.evn--player .evn-body {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.evn-btn--player {
  flex: none;
  padding: 0.6rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #2f6fe0;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.evn-btn--player:hover:not(:disabled) {
  background: #2560cc;
  border-color: transparent;
  color: #fff;
}

.evn-btn--player:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.evn-btn--player:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* The settings column already spaces its children with a gap. */
.dev-settings > .evn {
  margin-bottom: 0;
}
.play-settings {
  padding-block: 0.25rem 1.5rem;
}

.play-settings-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.play-settings-card {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 88px;
  padding: 1rem 1rem;
  background: var(--vs-deck);
  border: none;
  border-radius: 12px;
  color: inherit;
  font: inherit;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  gap: 0.75rem;
  box-sizing: border-box;
}
.play-settings-card:hover {
  background: var(--vs-deck-hi);
  color: inherit;
}

.play-settings-card--profile {
  padding: 1rem;
}

.play-settings-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--vs-deck-hi);
}
.play-settings-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.play-settings-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--vs-dim);
}

.play-settings-card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.play-settings-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

.play-settings-card-sub {
  font-size: 0.875rem;
  color: var(--vs-dim);
}

.play-settings-chevron {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--vs-dim);
}

.play-settings-logout {
  width: 100%;
}

/* Language picker */
.play-settings-lang-list { display: flex; gap: 8px; padding: 4px 2px 10px; }
.play-settings-lang-option { flex: 1; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--vs-rail); background: var(--vs-deck); color: inherit; font-size: 0.95rem; cursor: pointer; }
.play-settings-lang-option--active { border-color: var(--vs-act-fill); background: var(--vs-act-wash); font-weight: 600; }
/* Chevrons and arrows are supplied per language (› / ‹, ← / →), so nothing needs mirroring here. */
.play-linked {
  padding-block: 0.25rem 1.5rem;
}

.play-linked-muted {
  color: var(--vs-dim);
}

.play-linked-banner {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.play-linked-banner--ok {
  background: var(--vs-on-wash);
  color: var(--vs-on);
}

.play-linked-banner--err {
  background: var(--vs-fault-wash);
  color: var(--vs-fault);
}

.play-linked-card {
  border: 1px solid var(--vs-rail);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: var(--vs-deck);
}

.play-linked-card + .play-linked-card {
  margin-top: var(--vs-s3);
}

.play-linked-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.play-linked-provider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.play-linked-provider-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.play-linked-card-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.play-linked-confirm {
  margin-bottom: 1rem;
  border-color: var(--vs-faint);
}

.play-linked-confirm h2 {
  margin: 0;
  font-size: 1.1rem;
}

.play-linked-meta {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--vs-dim);
}

.play-linked-meta code {
  font-size: 0.8125rem;
  color: var(--vs-chalk);
}

.play-linked-actions {
  margin-top: 1rem;
}
.play-profile {
  padding-block: 0.25rem 1.5rem;
}

.play-profile-photo-error {
  color: var(--vs-fault);
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
  max-width: 20rem;
}

.play-profile-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.play-profile-photo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.play-profile-photo-btn {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}
.play-profile-photo,
.play-profile-photo-placeholder {
  width: 84px;
  height: 84px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}
.play-profile-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--vs-dim);
  background: var(--vs-deck-hi);
}
.play-profile-photo-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.play-profile-info {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.25rem 1rem;
  align-items: baseline;
  margin-bottom: 1.5rem;
}
.play-profile-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--vs-chalk);
  grid-column: 1;
  grid-row: 1;
}
.play-profile-friends,
.play-profile-friends:visited {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
  background: none;
}
.play-profile-friends:hover,
.play-profile-friends:focus-visible {
  color: inherit;
  text-decoration: underline;
}
.play-profile-friends-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vs-chalk);
  line-height: 1.2;
}
.play-profile-friends-label {
  font-size: 0.8rem;
  color: var(--vs-dim);
}

.play-profile-games-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--vs-dim);
}
.play-profile-games-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--vs-faint);
}
.play-profile-games-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.play-profile-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 72px;
  text-decoration: none;
  color: inherit;
}
.play-profile-game-card:hover .play-profile-game-name {
  color: var(--vs-chalk);
}
.play-profile-game-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--vs-rail);
  background: rgba(0, 0, 0, 0.2);
}
.play-profile-game-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--vs-deck-hi) 0%, var(--vs-deck) 100%);
  border: 1px solid var(--vs-rail);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--vs-chalk);
}
.play-profile-game-name {
  font-size: 0.75rem;
  color: var(--vs-dim);
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-profile-name-edit {
  margin-inline-start: 0.6rem;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--vs-dim);
  cursor: pointer;
}
.play-profile-name-edit:hover {
  color: var(--vs-chalk);
  background: none;
  border: none;
}
.play-profile-name-form {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  /* Stated because a global form rule makes every form a column, which turned the box's flex size below into its height. */
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.play-profile-name-input {
  flex: 1 1 10rem;
  min-width: 0;
  min-height: 44px;
  padding: 0.35rem 0.5rem;
  font-size: 1.05rem;
  color: var(--vs-chalk);
  background: var(--vs-deck);
  border: 1px solid var(--vs-rail);
  border-radius: 6px;
}
.play-profile-name-save,
.play-profile-name-cancel {
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  color: var(--vs-chalk);
  background: var(--vs-deck);
  border: 1px solid var(--vs-rail);
  border-radius: 6px;
  cursor: pointer;
}
.play-profile-name-save:hover,
.play-profile-name-cancel:hover {
  color: var(--vs-chalk);
  background: var(--vs-deck-hi);
  border: 1px solid var(--vs-rail);
}
.play-profile-name-error {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.85rem;
  color: var(--vs-fault);
}
/* The account sections above two-step verification on the Security page. */
.acct-panel {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  margin-bottom: var(--vs-s4);
}
/* Shared layout for Privacy Policy and Terms of Service */

.legal-doc {
  min-height: 100vh;
  background: var(--vs-void);
  color: #e2e8f0;
  font-family: var(--vs-font);
  line-height: 1.6;
}

.legal-doc-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--vs-void) 92%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.legal-doc-header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.legal-doc-home {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.legal-doc-home img {
  height: 28px;
  width: auto;
}

.legal-doc-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
}

.legal-doc-nav a {
  color: #94a3b8;
  text-decoration: none;
}

.legal-doc-nav a:hover {
  color: #e2e8f0;
}

.legal-doc-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.legal-doc-main h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #fff;
}

.legal-doc-updated {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0 0 2rem;
}

.legal-doc-main h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: #f1f5f9;
}

.legal-doc-main h2:first-of-type {
  margin-top: 1.5rem;
}

.legal-doc-main p {
  margin: 0 0 1rem;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.legal-doc-main ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.legal-doc-main li {
  margin-bottom: 0.35rem;
}

.legal-doc-main a {
  color: #7dd3fc;
}

.legal-doc-note {
  font-size: 0.875rem;
  color: #94a3b8;
  border-left: 3px solid rgba(125, 211, 252, 0.4);
  padding-left: 1rem;
  margin: 1.5rem 0;
}

.legal-doc-contact {
  font-size: 0.95rem;
}

.legal-doc-contact strong {
  color: #e2e8f0;
}
#root {
  width: 100%;
  min-height: 100vh;
  display: block;
}

.app-crash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--vs-s3);
  min-height: 100vh;
  padding: var(--vs-s5);
  text-align: center;
  color: var(--vs-chalk);
  background: var(--vs-void);
}

.app-crash h1 {
  margin: 0;
  font-size: 1.5rem;
}

.app-crash p {
  margin: 0;
  color: var(--vs-dim);
}

.app-route-loading {
  padding: var(--vs-s6);
  color: var(--vs-dim);
  text-align: center;
}


/* Zero specificity, same declarations. The login and register pages still get their
   360px column; a page that sets its own width or label direction now wins instead of
   silently losing to a bare element selector. */
:where(form) {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 360px;
}

:where(form input) {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #444;
  font-size: 1rem;
}

:where(form label) {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
/* The advertiser site's own layout: the top bar, the footer, tables on a phone, and the campaign builder with its pickers.
   Buttons, fields, panels, notices and tables come from the shared vsp- layer in tokens.css, so the site uses the same
   action blue as the sign-in page before it and the two-step panel inside it. Token-only (scripts/check-token-colours.mjs). */

.adv-layout {
  --adv-width: 1200px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--vs-void);
  color: var(--vs-chalk);
  font-family: var(--vs-font);
}

/* ---------------------------------------------------------------- Top bar */

.adv-bar {
  background: var(--vs-sunk);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.adv-bar-row {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  min-height: 56px;
  max-width: var(--adv-width);
  margin-inline: auto;
  padding: var(--vs-s2) var(--vs-s5);
  box-sizing: border-box;
}

.adv-logo {
  display: block;
  height: 28px;
}

.adv-portal-tag {
  font-size: 0.8125rem;
  color: var(--vs-dim);
  white-space: nowrap;
}

.adv-bar-account {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  min-width: 0;
  padding-inline-start: var(--vs-s3);
  border-inline-start: 1px solid var(--vs-rail);
}

.adv-account-name {
  font-weight: 600;
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adv-account-select {
  max-width: 16rem;
}

.adv-bar-end {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  margin-inline-start: auto;
  min-width: 0;
}

.adv-balance {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.adv-balance-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--vs-dim);
}

.adv-user-name {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  color: var(--vs-dim);
}

.adv-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
}

.adv-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s1);
  max-width: var(--adv-width);
  margin-inline: auto;
  padding: 0 var(--vs-s5);
  box-sizing: border-box;
}

.adv-nav-link {
  padding: 0.55rem 0.75rem;
  border-bottom: 2px solid transparent;
  color: var(--vs-dim);
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
}

.adv-nav-link:hover {
  color: var(--vs-chalk);
  border-bottom-color: var(--vs-rail);
}

.adv-nav-link--active,
.adv-nav-link--active:hover {
  color: var(--vs-chalk);
  border-bottom-color: var(--vs-act);
}

/* The parts of the bar that move into the menu on a phone. Shown from the media query below. */
.adv-menu-extra {
  display: none;
}

/* ---------------------------------------------------------------- Page and footer */

.adv-main {
  flex: 1;
  width: 100%;
  max-width: var(--adv-width);
  margin-inline: auto;
  padding: var(--vs-s5);
  box-sizing: border-box;
}

.adv-main > .vsp-notice {
  margin-bottom: var(--vs-s4);
}

/* A campaign's name is often one long code with no spaces. Repeated in a breadcrumb or a panel heading, it wraps here
   instead of widening the whole page on a phone. */
.adv-main .vsp-crumb,
.adv-main .vsp-panel-title {
  overflow-wrap: anywhere;
}

.adv-foot {
  margin-top: var(--vs-s6);
  background: var(--vs-sunk);
  border-top: 1px solid var(--vs-rail-soft);
}

.adv-foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s1) var(--vs-s5);
  max-width: var(--adv-width);
  margin-inline: auto;
  padding: var(--vs-s3) var(--vs-s5);
  box-sizing: border-box;
  font-size: 0.8125rem;
}

.adv-foot-row a {
  padding-block: 0.35rem;
  color: var(--vs-dim);
  font-weight: 500;
}

.adv-foot-row a:hover {
  color: var(--vs-chalk);
}

/* Before an account is open: one short panel, centred, so the page has one thing to read. */
.adv-gate {
  max-width: 560px;
  margin: var(--vs-s6) auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
}

.adv-gate h1 {
  margin: 0;
}

.adv-next {
  margin: 0;
  padding-inline-start: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  font-size: 0.9375rem;
  color: var(--vs-dim);
}

.adv-next strong {
  color: var(--vs-chalk);
}

/* ---------------------------------------------------------------- Figures */

.adv-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: var(--vs-s4);
}

.adv-stat {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.adv-stat-value {
  font-family: var(--vs-font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.adv-stat-value--text {
  font-family: var(--vs-font);
  font-size: 1.125rem;
}

.adv-stat-label {
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.adv-trend {
  margin: var(--vs-s4) 0 var(--vs-s2);
}

.adv-trend-caption {
  margin-bottom: var(--vs-s1);
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.adv-trend-svg {
  display: block;
  width: 100%;
  height: 96px;
}

.adv-trend-bar {
  fill: var(--vs-act);
}

.adv-trend-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--vs-faint);
}

/* ---------------------------------------------------------------- Small pieces */

.adv-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--vs-s1);
}

.adv-with-thumb {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  min-width: 0;
}

.adv-invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, 12rem) auto;
  gap: var(--vs-s3);
  align-items: start;
}

/* Lines the button up with the box, under the height of a label. */
.adv-invite-action {
  padding-top: 1.55rem;
}

.adv-contact {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  text-align: start;
}

.adv-more > summary {
  color: var(--vs-act);
  font-size: 0.875rem;
  font-weight: 550;
  cursor: pointer;
}

.adv-more > summary:hover {
  color: var(--vs-chalk);
}

.adv-more > summary:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

.adv-more-body {
  margin: var(--vs-s2) 0 0;
  padding-inline-start: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s1);
  font-size: 0.875rem;
  color: var(--vs-dim);
}

.adv-delivery h3 {
  margin: 0 0 var(--vs-s1);
  font-size: 1rem;
  color: var(--vs-chalk);
}

.adv-delivery ul {
  margin: 0;
  padding-inline-start: var(--vs-s4);
  font-size: 0.875rem;
}

.adv-delivery-block {
  color: var(--vs-fault);
}

.adv-delivery-warn {
  color: var(--vs-warn);
}

.adv-fieldset {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
}

.adv-fieldset > legend {
  padding: 0 0 var(--vs-s2);
}

/* ---------------------------------------------------------------- Targeting pickers */

.adv-picker {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.adv-picker > legend {
  padding: 0 0 var(--vs-s2);
}

.adv-picker-count {
  font-weight: 400;
  color: var(--vs-dim);
}

.adv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
  max-height: 13rem;
  overflow-y: auto;
  padding: 3px;
  margin: -3px;
}

.adv-chip {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: var(--vs-s2);
  min-height: 36px;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-pill);
  background: var(--vs-void);
  color: var(--vs-chalk);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.adv-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.adv-chip:hover {
  border-color: var(--vs-faint);
}

.adv-chip:has(input:checked) {
  border-color: var(--vs-act);
  background: var(--vs-act-wash);
}

.adv-chip:has(input:focus-visible) {
  box-shadow: 0 0 0 2px var(--vs-deck), 0 0 0 4px var(--vs-act);
}

.adv-chip:has(input:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}

.adv-chip-tick {
  display: none;
  color: var(--vs-act);
}

.adv-chip:has(input:checked) .adv-chip-tick {
  display: inline-flex;
}

/* ---------------------------------------------------------------- Campaign builder */

.adv-steps {
  display: flex;
  gap: var(--vs-s1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.adv-steps > li {
  flex: 1 1 0;
  min-width: 0;
}

.adv-step {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  width: 100%;
  min-height: 44px;
  padding: 0.35rem 0.5rem;
  border: none;
  border-bottom: 2px solid var(--vs-rail);
  border-radius: 0;
  background: transparent;
  color: var(--vs-dim);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 550;
  text-align: start;
  cursor: pointer;
}

.adv-step:hover:not(:disabled) {
  border-bottom-color: var(--vs-faint);
  color: var(--vs-chalk);
}

.adv-step:disabled {
  cursor: default;
}

.adv-step--done {
  border-bottom-color: var(--vs-act);
}

.adv-step[aria-current='step'],
.adv-step[aria-current='step']:hover:not(:disabled) {
  border-bottom-color: var(--vs-act);
  color: var(--vs-chalk);
}

.adv-step-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--vs-deck-hi);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.adv-step[aria-current='step'] .adv-step-mark,
.adv-step--done .adv-step-mark {
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
}

.adv-step-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adv-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--vs-s5);
  align-items: start;
}

.adv-builder--whole {
  grid-template-columns: minmax(0, 1fr);
}

.adv-builder-main {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  min-width: 0;
}

.adv-summary {
  position: sticky;
  top: var(--vs-s4);
}

.adv-summary-title {
  margin: 0 0 var(--vs-s3);
  overflow-wrap: anywhere;
}

/* One column whatever the width: this card is narrow. */
.adv-summary .vsp-kv {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.1rem;
}

.adv-summary .vsp-kv dd {
  margin-bottom: var(--vs-s2);
}

.adv-creatives {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.adv-creative {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  padding: var(--vs-s2);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
  min-width: 0;
}

.adv-creative--on {
  border-color: var(--vs-act);
}

/* Whole and uncropped, because cutting into the ad is the one thing this list must not do. */
.adv-creative-thumb {
  flex: none;
  display: block;
  width: 120px;
  height: 45px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--vs-deck-hi);
}

.adv-creative-text {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.adv-creative-size {
  font-weight: 600;
  color: var(--vs-chalk);
}

.adv-creative-link {
  color: var(--vs-dim);
}

.adv-creative-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--vs-s1);
  flex: none;
}

/* The mock of the player site. Phone width, at real size, so the banner reads as it will on a phone. */
.adv-preview {
  margin: 0;
  max-width: 320px;
}

.adv-preview-screen {
  display: flex;
  flex-direction: column;
  height: 190px;
  overflow: hidden;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-md);
  background: var(--vs-void);
}

.adv-preview-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  padding: var(--vs-s3);
}

.adv-preview-page span {
  display: block;
  height: 14px;
  border-radius: 4px;
  background: var(--vs-deck);
}

.adv-preview-page span:first-child {
  height: 56px;
  border-radius: var(--vs-r-sm);
}

.adv-preview-page span:last-child {
  width: 62%;
}

.adv-preview figcaption {
  margin-top: var(--vs-s2);
}

/* ---------------------------------------------------------------- The signed-out front page */

.adv-welcome {
  max-width: 640px;
  margin: var(--vs-s6) 0 var(--vs-s7);
}

.adv-welcome h1 {
  margin: 0 0 var(--vs-s2);
  font-size: 2rem;
}

.adv-welcome-lead {
  margin: 0 0 var(--vs-s4);
  font-size: 1.05rem;
  color: var(--vs-dim);
}

.adv-welcome-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--vs-s4);
  margin: 0;
}

.adv-welcome-list dt {
  margin-bottom: 0.2rem;
  font-weight: 600;
}

.adv-welcome-list dd {
  margin: 0;
  color: var(--vs-dim);
}

/* ---------------------------------------------------------------- Narrower screens */

/* The whole bar does not fit from here down, so it folds behind a menu button. */
@media (max-width: 900px) {
  .adv-bar-row,
  .adv-nav {
    padding-inline: var(--vs-s4);
  }

  .adv-wide {
    display: none;
  }

  .adv-menu-btn {
    display: inline-flex;
  }

  .adv-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    padding-block: var(--vs-s2);
    border-top: 1px solid var(--vs-rail-soft);
  }

  .adv-nav--open {
    display: flex;
  }

  .adv-nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--vs-s2);
    border-bottom: none;
    border-inline-start: 2px solid transparent;
  }

  .adv-nav-link:hover {
    border-inline-start-color: var(--vs-rail);
  }

  .adv-nav-link--active,
  .adv-nav-link--active:hover {
    border-inline-start-color: var(--vs-act);
  }

  .adv-menu-extra {
    display: flex;
    flex-direction: column;
    gap: var(--vs-s2);
    padding: var(--vs-s2) calc(var(--vs-s2) + 2px);
  }

  .adv-menu-extra + .adv-nav-link {
    margin-top: var(--vs-s1);
  }

  .adv-menu-account {
    display: flex;
    align-items: center;
    gap: var(--vs-s2);
    flex-wrap: wrap;
  }

  .adv-menu-account .vsp-select {
    min-height: 44px;
    box-sizing: border-box;
  }

  .adv-menu-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--vs-s3);
    border-top: 1px solid var(--vs-rail-soft);
    padding-top: var(--vs-s2);
  }

  .adv-builder {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Review repeats all of it in full, so a phone does not need it twice on a long page. */
  .adv-summary {
    display: none;
  }
}

@media (max-width: 640px) {
  .adv-main {
    padding: var(--vs-s4);
  }

  .adv-foot-row {
    padding-inline: var(--vs-s4);
  }

  .adv-foot-row a {
    padding-block: 0.7rem;
  }

  .adv-main .vsp-panel {
    padding: var(--vs-s4);
  }

  /* The sentence on its own line, so the three buttons stay on one and the bar covers less of the form. */
  .adv-main .vsp-actionbar-msg {
    flex-basis: 100%;
  }

  /* A thumb, not a pointer. Covers the shared panels and the Help page on this site as well. */
  .adv-main .vsp-btn,
  .adv-main .vsp-seg-btn,
  .adv-main .support-btn,
  .adv-main .support-input {
    min-height: 44px;
    box-sizing: border-box;
  }

  .adv-invite {
    grid-template-columns: minmax(0, 1fr);
  }

  .adv-invite-action {
    padding-top: 0;
  }

  .adv-invite-action .vsp-btn {
    width: 100%;
  }

  /* Each row becomes a card, so Status and the row's actions are on the screen rather than off its right-hand edge. */
  .vsp-table.adv-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .vsp-table.adv-table,
  .vsp-table.adv-table tbody,
  .vsp-table.adv-table tr {
    display: block;
    width: 100%;
  }

  .vsp-table.adv-table tr {
    padding-block: var(--vs-s3);
    border-bottom: 1px solid var(--vs-rail-soft);
  }

  .vsp-table.adv-table tbody tr:last-child {
    border-bottom: none;
  }

  .vsp-table.adv-table tbody tr:hover {
    background: transparent;
  }

  .vsp-table.adv-table td,
  .vsp-table.adv-table td.vsp-num {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--vs-s3);
    padding: 0.2rem 0;
    border: none;
    text-align: end;
    overflow-wrap: anywhere;
  }

  .vsp-table.adv-table td::before {
    content: attr(data-label);
    flex: none;
    max-width: 45%;
    color: var(--vs-dim);
    font-size: 0.8125rem;
    text-align: start;
  }

  /* The cell that names the row reads as the card's title, and an empty one takes no room. */
  .vsp-table.adv-table td.adv-cell-title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: start;
  }

  .vsp-table.adv-table td.adv-cell-title::before {
    content: none;
  }

  .vsp-table.adv-table td.adv-cell-actions {
    display: block;
    width: 100%;
    padding-top: var(--vs-s2);
  }

  .vsp-table.adv-table td.adv-cell-actions::before {
    content: none;
  }

  .vsp-table.adv-table td:empty {
    display: none;
  }

  .adv-row-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  /* The current step keeps its name; the other four are numbers, so all five fit on one line. */
  .adv-steps > li {
    flex: 0 0 auto;
  }

  .adv-steps > li:has([aria-current='step']) {
    flex: 1 1 0;
  }

  .adv-steps .adv-step:not([aria-current='step']) .adv-step-name {
    display: none;
  }

  .adv-creative {
    flex-wrap: wrap;
  }

  .adv-creative-thumb {
    width: 100%;
    height: 60px;
  }

  .adv-creative-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .adv-welcome h1 {
    font-size: 1.625rem;
  }
}

/* The narrowest phones: the logo and the credit matter more than the site's name. */
@media (max-width: 359px) {
  .adv-portal-tag {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .adv-chip {
    transition: none;
  }
}
/* What the staff console's pages share beyond the primitives in styles/tokens.css: a link inside a table, a short id with
   a copy button, a contained logo tile, a closed Technical details section, and the phone layout of a table.

   Tokens only (scripts/check-token-colours.mjs reads every stylesheet in this folder). Hover rules restate colour because
   index.css still carries defaults that outrank a bare class. */

.vsp-link {
  color: var(--vs-act);
  font-weight: 550;
  text-decoration: none;
}

.vsp-link:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

.vsp-link:focus-visible {
  outline: none;
  border-radius: 4px;
  box-shadow: 0 0 0 2px var(--vs-void), 0 0 0 4px var(--vs-act);
}

/* ---------------------------------------------------------------- Short id */

/* An id nobody reads but somebody quotes: eight characters, the whole of it on hover and behind the copy button. */
.vsp-id {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s1);
  white-space: nowrap;
}

.vsp-id-code {
  font-family: var(--vs-mono);
  font-size: 0.75rem;
  color: var(--vs-dim);
}

/* Box properties are restated because the index.css button defaults would otherwise draw a grey pill. */
.vsp-id-copy {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--vs-r-sm);
  background: transparent;
  color: var(--vs-faint);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.vsp-id-copy:hover {
  background: var(--vs-deck-hi);
  border-color: transparent;
  color: var(--vs-chalk);
}

.vsp-id-copy:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-void), 0 0 0 4px var(--vs-act);
}

/* ---------------------------------------------------------------- Name cell and logo */

.vsp-name-cell {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  min-width: 0;
}

/* A studio's mark, whole on a neutral tile: cut off at the edges it reads as a different logo. */
.vsp-thumb--contain {
  padding: 3px;
  box-sizing: border-box;
  border: 1px solid var(--vs-rail);
  background: var(--vs-void);
}

.vsp-thumb--contain img {
  object-fit: contain;
}

/* ---------------------------------------------------------------- Layout helpers */

/* A form inside a panel. Restated because App.css gives a bare form a 360px column for the sign-in pages. */
.vsp-form {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  max-width: none;
}

/* A heading inside a form or panel that groups the fields under it. */
.vsp-form-section {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

.vsp-nowrap {
  white-space: nowrap;
}

.vsp-inline-row {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
  min-width: 0;
}

/* A short list of facts, each on its own line. */
.vsp-plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--vs-s2);
}

/* Panels side by side at full width, one above the other when there is no room. */
.vsp-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
  gap: var(--vs-s4);
  align-items: start;
}

/* The row a table opens under itself, such as a studio's members. */
.vsp-table td.vsp-row-detail {
  background: var(--vs-void);
  padding: var(--vs-s4);
}

.vsp-table tbody tr:has(> td.vsp-row-detail):hover {
  background: transparent;
}

/* ---------------------------------------------------------------- Technical details */

/* What staff need now and then, closed by default: ids, raw settings, how a thing is configured. */
.vsp-details {
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
}

.vsp-details > summary {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  padding: var(--vs-s3) var(--vs-s4);
  border-radius: var(--vs-r-md);
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--vs-chalk);
  cursor: pointer;
  list-style: none;
}

.vsp-details > summary::-webkit-details-marker {
  display: none;
}

.vsp-details > summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-void), 0 0 0 4px var(--vs-act);
}

.vsp-details-chevron {
  flex: none;
  color: var(--vs-dim);
  transition: transform 0.15s;
}

.vsp-details[open] > summary .vsp-details-chevron {
  transform: rotate(90deg);
}

[dir='rtl'] .vsp-details-chevron {
  transform: rotate(180deg);
}

.vsp-details-body {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  padding: 0 var(--vs-s4) var(--vs-s4);
  min-width: 0;
}

.vsp-pre {
  margin: 0;
  padding: var(--vs-s3);
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
  color: var(--vs-chalk);
  font-family: var(--vs-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .vsp-details-chevron {
    transition: none;
  }
}

/* ---------------------------------------------------------------- Phones */

/* A page never slides sideways: only a table's own scroller may. */
.vsp-page {
  max-width: 100%;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  /* A thumb needs 40px, and on a queue page the button is the point of the row. */
  .vsp-page .vsp-btn,
  .vsp-page .vsp-select,
  .vsp-page .vsp-search-input {
    min-height: 40px;
  }

  .vsp-page .vsp-icon-btn {
    width: 40px;
    height: 40px;
  }

  .vsp-page .vsp-id-copy {
    width: 2.5rem;
    height: 2.5rem;
  }

  .vsp-page .vsp-panel {
    padding: var(--vs-s4);
  }

  /* Each row becomes a card: label on one side, value on the other, and the actions a full-width row at the bottom, so
     the one button the row exists for is on screen without scrolling sideways. AdminPage copies each column's heading
     onto its cells as data-label. */
  .vsp-table--stack,
  .vsp-table--stack tbody,
  .vsp-table--stack tr,
  .vsp-table--stack td {
    display: block;
    box-sizing: border-box;
    width: 100%;
  }

  .vsp-table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }

  .vsp-table--stack tbody tr {
    padding: var(--vs-s3);
    margin-bottom: var(--vs-s3);
    border: 1px solid var(--vs-rail-soft);
    border-radius: var(--vs-r-md);
    background: var(--vs-void);
  }

  .vsp-table--stack tbody tr:last-child {
    margin-bottom: 0;
  }

  .vsp-table--stack tbody tr:hover {
    background: var(--vs-void);
  }

  /* The name floats and the value flows past it, rather than the cell being a flex row: a cell can hold a link, a badge
     and a second line, and as flex items those would sit side by side and squeeze each other. */
  .vsp-table.vsp-table--stack td {
    padding: var(--vs-s1) 0;
    border-bottom: none;
    text-align: end;
    overflow-wrap: anywhere;
  }

  .vsp-table.vsp-table--stack td::after {
    content: '';
    display: block;
    clear: both;
  }

  .vsp-table.vsp-table--stack td[data-label]::before {
    content: attr(data-label);
    float: inline-start;
    max-width: 45%;
    margin-inline-end: var(--vs-s3);
    color: var(--vs-dim);
    font-size: 0.8125rem;
    text-align: start;
  }

  /* The first column says what the card is, so it heads the card and needs no name. An opened detail row has no name
     either and runs the full width. */
  .vsp-table.vsp-table--stack td:first-child,
  .vsp-table.vsp-table--stack td:not([data-label]) {
    text-align: start;
  }

  .vsp-table.vsp-table--stack td:first-child::before {
    content: none;
  }

  .vsp-table--stack td:not(:first-child) .vsp-inline-row,
  .vsp-table--stack td:not(:first-child) .vsp-name-cell {
    justify-content: flex-end;
  }

  .vsp-table--stack .vsp-nowrap {
    white-space: normal;
  }

  .vsp-table.vsp-table--stack td.vsp-actions-cell {
    display: block;
    width: 100%;
    margin-top: var(--vs-s2);
    padding-top: var(--vs-s3);
    border-top: 1px solid var(--vs-rail-soft);
    text-align: start;
    white-space: normal;
  }

  .vsp-table--stack .vsp-actions-cell:empty {
    display: none;
  }

  .vsp-table--stack .vsp-actions-cell .vsp-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--vs-s2);
  }

  .vsp-table--stack .vsp-actions-cell .vsp-btn {
    flex: 1 1 auto;
  }

  .vsp-table--stack .vsp-table-sub {
    margin-top: 0;
  }
}
/* Three steps on one line, down to a 320 pixel phone. Blue is the step in hand, because that is where attention belongs. */
.review-tracker {
  display: flex;
  gap: var(--vs-s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-tracker-step {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: var(--vs-s2);
  min-width: 0;
  padding-block-end: var(--vs-s2);
  border-block-end: 2px solid var(--vs-rail);
  color: var(--vs-dim);
  font-size: 0.8125rem;
}

.review-tracker-step--done {
  border-block-end-color: var(--vs-on);
}

.review-tracker-step--now {
  border-block-end-color: var(--vs-act);
  color: var(--vs-chalk);
  font-weight: 600;
}

.review-tracker-mark {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--vs-deck-hi);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

.review-tracker-step--done .review-tracker-mark {
  color: var(--vs-on);
}

.review-tracker-step--now .review-tracker-mark {
  color: var(--vs-act);
}
.dev-waiting {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  margin-top: var(--vs-s3);
  font-size: 0.9375rem;
  color: var(--vs-dim);
}

.dev-waiting p {
  margin: 0;
  line-height: 1.5;
}

.dev-waiting h2 {
  margin: var(--vs-s2) 0 0;
  font-size: 0.9375rem;
  color: var(--vs-chalk);
}

.dev-waiting ul {
  margin: 0;
  padding-inline-start: var(--vs-s5);
}

.dev-waiting li {
  margin-bottom: var(--vs-s1);
}

.dev-waiting a,
.dev-waiting a:hover {
  color: var(--vs-act);
}

/* The screen a signed-in account with no access gets. */
.dev-pending-approval {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vs-void);
  padding: 1rem;
}

.dev-pending-approval-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: var(--vs-deck);
  border-radius: var(--vs-r-lg);
  border: 1px solid var(--vs-rail);
  text-align: center;
}

.dev-pending-approval-logo {
  height: 48px;
  width: auto;
  margin-bottom: 1rem;
  object-fit: contain;
}

.dev-pending-approval-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--vs-chalk);
  margin: 0 0 0.75rem 0;
}

.dev-pending-approval-message {
  font-size: 0.95rem;
  color: var(--vs-dim);
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.dev-pending-approval-user {
  font-size: 0.85rem;
  color: var(--vs-dim);
  margin: 0 0 1.25rem 0;
}

.dev-pending-approval-logout {
  padding: 0.6rem 1.25rem;
  border-radius: var(--vs-r-sm);
  border: 1px solid var(--vs-rail);
  background: transparent;
  color: var(--vs-chalk);
  font-size: 0.9rem;
  cursor: pointer;
}

.dev-pending-approval-logout:hover {
  background: var(--vs-deck-hi);
  border-color: var(--vs-rail);
  color: var(--vs-chalk);
}
/* The portal shell: a nav rail that recedes, and content that advances.
 *
 * The rail sits on the darkest surface in the product so it reads as chrome and the
 * work stays the brightest thing on screen. It collapses to an off-canvas drawer
 * below 1000px, where a single top bar takes over.
 */

.portal-shell {
  --portal-pad: 1.5rem;

  display: flex;
  min-height: 100vh;
  background: var(--vs-void);
  color: var(--vs-chalk);
  font-family: var(--vs-font);
}

.portal-skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 60;
  padding: var(--vs-s2) var(--vs-s4);
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  border-radius: 0 0 var(--vs-r-sm) 0;
  font-size: 0.875rem;
}

.portal-skip:focus {
  inset-inline-start: 0;
}

/* ---------------------------------------------------------------- Rail */

.portal-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  flex: none;
  width: var(--vs-rail-w);
  height: 100vh;
  padding: var(--vs-s4) var(--vs-s3);
  box-sizing: border-box;
  background: var(--vs-sunk);
  border-inline-end: 1px solid var(--vs-rail-soft);
  overflow: hidden;
}

.portal-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--vs-s2) var(--vs-s4);
}

.portal-rail-logo-link,
.portal-topbar-logo-link {
  display: inline-flex;
  align-items: center;
  border-radius: var(--vs-r-sm);
}

.portal-rail-logo {
  height: 30px;
  width: auto;
  display: block;
}

.portal-rail-close {
  display: none;
}

/* Quiet by design: a version you can check. Problems are said out loud in the banner across the console. */
.portal-rail-health,
.portal-topbar-health {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem var(--vs-s2);
  color: var(--vs-faint);
  font-size: 0.6875rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.portal-health-link {
  border-radius: var(--vs-r-sm);
  text-decoration: none;
}

.portal-health-link:hover {
  color: var(--vs-chalk);
  text-decoration: underline;
}

.portal-health-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-sunk), 0 0 0 4px var(--vs-act);
}

/* Room to tap the dot, at the far end of the phone's top bar. */
.portal-topbar-health {
  margin-inline-start: auto;
  min-width: 40px;
  min-height: 40px;
  justify-content: center;
}

.portal-health-banner {
  margin-bottom: var(--vs-s5);
}

.portal-rail-health-lamp {
  color: var(--vs-on);
}

/* Both modifiers are single classes in another file, so they need the extra class here to
   outrank the green above. Without it the lamp reads healthy whatever the API says. */
.portal-rail-health-lamp.vsp-lamp--warn {
  color: var(--vs-warn);
}

.portal-rail-health-lamp.vsp-lamp--fault {
  color: var(--vs-fault);
}

/* ---------------------------------------------------------------- Studio */

.portal-studio {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  padding: var(--vs-s2);
  min-width: 0;
}

.portal-studio-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  font-size: 0.75rem;
  font-weight: 650;
  overflow: hidden;
}

.portal-studio-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-studio-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.portal-studio-name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-studio-summary {
  font-size: 0.75rem;
  color: var(--vs-faint);
  font-variant-numeric: tabular-nums;
}

.portal-studio-switch {
  display: block;
  padding: 0 var(--vs-s2) var(--vs-s2);
}

.portal-studio-select {
  width: 100%;
  background-color: transparent;
}

/* ---------------------------------------------------------------- Nav */

.portal-nav {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  padding: var(--vs-s2) 0;
  flex: 1;
  /* The list scrolls between the logo and the account, so the account never sits over a row. */
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--vs-rail) transparent;
  overscroll-behavior: contain;
}

.portal-nav::-webkit-scrollbar {
  width: 6px;
}

.portal-nav::-webkit-scrollbar-thumb {
  border-radius: var(--vs-r-pill);
  background: var(--vs-rail);
}

.portal-nav::-webkit-scrollbar-track {
  background: transparent;
}

.portal-nav-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* Sentence case and quiet. A group label is a wayfinding aid, not a heading. */
.portal-nav-group-label {
  margin: 0 0 2px;
  padding-inline-start: var(--vs-s2);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--vs-faint);
}

.portal-nav-link {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  flex: none;
  padding: 0.25rem var(--vs-s2);
  border-radius: var(--vs-r-sm);
  color: var(--vs-dim);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.portal-nav-link:hover {
  background: var(--vs-deck);
  color: var(--vs-chalk);
}

.portal-nav-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-sunk), 0 0 0 4px var(--vs-act);
}

.portal-nav-link--active {
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
}

.portal-nav-link--active svg {
  color: var(--vs-act);
}

.portal-nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-nav-badge {
  flex: none;
  min-width: 1.15rem;
  padding: 0 0.3rem;
  border-radius: var(--vs-r-pill);
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  font-size: 0.6875rem;
  font-weight: 650;
  line-height: 1.15rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- Account */

.portal-rail-foot {
  display: flex;
  align-items: center;
  gap: var(--vs-s1);
  flex: none;
  padding: var(--vs-s3) var(--vs-s1) 0;
  background: var(--vs-sunk);
  border-top: 1px solid var(--vs-rail-soft);
  min-width: 0;
}

.portal-account-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--vs-deck-hi);
  font-size: 0.6875rem;
  font-weight: 650;
}

.portal-account-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.portal-account-name {
  font-size: 0.8125rem;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-account-role {
  font-size: 0.75rem;
  color: var(--vs-faint);
}

.portal-logout,
.portal-foot-link {
  flex: none;
  border-color: transparent;
  background: transparent;
}

.portal-foot-link {
  text-decoration: none;
}

.portal-foot-link--active {
  color: var(--vs-act);
}

/* ---------------------------------------------------------------- Body */

.portal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.portal-topbar {
  display: none;
  align-items: center;
  gap: var(--vs-s3);
  padding: var(--vs-s3) var(--portal-pad);
  background: var(--vs-sunk);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.portal-main {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--vs-s6) var(--portal-pad);
  box-sizing: border-box;
  min-width: 0;
}

/* The buttons older pages style themselves, disabled: the same flat grey as vsp-btn, not a faded copy of the live one.
   One rule here, so a page cannot drift back, and it outranks each page's own :disabled. */
.portal-main :is(
  .dev-create-event-btn,
  .dev-game-detail-create-btn,
  .dev-game-detail-lb-load,
  .analytics-hub-btn,
  .company-setup-submit,
  .ad-reporting-sdk-btn,
  .support-btn,
  .gs-btn,
  .dev-create-game-btn
):disabled {
  background: var(--vs-void);
  border-color: var(--vs-rail-soft);
  color: var(--vs-faint);
  opacity: 1;
  cursor: not-allowed;
}

/* One left edge for every page. Pages narrower than the frame used to centre themselves, so content began anywhere from
   256 to 517 pixels across depending on the page. Two classes, to outrank the `margin: 0 auto` on each page's own root. */
.portal-main.portal-main > :not(dialog) {
  margin-inline: 0;
}

.portal-scrim {
  display: none;
}

/* ---------------------------------------------------------------- Narrow */

@media (max-width: 1000px) {
  .portal-shell {
    display: block;
  }

  /* visibility, not just transform. A rail that is only translated off-screen still takes
     keyboard focus, so tabbing from the top bar walks through a menu nobody can see. */
  .portal-rail {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 50;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
    border-inline-end: 1px solid var(--vs-rail);
    /* The base rule's 100vh is the whole page on a phone, browser chrome included, so the
       drawer's own footer sits under it. dvh is the part you can actually see. */
    height: 100dvh;
    overscroll-behavior: contain;
  }

  [dir='rtl'] .portal-rail {
    transform: translateX(100%);
  }

  .portal-rail--open {
    transform: none;
    visibility: visible;
    transition: transform 0.2s ease, visibility 0s;
  }

  .portal-rail-close {
    display: inline-flex;
  }

  /* A finger, not a pointer: the desktop rows are tightened so the whole list fits a laptop. */
  .portal-nav-link {
    min-height: 44px;
  }

  /* The close button takes this slot in the drawer. */
  .portal-rail-health {
    display: none;
  }

  .portal-topbar {
    display: flex;
  }

  .portal-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.55);
  }

  .portal-main {
    padding-block: var(--vs-s5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-rail {
    transition: none;
  }
}

/* Controls the shared layer does not style, on a phone: 44px tall, and a box big enough to hit. The hidden inputs inside
   vsp-choice and vsp-switch are left alone. A link in running text stays inline; these are links that act as controls. */
@media (max-width: 760px) {
  .portal-main label:not(.vsp-choice, .vsp-switch, .vsp-checkbox):has(> input[type='checkbox'], > input[type='radio']) {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--vs-s2);
    min-height: 44px;
  }

  .portal-main label:not(.vsp-choice, .vsp-switch) > :is(input[type='checkbox'], input[type='radio']) {
    flex: none;
    width: 1.375rem;
    height: 1.375rem;
    margin: 0;
  }

  .portal-main td a:not(.vsp-btn),
  .portal-main td button:not(.vsp-btn, .vsp-icon-btn),
  .portal-main summary,
  .gev-filter,
  .gev-card-name a,
  .ev-fact-link,
  .sdk-box__link,
  .docs-inline-link,
  .company-setup-back,
  .dev-game-detail-sdk-toggle,
  .dev-game-detail-sdk-copy,
  .dev-game-detail-link,
  .dev-game-detail-event-link,
  .dev-game-detail-create-btn,
  .dev-game-detail-lb-select,
  .dev-create-event-btn,
  .doc-layout__link,
  .company-setup-tab,
  .portal-topbar-logo-link,
  .dev-dashboard-gamecard-name,
  .dev-dashboard-fixture-name,
  .dev-dashboard-quiet-link,
  .dev-dashboard-todo-action,
  .analytics-hub-select,
  .analytics-hub-btn,
  .support-btn,
  .gs-btn,
  .ad-reporting-back,
  .ad-reporting-sdk-select,
  .ad-reporting-sdk-btn,
  .dev-create-game-back,
  .dev-create-game-add-link,
  .dev-create-game-link-remove,
  .dev-create-game-btn,
  .cev-crumb {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
  }
}
.game-overview-series-sub {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--vs-dim, rgba(255, 255, 255, 0.55));
  line-height: 1.35;
}

.game-overview-series-y-hint {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--vs-faint, rgba(255, 255, 255, 0.45));
}

.game-overview-series-chart-wrap {
  width: 100%;
  max-width: 640px;
}

.game-overview-series-svg {
  width: 100%;
  height: auto;
  min-height: 240px;
  display: block;
}

.game-overview-series-x-svg-text {
  font-family: var(--vs-font);
}

.game-overview-series-muted,
.game-overview-series-error {
  margin: 0;
  font-size: 0.9rem;
  color: var(--vs-dim, rgba(255, 255, 255, 0.55));
}

.game-overview-series-error {
  color: var(--vs-fault, #f87171);
}
.studio-review {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  border-inline-start: 3px solid var(--vs-act);
}

.studio-review--rejected {
  border-inline-start-color: var(--vs-warn);
}

.studio-review-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--vs-dim);
}

.studio-review-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2) var(--vs-s4);
  margin: 0;
  font-size: 0.875rem;
}

.studio-review-links a {
  color: var(--vs-act);
}

.studio-review-links a:hover {
  color: var(--vs-act);
  text-decoration: underline;
}
/* Developer dashboard.
 *
 * Rules this file holds to:
 *   1. Colour means state. Green says a game is live, amber that it is quiet or was turned down, grey that it is waiting.
 *      Blue means "you can click this". Nothing is coloured for decoration.
 *   2. One padding value for panels and one gap between sections, both from tokens.css.
 *      No section sets its own rhythm.
 *   3. Numbers are tabular and right-aligned so columns stay still while counts change.
 *   4. Sentence case everywhere. No tracked-out caps, no arrows glued to link text.
 *
 * Surface, text and state tokens come from src/styles/tokens.css so this screen and the
 * game screens cannot drift apart.
 */

.dev-dashboard {
  --vs-gap: 2rem;
  --dash-pad: var(--vs-s5);

  display: flex;
  flex-direction: column;
  gap: var(--vs-gap);
  color: var(--vs-chalk);
  font-family: var(--vs-font);
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.dev-dashboard :is(h1, h2, h3) {
  color: var(--vs-chalk);
  letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------- Page head */

.dev-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s4);
  flex-wrap: wrap;
}

.dev-dashboard-head h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------- Notices */

.dev-dashboard-notice {
  margin: 0;
  padding: 0.7rem 0.95rem;
  border-radius: var(--vs-r-md);
  border-inline-start: 3px solid var(--vs-act);
  background: var(--vs-act-wash);
  font-size: 0.9rem;
}

.dev-dashboard-notice--good {
  border-inline-start-color: var(--vs-on);
  background: var(--vs-on-wash);
}

.dev-dashboard-notice a {
  color: var(--vs-act);
}

.dev-dashboard-loading,
.dev-dashboard-empty,
.dev-dashboard-todo-clear {
  margin: 0;
  color: var(--vs-dim);
  font-size: 0.9rem;
}

.dev-dashboard-error {
  margin: 0;
  color: var(--vs-fault);
  font-size: 0.9rem;
}

.dev-dashboard-quiet-link {
  color: var(--vs-act);
  text-decoration: none;
  font-size: 0.875rem;
}

.dev-dashboard-quiet-link:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

/* ---------------------------------------------------------------- Section heads */

.dev-dashboard-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--vs-s4);
  margin-bottom: var(--vs-s4);
  flex-wrap: wrap;
}

.dev-dashboard-section-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}

.dev-dashboard-count {
  margin: 0;
  font-size: 0.85rem;
  color: var(--vs-dim);
}

.dev-dashboard-head-tools {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  flex-wrap: wrap;
}

.dev-dashboard-count strong {
  color: var(--vs-chalk);
  font-weight: 650;
}

/* ---------------------------------------------------------------- Panels */

.dev-dashboard-panel {
  padding: var(--dash-pad);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  min-width: 0;
}

/* ---------------------------------------------------------------- Empty states */

/* Compact by design. An empty panel should be short, not a large blank rectangle. */
.dev-dashboard-blank {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--vs-s2);
  padding: var(--vs-s5) var(--vs-s4);
  border: 1px dashed var(--vs-rail);
  border-radius: var(--vs-r-md);
  text-align: center;
  color: var(--vs-dim);
}

.dev-dashboard-blank svg {
  color: var(--vs-faint);
}

.dev-dashboard-blank p {
  margin: 0;
  font-size: 0.875rem;
  max-width: 44ch;
}

.dev-dashboard-blank-title {
  color: var(--vs-chalk);
  font-size: 0.9375rem;
  font-weight: 600;
}

.dev-dashboard-blank .vsp-btn {
  margin-top: var(--vs-s2);
}

.dev-dashboard-blank--chart {
  border-style: solid;
  border-color: var(--vs-rail-soft);
  background: var(--vs-void);
}

/* ---------------------------------------------------------------- Games grid */

.dev-dashboard-gamegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: var(--vs-s3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.dev-dashboard-gamecard {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  padding: var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  min-width: 0;
  transition: border-color 0.15s ease;
}

.dev-dashboard-gamecard:hover {
  border-color: var(--vs-rail);
}

.dev-dashboard-gamecard-top {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  min-width: 0;
}

.dev-dashboard-gamecard-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  font-size: 0.8125rem;
  font-weight: 650;
  overflow: hidden;
}

.dev-dashboard-gamecard-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dev-dashboard-gamecard-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dev-dashboard-gamecard-name {
  color: var(--vs-chalk);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dev-dashboard-gamecard-name:hover {
  color: var(--vs-chalk);
  text-decoration: underline;
}

.dev-dashboard-gamecard-state {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--vs-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dev-dashboard-lamp {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--vs-faint);
}

.dev-dashboard-gamecard--live .dev-dashboard-lamp {
  background: var(--vs-on);
  box-shadow: 0 0 0 3px rgba(53, 214, 127, 0.16);
}

.dev-dashboard-gamecard--quiet .dev-dashboard-lamp {
  background: var(--vs-warn);
}

/* Waiting on VS+ is neutral, because red means broken. Not approved is amber: the studio has something to do. */
.dev-dashboard-gamecard--blocked .dev-dashboard-lamp {
  background: var(--vs-faint);
}

.dev-dashboard-gamecard--rejected .dev-dashboard-lamp {
  background: var(--vs-warn);
}

.dev-dashboard-gamecard--rejected .dev-dashboard-gamecard-state {
  color: var(--vs-warn);
}

/* The only motion on the page, and it marks the one thing that is genuinely live. */
@media (prefers-reduced-motion: no-preference) {
  .dev-dashboard-gamecard--live .dev-dashboard-lamp {
    animation: dev-dashboard-pulse 2.6s ease-in-out infinite;
  }
}

@keyframes dev-dashboard-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(53, 214, 127, 0.16); }
  50% { box-shadow: 0 0 0 6px rgba(53, 214, 127, 0.05); }
}

.dev-dashboard-gamecard-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--vs-s2);
  margin: 0;
  padding: var(--vs-s3) 0 0;
  border-top: 1px solid var(--vs-rail-soft);
}

.dev-dashboard-gamecard-stats dt {
  font-size: 0.75rem;
  color: var(--vs-dim);
}

.dev-dashboard-gamecard-stats dd {
  margin: 0.1rem 0 0;
  font-size: 1.0625rem;
  font-weight: 600;
}

.dev-dashboard-gamecard-live {
  color: var(--vs-on);
}

.dev-dashboard-gamecard-action {
  align-self: flex-start;
  margin-top: auto;
}

/* ---------------------------------------------------------------- Two-column body */

.dev-dashboard-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: var(--vs-s4);
  /* start, not stretch: the shorter column must not be padded out to match the taller one. */
  align-items: start;
}

/* On a phone the two panels join the page's own column, so Needs you can come before the games instead of below all of them. */
@media (max-width: 1000px) {
  .dev-dashboard-split {
    display: contents;
  }

  .dev-dashboard-head,
  .dev-dashboard-notice,
  .studio-review {
    order: -2;
  }

  .dev-dashboard-needs {
    order: -1;
  }
}

/* ---------------------------------------------------------------- Fixture list */

.dev-dashboard-fixtures {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dev-dashboard-fixture {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: var(--vs-s3);
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--vs-rail-soft);
}

.dev-dashboard-fixture:first-child {
  padding-top: 0;
}

.dev-dashboard-fixture:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.dev-dashboard-fixture-when {
  font-size: 0.82rem;
  color: var(--vs-dim);
  white-space: nowrap;
}

.dev-dashboard-fixture--live .dev-dashboard-fixture-when {
  color: var(--vs-on);
}

.dev-dashboard-fixture-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.dev-dashboard-fixture-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 5px;
  background: var(--vs-deck-hi);
  color: var(--vs-dim);
  font-size: 0.625rem;
  font-weight: 650;
  overflow: hidden;
}

.dev-dashboard-fixture-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dev-dashboard-fixture-text {
  min-width: 0;
}

.dev-dashboard-fixture-name {
  display: block;
  color: var(--vs-chalk);
  text-decoration: none;
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dev-dashboard-fixture-name:hover {
  color: var(--vs-chalk);
  text-decoration: underline;
}

.dev-dashboard-fixture-game {
  display: block;
  font-size: 0.8rem;
  color: var(--vs-dim);
}

.dev-dashboard-fixture-count {
  font-size: 0.875rem;
  color: var(--vs-dim);
  white-space: nowrap;
}

.dev-dashboard-fixture-count strong {
  color: var(--vs-chalk);
  font-weight: 650;
}

@media (max-width: 560px) {
  .dev-dashboard-fixture {
    grid-template-columns: 88px minmax(0, 1fr);
    row-gap: 0.25rem;
  }

  .dev-dashboard-fixture-count {
    grid-column: 2;
  }
}

/* ---------------------------------------------------------------- Needs you */

.dev-dashboard-todo {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dev-dashboard-todo-item {
  padding: 0.65rem 0 0.65rem 0.8rem;
  border-inline-start: 2px solid var(--vs-rail);
}

.dev-dashboard-todo-item + .dev-dashboard-todo-item {
  margin-top: var(--vs-s2);
}

.dev-dashboard-todo-item--warn {
  border-inline-start-color: var(--vs-warn);
}

.dev-dashboard-todo-item--fault {
  border-inline-start-color: var(--vs-fault);
}

.dev-dashboard-todo-text {
  font-size: 0.875rem;
  line-height: 1.5;
}

.dev-dashboard-todo-action {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--vs-act);
  text-decoration: none;
}

.dev-dashboard-todo-action:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

.dev-dashboard-todo-toggle {
  margin-top: var(--vs-s3);
}

.dev-dashboard-todo-more {
  margin: var(--vs-s3) 0 0;
  padding-top: var(--vs-s3);
  border-top: 1px solid var(--vs-rail-soft);
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

/* ---------------------------------------------------------------- Get started */

/* Shown only while a step is outstanding, and gone for good once they are all done. */
.dev-dashboard-start {
  margin-bottom: var(--vs-s4);
  padding-bottom: var(--vs-s4);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.dev-dashboard-start-title {
  margin: 0 0 var(--vs-s2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--vs-dim);
}

.dev-dashboard-start-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dev-dashboard-start-step {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  font-size: 0.875rem;
}

.dev-dashboard-start-mark {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: none;
  border: 1.5px solid var(--vs-rail);
  border-radius: 50%;
  color: var(--vs-void);
}

.dev-dashboard-start-step.is-done .dev-dashboard-start-mark {
  background: var(--vs-on);
  border-color: var(--vs-on);
}

.dev-dashboard-start-label {
  min-width: 0;
}

.dev-dashboard-start-step.is-done .dev-dashboard-start-label {
  color: var(--vs-dim);
}

a.dev-dashboard-start-link {
  color: var(--vs-act);
  text-decoration: none;
}

a.dev-dashboard-start-link:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

/* ---------------------------------------------------------------- Player activity */

.dev-dashboard-chart-controls {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

.dev-dashboard-range-fixed {
  font-size: 0.8125rem;
  color: var(--vs-dim);
  padding-inline: var(--vs-s1);
}

/* Reads across the top of the panel, above the chart, rather than down a narrow column. */
.dev-dashboard-trend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--vs-s3) var(--vs-s5);
  margin: 0 0 var(--vs-s4);
  padding-bottom: var(--vs-s4);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.dev-dashboard-trend dt {
  font-size: 0.78rem;
  color: var(--vs-dim);
}

.dev-dashboard-trend dd {
  margin: 0.15rem 0 0;
  font-size: 1.125rem;
  font-weight: 650;
}

.dev-dashboard-trend-lead {
  font-family: var(--vs-font-display);
  font-size: 1.6rem !important;
  letter-spacing: -0.02em;
}

.dev-dashboard-trend-up { color: var(--vs-on); }
.dev-dashboard-trend-down { color: var(--vs-fault); }

.dev-dashboard-trend-when {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--vs-dim);
}

/* The chart scales with its container, axis labels included, so cap the reading width or
   the text grows with the box. Most of the panel, not all of it. */
.dev-dashboard-chart .game-overview-series-chart-wrap {
  max-width: 860px;
}

.dev-dashboard-chart .game-overview-series-svg {
  min-height: 260px;
}

/* ---------------------------------------------------------------- Revenue share */

.dev-dashboard-revenue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--vs-s4);
  padding: var(--dash-pad);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
}

.dev-dashboard-revenue-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck-hi);
  color: var(--vs-on);
}

.dev-dashboard-revenue-body {
  min-width: 0;
}

.dev-dashboard-revenue-body h2 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 650;
}

.dev-dashboard-revenue-blurb {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--vs-dim);
  max-width: 62ch;
}

.dev-dashboard-revenue-figure {
  display: flex;
  align-items: baseline;
  gap: var(--vs-s3);
  margin: 0;
  flex-wrap: wrap;
}

.dev-dashboard-revenue-amount {
  font-family: var(--vs-font-display);
  font-size: 1.9rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.dev-dashboard-revenue-period {
  font-size: 0.85rem;
  color: var(--vs-dim);
}

.dev-dashboard-revenue-split {
  list-style: none;
  margin: var(--vs-s3) 0 0;
  padding: var(--vs-s3) 0 0;
  border-top: 1px solid var(--vs-rail-soft);
  max-width: 34rem;
}

.dev-dashboard-revenue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--vs-s4);
  align-items: baseline;
  padding: 0.4rem 0;
  font-size: 0.875rem;
}

.dev-dashboard-revenue-impressions {
  color: var(--vs-dim);
  font-size: 0.85rem;
  text-align: end;
}

.dev-dashboard-revenue-action {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .dev-dashboard-revenue {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dev-dashboard-revenue-action {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
/* Staff games register.
 *
 * Built from the vsp- primitives in src/styles/tokens.css. This file only lays them out and
 * sets the few text weights the table needs; every colour comes from a token. Hover rules
 * restate colour because index.css still carries link and button defaults (see the comments
 * at the top of tokens.css).
 */

/* The page frame, head, notices, summary chips, dialog, thumbnails and toast are shared primitives
   (vsp-page, vsp-summary, vsp-dialog, vsp-thumb, vsp-toast). */

/* ---------------------------------------------------------------- Review queue */

.staff-games-queue-head {
  margin-bottom: var(--vs-s3);
}

/* Focus lands here when a link result is dismissed, so keyboard users stay in the queue. Like the
   result itself it is a landing spot, not a control, so it does not draw a ring. */
.staff-games-queue-title:focus {
  outline: none;
}

.staff-games-queue-clear {
  margin: 0;
  font-size: 0.875rem;
  color: var(--vs-dim);
}

.staff-games-queue-table {
  min-width: 640px;
}

/* Only the issue wraps. A game or studio name broken over three lines is harder to scan
   than a table that scrolls. */
.staff-games-queue-table :is(th, td) {
  vertical-align: middle;
  white-space: nowrap;
}

.staff-games-queue-table td.staff-games-queue-issue {
  width: 100%;
  min-width: 12rem;
  white-space: normal;
}

.staff-games-queue-studio {
  color: var(--vs-dim);
}

.staff-games-queue-action {
  text-align: end;
  white-space: nowrap;
}

.staff-games-queue-foot {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  flex-wrap: wrap;
  margin-top: var(--vs-s3);
}

.staff-games-queue-more {
  margin: 0;
  font-size: 0.8125rem;
}

/* The primary link and its quiet "Show games" or "View game" partner, kept on one line. */
.staff-games-queue-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--vs-s1);
}

/* A long studio name would push the whole queue sideways, so the label stops at a width and
   the button's title carries the full name. The span is what can ellipsise: text directly in
   an inline-flex button cannot. */
.staff-games-link-btn-label {
  display: block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-games-link-outcome {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  margin-bottom: var(--vs-s3);
}

/* Focus is moved here after a link so it is not lost with the row. It is a landing spot, not a
   control, so it does not draw a ring. */
.staff-games-link-outcome:focus,
.staff-games-link-notice:focus {
  outline: none;
}

.staff-games-queue > .staff-games-link-notice {
  margin-bottom: var(--vs-s3);
}

/* Top aligned, because the skipped list makes the notice several lines tall. */
.staff-games-link-notice {
  align-items: flex-start;
}

.staff-games-link-notice > svg {
  flex: none;
  margin-top: 0.15em;
}

.staff-games-link-notice-body {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
}

.staff-games-link-notice-head {
  margin: 0;
}

.staff-games-link-skipped {
  margin: var(--vs-s1) 0 0;
  padding-inline-start: 1.1rem;
}

.staff-games-link-skipped-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.vsp-icon-btn.staff-games-link-dismiss {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-color: transparent;
  background: transparent;
}

/* ---------------------------------------------------------------- Toolbar */

.staff-games-register {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
}

.staff-games-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s2) var(--vs-s4);
  flex-wrap: wrap;
}

.staff-games-toolbar-scope,
.staff-games-toolbar-filters {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
  min-width: 0;
}

.staff-games-toolbar-scope {
  flex: 1 1 26rem;
}

.staff-games-search {
  flex: 1 1 14rem;
  max-width: 22rem;
}

/* Studio names run longer than the other options, so this select gets more room than the
   small select's default. */
.vsp-select.staff-games-studio-select {
  max-width: 16rem;
}

.staff-games-filter {
  display: flex;
  flex-direction: row;
}

.staff-games-empty-body {
  margin: 0;
}

/* ---------------------------------------------------------------- Table */

.staff-games-table {
  min-width: 960px;
}

.staff-games-table :is(th, td) {
  vertical-align: middle;
}

.staff-games-game-cell {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  min-width: 11rem;
}

.staff-games-stack {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.staff-games-link {
  color: var(--vs-chalk);
  text-decoration: none;
}

.staff-games-link:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

.staff-games-name {
  font-weight: 600;
}

.staff-games-sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--vs-faint);
}

.staff-games-dim {
  color: var(--vs-dim);
}

.staff-games-faint {
  color: var(--vs-faint);
}

.staff-games-warn {
  color: var(--vs-warn);
}

.staff-games-studio-name {
  color: var(--vs-chalk);
}

.staff-games-meta {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

/* Muted, not a badge: a studio taken from the creator is information, not a state. The dotted
   underline marks the title that explains the game is not linked to it yet. */
.staff-games-studio-inferred {
  color: var(--vs-dim);
  text-decoration: underline dotted;
  text-decoration-color: var(--vs-faint);
  text-underline-offset: 3px;
  cursor: help;
}

.staff-games-sdk {
  display: flex;
  align-items: flex-start;
  gap: var(--vs-s2);
  min-width: 8.5rem;
}

/* Pinned to the first line of text, so a label that wraps keeps its dot beside the words. */
.staff-games-sdk .vsp-lamp {
  margin-top: 0.5em;
}

/* Receiving over the last day is steady green. Only a game calling in right now pulses,
   which keeps the one moving thing on the screen meaningful. */
.vsp-lamp.staff-games-lamp-steady {
  animation: none;
  box-shadow: none;
}

.vsp-lamp.staff-games-lamp-off {
  opacity: 0.5;
}

.staff-games-attention {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s2);
  max-width: 16rem;
}

/* The full list is in the title; the badge only has to say enough to be recognised. */
.staff-games-attention-badge {
  min-width: 0;
  max-width: 13rem;
}

.staff-games-attention-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-games-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--vs-s1);
}

.vsp-icon-btn.staff-games-more {
  width: 1.75rem;
  height: 1.75rem;
}

/* Placed by RegisterTable against the viewport, so it is not clipped by the table's
   horizontal scroll container. */
.vsp-menu.staff-games-menu {
  z-index: 60;
}

/* ActionLink adds an external mark after the label when the link leaves this host. */
.vsp-menu-item.staff-games-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s2);
}
/* Add game and Edit game. Token-only (scripts/check-token-colours.mjs). Follows Create event: panels and an action bar that
   stays on screen. */

.game-form-page {
  max-width: 44rem;
}

/* App.css gives a bare form a column and a width; this one is the whole page. */
.game-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--vs-s4);
  width: 100%;
  max-width: none;
}

.game-form-panel {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  padding: var(--vs-s5);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
}

.game-form-panel h2 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.game-form-trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--vs-s4);
}

.game-form-seg {
  align-self: flex-start;
}

/* ---------------------------------------------------------------- Upload tile */

.game-form-icon {
  display: flex;
  gap: var(--vs-s4);
  align-items: flex-start;
}

.game-form-icon-preview {
  display: grid;
  flex: none;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-md);
  background: var(--vs-void);
  color: var(--vs-dim);
  font-size: 1.25rem;
  font-weight: 650;
  overflow: hidden;
}

.game-form-icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-form-icon-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--vs-s2);
  min-width: 0;
}

.game-form-icon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
}

/* A label doing a button's job: restated because App.css sets form labels to a column. */
.game-form-icon-pick {
  flex-direction: row;
  cursor: pointer;
}

.game-form-icon-pick:focus-within {
  outline: 2px solid var(--vs-act);
  outline-offset: 1px;
}

.game-form-more {
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.game-form-more summary {
  cursor: pointer;
}

.game-form-more summary:hover {
  color: var(--vs-chalk);
}

.game-form-more .vsp-input {
  margin-top: var(--vs-s2);
}

/* ---------------------------------------------------------------- Chips */

.game-form-chips-set {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.game-form-chips-set legend {
  padding: 0;
  margin-bottom: var(--vs-s2);
}

.game-form-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
}

.game-form-chip {
  position: relative;
  flex-direction: row;
  cursor: pointer;
}

.game-form-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 var(--vs-s3);
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-pill);
  background: var(--vs-void);
  color: var(--vs-dim);
  font-size: 0.875rem;
}

.game-form-chip:hover span {
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}

.game-form-chip input:checked + span {
  border-color: var(--vs-act);
  background: var(--vs-act-wash);
  color: var(--vs-chalk);
}

.game-form-chip input:focus-visible + span {
  outline: 2px solid var(--vs-act);
  outline-offset: 1px;
}

/* ---------------------------------------------------------------- Links and the action bar */

.game-form-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
  gap: var(--vs-s2);
  align-items: center;
}

.game-form-bar {
  margin-top: 0;
}

.game-form-bar .vsp-btn {
  color: var(--vs-chalk);
  text-decoration: none;
}

.game-form-bar .vsp-btn--primary,
.game-form-bar .vsp-btn--primary:hover {
  color: var(--vs-act-ink);
}

@media (max-width: 560px) {
  .game-form-panel {
    padding: var(--vs-s4);
  }

  .game-form-link {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-form-bar .vsp-actionbar-msg {
    flex-basis: 100%;
  }

  .game-form-bar .vsp-btn {
    flex: 1;
    justify-content: center;
  }
}
/* Game header and tab strip. The breadcrumb, tabs and delete dialog are the shared vsp-crumbs,
 * vsp-tabs and vsp-dialog primitives in styles/tokens.css; this file lays out the identity row.
 *
 * The header answers three questions before anything else on the page: which game,
 * is it approved, and what can I do to it. Everything else is a tab away.
 */

.game-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.game-head {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  margin-bottom: var(--vs-s6);
}

.game-head--bare {
  gap: var(--vs-s4);
}

/* ---------------------------------------------------------------- Identity row */

.game-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--vs-s4);
  flex-wrap: wrap;
}

.game-identity {
  display: flex;
  align-items: center;
  gap: var(--vs-s4);
  min-width: 0;
}

.game-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: var(--vs-r-md);
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  font-size: 1rem;
  font-weight: 650;
  overflow: hidden;
}

.game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-identity-text {
  min-width: 0;
}

.game-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--vs-chalk);
}

.game-identity-meta {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.game-slug {
  font-family: var(--vs-mono);
  font-size: 0.75rem;
}

.game-head-actions {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

.game-switch select {
  min-width: 11rem;
}

/* ---------------------------------------------------------------- Main */

.game-main {
  min-width: 0;
}

/* Edit game moves into the overflow menu on a phone, where the button would cost a row of its own. */
.game-menu-edit {
  display: none;
}

/* On a phone the header repeats on every tab, so it is the name, the status and the menu on one line, then the switcher if
   there is another game. The strip of tabs fades at the edge to say there are more than fit. */
@media (max-width: 760px) {
  .game-head {
    gap: var(--vs-s2);
    margin-bottom: var(--vs-s4);
  }

  .game-head > .vsp-crumbs,
  .game-slug,
  .game-edit {
    display: none;
  }

  .game-menu-edit {
    display: block;
  }

  .game-head-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--vs-s2);
    align-items: center;
  }

  .game-head-actions {
    display: contents;
  }

  .game-identity {
    gap: var(--vs-s3);
  }

  .game-icon {
    width: 36px;
    height: 36px;
    font-size: 0.8125rem;
  }

  .game-name {
    font-size: 1.125rem;
    overflow-wrap: anywhere;
  }

  .game-identity-meta {
    margin-top: 0.15rem;
  }

  .game-switch {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .game-switch select {
    width: 100%;
    min-width: 0;
  }

  .game-head .vsp-tabs-scroll {
    -webkit-mask-image: linear-gradient(to left, transparent, black 2.5rem);
    mask-image: linear-gradient(to left, transparent, black 2.5rem);
  }

  /* Room for the last tab to scroll clear of the fade, or it could never be read in full. */
  .game-head .vsp-tabs {
    padding-inline-end: 2.5rem;
  }
}
/* The staff free hosted matches card. Token only (scripts/check-token-colours.mjs checks this folder). */

/* Stands in for the card while it loads; the overview's column gap spaces it. */
.hmac-loading {
  margin: 0;
}

.hmac-notice {
  margin-bottom: var(--vs-s4);
}

.hmac-kv {
  margin-bottom: var(--vs-s4);
}

/* App.css gives a bare form a 360px flex column; this one sets its own. */
.hmac-form {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  max-width: 36rem;
  padding-top: var(--vs-s4);
  border-top: 1px solid var(--vs-rail-soft);
}
/* Game overview.
 *
 * One raised, coloured surface at the top says whether the game is working. Everything
 * below it sits on quieter panels in reading order. Numbers are tabular so a column of
 * digits stays still while it updates.
 */

.gov {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s6);
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.gov-flash {
  margin: 0;
}

.gov-loading {
  margin: 0;
  font-size: 0.875rem;
}

/* ---------------------------------------------------------------- Status */

.gov-status {
  padding: var(--vs-s5);
  border: 1px solid var(--vs-rail-soft);
  border-inline-start: 3px solid var(--vs-faint);
  border-radius: var(--vs-r-lg);
  background: var(--vs-deck);
}

.gov-status--ok {
  border-inline-start-color: var(--vs-on);
  background: linear-gradient(90deg, var(--vs-on-wash), transparent 55%), var(--vs-deck);
}

.gov-status--warn {
  border-inline-start-color: var(--vs-warn);
  background: linear-gradient(90deg, var(--vs-warn-wash), transparent 55%), var(--vs-deck);
}

.gov-status--fault {
  border-inline-start-color: var(--vs-fault);
  background: linear-gradient(90deg, var(--vs-fault-wash), transparent 55%), var(--vs-deck);
}

.gov-status-head {
  display: flex;
  align-items: flex-start;
  gap: var(--vs-s3);
}

.gov-status-head > .vsp-lamp {
  margin-top: 0.45rem;
}

.gov-status-text {
  flex: 1;
  min-width: 0;
}

.gov-status-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--vs-chalk);
}

.gov-status-detail {
  margin: 0.2rem 0 0;
  max-width: 68ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--vs-dim);
}

.gov-status-actions {
  display: flex;
  gap: var(--vs-s2);
  flex: none;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- First-run steps */

/* One compact row rather than a four-column block. The per-step explanation moves to a
   title tooltip and to screen-reader text, so setup does not cost a quarter of the page. */
.gov-steps-wrap {
  display: flex;
  align-items: center;
  gap: var(--vs-s3) var(--vs-s4);
  flex-wrap: wrap;
  margin-top: var(--vs-s4);
  padding-top: var(--vs-s3);
  border-top: 1px solid var(--vs-rail-soft);
}

.gov-steps-count {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--vs-dim);
  white-space: nowrap;
}

.gov-steps-count strong {
  color: var(--vs-chalk);
  font-weight: 650;
}

.gov-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.gov-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem 0.2rem 0.35rem;
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-pill);
  background: var(--vs-void);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.gov-step-mark {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex: none;
  border: 1.5px solid var(--vs-rail);
  border-radius: 50%;
  color: var(--vs-void);
}

.gov-step--done .gov-step-mark {
  background: var(--vs-on);
  border-color: var(--vs-on);
}

.gov-step-label {
  color: var(--vs-chalk);
}

.gov-step--done .gov-step-label {
  color: var(--vs-dim);
}

/* ---------------------------------------------------------------- Metric cluster */

/* One instrument cluster split by hairlines, rather than four separate cards with four
   separate borders and four separate shadows. */
.gov-cluster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  overflow: hidden;
}

.gov-cluster-msg {
  grid-column: 1 / -1;
  border-radius: 0;
  border-inline-start-width: 3px;
}

.gov-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: var(--vs-s4) var(--vs-s5);
  border-inline-start: 1px solid var(--vs-rail-soft);
  min-width: 0;
}

.gov-metric:first-child {
  border-inline-start: none;
}

.gov-metric-label {
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.gov-metric-value {
  font-family: var(--vs-font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--vs-chalk);
}

.gov-metric-note {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--vs-faint);
}

.gov-skeleton {
  display: inline-block;
  width: 3.5rem;
  height: 1.5rem;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--vs-deck-hi), var(--vs-rail), var(--vs-deck-hi));
  background-size: 200% 100%;
  animation: gov-shimmer 1.4s linear infinite;
  vertical-align: -0.2rem;
}

@keyframes gov-shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gov-skeleton {
    animation: none;
  }
}

@media (max-width: 900px) {
  .gov-cluster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gov-metric:nth-child(odd) {
    border-inline-start: none;
  }

  .gov-metric:nth-child(n + 3) {
    border-top: 1px solid var(--vs-rail-soft);
  }
}

@media (max-width: 520px) {
  /* Beside a button the status text ran down a narrow column, so the button goes under it. */
  .gov-status-head {
    flex-wrap: wrap;
  }

  .gov-status-text {
    flex-basis: calc(100% - 1.5rem);
  }

  .gov-status-actions {
    flex-basis: 100%;
  }

  .gov-cluster {
    grid-template-columns: minmax(0, 1fr);
  }

  .gov-metric {
    border-inline-start: none;
  }

  .gov-metric + .gov-metric {
    border-top: 1px solid var(--vs-rail-soft);
  }
}

/* ---------------------------------------------------------------- Split */

.gov-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: var(--vs-s5);
  align-items: start;
}

@media (max-width: 1100px) {
  .gov-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The chart scales with its container, labels included, so cap the reading width or the
   axis text grows with the box. */
.gov-activity .game-overview-series-chart-wrap {
  max-width: 720px;
}

/* Compact by design. An empty chart should leave a short panel, not a tall blank box. */
.gov-chart-blank {
  padding: var(--vs-s5) var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-void);
}

.gov-chart-blank svg {
  color: var(--vs-faint);
}

.gov-chart-blank p {
  margin: 0;
  max-width: 42ch;
}

.gov-chart-blank .vsp-btn {
  margin-top: var(--vs-s2);
}

/* ---------------------------------------------------------------- Health */

/* Label and value on one line in two columns. Stacked, these five counters stood taller
   than the whole chart beside them and left a gap under it. */
.gov-counters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem var(--vs-s4);
  margin: 0;
}

.gov-counters > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--vs-s2);
  min-width: 0;
  padding: 0.15rem 0;
  border-bottom: 1px solid var(--vs-rail-soft);
}

.gov-counters dt {
  font-size: 0.75rem;
  color: var(--vs-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gov-counters dd {
  margin: 0;
  flex: none;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--vs-chalk);
  white-space: nowrap;
}

/* Webhooks reads as a sentence rather than a figure, so it takes the full row instead of
   squeezing its own label down to one letter. */
.gov-counters > div:last-child {
  grid-column: 1 / -1;
}

.gov-counter-bad {
  color: var(--vs-fault);
}

.gov-counter-warn {
  color: var(--vs-warn);
}

.gov-hourly {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 36px;
  margin-top: var(--vs-s4);
  padding-top: var(--vs-s2);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.gov-hourly-bar {
  flex: 1;
  min-width: 2px;
  border-radius: 1px 1px 0 0;
  background: var(--vs-rail);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* The errors in an hour, as a share of that hour's bar. At least a sliver, so one error in a busy hour still shows. */
.gov-hourly-err {
  flex: 1;
  min-height: 2px;
  background: var(--vs-fault);
}

.gov-advice {
  list-style: none;
  margin: var(--vs-s4) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
}

.gov-advice-item {
  display: flex;
  align-items: flex-start;
  gap: var(--vs-s2);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--vs-dim);
}

.gov-advice-item svg {
  flex: none;
  margin-top: 0.15rem;
}

.gov-advice-item--problem {
  color: var(--vs-chalk);
}

.gov-advice-item--problem svg {
  color: var(--vs-fault);
}

.gov-advice-item--warning svg {
  color: var(--vs-warn);
}

/* Neutral, not green. Green would claim the integration is working, and an info line is
   often exactly the opposite: nothing has happened yet. The status strip above is the one
   place that reports health. */
.gov-advice-item--info svg {
  color: var(--vs-faint);
}

/* ---------------------------------------------------------------- Expanders */

.gov-more {
  margin-top: var(--vs-s3);
}

.gov-more > summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0;
  list-style: none;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--vs-dim);
  border-radius: var(--vs-r-sm);
}

.gov-more > summary::-webkit-details-marker {
  display: none;
}

.gov-more > summary::before {
  content: "";
  width: 0;
  height: 0;
  flex: none;
  border-left: 4px solid currentColor;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  transition: transform 0.15s ease;
}

[dir="rtl"] .gov-more > summary::before {
  transform: scaleX(-1);
}

.gov-more[open] > summary::before {
  transform: rotate(90deg);
}

[dir="rtl"] .gov-more[open] > summary::before {
  transform: rotate(-90deg);
}

.gov-more > summary:hover {
  color: var(--vs-chalk);
}

.gov-more > summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-deck), 0 0 0 4px var(--vs-act);
}

.gov-more-body {
  margin: 0.3rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--vs-dim);
  max-width: 78ch;
}

@media (prefers-reduced-motion: reduce) {
  .gov-more > summary::before,
  .gov-creds-summary::after {
    transition: none;
  }
}

.gov-sdk-versions {
  list-style: none;
  margin: var(--vs-s2) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  font-size: 0.8125rem;
}

.gov-sdk-versions li {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- Credentials */

.gov-creds-summary {
  display: flex;
  align-items: baseline;
  gap: var(--vs-s3);
  flex-wrap: wrap;
  list-style: none;
  cursor: pointer;
  border-radius: var(--vs-r-sm);
}

.gov-creds-summary::-webkit-details-marker {
  display: none;
}

.gov-creds-summary::after {
  content: "";
  width: 0;
  height: 0;
  margin-inline-start: auto;
  align-self: center;
  border-left: 4.5px solid var(--vs-dim);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s ease;
}

.gov-creds[open] .gov-creds-summary::after {
  transform: rotate(90deg);
}

.gov-creds-summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-deck), 0 0 0 4px var(--vs-act);
}

.gov-creds-hint {
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.gov-creds[open] .gov-creds-hint {
  display: none;
}

.gov-creds-blurb {
  margin: var(--vs-s2) 0 var(--vs-s3);
  max-width: 78ch;
}

.gov-creds .gov-cred {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--vs-s3) var(--vs-s4);
  padding: var(--vs-s3) 0;
  border-top: 1px solid var(--vs-rail-soft);
}

.gov-cred-label {
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.gov-cred-value {
  padding: 0.35rem var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
  overflow-x: auto;
  white-space: nowrap;
  min-width: 0;
}

.gov-cred-value--once {
  border-color: rgba(245, 165, 36, 0.45);
  background: var(--vs-warn-wash);
}

.gov-cred-actions {
  display: flex;
  gap: var(--vs-s2);
  justify-content: flex-end;
}

.gov-cred-restricted {
  grid-column: 2 / -1;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--vs-faint);
  max-width: 70ch;
}

.gov-cred-restricted--urgent {
  color: var(--vs-warn);
}

.gov-cred-error {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .gov-creds .gov-cred {
    grid-template-columns: minmax(0, 1fr);
  }

  .gov-cred-actions {
    justify-content: flex-start;
  }

  .gov-cred-restricted,
  .gov-cred-error {
    grid-column: 1;
  }
}
/* Events, and the card shape that Recurring reuses.
 *
 * Both screens show the same object at different grain: Events foregrounds a single
 * tournament, Recurring foregrounds the schedule that makes them. The card frame,
 * spacing and footer are shared here so the two cannot drift; only the middle changes.
 */

.gev {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.gev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s4);
  flex-wrap: wrap;
}

.gev-title {
  margin: 0;
  font-size: var(--vs-text-lg);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.gev-tools {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

.gev-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.6rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck);
  color: var(--vs-dim);
}

.gev-search:focus-within {
  border-color: var(--vs-act);
}

.gev-search input {
  width: 11rem;
  max-width: 40vw;
  padding: 0.4rem 0;
  border: none;
  background: transparent;
  color: var(--vs-chalk);
  font: inherit;
  font-size: var(--vs-text-base);
}

.gev-search input::placeholder {
  color: var(--vs-faint);
}

.gev-search input:focus {
  outline: none;
}

/* ---------------------------------------------------------------- Filters */

.gev-filters {
  display: flex;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

.gev-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-pill);
  background: var(--vs-deck);
  color: var(--vs-dim);
  font: inherit;
  font-size: var(--vs-text-sm);
  font-weight: 550;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.gev-filter:hover:not(:disabled) {
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}

/* A filter with nothing in it steps right back, so it cannot be mistaken for one that is on. */
.gev-filter:disabled {
  opacity: 0.55;
  border-color: transparent;
  background: transparent;
  cursor: not-allowed;
}

.gev-filter[aria-pressed='true'] {
  background: var(--vs-deck-hi);
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}

.gev-filter:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-void), 0 0 0 4px var(--vs-act);
}

.gev-filter-count {
  font-size: var(--vs-text-sm);
  color: var(--vs-faint);
  font-variant-numeric: tabular-nums;
}

.gev-filter[aria-pressed='true'] .gev-filter-count {
  color: var(--vs-dim);
}

.gev-msg {
  margin: 0;
  font-size: var(--vs-text-base);
}

.gev-blank {
  border: 1px dashed var(--vs-rail);
  border-radius: var(--vs-r-md);
}

.gev-blank svg {
  color: var(--vs-faint);
}

.gev-blank p {
  margin: 0;
  max-width: 46ch;
}

.gev-blank .vsp-btn {
  margin-top: var(--vs-s2);
}

/* ---------------------------------------------------------------- Card grid */

.gev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--vs-s3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.gev-card {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  padding: var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  min-width: 0;
  transition: border-color 0.15s ease;
}

.gev-card:hover {
  border-color: var(--vs-rail);
}

/* Finished tournaments recede: a sunken surface and a dimmed mark, but the text keeps its
   own contrast so an ended event stays readable rather than merely faint. */
.gev-card--ended,
.gev-card--cancelled {
  background: var(--vs-void);
}

.gev-card--ended .gev-art,
.gev-card--cancelled .gev-art {
  opacity: 0.55;
}

.gev-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--vs-s2);
}

.gev-art {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck-hi);
  color: var(--vs-dim);
  overflow: hidden;
}

/* contain: most of these are square game icons, and a corner cut off makes a game look careless. */
.gev-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gev-card-name {
  margin: 0;
  font-size: var(--vs-text-md);
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.gev-card-name a {
  color: var(--vs-chalk);
  text-decoration: none;
}

.gev-card-name a:hover {
  color: var(--vs-chalk);
  text-decoration: underline;
}

.gev-card-mode {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: -0.4rem 0 0;
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

.gev-card-facts {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding-top: var(--vs-s3);
  border-top: 1px solid var(--vs-rail-soft);
}

.gev-card-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--vs-s3);
  min-width: 0;
}

.gev-card-facts dt {
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
  flex: none;
}

.gev-card-facts dd {
  margin: 0;
  font-size: var(--vs-text-sm);
  color: var(--vs-chalk);
  text-align: end;
  min-width: 0;
}

.gev-card-rel {
  display: block;
  font-size: var(--vs-text-sm);
  color: var(--vs-warn);
}

.gev-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s2);
  margin-top: auto;
  padding-top: var(--vs-s2);
}

/* ---------------------------------------------------------------- List view */

.gev-row-name {
  color: var(--vs-chalk);
  text-decoration: none;
}

.gev-row-name:hover {
  color: var(--vs-chalk);
  text-decoration: underline;
}

.gev-row--past :is(th, td) {
  color: var(--vs-dim);
}

@media (max-width: 620px) {
  .gev-head {
    align-items: flex-start;
  }

  .gev-tools {
    width: 100%;
  }

  /* Sharing a row with the view toggle and Create event left this about 88px wide. */
  .gev-search {
    flex: 1 0 100%;
    order: -1;
  }

  .gev-search input {
    width: 100%;
    max-width: none;
  }
}
/* Game detail — same dark flair */

/* The local names stay so every rule below still resolves; they now read from
   src/styles/tokens.css instead of a private palette, which is why these tabs no
   longer look pasted in. */
.dev-game-detail {
  --vs-primary: var(--vs-act-fill);
  --vs-primary-hover: var(--vs-act-fill-hi);
  --vs-link: var(--vs-act);
  --vs-card: var(--vs-deck);
  --vs-text: var(--vs-chalk);
  --vs-text-muted: var(--vs-dim);
  --vs-border: var(--vs-rail);

  font-family: var(--vs-font);
}

.dev-game-detail-back {
  color: var(--vs-link);
  text-decoration: none;
  font-size: var(--vs-text-base);
  margin-bottom: 1.5rem;
  display: inline-block;
}

.dev-game-detail-back:hover {
  text-decoration: underline;
}

.dev-game-detail-card {
  background: var(--vs-card);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  padding: var(--vs-s5);
}

.dev-game-detail-info {
  margin-bottom: 1.5rem;
}

.dev-game-detail-name {
  margin: 0 0 0.5rem;
  font-size: var(--vs-text-xl);
  font-weight: 600;
  color: var(--vs-text);
}

.dev-game-detail-status-row {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dev-game-detail-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: var(--vs-text-sm);
  font-weight: 500;
}
.dev-game-detail-status--pending {
  background: var(--vs-warn-wash);
  color: var(--vs-warn);
}
.dev-game-detail-status--approved {
  background: var(--vs-on-wash);
  color: var(--vs-on);
}
.dev-game-detail-status--rejected {
  background: var(--vs-fault-wash);
  color: var(--vs-fault);
}

.dev-game-detail-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--vs-text-base);
  font-weight: 500;
}
.dev-game-detail-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.dev-game-detail-live-indicator--live {
  color: var(--vs-on);
}
.dev-game-detail-live-indicator--live .dev-game-detail-live-dot {
  background: var(--vs-on);
}
.dev-game-detail-live-indicator--potential {
  color: var(--vs-warn);
}
.dev-game-detail-live-indicator--potential .dev-game-detail-live-dot {
  background: var(--vs-warn);
}
.dev-game-detail-live-indicator--issue {
  color: var(--vs-fault);
}
.dev-game-detail-live-indicator--issue .dev-game-detail-live-dot {
  background: var(--vs-fault);
}

.dev-game-detail-meta {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.dev-game-detail-meta dt {
  font-size: var(--vs-text-sm);
  font-weight: 600;
  color: var(--vs-text-muted);
  margin-bottom: 0.25rem;
}

.dev-game-detail-meta dd {
  margin: 0;
  font-size: var(--vs-text-base);
  color: var(--vs-text);
}

.dev-game-detail-meta code {
  font-size: 0.85em;
  color: var(--vs-text-muted);
}

.dev-game-detail-sdk {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dev-game-detail-sdk-toggle,
.dev-game-detail-sdk-copy {
  padding: 0.25rem 0.6rem;
  font-size: var(--vs-text-sm);
  border-radius: 6px;
  border: 1px solid var(--vs-border);
  background: transparent;
  color: var(--vs-text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.dev-game-detail-sdk-toggle:hover,
.dev-game-detail-sdk-copy:hover {
  color: var(--vs-text);
  border-color: var(--vs-text-muted);
}

.dev-game-detail-events {
  margin-top: 0;
}

/* Wraps: beside a long heading, the line under it was squeezed into a tall thin column on a phone. */
.dev-game-detail-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.dev-game-detail-section-head h2 {
  margin: 0;
  font-size: var(--vs-text-lg);
  font-weight: 600;
  color: var(--vs-text);
}

.dev-game-detail-create-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--vs-primary);
  color: var(--vs-act-ink);
  border-radius: 8px;
  text-decoration: none;
  font-size: var(--vs-text-base);
  font-weight: 500;
  transition: background 0.2s;
}

.dev-game-detail-create-btn:hover {
  background: var(--vs-primary-hover);
}

.dev-game-detail-empty {
  margin: 0;
  color: var(--vs-text-muted);
  font-size: var(--vs-text-base);
}

.dev-game-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.dev-game-detail-table th,
.dev-game-detail-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--vs-border);
  color: var(--vs-text);
  font-size: var(--vs-text-base);
}

.dev-game-detail-table th {
  font-weight: 600;
  color: var(--vs-text-muted);
  font-size: var(--vs-text-sm);
}

.dev-game-detail-table tbody tr:last-child td {
  border-bottom: none;
}

.dev-game-detail-table tbody tr:hover td {
  background: var(--vs-void);
}

.dev-game-detail-event-link {
  color: var(--vs-link);
  text-decoration: none;
}

.dev-game-detail-event-link:hover {
  text-decoration: underline;
}

.dev-game-detail-status {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: var(--vs-text-sm);
  font-weight: 600;
}

.dev-game-detail-status--pending {
  background: var(--vs-warn-wash);
  color: var(--vs-warn);
}

.dev-game-detail-status--live {
  background: var(--vs-on-wash);
  color: var(--vs-on);
}

.dev-game-detail-status--ended {
  background: var(--vs-deck-hi);
  color: var(--vs-dim);
}

.dev-game-detail-status--cancelled {
  background: var(--vs-fault-wash);
  color: var(--vs-fault);
}

.dev-game-detail-table code {
  font-size: 0.85em;
  color: var(--vs-text-muted);
}

.dev-game-detail-muted {
  color: var(--vs-text-muted);
  font-size: var(--vs-text-base);
  margin: 0;
}

.dev-game-detail-error {
  color: var(--vs-fault);
  font-size: var(--vs-text-base);
  margin: 0;
}

.dev-game-detail-success {
  color: var(--vs-on);
  font-size: var(--vs-text-base);
  font-weight: 500;
}

.dev-game-detail-stats {
  margin-top: 1.5rem;
}

.dev-game-detail-stats .dev-game-detail-create-btn {
  cursor: pointer;
  border: none;
}

.dev-game-detail-stats .dev-game-detail-create-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dev-game-detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.5rem;
}

.dev-game-detail-stats-category {
  border: 1px solid var(--vs-border);
  border-radius: 8px;
  padding: 1rem;
  background: var(--vs-void);
}

.dev-game-detail-stats-cat-title {
  margin: 0 0 0.75rem;
  font-size: var(--vs-text-base);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--vs-text-muted);
}

.dev-game-detail-stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dev-game-detail-stats-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--vs-rail-soft);
  font-size: var(--vs-text-base);
}

.dev-game-detail-stats-item:last-child {
  border-bottom: none;
}

.dev-game-detail-stats-item label {
  cursor: pointer;
  color: var(--vs-text);
  flex: 1;
}

.dev-game-detail-stats-item input[type="checkbox"] {
  margin-right: 0.5rem;
}

.dev-game-detail-stats-item code {
  font-size: 0.8em;
  color: var(--vs-text-muted);
}

.dev-game-detail-stats-desc {
  color: var(--vs-text-muted);
  font-size: 0.85em;
}

.dev-game-detail-stats-meta {
  font-size: var(--vs-text-sm);
  color: var(--vs-text-muted);
  white-space: nowrap;
}

.dev-game-detail-leaderboard-preview {
  margin-top: 1.5rem;
}

.dev-game-detail-lb-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.dev-game-detail-lb-select {
  padding: 0.5rem 0.75rem;
  font-size: var(--vs-text-base);
  border-radius: 8px;
  border: 1px solid var(--vs-border);
  background: var(--vs-card);
  color: var(--vs-text);
  min-width: 12rem;
}

.dev-game-detail-lb-load {
  padding: 0.5rem 1rem;
  font-size: var(--vs-text-base);
  border-radius: 8px;
  border: none;
  background: var(--vs-primary);
  color: var(--vs-act-ink);
  cursor: pointer;
  font-weight: 500;
}

.dev-game-detail-lb-load:hover:not(:disabled) {
  background: var(--vs-primary-hover);
}

.dev-game-detail-lb-load:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dev-game-detail-lb-table-wrap {
  margin-top: 1.25rem;
  overflow-x: auto;
}

.dev-game-detail-lb-table th,
.dev-game-detail-lb-table td {
  white-space: nowrap;
}

.dev-game-detail-lb-table td {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.dev-game-detail-analytics {
  margin-top: 1.5rem;
}

.dev-game-detail-summary {
  margin-bottom: 1.5rem;
}

.dev-game-detail-analytics-days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dev-game-detail-analytics-day-btn {
  padding: 0.35rem 0.75rem;
  font-size: var(--vs-text-base);
  border-radius: 6px;
  border: 1px solid var(--vs-border);
  background: transparent;
  color: var(--vs-text-muted);
  cursor: pointer;
}

.dev-game-detail-analytics-day-btn:hover {
  color: var(--vs-text);
  border-color: var(--vs-text-muted);
}

.dev-game-detail-analytics-day-btn--active {
  background: var(--vs-primary);
  border-color: var(--vs-primary);
  color: var(--vs-act-ink);
}

.dev-game-detail-analytics-h3 {
  margin: 0 0 0.75rem;
  font-size: var(--vs-text-md);
  font-weight: 600;
  color: var(--vs-text);
}

.dev-game-detail-funnel {
  margin-bottom: 1.5rem;
}

.dev-game-detail-funnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
}

.dev-game-detail-funnel-item {
  padding: 0.75rem 1rem;
  border: 1px solid var(--vs-border);
  border-radius: 8px;
  background: var(--vs-void);
}

.dev-game-detail-funnel-label {
  display: block;
  font-size: var(--vs-text-sm);
  color: var(--vs-text-muted);
  margin-bottom: 0.25rem;
}

.dev-game-detail-funnel-value {
  font-size: var(--vs-text-lg);
  font-weight: 600;
  color: var(--vs-text);
}

.dev-game-detail-daily-totals {
  margin-bottom: 1.5rem;
}

.dev-game-detail-top-events {
  margin-top: 0.5rem;
}

.dev-game-detail-top-events .dev-game-detail-table {
  margin-top: 0.5rem;
}

/* Template creator: type + presets + JSON */
.dev-template-create-type {
  margin-bottom: 1.5rem;
}
.dev-template-create-type label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--vs-text);
}
.dev-template-create-type-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.dev-template-create-type-options input {
  margin-right: 0.35rem;
}
.dev-template-create-row {
  display: grid;
  grid-template-columns: 200px minmax(32rem, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 720px) {
  .dev-template-create-row {
    grid-template-columns: 1fr;
  }
}
.dev-template-create-presets {
  border: 1px solid var(--vs-border);
  border-radius: 8px;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
}
.dev-template-create-presets h4 {
  margin: 0 0 0.5rem;
  font-size: var(--vs-text-base);
  color: var(--vs-text-muted);
}
.dev-template-create-preset-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.25rem;
  border: 1px solid var(--vs-border);
  border-radius: 6px;
  background: var(--vs-card);
  color: var(--vs-text);
  cursor: pointer;
  font-size: var(--vs-text-base);
}
.dev-template-create-preset-btn:hover {
  background: var(--vs-deck-hi);
  border-color: var(--vs-primary);
}
.dev-template-create-preset-btn.active {
  border-color: var(--vs-primary);
  background: var(--vs-act-wash);
  color: var(--vs-primary);
}
.dev-template-create-json-wrap {
  min-width: 0;
}
.dev-template-create-json-wrap label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--vs-text);
}
.dev-template-create-json-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.dev-template-create-json-wrap textarea {
  width: 100%;
  min-width: 32rem;
  min-height: 280px;
  font-family: var(--vs-mono);
  font-size: var(--vs-text-base);
  resize: vertical;
}

/* —— Game overview (mock-aligned dashboard) —— */
.dev-game-overview-flash {
  margin: 0 0 1rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: var(--vs-on-wash);
  border: 1px solid var(--vs-on);
  color: var(--vs-on);
  font-size: var(--vs-text-base);
}

.dev-game-overview-hero {
  margin-bottom: 1.5rem;
}

.dev-game-overview-hero-main {
  background: var(--vs-card);
  border: 1px solid var(--vs-border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.dev-game-overview-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.dev-game-overview-brand {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  min-width: 0;
}

.dev-game-overview-icon-wrap {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  border: 1px solid var(--vs-border);
  background: var(--vs-void);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dev-game-overview-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dev-game-overview-icon-fallback {
  font-size: var(--vs-text-2xl);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--vs-act-ink);
  background: var(--vs-act-fill);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-game-overview-headlines {
  min-width: 0;
}

.dev-game-overview-title {
  margin-top: 0;
}

.dev-game-overview-edit-btn {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  background: var(--vs-primary);
  color: var(--vs-act-ink) !important;
  border-radius: 8px;
  text-decoration: none;
  font-size: var(--vs-text-base);
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s;
}

.dev-game-overview-edit-btn:hover {
  background: var(--vs-primary-hover);
}

.dev-game-overview-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.dev-game-overview-delete-btn {
  padding: 0.55rem 1rem;
  background: transparent;
  color: var(--vs-fault);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: var(--vs-text-base);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s;
}

.dev-game-overview-delete-btn:hover:not(:disabled) {
  background: var(--vs-fault-wash);
  color: var(--vs-fault);
  border-color: transparent;
}

.dev-game-overview-delete-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.dev-game-overview-meta {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .dev-game-overview-meta {
    grid-template-columns: 1fr 1fr;
  }
}

.dev-game-overview-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 1fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .dev-game-overview-grid {
    grid-template-columns: 1fr;
  }
}

.dev-game-overview-card {
  background: var(--vs-card);
  border: 1px solid var(--vs-border);
  border-radius: 12px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.dev-game-overview-card-title {
  margin: 0 0 1rem;
  font-size: var(--vs-text-lg);
  font-weight: 600;
  color: var(--vs-text);
}

.dev-game-overview-stats-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0 0 1rem;
  font-size: var(--vs-text-base);
  color: var(--vs-text-muted);
}

.dev-game-overview-stats-totals strong {
  color: var(--vs-text);
  font-weight: 600;
  margin-left: 0.25rem;
}

.dev-game-overview-table-wrap {
  overflow-x: auto;
}

.dev-game-overview-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--vs-text-base);
}

.dev-game-overview-stats-table th,
.dev-game-overview-stats-table td {
  text-align: right;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--vs-rail-soft);
  color: var(--vs-text);
}

.dev-game-overview-stats-table thead th {
  text-align: right;
  color: var(--vs-text-muted);
  font-size: var(--vs-text-sm);
}

.dev-game-overview-stats-table thead th:first-child,
.dev-game-overview-stats-table tbody th {
  text-align: left;
}

.dev-game-overview-stats-table tbody th {
  font-weight: 500;
  color: var(--vs-text-muted);
}

.dev-game-overview-sample-note {
  margin: 0.85rem 0 0;
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
  line-height: 1.35;
}

.dev-game-overview-performance-card .perf-preview {
  margin-top: -0.25rem;
}

.dev-game-overview-performance-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.dev-game-overview-performance-head .dev-game-overview-card-title {
  margin-bottom: 0;
}

.dev-game-overview-series-select-label {
  margin: 0;
}

.dev-game-overview-series-select {
  padding: 0.4rem 2rem 0.4rem 0.65rem;
  font-size: var(--vs-text-sm);
  border-radius: 8px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-void);
  color: var(--vs-chalk);
  cursor: pointer;
  max-width: min(100%, 22rem);
}

.dev-game-overview-series-select option {
  color: var(--vs-chalk);
  background: var(--vs-void);
}

.dev-game-overview-series-title {
  margin: 0 0 0.35rem;
  font-size: var(--vs-text-base);
  font-weight: 600;
  color: var(--vs-text);
}

.dev-game-overview-sdk-restricted {
  font-size: var(--vs-text-base);
  color: var(--vs-text-muted);
  line-height: 1.45;
}

.dev-game-overview-metrics-error {
  margin: 0 0 0.75rem;
  font-size: var(--vs-text-base);
  color: var(--vs-fault);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Integration health card */
.dev-game-overview-advice { list-style: none; padding: 0; margin: 0 0 12px; }
.dev-game-overview-advice li { padding: 8px 10px; border-radius: 6px; margin-bottom: 6px; font-size: var(--vs-text-base); }
.dev-game-overview-advice-problem { background: var(--vs-fault-wash); border-left: 3px solid var(--vs-fault); }
.dev-game-overview-advice-warning { background: var(--vs-warn-wash); border-left: 3px solid var(--vs-warn); }
.dev-game-overview-advice-info { background: var(--vs-act-wash); border-left: 3px solid var(--vs-act); }
.dev-game-overview-hourly { display: flex; align-items: flex-end; gap: 3px; height: 44px; margin: 8px 0 12px; }
.dev-game-overview-hourly-bar { flex: 1; min-width: 4px; background: var(--vs-act); border-radius: 2px 2px 0 0; position: relative; }
.dev-game-overview-hourly-err { position: absolute; left: 0; right: 0; bottom: 0; background: var(--vs-fault); border-radius: 0 0 2px 2px; }
.ges-desc {
  margin: 0 0 0.75rem;
  font-size: var(--vs-text-base);
  color: var(--vs-dim);
  max-width: 70ch;
}

.ges-muted {
  color: var(--vs-dim);
  font-size: var(--vs-text-sm);
}

.ges-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

.ges-notice {
  margin: 0.5rem 0;
  color: var(--vs-on);
}

.ges-error {
  margin: 0.5rem 0;
  color: var(--vs-fault);
}

.ges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.ges-grid label,
.ges-template {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: var(--vs-text-base);
}

.ges-grid input,
.ges-grid select,
.ges-template textarea {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-void);
  color: var(--vs-chalk);
  font: inherit;
  color-scheme: dark;
}

.ges-template textarea {
  font-family: var(--vs-mono);
  font-size: var(--vs-text-sm);
  line-height: 1.45;
}

.ges-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

/* What each run of a series is: its format and prizes in words, and three ways to set them. */
.ges-run {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  padding: var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
}

.ges-run-title {
  margin: 0;
  font-size: var(--vs-text-base);
  font-weight: 600;
}

.ges-run-summary {
  margin: 0;
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

.ges-run-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vs-s2);
}

.ges-preview {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--vs-void);
}

.ges-preview h4 {
  margin: 0 0 0.4rem;
  font-size: var(--vs-text-base);
}

.ges-preview ul {
  margin: 0;
  padding-inline-start: 1.1rem;
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

.ges-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--vs-text-base);
}

.ges-table th,
.ges-table td {
  text-align: start;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--vs-rail-soft);
  vertical-align: top;
}

.ges-table th {
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

.ges-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ges-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--vs-act);
  font: inherit;
  cursor: pointer;
}

.ges-link--danger {
  color: var(--vs-fault);
}

.ges-chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: var(--vs-text-sm);
  background: var(--vs-deck-hi);
}

.ges-chip--live {
  background: var(--vs-on-wash);
  color: var(--vs-on);
}

.ges-chip--pending {
  background: var(--vs-act-wash);
  color: var(--vs-act);
}

.ges-chip--paused {
  background: var(--vs-warn-wash);
  color: var(--vs-warn);
}

/* ------------------------------------------------------------------------------------
 * Schedule cards.
 *
 * Same frame as an event card (GameEvents.css) so the two screens read as one family.
 * What changes is the hierarchy: an event card foregrounds the tournament, a schedule
 * card foregrounds when the automation next fires, because that is the thing a developer
 * is actually checking.
 * ---------------------------------------------------------------------------------- */

.ges {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  min-width: 0;
}

/* The page still carries legacy cards for the header and the create form; give them the
   spacing the shared container used to swallow. */
.ges > .dev-game-detail-card {
  margin: 0;
}

.ges-card {
  font-variant-numeric: tabular-nums;
}

/* ---- Next event: the strongest detail after the name ---- */

.ges-next {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
}

.ges-next-label {
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

.ges-next-when {
  font-size: var(--vs-text-lg);
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--vs-chalk);
}

.ges-next-rel {
  font-size: var(--vs-text-sm);
  color: var(--vs-warn);
}

.ges-next-none {
  font-size: var(--vs-text-base);
  color: var(--vs-dim);
  line-height: 1.45;
}

.ges-current-link {
  color: var(--vs-act);
  text-decoration: none;
}

.ges-current-link:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

/* ---- Footer: three labelled actions plus the destructive one behind an overflow ---- */

.ges-foot {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--vs-s2);
}

.ges-menu {
  margin-inline-start: auto;
}

.ges-msg {
  margin: 0;
  font-size: var(--vs-text-base);
}

.ges-dst {
  margin: var(--vs-s3) 0 0;
  padding: var(--vs-s3);
  border-inline-start: 3px solid var(--vs-warn);
  border-radius: var(--vs-r-sm);
  background: var(--vs-warn-wash);
  font-size: var(--vs-text-sm);
  line-height: 1.55;
  color: var(--vs-chalk);
  max-width: 80ch;
}

/* The series a link opened (?series=), so staff arriving from VS Casa see which one it is. */
.gev-card.ges-card--focus {
  border-color: var(--vs-act);
}
/* A game's analytics. Tokens only (scripts/check-token-colours.mjs). Figures, tables and panels are shared primitives. */

.gan-chart {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  margin-top: var(--vs-s5);
}

.gan-chart-pick {
  align-self: flex-start;
}

.gan-more {
  margin-top: var(--vs-s2);
}

/* vsp-kv is a two-column grid of dt and dd; these wrappers join it. */
.gan-kv-row {
  display: contents;
}

.gan-event-link,
.gan-event-link:hover {
  color: var(--vs-chalk);
}

.gan-reasons {
  margin-top: var(--vs-s4);
}
/* Prizes as rows. Tokens only (scripts/check-token-colours.mjs). */

.pre {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  min-width: 0;
}

.pre-rows {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.pre-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--vs-s3);
  padding: var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
}

.pre-everyone {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--vs-text-sm);
  color: var(--vs-chalk);
}

/* Sits level with the fields rather than with their labels. */
.pre-remove {
  width: 44px;
  height: 44px;
}

.pre-remove svg {
  flex: none;
}

.pre-problem {
  grid-column: 1 / -1;
}

.pre-add {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--vs-s2);
}

.pre-add-hint {
  flex: 1 1 16rem;
}

.pre-json {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  margin-top: var(--vs-s2);
}

@media (max-width: 760px) {
  .pre-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pre-name,
  .pre-key {
    grid-column: 1 / -1;
  }

  .pre-remove {
    grid-column: 2;
    grid-row: 1;
  }
}
/* The integrity screens: participants' status and actions, the event page's integrity and prize panels, the bans tab
 * and the integrity dialogs. Tokens only (scripts/check-token-colours.mjs checks this folder).
 *
 * Colour means state here as everywhere: a disqualification is fault, a ban is quiet (present, nothing to do), and a
 * given prize that was superseded is warn, because the studio has to look at it.
 */

/* ---------------------------------------------------------------- A participant */

/* Wide enough that the kind, the short id and Copy stay on one line in a narrow table column. */
.itg-subject {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 10rem;
}

.itg-subject-name {
  color: var(--vs-chalk);
  font-weight: 550;
  overflow-wrap: anywhere;
}

/* A squad row's per-player actions, one under another, lined up with the other rows' single action. */
.itg-member-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--vs-s1);
}

.itg-subject-note {
  color: var(--vs-faint);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.itg-subject-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s1) var(--vs-s2);
  flex-wrap: wrap;
}

.itg-kind {
  padding: 0 0.45rem;
  font-size: 0.6875rem;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- Status badges in a cell */

.itg-badges {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s1);
  flex-wrap: wrap;
}

/* A row removed from the results: still readable, plainly not part of the standings. */
.vsp-table tbody tr.itg-row--removed :is(th, td) {
  color: var(--vs-dim);
}

.vsp-table tbody tr.itg-row--removed .itg-subject-name {
  color: var(--vs-dim);
}

/* The heading row between the ranked rows and the removed ones. */
.vsp-table tbody tr.itg-group-row :is(th, td) {
  padding-top: var(--vs-s4);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vs-dim);
  border-bottom-color: var(--vs-rail);
}

.vsp-table tbody tr.itg-group-row:hover {
  background: transparent;
}

/* ---------------------------------------------------------------- Dialog body */

.itg-consequences {
  margin: 0 0 var(--vs-s3);
  padding-inline-start: var(--vs-s4);
  display: flex;
  flex-direction: column;
  gap: var(--vs-s1);
}

.itg-dialog-field {
  margin-top: var(--vs-s4);
}

.itg-dialog-notice {
  margin-top: var(--vs-s3);
}

/* The hint under a checkbox lines up with its label, not with the box. */
.itg-checkbox-hint {
  margin-top: var(--vs-s1);
  padding-inline-start: calc(1rem + var(--vs-s2));
}

/* ---------------------------------------------------------------- Panels on the event page */

/* The event page spaces its cards this far apart, and a page notice sits the same distance above them. */
.itg-panel,
.itg-page-notice {
  margin-bottom: var(--vs-s5);
}

.itg-panel-actions {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

.itg-panel .vsp-notice {
  margin-bottom: var(--vs-s4);
}

.itg-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--vs-s3);
  margin: 0 0 var(--vs-s4);
}

.itg-count {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.1rem;
  padding: var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-void);
}

.itg-count dt {
  font-size: 0.75rem;
  color: var(--vs-dim);
}

.itg-count dd {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
  color: var(--vs-chalk);
  font-variant-numeric: tabular-nums;
}

.itg-count--warn {
  border-color: var(--vs-warn);
}

.itg-count--warn dd {
  color: var(--vs-warn);
}

/* On a phone each count is one short line, the number first, rather than three tall tiles. */
@media (max-width: 560px) {
  .itg-counts {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--vs-s2);
  }

  .itg-count {
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: baseline;
    gap: var(--vs-s2);
    padding: var(--vs-s2) var(--vs-s3);
  }

  .itg-count dd {
    font-size: 1rem;
  }
}

/* ---------------------------------------------------------------- The integrity log */

.itg-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.itg-log-item {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s1);
  padding: var(--vs-s3) 0;
  border-bottom: 1px solid var(--vs-rail-soft);
}

.itg-log-item:last-child {
  border-bottom: none;
}

.itg-log-head {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--vs-chalk);
}

.itg-log-subject {
  font-weight: 550;
  overflow-wrap: anywhere;
}

.itg-log-time {
  margin-inline-start: auto;
  font-size: 0.75rem;
  color: var(--vs-faint);
  white-space: nowrap;
}

.itg-log-by {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.itg-log-reason {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--vs-chalk);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.itg-more {
  margin-top: var(--vs-s2);
}

/* ---------------------------------------------------------------- History rows */

/* A revoked or replaced award, or a lifted ban: kept for the record, plainly no longer in force. */
.vsp-table tbody tr.itg-row--inactive :is(th, td),
.vsp-table tbody tr.itg-row--inactive .itg-subject-name {
  color: var(--vs-faint);
}

/* ---------------------------------------------------------------- Prize review row (inside the event's info card) */

.itg-review {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- Bans tab */

.itg-bans {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  min-width: 0;
}

.itg-bans-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--vs-s3) var(--vs-s4);
  flex-wrap: wrap;
}

.itg-bans-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 650;
  color: var(--vs-chalk);
}

/* A reason can run to a paragraph: it gets room to read rather than being squeezed to a word a line on a phone. The
   table scrolls instead. */
.itg-reason-cell {
  min-width: 14rem;
}

.itg-reason {
  display: block;
  max-width: 32rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.itg-link {
  color: var(--vs-act);
  text-decoration: none;
}

.itg-link:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

.itg-deliver {
  margin-top: var(--vs-s1);
}
/* Event templates. Tokens only (scripts/check-token-colours.mjs); the table, panels and fields are shared primitives. */

/* App.css gives a bare form a 360px flex column; this form sets its own shape. */
.gt-form {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  max-width: none;
}

.gt-json {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  margin-top: var(--vs-s2);
}

.gt-name {
  max-width: 28rem;
}
/* Hosted matches on the game's matchmaking page. Token only: every colour comes from
   src/styles/tokens.css (checked by scripts/check-token-colours.mjs). Layout only here. */

.hmp-access {
  margin: 0 0 var(--vs-s1);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--vs-chalk);
  max-width: 72ch;
}

/* The access sentence's link to Billing. Colour restated on hover, or the starter globals turn it indigo. */
.hmp-access a,
.hmp-access a:hover {
  color: var(--vs-act);
}

.hmp-summary {
  margin-bottom: var(--vs-s4);
}

.hmp-stats {
  grid-template-columns: minmax(0, 12rem);
  margin-bottom: var(--vs-s4);
}

.hmp-recent-title {
  margin-bottom: var(--vs-s2);
}

.hmp-why {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  margin-top: var(--vs-s2);
}

.hmp-advanced {
  padding-top: var(--vs-s4);
  border-top: 1px solid var(--vs-rail-soft);
}

.hmp-notice {
  margin-bottom: var(--vs-s4);
}

/* App.css gives a bare form a 360px flex column; this form sets its own shape. */
.hmp-form {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s5);
  max-width: none;
}

.hmp-group {
  margin: 0;
  padding: var(--vs-s4) 0 0;
  border: none;
  border-top: 1px solid var(--vs-rail-soft);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
}

.hmp-legend {
  padding: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

.hmp-grid {
  margin-top: var(--vs-s1);
}

.hmp-number {
  max-width: 12rem;
}

.hmp-sides {
  max-width: 32rem;
}

/* A choice group or a segmented control that a refusal points at takes focus; mark it as the one at fault. */
.hmp [data-field][tabindex='-1']:focus {
  outline: 2px solid var(--vs-fault);
  outline-offset: 4px;
  border-radius: var(--vs-r-sm);
}

.hmp .vsp-seg-btn:disabled {
  cursor: default;
  opacity: 0.6;
}

/* A result mode the rules module rules out (or one that needs a module). The hover border is restated so a card that
   cannot be chosen does not light up under the pointer. */
.hmp .vsp-choice:has(input:disabled) {
  cursor: default;
  opacity: 0.6;
}

.hmp .vsp-choice:has(input:disabled):hover {
  border-color: var(--vs-rail-soft);
}

.hmp-actions {
  padding-top: var(--vs-s4);
  border-top: 1px solid var(--vs-rail-soft);
}

.hmp-actions-msg {
  margin-inline-start: var(--vs-s2);
}
/* The queue form. Tokens only (scripts/check-token-colours.mjs). The table, panels and buttons are shared primitives. */

.mm-form {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  margin-top: var(--vs-s4);
  padding: var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
}

.mm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--vs-s3);
}

.mm-fr {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.3rem;
}

.mm-fr label {
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

.mm-fr input:not([type='checkbox']) {
  min-height: 44px;
  box-sizing: border-box;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
  color: var(--vs-chalk);
  font: inherit;
  font-size: var(--vs-text-base);
  color-scheme: dark;
}

.mm-premium-toggle {
  padding-top: var(--vs-s3);
  border-top: 1px solid var(--vs-rail-soft);
  font-size: var(--vs-text-base);
}

.mm-premium {
  padding: var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
}
/* Game storage. Tokens only (scripts/check-token-colours.mjs). */

.gst-doc,
.gst-doc:hover {
  color: var(--vs-act);
}

.gst-collection {
  max-width: 24rem;
  margin-bottom: var(--vs-s4);
}

/* App.css gives a bare form a 360px flex column; this one is a row. */
.gst-add {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--vs-s2);
  max-width: none;
  margin-bottom: var(--vs-s4);
}

.gst-add-field {
  flex: 1 1 14rem;
  max-width: 24rem;
}

.gst-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr);
  gap: var(--vs-s4);
  align-items: start;
}

.gst-keys {
  display: flex;
  flex-direction: column;
  max-height: 22rem;
  overflow: auto;
  list-style: none;
  margin: 0;
  padding: var(--vs-s1);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
}

.gst-key {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 0.35rem 0.6rem;
  border: 0;
  border-radius: var(--vs-r-sm);
  background: transparent;
  color: var(--vs-chalk);
  font: inherit;
  font-size: var(--vs-text-base);
  text-align: start;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.gst-key:hover {
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
}

.gst-key[aria-pressed='true'] {
  background: var(--vs-act-wash);
  color: var(--vs-chalk);
}

.gst-key:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-act);
}

.gst-value {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  min-width: 0;
}

.gst-about {
  margin-top: var(--vs-s4);
}

.gst-about-body {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  margin-top: var(--vs-s2);
}

@media (max-width: 760px) {
  .gst-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .gst-key {
    min-height: 44px;
  }
}
/* Webhooks. Tokens only (scripts/check-token-colours.mjs). Fields, tables, badges and buttons are shared primitives. */

/* App.css gives a bare form a 360px flex column; this form sets its own shape. */
.gwh-form {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  max-width: 44rem;
}

.gwh-events {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  margin: 0;
  padding: 0;
  border: 0;
}

.gwh-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--vs-s2);
}

.gwh-about {
  max-width: 76ch;
  margin-top: var(--vs-s2);
}

.gwh-endpoint {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
}

.gwh-endpoint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s3);
  flex-wrap: wrap;
}

.gwh-url {
  font-size: var(--vs-text-base);
  overflow-wrap: anywhere;
}

.gwh-line {
  margin: 0;
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

.gwh-secret {
  margin-top: var(--vs-s2);
}

.gwh-secret-value {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--vs-s1);
}

.gwh-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--vs-s1);
  margin-top: var(--vs-s2);
  padding-top: var(--vs-s3);
  border-top: 1px solid var(--vs-rail-soft);
}

.gwh-deliveries {
  margin-top: var(--vs-s3);
}

.gwh-deliveries-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s2);
  margin-bottom: var(--vs-s2);
}
.elo-ladder-callout {
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0 1rem;
  border: 1px solid var(--vs-border, #334155);
  background: rgba(15, 23, 42, 0.6);
}

.elo-ladder-callout--detail {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
}

.elo-ladder-callout--form {
  max-width: 100%;
}

.elo-ladder-callout--ladder {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(120, 53, 15, 0.2);
}

.elo-ladder-callout--ranked {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(30, 58, 138, 0.25);
}

.elo-ladder-callout__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  color: var(--vs-text, #f1f5f9);
  opacity: 0.95;
}

.elo-ladder-callout__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--vs-text-muted, #94a3b8);
}

.elo-ladder-callout__text strong {
  color: var(--vs-text, #f1f5f9);
  font-weight: 600;
}
/* Create event — centered card, uses space well */

.dev-create-event {
  /* Local names kept so every rule below still resolves, but they now read from
     src/styles/tokens.css instead of a private palette. The field background in
     particular was pure black and the card was #111. */
  --vs-primary: var(--vs-act-fill);
  --vs-primary-hover: var(--vs-act-fill-hi);
  --vs-link: var(--vs-act);
  --vs-bg: var(--vs-void);
  --vs-card: var(--vs-deck);
  --vs-text: var(--vs-chalk);
  --vs-text-muted: var(--vs-dim);
  --vs-border: var(--vs-rail);

  width: 100%;
  box-sizing: border-box;
  font-family: var(--vs-font);
}

.dev-create-event-back {
  color: var(--vs-link);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.dev-create-event-back:hover {
  text-decoration: underline;
}

.dev-create-event-muted {
  color: var(--vs-text-muted);
  margin: 1rem 0;
}

.dev-create-event-hint {
  color: var(--vs-text-muted);
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

/* Centered card: block + margin auto so it always centers in the main area */
.dev-create-event-card {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: var(--vs-card);
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-r-md);
  padding: var(--vs-s5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.dev-create-event-card h1 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--vs-text);
}

.dev-create-event-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.dev-create-event-mode {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--vs-border);
  background: transparent;
  color: var(--vs-text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dev-create-event-mode:hover {
  color: var(--vs-text);
  border-color: var(--vs-text-muted);
}

.dev-create-event-mode.active {
  background: var(--vs-primary);
  color: #fff;
  border-color: var(--vs-primary);
}

.dev-create-event-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dev-create-event-section {
  margin-bottom: 1.5rem;
}

.dev-create-event-section h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--vs-text-muted);
}

.dev-create-event-subsection {
  margin: 1rem 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--vs-text-muted);
}

.dev-create-event-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--vs-text);
  margin-bottom: 0.35rem;
  margin-top: 0.75rem;
}

.dev-create-event-label:first-of-type {
  margin-top: 0;
}

.dev-create-event-label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dev-create-event-label-text {
  font-weight: 500;
}

.dev-create-event-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dev-create-event-info-wrap--inline {
  margin-left: 0.25rem;
}

.dev-create-event-info-icon {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 1px solid var(--vs-text-muted);
  color: var(--vs-text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}

.dev-create-event-info-icon:hover {
  color: var(--vs-text);
  border-color: var(--vs-text-muted);
}

.dev-create-event-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  padding: 0.5rem 0.65rem;
  max-width: 280px;
  width: max-content;
  background: #1e293b;
  border: 1px solid var(--vs-border);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--vs-text);
  line-height: 1.4;
  white-space: normal;
  /* Not just invisible: a hidden box this wide still widened the page on a phone. */
  display: none;
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dev-create-event-info-wrap:hover .dev-create-event-tooltip {
  display: block;
}

.dev-create-event-input {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  box-sizing: border-box;
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-r-sm);
  font-size: 0.9375rem;
  color: var(--vs-text);
  background: var(--vs-bg);
  outline: none;
  color-scheme: dark;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dev-create-event-input:hover {
  border-color: var(--vs-faint);
}

.dev-create-event-input:focus {
  border-color: var(--vs-act);
  box-shadow: 0 0 0 3px var(--vs-act-wash);
}

.dev-create-event-input::placeholder {
  color: var(--vs-text-muted);
}

select.dev-create-event-input {
  cursor: pointer;
  appearance: auto;
}

textarea.dev-create-event-input {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.dev-create-event-check {
  display: flex;
  /* Explicit: App.css sets `form label { flex-direction: column }`, which stacked the
     checkbox above its own text and centred both. */
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--vs-text);
  cursor: pointer;
}

.dev-create-event-check input {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.dev-create-event-error {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: #f87171;
}

.dev-create-event-btn {
  width: 100%;
  padding: 0.75rem 1.25rem;
  margin-top: 0.5rem;
  background: var(--vs-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.dev-create-event-btn:hover:not(:disabled) {
  background: var(--vs-primary-hover);
}

.dev-create-event-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ELO: separate “Ladder vs Ranked” from optional tier JSON */
.dev-create-event-elo-tiers-panel {
  margin-top: 0.25rem;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 10px;
  border: 1px dashed var(--vs-border);
  background: rgba(15, 23, 42, 0.35);
}

.dev-create-event-elo-tiers-panel-title {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--vs-text-muted);
}

.dev-create-event-elo-tiers-panel-hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--vs-text-muted);
}

.dev-create-event-elo-tiers-panel-hint strong {
  color: var(--vs-text);
  font-weight: 600;
}

/* ------------------------------------------------------------------------------------
 * Create event, restructured.
 *
 * The form used to be one 360px column inside an 885px panel, so most of every row was
 * empty. It is now a form column beside a summary that reads back what is about to be
 * created, which both uses the space and catches mistakes before submitting.
 *
 * The format-specific blocks still use the .dev-create-event-* classes; they are styled
 * as panels here rather than rewritten, so no format-specific control moved.
 * ---------------------------------------------------------------------------------- */

.cev {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  min-width: 0;
}

.cev-crumbs {
  display: flex;
  align-items: center;
  gap: var(--vs-s1);
  font-size: 0.8125rem;
  color: var(--vs-faint);
}

.cev-crumb {
  color: var(--vs-dim);
  text-decoration: none;
}

a.cev-crumb:hover {
  color: var(--vs-chalk);
}

.cev-crumb--here {
  color: var(--vs-chalk);
  font-weight: 550;
}

.cev-notice {
  margin: 0;
}

.cev-head h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--vs-chalk);
}

.cev-head-sub {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--vs-dim);
}

/* ---- Two columns: the form, and what it adds up to ---- */

.cev-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  gap: var(--vs-s4);
  align-items: start;
}

@media (max-width: 1040px) {
  .cev-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cev-main,
.cev-form {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  min-width: 0;
  /* App.css caps the bare `form` element at 360px, which is where the narrow column came
     from in the first place. */
  max-width: none;
}

.cev-panel,
.cev-main .dev-create-event-section {
  padding: var(--vs-s5);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
}

/* The legacy blocks lay out label/control pairs as plain siblings; keep them readable
   without touching their markup. */
.cev-main .dev-create-event-section {
  gap: 0.35rem;
}

.cev-main .dev-create-event-section > h2 {
  margin: 0 0 var(--vs-s2);
  font-size: 1rem;
  font-weight: 650;
  color: var(--vs-chalk);
  text-transform: none;
  letter-spacing: -0.005em;
}

.cev-main .dev-create-event-section > .dev-create-event-label {
  margin-top: var(--vs-s3);
}

.cev-panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  color: var(--vs-chalk);
}

.cev-panel-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--vs-dim);
  max-width: 70ch;
}

/* ---- Format picker ---- */

.cev-variants {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  flex-wrap: wrap;
}

.cev-variants-label {
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.cev-format-done {
  display: flex;
  justify-content: flex-end;
}

.cev-format-chosen {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
}

.cev-format-chosen-text {
  display: flex;
  align-items: baseline;
  gap: var(--vs-s2);
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.cev-format-chosen-text strong {
  font-size: 0.9375rem;
  color: var(--vs-chalk);
}

.cev-format-chosen-variant {
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

/* ---- Guest toggle ---- */

.cev-toggle-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

/* ---- Prizes ---- */

.cev-prize-readout {
  padding: var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
}

.cev-prize-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cev-prize-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--vs-s3);
  font-size: 0.8125rem;
}

.cev-prize-place {
  color: var(--vs-dim);
}

.cev-adv > summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0;
  list-style: none;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--vs-dim);
  border-radius: var(--vs-r-sm);
}

.cev-adv > summary::-webkit-details-marker {
  display: none;
}

.cev-adv > summary::before {
  content: "";
  width: 0;
  height: 0;
  flex: none;
  border-left: 4px solid currentColor;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  transition: transform 0.15s ease;
}

.cev-adv[open] > summary::before {
  transform: rotate(90deg);
}

.cev-adv > summary:hover {
  color: var(--vs-chalk);
}

.cev-adv > summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-deck), 0 0 0 4px var(--vs-act);
}

.cev-adv > * + * {
  margin-top: var(--vs-s2);
}

/* ---- Summary ---- */

.cev-summary {
  min-width: 0;
}

.cev-summary-card {
  position: sticky;
  top: var(--vs-s4);
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  padding: var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  font-variant-numeric: tabular-nums;
}

.cev-summary-game {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  padding-bottom: var(--vs-s2);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.cev-summary-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck-hi);
  color: var(--vs-dim);
}

.cev-summary-gname {
  font-size: 0.8125rem;
  color: var(--vs-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cev-summary-name {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--vs-chalk);
  overflow-wrap: anywhere;
}

.cev-summary-format {
  margin: -0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.cev-summary-facts {
  margin: var(--vs-s2) 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cev-summary-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--vs-s3);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--vs-rail-soft);
}

.cev-summary-facts > div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cev-summary-facts dt {
  font-size: 0.75rem;
  color: var(--vs-dim);
  flex: none;
}

.cev-summary-facts dd {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--vs-chalk);
  text-align: end;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---- Action bar ---- */

.cev-bar {
  margin-top: 0;
}

/* Two buttons on one row. The bar stays on screen, so three stacked rows cost a phone a sixth of its height; Cancel is the
   back gesture there. An error still shows, on its own row. */
@media (max-width: 560px) {
  .cev-bar > .vsp-actionbar-msg:not(.vsp-actionbar-msg--error),
  .cev-bar > a.vsp-btn {
    display: none;
  }

  .cev-bar > .vsp-actionbar-msg {
    flex-basis: 100%;
  }

  .cev-bar > .vsp-btn {
    flex: 1;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cev-adv > summary::before {
    transition: none;
  }
}

/* Three classes both event forms have always used with no rule behind them, so every
   "two fields on a row" in the promo and score-range blocks was quietly stacking. */
.dev-create-event-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--vs-s3);
}

@media (max-width: 560px) {
  .dev-create-event-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dev-create-event-subsection-wrap {
  margin-top: var(--vs-s4);
  padding: var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
}

.dev-create-event-success {
  margin: var(--vs-s3) 0 0;
  font-size: 0.875rem;
  color: var(--vs-on);
}

/* On a phone a hint spans the screen, so it can never hang off either edge. */
@media (max-width: 560px) {
  .dev-create-event-tooltip {
    position: fixed;
    inset-inline: var(--vs-s4);
    bottom: auto;
    left: var(--vs-s4);
    width: auto;
    max-width: none;
    transform: none;
  }
}
/* One event, inside the game page. Tokens only (scripts/check-token-colours.mjs). Panels, tables and buttons are the
 * shared vsp-* primitives; this file lays out the head and the facts under it. */

.ev {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s5);
  min-width: 0;
  color: var(--vs-chalk);
}

/* The panels carry their own bottom margin for pages that stack them; here the column's gap does that job. */
.ev > :is(.itg-panel, .itg-page-notice, .brk-panel) {
  margin-bottom: 0;
}

.ev-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--vs-s3) var(--vs-s4);
  flex-wrap: wrap;
}

.ev-head-text {
  min-width: 0;
}

.ev-title {
  margin: 0;
  font-size: var(--vs-text-xl);
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ev-format {
  margin: var(--vs-s1) 0 0;
  font-size: var(--vs-text-base);
  color: var(--vs-dim);
}

.ev-head-actions {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
}

.ev-fact-link,
.ev-fact-link:hover {
  align-self: flex-start;
  font-size: var(--vs-text-sm);
  color: var(--vs-act);
}

.ev-prizes td:first-child {
  white-space: nowrap;
  color: var(--vs-dim);
}

.ev-review {
  margin: var(--vs-s3) 0 0;
  font-size: var(--vs-text-sm);
  color: var(--vs-chalk);
}

.ev-prize-hint {
  margin-top: var(--vs-s2);
}

.ev-sponsor-banner {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  background: var(--vs-void);
  border-radius: var(--vs-r-sm);
  margin-bottom: var(--vs-s3);
}

.ev-sponsor-row {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
}

.ev-sponsor-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--vs-r-sm);
  object-fit: contain;
  background: var(--vs-void);
}

.ev-sponsor-name {
  font-weight: 600;
}

.ev-sponsor-sub {
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

/* vsp-kv is a two-column grid of dt and dd; these wrappers join it. */
.ev-kv-row {
  display: contents;
}

.ev-tech-list {
  margin-top: var(--vs-s3);
}

.ev-id {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

.ev-pre {
  margin: 0;
  font-family: var(--vs-mono);
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 12rem;
  overflow: auto;
}

@media (max-width: 760px) {
  .ev-head-actions {
    width: 100%;
  }

  .ev-head-actions > .vsp-btn {
    flex: 1;
  }
}
/* VS Casa's launch check on the staff console's event page. Tokens only (scripts/check-token-colours.mjs). */

/* The event page spaces its cards this far apart. */
.lsc {
  margin-bottom: var(--vs-s5);
}

.lsc-notice {
  margin-bottom: var(--vs-s4);
}

.lsc-list {
  margin: var(--vs-s1) 0 0;
  padding-left: var(--vs-s4);
  font-size: 0.8125rem;
  color: var(--vs-dim);
}
/* The event page's bracket panel: the tree, the group tables and the entrants. Tokens only. Hover states restate colour and
 * border because index.css leftovers outrank bare classes.
 */

.brk-panel {
  margin-bottom: 1.5rem;
}

.brk-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
}

.brk-blocked {
  margin: calc(var(--vs-s2) * -1) 0 var(--vs-s3);
}

.brk-notice {
  margin-bottom: var(--vs-s3);
}

.brk-tabs {
  margin-bottom: var(--vs-s4);
}

.brk-show-all {
  margin-top: var(--vs-s3);
}

/* ---------------------------------------------------------------- The tree */

.brk-tree {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s5);
}

.brk-section-title {
  margin: 0 0 var(--vs-s2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

/* The rounds scroll inside the panel, never the page, so a wide bracket works at phone width. */
.brk-rounds {
  display: flex;
  align-items: stretch;
  gap: var(--vs-s4);
  padding-bottom: var(--vs-s2);
}

.brk-round {
  display: flex;
  flex: 0 0 13.5rem;
  flex-direction: column;
  min-width: 0;
}

.brk-round-title {
  margin: 0 0 var(--vs-s2);
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--vs-dim);
}

/* Spread down the column, so a later round's match sits level with the pair that feeds it. */
.brk-round-matches {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  gap: var(--vs-s3);
}

.brk-match {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
  overflow: hidden;
}

.brk-match--open {
  border-color: var(--vs-rail);
}

.brk-match-tag {
  margin: 0;
  padding: 0.2rem var(--vs-s2);
  font-size: 0.6875rem;
  color: var(--vs-dim);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.brk-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s2);
  box-sizing: border-box;
  width: 100%;
  min-height: 2.25rem;
  padding: 0.3rem var(--vs-s2);
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--vs-chalk);
  font: inherit;
  font-size: 0.8125rem;
  text-align: start;
}

.brk-side + .brk-side {
  border-top: 1px solid var(--vs-rail-soft);
}

button.brk-side {
  cursor: pointer;
}

button.brk-side:hover:not(:disabled) {
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  border-color: var(--vs-rail-soft);
}

button.brk-side:disabled {
  cursor: not-allowed;
}

button.brk-side:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: -2px;
}

.brk-side-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.brk-side-note {
  flex: none;
  font-size: 0.6875rem;
  color: var(--vs-dim);
}

.brk-side--won {
  font-weight: 600;
}

.brk-side--won .brk-side-note {
  color: var(--vs-on);
}

.brk-side--lost {
  color: var(--vs-faint);
}

.brk-side--empty {
  color: var(--vs-faint);
  font-style: italic;
}

.brk-match-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vs-s1) var(--vs-s2);
  padding: 0.3rem var(--vs-s2);
  border-top: 1px solid var(--vs-rail-soft);
}

.brk-match-note {
  font-size: 0.6875rem;
  color: var(--vs-dim);
}

.brk-match-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--vs-s1);
  margin-inline-start: auto;
}

/* ---------------------------------------------------------------- Groups */

.brk-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
  gap: var(--vs-s5);
}

.brk-group {
  min-width: 0;
}

.brk-group-table abbr {
  text-decoration: none;
}

.brk-group-table :is(th, td) {
  padding-inline: 0.35rem;
}

.brk-group-name {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem var(--vs-s2);
}

.brk-group-matches {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s1);
  margin: var(--vs-s3) 0 0;
  padding: 0;
  list-style: none;
}

.brk-group-match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vs-s1) var(--vs-s3);
  font-size: 0.8125rem;
  color: var(--vs-chalk);
}

.brk-group-vs {
  color: var(--vs-faint);
}

.brk-group-result {
  color: var(--vs-dim);
}

.brk-group-match .vsp-btn {
  margin-inline-start: auto;
}

/* ---------------------------------------------------------------- Entrants */

.brk-seed-input {
  width: 4.5rem;
  padding: 0.2rem 0.4rem;
  text-align: end;
}

.brk-entry-actions {
  white-space: nowrap;
  text-align: end;
}

.brk-entry-actions .vsp-btn + .vsp-btn {
  margin-inline-start: var(--vs-s1);
}

.brk-auto {
  margin-top: var(--vs-s4);
  padding-top: var(--vs-s3);
  border-top: 1px solid var(--vs-rail-soft);
}

.brk-auto .vsp-hint {
  margin: 0.25rem 0 0 1.5rem;
}
/* An event's players. Tokens only (scripts/check-token-colours.mjs). The table, toolbar, badges and pager are the
 * shared vsp-* primitives, and the integrity pieces (subject cell, status, removed rows) live in
 * components/integrity/Integrity.css; this file lays out the page around them. */

.dev-event-participants {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  min-width: 0;
  color: var(--vs-chalk);
}

.dev-event-participants-head {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s1);
}

.dev-event-participants-title {
  margin: 0;
  font-size: var(--vs-text-xl);
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--vs-chalk);
}

.dev-event-participants-season {
  max-width: 28rem;
}

.dev-event-participants-search {
  flex: 1 1 14rem;
  max-width: 22rem;
}

/* A rank or a detail value never wraps: a cramped number is harder to compare down the column. */
.dev-event-participants .vsp-table td {
  white-space: nowrap;
}

/* The player cell holds a name, which may wrap. */
.dev-event-participants .vsp-table td:nth-child(2) {
  white-space: normal;
}

/* The result's second line is small print, and may wrap. */
.dev-event-participants .evp-result .vsp-table-sub {
  white-space: normal;
}

/* Why a score is flagged sits under its badge, in a column that can only be so wide. */
.dev-event-participants .evp-status {
  white-space: normal;
  min-width: 9rem;
}

/* On a phone a row becomes a card, so the actions sit under the player rather than off to the side. */
@media (max-width: 760px) {
  .evp-table,
  .evp-table tbody,
  .evp-table tr,
  .evp-table td {
    display: block;
  }

  .evp-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .evp-table tr {
    padding: var(--vs-s3) 0;
    border-bottom: 1px solid var(--vs-rail-soft);
  }

  .dev-event-participants .evp-table td {
    padding: var(--vs-s1) 0;
    border: 0;
    text-align: start;
    white-space: normal;
  }

  /* The shared table shrinks this cell to its buttons, which on a card stacks them one to a line. */
  .dev-event-participants .evp-table td.vsp-actions-cell {
    width: auto;
  }

  .evp-table .vsp-table-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .evp-rank::before {
    content: "#";
    color: var(--vs-dim);
  }

  .evp-rank:has(.vsp-muted)::before {
    content: none;
  }
}
/* Layout only. Colours and every control come from styles/tokens.css. */

.companies-add-member {
  display: flex;
  align-items: flex-end;
  gap: var(--vs-s3);
  flex-wrap: wrap;
}

.companies-add-input {
  width: 15rem;
  max-width: 100%;
}

/* Lines the button up with the 44px fields beside it. */
.companies-add-submit {
  min-height: 44px;
}

@media (max-width: 640px) {
  .companies-add-member,
  .companies-add-member .vsp-field {
    width: 100%;
  }

  .companies-add-input {
    width: 100%;
    flex: 1 1 10rem;
  }
}
.company-setup-overview-intro {
  margin-bottom: 1.25rem;
  max-width: 52rem;
}

.company-setup-overview-intro a {
  color: var(--vs-act);
  text-decoration: underline;
}

.company-setup-overview-stats-wrap {
  max-width: 42rem;
}

.company-setup-overview-panel {
  margin-top: 0.5rem;
}

.company-setup {
  max-width: 56rem;
  padding: 1rem 1.25rem 2rem;
  color: var(--vs-chalk);
}

.company-setup .studio-review {
  margin-bottom: var(--vs-s4);
}

/* The same underline tabs as the game page (vsp-tab): one tab style on the site. Four tabs do not fit a phone, so the
 * row scrolls on its own rather than widening the page. */
.company-setup-tabs {
  display: flex;
  gap: var(--vs-s1);
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--vs-rail-soft);
  overflow-x: auto;
}

.company-setup-tab {
  padding: 0.5rem 0.75rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--vs-dim);
  font-size: var(--vs-text-base);
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  flex: none;
}

.company-setup-tab:hover {
  border-color: transparent;
  color: var(--vs-chalk);
}

.company-setup-tab--on,
.company-setup-tab--on:hover {
  border-bottom-color: var(--vs-act);
  color: var(--vs-chalk);
}

.company-setup-panel {
  background: var(--vs-deck);
  border: 1px solid var(--vs-rail);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}

.company-setup-subh {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.company-team-form {
  display: flex;
  /* App.css gives every form a column and a width; this one is a single row. */
  flex-direction: row;
  max-width: none;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--vs-s3);
  margin: var(--vs-s3) 0 var(--vs-s4);
}

.company-team-email {
  flex: 1 1 260px;
}

.company-team-scroll {
  margin-top: var(--vs-s3);
  overflow-x: auto;
}

.company-team-table td {
  overflow-wrap: anywhere;
}

.company-setup-brand-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.company-setup-logo-frame {
  flex-shrink: 0;
  width: 88px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-void);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  box-sizing: border-box;
}

.company-setup-logo-frame--initials {
  background: linear-gradient(135deg, var(--vs-act-fill-hi), var(--vs-act));
  border-color: var(--vs-rail);
}

.company-setup-logo-initials {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
}

.company-setup-logo-preview {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  object-fit: contain;
  border: none;
}

.company-setup-brand-name {
  margin: 0 0 0.25rem;
}

.company-setup-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.875rem;
}

.company-setup-dl dt {
  color: var(--vs-faint);
  margin: 0;
}

.company-setup-dl dd {
  margin: 0;
  color: var(--vs-chalk);
}

.company-setup-activity-panel {
  max-width: none;
}

.company-setup-activity-scroll {
  overflow-x: auto;
  margin-top: 1rem;
}

.company-setup-activity-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.company-setup-activity-table th,
.company-setup-activity-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--vs-deck);
  vertical-align: top;
}

.company-setup-activity-table th {
  color: var(--vs-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.company-setup-activity-link {
  color: var(--vs-act);
  text-decoration: none;
  font-weight: 500;
}

.company-setup-activity-link:hover {
  text-decoration: underline;
}

.company-setup-activity-status {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.company-setup-activity-status--live {
  background: rgba(34, 197, 94, 0.2);
  color: var(--vs-on);
}

.company-setup-activity-status--pending {
  background: rgba(234, 179, 8, 0.2);
  color: var(--vs-warn);
}

.company-setup-activity-status--ended,
.company-setup-activity-status--cancelled {
  background: rgba(148, 163, 184, 0.2);
  color: var(--vs-dim);
}

.company-setup-activity-time {
  display: block;
  color: var(--vs-chalk);
  font-size: 0.8rem;
}

.company-setup-activity-rel {
  display: block;
  color: var(--vs-faint);
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.company-setup-activity-open {
  color: var(--vs-act);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
}

.company-setup-activity-open:hover {
  text-decoration: underline;
}

.company-setup-activity-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.25);
  color: var(--vs-act);
}

.company-setup-activity-row--announcement td {
  vertical-align: top;
}

.company-setup-activity-news-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.company-setup-activity-news-body {
  margin: 0;
  font-size: 0.8rem;
  color: var(--vs-dim);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--vs-mono);
  max-width: 420px;
}

.company-setup h1 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.company-setup-desc,
.company-setup-muted {
  color: var(--vs-dim);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.company-setup-error {
  color: var(--vs-fault);
  margin-bottom: 1rem;
}

.company-setup-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.company-setup-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--vs-chalk);
}

.company-setup-form input {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-void);
  color: var(--vs-chalk);
}

.company-setup-submit {
  margin-top: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--vs-act-fill);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.company-setup-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.dev-settings {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s5);
  max-width: 46rem;
  min-width: 0;
  color: var(--vs-chalk);
  font-family: var(--vs-font);
}

.dev-settings-head h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.dev-settings-sub {
  margin: 0.3rem 0 0;
  font-size: 0.875rem;
  color: var(--vs-dim);
}

.dev-settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 32rem;
}

.dev-settings-label {
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.dev-settings-select {
  width: 100%;
}

.dev-settings-preview {
  margin: var(--vs-s4) 0 0;
  font-size: 0.875rem;
  color: var(--vs-dim);
}

.dev-settings-preview strong {
  color: var(--vs-chalk);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.dev-settings-note {
  margin-top: var(--vs-s4);
  align-items: flex-start;
  line-height: 1.55;
}

.dev-settings-note svg {
  flex: none;
  margin-top: 0.15rem;
  color: var(--vs-warn);
}

.dev-settings-fine {
  margin: var(--vs-s4) 0 0;
  padding-top: var(--vs-s4);
  border-top: 1px solid var(--vs-rail-soft);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--vs-faint);
  max-width: 72ch;
}
/* Live Ops. Tokens only (scripts/check-token-colours.mjs). The page frame and panels are the shared vsp-* primitives; this
 * file lays out one event row, which is a single link. */

.lo-group-head {
  margin-bottom: var(--vs-s2);
}

.lo-group-count {
  margin-inline-start: 0.35rem;
  color: var(--vs-dim);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.lo-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lo-list li + li {
  border-top: 1px solid var(--vs-rail-soft);
}

.lo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9.5rem 7.5rem 7.5rem 1rem;
  align-items: center;
  gap: var(--vs-s4);
  padding: var(--vs-s3) var(--vs-s2);
  border-radius: var(--vs-r-sm);
  color: var(--vs-chalk);
  text-decoration: none;
  font-size: var(--vs-text-base);
  transition: background 0.15s;
}

.lo-row:hover {
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
}

.lo-row:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-deck), 0 0 0 4px var(--vs-act);
}

.lo-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.lo-row-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.lo-row-sub,
.lo-row-note {
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

.lo-row-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.lo-row-note {
  color: var(--vs-warn);
}

.lo-row-players,
.lo-row-time {
  text-align: end;
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
  font-variant-numeric: tabular-nums;
}

.lo-row-go {
  color: var(--vs-faint);
}

.lo-more {
  margin-top: var(--vs-s3);
}

@media (prefers-reduced-motion: reduce) {
  .lo-row {
    transition: none;
  }
}

@media (max-width: 760px) {
  .lo-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'main status'
      'players time';
    gap: var(--vs-s1) var(--vs-s3);
    min-height: 44px;
  }

  .lo-row-main {
    grid-area: main;
  }

  .lo-row-status {
    grid-area: status;
    align-items: flex-end;
  }

  .lo-row-players {
    grid-area: players;
    text-align: start;
  }

  .lo-row-time {
    grid-area: time;
  }

  .lo-row-go {
    display: none;
  }
}
.analytics-hub {
  color: var(--vs-chalk);
  max-width: 1100px;
  margin: 0 auto;
}

.analytics-hub h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.analytics-hub-desc {
  margin: 0 0 0.75rem;
  color: var(--vs-dim);
  font-size: 0.9rem;
  max-width: 36rem;
}

.analytics-hub-studio {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--vs-chalk);
}

.analytics-hub-muted {
  color: var(--vs-faint);
  font-size: 0.9rem;
}

.analytics-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.analytics-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.25rem;
  background: var(--vs-deck);
  border: 1px solid var(--vs-rail);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.analytics-hub-card:hover {
  border-color: var(--vs-act-fill);
  background: var(--vs-void);
}

.analytics-hub-card-title {
  font-weight: 600;
  font-size: 1rem;
}

.analytics-hub-card-meta {
  font-size: 0.8rem;
  color: var(--vs-faint);
}

.analytics-hub-card-cta {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--vs-act);
  font-weight: 500;
}

.analytics-hub-modular {
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px dashed var(--vs-rail);
  background: rgba(15, 23, 42, 0.5);
}

.analytics-hub-modular h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--vs-chalk);
}

.analytics-hub-reports {
  margin-bottom: 2rem;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-void);
}

.analytics-hub-reports h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--vs-chalk);
}

.analytics-hub-reports-hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
}

.analytics-hub-fieldset {
  border: 1px solid var(--vs-rail);
  border-radius: 10px;
  padding: 0.85rem 1rem 1rem;
  margin: 0 0 1rem;
  background: rgba(15, 23, 42, 0.4);
}

.analytics-hub-legend {
  padding: 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

.analytics-hub-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--vs-chalk);
  cursor: pointer;
}

.analytics-hub-check:last-of-type {
  margin-bottom: 0;
}

.analytics-hub-check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.analytics-hub-check-sub {
  margin-left: 1.5rem;
  margin-top: -0.15rem;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  color: var(--vs-dim);
}

.analytics-hub-check code {
  font-size: 0.78em;
  background: var(--vs-deck);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  color: var(--vs-act);
}

.analytics-hub-csv-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--vs-rail);
}

.analytics-hub-csv-label {
  font-size: 0.8rem;
  color: var(--vs-dim);
  font-weight: 500;
}

.analytics-hub-csv-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.analytics-hub-btn.small {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.analytics-hub-preview-block {
  margin-top: 1.25rem;
}

.analytics-hub-preview-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--vs-chalk);
}

.analytics-hub-preview-meta {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
}

.analytics-hub-preview-meta code {
  background: var(--vs-deck);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--vs-act);
}

.analytics-hub-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.analytics-hub-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--vs-dim);
}

.analytics-hub-field span:first-child {
  font-weight: 500;
}

.analytics-hub-select,
.analytics-hub-input {
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-void);
  color: var(--vs-chalk);
  font-size: 0.9rem;
}

.analytics-hub-input-narrow {
  max-width: 6rem;
}

.analytics-hub-select option {
  background: var(--vs-void);
  color: var(--vs-chalk);
}

.analytics-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.analytics-hub-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  font-size: 0.9rem;
  cursor: pointer;
}

.analytics-hub-btn:hover:not(:disabled) {
  background: var(--vs-rail);
}

.analytics-hub-btn.primary {
  background: var(--vs-act-fill-hi);
  border-color: var(--vs-act-fill);
  color: #fff;
}

.analytics-hub-btn.primary:hover:not(:disabled) {
  background: var(--vs-act-fill);
}

.analytics-hub-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.analytics-hub-error {
  color: var(--vs-fault);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.analytics-hub-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--vs-rail);
}

.analytics-hub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.analytics-hub-table th,
.analytics-hub-table td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--vs-deck);
}

.analytics-hub-table th {
  background: var(--vs-deck);
  color: var(--vs-dim);
  font-weight: 600;
  white-space: nowrap;
}

.analytics-hub-table td {
  color: var(--vs-chalk);
}

.analytics-hub-table tr:last-child td {
  border-bottom: none;
}

/* ---- Staff: platform player activity ---- */

.analytics-hub-platform {
  margin-bottom: 2rem;
}

.analytics-hub-platform-controls {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

.analytics-hub-platform-control {
  display: flex;
  flex-direction: row;
}

.analytics-hub-platform-range {
  font-size: 0.8125rem;
  color: var(--vs-dim);
  padding-inline: var(--vs-s1);
}

/* The series subtitle comes from the studio endpoint and says "across all studio games",
   which is wrong at platform scope. The panel's own subtitle says it correctly, so the
   chart's copy is hidden here rather than shown twice with two different meanings. */
.analytics-hub-platform-chart .game-overview-series-sub {
  display: none;
}

/* The chart scales with its container, axis labels included, so cap the reading width or
   the text grows with the box. */
.analytics-hub-platform-chart .game-overview-series-chart-wrap {
  max-width: 860px;
}

.analytics-hub-platform-chart .game-overview-series-svg {
  min-height: 260px;
}
/* The staff record of one account. Layout only: colours and controls come from styles/tokens.css. */

.staff-record-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.staff-record-games {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
  gap: var(--vs-s3) var(--vs-s4);
}
/* Layout only. Colours and every control come from styles/tokens.css. */

.play-content-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.play-content-item {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
  padding-block: var(--vs-s4);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.play-content-item:first-child {
  padding-top: 0;
}

.play-content-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.play-content-item--saved {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.play-content-saved-main {
  flex: 1 1 16rem;
}

.play-content-saved-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* The fieldset's browser border and padding would frame it as a separate box. */
.play-content-picture {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.play-content-grow {
  flex: 1 1 14rem;
  width: auto;
}
.gs { color: var(--vs-chalk); }
.gs-head { margin-bottom: 1rem; }
.gs-title { font-size: 1.6rem; margin: 0 0 0.25rem; }
.gs-sub { color: var(--vs-dim); margin: 0 0 var(--vs-s3); }

.gs-tabs { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--vs-rail); margin-bottom: 1rem; overflow-x: auto; }
.gs-tab {
  flex: none; background: none; border: none; color: var(--vs-dim); padding: 0.5rem 0.9rem; cursor: pointer;
  border-bottom: 2px solid transparent; border-radius: 0; font-size: 0.95rem; white-space: nowrap;
}
.gs-tab:hover { color: var(--vs-chalk); border-color: transparent; }
.gs-tab--active, .gs-tab--active:hover { color: var(--vs-chalk); border-bottom-color: var(--vs-act-fill); }

.gs-section { margin-bottom: 1.5rem; }
.gs-desc { color: var(--vs-dim); margin: 0 0 1rem; max-width: 60ch; }
.gs-muted { color: var(--vs-faint); }
.gs-empty { color: var(--vs-faint); font-style: italic; padding: 1rem 0; }
.gs-notice { background: var(--vs-on-wash); border: 1px solid var(--vs-on); color: var(--vs-on); padding: 0.6rem 0.8rem; border-radius: var(--vs-r-sm); margin-bottom: 1rem; }
.gs-error { background: var(--vs-fault-wash); border: 1px solid var(--vs-fault); color: var(--vs-fault); padding: 0.6rem 0.8rem; border-radius: var(--vs-r-sm); margin-bottom: 1rem; }

/* Marketplace cards. An ad comes in any shape, so it is shown whole on a plain ground: cropping it hid what a studio was
   being asked to show its players. */
.gs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.gs-card { background: var(--vs-deck); border: 1px solid var(--vs-rail); border-radius: var(--vs-r-md); overflow: hidden; display: flex; flex-direction: column; }
.gs-card-media {
  aspect-ratio: 16 / 9; width: 100%; padding: var(--vs-s2); box-sizing: border-box; border: none; border-radius: 0;
  background: var(--vs-void); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
button.gs-card-media { cursor: zoom-in; }
button.gs-card-media:hover { background: var(--vs-sunk); border: none; }
button.gs-card-media:focus-visible { outline: 2px solid var(--vs-act); outline-offset: -2px; }
.gs-card-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gs-card-noimg { color: var(--vs-faint); font-size: 0.85rem; }
.gs-card-body { padding: 0.85rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.gs-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.gs-card-name { font-weight: 600; }
.gs-card-cat { flex: none; font-size: 0.75rem; color: var(--vs-act); background: var(--vs-act-wash); padding: 0.15rem 0.45rem; border-radius: var(--vs-r-pill); }
.gs-card-adv { color: var(--vs-dim); font-size: 0.85rem; margin: 0; }
.gs-card-desc { color: var(--vs-faint); font-size: 0.82rem; margin: 0; }
.gs-card-meta { display: flex; justify-content: space-between; gap: var(--vs-s2); flex-wrap: wrap; font-size: 0.8rem; color: var(--vs-dim); margin-top: auto; padding-top: 0.5rem; }

/* The ad at full size, on the same plain ground. */
.gs-preview { width: min(calc(100vw - 2rem), 800px); max-width: none; }
.gs-preview-frame { display: flex; justify-content: center; padding: var(--vs-s3); margin-bottom: var(--vs-s3); background: var(--vs-void); border-radius: var(--vs-r-sm); overflow: auto; }
.gs-preview-frame img { max-width: 100%; height: auto; }

/* Buttons */
.gs-btn {
  background: var(--vs-act-fill); color: var(--vs-act-ink); border: none; border-radius: var(--vs-r-sm); padding: 0.5rem 0.9rem;
  cursor: pointer; font-size: 0.9rem; align-self: flex-start;
}
.gs-btn:hover:not(:disabled) { background: var(--vs-act-fill-hi); color: var(--vs-act-ink); border: none; }
.gs-btn:disabled { opacity: 0.5; cursor: default; }
.gs-link-btn { background: none; border: none; color: var(--vs-act); cursor: pointer; padding: 0.2rem 0.4rem; font-size: 0.85rem; }
.gs-link-btn:hover { background: none; border: none; color: var(--vs-act); text-decoration: underline; }
.gs-link-btn--danger, .gs-link-btn--danger:hover { color: var(--vs-fault); }

/* Tables */
.gs-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.gs-table th, .gs-table td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--vs-rail-soft); font-size: 0.9rem; }
.gs-table th { color: var(--vs-dim); font-weight: 600; }
/* Restated with the table in the selector: the rule above outranks a bare .gs-num, which left every figure on the left. */
.gs-table :is(th, td).gs-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gs-row-actions { display: flex; gap: 0.3rem; justify-content: flex-end; }

/* Summary */
.gs-summary { display: flex; flex-wrap: wrap; gap: var(--vs-s4) 2rem; margin-bottom: 1rem; }
.gs-summary-item { display: flex; flex-direction: column; }
.gs-summary-value { font-family: var(--vs-font-display); font-size: 1.8rem; font-weight: 700; }
.gs-summary-label { color: var(--vs-dim); font-size: 0.85rem; }

/* Forms */
.gs-form { background: var(--vs-deck); border: 1px solid var(--vs-rail); border-radius: var(--vs-r-sm); padding: 1rem; margin: 1rem 0; max-width: 560px; }
.gs-form-row { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.8rem; }
.gs-form-row label { font-size: 0.85rem; color: var(--vs-dim); }
.gs-form-row input[type="text"], .gs-form-row input[type="number"], .gs-form-row select, .gs-form-row textarea {
  background: var(--vs-void); border: 1px solid var(--vs-rail); color: var(--vs-chalk); border-radius: var(--vs-r-sm); padding: 0.5rem; font-size: 0.9rem;
}
.gs-form-row--inline { flex-direction: row; gap: 1rem; }
.gs-form-row--inline > div { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.gs-form-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }

/* Modal */
.gs-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.gs-modal { background: var(--vs-deck); border: 1px solid var(--vs-rail); border-radius: var(--vs-r-md); padding: 1.5rem; width: 90%; max-width: 420px; }
.gs-modal h3 { margin: 0 0 0.5rem; }

/* A hint under a field, such as the platform default share. */
.gs-hint { display: block; font-size: 0.8rem; color: var(--vs-faint); margin: 0 0 0.8rem; max-width: 60ch; }
.gs-form-row .gs-hint { margin: 0; }

/* Where the game's default share stands with VS+. The colour follows the state, and the words always say it too. */
.gs-share { border: 1px solid var(--vs-rail); background: var(--vs-deck); color: var(--vs-dim); padding: 0.6rem 0.8rem; border-radius: var(--vs-r-sm); margin: 0 0 0.8rem; font-size: 0.875rem; }
.gs-share strong { color: var(--vs-chalk); }
.gs-share--warn { border-color: var(--vs-warn); background: var(--vs-warn-wash); }
.gs-share--ok { border-color: var(--vs-on); background: var(--vs-on-wash); }
.gs-share--fault { border-color: var(--vs-fault); background: var(--vs-fault-wash); }

/* ---- Brand safety: checklists and chips in place of comma-separated codes ---- */
.gs-check-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.gs-check-group legend,
.gs-chips-field label {
  margin-bottom: var(--vs-s2);
  padding: 0;
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
}

.gs-checks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2) var(--vs-s4);
}

.gs-chips-field {
  display: flex;
  flex-direction: column;
}

.gs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s1);
  list-style: none;
  margin: 0 0 var(--vs-s2);
  padding: 0;
}

.gs-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s1);
  padding: 0.15rem 0.2rem 0.15rem 0.6rem;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-pill);
  font-size: var(--vs-text-sm);
  color: var(--vs-chalk);
}

.gs-chip-x {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--vs-r-pill);
  background: transparent;
  color: var(--vs-dim);
  cursor: pointer;
}

.gs-chip-x:hover {
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
}

.gs-chip-add {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
}

.gs-chip-add input {
  flex: 1 1 auto;
  max-width: 20rem;
}
.ad-reporting {
  max-width: 1040px;
}

.ad-reporting a {
  color: var(--vs-act);
}

.ad-reporting a:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

.ad-reporting .vsp-btn {
  color: var(--vs-chalk);
}

.ad-reporting .vsp-btn--primary,
.ad-reporting .vsp-btn--primary:hover {
  color: var(--vs-act-ink);
}

/* Earnings beside the offers; one column on a phone. */
.ad-reporting-lead {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--vs-s4);
}

@media (max-width: 860px) {
  .ad-reporting-lead {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ad-reporting .vsp-muted {
  font-size: 0.875rem;
}

.ad-reporting-figure {
  margin: var(--vs-s3) 0;
  font-size: 0.875rem;
}

.ad-reporting-figure-amount {
  font-family: var(--vs-font-display);
  font-size: 1.75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--vs-chalk);
}

.ad-reporting-game-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--vs-act);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.ad-reporting-game-link:hover {
  border: none;
  color: var(--vs-act);
  text-decoration: underline;
}

.ad-reporting-offers {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  margin: var(--vs-s3) 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.ad-reporting-offers li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--vs-s3);
}

.ad-reporting-offers .vsp-btn {
  flex: none;
}

.ad-reporting-game-tabs {
  margin-bottom: var(--vs-s4);
}

/* A select is as wide as its longest option, so one long game name would otherwise widen the page on a phone. */
.ad-reporting-games .vsp-panel-head label {
  min-width: 0;
  max-width: 100%;
}

.ad-reporting-games .vsp-panel-head .vsp-select {
  width: 100%;
}

.ad-reporting-game-tab {
  border-width: 0 0 2px;
  border-radius: 0;
  background: none;
  cursor: pointer;
}

.ad-reporting-game-tab:hover {
  border-color: transparent;
}

.ad-reporting-game-tab.vsp-tab--active:hover {
  border-bottom-color: var(--vs-act);
}

.ad-reporting-desc {
  color: var(--vs-dim);
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.ad-reporting-muted {
  color: var(--vs-faint);
  font-size: 0.85rem;
  margin: 0;
}

.ad-reporting-h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--vs-chalk);
}

.ad-reporting-sdk-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  border-radius: 8px;
  border: none;
  background: var(--vs-act-fill);
  color: var(--vs-chalk);
  cursor: pointer;
  font-weight: 500;
}

.ad-reporting-sdk-btn:hover:not(:disabled) {
  background: var(--vs-act-fill-hi);
}

.ad-reporting-sdk-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ad-reporting-error {
  color: var(--vs-fault);
  margin: 0 0 1rem;
}

.ad-reporting-presets {
  margin-bottom: 1.25rem;
  display: flex;
  gap: 0.5rem;
}

.ad-reporting-preset {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  cursor: pointer;
}
.ad-reporting-preset:hover {
  background: var(--vs-rail-soft);
}
.ad-reporting-preset.active {
  background: var(--vs-act);
  border-color: var(--vs-act);
  color: var(--vs-chalk);
}

.ad-reporting-section {
  margin-bottom: 2rem;
}

.ad-reporting-section h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: var(--vs-chalk);
}

.ad-reporting-summary {
  display: flex;
  gap: 2rem;
  margin-bottom: 0.5rem;
}

.ad-reporting-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ad-reporting-summary-value {
  font-family: var(--vs-font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--vs-chalk);
}

.ad-reporting-summary-label {
  font-size: 0.85rem;
  color: var(--vs-dim);
}

.ad-reporting-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ad-reporting-table th,
.ad-reporting-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--vs-rail-soft);
}

.ad-reporting-table th {
  color: var(--vs-dim);
  font-weight: 500;
}

.ad-reporting-table td {
  color: var(--vs-chalk);
}

.ad-reporting-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ad-reporting-empty {
  color: var(--vs-faint);
  font-size: 0.9rem;
  margin: 0;
}

.ad-reporting-sponsor-actions {
  margin-bottom: 1rem;
}

.ad-reporting-link-btn {
  background: none;
  border: none;
  color: var(--vs-act);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  text-decoration: underline;
}
.ad-reporting-link-btn:hover {
  color: var(--vs-act);
}

.ad-reporting-form {
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--vs-void);
  border-radius: 8px;
  border: 1px solid var(--vs-rail-soft);
}

.ad-reporting-form h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--vs-chalk);
}

.ad-reporting-form-row {
  margin-bottom: 0.75rem;
}

.ad-reporting-form-row label {
  display: block;
  font-size: 0.85rem;
  color: var(--vs-dim);
  margin-bottom: 0.25rem;
}

.ad-reporting-form-row input[type="text"],
.ad-reporting-form-row input[type="url"],
.ad-reporting-form-row input[type="number"],
.ad-reporting-form-row input[type="datetime-local"],
.ad-reporting-form-row textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-rail-soft);
  color: var(--vs-chalk);
}

.ad-reporting-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
/* Sponsored admin page.
 *
 * Built from the vsp- primitives in src/styles/tokens.css. This file only lays them out: every
 * colour comes from the primitives and tokens.
 */

/* A field that takes the whole row of a vsp-form-grid, such as a description. */
.sponsored-span-all {
  grid-column: 1 / -1;
}

/* The editor panels scroll into view when they open; leave a little room above the heading. */
.sponsored-editor {
  scroll-margin-top: var(--vs-s4);
}

/* Focus lands on the editor heading when it opens, so keyboard users start at the top of the
   form. It is a landing spot, not a control, so it does not draw a ring. */
.sponsored-editor-title:focus {
  outline: none;
}

.sponsored-subhead {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

/* A house campaign's badge sits in the line under its name, with the reason beside it. */
.sponsored-house > .vsp-badge {
  margin-right: var(--vs-s1);
}

/* ---------------------------------------------------------------- Targeting */

.sponsored-targeting > summary {
  width: fit-content;
  padding-block: var(--vs-s1);
  border-radius: var(--vs-r-sm);
  font-size: 0.875rem;
  font-weight: 550;
  cursor: pointer;
}

.sponsored-targeting[open] > summary {
  margin-bottom: var(--vs-s3);
}

/* ---------------------------------------------------------------- Creatives */

/* The creatives table sits inside the editor panel, so its rows are few and short. */
.sponsored-creatives :is(th, td) {
  vertical-align: middle;
  white-space: nowrap;
}

/* A long asset URL is cut short in the cell; the full address is in its title and the link. */
.sponsored-asset-link {
  display: inline-block;
  max-width: 22rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.sponsored-creative-add {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(5rem, 7rem) minmax(5rem, 7rem) auto;
  gap: var(--vs-s3);
  align-items: end;
}

/* The button lines up with the 44px inputs beside it. */
.sponsored-creative-add > .vsp-btn {
  min-height: 44px;
}

@media (max-width: 760px) {
  .sponsored-creative-add {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sponsored-creative-add > :first-child {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------------- Creatives preview in the approve dialog */

.sponsored-delivery {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.sponsored-preview {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s3);
  margin: 0 0 var(--vs-s2);
  padding: 0;
  list-style: none;
}

.sponsored-preview-link {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s1);
  font-size: 0.75rem;
  color: var(--vs-dim);
  text-decoration: none;
}

.sponsored-preview-link:hover {
  color: var(--vs-chalk);
}

.sponsored-preview-img {
  display: block;
  width: 9rem;
  height: 5rem;
  object-fit: contain;
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
}
/* Layout only. Colours, type and spacing tokens come from styles/tokens.css. */

/* The checkbox sits in a column, which would stretch its label across the panel and make the empty space beside the
   text toggle it. */
.admin-payouts-checkbox {
  align-self: flex-start;
}

/* ---- Studio picker: the search box and its Clear button on one line, with the matches listed under the box. */

.admin-payouts-picker {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
}

.admin-payouts-picker-box {
  flex: 1;
  min-width: 0;
}

/* The shared menu opens from the end of the button that owns it. A list of matches spans the box instead, and scrolls
   rather than running off the page. */
.admin-payouts-picker-menu {
  inset-inline: 0;
  min-width: 0;
  max-height: 18rem;
  overflow-y: auto;
}

.admin-payouts-picker-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The match the arrow keys are on. The menu primitive only draws hover, and focus stays in the box, so without this a
   keyboard user cannot see which studio Enter will choose. Same surface as the primitive's hover. */
.admin-payouts-picker-option[aria-selected='true'] {
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
}

/* The default's label names itself in full ("Bank transfer (studio default)"), and a cut-off payment method is a bad thing
   to be unsure of on the row that pays someone. */
.admin-payouts-method.vsp-select--sm {
  max-width: none;
  min-width: 15rem;
}
/* Billing and payouts. Token-only (scripts/check-token-colours.mjs). The tables are the shared vsp-table inside vsp-scroll-x,
   so a wide table scrolls on its own and the page stays the width of the phone. */

.billing a {
  color: var(--vs-act);
}

.billing a:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

/* ---------------------------------------------------------------- The step that blocks payment */

.billing-choose {
  flex-wrap: wrap;
  justify-content: space-between;
}

.billing-choose-text {
  flex: 1 1 18rem;
  min-width: 0;
}

.billing-choose-text p {
  margin: var(--vs-s1) 0 0;
  color: var(--vs-dim);
}

.billing-choose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
}

/* ---------------------------------------------------------------- Owed, and the other figures */

.billing-lead {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: var(--vs-s4);
}

.billing-owed-figure {
  margin: var(--vs-s3) 0 var(--vs-s2);
  font-size: 0.875rem;
}

.billing-owed-amount {
  font-family: var(--vs-font-display);
  font-size: 1.75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--vs-chalk);
}

.billing-meter {
  height: 0.5rem;
  border-radius: var(--vs-r-pill);
  background: var(--vs-rail);
  overflow: hidden;
}

.billing-meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--vs-act);
}

.billing-owed-note {
  margin: var(--vs-s3) 0 0;
  font-size: 0.8125rem;
}

.billing-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: var(--vs-s4);
  margin: 0;
}

.billing-figures dt {
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

.billing-figures dd {
  margin: var(--vs-s1) 0 0;
  font-family: var(--vs-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.billing-figures .billing-figure-note {
  font-family: var(--vs-font);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--vs-faint);
}

.billing .vsp-table td {
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Details under the tables */

.billing-how {
  margin-top: var(--vs-s4);
  font-size: 0.875rem;
  color: var(--vs-dim);
}

.billing-how summary {
  cursor: pointer;
}

.billing-how p {
  margin: var(--vs-s2) 0 0;
  max-width: 72ch;
}

.billing-detail-side {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
}

/* ---------------------------------------------------------------- Payout method and premium */

.billing-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: var(--vs-s5);
}

.billing-option h3 {
  margin: 0 0 var(--vs-s1);
  font-size: 0.9375rem;
  font-weight: 600;
}

.billing-option p {
  margin: 0 0 var(--vs-s3);
  font-size: 0.875rem;
  color: var(--vs-dim);
}

.billing-option-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
}

.billing-status {
  margin: 0 0 var(--vs-s3);
  font-size: 0.875rem;
}

.billing-status-foot {
  margin: var(--vs-s3) 0 0;
  font-size: 0.875rem;
}

@media (max-width: 760px) {
  .billing-lead {
    grid-template-columns: minmax(0, 1fr);
  }
}
.doc-layout {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

@media (max-width: 768px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc-layout__subnav {
    position: static;
  }
}

.doc-layout__subnav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--vs-rail);
  border-radius: 10px;
  background: var(--vs-deck);
}

.doc-layout__group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--vs-rail-soft);
}

.doc-layout__group:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.doc-layout__group-label {
  font-size: var(--vs-text-sm);
  font-weight: 600;
  color: var(--vs-dim);
  padding: 0.25rem 0.5rem 0.15rem;
}

.doc-layout__sub {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--vs-act-wash);
  margin-left: 0.35rem;
}

.doc-layout__link {
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--vs-dim);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.doc-layout__link--hub {
  font-size: var(--vs-text-sm);
  color: var(--vs-dim);
  margin-top: 0.25rem;
}

.doc-layout__link:hover {
  color: var(--vs-chalk);
  background: var(--vs-deck-hi);
}

.doc-layout__link--active {
  color: var(--vs-chalk) !important;
  background: var(--vs-act-wash);
}

.doc-layout__link--external::after {
  content: ' ↗';
  font-size: 0.75em;
  opacity: 0.75;
}
.docs-page {
  color: var(--vs-chalk);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.docs-hero {
  border: 1px solid var(--vs-deck);
  background: linear-gradient(180deg, var(--vs-void) 0%, var(--vs-void) 100%);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
}

.docs-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
  color: var(--vs-chalk);
}

.docs-hero p {
  margin: 0;
  color: var(--vs-dim);
  max-width: 70ch;
}

.docs-hero-extra {
  margin-top: 0.75rem !important;
}

.docs-inline-link {
  color: var(--vs-act);
  text-decoration: none;
  font-size: 0.9rem;
}

.docs-inline-link:hover {
  text-decoration: underline;
}

.docs-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.docs-total-time {
  font-size: 0.8rem;
  color: var(--vs-faint);
  border: 1px solid var(--vs-rail);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.docs-lead {
  margin: 0 0 1rem;
  color: var(--vs-dim);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 70ch;
}

.docs-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.docs-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1rem;
  align-items: stretch;
}

.docs-step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--vs-act);
  background: var(--vs-act-wash);
  border: 1px solid var(--vs-act-fill-hi);
  flex-shrink: 0;
}

.docs-step-body {
  display: block;
  text-decoration: none;
  border: 1px solid var(--vs-deck);
  background: var(--vs-void);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.docs-step-body:hover {
  border-color: var(--vs-act);
  transform: translateY(-1px);
}

.docs-step-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.docs-step-top h3 {
  margin: 0;
  color: var(--vs-chalk);
  font-size: 1rem;
  line-height: 1.35;
}

.docs-step-time {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--vs-dim);
  border: 1px solid var(--vs-rail);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.docs-step-body p {
  margin: 0;
  color: var(--vs-dim);
  font-size: 0.9rem;
  line-height: 1.45;
}

.docs-section h2 {
  margin: 0 0 0.75rem;
  color: var(--vs-chalk);
  font-size: 1.15rem;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
}

.docs-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--vs-deck);
  background: var(--vs-void);
  border-radius: 12px;
  padding: 0.9rem;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.docs-card:hover {
  border-color: var(--vs-act);
  transform: translateY(-1px);
}

.docs-card h3 {
  margin: 0.45rem 0;
  color: var(--vs-chalk);
  font-size: 1rem;
}

.docs-card p {
  margin: 0;
  color: var(--vs-dim);
  font-size: 0.9rem;
  line-height: 1.45;
}

.docs-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  border: 1px solid var(--vs-rail);
  color: var(--vs-act);
  background: var(--vs-act-wash);
}

.docs-faq {
  display: grid;
  gap: 0.7rem;
}

.docs-faq-item {
  border: 1px solid var(--vs-deck);
  border-radius: 12px;
  background: var(--vs-void);
  padding: 0.9rem;
}

.docs-faq-item h3 {
  margin: 0 0 0.45rem;
  color: var(--vs-chalk);
  font-size: 0.98rem;
}

.docs-faq-item p {
  margin: 0;
  color: var(--vs-dim);
  line-height: 1.45;
  font-size: 0.9rem;
}

.docs-back {
  display: inline-block;
  margin-bottom: 0.25rem;
  color: var(--vs-act);
  text-decoration: none;
  font-size: 0.9rem;
}

.docs-back:hover {
  text-decoration: underline;
}

.docs-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 0;
  border: 1px solid var(--vs-deck);
  border-radius: 12px;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  color: var(--vs-chalk);
}

.docs-table th,
.docs-table td {
  border: 1px solid var(--vs-rail);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.docs-table thead th {
  color: var(--vs-chalk);
  background: var(--vs-void);
  font-weight: 600;
}

.docs-table tbody th[scope='row'] {
  color: var(--vs-chalk);
  background: var(--vs-void);
  font-weight: 600;
  white-space: nowrap;
}

.docs-table code {
  font-size: 0.9em;
  color: var(--vs-act);
}

/* Under a guide: the page can try out what the guide just described. */
.doc-guide-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
}

/* A select is as wide as its longest option, so one long game name would otherwise widen the page on a phone. */
.doc-guide-tool-row label {
  min-width: 0;
  max-width: 100%;
}

.doc-guide-tool-row .vsp-select {
  width: 100%;
}

.doc-guide-tool-result {
  margin-top: var(--vs-s3);
}
/* A guide, read as part of the page. Token-only (scripts/check-token-colours.mjs). Code and tables scroll inside themselves,
   so a long line cannot widen a phone screen. */

.md {
  min-width: 0;
  color: var(--vs-chalk);
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.md > :first-child {
  margin-top: 0;
}

.md h1 {
  margin: 0 0 var(--vs-s4);
  font-size: 1.6rem;
}

.md h2 {
  margin: var(--vs-s6) 0 var(--vs-s3);
  padding-bottom: var(--vs-s2);
  border-bottom: 1px solid var(--vs-rail-soft);
  font-size: 1.2rem;
}

.md h3 {
  margin: var(--vs-s5) 0 var(--vs-s2);
  font-size: 1.05rem;
}

.md h4 {
  margin: var(--vs-s4) 0 var(--vs-s2);
  font-size: 0.9375rem;
}

.md :is(h1, h2, h3, h4) {
  scroll-margin-top: var(--vs-s7);
}

.md p {
  margin: 0 0 var(--vs-s3);
  color: var(--vs-chalk);
}

.md :is(ul, ol) {
  margin: 0 0 var(--vs-s3);
  padding-inline-start: var(--vs-s5);
}

.md li {
  margin-bottom: var(--vs-s1);
}

.md li > :is(ul, ol, pre) {
  margin-top: var(--vs-s2);
}

.md a {
  color: var(--vs-act);
}

.md a:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

.md code {
  padding: 0.1em 0.35em;
  border-radius: var(--vs-r-sm);
  background: var(--vs-deck-hi);
  font-family: var(--vs-mono);
  font-size: 0.875em;
}

.md pre {
  margin: 0 0 var(--vs-s4);
  padding: var(--vs-s3) var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-sunk);
  overflow-x: auto;
  overflow-wrap: normal;
  line-height: 1.5;
}

.md pre:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 1px;
}

.md pre code {
  padding: 0;
  background: none;
  font-size: 0.8125rem;
  white-space: pre;
}

.md blockquote {
  margin: 0 0 var(--vs-s3);
  padding: var(--vs-s2) var(--vs-s4);
  border-inline-start: 3px solid var(--vs-rail);
  color: var(--vs-dim);
}

.md blockquote p:last-child {
  margin-bottom: 0;
}

.md hr {
  margin: var(--vs-s5) 0;
  border: none;
  border-top: 1px solid var(--vs-rail-soft);
}

.md-table {
  margin-bottom: var(--vs-s4);
}

.md-table table {
  border-collapse: collapse;
  font-size: 0.875rem;
}

.md-table :is(th, td) {
  padding: var(--vs-s2) var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  min-width: 7rem;
  text-align: start;
  vertical-align: top;
}

.md-table th {
  background: var(--vs-deck);
  font-weight: 600;
}

.md-table code {
  white-space: nowrap;
}
.doc-sdk-page__list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--vs-dim);
  line-height: 1.6;
}

.doc-sdk-page__list a {
  color: var(--vs-act);
}

.doc-sdk-page__para {
  margin: 0;
  color: var(--vs-dim);
  line-height: 1.55;
  max-width: 72ch;
}

.doc-sdk-page__para code {
  font-size: 0.88em;
  color: var(--vs-chalk);
}

.doc-sdk-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s2);
  margin-top: var(--vs-s3);
}

.doc-sdk-page__actions .vsp-btn {
  color: var(--vs-chalk);
  text-decoration: none;
}

.doc-sdk-page__actions .vsp-btn--primary,
.doc-sdk-page__actions .vsp-btn--primary:hover {
  color: var(--vs-act-ink);
}
.tt-page {
  color: #e2e8f0;
  max-width: 960px;
}

.tt-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.9rem;
}

.tt-back:hover {
  text-decoration: underline;
}

.tt-hero {
  border: 1px solid #1e293b;
  background: linear-gradient(180deg, #0b1220 0%, #0a0f18 100%);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1.5rem;
}

.tt-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
  color: #f8fafc;
}

.tt-hero p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.5;
  max-width: 72ch;
}

.tt-section {
  margin-bottom: 1.75rem;
}

.tt-section h2 {
  margin: 0 0 0.75rem;
  color: #f8fafc;
  font-size: 1.15rem;
}

.tt-choose {
  margin: 0;
  padding-left: 1.25rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.tt-choose li {
  margin-bottom: 0.5rem;
}

.tt-table-wrap {
  overflow-x: auto;
  border: 1px solid #1e293b;
  border-radius: 12px;
  background: #0b1020;
}

.tt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.tt-table th,
.tt-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #1e293b;
  vertical-align: top;
}

.tt-table th {
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}

.tt-table tr:last-child td {
  border-bottom: none;
}

.tt-code {
  font-size: 0.8rem;
  color: #fde68a;
  white-space: nowrap;
}

.tt-card {
  border: 1px solid #1e293b;
  border-radius: 12px;
  background: #0b1020;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
}

.tt-card h3 {
  margin: 0 0 0.5rem;
  color: #f1f5f9;
  font-size: 1rem;
}

.tt-card p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.5;
  font-size: 0.9rem;
}

.tt-note {
  margin-top: 0.65rem !important;
  padding-top: 0.65rem;
  border-top: 1px dashed #334155;
  font-size: 0.85rem !important;
  color: #cbd5e1 !important;
}

.tt-section--muted p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
}

.tt-section--muted a {
  color: #93c5fd;
}
.sdk-engine-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sdk-engine-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--vs-rail);
  border-radius: 10px;
  background: var(--vs-deck);
}

.sdk-engine-nav__title {
  font-weight: 700;
  color: var(--vs-chalk);
  font-size: 0.95rem;
  margin-right: 0.25rem;
}

.sdk-engine-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
}

.sdk-engine-nav__a {
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--vs-dim);
  text-decoration: none;
}

.sdk-engine-nav__a:hover {
  color: var(--vs-chalk);
  background: var(--vs-deck-hi);
}

.sdk-engine-nav__a--active {
  color: var(--vs-chalk) !important;
  background: var(--vs-act-wash);
}
.sdk-engine-page {
  color: var(--vs-chalk);
}

.sdk-engine-page__h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--vs-chalk);
}

.sdk-engine-page__lead {
  margin: 0 0 1.25rem;
  color: var(--vs-dim);
  line-height: 1.5;
  max-width: 65ch;
}

.sdk-engine-page__lead strong {
  color: var(--vs-chalk);
}

.sdk-engine-page__muted {
  color: var(--vs-faint);
}

.sdk-engine-page__section {
  margin-bottom: 1.5rem;
}

.sdk-engine-page__section h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--vs-chalk);
}

.sdk-engine-page__ol {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  color: var(--vs-dim);
}

.sdk-engine-page__ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--vs-dim);
  line-height: 1.55;
}

.sdk-engine-page__para {
  margin: 0;
  color: var(--vs-dim);
  line-height: 1.55;
  max-width: 72ch;
}

.sdk-engine-page__para a {
  color: var(--vs-act);
}

.sdk-engine-page__para code,
.sdk-engine-page__ol code {
  font-size: 0.88em;
  color: var(--vs-chalk);
}

.sdk-engine-page__pre {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
  color: var(--vs-dim);
  font-size: 0.82rem;
  overflow-x: auto;
}

.sdk-engine-page__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.sdk-engine-page__cards--dim .sdk-engine-card:not(:hover) {
  opacity: 0.85;
}

.sdk-engine-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.sdk-engine-card:hover {
  border-color: var(--vs-act);
  transform: translateY(-1px);
}

.sdk-engine-card--static {
  cursor: default;
  opacity: 0.7;
}

.sdk-engine-card--static:hover {
  transform: none;
  border-color: var(--vs-rail);
}

.sdk-engine-card__t {
  font-weight: 700;
  color: var(--vs-chalk);
  font-size: 0.95rem;
}

.sdk-engine-card__d {
  font-size: 0.82rem;
  color: var(--vs-dim);
  line-height: 1.4;
}

.sdk-changelog__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sdk-changelog__item {
  border: 1px solid var(--vs-rail);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: var(--vs-deck);
}

.sdk-changelog__meta {
  font-size: 0.78rem;
  color: var(--vs-faint);
  margin-bottom: 0.35rem;
}

.sdk-changelog__subject {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--vs-chalk);
}

.sdk-changelog__notes {
  margin: 0;
  color: var(--vs-dim);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.sdk-changelog__empty {
  color: var(--vs-faint);
  font-size: 0.9rem;
}

.sdk-changelog__err {
  color: var(--vs-fault);
  font-size: 0.9rem;
}

/* The one action on a Download page. */
.sdk-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vs-s3);
  margin: var(--vs-s4) 0 var(--vs-s5);
  padding: var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
}

.sdk-download .vsp-btn {
  color: var(--vs-chalk);
  text-decoration: none;
}

.sdk-download .vsp-btn--primary,
.sdk-download .vsp-btn--primary:hover {
  color: var(--vs-act-ink);
}

.sdk-download-version {
  margin: 0;
  font-size: 0.875rem;
  color: var(--vs-dim);
  overflow-wrap: anywhere;
}
.sdks-page {
  color: var(--vs-chalk);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sdks-hero {
  border: 1px solid var(--vs-rail);
  background: linear-gradient(180deg, var(--vs-deck) 0%, var(--vs-deck) 100%);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
}

.sdks-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
  color: var(--vs-chalk);
}

.sdks-hero p {
  margin: 0;
  color: var(--vs-dim);
  max-width: 72ch;
  line-height: 1.5;
}

.sdks-section__title {
  margin: 0 0 0.85rem;
  color: var(--vs-chalk);
  font-size: 1.15rem;
  font-weight: 600;
}

.sdks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1100px) {
  .sdks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sdks-grid {
    grid-template-columns: 1fr;
  }
}

.sdk-box {
  position: relative;
  border: 1px solid var(--vs-rail);
  background: var(--vs-deck);
  border-radius: 14px;
  padding: 1rem 1rem 1rem 0.85rem;
  min-height: 140px;
}

.sdk-box__badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 1;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--vs-dim);
  border: 1px solid var(--vs-rail);
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
  line-height: 1.2;
}

.sdk-box__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-right: 4.5rem;
}

.sdk-box__logo-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--vs-deck);
  border: 1px solid var(--vs-rail);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sdk-box__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.sdk-box__body {
  min-width: 0;
  flex: 1;
}

.sdk-box__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--vs-chalk);
}

.sdk-box__version {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: var(--vs-dim);
}

.sdk-box__version-num {
  color: var(--vs-dim);
  font-weight: 600;
}

.sdk-box__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.sdk-box__link {
  font-size: 0.9rem;
  color: var(--vs-act);
  text-decoration: none;
  width: fit-content;
}

.sdk-box__link:hover {
  text-decoration: underline;
}

.sdk-box__link:hover {
  color: var(--vs-act);
}

/* Not out yet, so no card and nothing to click. */
.sdks-soon {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sdks-soon__item {
  display: flex;
  align-items: center;
  gap: var(--vs-s2);
  padding: var(--vs-s2) var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  color: var(--vs-dim);
  font-size: 0.875rem;
}

.sdks-soon__logo {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  opacity: 0.7;
}
/* Admin ticket desk. The page frame, filters, table and pager come from the admin layer (components/admin and the vsp-
   primitives in styles/tokens.css); the thread's bubbles come from Support.css. What is here is the desk's own: the
   status and priority controls, the thread list, internal notes set apart from replies, and the reply form.

   Tokens only (scripts/check-token-colours.mjs). Hover rules restate colour because index.css still carries Vite
   defaults that outrank a bare class. */

.admin-support-link {
  color: var(--vs-act);
  font-weight: 550;
  text-decoration: none;
  /* Requesters type anything, and one long run of letters would otherwise push every other column out of the panel. */
  overflow-wrap: anywhere;
}
.admin-support-link:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

/* A block, so dir=auto can set the side an Arabic subject starts from. */
.admin-support-subject {
  display: block;
}

.admin-support-detail {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s4);
}

.admin-support-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s4);
}
.admin-support-controls label {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s1);
  font-size: 0.875rem;
  color: var(--vs-dim);
}

.admin-support-thread {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* An internal note is staff talking to staff: amber, the "needs attention" colour, and a dashed edge, so it can never
   be read as something the requester saw. */
.support-reply.admin-support-note {
  background: var(--vs-warn-wash);
  border: 1px dashed var(--vs-warn);
  border-inline-start: 3px solid var(--vs-warn);
}
.admin-support-note-badge {
  margin-inline-end: var(--vs-s2);
}

.admin-support-reply-form {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  max-width: none;
}
.admin-support-reply-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s3);
}
/**
 * Chat reports.
 *
 * A list of cards rather than a table, because the thing being judged is a sentence somebody wrote and a table
 * cell is the wrong shape for it. The message is the loudest thing in each card: everything else is who, where
 * and when, which only matter once you have read it.
 *
 * The conversation opens inside the card instead of on another page, so a decision is made where the evidence is
 * rather than after a navigation that loses the queue.
 */

.acr-muted {
  color: var(--vs-faint);
  font-size: 0.875rem;
}

.acr-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
}

/* Three or four buttons do not fit a phone on one line, and Leave it used to run off the card. */
.acr-item .vsp-table-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.acr-item {
  padding: var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
}

.acr-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-s3);
  flex-wrap: wrap;
  margin-bottom: var(--vs-s3);
}

.acr-badges {
  display: inline-flex;
  align-items: center;
  gap: var(--vs-s2);
  flex-wrap: wrap;
}

.acr-when {
  font-size: 0.75rem;
  color: var(--vs-faint);
  font-variant-numeric: tabular-nums;
}

/* The reported words. Quoted by the indent and the rule, not by quote marks, which would read as part of them. */
.acr-body {
  margin: 0 0 var(--vs-s3);
  padding-inline-start: var(--vs-s3);
  border-inline-start: 2px solid var(--vs-rail);
  color: var(--vs-chalk);
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.acr-removed {
  color: var(--vs-faint);
  font-style: italic;
}

.acr-meta {
  margin: 0 0 var(--vs-s2);
  font-size: 0.8125rem;
  color: var(--vs-dim);
}

/* What the reporter said in their own words, which is not the same kind of thing as the message. */
.acr-note {
  margin: 0 0 var(--vs-s3);
  font-size: 0.8125rem;
  color: var(--vs-dim);
  font-style: italic;
}

.acr-context {
  margin-top: var(--vs-s4);
  padding-top: var(--vs-s3);
  border-top: 1px solid var(--vs-rail-soft);
}

.acr-context-head {
  margin: 0 0 var(--vs-s2);
  font-size: 0.75rem;
  color: var(--vs-faint);
}

.acr-line {
  display: flex;
  gap: var(--vs-s3);
  margin: 0 0 2px;
  padding: 0.25rem var(--vs-s2);
  border-radius: var(--vs-r-sm);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* The one being judged, marked so the eye finds it without counting lines. */
.acr-line--reported {
  background: var(--vs-deck-hi);
}

.acr-line-who {
  flex: none;
  width: 8rem;
  color: var(--vs-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acr-line-body {
  flex: 1;
  min-width: 0;
  color: var(--vs-chalk);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.acr-line-gone {
  flex: none;
  color: var(--vs-faint);
  font-style: italic;
}
/**
 * Ops keys.
 *
 * The one-time reveal is the only loud thing on the page: it is the moment staff can lose the key for good. Everything
 * else is a quiet list.
 */

.aok-reveal {
  border-color: var(--vs-warn);
  margin-bottom: var(--vs-s5);
}

.aok-reveal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vs-s2);
}

.aok-reveal-key {
  flex: 1 1 22rem;
  min-width: 0;
  padding: var(--vs-s2) var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  overflow-wrap: anywhere;
  user-select: all;
}

.aok-section {
  margin-top: var(--vs-s5);
}

.aok-section-title {
  margin: 0 0 var(--vs-s3);
  font-size: 1rem;
  font-weight: 600;
}

.aok-studios {
  list-style: none;
  margin: 0 0 var(--vs-s3);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
}

.aok-studios li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--vs-s1) var(--vs-s2);
}
/**
 * Ad networks.
 *
 * Money pages are read column by column, so every amount is right-aligned in tabular figures and the network's own
 * ids sit in the mono face, where a transposed character is easier to spot. An app no game claims is tinted on
 * every table it appears in: its money goes to VS+ rather than a studio, and that should never be a surprise.
 */

.aan-network .vsp-select {
  min-width: 11rem;
}

.aan-panel {
  margin-bottom: var(--vs-s5);
}

.aan-section {
  margin-top: var(--vs-s5);
}

.aan-section-title {
  margin: 0 0 var(--vs-s3);
  font-size: 1rem;
  font-weight: 600;
}

.aan-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vs-s3);
  margin-bottom: var(--vs-s4);
}

.aan-inline-field {
  max-width: 14rem;
}

/* Doubled with the table class: the shared table styles set cell alignment and outrank a bare class. */
.aan-table th.aan-num,
.aan-table td.aan-num,
.aan-num {
  text-align: end;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.aan-negative {
  color: var(--vs-fault);
}

.aan-id {
  font-family: var(--vs-mono);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.aan-table .vsp-table-sub {
  display: block;
}

.aan-table td .vsp-table-sub {
  font-family: var(--vs-mono);
  font-size: 0.75rem;
}

.aan-row-unlinked td {
  background: var(--vs-warn-wash);
}

.aan-preview {
  margin-top: var(--vs-s5);
  padding-top: var(--vs-s4);
  border-top: 1px solid var(--vs-rail-soft);
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
}

.aan-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--vs-s3);
  margin: 0;
}

.aan-totals div {
  padding: var(--vs-s3);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
}

.aan-totals dt {
  color: var(--vs-faint);
  font-size: 0.8125rem;
}

.aan-totals dd {
  margin: var(--vs-s1) 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.aan-paste {
  font-family: var(--vs-mono);
  font-size: 0.8125rem;
}
/* Layout only. Colours and every control come from styles/tokens.css. */

.changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.changelog-item {
  padding-block: var(--vs-s4);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.changelog-item:first-child {
  padding-top: 0;
}

.changelog-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.changelog-item-top {
  display: flex;
  align-items: center;
  gap: var(--vs-s3);
  flex-wrap: wrap;
  margin-bottom: var(--vs-s2);
}

.changelog-item-top .vsp-table-sub {
  margin-top: 0;
}

.changelog-delete {
  margin-inline-start: auto;
}

.changelog-notes {
  margin: var(--vs-s1) 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--vs-dim);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Layout only. Colours and every control come from styles/tokens.css. */

.hosted-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.hosted-row {
  display: flex;
  align-items: flex-start;
  gap: var(--vs-s4);
  padding-block: var(--vs-s4);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.hosted-row:first-child {
  padding-top: 0;
}

.hosted-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.hosted-thumb {
  width: 88px;
  height: 88px;
}

.hosted-meta {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s2);
  flex: 1;
  min-width: 0;
}

.hosted-name {
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .hosted-row {
    flex-direction: column;
  }
}
/* Layout only. Colours and every control come from src/styles/tokens.css. */

/* Restated because App.css gives a bare form a 360px column for the sign-in pages. */
.admin-audit-log-filters {
  display: block;
  max-width: none;
}

.admin-audit-log-filters-toggle {
  display: none;
  align-self: flex-start;
}

@media (max-width: 640px) {
  .admin-audit-log-filters-toggle {
    display: inline-flex;
  }

  .admin-audit-log-filters,
  .admin-audit-log-apply {
    display: none;
  }

  .admin-audit-log-filters--open {
    display: block;
  }

  .admin-audit-log-target {
    white-space: normal;
  }
}

.admin-audit-log-table td {
  vertical-align: top;
}

/* Fixed floors and whole words: a name or a type broken mid-word is what made this record look broken. The floors add up
   to less than the panel at 1280 wide, so Summary and Details are on screen without scrolling the table sideways. */
.admin-audit-log-when {
  min-width: 7.5rem;
}

.admin-audit-log-who {
  min-width: 7rem;
}

.admin-audit-log-action {
  min-width: 8rem;
}

.admin-audit-log-target {
  min-width: 9rem;
  white-space: nowrap;
}

/* Anywhere rather than break-word: only an unspaced id in the text ever breaks, and without it one id would widen the column. */
.admin-audit-log-summary {
  min-width: 15rem;
  overflow-wrap: anywhere;
}

.admin-audit-log-details {
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
  padding-block: var(--vs-s2);
}

.admin-audit-log-json {
  margin: 0;
  padding: var(--vs-s3);
  max-height: 24rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
}

.admin-audit-log-none {
  margin: 0;
  font-size: 0.875rem;
}
/* The staff ad report. Layout only: colours and controls come from styles/tokens.css. */

/* A figure, not a filter: it borrows the count chip's look without being pressable. */
.ads-figure {
  cursor: default;
}

.ads-figure:hover {
  background: var(--vs-deck);
  border-color: var(--vs-rail-soft);
}

.ads-trend {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 140px;
  border-bottom: 1px solid var(--vs-rail);
}

.ads-trend-col {
  display: flex;
  align-items: flex-end;
  flex: 1;
  min-width: 0;
  height: 100%;
}

.ads-trend-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  background: var(--vs-act);
}

.ads-trend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--vs-s1);
  font-size: 0.75rem;
  color: var(--vs-faint);
}

.ads-bidder-form {
  padding-top: var(--vs-s4);
  border-top: 1px solid var(--vs-rail-soft);
}

.ads-test-select {
  flex: 1 1 14rem;
  width: auto;
}
/* Layout only. Colours and every control come from styles/tokens.css. */

.admin-newsletter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-newsletter-item {
  padding-block: var(--vs-s4);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.admin-newsletter-item:first-child {
  padding-top: 0;
}

.admin-newsletter-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

/* In the same type studios read it in: a code font made staff compose in a face the reader never sees. */
.admin-newsletter-body {
  margin: var(--vs-s2) 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--vs-dim);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* The staff OAuth pages. Layout only: colours and controls come from styles/tokens.css. */

.oauth-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--vs-s3);
}

.oauth-card {
  display: flex;
  align-items: center;
  gap: var(--vs-s4);
  padding: var(--vs-s4);
  border: 1px solid var(--vs-rail-soft);
  border-radius: var(--vs-r-md);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  font-weight: 400;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.oauth-card:hover {
  background: var(--vs-deck-hi);
  border-color: var(--vs-faint);
  color: var(--vs-chalk);
}

.oauth-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--vs-void), 0 0 0 4px var(--vs-act);
}

.oauth-card > svg {
  flex: none;
  color: var(--vs-dim);
}

[dir='rtl'] .oauth-card > svg {
  transform: rotate(180deg);
}

.oauth-card-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.oauth-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.oauth-icon {
  flex: none;
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
  object-fit: contain;
}

/* A key and value pair kept together, so the two lists on a provider's page can both be vsp-kv. */
.oauth-kv-row {
  display: contents;
}

.oauth-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  border-bottom: 1px solid var(--vs-rail);
}

.oauth-chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.oauth-chart-bar {
  width: 100%;
  max-width: 14px;
  min-height: 4px;
  border-radius: 3px 3px 0 0;
  background: var(--vs-act);
}

.oauth-chart-count {
  font-size: 0.625rem;
  color: var(--vs-dim);
}

.oauth-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--vs-s1);
  font-size: 0.75rem;
  color: var(--vs-faint);
}

@media (prefers-reduced-motion: reduce) {
  .oauth-card {
    transition: none;
  }
}
/**
 * Product pictures for the marketing page.
 *
 * These borrow the real portals' vocabulary on purpose: the same panels, the same hairline borders, the same green for
 * live and blue for action. Someone who signs up should feel they have seen this before. The colours are the design
 * tokens for the same reason, so the pictures move when the product does.
 *
 * Nothing in here is smaller than 12px. A picture of a product nobody can read only says "dashboard", so these show
 * fewer rows at a size that can be read rather than more rows that cannot.
 */

.lv,
.lv-phone,
.lv-mini {
  --lv-panel: var(--vs-deck);
  --lv-panel-hi: var(--vs-deck-hi);
  --lv-line: var(--vs-rail);
  --lv-ink: var(--vs-chalk);
  /* The quietest text in the pictures, and it has to clear 4.5:1 on the raised panel as well as the plain one. */
  --lv-dim: var(--vs-dim);
  --lv-small: 0.75rem;
}

.lv {
  background: var(--lv-panel);
  border: 1px solid var(--lv-line);
  border-radius: var(--vs-r-lg);
  padding: 1rem;
  color: var(--lv-ink);
  font-size: 0.875rem;
  line-height: 1.4;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.lv-chrome {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--lv-line);
}

.lv-chrome-title {
  font-weight: 700;
  font-size: 1rem;
}

/* Initials stand-in, as used wherever a player has no picture. */
.lv-tile {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--vs-r-sm);
  background: var(--lv-panel-hi);
  border: 1px solid var(--lv-line);
  color: var(--lv-ink);
  font-size: var(--lv-small);
  font-weight: 700;
}

/* A sample game's picture: a drawn shape on one of the same tints a real game with no art gets. */
.lv-glyph {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--vs-r-sm);
  color: var(--vs-chalk);
}

.lv-glyph svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.lv-glyph--ridge { background: var(--vs-tint-1); }
.lv-glyph--tide { background: var(--vs-tint-3); }

.lv-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vs-on);
  margin-inline-end: 6px;
}

/* ---------- dashboard ---------- */

.lv-dash-games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
  margin-bottom: 1rem;
}

.lv-dash-game {
  background: var(--lv-panel-hi);
  border: 1px solid var(--lv-line);
  border-radius: var(--vs-r-md);
  padding: 0.75rem;
}

.lv-dash-game-head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

.lv-dash-game-head > div {
  min-width: 0;
}

.lv-dash-game-name {
  display: block;
  font-weight: 650;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lv-dash-game-state {
  display: block;
  color: var(--lv-dim);
  font-size: var(--lv-small);
}

.lv-dash-game-stat {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
}

.lv-dash-game-n {
  color: var(--vs-on);
  font-weight: 700;
  font-size: 1.25rem;
}

.lv-dash-game-k {
  color: var(--lv-dim);
  font-size: 0.8125rem;
}

.lv-dash-section {
  display: block;
  font-weight: 650;
  margin-bottom: 0.5rem;
}

.lv-dash-running ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lv-dash-running li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--lv-line);
}

.lv-dash-running li:last-child {
  border-bottom: 0;
}

.lv-when {
  flex: none;
  width: 2.75rem;
  color: var(--lv-dim);
  font-size: 0.8125rem;
}

.lv-when--live {
  color: var(--vs-on);
  font-weight: 650;
}

.lv-run-name {
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.lv-run-name small {
  display: block;
  color: var(--lv-dim);
  font-weight: 400;
  font-size: var(--lv-small);
}

/* ---------- phone ---------- */

.lv-phone {
  width: 280px;
  max-width: 100%;
  border-radius: 30px;
  padding: 8px;
  background: var(--vs-sunk);
  border: 1px solid var(--vs-rail);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

.lv-phone-screen {
  background: var(--vs-void);
  border-radius: 23px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--lv-ink);
}

.lv-phone-top {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0 0.5rem;
  border-bottom: 1px solid var(--lv-line);
}

.lv-phone-brand {
  font-weight: 800;
  font-size: 0.9375rem;
}

.lv-phone-body {
  flex: 1 1 auto;
  padding: 0.875rem 0.875rem 0.5rem;
}

.lv-phone-h {
  margin: 0 0 0.625rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--lv-ink);
}

.lv-pills {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 0.625rem;
}

.lv-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--vs-r-pill);
  border: 1px solid var(--lv-line);
  color: var(--lv-dim);
  font-size: var(--lv-small);
  font-weight: 600;
}

.lv-pill i {
  font-style: normal;
}

.lv-pill--on {
  border-color: var(--vs-act);
  color: var(--lv-ink);
  background: var(--vs-act-wash);
}

.lv-friends {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lv-friends li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--lv-line);
}

.lv-friends li:last-child {
  border-bottom: 0;
}

.lv-avatar-wrap {
  position: relative;
  flex: none;
  line-height: 0;
}

.lv-avatar-wrap .lv-tile {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.lv-dot {
  position: absolute;
  inset-inline-end: -1px;
  inset-block-end: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--vs-void);
}

.lv-dot--ingame,
.lv-dot--online {
  background: var(--vs-on);
}

.lv-dot--offline {
  background: var(--vs-void);
  box-shadow: inset 0 0 0 2px var(--vs-rail);
}

.lv-friend-text {
  min-width: 0;
}

.lv-friend-text b {
  display: block;
  font-size: 0.875rem;
  font-weight: 650;
}

.lv-friend-text small {
  display: block;
  color: var(--lv-dim);
  font-size: var(--lv-small);
}

small.lv-friend-game {
  color: var(--vs-act);
}

.lv-phone-nav {
  display: flex;
  justify-content: space-between;
  padding: 0.625rem 0.875rem 0.75rem;
  border-top: 1px solid var(--lv-line);
  color: var(--lv-dim);
  font-size: var(--lv-small);
}

.lv-phone-nav-on {
  color: var(--vs-act);
  font-weight: 700;
}

/* ---------- player profile card ---------- */

.lv-card {
  width: 270px;
  max-width: 100%;
}

.lv-card-head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.lv-card-avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--vs-tint-1);
  border: 1px solid var(--lv-line);
  color: var(--vs-chalk);
  font-size: 0.8125rem;
  font-weight: 700;
}

.lv-card-name {
  display: block;
  font-weight: 650;
  font-size: 0.9375rem;
}

.lv-card-sub {
  display: block;
  color: var(--lv-dim);
  font-size: var(--lv-small);
}

.lv-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.lv-card-stats > span {
  padding: 0.5rem;
  border-radius: var(--vs-r-sm);
  background: var(--lv-panel-hi);
  border: 1px solid var(--lv-line);
  text-align: center;
}

.lv-card-stats b {
  display: block;
  font-size: 1.0625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lv-card-stats small {
  display: block;
  color: var(--lv-dim);
  font-size: var(--lv-small);
}

/* ---------- format miniatures ---------- */

.lv-mini {
  min-height: 124px;
  padding: 0.75rem;
  border-radius: var(--vs-r-md);
  background: var(--vs-sunk);
  border: 1px solid var(--lv-line);
  color: var(--lv-ink);
  font-size: 0.875rem;
}

.lv-mini--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.lv-mini-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 0;
}

/* A little life on the leaderboard: the lead keeps being contested. Off for anyone who has asked for less motion. */
.lv-mini-row--top {
  position: relative;
  overflow: hidden;
  border-radius: var(--vs-r-sm);
}

.lv-mini-row--top::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--vs-brand-red-wash), var(--vs-brand-blue-wash), transparent);
  transform: translateX(-100%);
  animation: lv-lead 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lv-lead {
  40%, 100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .lv-mini-row--top::after { animation: none; display: none; }
}

.lv-mini-row--top .lv-mini-val {
  color: var(--vs-on);
}

.lv-mini-pos {
  flex: none;
  width: 1rem;
  color: var(--lv-dim);
  font-weight: 700;
  font-size: 0.8125rem;
}

.lv-mini-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lv-mini-val {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.lv-mini-bar {
  flex: 2 1 auto;
  height: 6px;
  border-radius: var(--vs-r-pill);
  background: var(--vs-deck-hi);
  overflow: hidden;
}

.lv-mini-bar i {
  display: block;
  height: 100%;
  background: var(--vs-act);
}

.lv-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lv-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--vs-r-sm);
  border: 1px solid var(--lv-line);
  color: var(--lv-dim);
  font-size: 0.8125rem;
  font-weight: 700;
}

.lv-badge--now {
  border-color: var(--vs-act);
  background: var(--vs-act-wash);
  color: var(--vs-chalk);
}

.lv-lp {
  width: 100%;
}

.lv-lp-bar {
  height: 6px;
  border-radius: var(--vs-r-pill);
  background: var(--vs-deck-hi);
  overflow: hidden;
  margin-bottom: 0.375rem;
}

.lv-lp-bar i {
  display: block;
  height: 100%;
  background: var(--vs-act);
}

.lv-lp-text {
  display: block;
  text-align: center;
  color: var(--lv-dim);
  font-size: 0.8125rem;
}

.lv-place {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
}

.lv-place-n {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--vs-on);
  line-height: 1;
}

.lv-place-k {
  color: var(--lv-dim);
  font-size: 0.8125rem;
}

.lv-br-stats {
  display: flex;
  gap: 1rem;
  color: var(--lv-dim);
  font-size: 0.8125rem;
}

.lv-br-stats b {
  color: var(--lv-ink);
}

.lv-bracket {
  width: 100%;
  max-width: 170px;
  height: auto;
  color: var(--vs-act);
}

.lv-bracket-win {
  fill: var(--vs-on-wash);
  stroke: var(--vs-on);
  stroke-width: 1.2;
}

.lv-table-head,
.lv-table-row {
  display: grid;
  grid-template-columns: 1fr 1.5rem 1.5rem 1.5rem 2.25rem;
  gap: 0.25rem;
  align-items: center;
  padding: 0.25rem 0;
}

.lv-table-head {
  color: var(--lv-dim);
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--lv-line);
  margin-bottom: 0.25rem;
}

.lv-table-head span:not(:first-child),
.lv-table-row span:not(:first-child) {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.lv-table-row--top .lv-table-pts {
  color: var(--vs-on);
  font-weight: 700;
}

/* ---------- event setup ---------- */

.lv-setup {
  width: 100%;
  max-width: 380px;
}

.lv-field {
  margin-bottom: 0.75rem;
}

.lv-field--split {
  display: flex;
  gap: 0.625rem;
}

.lv-field--split > span {
  flex: 1 1 0;
}

.lv-label {
  display: block;
  color: var(--lv-dim);
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
}

.lv-input {
  display: block;
  padding: 0.4375rem 0.625rem;
  border-radius: var(--vs-r-sm);
  background: var(--vs-sunk);
  border: 1px solid var(--lv-line);
  font-size: 0.875rem;
}

.lv-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.lv-choice {
  padding: 0.25rem 0.625rem;
  border-radius: var(--vs-r-pill);
  border: 1px solid var(--lv-line);
  color: var(--lv-dim);
  font-size: 0.8125rem;
}

.lv-choice--on {
  border-color: var(--vs-act);
  background: var(--vs-act-wash);
  color: var(--vs-chalk);
  font-weight: 600;
}

.lv-cta {
  display: block;
  margin-top: 0.875rem;
  padding: 0.5rem;
  border-radius: var(--vs-r-sm);
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 650;
}

/* ---------- what a brand buys ---------- */

.lv-sponsor {
  overflow: hidden;
  padding: 0;
}

.lv-sponsor-art {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--vs-tint-1);
}

.lv-sponsor-logo {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--vs-r-sm);
  background: var(--vs-chalk);
  color: var(--vs-void);
}

.lv-sponsor-logo svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.lv-sponsor-by {
  display: block;
  font-size: 0.8125rem;
}

.lv-sponsor-brand {
  display: block;
  font-weight: 700;
  font-size: 1rem;
}

.lv-sponsor-body {
  padding: 0.875rem 1rem 1rem;
}

.lv-sponsor-name {
  display: block;
  font-weight: 650;
  font-size: 1rem;
  margin-bottom: 0.625rem;
}

.lv-sponsor-facts {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--lv-dim);
  font-size: 0.8125rem;
}

.lv-sponsor-facts b {
  display: block;
  color: var(--lv-ink);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lv-game {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.lv-game-screen {
  flex: 1 1 auto;
  padding: 1.25rem 1rem;
  text-align: center;
  background: linear-gradient(180deg, var(--vs-tint-4), var(--vs-tint-2));
}

.lv-game-over {
  display: block;
  font-size: 1.125rem;
  font-weight: 800;
}

.lv-game-score {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lv-game-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
}

.lv-banner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  background: var(--vs-chalk);
  color: var(--vs-void);
  font-weight: 700;
}

/* Kept in the picture because it is kept in the game: players have to be able to tell an ad from the game. */
.lv-banner-tag {
  flex: none;
  padding: 0 0.375rem;
  border-radius: var(--vs-r-sm);
  border: 1px solid var(--vs-void);
  font-size: var(--lv-small);
  font-weight: 700;
}

@media (max-width: 640px) {
  .lv-mini {
    min-height: 0;
  }

  .lv-dash-games {
    grid-template-columns: minmax(0, 1fr);
  }

  .lv-dash-game:nth-child(2) {
    display: none;
  }
}
/* Marketing home for www.vs.plus */

/* One place for the page's measures. Every band of the page, header and footer included, takes the same gutter and the
   same content width, so nothing's left edge moves as you scroll. */
.landing {
  --landing-content: 1120px;
  --landing-gutter: 1.5rem;
  --landing-ink: var(--vs-chalk);
  --landing-body: var(--vs-prose);
  --landing-line: var(--vs-rail);
  --landing-radius: var(--vs-r-lg);
  min-height: 100vh;
  background: var(--vs-void);
  color: var(--vs-chalk);
  font-family: var(--vs-font);
}

.landing-header,
.landing-hero,
.landing-section,
.landing-footer {
  padding-inline: var(--landing-gutter);
}

.landing-header-inner,
.landing-hero-inner,
.landing-section-inner,
.landing-footer-inner {
  max-width: var(--landing-content);
  margin-inline: auto;
}

.landing,
.landing * {
  box-sizing: border-box;
}

/* The header is sticky, so a section jumped to would otherwise land underneath it. */
.landing section[id] {
  scroll-margin-top: 5rem;
}

.landing a:focus-visible,
.landing button:focus-visible {
  outline: 2px solid var(--vs-act);
  outline-offset: 2px;
}

/* Tracking pulls joined Arabic letters apart. */
[dir='rtl'] .landing-hero-title {
  letter-spacing: 0;
}

/* ---------- header ---------- */

.landing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--vs-void);
  border-bottom: 1px solid var(--vs-rail-soft);
}

.landing-header-inner {
  padding-block: 0.625rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.landing-logo {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.landing-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.landing-nav a {
  color: var(--landing-body);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

.landing-nav a:hover {
  color: var(--vs-chalk);
}

.landing-header-end {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-header-lang {
  align-self: center;
}

.landing-login {
  position: relative;
}

.landing-login-btn,
.landing-menu-btn {
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: var(--vs-r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--vs-chalk);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.landing-login-btn:hover,
.landing-login-btn[aria-expanded='true'] {
  border-color: var(--vs-rail);
  background: var(--vs-deck);
  color: var(--vs-chalk);
}

.landing-menu-btn {
  display: none;
  border-color: var(--vs-rail);
}

.landing-menu-btn:hover,
.landing-menu-btn[aria-expanded='true'] {
  border-color: var(--vs-faint);
  background: var(--vs-deck);
  color: var(--vs-chalk);
}

.landing-popover {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 170px;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  background: var(--vs-deck);
  border: 1px solid var(--vs-rail);
  border-radius: var(--vs-r-md);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.landing-popover a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: var(--vs-r-sm);
  color: var(--vs-chalk);
  text-decoration: none;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.landing-popover a:hover {
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
}

.landing-header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: var(--vs-r-sm);
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
}

.landing-header-cta:hover {
  background: var(--vs-act-fill-hi);
  color: var(--vs-act-ink);
}

/* The menu that holds the section links on a phone. */
.landing-menu {
  /* The header stays on screen as the page scrolls, so a menu taller than the screen, as on a phone held sideways, could
     never be scrolled to its end. 4.25rem is the header's own height. */
  max-height: calc(100vh - 4.25rem);
  max-height: calc(100dvh - 4.25rem);
  overflow-y: auto;
  /* Scrolling clips at the edges, and a focus ring needs room there. The margin keeps the links on the page's edge. */
  margin-inline: -0.25rem;
  padding-inline: 0.25rem;
  padding-block: 0.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.landing-menu > a:not(.landing-btn) {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--vs-chalk);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
}

.landing-menu > a:not(.landing-btn):hover {
  color: var(--vs-act);
}

.landing-menu .landing-btn {
  margin-top: 0.5rem;
  text-align: center;
}

.landing-menu-lang {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.landing-menu-lang .auth-lang-btn {
  min-height: 44px;
  padding-inline: 1rem;
}

@media (min-width: 961px) {
  /* Left open and then the window widened: the links are back in the header. */
  .landing-menu {
    display: none;
  }
}

@media (max-width: 960px) {
  .landing-nav,
  .landing-header-lang {
    display: none;
  }

  .landing-menu-btn {
    display: inline-flex;
    align-items: center;
  }

  .landing-header-end {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  /* The hero's own button is on screen, and this one is in the menu. There is no room for it beside Log in and Menu. */
  .landing-header-cta {
    display: none;
  }
}

/* ---------- hero ---------- */

.landing-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: 5rem 6rem;
  background: linear-gradient(100deg, var(--vs-brand-red-wash) 0%, transparent 46%, transparent 54%, var(--vs-brand-blue-wash) 100%);
}

/* The logo's idea at full size: red against blue, meeting at a seam. */
.landing-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block: -20%;
  inset-inline-start: 50%;
  width: 3px;
  background: linear-gradient(180deg, var(--vs-brand-red) 50%, var(--vs-brand-blue) 50%);
  opacity: 0.75;
  transform: rotate(8deg);
}

.landing-hero-keyart {
  position: absolute;
  z-index: -2;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(52%, 760px);
  background: url('/images/auth-panel.webp') center 24% / cover no-repeat;
  opacity: 0.38;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 45%);
  mask-image: linear-gradient(90deg, transparent, black 45%);
}

/* Only while the hero is side by side. Stacked, the photo fades top to bottom in either direction, and this selector would
   outrank that rule and leave the photo stronger behind the Arabic heading and paragraph. */
@media (min-width: 1001px) {
  [dir='rtl'] .landing-hero-keyart {
    -webkit-mask-image: linear-gradient(270deg, transparent, black 45%);
    mask-image: linear-gradient(270deg, transparent, black 45%);
  }
}

/* Copy and product side by side once there is room, stacked on a phone. The art is the point of
   the hero now, so it gets the larger share of the row. */
.landing-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: center;
}

.landing-hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--vs-chalk);
  margin: 0 0 1.25rem;
}

.landing-hero-sub {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--landing-body);
  margin: 0 0 2rem;
}

.landing-hero-art {
  position: relative;
  min-width: 0;
  margin: 0;
}

/* The profile overlaps the dashboard's lower corner: two screens, one composition, rather than two
   pictures side by side. It stays at full size, because a picture shrunk to fit cannot be read. The
   dashboard stops short so that the pair still ends on the page's right edge. */
.landing-hero-art-main {
  margin-inline-end: 1.5rem;
}

.landing-hero-art-float {
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: 2rem;
}

/* On its own ground, because the hero's photograph runs behind it. At the far end, clear of the seam. */
.landing-hero-art figcaption {
  width: fit-content;
  margin-inline-start: auto;
  padding: 0.125rem 0.5rem;
  border-radius: var(--vs-r-sm);
  background: var(--vs-void);
}

/* ---------- buttons ---------- */

.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--vs-r-md);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.landing-btn-primary {
  background: var(--vs-act-fill);
  color: var(--vs-act-ink);
}

.landing-btn-primary:hover {
  background: var(--vs-act-fill-hi);
  color: var(--vs-act-ink);
}

.landing-btn-secondary {
  background: var(--vs-deck);
  color: var(--vs-chalk);
  border-color: var(--vs-rail);
}

.landing-btn-secondary:hover {
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
  border-color: var(--vs-faint);
}

.landing-btn--large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- sections ---------- */

.landing-section {
  padding-block: 4rem;
}

.landing-section--slim {
  padding-block: 3rem;
}

.landing-section--dark {
  background: var(--vs-sunk);
  border-top: 1px solid var(--vs-rail-soft);
}

.landing-section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--vs-chalk);
  margin: 0 0 0.75rem;
}

.landing-section-lead {
  font-size: 1.1rem;
  color: var(--landing-body);
  max-width: 60ch;
  margin: 0 0 2.5rem;
  line-height: 1.6;
}

/* ---------- format cards ---------- */

.landing-formats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.25rem;
}

.landing-format {
  padding: 1rem;
  background: var(--vs-deck);
  border: 1px solid var(--landing-line);
  border-radius: var(--landing-radius);
}

.landing-format-art {
  margin-bottom: 0.9rem;
}

.landing-format h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--landing-ink);
}

.landing-format p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--landing-body);
}

/* ---------- split sections ---------- */

.landing-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}

.landing-split-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  margin: 0;
}

/* ---------- steps ---------- */

.landing-steps {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 1.4rem;
}

.landing-step {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.landing-step-n {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--vs-r-pill);
  border: 1px solid var(--vs-act);
  color: var(--vs-act);
  font-size: 0.9rem;
  font-weight: 700;
}

.landing-step h3 {
  margin: 0.15rem 0 0.2rem;
  font-size: 1rem;
  font-weight: 650;
  color: var(--landing-ink);
}

.landing-step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--landing-body);
  line-height: 1.55;
}

/* ---------- player benefits ---------- */

.landing-benefits {
  margin: 0 0 1.75rem;
  display: grid;
  gap: 1.25rem;
}

.landing-benefit {
  border-inline-start: 2px solid var(--vs-act);
  padding-inline-start: 1.1rem;
}

.landing-benefit dt {
  font-size: 1rem;
  font-weight: 650;
  color: var(--landing-ink);
  margin-bottom: 0.3rem;
}

.landing-benefit dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--landing-body);
}

/* ---------- trust ---------- */

/* One raised panel split into three, rather than three separate cards: these are facets of a single
   promise and should read as one object. */
.landing-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  background: var(--vs-deck);
  border: 1px solid var(--landing-line);
  border-radius: var(--landing-radius);
  overflow: hidden;
}

.landing-trust-item {
  padding: 1.5rem;
  border-inline-start: 1px solid var(--landing-line);
}

.landing-trust-item:first-child {
  border-inline-start: 0;
}

.landing-trust-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 650;
  color: var(--landing-ink);
}

.landing-trust-item p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--landing-body);
}

/* ---------- for brands ---------- */

.landing-brands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.25rem;
}

.landing-brand {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: var(--vs-deck);
  border: 1px solid var(--landing-line);
  border-radius: var(--landing-radius);
}

.landing-brand-art {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  height: 196px;
}

.landing-brand-art > .lv {
  flex: 1 1 auto;
  background: var(--vs-sunk);
  box-shadow: none;
}

.landing-brand h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--landing-ink);
}

.landing-brand dl {
  margin: 0;
}

.landing-brand dt {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--landing-ink);
}

.landing-brand dd {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--landing-body);
}

.landing-brand dd:last-child {
  margin-bottom: 0;
}

.landing-brands-actions {
  margin-top: 1.5rem;
}

/* ---------- real games and events from the public lists ---------- */

.landing-listed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-listed {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  height: 100%;
  padding: 0.75rem;
  border-radius: var(--landing-radius);
  border: 1px solid var(--landing-line);
  background: var(--vs-deck);
  color: var(--vs-chalk);
  text-decoration: none;
}

a.landing-listed:hover {
  border-color: var(--vs-act);
  background: var(--vs-deck-hi);
  color: var(--vs-chalk);
}

.landing-listed-art {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: var(--vs-r-md);
}

.landing-listed-art .vsp-art-icon {
  max-width: 80%;
  max-height: 80%;
}

.landing-listed-art .vsp-art-initials {
  font-size: 1.25rem;
}

.landing-listed-text {
  min-width: 0;
}

.landing-listed-text b {
  display: block;
  font-size: 1rem;
  font-weight: 650;
  color: var(--landing-ink);
}

.landing-listed-text small {
  display: block;
  font-size: 0.875rem;
  color: var(--landing-body);
}

.landing-coming-up {
  margin-top: 3rem;
}

.landing-coming-up h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--landing-ink);
}

/* ---------- shared bits ---------- */

.landing-note {
  margin: 1.75rem 0 0;
  max-width: 70ch;
  font-size: 0.9rem;
  color: var(--landing-body);
}

/* Says the picture beside it is made up. Quiet, but it has to be readable, or it is no use as a label. */
.landing-sample {
  font-size: 0.875rem;
  color: var(--vs-dim);
}

figcaption.landing-sample {
  margin-top: 0.75rem;
}

.landing-inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--vs-act);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.landing-inline-link:hover {
  color: var(--vs-act);
  text-decoration: underline;
}

/* ---------- closing call to action ---------- */

.landing-section--cta {
  padding-block: 4rem 5rem;
}

/* Raised and bordered, so the last thing on the page is an object to act on rather than one more
   heading floating on the same ground as everything above it. */
.landing-cta-panel {
  padding: 3rem 2rem;
  border-radius: 20px;
  border: 1px solid var(--vs-act);
  background:
    radial-gradient(120% 140% at 50% 0%, var(--vs-brand-blue-wash), transparent 60%),
    var(--vs-deck);
  text-align: center;
}

.landing-cta-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--vs-chalk);
}

.landing-cta-sub {
  margin: 0 auto 2rem;
  max-width: 52ch;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--landing-body);
}

.landing-cta-panel .landing-actions {
  justify-content: center;
}

/* ---------- footer ---------- */

.landing-footer {
  border-top: 1px solid var(--vs-rail-soft);
  padding-block: 3rem 2rem;
  background: var(--vs-sunk);
}

.landing-footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 2rem 1.5rem;
}

.landing-footer-columns > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.landing-footer-columns h2 {
  margin: 0 0 0.5rem;
  font-family: var(--vs-font);
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--landing-ink);
}

.landing-footer-columns a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--landing-body);
  text-decoration: none;
  font-size: 0.9375rem;
}

.landing-footer-columns a:hover {
  color: var(--vs-chalk);
}

.landing-footer-base {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--vs-rail-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.landing-footer-logo-img {
  height: 24px;
  width: auto;
  display: block;
}

.landing-footer-base p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.875rem;
  color: var(--vs-dim);
}

@media (max-width: 1000px) {
  /* Stacked, the words sit where the seam would run. */
  .landing-hero::after {
    display: none;
  }

  /* And they run the full width, so the photo is behind them: fainter, and fading away down the page. */
  .landing-hero-keyart {
    width: 100%;
    opacity: 0.24;
    -webkit-mask-image: linear-gradient(180deg, black, transparent 75%);
    mask-image: linear-gradient(180deg, black, transparent 75%);
  }

  .landing-hero-inner,
  .landing-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  /* Below the dashboard instead of over it: the overlap needs width it no longer has. */
  .landing-hero-art-float {
    position: static;
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
  }

  .landing-hero-art-main {
    margin-inline-end: 0;
  }
}

@media (max-width: 640px) {
  .landing {
    --landing-gutter: 1rem;
  }

  .landing-hero {
    padding-block: 3rem 4rem;
  }

  /* One picture is enough before the first section on a phone. */
  .landing-hero-art-float {
    display: none;
  }

  .landing-trust-item {
    border-inline-start: 0;
    border-top: 1px solid var(--landing-line);
  }

  .landing-trust-item:first-child {
    border-top: 0;
  }

  .landing-cta-panel {
    padding: 2rem 1.25rem;
  }

  .landing-footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
