/* GoldenDupe stats. The store's warm neutrals and fonts, gold as the only accent. Rank prefixes are drawn in the
   game's own font (mcfont.js), so names look the way they do in chat. */
:root {
  --deep: #12110f;
  --bg: #161513;
  --card: #1c1a18;
  --raised: #262421;
  --text: #efe9de;
  --text-2: #aaa398;
  --muted: #8a847a;
  --line: rgba(239, 233, 222, 0.08);
  --line-2: rgba(239, 233, 222, 0.14);
  --gold: #f5c542;
  --gold-ink: #1b1305;
  --pos: #4cc38a;
  --neg: #e5484d;
  --ui: "Figtree", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/20px var(--ui); min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sec { color: var(--text-2); }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; background: rgba(22, 21, 19, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1440px; margin: 0 auto; height: 60px; padding: 0 32px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; white-space: nowrap; }
.brand-sub { color: var(--muted); font-weight: 400; }
.mark { width: 18px; height: 12px; background: var(--gold); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.nav { display: flex; gap: 4px; }
.nav a { height: 32px; padding: 0 12px; display: flex; align-items: center; border-radius: 8px; color: var(--text-2); transition: color 140ms var(--ease), background-color 140ms var(--ease); }
.nav a:hover { color: var(--text); background: var(--card); }
.nav a[aria-current="page"] { color: var(--text); background: var(--raised); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.find { position: relative; margin-left: auto; width: 240px; min-width: 0; display: flex; align-items: center; }
.find .i { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.find input { width: 100%; height: 36px; padding: 0 12px 0 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); outline: none; transition: border-color 140ms var(--ease); }
.find input::placeholder { color: var(--muted); }
.find input:focus { border-color: var(--line-2); }
.find-list { position: absolute; top: 44px; left: 0; right: 0; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 4px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); }
.find-list a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px; border-radius: 8px; }
.find-list a:hover, .find-list a.on { background: var(--raised); }
.find-list .none { padding: 8px; color: var(--muted); }
.ip { height: 36px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); cursor: pointer; font-family: var(--mono); font-size: 13px; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); transition: border-color 140ms var(--ease), transform 120ms var(--ease); }
.ip:hover { border-color: var(--line-2); }
.ip:active { transform: scale(0.98); }
.ip .i { color: var(--muted); }

/* page */
.page { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 40px 32px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 500; }
.page-head p { margin: 8px 0 0; color: var(--text-2); }
.enter { animation: rise 360ms var(--ease) both; }
.enter:nth-child(2) { animation-delay: 50ms; } .enter:nth-child(3) { animation-delay: 100ms; } .enter:nth-child(4) { animation-delay: 150ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .enter { animation: none; } }

.live { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-family: var(--mono); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 3px rgba(76, 195, 138, 0.16); }
.dot.off { background: var(--muted); box-shadow: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 500; }
.card-head .meta { color: var(--muted); font-family: var(--mono); font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; min-width: 0; }
.stat .label { color: var(--text-2); font-size: 13px; }
.stat .fig { margin-top: 12px; font: 500 30px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.stat .fig.gold { color: var(--gold); }
.stat .note { margin-top: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up { color: var(--pos); } .down { color: var(--neg); }

.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; margin-bottom: 16px; }
.grid-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); gap: 16px; margin-bottom: 16px; }
.full { margin-bottom: 16px; }

.tip { position: absolute; pointer-events: none; background: var(--raised); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; font: 400 12px/16px var(--mono); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity 120ms var(--ease); }
.tip.on { opacity: 1; }
.tip b { font-weight: 500; color: var(--text); }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 2px; background: var(--text-2); display: inline-block; }
.legend i.gold { background: var(--gold); }
.legend i.dim { background: var(--muted); }

/* names drawn in the game font */
.mc-line { display: inline-block; line-height: 1; white-space: nowrap; font-size: 16px; vertical-align: middle; }
.mc-line.small { font-size: 12px; }
.mc-line.big { font-size: 28px; }
.mc-r { line-height: 0; }
.mc-cv { display: block; image-rendering: pixelated; }
.mc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.head { width: 24px; height: 24px; border-radius: 4px; image-rendering: pixelated; background: var(--raised); flex: none; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; }

/* lists and tables */
.rows { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.rows li > a, .rows li > div { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 8px; border-radius: 8px; transition: background-color 140ms var(--ease); }
.rows li > a:hover { background: var(--raised); }
.rows .pos { width: 24px; color: var(--muted); font: 400 12px var(--mono); text-align: right; flex: none; }
.rows .val { margin-left: auto; font: 400 13px var(--mono); font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.rows .val b { color: var(--text); font-weight: 500; }
.scroll { max-height: 300px; overflow-y: auto; margin: 0 -8px; padding: 0 8px; scrollbar-width: thin; scrollbar-color: var(--raised) transparent; }
.bar { height: 4px; border-radius: 2px; background: var(--raised); overflow: hidden; width: 96px; flex: none; }
.bar i { display: block; height: 100%; background: var(--text-2); border-radius: 2px; }
.bar.gold i { background: var(--gold); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12px; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { height: 44px; padding: 0 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.n { color: var(--text-2); }
th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; color: var(--muted); border-radius: 4px; }
th button:hover { color: var(--text); }
th button[aria-sort] { color: var(--text); }
th button[aria-sort]::after { content: ""; width: 0; height: 0; border: 4px solid transparent; border-top-color: var(--gold); margin-top: 4px; }
tbody tr { transition: background-color 140ms var(--ease); }
tbody tr.go { cursor: pointer; }
tbody tr.go:hover { background: rgba(239, 233, 222, 0.03); }
.table-wrap { overflow-x: auto; margin: 0 -24px -24px; padding: 0 12px 12px; }

.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; display: inline-flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--deep); border: 1px solid var(--line); }
.tabs button { flex: none; white-space: nowrap; height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--text-2); cursor: pointer; font-size: 13px; transition: color 140ms var(--ease), background-color 140ms var(--ease); }
.tabs button:hover { color: var(--text); }
.tabs button[aria-pressed="true"] { background: var(--raised); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.field { height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--deep); outline: none; width: 220px; }
.field:focus { border-color: var(--line-2); }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 0; color: var(--muted); font-size: 13px; }
.btn { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); cursor: pointer; transition: border-color 140ms var(--ease), opacity 140ms var(--ease); }
.btn:hover { border-color: var(--line-2); }
.btn:disabled { opacity: 0.4; cursor: default; }

.outcome { font: 400 12px var(--mono); }
.outcome.win { color: var(--pos); } .outcome.loss { color: var(--neg); } .outcome.draw { color: var(--muted); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--raised); color: var(--text-2); font: 400 11px var(--mono); }
.tag.ban { color: var(--neg); } .tag.mute { color: var(--gold); }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* player and clan profile */
.profile { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 32px; }
.skin { height: 300px; display: flex; align-items: flex-end; justify-content: center; background: linear-gradient(#1f1d1a, #191816); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; position: relative; }
.skin img { height: 260px; image-rendering: pixelated; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.45)); position: relative; }
.skin::after { content: ""; position: absolute; bottom: 18px; width: 120px; height: 14px; border-radius: 50%; background: rgba(0, 0, 0, 0.35); filter: blur(6px); }
.profile h1 { margin: 0; font-weight: 500; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; color: var(--text-2); }
.facts span { display: inline-flex; align-items: center; gap: 8px; }
.facts .i { color: var(--muted); }
.places { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.place { height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.place b { font: 500 13px var(--mono); color: var(--text); }
.place.top b { color: var(--gold); }
.record { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--raised); gap: 2px; margin: 16px 0 12px; }
.record i { display: block; height: 100%; }
.record .w { background: var(--gold); } .record .l { background: var(--text-2); opacity: 0.5; } .record .d { background: var(--muted); opacity: 0.4; }
.record-key { display: flex; gap: 16px; color: var(--muted); font-size: 13px; }
.record-key b { color: var(--text); font: 500 13px var(--mono); }
.clan-name { font-size: 32px; line-height: 1.15; font-weight: 500; display: flex; align-items: center; gap: 12px; }

/* duels, clan wars feed */
.rows li > div.duel { height: auto; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px; }
.duel-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.duel-who .who { overflow: visible; }
.duel-meta { color: var(--muted); font: 400 12px var(--mono); padding-left: 34px; }
.duel-meta b { color: var(--text-2); font-weight: 500; }
.duel-meta.clan { padding-left: 18px; }
/* compare */
.cmp-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; margin-bottom: 24px; }
.cmp-side { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.cmp-side img { height: 180px; image-rendering: pixelated; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.45)); }
.cmp-vs { color: var(--muted); font-family: var(--mono); padding-bottom: 32px; }
table.cmp td { width: 40%; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text-2); }
table.cmp td.cmp-label { width: 20%; text-align: center; font-family: var(--ui); color: var(--muted); font-size: 13px; }
table.cmp td.lead { color: var(--gold); }
/* staff heatmap */
.hm { display: grid; grid-template-columns: 40px repeat(24, minmax(0, 1fr)); gap: 3px; }
.hm-h { color: var(--muted); font: 400 11px var(--mono); height: 16px; }
.hm-day { color: var(--text-2); font-size: 12px; display: flex; align-items: center; }
.hm-cell { aspect-ratio: 1.6; min-height: 14px; border-radius: 3px; background: rgba(239, 233, 222, calc(var(--a) * 0.55)); }
.hm-cell.top { background: var(--gold); }
.head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.empty { padding: 48px 24px; text-align: center; color: var(--text-2); }
.empty h2 { color: var(--text); font-weight: 500; font-size: 18px; margin: 0 0 8px; }
.empty p { margin: 0 auto; max-width: 32rem; }
.signin { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; background: var(--text); color: var(--deep); font-weight: 500; transition: opacity 140ms var(--ease), transform 120ms var(--ease); }
.signin:hover { opacity: 0.9; } .signin:active { transform: scale(0.98); }
.live a { text-decoration: underline; text-underline-offset: 2px; }
.skeleton { height: 120px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }

.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 20px 32px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; font-family: var(--mono); }

/* zoomable time charts (charts.js) */
.tc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tc-side { display: flex; align-items: center; gap: 12px; }
.tc-res { color: var(--muted); font-size: 12px; }
.tc-dates { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--deep); }
.tc-dates[hidden] { display: none; }
.tc-dates label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
.tc-dates .field { width: 160px; color-scheme: dark; }
.tc-plot { position: relative; touch-action: pan-y; cursor: crosshair; user-select: none; -webkit-user-select: none; border-radius: 8px; transition: opacity 140ms var(--ease); }
.tc-plot.busy { opacity: 0.7; }
.tc-plot svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tc-plot .grid line { stroke: var(--line); }
.tc-plot .grid line.v { stroke: rgba(239, 233, 222, 0.04); }
.tc-plot .grid line.dash { stroke-dasharray: 2 4; stroke: var(--line-2); }
.tc-plot .axis text { fill: var(--muted); font: 400 11px var(--mono); }
.tc-plot .line { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.tc-plot .line.dash { stroke-dasharray: 3 4; }
.tc-plot .line.tone0 { stroke: var(--gold); stroke-width: 2; }
.tc-plot .line.tone1 { stroke: var(--text-2); }
.tc-plot .line.tone2 { stroke: var(--muted); }
.tc-plot .line.tone3 { stroke: #6f6a62; }
.tc-plot .area { stroke: none; }
.tc-plot .area.tone0 { fill: rgba(245, 197, 66, 0.10); }
.tc-plot .area.tone1, .tc-plot .area.tone2, .tc-plot .area.tone3 { fill: rgba(239, 233, 222, 0.05); }
.tc-plot .bars.tone0 rect { fill: var(--gold); }
.tc-plot .bars.tone1 rect { fill: var(--text-2); opacity: 0.6; }
.tc-plot .bars.tone2 rect { fill: var(--muted); opacity: 0.6; }
.tc-plot .bars.tone3 rect { fill: #6f6a62; }
.tc-plot .bars rect.hl { fill: var(--gold); opacity: 1; }
.tc-plot rect.seg.tone0 { fill: var(--gold); } .tc-plot rect.seg.tone1 { fill: var(--text-2); } .tc-plot rect.seg.tone2 { fill: var(--muted); } .tc-plot rect.seg.tone3 { fill: #6f6a62; } .tc-plot rect.seg.tone4 { fill: #4a4640; }
i.tone4 { background: #4a4640; }
.tc-plot .strip { fill: none; stroke: var(--muted); stroke-width: 1.25; }
.tc-plot .strip-low { fill: var(--neg); }
.tc-plot .incident { fill: rgba(229, 72, 77, 0.08); }
.tc-plot .cursor { stroke: var(--line-2); }
.tc-plot .pin { stroke: var(--card); stroke-width: 2; }
.tc-plot .pin.tone0 { fill: var(--gold); } .tc-plot .pin.tone1 { fill: var(--text-2); } .tc-plot .pin.tone2, .tc-plot .pin.tone3 { fill: var(--muted); }
.tc-plot:focus-visible { outline-offset: 4px; }
.tc-sel { position: absolute; top: 12px; bottom: 28px; background: rgba(245, 197, 66, 0.08); border-left: 1px solid rgba(245, 197, 66, 0.5); border-right: 1px solid rgba(245, 197, 66, 0.5); pointer-events: none; }
.tc-sel[hidden], .tc-empty[hidden] { display: none; }
.tc-empty { position: absolute; inset: 0 0 28px 44px; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; pointer-events: none; }
.tc .tip { transform: translateX(-50%); min-width: 168px; }
.tc .tip > div { display: flex; align-items: center; gap: 8px; }
.tc .tip .tip-when { color: var(--text-2); margin-bottom: 4px; }
.tc .tip b { margin-left: auto; padding-left: 16px; }
.tc .tip i, .tc-legend i { width: 10px; height: 2px; border-radius: 1px; display: inline-block; flex: none; }
.tc .tip i.bar, .tc-legend i.bar { height: 8px; width: 8px; border-radius: 2px; }
i.tone0 { background: var(--gold); } i.tone1 { background: var(--text-2); } i.tone2 { background: var(--muted); } i.tone3 { background: #6f6a62; }
i.strip { background: var(--muted); }
.tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 12px; }
.tc-legend button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; border-radius: 4px; transition: color 140ms var(--ease), opacity 140ms var(--ease); }
.tc-legend button[aria-pressed="false"] { opacity: 0.4; }
.tc-legend button:hover { color: var(--text); }
.tc-legend button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tc-hint { color: var(--muted); font-size: 12px; }
.tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* leaderboards, records, recap, staff extras */
.boards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.boards .card.wide { grid-column: span 2; }
.rows li.me > a, .rows li.me > div { background: rgba(245, 197, 66, 0.08); box-shadow: inset 2px 0 0 var(--gold); }
.rows .pos.gold { color: var(--gold); }
.note-line { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; border: 1px solid var(--line); color: var(--text-2); font-size: 13px; background: var(--card); }
.chip b { font: 500 13px var(--mono); color: var(--text); }
.chip.gold { border-color: rgba(245, 197, 66, 0.35); } .chip.gold b { color: var(--gold); }
.record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.record-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.record-row:last-child { border-bottom: 0; }
.record-row .what { color: var(--text-2); font-size: 13px; }
.record-row .fig { font: 500 22px/1 var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.record-row .fig.gold { color: var(--gold); }
.record-row .by { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; min-width: 0; }
.recap-hero { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; margin-bottom: 16px; }
.recap-top { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: end; }
.recap-top img { height: 160px; image-rendering: pixelated; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.45)); }
.recap-top .big { font: 500 44px/1 var(--mono); color: var(--gold); margin: 12px 0 4px; }
select.field { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.share { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin: 4px 0 16px; background: var(--raised); }
.share i { display: block; height: 100%; }
.cohort { display: grid; grid-template-columns: 112px minmax(0, 1fr) 72px; align-items: center; gap: 12px; height: 32px; font-size: 13px; }
.cohort .bar { width: 100%; height: 6px; }
.ret-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.ret-sum div { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.ret-sum .sec { font-size: 13px; }
.ret-sum b { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.search-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.search-row .field { width: 100%; }
.search-row label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; min-width: 0; }
.search-row label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; height: 36px; margin-top: auto; }
.check input { accent-color: var(--gold); }
.budget { height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; margin: 12px 0 8px; }
.budget i { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
.budget.over i { background: var(--neg); }
.nav-more { position: relative; }
.nav-more > button { height: 32px; padding: 0 12px; display: flex; align-items: center; gap: 6px; border-radius: 8px; color: var(--text-2); background: none; border: 0; cursor: pointer; transition: color 140ms var(--ease), background-color 140ms var(--ease); }
.nav-more > button:hover, .nav-more > button[aria-expanded="true"] { color: var(--text); background: var(--card); }
.nav-more > button[aria-current="page"] { color: var(--text); background: var(--raised); }
.nav-menu { position: fixed; min-width: 180px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 4px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); z-index: 20; }
.nav-menu[hidden] { display: none; }
.nav-menu a { display: flex; height: 36px; align-items: center; padding: 0 10px; border-radius: 8px; color: var(--text-2); }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { background: var(--raised); color: var(--text); }

@media (max-width: 1080px) {
  .boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recap-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .boards, .record-grid { grid-template-columns: minmax(0, 1fr); }
  .boards .card.wide { grid-column: auto; }
  .search-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-hint { display: none; }
  .tc-ranges button { padding: 0 7px; }
  .recap-top { grid-template-columns: 80px minmax(0, 1fr); gap: 16px; }
  .recap-top img { height: 110px; }
  .recap-top .big { font-size: 32px; }
}

@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-split { grid-template-columns: minmax(0, 1fr); }
  .find { width: 200px; }
}
@media (max-width: 1240px) {
  .ip { display: none; }
  .find { width: 180px; }
}
@media (max-width: 1000px) {
  .top-in { padding: 0 16px; gap: 12px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav-more { position: static; }
  .find { order: 2; width: auto; flex: 1; margin-left: 0; }
}
@media (max-width: 760px) {
  .top-in { padding: 0 16px; gap: 12px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .find { order: 2; width: auto; flex: 1; margin-left: 0; }
  .ip { display: none; }
  .page { padding: 24px 16px 48px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1, .clan-name { font-size: 28px; }
  .stats { gap: 12px; }
  .stat { padding: 16px; }
  .stat .fig { font-size: 24px; }
  .stat .note { white-space: normal; }
  .rows .val .muted { display: none; }
  .legend { flex-wrap: wrap; gap: 4px 12px; }
  .card { padding: 16px; border-radius: 14px; }
  .table-wrap { margin: 0 -16px -16px; padding: 0 4px 8px; }
  .chart { height: 220px; }
  .profile { grid-template-columns: 1fr; gap: 20px; }
  .skin { height: 220px; } .skin img { height: 190px; }
  .hide-sm { display: none; }
  .head-side { align-items: flex-start; }
  .cmp-side img { height: 120px; }
  .hm { grid-template-columns: 32px repeat(24, minmax(0, 1fr)); gap: 2px; }
  .hm-cell { min-height: 10px; }
  .bars { gap: 2px; }
  .foot-in { flex-direction: column; padding: 16px; }
}

/* reports, trades and staff actions (pages5.js) */
.tag.flag { color: var(--gold); } .tag.flag.bad { color: var(--neg); } .tag.ok { color: var(--pos); }
.nowrap { white-space: nowrap; }
