/* Final layer: real-texture images and the card / tile look */
:root { --bg: #0b0d10; --card-top: #1e232b; --card-bot: #15181d; --edge: #2a3039; --edge-hi: #3b4350; }

/* item / emblem images (vanilla textures) */
img.itm, img.emb { image-rendering: pixelated; flex: none; }
img.itm { width: 18px; height: 18px; }
.nav-item img.itm { width: 20px; height: 20px; }
.page-head .eyebrow img.itm { width: 16px; height: 16px; }
.rk img.emb { width: 18px; height: 18px; }
.ladder-ranks img.emb { width: 14px; height: 14px; }
.logo-emblem img.emb, .chip-emblem img.emb, .kpi-emblem img.emb, .wi-em img.emb { width: 100%; height: 100%; display: block; }
.hero-card .badge img.emb { width: 96px; height: 96px; filter: drop-shadow(0 0 16px color-mix(in srgb, var(--rk) 45%, transparent)) drop-shadow(0 8px 10px rgba(0,0,0,.55)); }

/* block textures: the portal file is an animation strip, show only its first frame */
.race-seg { filter: brightness(.94); }
.tx-blind { background-repeat: repeat-x; background-size: 32px auto !important; }
.tx-sw.tx-blind { background-size: 28px auto !important; }
th .tx-sw.tx-blind { background-size: 22px auto !important; }
.death-tag .tx-sw.tx-blind { background-size: 24px auto !important; }
.plan-tex.tx-blind { background-size: 44px auto !important; }

/* cards */
.card {
  background: linear-gradient(180deg, var(--card-top), var(--card-bot));
  border: 1px solid var(--edge); border-radius: 12px; padding: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 12px 30px -20px rgba(0,0,0,.9);
}
h2.card-title { font-size: 13px; color: #dedbd3; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.05); }
h2.card-title::before { width: 6px; height: 6px; box-shadow: none; border-radius: 1px; }
.card-sub { margin-top: -4px; }

/* stat tiles */
.kpi {
  position: relative; overflow: hidden; border: 1px solid var(--edge); border-radius: 12px; padding: 14px 16px;
  background: linear-gradient(155deg, #20252e 0%, #181b21 65%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 26px -18px rgba(0,0,0,.95);
  transition: border-color .15s ease, transform .15s ease;
}
.kpi::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 160px; height: 160px; pointer-events: none;
  background: radial-gradient(circle, rgba(43,212,106,.06), transparent 65%); }
.kpi:hover { border-color: var(--edge-hi); transform: translateY(-1px); }
.kpi > * { position: relative; z-index: 1; }
.kpi .k { display: flex; align-items: center; gap: 9px; color: #a19e96; font-weight: 600; letter-spacing: .7px; }
.kpi .k img.itm { width: 20px; height: 20px; padding: 4px; box-sizing: content-box; border-radius: 6px;
  background: #0e1114; border: 1px solid var(--edge); box-shadow: inset 0 2px 3px rgba(0,0,0,.5); }
.kpi .v { font-size: 27px; letter-spacing: -.5px; }
.kpi .row { min-height: 50px; }

/* smaller inner boxes follow the same language */
.focus-item, .why-item, .multiples .m, .tile { border-width: 1px; border-radius: 9px; background: rgba(10,12,15,.45); border-color: var(--edge); }
.hero-card { border-radius: 14px; }
.seg-ctl { border-width: 1px; border-radius: 8px; }
.seg-ctl button { border-radius: 6px; }
select { border-width: 1px; border-radius: 8px; }
.btn { border-width: 1px; border-radius: 7px; }
.sidebar { border-right-width: 1px; }
.topbar { border-bottom-width: 1px; }
.nav-item { border-radius: 8px; }
.empty { border-width: 1px; border-radius: 10px; }

/* hero: larger record / form / elo panel */
@media (min-width: 1151px) { .hero-card { grid-template-columns: auto minmax(0, 1fr) minmax(0, 440px); } }
.hero-side { gap: 16px; }
.hero-side .lbl { font-size: 12px; margin-bottom: 6px; align-items: center; }
.hero-side .lbl b { font-size: 13.5px; }
.hero-side .wl-bar { height: 16px; }
.hero-side .form { gap: 4px; }
.hero-side .form i { width: 20px; height: 20px; font-size: 10px; }
.spark-range { display: flex; justify-content: space-between; color: var(--muted); font: 11px var(--mono); margin-top: 2px; }

/* keep emblem + text on one line height */
.rk { vertical-align: middle; align-items: center; }
.xp-lbl span { display: inline-flex; align-items: center; gap: 5px; }
.track-row .val { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.track-row .val .rk, .track-row .val .muted { line-height: 1; }
@media (max-width: 860px) { .track-row .val { justify-content: flex-start; } }

/* hero: record + form under the rank info, elo graph alone on the right */
.hero-rec { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 28px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.05); max-width: 640px; }
.hero-rec .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.hero-rec .lbl b { color: var(--text-2); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 13.5px; }
.hero-rec .wl-bar { height: 16px; }
.hero-rec .form { gap: 4px; flex-wrap: nowrap; }
.hero-rec .form i { width: 20px; height: 20px; font-size: 10px; }
.rk { gap: 3px; }
@media (max-width: 1350px) { .hero-rec { grid-template-columns: 1fr; } .hero-rec .form { flex-wrap: wrap; } }
.hero-rec { grid-column: 2 / -1; max-width: none; margin-top: 0; }
.hero-rec .form { flex-wrap: wrap; }
@media (max-width: 1150px) { .hero-rec { grid-column: 1 / -1; } }
/* record sits under the rank info, last 20 under the graph */
@media (min-width: 1151px) {
  .hero-rec { grid-template-columns: subgrid; column-gap: 24px; }
  .hero-rec > div:first-child { max-width: 360px; }
}
.hero-rec .form { gap: 3px; }
.hero-rec .form i { width: 18px; height: 18px; font-size: 9px; }
/* record under the rank stats, last 20 under the graph (no divider) */
.hero-card .hero-rec { display: block; grid-column: auto; border-top: 0; padding-top: 0; margin-top: 16px; max-width: 440px; }
.hero-card .hero-rec .lbl, .hero-card .hero-last .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.hero-card .hero-rec .lbl b { color: var(--text-2); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 13.5px; }
.hero-card .hero-rec .wl-bar { height: 14px; }
.hero-card .hero-last .form { gap: 3px; flex-wrap: wrap; }
.hero-card .hero-last .form i { width: 18px; height: 18px; font-size: 9px; }
/* division bars under the hero emblem: one tall bar per division level */
.hero-card .pips { gap: 6px; }
.hero-card .pips i { width: 8px; height: 22px; border-radius: 2px; background: var(--rk); box-shadow: inset 0 -3px 0 rgba(0,0,0,.3), 0 0 10px color-mix(in srgb, var(--rk) 35%, transparent); }

/* player search */
.search { display: flex; gap: 6px; align-items: center; }
.search input { width: 190px; background: var(--surface); color: var(--text); border: 1px solid var(--edge); border-radius: 8px; padding: 6px 10px; font: 500 13px var(--sans); }
.search input:focus { outline: 2px solid var(--emerald); outline-offset: 0; border-color: transparent; }
.player-chip { margin-right: 0; }
.search { margin-right: auto; }
.back-home { margin-left: 10px; font-size: 12px; }
.page-head .eyebrow .viewing { color: var(--text); background: var(--surface-3); border-radius: 4px; padding: 1px 6px; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
#loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(6,8,10,.62); backdrop-filter: blur(3px); }
#loader[hidden], #toast[hidden] { display: none; }
.ld-box { width: min(380px, calc(100vw - 32px)); background: linear-gradient(180deg, var(--card-top), var(--card-bot)); border: 1px solid var(--edge); border-radius: 12px; padding: 18px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.ld-title { font-family: var(--pixel); font-size: 14px; margin-bottom: 12px; }
.ld-bar { height: 12px; background: #0b0c0e; border: 2px solid #000; }
.ld-bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, #7fe03a 0 10px, #6ac62c 10px 12px); transition: width .2s; }
.ld-sub { color: var(--muted); font-size: 12px; margin-top: 8px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 110; background: #1d2128; border: 1px solid var(--edge-hi); color: var(--text); padding: 10px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 13px; }
@media (max-width: 860px) { .search input { width: 140px; } }

/* hero: player head + name, rank # beside elo; header no longer shows the player */
.hero-card .badge img.hero-head { width: 96px; height: 96px; image-rendering: pixelated; border-radius: 8px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rk) 55%, transparent), 0 0 22px color-mix(in srgb, var(--rk) 30%, transparent), 0 10px 18px rgba(0,0,0,.5); }
.hero-name { font: 600 15px var(--sans); color: var(--text-2); margin-bottom: 4px; }
.hero-card .elo { display: flex; align-items: baseline; }
.elo-rank { margin-left: 14px; font: 600 17px var(--mono); color: var(--text-2); background: var(--surface-3); border-radius: 6px; padding: 2px 8px; align-self: center; }
.player-chip:empty { display: none; }

/* hero: head sits beside name / division / elo; everything else starts at the left edge */
.hero-card, .hero-card { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1151px) { .hero-card { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); } }
@media (max-width: 1150px) { .hero-side { grid-column: auto; } }
.hero-main { min-width: 0; }
.hero-id { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.hero-head-wrap { flex: none; display: block; width: 84px; height: 84px; }
.hero-head-wrap img.hero-head, .hero-head-wrap img.emb, .hero-head-wrap svg { width: 84px; height: 84px; image-rendering: pixelated; border-radius: 8px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rk) 55%, transparent), 0 0 22px color-mix(in srgb, var(--rk) 28%, transparent), 0 10px 18px rgba(0,0,0,.5); }
.hero-card .div-name { display: flex; align-items: center; gap: 12px; }
.hero-card .div-name .pips { display: inline-flex; gap: 4px; }
.hero-card .div-name .pips i { width: 6px; height: 20px; }
.hero-card .elo-rank { margin-left: 22px; background: none; padding: 0; border-radius: 0; align-self: baseline; font: 700 32px var(--mono); color: var(--text-2); }
.hero-card .elo-rank i { font-style: normal; color: var(--muted); margin-right: 1px; }
.hero-card .elo-rank small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.hero-card .elo { font-size: 40px; }
.hero-card::after { background: radial-gradient(380px 200px at 60px 70px, color-mix(in srgb, var(--rk) 18%, transparent), transparent 70%); }
.hero-head-wrap { height: auto; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.hero-head-wrap .pips { display: flex; gap: 4px; }
.hero-head-wrap .pips i { width: 6px; height: 14px; border-radius: 2px; background: var(--rk); box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); }
/* name + rank on one line; stats row spread across the progress bar width */
.hero-card .hero-name { display: flex; align-items: baseline; gap: 12px; font: 700 22px var(--sans); color: var(--text); margin-bottom: 2px; }
.hero-card .name-rank { font: 700 20px var(--mono); color: var(--text-2); }
.hero-card .name-rank i { font-style: normal; color: var(--muted); margin-right: 1px; }
.hero-card .hero-stats { max-width: 440px; justify-content: space-between; gap: 8px; }
/* stats row: normal spacing with dot separators; rank # same grey as the number */
.hero-card .hero-stats { max-width: none; justify-content: flex-start; gap: 6px 12px; align-items: flex-start; }
.hero-card .hero-stats .hs-dot { font: 700 16px var(--mono); color: var(--muted); line-height: 1.5; }
.hero-card .name-rank i { color: inherit; }
.hero-card .hero-rec > .lbl { max-width: none; }

/* ================= home page, quick view locks ================= */
body.no-player .filters, body.no-player .search { display: none; }
body.no-player .topbar { min-height: 0; padding-top: 10px; padding-bottom: 10px; }
.nav-item.dim { opacity: .45; }
.nav-item.locked span::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 8px; border: 2px solid var(--muted); border-radius: 2px; vertical-align: -1px; opacity: .8; }
.btn-primary { background: linear-gradient(180deg, #34c96b, #23a454); border-color: #1d8a46; color: #06210f; font-weight: 700; }
.btn-primary:hover { filter: brightness(1.08); border-color: #2bd46a; }

.home { max-width: 860px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 22px; }
.home-hero { text-align: center; padding: 36px 20px 10px; }
.home-logo { width: 64px; height: 64px; margin: 0 auto 14px; filter: drop-shadow(0 0 18px rgba(92,225,230,.35)); }
.home-logo img, .home-logo svg { width: 100%; height: 100%; image-rendering: pixelated; }
.home-hero h1 { font-family: var(--pixel); font-weight: 400; font-size: 34px; margin: 0 0 6px; letter-spacing: 1px; }
.home-hero p { color: var(--text-2); margin: 0 0 22px; }
.home-search { display: flex; gap: 8px; max-width: 520px; margin: 0 auto; }
.home-search input { flex: 1; min-width: 0; background: var(--surface); color: var(--text); border: 1px solid var(--edge-hi); border-radius: 10px; padding: 12px 14px; font: 500 15px var(--sans); }
.home-search input:focus { outline: 2px solid var(--emerald); outline-offset: 0; border-color: transparent; }
.home-search .btn { padding: 0 20px; font-size: 14px; border-radius: 10px; }
.home-recent { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.chip-btn { background: var(--surface-3); border: 1px solid var(--edge); color: var(--text-2); border-radius: 999px; padding: 3px 12px; font: 500 12.5px var(--sans); cursor: pointer; }
.chip-btn:hover { color: var(--text); border-color: var(--edge-hi); }
.home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.home-me { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 16px; align-items: center; text-align: left; cursor: pointer; color: var(--text); font: inherit; transition: border-color .15s, transform .15s; }
.home-me:hover { border-color: color-mix(in srgb, var(--rk) 60%, var(--edge)); transform: translateY(-1px); }
.home-head { grid-row: 1 / span 2; width: 64px; height: 64px; image-rendering: pixelated; border-radius: 6px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--rk) 55%, transparent); }
.hm-k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.hm-name { font: 700 19px var(--sans); }
.hm-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.hm-go { grid-column: 2; color: var(--emerald); font-size: 12.5px; font-weight: 600; }
.home-note { text-align: center; color: var(--muted); font-size: 12.5px; }

.lock-card { display: flex; align-items: center; gap: 16px; }
.lock-card .lock-ic img, .lock-card .lock-ic { width: 28px; height: 28px; flex: none; image-rendering: pixelated; opacity: .85; }
.lock-card .lock-txt { flex: 1; min-width: 0; }
.lock-card h2.card-title { border-bottom: 0; padding-bottom: 0; margin-bottom: 6px; }
.lock-card .card-sub { margin: 0; }
.lock-card .analyze-btn { padding: 9px 18px; font-size: 13.5px; border-radius: 9px; flex: none; }
.lock-card.big { padding: 34px 28px; }
@media (max-width: 860px) { .lock-card { flex-direction: column; align-items: flex-start; } }

/* ================= Minecraft home scene ================= */
body.home-page .sidebar, body.home-page .topbar { display: none; }
body.home-page .app { grid-template-columns: 1fr; }
body.home-page .main { padding: 0; }
body.home-page::before { display: none; }
body.home-page { background: #0a0e1c; }

.mc-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, #070a18 0%, #101a3a 45%, #23305c 70%, #2b355e 100%); }
.mc-scene .sky::before { content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 2px; box-shadow: var(--stars); }
.mc-scene .moon { position: absolute; right: 11vw; top: 9vh; width: 56px; height: 56px; background: #e8ecf2;
  box-shadow: inset -8px -8px 0 #c7ccd6, inset 8px 8px 0 #f7f9fc, 0 0 40px rgba(220,230,255,.35); image-rendering: pixelated; }
.mc-scene .moon::after { content: ""; position: absolute; left: 14px; top: 20px; width: 12px; height: 12px; background: #c7ccd6; box-shadow: 18px -8px 0 -2px #d5d9e1, 10px 16px 0 -3px #d0d4dd; }
.mc-scene .cloud { position: absolute; height: 22px; background: rgba(235,240,255,.13); box-shadow: 40px 18px 0 rgba(235,240,255,.10), -30px 14px 0 rgba(235,240,255,.08); }
.mc-scene .ground { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; }
.mc-scene .blk-row { display: flex; }
.mc-scene .blk { flex: none; width: 56px; height: 56px; background-size: 56px 56px; image-rendering: pixelated; background-color: #6b4a32; }
.mc-scene .blk[data-b="grass_block_side"] { background-color: #5b8f31; }
.mc-scene .blk[data-b="stone"], .mc-scene .blk[data-b$="_ore"], .mc-scene .blk[data-b="gravel"] { background-color: #6f6f6f; }
.mc-scene .blk[data-b="bedrock"] { background-color: #3a3a3a; }
.mc-scene .ground::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7,10,24,.15) 0%, rgba(7,10,24,.45) 40%, rgba(7,10,24,.85) 100%); }

.mc-home { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 11vh 20px 360px; text-align: center; }
.mc-title { position: relative; display: inline-block; margin-bottom: 8px; }
.mc-title h1 { margin: 0; font: 400 clamp(40px, 7vw, 76px)/1 var(--pixel); color: #f2f2f2; letter-spacing: 3px;
  text-shadow: 4px 4px 0 #3b3b3b, 0 0 30px rgba(120,160,255,.25); }
.splash { position: absolute; right: -28px; bottom: -14px; transform: rotate(-18deg); color: #ffff55; font: 400 17px var(--pixel);
  text-shadow: 2px 2px 0 #3f3f15; white-space: nowrap; animation: splash .9s ease-in-out infinite alternate; }
@keyframes splash { from { transform: rotate(-18deg) scale(1); } to { transform: rotate(-18deg) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .splash { animation: none; } }
.mc-tag { color: #c9cfe0; margin: 26px 0 26px; font-size: 15px; text-shadow: 0 2px 6px rgba(0,0,0,.6); }

.mc-search { display: flex; gap: 10px; width: min(560px, 100%); }
.mc-search input { flex: 1; min-width: 0; background: #000; color: #f0f0f0; border: 2px solid #a0a0a0; padding: 12px 14px; font: 500 15px var(--sans); border-radius: 0; box-shadow: 0 6px 20px rgba(0,0,0,.45); }
.mc-search input:focus { outline: none; border-color: #fff; }
.mc-search input::placeholder { color: #8a8a8a; }
.mc-btn { font: 400 14px var(--pixel); color: #fff; text-shadow: 2px 2px 0 #383838; background: #6e6e6e; border: 2px solid #000; border-radius: 0; padding: 0 22px; cursor: pointer;
  box-shadow: inset 2px 2px 0 #a9a9a9, inset -2px -3px 0 #4b4b4b; min-height: 44px; }
.mc-btn:hover, .mc-btn:focus-visible { background: #7b84bd; box-shadow: inset 2px 2px 0 #bec6ff, inset -2px -3px 0 #545b8f; outline: none; }
.mc-btn.sm { min-height: 30px; font-size: 11px; padding: 0 12px; }
.mc-recent { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; max-width: 620px; }

.mc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 380px)); justify-content: center; gap: 16px; width: 100%; margin-top: 36px; }
.mc-card { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 8px 16px; align-items: center; text-align: left; cursor: pointer; font: inherit; color: #fff;
  background: rgba(16, 2, 18, .92); border: 2px solid #1a0326; padding: 14px 16px; border-radius: 2px;
  box-shadow: inset 0 0 0 2px #3f0f8f, inset 0 0 0 3px #22094a, 0 14px 30px rgba(0,0,0,.5); transition: transform .12s; }
.mc-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px #6a2be0, inset 0 0 0 3px #2f0c6b, 0 18px 34px rgba(0,0,0,.55); }
.mc-head { grid-row: 1 / span 2; width: 64px; height: 64px; image-rendering: pixelated; box-shadow: 0 0 0 2px #000, 0 0 0 4px color-mix(in srgb, var(--rk) 70%, transparent); }
.mc-card-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-k { color: #a8a8a8; font: 400 10px var(--pixel); letter-spacing: 1px; }
.mc-name { font: 400 18px var(--pixel); color: #fff; text-shadow: 2px 2px 0 #3a3a3a; }
.mc-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: #c8c8c8; font-size: 12.5px; }
.mc-go { grid-column: 2; color: #55ff55; font: 400 11px var(--pixel); text-shadow: 1px 1px 0 #153f15; }
.mc-foot { margin-top: 30px; color: #8d96b3; font: 400 11px var(--pixel); letter-spacing: .5px; text-shadow: 1px 1px 0 #000; }
@media (max-width: 860px) {
  .mc-home { padding-top: 9vh; padding-bottom: 300px; }
  .splash { right: -6px; bottom: -22px; font-size: 13px; }
  .mc-search { flex-direction: column; }
  .mc-cards { grid-template-columns: 1fr; }
}
.splash { right: -118px; bottom: -18px; }
@media (max-width: 860px) { .splash { right: -4px; bottom: -30px; } }
.splash { bottom: -2px; }
.mc-tag { margin-top: 34px; }

/* home scales with the screen (--hs set from the window size) */
:root { --hs: 1; }
.mc-home { zoom: var(--hs); min-height: calc(100vh / var(--hs)); }
.mc-scene .blk { width: calc(56px * var(--hs)); height: calc(56px * var(--hs)); background-size: calc(56px * var(--hs)) calc(56px * var(--hs)); }
.mc-scene .moon { transform: scale(var(--hs)); transform-origin: top right; }
.mc-scene .cloud { height: calc(22px * var(--hs)); }
.mc-scene .sky::before { transform: scale(1); width: calc(2px * var(--hs)); height: calc(2px * var(--hs)); }
/* ground = 30% of the screen height (5 rows); content fits above it at any size */
.mc-scene .blk { width: 6vh; height: 6vh; background-size: 6vh 6vh; }
.mc-home { padding-top: calc(8vh / var(--hs)); padding-bottom: calc(30vh / var(--hs) + 20px); }
@media (max-width: 860px) { .mc-home { padding-top: 7vh; padding-bottom: calc(30vh + 20px); } }

/* title-screen splash: yellow pixel text with the dark-yellow drop shadow, tilted and pulsing */
.mc-title h1 { font-size: clamp(36px, 5.6vw, 68px); }
.splash { font: 500 22px "Pixelify Sans", var(--pixel); color: #ffff00; letter-spacing: .5px;
  text-shadow: 2.5px 2.5px 0 #3f3f00; -webkit-font-smoothing: none; right: -96px; bottom: -6px; }
@media (max-width: 860px) { .splash { font-size: 16px; right: -2px; bottom: -30px; } }
@media (min-width: 861px) { .splash { right: -150px; bottom: -16px; } }

/* tagline: bigger, pixel font, quote picked out */
.mc-tag { font: 500 23px "Pixelify Sans", var(--sans); color: #b9c1d9; text-shadow: 2px 2px 0 #10142a; letter-spacing: .3px; margin: 32px 0 30px; }
.mc-tag .q { color: #ffffff; }
@media (max-width: 860px) { .mc-tag { font-size: 18px; } }

/* profile cards: compact single row (head | name + rank | open) */
.mc-card { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto; gap: 0 14px; padding: 10px 14px; }
.mc-head { grid-row: auto; width: 48px; height: 48px; }
.mc-card-txt { gap: 1px; }
.mc-name { font-size: 16px; }
.mc-go { grid-column: auto; align-self: center; text-align: right; white-space: nowrap; }
.mc-cards { grid-template-columns: repeat(auto-fit, minmax(320px, 440px)); margin-top: 30px; }

/* ================= profile pages: faint night sky + ground strip ================= */
body { background: #080b16; }
body::before { display: none; }
#bg-scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: linear-gradient(180deg, #070a15 0%, #0b1122 55%, #0f1629 100%); }
#bg-scene .sky::before { content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 2px; box-shadow: var(--stars); opacity: .35; }
#bg-scene .rk-glow { position: absolute; left: calc(232px + 3vw); top: 4vh; width: min(70vw, 1400px); height: min(70vh, 900px); transform: translate(-35%, -35%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--prk, #2bd46a) 17%, transparent), transparent 75%); transition: background .4s; }
#bg-scene .ground { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; opacity: .2;
  -webkit-mask-image: linear-gradient(to top, #000 35%, transparent 100%); mask-image: linear-gradient(to top, #000 35%, transparent 100%); }
#bg-scene .blk-row { display: flex; }
#bg-scene .blk { flex: none; width: clamp(28px, 4.6vh, 120px); height: clamp(28px, 4.6vh, 120px); background-size: 100% 100%; image-rendering: pixelated; background-color: #4a3424; }
#bg-scene .blk[data-b="grass_block_side"] { background-color: #3f6626; }
#bg-scene .blk[data-b="stone"], #bg-scene .blk[data-b$="_ore"], #bg-scene .blk[data-b="gravel"] { background-color: #555; }
body.home-page #bg-scene { display: none; }
.main { padding-bottom: calc(3 * clamp(28px, 4.6vh, 120px) + 24px); }
body.home-page .main { padding-bottom: 0; }
.topbar { background: rgba(7, 10, 21, .82); }
@media (max-width: 860px) { #bg-scene .rk-glow { left: 4vw; } }

/* sidebar: darkened dirt tiles, like the options menu */
.real-tex .sidebar { background: linear-gradient(rgba(10, 9, 10, .9), rgba(10, 9, 10, .9)), url("../textures/block/dirt.png") 0 0 / 48px 48px; image-rendering: pixelated; }
.real-tex .sidebar .nav-item, .real-tex .sidebar .logo, .real-tex .sidebar .side-foot { image-rendering: auto; }

/* ================= profile pages: options-menu dirt instead of the night scene ================= */
#bg-scene { display: none !important; }
.main { padding-bottom: 48px; }
.real-tex:not(.home-page) {
  background: linear-gradient(rgba(9, 8, 8, .86), rgba(9, 8, 8, .86)), url("../textures/block/dirt.png") 0 0 / clamp(40px, 4.4vh, 96px) clamp(40px, 4.4vh, 96px);
  background-attachment: fixed; image-rendering: pixelated;
}
.real-tex:not(.home-page) .app { image-rendering: auto; }
/* sidebar a touch darker than the main area so the two read as separate panels */
.real-tex .sidebar { background: linear-gradient(rgba(6, 5, 5, .92), rgba(6, 5, 5, .92)), url("../textures/block/dirt.png") 0 0 / clamp(40px, 4.4vh, 96px) clamp(40px, 4.4vh, 96px); border-right: 1px solid rgba(0,0,0,.6); }
.real-tex .topbar { background: rgba(10, 8, 8, .78); border-bottom-color: rgba(0,0,0,.55); }
/* warm-neutral panels so cards sit naturally on the dirt background */
:root {
  --surface: #1a1817; --surface-2: #211e1c; --surface-3: #2b2825; --border: #34302c; --border-hi: #48423c; --track: #2c2926;
  --card-top: #23201e; --card-bot: #1a1816; --edge: #36312d; --edge-hi: #4c4640;
}
.kpi { background: linear-gradient(155deg, #252220 0%, #1b1917 65%); }
.kpi .k img.itm { background: #110f0e; }
th { background: var(--surface-2); }
.sidebar .logo { cursor: pointer; border-radius: 8px; }
.sidebar .logo:hover { background: rgba(255,255,255,.04); }
.sidebar .logo:focus-visible { outline: 2px solid var(--emerald); }

/* ================= main area: darkened stone bricks (sidebar stays dirt) ================= */
.real-tex:not(.home-page) {
  background: linear-gradient(rgba(8, 8, 9, .84), rgba(8, 8, 9, .84)), url("../textures/block/stone_bricks.png") 0 0 / clamp(48px, 5.2vh, 112px) clamp(48px, 5.2vh, 112px);
  background-attachment: fixed;
}
/* neutral greys suit stone better than the warm dirt-matching ones */
:root {
  --surface: #19191b; --surface-2: #1f2022; --surface-3: #292a2d; --border: #313337; --border-hi: #44474c; --track: #2a2b2e;
  --card-top: #212225; --card-bot: #18191b; --edge: #33353a; --edge-hi: #4a4d53;
}
.kpi { background: linear-gradient(155deg, #232427 0%, #19191c 65%); }
.kpi .k img.itm { background: #0f1012; }
.real-tex .topbar { background: rgba(10, 10, 11, .8); }

/* ================= main area: darkened oak planks (sidebar stays dirt) ================= */
.real-tex:not(.home-page) {
  background: linear-gradient(rgba(10, 7, 4, .88), rgba(10, 7, 4, .88)), url("../textures/block/oak_planks.png") 0 0 / clamp(48px, 5.2vh, 112px) clamp(48px, 5.2vh, 112px);
  background-attachment: fixed;
}
/* warm greys to sit on wood */
:root {
  --surface: #1a1817; --surface-2: #211e1c; --surface-3: #2b2825; --border: #34302c; --border-hi: #48423c; --track: #2c2926;
  --card-top: #23201e; --card-bot: #1a1816; --edge: #36312d; --edge-hi: #4c4640;
}
.kpi { background: linear-gradient(155deg, #252220 0%, #1b1917 65%); }
.kpi .k img.itm { background: #110f0e; }
.real-tex .topbar { background: rgba(12, 9, 7, .8); }
/* a little brighter: main planks .88 -> .80 overlay, sidebar dirt .92 -> .85 */
.real-tex:not(.home-page) {
  background: linear-gradient(rgba(10, 7, 4, .80), rgba(10, 7, 4, .80)), url("../textures/block/oak_planks.png") 0 0 / clamp(48px, 5.2vh, 112px) clamp(48px, 5.2vh, 112px);
  background-attachment: fixed;
}
.real-tex .sidebar { background: linear-gradient(rgba(6, 5, 5, .85), rgba(6, 5, 5, .85)), url("../textures/block/dirt.png") 0 0 / clamp(40px, 4.4vh, 96px) clamp(40px, 4.4vh, 96px); }
/* brighter again: main planks .80 -> .70, sidebar dirt .85 -> .76 */
.real-tex:not(.home-page) {
  background: linear-gradient(rgba(10, 7, 4, .70), rgba(10, 7, 4, .70)), url("../textures/block/oak_planks.png") 0 0 / clamp(48px, 5.2vh, 112px) clamp(48px, 5.2vh, 112px);
  background-attachment: fixed;
}
.real-tex .sidebar { background: linear-gradient(rgba(6, 5, 5, .76), rgba(6, 5, 5, .76)), url("../textures/block/dirt.png") 0 0 / clamp(40px, 4.4vh, 96px) clamp(40px, 4.4vh, 96px); }
/* keep sidebar labels and page headings crisp on the lighter textures */
.real-tex .nav-item { text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.real-tex .nav-item.active { background: rgba(20, 16, 14, .82); }
.real-tex .side-foot, .real-tex .page-head p { text-shadow: 0 1px 2px rgba(0,0,0,.85); }
.real-tex .page-head h1, .real-tex .page-head .eyebrow { text-shadow: 2px 2px 0 rgba(0,0,0,.7); }
/* brighter again: main planks .70 -> .58, sidebar dirt .76 -> .64 */
.real-tex:not(.home-page) {
  background: linear-gradient(rgba(10, 7, 4, .58), rgba(10, 7, 4, .58)), url("../textures/block/oak_planks.png") 0 0 / clamp(48px, 5.2vh, 112px) clamp(48px, 5.2vh, 112px);
  background-attachment: fixed;
}
.real-tex .sidebar { background: linear-gradient(rgba(6, 5, 5, .64), rgba(6, 5, 5, .64)), url("../textures/block/dirt.png") 0 0 / clamp(40px, 4.4vh, 96px) clamp(40px, 4.4vh, 96px); }
.real-tex .nav-item { text-shadow: 0 1px 3px rgba(0,0,0,.95), 0 0 6px rgba(0,0,0,.6); }
.real-tex .nav-item:hover { background: rgba(20, 16, 14, .7); }
.real-tex .side-foot { background: rgba(10, 8, 7, .6); border-radius: 8px; padding: 10px; margin: 14px 4px 0; }
.real-tex .page-head .eyebrow, .real-tex .page-head h1 { text-shadow: 2px 2px 0 rgba(0,0,0,.85), 0 0 10px rgba(0,0,0,.6); }
.real-tex .page-head .eyebrow { background: rgba(10, 8, 7, .78); padding: 4px 9px; border-radius: 5px; text-shadow: none; }
.real-tex .page-head p { display: inline-block; background: rgba(10, 8, 7, .6); padding: 2px 8px; border-radius: 5px; }

/* recent searches: up to 16, 8 columns x 2 rows */
.mc-recent-wrap { width: min(980px, 100%); margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mc-recent { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: none; margin-top: 0; }
.mc-recent .mc-btn { min-width: 0; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) { .mc-recent { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* home: player tiles (you first, then recent searches), 8 x 2 */
.mc-tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; width: min(1120px, 100%); margin-top: 30px; }
.mc-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 12px 8px 10px; cursor: pointer; font: inherit; color: #fff;
  background: rgba(16, 2, 18, .92); border: 2px solid #1a0326; border-radius: 2px;
  box-shadow: inset 0 0 0 2px #3f0f8f, inset 0 0 0 3px #22094a, 0 12px 26px rgba(0,0,0,.45); transition: transform .12s; }
.mc-tile:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px #6a2be0, inset 0 0 0 3px #2f0c6b, 0 16px 30px rgba(0,0,0,.5); }
.mc-tile .mc-head { width: 48px; height: 48px; image-rendering: pixelated; box-shadow: 0 0 0 2px #000, 0 0 0 4px color-mix(in srgb, var(--rk) 70%, transparent); margin-bottom: 6px; }
.mc-tile .mc-head.ph { display: block; padding: 6px; background: #000; }
.mc-tile .mc-head.ph img, .mc-tile .mc-head.ph svg { width: 100%; height: 100%; image-rendering: pixelated; }
.mc-tile .mc-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 12px var(--pixel); }
.mc-tile .mc-sub { display: flex; align-items: center; justify-content: center; gap: 4px 6px; flex-wrap: wrap; color: #c8c8c8; font-size: 11.5px; }
.mc-tile .mc-sub img.emb, .mc-tile .mc-sub svg { width: 13px; height: 13px; image-rendering: pixelated; }
.mc-tile .mc-sub span { color: #9a9a9a; }
.mc-tile .mc-go { font: 400 9.5px var(--pixel); color: #55ff55; text-shadow: 1px 1px 0 #153f15; margin-top: 2px; }
@media (max-width: 1100px) { .mc-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* keep 8 per row but centre a short row */
.mc-tiles { display: flex; flex-wrap: wrap; justify-content: center; }
.mc-tile { flex: 0 0 calc((100% - 7 * 12px) / 8); }
@media (max-width: 1100px) { .mc-tile { flex-basis: calc((100% - 3 * 12px) / 4); } }
@media (max-width: 560px) { .mc-tile { flex-basis: calc((100% - 12px) / 2); } }

/* player cards: 2 columns x up to 8 rows, wide card style (head | name + rank | status) */
.mc-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; width: min(860px, 100%); margin-top: 28px; justify-content: stretch; }
.mc-tile { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; gap: 2px 14px;
  padding: 9px 14px; text-align: left; }
.mc-tile .mc-head { grid-row: 1 / span 2; width: 42px; height: 42px; margin: 0; }
.mc-tile .mc-name { grid-column: 2; font-size: 14px; text-align: left; }
.mc-tile .mc-sub { grid-column: 2; justify-content: flex-start; font-size: 12px; }
.mc-tile .mc-sub img.emb, .mc-tile .mc-sub svg { width: 14px; height: 14px; }
.mc-tile .mc-go { grid-column: 3; grid-row: 1 / span 2; align-self: center; margin: 0; font-size: 10px; white-space: nowrap; }
/* a long list can run past the grass: let the page scroll over the fixed scene */
.mc-home { min-height: calc(100vh / var(--hs)); height: auto; }
@media (max-width: 1100px) { .mc-tile { flex-basis: auto; } }
@media (max-width: 700px) { .mc-tiles { grid-template-columns: 1fr; } }
/* tighter vertical rhythm so 4 rows + footer sit above the grass */
.mc-tag { margin: 24px 0 22px; }
.mc-tiles { margin-top: 20px; gap: 8px 14px; }
.mc-tile { padding: 8px 14px; }
.mc-foot { margin-top: 18px; }
.mc-home { padding-top: calc(6vh / var(--hs)); }
@media (min-width: 861px) { .splash { bottom: 2px; right: -158px; } }
/* plain-language description between the logo and the tagline */
.mc-desc { max-width: 640px; margin: 26px 0 0; color: #d6dbe8; font: 400 15.5px/1.55 var(--sans); text-shadow: 0 2px 6px rgba(0,0,0,.7); }
.mc-desc + .mc-tag { margin-top: 12px; font-size: 19px; }
.mc-desc { max-width: 780px; margin-top: 18px; font-size: 15px; line-height: 1.5; }
.mc-desc + .mc-tag { margin: 8px 0 18px; }
.mc-tiles { margin-top: 16px; }
.mc-foot { margin-top: 14px; }
.mc-home { padding-top: calc(4.5vh / var(--hs)); }
@media (min-width: 861px) { .splash { bottom: 16px; right: -150px; } }
.mc-desc { font-size: 17px; font-weight: 500; }
/* description and tagline: same pixel font, one colour each line */
.mc-desc { font: 500 21px "Pixelify Sans", var(--sans); color: #dfe4f2; text-shadow: 2px 2px 0 #10142a; letter-spacing: .3px; }
.mc-tag .q { color: inherit; }

/* match log: wider "Ranked log" with bigger W / L / D blocks */
.match-top { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.ranked-log .form { gap: 6px; }
.ranked-log .form i { width: 30px; height: 30px; font-size: 13px; border-radius: 3px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.28), inset 0 2px 0 rgba(255,255,255,.18); }
@media (max-width: 860px) { .match-top { grid-template-columns: 1fr; } .ranked-log .form i { width: 24px; height: 24px; font-size: 11px; } }
/* ranked log blocks: 2x (60px) */
.ranked-log .form { gap: 8px; }
.ranked-log .form i { width: 60px; height: 60px; font-size: 24px; border-radius: 4px; box-shadow: inset 0 -5px 0 rgba(0,0,0,.28), inset 0 3px 0 rgba(255,255,255,.18); }
@media (max-width: 860px) { .ranked-log .form i { width: 40px; height: 40px; font-size: 16px; } }
/* ranked log blocks: 80% (48px), Minecraft-style pixel letters */
.ranked-log .form { gap: 7px; }
.ranked-log .form i { width: 48px; height: 48px; font: 500 23px/1 "Pixelify Sans", var(--pixel); color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.45);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.28), inset 0 3px 0 rgba(255,255,255,.18); }
.ranked-log .form i.d { color: #d8d8d8; }
@media (max-width: 860px) { .ranked-log .form i { width: 34px; height: 34px; font-size: 17px; } }

/* sidebar logo: text only, even padding, no hover (still a link home) */
.sidebar .logo { padding: 12px 10px; margin-bottom: 8px; gap: 0; align-items: center; }
.sidebar .logo:hover { background: none; }
.sidebar .logo .logo-text { line-height: 1.15; }
.player-chip:empty + .filters { margin-left: 0; }

/* ================= "Compare to" picker ================= */
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 7px; min-width: 150px; padding: 5px 10px; background: var(--surface); color: var(--text);
  border: 1px solid var(--edge); border-radius: 8px; font: 600 12.5px var(--sans); cursor: pointer; }
.dd-btn:hover, .dd-btn[aria-expanded="true"] { border-color: var(--edge-hi); background: var(--surface-2); }
.dd-btn img.emb, .dd-btn svg { width: 16px; height: 16px; image-rendering: pixelated; }
.dd-btn span { flex: 1; text-align: left; }
.dd-caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--muted); margin-left: 4px; }
.dd-menu { position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; width: 360px; padding: 8px; background: linear-gradient(180deg, var(--card-top), var(--card-bot));
  border: 1px solid var(--edge-hi); border-radius: 10px; box-shadow: 0 18px 40px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 3px; }
.dd-menu[hidden] { display: none; }
.dd-row { display: grid; grid-template-columns: 112px repeat(4, minmax(0, 1fr)); gap: 4px; align-items: center; padding: 3px 4px; border-radius: 6px; }
.dd-row:hover { background: rgba(255,255,255,.03); }
.dd-rank { display: inline-flex; align-items: center; gap: 7px; font: 600 12.5px var(--sans); color: var(--rk); }
.dd-rank img.emb, .dd-rank svg { width: 18px; height: 18px; image-rendering: pixelated; }
.dd-opt { padding: 5px 0; border-radius: 5px; border: 1px solid transparent; background: var(--surface-3); color: var(--text-2); font: 600 12px var(--sans); cursor: pointer; }
.dd-opt:hover { color: var(--text); border-color: var(--edge-hi); }
.dd-opt.on { background: color-mix(in srgb, var(--rk, var(--emerald)) 22%, var(--surface-3)); border-color: var(--rk, var(--emerald)); color: #fff; }
.dd-opt.mine::after { content: " •"; color: var(--you); }
.dd-every { grid-template-columns: 1fr; margin-top: 4px; border-top: 1px solid var(--edge); padding-top: 8px; border-radius: 0; }
.dd-foot { color: var(--muted); font-size: 11.5px; padding: 6px 6px 2px; display: flex; align-items: center; gap: 6px; }

/* ================= match analysis ================= */
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: rgba(255,255,255,.05); }
.match-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.mh-time { font: 700 40px var(--mono); line-height: 1; }
.mh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; color: var(--text-2); font-size: 13px; }
.mh-seed { display: flex; gap: 8px; margin-top: 10px; }
.mh-tag { display: inline-flex; align-items: center; gap: 2px; padding: 3px 10px; border-radius: 6px; background: var(--surface-3); font: 600 12.5px var(--sans); }
.mh-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.mh-nav a.btn { text-decoration: none; display: inline-flex; align-items: center; }
/* one card on home: centre it at the width of one column */
.mc-tiles.single { grid-template-columns: minmax(0, 423px); justify-content: center; }

/* searched players: only this season is loaded */
.seg-ctl button:disabled { opacity: .45; cursor: not-allowed; }
.seg-ctl button.on:disabled { opacity: .7; }


/* averages that left out outlier games */
.race-lbl .out-tag { font-style: normal; color: var(--muted, #858279); cursor: help; border-bottom: 1px dotted currentColor; }


/* best-time heatmap: cells open that match */
.hm-cell.hm-go { cursor: pointer; }
.hm-cell.hm-go:hover { outline: 1px solid var(--line-2, #3a4250); outline-offset: -1px; }

.hm-cell.hm-go b { color: var(--text, #eceae4); }


/* ---- home header + site pages (About / FAQ / Patches / Feedback) */
.mc-bar { position: relative; z-index: 2; width: 100%; max-width: 1100px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2vh auto 4vh; }
.mc-logo { font: 400 15px var(--pixel); color: #f2f2f2; text-decoration: none; text-shadow: 2px 2px 0 #383838; letter-spacing: 1px; white-space: nowrap; }
.mc-logo.hide { visibility: hidden; }
.mc-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
a.mc-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.mc-btn.on { background: #7b84bd; box-shadow: inset 2px 2px 0 #bec6ff, inset -2px -3px 0 #545b8f; }
.mc-btn:disabled { opacity: .45; cursor: not-allowed; }
.mc-info { justify-content: flex-start; }
.mc-panel { position: relative; z-index: 1; width: min(860px, 100%); text-align: left; background: rgba(8, 10, 20, .84); border: 2px solid #000;
  box-shadow: inset 0 0 0 2px #3a3f5c, 0 18px 40px rgba(0, 0, 0, .5); padding: 26px 30px 28px; color: #d6dbe8; font: 400 15px/1.6 var(--sans); }
.mc-panel h1 { margin: 0 0 14px; font: 400 28px/1.2 var(--pixel); color: #fff; text-shadow: 2px 2px 0 #383838; letter-spacing: 2px; }
.mc-panel h2 { margin: 22px 0 8px; font: 400 13px var(--pixel); color: #f2c94c; letter-spacing: 1px; text-shadow: 1px 1px 0 #3a2c00; }
.mc-panel a { color: #8fb4ff; }
.mc-panel ul { margin: 0; padding-left: 20px; }
.mc-panel li { margin: 5px 0; }
.mc-panel .lead { font-size: 17px; color: #eef1f8; margin: 0 0 14px; }
.mc-panel .fine { color: #8d96b3; font-size: 12.5px; margin: 18px 0 0; }
.segs-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: #c3c9da; }
.segs-row span, .mc-panel ul.segs li { display: flex; align-items: center; gap: 7px; }
.mc-panel ul.segs { list-style: none; padding: 0; }
.mc-panel details { border-top: 1px solid rgba(255, 255, 255, .08); padding: 11px 0; }
.mc-panel details:last-child { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.mc-panel summary { cursor: pointer; font-weight: 600; color: #fff; list-style: none; display: flex; gap: 10px; }
.mc-panel summary::-webkit-details-marker { display: none; }
.mc-panel summary::before { content: "+"; font-family: var(--pixel); color: #f2c94c; width: 12px; flex: none; }
.mc-panel details[open] summary::before { content: "\2212"; }
.mc-panel .ans { padding-left: 22px; color: #c3c9da; }
.mc-panel .ans p { margin: 6px 0 0; }
.patch + .patch { margin-top: 6px; }
.patch h2 { display: flex; align-items: baseline; gap: 12px; }
.patch .ver { color: #55ff55; text-shadow: 1px 1px 0 #153f15; }
.patch .date { font: 500 12.5px var(--sans); color: #8d96b3; letter-spacing: 0; text-shadow: none; }
.fb { display: grid; gap: 12px; margin-top: 6px; }
.fb textarea, .fb input[type=text] { width: 100%; box-sizing: border-box; background: #000; color: #f0f0f0; border: 2px solid #a0a0a0; padding: 11px 13px; font: 500 14.5px/1.5 var(--sans); border-radius: 0; resize: vertical; }
.fb textarea:focus, .fb input[type=text]:focus { outline: none; border-color: #fff; }
.fb-types { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-types input { position: absolute; opacity: 0; pointer-events: none; }
.fb-types span { display: inline-block; padding: 6px 12px; border: 2px solid #000; background: #2a2d3d; color: #c8cde0; font: 400 11px var(--pixel); cursor: pointer; box-shadow: inset 0 0 0 1px #454a66; }
.fb-types input:checked + span { background: #7b84bd; color: #fff; box-shadow: inset 2px 2px 0 #bec6ff, inset -2px -3px 0 #545b8f; }
.fb-types input:focus-visible + span { outline: 2px solid #fff; }
.fb-actions { display: flex; gap: 10px; }
.fb-actions .mc-btn { min-height: 40px; }
.side-links { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 6px; }
.side-links a { color: inherit; text-decoration: none; }
.side-links a:hover { color: var(--text, #eceae4); text-decoration: underline; }
@media (max-width: 640px) {
  .mc-bar { flex-direction: column; align-items: stretch; margin-top: 0; }
  .mc-logo.hide { display: none; }
  .mc-links { justify-content: center; }
  .mc-panel { padding: 18px 16px 20px; }
  .mc-panel h1 { font-size: 22px; }
}

/* header buttons: bigger, with item icons, vanilla-style bevel */
.mc-bar { max-width: 1240px; margin-bottom: 5vh; }
.mc-logo { font-size: 19px; text-shadow: 3px 3px 0 #383838; }
.mc-links { gap: 10px; }
.mc-btn.mc-nav { min-height: 46px; padding: 0 20px 0 14px; gap: 10px; font-size: 14px; letter-spacing: .5px;
  background: linear-gradient(#7d7d7d, #626262); border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #a9a9a9, inset -2px -3px 0 #3f3f3f, 0 6px 16px rgba(0, 0, 0, .45);
  transition: transform .08s ease, filter .08s ease; }
.mc-btn.mc-nav:hover, .mc-btn.mc-nav:focus-visible { background: linear-gradient(#8a93cc, #6c75b0); box-shadow: inset 2px 2px 0 #c6ccff, inset -2px -3px 0 #4a5085, 0 8px 20px rgba(0, 0, 0, .5); transform: translateY(-1px); }
.mc-btn.mc-nav:active { transform: translateY(1px); }
.mc-btn.mc-nav.on { background: linear-gradient(#5e9b3c, #487a2c); box-shadow: inset 2px 2px 0 #8fd16a, inset -2px -3px 0 #2c4d1a, 0 6px 16px rgba(0, 0, 0, .45); }
.mc-btn.mc-nav .nav-ic { width: 22px; height: 22px; image-rendering: pixelated; filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .55)); }
@media (max-width: 640px) {
  .mc-links { display: grid; grid-template-columns: 1fr 1fr; }
  .mc-btn.mc-nav { min-height: 42px; font-size: 12px; }
}

/* header buttons v2: no icons; dark night-sky bevel (matches the player tiles) instead of plain grey */
.mc-btn.mc-nav { min-height: 44px; padding: 0 20px; font-size: 14px; color: #e9ecf8; text-shadow: 2px 2px 0 #0b0d18;
  background: linear-gradient(#262c4a, #1a1f38); border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #4a5380, inset -2px -3px 0 #0e1124, 0 6px 16px rgba(0, 0, 0, .45); }
.mc-btn.mc-nav:hover, .mc-btn.mc-nav:focus-visible { color: #fff; background: linear-gradient(#3a2a78, #2a1d5e);
  box-shadow: inset 2px 2px 0 #8b6cf0, inset -2px -3px 0 #1a0f40, 0 0 0 1px #6a2be0, 0 8px 22px rgba(106, 43, 224, .35); transform: translateY(-1px); }
.mc-btn.mc-nav.on { color: #fff; text-shadow: 2px 2px 0 #153f15; background: linear-gradient(#2f7a3a, #22602c);
  box-shadow: inset 2px 2px 0 #5fd16f, inset -2px -3px 0 #123a18, 0 6px 16px rgba(0, 0, 0, .45); }
/* header button hover: a lighter shade of the same navy (no purple) */
.mc-btn.mc-nav:hover, .mc-btn.mc-nav:focus-visible { color: #fff; background: linear-gradient(#343c62, #262c4a);
  box-shadow: inset 2px 2px 0 #6a76ad, inset -2px -3px 0 #141834, 0 8px 20px rgba(0, 0, 0, .5); transform: translateY(-1px); }
.mc-btn.mc-nav.on:hover { background: linear-gradient(#368a43, #286d33); box-shadow: inset 2px 2px 0 #6fe07f, inset -2px -3px 0 #123a18, 0 8px 20px rgba(0, 0, 0, .5); }

/* About page */
.mc-panel p { margin: 0 0 10px; }
.mc-panel ol.ab-steps { margin: 0; padding-left: 22px; }
.mc-panel ol.ab-steps li { margin: 6px 0; }
.ab-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ab-stat { background: rgba(255, 255, 255, .04); border: 2px solid #000; box-shadow: inset 0 0 0 1px #2c3150; padding: 12px 14px; }
.ab-stat b { display: block; font: 400 20px var(--pixel); color: #55ff55; text-shadow: 2px 2px 0 #153f15; }
.ab-stat span { display: block; margin-top: 4px; font-size: 12.5px; color: #aab2c8; line-height: 1.35; }
.ab-tour { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 18px; }
.ab-item { display: flex; gap: 11px; align-items: flex-start; padding: 7px 0; }
.ab-item > img, .ab-item > svg { width: 22px; height: 22px; flex: none; image-rendering: pixelated; margin-top: 2px; }
.ab-item b { display: block; color: #fff; font-weight: 600; font-size: 14px; }
.ab-item span { display: block; color: #aab2c8; font-size: 13px; line-height: 1.45; }

/* About: longer section descriptions -> two columns, roomier rows */
.ab-tour { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 6px 26px; }
.ab-item { padding: 9px 0; }
.ab-item span { margin-top: 2px; }

/* About > What's inside: one card per section */
.ab-tour { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 4px; }
.ab-card { background: rgba(255, 255, 255, .035); border: 2px solid #000; box-shadow: inset 0 0 0 1px #2c3150; padding: 14px 16px 12px; }
.ab-top { display: flex; align-items: center; gap: 12px; }
.ab-top > img, .ab-top > svg { width: 26px; height: 26px; flex: none; image-rendering: pixelated; }
.ab-top b { display: block; color: #fff; font: 400 13px var(--pixel); letter-spacing: .5px; }
.ab-top span { display: block; margin-top: 3px; color: #f2c94c; font-size: 13px; }
.mc-panel .ab-card ul { list-style: none; padding: 0; margin: 10px 0 0; }
.mc-panel .ab-card li { position: relative; padding-left: 16px; margin: 4px 0; color: #b9c0d3; font-size: 13.5px; line-height: 1.45; }
.mc-panel .ab-card li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; background: #55ff55; box-shadow: 1px 1px 0 #153f15; }

/* ---- About v5: hero line, example runs, beats, inventory slots */
.ab-hero { font: 400 clamp(20px, 2.6vw, 30px)/1.35 var(--pixel); color: #fff; text-shadow: 3px 3px 0 #1d2140; margin: 4px 0 14px; letter-spacing: .5px; }
.ab-hero em { font-style: normal; color: #55ff55; text-shadow: 3px 3px 0 #153f15; }
.ab-example { margin: 18px 0 6px; padding: 14px 16px 12px; background: rgba(0, 0, 0, .35); border: 2px solid #000; box-shadow: inset 0 0 0 1px #2c3150; }
.ab-ex-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ab-ex-head b { font: 400 13px var(--pixel); color: #f2c94c; letter-spacing: .5px; }
.ab-ex-head span { font-size: 12.5px; color: #8d96b3; }
.ab-example .race-axis { display: none; }
.ab-ex-foot { margin-top: 8px; font-size: 13.5px; color: #c3c9da; }
.ab-beats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ab-beat { display: flex; gap: 12px; align-items: flex-start; }
.ab-beat b { display: block; color: #fff; font-weight: 600; font-size: 14.5px; }
.ab-beat span { display: block; margin-top: 3px; color: #aab2c8; font-size: 13.5px; line-height: 1.45; }
/* vanilla inventory slot */
.mc-slot { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: #8b8b8b;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #ffffff; }
.mc-slot img, .mc-slot svg { width: 28px; height: 28px; image-rendering: pixelated; }
.ab-top .mc-slot { width: 38px; height: 38px; }
.ab-top .mc-slot img, .ab-top .mc-slot svg { width: 26px; height: 26px; }
.ab-card { transition: transform .1s ease, box-shadow .1s ease; }
.ab-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px #4a5380, 0 10px 22px rgba(0, 0, 0, .35); }
.ab-credits { display: grid; gap: 4px; margin-top: 24px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; color: #aab2c8; }
.ab-credits .fine { margin: 2px 0 0; }
.ab-hero { font-size: clamp(15px, 1.75vw, 21px); line-height: 1.55; }

/* easter-egg popup, styled like a vanilla advancement toast */
.mc-adv { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; align-items: center; gap: 12px; min-width: 280px; padding: 10px 16px 10px 10px;
  background: #212121; border: 2px solid #000; box-shadow: inset 2px 2px 0 #555, inset -2px -2px 0 #0e0e0e, 0 10px 24px rgba(0, 0, 0, .55);
  animation: adv-in .35s cubic-bezier(.2, .9, .3, 1.2); }
.mc-adv.out { animation: adv-out .5s ease forwards; }
.mc-adv b { display: block; font: 400 13px var(--pixel); color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; letter-spacing: .5px; }
.mc-adv span { display: block; margin-top: 4px; font: 500 16px "Pixelify Sans", var(--sans); color: #fff; text-shadow: 2px 2px 0 #3a3a3a; }
@keyframes adv-in { from { transform: translateX(120%); } to { transform: none; } }
@keyframes adv-out { to { transform: translateX(120%); opacity: 0; } }
.mc-adv span { margin-top: 0; font-size: 18px; }


/* ---- home background: The End (island, pillars + end crystals, exit portal, the 3D ender dragon) */
body.home-page { background: #07040d; }
.mc-scene.end-scene { background: #07040d; }
.end-scene .es-sky { position: absolute; inset: 0; background: url(../textures/entity/end_sky.png) 0 0 / 28vh 28vh; image-rendering: pixelated; opacity: .32; }
.end-scene .es-sky::after { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 70% at 60% 75%, #2a1640 0%, #120a1e 45%, #07040d 85%); mix-blend-mode: multiply; }
.end-scene .es-haze { position: absolute; inset: 0; background: radial-gradient(60% 40% at 58% 78%, #6b3fa022, transparent 70%); }
.end-scene .es-world { position: absolute; inset: 0; }
.end-scene .b { position: absolute; background-size: 100% 100%; image-rendering: pixelated; }
.end-scene .b.es { filter: brightness(.62) saturate(.8); }
.end-scene .b.shade { filter: brightness(.38) saturate(.7); }
.end-scene .glow { position: absolute; border-radius: 50%; filter: blur(16px); }
.end-scene .es-crystal { position: absolute; image-rendering: pixelated; filter: drop-shadow(0 0 8px #ff8ff0aa); }
.end-scene .beam { position: absolute; height: 2px; transform-origin: 0 50%; background: linear-gradient(90deg, #ffffffe6, #f2f0ffcc); box-shadow: 0 0 8px #ffffffaa; opacity: .75; }
.end-scene .orbit { position: absolute; border: 1px dashed #c9a6ff2e; border-radius: 50%; }
.end-scene .es-dragon { position: absolute; filter: drop-shadow(0 0 14px #9a4dff55); }

/* icon tiles (About page, popups): dark recessed navy tile instead of the flat grey inventory slot */
.mc-slot { background: radial-gradient(circle at 50% 45%, #2e3560 0%, #1a1f38 70%); border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #0c0f1e, inset -2px -2px 0 #3c4573, 0 0 0 1px #262c4a; }
.mc-slot img, .mc-slot svg { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .55)) drop-shadow(0 0 6px rgba(140, 160, 255, .18)); }
.ab-card:hover .mc-slot { background: radial-gradient(circle at 50% 45%, #3a4378 0%, #1f2542 70%); }


/* ---- About > What's inside: a mini preview per section instead of bullet text */
.ab-tour { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.ab-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.ab-pv { position: relative; flex: 1; min-height: 74px; display: flex; flex-direction: column; justify-content: center; gap: 7px;
  padding: 10px 12px; background: rgba(0, 0, 0, .32); border: 1px solid #ffffff10; }
.pv-run { display: flex; height: 13px; border: 2px solid #000; }
.pv-run i { display: block; height: 100%; background-size: 13px 13px; image-rendering: pixelated; }
.pv-run.them { opacity: .8; filter: saturate(.75); }
.pv-run.best { box-shadow: 0 0 0 1px #f2c94c, 0 0 10px #f2c94c55; }
.pv-pair { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 8px; font-size: 10.5px; color: #aab2c8; }
.pv-pair .pv-run { width: var(--w, 100%); }
.pv-line { width: 100%; height: 40px; display: block; }
.pv-form { display: flex; gap: 3px; flex-wrap: wrap; }
.pv-form i { width: 15px; height: 15px; display: grid; place-items: center; font: 400 8px var(--pixel); font-style: normal; color: #fff; border: 1px solid #000; }
.pv-form i.w { background: #3f9d4f; } .pv-form i.l { background: #b44a4a; } .pv-form i.d { background: #6b6b6b; }
.pv-db { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; font-size: 10.5px; color: #aab2c8; }
.pv-db > div { position: relative; height: 10px; }
.pv-db > div::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 2px; background: #ffffff12; }
.pv-db b { position: absolute; top: 4px; height: 2px; background: #e6676799; }
.pv-db i, .pv-db em { position: absolute; top: 0; width: 10px; height: 10px; margin-left: -5px; border: 2px solid #000; }
.pv-db i { background: #3987e5; } .pv-db em { background: #d95926; }
.pv-tr { display: grid; grid-template-columns: 82px 1fr 38px; align-items: center; gap: 8px; font-size: 10.5px; color: #aab2c8; }
.pv-tr span { display: flex; align-items: center; gap: 5px; }
.pv-tr > div { height: 8px; background: #ffffff10; }
.pv-tr b { display: block; height: 100%; background: linear-gradient(90deg, #46c470, #8de0a0); }
.pv-tr em { font-style: normal; font: 400 10px var(--pixel); color: #46c470; text-align: right; }
.pv-bars { display: flex; align-items: flex-end; gap: 6px; height: 58px; }
.pv-bars > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.pv-bars > div > i { display: block; width: 100%; border: 2px solid #000; box-shadow: inset 0 2px 0 #ffffff30; }
.pv-bars span { font-size: 9.5px; color: #8d96b3; line-height: 1; display: flex; }
.pv-bars span img, .pv-bars span svg { width: 12px; height: 12px; image-rendering: pixelated; }
.pv-proj { font-size: 11px; color: #aab2c8; } .pv-proj b { color: #55ff55; font-weight: 600; }
.pv-heat { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.pv-heat i { aspect-ratio: 1; border: 1px solid #000; display: grid; place-items: center; font: 400 9px var(--pixel); font-style: normal; color: #8d96b3; }
.pv-heat .h0 { background: #46c47088; } .pv-heat .h1 { background: #ffffff14; } .pv-heat .h2 { background: #e6676788; } .pv-heat .q { background: #ffffff08; }
.pv-you { position: absolute; bottom: 4px; transform: translateX(-50%); font: 400 9px var(--pixel); color: #fff; background: #3987e5; padding: 1px 4px; border: 1px solid #000; }
.pv-dist .pv-bars { height: 52px; margin-bottom: 14px; }
/* odd one out (13 cards): the last card spans the row, its histogram gets the width */
.ab-tour .ab-card:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(220px, 280px) 1fr; align-items: center; }
@media (max-width: 640px) { .ab-tour .ab-card:last-child { grid-template-columns: 1fr; } }
.ab-tour .ab-card:last-child .pv-bars { height: 72px; gap: 10px; }

/* sidebar logo on profile pages: bigger, with the home title's pixel shadow */
.sidebar .logo .logo-text { font-size: 25px; line-height: 1.12; letter-spacing: 1px; text-shadow: 3px 3px 0 #383838; }
.sidebar .logo { padding: 16px 12px 14px; }
/* the "MCSR SPLIT LAB" home link in the site-page header: no underline on hover */
.mc-logo, .mc-logo:hover, .mc-logo:focus { text-decoration: none; }

/* ---- phones */
@media (max-width: 640px) {
  /* home title on one line, splash tucked under its right end instead of over the description */
  .mc-title h1 { font-size: clamp(24px, 8.4vw, 34px); letter-spacing: 2px; white-space: nowrap; }
  .mc-title .splash, .splash { position: absolute; right: -4px; bottom: -24px; font-size: 13px; }
  .mc-desc { margin-top: 30px; }
  /* About example: no split times inside the tiny bars */
  .ab-example .race-seg .tp { display: none; }
  .ab-example .race-lbl span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Overview: long names / rank numbers wrap instead of being cut off */
  .hero-name { flex-wrap: wrap; row-gap: 2px; white-space: normal; overflow-wrap: anywhere; }
  .hero-name .name-rank { white-space: nowrap; }
}
@media (max-width: 640px) { .mc-desc { margin-top: 42px; } }

/* Overview hero: a player still in placement matches */
.hero-id .elo.placing { font-size: 30px; color: var(--text-2, #b6b3aa); }

/* phones: never let the browser enlarge text on its own (Chrome "font boosting" / iOS text-size-adjust
   inflated the filter bar on tabs with wide tables and charts) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* phones: the four filters in one compact row that scrolls sideways, label above each control */
@media (max-width: 700px) {
  .topbar { padding: 8px 16px 10px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; gap: 14px; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; flex-direction: column; align-items: flex-start; gap: 4px; }
  .filter label { font-size: 9.5px; letter-spacing: .6px; }
  .filter .seg-ctl button { padding: 5px 9px; font-size: 12px; }
  .dd-btn { min-width: 0; padding: 4px 9px; font-size: 12px; }
}
/* phones: Compare-to menu as a full-width panel under the bar (top set from JS) */
.dd-menu.dd-sheet { position: fixed; left: 12px; right: 12px; width: auto; max-height: 70vh; overflow-y: auto; z-index: 120; }
@media (max-width: 700px) { .topbar { position: relative; z-index: 60; } }

/* feedback form: background send */
.fb .fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-actions { align-items: center; }
.fb-status { font-size: 13px; color: #aab2c8; }
.fb-status.ok { color: #55ff55; } .fb-status.err { color: #ff8080; }
