:root {
  --bg: #070910;
  --panel: #0f131e;
  --panel-2: #151b29;
  --panel-3: #1a2131;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.15);
  --text: #f7f8fb;
  --muted: #8e98aa;
  --muted-2: #657083;
  --accent: #b7ff2a;
  --accent-soft: rgba(183,255,42,.12);
  --cyan: #52d9ff;
  --danger: #ff6577;
  --warning: #ffc45e;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }

.ambient { position: fixed; pointer-events: none; border-radius: 50%; filter: blur(110px); opacity: .12; }
.ambient-a { width: 420px; height: 420px; background: var(--accent); top: -220px; left: 10%; }
.ambient-b { width: 520px; height: 520px; background: #4058ff; top: 200px; right: -340px; }

.topbar { max-width: 1360px; height: 74px; padding: 0 28px; margin: auto; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 3; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: #0a0d05; font-size: 20px; font-weight: 950; transform: skew(-6deg); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(183,255,42,.7); }

.shell { max-width: 1280px; margin: auto; padding: 42px 28px 78px; position: relative; z-index: 1; }
.hero { min-height: 670px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(400px, .75fr); gap: 70px; align-items: center; }
.hero-copy { min-width: 0; }
.eyebrow { display: inline-block; color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .15em; }
h1 { max-width: 790px; margin: 17px 0 22px; font-size: clamp(43px, 5.3vw, 76px); line-height: .98; letter-spacing: -.055em; }
h1 em { color: var(--accent); font-style: normal; }
.hero-copy > p { max-width: 690px; color: var(--muted); line-height: 1.7; font-size: 17px; }
.hero-copy code { color: var(--text); background: var(--panel-2); padding: 2px 6px; border-radius: 6px; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.feature-pills span { padding: 8px 11px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: #c9d0da; border-radius: 999px; font-size: 11px; }

.dropzone { background: linear-gradient(155deg, #141a27, #0d1019); border: 1px solid var(--line); border-radius: 24px; padding: 13px; box-shadow: 0 28px 80px rgba(0,0,0,.36); }
.dropzone.dragging { border-color: rgba(183,255,42,.75); box-shadow: 0 0 0 5px rgba(183,255,42,.07), 0 28px 80px rgba(0,0,0,.36); }
.dropzone-inner { width: 100%; min-height: 300px; border: 1px dashed var(--line-strong); border-radius: 16px; background: rgba(255,255,255,.018); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 28px; cursor: pointer; text-align: center; }
.dropzone-inner:hover { border-color: rgba(183,255,42,.55); background: rgba(183,255,42,.025); }
.dropzone-inner strong { font-size: 16px; }
.dropzone-inner > span:last-child { color: var(--muted); font-size: 12px; }
.upload-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); font-size: 28px; font-weight: 900; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 22px 12px 12px; }
.file-icon { width: 42px; height: 42px; flex: none; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 950; }
.file-copy { flex: 1; min-width: 0; }
.file-copy strong, .file-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-copy small { color: var(--muted); margin-top: 3px; }
.primary, .secondary-button, .ghost, .back, .tabs button, .row-action, .team-members button, .dialog-close { border: 0; cursor: pointer; }
.primary { width: 100%; margin-top: 12px; padding: 15px 18px; border-radius: 13px; background: var(--accent); color: #080b04; font-weight: 900; }
.primary:hover { filter: brightness(1.05); }
.ghost { padding: 9px 11px; border-radius: 9px; color: var(--muted); background: transparent; }
.ghost:hover { background: rgba(255,255,255,.05); color: var(--text); }
.notice { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 12px; line-height: 1.5; }

.loading { min-height: 620px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.loading h2 { margin: 23px 0 5px; font-size: 28px; }
.loading p { margin: 0; color: var(--muted); }
.loader-ring { width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; position: relative; }
.loader-ring::after { content: ''; position: absolute; inset: -1px; border: 3px solid transparent; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.loader-ring span { color: var(--accent); font-size: 22px; font-weight: 950; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 10px 0 25px; }
.result-title-wrap { min-width: 0; }
.back { padding: 5px 0; margin-bottom: 24px; background: transparent; color: var(--muted); }
.back:hover { color: var(--text); }
.match-kicker { color: var(--accent); font-weight: 900; font-size: 10px; letter-spacing: .14em; }
.result-head h2 { margin: 7px 0 5px; max-width: 850px; overflow-wrap: anywhere; font-size: clamp(28px, 4vw, 48px); letter-spacing: -.04em; line-height: 1.05; }
.result-head p { margin: 0; color: var(--muted); font-size: 12px; }
.secondary-button { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--text); text-decoration: none; font-size: 12px; font-weight: 750; }
.secondary-button:hover { border-color: var(--line-strong); background: var(--panel-2); }

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; }
.stat-icon { width: 33px; height: 33px; flex: none; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font-size: 15px; }
.stat div { min-width: 0; }
.stat small, .stat strong, .stat em { display: block; }
.stat small { color: var(--muted); font-size: 10px; }
.stat strong { margin-top: 2px; font-size: 22px; letter-spacing: -.03em; }
.stat em { color: var(--muted-2); font-style: normal; font-size: 9px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tabs { display: flex; gap: 5px; position: sticky; top: 9px; z-index: 6; padding: 5px; overflow-x: auto; border: 1px solid var(--line); background: rgba(10,12,19,.88); border-radius: 13px; backdrop-filter: blur(16px); }
.tabs button { padding: 10px 13px; border-radius: 9px; background: transparent; color: var(--muted); white-space: nowrap; font-size: 12px; font-weight: 700; }
.tabs button.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.03); }
.tab-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 3px; padding: 0 5px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 9px; }
.panel { padding-top: 24px; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.section-heading.spaced { margin-top: 30px; }
.section-heading h3 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.025em; }
.subtle { color: var(--muted); font-size: 11px; }
.overview-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .7fr); gap: 14px; align-items: start; }
.overview-main, .lobby-card, .info-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.overview-main { padding: 19px; }
.overview-side { display: grid; gap: 14px; }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.highlight-card { min-width: 0; padding: 15px; border-radius: 13px; background: var(--panel-2); border: 1px solid transparent; }
.highlight-card.clickable-player { cursor: pointer; }
.highlight-card.clickable-player:hover { border-color: rgba(183,255,42,.32); }
.highlight-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.highlight-card small, .highlight-card strong, .highlight-card span { display: block; }
.highlight-card > strong { margin-top: 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; }
.highlight-card > span { margin-top: 3px; color: var(--muted); font-size: 10px; }

.platform-chart { display: grid; gap: 13px; }
.platform-row-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.platform-row-label > strong { font-size: 12px; }
.bar-track { height: 5px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.055); }
.bar-fill { height: 100%; display: block; border-radius: inherit; background: #596579; }
.series-pc { background: #8b9ebf; }
.series-playstation { background: #6f86ff; }
.series-xbox { background: #71c56b; }
.series-switch { background: #ef6b74; }
.series-android, .series-ios, .series-mobile { background: #7ed7c0; }
.series-cloud { background: #b58df0; }

.platform-badge { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: #cfd5df; font-size: 10px; }
.platform-badge b { width: 27px; min-width: 27px; height: 22px; padding: 0 3px; display: inline-grid; place-items: center; border-radius: 6px; background: rgba(255,255,255,.065); color: var(--text); font-size: 8px; letter-spacing: -.02em; }
.platform-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-pc b { color: #c9d8f2; }
.platform-playstation b { color: #9dacff; }
.platform-xbox b { color: #92dc8d; }
.platform-switch b { color: #ff979d; }

.lobby-card, .info-card { padding: 18px; }
.lobby-card h3 { margin: 4px 0 19px; font-size: 21px; }
.donut-wrap { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 17px; align-items: center; }
.donut { --bot-pct: 0; width: 120px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) 0 calc((100 - var(--bot-pct)) * 1%), #506078 calc((100 - var(--bot-pct)) * 1%) 100%); position: relative; }
.donut::after { content: ''; position: absolute; inset: 13px; border-radius: 50%; background: var(--panel); }
.donut span { z-index: 1; text-align: center; }
.donut strong, .donut small { display: block; }
.donut strong { font-size: 25px; }
.donut small { color: var(--muted); font-size: 9px; }
.legend { display: grid; gap: 9px; }
.legend div { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.legend strong { color: var(--text); }
.legend i { width: 7px; height: 7px; border-radius: 50%; }
.legend-human { background: var(--accent); }
.legend-bot { background: #506078; }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 11px; }
.info-card .eyebrow + .info-row { margin-top: 8px; }
.info-row span { color: var(--muted); }
.info-row strong { text-align: right; }

.player-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) auto auto auto; gap: 8px; margin: 15px 0 8px; }
.search-wrap { min-width: 0; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--muted); }
.search { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search::placeholder { color: var(--muted-2); }
select { min-height: 42px; max-width: 190px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: #cdd3de; font-size: 11px; }
.filter-result { margin: 0 0 9px; color: var(--muted); font-size: 10px; }
.filter-result strong { color: var(--text); }
.player-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.player-table { width: 100%; min-width: 880px; border-collapse: collapse; text-align: left; }
.player-table th { padding: 11px 13px; border-bottom: 1px solid var(--line); color: var(--muted-2); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.player-table td { padding: 11px 13px; border-bottom: 1px solid rgba(255,255,255,.055); font-size: 11px; vertical-align: middle; }
.player-table tbody tr:last-child td { border-bottom: 0; }
.player-table tbody tr:hover { background: rgba(255,255,255,.018); }
.placement-cell { color: var(--accent); font-size: 12px; }
.player-name-cell { min-width: 0; display: flex; align-items: center; gap: 9px; }
.avatar { width: 32px; height: 32px; min-width: 32px; display: grid; place-items: center; border-radius: 9px; background: #222b3c; color: #dbe2ed; font-size: 11px; font-weight: 900; }
.avatar.small { width: 27px; height: 27px; min-width: 27px; border-radius: 7px; font-size: 9px; }
.player-name-cell > div { min-width: 0; }
.player-name-cell strong { display: block; max-width: 230px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.row-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.type-badge, .mini-chip { display: inline-flex; align-items: center; min-height: 15px; padding: 0 5px; border-radius: 4px; background: rgba(255,255,255,.055); color: var(--muted); font-size: 7px; font-weight: 900; letter-spacing: .04em; }
.type-badge.human { color: #cfe897; background: rgba(183,255,42,.08); }
.type-badge.bot { color: #afbbca; background: rgba(125,145,169,.12); }
.mini-chip.accent { color: var(--accent); background: var(--accent-soft); }
.mini-chip.warning { color: var(--warning); background: rgba(255,196,94,.1); }
.team-number { display: inline-grid; place-items: center; min-width: 27px; height: 24px; border-radius: 7px; background: rgba(255,255,255,.045); font-weight: 800; }
.kills-cell { font-size: 13px; }
.row-action { padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.055); color: #cbd2dc; font-size: 9px; white-space: nowrap; }
.row-action:hover { background: var(--accent-soft); color: var(--accent); }
.row-action.full { width: 100%; min-height: 38px; margin-top: 12px; }
.mobile-player-list { display: none; }

.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.team-card { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.team-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.team-card-head > div:first-child { display: flex; align-items: center; gap: 10px; }
.team-card-head small, .team-card-head strong { display: block; }
.team-card-head small { color: var(--muted); font-size: 8px; }
.placement-bubble { min-width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 900; }
.team-kills { text-align: right; }
.team-kills strong { font-size: 19px; }
.team-members { display: grid; }
.team-members button { width: 100%; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.045); background: transparent; color: var(--text); text-align: left; }
.team-members button:last-child { border-bottom: 0; }
.team-members button:hover { background: rgba(255,255,255,.025); }
.team-members button > span:nth-child(2) { min-width: 0; }
.team-members strong, .team-members small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-members strong { font-size: 10px; }
.team-members small { color: var(--muted); font-size: 8px; margin-top: 2px; }

.event-list { display: grid; gap: 8px; }
.event-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.event-card summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 15px; cursor: pointer; list-style: none; }
.event-card summary::-webkit-details-marker { display: none; }
.event-card summary strong, .event-card summary small { display: block; }
.event-card summary strong { overflow-wrap: anywhere; font-size: 11px; }
.event-card summary small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.event-count { min-width: 30px; height: 24px; display: grid; place-items: center; padding: 0 6px; border-radius: 7px; background: rgba(82,217,255,.08); color: var(--cyan); font-size: 9px; }
.tech-note { margin-bottom: 10px; padding: 12px 14px; border: 1px solid rgba(82,217,255,.15); border-radius: 10px; background: rgba(82,217,255,.035); color: #9eb4c2; font-size: 10px; line-height: 1.5; }
.raw-search { max-width: 550px; margin-bottom: 9px; }
pre { max-height: 570px; margin: 0; padding: 14px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; border: 1px solid var(--line); border-radius: 11px; background: #05070c; color: #bac5d6; font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.event-card pre { margin: 0 10px 10px; border-radius: 8px; }
.empty-state { padding: 30px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); text-align: center; font-size: 11px; }
.error-box { margin-top: 14px; padding: 14px; display: grid; gap: 3px; border: 1px solid rgba(255,101,119,.3); border-radius: 12px; background: rgba(255,101,119,.06); color: #ffd2d8; font-size: 11px; }

.player-dialog { width: min(760px, calc(100% - 24px)); max-height: calc(100% - 32px); padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: 18px; background: #10151f; color: var(--text); box-shadow: 0 35px 100px rgba(0,0,0,.55); }
.player-dialog::backdrop { background: rgba(2,4,8,.78); backdrop-filter: blur(7px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 18px 20px 13px; border-bottom: 1px solid var(--line); background: rgba(16,21,31,.96); backdrop-filter: blur(12px); }
.dialog-head h3 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.035em; overflow-wrap: anywhere; }
.dialog-close { width: 35px; height: 35px; border-radius: 9px; background: rgba(255,255,255,.055); color: var(--muted); font-size: 22px; line-height: 1; }
#dialogBody { padding: 18px 20px 22px; }
.dialog-player-summary { display: flex; align-items: center; gap: 13px; }
.dialog-avatar { width: 54px; height: 54px; min-width: 54px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 19px; font-weight: 950; }
.dialog-badges { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.dialog-player-summary p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.dialog-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.dialog-stats > div { padding: 13px; border-radius: 11px; background: var(--panel-2); }
.dialog-stats small, .dialog-stats strong { display: block; }
.dialog-stats small { color: var(--muted); font-size: 8px; }
.dialog-stats strong { margin-top: 3px; font-size: 17px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.detail-grid > div { min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.detail-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
.detail-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.detail-grid span { color: var(--muted); font-size: 9px; }
.detail-grid code { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.detail-grid strong { font-size: 10px; }
.boolean { padding: 3px 6px; border-radius: 5px; font-size: 8px; font-weight: 800; }
.boolean.yes { color: var(--accent); background: var(--accent-soft); }
.boolean.no { color: var(--muted); background: rgba(255,255,255,.05); }
.raw-details { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.raw-details summary { cursor: pointer; color: var(--cyan); font-size: 10px; }
.raw-fields { margin-top: 10px; }
.kv { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 9px; }
.kv span { color: var(--muted); overflow-wrap: anywhere; }
.kv code { overflow-wrap: anywhere; word-break: break-word; }
.raw-details pre { margin-top: 10px; }

.mobile-player-card { display: none; }
footer { padding: 0 20px 27px; color: #555f70; text-align: center; font-size: 10px; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr 430px; gap: 38px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .overview-layout { grid-template-columns: 1fr; }
  .overview-side { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-toolbar { grid-template-columns: 1fr 1fr; }
  select { max-width: none; width: 100%; }
}

@media (max-width: 780px) {
  .topbar { padding: 0 18px; }
  .shell { padding: 28px 16px 55px; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 28px; padding: 25px 0 30px; }
  h1 { font-size: clamp(42px, 12vw, 62px); }
  .dropzone-inner { min-height: 225px; }
  .result-head { align-items: stretch; flex-direction: column; }
  .secondary-button { align-self: flex-start; }
  .stats { grid-template-columns: 1fr 1fr; }
  .highlights { grid-template-columns: 1fr; }
  .highlight-card > strong { margin-top: 8px; }
  .overview-side { grid-template-columns: 1fr; }
  .player-table-wrap { display: none; }
  .mobile-player-list { display: grid; gap: 9px; }
  .mobile-player-card { display: block; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
  .mobile-player-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .placement-big { color: var(--accent); font-size: 17px; }
  .mobile-player-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
  .mobile-player-stats > div { min-width: 0; padding: 9px; border-radius: 9px; background: var(--panel-2); }
  .mobile-player-stats small, .mobile-player-stats strong { display: block; }
  .mobile-player-stats small { margin-bottom: 5px; color: var(--muted); font-size: 8px; }
  .mobile-player-stats strong { font-size: 11px; }
  .team-grid { grid-template-columns: 1fr; }
  .dialog-stats { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid > div:nth-child(odd) { border-right: 0; }
  .detail-grid > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .detail-grid > div:last-child { border-bottom: 0; }
}

@media (max-width: 520px) {
  .brand small, .status { display: none; }
  .shell { padding-left: 12px; padding-right: 12px; }
  .hero-copy > p { font-size: 15px; }
  .feature-pills { gap: 6px; }
  .feature-pills span { padding: 7px 9px; }
  .stats { gap: 7px; }
  .stat { padding: 12px; gap: 8px; }
  .stat-icon { width: 29px; height: 29px; }
  .stat strong { font-size: 18px; }
  .stat em { display: none; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .section-heading > .subtle { display: none; }
  .overview-main, .lobby-card, .info-card { border-radius: 14px; }
  .overview-main { padding: 13px; }
  .donut-wrap { grid-template-columns: 105px minmax(0,1fr); }
  .donut { width: 105px; }
  .player-toolbar { grid-template-columns: 1fr; }
  .player-toolbar .search-wrap { grid-column: 1; }
  .dialog-head { padding-left: 15px; padding-right: 15px; }
  #dialogBody { padding-left: 15px; padding-right: 15px; }
  .dialog-stats > div { padding: 10px; }
  .kv { grid-template-columns: 1fr; gap: 3px; }
}

/* --- Fortnite-API / cosmetics enrichment --- */
.skin-avatar { overflow: hidden; background: linear-gradient(145deg, #2a3446, #171d29); }
.skin-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; }
.player-dialog { width: min(1040px, calc(100% - 24px)); }
.dialog-hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(330px,.85fr); gap: 18px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dialog-hero .dialog-stats { margin: 0; }
.dialog-skin { width: 112px; height: 130px; min-width: 112px; display: grid; place-items: end center; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: radial-gradient(circle at 50% 25%, #303b52, #151b27 70%); }
.dialog-skin img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center bottom; }
.equipped-skin { margin-top: 9px; }
.equipped-skin small, .equipped-skin strong { display: block; }
.equipped-skin small { color: var(--muted-2); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.equipped-skin strong { margin-top: 2px; font-size: 12px; }
.player-section { padding: 19px 0; border-bottom: 1px solid var(--line); }
.player-section:last-child { border-bottom: 0; padding-bottom: 0; }
.player-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; margin-bottom: 12px; }
.player-section-head h4 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.02em; }
.cosmetics-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 9px; }
.cosmetic-card { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.cosmetic-image { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: radial-gradient(circle at 50% 25%, #303849, #1a202c 72%); }
.cosmetic-image img { width: 100%; height: 100%; display: block; object-fit: contain; }
.cosmetic-image > span { color: var(--muted-2); font-size: 24px; font-weight: 900; }
.cosmetic-card > small, .cosmetic-card > strong, .cosmetic-card > em { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cosmetic-card > small { margin-top: 8px; color: var(--muted-2); font-size: 7px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.cosmetic-card > strong { margin-top: 2px; font-size: 10px; }
.cosmetic-card > em { margin-top: 2px; color: var(--muted); font: normal 7px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.banner-fallback { background: #090b10; }
.public-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.public-stats-grid > div { padding: 12px; border-radius: 10px; background: var(--panel-2); }
.public-stats-grid small, .public-stats-grid strong { display: block; }
.public-stats-grid small { color: var(--muted); font-size: 8px; }
.public-stats-grid strong { margin-top: 3px; font-size: 17px; letter-spacing: -.025em; }
.stats-title { align-items: center; }
.stats-window { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.stats-window button { min-height: 30px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 800; }
.stats-window button.active { background: var(--accent-soft); color: var(--accent); }
.stats-message { min-height: 70px; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 15px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); text-align: center; font-size: 10px; }
.stats-message strong, .stats-message span { display: block; }
.stats-message strong { color: var(--text); }
.stats-message.error { color: #ffc6cf; border-color: rgba(255,101,119,.25); background: rgba(255,101,119,.035); }
.tiny-loader { width: 13px; height: 13px; flex: none; border: 2px solid rgba(255,255,255,.13); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
.battle-pass-line { display: flex; justify-content: space-between; gap: 15px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 9px; }
.battle-pass-line strong { color: var(--accent); }
.empty-state.compact { padding: 18px; }
.technical-player-section { padding-bottom: 0; border-bottom: 0; }

@media (max-width: 900px) {
  .dialog-hero { grid-template-columns: 1fr; }
  .cosmetics-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

@media (max-width: 650px) {
  .dialog-skin { width: 86px; height: 104px; min-width: 86px; }
  .cosmetics-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .public-stats-grid { grid-template-columns: 1fr 1fr; }
  .player-section-head.stats-title { align-items: stretch; flex-direction: column; }
  .stats-window { align-self: flex-start; }
}

@media (max-width: 390px) {
  .cosmetics-grid { grid-template-columns: 1fr 1fr; }
}
