/* Nexus Core — Draft Analyzer · consolidated CSS */

/* === styles/tokens.css === */
/* ============================================================
   NEXUS CORE — DRAFT ANALYZER · DESIGN TOKENS
   Gaming aesthetic: deep dark base + Wild Rift gold + Valorant
   clean accents. Tokens are layered: primitive → semantic →
   role-specific (ally / enemy / active slot).
   ============================================================ */

:root {
  /* — primitive palette ———————————————————————————————— */
  --c-ink-0: #06080d;
  --c-ink-1: #0a0e16;
  --c-ink-2: #10151f;
  --c-ink-3: #161c2a;
  --c-ink-4: #1d2536;
  --c-ink-5: #2a3447;
  --c-ink-6: #3a465e;

  --c-bone-0: #f6f1e3;
  --c-bone-1: #d9d2bf;
  --c-bone-2: #a89e84;
  --c-bone-3: #6e6a5d;

  --c-gold-0: #f7e2a8;
  --c-gold-1: #e6c378;
  --c-gold-2: #c8a14a;
  --c-gold-3: #9a7a2c;
  --c-gold-4: #4f3d11;

  --c-cyan-0: #a8e6ff;
  --c-cyan-1: #4ad6ff;
  --c-cyan-2: #1da2d4;
  --c-cyan-3: #0d5e80;

  --c-rose-0: #ffd0d0;
  --c-rose-1: #ff7777;
  --c-rose-2: #e23a3a;
  --c-rose-3: #8a1a1a;

  --c-violet-1: #a07dff;
  --c-violet-2: #6d4cd6;
  --c-emerald-1: #5cd9a7;
  --c-emerald-2: #1f8a5b;
  --c-amber-1: #ffb547;
  --c-amber-2: #c47a17;

  /* — semantic surfaces ——————————————————————————————— */
  --bg-app: radial-gradient(ellipse at 50% -20%, #1a2236 0%, #06080d 65%);
  --bg-stage: linear-gradient(180deg, #0b0f18 0%, #060810 100%);
  --bg-panel: linear-gradient(180deg, rgba(22, 28, 42, 0.92) 0%, rgba(13, 17, 26, 0.92) 100%);
  --bg-panel-flat: #0e131e;
  --bg-card: linear-gradient(180deg, #161c2a 0%, #0e131e 100%);
  --bg-card-hover: linear-gradient(180deg, #1c2336 0%, #131a26 100%);
  --bg-overlay: rgba(6, 8, 13, 0.78);

  --border-faint: rgba(200, 161, 74, 0.12);
  --border-subtle: rgba(200, 161, 74, 0.22);
  --border-strong: rgba(230, 195, 120, 0.55);
  --border-cool: rgba(74, 214, 255, 0.28);
  --border-hot: rgba(226, 58, 58, 0.32);

  --text-primary: #f0eadb;
  --text-secondary: #b9b09a;
  --text-tertiary: #7c7665;
  --text-muted: #5c5749;
  --text-inverse: #0a0e16;
  --text-gold: var(--c-gold-1);

  /* — role colors ————————————————————————————————— */
  --c-ally: #4ad6ff;
  --c-ally-soft: rgba(74, 214, 255, 0.16);
  --c-ally-glow: rgba(74, 214, 255, 0.45);
  --c-enemy: #ff5a5a;
  --c-enemy-soft: rgba(255, 90, 90, 0.16);
  --c-enemy-glow: rgba(255, 90, 90, 0.45);
  --c-active: #f5d77c;
  --c-active-glow: rgba(245, 215, 124, 0.55);

  /* — tip categories ——————————————————————————————— */
  --tip-warning-bg: rgba(255, 90, 90, 0.10);
  --tip-warning-fg: #ff8a8a;
  --tip-warning-bd: rgba(255, 90, 90, 0.35);

  --tip-matchup-bg: rgba(255, 181, 71, 0.10);
  --tip-matchup-fg: #ffc56b;
  --tip-matchup-bd: rgba(255, 181, 71, 0.35);

  --tip-team-bg: rgba(74, 214, 255, 0.10);
  --tip-team-fg: #87dfff;
  --tip-team-bd: rgba(74, 214, 255, 0.32);

  --tip-macro-bg: rgba(160, 125, 255, 0.10);
  --tip-macro-fg: #c1a8ff;
  --tip-macro-bd: rgba(160, 125, 255, 0.32);

  --tip-meta-bg: rgba(230, 195, 120, 0.10);
  --tip-meta-fg: var(--c-gold-1);
  --tip-meta-bd: rgba(230, 195, 120, 0.32);

  --tip-info-bg: rgba(150, 150, 150, 0.08);
  --tip-info-fg: #b9b09a;
  --tip-info-bd: rgba(150, 150, 150, 0.22);

  /* — tier colors ———————————————————————————————— */
  --tier-S: linear-gradient(135deg, #ffe27a 0%, #c89a26 100%);
  --tier-A: linear-gradient(135deg, #c1a8ff 0%, #6d4cd6 100%);
  --tier-B: linear-gradient(135deg, #87dfff 0%, #1da2d4 100%);
  --tier-C: linear-gradient(135deg, #b9b09a 0%, #6e6a5d 100%);

  /* — radii / shadows / blur ——————————————————————————— */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  --sh-flat: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --sh-sm: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  --sh-md: 0 6px 18px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  --sh-lg: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  --sh-glow-gold: 0 0 0 1px rgba(230, 195, 120, 0.4), 0 0 22px rgba(230, 195, 120, 0.35);
  --sh-glow-ally: 0 0 0 1px rgba(74, 214, 255, 0.45), 0 0 22px rgba(74, 214, 255, 0.32);
  --sh-glow-enemy: 0 0 0 1px rgba(255, 90, 90, 0.45), 0 0 22px rgba(255, 90, 90, 0.32);
  --sh-inset: inset 0 0 0 1px var(--border-subtle);

  /* — typography ———————————————————————————————— */
  --ff-display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --ff-ui: "Rajdhani", "Saira Condensed", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-num: "Rajdhani", system-ui, sans-serif;

  --fz-3xs: 10px;
  --fz-2xs: 11px;
  --fz-xs: 12px;
  --fz-sm: 13px;
  --fz-md: 14px;
  --fz-lg: 16px;
  --fz-xl: 18px;
  --fz-2xl: 22px;
  --fz-3xl: 28px;
  --fz-4xl: 36px;
  --fz-5xl: 48px;

  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;
  --tracking-widest: 0.16em;

  /* — spacing ————————————————————————————————— */
  --s-1: 2px;
  --s-2: 4px;
  --s-3: 6px;
  --s-4: 8px;
  --s-5: 12px;
  --s-6: 16px;
  --s-7: 20px;
  --s-8: 24px;
  --s-9: 32px;
  --s-10: 40px;

  /* — motion ————————————————————————————————— */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --d-fast: 140ms;
  --d-base: 240ms;
  --d-slow: 420ms;
  --d-cinematic: 720ms;

  /* — layout ————————————————————————————————— */
  --side-col-w: 180px;
  --reco-strip-h: 280px;
  --topbar-h: 56px;
}

/* — Theme: Sombre or (default WR-inspired) ———————————————— */
[data-theme="gold"] {
  --bg-app: radial-gradient(ellipse at 50% -10%, #28210f 0%, #0a0a0d 70%);
  --c-active: #f5d77c;
  --border-strong: rgba(230, 195, 120, 0.7);
}

/* — Theme: Sombre profond (Valorant-ish) ——————————————————— */
[data-theme="deep"] {
  --bg-app: radial-gradient(ellipse at 50% -20%, #0d1426 0%, #04060c 65%);
  --c-active: #4ad6ff;
  --c-active-glow: rgba(74, 214, 255, 0.55);
  --border-strong: rgba(74, 214, 255, 0.55);
}

/* — Theme: Sombre minimal ——————————————————————————————— */
[data-theme="minimal"] {
  --bg-app: linear-gradient(180deg, #0e1116 0%, #060809 100%);
  --c-active: #d9d2bf;
  --c-active-glow: rgba(217, 210, 191, 0.4);
  --border-strong: rgba(217, 210, 191, 0.5);
}

/* === styles/layout.css === */
/* ============================================================
   LAYOUT — Paysage. Top HUD · 3 colonnes (allies / grid / enemies)
   · Reco strip en bas plein largeur. Responsive: scale fluide.
   ============================================================ */

.draft-analyzer-shell * { box-sizing: border-box; }

.draft-analyzer-shell {
  margin: 0;
  padding: 0;
  background: var(--c-ink-0);
  color: var(--text-primary);
  font-family: var(--ff-body);
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  width: 100%;
  height: min(980px, calc(100vh - 120px));
  min-height: 780px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.draft-analyzer-shell button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.draft-analyzer-shell input { font-family: inherit; color: inherit; }
.draft-analyzer-shell ul, .draft-analyzer-shell ol { margin: 0; padding: 0; list-style: none; }

.draft-analyzer-shell {
  display: grid;
  grid-template-rows: auto 1fr var(--reco-strip-h);
  background: var(--bg-app);
  position: relative;
  overflow: hidden;
}

/* Subtle grain overlay */
.draft-analyzer-shell::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(230, 195, 120, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(74, 214, 255, 0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* corner ornaments — Wild Rift feel */
.draft-analyzer-shell::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(180deg, rgba(230, 195, 120, 0.08) 0%, transparent 4%, transparent 96%, rgba(230, 195, 120, 0.06) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ----- TOP HUD ----- */
.topbar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 36px var(--s-7) 0;
  border-bottom: 1px solid var(--border-faint);
  background:
    linear-gradient(180deg, rgba(15, 19, 28, 0.94) 0%, rgba(10, 13, 22, 0.85) 100%);
  backdrop-filter: blur(8px);
  min-height: calc(var(--topbar-h) + 12px);
  overflow: visible;
}

.topbar::before, .topbar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  height: 1px;
  width: 24%;
  background: linear-gradient(90deg, transparent, var(--c-gold-2), transparent);
  pointer-events: none;
}
.topbar::before { left: 0; }
.topbar::after { right: 0; }

.topbar__left, .topbar__right {
  display: flex; align-items: center; gap: var(--s-5);
}
.topbar__left {
  grid-column: 1;
}
.topbar__left,
.topbar__right,
.topbar__center {
  min-width: 0;
}
.topbar__right {
  justify-content: flex-end;
  grid-column: 3;
}
.topbar__center {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 2;
  overflow: visible;
}

/* ----- STAGE (3 columns) ----- */
.stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--side-col-w) 1fr var(--side-col-w);
  gap: var(--s-5);
  padding: var(--s-6) var(--s-6) var(--s-5) var(--s-6);
  min-height: 0;
  overflow: hidden;
}

.team-col {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  min-height: 0;
  position: relative;
}

.team-col__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 var(--s-3) var(--s-3);
  border-bottom: 1px solid var(--border-faint);
  margin-bottom: var(--s-2);
}

.team-col__title {
  font-family: var(--ff-display);
  font-size: var(--fz-md);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.team-col[data-side="ally"] .team-col__title { color: var(--c-ally); }
.team-col[data-side="enemy"] .team-col__title { color: var(--c-enemy); }

.team-col__count {
  font-family: var(--ff-num);
  font-size: var(--fz-xs);
  letter-spacing: var(--tracking-wider);
  color: var(--text-tertiary);
}

.team-col__slots {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  flex: 1;
  min-height: 0;
}

/* ----- CENTER GRID AREA ----- */
.grid-area {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  min-height: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--sh-md);
  position: relative;
}

/* runic corner brackets */
.grid-area::before, .grid-area::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--c-gold-2);
  pointer-events: none;
  opacity: 0.6;
}
.grid-area::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-radius: var(--r-lg) 0 0 0; }
.grid-area::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-radius: 0 0 var(--r-lg) 0; }

.grid-toolbar {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  flex-wrap: wrap;
}

.grid-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--c-ink-5) transparent;
}
.grid-scroll::-webkit-scrollbar { width: 6px; }
.grid-scroll::-webkit-scrollbar-thumb { background: var(--c-ink-5); border-radius: 999px; }
.grid-scroll::-webkit-scrollbar-track { background: transparent; }

/* ----- RECO STRIP (bottom) ----- */
.reco-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--s-5);
  padding: var(--s-5) var(--s-6) var(--s-6) var(--s-6);
  border-top: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(10, 13, 22, 0.4) 0%, rgba(6, 8, 13, 0.95) 100%);
  min-height: 0;
}

.reco-strip::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%; transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--c-gold-2) 50%, transparent 100%);
  pointer-events: none;
  filter: blur(0.5px);
}

/* responsive — keep paysage shape, scale font/density */
@media (max-width: 1180px) {
  :root {
    --side-col-w: 160px;
    --reco-strip-h: 248px;
    --topbar-h: 50px;
  }
}
@media (max-width: 980px) {
  :root {
    --side-col-w: 140px;
    --reco-strip-h: 220px;
  }
  .grid-area { padding: var(--s-4); }
  .stage { padding: var(--s-4); gap: var(--s-4); }
}
@media (max-width: 820px) {
  :root {
    --side-col-w: 124px;
    --reco-strip-h: 200px;
  }
}
@media (min-height: 900px) {
  :root { --reco-strip-h: 320px; }
}

/* === styles/components.css === */
/* ============================================================
   COMPONENTS — Topbar / Slots / Grid / Reco / Breakdown / Tweaks
   ============================================================ */

/* =====================================================
   TOPBAR
   ===================================================== */
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}
.brand__mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #e6c378 0%, #9a7a2c 100%);
  color: var(--c-ink-0);
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 14px;
  border-radius: 4px;
  box-shadow: 0 0 16px rgba(230, 195, 120, 0.4);
  position: relative;
}
.brand__mark::after {
  content: "";
  position: absolute; inset: 2px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  pointer-events: none;
}
.brand__name {
  display: flex; flex-direction: column; line-height: 1;
}
.brand__name b {
  font-family: var(--ff-display);
  font-size: var(--fz-md);
  letter-spacing: var(--tracking-wider);
  color: var(--c-bone-0);
  text-transform: uppercase;
}
.brand__name span {
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  letter-spacing: var(--tracking-widest);
  color: var(--c-bone-3);
  text-transform: uppercase;
  margin-top: 2px;
}
.brand__divider {
  width: 1px; height: 24px;
  background: linear-gradient(180deg, transparent, var(--c-gold-3), transparent);
  margin: 0 var(--s-3);
}
.brand__mode {
  font-family: var(--ff-ui);
  font-size: var(--fz-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: var(--s-3);
  flex-wrap: nowrap;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
  position: absolute;
  left: 50%;
  top: 4px;
  transform: translateX(-50%);
  z-index: 2;
  max-width: min(100%, 420px);
}
.brand__select {
  appearance: none;
  height: 30px;
  min-width: 132px;
  padding: 0 28px 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  background:
    linear-gradient(180deg, rgba(40, 48, 66, 0.72), rgba(20, 25, 38, 0.82));
  color: var(--c-gold-1);
  font-family: var(--ff-ui);
  font-size: var(--fz-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  outline: none;
  cursor: pointer;
}
.brand__select:focus,
.brand__select:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(230, 195, 120, 0.18);
}

.brand__select[data-lane-required="true"] {
  border-color: var(--c-gold-1);
  box-shadow:
    0 0 0 1px rgba(230, 195, 120, 0.45),
    0 0 18px rgba(230, 195, 120, 0.28);
  animation: lanePromptGlow 1.8s ease-in-out infinite;
}

.draft-analyzer-shell[data-lane-required="true"] .brand__mode {
  color: var(--c-gold-0);
}

/* Composition score in center */
.compo-score {
  display: flex; align-items: center; gap: var(--s-5);
  padding: var(--s-3) var(--s-6) 5px;
  background: linear-gradient(180deg, rgba(22, 28, 42, 0.7), rgba(13, 17, 26, 0.7));
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  position: relative;
  overflow: visible;
  margin: 10px;
}

.compo-score::before, .compo-score::after {
  content: "";
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px;
  background: var(--c-gold-2);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--c-gold-1);
}
.compo-score::before { left: -3px; }
.compo-score::after { right: -3px; }
.compo-score__side {
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--ff-ui);
  font-size: var(--fz-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}
.compo-score__num {
  font-family: var(--ff-display);
  font-size: var(--fz-2xl);
  font-weight: 600;
  color: var(--c-gold-1);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  min-width: 40px;
  text-align: center;
}
.compo-score__label {
  font-family: var(--ff-ui);
  font-size: 10px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-tertiary);
  display: flex; flex-direction: column; gap: 2px;
}
.compo-score__label b {
  font-family: var(--ff-display);
  font-size: var(--fz-2xs);
  color: var(--c-bone-1);
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
}
.compo-score__divider {
  width: 1px; height: 28px;
  background: linear-gradient(180deg, transparent, var(--c-gold-3), transparent);
}
.compo-score__bar {
  flex: 1;
  height: 6px;
  min-width: 100px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--r-pill);
  position: relative;
  overflow: hidden;
}
.compo-score__bar-fill {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--c-rose-2) 0%, var(--c-amber-1) 50%, var(--c-emerald-1) 100%);
  transform-origin: left;
  transition: transform var(--d-slow) var(--ease-out-expo);
}
.compo-score__debug {
  position: absolute;
  top: 50%;
  right: -42px;
  transform: translateY(-50%);
  z-index: 12;
}
.compo-score__debug-trigger {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(230, 195, 120, 0.55);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 237, 188, 0.2), transparent 55%),
    linear-gradient(180deg, rgba(24, 31, 46, 0.98), rgba(10, 13, 22, 0.98));
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.4),
    0 0 0 3px rgba(14, 19, 31, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: var(--c-gold-0);
  font-family: var(--ff-ui);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.015em;
  cursor: help;
  transition:
    box-shadow var(--d-fast) var(--ease-out-expo),
    border-color var(--d-fast) var(--ease-out-expo),
    color var(--d-fast) var(--ease-out-expo),
    transform var(--d-fast) var(--ease-out-expo);
}
.compo-score__debug-trigger:hover,
.compo-score__debug-trigger:focus-visible {
  border-color: rgba(230, 195, 120, 0.9);
  transform: translateY(-1px);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.45),
    0 0 0 3px rgba(14, 19, 31, 0.7),
    0 0 14px rgba(230, 195, 120, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  outline: none;
}
.compo-score__debug[data-has-text="false"] .compo-score__debug-trigger {
  opacity: 0.72;
}
.compo-score__debug-bubble {
  position: absolute;
  top: calc(100% + 8px);
  right: -6px;
  transform: translateY(-4px);
  min-width: 160px;
  max-width: min(280px, calc(100vw - 32px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  color: rgba(255, 248, 226, 0.92);
  text-align: center;
  white-space: pre-line;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.55);
  background: linear-gradient(180deg, rgba(7, 10, 18, 0.92), rgba(12, 16, 26, 0.88));
  border: 1px solid rgba(230, 195, 120, 0.2);
  border-radius: 6px;
  padding: 3px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition:
    opacity var(--d-fast) var(--ease-out-expo),
    transform var(--d-fast) var(--ease-out-expo),
    visibility var(--d-fast) var(--ease-out-expo);
}
.compo-score__debug-bubble::after {
  content: "";
  position: absolute;
  left: auto;
  right: 14px;
  top: 0;
  width: 8px;
  height: 8px;
  background: rgba(12, 16, 26, 0.96);
  border-right: 1px solid rgba(230, 195, 120, 0.2);
  border-bottom: 1px solid rgba(230, 195, 120, 0.2);
  transform: translateY(-50%) rotate(45deg);
}
.compo-score__debug:hover .compo-score__debug-bubble,
.compo-score__debug:focus-within .compo-score__debug-bubble,
.compo-score__debug[data-open="true"] .compo-score__debug-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* HUD buttons */
.hud-btn {
  display: inline-flex; align-items: center; gap: var(--s-3);
  height: 34px; padding: 0 var(--s-5);
  background: linear-gradient(180deg, rgba(40, 48, 66, 0.5), rgba(20, 25, 38, 0.7));
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-family: var(--ff-ui);
  font-size: var(--fz-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--d-fast) var(--ease-out-expo);
}
.hud-btn:hover {
  background: linear-gradient(180deg, rgba(60, 70, 96, 0.5), rgba(28, 36, 54, 0.7));
  border-color: var(--border-strong);
  color: var(--c-bone-0);
}
.hud-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(230, 195, 120, 0.15), rgba(154, 122, 44, 0.25));
  border-color: var(--c-gold-2);
  color: var(--c-gold-0);
}
.hud-btn__icon {
  width: 14px; height: 14px;
  display: inline-grid; place-items: center;
  font-size: 12px;
}

/* =====================================================
   TEAM SLOTS
   ===================================================== */
.slot {
  --accent: var(--c-ink-5);
  --accent-glow: transparent;
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--s-3);
  padding: var(--s-3);
  background: var(--bg-card);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--d-fast) var(--ease-out-expo);
  min-height: 64px;
  align-items: center;
  isolation: isolate;
}

.team-col[data-side="ally"]  .slot { --accent: var(--c-ally);  --accent-glow: var(--c-ally-glow); }
.team-col[data-side="enemy"] .slot { --accent: var(--c-enemy); --accent-glow: var(--c-enemy-glow); }

/* — Lane color per role — */
.slot[data-role="TOP"]     { --slot-lane: #e05c5c; }
.slot[data-role="JUNGLE"]  { --slot-lane: #52c96a; }
.slot[data-role="MID"]     { --slot-lane: #b57fff; }
.slot[data-role="DRAGON"]  { --slot-lane: #4ad6ff; }
.slot[data-role="SUPPORT"] { --slot-lane: #f5c842; }

/* Empty slot: lane color on indicator bar + border tint */
.slot[data-state="empty"]::before {
  background: var(--slot-lane, var(--accent));
}
.slot[data-state="empty"] {
  border-color: color-mix(in oklab, var(--slot-lane, var(--border-faint)) 25%, var(--border-faint));
}

.slot::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0.35;
  transition: opacity var(--d-fast);
}

.slot:hover {
  background: var(--bg-card-hover);
  border-color: color-mix(in oklab, var(--accent) 35%, transparent);
}
.slot:hover::before { opacity: 0.7; }

.slot[data-active="true"] {
  border-color: var(--c-active);
  box-shadow: 0 0 0 1px var(--c-active), 0 0 18px var(--c-active-glow);
  background: linear-gradient(180deg, rgba(245, 215, 124, 0.08), rgba(13, 17, 26, 0.8));
}
.slot[data-active="true"]::before {
  background: var(--c-active);
  opacity: 1;
  box-shadow: 0 0 8px var(--c-active);
}

.slot[data-state="filled"] {
  border-color: color-mix(in oklab, var(--accent) 25%, var(--border-faint));
}
.slot[data-state="filled"]::before { opacity: 0.6; }

.slot__portrait {
  width: 48px; height: 48px;
  border-radius: var(--r-xs);
  background: var(--c-ink-3);
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
}
.slot__portrait img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.slot__portrait .placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c-ink-3), var(--c-ink-2));
  color: var(--c-bone-3);
  font-family: var(--ff-display);
  font-size: var(--fz-md);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
}
.slot__portrait .empty-rune {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at center, color-mix(in oklab, var(--accent) 12%, var(--c-ink-3)), var(--c-ink-2));
  position: relative;
}
/* Empty slot: tint portrait bg + icon with lane color */
.slot[data-state="empty"] .slot__portrait .empty-rune {
  background: radial-gradient(ellipse at center, color-mix(in oklab, var(--slot-lane, var(--accent)) 20%, var(--c-ink-3)), var(--c-ink-2));
}
.slot__portrait .empty-rune img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
  opacity: 0.98;
  filter:
    brightness(0)
    saturate(100%)
    invert(82%)
    sepia(42%)
    saturate(621%)
    hue-rotate(356deg)
    brightness(95%)
    contrast(90%)
    drop-shadow(0 0 10px rgba(230, 195, 120, 0.28));
}
.slot[data-state="empty"] .slot__portrait .empty-rune img {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}
.slot__portrait .empty-rune::before {
  content: "";
  position: absolute; inset: 4px;
  border: 1px dashed color-mix(in oklab, var(--accent) 35%, transparent);
  border-radius: 2px;
}
.slot[data-state="empty"] .slot__portrait .empty-rune::before {
  border-color: color-mix(in oklab, var(--slot-lane, var(--accent)) 50%, transparent);
}

.slot__body {
  display: flex; flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.slot__name {
  font-family: var(--ff-display);
  font-size: var(--fz-sm);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: var(--tracking-wide);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slot__name--empty {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 400;
}
.slot__name--lane {
  color: var(--slot-lane, var(--text-muted));
  font-style: normal;
  font-weight: 600;
  font-size: var(--fz-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}
/* Lane label below portrait — desktop: hidden (shown in .slot__body), mobile: visible */
.slot__lane-label {
  display: none;
}
.slot__meta {
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.slot__you-badge {
  display: inline-flex; align-items: center;
  height: 16px; padding: 0 6px;
  background: var(--c-active);
  color: var(--c-ink-0);
  font-family: var(--ff-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  border-radius: 2px;
  position: absolute;
  top: 4px; right: 4px;
  z-index: 2;
  box-shadow: 0 0 8px var(--c-active-glow);
}
.slot__remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  color: var(--text-tertiary);
  font-size: 10px;
  opacity: 0;
  transition: opacity var(--d-fast);
}
.slot:hover .slot__remove { opacity: 1; }
.slot__remove:hover { color: var(--c-rose-1); border-color: var(--c-rose-2); }

/* =====================================================
   GRID — filters, search, champion cards
   ===================================================== */
.role-filters {
  display: flex; gap: var(--s-5);
  align-items: center;
  flex-wrap: wrap;
}
.role-pill {
  display: inline-flex; align-items: center; gap: var(--s-3);
  height: 32px; padding: 0 var(--s-4);
  background: linear-gradient(180deg, rgba(40, 48, 66, 0.4), rgba(20, 25, 38, 0.5));
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-family: var(--ff-ui);
  font-size: var(--fz-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--d-fast);
  position: relative;
}
.role-pill:hover {
  border-color: var(--border-subtle);
  color: var(--c-bone-0);
}
.role-pill[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(230, 195, 120, 0.18), rgba(154, 122, 44, 0.10));
  border-color: var(--c-gold-2);
  color: var(--c-gold-0);
  box-shadow: 0 0 12px rgba(230, 195, 120, 0.20);
}
.role-pill__icon {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
}
.role-pill__icon img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
  filter: brightness(1.08) contrast(1.04);
}

.search-box {
  display: flex; align-items: center; gap: var(--s-3);
  height: 32px; padding: 0 var(--s-4);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  flex: 1; max-width: 240px;
  margin-left: auto;
}
.search-box:focus-within { border-color: var(--c-gold-2); }
.search-box svg { width: 14px; height: 14px; color: var(--text-tertiary); }
.search-box input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  font-family: var(--ff-body);
  font-size: var(--fz-xs);
  letter-spacing: var(--tracking-normal);
}
.search-box input::placeholder { color: var(--text-tertiary); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: var(--s-3);
  padding-bottom: var(--s-5);
}
[data-density="compact"] .grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
[data-density="airy"] .grid    { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s-5); }

.champ-card {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: var(--r-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-faint);
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--d-fast) var(--ease-out-expo), border-color var(--d-fast), box-shadow var(--d-fast);
  isolation: isolate;
}
.champ-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-strong) inset, 0 0 16px rgba(230, 195, 120, 0.20);
  z-index: 2;
}
.champ-card[data-picked="true"] {
  opacity: 0.32;
  filter: grayscale(0.6);
  pointer-events: none;
}
.champ-card[data-picked="true"]::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent 0 6px, rgba(0, 0, 0, 0.4) 6px 7px);
  pointer-events: none;
}

.champ-card__portrait {
  aspect-ratio: 1 / 1;
  position: relative;
  background: linear-gradient(135deg, var(--c-ink-3), var(--c-ink-2));
  display: grid; place-items: center;
}
.champ-card__portrait img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.champ-card__portrait .ph {
  font-family: var(--ff-display);
  color: color-mix(in oklab, var(--c-gold-1) 35%, transparent);
  font-size: var(--fz-2xl);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
.champ-card__tier {
  position: absolute;
  top: 4px; left: 4px;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-family: var(--ff-display);
  font-size: 11px;
  font-weight: 700;
  border-radius: 3px;
  color: var(--c-ink-0);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.champ-card__tier[data-tier="S"] { background: var(--tier-S); }
.champ-card__tier[data-tier="A"] { background: var(--tier-A); }
.champ-card__tier[data-tier="B"] { background: var(--tier-B); }
.champ-card__tier[data-tier="C"] { background: var(--tier-C); }

.champ-card__roles {
  position: absolute;
  bottom: 4px; right: 4px;
  display: flex; gap: 2px;
}
.champ-card__role {
  display: inline-grid; place-items: center;
  width: 16px; height: 16px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border-faint);
  border-radius: 2px;
  font-family: var(--ff-ui);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--c-bone-1);
  text-transform: uppercase;
}

.champ-card__name {
  padding: 4px 6px 6px;
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85));
}

.champ-card[data-recommended="true"] {
  border-color: var(--c-gold-2);
  box-shadow: 0 0 0 1px var(--c-gold-2), 0 0 14px rgba(230, 195, 120, 0.35);
}
.champ-card__rec-marker {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  display: grid; place-items: center;
  background: var(--c-gold-2);
  color: var(--c-ink-0);
  font-family: var(--ff-display);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  box-shadow: 0 0 8px var(--c-gold-1);
  z-index: 2;
}

/* =====================================================
   RECO STRIP — left side: podium (top 3) + dock (4-7)
   ===================================================== */
.reco-side {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--s-4);
  min-height: 0;
}

.reco-side__header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 var(--s-3);
}
.reco-side__title {
  font-family: var(--ff-display);
  font-size: var(--fz-md);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--c-gold-0);
  display: flex; align-items: center; gap: var(--s-3);
}
.reco-side__title::before {
  content: "◆";
  font-size: 10px;
  color: var(--c-gold-2);
  text-shadow: 0 0 8px var(--c-gold-1);
}
.reco-side__sub {
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.reco-side__sub em {
  font-style: normal;
  color: var(--c-active);
  font-weight: 600;
}

.podium {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s-4);
  min-height: 0;
}

.podium-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--d-base) var(--ease-out-expo);
  isolation: isolate;
}
.podium-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.podium-card[data-selected="true"] {
  border-color: var(--c-gold-1);
  box-shadow: var(--sh-glow-gold);
}
.podium-card[data-rank="1"] {
  border-color: var(--c-gold-2);
}
.podium-card[data-rank="1"]::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(230, 195, 120, 0.12), transparent 70%);
  pointer-events: none;
}

.podium-card__rank {
  position: absolute;
  top: var(--s-3); left: var(--s-3);
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xs);
  font-family: var(--ff-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-gold-1);
  z-index: 3;
}
.podium-card[data-rank="1"] .podium-card__rank {
  background: var(--tier-S);
  color: var(--c-ink-0);
  border-color: var(--c-gold-1);
  box-shadow: 0 0 8px var(--c-gold-1);
}

.podium-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-3);
  padding: var(--s-4);
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent);
  border-bottom: 1px solid var(--border-faint);
}
.podium-card__portrait {
  width: 56px; height: 56px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-ink-3), var(--c-ink-2));
  display: grid; place-items: center;
  position: relative;
}
.podium-card__portrait .ph {
  font-family: var(--ff-display);
  font-size: var(--fz-xl);
  color: var(--c-gold-1);
  font-weight: 600;
}
.podium-card__portrait img { width: 100%; height: 100%; object-fit: cover; }
.podium-card[data-rank="1"] .podium-card__portrait { width: 72px; height: 72px; }

.podium-card__name {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.podium-card__name b {
  font-family: var(--ff-display);
  font-size: var(--fz-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  color: var(--text-primary);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.podium-card__role {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.podium-card__role b {
  color: var(--c-active);
  font-weight: 600;
  font-size: var(--fz-2xs);
}

.podium-card__score {
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 2px;
}
.podium-card__score-num {
  font-family: var(--ff-display);
  font-size: var(--fz-2xl);
  font-weight: 700;
  color: var(--c-gold-1);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  text-shadow: 0 0 12px rgba(230, 195, 120, 0.4);
}
.podium-card[data-rank="1"] .podium-card__score-num {
  font-size: var(--fz-3xl);
}
.podium-card__grade {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 4px;
  font-family: var(--ff-display);
  font-size: var(--fz-xs);
  font-weight: 700;
  color: var(--c-ink-0);
  border-radius: var(--r-xs);
}
.podium-card__grade[data-grade="S"] { background: var(--tier-S); }
.podium-card__grade[data-grade="A"] { background: var(--tier-A); }
.podium-card__grade[data-grade="B"] { background: var(--tier-B); }
.podium-card__grade[data-grade="C"] { background: var(--tier-C); }

.podium-card__body {
  padding: var(--s-3) var(--s-4);
  display: flex; flex-direction: column;
  gap: var(--s-3);
  min-height: 0;
}

.headline {
  display: flex; flex-direction: column; gap: 2px;
}
.headline__label {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--c-gold-1);
  font-weight: 600;
}
.headline__label--cool   { color: var(--c-cyan-1); }
.headline__label--violet { color: var(--c-violet-1); }
.headline__label--accent { color: var(--c-gold-1); }
.headline__label::before {
  content: "▰";
  font-size: 8px;
}
.headline__reason {
  font-family: var(--ff-body);
  font-size: var(--fz-sm);
  color: var(--text-primary);
  line-height: 1.35;
  font-weight: 500;
  text-wrap: pretty;
}

.podium-card__tips {
  display: flex; flex-direction: column;
  gap: var(--s-2);
}
.tip {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: var(--s-3);
  align-items: start;
  font-family: var(--ff-body);
  font-size: var(--fz-xs);
  line-height: 1.35;
  color: var(--text-secondary);
}
.tip__cat {
  display: inline-grid; place-items: center;
  height: 16px;
  padding: 0 4px;
  border-radius: 2px;
  font-family: var(--ff-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  white-space: nowrap;
}
.tip__cat[data-token="warning"] { background: var(--tip-warning-bg); color: var(--tip-warning-fg); border: 1px solid var(--tip-warning-bd); }
.tip__cat[data-token="matchup"] { background: var(--tip-matchup-bg); color: var(--tip-matchup-fg); border: 1px solid var(--tip-matchup-bd); }
.tip__cat[data-token="team"]    { background: var(--tip-team-bg);    color: var(--tip-team-fg);    border: 1px solid var(--tip-team-bd); }
.tip__cat[data-token="macro"]   { background: var(--tip-macro-bg);   color: var(--tip-macro-fg);   border: 1px solid var(--tip-macro-bd); }
.tip__cat[data-token="meta"]    { background: var(--tip-meta-bg);    color: var(--tip-meta-fg);    border: 1px solid var(--tip-meta-bd); }
.tip__cat[data-token="info"]    { background: var(--tip-info-bg);    color: var(--tip-info-fg);    border: 1px solid var(--tip-info-bd); }

.tip__more {
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding-left: 50px;
  padding-top: 2px;
}

.badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: 18px; padding: 0 6px;
  font-family: var(--ff-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  border-radius: 2px;
  white-space: nowrap;
}
.badge[data-tone="accent"] { background: rgba(230, 195, 120, 0.18); color: var(--c-gold-0); border: 1px solid var(--c-gold-2); }
.badge[data-tone="cool"]   { background: rgba(74, 214, 255, 0.15);  color: var(--c-cyan-0); border: 1px solid var(--c-cyan-2); }
.badge[data-tone="violet"] { background: rgba(160, 125, 255, 0.15); color: #d6c5ff; border: 1px solid var(--c-violet-2); }
.badge[data-tone="good"]   { background: rgba(92, 217, 167, 0.15);  color: var(--c-emerald-1); border: 1px solid var(--c-emerald-2); }

/* dock for positions 4-7 */
.dock {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: var(--s-3);
}
.dock-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3);
  padding: var(--s-3);
  background: var(--bg-card);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--d-fast);
  align-items: center;
}
.dock-card:hover {
  border-color: var(--border-subtle);
  background: var(--bg-card-hover);
}
.dock-card[data-selected="true"] {
  border-color: var(--c-gold-2);
  box-shadow: var(--sh-glow-gold);
}
.dock-card__portrait {
  width: 32px; height: 32px;
  border-radius: var(--r-xs);
  background: linear-gradient(135deg, var(--c-ink-3), var(--c-ink-2));
  display: grid; place-items: center;
  font-family: var(--ff-display);
  color: var(--c-gold-1);
  font-size: var(--fz-sm);
  font-weight: 600;
  overflow: hidden;
}
.dock-card__portrait img { width: 100%; height: 100%; object-fit: cover; }
.dock-card__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dock-card__name {
  font-family: var(--ff-display);
  font-size: var(--fz-xs);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: var(--tracking-wide);
}
.dock-card__score {
  font-family: var(--ff-display);
  font-size: var(--fz-sm);
  color: var(--c-gold-1);
  font-weight: 700;
  line-height: 1;
}
.dock-card__rank {
  position: absolute;
  top: 2px; right: 4px;
  font-family: var(--ff-ui);
  font-size: 9px;
  letter-spacing: var(--tracking-wider);
  color: var(--text-muted);
}

/* =====================================================
   BREAKDOWN PANEL — right side of reco strip
   ===================================================== */
.breakdown {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
  isolation: isolate;
}

.breakdown__splash {
  position: absolute; inset: 0;
  opacity: 0.18;
  filter: saturate(0.85) blur(0.4px);
  z-index: 0;
  transition: opacity var(--d-cinematic) var(--ease-out-expo);
}
.breakdown__splash-img,
.breakdown__splash-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background-position: center;
  background-size: cover;
}
.breakdown__splash::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(8, 11, 18, 0.55) 60%, rgba(8, 11, 18, 0.95) 100%),
    linear-gradient(90deg, rgba(8, 11, 18, 0.85) 0%, rgba(8, 11, 18, 0.4) 40%, transparent 100%);
}
[data-tweak-splash="false"] .breakdown__splash { display: none; }

.breakdown__header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-5);
  padding: var(--s-5) var(--s-6);
  align-items: center;
  border-bottom: 1px solid var(--border-faint);
}
.breakdown__portrait {
  width: 64px; height: 64px;
  border-radius: var(--r-sm);
  background: var(--c-ink-3);
  overflow: hidden;
  display: grid; place-items: center;
  font-family: var(--ff-display);
  color: var(--c-gold-1);
  font-size: var(--fz-2xl);
  font-weight: 700;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 22px rgba(230, 195, 120, 0.3);
}
.breakdown__portrait img { width: 100%; height: 100%; object-fit: cover; }
.breakdown__title {
  display: flex; flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.breakdown__name {
  font-family: var(--ff-display);
  font-size: var(--fz-2xl);
  font-weight: 600;
  color: var(--c-bone-0);
  letter-spacing: var(--tracking-wide);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.breakdown__sub {
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--ff-ui);
  font-size: var(--fz-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-secondary);
}
.breakdown__sub b {
  color: var(--c-active);
  font-weight: 600;
}
.breakdown__score {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 2px;
}
.breakdown__score-num {
  font-family: var(--ff-display);
  font-size: var(--fz-4xl);
  font-weight: 700;
  color: var(--c-gold-0);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  text-shadow: 0 0 24px rgba(230, 195, 120, 0.5);
}
.breakdown__score-cap {
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.breakdown__body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

.bd-section {
  padding: var(--s-4) var(--s-5);
  display: flex; flex-direction: column;
  gap: var(--s-3);
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--border-faint);
}
.bd-section:last-child { border-right: 0; }
.bd-section__title {
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--c-gold-1);
  font-weight: 600;
  display: flex; align-items: center; gap: var(--s-2);
}
.bd-section__title::before {
  content: "▰";
  font-size: 6px;
  color: var(--c-gold-2);
}

.bd-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--c-ink-5) transparent;
  display: flex; flex-direction: column;
  gap: var(--s-3);
  padding-right: 4px;
}
.bd-scroll::-webkit-scrollbar { width: 4px; }
.bd-scroll::-webkit-scrollbar-thumb { background: var(--c-ink-5); border-radius: 999px; }

/* bars */
.bars {
  display: flex; flex-direction: column;
  gap: var(--s-3);
}
.bar {
  display: flex; flex-direction: column;
  gap: 4px;
}
.bar__head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--ff-ui);
  font-size: var(--fz-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}
.bar__label { color: var(--text-secondary); }
.bar__value {
  font-family: var(--ff-display);
  color: var(--c-gold-0);
  font-weight: 600;
  font-size: var(--fz-sm);
}
.bar__track {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.bar__fill {
  position: absolute; inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--c-gold-3) 0%, var(--c-gold-0) 100%);
  border-radius: var(--r-pill);
  transition: width var(--d-slow) var(--ease-out-expo);
}
.bar[data-id="lane"]    .bar__fill { background: linear-gradient(90deg, var(--c-emerald-2), var(--c-emerald-1)); }
.bar[data-id="synergy"] .bar__fill { background: linear-gradient(90deg, var(--c-cyan-3), var(--c-cyan-1)); }
.bar[data-id="team"]    .bar__fill { background: linear-gradient(90deg, var(--c-violet-2), var(--c-violet-1)); }
.bar[data-id="meta"]    .bar__fill { background: linear-gradient(90deg, var(--c-gold-3), var(--c-gold-0)); }

/* signals chips */
.signals {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.signal-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  background: rgba(20, 25, 38, 0.55);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-pill);
  font-family: var(--ff-body);
  font-size: var(--fz-2xs);
  color: var(--text-secondary);
}
.signal-chip b {
  font-family: var(--ff-ui);
  font-size: 9px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}
.signal-chip[data-cat="TEAM"]    b { color: var(--tip-team-fg); }
.signal-chip[data-cat="MATCHUP"] b { color: var(--tip-matchup-fg); }
.signal-chip[data-cat="SYNERGY"] b { color: var(--tip-team-fg); }
.signal-chip[data-cat="EXEC"]    b { color: var(--tip-warning-fg); }
.signal-chip[data-cat="MACRO"]   b { color: var(--tip-macro-fg); }
.signal-chip[data-cat="META"]    b { color: var(--tip-meta-fg); }
.signal-chip[data-cat="ANTI"]    b { color: var(--tip-warning-fg); }

/* trigger tags */
.trigger {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  background: rgba(20, 25, 38, 0.4);
  border-left: 2px solid var(--c-gold-2);
  border-radius: 2px;
  font-family: var(--ff-body);
  font-size: var(--fz-2xs);
  color: var(--text-secondary);
  line-height: 1.4;
}
.trigger__delta {
  font-family: var(--ff-display);
  font-size: var(--fz-xs);
  font-weight: 700;
  color: var(--c-emerald-1);
  white-space: nowrap;
}

/* matchup mini-cards */
.mu-list {
  display: flex; flex-direction: column;
  gap: 6px;
}
.mu-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--s-3);
  align-items: start;
  padding: 4px 6px;
  border-radius: 2px;
  font-family: var(--ff-body);
  font-size: var(--fz-2xs);
  line-height: 1.35;
}
.mu-item__pic {
  width: 24px; height: 24px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--c-ink-3), var(--c-ink-2));
  display: grid; place-items: center;
  font-family: var(--ff-display);
  font-size: var(--fz-2xs);
  color: var(--c-gold-1);
  font-weight: 600;
  overflow: hidden;
}
.mu-item__pic img { width: 100%; height: 100%; object-fit: cover; }
.mu-item__body { display: flex; flex-direction: column; min-width: 0; }
.mu-item__name {
  font-family: var(--ff-display);
  font-size: var(--fz-xs);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: var(--tracking-wide);
}
.mu-item__note {
  font-family: var(--ff-body);
  font-size: var(--fz-2xs);
  color: var(--text-tertiary);
  line-height: 1.3;
}
.mu-section + .mu-section { margin-top: var(--s-3); }
.mu-section__title {
  font-family: var(--ff-ui);
  font-size: 9px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px;
}
.mu-section__title::before {
  content: "";
  width: 14px; height: 1px;
  background: currentColor;
  opacity: 0.4;
}
.mu-section[data-tone="strong"] .mu-section__title { color: var(--c-emerald-1); }
.mu-section[data-tone="syn"]    .mu-section__title { color: var(--c-cyan-1); }
.mu-section[data-tone="hard"]   .mu-section__title { color: var(--c-rose-1); }

.watch {
  padding: var(--s-3);
  background: rgba(255, 90, 90, 0.06);
  border: 1px solid rgba(255, 90, 90, 0.18);
  border-radius: var(--r-xs);
}
.watch__head {
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--c-rose-1);
  font-weight: 600;
  display: flex; align-items: center; gap: var(--s-2);
}
.watch__head::before { content: "⚠"; }
.watch__detail {
  font-family: var(--ff-body);
  font-size: var(--fz-2xs);
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

.breakdown__empty {
  padding: var(--s-9);
  display: grid; place-items: center;
  text-align: center;
  position: relative; z-index: 2;
}
.breakdown__empty-mark {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  margin: 0 auto var(--s-4);
  color: var(--c-gold-2);
  font-family: var(--ff-display);
  font-size: var(--fz-xl);
  opacity: 0.7;
}
.breakdown__empty-title {
  font-family: var(--ff-display);
  font-size: var(--fz-md);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
}
.breakdown__empty-text {
  font-family: var(--ff-body);
  font-size: var(--fz-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
  line-height: 1.5;
  max-width: 320px;
}

/* =====================================================
   TWEAKS PANEL (vanilla)
   ===================================================== */
.tweaks {
  position: fixed;
  bottom: 16px; right: 16px;
  width: 280px;
  max-height: 70vh;
  background: linear-gradient(180deg, rgba(22, 28, 42, 0.96), rgba(10, 13, 22, 0.97));
  border: 1px solid var(--c-gold-3);
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 24px rgba(230, 195, 120, 0.25);
  z-index: 100;
  display: flex; flex-direction: column;
  font-family: var(--ff-body);
  transform: translateX(120%);
  transition: transform var(--d-base) var(--ease-out-expo);
}
.tweaks[data-open="true"] { transform: translateX(0); }
.tweaks__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border-subtle);
}
.tweaks__title {
  font-family: var(--ff-display);
  font-size: var(--fz-md);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--c-gold-0);
}
.tweaks__close {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: 2px;
}
.tweaks__close:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.tweaks__body {
  padding: var(--s-4) var(--s-5);
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: var(--s-5);
}

.tweak-section + .tweak-section { padding-top: var(--s-4); border-top: 1px solid var(--border-faint); }
.tweak-section__title {
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--s-3);
}

.tweak-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-3);
  align-items: center;
  font-family: var(--ff-body);
  font-size: var(--fz-xs);
  color: var(--text-secondary);
  padding: 4px 0;
}

.seg {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  padding: 2px;
  gap: 2px;
}
.seg button {
  height: 22px; padding: 0 8px;
  font-family: var(--ff-ui);
  font-size: 10px;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-radius: 3px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--c-gold-2);
  color: var(--c-ink-0);
}

.toggle {
  width: 36px; height: 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-pill);
  position: relative;
  cursor: pointer;
  transition: background var(--d-fast);
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--c-bone-2);
  border-radius: 50%;
  transition: all var(--d-fast) var(--ease-out-expo);
}
.toggle[aria-pressed="true"] { background: rgba(230, 195, 120, 0.25); border-color: var(--c-gold-2); }
.toggle[aria-pressed="true"]::after {
  left: 18px;
  background: var(--c-gold-1);
  box-shadow: 0 0 8px var(--c-gold-1);
}

/* =====================================================
   HOVER PREVIEW (champion grid hover)
   ===================================================== */
.preview {
  position: fixed;
  z-index: 60;
  width: 220px;
  background: linear-gradient(180deg, rgba(22, 28, 42, 0.98), rgba(10, 13, 22, 0.98));
  border: 1px solid var(--c-gold-3);
  border-radius: var(--r-sm);
  padding: var(--s-3) var(--s-4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--d-fast), transform var(--d-fast);
}
.preview[data-open="true"] { opacity: 1; transform: translateY(0); }
.preview__name {
  font-family: var(--ff-display);
  font-size: var(--fz-md);
  color: var(--text-primary);
  letter-spacing: var(--tracking-wide);
  margin-bottom: 2px;
}
.preview__roles {
  display: flex; gap: 4px; margin-bottom: var(--s-2);
}
.preview__role-chip {
  font-family: var(--ff-ui);
  font-size: 9px;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-faint);
  border-radius: 2px;
  color: var(--text-secondary);
}
.preview__class {
  font-family: var(--ff-ui);
  font-size: var(--fz-2xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.preview__tier {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px;
  font-family: var(--ff-display);
  font-size: 11px;
  font-weight: 700;
  border-radius: 2px;
  color: var(--c-ink-0);
  margin-left: var(--s-2);
}

/* =====================================================
   FINAL MOBILE OVERRIDES
   Keep these after component definitions so desktop rules
   above do not overwrite the responsive draft layout.
   ===================================================== */
@media (max-width: 760px) {
  :root {
    --topbar-h: auto;
    --reco-strip-h: auto;
  }

  .draft-analyzer-shell {
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto auto;
    overflow: visible;
  }

  .topbar,
  .stage,
  .reco-strip,
  .team-col,
  .grid-area,
  .reco-side,
  .breakdown {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: var(--s-4);
    height: auto;
    padding: var(--s-5);
  }

  .topbar__left,
  .topbar__center,
  .topbar__right {
    width: 100%;
    min-width: 0;
    grid-column: auto;
  }

  .topbar__left {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .topbar__center {
    justify-content: stretch;
    min-width: 0;
  }

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

  .brand {
    width: 100%;
    flex-wrap: wrap;
    min-width: 0;
  }

  .brand__divider {
    display: none;
  }

  .brand__mode {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    gap: var(--s-2);
    min-width: 0;
    max-width: 100%;
  }

  .brand__select {
    min-width: 0;
    flex: 1 1 0;
  }

  .compo-score {
    width: 100%;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4) 30px;
    min-width: 0;
  }

  .compo-score__bar {
    min-width: 64px;
  }

  .compo-score__debug {
    top: -8px;
    right: -8px;
    transform: none;
  }

  .compo-score__debug-trigger {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .compo-score__debug-bubble {
    top: calc(100% + 8px);
    right: -4px;
    transform: translateY(-4px);
    min-width: 0;
    max-width: min(260px, calc(100vw - 32px));
    font-size: 11px;
    padding: 6px 8px;
  }

  .compo-score__debug-bubble::after {
    left: auto;
    right: 13px;
    top: 0;
    transform: translateY(-50%) rotate(45deg);
  }

  .compo-score__debug:hover .compo-score__debug-bubble,
  .compo-score__debug:focus-within .compo-score__debug-bubble,
  .compo-score__debug[data-open="true"] .compo-score__debug-bubble {
    transform: translateY(0);
  }

  .hud-btn {
    width: 100%;
    justify-content: center;
    padding: 0 var(--s-3);
    min-width: 0;
  }

  .stage {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    padding: var(--s-4);
    overflow: visible;
  }

  .team-col {
    display: block;
  }

  .team-col__header {
    padding: 0 var(--s-1) var(--s-2);
    margin-bottom: 0;
  }

  .team-col__slots {
    flex: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: auto;
    min-height: 64px;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: hidden;
    padding-bottom: var(--s-2);
  }

  .slot {
    min-width: 0;
    min-height: 64px;
  }

  .grid-area {
    min-height: 0;
  }

  .grid-toolbar {
    align-items: stretch;
    gap: var(--s-3);
  }

  .role-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: var(--s-1);
  }

  .role-pill {
    flex: 0 0 auto;
  }

  .search-box {
    max-width: none;
    width: 100%;
    margin-left: 0;
  }

  .grid-scroll {
    max-height: 224px; /* ≈ 2 lignes × 109px + 6px gap */
    padding-right: 0;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  }

  .reco-strip {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    align-items: stretch;
    padding: var(--s-4);
  }

  .reco-side {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    min-width: 0;
  }

  .podium {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }

  .podium-card__portrait,
  .podium-card[data-rank="1"] .podium-card__portrait {
    width: 56px;
    height: 56px;
  }

  .podium-card__head,
  .breakdown__header {
    gap: var(--s-3);
    padding: var(--s-4);
  }

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

  .breakdown {
    min-height: 0;
    height: auto;
    grid-template-rows: auto auto;
    overflow: visible;
  }

  .breakdown__header {
    grid-template-columns: auto 1fr;
  }

  .breakdown__score {
    grid-column: 1 / -1;
    align-items: flex-start;
  }

  .breakdown__body {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .bd-section {
    min-height: auto;
    overflow: visible;
  }

  .bd-scroll {
    overflow: visible;
    max-height: none;
  }

  .slot__body,
  .slot__meta,
  .podium-card,
  .podium-card__name,
  .podium-card__headline,
  .dock-card,
  .dock-card__body,
  .breakdown__title,
  .breakdown__sub,
  .bd-section,
  .tip,
  .tip span {
    min-width: 0;
  }

  .slot__meta,
  .podium-card__headline,
  .breakdown__sub,
  .tip,
  .tip span,
  .bd-section,
  .dock-card__body {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .preview {
    display: none;
  }
}

/* === styles/animations.css === */
/* ============================================================
   ANIMATIONS — entry, focus, generation pulse, hover micro-interactions
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 215, 124, 0.6); }
  50%      { box-shadow: 0 0 0 6px rgba(245, 215, 124, 0); }
}
@keyframes lanePromptGlow {
  0%, 100% {
    border-color: rgba(230, 195, 120, 0.72);
    box-shadow:
      0 0 0 1px rgba(230, 195, 120, 0.42),
      0 0 12px rgba(230, 195, 120, 0.2);
  }
  50% {
    border-color: rgba(247, 226, 168, 0.98);
    box-shadow:
      0 0 0 1px rgba(247, 226, 168, 0.7),
      0 0 28px rgba(230, 195, 120, 0.38);
  }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scoreCount {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes barFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes spinFade {
  from { opacity: 0; transform: rotate(-8deg) scale(0.95); }
  to   { opacity: 1; transform: rotate(0) scale(1); }
}

[data-tweak-anim="true"] .podium-card { animation: fadeUp 480ms var(--ease-out-expo) both; }
[data-tweak-anim="true"] .podium-card:nth-child(1) { animation-delay: 0ms; }
[data-tweak-anim="true"] .podium-card:nth-child(2) { animation-delay: 80ms; }
[data-tweak-anim="true"] .podium-card:nth-child(3) { animation-delay: 160ms; }
[data-tweak-anim="true"] .dock-card { animation: fadeUp 380ms var(--ease-out-expo) both; }
[data-tweak-anim="true"] .dock-card:nth-child(1) { animation-delay: 240ms; }
[data-tweak-anim="true"] .dock-card:nth-child(2) { animation-delay: 280ms; }
[data-tweak-anim="true"] .dock-card:nth-child(3) { animation-delay: 320ms; }
[data-tweak-anim="true"] .dock-card:nth-child(4) { animation-delay: 360ms; }

[data-tweak-anim="true"] .breakdown[data-state="filled"] .breakdown__splash {
  animation: fadeIn var(--d-cinematic) var(--ease-out-expo) both;
}
[data-tweak-anim="true"] .breakdown[data-state="filled"] .bar__fill {
  animation: barFill 700ms var(--ease-out-expo) both;
  transform-origin: left;
}
[data-tweak-anim="true"] .breakdown[data-state="filled"] .breakdown__score-num {
  animation: scoreCount 480ms var(--ease-spring) both;
}
[data-tweak-anim="true"] .slot[data-just-filled="true"] {
  animation: spinFade 400ms var(--ease-out-expo) both;
}
[data-tweak-anim="true"] .slot[data-active="true"]::before {
  animation: pulseGlow 1.6s ease-in-out infinite;
}

/* shimmer on active slot */
.slot[data-active="true"] {
  background-image:
    linear-gradient(90deg, transparent 0%, rgba(245, 215, 124, 0.06) 50%, transparent 100%),
    linear-gradient(180deg, rgba(245, 215, 124, 0.08), rgba(13, 17, 26, 0.8));
  background-size: 200% 100%, auto;
}
[data-tweak-anim="true"] .slot[data-active="true"] {
  animation: shimmer 3s linear infinite;
}

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

@media (hover: none), (pointer: coarse) {
  .slot__remove {
    opacity: 1;
  }

  .slot:hover,
  .champ-card:hover,
  .podium-card:hover,
  .dock-card:hover,
  .hud-btn:hover,
  .role-pill:hover {
    transform: none;
    box-shadow: none;
  }
}

/* =====================================================
   MOBILE RECO MODAL + SLOT / GRID FIXES
   ===================================================== */

/* Hidden on desktop */
.reco-trigger,
.reco-strip__modal-header,
.reco-close { display: none; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (max-width: 760px) {
  /* --- Slot : portrait only, no body --- */
  .slot {
    grid-template-columns: 1fr;
    padding: var(--s-2);
    justify-items: center;
    align-items: center;
    min-height: 56px;
  }
  .slot__body { display: none; }
  .slot__portrait {
    width: 44px;
    height: 44px;
  }
  .slot__lane-label {
    display: block;
    font-family: var(--ff-ui);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--slot-lane, var(--text-muted));
    text-align: center;
    margin-top: 2px;
    line-height: 1;
  }

  /* --- Champion grid : smaller cells --- */
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }

  /* --- Reco-strip : hors flux, modale fixe --- */
  .reco-strip {
    display: none !important;
  }
  .reco-strip[data-modal-open="true"] {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    inset: 0;
    /* Au-dessus du nav SSG (z-index: 50000) */
    z-index: 60000;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #06080d;
    background: var(--bg-app);
    padding: 0;
    gap: 0;
    animation: slideUp 0.22s ease-out;
  }

  /* Podium cards : remplacer grid par flex pour préserver l'ordre head→body. */
  .reco-strip[data-modal-open="true"] .podium-card {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
  }
  .reco-strip[data-modal-open="true"] .podium-card__head { flex-shrink: 0; }
  .reco-strip[data-modal-open="true"] .podium-card__body { flex: 1 0 auto; }

  .reco-strip[data-modal-open="true"] .reco-side {
    padding: var(--s-4);
    border-bottom: 1px solid var(--border-subtle);
  }
  .reco-strip[data-modal-open="true"] .breakdown {
    flex: 1;
    padding: var(--s-4);
  }
  /* Dock colonne unique — plus d'espace pour le texte */
  .reco-strip[data-modal-open="true"] .dock {
    grid-template-columns: 1fr;
  }
  /* Badge tip : 38px fixe → overflow sur "CONFIDENCE MEDIUM" etc. */
  .reco-strip[data-modal-open="true"] .tip {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: var(--s-2);
  }
  /* Score plus compact */
  .reco-strip[data-modal-open="true"] .podium-card__score-num {
    font-size: var(--fz-xl);
  }
  .reco-strip[data-modal-open="true"] .podium-card[data-rank="1"] .podium-card__score-num {
    font-size: var(--fz-2xl);
  }

  /* Message "choisis ta lane" quand aucune lane sélectionnée */
  .reco-strip[data-no-lane="true"] .reco-side__header::after {
    content: "Sélectionne ta lane pour voir les recommandations";
    display: block;
    margin-top: var(--s-4);
    padding: var(--s-4);
    background: rgba(245, 215, 124, 0.07);
    border: 1px solid rgba(245, 215, 124, 0.18);
    border-radius: var(--r-sm);
    font-family: var(--ff-body);
    font-size: var(--fz-sm);
    color: var(--c-gold-1);
    text-align: center;
    line-height: 1.4;
  }

  /* --- Modal header sticky avec bouton fermeture --- */
  .reco-strip__modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s-4) var(--s-5);
    border-bottom: 1px solid var(--border-subtle);
    background: #0e131e;
    position: sticky;
    top: 0;
    z-index: 1;
    flex-shrink: 0;
  }
  .reco-strip__modal-title {
    font-family: var(--ff-display);
    font-size: var(--fz-sm);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: var(--tracking-wide);
  }
  .reco-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: #1c2336;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
  }
  .reco-close:active { background: #2a3450; }

  /* --- Trigger : bouton dans le flux, sous le stage --- */
  .reco-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-3);
    width: 100%;
    padding: var(--s-4) var(--s-5);
    margin-top: var(--s-3);
    background: #0e131e;
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    color: var(--c-gold-1);
    font-family: var(--ff-display);
    font-size: var(--fz-sm);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    cursor: pointer;
    transition: background var(--d-fast), border-color var(--d-fast);
  }
  .reco-trigger:active {
    background: #161c2a;
    border-color: var(--c-gold-2);
  }
  .reco-trigger__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--c-gold-2);
    color: #06080d;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--ff-ui);
  }
  .reco-trigger__badge:empty { display: none; }
}
