/* ==========================================================================
   LoL Item Browser — Hextech-inspired dark theme
   Tokens first; components below. All colours go through tokens so a light
   theme (or a different look per section) is a token swap.
   ========================================================================== */

:root {
  --bg-0: #010a13;
  --bg-1: #06101e;
  --bg-2: #0a1628;
  --bg-3: #0f1f35;
  --bg-4: #16294a;
  --line: #1c2b3d;
  --line-strong: #2a3c52;
  --gold-1: #f0e6d2;
  --gold-2: #c8aa6e;
  --gold-3: #c89b3c;
  --gold-4: #785a28;
  --gold-5: #463714;
  --teal: #0ac8b9;
  --teal-dim: #0a7f7a;
  --blue: #0397ab;
  --text: #cfc8b4;
  --text-strong: #f0e6d2;
  --muted: #8d8875;
  --warn: #f2b14a;
  --bad: #e5604a;
  --ok: #3fc771;

  --stat-ad: #f5a142;
  --stat-ap: #9d8cff;
  --stat-as: #f5ee99;
  --stat-crit: #ff6b4a;
  --stat-critdmg: #d0a06a;
  --stat-pen: #ff7b63;
  --stat-mpen: #e58cf0;
  --stat-hp: #3fc771;
  --stat-armor: #f2d64b;
  --stat-mr: #5fe6f0;
  --stat-ah: #7adecd;
  --stat-mana: #3fb4e6;
  --stat-hsp: #60e08f;
  --stat-vamp: #e8507a;
  --stat-ms: #b5ff70;
  --stat-ten: #d4bc86;
  --stat-gold: #e2ba3d;
  --stat-onhit: #f0a868;

  --cat-starter: #8fd6c4;
  --cat-basic: #a9b4c2;
  --cat-epic: #6fb7ff;
  --cat-legendary: #f0b65a;
  --cat-boots: #b5ff70;
  --cat-consumable: #ff8f8f;
  --cat-trinket: #f2d64b;
  --cat-special: #c49bff;

  --radius: 6px;
  --radius-lg: 10px;
  --header-h: 60px;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --focus: 0 0 0 2px var(--bg-0), 0 0 0 4px var(--teal);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: radial-gradient(1200px 600px at 70% -10%, #0b2340 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #0a1f2e 0%, transparent 55%), var(--bg-0);
  color: var(--text);
  font: 14px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}
/* A pre-built page served for another address: hidden until the app draws (see index.html). */
.other-page #app {
  visibility: hidden;
}

a {
  color: var(--teal);
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.4em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--bg-3);
  color: var(--gold-1);
  font: 600 11px/1.6 var(--font-ui);
  text-align: center;
}
code {
  font-size: 12px;
  color: var(--gold-2);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.nowrap {
  white-space: nowrap;
}
.text-warn {
  color: var(--warn);
}
.count {
  color: var(--muted);
  font: 500 12px var(--font-ui);
  margin-left: 6px;
}
.icon {
  flex: none;
  vertical-align: -0.125em;
}
.spin {
  animation: spin 0.9s linear infinite;
}
.rot {
  transform: rotate(180deg);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--gold-2);
  color: var(--bg-0);
  padding: 6px 12px;
  border-radius: var(--radius);
}
.skip-link:focus {
  left: 8px;
}

/* ---------- buttons & chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-3);
  color: var(--text-strong);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover:not(:disabled) {
  background: var(--bg-4);
  border-color: var(--gold-4);
}
.btn--gold {
  background: linear-gradient(180deg, #1e2328, #10141a);
  border-color: var(--gold-3);
  color: var(--gold-1);
}
.btn--gold:hover:not(:disabled) {
  border-color: var(--gold-2);
  background: linear-gradient(180deg, #2a2f34, #151a20);
}
.btn--active {
  border-color: var(--teal);
  color: var(--teal);
}
.btn--ghost {
  background: transparent;
}
.btn--small {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
}
.icon-btn:hover {
  background: var(--bg-3);
  color: var(--text-strong);
}
.icon-btn--small {
  width: 24px;
  height: 24px;
}
.icon-btn.is-on {
  color: var(--teal);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
}
.link-btn:hover {
  text-decoration-color: currentColor;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}
.chip--toggle:hover {
  border-color: var(--gold-4);
  color: var(--text-strong);
}
.chip--toggle.is-on {
  background: rgba(10, 200, 185, 0.12);
  border-color: var(--teal);
  color: var(--text-strong);
}
.chip.is-empty {
  opacity: 0.45;
}
.chip-count {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chip--removable {
  background: var(--bg-3);
  color: var(--text-strong);
}
.chip--removable:hover {
  border-color: var(--bad);
}
.chip--item {
  padding-left: 3px;
}
.chip--item .item-icon {
  border-radius: 50%;
}
.chip--meta {
  min-height: 20px;
  padding: 0 8px;
  font-size: 11px;
  color: var(--gold-2);
  border-color: var(--gold-5);
  background: rgba(70, 55, 20, 0.25);
}
.chip--unique {
  min-height: 20px;
  font-size: 11px;
  color: var(--stat-ah);
  border-color: rgba(122, 222, 205, 0.35);
}
.chip--cat {
  min-height: 20px;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.chip--starter { color: var(--cat-starter); }
.chip--basic { color: var(--cat-basic); }
.chip--epic { color: var(--cat-epic); }
.chip--legendary { color: var(--cat-legendary); }
.chip--boots { color: var(--cat-boots); }
.chip--consumable { color: var(--cat-consumable); }
.chip--trinket { color: var(--cat-trinket); }
.chip--special { color: var(--cat-special); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  height: 18px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid currentColor;
}
.badge--transform { color: var(--stat-mana); }
.badge--quest { color: var(--warn); }
.badge--granted { color: var(--cat-special); }
.badge--ok { color: var(--ok); }
.badge-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--teal);
  color: var(--bg-0);
  font-size: 11px;
  font-weight: 700;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.seg button {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.seg button + button {
  border-left: 1px solid var(--line-strong);
}
.seg button.is-on {
  background: var(--bg-4);
  color: var(--gold-1);
}
.seg--tiny button {
  min-width: 0;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

/* ---------- footer (Riot's notice, credits) ---------- */

.app-foot {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 6px 20px;
  border-top: 1px solid var(--line);
  background: rgba(1, 10, 19, 0.9);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.app-foot a {
  color: var(--gold-2);
}
.app-foot-legal {
  flex: 1 1 520px;
}
.app-foot-legal-link {
  display: none;
}
@media (max-width: 900px) {
  .app-foot-legal {
    display: none;
  }
  .app-foot-legal-link {
    display: inline;
  }
}

/* ---------- ads (only when ADS.client is set; see src/ui/ads.js) ---------- */

.app-body {
  flex: 1;
  min-height: 0;
  display: flex;
}
.app-body > :not(.ad-rail) {
  flex: 1;
  min-width: 0;
}
.ad-rail {
  flex: none;
  width: 184px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}
.ad-rail--left {
  border-right: 1px solid var(--line);
}
.ad-rail--right {
  border-left: 1px solid var(--line);
}
.ad-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ad-bottom {
  display: grid;
  justify-items: center;
  gap: 4px;
  max-width: 728px;
  min-height: 118px;
  margin: 28px auto 0;
}

/* ---------- about and privacy pages ---------- */

body.doc-page {
  overflow: auto;
}
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}
.doc h1 {
  font: 700 26px var(--font-display);
  color: var(--gold-1);
  letter-spacing: 0.03em;
}
.doc h2 {
  margin-top: 28px;
  font: 700 17px var(--font-display);
  color: var(--gold-2);
}
.doc p,
.doc li {
  color: var(--text);
}
.doc-back {
  display: inline-block;
  margin-bottom: 8px;
}

/* ---------- header ---------- */

.app-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--gold-5);
  background: linear-gradient(180deg, rgba(1, 10, 19, 0.95), rgba(6, 16, 30, 0.95));
  position: relative;
  z-index: 20;
}
.app-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-3), transparent);
  opacity: 0.5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  background: conic-gradient(from 30deg, var(--teal), var(--blue), var(--gold-3), var(--teal));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  box-shadow: 0 0 18px rgba(10, 200, 185, 0.4);
}
.brand-title {
  margin: 0;
  font: 700 17px/1.1 var(--font-display);
  color: var(--gold-1);
  letter-spacing: 0.06em;
}
.brand-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.app-nav {
  display: flex;
  gap: 4px;
  margin-right: auto;
}
.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-link.is-on {
  color: var(--gold-1);
  background: var(--bg-3);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 12px;
}
.status-pill:hover {
  border-color: var(--gold-4);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px currentColor;
  color: var(--ok);
}
.status-pill--busy .status-dot {
  background: var(--teal);
  color: var(--teal);
  animation: pulse 1.1s ease-in-out infinite;
}
.status-pill--warn .status-dot {
  background: var(--warn);
  color: var(--warn);
}
.status-patch {
  font-weight: 700;
  color: var(--gold-1);
}
.status-label {
  color: var(--muted);
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.banner {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(242, 177, 74, 0.1);
  border-bottom: 1px solid rgba(242, 177, 74, 0.3);
  color: var(--gold-1);
  font-size: 13px;
}
.banner > span {
  flex: 1;
}
.banner .icon {
  color: var(--warn);
}

/* ---------- layout ---------- */

.browser {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 410px;
  grid-template-rows: minmax(0, 1fr);
}
.browser-filters,
.browser-main,
.browser-detail {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.browser-filters {
  border-right: 1px solid var(--line);
  background: rgba(6, 16, 30, 0.6);
}
.browser-main {
  padding: 0 20px 120px;
}
.browser-detail {
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.9), rgba(6, 16, 30, 0.9));
}
.drawer-head,
.drawer-foot,
.drawer-scrim,
.detail-scrim,
.filters-toggle,
.detail-close {
  display: none;
}

/* ---------- filters ---------- */

.filters {
  padding: 8px 16px 32px;
}
.filter-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.filter-section:last-child {
  border-bottom: 0;
}
.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.filter-head-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.filter-title {
  margin: 0;
  display: flex;
  align-items: center;
  font: 700 12px var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.stat-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.stat-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text);
  font-size: 12px;
  text-align: left;
  line-height: 1.2;
}
.stat-chip:hover {
  border-color: var(--line-strong);
  color: var(--text-strong);
}
.stat-chip.is-on {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, var(--bg-2));
  color: var(--text-strong);
}
.stat-chip.is-empty {
  opacity: 0.4;
}
.stat-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 2px;
  background: var(--c);
  transform: rotate(45deg);
}
.stat-chip-label {
  flex: 1;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}
.filter-options p {
  margin: 6px 0 0 24px;
}

.range {
  padding-top: 4px;
}
.range-hist {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 36px;
  padding: 0 8px;
}
.range-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--line-strong);
  transition: background 0.15s;
}
.range-bar.is-in {
  background: var(--gold-4);
}
.range-track {
  position: relative;
  height: 22px;
  margin: 0 8px;
}
.range-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 3px;
  border-radius: 2px;
  background: var(--line-strong);
}
.range-fill {
  position: absolute;
  top: 10px;
  height: 3px;
  background: var(--gold-2);
  border-radius: 2px;
}
.range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--gold-2);
  background: var(--bg-0);
  cursor: grab;
}
.range-input::-moz-range-thumb {
  pointer-events: auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--gold-2);
  background: var(--bg-0);
  cursor: grab;
}
.range-input:focus-visible::-webkit-slider-thumb {
  box-shadow: var(--focus);
}
.range-input::-webkit-slider-runnable-track {
  background: none;
}
.range-input::-moz-range-track {
  background: none;
}
.range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.range-num {
  flex: 1;
}
.range-num input {
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-1);
  font-variant-numeric: tabular-nums;
}
.range-sep {
  color: var(--muted);
  font-size: 12px;
}
.chips--presets {
  margin-top: 10px;
}

.comp-picker {
  display: grid;
  gap: 10px;
}
.comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 4px;
}
.comp-btn {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg-1);
}
.comp-btn:hover {
  border-color: var(--gold-3);
}
.comp-btn.is-on {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal), 0 0 10px rgba(10, 200, 185, 0.4);
}
.comp-btn .item-icon {
  width: 100% !important;
  height: auto !important;
}

/* ---------- toolbar, tabs, results header ---------- */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 10px;
  background: linear-gradient(180deg, var(--bg-0) 75%, transparent);
}
.search {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-1);
  font-size: 15px;
  color: var(--text-strong);
}
.search input::placeholder {
  color: var(--muted);
}
.search input:focus {
  outline: none;
  border-color: var(--gold-3);
  box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.18);
}
.search input::-webkit-search-cancel-button {
  display: none;
}
.search-kbd,
.search-clear {
  position: absolute;
  right: 10px;
}
.select {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding-left: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-1);
  color: var(--muted);
}
.select select {
  height: 100%;
  padding: 0 10px 0 6px;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  cursor: pointer;
}
.select select:focus {
  outline: none;
}
.select:focus-within {
  border-color: var(--gold-3);
}
.select option {
  background: var(--bg-2);
}
.toolbar .seg button {
  height: 38px;
  min-width: 40px;
}

.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.tab:hover {
  color: var(--text-strong);
}
.tab.is-on {
  color: var(--gold-1);
}
.tab.is-on::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  background: var(--gold-2);
  box-shadow: 0 0 10px var(--gold-3);
}
.tab.is-empty {
  opacity: 0.45;
}
.tab-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.result-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-height: 46px;
  padding: 8px 0;
}
.result-count {
  font-size: 13px;
}
.result-count strong {
  color: var(--gold-1);
}
.chips--active {
  align-items: center;
}

/* ---------- grid ---------- */

.grid-section + .grid-section {
  margin-top: 18px;
}
.grid-section-title {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 6px 0 10px;
  font: 700 13px var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.grid-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  margin-left: 10px;
  background: linear-gradient(90deg, var(--gold-5), transparent);
  align-self: center;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 10px 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  text-align: center;
  transition: background 0.12s, border-color 0.12s;
}
a.tile {
  color: inherit;
  text-decoration: none;
}
.tile:hover {
  background: var(--bg-3);
  border-color: var(--line-strong);
}
.tile.is-selected {
  background: linear-gradient(180deg, rgba(200, 170, 110, 0.14), rgba(200, 170, 110, 0.04));
  border-color: var(--gold-3);
}
.tile-icon {
  position: relative;
  display: block;
  line-height: 0;
  border: 1px solid var(--gold-4);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.tile:hover .tile-icon,
.tile.is-selected .tile-icon {
  border-color: var(--gold-2);
}
.tile.is-granted .tile-icon {
  border-style: dashed;
  border-color: var(--cat-special);
}
.tile-flag {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--bg-0);
  line-height: 1;
}
.tile-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--text-strong);
  min-height: 2.5em;
}
.tile-cost {
  font-size: 11px;
}
.gold {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--stat-gold);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.gold-coin {
  flex: none;
}

.item-icon {
  display: inline-block;
  border-radius: 3px;
  background: var(--bg-3);
  object-fit: cover;
}
.item-icon--fallback {
  display: inline-grid;
  place-items: center;
  color: var(--gold-2);
  font: 700 14px var(--font-display);
  background: linear-gradient(135deg, var(--bg-4), var(--bg-2));
}

/* ---------- table ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.item-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.item-table th,
.item-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.item-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.item-table .col-num {
  text-align: right;
}
.item-table .col-item {
  position: sticky;
  left: 0;
  background: var(--bg-1);
  z-index: 1;
  font-weight: 400;
}
.item-table thead .col-item {
  z-index: 2;
  background: var(--bg-2);
}
.item-table tbody tr:hover td,
.item-table tbody tr:hover th {
  background: var(--bg-3);
}
.item-table tr.is-selected td,
.item-table tr.is-selected th {
  background: rgba(200, 170, 110, 0.12);
}
.th-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}
.th-btn.is-active,
.th-btn:hover {
  color: var(--gold-1);
}
.cell-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cell-item-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.cell-item-name {
  color: var(--text-strong);
  font-weight: 500;
}
.cell-item-cat {
  color: var(--muted);
  font-size: 11px;
}

/* ---------- empty / loading ---------- */

.empty,
.page-msg {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 60px 20px;
  text-align: center;
}
.page-msg {
  margin: auto;
}
.empty h3,
.page-msg h2 {
  margin: 0;
  font: 700 18px var(--font-display);
  color: var(--gold-1);
}
.empty p {
  margin: 0;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.loader {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--gold-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---------- detail panel ---------- */

.detail {
  padding: 20px 22px 140px;
}
.detail-head {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.detail-icon {
  border: 2px solid var(--gold-3);
  border-radius: 6px;
  box-shadow: 0 0 22px rgba(200, 155, 60, 0.25);
}
.detail-title-wrap {
  min-width: 0;
}
.detail-title {
  margin: 2px 0 6px;
  font: 700 21px/1.15 var(--font-display);
  color: var(--gold-1);
  letter-spacing: 0.02em;
}
.detail-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.detail-cost {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--gold-5);
  border-radius: var(--radius);
  background: rgba(70, 55, 20, 0.15);
}
.cost-main {
  font-size: 22px;
}
.cost-meta {
  display: flex;
  gap: 16px;
  margin: 0;
  text-align: right;
}
.cost-meta dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.cost-meta dd {
  margin: 0;
  font-size: 13px;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.detail-section {
  margin-top: 22px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font: 700 11px var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section-title .count {
  margin: 0;
}
.hint {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
  border-bottom: 1px dotted var(--muted);
  cursor: help;
}

.stat-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stat-list li {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.stat-value {
  min-width: 48px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  color: var(--text);
}
.stat-list--compact {
  gap: 1px;
  font-size: 13px;
}

.effects {
  display: grid;
  gap: 10px;
}
.effect {
  padding: 10px 12px;
  border-left: 2px solid var(--gold-4);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(15, 31, 53, 0.6);
}
.effect--active {
  border-left-color: var(--teal);
}
.effect--consume {
  border-left-color: var(--cat-consumable);
}
.effect-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-bottom: 4px;
}
.effect-kind {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.effect-name {
  font-weight: 700;
  color: var(--text-strong);
}
.effect-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}
.effect-desc {
  color: var(--text);
  line-height: 1.55;
}
.effects--compact {
  gap: 8px;
}
.effects--compact .effect {
  padding: 6px 8px;
  font-size: 12.5px;
}

.detail-notes {
  display: grid;
  gap: 8px;
}
.note {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--bg-2);
  font-size: 13px;
}
.note > .icon {
  margin-top: 3px;
  color: var(--gold-2);
}

.icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mini-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  line-height: 0;
}
.mini-item .item-icon {
  border: 1px solid var(--gold-4);
}
.mini-item:hover .item-icon {
  border-color: var(--gold-2);
}
.mini-cost {
  font-size: 11px;
  line-height: 1.2;
  color: var(--stat-gold);
  font-variant-numeric: tabular-nums;
}

/* build path tree */
.tree {
  overflow-x: auto;
  padding: 6px 0 4px;
}
.tree ul {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
  position: relative;
}
.tree > .tree-root {
  padding-top: 0;
}
.tree li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 4px 0;
}
.tree > .tree-root > li {
  padding-top: 0;
}
.tree li::before,
.tree li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  width: 50%;
  height: 14px;
  border-top: 1px solid var(--gold-4);
}
.tree li::after {
  right: auto;
  left: 50%;
  border-left: 1px solid var(--gold-4);
}
.tree li:only-child::before,
.tree li:only-child::after {
  border-top: 0;
}
.tree li:only-child::before {
  display: none;
}
.tree li:first-child::before,
.tree li:last-child::after {
  border-top: 0;
}
.tree li:last-child::before {
  border-right: 1px solid var(--gold-4);
}
.tree > .tree-root > li::before,
.tree > .tree-root > li::after {
  display: none;
}
.tree ul ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  height: 14px;
  border-left: 1px solid var(--gold-4);
}
.tree-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tree-card.is-root .item-icon {
  border: 2px solid var(--gold-3);
}
.tree-combine {
  margin-top: 1px;
  font-size: 10px;
  color: var(--muted);
}
.tree-missing {
  padding: 4px 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  font-size: 11px;
  color: var(--muted);
}

/* gold efficiency */
.eff {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'pct bar chev' 'text text text';
  align-items: center;
  gap: 6px 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  text-align: left;
}
.eff:hover {
  border-color: var(--gold-4);
}
.eff-pct {
  grid-area: pct;
  font: 700 18px var(--font-ui);
  font-variant-numeric: tabular-nums;
}
.eff.is-good .eff-pct { color: var(--ok); }
.eff.is-ok .eff-pct { color: var(--gold-2); }
.eff.is-low .eff-pct { color: var(--warn); }
.eff-bar {
  grid-area: bar;
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--line-strong);
}
.eff-bar > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-4), var(--gold-2));
}
.eff-bar > i {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: var(--gold-1);
  opacity: 0.6;
}
.eff-text {
  grid-area: text;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.eff > .icon {
  grid-area: chev;
  color: var(--muted);
}
.eff-table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.eff-table th,
.eff-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}
.eff-table th:first-child,
.eff-table td:first-child {
  text-align: left;
}
.eff-table th {
  color: var(--muted);
  font-weight: 600;
}
.eff-table td[title] {
  cursor: help;
}
.eff-note {
  margin: 8px 0 0;
}

.detail-flavor .caption {
  margin: 0 0 8px;
  padding-left: 12px;
  border-left: 2px solid var(--gold-5);
  font-style: italic;
  color: var(--muted);
}

.detail-empty {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 40px 26px;
}
.detail-empty h2 {
  margin: 0;
  font: 700 20px var(--font-display);
  color: var(--gold-1);
}
.detail-empty p {
  margin: 0;
}
.detail-empty-art {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--gold-4);
  border-radius: 50%;
  color: var(--gold-2);
  box-shadow: inset 0 0 18px rgba(200, 155, 60, 0.2);
}
.tips {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.tips kbd + kbd {
  margin-left: 2px;
}

/* ---------- wikitext ---------- */

.wt p,
.wt ul,
.wt ol {
  margin: 0;
}
.wt ul,
.wt ol {
  padding-left: 18px;
}
.wt-pbreak {
  display: block;
  height: 8px;
}
.wt b,
.wt-b {
  color: var(--text-strong);
}
.wt-sbc {
  font-variant: small-caps;
  letter-spacing: 0.03em;
  color: var(--text-strong);
}
.wt-tip {
  color: var(--text-strong);
  text-decoration: underline dotted rgba(240, 230, 210, 0.35);
  text-underline-offset: 3px;
}
.wt-link,
.wt-ref {
  color: var(--text-strong);
}
.wt-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 1px;
  transform: rotate(45deg) translateY(-1px);
}
.wt-item {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--gold-2);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.wt-item:hover {
  color: var(--gold-1);
  text-decoration: underline;
}
.wt-item-icon {
  align-self: center;
  border-radius: 2px;
}
.wt-gold {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--stat-gold);
  font-weight: 600;
  vertical-align: -1px;
}
.wt-rd-part {
  white-space: nowrap;
}
.wt-rd .icon {
  opacity: 0.75;
}
.tip-trigger {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: help;
}
.wt-icontip {
  text-decoration: none;
  color: var(--gold-2);
  font-size: 0.9em;
}
.wt-flip {
  display: inline;
  margin: 0 0.25em;
  padding: 0;
  border: 0;
  background: none;
  text-align: inherit;
  color: inherit;
  line-height: inherit;
}
.wt-flip > span:first-child {
  border-bottom: 1px dashed var(--gold-4);
}
.wt-flip-mark {
  margin-left: 3px;
  font-size: 11px;
  color: var(--gold-2);
}
.wt-bug {
  color: var(--warn);
  text-decoration: none;
}
.wt-center {
  text-align: center;
}

/* ---------- tooltips ---------- */

.tooltip {
  position: fixed;
  z-index: 1000;
  max-width: min(360px, calc(100vw - 16px));
  padding: 8px 10px;
  border: 1px solid var(--gold-4);
  border-radius: var(--radius);
  background: rgba(1, 10, 19, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.1s, transform 0.1s;
}
.tooltip.is-visible {
  opacity: 1;
  transform: none;
}
.tooltip--item {
  width: 360px;
  padding: 0;
  border-color: var(--gold-3);
  background: linear-gradient(180deg, #091428, #010a13);
}
.item-tip-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gold-5);
}
.item-tip-head .item-icon {
  border: 1px solid var(--gold-3);
}
.item-tip-name {
  font: 700 15px var(--font-display);
  color: var(--gold-1);
}
.item-tip-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.item-tip .stat-list {
  padding: 8px 12px 0;
}
.item-tip .effects {
  padding: 8px 12px 0;
}
.item-tip .effect {
  background: transparent;
  padding: 2px 0 2px 8px;
}
.item-tip-note {
  margin: 8px 12px 0;
  font-size: 12px;
  color: var(--muted);
}
.item-tip-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--gold-2);
}
.tip-text {
  max-width: 300px;
}
.pp-tip table {
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.pp-tip th,
.pp-tip td {
  padding: 2px 6px;
  border: 1px solid var(--line);
  text-align: center;
}
.pp-tip th {
  color: var(--gold-2);
  text-align: left;
  white-space: nowrap;
}
.pp-formula {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- compare ---------- */

.compare-tray {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--gold-3);
  border-radius: 12px;
  background: rgba(6, 16, 30, 0.96);
  box-shadow: var(--shadow), 0 0 30px rgba(200, 155, 60, 0.15);
  transform: translateX(-50%);
  animation: rise 0.18s ease-out;
}
@keyframes rise {
  from {
    transform: translate(-50%, 12px);
    opacity: 0;
  }
}
.compare-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.compare-items {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.compare-item {
  position: relative;
}
.compare-item-btn {
  padding: 0;
  border: 1px solid var(--gold-4);
  border-radius: 4px;
  background: none;
  line-height: 0;
}
.compare-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-3);
  color: var(--text-strong);
}
.compare-slot {
  width: 38px;
  height: 38px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
}
.compare-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.compare-table-wrap {
  overflow-x: auto;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.compare-table th,
.compare-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.compare-table tbody th {
  white-space: nowrap;
  font-weight: 600;
  font-size: 12px;
}
.compare-table thead th {
  min-width: 170px;
}
.compare-table td.is-best {
  color: var(--ok);
  font-weight: 700;
  background: rgba(63, 199, 113, 0.06);
}
.cmp-head {
  display: grid;
  justify-items: start;
  gap: 4px;
}
.cmp-name {
  font: 700 14px var(--font-display);
  color: var(--gold-1);
}
.cmp-effects-row td {
  font-size: 12px;
}

/* ---------- dialogs ---------- */

.dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--gold-4);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0a1628, #050e1a);
  color: var(--text);
  box-shadow: var(--shadow);
}
.dialog--wide {
  width: min(980px, calc(100vw - 24px));
}
.dialog::backdrop {
  background: rgba(1, 6, 12, 0.72);
  backdrop-filter: blur(3px);
}
.dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 50px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.dialog-title {
  margin: 0;
  font: 700 18px var(--font-display);
  color: var(--gold-1);
}
.dialog-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.dialog-body {
  padding: 16px 18px 20px;
  overflow: auto;
}

.data-panel {
  display: grid;
  gap: 16px;
}
.kv {
  display: grid;
  gap: 10px;
  margin: 0;
}
.kv > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
}
.kv dt {
  color: var(--muted);
  font-size: 12px;
}
.kv dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.health-list {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg-1);
  font-size: 12px;
}
.health-list h4 {
  margin: 6px 0 4px;
  font-size: 12px;
  color: var(--gold-2);
}
.health-list ul {
  margin: 0;
  padding-left: 18px;
}
.data-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.changes {
  display: grid;
  gap: 18px;
}
.changes-summary {
  margin: 0;
  font-weight: 600;
  color: var(--gold-1);
}
.change-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.change-item {
  display: grid;
  gap: 6px;
}
.change-fields {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 26px;
  list-style: none;
  font-size: 13px;
}
.field-change {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.field-change.up strong {
  color: var(--ok);
}
.field-change.down strong {
  color: var(--bad);
}
.fc-label {
  color: var(--muted);
}
.fc-text {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}
.fc-before,
.fc-after {
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 12.5px;
}
.fc-before {
  background: rgba(229, 96, 74, 0.08);
  border-left: 2px solid var(--bad);
}
.fc-after {
  background: rgba(63, 199, 113, 0.08);
  border-left: 2px solid var(--ok);
}
.fc-tag {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- toasts ---------- */

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(400px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  background: rgba(6, 16, 30, 0.98);
  box-shadow: var(--shadow);
  animation: slide-in 0.2s ease-out;
}
.toast--success {
  border-left-color: var(--gold-2);
}
.toast--warn {
  border-left-color: var(--warn);
}
.toast-icon {
  color: var(--gold-2);
}
.toast-text {
  flex: 1;
  display: grid;
  font-size: 13px;
}
.toast-text strong {
  color: var(--text-strong);
}
.toast-text span {
  color: var(--muted);
  font-size: 12px;
}
@keyframes slide-in {
  from {
    transform: translateX(16px);
    opacity: 0;
  }
}

/* ==========================================================================
   Champions
   ========================================================================== */

.browser--two {
  grid-template-columns: 290px minmax(0, 1fr);
}
.grid--champs {
  grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
}
.champ-tile {
  color: inherit;
  text-decoration: none;
}
.champ-tile .tile-icon {
  border-radius: 6px;
  overflow: hidden;
}
.champ-tile .tile-name {
  min-height: 0;
}
.champ-icon {
  border-radius: 4px;
}
.tile-sub {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.seg--fill {
  display: flex;
  width: 100%;
}
.seg--fill button {
  flex: 1;
  gap: 4px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
}
.level-slider {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 12px;
}
.level-label strong {
  display: inline-block;
  min-width: 1.6em;
  color: var(--gold-1);
  font-variant-numeric: tabular-nums;
}
.level-slider input {
  width: 160px;
  accent-color: var(--gold-2);
}
.level-note {
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 3px;
  background: var(--gold-5);
  color: var(--gold-1);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.champ-tip-title {
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  text-transform: capitalize;
}
.champ-tip-facts {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 12px 0;
  font-size: 12.5px;
}
.champ-tip-facts > div {
  display: grid;
  grid-template-columns: 70px 1fr;
}
.champ-tip-facts dt {
  color: var(--muted);
}
.champ-tip-facts dd {
  margin: 0;
}

/* champion page */
.champ-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px clamp(14px, 3vw, 36px) 80px;
}
.champ-crumbs {
  padding: 4px 0 12px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.back-link:hover {
  color: var(--gold-1);
}
.champ-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--gold-5);
  border-radius: var(--radius-lg);
  background: radial-gradient(600px 200px at 0% 0%, rgba(200, 155, 60, 0.12), transparent 70%), linear-gradient(180deg, var(--bg-2), var(--bg-1));
}
.champ-hero-icon {
  border: 2px solid var(--gold-3);
  border-radius: 8px;
  box-shadow: 0 0 28px rgba(200, 155, 60, 0.25);
}
.champ-name {
  margin: 0;
  font: 700 32px/1.1 var(--font-display);
  color: var(--gold-1);
  letter-spacing: 0.03em;
}
.champ-title {
  margin: 4px 0 12px;
  color: var(--gold-2);
  font-style: italic;
  text-transform: capitalize;
}
.champ-hero .chip {
  text-decoration: none;
}
.champ-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 14px 0 0;
}
.champ-facts dt {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.champ-facts dd {
  margin: 0;
  color: var(--text-strong);
}
.champ-hero-side {
  display: grid;
  gap: 12px;
  justify-items: end;
}
.ratings {
  display: grid;
  gap: 4px;
  margin: 0;
}
.rating {
  display: grid;
  grid-template-columns: 80px auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.rating dt {
  color: var(--muted);
  text-align: right;
}
.rating dd {
  display: flex;
  gap: 3px;
  margin: 0;
}
.pip {
  width: 18px;
  height: 6px;
  border-radius: 2px;
  background: var(--line-strong);
}
.pip.is-on {
  background: linear-gradient(90deg, var(--gold-3), var(--gold-2));
}

.champ-body {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 22px;
  align-items: start;
}
.champ-stats {
  position: sticky;
  top: 0;
}
.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(10, 22, 40, 0.75);
}
.card .level-slider {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.card .level-slider input {
  flex: 1;
  width: auto;
}
.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.stat-table th,
.stat-table td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}
.stat-table th {
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
}
.stat-swatch {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 2px;
  transform: rotate(45deg) translateY(-1px);
}
.stat-now {
  color: var(--text-strong);
  font-weight: 700;
}
.stat-growth {
  font-size: 12px;
}
.stat-note {
  margin: 10px 0 0;
}

.champ-abilities {
  display: grid;
  gap: 14px;
}
.ability-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 8px;
  padding: 8px 0 10px;
  background: linear-gradient(180deg, var(--bg-0) 70%, transparent);
}
.ability-nav-item {
  position: relative;
  line-height: 0;
  border: 1px solid var(--gold-4);
  border-radius: 6px;
}
.ability-nav-item:hover {
  border-color: var(--gold-2);
}
.ability-nav-item .slot-key {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--gold-4);
  border-radius: 4px;
  background: var(--bg-0);
  color: var(--gold-1);
  font: 700 10px/1 var(--font-ui);
}
.ability {
  scroll-margin-top: 70px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-4);
  border-radius: var(--radius-lg);
  background: rgba(10, 22, 40, 0.7);
}
.ability--R {
  border-left-color: var(--gold-2);
}
.ability--I {
  border-left-color: var(--teal-dim);
}
.ability-head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.ability-icon {
  border: 1px solid var(--gold-4);
  border-radius: 6px;
}
.slot-badge {
  display: inline-block;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--gold-5);
  color: var(--gold-1);
  font: 700 11px/18px var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ability-name {
  margin: 4px 0 0;
  font: 700 18px var(--font-display);
  color: var(--gold-1);
}
.ability-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg-1);
  font-size: 12.5px;
}
.ability-detail dt {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ability-detail dd {
  margin: 0;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.ability-sections {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.ability-desc {
  line-height: 1.6;
}
.ability-section.has-icon {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.section-icon {
  margin-top: 2px;
}
.ability-leveling {
  margin-top: 8px;
}
.wt-st {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 8px 12px;
  border-left: 2px solid var(--gold-4);
  background: rgba(70, 55, 20, 0.12);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.wt-st-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.wt-st dt {
  color: var(--gold-2);
  font-weight: 600;
}
.wt-st dd {
  margin: 0;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.wt-sep {
  color: var(--muted);
}
.ability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 12px 0 0;
  font-size: 11.5px;
}
.ability-tags > div {
  display: flex;
  gap: 5px;
}
.ability-tags dt {
  color: var(--muted);
}
.ability-tags dd {
  margin: 0;
}
.ability-notes {
  margin-top: 10px;
}
.ability-notes .link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ability-notes-body {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg-1);
  font-size: 13px;
}
.ability-notes-body ul {
  display: grid;
  gap: 4px;
}

@media (max-width: 1100px) {
  .champ-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .champ-stats {
    position: static;
  }
}
@media (max-width: 700px) {
  .champ-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .champ-hero-side {
    grid-column: 1 / -1;
    justify-items: start;
  }
  .champ-name {
    font-size: 24px;
  }
}

/* ==========================================================================
   Runes
   ========================================================================== */

.runes-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px clamp(14px, 3vw, 32px) 60px;
}
.runes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 4px 0 16px;
}
.runes-toolbar .search {
  flex: 1 1 320px;
}
.search-count {
  position: absolute;
  right: 12px;
  font-size: 12px;
  color: var(--muted);
}
.rune-progress {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rune-progress.is-done {
  color: var(--ok);
}
.runes-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(280px, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}
.rune-tree {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(400px 180px at 50% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%), rgba(10, 22, 40, 0.75);
}
.rune-tree--secondary {
  background: radial-gradient(400px 180px at 50% 0%, color-mix(in srgb, var(--secondary) 12%, transparent), transparent 70%), rgba(10, 22, 40, 0.75);
}
.path-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.path-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.path-btn:hover {
  color: var(--text-strong);
  border-color: var(--path);
}
.path-btn.is-on {
  color: var(--text-strong);
  border-color: var(--path);
  background: color-mix(in srgb, var(--path) 18%, var(--bg-2));
  box-shadow: 0 0 12px color-mix(in srgb, var(--path) 30%, transparent);
}
.path-icon {
  border-radius: 50%;
  background: transparent;
}
.path-tagline {
  margin: 10px 0 4px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.pairing {
  color: var(--text-strong);
  font-style: italic;
}
.rune-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.rune-row--keystones {
  display: flex;
  justify-content: space-around;
  border-top: 0;
  padding: 8px 0 14px;
}
.rune-row-name {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.rune-row-runes {
  display: flex;
  justify-content: space-around;
  gap: 6px;
}
.rune-btn {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 84px;
  padding: 4px 2px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  transition: opacity 0.15s, filter 0.15s;
}
.rune-btn .rune-icon {
  border-radius: 50%;
  background: rgba(1, 10, 19, 0.6);
  border: 2px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rune-btn:hover .rune-icon {
  border-color: color-mix(in srgb, var(--path) 60%, transparent);
}
.rune-btn.is-chosen .rune-icon {
  border-color: var(--path);
  box-shadow: 0 0 0 2px var(--bg-0), 0 0 16px var(--path);
}
.rune-btn.is-unpicked {
  opacity: 0.5;
  filter: grayscale(0.85);
}
.rune-btn.is-unpicked:hover {
  opacity: 0.85;
  filter: none;
}
.rune-btn.is-dim {
  opacity: 0.2;
}
.rune-btn.is-focused .rune-btn-name {
  color: var(--text-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rune-btn-name {
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}
.rune-btn.is-keystone {
  width: 96px;
}
.rune-btn.is-keystone .rune-btn-name {
  font-weight: 600;
}
.rune-empty {
  margin: 14px 0;
}
.shards-title {
  margin-top: 18px;
}
.shards {
  display: grid;
  gap: 8px;
}
.shard-row {
  display: grid;
  grid-template-columns: 76px auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.shard-options {
  display: flex;
  gap: 6px;
}
.shard-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-1);
}
.shard-btn:hover {
  border-color: var(--gold-3);
}
.shard-btn.is-chosen {
  border-color: var(--gold-2);
  box-shadow: 0 0 10px rgba(200, 155, 60, 0.5);
}
.shard-btn.is-unpicked {
  opacity: 0.45;
}
.shard-icon {
  border-radius: 50%;
  background: transparent;
}
.shard-picked {
  font-size: 12px;
}
.rune-side {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 0;
}
.rune-detail-card,
.rune-help {
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--path, var(--gold-4));
  border-radius: var(--radius-lg);
  background: rgba(10, 22, 40, 0.8);
}
.rune-help h2 {
  margin: 0 0 6px;
  font: 700 18px var(--font-display);
  color: var(--gold-1);
}
.rune-help p {
  margin: 0;
}
.rune-detail-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.rune-detail-head .rune-icon {
  border-radius: 50%;
  box-shadow: 0 0 18px color-mix(in srgb, var(--path) 45%, transparent);
}
.rune-detail-name {
  margin: 0 0 6px;
  font: 700 19px var(--font-display);
  color: var(--gold-1);
}
.rune-path-chip,
.rune-path-name {
  color: var(--path);
}
.rune-detail-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.rune-tip .rune-tip-body {
  display: grid;
  gap: 8px;
  padding: 10px 12px 0;
  font-size: 12.5px;
}
.rune-tip .rune-icon {
  border-radius: 50%;
}
.rune-summary .summary-title {
  margin: 0;
  font: 700 15px var(--font-display);
}
.summary-pairing {
  margin: 2px 0 0;
  font-style: italic;
}
.summary-list {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.summary-list li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 30px;
  font-size: 12.5px;
}
.summary-label {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.summary-rune {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-strong);
  text-align: left;
}
.summary-rune .rune-icon {
  border-radius: 50%;
}
.summary-rune:hover {
  color: var(--gold-1);
}
.wt-quote {
  font-style: italic;
  color: var(--muted);
}

@media (max-width: 1200px) {
  .runes-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rune-side {
    grid-column: 1 / -1;
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}
@media (max-width: 760px) {
  .runes-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .rune-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .rune-btn {
    width: 74px;
  }
  .shard-row {
    grid-template-columns: 70px auto;
  }
  .shard-picked {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Wide: keep the compare tray centred over the results column */
@media (min-width: 1280px) {
  .compare-tray {
    left: calc(290px + (100vw - 290px - 410px) / 2);
  }
}

/* Medium: detail becomes a slide-over */
@media (max-width: 1279px) {
  .browser {
    grid-template-columns: 270px minmax(0, 1fr);
  }
  .browser-detail {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    z-index: 40;
    width: min(440px, 100vw);
    transform: translateX(100%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow);
    border-left: 1px solid var(--gold-4);
    visibility: hidden;
  }
  .browser.has-detail .browser-detail {
    transform: none;
    visibility: visible;
  }
  .browser.has-detail .detail-scrim {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 39;
    background: rgba(1, 6, 12, 0.5);
  }
  .detail-close {
    display: inline-grid;
    position: absolute;
    top: -8px;
    right: -10px;
  }
  .detail-empty {
    display: none;
  }
}

/* Small: filters become a drawer */
@media (max-width: 900px) {
  .browser {
    grid-template-columns: minmax(0, 1fr);
  }
  .browser-filters {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: min(340px, 88vw);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    background: var(--bg-1);
    border-right: 1px solid var(--gold-4);
    visibility: hidden;
  }
  .browser.filters-open .browser-filters {
    transform: none;
    visibility: visible;
  }
  .browser.filters-open .drawer-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 49;
    background: rgba(1, 6, 12, 0.6);
  }
  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 0;
  }
  .drawer-head h2 {
    margin: 0;
    font: 700 16px var(--font-display);
    color: var(--gold-1);
  }
  .filters-toggle {
    display: inline-flex;
    height: 40px;
  }
  .drawer-foot {
    display: block;
    position: sticky;
    bottom: 0;
    padding: 12px 16px;
    background: linear-gradient(180deg, transparent, var(--bg-1) 30%);
  }
  .drawer-foot .btn {
    width: 100%;
    justify-content: center;
    height: 40px;
  }
  .browser-main {
    padding: 0 14px 120px;
  }
  .brand-sub,
  .status-label,
  .app-nav {
    display: none;
  }
  .brand {
    margin-right: auto;
  }
  .app-header {
    padding: 0 14px;
  }
}

@media (max-width: 600px) {
  .toolbar {
    flex-wrap: wrap;
  }
  .search {
    flex-basis: 100%;
  }
  .search-kbd {
    display: none;
  }
  .select {
    flex: 1 1 0;
    min-width: 0;
  }
  .select select {
    width: 100%;
    min-width: 0;
    text-overflow: ellipsis;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  }
  .browser-detail {
    width: 100vw;
  }
  .detail {
    padding: 16px 16px 140px;
  }
  .compare-tray {
    left: 8px;
    right: 8px;
    transform: none;
    gap: 8px;
    padding: 8px;
    animation: none;
  }
  .compare-label {
    display: none;
  }
  .compare-slot {
    display: none;
  }
  .kv > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .cost-meta {
    gap: 10px;
  }
}

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

/* ==========================================================================
   Builds
   ========================================================================== */

.builds-page,
.build-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px clamp(14px, 3vw, 36px) 80px;
}
.page-title {
  margin: 0;
  font: 700 26px/1.2 var(--font-display);
  color: var(--gold-1);
  letter-spacing: 0.03em;
}
.builds-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 18px;
}
.builds-head p {
  margin: 4px 0 0;
}
.builds-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.builds-search {
  width: min(280px, 100%);
}
.banner--inline {
  margin: 0 0 14px;
  border: 1px solid rgba(242, 177, 74, 0.3);
  border-radius: var(--radius);
}
.banner--inline > div {
  flex: 1;
}
.builds-backup {
  margin: 22px 0 0;
}
.builds-restore {
  cursor: pointer;
}
.builds-restore:focus-within {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.import-preview {
  display: grid;
  gap: 14px;
  max-width: 460px;
}
.share-panel {
  display: grid;
  gap: 16px;
}
.share-field {
  display: grid;
  gap: 6px;
}
.share-field > label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.share-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.share-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-1);
  color: var(--text);
  font: inherit;
}
.share-input:focus {
  border-color: var(--teal);
  outline: none;
}
.share-code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  resize: vertical;
}
.share-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.builds-empty {
  max-width: 460px;
  margin: 8vh auto 0;
  text-align: center;
}
.build-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.build-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  transition: border-color 0.15s, transform 0.15s;
}
.build-card:hover,
.build-card:focus-within {
  border-color: var(--gold-4);
}
.build-card-link {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.build-card-link:focus-visible {
  box-shadow: var(--focus);
  outline: none;
}
.build-card-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.build-card-head .champ-icon {
  border: 1px solid var(--gold-4);
  border-radius: 6px;
}
.build-card-title h3 {
  margin: 0;
  color: var(--gold-1);
  font-size: 15px;
  overflow-wrap: anywhere;
}
.build-card-title p {
  margin: 2px 0 0;
}
.build-card-items {
  display: flex;
  gap: 4px;
}
.build-card-items .item-icon,
.item-slot-mini {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}
.item-slot-mini {
  display: inline-block;
  background: var(--bg-1);
}
.build-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
}
.build-card-actions {
  position: relative; /* above the card link */
  display: flex;
  gap: 2px;
}

/* editor */
.build-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--gold-5);
  border-radius: var(--radius-lg);
  background: radial-gradient(600px 200px at 0% 0%, rgba(200, 155, 60, 0.12), transparent 70%), linear-gradient(180deg, var(--bg-2), var(--bg-1));
}
.build-hero-champ {
  position: relative;
  padding: 0;
  border: 2px solid var(--gold-3);
  border-radius: 8px;
  background: none;
  line-height: 0;
  box-shadow: 0 0 24px rgba(200, 155, 60, 0.2);
}
.build-hero-champ:hover {
  border-color: var(--gold-2);
}
.build-hero-champ .champ-icon {
  border-radius: 6px;
}
.build-hero-swap {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--gold-3);
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--gold-1);
}
.build-name {
  width: 100%;
  padding: 2px 6px;
  margin-left: -6px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--gold-1);
  font: 700 26px/1.2 var(--font-display);
  letter-spacing: 0.02em;
}
.build-name:hover {
  border-color: var(--line-strong);
}
.build-name:focus {
  border-color: var(--teal);
  background: var(--bg-1);
  outline: none;
}
.build-hero-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.build-hero-sub a {
  color: var(--gold-2);
}
.build-hero-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}
.build-hero-actions {
  display: flex;
  gap: 6px;
}
.save-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 320px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.save-status.is-saved {
  color: var(--ok);
}
.build-body {
  display: grid;
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr) minmax(280px, 340px);
  grid-template-areas: 'build dmg side';
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.build-col,
.build-dmg,
.build-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.build-col {
  grid-area: build;
}
.build-dmg {
  grid-area: dmg;
}
.build-side {
  grid-area: side;
}
@media (max-width: 1320px) {
  .build-body {
    grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
    grid-template-areas: 'build dmg' 'side dmg';
  }
}
.build-col .level-slider {
  display: flex;
  width: 100%;
}
.build-col .level-slider input {
  flex: 1;
  width: auto;
}
.item-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.item-slot-wrap {
  position: relative;
}
.item-slot {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  max-height: 84px;
  padding: 0;
  border: 1px solid var(--gold-4);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 30%, var(--bg-3), var(--bg-1));
  color: var(--gold-4);
}
.item-slot:hover {
  border-color: var(--gold-2);
}
.item-slot.is-empty {
  border-style: dashed;
  border-color: var(--line-strong);
}
.item-slot.is-empty:hover {
  border-color: var(--gold-3);
  color: var(--gold-2);
}
.item-slot .item-icon {
  border-radius: 4px;
}
.has-conflict .item-slot {
  border-color: var(--warn);
}
.item-slot-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.12s;
}
.item-slot-wrap:hover .item-slot-remove,
.item-slot-remove:focus-visible {
  opacity: 1;
}
.item-slot-remove:hover {
  color: var(--bad);
  border-color: var(--bad);
}
@media (hover: none) {
  .item-slot-remove {
    opacity: 1;
  }
}
.item-slot-warn {
  position: absolute;
  left: 4px;
  bottom: 4px;
  color: var(--warn);
}
.build-gold {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.rune-summary-mini {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
}
.rune-summary-mini.is-compact {
  display: flex;
  gap: 6px;
}
.rune-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.rune-mini {
  display: inline-flex;
  border-radius: 50%;
  line-height: 0;
}
.rune-mini-paths {
  grid-column: 2;
  margin: 0;
}
.build-runes-btn {
  margin-top: 12px;
}
.build-notes {
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-1);
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.build-notes:focus {
  border-color: var(--teal);
  outline: none;
}
.stat-sheet-table thead th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat-sheet-table tbody tr[tabindex]:hover,
.stat-sheet-table tbody tr[tabindex]:focus-visible {
  background: rgba(255, 255, 255, 0.03);
  outline: none;
}
.stat-bonus {
  color: var(--ok);
}
.text-ad {
  color: var(--stat-ad);
}
.text-ap {
  color: var(--stat-ap);
}
.sheet-note {
  margin: 10px 0 0;
}
.sources-tip ul {
  display: grid;
  gap: 2px;
  min-width: 200px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-variant-numeric: tabular-nums;
}
.sources-tip li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.sources-tip p {
  margin: 6px 0 0;
}
.champ-hero-actions {
  display: flex;
  gap: 8px;
}

/* pickers */
.picker-controls {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
}
.picker-stats .chip {
  font-size: 11px;
}
.picker-group + .picker-group {
  margin-top: 14px;
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.picker-tile {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text);
  text-align: left;
}
.picker-tile:hover {
  border-color: var(--gold-4);
  background: var(--bg-3);
}
.picker-tile.is-current {
  border-color: var(--teal);
}
.picker-tile.is-blocked {
  opacity: 0.45;
  cursor: not-allowed;
}
.picker-tile.is-blocked:hover {
  border-color: var(--line);
  background: var(--bg-2);
}
.picker-tile-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.picker-tile-name {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-tile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: 11px;
}
.picker-tile-why {
  color: var(--warn);
  font-size: 11px;
}
.picker-empty {
  padding: 24px 0;
  text-align: center;
}
.picker-foot {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.champ-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.champ-pick {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 6px 2px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  color: var(--text);
  font-size: 11px;
}
.champ-pick:hover,
.champ-pick.is-current {
  border-color: var(--gold-4);
  background: var(--bg-2);
}
.champ-pick .champ-icon {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}
.dialog.rune-dialog {
  width: min(1240px, calc(100vw - 24px));
}
.runes-page--embedded {
  padding: 0;
  overflow: visible;
}

@media (max-width: 900px) {
  .build-body {
    grid-template-columns: 1fr;
    grid-template-areas: 'build' 'side' 'dmg';
  }
  .build-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .build-hero-side {
    grid-column: 1 / -1;
    justify-items: start;
  }
  .build-name {
    font-size: 21px;
  }
}
@media (max-width: 520px) {
  .build-hero {
    padding: 12px;
    gap: 12px;
  }
  .build-hero-champ .champ-icon {
    width: 56px !important;
    height: 56px !important;
  }
  .picker-grid {
    grid-template-columns: 1fr;
  }
}

/* damage */
.skill-order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.skill-order .chip {
  min-width: 34px;
  justify-content: center;
  font-weight: 700;
}
.skill-ranks {
  margin-left: auto;
}
.damage-panel {
  display: grid;
  gap: 10px;
}
.dmg-ability {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(6, 16, 30, 0.6);
}
.dmg-ability.is-unlearned {
  opacity: 0.6;
}
.dmg-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.dmg-head .ability-icon {
  border: 1px solid var(--gold-4);
  border-radius: 4px;
}
.dmg-head .slot-badge {
  font-size: 10px;
}
.dmg-name {
  margin: 0;
  color: var(--gold-1);
  font-size: 14px;
}
.dmg-rank {
  margin-left: auto;
  white-space: nowrap;
  text-align: right;
}
.dmg-cd {
  display: block;
}
.dmg-basic-icon--sustain {
  color: var(--stat-hp);
}
.dmg-group {
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dmg-cd strong {
  color: var(--stat-ah);
}
.dmg-basic-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--gold-4);
  border-radius: 4px;
  color: var(--stat-ad);
}
.dmg-rows {
  display: grid;
  gap: 4px;
  margin: 0;
}
.dmg-row {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 3px 0;
  border-top: 1px solid rgba(28, 43, 61, 0.6);
}
.dmg-row:first-child {
  border-top: 0;
}
.dmg-row dt {
  color: var(--muted);
  font-size: 12px;
}
.dmg-row dd {
  display: grid;
  gap: 2px;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.dmg-row--damage dt {
  color: var(--text);
}
.dmg-value {
  justify-self: start;
  border-radius: 3px;
}
.dmg-value:focus-visible {
  box-shadow: var(--focus);
  outline: none;
}
.dmg-value strong {
  font-size: 15px;
}
.dmg-row--other .dmg-value strong {
  font-size: 13px;
  color: var(--text-strong);
}
.dmg-pct {
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 3px;
  background: var(--bg-3);
  color: var(--text);
}
.dmg-ranks {
  color: var(--muted);
}
.dmg-ranks .is-now {
  color: var(--gold-1);
  font-weight: 700;
}
.dmg-row.is-raw dd {
  display: block;
  font-size: 12px;
}
.sources-tip .sum {
  padding-top: 2px;
  border-top: 1px solid var(--line-strong);
  color: var(--text-strong);
  font-weight: 600;
}
.target-panel {
  display: grid;
  gap: 10px;
}
.seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-1);
}
.seg-btn {
  flex: 1;
  padding: 5px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.seg-btn.is-on {
  background: var(--bg-4);
  color: var(--gold-1);
}
.target-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.target-field {
  display: grid;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
}
.target-field input[type='number'],
.target-field select {
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-1);
  color: var(--text-strong);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.target-field input[type='range'] {
  accent-color: var(--stat-hp);
}
.target-field strong {
  color: var(--text-strong);
}
.target-panel .level-slider {
  display: flex;
}
.target-panel .level-slider input {
  flex: 1;
  width: auto;
}
.target-sum {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.target-sum div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.target-sum dt {
  color: var(--muted);
}
.target-sum dd {
  margin: 0;
  text-align: right;
}
@media (max-width: 520px) {
  .dmg-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .skill-ranks {
    margin-left: 0;
    width: 100%;
  }
}

/* item & rune effects */
.dmg-trigger {
  display: block;
  font-size: 11px;
}
.effects-panel {
  display: grid;
  gap: 12px;
}
.combat-settings {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.combat-settings input[type='range'] {
  accent-color: var(--gold-2);
}
.effect-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.effect-row {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius);
  background: rgba(6, 16, 30, 0.6);
}
.effect-row.is-inactive {
  border-left-color: var(--line-strong);
}
.effect-row.is-stale {
  border-left-color: var(--warn);
}
.effect-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.effect-row-head .item-icon,
.effect-row-head .rune-icon {
  flex: none;
  border-radius: 4px;
}
.effect-row-title {
  display: grid;
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
}
.effect-row-title strong {
  color: var(--text-strong);
}
.effect-status {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.effect-status.is-applied {
  background: rgba(63, 199, 113, 0.14);
  color: var(--ok);
}
.effect-status.is-inactive {
  background: var(--bg-3);
  color: var(--muted);
}
.effect-status.is-stale {
  background: rgba(242, 177, 74, 0.14);
  color: var(--warn);
}
.effect-row.is-off {
  border-left-color: var(--line-strong);
  opacity: 0.65;
}
.effect-status.is-off {
  background: var(--bg-3);
  color: var(--muted);
}
/* include / leave out an effect */
.effect-switch {
  position: relative;
  display: inline-flex;
  flex: none;
  cursor: pointer;
}
.effect-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.effect-switch-track {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 8px;
  background: var(--line-strong);
  transition: background 0.15s;
}
.effect-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s, background 0.15s;
}
.effect-switch input:checked + .effect-switch-track {
  background: var(--teal-dim);
}
.effect-switch input:checked + .effect-switch-track::after {
  transform: translateX(12px);
  background: var(--gold-1);
}
.effect-switch input:focus-visible + .effect-switch-track {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.effect-switch input:disabled + .effect-switch-track {
  opacity: 0.4;
}
.effect-bulk {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0 0;
}
.effect-note {
  margin: 0;
  color: var(--text);
}
.effect-row.is-inactive .effect-note {
  color: var(--muted);
}
.effect-control {
  display: grid;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}
.effect-control strong {
  color: var(--text-strong);
}
.effect-control input[type='range'] {
  accent-color: var(--gold-2);
}
.effect-control--toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}
.effect-control--toggle input {
  accent-color: var(--teal);
}
.not-included .chips {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.not-included p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.no-numbers {
  margin-top: 10px;
}
.no-numbers summary {
  cursor: pointer;
}
.no-numbers-group {
  margin-top: 8px;
}
.no-numbers-group p {
  margin: 0;
}
.no-numbers .chips {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

/* build role: lane, quest, summoner spells, jungle pet */
.role-card {
  display: grid;
  gap: 10px;
}
.role-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 100%;
}
.role-seg .seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 4px;
  white-space: nowrap;
}
.role-icon,
.spell-icon {
  border-radius: 4px;
}
.role-rewards summary {
  cursor: pointer;
}
.role-rewards .wt {
  margin-top: 6px;
}
.role-rewards ul {
  margin: 0;
  padding-left: 18px;
}
.spell-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.spell-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid var(--gold-4);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text);
  font-size: 12px;
  text-align: left;
}
.spell-slot:hover {
  border-color: var(--gold-2);
}
.spell-slot.is-empty {
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--muted);
}
.spell-slot-name {
  font-weight: 600;
}
.pet-pick {
  display: grid;
  gap: 6px;
}
.pet-options {
  display: flex;
  gap: 6px;
}
.pet-option {
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-2);
  opacity: 0.55;
}
.pet-option:hover,
.pet-option.is-on {
  opacity: 1;
}
.pet-option.is-on {
  border-color: var(--gold-2);
}
.spell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
}
.spell-tip .wt {
  margin-top: 4px;
}
.extra-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.extra-slot {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}
.extra-slot .item-slot-wrap,
.extra-slot > .item-slot {
  width: 100%;
}
.item-slot--fixed {
  cursor: default;
}
.item-slot--fixed:hover {
  border-color: var(--gold-4);
}
.item-slot-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--gold-3);
  color: var(--bg-0);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.build-card-loadout {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
