@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #080a0b;
  --panel: #0f1314;
  --panel-2: #15191a;
  --line: #43221d;
  --line-soft: #292e2f;
  --hot: #ff3214;
  --hot-deep: #9c2819;
  --text: #f4f6f4;
  --muted: #939c9d;
  --green: #4ac483;
  --amber: #e4ad49;
  --blue: #65a7d7;
  --danger: #ea6759;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
}

body::before {
  content: "";
  position: fixed;
  inset: 88px 0 0;
  z-index: -1;
  opacity: 0.035;
  background: url("/assets/datamine.png") 88% 48% / min(46vw, 640px) auto no-repeat;
  filter: grayscale(1);
  pointer-events: none;
}

button, input, select { font: inherit; }
button { color: inherit; }

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.shell { min-height: 100vh; }

.masthead {
  min-height: 88px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 12px clamp(18px, 3vw, 44px);
  background: var(--hot);
  color: #fff;
  border-bottom: 1px solid #ff725d;
}

.masthead__mark {
  align-self: stretch;
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(0, 0, 0, 0.32);
  color: #5f170e;
  font-size: 24px;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 4px;
  color: #511208;
  font-size: 11px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1;
  letter-spacing: 0;
}
h1 span { margin-left: 12px; color: #68170c; font-size: 0.42em; vertical-align: middle; }

.sync-state {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 170px;
  justify-content: flex-end;
  font-size: 12px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border: 1px solid #fff;
  background: transparent;
}

.sync-state.is-ready .status-dot { background: #fff; }
.sync-state.is-refreshing .status-dot { animation: blink 1s steps(2, end) infinite; }
.session-command { width:34px; height:34px; display:grid; place-items:center; padding:0; border:1px solid rgba(0,0,0,.28); background:transparent; color:#fff; cursor:pointer; text-decoration:none; }
.session-command:hover { border-color:#fff; }
.session-command svg { width:16px; height:16px; }

main {
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 24px clamp(14px, 2.2vw, 36px) 40px;
}

.clan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 18px;
}

.clan-tabs { display: flex; gap: 0; }

.clan-tab {
  position: relative;
  min-width: 200px;
  height: 56px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  cursor: pointer;
}

.clan-tab + .clan-tab { border-left: 0; }
.clan-tab:hover { background: var(--panel-2); }
.clan-tab.is-active { background: var(--hot); border-color: var(--hot); }
.clan-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 3px;
  background: var(--hot);
}

.clan-sigil {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #4c5354;
  color: var(--muted);
  font-size: 10px !important;
  font-weight: 700;
}
.clan-tab.is-active .clan-sigil { border-color: #fff; color: #fff; }
.clan-tab span { text-align: left; font-size: 16px; font-weight: 700; }
.clan-tab small { color: var(--muted); }
.clan-tab.is-active small { color: #fff; }

.update-block {
  display: grid;
  grid-template-columns: auto 40px;
  grid-template-rows: auto auto;
  column-gap: 14px;
  text-align: right;
}

.update-block__label { color: var(--muted); font-size: 10px; }
.update-block time { font-size: 13px; }
.update-block .icon-button { grid-column: 2; grid-row: 1 / 3; }

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 0;
  background: var(--panel);
  cursor: pointer;
}
.icon-button:hover { border-color: var(--hot); color: var(--hot); }
.icon-button svg { width: 18px; height: 18px; }
.icon-button.is-spinning svg { animation: spin 0.9s linear infinite; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line-soft);
  border-top: 0;
  margin-bottom: 24px;
}

.metric {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 20px;
  background: rgba(15, 19, 20, 0.82);
}
.metric + .metric { border-left: 1px solid var(--line-soft); }
.metric span { margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.metric strong { font-size: clamp(20px, 2.3vw, 30px); color: var(--text); }
.metric:nth-child(3) strong { color: var(--hot); }

.view-tabs {
  display: flex;
  border-bottom: 1px solid var(--line-soft);
}

.view-tab {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-top: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}
.view-tab:hover { color: var(--text); }
.view-tab.is-active { background: var(--hot); color: #fff; border-color: var(--hot); }

.toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
}

.search-control {
  position: relative;
  flex: 1 1 320px;
  max-width: 460px;
}
.search-control svg {
  position: absolute;
  left: 12px;
  top: 10px;
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.search-control input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 40px;
  border: 1px solid var(--line-soft);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
}
.search-control input::placeholder { color: #717879; }

.select-control {
  height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line-soft);
  background: var(--panel);
}
.select-control span { padding-left: 11px; color: var(--muted); font-size: 10px; }
.select-control select {
  height: 36px;
  max-width: 150px;
  border: 0;
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
}

.result-count { margin-left: auto; color: var(--muted); font-size: 11px; }
.result-count span { color: var(--text); font-weight: 700; }

.notice {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border: 1px solid #624d28;
  color: #e8c87d;
  background: #16130d;
  font-size: 12px;
}
.notice svg { width: 16px; height: 16px; flex: 0 0 auto; }

.data-panel {
  position: relative;
  min-height: 420px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 11, 0.92);
}

.table-scroll { overflow: auto; max-height: calc(100vh - 330px); min-height: 420px; }
.roster-table { width: 100%; min-width: 1080px; border-collapse: collapse; table-layout: fixed; }
.roster-table thead { position: sticky; top: 0; z-index: 3; }
.roster-table th {
  height: 48px;
  padding: 0;
  border-right: 1px solid #83291c;
  background: var(--hot);
  color: #fff;
  font-size: 12px;
  text-align: left;
}
.roster-table th button {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: inherit;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}
.roster-table th.is-number, .roster-table td.is-number { text-align: right; }
.roster-table th.is-number button { justify-content: flex-end; }
.roster-table th:first-child, .roster-table td:first-child { width: 44px; text-align: center; }
.roster-table th:nth-child(2) { width: 190px; }
.roster-table th:nth-child(3) { width: 100px; }
.roster-table th:nth-child(4) { width: 64px; }
.roster-table th:nth-child(5) { width: 120px; }
.roster-table th:nth-child(6) { width: 82px; }
.roster-table th:nth-child(7) { width: 92px; }
.roster-table th:nth-child(8) { width: 138px; }
.roster-table th:nth-child(9) { width: 64px; }
.roster-table th:nth-child(10) { width: 76px; }
.roster-table th:nth-child(11) { width: 156px; }

.roster-table td {
  height: 44px;
  padding: 7px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roster-table tr { cursor: pointer; }
.roster-table tbody tr:hover, .roster-table tbody tr.is-selected { background: #1a1110; }
.roster-table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 var(--hot); }
.roster-table tbody tr.is-officer { background: rgba(101, 167, 215, 0.055); }
.roster-table tbody tr.is-master { background: rgba(255, 50, 20, 0.09); }
.roster-table tbody tr.is-podium-1 { background: rgba(228, 173, 73, 0.15); }
.roster-table tbody tr.is-podium-2 { background: rgba(190, 202, 205, 0.12); }
.roster-table tbody tr.is-podium-3 { background: rgba(184, 108, 64, 0.14); }
.roster-table tbody tr.is-podium-1 td:first-child { box-shadow: inset 3px 0 #e4ad49; }
.roster-table tbody tr.is-podium-2 td:first-child { box-shadow: inset 3px 0 #becacd; }
.roster-table tbody tr.is-podium-3 td:first-child { box-shadow: inset 3px 0 #b86c40; }
.rank-index { color: var(--muted); }
.rank-index.is-top { color: var(--hot); font-weight: 700; }
.is-podium-1 .rank-index { color: #e4ad49; }
.is-podium-2 .rank-index { color: #dce4e5; }
.is-podium-3 .rank-index { color: #d58b5e; }
.player-name { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; }
.master-crown { width: 16px; height: 16px; color: #e4ad49; fill: rgba(228, 173, 73, 0.18); flex: 0 0 auto; }
.role, .last-seen { color: #bec5c5; }
.number { font-variant-numeric: tabular-nums; }
.rp { color: #fff; }
.rp-max { color: #c5cbcb; }
.missing { color: #6e7778; }

.league { display: flex; align-items: center; gap: 9px; }
.league img { width: 26px; height: 26px; object-fit: contain; flex: 0 0 auto; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}
.status::before { content: ""; width: 7px; height: 7px; background: currentColor; }
.status--online { color: var(--green); }
.status--recent { color: var(--blue); }
.status--away { color: var(--amber); }
.status--inactive { color: var(--danger); }

.loading-state, .empty-state {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}
.loading-state__line { width: 160px; height: 3px; background: var(--hot); animation: pulse 1.1s steps(2, end) infinite; }
.empty-state svg { width: 34px; height: 34px; color: var(--hot); }
.empty-state strong { color: var(--text); }
.empty-state span { font-size: 12px; }

.mobile-list { display: none; }
.changes-list { min-height: 420px; padding: 18px 20px 34px; }
.changes-summary {
  display: grid;
  grid-template-columns: 150px 230px 1fr;
  gap: 1px;
  margin-bottom: 24px;
  border: 1px solid var(--line-soft);
  background: var(--line-soft);
}
.changes-summary > div, .changes-summary > p { margin: 0; padding: 14px 16px; background: var(--panel); }
.changes-summary div { display: flex; flex-direction: column; gap: 7px; }
.changes-summary span { color: var(--muted); font-size: 9px; }
.changes-summary strong { font-size: 21px; }
.changes-summary p { display: flex; align-items: center; justify-content: flex-end; color: var(--muted); font-size: 10px; }
.change-day { margin: 22px 0 8px; color: var(--muted); font-size: 11px; }
.change-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  border-left: 2px solid var(--line-soft);
  background: rgba(15, 19, 20, 0.5);
}
.change-row--joined { border-left-color: var(--green); }
.change-row--left { border-left-color: var(--danger); }
.change-row--role { border-left-color: var(--blue); }
.change-row--points { border-left-color: var(--amber); }
.change-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-soft); color: var(--muted); }
.change-icon svg { width: 16px; height: 16px; }
.change-copy { min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: baseline; }
.change-type { color: var(--muted); font-size: 11px; }
.change-copy strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.change-copy small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.change-delta { color: var(--green); }
.change-delta.is-negative { color: var(--danger); }

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 0 clamp(14px, 2.2vw, 36px) 24px;
  color: #657071;
  font-size: 10px;
}
footer strong { color: #a7aeaf; }
footer a { color: #a7aeaf; text-decoration: none; }
footer a:hover { color: var(--hot); }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(0, 0, 0, 0.64);
}
.player-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(920px, 100vw);
  height: 100vh;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 160ms ease-out;
  border-left: 1px solid var(--hot);
  background: #0d1011;
}
.player-drawer.is-open { transform: translateX(0); }
.drawer-header {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: var(--hot);
}
.drawer-kicker { color: #64170c; font-size: 10px; font-weight: 700; }
.drawer-header h2 { margin: 6px 0 0; font-size: 26px; overflow-wrap: anywhere; }
.drawer-header .icon-button { border-color: #a12112; background: transparent; }
.drawer-header .icon-button:hover { color: #fff; border-color: #fff; }
.profile-top {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(320px, 0.85fr);
  border-bottom: 1px solid var(--line-soft);
  background: #111516;
}
.profile-identity {
  min-height: 174px;
  display: flex;
  align-items: center;
  padding: 24px 28px;
  overflow: hidden;
}
.profile-achievement { width: 100%; min-width: 0; display: flex; align-items: center; }
.profile-badge-stack { position: relative; z-index: 2; width: 112px; height: 112px; flex: 0 0 112px; margin-right: -24px; }
.profile-badge, .profile-mark { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.profile-mark { z-index: 2; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8)); }
.profile-stripe-wrap { position: relative; min-width: 0; height: 112px; flex: 1; display: flex; align-items: center; overflow: hidden; }
.profile-stripe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.profile-identity__copy { min-width: 0; }
.profile-stripe-wrap .profile-identity__copy { position: relative; z-index: 1; padding: 16px 24px 16px 32px; text-shadow: 0 2px 4px #000, 0 0 12px #000; }
.profile-identity__copy > span { display: block; color: #d4d8d8; font-size: 9px; }
.profile-identity__copy > strong { display: block; margin-top: 8px; overflow-wrap: anywhere; color: #fff; font-size: 25px; }
.profile-identity__copy > strong b { color: #ffb08f; font-size: 17px; }
.profile-identity__copy small { display: block; margin-top: 5px; color: #d4d8d8; }
.profile-overview { padding: 24px 28px; border-left: 1px solid var(--line-soft); background: #0f1213; }
.profile-overview h3 { margin: 0 0 20px; font-size: 12px; }
.profile-overview .drawer-grid { height: calc(100% - 32px); }
.profile-overview .drawer-stat { align-self: center; }
.drawer-section { padding: 22px 28px; border-bottom: 1px solid var(--line-soft); }
.drawer-section h3 { margin: 0 0 14px; font-size: 14px; }
.drawer-section__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.drawer-section__heading span { color: var(--muted); font-size: 9px; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.drawer-stat span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; }
.drawer-stat strong { font-size: 17px; }
.profile-overview .drawer-stat strong { font-size: 19px; }
.profile-overview .status { font-size: 16px; font-weight: 700; }
.profile-overview .status::before { width: 9px; height: 9px; }
.drawer-section--season h3 { margin-bottom: 12px; }
.season-layout {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) repeat(4, minmax(82px, 0.7fr)) minmax(158px, 1fr);
  gap: 1px;
  border: 1px solid var(--line-soft);
  background: var(--line-soft);
}
.season-layout > * { min-width: 0; min-height: 82px; padding: 12px 14px; background: var(--panel); }
.season-layout > .drawer-stat { display: flex; flex-direction: column; justify-content: center; }
.season-layout .drawer-stat strong { font-size: 18px; }
.drawer-stat--activity strong { font-size: 12px !important; line-height: 1.45; }
.drawer-league { display: flex; align-items: center; gap: 12px; }
.drawer-league img { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; }
.drawer-league strong, .drawer-league .missing { display: block; }
.drawer-league strong { font-size: 14px; }
.drawer-league .missing { margin-top: 5px; font-size: 10px; }
.profile-detail-grid { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line-soft); }
.profile-detail-grid > .drawer-section { border-bottom: 0; }
.profile-detail-grid > .drawer-section + .drawer-section { border-left: 1px solid var(--line-soft); }
.profile-detail-grid > .drawer-section:only-child { grid-column: 1 / -1; }
.profile-detail-grid:empty { display: none; }
.rank-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.rank-panels--single { grid-template-columns: 1fr; }
.rank-panel { min-height: 92px; display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--panel); }
.rank-panel > img, .rank-panel__icon { width: 58px; height: 58px; object-fit: contain; flex: 0 0 auto; }
.rank-panel span { display: block; color: var(--muted); font-size: 9px; }
.rank-panel strong { display: block; margin-top: 5px; font-size: 13px; }
.rank-panel small { display: block; margin-top: 3px; color: var(--hot); font-size: 10px; }
.combat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.combat-mode { padding: 14px; border-left: 2px solid var(--hot); background: #15191a; }
.combat-mode > span { color: var(--muted); font-size: 9px; }
.combat-mode > strong { display: block; margin: 5px 0 3px; color: var(--hot); font-size: 24px; }
.combat-mode > small { color: var(--muted); font-size: 9px; }
.mode-legend { display: flex; gap: 20px; margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.mode-legend span { display: flex; align-items: center; gap: 7px; }
.mode-legend i { width: 8px; height: 8px; background: var(--blue); }
.mode-legend i.is-pve { background: var(--hot); }
.mode-bar { height: 7px; display: flex; overflow: hidden; background: #252a2b; }
.mode-bar i { background: var(--blue); }
.mode-bar b { background: var(--hot); }
.class-list { display: grid; gap: 9px; margin-top: 18px; }
.class-row { display: grid; grid-template-columns: 24px 92px 1fr 54px; align-items: center; gap: 10px; }
.class-row__icon { width: 22px; height: 22px; object-fit: contain; }
.class-row > span, .class-row > strong { font-size: 10px; }
.class-row > strong { text-align: right; }
.class-row > i { height: 4px; overflow: hidden; background: #252a2b; }
.class-row > i b { display: block; height: 100%; background: var(--hot); }
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.skills-grid > div { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.skills-grid span { color: var(--muted); font-size: 10px; }
.skills-grid strong { color: var(--hot); font-size: 11px; text-align: right; }
.profile-records { border-top: 1px solid var(--line-soft); }
.profile-records > div { min-height: 42px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--line-soft); }
.profile-records span { color: var(--muted); font-size: 10px; }
.profile-records strong { max-width: 330px; text-align: right; font-size: 11px; overflow-wrap: anywhere; }
.drawer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid var(--hot);
  color: var(--text);
  text-decoration: none;
}
.drawer-link:hover { background: var(--hot); }
.drawer-link svg { width: 17px; height: 17px; }

.history-state { margin: 0; min-height: 70px; display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; }
.trend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trend-card { min-width: 0; border: 1px solid var(--line-soft); background: var(--panel); }
.trend-card header { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.trend-card header span { color: var(--muted); font-size: 9px; }
.trend-card header strong { color: var(--green); font-size: 11px; }
.trend-card header strong.is-negative { color: var(--danger); }
.trend-canvas { position: relative; height: 150px; padding: 8px; }
.trend-missing { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 10px; }

.admin-dialog {
  width: min(460px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--hot);
  border-radius: 0;
  background: #0d1011;
  color: var(--text);
}
.admin-dialog::backdrop { background: rgba(0, 0, 0, 0.76); }
.admin-dialog form { margin: 0; }
.admin-dialog__header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; background: var(--hot); }
.admin-dialog__header span { color: #64170c; font-size: 9px; font-weight: 700; }
.admin-dialog__header h2 { margin: 5px 0 0; font-size: 17px; }
.admin-dialog__header .icon-button { border-color: #a12112; background: transparent; }
.admin-field { display: grid; gap: 8px; padding: 22px 18px 12px; }
.admin-field span { color: var(--muted); font-size: 10px; }
.admin-field input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-soft); border-radius: 0; background: var(--panel); color: var(--text); }
.admin-error { margin: 0 18px 12px; color: var(--danger); font-size: 11px; }
.command-button { width: calc(100% - 36px); min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 9px; margin: 8px 18px 20px; border: 1px solid var(--hot); border-radius: 0; background: var(--hot); color: #fff; cursor: pointer; font-weight: 700; }
.command-button:hover { background: #d92d13; }
.command-button svg { width: 17px; height: 17px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { background: #fff; } }
@keyframes pulse { 50% { opacity: 0.25; } }

@media (max-width: 900px) {
  .masthead { grid-template-columns: 34px 1fr; min-height: 78px; }
  .sync-state > .status-dot, .sync-state > #sync-label { display: none; }
  .sync-state { min-width:auto; }
  .clan-bar { align-items: stretch; flex-direction: column; }
  .clan-tabs { width: 100%; }
  .clan-tab { flex: 1; min-width: 0; }
  .update-block { align-self: flex-end; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--line-soft); }
  .metric:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .view-tabs { overflow-x: auto; }
  .view-tab { flex: 0 0 auto; padding: 0 16px; }
  .toolbar { flex-wrap: wrap; }
  .search-control { max-width: none; flex-basis: 100%; }
  .result-count { align-self: center; }
  .table-scroll { display: none !important; }
  .mobile-list { display: block; }
  .player-card {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
  }
  .player-card:hover { background: #1a1110; }
  .player-card.is-officer { background: rgba(101, 167, 215, 0.055); }
  .player-card.is-master { background: rgba(255, 50, 20, 0.09); }
  .player-card.is-podium-1 { border-left: 3px solid #e4ad49; background: rgba(228, 173, 73, 0.15); }
  .player-card.is-podium-2 { border-left: 3px solid #becacd; background: rgba(190, 202, 205, 0.12); }
  .player-card.is-podium-3 { border-left: 3px solid #b86c40; background: rgba(184, 108, 64, 0.14); }
  .player-card__top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .player-card__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
  .player-card__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
  .player-card__meta div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
  .player-card__meta strong { color: var(--text); }
  .changes-list { padding-inline: 14px; }
  .changes-summary { grid-template-columns: 1fr 1fr; }
  .changes-summary p { grid-column: 1 / -1; justify-content: flex-start; }
  .profile-top { grid-template-columns: 1fr; }
  .profile-identity { min-height: 148px; }
  .profile-overview { border-top: 1px solid var(--line-soft); border-left: 0; }
  .season-layout { grid-template-columns: repeat(4, 1fr); }
  .season-layout .drawer-league, .season-layout .drawer-stat--activity { grid-column: span 2; }
}

@media (max-width: 560px) {
  .masthead { padding-inline: 14px; gap: 10px; }
  .masthead__mark { font-size: 17px; }
  .eyebrow { font-size: 9px; }
  h1 { font-size: 20px; }
  h1 span { display: block; margin: 5px 0 0; font-size: 9px; }
  main { padding-top: 14px; }
  .clan-tab { height: 52px; grid-template-columns: 28px 1fr; padding: 7px 9px; }
  .clan-sigil { width: 26px; height: 26px; }
  .clan-tab span { font-size: 13px; }
  .clan-tab small { display: none; }
  .update-block { width: 100%; }
  .metrics { margin-bottom: 16px; }
  .metric { min-height: 72px; padding: 10px 12px; }
  .metric strong { font-size: 20px; }
  .select-control { flex: 1; }
  .select-control select { width: 100%; min-width: 0; }
  .result-count { width: 100%; text-align: right; }
  footer { flex-direction: column; }
  .trend-grid { grid-template-columns: 1fr; }
  .profile-identity { padding: 18px 16px; }
  .profile-badge-stack { width: 84px; height: 84px; flex-basis: 84px; margin-right: -18px; }
  .profile-stripe-wrap { height: 84px; }
  .profile-stripe-wrap .profile-identity__copy { padding: 12px 14px 12px 24px; }
  .profile-identity__copy > strong { font-size: 20px; }
  .profile-overview { padding: 20px 22px; }
  .drawer-section { padding: 20px 22px; }
  .season-layout { grid-template-columns: 1fr 1fr; }
  .season-layout .drawer-league, .season-layout .drawer-stat--activity { grid-column: 1 / -1; }
  .profile-detail-grid { grid-template-columns: 1fr; }
  .profile-detail-grid > .drawer-section + .drawer-section { border-top: 1px solid var(--line-soft); border-left: 0; }
  .rank-panels, .combat-grid, .skills-grid { grid-template-columns: 1fr; }
  .class-row { grid-template-columns: 22px 78px 1fr 48px; gap: 7px; }
  .profile-records > div { grid-template-columns: 1fr; gap: 5px; padding: 9px 0; }
  .profile-records strong { max-width: none; text-align: left; }
  .changes-list { padding-inline: 10px; }
  .change-row { grid-template-columns: 34px 1fr; }
  .change-delta { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
