/* fonts:start */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./assets/fonts/dm-sans-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./assets/fonts/dm-sans-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./assets/fonts/dm-sans-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./assets/fonts/dm-sans-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./assets/fonts/dm-sans-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./assets/fonts/dm-sans-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./assets/fonts/dm-sans-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./assets/fonts/dm-sans-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./assets/fonts/prompt-400-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./assets/fonts/prompt-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./assets/fonts/prompt-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./assets/fonts/prompt-500-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./assets/fonts/prompt-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./assets/fonts/prompt-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./assets/fonts/prompt-600-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./assets/fonts/prompt-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./assets/fonts/prompt-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* fonts:end */

/* tokens:start */
:root {
  color-scheme: dark;
  /* Typography families */
  --sans: "DM Sans", "Prompt", Arial, sans-serif;
  --mono: "Fira Code", ui-monospace, Consolas, monospace;
  /* Palette */
  --background: #080910;
  --surface: #10121d;
  --surface-hover: #161927;
  --border: #25283a;
  --text: #f2f3ff;
  --muted: #b0b3c9;
  --accent: #a6b2ff;
  --accent-text: #d0d8ff;
  --accent-surface: #141936;
  --control-surface: #c5ceff;
  --control-text: #131834;
  --success: #8fe3b0;
  --danger: #ff9aa8;
  /* Corner radii */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-control: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  /* Type scale */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 19px;
  --text-2xl: 23px;
  --text-3xl: 25px;
  --text-display: 42px;
  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  /* Layout constants */
  --target-size: 44px;
  --header-height: 67px;
  --measure: 72ch;
}
/* tokens:end */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

::selection { background: var(--control-surface); color: var(--control-text); }

.mono { font-family: var(--mono); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 4;
  top: var(--space-3);
  left: var(--space-3);
  transform: translateY(-160%);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--text);
  color: var(--background);
  font-weight: 600;
}
.skip-link:focus { transform: translateY(0); }

/* ---------------------------------------------------------------- chrome */

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.header-inner {
  display: flex;
  width: min(1240px, calc(100% - 48px));
  min-height: 56px;
  margin-inline: auto;
  align-items: center;
  gap: var(--space-4);
}

.wordmark {
  display: inline-flex;
  min-height: var(--target-size);
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -.03em;
}
.brand-mark { width: 18px; height: 18px; fill: var(--accent); }

.header-note {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: var(--text-sm);
}

.status-pill {
  padding: 2px var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--accent-surface);
  color: var(--accent-text);
  font-size: var(--text-xs);
  font-weight: 600;
}

/* ------------------------------------------------------------------ page */

main { display: block; }

.page-head {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: var(--space-6) var(--space-2);
}

.page-head h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.page-head h1 .by { color: var(--accent-text); font-weight: 600; }

.lede {
  max-width: var(--measure);
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--text-base);
  text-wrap: pretty;
}

.tabs {
  display: flex;
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border);
}

.tab {
  display: inline-flex;
  min-height: var(--target-size);
  align-items: center;
  padding: 0 var(--space-3);
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: color 160ms ease, border-color 160ms ease;
}
.tab:hover { color: var(--text); }
.tab[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.view[hidden] { display: none; }
.view-panel { width: min(1240px, calc(100% - 48px)); margin-inline: auto; margin-block: var(--space-5) var(--space-7); }

.toolbar {
  display: flex;
  margin-bottom: var(--space-3);
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.search { margin-inline-start: auto; }
.search-input {
  min-width: 200px;
  min-height: var(--target-size);
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-hover);
  color: var(--text);
  font-size: var(--text-sm);
}
.search-input::placeholder { color: var(--muted); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: var(--space-2);
}

.card {
  position: relative;
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-hover);
}

.card-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--accent-surface);
  object-fit: contain;
}
.card-img--empty {
  display: grid;
  place-items: center;
  color: var(--accent-text);
  font-size: var(--text-lg);
  font-weight: 700;
}

.card-count {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  padding: 1px var(--space-1);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.card-name {
  overflow: hidden;
  font-size: var(--text-xs);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-meta { color: var(--muted); font-size: var(--text-xs); }

.bag {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--space-2);
}

.bag-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-hover);
}

.bag-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--accent-surface);
  color: var(--accent-text);
  font-size: var(--text-sm);
  font-weight: 700;
}

.bag-body { display: grid; min-width: 0; gap: 1px; }
.bag-name {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bag-count { font-size: var(--text-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.bag-rarity { color: var(--accent-text); font-size: var(--text-xs); font-weight: 600; }

.drops-head,
.drop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 70px 90px 110px;
  align-items: center;
  gap: var(--space-3);
}

.drops-head {
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-xs);
}
.drops-head span:not(:first-child) { text-align: right; }

.drop {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.drop:last-child { border-bottom: 0; }

.drop-name { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.drop-icon { width: 24px; height: 24px; flex: none; border-radius: var(--radius-sm); object-fit: contain; }
.drop-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); font-weight: 600; }
.drop-total, .drop-times, .drop-avg { text-align: right; font-size: var(--text-sm); }
.drop-total { color: var(--text); font-weight: 700; }
.drop-times, .drop-avg { color: var(--muted); }
.drop-last { color: var(--muted); font-size: var(--text-xs); text-align: right; }

.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: var(--space-5) var(--space-7);
  gap: var(--space-5);
  align-items: start;
}

.rail {
  position: sticky;
  top: calc(var(--space-5) + 56px);
  display: grid;
  gap: var(--space-3);
}

/* --------------------------------------------------------------- surfaces */

.panel {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.panel-head h2 { font-size: var(--text-sm); font-weight: 600; color: var(--muted); }
.panel-note { color: var(--muted); font-size: var(--text-xs); }

.profile-head {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  display: grid;
  width: 200px;
  height: 200px;
  padding: var(--space-2);
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--accent-surface);
}
.profile-avatar { width: 100%; height: 100%; object-fit: contain; }
.profile-fallback {
  color: var(--accent-text);
  font-size: var(--text-3xl);
  font-weight: 700;
}

.profile-name { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -.02em; }
.profile-handle {
  margin-top: var(--space-1);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: var(--text-sm);
}
.profile-meta {
  max-width: 60ch;
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
}
.profile-link {
  display: inline-flex;
  min-height: var(--target-size);
  margin-top: var(--space-3);
  padding: 0 var(--space-4);
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-hover);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: border-color 160ms ease, color 160ms ease;
}
.profile-link:hover { border-color: var(--accent); color: var(--accent-text); }

#profileUnits { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }

.profile-tiles { margin-top: var(--space-5); }
.profile-sub {
  margin-top: var(--space-5);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.account-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-pill);
  object-fit: cover;
}

.conn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
}
.conn.is-online { border-color: var(--success); color: var(--success); }
.conn.is-offline { opacity: .9; }

.conn-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: currentColor;
}

.account-top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.account-avatar {
  display: grid;
  width: 64px;
  height: 64px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--accent-surface);
  color: var(--accent-text);
  font-size: var(--text-xl);
  font-weight: 700;
}

.account-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-pill);
  object-fit: cover;
}

.account-id { display: grid; min-width: 0; gap: 2px; }

.account-name {
  overflow: hidden;
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-sub {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-foot {
  display: flex;
  margin-top: var(--space-3);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.account-updated { color: var(--muted); font-size: var(--text-xs); }

.eyebrow {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: .04em;
}

.job-top {
  display: flex;
  margin-top: var(--space-2);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-5);
}
.job-top h2 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -.02em; }

.ring {
  position: relative;
  display: grid;
  width: 68px;
  height: 68px;
  flex: none;
  place-items: center;
}
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring-track { stroke: var(--border); }
.ring-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 213.6;
  stroke-dashoffset: 213.6;
  transition: stroke-dashoffset 200ms ease-out;
}
.ring-value { font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.ring-label {
  position: absolute;
  inset: auto 0 -18px;
  color: var(--muted);
  font-size: var(--text-xs);
  text-align: center;
}

.device {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
  padding: 2px var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--text-xs);
}
.device > span:first-child { color: var(--accent); }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.tile {
  display: grid;
  gap: 2px;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.tile-label { color: var(--muted); font-size: var(--text-xs); }
.tile-value {
  font-size: var(--text-lg);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.tile-value small {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0;
}

.split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.split > div { display: grid; gap: 2px; min-width: 0; }
.split-label { color: var(--muted); font-size: var(--text-xs); }
.split-value {
  overflow: hidden;
  font-size: var(--text-sm);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------ active farm */

.active-title { font-size: var(--text-lg); font-weight: 700; letter-spacing: -.01em; }

.active-tags { display: flex; gap: var(--space-1); margin-top: var(--space-2); }

.tag {
  padding: 1px var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-hover);
  color: var(--accent-text);
  font-size: var(--text-xs);
  font-weight: 600;
}

.wave-label {
  margin-top: var(--space-4);
  color: var(--muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}
.wave-label strong { color: var(--text); font-size: var(--text-base); }

.progress {
  height: 8px;
  margin-top: var(--space-2);
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--surface-hover);
}
.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 200ms ease-out;
}

.units {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.unit {
  overflow: hidden;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--accent-surface);
  color: var(--accent-text);
  font-size: var(--text-sm);
  font-weight: 700;
}
.unit-img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- history */

.history {
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.history-head { display: grid; gap: 2px; }
.history-head h2 { font-size: var(--text-lg); font-weight: 700; letter-spacing: -.01em; }
.history-meta { color: var(--muted); font-size: var(--text-sm); }

.filters {
  display: flex;
  margin-top: var(--space-4);
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.chip {
  min-height: var(--target-size);
  padding: 0 var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.chip:hover { background: var(--surface-hover); color: var(--text); }
.chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-surface);
  color: var(--accent-text);
}

.select-wrap { margin-inline-start: auto; }

.select {
  min-height: var(--target-size);
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-hover);
  color: var(--text);
  font-size: var(--text-sm);
  cursor: pointer;
}

.runs { margin-top: var(--space-3); }

.day {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.day-title { font-size: var(--text-base); font-weight: 700; }
.day-meta { color: var(--muted); font-size: var(--text-xs); }

.run {
  display: grid;
  grid-template-columns: 56px 24px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}
.run:last-child { border-bottom: 0; }

.run-time {
  color: var(--muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.run-dot {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--muted);
}
.run-dot.is-win { color: var(--success); }
.run-dot.is-loss { color: var(--danger); }
.run-dot svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.run-thumb {
  display: grid;
  width: 56px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--accent-surface);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: .04em;
}

.run-thumb.has-img { padding: 0; overflow: hidden; }
.run-thumb-img { display: block; width: 100%; height: 100%; object-fit: cover; }

.run-body { min-width: 0; }
.run-act {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 600;
}
.run-act .tag { font-weight: 600; }

.result {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -.01em;
}
.result.is-win { color: var(--success); }
.result.is-loss { color: var(--danger); }

.run-sub {
  margin-inline-start: var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.run-rewards {
  display: flex;
  margin-top: var(--space-1);
  gap: var(--space-1);
  flex-wrap: wrap;
}

.reward {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 1px var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--surface-hover);
  color: var(--muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}
.reward b { color: var(--text); font-weight: 600; }
.reward-icon {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.run-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pager {
  display: flex;
  margin-top: var(--space-4);
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}
.pager[hidden] { display: none; }

.pager-btn {
  min-height: var(--target-size);
  padding: 0 var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.pager-btn:hover:not(:disabled) { background: var(--surface-hover); }
.pager-btn:disabled { color: var(--muted); cursor: not-allowed; }

.pager-info {
  color: var(--muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.empty {
  padding: var(--space-5) 0;
  color: var(--muted);
  font-size: var(--text-base);
  text-align: center;
}

.site-footer {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-xs);
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
}

@media (max-width: 760px) {
  .header-inner,
  .page-head,
  .layout,
  .site-footer { width: calc(100% - 32px); }

  .run {
    grid-template-columns: 52px 20px minmax(0, 1fr);
    row-gap: var(--space-2);
  }
  .run-thumb { display: none; }
  .run-meta {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: var(--space-2);
    font-size: var(--text-xs);
  }
  .select-wrap { margin-inline-start: 0; }

  .drops-head { display: none; }
  .drop { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--space-1); }
  .drop-last { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
