/* ui.css - Eggball's game screens (menu, queue, leaderboard, profile, results).
   Night stadium, hard-edged slanted panels with solid shadows, Titan One + Barlow Condensed. */
:root {
  --night: #18123A;
  --panel: #241B57;
  --ink: #0C0820;
  --shell: #FFF3D6;
  --muted: #C9BFEA;
  --faint: #9A8FCC;
  --yolk: #FFC21A;
  --yolk-2: #F7B500;
  --yolk-dark: #B97C00;
  --red: #E83A2F;
  --blue: #2F64F0;
  --violet: #8A4BF0;
  --turf: #2FBF71;
  --loss: #FF7A6E;
  --skew: -7deg;
  --unskew: 7deg;
}
/* everything is scoped to .eb so the results screen can sit on the game page without touching it */
.eb, .eb *, .eb *::before, .eb *::after { box-sizing: border-box; }
body.eb { margin: 0; min-height: 100%; }
.eb {
  /* the design pixel: every size is a multiple of it. 1px on a 1920x1080 window, smaller on a smaller
     one (whichever of width or height is tighter), up to 1.5px on big screens, never under 0.5px */
  --p: calc(clamp(0.5px, min(calc(100vw / 1920), calc(100vh / 1080)), 1.5px) * var(--ui-scale, 1));
  background: var(--night); color: var(--shell);
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 600; font-size: calc(22 * var(--p));
  overflow-x: hidden;
}
/* plain text links are yolk; anything with a class (tiles, buttons, tabs, rows, chips) sets its own colours */
:where(.eb) a { color: inherit; }
.eb a:not([class]) { color: var(--yolk); text-underline-offset: .15em; }
.eb a:not([class]):hover { color: var(--shell); }
.eb :focus-visible { outline: calc(5 * var(--p)) solid var(--shell); outline-offset: calc(4 * var(--p)); }
:where(.eb) button { font: inherit; color: inherit; }

/* the screen: fills the window, scales everything off one unit so it looks the same at any size */
.eb-screen { position: relative; min-height: 100vh; padding: calc(64 * var(--p)) calc(72 * var(--p)) calc(120 * var(--p)); overflow: hidden; }
.eb-beam { position: absolute; top: calc(-40 * var(--p)); width: 30vw; height: 110vh; background: var(--shell); opacity: .045; clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); pointer-events: none; }
.eb-beam.l { left: 9vw; transform: rotate(14deg); }
.eb-beam.r { right: 6vw; transform: rotate(-14deg); }
.eb-pitch { position: absolute; left: 0; right: 0; bottom: calc(84 * var(--p)); height: 36vh; background: repeating-linear-gradient(90deg, #1E1748 0 6.6vw, #231B53 6.6vw 13.2vw); clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%); border-top: calc(4 * var(--p)) solid #2F2470; pointer-events: none; }
.eb-screen > *:not(.eb-beam):not(.eb-pitch) { position: relative; }

/* type */
.eb-display { font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; line-height: .92; letter-spacing: .01em; }
.eb-out { -webkit-text-stroke: .085em var(--ink); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--ink); }
.eb-logo { display: inline-block; font-size: calc(138 * var(--p)); color: var(--yolk); text-decoration: none; transform: rotate(-4deg); transform-origin: left center;
  -webkit-text-stroke: .075em var(--ink); paint-order: stroke fill; text-shadow: 0 .065em 0 var(--yolk-dark), 0 .125em 0 var(--ink); }
.eb-logo.small { font-size: calc(64 * var(--p)); text-shadow: 0 .09em 0 var(--ink); }
a.eb-logo:hover { color: var(--yolk); }
.eb-it { font-style: italic; font-weight: 800; }
.eb-num { font-weight: 900; font-style: italic; line-height: .9; }
.eb-muted { color: var(--muted); }

/* panels and slants */
.eb-panel { background: var(--panel); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(10 * var(--p)) calc(10 * var(--p)) 0 var(--ink); }
.eb-slant { transform: skewX(var(--skew)); }
.eb-slant > .eb-unslant, .eb-unslant { transform: skewX(var(--unskew)); }
.eb-chip { display: inline-flex; align-items: center; gap: calc(12 * var(--p)); padding: calc(10 * var(--p)) calc(22 * var(--p)); border: calc(4 * var(--p)) solid var(--ink); box-shadow: calc(6 * var(--p)) calc(6 * var(--p)) 0 var(--ink); transform: skewX(-10deg); font-weight: 800; text-decoration: none; }
.eb-chip > * { transform: skewX(10deg); }
.eb-chip.dark { background: var(--panel); color: var(--shell); }
.eb-chip.light { background: var(--shell); color: var(--night); }
.eb-chip.gold { background: var(--yolk); color: var(--night); }
a.eb-chip:hover { color: inherit; transform: skewX(-10deg) translate(calc(-2 * var(--p)), calc(-2 * var(--p))); box-shadow: calc(8 * var(--p)) calc(8 * var(--p)) 0 var(--ink); }

/* header */
.eb-top { display: flex; align-items: flex-start; justify-content: space-between; gap: calc(24 * var(--p)); flex-wrap: wrap; }
.eb-top-right { display: flex; align-items: center; gap: calc(22 * var(--p)); flex-wrap: wrap; justify-content: flex-end; margin-top: calc(8 * var(--p)); }
.eb-me { display: flex; align-items: center; gap: calc(16 * var(--p)); padding: calc(8 * var(--p)) calc(28 * var(--p)) calc(8 * var(--p)) calc(14 * var(--p)); background: var(--shell); color: var(--night); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(8 * var(--p)) calc(8 * var(--p)) 0 var(--ink); transform: skewX(-10deg); text-decoration: none; }
.eb-me > * { transform: skewX(10deg); }
a.eb-me:hover { color: var(--night); box-shadow: calc(11 * var(--p)) calc(11 * var(--p)) 0 var(--ink); }
.eb-me .name { font-weight: 800; font-style: italic; font-size: calc(36 * var(--p)); line-height: 1; }
.eb-me .rank { display: flex; align-items: center; gap: calc(8 * var(--p)); font-weight: 800; font-size: calc(24 * var(--p)); line-height: 1; margin-top: calc(4 * var(--p)); }
.eb-me .rank .r { color: #6B5E9E; }
.eb-dot { width: calc(16 * var(--p)); height: calc(16 * var(--p)); border-radius: 50%; background: var(--turf); border: calc(2 * var(--p)) solid var(--ink); display: inline-block; }

/* the main menu grid */
.eb-menu { display: grid; grid-template-columns: minmax(calc(150 * var(--p)), calc(230 * var(--p))) 1.5fr 1fr 1fr; grid-template-rows: minmax(calc(200 * var(--p)), 1fr) minmax(calc(200 * var(--p)), 1fr) calc(138 * var(--p)); gap: calc(22 * var(--p));
  height: calc(640 * var(--p)); min-height: calc(500 * var(--p)); margin: calc(30 * var(--p)) 2vw 0 4vw; transform: skewX(var(--skew)); }
.eb-side { grid-row: 1 / 4; display: flex; flex-direction: column; gap: calc(16 * var(--p)); }
.eb-tile { position: relative; display: block; overflow: hidden; border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(10 * var(--p)) calc(10 * var(--p)) 0 var(--ink); text-decoration: none; color: var(--shell); transition: transform .08s, box-shadow .08s; }
.eb-tile:hover, .eb-tile:focus-visible { color: var(--shell); transform: translate(calc(-3 * var(--p)), calc(-3 * var(--p))); box-shadow: calc(13 * var(--p)) calc(13 * var(--p)) 0 var(--ink); }
.eb-tile:focus-visible, .eb-tile.selected { outline: calc(7 * var(--p)) solid var(--shell); outline-offset: calc(5 * var(--p)); }
.eb-tile .in { position: absolute; inset: 0 calc(-40 * var(--p)); transform: skewX(var(--unskew)); }
.eb-tile .art { position: absolute; right: calc(36 * var(--p)); top: calc(16 * var(--p)); width: 46%; max-width: calc(260 * var(--p)); height: auto; }
.eb-tile .label { position: absolute; left: calc(62 * var(--p)); bottom: calc(28 * var(--p)); right: calc(50 * var(--p)); display: flex; flex-direction: column; gap: calc(8 * var(--p)); }
.eb-tile .label .t { font-size: calc(76 * var(--p)); }
.eb-tile .label .s { font-weight: 800; font-style: italic; font-size: calc(28 * var(--p)); }
.eb-tile.small { flex: 1; background: var(--panel); box-shadow: calc(7 * var(--p)) calc(7 * var(--p)) 0 var(--ink); }
.eb-tile.small .in { inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 0 calc(18 * var(--p)) calc(26 * var(--p)); }
.eb-tile.small .t { font-weight: 800; font-size: calc(34 * var(--p)); margin-top: calc(6 * var(--p)); }
.eb-tile.ranked { grid-row: 1 / 4; background: repeating-linear-gradient(135deg, var(--yolk) 0 calc(34 * var(--p)), var(--yolk-2) calc(34 * var(--p)) calc(68 * var(--p))); color: var(--night); }
.eb-tile.ranked:hover { color: var(--night); }
.eb-tile.ranked .art { width: 64%; max-width: calc(430 * var(--p)); right: calc(40 * var(--p)); top: calc(10 * var(--p)); }
.eb-tile.ranked .label { left: calc(78 * var(--p)); bottom: calc(50 * var(--p)); gap: calc(14 * var(--p)); }
.eb-tile.ranked .label .t { font-size: calc(116 * var(--p)); color: var(--shell); }
.eb-tile.ranked .label .s { font-size: calc(36 * var(--p)); }
.eb-tile.casual { background: var(--red); }
.eb-tile.private { background: var(--blue); }
.eb-tile.leaders { background: var(--violet); }
.eb-tile.leaders .label .t { font-size: calc(70 * var(--p)); }
.eb-tile.replays { background: var(--turf); color: var(--ink); }
.eb-tile.replays:hover { color: var(--ink); }
.eb-tile.replays .label .t { color: var(--shell); }
.eb-qbadge { display: inline-flex; align-self: flex-start; align-items: center; gap: calc(12 * var(--p)); padding: calc(8 * var(--p)) calc(18 * var(--p)); background: var(--night); color: var(--shell); font-weight: 800; font-size: calc(28 * var(--p)); }

/* the small links under the menu */
.eb-more-links { display: flex; justify-content: flex-end; gap: calc(18 * var(--p)); margin: calc(30 * var(--p)) 2vw 0 0; flex-wrap: wrap; }
.eb-more-links .eb-chip { font-size: calc(24 * var(--p)); padding: calc(6 * var(--p)) calc(18 * var(--p)); }

/* the bottom bar */
.eb-bar { position: fixed; left: 0; right: 0; bottom: 0; min-height: calc(84 * var(--p)); z-index: 20; background: var(--ink); border-top: calc(5 * var(--p)) solid var(--yolk); display: flex; align-items: center; justify-content: space-between; gap: calc(24 * var(--p)); padding: calc(10 * var(--p)) calc(64 * var(--p)); flex-wrap: wrap; font-size: calc(26 * var(--p)); }
.eb-bar .tip { display: flex; align-items: center; gap: calc(14 * var(--p)); font-weight: 600; }
.eb-bar .keys { display: flex; align-items: center; gap: calc(28 * var(--p)); font-weight: 800; flex-wrap: wrap; }
.eb-bar .keys > * { display: flex; align-items: center; gap: calc(10 * var(--p)); color: var(--shell); text-decoration: none; }
.eb-bar .keys button { background: none; border: none; padding: 0; cursor: pointer; font-weight: 800; }
.eb-key { display: inline-flex; align-items: center; justify-content: center; min-width: calc(44 * var(--p)); height: calc(44 * var(--p)); padding: 0 calc(12 * var(--p)); border-radius: calc(8 * var(--p)); background: var(--shell); color: var(--night); box-shadow: 0 calc(5 * var(--p)) 0 #8C7F66; font-weight: 800; font-size: calc(22 * var(--p)); }

/* rows (leaderboard, match history) */
.eb-rows { display: flex; flex-direction: column; gap: calc(10 * var(--p)); }
.eb-row { display: grid; align-items: center; min-height: calc(84 * var(--p)); background: var(--panel); border: calc(4 * var(--p)) solid var(--ink); box-shadow: calc(6 * var(--p)) calc(6 * var(--p)) 0 var(--ink); transform: skewX(-8deg); color: var(--shell); text-decoration: none; }
a.eb-row:hover, a.eb-row:focus-visible { color: var(--shell); transform: skewX(-8deg) translate(calc(-3 * var(--p)), calc(-2 * var(--p))); box-shadow: calc(9 * var(--p)) calc(8 * var(--p)) 0 var(--ink); }
.eb-row > * { transform: skewX(8deg); min-width: 0; }
.eb-row.me { background: var(--yolk); color: var(--night); border-width: calc(5 * var(--p)); box-shadow: calc(8 * var(--p)) calc(8 * var(--p)) 0 var(--ink); }
.eb-place { height: 100%; align-self: stretch; display: flex; align-items: center; justify-content: center; border-right: calc(4 * var(--p)) solid var(--ink); transform: none; background: var(--night); }
.eb-place > span { transform: skewX(8deg); font-size: calc(46 * var(--p)); }
.eb-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* leaderboard layout */
.eb-lb { display: grid; grid-template-columns: minmax(calc(260 * var(--p)), calc(470 * var(--p))) 1fr; min-height: 100vh; }
.eb-lb-side { background: var(--ink); display: flex; flex-direction: column; padding-bottom: calc(100 * var(--p)); }
.eb-lb-side .head { padding: calc(48 * var(--p)) 0 calc(34 * var(--p)) calc(44 * var(--p)); }
.eb-lb-side .sub { padding: 0 0 calc(10 * var(--p)) calc(30 * var(--p)); font-weight: 700; font-size: calc(26 * var(--p)); color: var(--faint); }
.eb-tab { display: flex; align-items: center; gap: calc(18 * var(--p)); min-height: calc(92 * var(--p)); padding: 0 calc(28 * var(--p)); border: none; background: transparent; color: var(--shell); font-weight: 800; font-size: calc(34 * var(--p)); text-align: left; cursor: pointer; width: 100%; text-decoration: none; }
.eb-tab:hover { color: var(--yolk); }
.eb-tab.on, .eb-tab.on:hover { background: var(--yolk); color: var(--night); }
.eb-tab .ic { flex: none; width: calc(50 * var(--p)); height: calc(50 * var(--p)); display: flex; align-items: center; justify-content: center; border-radius: 50%; border: calc(4 * var(--p)) solid currentColor; font-family: 'Titan One', sans-serif; font-size: calc(24 * var(--p)); }
.eb-lb-main { display: flex; flex-direction: column; gap: calc(18 * var(--p)); padding: calc(34 * var(--p)) calc(64 * var(--p)) calc(110 * var(--p)) calc(56 * var(--p)); min-width: 0; }
.eb-lb-row { grid-template-columns: calc(100 * var(--p)) calc(76 * var(--p)) minmax(0, 1fr) calc(210 * var(--p)) calc(130 * var(--p)) calc(160 * var(--p)); padding-right: calc(24 * var(--p)); }
.eb-tiers { display: flex; gap: calc(4 * var(--p)); flex-wrap: wrap; }
.eb-tierbtn { display: flex; flex-direction: column; align-items: center; gap: calc(4 * var(--p)); background: transparent; border: none; border-bottom: calc(5 * var(--p)) solid transparent; color: var(--faint); font-weight: 800; font-size: calc(20 * var(--p)); padding: calc(6 * var(--p)) calc(6 * var(--p)) calc(4 * var(--p)); cursor: pointer; text-decoration: none; }
.eb-tierbtn.on { color: var(--shell); border-bottom-color: var(--yolk); }
.eb-tierbtn:hover { color: var(--shell); }

/* profile */
.eb-prof { display: grid; grid-template-columns: minmax(calc(340 * var(--p)), calc(620 * var(--p))) minmax(0, 1fr); gap: calc(60 * var(--p)); align-items: start; }
.eb-card { transform: skewX(-4deg); }
.eb-card > .in { transform: skewX(4deg); display: flex; flex-direction: column; gap: calc(24 * var(--p)); padding: calc(38 * var(--p)) calc(42 * var(--p)); }
.eb-rankbox { display: flex; align-items: center; gap: calc(22 * var(--p)); padding: calc(20 * var(--p)) calc(24 * var(--p)); background: var(--yolk); color: var(--night); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(7 * var(--p)) calc(7 * var(--p)) 0 var(--ink); }
.eb-meter { height: calc(22 * var(--p)); background: var(--ink); position: relative; }
.eb-meter > i { position: absolute; left: 0; top: 0; bottom: 0; }
.eb-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(14 * var(--p)); }
.eb-stat { display: flex; flex-direction: column; padding: calc(14 * var(--p)) calc(18 * var(--p)); background: var(--night); border: calc(4 * var(--p)) solid var(--ink); }
.eb-stat b { font-weight: 900; font-style: italic; font-size: calc(42 * var(--p)); color: var(--yolk); line-height: 1; }
.eb-stat span { font-weight: 700; font-size: calc(23 * var(--p)); color: var(--muted); }
.eb-htabs { display: flex; align-items: center; gap: calc(28 * var(--p)); margin-bottom: calc(8 * var(--p)); flex-wrap: wrap; row-gap: calc(10 * var(--p)); }
nav.eb-htabs[aria-label="Admin"] { margin-bottom: calc(26 * var(--p)); }
.eb-htab { border: none; background: transparent; font-family: 'Titan One', sans-serif; font-size: calc(38 * var(--p)); padding: calc(6 * var(--p)) calc(4 * var(--p)); cursor: pointer; color: #7C70B4; border-bottom: calc(6 * var(--p)) solid transparent; text-decoration: none; }
.eb-htab.on { color: var(--yolk); border-bottom-color: var(--yolk); }
.eb-htab:hover { color: var(--shell); }
.eb-game { grid-template-columns: calc(170 * var(--p)) minmax(0, 1fr) calc(260 * var(--p)) calc(110 * var(--p)) calc(120 * var(--p)); min-height: calc(88 * var(--p)); }
.eb-score { height: 100%; align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; }
.eb-score > span { display: flex; align-items: center; justify-content: center; font-weight: 900; font-style: italic; font-size: calc(44 * var(--p)); }
.eb-score .r { background: var(--red); }
.eb-score .b { background: var(--blue); }
.eb-score .mine { box-shadow: inset 0 calc(-7 * var(--p)) 0 var(--shell); }
.eb-res { font-family: 'Titan One', sans-serif; font-size: calc(36 * var(--p)); text-align: center; }
.eb-win { color: var(--turf); }
.eb-loss { color: var(--loss); }
.eb-tie { color: var(--muted); }
.eb-empty { padding: calc(30 * var(--p)) calc(34 * var(--p)); font-size: calc(28 * var(--p)); }

/* queue */
.eb-q { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, calc(700 * var(--p))); gap: calc(60 * var(--p)); margin-top: calc(110 * var(--p)); }
.eb-eggs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: calc(18 * var(--p)); justify-items: center; }
.eb-eggs svg { width: 100%; max-width: calc(96 * var(--p)); height: auto; }
.eb-window { position: relative; height: calc(56 * var(--p)); background: var(--panel); border: calc(4 * var(--p)) solid var(--ink); transform: skewX(-10deg); box-shadow: calc(6 * var(--p)) calc(6 * var(--p)) 0 var(--ink); }
.eb-window .range { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--turf) 0 calc(18 * var(--p)), #29AD66 calc(18 * var(--p)) calc(36 * var(--p))); transition: left .6s, width .6s; }
.eb-window .you { position: absolute; top: calc(-14 * var(--p)); bottom: calc(-14 * var(--p)); width: calc(10 * var(--p)); background: var(--shell); border: calc(3 * var(--p)) solid var(--ink); }
.eb-tipcard { background: var(--shell); color: var(--night); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(10 * var(--p)) calc(10 * var(--p)) 0 var(--ink); padding: calc(26 * var(--p)) calc(32 * var(--p)); display: flex; gap: calc(28 * var(--p)); align-items: center; }
.eb-pulse { animation: eb-pulse 1.4s ease-in-out infinite; }
@keyframes eb-pulse { 50% { opacity: .55; } }

/* plain card pages (how to play, log in) */
.eb-sheet { max-width: calc(1100 * var(--p)); margin: calc(40 * var(--p)) auto 0; }
.eb-sheet .eb-panel { padding: calc(36 * var(--p)) calc(44 * var(--p)); }
.eb-rules { display: grid; grid-template-columns: calc(220 * var(--p)) 1fr; gap: calc(14 * var(--p)) calc(30 * var(--p)); font-size: calc(26 * var(--p)); line-height: 1.3; }
.eb-rules dt { font-family: 'Titan One', sans-serif; color: var(--yolk); font-size: calc(30 * var(--p)); }
.eb-rules dd { margin: 0; }
.eb-form { display: flex; flex-direction: column; gap: calc(14 * var(--p)); }
.eb-form label { font-weight: 800; font-size: calc(26 * var(--p)); }
.eb-form input { font: inherit; font-size: calc(28 * var(--p)); padding: calc(10 * var(--p)) calc(16 * var(--p)); background: var(--night); color: var(--shell); border: calc(4 * var(--p)) solid var(--ink); }
.eb-form input:focus { border-color: var(--yolk); outline: none; }
.eb-btn { display: inline-flex; align-items: center; justify-content: center; gap: calc(12 * var(--p)); padding: calc(12 * var(--p)) calc(34 * var(--p)); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(7 * var(--p)) calc(7 * var(--p)) 0 var(--ink); transform: skewX(-10deg); font-family: 'Titan One', sans-serif; font-size: calc(32 * var(--p)); text-decoration: none; cursor: pointer; background: var(--yolk); color: var(--night); }
.eb-btn > * { transform: skewX(10deg); }
.eb-btn:hover { color: var(--night); transform: skewX(-10deg) translate(calc(-2 * var(--p)), calc(-2 * var(--p))); box-shadow: calc(9 * var(--p)) calc(9 * var(--p)) 0 var(--ink); }
.eb-btn.alt { background: var(--panel); color: var(--shell); }
.eb-btn.alt:hover { color: var(--shell); }
.eb-error { padding: calc(12 * var(--p)) calc(18 * var(--p)); background: var(--red); border: calc(4 * var(--p)) solid var(--ink); font-weight: 800; }
.eb-note { padding: calc(12 * var(--p)) calc(18 * var(--p)); background: var(--panel); border: calc(4 * var(--p)) solid var(--ink); font-weight: 700; }

/* results (drawn over the game) */
.eb-results { position: fixed; inset: 0; z-index: 99999; background: rgba(24, 18, 58, .95); overflow: auto; text-align: left; line-height: normal; }
.eb-results.hidden { display: none; }
.eb-results .eb-bar { position: fixed; }
.eb-results .slab { position: absolute; left: calc(-60 * var(--p)); top: calc(60 * var(--p)); width: min(calc(1240 * var(--p)), 70vw); height: calc(250 * var(--p)); border: calc(6 * var(--p)) solid var(--ink); box-shadow: calc(12 * var(--p)) calc(12 * var(--p)) 0 var(--ink); transform: skewX(-10deg); }
.eb-results .head { position: relative; padding: calc(74 * var(--p)) 0 0 calc(80 * var(--p)); display: flex; align-items: flex-start; gap: calc(60 * var(--p)); flex-wrap: wrap; min-height: calc(330 * var(--p)); }
.eb-results .big { font-size: calc(176 * var(--p)); }
.eb-results .score { display: flex; align-items: center; gap: calc(24 * var(--p)); margin-top: calc(30 * var(--p)); }
.eb-results .score span { font-size: calc(150 * var(--p)); }
.eb-results .body { position: relative; display: grid; grid-template-columns: minmax(0, calc(1060 * var(--p))) minmax(0, calc(600 * var(--p))); gap: calc(60 * var(--p)); padding: calc(30 * var(--p)) calc(80 * var(--p)) calc(140 * var(--p)); justify-content: space-between; }
.eb-box { display: flex; flex-direction: column; gap: calc(6 * var(--p)); }
.eb-box .h, .eb-box .p { display: grid; grid-template-columns: minmax(0, 1fr) repeat(5, calc(100 * var(--p))); align-items: center; padding: 0 calc(20 * var(--p)); }
.eb-box .h { font-weight: 800; font-size: calc(24 * var(--p)); color: var(--faint); }
.eb-box .h span:not(:first-child), .eb-box .p span:not(:first-child) { text-align: right; }
.eb-box .p { min-height: calc(56 * var(--p)); border: calc(4 * var(--p)) solid var(--ink); font-weight: 900; font-size: calc(30 * var(--p)); }
.eb-box .p.red { background: #3A1F4E; }
.eb-box .p.blue { background: #1F2A63; }
.eb-box .p.me { background: var(--shell); color: var(--night); }
.eb-box .p .n { display: flex; align-items: center; gap: calc(14 * var(--p)); font-weight: 800; font-style: italic; font-size: calc(30 * var(--p)); }
.eb-box .gap { height: calc(12 * var(--p)); }
.eb-mvp { padding: calc(2 * var(--p)) calc(12 * var(--p)); background: var(--yolk); color: var(--night); font-family: 'Titan One', sans-serif; font-style: normal; font-size: calc(20 * var(--p)); border: calc(3 * var(--p)) solid var(--ink); }
.eb-playagain { display: flex; align-items: center; justify-content: center; text-decoration: none; height: calc(180 * var(--p)); background: repeating-linear-gradient(135deg, var(--yolk) 0 calc(30 * var(--p)), var(--yolk-2) calc(30 * var(--p)) calc(60 * var(--p))); color: var(--shell); border: calc(6 * var(--p)) solid var(--ink); box-shadow: calc(12 * var(--p)) calc(12 * var(--p)) 0 var(--ink); transform: skewX(-10deg) rotate(-3deg); margin-top: calc(50 * var(--p)); }
.eb-playagain:hover { color: var(--shell); box-shadow: calc(16 * var(--p)) calc(16 * var(--p)) 0 var(--ink); }
.eb-playagain span { transform: skewX(10deg); font-size: calc(96 * var(--p)); }


/* ---------------- shared building blocks for the other screens ---------------- */
.eb-h1 { margin: 0; font-size: calc(68 * var(--p)); font-weight: 400; }
.eb-h2 { margin: 0; font-size: calc(44 * var(--p)); font-weight: 400; color: var(--shell); }
.eb-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, calc(620 * var(--p))); gap: calc(56 * var(--p)); align-items: start; }
.eb-tag { display: inline-flex; align-items: center; padding: calc(3 * var(--p)) calc(12 * var(--p)); background: var(--night); border: calc(3 * var(--p)) solid var(--ink); font-weight: 800; font-size: calc(20 * var(--p)); color: var(--muted); white-space: nowrap; }
.eb-tag.warn { background: #FF9C40; color: var(--ink); }
.eb-tag.gold { background: var(--yolk); color: var(--ink); }
.eb-input { font: inherit; font-weight: 600; font-size: calc(24 * var(--p)); padding: calc(8 * var(--p)) calc(12 * var(--p)); background: #120D30; color: var(--shell); border: calc(4 * var(--p)) solid var(--ink); border-radius: 0; min-width: 0; }
.eb-input:focus { border-color: var(--yolk); outline: none; }
.eb-input[disabled] { opacity: .65; }
select.eb-input { cursor: pointer; }
.eb-check, .eb-toggle { display: flex; align-items: flex-start; gap: calc(12 * var(--p)); font-weight: 600; font-size: calc(24 * var(--p)); cursor: pointer; }
.eb-check input, .eb-toggle input { flex: none; width: calc(26 * var(--p)); height: calc(26 * var(--p)); margin-top: calc(2 * var(--p)); accent-color: var(--yolk); }
.eb-btn.small { font-size: calc(22 * var(--p)); padding: calc(6 * var(--p)) calc(18 * var(--p)); border-width: calc(4 * var(--p)); box-shadow: calc(5 * var(--p)) calc(5 * var(--p)) 0 var(--ink); }
.eb-btn[hidden], .eb-launch[hidden] { display: none; }
.eb-mini { font: inherit; font-weight: 800; font-size: calc(18 * var(--p)); padding: calc(2 * var(--p)) calc(10 * var(--p)); background: var(--night); color: var(--shell); border: calc(3 * var(--p)) solid var(--ink); cursor: pointer; }
.eb-mini:hover, .eb-mini:focus-visible { background: var(--yolk); color: var(--ink); }
.eb-mini.danger:hover { background: var(--red); color: var(--shell); }
.eb-pre { margin: 0; padding: calc(12 * var(--p)) calc(16 * var(--p)); background: #120D30; border: calc(3 * var(--p)) solid var(--ink); color: var(--shell); font-size: calc(18 * var(--p)); white-space: pre-wrap; user-select: all; }
details.eb-more > summary { cursor: pointer; font-weight: 800; font-size: calc(24 * var(--p)); color: var(--yolk); list-style: none; padding: calc(6 * var(--p)) 0; }
details.eb-more > summary::before { content: "+ "; }
details.eb-more[open] > summary::before { content: "- "; }

/* groups list */
.eb-grp { grid-template-columns: calc(150 * var(--p)) minmax(0, 1fr) auto calc(130 * var(--p)); gap: calc(14 * var(--p)); padding: calc(10 * var(--p)) calc(24 * var(--p)) calc(10 * var(--p)) calc(16 * var(--p)); }
.eb-grp-balls { display: flex; flex-wrap: wrap; gap: calc(4 * var(--p)); }

/* the lobby */
.eb-lobby { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, calc(560 * var(--p))); grid-template-areas: "teams side" "chat side"; gap: calc(30 * var(--p)) calc(40 * var(--p)); margin-top: calc(26 * var(--p)); align-items: start; }
.eb-lobby-teams { grid-area: teams; display: flex; flex-direction: column; gap: calc(16 * var(--p)); min-width: 0; }
.eb-lobby-side { grid-area: side; display: flex; flex-direction: column; gap: calc(26 * var(--p)); min-width: 0; }
.eb-lobby-chat { grid-area: chat; display: flex; flex-direction: column; gap: calc(12 * var(--p)); padding: calc(18 * var(--p)) calc(22 * var(--p)); }
.eb-lobby-bar { display: flex; align-items: center; gap: calc(18 * var(--p)); flex-wrap: wrap; }
.eb-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(18 * var(--p)); }
.eb-teams.one { grid-template-columns: 1fr; }
.eb-team { background: var(--panel); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(8 * var(--p)) calc(8 * var(--p)) 0 var(--ink); min-width: 0; }
.eb-team-head { display: flex; align-items: center; gap: calc(12 * var(--p)); padding: calc(10 * var(--p)) calc(18 * var(--p)); border-bottom: calc(4 * var(--p)) solid var(--ink); font-size: calc(30 * var(--p)); }
.eb-team-head .n { font-weight: 900; font-style: italic; margin-left: auto; }
.eb-team.red .eb-team-head { background: var(--red); }
.eb-team.blue .eb-team-head { background: var(--blue); }
.eb-team.spec .eb-team-head, .eb-team.wait .eb-team-head { background: #2A2063; }
.eb-team.all .eb-team-head { background: var(--violet); font-size: calc(24 * var(--p)); }
.eb-team-list { display: flex; flex-direction: column; min-height: calc(60 * var(--p)); }
.eb-member { display: flex; align-items: center; gap: calc(12 * var(--p)); padding: calc(8 * var(--p)) calc(14 * var(--p)); border-bottom: calc(2 * var(--p)) solid #2F2470; flex-wrap: wrap; }
.eb-member.me { background: rgba(255, 194, 26, .12); }
.eb-member .nm { font-weight: 800; font-style: italic; font-size: calc(28 * var(--p)); flex: 1; }
.eb-member .nm.auth { color: var(--yolk); }
.eb-member .nm i { font-weight: 600; color: var(--muted); }
.eb-member .tools { display: flex; gap: calc(6 * var(--p)); flex-wrap: wrap; width: 100%; padding-left: calc(52 * var(--p)); }
.eb-lobby-game { display: flex; flex-direction: column; gap: calc(16 * var(--p)); padding: calc(26 * var(--p)) calc(30 * var(--p)); }
.eb-launch { display: flex; align-items: center; justify-content: center; height: calc(130 * var(--p)); background: repeating-linear-gradient(135deg, var(--yolk) 0 calc(30 * var(--p)), var(--yolk-2) calc(30 * var(--p)) calc(60 * var(--p))); color: var(--shell); border: calc(6 * var(--p)) solid var(--ink); box-shadow: calc(10 * var(--p)) calc(10 * var(--p)) 0 var(--ink); transform: skewX(-10deg); cursor: pointer; }
.eb-launch span { transform: skewX(10deg); font-size: calc(76 * var(--p)); }
.eb-launch:hover, .eb-launch:focus-visible { box-shadow: calc(14 * var(--p)) calc(14 * var(--p)) 0 var(--ink); }
.eb-lobby-settings, .eb-lobby-invite { display: flex; flex-direction: column; gap: calc(14 * var(--p)); padding: calc(24 * var(--p)) calc(28 * var(--p)); font-size: calc(24 * var(--p)); }
.eb-settings { display: flex; flex-direction: column; gap: calc(12 * var(--p)); }
.eb-setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: calc(14 * var(--p)); font-weight: 700; font-size: calc(23 * var(--p)); }
.eb-upload { display: flex; flex-direction: column; gap: calc(10 * var(--p)); font-size: calc(22 * var(--p)); }
.eb-chatlog { height: calc(240 * var(--p)); overflow-y: auto; display: flex; flex-direction: column; gap: calc(4 * var(--p)); font-size: calc(24 * var(--p)); padding-right: calc(8 * var(--p)); }
.eb-chatlog .msg b { font-weight: 800; color: var(--muted); margin-right: calc(6 * var(--p)); }
.eb-chatlog .msg b.auth { color: var(--yolk); }
.eb-chatlog .msg.sys { color: var(--yolk); font-style: italic; font-weight: 700; }
.eb-p2p { margin-top: calc(22 * var(--p)); padding: calc(20 * var(--p)) calc(26 * var(--p)); border: calc(5 * var(--p)) solid #FF9C40; background: rgba(255, 156, 64, .12); display: flex; flex-direction: column; gap: calc(10 * var(--p)); font-size: calc(24 * var(--p)); }
.eb-p2p[hidden] { display: none; }
@media (max-width: 1100px) {
  .eb-two { grid-template-columns: 1fr; }
  .eb-lobby { grid-template-columns: 1fr; grid-template-areas: "side" "teams" "chat"; }
  .eb-grp { grid-template-columns: minmax(0, 1fr) auto; }
  .eb-grp .eb-grp-balls { display: none; }
}
@media (max-width: 700px) { .eb-teams { grid-template-columns: 1fr; } }


/* replays, maps, settings */
.eb-rep { grid-template-columns: calc(170 * var(--p)) minmax(0, 1fr) calc(220 * var(--p)) calc(120 * var(--p)) calc(110 * var(--p)) calc(200 * var(--p)); min-height: calc(80 * var(--p)); }
.eb-rep-act { display: flex; gap: calc(8 * var(--p)); justify-content: flex-end; padding-right: calc(18 * var(--p)); }
.eb-rep-act .eb-mini { text-decoration: none; font-size: calc(22 * var(--p)); padding: calc(6 * var(--p)) calc(14 * var(--p)); }
.eb-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(520 * var(--p)), 1fr)); gap: calc(30 * var(--p)); }
.eb-map { display: flex; flex-direction: column; overflow: hidden; }
.eb-map img { display: block; width: 100%; height: calc(250 * var(--p)); object-fit: contain; background: #120D30; border-bottom: calc(5 * var(--p)) solid var(--ink); image-rendering: pixelated; }
.eb-map-info { display: flex; flex-direction: column; gap: calc(8 * var(--p)); padding: calc(20 * var(--p)) calc(24 * var(--p)) calc(24 * var(--p)); font-size: calc(24 * var(--p)); }
.eb-map-info form { margin-top: calc(8 * var(--p)); }
.eb-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(560 * var(--p)), 1fr)); gap: calc(30 * var(--p)); align-items: start; }
.eb-keygrid { display: grid; grid-template-columns: calc(110 * var(--p)) 1fr 1fr; gap: calc(10 * var(--p)); align-items: center; }
.eb-keygrid .lbl { font-weight: 800; }
.eb-keybtn { font: inherit; font-weight: 800; font-size: calc(24 * var(--p)); padding: calc(8 * var(--p)) calc(12 * var(--p)); background: var(--shell); color: var(--night); border: none; border-radius: calc(8 * var(--p)); box-shadow: 0 calc(5 * var(--p)) 0 #8C7F66; cursor: pointer; min-width: calc(110 * var(--p)); }
.eb-keybtn.wait { background: var(--yolk); animation: eb-pulse 1s ease-in-out infinite; }
.eb-macro { display: grid; grid-template-columns: calc(130 * var(--p)) calc(140 * var(--p)) minmax(0, 1fr) auto; gap: calc(10 * var(--p)); align-items: center; }
.eb-toast { position: fixed; left: 50%; bottom: calc(110 * var(--p)); transform: translateX(-50%) skewX(-10deg); z-index: 40; padding: calc(10 * var(--p)) calc(28 * var(--p)); background: var(--turf); color: var(--ink); border: calc(4 * var(--p)) solid var(--ink); box-shadow: calc(6 * var(--p)) calc(6 * var(--p)) 0 var(--ink); font-weight: 900; font-style: italic; font-size: calc(26 * var(--p)); }
.eb-toast[hidden] { display: none; }
@media (max-width: 1100px) {
  .eb-rep { grid-template-columns: calc(140 * var(--p)) minmax(0, 1fr) calc(170 * var(--p)) auto; }
  .eb-rep .hide-sm { display: none; }
  .eb-macro { grid-template-columns: 1fr 1fr; }
}


/* the Locker */
.eb-locker { display: grid; grid-template-columns: minmax(0, calc(520 * var(--p))) minmax(0, 1fr); gap: calc(50 * var(--p)); margin-top: calc(30 * var(--p)); align-items: start; }
.eb-locker-me > .in { gap: calc(18 * var(--p)); }
.eb-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(250 * var(--p)), 1fr)); gap: calc(22 * var(--p)); }
.eb-item { display: flex; flex-direction: column; align-items: center; gap: calc(8 * var(--p)); padding: calc(18 * var(--p)) calc(16 * var(--p)) calc(20 * var(--p)); text-align: center; box-shadow: calc(7 * var(--p)) calc(7 * var(--p)) 0 var(--ink); }
.eb-item.on { outline: calc(5 * var(--p)) solid var(--yolk); outline-offset: calc(3 * var(--p)); }
.eb-item.locked .eb-item-art { filter: grayscale(.85) brightness(.7); }
.eb-item h2 { margin: 0; font-size: calc(30 * var(--p)); font-weight: 400; max-width: 100%; }
.eb-item-art { display: flex; align-items: center; justify-content: center; gap: calc(6 * var(--p)); min-height: calc(130 * var(--p)); }
.eb-item-req { font-weight: 700; font-size: calc(21 * var(--p)); }
.eb-item .eb-meter { width: 100%; height: calc(14 * var(--p)); }
.eb-item-act { margin-top: auto; padding-top: calc(6 * var(--p)); }
.eb-titlechip { display: inline-block; padding: calc(6 * var(--p)) calc(18 * var(--p)); background: var(--yolk); color: var(--ink); border: calc(4 * var(--p)) solid var(--ink); transform: skewX(-10deg); font-weight: 900; font-style: italic; font-size: calc(26 * var(--p)); align-self: flex-start; }
.eb-titlechip.none { background: #2A2063; color: var(--muted); }
.eb-flair { display: inline-block; flex: none; background-image: url(/R-62bb0909b74c-z/eggball/flairs.png); background-repeat: no-repeat; image-rendering: pixelated; vertical-align: middle; }
@media (max-width: 1100px) { .eb-locker { grid-template-columns: 1fr; } }

/* narrow screens: stack it all */
@media (max-width: 1100px) {
  .eb { --p: calc(clamp(0.55px, calc(100vw / 1300), 1px) * var(--ui-scale, 1)); } /* narrow: size by width only, the page scrolls */
  .eb-menu { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: calc(210 * var(--p)); height: auto; transform: none; margin: calc(24 * var(--p)) 0 0; }
  .eb-tile .in { transform: none; inset: 0; }
  .eb-side { grid-row: auto; grid-column: 1 / 3; flex-direction: row; }
  .eb-tile.ranked { grid-row: auto; grid-column: 1 / 3; height: calc(320 * var(--p)); }
  .eb-q, .eb-prof, .eb-lb, .eb-results .body { grid-template-columns: minmax(0, 1fr); }
  .eb-lb-row { grid-template-columns: calc(70 * var(--p)) calc(56 * var(--p)) minmax(0, 1fr) calc(110 * var(--p)); }
  .eb-lb-row .hide-sm { display: none; }
  .eb-game { grid-template-columns: calc(120 * var(--p)) minmax(0, 1fr) calc(160 * var(--p)) calc(90 * var(--p)); }
  .eb-game .hide-sm { display: none; }
}
@media (max-width: 700px) {
  .eb-menu { grid-template-columns: 1fr; }
  .eb-side, .eb-tile.ranked { grid-column: auto; }
  .eb-tile .art { width: 38%; }
  .eb-top-right { justify-content: flex-start; }
  .eb-rules { grid-template-columns: 1fr; }
  .eb-box .h, .eb-box .p { grid-template-columns: minmax(0, 1fr) repeat(5, calc(64 * var(--p))); }
}
@media (prefers-reduced-motion: reduce) { .eb * { transition: none !important; animation: none !important; } }

/* ---------- party: the chip in the top bar and the drawer (party.js) ---------- */
.eb-party-chip { display: contents; }
.eb-party-chip form { margin: 0; display: contents; }
.eb-party-chip .eb-chip { cursor: pointer; font-size: calc(26 * var(--p)); }
.eb-party-chip .eb-chip > span { display: inline-flex; align-items: center; gap: calc(10 * var(--p)); }
.eb-party-balls { display: inline-flex; }
.eb-party-balls svg + svg { margin-left: calc(-9 * var(--p)); }
.eb-party-unread { display: inline-grid; place-items: center; min-width: calc(28 * var(--p)); height: calc(28 * var(--p)); padding: 0 calc(6 * var(--p)); background: var(--red); color: var(--shell); border: calc(3 * var(--p)) solid var(--ink); font-style: normal; font-weight: 900; font-size: calc(18 * var(--p)); }
.eb-party {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(calc(560 * var(--p)), 100vw); overflow-y: auto;
  display: flex; flex-direction: column; gap: calc(22 * var(--p)); padding: calc(30 * var(--p)) calc(32 * var(--p)) calc(40 * var(--p));
  background: var(--panel); border-left: calc(6 * var(--p)) solid var(--ink); box-shadow: calc(-14 * var(--p)) 0 0 rgba(12, 8, 32, .55);
  animation: eb-party-in .16s ease-out;
}
.eb-party[hidden] { display: none; }
@keyframes eb-party-in { from { transform: translateX(calc(60 * var(--p))); opacity: 0; } }
.eb-party-head { display: flex; align-items: center; justify-content: space-between; }
.eb-party-head h2 { margin: 0; font-size: calc(64 * var(--p)); color: var(--shell); }
.eb-party-x { display: inline-flex; align-items: center; gap: calc(8 * var(--p)); background: none; border: 0; cursor: pointer; font-weight: 800; font-size: calc(22 * var(--p)); color: var(--muted); }
.eb-party-x:hover { color: var(--shell); }
.eb-party-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(8 * var(--p)); }
.eb-party-m { display: flex; align-items: center; gap: calc(14 * var(--p)); padding: calc(10 * var(--p)) calc(14 * var(--p)); background: var(--night); border: calc(4 * var(--p)) solid var(--ink); }
.eb-party-m.me { border-color: var(--yolk); }
.eb-party-m .who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.eb-party-m .who b { font-size: calc(28 * var(--p)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-party-m .who small { font-size: calc(19 * var(--p)); font-weight: 700; color: var(--muted); }
.eb-party-m .who small.st-queue, .eb-party-m .who small.st-game { color: var(--turf); }
.eb-party-m .who small.st-away { color: var(--faint); }
.eb-party-m .tools { display: flex; gap: calc(6 * var(--p)); }
.eb-party-m.slot { background: transparent; border-style: dashed; border-color: #3A2F7A; }
.eb-party-m .slot-ball { width: calc(40 * var(--p)); height: calc(40 * var(--p)); border-radius: 50%; border: calc(3 * var(--p)) dashed #4B3F95; }
.eb-party-invite, .eb-party-go, .eb-party-chat { display: flex; flex-direction: column; gap: calc(10 * var(--p)); }
.eb-party-invite label { font-weight: 800; color: var(--muted); }
.eb-party .row { display: flex; gap: calc(12 * var(--p)); align-items: stretch; }
.eb-party .row .eb-input { flex: 1; }
.eb-party-invite .eb-mini { align-self: flex-start; }
.eb-party-go .grid { display: grid; grid-template-columns: 1fr 1fr; gap: calc(14 * var(--p)); }
.eb-party-chat .eb-chatlog { height: calc(220 * var(--p)); padding: calc(8 * var(--p)); background: var(--night); border: calc(4 * var(--p)) solid var(--ink); list-style: none; margin: 0; }
.eb-party-leave { margin: 0; }
.eb-party-toast {
  position: fixed; left: 50%; bottom: calc(110 * var(--p)); z-index: 70; transform: translateX(-50%) skewX(-8deg); max-width: 92vw;
  padding: calc(12 * var(--p)) calc(26 * var(--p)); background: var(--shell); color: var(--night); border: calc(4 * var(--p)) solid var(--ink); box-shadow: calc(7 * var(--p)) calc(7 * var(--p)) 0 var(--ink);
  font-weight: 700; font-size: calc(26 * var(--p)); display: flex; gap: calc(14 * var(--p)); align-items: center;
}
.eb-party-toast[hidden] { display: none; }
.eb-party-toast b { font-weight: 900; }

/* ---------- practice setup ---------- */
.eb-practice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: calc(26 * var(--p)) calc(40 * var(--p)); margin-top: calc(26 * var(--p)); align-items: start; }
.eb-practice-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: calc(28 * var(--p)); flex-wrap: wrap; }
.eb-practice-head h1 { margin: 0; }
.eb-practice-head p { margin: 0; font-size: calc(26 * var(--p)); }
.eb-pickset { display: flex; flex-direction: column; gap: calc(12 * var(--p)); }
.eb-pickset h2 { margin: 0; font-size: calc(36 * var(--p)); }
.eb-pickset:nth-of-type(3) { grid-row: span 2; }
.eb-picks { display: grid; gap: calc(14 * var(--p)); }
.eb-picks.four { grid-template-columns: repeat(4, 1fr); }
.eb-picks.three { grid-template-columns: repeat(3, 1fr); }
.eb-picks.maps { grid-template-columns: repeat(3, 1fr); }
.eb-pick { position: relative; cursor: pointer; display: block; }
.eb-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.eb-pick-in { display: flex; flex-direction: column; align-items: flex-start; gap: calc(6 * var(--p)); height: 100%; padding: calc(14 * var(--p)) calc(16 * var(--p)); background: var(--panel); border: calc(4 * var(--p)) solid var(--ink); box-shadow: calc(6 * var(--p)) calc(6 * var(--p)) 0 var(--ink); transition: transform .08s; }
.eb-pick-in b { font-size: calc(30 * var(--p)); }
.eb-pick-in span { font-size: calc(19 * var(--p)); color: var(--muted); line-height: 1.15; font-weight: 600; }
.eb-pick:hover .eb-pick-in { transform: translate(calc(-2 * var(--p)), calc(-2 * var(--p))); }
.eb-pick input:checked + .eb-pick-in { background: var(--yolk); color: var(--night); }
.eb-pick input:checked + .eb-pick-in span { color: #3A2E10; }
.eb-pick input:focus-visible + .eb-pick-in { outline: calc(5 * var(--p)) solid var(--shell); outline-offset: calc(3 * var(--p)); }
.eb-pick.hard input:checked + .eb-pick-in { background: var(--red); color: var(--shell); }
.eb-pick.hard input:checked + .eb-pick-in span { color: #FFE2DE; }
.eb-pick.easy input:checked + .eb-pick-in { background: var(--turf); }
.eb-pick-balls { display: flex; align-items: center; gap: calc(3 * var(--p)); flex-wrap: wrap; }
.eb-pick-balls i { font-style: italic; font-weight: 900; margin: 0 calc(4 * var(--p)); color: inherit; opacity: .7; }
.eb-pick.map .eb-pick-in { padding: calc(8 * var(--p)); }
.eb-pick.map img { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; background: var(--night); border: calc(3 * var(--p)) solid var(--ink); image-rendering: pixelated; }
.eb-pick.map b { font-size: calc(24 * var(--p)); padding: 0 calc(4 * var(--p)); }
.eb-start { grid-column: 2; justify-self: start; font-size: calc(44 * var(--p)); padding: calc(16 * var(--p)) calc(54 * var(--p)); }
@media (max-width: 1100px) {
  .eb-practice { grid-template-columns: 1fr; }
  .eb-pickset:nth-of-type(3) { grid-row: auto; }
  .eb-start { grid-column: 1; }
}
@media (max-width: 700px) { .eb-picks.four, .eb-picks.maps { grid-template-columns: repeat(2, 1fr); } }

/* ---------- moderation (admins) ---------- */
.eb-mod { display: grid; grid-template-columns: minmax(0, 1fr) calc(420 * var(--p)); gap: calc(30 * var(--p)); margin-top: calc(20 * var(--p)); align-items: start; }
.eb-mod-main, .eb-mod-side { display: flex; flex-direction: column; gap: calc(18 * var(--p)); }
.eb-mod-side .eb-panel { padding: calc(18 * var(--p)) calc(22 * var(--p)); display: flex; flex-direction: column; gap: calc(8 * var(--p)); }
.eb-mod-head { display: flex; align-items: baseline; justify-content: space-between; }
.eb-report { padding: calc(16 * var(--p)) calc(20 * var(--p)); display: flex; flex-direction: column; gap: calc(10 * var(--p)); }
.eb-report.done { opacity: .6; }
.eb-report header { display: flex; align-items: center; gap: calc(12 * var(--p)); flex-wrap: wrap; }
.eb-report header b { font-size: calc(30 * var(--p)); }
.eb-report-chat { margin: 0; padding: calc(8 * var(--p)) calc(12 * var(--p)) calc(8 * var(--p)) calc(40 * var(--p)); background: var(--night); border: calc(3 * var(--p)) solid var(--ink); font-size: calc(22 * var(--p)); }
.eb-mod-line { display: flex; align-items: center; gap: calc(10 * var(--p)); flex-wrap: wrap; margin: 0; }
.eb-mod-line > :first-child { font-weight: 800; }
@media (max-width: 1100px) { .eb-mod { grid-template-columns: 1fr; } }
.eb button.eb-btn { font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: calc(32 * var(--p)); }
.eb button.eb-btn.small { font-size: calc(22 * var(--p)); }
.eb button.eb-start { font-size: calc(44 * var(--p)); }

/* ---------- the tutorial coach (eggball.js, on the game page) ---------- */
.eb-coach {
  position: fixed; top: calc(24 * var(--p)); left: 50%; transform: translateX(-50%); z-index: 45; width: min(calc(820 * var(--p)), 92vw);
  display: grid; grid-template-columns: auto 1fr; align-items: stretch; background: var(--panel); color: var(--shell);
  border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(10 * var(--p)) calc(10 * var(--p)) 0 var(--ink); pointer-events: auto;
}
.eb-coach-step { display: grid; place-items: center; padding: 0 calc(22 * var(--p)); background: var(--yolk); color: var(--night); border-right: calc(5 * var(--p)) solid var(--ink); font-weight: 900; font-style: italic; font-size: calc(30 * var(--p)); white-space: nowrap; }
.eb-coach-body { padding: calc(14 * var(--p)) calc(22 * var(--p)) calc(16 * var(--p)); display: flex; flex-direction: column; gap: calc(6 * var(--p)); }
.eb-coach-body .eb-display { font-size: calc(40 * var(--p)); }
.eb-coach-body p { margin: 0; font-size: calc(25 * var(--p)); line-height: 1.2; font-weight: 600; }
.eb-coach-keys { display: flex; gap: calc(8 * var(--p)); margin-top: calc(4 * var(--p)); }
.eb-coach .eb-key { display: inline-grid; place-items: center; min-width: calc(40 * var(--p)); padding: calc(2 * var(--p)) calc(10 * var(--p)); background: var(--shell); color: var(--night); border: calc(3 * var(--p)) solid var(--ink); font-weight: 900; font-size: calc(20 * var(--p)); }
.eb-coach-skip { position: absolute; right: calc(-5 * var(--p)); bottom: calc(-42 * var(--p)); }
.eb-coach-say { position: absolute; left: calc(40 * var(--p)); bottom: calc(-52 * var(--p)); padding: calc(6 * var(--p)) calc(18 * var(--p)); background: var(--turf); color: var(--ink); border: calc(4 * var(--p)) solid var(--ink); font-weight: 900; font-style: italic; font-size: calc(24 * var(--p)); transform: skewX(-8deg); }
.eb-coach-say[hidden] { display: none; }
.eb-coach.done { top: 50%; transform: translate(-50%, -50%); display: block; padding: calc(36 * var(--p)) calc(44 * var(--p)); width: min(calc(900 * var(--p)), 94vw); }
.eb-coach-done { display: flex; flex-direction: column; gap: calc(16 * var(--p)); }
.eb-coach-done .big { font-size: calc(96 * var(--p)); color: var(--yolk); }
.eb-coach-done p { margin: 0; font-size: calc(30 * var(--p)); }
.eb-coach-go { display: flex; gap: calc(22 * var(--p)); flex-wrap: wrap; margin-top: calc(10 * var(--p)); }
/* buttons that are links keep their own text colour (".eb a" would otherwise make them yolk) */
.eb .eb-btn, .eb .eb-btn:hover { color: var(--night); }
.eb .eb-btn.alt, .eb .eb-btn.alt:hover { color: var(--shell); }
.eb-coach { overflow: visible; }

/* ---------- the Hatchery (screens.js hatcheryPage, hatchery.js) ---------- */
.hx { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: calc(40 * var(--p)); margin-top: calc(10 * var(--p)); align-items: start; }
.hx-main { display: flex; flex-direction: column; align-items: center; gap: calc(18 * var(--p)); position: relative; }
.hx-wallet { align-self: flex-start; font-size: calc(30 * var(--p)); }
.hx-wallet > span { display: inline-flex; align-items: center; gap: calc(10 * var(--p)); }
.hx-wallet b { font-weight: 900; font-size: calc(40 * var(--p)); font-style: italic; }
.hx-pedestal { position: relative; width: calc(560 * var(--p)); height: calc(560 * var(--p)); display: grid; place-items: center; }
.hx-spot { position: absolute; inset: 0; background: radial-gradient(closest-side, rgba(255, 243, 214, .2), rgba(255, 243, 214, .05) 60%, transparent 72%); }
.hx-nest { position: absolute; left: 50%; bottom: calc(70 * var(--p)); width: calc(340 * var(--p)); height: calc(90 * var(--p)); transform: translateX(-50%); border-radius: 50%;
  background: repeating-linear-gradient(-20deg, #A0662E 0 calc(10 * var(--p)), #7A4A1E calc(10 * var(--p)) calc(16 * var(--p))); border: calc(6 * var(--p)) solid var(--ink); box-shadow: 0 calc(10 * var(--p)) 0 var(--ink); }
.hx-showegg { position: relative; z-index: 1; width: calc(300 * var(--p)); height: calc(390 * var(--p)); margin-bottom: calc(80 * var(--p)); }
.hx-show svg { width: 100%; height: 100%; display: block; overflow: visible; animation: hx-bob 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes hx-bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(calc(-10 * var(--p))) rotate(1.5deg); } }
.hx-cracks path { stroke: var(--ink); stroke-width: 6; stroke-dasharray: 400; stroke-dashoffset: 400; opacity: 0; transition: stroke-dashoffset .22s ease-out, opacity .05s; }
.hx-cracks path.on { stroke-dashoffset: 0; opacity: 1; }
.hx-cta { display: flex; flex-direction: column; align-items: center; gap: calc(10 * var(--p)); }
.eb button.hx-crack { font-size: calc(54 * var(--p)); padding: calc(16 * var(--p)) calc(54 * var(--p)); gap: calc(24 * var(--p)); }
.hx-price { display: inline-flex; align-items: center; gap: calc(8 * var(--p)); font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-style: italic; font-size: calc(36 * var(--p)); }
.hx-crack.off { filter: grayscale(.7) brightness(.8); cursor: not-allowed; }
.hx-need { font-weight: 700; font-size: calc(24 * var(--p)); }
.hx-side { display: flex; flex-direction: column; gap: calc(20 * var(--p)); }
.hx-eggs { display: grid; grid-template-columns: 1fr 1fr; gap: calc(16 * var(--p)); }
.hx-pickegg { position: relative; cursor: pointer; display: block; }
.hx-pickegg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.hx-pickegg .in { display: flex; gap: calc(14 * var(--p)); padding: calc(14 * var(--p)); height: 100%; background: var(--panel); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(7 * var(--p)) calc(7 * var(--p)) 0 var(--ink); }
.hx-pickegg input:checked + .in { background: #3A2E85; border-color: var(--yolk); }
.hx-pickegg input:focus-visible + .in { outline: calc(5 * var(--p)) solid var(--shell); outline-offset: calc(3 * var(--p)); }
.hx-pickegg .mini { flex: none; width: calc(64 * var(--p)); height: calc(84 * var(--p)); }
.hx-pickegg .mini svg { width: 100%; height: 100%; }
.hx-pickegg .txt { display: flex; flex-direction: column; gap: calc(4 * var(--p)); min-width: 0; }
.hx-pickegg .txt b { font-size: calc(32 * var(--p)); }
.hx-pickegg .price { display: inline-flex; align-items: center; gap: calc(6 * var(--p)); font-weight: 900; font-style: italic; font-size: calc(26 * var(--p)); color: var(--yolk); }
.hx-pickegg .eb-muted { font-size: calc(19 * var(--p)); }
.hx-odds { display: flex; height: calc(12 * var(--p)); border: calc(3 * var(--p)) solid var(--ink); margin-top: calc(4 * var(--p)); }
.hx-odds i { display: block; min-width: calc(4 * var(--p)); }
.hx-odds-key { display: flex; flex-wrap: wrap; gap: calc(2 * var(--p)) calc(10 * var(--p)); font-size: calc(16 * var(--p)); font-weight: 700; color: var(--muted); }
.hx-odds-key span { display: inline-flex; align-items: center; gap: calc(4 * var(--p)); }
.hx-odds-key b { width: calc(10 * var(--p)); height: calc(10 * var(--p)); border: calc(2 * var(--p)) solid var(--ink); display: inline-block; }
.hx-panel { padding: calc(18 * var(--p)) calc(22 * var(--p)); display: flex; flex-direction: column; gap: calc(10 * var(--p)); }
.hx-panel h2 { margin: 0; font-size: calc(30 * var(--p)); }
.hx-panel .eb-mini { align-self: flex-start; }
.hx-colrow { display: grid; grid-template-columns: calc(110 * var(--p)) 1fr calc(60 * var(--p)); align-items: center; gap: calc(12 * var(--p)); font-weight: 800; }
.hx-colrow .eb-meter { height: calc(14 * var(--p)); }
.hx-colrow b { text-align: right; }
.hx-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(6 * var(--p)); font-size: calc(22 * var(--p)); }
.hx-recent li { display: flex; align-items: center; gap: calc(10 * var(--p)); }
.hx-recent .dot { width: calc(14 * var(--p)); height: calc(14 * var(--p)); border: calc(3 * var(--p)) solid var(--ink); transform: rotate(45deg); flex: none; }
.hx-earn p { margin: 0; font-size: calc(21 * var(--p)); line-height: 1.25; }
.hx-earn b { color: var(--yolk); }
.hx-coin { flex: none; }

/* the crack: a full-screen stage */
.hx-stage { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: radial-gradient(circle at 50% 46%, #2A2063 0%, #120D30 55%, #07051A 100%); overflow: hidden; --rc: #FFF3D6; }
.hx-stage[hidden] { display: none; }
.hx-stage.on { animation: hx-in .25s ease-out; }
@keyframes hx-in { from { opacity: 0; } }
.hx-rays { position: absolute; left: var(--cx, 50%); top: var(--cy, 46%); width: 260vmax; height: 260vmax; transform: translate(-50%, -50%); opacity: 0; transition: opacity .4s, left .3s, top .3s; pointer-events: none;
  color: color-mix(in srgb, var(--rc) 50%, transparent);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .55) 18%, transparent 40%); mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .55) 18%, transparent 40%); }
.hx-rays svg { width: 100%; height: 100%; display: block; animation: hx-spin 30s linear infinite; }
@keyframes hx-spin { to { transform: rotate(360deg); } }
.hx-stage.shown .hx-rays { opacity: 1; }
.hx-glow { position: absolute; left: var(--cx, 50%); top: var(--cy, 46%); width: 30vmin; height: 30vmin; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--rc) 85%, white) 0%, color-mix(in srgb, var(--rc) 40%, transparent) 40%, transparent 70%); opacity: 0; transition: width .35s, height .35s, opacity .35s, background .35s; }
.hx-stage.glow1 .hx-glow { opacity: .35; width: 44vmin; height: 44vmin; }
.hx-stage.glow2 .hx-glow { opacity: .55; width: 58vmin; height: 58vmin; }
.hx-stage.glow3 .hx-glow { opacity: .8; width: 74vmin; height: 74vmin; }
.hx-stage.tell .hx-glow { animation: hx-pulse .5s ease-in-out infinite alternate; }
@keyframes hx-pulse { to { filter: brightness(1.35); transform: translate(-50%, -50%) scale(1.08); } }
.hx-stage.shown .hx-glow { opacity: .9; width: 90vmin; height: 90vmin; animation: none; }
.hx-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.hx-bigegg { position: relative; z-index: 2; width: min(38vmin, calc(420 * var(--p))); aspect-ratio: 200 / 260; transform-origin: 50% 85%; }
.hx-bigegg svg { width: 100%; height: 100%; overflow: visible; display: block; }
.hx-bigegg .hx-half { transform-box: fill-box; transform-origin: center; }
.hx-stage.leak .hx-cracks path, .hx-stage.burst .hx-cracks path { stroke: var(--rc); filter: drop-shadow(0 0 6px var(--rc)) drop-shadow(0 0 14px var(--rc)); }
.hx-flash { position: absolute; inset: 0; background: #FFFDF2; opacity: 0; pointer-events: none; z-index: 4; }
.hx-reveal { position: absolute; z-index: 5; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(16 * var(--p)); text-align: center; }
.hx-reveal[hidden] { display: none; }
.hx-rarity { font-size: calc(110 * var(--p)); transform: rotate(-4deg); }
.hx-item { min-height: calc(240 * var(--p)); display: grid; place-items: center; filter: drop-shadow(calc(8 * var(--p)) calc(8 * var(--p)) 0 var(--ink)); }
.hx-item .eb-titlechip { font-size: calc(60 * var(--p)); }
.hx-name { font-size: calc(76 * var(--p)); color: var(--shell); }
.hx-slot { display: flex; align-items: center; gap: calc(14 * var(--p)); font-weight: 800; font-size: calc(30 * var(--p)); color: var(--muted); flex-wrap: wrap; justify-content: center; }
.hx-tag { padding: calc(4 * var(--p)) calc(16 * var(--p)); border: calc(4 * var(--p)) solid var(--ink); transform: skewX(-10deg); font-weight: 900; font-style: italic; }
.hx-tag.new { background: var(--turf); color: var(--ink); }
.hx-tag.dup { background: var(--panel); color: var(--shell); }
.hx-tag.dup b { color: var(--yolk); }
.hx-acts { display: flex; gap: calc(20 * var(--p)); flex-wrap: wrap; justify-content: center; margin-top: calc(10 * var(--p)); }
.hx-acts .eb-btn[disabled] { opacity: .6; cursor: not-allowed; }
.hx-skip { position: absolute; bottom: calc(40 * var(--p)); left: 50%; transform: translateX(-50%); z-index: 6; font-weight: 800; color: var(--muted); font-size: calc(24 * var(--p)); }
.hx-skip[hidden] { display: none; }
@media (max-width: 1100px) {
  .hx { grid-template-columns: 1fr; }
  .hx-pedestal { width: calc(460 * var(--p)); height: calc(460 * var(--p)); }
}
@media (max-width: 700px) { .hx-eggs { grid-template-columns: 1fr; } }
.eb-flair { image-rendering: auto; }
/* rarity on Locker cards */
.eb-item { position: relative; border-top-color: var(--rar, var(--ink)); border-top-width: calc(8 * var(--p)); }
.eb-rar { position: absolute; top: calc(8 * var(--p)); right: calc(10 * var(--p)); padding: calc(1 * var(--p)) calc(10 * var(--p)); background: var(--rar); color: var(--ink); border: calc(3 * var(--p)) solid var(--ink); font-weight: 900; font-style: italic; font-size: calc(16 * var(--p)); transform: skewX(-10deg); }
/* results: progress (Eggcoins and level) */
.eb-prog { padding: calc(20 * var(--p)) calc(26 * var(--p)); display: flex; flex-direction: column; gap: calc(10 * var(--p)); }
.eb-prog-head { display: flex; align-items: baseline; justify-content: space-between; font-weight: 800; font-size: calc(28 * var(--p)); }
.eb-prog-coins { font-size: calc(64 * var(--p)); color: var(--yolk); }
.eb-prog-parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(2 * var(--p)); font-size: calc(22 * var(--p)); font-weight: 700; }
.eb-prog-parts li { display: flex; justify-content: space-between; }
.eb-prog-parts b { color: var(--yolk); }
.eb-prog-foot, .eb-prog-deg { display: flex; align-items: center; justify-content: space-between; gap: calc(12 * var(--p)); font-weight: 800; font-size: calc(24 * var(--p)); padding-top: calc(8 * var(--p)); border-top: calc(3 * var(--p)) solid var(--ink); }
.eb-prog-foot b, .eb-prog-deg b { color: var(--yolk); }
.eb-prog > .eb-btn { align-self: flex-start; }
.eb-coach-gift { font-weight: 800; color: var(--yolk); }
/* highlights (Replays screen) */
.eb-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(380 * var(--p)), 1fr)); gap: calc(22 * var(--p)); margin-top: calc(22 * var(--p)); }
.eb-clip { padding: calc(18 * var(--p)) calc(22 * var(--p)); display: flex; flex-direction: column; gap: calc(8 * var(--p)); border-left-width: calc(12 * var(--p)); border-left-color: var(--turf); }
.eb-clip.boat { border-left-color: var(--yolk); }
.eb-clip-kind { font-size: calc(40 * var(--p)); color: var(--turf); }
.eb-clip.boat .eb-clip-kind { color: var(--yolk); }
.eb-clip-who { display: flex; align-items: center; gap: calc(10 * var(--p)); font-size: calc(30 * var(--p)); min-width: 0; }
.eb-clip .eb-muted { font-weight: 700; font-size: calc(21 * var(--p)); }
.eb-clip-act { display: flex; align-items: center; gap: calc(10 * var(--p)); margin-top: calc(6 * var(--p)); flex-wrap: wrap; }

/* ---------- sign in / welcome ---------- */
.eb-signin { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: calc(40 * var(--p)); margin-top: calc(40 * var(--p)); max-width: calc(1500 * var(--p)); align-items: start; }
.eb-signin-main { padding: calc(36 * var(--p)) calc(44 * var(--p)); display: flex; flex-direction: column; gap: calc(16 * var(--p)); }
.eb-signin-main h1 { margin: 0; font-size: calc(96 * var(--p)); }
.eb-signin-why { margin: 0; font-weight: 800; font-size: calc(30 * var(--p)); color: var(--yolk); }
.eb-signin-main > .eb-muted, .eb-signin-main p { margin: 0; font-size: calc(24 * var(--p)); }
.eb .eb-google { align-self: flex-start; font-size: calc(44 * var(--p)); padding: calc(18 * var(--p)) calc(48 * var(--p)); background: var(--shell); }
.eb-testsignin { margin-top: calc(14 * var(--p)); padding-top: calc(20 * var(--p)); border-top: calc(4 * var(--p)) dashed #3A2F7A; gap: calc(10 * var(--p)); }
.eb-testsignin h2 { margin: 0; font-size: calc(34 * var(--p)); }
.eb-testsignin .row { display: flex; gap: calc(12 * var(--p)); }
.eb-testsignin .row .eb-input { flex: 1; }
.eb-signin-perks { padding: calc(30 * var(--p)) calc(34 * var(--p)); display: flex; flex-direction: column; gap: calc(14 * var(--p)); }
aside.eb-signin-perks:not(.eb-panel) { background: transparent; }
.eb-signin-perks h2 { margin: 0; font-size: calc(38 * var(--p)); }
.eb-signin-perks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(12 * var(--p)); }
.eb-signin-perks li { display: flex; flex-direction: column; font-size: calc(24 * var(--p)); }
.eb-signin-perks li b { font-size: calc(32 * var(--p)); color: var(--yolk); }
.eb-signin-perks p { margin: 0; font-size: calc(22 * var(--p)); }
.eb-bigname { font-size: calc(44 * var(--p)); font-weight: 800; font-style: italic; }
@media (max-width: 1100px) { .eb-signin { grid-template-columns: 1fr; } }

/* menu: the strip tiles (practice, tutorial), the Hatchery tile, the season chip, the welcome line */
.eb-tile.strip .art { width: auto; height: 78%; top: 11%; right: calc(46 * var(--p)); max-width: 34%; }
.eb-tile.strip .label { bottom: calc(18 * var(--p)); gap: calc(2 * var(--p)); right: 38%; }
.eb-tile.strip .label .t { font-size: calc(48 * var(--p)); }
.eb-tile.strip .label .s { font-size: calc(24 * var(--p)); }
.eb-tile.practice { background: #1E5C3E; }
.eb-tile.tutorial { background: var(--shell); color: var(--night); }
.eb-tile.tutorial:hover { color: var(--night); }
.eb-tile.tutorial .label .t { color: var(--red); }
.eb-newbadge { position: absolute; top: calc(-4 * var(--p)); right: calc(60 * var(--p)); z-index: 2; padding: calc(2 * var(--p)) calc(12 * var(--p)); background: var(--red); color: var(--shell); border: calc(3 * var(--p)) solid var(--ink); font-weight: 900; font-style: italic; font-size: calc(20 * var(--p)); transform: skewX(-8deg); animation: eb-nudge 1.6s ease-in-out infinite; }
@keyframes eb-nudge { 50% { transform: skewX(-8deg) translateY(calc(-4 * var(--p))); } }
.eb-tile.small.hatch { background: #3A2E10; }
.eb-tile.small.hatch .t { color: var(--yolk); }
.eb-coins { font-weight: 800; font-size: calc(20 * var(--p)); color: var(--shell); }
.eb-top-left { display: flex; align-items: center; gap: calc(30 * var(--p)); flex-wrap: wrap; }
.eb-season-chip { text-decoration: none; }
.eb-season-chip > span { display: flex; flex-direction: column; line-height: 1.05; }
.eb-season-chip b { font-size: calc(30 * var(--p)); }
.eb-season-name { font-weight: 800; font-size: calc(22 * var(--p)); }
.eb-season-days { font-weight: 700; font-size: calc(18 * var(--p)); opacity: .8; }
.eb-welcome { margin: calc(14 * var(--p)) 2vw 0 4vw; padding: calc(10 * var(--p)) calc(24 * var(--p)); background: var(--turf); color: var(--ink); border: calc(4 * var(--p)) solid var(--ink); box-shadow: calc(6 * var(--p)) calc(6 * var(--p)) 0 var(--ink); transform: skewX(-7deg); font-weight: 700; font-size: calc(26 * var(--p)); display: inline-flex; gap: calc(10 * var(--p)); flex-wrap: wrap; }
.eb-welcome b { font-weight: 900; }

/* the menu's logo is a little smaller so everything fits above the bottom bar */
.eb-top-left .eb-logo { font-size: calc(118 * var(--p)); }
.eb-more-links { margin-top: calc(22 * var(--p)); }
@media (max-width: 700px) { .eb-tile.ranked .art { opacity: .35; } .eb-tile.strip .label { right: calc(30 * var(--p)); } }

/* ---------- the Season screen ---------- */
.eb-season { display: flex; flex-direction: column; gap: calc(22 * var(--p)); margin-top: calc(20 * var(--p)); }
.eb-season-head { display: flex; flex-direction: column; gap: calc(8 * var(--p)); }
.eb-season-num { font-size: calc(40 * var(--p)); color: var(--yolk); }
.eb-season-head h1 { margin: 0; font-size: calc(110 * var(--p)); }
.eb-season-time { display: flex; align-items: center; gap: calc(20 * var(--p)); flex-wrap: wrap; font-size: calc(26 * var(--p)); }
.eb-season-time .eb-meter { width: calc(520 * var(--p)); height: calc(20 * var(--p)); }
.eb-season-you { display: flex; align-items: center; gap: calc(22 * var(--p)); padding: calc(18 * var(--p)) calc(26 * var(--p)); align-self: flex-start; flex-wrap: wrap; }
.eb-season-you > div { display: flex; flex-direction: column; }
.eb-season-you b { font-size: calc(48 * var(--p)); }
.eb-season h2 { margin: 0; font-size: calc(40 * var(--p)); }
.eb-season-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: calc(16 * var(--p)); }
.eb-srw { display: flex; flex-direction: column; align-items: center; gap: calc(8 * var(--p)); padding: calc(16 * var(--p)) calc(12 * var(--p)); background: var(--panel); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(7 * var(--p)) calc(7 * var(--p)) 0 var(--ink); text-align: center; }
.eb-srw.got { border-color: var(--yolk); }
.eb-srw-tier { display: flex; flex-direction: column; align-items: center; gap: calc(4 * var(--p)); font-size: calc(26 * var(--p)); }
.eb-srw-box { width: calc(110 * var(--p)); height: calc(110 * var(--p)); display: grid; place-items: center; background: var(--night); border: calc(4 * var(--p)) dashed #4B3F95; }
.eb-srw-q { font-size: calc(60 * var(--p)); color: #8A7FD6; }
.eb-srw-name { font-weight: 800; font-size: calc(22 * var(--p)); line-height: 1.1; }
.eb-srw .eb-muted { font-size: calc(19 * var(--p)); font-weight: 700; }
.eb-season-how { padding: calc(20 * var(--p)) calc(26 * var(--p)); display: flex; flex-direction: column; gap: calc(8 * var(--p)); max-width: calc(1100 * var(--p)); }
.eb-season-how p { margin: 0; font-size: calc(23 * var(--p)); }
@media (max-width: 1100px) { .eb-season-track { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .eb-season-track { grid-template-columns: repeat(2, 1fr); } }
/* button text colours ".eb button" would otherwise reset */
.eb .eb-keybtn { color: var(--night); }
.eb .eb-party-x { color: var(--muted); }
.eb-clips > .eb-empty { grid-column: 1 / -1; }
.eb-lobby-settings h2, .eb-grp-new h2 { margin-top: 0; }
.eb-panel.eb-form { padding: calc(26 * var(--p)) calc(30 * var(--p)); }
/* with the Eggcoins panel above it, Play again is a little shorter so it clears the bottom bar */
.eb-prog ~ .eb-playagain { flex: none; min-height: 0; height: calc(150 * var(--p)); }
.eb-prog ~ .eb-playagain span { font-size: calc(84 * var(--p)); }
.eb-prog ~ .eb-playagain { margin-top: calc(26 * var(--p)); }

/* ---------------- Locker ---------------- */
.eb-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lk { display: grid; grid-template-columns: calc(470 * var(--p)) minmax(0, 1fr); gap: calc(44 * var(--p)); margin-top: calc(26 * var(--p)); align-items: start; padding-bottom: calc(40 * var(--p)); }
.lk-me { position: sticky; top: calc(20 * var(--p)); display: flex; flex-direction: column; gap: calc(14 * var(--p)); padding: calc(22 * var(--p)) calc(26 * var(--p)) calc(26 * var(--p)); }
.lk-stage { display: flex; align-items: center; justify-content: center; height: calc(230 * var(--p)); margin: 0 calc(-26 * var(--p)); background: radial-gradient(ellipse at 60% 70%, #3A2C86 0%, #241B57 62%); border-bottom: calc(4 * var(--p)) solid var(--ink); margin-top: calc(-22 * var(--p)); }
.lk-id { display: flex; align-items: center; gap: calc(12 * var(--p)); min-width: 0; margin-top: calc(4 * var(--p)); }
.lk-flair { display: inline-flex; width: calc(40 * var(--p)); height: calc(40 * var(--p)); flex: none; }
.lk-flair:empty { display: none; }
.lk-flair .eb-flair { transform: scale(.625); transform-origin: 0 0; }
.lk-name { font-size: calc(46 * var(--p)); line-height: 1.05; color: var(--shell); min-width: 0; }
.lk-title:empty { display: none; }
.lk-focus { display: none; flex-direction: column; gap: calc(2 * var(--p)); padding: calc(10 * var(--p)) calc(14 * var(--p)); background: var(--ink); border-left: calc(6 * var(--p)) solid var(--yolk); font-size: calc(22 * var(--p)); color: var(--shell); }
.lk-focus.on { display: flex; }
.lk-focus b { font-style: italic; font-weight: 900; font-size: calc(18 * var(--p)); }
.lk-focus span { font-weight: 800; font-size: calc(26 * var(--p)); }
.lk-focus small { color: #C9BFEA; font-size: calc(19 * var(--p)); font-weight: 600; }
.lk-slots { display: flex; flex-direction: column; border: calc(3 * var(--p)) solid var(--ink); }
.eb .lk-slot { display: flex; justify-content: space-between; align-items: baseline; gap: calc(12 * var(--p)); padding: calc(9 * var(--p)) calc(14 * var(--p)); background: #1C1548; color: var(--shell); text-decoration: none; font-size: calc(21 * var(--p)); }
.eb .lk-slot + .lk-slot { border-top: calc(2 * var(--p)) solid var(--ink); }
.eb .lk-slot span { color: #A99FD6; font-weight: 600; }
.eb .lk-slot b { font-weight: 800; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb .lk-slot.on { background: var(--yolk); color: var(--ink); }
.eb .lk-slot.on span { color: #5A4300; }
.eb .lk-slot:hover:not(.on), .eb .lk-slot:focus-visible:not(.on) { background: #2E2470; }
.lk-wallet { display: flex; align-items: center; justify-content: space-between; gap: calc(12 * var(--p)); padding-top: calc(4 * var(--p)); }
.lk-coins { display: inline-flex; align-items: center; gap: calc(8 * var(--p)); font-size: calc(22 * var(--p)); color: var(--shell); font-weight: 600; }
.lk-coins b { font-size: calc(28 * var(--p)); font-weight: 900; }
.lk-rename { font-size: calc(20 * var(--p)); color: #C9BFEA; }
.lk-rename summary { cursor: pointer; font-weight: 700; }
.lk-rename form { display: flex; gap: calc(10 * var(--p)); margin: calc(10 * var(--p)) 0 calc(6 * var(--p)); }
.lk-rename .eb-input { flex: 1; min-width: 0; }

.lk-main { display: flex; flex-direction: column; gap: calc(16 * var(--p)); min-width: 0; }
.lk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: calc(16 * var(--p)); flex-wrap: wrap; }
.lk-head .eb-h1 { margin: 0; }
.lk-tabs { display: flex; gap: calc(6 * var(--p)); flex-wrap: wrap; }
.eb .lk-tab { display: inline-flex; align-items: baseline; gap: calc(8 * var(--p)); padding: calc(10 * var(--p)) calc(18 * var(--p)); background: #1C1548; color: var(--shell); border: calc(3 * var(--p)) solid var(--ink); text-decoration: none; font-weight: 800; font-size: calc(24 * var(--p)); transform: skewX(-8deg); }
.eb .lk-tab small { font-size: calc(17 * var(--p)); color: #A99FD6; font-weight: 700; }
.eb .lk-tab:hover, .eb .lk-tab:focus-visible { background: #2E2470; }
.eb .lk-tab.on { background: var(--yolk); color: var(--ink); box-shadow: calc(4 * var(--p)) calc(4 * var(--p)) 0 var(--ink); }
.eb .lk-tab.on small { color: #5A4300; }
.lk-filters { display: flex; align-items: center; gap: calc(8 * var(--p)); flex-wrap: wrap; }
.eb .lk-f { padding: calc(5 * var(--p)) calc(14 * var(--p)); background: transparent; color: #C9BFEA; border: calc(2 * var(--p)) solid #4A3C9A; border-radius: 999px; font-weight: 700; font-size: calc(19 * var(--p)); cursor: pointer; }
.eb .lk-f small { color: inherit; opacity: .7; margin-left: calc(4 * var(--p)); }
.eb .lk-f.on { background: var(--shell); color: var(--ink); border-color: var(--shell); }
.lk-hint { margin-left: auto; font-size: calc(19 * var(--p)); }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(190 * var(--p)), 1fr)); gap: calc(14 * var(--p)); }
.lk-grid.titles { grid-template-columns: repeat(auto-fill, minmax(calc(250 * var(--p)), 1fr)); }
.lk-tile { position: relative; margin: 0; }
.lk-tile[hidden] { display: none; }
.lk-tile > button, div.lk-tile { all: unset; box-sizing: border-box; position: relative; display: flex; flex-direction: column; align-items: center; gap: calc(4 * var(--p)); width: 100%; height: 100%; min-height: calc(214 * var(--p)); padding: calc(14 * var(--p)) calc(10 * var(--p)) calc(12 * var(--p)); background: #241B57; border: calc(3 * var(--p)) solid var(--ink); border-bottom: calc(7 * var(--p)) solid var(--rar); cursor: pointer; text-align: center; color: var(--shell); transition: transform .08s ease, background .08s ease; }
div.lk-tile { cursor: default; }
.lk-tile > button:hover, .lk-tile > button:focus-visible, div.lk-tile:hover, div.lk-tile:focus-visible { background: #2E2470; transform: translateY(calc(-3 * var(--p))); }
.lk-tile > button:focus-visible, div.lk-tile:focus-visible { outline: calc(4 * var(--p)) solid var(--shell); outline-offset: calc(2 * var(--p)); }
.lk-tile.on > button, div.lk-tile.on { background: #3A2C86; box-shadow: inset 0 0 0 calc(4 * var(--p)) var(--yolk); }
.lk-art { display: flex; align-items: center; justify-content: center; height: calc(112 * var(--p)); }
.lk-tile.locked .lk-art { opacity: .5; filter: saturate(.7); }
.lk-nm { font-family: 'Titan One', sans-serif; font-size: calc(23 * var(--p)); line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-nm.long { font-size: calc(18 * var(--p)); }
.lk-st { display: inline-flex; align-items: center; gap: calc(6 * var(--p)); font-size: calc(18 * var(--p)); font-weight: 700; color: #A99FD6; }
.lk-st b { color: var(--yolk); font-weight: 900; }
.lk-tile.locked .lk-st { color: #8F86BD; }
.lk-rar { position: absolute; top: calc(7 * var(--p)); left: calc(9 * var(--p)); font-size: calc(15 * var(--p)); font-weight: 900; font-style: italic; color: var(--rar); }
.lk-go { position: absolute; top: calc(6 * var(--p)); right: calc(8 * var(--p)); padding: calc(1 * var(--p)) calc(9 * var(--p)); background: var(--yolk); color: var(--ink); font-weight: 900; font-size: calc(16 * var(--p)); border: calc(2 * var(--p)) solid var(--ink); opacity: 0; transition: opacity .08s; }
.lk-tile > button:hover .lk-go, .lk-tile > button:focus-visible .lk-go { opacity: 1; }
.lk-meter { width: 70%; height: calc(8 * var(--p)); background: var(--ink); margin-top: calc(4 * var(--p)); }
.lk-meter i { display: block; height: 100%; background: var(--yolk); }
.lk-grid.titles .lk-art { height: calc(76 * var(--p)); }
.lk-grid.titles .lk-tile > button, .lk-grid.titles div.lk-tile { min-height: calc(160 * var(--p)); }
.lk-grid.titles .lk-nm { display: none; }
@media (max-width: 1100px) { .lk { grid-template-columns: 1fr; } .lk-me { position: static; } }
@media (prefers-reduced-motion: reduce) { .lk-tile > button, div.lk-tile { transition: none; } }

.eb-prof-links { display: flex; flex-wrap: wrap; gap: calc(8 * var(--p)); margin-top: calc(4 * var(--p)); }
.eb-meter { box-shadow: inset 0 0 0 calc(2 * var(--p)) #3A2C86; }
a.eb-mini { display: inline-block; text-decoration: none; }

/* practice: choices on the left, the field on the right */
.eb-practice { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-areas: "head head" "bots field" "len field" "go field"; }
.eb-practice-head { grid-area: head; }
.eb-practice > .eb-pickset:nth-of-type(1) { grid-area: bots; }
.eb-practice > .eb-pickset:nth-of-type(2) { grid-area: field; }
.eb-practice > .eb-pickset:nth-of-type(3) { grid-area: len; }
.eb-practice > .eb-start { grid-area: go; justify-self: start; }
@media (max-width: 1100px) { .eb-practice { grid-template-areas: "head" "bots" "field" "len" "go"; } }

.eb-row.eb-search { grid-template-columns: calc(96 * var(--p)) minmax(0, 1fr) auto; padding: calc(10 * var(--p)) calc(30 * var(--p)) calc(10 * var(--p)) 0; }

/* phones: the bottom bar sits at the end of the page (no keyboard hints), titles fit their tiles */
@media (max-width: 700px) {
  .eb-bar { position: static; margin-top: calc(40 * var(--p)); padding: calc(14 * var(--p)) calc(24 * var(--p)); }
  .eb-bar .keys { display: none; }
  .eb-menu { grid-auto-rows: auto; }
  .eb-menu > .eb-tile:not(.small) { height: calc(230 * var(--p)); }
  .eb-menu > .eb-tile.ranked { height: calc(380 * var(--p)); }
  .eb-side { flex-wrap: wrap; }
  .eb-side .eb-tile.small { flex: 1 1 40%; min-height: calc(130 * var(--p)); }
  .eb-tile.small .t { font-size: calc(30 * var(--p)); }
  .eb-tile.ranked .label .t { font-size: calc(92 * var(--p)); }
  .eb-tile .label { left: calc(36 * var(--p)); right: calc(24 * var(--p)); }
}

/* Settings > In game */
.eb-opt-row { justify-content: space-between; gap: calc(16 * var(--p)); }
.eb-swatches { display: flex; gap: calc(8 * var(--p)); }
.eb .eb-swatch { width: calc(28 * var(--p)); height: calc(28 * var(--p)); border: calc(3 * var(--p)) solid var(--ink); padding: 0; cursor: pointer; }
.eb .eb-swatch.on { outline: calc(3 * var(--p)) solid var(--shell); outline-offset: calc(2 * var(--p)); }
.eb-opt-row input[type=range] { accent-color: var(--yolk); width: calc(180 * var(--p)); }
.eb-st-ingame { grid-row: span 2; }

/* ---- rank up (eggball.js ebRankUp): the old badge cracks, the new one hatches ---- */
.eb-rankup { position: fixed; inset: 0; z-index: 100002; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #2A2063 0%, #120D30 55%, #07051A 100%); font-family: 'Barlow Condensed', system-ui, sans-serif; color: var(--shell); transition: opacity .35s; }
.eb-rankup.out { opacity: 0; }
/* rays: a disc much bigger than the screen, centred on the badge, turning slowly */
.ru-rays { position: absolute; left: 50%; top: 50%; z-index: -1; width: 220vmax; height: 220vmax; transform: translate(-50%, -50%); border-radius: 50%; opacity: 0; transition: opacity .6s;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 34%, transparent) 0deg 9deg, transparent 9deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 0%, #000 12%, transparent 46%); mask: radial-gradient(circle, #000 0%, #000 12%, transparent 46%); }
.eb-rankup.hatched .ru-rays { opacity: 1; animation: ru-spin 40s linear infinite; }
@keyframes ru-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.ru-stage { position: relative; z-index: 0; width: 260px; height: 290px; display: grid; place-items: center; }
.ru-old, .ru-new { position: absolute; inset: 0; display: grid; place-items: center; }
.ru-old svg, .ru-new svg { width: 220px !important; height: auto !important; filter: drop-shadow(10px 10px 0 #0C0820); }
.ru-new svg { width: 240px !important; }
.ru-crack { position: absolute; width: 220px !important; height: 247px !important; filter: none !important; opacity: 0; }
.eb-rankup.wobble .ru-old { animation: ru-wobble 1.75s ease-in forwards; }
@keyframes ru-wobble { 0% { transform: rotate(0); } 15% { transform: rotate(-4deg); } 30% { transform: rotate(4deg); } 45% { transform: rotate(-7deg); } 60% { transform: rotate(7deg) scale(1.03); } 75% { transform: rotate(-10deg) scale(1.05); } 90% { transform: rotate(10deg) scale(1.07); } 100% { transform: rotate(0) scale(1.08); } }
.eb-rankup.cracked .ru-crack { opacity: 1; transition: opacity .1s; }
.eb-rankup.burst .ru-old { animation: none; transform: scale(1.4); opacity: 0; transition: transform .25s ease-out, opacity .25s; }
.ru-bits { position: absolute; left: 50%; top: 50%; }
.ru-bits i { position: absolute; width: 18px; height: 12px; margin: -6px -9px; background: var(--rc); border: 3px solid #0C0820; opacity: 0; }
.eb-rankup.burst .ru-bits i { animation: ru-bit .8s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes ru-bit { 0% { opacity: 1; transform: rotate(var(--a)) translateX(0) rotate(0); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) rotate(220deg); } }
.ru-new { opacity: 0; transform: scale(.3); }
.eb-rankup.hatched .ru-new { opacity: 1; transform: scale(1); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), opacity .15s; }
.ru-text { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: 0; transform: translateY(12px); }
.eb-rankup.hatched .ru-text { opacity: 1; transform: none; transition: opacity .4s .25s, transform .4s .25s; }
.ru-kicker { font-weight: 900; font-style: italic; font-size: 26px; color: var(--yolk); }
.ru-name { font-family: 'Titan One', system-ui, sans-serif; font-size: 96px; line-height: 1; color: var(--shell); -webkit-text-stroke: 12px #0C0820; paint-order: stroke fill; text-shadow: 8px 8px 0 #0C0820; }
.ru-sub { font-weight: 800; font-size: 24px; color: #C9BFEA; }
.ru-go { all: unset; cursor: pointer; margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 22px; background: var(--yolk); color: var(--night); border: 4px solid #0C0820; box-shadow: 6px 6px 0 #0C0820; font-weight: 900; font-style: italic; font-size: 24px; transform: skewX(-8deg); }
.ru-go:hover, .ru-go:focus-visible { background: #FFD54F; }
@media (prefers-reduced-motion: reduce) { .eb-rankup *, .eb-rankup { animation: none !important; transition: none !important; } }

/* results: the top three and a points column */
.eb-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(18 * var(--p)); align-items: end; }
.eb-podium .pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: calc(6 * var(--p)); padding: calc(18 * var(--p)) calc(12 * var(--p)) calc(16 * var(--p)); background: var(--panel); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(8 * var(--p)) calc(8 * var(--p)) 0 var(--ink); text-align: center; min-width: 0; }
.eb-podium .pod.first { order: -1; background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 45%, var(--panel)) 0%, var(--panel) 70%); padding-top: calc(30 * var(--p)); }
.eb-podium .pod.me { outline: calc(4 * var(--p)) solid var(--yolk); outline-offset: calc(3 * var(--p)); }
.pod-crown { position: absolute; top: calc(-18 * var(--p)); padding: 0 calc(14 * var(--p)); background: var(--yolk); color: var(--night); border: calc(4 * var(--p)) solid var(--ink); font-family: 'Titan One', system-ui, sans-serif; font-size: calc(24 * var(--p)); transform: skewX(-8deg); }
.pod-n { position: absolute; top: calc(8 * var(--p)); left: calc(12 * var(--p)); font-family: 'Titan One', system-ui, sans-serif; font-size: calc(26 * var(--p)); color: var(--muted); }
.eb .pod-name { font-family: 'Titan One', system-ui, sans-serif; font-size: calc(30 * var(--p)); max-width: 100%; }
.pod-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-pts { font-weight: 800; font-size: calc(22 * var(--p)); color: var(--muted); }
.pod-pts b { color: var(--yolk); font-size: calc(30 * var(--p)); font-weight: 900; }
.pod-line { font-weight: 700; font-size: calc(20 * var(--p)); color: var(--shell); min-height: 1.2em; }
.eb .eb-namebtn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: calc(10 * var(--p)); min-width: 0; }
.eb .eb-namebtn:hover span, .eb .eb-namebtn:focus-visible span { color: var(--yolk); text-decoration: underline; text-underline-offset: 3px; }
.eb-results .eb-box .h, .eb-results .eb-box .p { grid-template-columns: minmax(0, 1fr) repeat(6, calc(78 * var(--p))); }
.eb-results .eb-box .p .pts { color: var(--yolk); font-weight: 900; }

/* the menu's Rejoin bar (a game you dropped out of is still going) */
.eb-rejoin { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: calc(20 * var(--p)); margin: calc(10 * var(--p)) 0 0; padding: calc(10 * var(--p)) calc(24 * var(--p)); background: var(--turf); color: var(--ink); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(8 * var(--p)) calc(8 * var(--p)) 0 var(--ink); font-weight: 800; font-size: calc(26 * var(--p)); transform: skewX(-6deg); }
.eb-rejoin > * { transform: skewX(6deg); }
.eb-rejoin[hidden] { display: none; }
.eb-rpop { background: var(--yolk); }

/* casual queue: pick the field */
.eb-vote { padding: calc(24 * var(--p)) calc(30 * var(--p)); display: flex; flex-direction: column; gap: calc(16 * var(--p)); }
.eb-vote[hidden] { display: none; }
.eb-vote-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(14 * var(--p)); }
.eb .eb-vote-opt { display: flex; flex-direction: column; align-items: stretch; gap: calc(6 * var(--p)); padding: calc(8 * var(--p)); background: var(--night); color: var(--shell); border: calc(4 * var(--p)) solid var(--ink); box-shadow: calc(5 * var(--p)) calc(5 * var(--p)) 0 var(--ink); cursor: pointer; text-align: left; }
.eb .eb-vote-opt img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; image-rendering: pixelated; border: calc(2 * var(--p)) solid var(--ink); background: #120D30; }
.eb .eb-vote-opt b { font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: calc(24 * var(--p)); }
.eb .eb-vote-opt span { font-weight: 800; font-size: calc(20 * var(--p)); color: var(--muted); }
.eb .eb-vote-opt:hover { border-color: var(--shell); }
.eb .eb-vote-opt.on { background: var(--yolk); color: var(--night); }
.eb .eb-vote-opt.on span { color: var(--night); }

/* What's new */
.eb-news-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, calc(440 * var(--p))); gap: calc(40 * var(--p)); align-items: start; }
.eb-news { padding: calc(26 * var(--p)) calc(32 * var(--p)); margin-bottom: calc(24 * var(--p)); }
.eb-news header { display: flex; align-items: baseline; justify-content: space-between; gap: calc(16 * var(--p)); flex-wrap: wrap; }
.eb-news ul { margin: calc(12 * var(--p)) 0 0; padding-left: calc(26 * var(--p)); display: flex; flex-direction: column; gap: calc(8 * var(--p)); font-size: calc(24 * var(--p)); font-weight: 600; line-height: 1.3; max-width: 62ch; }
.eb-news li::marker { color: var(--yolk); }
.eb-news.latest { border-color: var(--yolk); }
.eb-discord { position: sticky; top: calc(30 * var(--p)); margin-top: calc(130 * var(--p)); padding: calc(28 * var(--p)); display: flex; flex-direction: column; gap: calc(14 * var(--p)); align-items: flex-start; }
.eb-discord p { margin: 0; font-size: calc(24 * var(--p)); font-weight: 600; line-height: 1.3; }
@media (max-width: 1100px) { .eb-news-wrap { grid-template-columns: 1fr; } .eb-discord { position: static; margin-top: 0; } }
/* privacy and terms */
.eb-legal { margin-top: calc(30 * var(--p)); padding: calc(32 * var(--p)) calc(44 * var(--p)); max-width: calc(1100 * var(--p)); font-size: calc(24 * var(--p)); line-height: 1.4; font-weight: 600; }
.eb-legal h2 { font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: calc(32 * var(--p)); margin: calc(26 * var(--p)) 0 calc(8 * var(--p)); color: var(--shell); }
.eb-legal ul { padding-left: calc(28 * var(--p)); display: flex; flex-direction: column; gap: calc(8 * var(--p)); max-width: 75ch; }
.eb-legal p { max-width: 75ch; }
.eb-legal li::marker { color: var(--yolk); }
.eb-legal-links { display: flex; gap: calc(18 * var(--p)); justify-content: flex-end; margin-top: calc(10 * var(--p)); font-weight: 700; font-size: calc(20 * var(--p)); }
.eb .eb-legal-links a { color: var(--muted); text-decoration: none; }
.eb .eb-legal-links a:hover { color: var(--shell); text-decoration: underline; }
.eb-tile.strip.live .label .t, .eb-tile.strip.news .label .t { font-size: calc(44 * var(--p)); white-space: nowrap; }
.eb-tile.strip.live .label, .eb-tile.strip.news .label { right: 30%; }
.eb-tile.strip.live .label .s, .eb-tile.strip.news .label .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-tile.strip.news .art { max-width: 24%; right: calc(26 * var(--p)); }
.eb-tile.strip.news .label { right: 22%; }
.eb-tile.strip.news .label .t { font-size: calc(38 * var(--p)); }
.eb-tile.strip.news .art { max-width: 26%; right: calc(40 * var(--p)); }

/* Leaders */
.eb-lb2 { margin-top: calc(26 * var(--p)); display: flex; flex-direction: column; gap: calc(18 * var(--p)); }
.eb-lb2-head { display: flex; align-items: flex-end; justify-content: space-between; gap: calc(20 * var(--p)); flex-wrap: wrap; }
.eb-lb2-head .eb-htabs { margin: 0; }
.eb-lb2-tiers { margin: 0; }
.eb-lb2-sub { margin: 0; font-size: calc(22 * var(--p)); font-weight: 700; }
.eb-lb2-me { display: flex; flex-direction: column; gap: calc(6 * var(--p)); }
.eb-lb2-me > .eb-muted { font-weight: 800; font-size: calc(22 * var(--p)); }
.eb-lb-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(22 * var(--p)); align-items: end; margin: calc(10 * var(--p)) 0; }
.eb .eb-lb-pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: calc(6 * var(--p)); padding: calc(22 * var(--p)) calc(16 * var(--p)) calc(18 * var(--p)); background: var(--panel); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(9 * var(--p)) calc(9 * var(--p)) 0 var(--ink); color: var(--shell); text-decoration: none; text-align: center; min-width: 0; }
.eb .eb-lb-pod:hover, .eb .eb-lb-pod:focus-visible { transform: translate(calc(-3 * var(--p)), calc(-3 * var(--p))); box-shadow: calc(12 * var(--p)) calc(12 * var(--p)) 0 var(--ink); color: var(--shell); }
.eb-lb-pod.p1 { order: 2; padding-top: calc(40 * var(--p)); background: linear-gradient(180deg, #5A3E10 0%, var(--panel) 75%); border-color: var(--ink); }
.eb-lb-pod.p2 { order: 1; }
.eb-lb-pod.p3 { order: 3; }
.eb-lb-pod.me { outline: calc(4 * var(--p)) solid var(--yolk); outline-offset: calc(3 * var(--p)); }
.eb-lb-pod .n { position: absolute; top: calc(-24 * var(--p)); width: calc(52 * var(--p)); height: calc(52 * var(--p)); display: grid; place-items: center; border: calc(4 * var(--p)) solid var(--ink); font-size: calc(30 * var(--p)); color: var(--night); transform: skewX(-8deg); }
.eb-lb-pod.p1 .n { background: var(--yolk); } .eb-lb-pod.p2 .n { background: #C9C9D6; } .eb-lb-pod.p3 .n { background: #D08A3E; }
.eb-lb-pod .nm { display: flex; align-items: center; gap: calc(8 * var(--p)); max-width: 100%; font-size: calc(34 * var(--p)); }
.eb-lb-pod .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-lb-pod .rk { display: flex; align-items: center; gap: calc(6 * var(--p)); font-weight: 800; font-size: calc(22 * var(--p)); color: var(--muted); }
.eb-lb-pod .v { font-size: calc(56 * var(--p)); color: var(--yolk); line-height: 1; margin-top: calc(4 * var(--p)); }
.eb-lb-pod.p1 .v { font-size: calc(70 * var(--p)); }
.eb-lb-pod .lbl { font-weight: 700; font-size: calc(20 * var(--p)); color: var(--muted); }
@media (max-width: 700px) { .eb-lb-podium { grid-template-columns: 1fr; } .eb-lb-pod.p1, .eb-lb-pod.p2, .eb-lb-pod.p3 { order: 0; } }
.eb-lb-pod .ball { display: flex; margin-top: calc(14 * var(--p)); }

/* Locker: grouped by rarity, filters and search, and a ball that rolls in the preview */
.lk-fset { display: inline-flex; gap: calc(8 * var(--p)); flex-wrap: wrap; }
.lk-fset + .lk-fset { padding-left: calc(10 * var(--p)); border-left: calc(2 * var(--p)) solid #3A2F6E; }
.eb .lk-r { padding: calc(5 * var(--p)) calc(14 * var(--p)); background: transparent; color: var(--rar); border: calc(2 * var(--p)) solid color-mix(in srgb, var(--rar) 55%, transparent); border-radius: 999px; font-weight: 800; font-size: calc(19 * var(--p)); cursor: pointer; }
.eb .lk-r.on { background: var(--rar); color: var(--night); border-color: var(--rar); }
.lk-search { margin-left: auto; }
.lk-search input { width: calc(240 * var(--p)); padding: calc(6 * var(--p)) calc(12 * var(--p)); font-size: calc(20 * var(--p)); }
.lk-hint { margin: calc(4 * var(--p)) 0 0; font-size: calc(20 * var(--p)); font-weight: 700; }
.lk-sec { margin-top: calc(18 * var(--p)); }
.lk-sec[hidden] { display: none; }
.lk-sec-h { display: flex; align-items: baseline; gap: calc(10 * var(--p)); margin: 0 0 calc(10 * var(--p)); padding-bottom: calc(6 * var(--p)); border-bottom: calc(3 * var(--p)) solid color-mix(in srgb, var(--rar) 45%, transparent); font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: calc(28 * var(--p)); color: var(--rar); }
.lk-sec-h small { font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 800; font-size: calc(20 * var(--p)); color: var(--muted); }
.lk-tile[hidden] { display: none !important; }
.lk-stage { position: relative; overflow: hidden; background: linear-gradient(180deg, #241B57 0%, #241B57 48%, #1F4A36 48%, #1F4A36 100%); }
.lk-stage::before { content: ""; position: absolute; left: 0; right: 0; top: 48%; bottom: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(60 * var(--p)), rgba(0, 0, 0, .12) calc(60 * var(--p)) calc(120 * var(--p))); }
.lk-stage::after { content: ""; position: absolute; left: 0; right: 0; top: 48%; height: calc(4 * var(--p)); background: rgba(255, 243, 214, .35); }
.lk-stage > svg { position: relative; z-index: 1; animation: lk-roll 5s ease-in-out infinite; transform-origin: 72% 50%; }
@keyframes lk-roll {
  0% { transform: translateX(-16%) scaleX(1); } 46% { transform: translateX(14%) scaleX(1); }
  50% { transform: translateX(14%) scaleX(-1); } 96% { transform: translateX(-16%) scaleX(-1); } 100% { transform: translateX(-16%) scaleX(1); }
}
@media (prefers-reduced-motion: reduce) { .lk-stage > svg { animation: none; } }

/* friends (party drawer) */
.eb-friends { display: flex; flex-direction: column; gap: calc(10 * var(--p)); padding-top: calc(14 * var(--p)); border-top: calc(3 * var(--p)) solid #3A2F6E; }
.eb-friends h3 { margin: 0; font-size: calc(30 * var(--p)); font-weight: 400; display: flex; align-items: baseline; gap: calc(10 * var(--p)); }
.eb-friends h3 small { font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 800; font-size: calc(20 * var(--p)); color: var(--turf); }
.eb-friends .row { display: flex; gap: calc(8 * var(--p)); }
.eb-friends .row input { flex: 1; min-width: 0; }
.eb-flist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(6 * var(--p)); max-height: calc(320 * var(--p)); overflow: auto; }
.eb-flist .fr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: calc(10 * var(--p)); align-items: center; padding: calc(6 * var(--p)) calc(10 * var(--p)); background: var(--night); border: calc(2 * var(--p)) solid var(--ink); }
.eb-flist .fr b { font-size: calc(22 * var(--p)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-flist .fr .eb-muted { grid-column: 2; font-size: calc(17 * var(--p)); font-weight: 700; }
.eb-flist .fr .tools { grid-column: 3; grid-row: 1 / 3; display: flex; gap: calc(6 * var(--p)); }
.eb-flist .fr:not(.on) b { color: var(--muted); }
.eb-flist .fr > .eb-dot { grid-row: 1 / 3; }
.eb-dot.off { background: #5B4FA0; box-shadow: none; animation: none; }
.eb-party-on { display: inline-flex; align-items: center; gap: calc(4 * var(--p)); margin-left: calc(8 * var(--p)); font-weight: 800; font-size: calc(20 * var(--p)); color: var(--turf); }

/* Settings > Accessibility: less motion */
.eb-reduce *, .eb-reduce *::before, .eb-reduce *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
.eb-rgraph { display: flex; flex-direction: column; gap: calc(6 * var(--p)); }
.eb-rgraph > span { font-weight: 800; font-size: calc(20 * var(--p)); }
.eb-rgraph svg { width: 100%; height: calc(110 * var(--p)); background: var(--night); border: calc(3 * var(--p)) solid var(--ink); }

/* ---- admin: players, live games, errors ---- */
.eb-adm-search { display: flex; gap: calc(12 * var(--p)); margin: calc(20 * var(--p)) 0; }
.eb-adm-search .eb-input { flex: 1; }
.eb-adm-list { display: flex; flex-direction: column; gap: calc(12 * var(--p)); margin-top: calc(14 * var(--p)); }
.eb-adm-player, .eb-adm-game, .eb-adm-err { padding: calc(16 * var(--p)) calc(20 * var(--p)); display: flex; flex-direction: column; gap: calc(10 * var(--p)); }
.eb-adm-player header, .eb-adm-game header, .eb-adm-err header { display: flex; align-items: center; gap: calc(12 * var(--p)); flex-wrap: wrap; }
.eb-adm-player header a, .eb-adm-game header b { font-size: calc(30 * var(--p)); color: var(--shell); }
.eb-adm-acts { justify-content: flex-start; flex-wrap: wrap; padding-right: 0; }
.eb-input.small { font-size: calc(20 * var(--p)); padding: calc(5 * var(--p)) calc(10 * var(--p)); width: calc(170 * var(--p)); }
.eb-adm-flags { margin: 0; padding-left: calc(28 * var(--p)); font-size: calc(22 * var(--p)); display: flex; flex-direction: column; gap: calc(4 * var(--p)); }
.eb-adm-box { padding: calc(18 * var(--p)) calc(22 * var(--p)); margin-top: calc(24 * var(--p)); }
.eb-adm-score b { display: inline-block; min-width: calc(40 * var(--p)); text-align: center; font-family: "Titan One", sans-serif; font-size: calc(28 * var(--p)); padding: 0 calc(8 * var(--p)); border: calc(3 * var(--p)) solid var(--ink); }
.eb-adm-score b.r { background: var(--red); } .eb-adm-score b.b { background: var(--blue); }
.eb-adm-err.done { opacity: .55; }
.eb-adm-msg { font-size: calc(24 * var(--p)); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.eb-adm-count { font-family: "Titan One", sans-serif; font-size: calc(28 * var(--p)); color: var(--yolk); }
.eb-adm-stack { margin: calc(8 * var(--p)) 0 0; padding: calc(10 * var(--p)); background: var(--night); border: calc(3 * var(--p)) solid var(--ink); font-size: calc(17 * var(--p)); white-space: pre-wrap; overflow-wrap: anywhere; max-height: calc(320 * var(--p)); overflow: auto; }

/* ---- controller: the focused button gets the same look as keyboard focus ---- */
html.eb-pad .eb :focus { outline: calc(5 * var(--p)) solid var(--shell); outline-offset: calc(4 * var(--p)); }
html.eb-pad .eb-tile:focus { color: var(--shell); transform: translate(calc(-3 * var(--p)), calc(-3 * var(--p))); box-shadow: calc(13 * var(--p)) calc(13 * var(--p)) 0 var(--ink); outline: calc(7 * var(--p)) solid var(--shell); outline-offset: calc(5 * var(--p)); }
html.eb-pad a.eb-row:focus { color: var(--shell); transform: skewX(-8deg) translate(calc(-3 * var(--p)), calc(-2 * var(--p))); box-shadow: calc(9 * var(--p)) calc(8 * var(--p)) 0 var(--ink); }
html.eb-pad .eb-mini:focus { background: var(--yolk); color: var(--ink); }
html.eb-pad, html.eb-pad * { cursor: none !important; }
.eb-pad-toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 4px; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; background: #1B1442; color: #FFF3D6; border: 4px solid #0C0820; box-shadow: 6px 6px 0 #0C0820; font: 600 17px/1.35 "Barlow Condensed", Arial, sans-serif; transition: opacity .35s, transform .35s; }
.eb-pad-toast b { font: 22px "Titan One", Arial, sans-serif; color: #FFC21A; font-weight: normal; }
.eb-pad-toast.out { opacity: 0; transform: translate(-50%, -12px); }
.eb-padmap { display: grid; grid-template-columns: auto 1fr; gap: calc(6 * var(--p)) calc(18 * var(--p)); margin: 0; font-size: calc(22 * var(--p)); }
.eb-padmap dt { font-weight: 800; color: var(--yolk); }
.eb-padmap dd { margin: 0; }

/* ---- the live match behind the main menu (showcase.js) ---- */
.eb-screen > .eb-showcase { position: absolute !important; left: 50%; bottom: calc(40 * var(--p)); width: min(150vw, 260vh); transform: translateX(-50%) perspective(1100px) rotateX(58deg); transform-origin: 50% 100%; opacity: 0; transition: opacity 1.2s; pointer-events: none; z-index: 0; }
.eb-showcase.on { opacity: .42; }
.eb-showcase canvas { display: block; width: 100%; height: auto; filter: saturate(.85); }
.eb-showcase::after { content: ""; position: absolute; inset: -2px; background: linear-gradient(to bottom, var(--night) 0%, rgba(22, 16, 58, .2) 45%, rgba(22, 16, 58, 0) 70%); }
.eb-screen:has(.eb-showcase.on) .eb-pitch { opacity: 0; }

/* ---- phones and tablets: touch screens and short landscape screens ---- */
@media (max-width: 1100px) { .eb-menu { grid-auto-rows: minmax(calc(210 * var(--p)), auto); } .eb-tile.ranked { min-height: calc(320 * var(--p)); } }
@media (pointer: coarse) {
  .eb-bar .keys > *:not([data-esc]), .eb-bar .keys .eb-key { display: none; }
  .eb-bar .keys > * { min-height: 44px; }
}
@media (max-height: 520px) and (pointer: coarse) {
  .eb-bar { position: static; margin-top: calc(30 * var(--p)); }
  .eb-bar .tip { display: none; }
}
.eb-admin > .eb-mod-head { margin-top: calc(24 * var(--p)); }
.eb-adm-health { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(150 * var(--p)), 1fr)); gap: calc(14 * var(--p)); padding: calc(16 * var(--p)) calc(20 * var(--p)); margin-top: calc(20 * var(--p)); }
.eb-adm-stat { display: flex; flex-direction: column; gap: calc(2 * var(--p)); }
.eb-adm-stat b { font-family: "Titan One", sans-serif; font-weight: normal; font-size: calc(32 * var(--p)); color: var(--yolk); }
.eb-adm-stat span { font-size: calc(18 * var(--p)); color: var(--muted); }
/* ---- playtest feedback ---- */
.eb-pt { max-width: calc(980 * var(--p)); margin: 0 auto; }
.eb-pt-form { margin-top: calc(20 * var(--p)); }
.eb-pt-field { display: flex; flex-direction: column; gap: calc(6 * var(--p)); border: 0; padding: 0; margin: 0; font-weight: 700; font-size: calc(24 * var(--p)); }
.eb-pt-field legend { padding: 0; margin-bottom: calc(6 * var(--p)); }
.eb-pt-field textarea { resize: vertical; min-height: calc(90 * var(--p)); }
.eb-pt-funs { display: flex; gap: calc(10 * var(--p)); }
.eb-pt-fun input { position: absolute; opacity: 0; }
.eb-pt-fun span { display: grid; place-items: center; width: calc(56 * var(--p)); height: calc(56 * var(--p)); background: #120D30; border: calc(4 * var(--p)) solid var(--ink); font-family: "Titan One", sans-serif; font-size: calc(28 * var(--p)); cursor: pointer; }
.eb-pt-fun input:checked + span { background: var(--yolk); color: var(--ink); }
.eb-pt-fun input:focus-visible + span { outline: calc(4 * var(--p)) solid var(--shell); outline-offset: calc(3 * var(--p)); }
.eb-pt-line { margin: 0; font-size: calc(22 * var(--p)); }
/* placements: the five games, then the rank */
.ru-games { display: flex; gap: 8px; margin: 4px 0 6px; }
.ru-games i { display: grid; place-items: center; width: 34px; height: 30px; font-style: normal; font-family: 'Titan One', system-ui, sans-serif; font-size: 18px; color: #0C0820; border: 3px solid #0C0820; transform: skewX(-12deg); box-shadow: 3px 3px 0 #0C0820; }
.ru-games i.w { background: #5BE39A; } .ru-games i.l { background: #FF8A80; } .ru-games i.t { background: #C9BFEA; }
.ru-rating { color: var(--yolk); font-variant-numeric: tabular-nums; }
/* leaders: the time span */
.eb-periods { display: flex; gap: calc(10 * var(--p)); margin-top: calc(14 * var(--p)); flex-wrap: wrap; }
.eb-period { display: inline-flex; align-items: center; padding: calc(6 * var(--p)) calc(18 * var(--p)); background: var(--panel); border: calc(4 * var(--p)) solid var(--ink); box-shadow: calc(5 * var(--p)) calc(5 * var(--p)) 0 var(--ink); color: var(--shell); font-weight: 800; font-size: calc(24 * var(--p)); text-decoration: none; transform: skewX(-12deg); }
.eb-period > * { transform: skewX(12deg); }
.eb-period:hover, .eb-period:focus-visible { background: #2E2470; color: var(--shell); }
.eb-period.on { background: var(--yolk); color: var(--ink); }

/* ---- the scorebug, as in game (#eb-hud): slanted team blocks, the middle between, ink shadow ---- */
.eb-bug { display: inline-flex; align-items: stretch; filter: drop-shadow(calc(6 * var(--p)) calc(6 * var(--p)) 0 var(--ink)); }
.eb-bug .t { display: flex; align-items: center; justify-content: center; min-width: calc(150 * var(--p)); padding: calc(6 * var(--p)) calc(24 * var(--p)); border: calc(5 * var(--p)) solid var(--ink); }
.eb-bug .t.r { background: var(--red); transform: skewX(-12deg); border-right: none; }
.eb-bug .t.b { background: var(--blue); transform: skewX(12deg); border-left: none; }
.eb-bug .t .sc { display: inline-block; font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: calc(64 * var(--p)); line-height: 1; color: var(--shell); -webkit-text-stroke: calc(5 * var(--p)) var(--ink); paint-order: stroke fill; text-shadow: calc(4 * var(--p)) calc(4 * var(--p)) 0 var(--ink); }
.eb-bug .t.r .sc { transform: skewX(12deg); } .eb-bug .t.b .sc { transform: skewX(-12deg); }
.eb-bug .mid { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: calc(190 * var(--p)); padding: calc(4 * var(--p)) calc(26 * var(--p)); background: var(--night); border: calc(5 * var(--p)) solid var(--ink); }
.eb-bug .mid b { font-weight: 900; font-style: italic; font-size: calc(34 * var(--p)); line-height: 1.05; color: var(--yolk); white-space: nowrap; }
.eb-bug .mid small { font-weight: 700; font-size: calc(20 * var(--p)); color: var(--muted); white-space: nowrap; }

/* ---- a game's page (/g/<id>) ---- */
.eb-gp { max-width: calc(1500 * var(--p)); margin: calc(24 * var(--p)) auto 0; display: flex; flex-direction: column; gap: calc(26 * var(--p)); }
.eb-gp-top { display: flex; align-items: center; justify-content: space-between; gap: calc(30 * var(--p)); flex-wrap: wrap; }
.eb-gp-title { display: flex; flex-direction: column; gap: calc(4 * var(--p)); font-weight: 700; font-size: calc(24 * var(--p)); }
.eb-gp-go { display: flex; gap: calc(18 * var(--p)); flex-wrap: wrap; }
.eb-gp-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(24 * var(--p)); }
.eb-gp-team { padding: calc(18 * var(--p)) calc(22 * var(--p)); display: flex; flex-direction: column; gap: calc(6 * var(--p)); border-top: calc(10 * var(--p)) solid var(--red); }
.eb-gp-team.t2 { border-top-color: var(--blue); }
.eb-gp-teamname { font-size: calc(36 * var(--p)); margin: 0 0 calc(6 * var(--p)); }
.eb-gp-h, .eb-gp-row { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(6, minmax(0, 0.8fr)); align-items: center; gap: calc(8 * var(--p)); text-align: center; }
.eb-gp-h { font-weight: 800; font-size: calc(19 * var(--p)); color: var(--muted); padding-bottom: calc(4 * var(--p)); border-bottom: calc(3 * var(--p)) solid var(--ink); }
.eb-gp-h span:first-child, .eb-gp-row .nm { text-align: left; }
.eb-gp-row { font-weight: 700; font-size: calc(24 * var(--p)); padding: calc(6 * var(--p)) 0; border-bottom: calc(2 * var(--p)) solid rgba(12, 8, 32, .5); }
.eb-gp-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.eb-gp-row .nm a { color: var(--shell); }
.eb-gp-row.mvp { background: rgba(255, 194, 26, .08); }
.eb-gp-row .eb-num { color: var(--yolk); }
.eb-gp-hllist { display: flex; flex-wrap: wrap; gap: calc(12 * var(--p)); margin-top: calc(10 * var(--p)); }
.eb-gp-hl { display: inline-flex; align-items: center; gap: calc(10 * var(--p)); padding: calc(8 * var(--p)) calc(14 * var(--p)); background: var(--panel); border: calc(4 * var(--p)) solid var(--ink); box-shadow: calc(5 * var(--p)) calc(5 * var(--p)) 0 var(--ink); color: var(--shell); font-weight: 700; font-size: calc(22 * var(--p)); text-decoration: none; }
.eb-gp-hl:hover, .eb-gp-hl:focus-visible { background: #2E2470; color: var(--shell); }
@media (max-width: 1100px) { .eb-gp-teams { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .eb-gp-h, .eb-gp-row { grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(0, 0.8fr)); }
  .eb-gp-h .hide-sm, .eb-gp-row .hide-sm { display: none; }
  .eb-gp-top { flex-direction: column; align-items: flex-start; }
}
.eb-gp-row.only { grid-template-columns: 1fr; }
.eb-banner { display: inline-block; padding: calc(2 * var(--p)) calc(14 * var(--p)); background: var(--yolk); color: var(--ink); border: calc(3 * var(--p)) solid var(--ink); box-shadow: calc(4 * var(--p)) calc(4 * var(--p)) 0 var(--ink); font-weight: 800; font-style: italic; font-size: calc(20 * var(--p)); transform: skewX(-12deg); white-space: nowrap; }
.eb-banner.big { font-size: calc(26 * var(--p)); padding: calc(3 * var(--p)) calc(18 * var(--p)); }

/* ---- Settings: a section list on the left, one column of tidy rows on the right ---- */
.st { display: grid; grid-template-columns: calc(330 * var(--p)) minmax(0, 1fr); gap: calc(44 * var(--p)); align-items: start; max-width: calc(1560 * var(--p)); margin: calc(26 * var(--p)) auto 0; }
.st-nav { position: sticky; top: calc(24 * var(--p)); display: flex; flex-direction: column; gap: calc(12 * var(--p)); }
.st-nav h1 { font-size: calc(78 * var(--p)); line-height: 1; margin: 0; }
.st-nav > p { margin: 0 0 calc(10 * var(--p)); font-size: calc(20 * var(--p)); }
.st-navlink { display: block; padding: calc(10 * var(--p)) calc(20 * var(--p)); background: var(--panel); border: calc(4 * var(--p)) solid var(--ink); box-shadow: calc(6 * var(--p)) calc(6 * var(--p)) 0 var(--ink); color: var(--shell); font-weight: 800; font-size: calc(26 * var(--p)); text-decoration: none; transform: skewX(-12deg); }
.st-navlink > span { display: block; transform: skewX(12deg); }
.st-navlink:hover, .st-navlink:focus-visible { background: #2E2470; color: var(--shell); }
.st-navlink.on { background: var(--yolk); color: var(--ink); }
.st-main { display: flex; flex-direction: column; gap: calc(32 * var(--p)); min-width: 0; }
.st-sec { background: var(--panel); border: calc(5 * var(--p)) solid var(--ink); box-shadow: calc(10 * var(--p)) calc(10 * var(--p)) 0 var(--ink); scroll-margin-top: calc(24 * var(--p)); }
.st-head { padding: calc(20 * var(--p)) calc(28 * var(--p)) calc(14 * var(--p)); border-bottom: calc(4 * var(--p)) solid var(--ink); background: #1E1650; }
.st-head h2 { margin: 0; font-size: calc(44 * var(--p)); line-height: 1.05; }
.st-head p { margin: calc(6 * var(--p)) 0 0; color: var(--muted); font-weight: 600; font-size: calc(21 * var(--p)); max-width: calc(980 * var(--p)); }
.st-rows { display: flex; flex-direction: column; }
.st-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: calc(24 * var(--p)); min-height: calc(66 * var(--p)); padding: calc(10 * var(--p)) calc(28 * var(--p)); border-bottom: calc(2 * var(--p)) solid rgba(12, 8, 32, .55); cursor: default; }
label.st-row { cursor: pointer; }
.st-row:hover { background: rgba(255, 255, 255, .025); }
.st-l { font-weight: 700; font-size: calc(23 * var(--p)); line-height: 1.3; }
.st-c { display: flex; align-items: center; justify-content: flex-end; gap: calc(10 * var(--p)); }
.st-sub { padding: calc(16 * var(--p)) calc(28 * var(--p)) calc(6 * var(--p)); font-weight: 900; font-style: italic; font-size: calc(24 * var(--p)); color: var(--yolk); display: flex; gap: calc(14 * var(--p)); align-items: baseline; flex-wrap: wrap; }
.st-sub .eb-muted { font-style: normal; font-weight: 600; font-size: calc(20 * var(--p)); color: var(--muted); }
.st-foot { padding: calc(18 * var(--p)) calc(28 * var(--p)) calc(22 * var(--p)); }
/* switches: an angled track with a square knob */
.st-switch { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: calc(66 * var(--p)); height: calc(34 * var(--p)); margin: 0; background: #120D30; border: calc(4 * var(--p)) solid var(--ink); transform: skewX(-12deg); cursor: pointer; transition: background .12s; }
.st-switch::after { content: ""; position: absolute; top: calc(3 * var(--p)); left: calc(4 * var(--p)); width: calc(22 * var(--p)); height: calc(20 * var(--p)); background: var(--muted); transition: transform .12s, background .12s; }
.st-switch:checked { background: var(--yolk); }
.st-switch:checked::after { transform: translateX(calc(28 * var(--p))); background: var(--ink); }
.st-switch:focus-visible { outline: calc(4 * var(--p)) solid var(--shell); outline-offset: calc(3 * var(--p)); }
.st-range { width: calc(240 * var(--p)); accent-color: var(--yolk); }
.st-select { min-width: calc(200 * var(--p)); }
.st-keys { display: grid; grid-template-columns: calc(140 * var(--p)) 1fr 1fr; gap: calc(12 * var(--p)) calc(16 * var(--p)); align-items: center; padding: calc(8 * var(--p)) calc(28 * var(--p)) calc(16 * var(--p)); border-bottom: calc(2 * var(--p)) solid rgba(12, 8, 32, .55); }
.st-keys .lbl { font-weight: 800; font-size: calc(23 * var(--p)); }
.eb .eb-keybtn { border-radius: 0; border: calc(3 * var(--p)) solid var(--ink); box-shadow: calc(4 * var(--p)) calc(4 * var(--p)) 0 var(--ink); background: var(--shell); color: var(--night); }
.eb .eb-keybtn.wide { min-width: calc(160 * var(--p)); }
.st-macros .eb-macro { grid-template-columns: calc(150 * var(--p)) calc(160 * var(--p)) minmax(0, 1fr) auto; }
@media (max-width: 1100px) {
  .st { grid-template-columns: 1fr; gap: calc(22 * var(--p)); }
  .st-nav { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .st-nav h1, .st-nav > p { flex-basis: 100%; }
}
@media (max-width: 700px) {
  .st-row { grid-template-columns: 1fr; gap: calc(10 * var(--p)); }
  .st-c { justify-content: flex-start; }
  .st-keys { grid-template-columns: 1fr 1fr; }
  .st-keys .lbl { grid-column: 1 / -1; }
  .st-macros .eb-macro { grid-template-columns: 1fr 1fr; }
}
/* admin: map previews in the rotation */
.eb-admin-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(220 * var(--p)), 1fr)); gap: calc(16 * var(--p)); min-width: 0; }
.eb-admin-map { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: calc(8 * var(--p)); background: var(--night); border: calc(3 * var(--p)) solid var(--ink); box-shadow: calc(5 * var(--p)) calc(5 * var(--p)) 0 var(--ink); padding: calc(8 * var(--p)); }
.eb-admin-map img, .eb-admin-map > span { display: block; width: 100%; max-width: 100%; aspect-ratio: 2 / 1; object-fit: cover; image-rendering: pixelated; background: #120D30; border: calc(2 * var(--p)) solid var(--ink); }
.eb-admin-map figcaption { font-weight: 800; font-size: calc(22 * var(--p)); line-height: 1.2; }
