:root {
  --bg: #0a0e14;
  --panel: #121822;
  --panel-2: #1a2230;
  --line: #263143;
  --text: #e6ebf2;
  --muted: #8b98a9;
  --gold: #c8aa6e;
  --blue: #3b82f6;
  --blue-deep: #1e3a8a;
  --red: #ef4444;
  --red-deep: #7f1d1d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 700px at 50% -10%, #14203a 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 12, 0.85);
  backdrop-filter: blur(6px);
  z-index: 20;
}

.start-card, .end-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 48px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 720px;
}

.app-logo { width: 84px; height: 84px; display: block; margin: 0 auto 14px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45)); }
.start-card h1 { margin: 0 0 6px; font-size: 34px; letter-spacing: 1px; }
.start-card h1 span { color: var(--gold); }
.tagline { color: var(--muted); margin: 0 0 28px; }
.label { text-transform: uppercase; letter-spacing: 2px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }

.side-choice { display: flex; gap: 16px; justify-content: center; margin-bottom: 28px; }

.side-btn {
  flex: 1;
  max-width: 200px;
  padding: 22px 16px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.side-btn span { font-size: 18px; font-weight: 700; }
.side-btn small { color: var(--muted); }
.side-btn.blue:hover, .side-btn.blue.selected { border-color: var(--blue); box-shadow: 0 0 22px rgba(59, 130, 246, 0.35); }
.side-btn.red:hover, .side-btn.red.selected { border-color: var(--red); box-shadow: 0 0 22px rgba(239, 68, 68, 0.35); }
.side-btn.selected { transform: translateY(-2px); }

button {
  font-family: inherit;
  font-size: 15px;
}

#start-btn, #again-btn {
  background: linear-gradient(180deg, var(--gold), #a5854f);
  color: #14100a;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 14px 34px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.12s, opacity 0.12s;
}
#start-btn:disabled { opacity: 0.4; cursor: not-allowed; }
#start-btn:not(:disabled):hover, #again-btn:hover { filter: brightness(1.1); }

.update-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.update-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.update-btn:hover:not(:disabled) { color: var(--text); border-color: var(--gold); }
.update-btn:disabled { opacity: 0.5; cursor: wait; }
.update-btn.error { color: var(--red); border-color: var(--red); }
.update-meta { font-size: 11px; color: var(--muted); }
.update-progress { width: 260px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.update-bar { width: 100%; height: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.update-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), #a5854f); transition: width 0.2s; }
.update-progress-label { font-size: 10px; color: var(--muted); }

.draft { max-width: 1280px; margin: 0 auto; padding: 18px; }

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}
.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand img { width: 28px; height: 28px; display: block; }
.brand span { font-weight: 700; letter-spacing: 1px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.version { display: block; font-size: 10px; color: var(--muted); letter-spacing: 1px; opacity: 0.6; }
.brand .version { display: inline; margin-left: 6px; font-size: 9px; }
.phase { font-size: 15px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); }
.timer { text-align: center; min-width: 260px; }
.timer-num { font-size: 38px; font-weight: 800; color: var(--gold); line-height: 1; }
.timer-bar { height: 6px; background: var(--panel-2); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.timer-fill { height: 100%; width: 100%; background: var(--gold); transition: width 0.12s linear; }
.timer-fill.low { background: var(--red); }
.turn-indicator { text-align: right; font-weight: 700; letter-spacing: 1px; }
.turn-indicator.blue { color: var(--blue); }
.turn-indicator.red { color: var(--red); }

.board {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 18px;
  align-items: start;
}

.team h2 {
  margin: 0 0 12px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
.team.blue h2 { color: var(--blue); border-color: var(--blue-deep); }
.team.red h2 { color: var(--red); border-color: var(--red-deep); }

.team-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.team.blue .team-header { border-left-color: var(--blue-deep); }
.team.red .team-header { border-left-color: var(--red-deep); }
.team-header-left { min-width: 0; }
.team-side-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.team.blue .team-side-label { color: var(--blue); }
.team.red .team-side-label { color: var(--red); }
.team-player-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.team-score-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 46px;
}
.team-score {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  transition: transform 0.25s ease;
}
.team-score.hidden { display: none; }
.team-score-pop {
  position: absolute;
  top: -4px;
  right: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 12px rgba(200, 170, 110, 0.75);
}
.team-score-pop.pop { animation: score-pop 1.1s ease-out; }
@keyframes score-pop {
  0%   { opacity: 0; transform: translateY(0) scale(0.85); }
  15%  { opacity: 1; transform: translateY(-6px) scale(1.1); }
  70%  { opacity: 1; transform: translateY(-22px) scale(1); }
  100% { opacity: 0; transform: translateY(-34px) scale(0.9); }
}

.team-turn-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

/* current turn highlight */
.team-header.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 24px rgba(200, 170, 110, 0.35);
  animation: header-pulse 2.2s ease-in-out infinite;
}
.team.blue .team-header.active {
  border-color: var(--blue);
  border-left-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), 0 0 28px rgba(59, 130, 246, 0.45);
}
.team.red .team-header.active {
  border-color: var(--red);
  border-left-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), 0 0 28px rgba(239, 68, 68, 0.45);
}
.team-header.active .team-turn-badge {
  opacity: 1;
  transform: translateY(0);
}
.team.blue .team-header.active .team-turn-badge {
  color: #cfe0ff;
  background: var(--blue-deep);
  border-color: var(--blue);
}
.team.red .team-header.active .team-turn-badge {
  color: #ffd6d6;
  background: var(--red-deep);
  border-color: var(--red);
}
.team.blue .team-header.active { animation: header-pulse-blue 2.2s ease-in-out infinite; }
.team.red .team-header.active { animation: header-pulse-red 2.2s ease-in-out infinite; }
@keyframes header-pulse-blue {
  0%,100% { box-shadow: 0 0 0 1px var(--blue), 0 0 18px rgba(59, 130, 246, 0.35); }
  50%     { box-shadow: 0 0 0 1px var(--blue), 0 0 32px rgba(59, 130, 246, 0.65); }
}
@keyframes header-pulse-red {
  0%,100% { box-shadow: 0 0 0 1px var(--red), 0 0 18px rgba(239, 68, 68, 0.35); }
  50%     { box-shadow: 0 0 0 1px var(--red), 0 0 32px rgba(239, 68, 68, 0.65); }
}

.award-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 300px;
  z-index: 30;
  padding: 12px 14px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 26px rgba(200, 170, 110, 0.2);
  color: var(--text);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}
.award-toast.enter { opacity: 1; transform: translateY(0); }
.award-toast.leaving { opacity: 0; transform: translateY(16px); }
.award-toast.blue { border-left-color: var(--blue); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 26px rgba(59, 130, 246, 0.25); }
.award-toast.red { border-left-color: var(--red); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 26px rgba(239, 68, 68, 0.25); }

.award-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.award-pts {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}
.award-toast.blue .award-pts { color: #6aa4ff; }
.award-toast.red .award-pts { color: #ff8080; }
.award-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.award-toast.is-ban .award-label::before { content: "Ban · "; }
.award-toast.is-pick .award-label::before { content: "Pick · "; }

.award-body { display: flex; gap: 10px; align-items: flex-start; }
.award-body img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex: none;
  object-fit: cover;
}
.award-meta { min-width: 0; flex: 1; }
.award-player {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.award-toast.blue .award-player { color: var(--blue); }
.award-toast.red .award-player { color: var(--red); }
.award-champ {
  font-size: 14px;
  font-weight: 700;
  margin: 1px 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.award-reasons { display: flex; flex-direction: column; gap: 2px; font-size: 11px; line-height: 1.35; color: var(--muted); }
.award-reasons .award-reason { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.award-reasons .award-reason-counter { color: #7fdc9a; }
.award-reasons .award-reason-countered { color: #ff9c9c; }
.award-reasons .award-reason-synergy { color: var(--gold); }
.award-reasons .award-reason-counters-ally { color: #ff9c9c; }
.award-reasons .award-reason-enemy-synergy { color: var(--gold); }
.award-reasons .award-reason-tier { color: #d4b45a; font-weight: 700; }
.award-reason-empty { color: var(--muted); font-style: italic; }

@media (max-width: 720px) {
  .award-toast { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

.slots { display: flex; flex-direction: column; gap: 8px; }

.slot {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 60px;
  padding: 6px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.team.blue .slot { border-left-color: var(--blue-deep); }
.team.red .slot { border-left-color: var(--red-deep); }
.slot-role { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); width: 54px; flex: none; }
.slot-body { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.slot-body img { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; object-position: top center; }
.slot-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-empty { color: #3a4557; font-size: 20px; }

.slot.selectable { cursor: pointer; border-color: var(--gold); }
.slot.active { box-shadow: inset 0 0 0 2px var(--gold); }
.team .slot.filled { background: var(--panel-2); }
.slot.reveal { animation: pop 0.4s ease; }

.bans { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.ban {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.ban.filled img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.55); }
.ban.filled::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 45%, var(--red) 47%, var(--red) 53%, transparent 55%);
  opacity: 0.85;
}
.ban.reveal { animation: pop 0.4s ease; }

.center { display: flex; flex-direction: column; gap: 12px; }
.picker-head { display: flex; flex-direction: column; gap: 10px; }
#search {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
}
#search:focus { outline: none; border-color: var(--gold); }

.role-chips { display: flex; gap: 8px; flex-wrap: wrap; min-height: 4px; }
.chip {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.12s;
}
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip.active { background: var(--gold); color: #14100a; border-color: var(--gold); font-weight: 700; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  max-height: 460px;
  overflow-y: auto;
  padding: 4px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.tile {
  border: 1px solid transparent;
  background: var(--panel);
  border-radius: 8px;
  padding: 4px 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: transform 0.1s, border-color 0.1s;
}
.tile img { width: 48px; height: 48px; border-radius: 6px; }
.tile span { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tile:hover { transform: translateY(-2px); border-color: var(--gold); }
.tile.selected { border-color: var(--gold); box-shadow: 0 0 14px rgba(200, 170, 110, 0.5); }
.tile.selected span { color: var(--text); }
.tile.unavailable img { filter: grayscale(1) brightness(0.4); }
.tile.disabled { pointer-events: none; opacity: 0.4; }

#lock-btn { align-self: center; margin-top: 4px; }

.end-teams { display: flex; gap: 24px; margin: 20px 0 26px; text-align: left; }
.end-team { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.end-team.blue { border-top: 3px solid var(--blue); }
.end-team.red { border-top: 3px solid var(--red); }
.end-team h3 { margin: 0 0 12px; }
.comp { list-style: none; padding: 0; margin: 0 0 14px; }
.comp li { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.comp li b { color: var(--gold); font-weight: 600; display: inline-block; width: 66px; font-size: 11px; text-transform: uppercase; }
.profile { font-size: 12px; color: var(--muted); line-height: 1.6; }

@keyframes pop {
  0% { transform: scale(0.85); opacity: 0.4; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.draft { position: relative; z-index: 1; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  transition: box-shadow 0.6s ease;
}
body { transition: background 0.6s ease; }
body.phase-ban { background: radial-gradient(1200px 700px at 50% -10%, #3d1414 0%, #0a0e14 62%); }
body.phase-pick { background: radial-gradient(1200px 700px at 50% -10%, #12233f 0%, #0a0e14 62%); }
body.phase-ban::before { box-shadow: inset 0 0 220px 60px rgba(190, 30, 30, 0.55); }
body.phase-pick::before { box-shadow: inset 0 0 200px 45px rgba(40, 100, 220, 0.30); }

.phase { font-weight: 800; font-size: 20px; letter-spacing: 3px; transition: color 0.4s; }
body.phase-ban .phase { color: #ff6b6b; }
body.phase-pick .phase { color: #6aa4ff; }
body.phase-ban .timer-num { color: #ff6b6b; }
body.phase-ban .timer-fill { background: #ef4444; }

.slot-index {
  width: 24px;
  height: 24px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.slot.active { box-shadow: inset 0 0 0 2px var(--gold); }
.slot.active .slot-index { color: var(--gold); border-color: var(--gold); }
.slot-role-tag {
  margin-left: auto;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  background: rgba(200, 170, 110, 0.14);
  padding: 2px 8px;
  border-radius: 10px;
  flex: none;
}

.assign-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 40px;
  text-align: center;
  max-width: 560px;
  width: 92%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.assign-card h1 { margin: 0 0 6px; font-size: 26px; }
.assign-body { display: flex; flex-direction: column; gap: 10px; margin: 22px 0 24px; }
.assign-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 8px 12px;
}
.assign-role {
  width: 84px;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--gold);
  flex: none;
}
.assign-portrait { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.assign-portrait img { width: 38px; height: 38px; border-radius: 6px; }
.assign-portrait span { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assign-portrait .slot-empty { font-size: 18px; }
.assign-row select {
  flex: none;
  width: 148px;
  padding: 8px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 13px;
}

#assign-btn {
  background: linear-gradient(180deg, var(--gold), #a5854f);
  color: #14100a;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 13px 32px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: filter 0.12s, opacity 0.12s;
}
#assign-btn:disabled { opacity: 0.4; cursor: not-allowed; }
#assign-btn:not(:disabled):hover { filter: brightness(1.1); }

.role-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.role-filter .chip {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.12s;
}
.role-filter .chip:hover { border-color: var(--gold); color: var(--text); }
.role-filter .chip.active { background: var(--gold); color: #14100a; border-color: var(--gold); font-weight: 700; }

.suggestions {
  margin: 10px 0 6px;
  padding: 10px 12px;
  background: rgba(200, 170, 110, 0.06);
  border: 1px solid rgba(200, 170, 110, 0.25);
  border-radius: 10px;
}
.suggestions-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 8px;
}
.suggestions-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}
.suggestion {
  flex: 0 0 148px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.1s, border-color 0.1s;
}
.suggestion:hover { border-color: var(--gold); transform: translateY(-2px); }
.suggestion.selected { border-color: var(--gold); box-shadow: 0 0 12px rgba(200, 170, 110, 0.4); }
.suggestion img { width: 44px; height: 44px; border-radius: 6px; }
.suggestion-name { font-size: 12px; font-weight: 700; text-align: center; }
.suggestion-reasons { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.3; }
.suggestion-reasons .reason-counter { color: #7fdc9a; }
.suggestion-reasons .reason-countered { color: #ff9c9c; }
.suggestion-reasons .reason-synergy { color: #c8aa6e; }
.suggestion-reasons .reason-counters-ally { color: #ff9c9c; }
.suggestion-reasons .reason-enemy-synergy { color: #c8aa6e; }
.suggestion-reasons .reason-tier { color: #d4b45a; font-weight: 700; }

.action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
  min-height: 68px;
}
.action-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  justify-content: flex-end;
  text-align: right;
}
.action-preview img { width: 50px; height: 50px; border-radius: 8px; border: 1px solid var(--line); }
.action-preview .name { font-weight: 700; font-size: 15px; }
.action-empty { color: var(--muted); font-size: 13px; }

.lock-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s, box-shadow 0.12s, background 0.2s;
}
.lock-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.lock-btn.pick { background: linear-gradient(180deg, #3f8cff, #1e3a8a); box-shadow: 0 0 24px rgba(59, 130, 246, 0.45); }
.lock-btn.ban { background: linear-gradient(180deg, #f2564b, #7f1d1d); box-shadow: 0 0 24px rgba(239, 68, 68, 0.5); }
.lock-btn:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.08); }
.lock-icon { display: flex; }
.lock-icon svg { width: 24px; height: 24px; display: block; }

.strategy {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.strategy b { color: var(--gold); }

.mode-choice { display: flex; gap: 16px; justify-content: center; margin-bottom: 22px; }
.mode-btn {
  flex: 1;
  max-width: 220px;
  padding: 18px 16px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.mode-btn span { font-size: 17px; font-weight: 700; }
.mode-btn small { color: var(--muted); }
.mode-btn:hover, .mode-btn.selected { border-color: var(--gold); box-shadow: 0 0 22px rgba(200, 170, 110, 0.3); }
.mode-btn.selected { transform: translateY(-2px); }

.end-card { max-width: 900px; width: 94%; max-height: 88vh; overflow-y: auto; position: relative; }

.report-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.report-close:hover { color: var(--text); border-color: var(--gold); }

.post-draft {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
.secondary-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 14px 34px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.secondary-btn:hover { background: var(--gold); color: #14100a; }

.scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 12px 0 18px;
}
.score-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
}
.score-card.blue { border-color: rgba(59, 130, 246, 0.6); box-shadow: 0 0 18px rgba(59, 130, 246, 0.15); }
.score-card.red { border-color: rgba(239, 68, 68, 0.6); box-shadow: 0 0 18px rgba(239, 68, 68, 0.15); }
.score-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.score-side {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.score-total {
  font-size: 36px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.score-total small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.score-axes { display: grid; gap: 4px; }
.score-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.score-axis b { color: var(--text); font-weight: 600; }

.report { text-align: left; margin: 6px 0 24px; }
.report h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin: 20px 0 10px;
}
.verdict {
  text-align: center;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 12px;
  border-radius: 10px;
  margin: 4px 0 8px;
}
.verdict.blue { background: rgba(59, 130, 246, 0.22); color: #8fb8ff; }
.verdict.red { background: rgba(239, 68, 68, 0.22); color: #ff9d9d; }
.verdict.even { background: var(--panel-2); color: var(--muted); }

.lane-row {
  display: grid;
  grid-template-columns: 58px 1fr 130px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 6px;
  background: var(--panel);
}
.lane-wr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.lane-wr .lane-wr-val {
  font-weight: 800;
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--muted);
  min-width: 46px;
  text-align: center;
}
.lane-wr .lane-wr-val.blue { background: rgba(59, 130, 246, 0.28); color: #cfe0ff; }
.lane-wr .lane-wr-val.red { background: rgba(239, 68, 68, 0.28); color: #ffd6d6; }
.lane-wr .lane-wr-val.even { background: var(--panel-2); color: var(--muted); }
.lane-wr .lane-wr-games { font-size: 9px; color: var(--muted); }
.lane-wr .lane-wr-fallback { font-size: 15px; font-weight: 800; }
.lane-wr .lane-wr-fallback.blue { color: #6aa4ff; }
.lane-wr .lane-wr-fallback.red { color: #ff6b6b; }
.lane-wr .lane-wr-fallback.even { color: var(--muted); }

.radar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.radar-wrap h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin: 0;
  align-self: flex-start;
}
.radar-svg { max-width: 100%; height: auto; }
.radar-legend {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
}
.radar-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}
.radar-legend .dot.blue { background: rgba(59, 130, 246, 0.75); }
.radar-legend .dot.red { background: rgba(239, 68, 68, 0.75); }
.lane-role { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.lane-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lane-side.red { flex-direction: row-reverse; text-align: right; }
.lane-side img { width: 38px; height: 38px; border-radius: 6px; flex: none; }
.lane-side .lane-champ { min-width: 0; }
.lane-side .lane-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-side .lane-edge { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-side.fav .lane-name { color: var(--text); }
.lane-side.blue.fav img { box-shadow: 0 0 0 2px #3b82f6; }
.lane-side.red.fav img { box-shadow: 0 0 0 2px #ef4444; }
.lane-fav { text-align: center; font-weight: 800; font-size: 15px; }
.lane-fav.blue { color: #6aa4ff; }
.lane-fav.red { color: #ff6b6b; }
.lane-fav.even { color: var(--muted); }

.metric-row {
  display: grid;
  grid-template-columns: 150px 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 3px 0;
}
.metric-label { font-size: 12px; color: var(--muted); }
.metric-val { font-size: 13px; text-align: center; padding: 4px; border-radius: 6px; background: var(--panel); }
.metric-val.blue.fav { background: rgba(59, 130, 246, 0.28); color: #cfe0ff; font-weight: 700; }
.metric-val.red.fav { background: rgba(239, 68, 68, 0.28); color: #ffd6d6; font-weight: 700; }

@media (max-width: 900px) {
  .board { grid-template-columns: 1fr; }
  .team { order: 2; }
  .center { order: 1; }
}

.fearless-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s, background 0.15s;
}
.toggle input:checked + .toggle-track { background: rgba(200, 170, 110, 0.25); border-color: var(--gold); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); background: var(--gold); }
.toggle-label { font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 13px; }
.toggle-hint { margin: 0; font-size: 11px; color: var(--muted); }

.series-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding: 10px 14px;
  background: rgba(200, 170, 110, 0.08);
  border: 1px solid rgba(200, 170, 110, 0.35);
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
}
.series-status button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.series-status button:hover { color: var(--red); border-color: var(--red); }

.exclude-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 34px;
  text-align: center;
  max-width: 900px;
  width: 94%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.exclude-card h1 { margin: 0 0 6px; font-size: 24px; }
.exclude-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 12px;
}
.exclude-head #exclude-search {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
}
.exclude-head #exclude-search:focus { outline: none; border-color: var(--gold); }
.exclude-grid { max-height: 420px; }
.exclude-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
}
.ghost-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.ghost-btn:hover { color: var(--text); border-color: var(--gold); }
#exclude-confirm {
  background: linear-gradient(180deg, var(--gold), #a5854f);
  color: #14100a;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.12s;
}
#exclude-confirm:hover { filter: brightness(1.1); }

.tile.locked {
  border-color: rgba(239, 68, 68, 0.4);
  position: relative;
}
.tile.locked img { filter: grayscale(1) brightness(0.45); }
.tile.locked::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 2px solid var(--red);
  border-top: 2px solid transparent;
  transform: translateY(2px);
  box-shadow: 0 -3px 0 -1px var(--red);
}
.exclude-grid .tile.selected img { filter: none; }

/* Lane winrate bar */
.lane-bar {
  width: 100%;
  height: 20px;
  background: rgba(239, 68, 68, 0.28);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.lane-bar-fill {
  height: 100%;
  background: rgba(59, 130, 246, 0.45);
}
.lane-bar-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Key insights */
.insights-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}
.insight {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
}
.insight.blue { border-left-color: var(--blue); }
.insight.red { border-left-color: var(--red); }
.insight-icon { font-size: 11px; opacity: 0.7; flex: none; }

/* Team synergies */
.syn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 6px;
}
.syn-col h3 {
  font-size: 12px;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.syn-col.blue h3 { color: var(--blue); }
.syn-col.red h3 { color: var(--red); }
.syn-pair {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}
.syn-icon { width: 24px; height: 24px; border-radius: 4px; flex: none; }
.syn-name { font-weight: 600; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.syn-plus { color: var(--muted); font-weight: 700; flex: none; }
.syn-delta { color: #7fdc9a; font-weight: 700; margin-left: auto; flex: none; }
.syn-wr { color: var(--muted); font-size: 10px; flex: none; }
.syn-empty { font-size: 11px; color: var(--muted); font-style: italic; }

/* Tier badges */
.tier-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  vertical-align: middle;
  margin-left: 4px;
}
.tier-badge.op {
  background: rgba(200, 170, 110, 0.25);
  color: var(--gold);
  border-color: rgba(200, 170, 110, 0.5);
}

/* online mode */
#online-block { margin: 4px 0 22px; }
#player-name {
  width: 100%;
  max-width: 320px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  text-align: center;
}
#player-name::placeholder { color: var(--muted); }
#player-name:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 12px rgba(200, 170, 110, 0.25); }
.rounds-choice {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 8px;
}
.rounds-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rounds-input label {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 11px;
  color: var(--muted);
}
.rounds-input input {
  width: 70px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}
.rounds-input input:focus { outline: none; border-color: var(--gold); }

.searching-card, .room-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 44px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 480px;
}
.searching-card h1, .room-card h1 { margin: 8px 0 6px; font-size: 24px; }
.searching-meta { color: var(--muted); font-size: 13px; margin-bottom: 22px; }

.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(200, 170, 110, 0.2);
  border-top-color: var(--gold);
  margin: 0 auto 16px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.room-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}
#room-next {
  padding: 12px 22px;
  border-radius: 10px;
  border: none;
  background: var(--gold);
  color: #1a1200;
  font-weight: 700;
  cursor: pointer;
}
#room-next:hover { filter: brightness(1.08); }

.match-type-choice {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
}
.match-type-btn {
  flex: 1;
  max-width: 180px;
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.match-type-btn span { font-size: 13px; font-weight: 700; }
.match-type-btn small { color: var(--muted); font-size: 11px; }
.match-type-btn:hover { border-color: var(--gold); }
.match-type-btn.selected { border-color: var(--gold); box-shadow: 0 0 16px rgba(200, 170, 110, 0.28); transform: translateY(-1px); }

.rounds-fixed-choice {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}
.rounds-fixed-btn {
  min-width: 72px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.rounds-fixed-btn:hover { border-color: var(--gold); }
.rounds-fixed-btn.selected { border-color: var(--gold); box-shadow: 0 0 16px rgba(200, 170, 110, 0.3); color: var(--gold); transform: translateY(-1px); }

#join-code {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  display: block;
  padding: 12px 14px;
  text-align: center;
  font-family: "Segoe UI", monospace;
  font-size: 22px;
  letter-spacing: 6px;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}
#join-code:focus { outline: none; border-color: var(--gold); }
#join-code::placeholder { color: #3a4557; letter-spacing: 4px; font-weight: 600; }

.room-code {
  font-family: "Segoe UI", monospace;
  font-size: 36px;
  letter-spacing: 8px;
  font-weight: 800;
  color: var(--gold);
  padding: 14px 20px;
  margin: 14px auto 12px;
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 12px;
  display: inline-block;
  text-shadow: 0 0 18px rgba(200, 170, 110, 0.35);
  user-select: all;
}
#private-copy { margin-bottom: 18px; }
#private-copy.copied { color: var(--gold); border-color: var(--gold); }
.private-meta { color: var(--muted); font-size: 12px; margin-bottom: 18px; }
#private-cancel { margin-top: 4px; }

/* let the draft board show behind the assign/wait overlays in online mode */
.overlay.peek {
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
  align-items: flex-end;
  padding-bottom: 32px;
}
.overlay.peek > * { pointer-events: auto; }
.overlay.peek .assign-card,
.overlay.peek .room-card {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
}
/* while peeking, mute the center panel so the two team columns read clean */
body.peeking .center > .picker-head,
body.peeking .center > .suggestions,
body.peeking .center > .grid,
body.peeking .center > .action-bar,
body.peeking .center > .post-draft { visibility: hidden; }

