/* Ray Ray Zombies · LEADERBOARDS on the web.
   The game's own screen (scripts/ui/steam_boards_view.gd, menu.gd) laid out on
   its 960 x 540 canvas: on a wide screen 1rem is 10 canvas units and every
   place and size below is the game's (PLATE_POS, TABS_Y, COLUMNS ...). The
   colours are UiKit's; the faces the game's own (assets/fonts, OFL). Under
   900 px the page flows instead: the map list is a row of chips. */

@font-face { font-family: "Big Shoulders"; src: url(fonts/BigShoulders-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url(fonts/WorkSans-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url(fonts/WorkSans-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #0d0a0a;
  --plate: rgba(15, 12, 11, 0.94);
  --plate-lit: rgba(69, 14, 13, 0.96);
  --line: #6e4b43;
  --line-dim: #3a2a27;
  --gold: #f2c14e;
  --ember: #dc3f36;
  --bone: #efe9dc;
  --blood: #a3151a;
  --blood-lit: #e8322b;
  --dim: #a89e94;
  --ok: #8fd16a;
  --silver: #cfd5dd;
  --bronze: #c9834f;
  --key-face: #2a2220;
  --key-rim: rgba(239, 233, 220, 0.5);
  --key-legend: #f4efe4;
  --display: "Big Shoulders", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Work Sans", "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

/* 1rem = 10 canvas units: the canvas fits the window, as the game's does. */
html { font-size: clamp(6px, min(calc(100vw / 99), calc(100vh / 56)), 30px); background: var(--ink); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--ink); color: var(--bone); font-family: var(--body); font-size: 1.4rem; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg.ico { width: 1em; height: 1em; fill: currentColor; flex: none; }
.noscript { text-align: center; padding: 4rem; color: var(--dim); }

/* The room behind the menu: dark, warm, a vignette. */
.backdrop { position: fixed; inset: 0; z-index: 0; background:
  radial-gradient(ellipse at 50% 40%, rgba(13, 10, 10, 0.55) 0%, rgba(13, 10, 10, 0.86) 62%, rgba(5, 3, 3, 0.97) 100%),
  linear-gradient(180deg, rgba(13, 10, 10, 0.5), rgba(40, 6, 6, 0.55)),
  url(img/backdrop.jpg) center / cover no-repeat; }
.backdrop::after { content: ""; position: absolute; inset: 0; opacity: 0.16; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ------------------------------------------------------------------ stage */
.stage { position: relative; z-index: 1; width: 96rem; height: 54rem; margin: 0 auto; top: max(0px, calc((100vh - 54rem) / 2)); }

.top .title { position: absolute; left: 3.8rem; top: 2.2rem; margin: 0; font: 700 4.6rem/1 var(--display); letter-spacing: 0.04rem; color: var(--bone);
  text-shadow: 0 0.15rem 0 rgba(0, 0, 0, 0.75), 0 0 1.2rem rgba(0, 0, 0, 0.6); }
.top .title span { color: var(--bone); }
.top .title::after { content: ""; position: absolute; left: -0.6rem; top: 4.75rem; width: 24rem; height: 0.8rem; background: rgba(163, 21, 26, 0.9);
  -webkit-mask: url(img/smear.png) center / 100% 100% no-repeat; mask: url(img/smear.png) center / 100% 100% no-repeat; }
.top .stamp { position: absolute; right: 4rem; top: 1.4rem; font: 700 1.1rem/1 var(--body); color: var(--gold); letter-spacing: 0.04rem; white-space: nowrap; }
.top .stamp #updated { color: var(--dim); font-weight: 400; }
.top .stamp #updated:not(:empty)::before { content: "  ·  "; white-space: pre; color: var(--gold); }
.line-top { position: absolute; left: 4rem; right: 4rem; top: 3.6rem; height: 1px; background: rgba(110, 75, 67, 0.7); }

/* GLOBAL / STEAM: the lit side of the game's switch (MY RECORDS lives on the PC). */
.switch { position: absolute; left: 41.6rem; top: 4.4rem; height: 2.8rem; width: 16.4rem; background: rgba(0, 0, 0, 0.6); border: 1px solid var(--line); }
.switch .side { position: absolute; inset: 0.1rem; display: flex; align-items: center; justify-content: center; gap: 0.6rem; background: rgba(112, 17, 15, 0.98); border-bottom: 0.3rem solid var(--gold); color: #fff; }
.switch .side .ico { font-size: 1.4rem; color: var(--gold); }
.switch b { font: 700 1.7rem/1 var(--display); letter-spacing: 0.03rem; }
.switch small { font: 700 0.9rem/1 var(--body); color: var(--gold); margin-top: 0.2rem; }

/* Where MY REPLAYS sits in the game: sign in through Steam / who you are. */
.account { position: absolute; left: 61.4rem; width: 30.6rem; top: 4.4rem; height: 2.8rem; display: flex; justify-content: flex-end; align-items: stretch; gap: 0.4rem; }
.account .btn { display: flex; align-items: center; gap: 0.7rem; padding: 0 1.2rem; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line-dim); font: 700 1.5rem/1 var(--display); letter-spacing: 0.03rem; color: var(--bone); white-space: nowrap; }
.account .btn:hover, .account .btn:focus-visible { background: rgba(82, 10, 10, 0.85); border-color: var(--blood-lit); color: #fff; outline: none; }
.account .btn .ico { font-size: 1.4rem; color: var(--gold); }
.account .me { display: flex; align-items: center; gap: 0.7rem; padding: 0 0.4rem 0 0.3rem; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line-dim); min-width: 0; }
.account .me img { width: 2.2rem; height: 2.2rem; border: 1px solid var(--gold); }
.account .me b { font: 700 1.5rem/1 var(--display); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14rem; }
.account .me small { font: 700 0.9rem/1 var(--body); color: var(--gold); }
.account .out { font: 700 1rem/1 var(--body); color: var(--dim); padding: 0 0.9rem; display: flex; align-items: center; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line-dim); }
.account .out:hover { color: #fff; border-color: var(--blood-lit); }

/* ------------------------------------------------------------------- keys */
.key { display: inline-flex; align-items: center; justify-content: center; min-width: 3rem; height: 2rem; padding: 0 0.4rem; border-radius: 0.4rem;
  background: var(--key-face); border: 1px solid var(--key-rim); border-bottom-width: 0.2rem; box-shadow: 0 0.2rem 0.2rem rgba(0, 0, 0, 0.5);
  font: 700 1rem/1 var(--body); letter-spacing: 0.1rem; color: var(--key-legend); flex: none; user-select: none; }
.key.big { height: 2.4rem; min-width: 4.6rem; font-size: 1.4rem; padding: 0 0.9rem; }
.key.arrows svg { width: 1rem; height: 1rem; fill: var(--key-legend); }
@media (hover: none) { .key:not(.keep), .hints { display: none !important; } }

/* ------------------------------------------------------------------- tabs */
.tabs { position: absolute; left: 30.6rem; width: 61.4rem; top: 7.6rem; height: 2.6rem; display: flex; align-items: flex-start; gap: 0.3rem; }
.tabs .group { display: flex; align-items: flex-start; gap: 0.3rem; }
.tabs .gap { flex: 1; }
.tabs .key { margin-top: 0.3rem; }
.tab { height: 2.6rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0 0.7rem; white-space: nowrap;
  background: rgba(0, 0, 0, 0.42); border-bottom: 1px solid var(--line-dim); color: var(--dim); }
.tab .ico { color: var(--dim); }
.tab:hover { background: rgba(163, 21, 26, 0.34); border-bottom-color: var(--line); color: #fff; }
.tab:hover .ico { color: #fff; }
.tab.on { background: var(--plate-lit); border-bottom: 0.3rem solid var(--blood-lit); color: var(--bone); }
.tab.on .ico { color: var(--gold); }
.tab.squad { font: 700 1.5rem/1 var(--display); letter-spacing: 0.03rem; }
.tab.squad .ico { font-size: 1.4rem; }
.tab.view { font: 700 1.1rem/1 var(--body); }
.tab.view .ico { font-size: 1.2rem; }
.tab.view.locked { opacity: 0.75; }

/* ----------------------------------------------------------------- plates */
.plate { position: absolute; background: var(--plate); box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45); }
.plate::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 236, 214, 0.05) 0, rgba(255, 236, 214, 0) 1.2rem),
    radial-gradient(ellipse at 20% 0%, rgba(120, 70, 50, 0.08), transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(0, 0, 0, 0.25), transparent 60%);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-dim); }
.plate::after { content: ""; position: absolute; left: 0; top: 0; width: 4.6rem; height: 0.3rem; background: var(--gold); pointer-events: none; }
.plate .corner { position: absolute; width: 1rem; height: 1rem; pointer-events: none; border: 0 solid var(--line); }
.plate .corner.tl { left: -0.1rem; top: -0.1rem; border-left-width: 0.2rem; border-top-width: 0.2rem; }
.plate .corner.tr { right: -0.1rem; top: -0.1rem; border-right-width: 0.2rem; border-top-width: 0.2rem; }
.plate .corner.bl { left: -0.1rem; bottom: -0.1rem; border-left-width: 0.2rem; border-bottom-width: 0.2rem; }
.plate .corner.br { right: -0.1rem; bottom: -0.1rem; border-right-width: 0.2rem; border-bottom-width: 0.2rem; }
.plate .rivet { position: absolute; width: 0.2rem; height: 0.2rem; background: var(--line); }
.plate-tag { position: absolute; left: 1.4rem; top: 0.6rem; font: 700 1.1rem/1.6rem var(--body); color: var(--dim); letter-spacing: 0.1rem; }

/* ------------------------------------------------------------ the map list */
.maps { left: 4rem; top: 10.6rem; width: 25rem; height: 36rem; }
.map-list { position: absolute; left: 1rem; top: 2.5rem; width: 23.2rem; display: flex; flex-direction: column; gap: 0.6rem; }
.map { position: relative; display: flex; align-items: center; width: 22.4rem; height: 6rem; text-align: left; overflow: hidden; border-left: 0.3rem solid transparent; }
.map:hover, .map:focus-visible { background: rgba(26, 6, 6, 0.55); border-left-color: var(--blood-lit); outline: none; }
.map.on { background: rgba(26, 6, 6, 0.55); border-left-color: var(--blood-lit); }
.map .thumb { position: absolute; left: 0.6rem; top: 0.6rem; width: 8.8rem; height: 4.8rem; background: #1f1a16 center / cover no-repeat; outline: 1px solid rgba(0, 0, 0, 0.8); box-shadow: 0 0 0 0.2rem rgba(239, 233, 220, 0.06); filter: saturate(0.92) contrast(1.04); }
.map .swipe { position: absolute; left: 9rem; top: 0.4rem; width: 32rem; height: 5.2rem; background: rgba(163, 21, 26, 0.92); opacity: 0; transition: opacity 0.18s;
  -webkit-mask: url(img/brush.png) left center / 100% 100% no-repeat; mask: url(img/brush.png) left center / 100% 100% no-repeat; }
.map.on .swipe { opacity: 1; }
.map .name { position: relative; margin-left: 10.2rem; width: 11.6rem; font: 700 1.4rem/1.05 var(--display); letter-spacing: 0.06rem; color: var(--bone); text-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.9); }
.map.on .name { color: #fff; }

/* ------------------------------------------------------------- the board */
.board { left: 30.6rem; top: 10.6rem; width: 61.4rem; height: 36rem; }
.strip { position: absolute; left: 1.6rem; right: 1.6rem; top: 0.6rem; height: 2rem; display: flex; align-items: center; gap: 0.3rem; z-index: 5; }
.strip .spacer { flex: 1; }
.strip .gap6 { width: 0.6rem; }
.drop { position: relative; height: 2rem; display: flex; align-items: center; background: rgba(0, 0, 0, 0.45); border-bottom: 1px solid var(--gold); padding: 0 2.2rem 0 0.8rem; font: 700 1.1rem/1 var(--body); color: var(--bone); white-space: nowrap; }
.drop:hover, .drop.open { background: rgba(163, 21, 26, 0.6); color: #fff; }
.drop .tag { color: var(--gold); font-size: 1rem; margin-right: 0.8rem; }
.drop .val { overflow: hidden; text-overflow: ellipsis; }
.drop .ends { margin-left: auto; padding-left: 0.6rem; font: 700 0.9rem/1 var(--body); color: var(--dim); }
.drop .chev { position: absolute; right: 0.6rem; top: 0.6rem; width: 0.8rem; height: 0.8rem; fill: var(--gold); }
.drop.period { width: 21rem; }
.drop.type { width: 13.2rem; }
.drop.edition { width: 25rem; }
.list { position: absolute; z-index: 30; min-width: 25rem; background: rgba(8, 5, 5, 0.98); border: 1px solid var(--gold); box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.6); padding: 0.4rem; }
.list button { display: flex; width: 100%; height: 2.4rem; align-items: center; padding: 0 1rem; margin-bottom: 0.2rem; background: rgba(255, 255, 255, 0.03); font: 700 1.2rem/1 var(--body); color: var(--dim); text-align: left; white-space: nowrap; }
.list button.on { background: var(--plate-lit); color: var(--bone); }
.list button:hover, .list button:focus-visible { background: rgba(163, 21, 26, 0.7); color: #fff; outline: none; }
.list button .more { margin-left: auto; padding-left: 1.6rem; font-size: 1rem; color: var(--dim); }
.sort { height: 2rem; padding: 0 0.7rem; font: 700 1rem/1 var(--body); white-space: nowrap; background: rgba(0, 0, 0, 0.42); border-bottom: 1px solid var(--line-dim); color: var(--dim); }
.sort:hover { background: rgba(163, 21, 26, 0.34); color: #fff; }
.sort.on { background: var(--plate-lit); border-bottom: 0.3rem solid var(--blood-lit); color: var(--bone); }
.sort.time { width: 5.8rem; }
.sort.kills { width: 7.4rem; }
.strip .key { height: 2rem; min-width: 2.6rem; }

.capline { position: absolute; left: 1.6rem; right: 1.6rem; top: 2.9rem; height: 1.9rem; display: flex; align-items: center; gap: 1.2rem; z-index: 4; }
.caption { flex: 1; min-width: 0; font: 700 1.3rem/1.9rem var(--body); color: var(--gold); white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.rule { font: 400 1rem/1 var(--body); color: var(--dim); white-space: nowrap; letter-spacing: 0.02rem; }
.country-pick { position: relative; width: 17.6rem; height: 2rem; display: flex; align-items: center; gap: 0.6rem; padding: 0 2rem 0 0.6rem; background: rgba(255, 255, 255, 0.05); border-bottom: 1px solid var(--gold); font: 700 1.1rem/1 var(--body); color: var(--bone); white-space: nowrap; overflow: hidden; }
.country-pick:hover { background: rgba(163, 21, 26, 0.6); color: #fff; }
.country-pick span { overflow: hidden; text-overflow: ellipsis; }
.country-pick .flag { width: 2rem; height: 1.4rem; flex: none; }
.country-pick .chev { position: absolute; right: 0.6rem; top: 0.6rem; width: 0.8rem; height: 0.8rem; fill: var(--gold); }

.content { position: absolute; left: 0; right: 0; top: 5.2rem; bottom: 0; }

/* -------------------------------------------------------------- the podium */
.podium { position: relative; height: 11.4rem; margin: 0 1.6rem; }
.card { position: absolute; overflow: hidden; border: 1px solid; border-top-width: 0.3rem; cursor: pointer; text-align: left; }
.card.p1 { left: 0; top: 0; width: 58.2rem; height: 5rem; border-width: 0.2rem; border-top-width: 0.3rem; }
.card.p2, .card.p3 { top: 5.6rem; width: 28.8rem; height: 5.8rem; }
.card.p2 { left: 0; }
.card.p3 { left: 29.4rem; }
.card .glow { position: absolute; inset: 0; pointer-events: none; }
.card.p1 .glow { animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.card .sheen { position: absolute; top: 0; bottom: 0; left: -9rem; width: 8rem; pointer-events: none; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 242, 204, 0.2), rgba(255, 255, 255, 0)); animation: sheen 5.3s linear infinite; }
.card.p2 .sheen, .card.p3 .sheen { background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 242, 204, 0.12), rgba(255, 255, 255, 0)); }
.card.p2 .sheen { animation-delay: 0.4s; }
.card.p3 .sheen { animation-delay: 0.8s; }
@keyframes sheen { 0% { transform: translateX(0); } 0%, 12% { transform: translateX(0); } 37% { transform: translateX(var(--sheen-to, 70rem)); } 100% { transform: translateX(var(--sheen-to, 70rem)); } }
.card .medal { position: absolute; left: 0; top: 0; bottom: 0; }
.card .medal svg { display: block; width: 100%; height: 100%; }
.medal-sweep { transform-box: fill-box; animation: medal-sweep 3.6s linear infinite; }
@keyframes medal-sweep { 0% { transform: rotate(20deg) translateX(0); } 45%, 100% { transform: rotate(20deg) translateX(450%); } }
.board.busy .content { opacity: 0.55; transition: opacity 0.15s; }
.card .place { position: absolute; left: 0; bottom: 0.2rem; font: 700 2.8rem/1 var(--display); text-align: center; }
.card.p2 .place, .card.p3 .place { font-size: 2.6rem; }
.card .round { position: absolute; top: 0.4rem; text-align: center; font: 700 3.4rem/3.1rem var(--display); }
.card .round-tag { position: absolute; text-align: center; font: 700 0.8rem/1rem var(--body); color: var(--dim); letter-spacing: 0.05rem; }
.card .hair { position: absolute; top: 0.8rem; bottom: 0.8rem; width: 1px; }
.card .from { position: absolute; display: flex; align-items: center; gap: 0.3rem; height: 1.2rem; white-space: nowrap; max-width: 100%; }
.card .from .flag { width: 1.5rem; height: 1rem; }
.card .from .where { margin-left: 0.2rem; font: 700 1rem/1 var(--body); color: var(--dim); overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.02rem; }
.card .people { position: absolute; display: flex; flex-wrap: wrap; align-content: center; column-gap: 0.8rem; row-gap: 0.2rem; overflow: hidden; }
.card .stat { position: absolute; display: flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.card .stat .ico { color: inherit; }
.card .stat b { font-family: var(--display); font-weight: 700; }
.card .stat-tag { position: absolute; font: 700 0.8rem/1rem var(--body); color: var(--dim); letter-spacing: 0.05rem; }
.card.mine { background: rgba(92, 13, 13, 0.96) !important; }
.card:hover, .card:focus-visible { outline: 1px solid rgba(242, 193, 78, 0.8); outline-offset: -1px; }
.card.open { cursor: default; }
.card.open:hover { outline: none; }
.card.open .open-word { position: absolute; font: 700 1.7rem/2rem var(--body); color: rgba(239, 233, 220, 0.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.p2.open .open-word, .card.p3.open .open-word { font-size: 1.5rem; }
.card.open .open-line { position: absolute; font: 700 1rem/1.4rem var(--body); color: rgba(168, 158, 148, 0.62); white-space: nowrap; }

/* People: a block each (avatar and name, a link to their Steam profile). */
.person { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; max-width: 100%; color: inherit; }
.person img, .person .noav { width: var(--av, 1.4rem); height: var(--av, 1.4rem); flex: none; border: 1px solid rgba(0, 0, 0, 0.6); background: #2a2220; object-fit: cover; }
.person .noav { display: inline-flex; align-items: center; justify-content: center; color: var(--dim); font: 700 calc(var(--av, 1.4rem) * 0.55)/1 var(--body); }
.person .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
a.person:hover .nm, a.person:focus-visible .nm { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 0.2rem; }

/* ---------------------------------------------------------- the chase line */
.chase { position: relative; height: 1.3rem; margin: 0.3rem 1rem; display: flex; align-items: center; gap: 0.4rem; padding-left: 0.8rem; white-space: nowrap; overflow: hidden;
  background: linear-gradient(90deg, rgba(232, 50, 43, 0.42), rgba(232, 50, 43, 0.21) 42%, rgba(232, 50, 43, 0) 100%); }
.chase::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0.3rem; background: var(--gold); }
.chase .ico { font-size: 0.9rem; color: var(--gold); margin-left: 0.2rem; }
.chase span { font: 700 1rem/1.3rem var(--body); color: var(--gold); overflow: hidden; text-overflow: ellipsis; }
.chase-slot { height: 1.9rem; }

/* ------------------------------------------------------------- the table */
.table { position: relative; margin: 0 1rem; }
/* The game's COLUMNS (RANK 14, SURVIVOR 56, ROUND 380, KILLS 424, TIME 476, DATE 532),
   TIME a few units wider for runs over an hour ("1:45:11"). */
.cols { display: grid; grid-template-columns: 0.4rem 4rem 0.2rem 30.8rem 0.4rem 4.2rem 0.2rem 5.2rem 0.8rem 5.6rem 0.4rem 6.6rem; align-items: center; }
.cols > :nth-child(1) { grid-column: 2; }
.cols > :nth-child(2) { grid-column: 4; }
.cols > :nth-child(3) { grid-column: 6; text-align: center; }
.cols > :nth-child(4) { grid-column: 8; text-align: right; }
.cols > :nth-child(5) { grid-column: 10; text-align: right; }
.cols > :nth-child(6) { grid-column: 12; text-align: right; }
.head { position: relative; height: 1.8rem; align-items: start; font: 700 1rem/1.5rem var(--body); color: var(--dim); }
.head::after { content: ""; position: absolute; left: 0.6rem; right: 0.6rem; top: 1.6rem; height: 1px; background: var(--line-dim); }
.head .lit { color: var(--bone); }
.cols > * { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row { position: relative; height: 1.9rem; width: 100%; text-align: left; font: 400 1.4rem/1 var(--body); color: var(--bone); }
.row.tall { height: 2.3rem; }
.row > .cols { position: relative; z-index: 1; height: 100%; }
.row .wash { position: absolute; inset: 0 0 1px 0; z-index: 0; }
.row .edge { position: absolute; left: 0; top: 0; bottom: 1px; width: 0.3rem; z-index: 0; }
.row.stripe .wash { background: rgba(255, 255, 255, 0.03); }
.row.top .rank, .row.top .who, .row.top .num { font-weight: 700; }
.row .num { font-variant-numeric: tabular-nums; }
.row .date { font-size: 1.2rem; color: var(--dim); }
.row.mine { color: #fff; }
.row.mine .wash { background: rgba(163, 21, 26, 0.62); outline: 1px solid rgba(242, 193, 78, 0.85); outline-offset: -1px; border-left: 0.4rem solid rgba(242, 193, 78, 0.85); }
.row.mine .date { color: rgba(255, 255, 255, 0.78); }
.row.mine .rank, .row.mine .who, .row.mine .num { font-weight: 700; }
.row.pinned { margin-top: 0.3rem; }
.row.pinned::before { content: ""; position: absolute; left: 0.6rem; right: 0.6rem; top: -0.2rem; height: 1px; background: var(--line-dim); }
.row:hover .wash, .row:focus-visible .wash { box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.8); }
.row:hover, .row:focus-visible { outline: none; cursor: pointer; }
.row:hover::after { content: ""; position: absolute; inset: 0 0 1px 0; background: rgba(255, 255, 255, 0.05); z-index: 0; pointer-events: none; }
.who { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.who .flags { display: inline-flex; gap: 0.2rem; flex: none; margin-right: 0.1rem; }
.who .flags .flag { width: 1.9rem; height: 1.3rem; }
.who .flags.mini { display: inline-grid; grid-template-columns: 1.2rem 1.2rem; gap: 0.1rem; }
.who .flags.mini .flag { width: 1.2rem; height: 0.8rem; }
.who .people { display: flex; align-items: center; gap: 0.9rem; min-width: 0; overflow: hidden; flex: 0 1 auto; }
/* Every member keeps a place: a name that fits its share stays whole, the long
   ones share what is left (the game's _even_trim). */
.who .person { --av: 1.4rem; flex: 1 1 0; max-width: max-content; }
.who .tagx { flex: none; }
.tagx { display: inline-flex; align-items: center; height: 1.3rem; padding: 0 0.5rem; font: 700 1rem/1 var(--body); border-radius: 0.2rem; white-space: nowrap; }
.tagx.tail { padding: 0; color: var(--dim); }
.row.mine .tagx.tail { color: rgba(255, 255, 255, 0.78); }
.tagx.you { background: var(--gold); color: var(--ink); }
.tagx.friend { background: rgba(143, 209, 106, 0.14); border: 1px solid rgba(143, 209, 106, 0.9); color: var(--ok); }
.replay { display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--gold); }
.replay svg { width: 1.5rem; height: 1.1rem; fill: currentColor; }
.open-row { height: 1.9rem; }
.open-row .rank { font: 700 1.2rem/1 var(--body); }
.open-row .who { font: 700 1rem/1 var(--body); color: rgba(168, 158, 148, 0.3); }

/* ------------------------------------------------------- messages, picker */
.message { position: absolute; left: 2rem; right: 2rem; text-align: center; }
.message h2 { margin: 0; font: 700 2.4rem/3.6rem var(--display); letter-spacing: 0.03rem; text-shadow: 0 0.2rem 0.3rem rgba(0, 0, 0, 0.8); }
.message p { margin: 0.4rem auto 0; max-width: 53.4rem; font: 400 1.3rem/1.6 var(--body); color: var(--dim); }
.message .btn { display: inline-flex; margin-top: 1.2rem; align-items: center; gap: 0.7rem; padding: 0.6rem 1.4rem; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); font: 700 1.5rem/1 var(--display); color: var(--bone); }
.message .btn:hover { background: rgba(82, 10, 10, 0.85); border-color: var(--blood-lit); color: #fff; }
.picker { position: absolute; left: 0.8rem; right: 0.8rem; top: 5rem; bottom: 0.6rem; z-index: 20; background: rgba(8, 5, 5, 0.98); border: 1px solid var(--gold); padding: 0.6rem; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 2.4rem; gap: 0.2rem 0.4rem; }
.picker button { position: relative; display: flex; align-items: center; gap: 0.6rem; padding: 0 0.6rem; background: rgba(255, 255, 255, 0.03); font: 700 1.1rem/1 var(--body); color: var(--bone); white-space: nowrap; overflow: hidden; }
.picker button span { overflow: hidden; text-overflow: ellipsis; }
.picker button.on { background: var(--plate-lit); }
.picker button:hover, .picker button:focus-visible { background: rgba(163, 21, 26, 0.7); color: #fff; outline: none; }
.picker .flag { width: 2rem; height: 1.4rem; }

/* The SQUAD panel: who played a row's run. */
.scrim { position: absolute; left: 0.2rem; right: 0.2rem; top: 4.9rem; bottom: 0.2rem; background: rgba(0, 0, 0, 0.62); z-index: 24; }
.panel { position: absolute; left: 3.6rem; right: 3.6rem; top: 5.6rem; min-height: 24.6rem; z-index: 25; background: rgba(8, 5, 5, 0.98); border: 1px solid var(--gold); border-top-width: 0.3rem; box-shadow: 0 1.2rem 2.4rem rgba(0, 0, 0, 0.6); padding: 0.8rem 1.6rem 1.2rem; }
.panel .ph { display: flex; align-items: center; gap: 0.8rem; height: 2.6rem; }
.panel .ph h3 { flex: 1; margin: 0; font: 700 1.7rem/1 var(--body); color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel .ph .key { height: 2rem; }
.pbtn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; height: 2.4rem; padding: 0 1.2rem; background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--line-dim); font: 700 1.2rem/1 var(--body); color: var(--bone); white-space: nowrap; }
.pbtn:hover, .pbtn:focus-visible { background: var(--plate-lit); border-bottom: 0.3rem solid var(--blood-lit); color: #fff; outline: none; }
.pbtn .ico { color: var(--gold); }
.pchip { display: inline-flex; align-items: center; gap: 0.6rem; height: 2.4rem; padding: 0 1rem; border: 1px solid rgba(242, 193, 78, 0.5); font: 700 1.1rem/1 var(--body); color: var(--gold); white-space: nowrap; }
.pchip svg { width: 1.5rem; height: 1.1rem; fill: currentColor; }
.panel .facts { font: 700 1.1rem/1.6rem var(--body); color: var(--dim); margin: 0.2rem 0 0.4rem; white-space: pre-wrap; }
.panel .sep { height: 1px; background: var(--line-dim); margin: 0.2rem 0 0.7rem; }
.panel .pl { display: flex; align-items: center; gap: 0.8rem; height: 3.2rem; padding: 0 0.4rem 0 0.8rem; background: rgba(255, 255, 255, 0.03); margin-bottom: 0.3rem; }
.panel .pl .flag { width: 2rem; height: 1.4rem; flex: none; }
.panel .pl .noflag { width: 2rem; flex: none; }
.panel .pl img, .panel .pl .noav { width: 2.4rem; height: 2.4rem; flex: none; border: 1px solid rgba(0, 0, 0, 0.6); background: #2a2220; }
.panel .pl .noav { display: inline-flex; align-items: center; justify-content: center; font: 700 1.2rem/1 var(--body); color: var(--dim); }
.panel .pl .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.panel .pl .txt b { font: 700 1.4rem/1.8rem var(--body); color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel .pl.you .txt b { color: #fff; }
.panel .pl .txt small { font: 400 0.9rem/1.2rem var(--body); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel .pl.you .txt small { color: var(--gold); }
.panel .pl .pbtn { width: 18.4rem; }
.panel .pl .none { width: 18.4rem; text-align: center; font: 700 1rem/1 var(--body); color: rgba(168, 158, 148, 0.6); }
.panel .note { margin-top: 0.8rem; font: 400 1rem/1.4 var(--body); color: rgba(168, 158, 148, 0.9); }

/* -------------------------------------------------------------- the pager */
.pager { position: absolute; left: 30.6rem; top: 47.2rem; width: 61.4rem; height: 2.6rem; display: flex; align-items: center; gap: 0.6rem; }
.pager.hidden { visibility: hidden; }
.pg { position: relative; height: 2.6rem; min-width: 8.6rem; display: inline-flex; align-items: center; justify-content: center; font: 700 1.3rem/1 var(--body); color: var(--bone); background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--line-dim); }
.pg.prev { padding: 0 1rem 0 2.2rem; }
.pg.next { padding: 0 2.2rem 0 1rem; }
.pg.me { min-width: 11.8rem; padding: 0 1rem; }
.pg .chev { position: absolute; top: 0.85rem; width: 0.9rem; height: 0.9rem; fill: var(--gold); }
.pg.prev .chev { left: 0.6rem; }
.pg.next .chev { right: 0.6rem; }
.pg:hover:not(:disabled) { background: var(--plate-lit); border-bottom: 0.3rem solid var(--blood-lit); color: #fff; }
.pg:hover:not(:disabled) .chev { fill: #fff; }
.pg:active:not(:disabled) { background: rgba(163, 21, 26, 0.85); border-bottom-color: var(--gold); }
.pg:disabled { cursor: default; background: rgba(0, 0, 0, 0.18); border-bottom-color: rgba(58, 42, 39, 0.6); color: rgba(168, 158, 148, 0.35); }
.pg:disabled .chev { fill: rgba(168, 158, 148, 0.35); }
.pager .where { flex: 1; display: flex; align-items: center; justify-content: center; gap: 1rem; min-width: 0; white-space: nowrap; }
.pager .where b { font: 700 1.4rem/1 var(--body); color: var(--bone); }
.pager .where b.toast { color: var(--gold); }
.pager .where small { font: 400 1.1rem/1 var(--body); color: var(--dim); }
.pager .key { margin-left: 0.8rem; }

/* --------------------------------------------------------------- the foot */
.foot { position: absolute; left: 4rem; right: 4rem; top: 50.2rem; height: 3.4rem; display: flex; align-items: center; gap: 3rem; }
.hints { flex: 1; display: flex; align-items: center; gap: 2.2rem; min-width: 0; overflow: hidden; }
.hint { display: inline-flex; align-items: center; gap: 0.8rem; font: 400 1.5rem/1 var(--body); color: #e0dace; text-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.55); white-space: nowrap; }
.hint .key { height: 2.4rem; min-width: 3.2rem; font-size: 1.2rem; }
.back { display: inline-flex; align-items: center; gap: 1rem; height: 3.4rem; padding: 0 1.6rem; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line-dim); font: 700 2rem/1 var(--display); letter-spacing: 0.04rem; color: var(--bone); white-space: nowrap; }
.back:hover, .back:focus-visible { background: rgba(82, 10, 10, 0.85); border-color: var(--blood-lit); color: #fff; outline: none; }
.back .chev { width: 1.2rem; height: 1.2rem; fill: var(--gold); }

/* --------------------------------------------------------------- entrance */
.enter { animation: enter 0.28s cubic-bezier(0.22, 0.61, 0.36, 1) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes enter { from { opacity: 0; transform: translateX(1.4rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .enter, .card .sheen, .card.p1 .glow { animation: none !important; }
}

/* ================================================================ phones
   The page flows: the header, the map list as a row of chips, the tabs, the
   board, the pager. The table keeps RANK, SURVIVOR, ROUND, KILLS and TIME. */
@media (max-width: 899px), (max-aspect-ratio: 1/1) {
  html { font-size: clamp(9px, calc(100vw / 46), 13px); }
  body { font-size: 1.4rem; }
  .backdrop { position: fixed; }
  .stage { width: auto; height: auto; top: 0; padding: 1.2rem 1.6rem 3rem; max-width: 72rem; }
  .stage > * { position: relative !important; left: auto !important; right: auto !important; top: auto !important; width: auto !important; }
  .top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1rem; padding-bottom: 1rem; }
  .top .title { position: relative; left: auto; top: auto; font-size: 4rem; flex: 1 0 100%; }
  .top .title::after { top: 4.3rem; width: 24rem; }
  .top .stamp { position: relative; right: auto; top: auto; order: -1; flex: 1 0 100%; font-size: 1rem; white-space: normal; }
  .switch { position: relative; left: auto; top: auto; margin-top: 1rem; }
  .account { position: relative; left: auto; top: auto; width: auto; flex: 1; margin-top: 1rem; }
  .tabs { position: relative; height: auto; flex-wrap: wrap; margin: 0.6rem 0 0.8rem; }
  .tabs .group { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs .group .tab { flex: 1 0 auto; }
  .tabs .gap { display: none; }
  .maps { position: relative; height: auto; margin-bottom: 0.8rem; }
  .maps .plate-tag { display: none; }
  .map-list { position: relative; left: auto; top: auto; width: auto; flex-direction: row; gap: 0.6rem; overflow-x: auto; padding: 0.6rem; scrollbar-width: thin; }
  .map { flex: none; width: 14rem; height: auto; flex-direction: column; align-items: stretch; border-left: 0; border-bottom: 0.3rem solid transparent; padding: 0.5rem; }
  .map.on { border-bottom-color: var(--blood-lit); }
  .map:hover, .map:focus-visible { border-bottom-color: var(--blood-lit); }
  .map .thumb { position: relative; left: auto; top: auto; width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .map .swipe { display: none; }
  .map .name { margin: 0.5rem 0 0; width: auto; font-size: 1.3rem; }
  .board { position: relative; height: auto; min-height: 30rem; padding-bottom: 1rem; }
  .strip { position: relative; left: auto; right: auto; top: auto; height: auto; flex-wrap: wrap; padding: 0.8rem 1rem 0; gap: 0.6rem; }
  .strip .spacer { display: none; }
  .drop.period { flex: 1 1 18rem; width: auto; }
  .capline { position: relative; left: auto; right: auto; top: auto; height: auto; flex-wrap: wrap; padding: 0.8rem 1rem 0.4rem; gap: 0.4rem 1rem; }
  .caption { flex: 1 1 100%; white-space: normal; line-height: 1.4; }
  .content { position: relative; top: auto; min-height: 20rem; }
  .podium { height: auto; display: flex; flex-direction: column; gap: 0.6rem; margin: 0.6rem 1rem 0; }
  .card { position: relative !important; left: auto !important; top: auto !important; flex: none; }
  .table { margin: 0 0.6rem; }
  .cols { grid-template-columns: 0.4rem 3.4rem 0.4rem minmax(0, 1fr) 0.4rem 3.2rem 0.4rem 4.6rem 0.6rem 5.8rem 0 0; }
  .row { font-size: 1.3rem; }
  .cols > :nth-child(6) { display: none; }
  .row, .row.tall { height: 2.6rem; }
  .who .people { gap: 0.6rem; }
  .panel { left: 0.4rem; right: 0.4rem; top: 1rem; position: fixed; z-index: 50; max-height: 90vh; overflow-y: auto; }
  .scrim { position: fixed; inset: 0; z-index: 49; }
  .panel .pl { height: auto; min-height: 3.2rem; flex-wrap: wrap; padding: 0.4rem; }
  .panel .pl .pbtn, .panel .pl .none { width: auto; }
  .picker { grid-template-columns: repeat(2, 1fr); top: 0; position: absolute; }
  .pager { flex-wrap: wrap; height: auto; margin-top: 0.8rem; justify-content: space-between; }
  .pager .where { order: -1; flex: 1 1 100%; padding: 0.4rem 0; }
  .pg { flex: 1; }
  .foot { position: relative; height: auto; margin-top: 1.6rem; justify-content: center; }
  .hints { display: none; }
}
