:root {
  --bg: #0d0e12;
  --surface: #15171e;
  --surface-2: #1c1f28;
  --surface-3: #252936;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #f3f4f6;
  --muted: #8e95a5;
  --gold: #d4a853;
  --gold-soft: rgba(212, 168, 83, 0.14);
  --gold-border: rgba(212, 168, 83, 0.36);
  --win: #22c55e;
  --win-soft: rgba(34, 197, 94, 0.14);
  --loss: #ef4444;
  --loss-soft: rgba(239, 68, 68, 0.14);
  --adc: #f59e0b;
  --support: #10b981;
  --mid: #a78bfa;
  --jungle: #38bdf8;
  --baron: #fb7185;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1040px, 94%);
  margin: 0 auto;
}

/* TOP BAR — ultra-compact passive header (keep actions in thumb zone) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: rgba(13, 14, 18, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  height: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.brand-logo {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

h1 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  padding: 0.06rem 0.34rem;
  border-radius: 5px;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  max-width: 112px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--win);
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

/* MAIN VIEWPORT (padded for bottom nav) */
.app-main {
  padding-top: 0.85rem;
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

.app-view {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
}

.app-view.active {
  display: flex;
}

/* KPI SUMMARY STRIP */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.kpi-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  min-width: 0;
}

.kpi-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-value {
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* FILTERS & CONTROLS */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.role-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.22rem;
  gap: 0.2rem;
}

.role-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1 0 auto;
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 7px;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab-btn.active {
  background: var(--gold);
  color: #111318;
  font-weight: 700;
}

.filter-row {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 0.5rem;
}

select,
input[type="search"],
input[type="text"] {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.48rem 0.65rem;
  font-size: 0.84rem;
  min-height: 40px;
  outline: none;
}

select:focus,
input:focus {
  border-color: var(--gold-border);
}

/* META TABLE */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.meta-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.meta-table th,
.meta-table td {
  padding: 0.62rem 0.65rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.meta-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.meta-table th.active-sort {
  color: var(--gold);
}

.meta-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

.meta-table tbody tr:hover {
  background: var(--surface-2);
}

.meta-table tbody tr:last-child td {
  border-bottom: none;
}

.my-pick-row {
  background: rgba(212, 168, 83, 0.05);
}

.champ-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.champ-avatar {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.champ-name {
  font-weight: 600;
  color: var(--text);
}

.star-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
  min-width: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.star-btn.saved {
  color: var(--gold);
}

.role-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.14rem 0.46rem;
  border-radius: 6px;
}

.role-pill.adc { background: rgba(245, 158, 11, 0.15); color: var(--adc); }
.role-pill.support { background: rgba(16, 185, 129, 0.15); color: var(--support); }
.role-pill.mid { background: rgba(167, 139, 250, 0.16); color: var(--mid); }
.role-pill.jungle { background: rgba(56, 189, 248, 0.16); color: var(--jungle); }
.role-pill.baron { background: rgba(251, 113, 133, 0.16); color: var(--baron); }

.tier-stack {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  padding: 0.14rem 0.38rem;
  border-radius: 5px;
  font-weight: 800;
  font-size: 0.72rem;
}

.tier-S\+ { background: var(--gold); color: #111318; }
.tier-S { background: #e07a3d; color: #fff; }
.tier-A { background: #3b82f6; color: #fff; }
.tier-B { background: #525866; color: #f3f4f6; }
.tier-C { background: #2c303d; color: #9ca3af; }

.global-tier-pill {
  font-size: 0.63rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--muted);
  border: 1px solid var(--border);
}

.win-good { color: var(--win); font-weight: 700; }
.win-bad { color: var(--loss); font-weight: 700; }
.trend-up { color: var(--win); font-size: 0.62rem; margin-left: 0.18rem; }
.trend-down { color: var(--loss); font-size: 0.62rem; margin-left: 0.18rem; }

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 1.5rem !important;
}

/* SKELETON LOADERS */
.skel-row td {
  padding: 0.7rem 0.75rem;
}

.skel-bar {
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.expand-bar {
  display: flex;
  justify-content: center;
  padding: 0.55rem;
  border-top: 1px solid var(--border);
}

.btn-ghost {
  width: 100%;
  max-width: 260px;
  background: var(--surface-2);
  color: var(--gold);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}

.btn-ghost:hover {
  border-color: var(--gold-border);
}

.btn-gold {
  background: var(--gold);
  color: #111318;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 40px;
}

/* PANELS (Draft, Pool, Settings) */
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.panel-head,
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.panel-card h2,
.section-head h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.my-hub-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.my-hub-block {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.my-hub-subhead {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

.counter-calc-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.45rem;
}

.counter-calc-bar select,
.finder-bar select {
  width: 100%;
  font-size: 0.8rem;
  min-height: 38px;
}

.saved-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.saved-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.32rem 0.5rem;
  font-size: 0.76rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.saved-chip-open {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.saved-chip img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.chip-remove-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
}

.chip-remove-btn:hover {
  color: var(--loss);
}

.auto-badge {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  padding: 0.08rem 0.34rem;
  border-radius: 5px;
}

/* DUO CARDS */
.duo-style-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.duo-pair-select {
  min-height: 34px;
  padding: 0.28rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 999px;
}

.pill-btn {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 34px;
}

.pill-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #111318;
  font-weight: 700;
}

.duos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.duo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.duo-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.duo-style-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 0.14rem 0.48rem;
  border-radius: 6px;
}

.duo-wr {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--win);
  font-variant-numeric: tabular-nums;
}

.duo-pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.duo-champ-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.5rem;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  min-height: 46px;
  min-width: 0;
}

.duo-champ-btn:hover {
  border-color: var(--gold-border);
}

.duo-champ-btn img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  flex-shrink: 0;
}

.duo-champ-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.duo-champ-name {
  font-size: 0.82rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duo-champ-sub {
  font-size: 0.68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.duo-plus {
  font-weight: 800;
  color: var(--muted);
}

.duo-note {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
}

/* MATCH LOG & SETTINGS */
.match-log-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.match-log-form input {
  flex: 1 1 130px;
  min-width: 0;
}

.match-log-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.match-log-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 200px;
  overflow-y: auto;
}

.match-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.36rem 0.55rem;
  font-size: 0.78rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.6rem;
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}

.patches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.patch-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.9rem;
  transition: border-color 0.15s ease;
}

.patch-card:hover {
  border-color: var(--gold-border);
}

.patch-date {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.patch-title {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.patch-desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.source-note {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.48;
}

/* THUMB-ZONE BOTTOM NAVIGATION */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(18, 20, 26, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 0.25rem 0.35rem calc(0.28rem + env(safe-area-inset-bottom));
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.16rem;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  min-height: 50px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-btn.active {
  color: var(--gold);
  background: var(--gold-soft);
}

/* NATIVE-STYLE BOTTOM SHEET FOR CHAMPION BUILDS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 60;
}

.modal-panel {
  background: var(--surface);
  border-top: 1px solid var(--border-strong);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  width: min(560px, 100vw);
  max-height: 84dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheetUp 0.18s ease-out;
}

@keyframes sheetUp {
  from { transform: translateY(24px); opacity: 0.7; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
  margin: 0.45rem auto 0.1rem;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.5rem 0.85rem 0.65rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.modal-header-info img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header-text {
  min-width: 0;
}

.modal-header-text strong {
  display: block;
  font-size: 0.96rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-header-text span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.modal-close {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 0.75rem 0.85rem calc(1.1rem + env(safe-area-inset-bottom));
}

.detail-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.stat-mini {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.45rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.stat-mini span {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-mini strong {
  font-size: 0.86rem;
}

.detail-section {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.detail-section h3 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.wr-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--win);
  background: var(--win-soft);
  padding: 0.12rem 0.44rem;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.pr-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-3);
  padding: 0.12rem 0.42rem;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.stat-badges {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.26rem 0.46rem;
  font-size: 0.74rem;
  color: var(--text);
}

.icon-chip img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}

.partner-chip {
  cursor: pointer;
}

.partner-chip:hover {
  border-color: var(--gold-border);
}

.skill-order-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.skill-order-sep {
  color: var(--muted);
  font-weight: 800;
}

.build-option-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.build-option-tabs::-webkit-scrollbar {
  display: none;
}

.option-tab-btn {
  flex: 0 0 auto;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.32rem 0.58rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.option-tab-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #111318;
  font-weight: 700;
}

.stat-option-list {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.stat-option-row,
.build-option-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.36rem;
}

.build-option-title {
  font-size: 0.76rem;
  font-weight: 700;
}

.counter-item-tip {
  font-size: 0.72rem;
  color: var(--muted);
}

.matchup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 0.65rem;
}

.abilities-details summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
}

.ability-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.ability-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
}

.ability-item img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.ability-title {
  font-size: 0.78rem;
  font-weight: 700;
}

.ability-slot {
  font-size: 0.66rem;
  color: var(--gold);
  margin-left: 0.3rem;
}

.ability-desc {
  margin: 0.16rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

.guide-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  padding: 0.36rem 0.68rem;
  border-radius: var(--radius-sm);
}

/* TOAST */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(70px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--gold-border);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  z-index: 80;
  white-space: nowrap;
}

/* META MOVERS STRIP (Rising / Falling) */
.movers-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.15rem 0;
}

.movers-bar::-webkit-scrollbar {
  display: none;
}

.movers-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.mover-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.24rem 0.52rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mover-chip:hover {
  background: var(--surface-2);
  border-color: var(--gold-border);
}

.mover-chip img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

/* 1v1 MATCHUP CHEAT SHEET */
.m1v1-result {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.m1v1-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.m1v1-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.m1v1-vs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.m1v1-champ-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.m1v1-champ-btn img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
}

.m1v1-vs-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.m1v1-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.m1v1-badge.favored {
  background: var(--win-soft);
  color: var(--win);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.m1v1-badge.unfavored {
  background: var(--loss-soft);
  color: var(--loss);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.m1v1-badge.even {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

.m1v1-tips {
  margin: 0;
  padding-left: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.38;
}

.m1v1-tips li::marker {
  color: var(--gold);
}

/* CHAMPION STAT PROFILE BARS (Bottom Sheet) */
.champ-profile-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.65rem;
}

.profile-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.profile-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.profile-pips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.profile-pip {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
}

.profile-pip.on {
  background: var(--gold);
}

.free-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.36rem;
  border-radius: 5px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--win-soft);
  color: var(--win);
  border: 1px solid rgba(34, 197, 94, 0.3);
  vertical-align: middle;
}

.icon-chip.item-stat-chip {
  cursor: pointer;
  border-color: rgba(212, 168, 83, 0.22);
}

.icon-chip.item-stat-chip:hover {
  background: var(--surface-3);
  border-color: var(--gold-border);
}

/* CHAMPION TEXT AUTOCOMPLETE */
.ac-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.ac-input {
  width: 100%;
  height: 38px;
  padding: 0 2rem 0 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ac-input:focus {
  border-color: var(--gold);
  background: var(--surface-3);
}

.ac-input::placeholder {
  color: var(--muted);
}

.ac-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ac-clear:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.ac-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 252px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  z-index: 48;
  padding: 0.25rem;
}

.ac-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.42rem 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
}

.ac-option:hover,
.ac-option.active {
  background: var(--surface-2);
}

.ac-option-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.ac-option-left img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.ac-option-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-option-sub {
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.ac-empty {
  padding: 0.55rem 0.6rem;
  font-size: 0.76rem;
  color: var(--muted);
}

/* MONETIZATION TEST PLACEHOLDERS (AdMob-Ready Non-Intrusive UX) */
.ad-slot {
  background: linear-gradient(135deg, rgba(21, 23, 30, 0.96), rgba(28, 31, 40, 0.96));
  border: 1px dashed rgba(212, 168, 83, 0.34);
  border-radius: var(--radius-md);
  padding: 0.68rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ad-banner {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 54px;
}

.ad-banner-text {
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.3;
  flex: 1;
}

.ad-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ad-badge {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  padding: 0.1rem 0.38rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ad-network {
  font-size: 0.66rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-body-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ad-copy {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  min-width: 0;
  flex: 1;
}

.ad-copy strong {
  font-size: 0.84rem;
  color: var(--text);
}

.ad-copy span {
  font-size: 0.73rem;
  color: var(--muted);
}

.ad-cta-group {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.ad-cta-btn {
  padding: 0.34rem 0.68rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-border);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.ad-cta-btn:hover {
  background: rgba(212, 168, 83, 0.24);
}

.ad-remove-btn,
.btn-ghost-sm {
  padding: 0.34rem 0.62rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.ad-remove-btn:hover,
.btn-ghost-sm:hover {
  background: var(--surface-3);
}

/* SETTINGS TOGGLE SWITCH */
.setting-toggle-row {
  align-items: center;
}

.setting-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s ease, background 0.2s ease;
}

.switch input:checked + .switch-slider {
  background: var(--gold-soft);
  border-color: var(--gold-border);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
  background: var(--gold);
}

/* REWARDED GATE & PRO PREVIEW MODAL */
.promo-panel {
  max-width: 460px;
}

.rewarded-gate-card {
  background: var(--surface-2);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: center;
}

.rewarded-gate-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.rewarded-progress-track {
  width: 100%;
  height: 8px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.rewarded-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), #f5d078);
  transition: width 0.2s linear;
}

.pro-tier-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text);
  text-align: left;
}

.pro-tier-list li::marker {
  color: var(--gold);
}

.pro-price-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.pro-price-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: center;
}

.pro-price-card.featured {
  border-color: var(--gold-border);
  background: var(--gold-soft);
}

.pro-price-card strong {
  font-size: 1rem;
  color: var(--text);
}

.pro-price-card span {
  font-size: 0.7rem;
  color: var(--muted);
}

/* CHAMPION SELECT HELPER */
.champ-select-card {
  border-color: var(--gold-border);
  background: linear-gradient(180deg, rgba(212, 168, 83, 0.06), var(--surface) 48%);
}

.cs-timer-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.cs-timer-btn {
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--gold-border);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
}

.cs-timer-btn.running {
  background: var(--win-soft);
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--win);
}

.cs-timer-btn.urgent {
  background: var(--loss-soft);
  border-color: rgba(239, 68, 68, 0.55);
  color: var(--loss);
}

.cs-block {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.cs-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.cs-comp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cs-ban-row {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.1rem;
}

.cs-ban-row::-webkit-scrollbar {
  display: none;
}

.cs-ban-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.24rem 0.52rem;
  border-radius: 999px;
  background: var(--loss-soft);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.cs-ban-chip img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.cs-ban-rate {
  color: var(--loss);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cs-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.cs-check-pill {
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cs-check-pill.done {
  background: var(--win-soft);
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--win);
}

.cs-comp-verdict {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.74rem;
}

.cs-warn-pill {
  padding: 0.16rem 0.48rem;
  border-radius: 6px;
  background: var(--loss-soft);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-weight: 700;
}

.cs-ok-pill {
  padding: 0.16rem 0.48rem;
  border-radius: 6px;
  background: var(--win-soft);
  color: var(--win);
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-weight: 700;
}

@media (max-width: 680px) {
  .container {
    width: 94%;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .champ-profile-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-row {
    grid-template-columns: 125px 1fr;
  }

  .meta-table th,
  .meta-table td {
    padding: 0.55rem 0.42rem;
    font-size: 0.8rem;
  }

  .col-rank,
  .col-score,
  .meta-table td:first-child,
  .meta-table td:last-child {
    display: none;
  }

  .champ-avatar {
    width: 28px;
    height: 28px;
  }
}

@media (min-width: 860px) {
  .bottom-nav {
    max-width: 520px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 14px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 0.28rem;
  }

  .modal-backdrop {
    align-items: center;
    padding: 1rem;
  }

  .modal-panel {
    border-radius: 16px;
    max-height: 82dvh;
  }
}
