/* ---------- Steppe: clans ladder, clan pages, leaderboard, profile,
   matches, notifications, home boards ---------- */

/* Rank badges (our own design) */
.rk { display: inline-block; font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 0.07em;
      padding: 2px 8px; border: 1px solid; line-height: 1.5; white-space: nowrap; }
.rk-silver  { color: #c9d1d9; border-color: #5d656d; background: rgba(160,170,180,0.08); }
.rk-gold    { color: #f0c75e; border-color: #8a6d1f; background: rgba(240,199,94,0.08); }
.rk-mg      { color: #6fb4ff; border-color: #2f5f96; background: rgba(111,180,255,0.08); }
.rk-eagle   { color: #c38cff; border-color: #6a3f99; background: rgba(195,140,255,0.08); }
.rk-supreme { color: #ff8a5c; border-color: #9a4a2a; background: rgba(255,138,92,0.08); }
.rk-global  { color: #ffd76a; border-color: #b8860b; background: linear-gradient(90deg, rgba(255,90,90,0.18), rgba(255,215,106,0.18)); }
.rk-none    { color: var(--text-dim); border-color: var(--line); }

/* Backdrops: banner image/video, or the animated default */
.cb-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cb-img { background-size: cover; background-position: center; }
.cb-default {
  overflow: hidden; background:
  radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--cc) 22%, transparent), transparent 60%),
  radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--cc) 14%, transparent), transparent 60%), #07080a;
}
.cb-default span { position: absolute; left: -50%; width: 200%; height: 1px; opacity: 0.35;
  background: linear-gradient(90deg, transparent, var(--cc), transparent); animation: cbSweep 9s linear infinite; }
.cb-default span:nth-child(1) { top: 28%; transform: rotate(-8deg); }
.cb-default span:nth-child(2) { top: 55%; transform: rotate(-8deg); animation-delay: -3s; opacity: 0.22; }
.cb-default span:nth-child(3) { top: 78%; transform: rotate(-8deg); animation-delay: -6s; opacity: 0.15; }
@keyframes cbSweep { from { translate: -25% 0; } to { translate: 25% 0; } }
.cb-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.92) 100%); }

/* ---------- Page header ---------- */
.ladder-wrap { max-width: 1240px; margin: 40px auto 60px; padding: 0 24px; }
.ladder-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.ladder-top h1 { font-family: 'Rajdhani', 'Inter', sans-serif; font-size: clamp(36px, 5vw, 48px); font-weight: 700; letter-spacing: 0.02em; line-height: 1; }
.ladder-top .meta { font-size: 13px; color: var(--text-dim); margin-top: 10px; }
.ladder-search { display: flex; gap: 8px; }
.ladder-search input { background: var(--surface); border: 1px solid var(--line); color: var(--text); padding: 10px 14px;
  font-family: 'Inter', sans-serif; font-size: 13px; width: min(340px, 70vw); }
.ladder-search button { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); padding: 0 16px; cursor: pointer;
  font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 13px;
  transition: border-color .15s ease, color .15s ease; }
.ladder-search button:hover { border-color: var(--red); color: var(--red-bright); }

/* ---------- Champion (#1) ---------- */
.champ { position: relative; min-height: 340px; border: 1px solid var(--line); overflow: hidden; margin-bottom: 34px; display: block; color: inherit; text-decoration: none;
  transition: border-color .2s ease, transform .2s ease; }
.champ:hover { border-color: color-mix(in srgb, var(--cc, var(--red)) 55%, var(--line)); transform: translateY(-2px); }
.champ::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(700px 260px at 82% 0%, color-mix(in srgb, var(--cc, #e8b23a) 12%, transparent), transparent 70%),
    url('../assets/contours.svg') bottom right / 900px auto no-repeat;
}
.champ .cb-shade { background: linear-gradient(90deg, rgba(6,7,9,0.94) 0%, rgba(6,7,9,0.6) 55%, rgba(6,7,9,0.78) 100%); }
.champ-body { position: relative; z-index: 2; display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 44px 40px; min-height: 340px; }
.champ-logo { width: 128px; height: 128px; object-fit: cover; border: 1px solid rgba(255,255,255,0.18); background: #0c0d10;
  box-shadow: 0 0 46px color-mix(in srgb, var(--cc, #e8b23a) 30%, transparent); }
.champ-kicker { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.champ-name { font-family: 'Rajdhani', 'Inter', sans-serif; font-size: clamp(38px, 6vw, 72px); font-weight: 700; line-height: 0.95; }
.champ-tag { margin-top: 12px; display: inline-block; padding: 4px 10px; border: 1px solid rgba(255,255,255,0.25); font-weight: 700; font-size: 14px; background: rgba(0,0,0,0.4); }
.champ-stats { display: grid; grid-template-columns: repeat(2, minmax(110px, auto)); gap: 18px 28px; text-align: right; }
.stat-n { font-family: 'Rajdhani', 'Inter', sans-serif; font-size: 34px; font-weight: 700; line-height: 1; }
.stat-l { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin-top: 4px; }
.champ-top { position: absolute; right: 40px; bottom: 18px; display: flex; align-items: center; gap: 10px; font-size: 10.5px; letter-spacing: 0.16em; color: var(--text-dim); text-transform: uppercase; }
.champ-top img { width: 30px; height: 30px; margin-left: -6px; border: 2px solid #0a0b0e; object-fit: cover; }
@media (max-width: 860px) {
  .champ-body { grid-template-columns: 1fr; text-align: left; padding: 28px 22px 60px; }
  .champ-stats { text-align: left; }
  .champ-logo { width: 88px; height: 88px; }
  .champ-top { left: 22px; right: auto; }
}

/* ---------- Section headers ---------- */
.section-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.section-h h2 { font-family: 'Rajdhani', 'Inter', sans-serif; font-size: 22px; letter-spacing: 0.03em; border-left: 3px solid var(--red); padding-left: 10px; }
.section-h span { font-size: 12px; color: var(--text-dim); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: 30px; }
.section-head p { color: var(--text-dim); font-size: 15px; max-width: 42ch; }

/* ---------- Ladder grid ---------- */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.lcard { position: relative; height: 250px; border: 1px solid var(--line); overflow: hidden; display: block; color: inherit; text-decoration: none;
  transition: border-color .2s, transform .2s; }
.lcard:hover { border-color: color-mix(in srgb, var(--cc, #fff) 60%, transparent); transform: translateY(-3px); }
.lcard .cb-media { transition: transform .6s ease; }
.lcard:hover .cb-media { transform: scale(1.04); }
.lc-rank { position: absolute; top: 12px; left: 12px; font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 14px;
  padding: 2px 8px; background: rgba(0,0,0,0.65); border: 1px solid rgba(255,255,255,0.18); }
.lc-rank.podium { color: #14100a; background: var(--red); border-color: var(--red); }
.lc-members { position: absolute; top: 12px; right: 12px; font-size: 12px; padding: 3px 8px; background: rgba(0,0,0,0.65); border: 1px solid rgba(255,255,255,0.18); }
.lc-body { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px; }
.lc-logo { width: 54px; height: 54px; object-fit: cover; border: 1px solid rgba(255,255,255,0.18); background: #0c0d10; flex-shrink: 0; }
.lc-tag { font-size: 12px; font-weight: 700; padding: 1px 6px; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.18); display: inline-block; }
.lc-name { font-family: 'Rajdhani', 'Inter', sans-serif; font-size: 22px; font-weight: 700; line-height: 1.1; margin-top: 4px; }
.lc-stats { font-size: 12.5px; color: #d0d0d0; margin-top: 2px; }
.lc-stats b { color: #fff; }
.lc-full { position: absolute; top: 44px; right: 12px; font-size: 10.5px; letter-spacing: 0.1em; padding: 2px 6px; background: #7a2a2a; }
.empty-note { color: var(--text-dim); font-size: 14px; padding: 26px 0; }

/* ---------- Clan page ---------- */
.cp-hero { position: relative; min-height: 560px; overflow: hidden; border-bottom: 1px solid var(--line); }
.cp-hero .cb-shade { background: radial-gradient(70% 60% at 50% 45%, rgba(0,0,0,0.35), rgba(0,0,0,0.9)), linear-gradient(180deg, transparent 60%, #0a0b0e 100%); }
.cp-inner { position: relative; max-width: 1100px; margin: 0 auto; padding: 34px 24px 56px; text-align: center; }
.cp-nav { display: flex; justify-content: space-between; align-items: flex-start; text-align: left; }
.cp-nav a { color: var(--text-dim); text-decoration: none; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.cp-nav a:hover { color: var(--text); }
.cp-rank { text-align: right; }
.cp-rank .n { font-family: 'Rajdhani', 'Inter', sans-serif; font-size: 40px; font-weight: 700; color: var(--cc); line-height: 1; text-shadow: 0 0 24px color-mix(in srgb, var(--cc) 45%, transparent); }
.cp-rank .l { font-size: 10px; letter-spacing: 0.2em; color: var(--text-dim); text-transform: uppercase; }
.cp-est { margin-top: 40px; font-size: 11px; letter-spacing: 0.24em; color: var(--text-dim); text-transform: uppercase; }
.cp-est b { color: var(--cc); }
.cp-logo { width: 132px; height: 132px; object-fit: cover; margin: 18px auto 0; display: block; border: 1px solid rgba(255,255,255,0.2); background: #0c0d10;
  box-shadow: 0 0 60px color-mix(in srgb, var(--cc) 25%, transparent); }
.cp-name { font-family: 'Rajdhani', 'Inter', sans-serif; font-size: clamp(44px, 9vw, 96px); font-weight: 700; line-height: 0.95; margin-top: 18px; text-transform: uppercase; }
.cp-sub { margin-top: 14px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.cp-sub .tagc { font-weight: 700; letter-spacing: 0.08em; }
.cp-sub i { color: var(--cc); font-style: normal; margin: 0 10px; }
.cp-cta { margin-top: 28px; display: inline-block; }
.cp-btn { background: var(--cc); color: #14100a; border: none; padding: 14px 30px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  font-size: 12px; cursor: pointer; text-decoration: none; display: inline-block; box-shadow: 0 0 34px color-mix(in srgb, var(--cc) 35%, transparent);
  font-family: 'Rajdhani', 'Inter', sans-serif; }
.cp-btn.ghost { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.3); box-shadow: none; }
.cp-btn[disabled] { opacity: 0.5; cursor: default; }
.cp-statbar { max-width: 1100px; margin: -1px auto 0; padding: 26px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; text-align: center;
  background: var(--bg-2); border: 1px solid var(--line); border-top: none; }
.cp-statbar .stat-n { font-size: 40px; }
.cp-statbar .hl { color: var(--cc); text-shadow: 0 0 24px color-mix(in srgb, var(--cc) 40%, transparent); }
.cp-body { max-width: 1100px; margin: 0 auto 60px; padding: 0 24px; }
.cp-top3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 12px; margin-bottom: 28px; }
.t3 { background: var(--surface); border: 1px solid var(--line); padding: 16px; display: flex; gap: 12px; align-items: center; }
.t3 img, .t3 .noav { width: 52px; height: 52px; object-fit: cover; flex-shrink: 0; }
.t3 .pos { font-family: 'Rajdhani', 'Inter', sans-serif; font-size: 28px; font-weight: 700; color: var(--cc); width: 28px; }
.t3 .nm { font-weight: 600; font-size: 14px; }
.t3 .sub { font-size: 12px; color: var(--text-dim); margin-top: 3px; }

/* ---------- Tables (roster + leaderboard) ---------- */
.st-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table.st { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.st tr > th {
  text-align: left; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); font-weight: 600;
  padding: 12px 14px; border-bottom: 1px solid var(--line-strong); background: var(--bg-2); white-space: nowrap;
}
table.st tr > td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.st tr:last-child > td { border-bottom: none; }
table.st td.num, table.st th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.st td.num b { font-size: 14.5px; }
table.st tr:hover td { background: rgba(232,178,58,0.03); }
.who { display: flex; align-items: center; gap: 10px; }
.who img, .who .noav { width: 32px; height: 32px; object-fit: cover; flex-shrink: 0; }
.noav { display: grid; place-items: center; background: var(--surface-2); color: var(--text-dim); font-size: 12px; }
img.av { width: 30px; height: 30px; object-fit: cover; flex-shrink: 0; }
.who a { color: var(--text); text-decoration: none; }
.who a:hover { text-decoration: underline; }
.pos-chip { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border: 1px solid var(--line); color: var(--text-dim); margin-left: 6px; }
.pos-chip.owner { color: #e8a33a; border-color: #7a5a20; }
.pos-chip.management { color: #6fb4ff; border-color: #2f4f80; }
/* Tier gems: badge colors climb with the rank level (staff + paid ranks) */
.pos-chip[data-lv="9"] { color: #ffd76a; border-color: #8a6d1f; background: rgba(232,178,58,.08); }
.pos-chip[data-lv="8"] { color: #6fb4ff; border-color: #2f4f80; background: rgba(111,180,255,.08); }
.pos-chip[data-lv="6"], .pos-chip[data-lv="7"] { color: #f0a8ff; border-color: #7a2f96; background: rgba(211,44,230,.08); }
.pos-chip[data-lv="4"], .pos-chip[data-lv="5"] { color: #8fb0ff; border-color: #2f5f96; background: rgba(75,105,255,.08); }
.pos-chip[data-lv="2"], .pos-chip[data-lv="3"] { color: #ff8f88; border-color: #963b34; background: rgba(224,87,79,.08); }
.lb-place { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 16px; color: var(--text-faint); width: 40px; }
.lb-place.p1 { color: #ffd76a; } .lb-place.p2 { color: #d8dde3; } .lb-place.p3 { color: #d39a6a; }

/* Respect "reduce motion": no sweeping lines, no video autoplay */
@media (prefers-reduced-motion: reduce) {
  .cb-default span { animation: none; }
  .lcard, .lcard .cb-media { transition: none; }
}

/* ---------- Shared bits ---------- */
.dim { color: var(--text-dim); }
.sid { font-family: monospace; font-size: 12px; color: var(--text-dim); }
a.plink { color: var(--text); text-decoration: none; }
a.plink:hover { text-decoration: underline; }
.empty-page p { color: var(--text-dim); margin-top: 10px; }
.empty-page a, .back-link { color: var(--text-dim); text-decoration: none; }
.back-link { display: inline-block; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 18px; }
.back-link:hover { color: var(--text); }
.tag5k { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; padding: 1px 6px; background: var(--red); color: #14100a; vertical-align: middle; }
.res { display: inline-block; min-width: 44px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; padding: 2px 6px; }
.res-win { background: rgba(63,191,106,0.18); color: #5fd38a; }
.res-loss { background: rgba(224,85,85,0.18); color: #ff6b6b; }
.res-draw { background: var(--surface-2); color: var(--text-dim); }
tr.clickrow { cursor: pointer; }
.btn-tab { padding: 9px 14px; border: 1px solid var(--line); color: var(--text-dim); text-decoration: none; font-size: 13px; }
.btn-tab.on { color: var(--text); border-color: var(--red); }
.pager2 { display: flex; gap: 14px; align-items: center; margin-top: 18px; font-size: 13px; color: var(--text-dim); }
.pager2 a { color: var(--text); text-decoration: none; border: 1px solid var(--line); padding: 6px 12px; }

/* ---------- Profile ---------- */
.pf-head { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 26px; border: 1px solid var(--line); position: relative;
  background: radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--cc) 14%, transparent), transparent 60%), var(--surface); }
.pf-head::before, .pf-head::after { content: ''; position: absolute; width: 18px; height: 18px; opacity: .55; pointer-events: none; }
.pf-head::before { top: -1px; left: -1px; border-top: 2px solid var(--cc); border-left: 2px solid var(--cc); }
.pf-head::after { right: -1px; bottom: -1px; border-bottom: 2px solid var(--cc); border-right: 2px solid var(--cc); }
.pf-avatar { width: 112px; height: 112px; object-fit: cover; border: 1px solid color-mix(in srgb, var(--cc, #fff) 42%, transparent);
  box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 0 0 5px color-mix(in srgb, var(--cc, #fff) 12%, transparent); }
.pf-avatar.noav { display: grid; place-items: center; font-size: 40px; }
.pf-id h1 { font-family: 'Rajdhani', 'Inter', sans-serif; font-size: clamp(30px, 5vw, 46px); line-height: 1.05; word-break: break-word; }
.pf-tags { display: flex; gap: 8px; align-items: center; min-height: 20px; }
.pf-links { margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.pf-links a { color: var(--text-dim); text-decoration: none; }
.pf-links a:hover { color: var(--text); }
.pf-rank { text-align: right; }
.pf-rank .rk { font-size: 14px; }
.pf-rank .stat-n { margin-top: 10px; }
.pf-next { margin-top: 10px; font-size: 12px; color: var(--text-dim); }
.pf-next .bar { width: 180px; height: 5px; background: var(--surface-2); margin: 0 0 6px auto; }
.pf-next .bar span { display: block; height: 100%; background: var(--cc); }
.pf-ban { margin-top: 12px; padding: 10px 14px; border: 1px solid #7a3434; background: rgba(160,40,40,0.15); color: #ff8a8a; font-size: 13.5px; }
.pf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 18px 0 28px; }
.pf-grid > div { background: var(--surface); padding: 16px; text-align: center; transition: background .14s ease; }
.pf-grid > div:hover { background: var(--surface-2); }
.pf-grid .stat-n { font-size: 28px; }
.pf-cols { display: grid; grid-template-columns: 1fr 280px; gap: 28px; }
.pf-cols > div, .hb-card, .cp-body, .ladder-wrap > * { min-width: 0; }
.pf-clan { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; }
.pf-clan:hover { border-color: var(--cc); }
@media (max-width: 860px) {
  .pf-head { grid-template-columns: auto 1fr; padding: 18px; }
  .pf-rank { grid-column: 1 / -1; text-align: left; }
  .pf-next .bar { margin-left: 0; }
  .pf-avatar { width: 76px; height: 76px; }
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-cols { grid-template-columns: 1fr; }
}

/* ---------- Matches ---------- */
.mlist { display: flex; flex-direction: column; gap: 8px; }
.mcard { display: grid; grid-template-columns: 140px 110px 1fr auto; gap: 16px; align-items: center; padding: 14px 18px;
  border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; }
.mcard:hover { border-color: var(--line-strong); background: var(--bg-2); }
.mc-map { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 18px; position: relative; padding: 8px 12px; border: 1px solid var(--line); overflow: hidden; }
.mc-map::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .4; background: var(--map-grad, linear-gradient(135deg, #262a31, #14161b)); }
.mc-mvp { color: #ffd061; font-weight: 600; }
.mc-score { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 24px; text-align: center; }
.mc-score .ct { color: #8fb8ff; } .mc-score .t { color: #f0c75e; }
.mc-score span:not(.win):not(.sep) { opacity: 0.55; }
.mc-score .sep { color: var(--text-dim); margin: 0 6px; }
.mc-players { font-size: 13px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-meta { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
@media (max-width: 760px) {
  .mcard { grid-template-columns: 1fr auto; }
  .mc-players { grid-column: 1 / -1; white-space: normal; }
  .mc-meta { grid-column: 1 / -1; }
}
.mh { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; border: 1px solid var(--line); background: var(--surface); overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.mh::before { content: ''; position: absolute; top: -1px; left: -1px; width: 18px; height: 18px; border-top: 2px solid var(--red); border-left: 2px solid var(--red); opacity: .55; z-index: 3; pointer-events: none; }
/* Map gradient layer — the same palettes the home match cards use */
.mh-thumb { position: absolute; inset: 0; z-index: 0; opacity: .45; background: var(--map-grad, linear-gradient(135deg, #262a31, #14161b)); }
.mh-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 55%, transparent), color-mix(in srgb, var(--surface) 92%, transparent)); }
.mh > *:not(.mh-thumb) { position: relative; z-index: 1; }
.mh-side { padding: 30px 26px 26px; text-align: center; }
.mh-side.ct { background: linear-gradient(90deg, rgba(90,140,255,0.16), transparent 70%); }
.mh-side.t { background: linear-gradient(270deg, rgba(240,199,94,0.18), transparent 70%); }
.mh-side.win { box-shadow: inset 0 -3px 0 var(--red); }
.mh-team { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.mh-score { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: clamp(58px, 9vw, 76px); line-height: 1; margin-top: 8px; opacity: 0.5; text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.mh-side.win .mh-score { opacity: 1; }
.mh-side.ct .mh-score { color: #8fb8ff; } .mh-side.t .mh-score { color: #f0c75e; }
.mh-win { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #ffd061; border: 1px solid rgba(232,178,58,.45); background: rgba(232,178,58,.08); display: inline-block; padding: 2px 14px; margin-top: 10px; }
.mh-mid { padding: 22px 26px; text-align: center; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: rgba(0,0,0,.15); }
.mh-map { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 30px; }
.mh-meta { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; line-height: 1.7; }
.mh-mvp { margin-top: 14px; font-size: 14px; }
.tr-mvp td { background: rgba(232,178,58,.05); }
.tr-mvp td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.side-ct { border-left-color: #8fb8ff !important; } .side-t { border-left-color: #f0c75e !important; }
@media (max-width: 640px) {
  .mh { grid-template-columns: 1fr 1fr; }
  .mh-mid { grid-column: 1 / -1; grid-row: 1; border: none; border-bottom: 1px solid var(--line); }
  .mh-score { font-size: 44px; }
  .mh-side { padding: 20px 14px 18px; }
}

/* ---------- Notifications ---------- */
.nlist { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--surface); }
.nitem { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px;
  border-bottom: 1px solid var(--line); color: var(--text-dim); text-decoration: none; background: var(--surface); }
.nitem:last-child { border-bottom: none; }
.nitem.unread { color: var(--text); background: color-mix(in srgb, var(--surface) 88%, var(--red) 3%); box-shadow: inset 3px 0 0 var(--red); }
.nitem:hover { color: var(--text); }
.nicon { width: 28px; height: 28px; display: grid; place-items: center; background: var(--surface-2); font-size: 13px; }
.nt-rankup .nicon, .nt-clan_accepted .nicon, .nt-clan_approved .nicon { color: #5fd38a; }
.nt-rankdown .nicon, .nt-clan_kicked .nicon, .nt-clan_declined .nicon, .nt-clan_rejected .nicon, .nt-listing_removed .nicon { color: #ff6b6b; }
.nt-clan_invite .nicon, .nt-clan_request .nicon { color: #6fb4ff; }
.ntext { font-size: 14px; line-height: 1.4; }
.ntime { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

/* ---------- Home boards ---------- */
.home-boards { position: relative; z-index: 1; padding: 26px 28px 60px; }
.home-boards .wrap { max-width: 1160px; margin: 0 auto; }
.hb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.hb-card { background: var(--surface); border: 1px solid var(--line); padding: 18px 20px; min-width: 0; }
.hb-card .section-h a { color: var(--text-dim); text-decoration: none; font-size: 12.5px; }
.hb-card .section-h a:hover { color: var(--red-bright); }
.hb-clan .lcard { margin-top: 4px; }
.hb-list { list-style: none; padding: 0; margin: 0; }
.hb-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.hb-list li:last-child { border-bottom: none; }
.hb-list img, .hb-list .noav { width: 32px; height: 32px; object-fit: cover; flex-shrink: 0; }
.hb-list .lb-place { width: 22px; flex-shrink: 0; }
.hb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.hb-num { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 15px; white-space: nowrap; }
.hb-matches a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.hb-matches a:last-child { border-bottom: none; }
.hb-matches a:hover .hbm-map { text-decoration: underline; }
.hbm-map { font-weight: 600; font-size: 14px; }
.hbm-meta { grid-column: 1 / -1; font-size: 12px; }
@media (max-width: 860px) {
  .home-boards { padding: 30px 16px 50px; }
  .hb-grid { grid-template-columns: 1fr; }
}

/* ---------- Phones: general ---------- */
@media (max-width: 640px) {
  .ladder-wrap { padding: 0 14px; margin-top: 22px; }
  .ladder-top h1 { font-size: 34px; }
  .ladder-search { width: 100%; }
  .ladder-search input { flex: 1; width: auto; min-width: 0; }
  .champ { min-height: 0; }
  .champ-body { min-height: 0; }
  .champ-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-n { font-size: 26px; }
  .cp-hero { min-height: 0; }
  .cp-statbar .stat-n { font-size: 28px; }
}

/* ---------- Small phones (<=460px) ---------- */
@media (max-width: 460px) {
  .ladder-wrap { padding: 0 10px; margin-top: 18px; }
  .ladder-top { align-items: stretch; flex-direction: column; }
  .ladder-top h1 { font-size: 27px; }
  .lcard { height: 200px; }
  .champ-body { padding: 22px 16px 50px; }
  .champ-logo { width: 64px; height: 64px; }
  .champ-stats { grid-template-columns: 1fr; gap: 10px; }
  .stat-n { font-size: 22px; }
  .cp-statbar { grid-template-columns: repeat(2, 1fr); padding: 18px 12px; }
  .cp-statbar .stat-n { font-size: 26px; }
  .section-h h2 { font-size: 18px; }
  .pf-head { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; padding: 22px 16px; }
  .pf-tags { justify-content: center; flex-wrap: wrap; }
  .pf-links { justify-content: center; }
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-inv { grid-template-columns: 1fr; }
  .mcard { padding: 12px; gap: 10px; }
  .mc-map { font-size: 15px; padding: 6px 9px; }
  .mc-score { font-size: 22px; }
  .mh-side { padding: 18px 10px 16px; }
  .mh-score { font-size: 40px; }
  .mh-meta { font-size: 11.5px; }
  .nitem { grid-template-columns: 24px 1fr auto; padding: 12px; }
}

/* ---------- Logo fallback: when the file isn't on this host (local dev,
   static deploys), show tag initials on a clan-color chip instead of a broken img ---------- */
.nofile { display: inline-grid; place-items: center; color: #fff; font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; letter-spacing: .05em; text-align: center;
  border: 1px solid color-mix(in srgb, var(--cc, #e8b23a) 60%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--cc, #e8b23a) 42%, #10131a), color-mix(in srgb, var(--cc, #e8b23a) 16%, #10131a)); }
.champ-logo.nofile { font-size: 26px; }
.cp-logo.nofile { font-size: 18px; }
.lc-logo.nofile { font-size: 12px; }
.clan-logo.nofile { font-size: 13px; }
