:root {
  --bg: #07090F;
  --bg-deep: #04060B;
  --surface: #11172A;
  --surface-2: #1A2138;
  --border: #243150;
  --text: #E5E9F2;
  --text-dim: #8892AB;
  --accent: #16C172;
  --accent-glow: rgba(22, 193, 114, 0.35);
  --gold: #C8AA6E;
  --win: #4ADE80;
  --loss: #F87171;
  --neutral: #8892AB;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --font-display: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background:
    radial-gradient(1100px 700px at 80% -10%, rgba(22,193,114,0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(200,170,110,0.04), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body { display: flex; flex-direction: column; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  overflow: hidden;
}
.brand__avatar {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.5px;
}
.brand__tv { color: var(--accent); }
.brand__sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--text-dim);
  margin-top: 2px;
}

.brand__patch {
  display: inline-block;
  align-self: flex-start;
  margin-top: 6px;
  padding: 2px 9px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.twitch-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #9146FF;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 14px rgba(145, 70, 255, 0.35);
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.twitch-link:hover {
  background: #772CE8;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(145, 70, 255, 0.5);
}
.twitch-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.twitch-link__icon { flex: 0 0 auto; }
.twitch-link__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.twitch-link--live {
  background: linear-gradient(135deg, #9146FF 0%, #6E2BD9 100%);
  padding-left: 10px;
  box-shadow: 0 4px 18px rgba(145, 70, 255, 0.5);
}
.twitch-link--live .twitch-link__label strong {
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-right: 1px;
}
.twitch-link__live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b3b;
  flex: 0 0 auto;
  box-shadow: 0 0 8px rgba(255, 59, 59, 0.85);
  animation: twitch-live-pulse 1.4s ease-in-out infinite;
}
@keyframes twitch-live-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.7; }
}

@media (max-width: 640px) {
  .twitch-link:not(.twitch-link--live) .twitch-link__label { display: none; }
  .twitch-link:not(.twitch-link--live) { padding: 6px 8px; }
  .twitch-link__label { max-width: 60vw; }
}

.topbar__meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.lane-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  gap: 2px;
}
.lane-tab {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
}
.lane-tab:hover { color: var(--text); }
.lane-tab[aria-selected="true"] {
  color: var(--gold);
  background: rgba(200,170,110,0.12);
  box-shadow: inset 0 0 0 1px rgba(200,170,110,0.35);
}
.lane-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.region-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text);
}
.region-select__icon { font-size: 12px; opacity: 0.8; line-height: 1; }
.region-select select {
  appearance: none;
  background: transparent;
  color: var(--text);
  border: 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 18px 2px 0;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
                    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 9px) 50%, calc(100% - 5px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.region-select select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.region-select select option { background: var(--surface); color: var(--text); }

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.badge--tier { color: var(--accent); border-color: rgba(22,193,114,0.4); }
.badge--lane { color: var(--gold); border-color: rgba(200,170,110,0.4); }

/* Layout */
.layout {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

@media (min-width: 860px) {
  .layout {
    grid-template-columns: 1fr 1.2fr;
    grid-template-areas:
      "pool pick"
      "result result";
  }
  .pool-section { grid-area: pool; }
  .pick-section { grid-area: pick; }
  .result-section { grid-area: result; }
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 30%);
}
.card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  gap: 12px;
}
.card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.4px;
}
.card__hint {
  font-size: 12px;
  color: var(--text-dim);
}

/* Pool */
.pool {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 520px) {
  .pool { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
}

.slot {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 8px 6px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: inherit;
  font-family: inherit;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  text-align: center;
  min-width: 0;
}
.slot:hover { border-color: var(--accent); transform: translateY(-1px); background: #1F2A45; }
.slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.slot__img-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: #0B1024;
  display: grid;
  place-items: center;
  position: relative;
}
.slot__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot__plus {
  font-size: 30px;
  color: var(--text-dim);
  font-weight: 300;
}
.slot--empty { border-style: dashed; }
.slot--empty .slot__img-wrap { background: transparent; }

.slot__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.slot--empty .slot__name { color: var(--text-dim); font-weight: 400; }

/* Search */
.search {
  position: relative;
}
.search__input {
  width: 100%;
  font: 600 18px var(--font-body);
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 44px 14px 16px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.search__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search__input::placeholder { color: var(--text-dim); font-weight: 400; }

.search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
}
.search__clear:hover { color: var(--text); background: var(--surface-2); }

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 320px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: var(--shadow);
}
.suggestions__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.suggestions__item:hover,
.suggestions__item[aria-selected="true"] {
  background: var(--surface-2);
}
.suggestions__item img {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  flex-shrink: 0;
}
.suggestions__item span { font-weight: 500; }

/* Quick picks */
.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.quick__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  font: 500 12px var(--font-body);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.quick__btn:hover { border-color: var(--accent); background: #1F2A45; }
.quick__btn img { width: 22px; height: 22px; border-radius: 50%; }

/* Result */
.result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-height: 280px;
}

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 240px;
  color: var(--text-dim);
}
.placeholder__icon { font-size: 44px; opacity: 0.4; margin-bottom: 8px; }
.placeholder h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 4px 0;
  color: var(--text);
  font-size: 22px;
}
.placeholder p { margin: 0; font-size: 14px; }

.result__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.result__enemy {
  display: flex;
  align-items: center;
  gap: 12px;
}
.result__enemy img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.result__enemy-text {
  display: flex;
  flex-direction: column;
}
.result__enemy-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.4px;
}
.result__enemy-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
}
.result__count {
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
}

.rows { display: flex; flex-direction: column; gap: 10px; }

.row {
  display: grid;
  grid-template-columns: 28px 56px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.12s ease;
}
.row:hover { border-color: rgba(22,193,114,0.4); }

.row__rank {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  color: var(--text-dim);
}
.row--top .row__rank { color: var(--gold); }

.row__champ-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

.row__main { min-width: 0; }
.row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.row__name {
  font-size: 16px;
  font-weight: 600;
}
.row__wr {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.row--good .row__wr { color: var(--win); }
.row--bad .row__wr { color: var(--loss); }
.row--neutral .row__wr { color: var(--neutral); }

.row__bar {
  position: relative;
  height: 6px;
  background: var(--bg-deep);
  border-radius: 3px;
  overflow: hidden;
}
.row__bar-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--neutral);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.row--good .row__bar-fill { background: linear-gradient(90deg, var(--accent), var(--win)); }
.row--bad .row__bar-fill { background: linear-gradient(90deg, var(--loss), #B73838); }
.row__mid {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: rgba(255,255,255,0.2);
  left: 50%;
}

.row__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-dim);
}

.row__build {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}
.row__build[hidden] { display: none; }
.row__build-sep {
  color: var(--text-dim);
  opacity: 0.5;
  font-size: 11px;
}
.row__rune {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.row__rune-keystone {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #000;
  padding: 2px;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.row__rune-styles {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
}
.row__rune-style {
  width: 13px;
  height: 13px;
  display: block;
  opacity: 0.85;
}
.row__spells {
  display: inline-flex;
  gap: 4px;
}
.row__spell {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: block;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.row__verdict {
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 11px;
}
.row--good .row__verdict { color: var(--win); }
.row--bad .row__verdict { color: var(--loss); }

.row__nodata {
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
}

/* Loading & error */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--text-dim);
}
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error {
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--loss);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 16px 32px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  gap: 16px;
}
.footer__data { justify-self: start; }
#footer-meta { justify-self: end; text-align: right; grid-column: 3; }
.footer__legal {
  display: inline-flex;
  gap: 18px;
  justify-self: center;
  grid-column: 2;
}
@media (max-width: 720px) {
  .footer {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 8px;
  }
  .footer__data, .footer__legal, #footer-meta {
    justify-self: center;
    grid-column: auto;
    text-align: center;
  }
}
.footer__legal a { color: var(--text-dim); }
.footer__legal a:hover { color: var(--accent); }
.footer__legal a[aria-current="page"] { color: var(--accent); }

.footer__sponsor {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 112, 65, 0.5);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.footer__sponsor:hover {
  color: #ff7041;
  border-bottom-color: #ff7041;
  text-decoration: none;
}

/* xibeca-labs "powered by" badge — Grafana/dashboard aesthetic */
.xibeca-badge {
  --xb-orange: #ff7041;
  --xb-bg: #18181b;
  --xb-bg-hover: #212124;
  --xb-border: #2e2e32;
  --xb-text: #9fa2a8;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 9px;
  border-radius: 4px;
  background: var(--xb-bg);
  border: 1px solid var(--xb-border);
  color: var(--xb-text);
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.4px;
  text-decoration: none;
  text-transform: lowercase;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.xibeca-badge:hover {
  background: var(--xb-bg-hover);
  border-color: var(--xb-orange);
  text-decoration: none;
  color: #d2d5d9;
}
.xibeca-badge__mark {
  color: var(--xb-orange);
  font-size: 11px;
  line-height: 1;
  transform: translateY(-0.5px);
}
.xibeca-badge__label {
  color: var(--xb-text);
  opacity: 0.75;
}
.xibeca-badge__name {
  color: var(--xb-orange);
  font-weight: 600;
}
.xibeca-badge:hover .xibeca-badge__name { color: #ff8c61; }
@media (max-width: 640px) {
  .xibeca-badge__label { display: none; }
}

/* Brand as link (legal pages) */
.brand--link {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.12s ease;
}
.brand--link:hover { opacity: 0.85; text-decoration: none; }

.back-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-decoration: none;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.back-link:hover {
  color: var(--accent);
  border-color: rgba(22,193,114,0.4);
  text-decoration: none;
}

/* Legal pages */
.legal {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 28px;
}
.legal__card {
  padding: 32px 36px;
}
.legal__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.3px;
}
.legal__lead {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.legal__section {
  margin: 26px 0;
}
.legal__section h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 10px;
  letter-spacing: 0.2px;
}
.legal__section p { margin: 0 0 10px; line-height: 1.65; }
.legal__section ul {
  margin: 0 0 10px;
  padding-left: 22px;
  line-height: 1.7;
}
.legal__section ul li::marker { color: var(--text-dim); }
.legal__section a { color: var(--accent); }
.email-protected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(22,193,114,0.08);
  border: 1px dashed rgba(22,193,114,0.35);
  color: var(--accent);
  font-family: inherit;
  text-decoration: none;
}
.email-protected:hover { background: rgba(22,193,114,0.14); text-decoration: none; }
.email-protected--ready { font-variant-ligatures: none; }
.email-protected__placeholder::before { content: "✉ "; opacity: 0.7; }

.legal__placeholder {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px dashed rgba(248, 113, 113, 0.5);
  color: var(--loss);
  font-style: italic;
  font-size: 0.92em;
}
.legal__meta {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 13px;
}
@media (max-width: 600px) {
  .legal { padding: 16px; }
  .legal__card { padding: 22px; }
  .legal__title { font-size: 28px; }
}

/* Picker dialog */
.picker {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0;
  width: min(680px, 92vw);
  max-height: 80vh;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.picker::backdrop { background: rgba(0,0,0,0.6); }

.picker__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.picker__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}
.picker__close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 28px;
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 6px;
}
.picker__close:hover { color: var(--text); background: var(--surface-2); }

.picker__search {
  width: calc(100% - 40px);
  margin: 12px 20px;
  padding: 10px 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: 500 14px var(--font-body);
  outline: none;
}
.picker__search:focus { border-color: var(--accent); }

.picker__grid {
  padding: 8px 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  overflow-y: auto;
  max-height: calc(80vh - 130px);
  gap: 8px;
  overflow-y: auto;
  max-height: calc(80vh - 130px);
}
.picker__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  color: inherit;
  font: 500 11px var(--font-body);
  text-align: center;
  transition: border-color 0.1s ease;
}
.picker__item:hover { border-color: var(--accent); }
.picker__item img { width: 56px; height: 56px; border-radius: 5px; }
.picker__item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
