/* ML Draft - liquid glass theme. No images: everything is gradients, blur and light. */

:root {
  --bg: #070b1f;
  --ink: #f4f6ff;
  --ink-2: rgba(244, 246, 255, 0.88);
  --ink-3: rgba(244, 246, 255, 0.72);
  /* Panels are a dark tint (not a light one) so white text keeps its contrast over the
     bright red/blue turn glow. */
  --glass: rgba(10, 12, 32, 0.55);
  --glass-strong: rgba(22, 26, 58, 0.7);
  --glass-edge: rgba(255, 255, 255, 0.22);
  --glass-hi: rgba(255, 255, 255, 0.55);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --accent: #6aa2ff;
  --accent-2: #b98bff;
  --good: #3ee0a1;
  --warn: #ffc857;
  --bad: #ff6b81;
  --main: #3ee0a1;
  --flex: #ffc857;
  --off: rgba(244, 246, 255, 0.55);
  --blob-1: #3b6dff;
  --blob-2: #9b5cff;
  --blob-3: #10c7b5;
  --blob-4: #ff5fa2;
  --radius: 24px;
  --radius-sm: 14px;
  --blur: blur(26px) saturate(185%);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #e9eeff;
    --ink: #10142e;
    --ink-2: rgba(16, 20, 46, 0.72);
    --ink-3: rgba(16, 20, 46, 0.5);
    --glass: rgba(255, 255, 255, 0.42);
    --glass-strong: rgba(255, 255, 255, 0.62);
    --glass-edge: rgba(255, 255, 255, 0.85);
    --glass-hi: rgba(255, 255, 255, 0.95);
    --shadow: 0 10px 36px rgba(40, 50, 120, 0.16);
    --accent: #2f6bff;
    --accent-2: #8a4dff;
    --good: #0f9f6e;
    --warn: #b97800;
    --bad: #d63554;
    --main: #0f9f6e;
    --flex: #b97800;
    --off: rgba(16, 20, 46, 0.4);
    --blob-1: #8fb0ff;
    --blob-2: #cfa8ff;
    --blob-3: #8fe9df;
    --blob-4: #ffb3d4;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- backdrop ---------- */
.backdrop { position: fixed; inset: 0; overflow: hidden; z-index: -1; }
.blob {
  position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%;
  filter: blur(80px); opacity: 0.55; animation: drift 26s ease-in-out infinite alternate;
}
.b1 { background: var(--blob-1); top: -18vmax; left: -12vmax; }
.b2 { background: var(--blob-2); top: 10vmax; right: -20vmax; animation-duration: 32s; }
.b3 { background: var(--blob-3); bottom: -24vmax; left: 12vmax; animation-duration: 38s; opacity: 0.4; }
.b4 { background: var(--blob-4); bottom: -10vmax; right: 6vmax; width: 30vmax; height: 30vmax; animation-duration: 22s; opacity: 0.35; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.08); }
  100% { transform: translate(-4vmax, 7vmax) scale(0.95); }
}
/* Turn glow during a draft: liquid red on your turn, blue while the opponent picks.
   The blobs change colour and a soft pulsing light washes in from the top and bottom. */
.blob { transition: background-color 0.9s ease, opacity 0.9s ease; }
body[data-turn="me"] .b1 { background: #ff1f4b; opacity: 0.7; }
body[data-turn="me"] .b2 { background: #ff5a36; opacity: 0.6; }
body[data-turn="me"] .b3 { background: #d4004f; opacity: 0.55; }
body[data-turn="me"] .b4 { background: #ff7a8a; opacity: 0.45; }
body[data-turn="enemy"] .b1 { background: #1f5bff; opacity: 0.7; }
body[data-turn="enemy"] .b2 { background: #19b8ff; opacity: 0.6; }
body[data-turn="enemy"] .b3 { background: #3a3dff; opacity: 0.55; }
body[data-turn="enemy"] .b4 { background: #58d6ff; opacity: 0.45; }
.backdrop::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  transition: opacity 0.9s ease;
}
body[data-turn="me"] .backdrop::after {
  opacity: 1; animation: glow-pulse 2.6s ease-in-out infinite;
  background: radial-gradient(120% 60% at 50% -10%, rgba(255, 30, 70, 0.45), transparent 60%),
              radial-gradient(120% 50% at 50% 110%, rgba(255, 60, 40, 0.35), transparent 60%);
}
body[data-turn="enemy"] .backdrop::after {
  opacity: 1; animation: glow-pulse 2.6s ease-in-out infinite;
  background: radial-gradient(120% 60% at 50% -10%, rgba(30, 110, 255, 0.45), transparent 60%),
              radial-gradient(120% 50% at 50% 110%, rgba(20, 190, 255, 0.35), transparent 60%);
}
body[data-turn="me"] .glass { border-color: rgba(255, 110, 130, 0.5); }
body[data-turn="enemy"] .glass { border-color: rgba(110, 170, 255, 0.5); }
@keyframes glow-pulse { 50% { filter: brightness(1.35) saturate(1.2); } }

@media (prefers-reduced-motion: reduce) {
  .blob, .pulse, .live-dot, .backdrop::after { animation: none !important; }
  * { transition: none !important; }
}

/* ---------- glass ---------- */
.glass {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 rgba(255, 255, 255, 0.06), var(--shadow);
}
/* specular sheen across the top-left of every glass surface */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 32%, transparent 55%);
  mix-blend-mode: overlay;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 12px; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  max-width: 1180px; margin: 12px auto 0; padding: 8px 10px 8px 12px;
  border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 999px; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font-weight: 800; font-size: 13px; color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 14px rgba(90, 120, 255, 0.45);
}
.brand-name { font-weight: 700; font-size: 17px; }

/* Sponsor card (gamingphone.mn), fixed in the empty space right of the 1180px page.
   Only shown when that space is wide enough to hold it. */
.sponsor { display: none; }
@media (min-width: 1760px) {
  .sponsor {
    --cyan: #19e6f0;
    --w: min(300px, calc((100vw - 1180px) / 2 - 48px));
    position: fixed; z-index: 5; top: 50%; right: calc(((100vw - 1180px) / 2 - var(--w)) / 2);
    transform: translateY(-50%); width: var(--w);
    display: grid; justify-items: center; gap: 18px; padding: 36px 22px 28px; text-align: center;
    overflow: hidden; isolation: isolate; border-radius: var(--radius); text-decoration: none; color: #f4f6ff;
    background:
      radial-gradient(120% 70% at 50% 0%, rgba(25, 230, 240, 0.28), transparent 60%),
      linear-gradient(180deg, rgba(8, 14, 34, 0.82), rgba(4, 8, 22, 0.92));
    border: 1px solid rgba(25, 230, 240, 0.5);
    box-shadow: 0 0 40px rgba(25, 230, 240, 0.25), 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    transition: box-shadow 0.2s ease;
  }
  .sponsor:hover { box-shadow: 0 0 60px rgba(25, 230, 240, 0.45), 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
  /* A slow light sweep so it catches the eye without flashing. */
  .sponsor::after {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(110deg, transparent 35%, rgba(25, 230, 240, 0.22) 50%, transparent 65%);
    transform: translateX(-100%); animation: sponsor-sweep 7s ease-in-out infinite;
  }
  .sponsor-logo {
    display: grid; place-items: center; width: 150px; height: 150px; border-radius: 50%;
    background: radial-gradient(circle at 50% 45%, rgba(25, 230, 240, 0.3), #040914 70%);
    border: 1px solid rgba(25, 230, 240, 0.55);
    box-shadow: 0 0 36px rgba(25, 230, 240, 0.35), inset 0 0 24px rgba(25, 230, 240, 0.2);
  }
  .sponsor-logo img {
    display: block; width: 74px; height: auto; filter: drop-shadow(0 0 10px rgba(25, 230, 240, 0.85));
    animation: sponsor-glow 3.5s ease-in-out infinite;
  }
  .sponsor-line { font-size: clamp(24px, calc(var(--w) / 10), 30px); font-weight: 900; line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; }
  .sponsor-url {
    display: block; width: 100%; padding: 12px 10px; border-radius: 999px;
    font-size: 18px; font-weight: 800; letter-spacing: 0.03em; color: #041318;
    background: linear-gradient(135deg, #19e6f0, #4bf5c4);
    box-shadow: 0 6px 22px rgba(25, 230, 240, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
}
@keyframes sponsor-sweep { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes sponsor-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(25, 230, 240, 0.7)); }
  50% { filter: drop-shadow(0 0 18px rgba(25, 230, 240, 1)); }
}
@media (prefers-reduced-motion: reduce) { .sponsor::after { display: none; } .sponsor-logo img { animation: none; } }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav-btn {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-weight: 600;
}
.nav-btn:hover { color: var(--ink); background: var(--glass); }
.nav-btn.active { color: var(--ink); background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--glass-hi); }
.lang-btn {
  border: 1px solid var(--glass-edge); background: var(--glass); color: var(--ink); cursor: pointer;
  font-weight: 800; font-size: 12px; padding: 6px 10px; border-radius: 999px; box-shadow: inset 0 1px 0 var(--glass-hi);
}
.lang-btn:hover { background: var(--glass-strong); }

/* ---------- account ---------- */
.acct-btn {
  display: flex; align-items: center; gap: 8px; max-width: 180px; padding: 3px 12px 3px 3px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--glass-edge); background: var(--glass); color: var(--ink); font-weight: 700; font-size: 13px;
  box-shadow: inset 0 1px 0 var(--glass-hi);
}
.acct-btn:hover, .acct-btn.active { background: var(--glass-strong); }
.acct-pic {
  display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; overflow: hidden;
  font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(140deg, var(--accent), var(--accent-2));
}
.acct-pic img { width: 100%; height: 100%; object-fit: cover; }
.acct-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .acct-btn { padding: 3px; } .acct-name { display: none; } }
img.avatar { object-fit: cover; padding: 0; border: 1px solid var(--glass-edge); }

.profile { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-pic { display: grid; gap: 10px; justify-items: center; }
.profile-pic .avatar { font-size: 44px !important; }
.profile-stats { gap: 22px; }
.profile-stats > div { display: grid; }
.profile-stats b { font-size: 22px; }

/* Rank badges, colored per tier like the game's ranks. */
.rank {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
  font-size: 11px; font-weight: 700; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, var(--r1), var(--r2));
}
.rank.big { font-size: 16px; padding: 6px 14px; }
.rank-stars { letter-spacing: 0.05em; color: #ffe27a; }
.rank-warrior { --r1: #8a6a52; --r2: #b08968; }
.rank-elite { --r1: #6b7d8f; --r2: #a7b6c4; }
.rank-master { --r1: #b8860b; --r2: #e6b94a; }
.rank-grandmaster { --r1: #6a4bc4; --r2: #9b7bff; }
.rank-epic { --r1: #0f8a7a; --r2: #2fc8b0; }
.rank-legend { --r1: #c2571a; --r2: #f2a33a; }
.rank-mythic { --r1: #9b1c4a; --r2: #e0457b; }
.rank-honor { --r1: #7a1fa2; --r2: #c45cf0; }
.rank-glory { --r1: #b3122e; --r2: #ffb02e; }
.rank-immortal { --r1: #5a0a1c; --r2: #ff3b3b; }
table.duel td { vertical-align: middle; }
.conn { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); padding: 0 6px; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 8px var(--warn); }
@media (max-width: 640px) { .conn-text { display: none; } .brand-name { display: none; } .nav-btn { padding: 7px 8px; font-size: 14px; } .topbar { gap: 6px; } .nav { gap: 0; } }
.conn.ok i { background: var(--good); box-shadow: 0 0 8px var(--good); }
.conn.down i { background: var(--bad); box-shadow: 0 0 8px var(--bad); }

/* ---------- layout ---------- */
.app { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; display: grid; gap: 16px; }
.card { padding: 20px; }
.card h2 { font-size: 20px; margin-bottom: 4px; }
.card h3 { font-size: 16px; margin-bottom: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack { display: grid; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.draft-grid { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 16px; align-items: start; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) and (orientation: portrait) {
  .draft-grid, .teams, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
/* let grid children shrink so wide tables scroll inside their card instead of stretching the page */
.app > *, .grid-2 > *, .grid-3 > *, .draft-grid > *, .teams > *, .stack > * { min-width: 0; }
.banner h2, .banner .muted { overflow-wrap: anywhere; }
.foot { text-align: center; font-size: 12px; color: var(--ink-3); padding: 0 16px 24px; }
.loading { text-align: center; color: var(--ink-2); }

/* ---------- hero intro ---------- */
.intro { text-align: center; padding: 28px 20px 8px; }
.intro h1 {
  font-size: clamp(30px, 5vw, 46px); font-weight: 800; line-height: 1.08;
  background: linear-gradient(120deg, var(--ink) 20%, var(--accent) 60%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro p { color: var(--ink-2); margin: 10px auto 0; max-width: 560px; }

/* ---------- controls ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; white-space: nowrap;
  background: var(--glass-strong); border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 4px 14px rgba(0, 0, 0, 0.14);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--glass-hi), 0 8px 22px rgba(0, 0, 0, 0.2); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary {
  color: #fff; border-color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 6px 22px rgba(100, 110, 255, 0.45);
}
.btn.danger { color: var(--bad); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.icon { padding: 6px 10px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.input {
  width: 100%; padding: 11px 16px; border-radius: 999px; outline: none;
  background: var(--glass); border: 1px solid var(--glass-edge);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.12);
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.input.code { text-transform: uppercase; letter-spacing: 0.25em; font-weight: 700; text-align: center; max-width: 160px; }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-edge); }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-weight: 600; }
.seg button.on { color: var(--ink); background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--glass-hi), 0 2px 8px rgba(0, 0, 0, 0.15); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--glass-strong); border: 1px solid var(--glass-edge);
}
.pill.main { color: var(--main); }
.pill.flex { color: var(--flex); }
.pill.off { color: var(--off); }
.pill.good { color: var(--good); }
.pill.bad { color: var(--bad); }
.pill.accent { color: #fff; background: linear-gradient(135deg, #2f5fd8, #7a45e0); border-color: transparent; }
.kbd { font-size: 11px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--glass-edge); background: var(--glass); color: var(--ink-2); font-weight: 700; }

/* ---------- home ---------- */
.mode h3 { display: flex; align-items: center; gap: 8px; }
.mode p { color: var(--ink-2); margin: 0 0 14px; font-size: 14px; }
.mode.feature { border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-edge)); }
details.how summary { cursor: pointer; font-weight: 700; }
details.how ul { margin: 10px 0 0; padding-left: 20px; color: var(--ink-2); }
details.how li { margin: 4px 0; }

/* ---------- code / share ---------- */
.code-big { font-size: 40px; font-weight: 800; letter-spacing: 0.22em; }
.player-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.player-list li {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid var(--glass-edge);
}
.avatar {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  font-weight: 800; font-size: 13px; color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
}
.avatar.cpu { background: linear-gradient(140deg, #6b7280, #9ca3af); }
.player-list.many { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); max-height: 460px; overflow: auto; padding-right: 4px; }
.slot.tbd { opacity: 0.45; }
.player-list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- draft ---------- */
.turnbar { display: grid; gap: 10px; padding: 14px 18px; }
.turn-pill { font-weight: 800; }
.turn-pill.mine { color: #fff; background: linear-gradient(135deg, #2f5fd8, #7a45e0); border-color: transparent; }
.timer { height: 6px; border-radius: 99px; background: var(--glass); overflow: hidden; }
.timer i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.25s linear; }
.timer.warn i { background: linear-gradient(90deg, var(--warn), var(--bad)); }

.dealt { padding: 20px; }
.dealt.dim { opacity: 0.85; }
.dealt .name { font-size: 28px; font-weight: 800; line-height: 1.1; }
.lane-scores { display: grid; gap: 6px; margin: 14px 0; }
.lane-score { display: grid; grid-template-columns: 86px 1fr auto 40px; gap: 8px; align-items: center; font-size: 13px; }
.lane-score .faint { text-align: right; }
.lane-score.sep, .lane.sep { margin-top: 10px; }
.pill.rank { color: var(--ink-2); }
.lane-score.taken { opacity: 0.4; }
.lane-score.best { font-weight: 700; }
.bar { height: 6px; border-radius: 99px; background: var(--glass); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar.main i { background: linear-gradient(90deg, #22c38e, var(--main)); }
.bar.flex i { background: linear-gradient(90deg, #f0a92b, var(--flex)); }
.bar.off i { background: var(--off); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 12px; }
.stat .top { display: flex; justify-content: space-between; color: var(--ink-2); margin-bottom: 4px; }

.team { padding: 16px; }
.team.mine { border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-edge)); }
.team-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.team-head .score { font-size: 24px; font-weight: 800; }
.lanes { display: grid; gap: 8px; }
.lane {
  display: grid; grid-template-columns: 86px 1fr auto; align-items: center; gap: 10px;
  min-height: 52px; padding: 8px 12px; border-radius: var(--radius-sm); text-align: left; width: 100%;
  background: var(--glass); border: 1px solid var(--glass-edge);
}
.lane .lane-name { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.lane .who { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane.empty .who { color: var(--ink-3); font-weight: 500; }
button.lane { cursor: pointer; transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease; }
button.lane:hover { transform: translateY(-1px); background: var(--glass-strong); border-color: var(--accent); }
button.lane.main { border-color: color-mix(in srgb, var(--main) 55%, var(--glass-edge)); }
button.lane.best { box-shadow: 0 0 0 2px color-mix(in srgb, var(--main) 60%, transparent), inset 0 1px 0 var(--glass-hi); }
.gain { font-weight: 800; }

/* PC: each team's slots as a grid of boxes instead of a list. */
@media (min-width: 901px), (orientation: landscape) {
  .team .lanes { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
  .team .lane {
    grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; justify-items: center; align-content: start;
    gap: 4px; min-height: 108px; padding: 8px 4px; text-align: center;
  }
  .team .lane .pill { font-size: 10px; padding: 1px 6px; white-space: nowrap; }
  .team .lane.sep { margin-top: 0; }
  .team .lane .lane-name { font-size: 10px; line-height: 1.15; letter-spacing: 0.02em; max-width: 100%; overflow-wrap: anywhere; }
  .team .lane .who { flex-direction: column; justify-content: center; gap: 4px; max-width: 100%; white-space: normal; font-size: 12px; line-height: 1.15; overflow-wrap: anywhere; }
  .team .lane .who .thumb { width: 40px; height: 40px; }
  .team .lane.empty .who { font-size: 12px; }
  .team .lane .row { justify-content: center; }
}

/* Phone draft board: both teams side by side (shown instead of .teams under 900px). */
.vs-board { display: none; padding: 12px; gap: 6px; }
.vs-heads { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; margin-bottom: 4px; }
.vs-head { display: grid; gap: 2px; font-size: 11px; min-width: 0; }
.vs-head:last-child { text-align: right; }
.vs-head .vs-name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-head.mine .vs-name { color: var(--accent); }
.vs-x { font-size: 12px; font-weight: 800; padding-top: 2px; }
.vs-row { display: grid; grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr); gap: 6px; align-items: stretch; }
.vs-row.sep { margin-top: 8px; }
.vs-slot {
  display: grid; place-items: center; text-align: center; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); line-height: 1.1;
}
.vs-cell {
  display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 5px 8px; min-width: 0;
  border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-edge); font-size: 13px; font-weight: 700;
}
.vs-cell.right { flex-direction: row-reverse; text-align: right; }
.vs-cell .thumb { width: 30px; height: 30px; }
.vs-cell .vs-hero { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-cell.empty { justify-content: center; color: var(--ink-3); font-weight: 500; }
.vs-cell.place {
  justify-content: center; cursor: pointer; color: var(--ink); font: inherit; font-size: 12px; font-weight: 700;
  border-color: var(--accent); border-style: dashed;
}
.vs-cell.place .pill { font-size: 10px; padding: 1px 6px; white-space: nowrap; }
.vs-cell.place > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-cell.place.main { border-color: var(--main); border-style: solid; }
.vs-cell.place:active { background: var(--glass-strong); }

@media (max-width: 900px) and (orientation: portrait) {
  .teams { display: none; }
  .vs-board { display: grid; }
}
/* Compact dealt card and turn bar on phones so the board fits on screen. */
@media (max-width: 640px) and (orientation: portrait) {
  .app { padding: 12px 10px 32px; gap: 10px; }
  .turnbar { padding: 10px 12px; gap: 8px; position: sticky; top: 70px; z-index: 5; }
  .turnbar .row { gap: 6px; }
  .dealt { padding: 12px; }
  .dealt .portrait { height: 130px; margin-top: 6px; }
  .dealt .name { font-size: 22px; }
  .dealt .hidden-note { margin: 8px 0 0; padding: 6px 8px; font-size: 12px; }
  .dealt .kbd, .dealt .keys-hint { display: none; }
}

.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; max-height: 240px; overflow: auto; }
.log li { color: var(--ink-2); }
.log b { color: var(--ink); }

/* ---------- result ---------- */
.banner { text-align: center; padding: 26px 20px; }
.banner h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.banner.win h2 { background: linear-gradient(120deg, var(--good), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.banner.lose h2 { color: var(--ink-2); }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain th, table.plain td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--glass-edge); }
table.plain th { font-size: 12px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
table.plain td.r, table.plain th.r { text-align: right; }
.bonus { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.bonus .plus { color: var(--good); font-weight: 700; }
.bonus .minus { color: var(--bad); font-weight: 700; }
.winner-tag { color: var(--good); }
.duel td.hero-won, .plain tr.hero-won td { background: color-mix(in srgb, var(--good) 18%, transparent); }
.duel td.hero-lost, .plain tr.hero-lost td { background: color-mix(in srgb, var(--bad) 16%, transparent); }
.plain tr.hero-lost td { color: var(--ink-2); }

/* ---------- bracket ---------- */
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 6px; }
.round { display: flex; flex-direction: column; gap: 8px; }
.round-matches { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.round-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 2px; }
.match { padding: 10px; border-radius: 18px; display: grid; gap: 6px; }
.match.mine { border-color: color-mix(in srgb, var(--accent) 60%, var(--glass-edge)); }
.slot { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; font-size: 14px; }
.slot .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.won { background: color-mix(in srgb, var(--good) 16%, transparent); font-weight: 700; }
.slot.lost { opacity: 0.5; }
.slot.bye { opacity: 0.4; font-style: italic; }
.match-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-3); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 10px var(--bad); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; }
.podium .place { padding: 16px 10px; border-radius: 18px; }
.podium .medal { font-size: 28px; }
.podium .who { font-weight: 800; margin-top: 4px; }
@media (max-width: 600px) { .podium { grid-template-columns: 1fr; } }
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent), var(--shadow); } }

/* ---------- heroes page ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--glass-edge); background: var(--glass); padding: 6px 12px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.tabs button.on { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.table-wrap { max-height: 70vh; overflow: auto; border-radius: var(--radius-sm); }
.table-wrap thead th { position: sticky; top: 0; background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); z-index: 1; }

.hidden-note {
  margin: 14px 0 4px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-2);
  background: var(--glass); border: 1px dashed var(--glass-edge); text-align: center;
}

/* ---------- hero photos ---------- */
.thumb {
  width: 32px; height: 32px; flex: none; border-radius: 50%; object-fit: cover; object-position: center 12%;
  border: 1px solid var(--glass-edge); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.lane .who { display: flex; align-items: center; gap: 8px; }
.hero-cell { display: inline-flex; align-items: center; gap: 10px; }
.portrait {
  position: relative; height: 260px; margin: 10px 0 4px; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 30px rgba(0, 0, 0, 0.3);
}
.portrait-img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
.portrait::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, transparent 22%, transparent 55%, rgba(5, 8, 25, 0.85) 100%);
}
.portrait .name { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.fan { display: flex; justify-content: center; margin: 0 auto 22px; height: 150px; }
.fan-card {
  width: 84px; height: 136px; margin: 0 -10px; padding: 4px; border-radius: 18px; overflow: hidden;
  transform: rotate(calc((var(--i, 0) - 3) * 6deg)) translateY(calc(var(--lift, 0) * 1px));
  transition: transform 0.25s ease;
}
.fan-card:nth-child(1) { --i: 0; --lift: 14; } .fan-card:nth-child(2) { --i: 1; --lift: 6; } .fan-card:nth-child(3) { --i: 2; --lift: 1; }
.fan-card:nth-child(4) { --i: 3; --lift: 0; z-index: 2; } .fan-card:nth-child(5) { --i: 4; --lift: 1; } .fan-card:nth-child(6) { --i: 5; --lift: 6; }
.fan-card:nth-child(7) { --i: 6; --lift: 14; }
.fan-card:hover { transform: rotate(0deg) translateY(-8px) scale(1.06); z-index: 3; }
.fan-img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; border-radius: 14px; display: block; }
@media (max-width: 600px) { .fan-card:nth-child(1), .fan-card:nth-child(7) { display: none; } .fan-card { width: 70px; height: 114px; } .fan { height: 130px; } }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; width: min(92vw, 420px); }
.toast { padding: 12px 16px; border-radius: 18px; display: flex; align-items: center; gap: 10px; font-weight: 600; animation: rise 0.25s ease; }
.toast.error { border-color: color-mix(in srgb, var(--bad) 60%, var(--glass-edge)); }
.toast.good { border-color: color-mix(in srgb, var(--good) 60%, var(--glass-edge)); }
.toast .grow { flex: 1; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }

/* Phone held sideways: the PC layout, squeezed to the short screen. */
@media (orientation: landscape) and (max-height: 520px) {
  .topbar { position: static; margin-top: 6px; }
  .app { padding: 10px 12px 24px; gap: 10px; }
  .draft-grid { grid-template-columns: minmax(200px, 260px) 1fr; gap: 10px; }
  .teams { gap: 10px; }
  .dealt { padding: 12px; }
  .dealt .portrait { height: 120px; }
  .dealt .name { font-size: 20px; }
  .dealt .kbd, .dealt .keys-hint { display: none; }
  .turnbar { padding: 8px 12px; gap: 6px; }
}

/* "Rotate your phone" popup (phones held upright). */
.rotate-tip {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: rgba(4, 6, 20, 0.6);
}
.rotate-tip .card { max-width: 340px; text-align: center; display: grid; gap: 12px; }
.rotate-tip .phone-icon { font-size: 44px; line-height: 1; animation: tilt 1.8s ease-in-out infinite; }
@keyframes tilt { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (prefers-reduced-motion: reduce) { .rotate-tip .phone-icon { animation: none; } }

/* ---------- server rank ---------- */
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid var(--glass-edge);
}
.board-row.me { border-color: var(--accent); background: var(--glass-strong); }
/* Pink row (account flag): candy-pink gradient, a soft pulsing glow, hearts and sparkles
   floating up (::before), a shimmer sweeping across (::after), a bow on the name. */
.board-row.pink, .board-row.me.pink {
  position: relative; overflow: hidden; isolation: isolate;
  border: 2px solid #ff9ed2; color: #fff0f8;
  background: linear-gradient(120deg, #ff6fb5, #ff9fd0 30%, #ffb8dc 50%, #f78bd0 72%, #d96bff);
  background-size: 200% 100%;
  animation: pink-glow 2.4s ease-in-out infinite, pink-shift 6s ease-in-out infinite;
}
.board-row.pink::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='60'%3E%3Cpath d='M20 44 c-6-5-10-8-10-12 a4 4 0 0 1 10-2 a4 4 0 0 1 10 2 c0 4-4 7-10 12z' fill='%23ffffff' fill-opacity='0.55'/%3E%3C/svg%3E") 0 0 / 90px 60px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='90'%3E%3Cpath d='M70 30 l3 7 7 3 -7 3 -3 7 -3 -7 -7 -3 7 -3z' fill='%23fff6b0' fill-opacity='0.8'/%3E%3C/svg%3E") 0 0 / 130px 90px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='120'%3E%3Cpath d='M120 80 c-4-3-7-6-7-9 a3 3 0 0 1 7-1 a3 3 0 0 1 7 1 c0 3-3 6-7 9z' fill='%23ff4fa3' fill-opacity='0.5'/%3E%3Ccircle cx='40' cy='30' r='2' fill='%23ffffff' fill-opacity='0.8'/%3E%3C/svg%3E") 0 0 / 170px 120px;
  animation: pink-float 12s linear infinite;
}
.board-row.pink::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.5) 50%, transparent 65%);
  background-size: 250% 100%; animation: gold-sweep 3.2s ease-in-out infinite;
}
.board-row.pink .grow > b { color: #fff; text-shadow: 0 0 6px #ff3d9a, 0 0 14px rgba(255, 80, 170, 0.8); }
.board-row.pink .grow > b::before { content: "\1F380  "; }
.board-row.pink .grow > b::after { content: " \1F496"; display: inline-block; animation: pink-beat 1.2s ease-in-out infinite; }
.board-row.pink .faint { color: rgba(255, 240, 250, 0.9); }
.board-row.pink .board-stars { color: #fff; text-shadow: 0 0 8px #ff4fa3; }
.board-row.pink .board-pos { text-shadow: 0 1px 3px rgba(150, 0, 80, 0.6); }
.board-row.pink .avatar { box-shadow: 0 0 0 2px #fff, 0 0 12px 3px rgba(255, 100, 180, 0.9); }
@keyframes pink-glow {
  0%, 100% { box-shadow: 0 0 12px 2px rgba(255, 110, 190, 0.55), 0 0 28px 6px rgba(255, 140, 210, 0.25); }
  50% { box-shadow: 0 0 22px 6px rgba(255, 120, 200, 0.85), 0 0 46px 12px rgba(255, 150, 220, 0.4); }
}
@keyframes pink-shift { 50% { background-position: 100% 0; } }
@keyframes pink-float { to { background-position: 0 -360px, 0 -360px, 0 -360px; } }
@keyframes pink-beat { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.3); } 40% { transform: scale(1); } 60% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) {
  .board-row.pink, .board-row.pink::before, .board-row.pink::after, .board-row.pink .grow > b::after { animation: none; }
}
/* Maria's row: an actual swamp. Murky water, mud along the bottom, cattails at both ends,
   lily pads and duckweed drifting on top (::after), bubbles rising from the mud (::before), a frog. */
.board-row.swamp, .board-row.me.swamp {
  position: relative; overflow: hidden; isolation: isolate;
  border: 1px solid #5d5a24; color: #d9dca0;
  box-shadow: inset 0 -6px 14px rgba(40, 28, 8, 0.7), inset 0 0 18px rgba(20, 30, 5, 0.6);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M10 60 Q13 34 8 6' stroke='%232e4010' stroke-width='2.2'/%3E%3Cpath d='M22 60 Q20 38 25 14' stroke='%23384d14' stroke-width='2'/%3E%3Cpath d='M34 60 Q38 44 46 30' stroke='%232a3a0e' stroke-width='1.6'/%3E%3Cpath d='M4 60 Q2 46 -2 36' stroke='%232a3a0e' stroke-width='1.4'/%3E%3C/g%3E%3Crect x='5' y='8' width='6' height='16' rx='3' fill='%23523517'/%3E%3Crect x='22' y='16' width='6' height='14' rx='3' fill='%235c3c19'/%3E%3C/svg%3E") left -6px bottom -4px / auto 112% no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M50 60 Q47 34 52 6' stroke='%232e4010' stroke-width='2.2'/%3E%3Cpath d='M38 60 Q40 38 35 16' stroke='%23384d14' stroke-width='2'/%3E%3Cpath d='M26 60 Q22 44 14 32' stroke='%232a3a0e' stroke-width='1.6'/%3E%3C/g%3E%3Crect x='49' y='8' width='6' height='16' rx='3' fill='%23523517'/%3E%3Crect x='32' y='18' width='6' height='13' rx='3' fill='%235c3c19'/%3E%3C/svg%3E") right -6px bottom -4px / auto 112% no-repeat,
    linear-gradient(to top, rgba(58, 40, 14, 0.95), rgba(70, 52, 18, 0.55) 18%, transparent 38%),
    radial-gradient(ellipse 22% 70% at 30% 40%, rgba(100, 84, 30, 0.55), transparent 70%),
    radial-gradient(ellipse 18% 60% at 62% 65%, rgba(40, 58, 14, 0.75), transparent 70%),
    radial-gradient(ellipse 14% 50% at 85% 25%, rgba(110, 120, 40, 0.4), transparent 70%),
    linear-gradient(100deg, #2f3a12, #4b5219 30%, #3c4715 55%, #4a4218 80%, #2b3410);
}
/* Bubbles: each layer is a tile with one bubble; tiles of 60/90/120px all scroll up by 360px
   per loop, so they rise at different speeds and the loop is seamless. */
.board-row.swamp::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 30% 70%, rgba(210, 225, 150, 0.55) 0 2px, rgba(210, 225, 150, 0.15) 3px, transparent 4px) 0 0 / 70px 60px,
    radial-gradient(circle at 60% 40%, rgba(200, 215, 140, 0.5) 0 1.5px, transparent 3px) 0 0 / 110px 90px,
    radial-gradient(circle at 20% 50%, rgba(220, 230, 160, 0.45) 0 3px, rgba(220, 230, 160, 0.12) 4px, transparent 5px) 0 0 / 170px 120px;
  animation: swamp-bubbles 14s linear infinite;
}
/* Lily pads and duckweed floating across the surface. */
.board-row.swamp::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.85;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='56'%3E%3Cg stroke='%23243a0c' stroke-width='1'%3E%3Cpath d='M70 14 L84 12 A14 6.5 0 1 1 83 17 Z' fill='%234f7a1e'/%3E%3Cpath d='M170 42 L181 40 A11 5 0 1 1 180 44 Z' fill='%23456d1a'/%3E%3Cpath d='M120 30 L128 29 A8 3.6 0 1 1 127 32 Z' fill='%23577f22'/%3E%3C/g%3E%3Ccircle cx='78' cy='13' r='2.2' fill='%23c9a0b8'/%3E%3Cg fill='%238aa52f'%3E%3Ccircle cx='20' cy='20' r='1.6'/%3E%3Ccircle cx='26' cy='23' r='1.2'/%3E%3Ccircle cx='23' cy='27' r='1.4'/%3E%3Ccircle cx='140' cy='12' r='1.3'/%3E%3Ccircle cx='145' cy='15' r='1.6'/%3E%3Ccircle cx='210' cy='26' r='1.5'/%3E%3Ccircle cx='214' cy='30' r='1.1'/%3E%3Ccircle cx='100' cy='46' r='1.4'/%3E%3Ccircle cx='105' cy='44' r='1.2'/%3E%3C/g%3E%3C/svg%3E") 0 50% / 240px 100% repeat-x,
    linear-gradient(90deg, transparent, rgba(150, 170, 60, 0.12) 40%, transparent 60%) 0 0 / 300px 100% repeat-x;
  animation: swamp-drift 40s linear infinite;
}
.board-row.swamp .grow > b { color: #b6cf5c; text-shadow: 0 1px 0 #1d2608, 0 0 6px rgba(120, 150, 30, 0.6); }
.board-row.swamp .grow > b::after { content: " \1F438"; display: inline-block; animation: swamp-frog 3.2s ease-in-out infinite; }
.board-row.swamp .board-stars, .board-row.swamp .board-pos { text-shadow: 0 1px 3px #000; }
.board-row.swamp .faint { color: rgba(200, 200, 140, 0.75); text-shadow: 0 1px 2px #1d2608; }
.board-row.swamp .avatar { box-shadow: 0 0 0 2px #4f6a1c; }
@keyframes swamp-bubbles { to { background-position: 0 -360px, 0 -360px, 0 -360px; } }
@keyframes swamp-drift { to { background-position: 240px 50%, 300px 0; } }
@keyframes swamp-frog { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-5px) rotate(-8deg); } 90% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .board-row.swamp::before, .board-row.swamp::after, .board-row.swamp .grow > b::after { animation: none; }
}
.board-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-pos { width: 38px; text-align: center; font-weight: 800; font-size: 15px; }
.board-stars { width: 56px; text-align: right; font-weight: 800; color: #ffe27a; }
.board-gap { text-align: center; }
@media (max-width: 640px) and (orientation: portrait) { .board-row .rank { display: none; } }

/* Golden row on the Rank page: animated gold border, a light sweep, glowing name. */
.board-row.golden {
  position: relative; overflow: hidden; isolation: isolate;
  border: 2px solid transparent;
  background:
    linear-gradient(135deg, rgba(60, 40, 0, 0.85), rgba(110, 72, 0, 0.75)) padding-box,
    linear-gradient(90deg, #8a5a00, #ffd75e, #fff4c2, #ffb300, #8a5a00) border-box;
  background-size: 100% 100%, 300% 100%;
  animation: gold-border 3s linear infinite, gold-glow 2.2s ease-in-out infinite;
}
.board-row.golden::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 236, 160, 0.45) 48%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 236, 160, 0.45) 52%, transparent 70%);
  background-size: 250% 100%; animation: gold-sweep 2.6s ease-in-out infinite;
}
.board-row.golden b {
  background: linear-gradient(90deg, #ffe58a, #fff8d6, #ffc83d, #fff8d6, #ffe58a); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gold-text 2.4s linear infinite; filter: drop-shadow(0 0 6px rgba(255, 200, 60, 0.75));
}
.board-row.golden .board-stars { color: #fff1b3; text-shadow: 0 0 8px rgba(255, 196, 0, 0.9); }
.board-row.golden .avatar { box-shadow: 0 0 0 2px #ffd75e, 0 0 14px 3px rgba(255, 200, 40, 0.8); }
.board-row.golden .faint { color: rgba(255, 240, 200, 0.85); }
@keyframes gold-border { to { background-position: 0 0, 300% 0; } }
@keyframes gold-glow {
  0%, 100% { box-shadow: 0 0 12px 2px rgba(255, 190, 40, 0.45), 0 0 30px 4px rgba(255, 160, 0, 0.2); }
  50% { box-shadow: 0 0 22px 6px rgba(255, 210, 80, 0.75), 0 0 48px 10px rgba(255, 170, 0, 0.35); }
}
@keyframes gold-sweep { 0% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
@keyframes gold-text { to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .board-row.golden, .board-row.golden::after, .board-row.golden b { animation: none; }
}
