:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: #101722;
  --line: #223044;
  --muted: #8492a6;
  --blue: #37a9ff;
  --red: #ff5f69;
  --gold: #d9b86c;
}
.live-stage {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(390px, 1.45fr) minmax(
      250px,
      1fr
    );
  gap: 12px;
  margin: 12px 0 16px;
}
.live-roster {
  display: grid;
  gap: 7px;
}
.live-player {
  display: grid;
  grid-template-columns: 38px minmax(85px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #1d4656;
  border-radius: 8px;
  background: linear-gradient(100deg, #061b29, #03101a);
}
.live-player.red {
  background: linear-gradient(260deg, #251019, #07101a);
}
.live-player.dead {
  filter: saturate(0.25);
  opacity: 0.58;
}
.live-player img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #4b7686;
}
.live-player-main {
  min-width: 0;
}
.live-player-main b,
.live-player-main span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-player-main b {
  font-size: 12px;
}
.live-player-main span {
  color: var(--muted);
  font-size: 10px;
}
.live-player-stats {
  text-align: right;
  font-size: 10px;
  color: #c9dde5;
}
.live-items {
  grid-column: 2/-1;
  display: flex;
  gap: 4px;
  min-height: 18px;
}
.live-item {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid #806b38;
  border-radius: 3px;
  background: #15212c;
  color: #d8bd78;
  font-size: 8px;
}
.rift-map {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid #31586a;
  border-radius: 12px;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(200, 155, 60, 0.14),
      transparent 13%
    ),
    linear-gradient(
      135deg,
      rgba(10, 200, 185, 0.16) 0 18%,
      transparent 18% 82%,
      rgba(232, 64, 87, 0.14) 82%
    ),
    linear-gradient(45deg, #071b21, #102917 45%, #172510 55%, #071724);
}
.rift-map:before,
.rift-map:after {
  content: "";
  position: absolute;
  background: rgba(200, 155, 60, 0.22);
}
.rift-map:before {
  width: 140%;
  height: 3px;
  left: -20%;
  top: 50%;
  transform: rotate(-45deg);
}
.rift-map:after {
  width: 3px;
  height: 140%;
  left: 50%;
  top: -20%;
  transform: rotate(45deg);
}
.rift-title {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--gold-light);
  font-size: 11px;
}
.rift-score {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  padding: 10px 16px;
  border: 1px solid #806b38;
  background: rgba(1, 10, 19, 0.9);
  border-radius: 20px;
  font-weight: 700;
}
.rift-objectives {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.rift-objectives span {
  padding: 5px 8px;
  border-radius: 12px;
  background: rgba(1, 10, 19, 0.88);
  font-size: 10px;
}
.rift-pip {
  position: absolute;
  z-index: 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--blue);
  background: #04111c;
  color: #fff;
  font-size: 9px;
}
.rift-pip.red {
  border-color: var(--red);
}
.rift-pip.dead {
  opacity: 0.35;
}
.live-data-warning {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 10px;
  bottom: 48px;
  text-align: center;
  color: #7894a0;
  font-size: 9px;
}
@media (max-width: 1000px) {
  .live-stage {
    grid-template-columns: 1fr 1fr;
  }
  .rift-map {
    grid-column: 1/-1;
    grid-row: 1;
  }
  .live-roster {
    grid-row: 2;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, #17263d 0, transparent 35%), var(--bg);
  color: #eef4fb;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}
header {
  max-width: 1440px;
  margin: auto;
  padding: 34px 28px 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 34px;
  letter-spacing: 4px;
}
header p {
  color: var(--muted);
  margin-top: 6px;
}
.eyebrow,
.team-head span {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 2px;
}
.status {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #42d392;
  box-shadow: 0 0 12px #42d392;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 0 28px 48px;
}
.card {
  background: linear-gradient(
    145deg,
    rgba(17, 24, 36, 0.96),
    rgba(11, 17, 27, 0.96)
  );
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.2);
}
.toolbar {
  padding: 15px;
  display: flex;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}
.toolbar label {
  color: var(--muted);
  font-size: 11px;
  display: grid;
  gap: 6px;
}
.match-workspace-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 14px 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 72% 0, rgba(40, 205, 194, 0.1), transparent 34%),
    linear-gradient(135deg, rgba(7, 25, 36, 0.98), rgba(8, 14, 25, 0.98));
}
.match-workspace-switcher > div {
  display: grid;
  gap: 3px;
  min-width: 235px;
}
.match-workspace-switcher > div strong {
  color: #eef6ff;
  font-size: 16px;
}
.match-workspace-switcher > div small {
  color: var(--muted);
  font-size: 11px;
}
#match-workspace-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 10px;
  width: min(620px, 100%);
}
.match-workspace-tab {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 12px;
  min-height: 64px;
  padding: 10px 15px;
  overflow: hidden;
  color: #9cafbf;
  text-align: left;
  border: 1px solid #244455;
  border-radius: 18px;
  background: rgba(4, 15, 25, 0.76);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.match-workspace-tab:hover {
  transform: translateY(-2px);
  border-color: #3c7584;
}
.match-workspace-tab span {
  grid-row: 1 / 3;
  padding: 8px 11px;
  color: #d9b86c;
  border: 1px solid rgba(217, 184, 108, 0.34);
  border-radius: 12px;
  background: rgba(217, 184, 108, 0.08);
}
.match-workspace-tab b {
  min-width: 0;
  overflow: hidden;
  color: #e8f3fb;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-workspace-tab small {
  color: #7891a4;
  font-size: 10px;
}
.match-workspace-tab.active {
  border-color: #44d7ca;
  background: linear-gradient(135deg, rgba(27, 92, 99, 0.88), rgba(14, 49, 66, 0.92));
  box-shadow: 0 10px 32px rgba(30, 211, 196, 0.18), inset 0 0 24px rgba(70, 235, 217, 0.08);
}
.match-workspace-tab.active::after {
  content: "CURRENT";
  position: absolute;
  top: 5px;
  right: 8px;
  color: rgba(148, 255, 239, 0.5);
  font-size: 7px;
  letter-spacing: 0.14em;
}
@media (max-width: 900px) {
  .match-workspace-switcher {
    align-items: stretch;
    flex-direction: column;
  }
  #match-workspace-tabs {
    width: 100%;
  }
}
select,
input,
button {
  color: #eaf2fc;
  background: #0a1019;
  border: 1px solid #29384d;
  border-radius: 6px;
  min-height: 38px;
  padding: 0 11px;
  font: inherit;
}
button {
  cursor: pointer;
  background: #bf9b52;
  color: #0a0d12;
  border: 0;
  font-weight: 700;
}
.ghost {
  background: transparent;
  color: #b8c5d6;
  border: 1px solid #33445c;
}
.draft-grid {
  display: grid;
  grid-template-columns: 1fr 300px 1fr;
  gap: 16px;
}
.team {
  overflow: hidden;
}
.team.blue {
  border-top: 2px solid var(--blue);
}
.team.red {
  border-top: 2px solid var(--red);
}
.team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.team-head h2 {
  font-size: 20px;
  margin-top: 3px;
}
.team-head b {
  font-size: 26px;
}
.blue .team-head b,
.blue-text {
  color: var(--blue);
}
.red .team-head b,
.red-text {
  color: var(--red);
}
.slot {
  display: grid;
  grid-template-columns: 56px 1fr 1fr;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(34, 48, 68, 0.65);
  align-items: center;
}
.slot > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.slot select {
  width: 100%;
  min-width: 0;
}
.center {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.prediction-block {
  padding: 13px 14px;
  border: 1px solid rgba(43, 92, 108, 0.72);
  border-radius: 10px;
  background: linear-gradient(
    145deg,
    rgba(5, 24, 37, 0.94),
    rgba(2, 12, 21, 0.82)
  );
}
.series-prob {
  border-color: rgba(200, 155, 60, 0.52);
  background: linear-gradient(
    145deg,
    rgba(34, 27, 10, 0.5),
    rgba(2, 12, 21, 0.88)
  );
}
.prob-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.game-matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: -3px -3px 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(86, 137, 153, 0.2);
}
.game-matchup > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.game-matchup > div:last-child {
  flex-direction: row-reverse;
  text-align: right;
}
.game-matchup > div > span:not(.team-badge) {
  display: grid;
  min-width: 0;
}
.game-matchup small {
  color: #718c99;
  font-size: 7px;
  letter-spacing: 0.8px;
}
.game-matchup > div b {
  overflow: hidden;
  color: #edf7fb;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-matchup > em {
  display: grid;
  justify-items: center;
  color: var(--gold);
  font-style: normal;
}
.game-matchup > em b {
  font-size: 12px;
  letter-spacing: 1px;
}
.team-badge {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(41, 215, 207, 0.55);
  border-radius: 12px;
  background: rgba(4, 20, 31, 0.9);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.38);
}
.team-badge.red { border-color: rgba(232, 64, 87, 0.55); }
.team-badge img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}
.team-badge.generated {
  background:
    linear-gradient(145deg, hsl(var(--team-hue) 58% 25%), #06131e 58%),
    #071622;
}
.team-badge.generated::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid hsl(var(--team-accent) 80% 68% / 0.7);
  clip-path: polygon(50% 0, 94% 20%, 84% 78%, 50% 100%, 16% 78%, 6% 20%);
}
.team-badge.generated i {
  position: relative;
  z-index: 1;
  color: hsl(var(--team-accent) 90% 78%);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  text-shadow: 0 0 8px hsl(var(--team-hue) 90% 60%);
}
.prob-heading > span {
  color: #eef6ff;
  font-size: 13px;
  font-weight: 800;
}
.prob-heading small {
  color: var(--muted);
  font-size: 9px;
}
.prob strong {
  display: flex;
  justify-content: space-between;
  font-size: 25px;
  margin: 10px 0 8px;
}
.prob em {
  font-style: normal;
}
.prob em:first-child {
  color: var(--blue);
}
.prob em:last-child {
  color: var(--red);
}
.prob-side-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}
.bar {
  height: 7px;
  background: var(--red);
  border-radius: 9px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--blue);
  transition: 0.35s;
}
.verdict {
  text-align: center;
  padding: 16px 4px;
}
.verdict strong,
.verdict span {
  display: block;
}
.verdict span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  margin-top: 6px;
}
.warning {
  color: #bd9e63;
  background: #17150f;
  border: 1px solid #3b3423;
  padding: 10px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.5;
}
.breakdown {
  margin-top: 18px;
  padding: 20px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-head h2 {
  margin-top: 5px;
}
.metric {
  display: grid;
  grid-template-columns: 160px 55px 1fr 55px;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid rgba(34, 48, 68, 0.5);
  font-size: 13px;
}
.metric b {
  text-align: center;
}
.metric div {
  height: 5px;
  background: rgba(255, 95, 105, 0.75);
  border-radius: 8px;
  overflow: hidden;
}
.metric i {
  display: block;
  height: 100%;
  background: var(--blue);
}
.notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.notes > div {
  background: #0b111b;
  padding: 16px;
  border-radius: 8px;
}
.notes h3 {
  font-size: 13px;
}
.notes ul {
  color: var(--muted);
  line-height: 1.9;
  padding-left: 20px;
  margin-bottom: 0;
  font-size: 12px;
}
@media (max-width: 950px) {
  .draft-grid {
    grid-template-columns: 1fr;
  }
  .center {
    order: -1;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .slot {
    grid-template-columns: 44px 1fr 1fr;
  }
  .status {
    display: none;
  }
}
@media (max-width: 560px) {
  header,
  main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .slot {
    grid-template-columns: 1fr;
  }
  .slot > span {
    margin-top: 4px;
  }
  .notes {
    grid-template-columns: 1fr;
  }
  .metric {
    grid-template-columns: 120px 42px 1fr 42px;
  }
}
.series-box {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 0 0 14px;
}
.series-box > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 8px;
}
.series-box > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.series-box span {
  background: #0a1019;
  padding: 6px;
  border-radius: 5px;
  font-size: 10px;
  text-align: center;
  color: var(--muted);
}
.series-box b {
  display: block;
  color: #eaf2fc;
  font-size: 12px;
}
.roster-count {
  color: var(--muted);
  font-size: 11px;
  margin-right: 12px;
}
dialog {
  width: min(560px, calc(100vw - 30px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101722;
  color: #eef4fb;
  box-shadow: 0 30px 100px #000;
}
dialog::backdrop {
  background: rgba(2, 5, 10, 0.78);
}
dialog form {
  padding: 22px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.dialog-head h2 {
  margin-top: 5px;
}
.dialog-head .close {
  font-size: 26px;
  width: 38px;
  padding: 0;
  background: transparent;
  color: var(--muted);
}
dialog p {
  color: var(--muted);
  font-size: 12px;
  margin: 20px 0;
}
dialog label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
dialog input {
  width: 100%;
}
#api-message {
  min-height: 36px;
  padding: 12px 0;
  color: var(--muted);
  font-size: 12px;
}
.success {
  color: #42d392 !important;
}
.error {
  color: var(--red) !important;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.danger {
  background: #3b171b;
  color: #ff8e95;
}
.slot {
  grid-template-columns: 38px 44px 1fr 1fr;
}
.player-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  background: #1a2637;
  color: #fff;
  border: 1px solid #38506d;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.player-icon > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.08);
}
.hex-avatar {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, hsl(var(--avatar-accent) 88% 72%) 0 8%, transparent 9%),
    radial-gradient(circle at 50% 45%, hsl(var(--avatar-hue) 78% 56%) 0 17%, hsl(var(--avatar-hue) 82% 25%) 18% 25%, transparent 26%),
    conic-gradient(from var(--avatar-angle), hsl(var(--avatar-hue) 55% 23%), #07131f, hsl(var(--avatar-accent) 50% 22%), hsl(var(--avatar-hue) 55% 23%));
}
.hex-avatar::before,
.hex-avatar::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid hsl(var(--avatar-hue) 82% 66% / 0.65);
  clip-path: polygon(25% 6%, 75% 6%, 98% 50%, 75% 94%, 25% 94%, 2% 50%);
  animation: hex-avatar-spin 5s linear infinite;
}
.hex-avatar::after {
  inset: 9px;
  border-color: hsl(var(--avatar-accent) 85% 70% / 0.72);
  animation-direction: reverse;
  animation-duration: 3.4s;
}
.hex-avatar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(var(--avatar-accent) 90% 72%);
  box-shadow: 0 0 9px hsl(var(--avatar-hue) 90% 62%), 0 0 15px hsl(var(--avatar-hue) 90% 62%);
  animation: hex-avatar-pulse 1.8s ease-in-out infinite;
}
.hex-avatar svg {
  position: absolute;
  width: 21px;
  height: 21px;
  overflow: visible;
  filter: drop-shadow(0 0 5px hsl(var(--avatar-hue) 90% 62%));
  transform: rotate(calc(var(--avatar-angle) / 7));
  animation: avatar-glyph-float 2.8s ease-in-out infinite;
}
.hex-avatar svg path {
  fill: hsl(var(--avatar-hue) 68% 34% / 0.72);
  stroke: hsl(var(--avatar-accent) 90% 76%);
  stroke-width: 1.35;
  stroke-linejoin: round;
}
.hex-avatar b {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 1px solid hsl(var(--avatar-accent) 80% 70% / 0.32);
  transform: rotate(var(--avatar-angle));
}
.hex-avatar[data-variant="0"] b { border-radius: 50%; }
.hex-avatar[data-variant="1"] b { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.hex-avatar[data-variant="2"] b { clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); }
.hex-avatar[data-variant="3"] b { width: 18px; height: 8px; border-radius: 999px; }
.hex-avatar[data-variant="4"] b { clip-path: polygon(50% 0, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0 50%, 35% 35%); }
.hex-avatar[data-variant="5"] b { border-radius: 4px 10px 4px 10px; }
@keyframes hex-avatar-spin {
  to { transform: rotate(360deg); }
}
@keyframes hex-avatar-pulse {
  50% { transform: scale(1.45); opacity: 0.72; }
}
@keyframes avatar-glyph-float {
  50% { transform: rotate(calc(var(--avatar-angle) / 7)) translateY(-1px) scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {
  .hex-avatar::before,
  .hex-avatar::after,
  .hex-avatar i,
  .hex-avatar svg { animation: none; }
}
.series-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.series-nav h2 {
  font-size: 17px;
  margin-top: 4px;
}
.series-nav > div:nth-child(2) {
  display: flex;
  gap: 6px;
}
.game-tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.game-tab.active {
  background: var(--gold);
  color: #090c11;
}
.game-tab.complete {
  border-color: #42d392;
}
.series-nav > span {
  color: var(--muted);
  font-size: 11px;
}
.history {
  margin-top: 18px;
  padding: 20px;
}
.history #h2h {
  color: var(--muted);
  font-size: 13px;
}
.team-head select {
  margin-top: 8px;
  min-width: 180px;
}
.profile-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0;
}
.profile-summary div,
.hero-row {
  background: #0a1019;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 7px;
}
.profile-summary b,
.profile-summary span {
  display: block;
}
.profile-summary span,
.hero-row small {
  color: var(--muted);
  font-size: 10px;
}
.hero-list {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
}
.hero-row {
  display: grid;
  grid-template-columns: 1fr repeat(4, 70px);
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.bans {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  border-top: 1px solid var(--line);
}
.bans::before {
  content: "BANS";
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 9px;
}
.bans select {
  width: 100%;
  min-width: 0;
  font-size: 10px;
  padding: 0 5px;
}

/* 竞技视觉层 */
body {
  background:
    radial-gradient(circle at 18% 0, rgba(18, 86, 128, 0.22), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(122, 42, 58, 0.16), transparent 28%),
    linear-gradient(180deg, #050912, #080d16 55%, #050810);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
}
.card {
  backdrop-filter: blur(18px);
  background: linear-gradient(
    145deg,
    rgba(16, 24, 37, 0.94),
    rgba(7, 12, 21, 0.9)
  );
  border-color: rgba(82, 111, 147, 0.34);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.3),
    inset 0 1px rgba(255, 255, 255, 0.025);
  transition:
    border-color 0.25s,
    transform 0.25s,
    box-shadow 0.25s;
}
.team:hover {
  border-color: rgba(103, 151, 204, 0.55);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.4);
}
button,
select,
input {
  transition: all 0.2s ease;
}
button:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}
select:hover,
input:hover {
  border-color: #47658a;
}
.bar {
  height: 9px;
  box-shadow: 0 0 20px rgba(55, 169, 255, 0.18);
}
.bar i {
  box-shadow: 0 0 22px rgba(55, 169, 255, 0.65);
}
.game-tab {
  position: relative;
  overflow: hidden;
}
.game-tab.active {
  box-shadow: 0 0 24px rgba(217, 184, 108, 0.28);
}
.slot {
  grid-template-columns: 38px 44px minmax(135px, 1fr) 38px minmax(135px, 1fr);
  transition: background 0.2s;
}
.slot:hover {
  background: rgba(54, 86, 123, 0.1);
}
.player-icon {
  box-shadow: inset 0 0 18px rgba(55, 169, 255, 0.12);
}
.player-icon:hover {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(217, 184, 108, 0.22);
}
.champ-portrait,
.champ-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #405573;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}
.champ-placeholder {
  display: grid;
  place-items: center;
  color: #46556a;
  background: #0a1019;
}
.hero-row {
  grid-template-columns: 34px minmax(100px, 1fr) repeat(4, minmax(64px, 90px));
}
.hero-row img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: cover;
}
.roster-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.roster-form button {
  grid-column: 1/-1;
}
.manual-list {
  display: grid;
  gap: 7px;
  max-height: 240px;
  overflow: auto;
  margin-top: 14px;
}
.manual-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0a1019;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
}
.manual-list button {
  min-height: 30px;
}
.manual-list small,
#manual-message {
  color: var(--muted);
  font-size: 12px;
}
#manual-message {
  min-height: 34px;
  padding-top: 12px;
}
.prob strong em {
  filter: drop-shadow(0 0 10px currentColor);
}
@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.draft-grid,
.history,
.breakdown {
  animation: panelIn 0.35s ease both;
}
.synergy-alerts {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
}
.synergy-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(217, 184, 108, 0.32);
  background: linear-gradient(
    90deg,
    rgba(217, 184, 108, 0.12),
    rgba(55, 169, 255, 0.06)
  );
  border-radius: 7px;
  font-size: 10px;
  color: #d9c38e;
  animation: panelIn 0.25s ease;
}
.synergy-chip-copy {
  flex: 1;
  min-width: 0;
}
.synergy-chip.popular {
  border-color: rgba(40, 210, 199, 0.55);
  background: linear-gradient(90deg, rgba(18, 177, 174, 0.14), rgba(55, 169, 255, 0.06));
}
.synergy-chip.popular i {
  color: #06211f;
  background: #42d7c8;
}
.synergy-sample-summary,
.synergy-scope-grid {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.synergy-sample-summary span {
  color: var(--muted);
}
.synergy-sample-summary b {
  color: #f4e1a5;
}
.synergy-scope-grid em {
  display: grid;
  gap: 1px;
  padding: 5px 7px;
  border-radius: 8px;
  background: rgba(4, 16, 25, 0.72);
  font-style: normal;
}
.synergy-scope-grid em b { color: #dfeaf2; }
.synergy-scope-grid em span,
.synergy-scope-grid em small { color: var(--muted); }
.synergy-chip img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}
.synergy-chip b {
  color: #fff;
}
.synergy-chip .bonus {
  margin-left: auto;
  color: #42d392;
}
.history h3 {
  font-size: 12px;
  color: #d7e1ed;
  margin: 4px 0 9px;
}
.history-subtitle {
  margin-top: 22px !important;
}
.lineup-results {
  display: grid;
  gap: 7px;
}
.lineup-match {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: #0a1019;
  border-radius: 7px;
  font-size: 11px;
}
.lineup-match.exact {
  border-color: rgba(217, 184, 108, 0.55);
}
.lineup-match small {
  color: var(--muted);
}
.lineup-match b.win {
  color: #42d392;
}
.lineup-match b.loss {
  color: var(--red);
}
.synergy-chip.featured {
  border-color: rgba(255, 196, 80, 0.62);
  box-shadow:
    inset 0 0 18px rgba(217, 184, 108, 0.08),
    0 0 15px rgba(217, 184, 108, 0.08);
}
.synergy-chip i {
  display: inline-block;
  font-style: normal;
  color: #151009;
  background: var(--gold);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 8px;
  margin-left: 3px;
}
.composition-analysis {
  margin-top: 18px;
  padding: 20px;
  animation: panelIn 0.35s ease both;
}
.analysis-hint {
  color: var(--muted);
  font-size: 11px;
}
.composition-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.composition-side {
  position: relative;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(
    145deg,
    rgba(10, 16, 25, 0.96),
    rgba(8, 13, 22, 0.88)
  );
}
.composition-side::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--blue);
  box-shadow: 0 0 14px var(--blue);
}
.composition-side.red::before {
  background: var(--red);
  box-shadow: 0 0 14px var(--red);
}
.composition-title span {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: var(--blue);
}
.composition-side.red .composition-title span {
  color: var(--red);
}
.composition-title h3 {
  margin-top: 4px;
  font-size: 16px;
}
.strategy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 15px 0;
}
.strategy-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid #40506a;
  border-radius: 7px;
  background: #111a28;
}
.strategy-tag b {
  font-size: 12px;
}
.strategy-tag small {
  font-size: 9px;
  color: #a7b4c6;
}
.tone-red {
  border-color: rgba(255, 95, 105, 0.6);
  background: rgba(255, 95, 105, 0.1);
}
.tone-gold {
  border-color: rgba(217, 184, 108, 0.62);
  background: rgba(217, 184, 108, 0.1);
}
.tone-orange {
  border-color: rgba(255, 145, 64, 0.6);
  background: rgba(255, 145, 64, 0.1);
}
.tone-purple {
  border-color: rgba(166, 115, 255, 0.62);
  background: rgba(166, 115, 255, 0.1);
}
.tone-cyan {
  border-color: rgba(45, 211, 216, 0.6);
  background: rgba(45, 211, 216, 0.09);
}
.tone-blue {
  border-color: rgba(55, 169, 255, 0.6);
  background: rgba(55, 169, 255, 0.09);
}
.tone-pink {
  border-color: rgba(255, 100, 184, 0.6);
  background: rgba(255, 100, 184, 0.09);
}
.tone-green,
.tone-teal {
  border-color: rgba(66, 211, 146, 0.6);
  background: rgba(66, 211, 146, 0.09);
}
.game-plan h4,
.composition-risks > b {
  font-size: 11px;
  color: #dae6f4;
  letter-spacing: 0.5px;
}
.game-plan ol,
.composition-risks ul {
  padding-left: 20px;
  margin: 9px 0 0;
  color: #a7b4c6;
  font-size: 11px;
  line-height: 1.75;
}
.game-plan li::marker {
  color: var(--gold);
  font-weight: 800;
}
.composition-risks {
  margin-top: 13px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 95, 105, 0.23);
  border-radius: 7px;
  background: rgba(255, 95, 105, 0.055);
}
.composition-risks > b {
  color: #ff9aa1;
}
.analysis-empty {
  min-height: 150px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  gap: 7px;
}
.analysis-empty b {
  font-size: 26px;
  color: #43536a;
}
.analysis-empty span {
  font-size: 11px;
}
@media (max-width: 760px) {
  .composition-results {
    grid-template-columns: 1fr;
  }
  .strategy-tag {
    align-items: flex-start;
    flex-direction: column;
  }
}
.model-health {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 15px;
}
.model-health > span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0a1019;
  color: var(--muted);
  font-size: 10px;
}
.model-health b {
  display: block;
  color: #edf5ff;
  font-size: 16px;
  margin-bottom: 3px;
}
.model-health small {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 10px;
}
@media (max-width: 700px) {
  .model-health {
    grid-template-columns: 1fr 1fr;
  }
}

/* v0.9.9 · Installable mobile PWA companion */
.pwa-install-banner[hidden] {
  display: none !important;
}
.pwa-install-banner {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 42px 12px 14px;
  border-color: rgba(65, 218, 202, 0.35);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 0, rgba(53, 210, 197, 0.16), transparent 35%),
    linear-gradient(135deg, rgba(8, 32, 43, 0.98), rgba(7, 17, 29, 0.98));
}
.pwa-install-banner img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.pwa-install-banner > div {
  display: grid;
  gap: 3px;
}
.pwa-install-banner strong {
  color: #f3f8fb;
  font-size: 14px;
}
.pwa-install-banner small {
  color: #8fa7b5;
  font-size: 11px;
}
.pwa-install-dismiss {
  position: absolute;
  top: 5px;
  right: 7px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  color: #8299a7;
  background: transparent;
}
.pwa-install-dialog {
  width: min(680px, calc(100vw - 24px));
  border-radius: 26px;
}
.pwa-install-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}
.pwa-install-steps section,
.pwa-install-steps aside {
  padding: 16px;
  border: 1px solid rgba(71, 151, 169, 0.24);
  border-radius: 18px;
  background: rgba(4, 17, 27, 0.75);
}
.pwa-install-steps section b {
  color: var(--gold);
}
.pwa-install-steps ol {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #c6d4dd;
  line-height: 1.9;
}
.pwa-install-steps aside {
  grid-column: 1 / -1;
  color: #8fa7b5;
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 720px) {
  html {
    background: #050c14;
  }
  body {
    padding-top: env(safe-area-inset-top);
    overflow-x: hidden;
  }
  header {
    align-items: flex-start;
    gap: 10px;
    padding: 14px 14px 10px;
  }
  header .brand img {
    width: 48px;
    height: 48px;
  }
  header .brand h1 {
    font-size: 24px;
  }
  header .brand p,
  header .status {
    font-size: 9px;
  }
  main {
    width: 100%;
    padding: 0 9px calc(26px + env(safe-area-inset-bottom));
  }
  .pwa-install-banner {
    grid-template-columns: 44px 1fr auto;
    padding: 10px 35px 10px 10px;
  }
  .pwa-install-banner img {
    width: 42px;
    height: 42px;
  }
  .pwa-install-banner > div {
    min-width: 0;
  }
  .pwa-install-banner small {
    display: none;
  }
  #pwa-install-help {
    display: none;
  }
  .pwa-install-steps {
    grid-template-columns: 1fr;
  }
  .match-workspace-switcher {
    gap: 9px;
    padding: 10px;
    border-radius: 20px;
  }
  .match-workspace-switcher > div {
    display: none;
  }
  #match-workspace-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .match-workspace-tab {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 58px;
    padding: 8px;
    border-radius: 15px;
  }
  .match-workspace-tab span {
    padding: 7px;
    font-size: 11px;
  }
  .match-workspace-tab b {
    font-size: 10px;
  }
  .match-workspace-tab small {
    font-size: 8px;
  }
  .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
    border-radius: 20px;
  }
  .toolbar label,
  .toolbar button {
    width: 100%;
    min-width: 0;
  }
  .toolbar button {
    min-height: 44px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
  }
  .toolbar label:nth-of-type(3),
  .toolbar label:nth-of-type(5) {
    grid-column: auto;
  }
  .series-nav {
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 180;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    backdrop-filter: blur(22px);
  }
  .series-nav > div:first-child,
  #global-used {
    display: none;
  }
  #game-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  #game-tabs::-webkit-scrollbar {
    display: none;
  }
  .game-tab {
    flex: 0 0 auto;
    min-height: 42px;
  }
  .draft-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  #prediction-center {
    order: -3;
  }
  #blue-draft-panel {
    order: -2;
  }
  #red-draft-panel {
    order: -1;
  }
  .team,
  .center,
  .power-curve,
  .history,
  .composition-analysis {
    border-radius: 22px;
  }
  .team-head {
    padding: 14px;
  }
  .team-head h2 {
    font-size: 20px;
  }
  .slot {
    display: grid;
    grid-template-columns: 34px minmax(0, 0.95fr) 38px minmax(0, 1.05fr);
    gap: 6px;
    margin: 5px 6px;
    padding: 7px 6px;
  }
  .slot > span:first-child {
    display: none;
  }
  .slot .player-icon {
    width: 34px;
    height: 34px;
  }
  .slot select,
  .slot input {
    width: 100%;
    min-width: 0;
    font-size: 12px;
  }
  .champ-portrait,
  .champ-placeholder {
    width: 38px;
    height: 38px;
  }
  .champion-suggestions {
    position: fixed;
    inset: auto 9px calc(8px + env(safe-area-inset-bottom));
    z-index: 500;
    max-height: min(52vh, 430px);
    border-radius: 22px;
  }
  .bans {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 10px 4px 0;
  }
  .bans input {
    min-width: 0;
    padding: 0 5px;
    font-size: 9px;
  }
  .prob.prediction-block {
    padding: 13px;
  }
  .single-game-prob .game-matchup b {
    max-width: 95px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .synergy-popup,
  .save-notice {
    width: calc(100vw - 22px);
    max-width: none;
  }
  .synergy-popup {
    top: max(12px, env(safe-area-inset-top));
    padding: 20px 14px;
  }
  .composition-popup-heroes img {
    width: 42px;
    height: 42px;
  }
  dialog {
    width: calc(100vw - 12px) !important;
    max-height: calc(100dvh - 12px);
    margin: auto;
    border-radius: 24px;
  }
}

@media (display-mode: standalone) {
  .pwa-install-banner {
    display: none !important;
  }
}

/* Keep these final mobile overrides after all historical responsive rules. */
#mobile-tools-toggle {
  display: none;
}
@media (max-width: 720px) {
  .toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end;
  }
  .toolbar label,
  .toolbar button {
    width: 100%;
  }
  #save-match,
  #demo,
  #mobile-tools-toggle {
    grid-column: 1 / -1;
  }
  #mobile-tools-toggle {
    display: block;
  }
  #api-settings,
  #pipeline-settings,
  #roster-settings,
  #live-lab,
  #export {
    display: none;
  }
  body.mobile-tools-open #api-settings,
  body.mobile-tools-open #pipeline-settings,
  body.mobile-tools-open #roster-settings,
  body.mobile-tools-open #live-lab,
  body.mobile-tools-open #export {
    display: block;
  }
}
.team-style,
.recent-windows {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 12px 0;
}
.team-style span,
.recent-windows > div {
  padding: 8px;
  border: 1px solid rgba(65, 85, 112, 0.65);
  border-radius: 6px;
  background: rgba(8, 14, 23, 0.7);
  color: var(--muted);
  font-size: 9px;
}
.team-style b,
.recent-windows b,
.recent-windows span {
  display: block;
}
.team-style b {
  color: #dce8f6;
  font-size: 13px;
}
.recent-windows {
  grid-template-columns: repeat(3, 1fr);
}
.recent-windows b {
  color: var(--gold);
  font-size: 11px;
  margin-bottom: 5px;
}
.recent-windows span {
  line-height: 1.6;
}
.data-availability {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 10px;
}
.data-availability b {
  color: #dce8f6;
}
.missing-data {
  display: block;
  color: var(--muted);
  margin: 12px 0;
  font-size: 10px;
}
.hidden-model {
  display: none !important;
}
.team-labels,
.player-style-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.team-labels b,
.player-style-tags b {
  padding: 4px 7px;
  border: 1px solid rgba(217, 184, 108, 0.4);
  border-radius: 4px;
  background: rgba(217, 184, 108, 0.08);
  color: #e4ca8f;
  font-size: 9px;
}
.counter-summary {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  margin: 10px 0 14px;
  border: 1px solid rgba(55, 169, 255, 0.3);
  border-radius: 7px;
  background: rgba(55, 169, 255, 0.06);
}
.counter-summary b {
  font-size: 11px;
  color: #9bd4ff;
}
.counter-summary span {
  font-size: 10px;
  color: #a9b8c9;
}
body.pure-bp .player-icon,
body.pure-bp .player-select,
body.pure-bp .team-head select,
body.pure-bp .team-history-block,
body.pure-bp #roster-settings {
  display: none;
}
body.pure-bp .slot {
  grid-template-columns: 52px 42px minmax(180px, 1fr);
}
body.pure-bp .team-head h2::after {
  content: " · 纯BP";
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.toolbar label:first-child select {
  border-color: rgba(217, 184, 108, 0.65);
  color: #f1d99d;
}
.champion-search-wrap {
  position: relative;
  min-width: 0;
}
.champion-search {
  width: 100%;
  padding-right: 28px;
}
.champion-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(217, 184, 108, 0.1);
}
.champion-suggestions {
  display: none;
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  max-height: 300px;
  overflow: auto;
  padding: 5px;
  background: #090f18;
  border: 1px solid #3a4d67;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}
.champion-suggestions.open {
  display: grid;
  gap: 3px;
}
.champion-suggestions button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 43px;
  padding: 5px 7px;
  background: transparent;
  color: #eaf2fc;
  text-align: left;
}
.champion-suggestions button:hover {
  background: rgba(55, 169, 255, 0.12);
  transform: none;
}
.champion-suggestions img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}
.champion-suggestions span,
.champion-suggestions b,
.champion-suggestions small {
  display: block;
}
.champion-suggestions small,
.no-match {
  color: var(--muted);
  font-size: 9px;
}
.no-match {
  padding: 12px;
}
.champion-suggestions b {
  font-size: 11px;
}
.ban-search-wrap {
  position: relative;
  min-width: 0;
}
.ban-search {
  width: 100%;
  min-width: 0;
  padding: 0 6px;
  font-size: 9px;
}
.ban-suggestions {
  display: none;
  position: absolute;
  z-index: 50;
  left: 0;
  width: 220px;
  bottom: calc(100% + 5px);
  max-height: 270px;
  overflow: auto;
  padding: 5px;
  background: #090f18;
  border: 1px solid #3a4d67;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
}
.ban-search-wrap:nth-child(n + 4) .ban-suggestions {
  left: auto;
  right: 0;
}
.ban-suggestions.open {
  display: grid;
  gap: 3px;
}
.ban-suggestions button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 5px 7px;
  background: transparent;
  color: #eaf2fc;
  text-align: left;
}
.ban-suggestions button:hover {
  background: rgba(255, 95, 105, 0.1);
  transform: none;
}
.ban-suggestions img {
  width: 29px;
  height: 29px;
  border-radius: 5px;
}
.ban-suggestions span,
.ban-suggestions b,
.ban-suggestions small {
  display: block;
}
.ban-suggestions b {
  font-size: 10px;
}
.ban-suggestions small {
  font-size: 8px;
  color: var(--muted);
}
.analysis-dialog {
  width: min(1120px, calc(100vw - 36px));
  max-height: 90vh;
}
.analysis-dialog form {
  padding: 0;
}
.analysis-dialog .dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  padding: 20px 24px;
  background: rgba(16, 23, 34, 0.98);
  border-bottom: 1px solid var(--line);
}
.analysis-dialog .dialog-head p {
  margin: 5px 0 0;
}
.analysis-scroll {
  max-height: calc(90vh - 92px);
  overflow: auto;
  padding: 20px 24px 28px;
}
.analysis-summary {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 14px;
}
.analysis-summary b {
  color: #fff;
}
.detail-modules {
  border-top: 1px solid var(--line);
}
.analysis-dialog .notes {
  margin-top: 18px;
}

/* EKIM 指数 · 海克斯峡谷主题 */
:root {
  --bg: #010a13;
  --panel: #071522;
  --line: #1e4b5d;
  --muted: #7f9aa8;
  --blue: #0ac8b9;
  --red: #e84057;
  --gold: #c89b3c;
  --gold-light: #f0e6d2;
  --ink: #01070c;
}
body {
  background:
    radial-gradient(
      circle at 50% -12%,
      rgba(10, 200, 185, 0.16),
      transparent 30%
    ),
    radial-gradient(circle at 8% 38%, rgba(12, 73, 102, 0.18), transparent 28%),
    radial-gradient(
      circle at 94% 30%,
      rgba(200, 155, 60, 0.1),
      transparent 24%
    ),
    linear-gradient(180deg, #010a13, #07111d 55%, #01070c);
}
body::before {
  opacity: 0.2;
  background-image:
    linear-gradient(
      30deg,
      rgba(200, 155, 60, 0.035) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(200, 155, 60, 0.035) 87.5%
    ),
    linear-gradient(
      150deg,
      rgba(10, 200, 185, 0.025) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(10, 200, 185, 0.025) 87.5%
    );
  background-size: 46px 80px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 17px;
}
.brand > img {
  width: 68px;
  height: 68px;
  border-radius: 17px;
  border: 1px solid rgba(200, 155, 60, 0.55);
  box-shadow:
    0 0 30px rgba(10, 200, 185, 0.2),
    0 8px 28px rgba(0, 0, 0, 0.5);
}
h1 {
  font-family: Georgia, "Times New Roman", "PingFang SC", serif;
  color: var(--gold-light);
  letter-spacing: 5px;
  text-shadow: 0 0 22px rgba(200, 155, 60, 0.2);
}
h1 span {
  margin-left: 8px;
  color: var(--gold);
  font-size: 0.56em;
  letter-spacing: 3px;
}
.eyebrow,
.team-head span {
  color: #c8aa6e;
}
.card {
  background: linear-gradient(
    145deg,
    rgba(7, 21, 34, 0.97),
    rgba(2, 12, 21, 0.94)
  );
  border-color: rgba(30, 75, 93, 0.8);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.38),
    inset 0 1px rgba(200, 155, 60, 0.05);
}
.toolbar,
.series-nav {
  border-color: rgba(200, 155, 60, 0.3);
}
button {
  background: linear-gradient(180deg, #d4af58, #9b7427);
  color: #071018;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.2);
}
button.ghost {
  background: linear-gradient(
    180deg,
    rgba(13, 41, 54, 0.75),
    rgba(4, 20, 30, 0.8)
  );
  border: 1px solid #356477;
  color: #c9dde5;
  box-shadow: none;
}
button.ghost:hover {
  border-color: #c89b3c;
  color: #f0e6d2;
}
.team.blue {
  border-top-color: #0ac8b9;
}
.team.red {
  border-top-color: #e84057;
}
.team.blue .team-head {
  background: linear-gradient(90deg, rgba(10, 200, 185, 0.08), transparent);
}
.team.red .team-head {
  background: linear-gradient(270deg, rgba(232, 64, 87, 0.08), transparent);
}
select,
input {
  background: #03111c;
  border-color: #23495a;
}
.bar {
  background: #e84057;
}
.bar i {
  background: linear-gradient(90deg, #057e83, #0ac8b9);
}
.game-tab.active {
  background: linear-gradient(180deg, #d8b45c, #9c762b);
  box-shadow: 0 0 24px rgba(200, 155, 60, 0.28);
}
.champ-portrait,
.champ-placeholder {
  border-color: #3b6b78;
}
.composition-side {
  background: linear-gradient(
    145deg,
    rgba(5, 24, 37, 0.98),
    rgba(2, 12, 21, 0.92)
  );
  border-color: #1d4656;
}
.strategy-tag {
  background: #071a29;
}
.warning {
  color: #c8aa6e;
  background: rgba(33, 27, 12, 0.7);
  border-color: #5a4720;
}
dialog {
  background: #06131f;
  border-color: #31586a;
}
dialog::backdrop {
  background: rgba(0, 6, 12, 0.86);
  backdrop-filter: blur(4px);
}
.analysis-dialog .dialog-head {
  background: rgba(4, 17, 28, 0.98);
}
@media (max-width: 560px) {
  .brand > img {
    width: 52px;
    height: 52px;
  }
  .brand {
    gap: 11px;
  }
  h1 {
    font-size: 26px;
  }
}
.toolbar {
  display: grid;
  grid-template-columns: 112px 105px 140px 74px 140px repeat(
      5,
      minmax(88px, 1fr)
    );
  gap: 9px;
}
.toolbar button {
  white-space: nowrap;
  padding: 0 7px;
  font-size: 12px;
}
.toolbar label {
  min-width: 0;
}
.toolbar select,
.toolbar input {
  width: 100%;
  min-width: 0;
}
@media (max-width: 1180px) {
  .toolbar {
    display: flex;
    flex-wrap: wrap;
  }
  .toolbar button {
    min-width: 108px;
  }
}
.pipeline-status {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #31586a;
  border-radius: 8px;
  background: #03111c;
  color: #c9dde5;
  font-size: 12px;
  line-height: 1.7;
}
.pipeline-status.running {
  color: #c8aa6e;
}
.pipeline-status.success {
  border-color: #237665;
}
.pipeline-history {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  max-height: 220px;
  overflow: auto;
}
.pipeline-history > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #04101a;
  font-size: 11px;
  color: var(--muted);
}
.pipeline-dialog {
  width: min(840px, calc(100vw - 30px));
}
.patch-paste {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.patch-paste > div:first-child {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  align-items: end;
}
.patch-paste textarea {
  width: 100%;
  min-height: 150px;
  padding: 10px;
  resize: vertical;
  color: #eaf2fc;
  background: #03111c;
  border: 1px solid #23495a;
  border-radius: 6px;
  font:
    12px/1.55 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}
.patch-paste .dialog-actions {
  margin-top: 10px;
}
.patch-preview {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  max-height: 230px;
  overflow: auto;
  color: var(--muted);
  font-size: 11px;
}
.patch-change {
  display: grid;
  grid-template-columns: 120px 70px 65px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #04101a;
}
.patch-change .buff {
  color: #42d392;
}
.patch-change .nerf {
  color: #ff7883;
}
.patch-change .adjust {
  color: #c8aa6e;
}
.patch-change input {
  min-height: 30px;
  width: 64px;
  padding: 0 6px;
}
@media (max-width: 650px) {
  .patch-paste > div:first-child {
    grid-template-columns: 1fr;
  }
  .patch-change {
    grid-template-columns: 1fr 70px 65px;
  }
  .patch-change small {
    grid-column: 1/-1;
  }
}
.live-dialog {
  width: min(1240px, calc(100vw - 26px));
  max-height: 94vh;
}
.live-dialog form {
  padding: 0;
}
.live-dialog .dialog-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #04111c;
}
.live-dialog .dialog-head p {
  margin: 5px 0 0;
}
.live-scroll {
  padding: 18px 24px 28px;
  max-height: calc(94vh - 94px);
  overflow: auto;
}
.live-controls {
  display: grid;
  grid-template-columns: 170px 150px minmax(240px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}
.live-hero {
  display: grid;
  grid-template-columns: 1fr 160px 1fr;
  align-items: center;
  text-align: center;
  margin: 14px 0;
}
.live-hero strong {
  display: block;
  font-size: 38px;
  color: var(--blue);
}
.live-hero > div:last-child strong {
  color: var(--red);
}
.live-hero span {
  font-size: 11px;
  color: var(--muted);
}
.live-hero b {
  font-size: 24px;
  color: var(--gold-light);
}
#live-chart {
  width: 100%;
  height: 240px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(180deg, #061827, #020b13);
}
.live-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.live-grid > section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #03111c;
}
.live-grid h3 {
  margin: 0 0 12px;
}
.live-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.live-inputs label {
  font-size: 10px;
}
.live-inputs input {
  min-height: 32px;
}
.live-events {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.live-events button {
  padding: 6px 8px;
  font-size: 10px;
}
.live-reasons {
  display: grid;
  gap: 8px;
}
.live-reason {
  display: flex;
  justify-content: space-between;
  padding: 9px;
  border-left: 3px solid var(--blue);
  background: #061a28;
  font-size: 12px;
}
.live-reason.red {
  border-color: var(--red);
}
.live-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}
.live-side.blue h3 {
  color: var(--blue);
}
.live-side.red h3 {
  color: var(--red);
}
@media (max-width: 900px) {
  .live-controls,
  .live-grid {
    grid-template-columns: 1fr 1fr;
  }
  .live-grid > section:nth-child(2) {
    grid-column: 1/-1;
    order: 3;
  }
}
/* 小局 / 全局双层预测视图 */
body:not(.series-overview) .series-prob,
body:not(.series-overview) .series-box,
body:not(.series-overview) .series-game-overview {
  display: none;
}
body.series-overview .single-game-prob,
body.series-overview #blue-draft-panel,
body.series-overview #red-draft-panel,
body.series-overview .history {
  display: none;
}
body.series-overview #prediction-center {
  grid-column: 1/-1;
  min-height: 420px;
  padding: 28px;
}
body.series-overview .draft-grid {
  grid-template-columns: 1fr;
}
.global-tab {
  margin-left: 10px;
  border-color: rgba(200, 155, 60, 0.62);
  color: #e1c47c;
}
.series-game-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.series-game-card,
.global-analysis-card {
  display: grid;
  gap: 8px;
  text-align: left;
  padding: 14px;
  background: linear-gradient(
    145deg,
    rgba(7, 27, 41, 0.96),
    rgba(3, 14, 24, 0.92)
  );
  color: #dceaf2;
  border: 1px solid #245366;
  box-shadow: none;
}
.series-game-card:hover,
.global-analysis-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.series-game-card > span {
  font-size: 10px;
  color: #c8aa6e;
  letter-spacing: 1px;
}
.series-game-card > strong {
  display: grid;
  grid-template-columns: 1fr auto auto auto 1fr;
  gap: 7px;
  align-items: center;
  font-size: 19px;
}
.series-game-card > strong em {
  font-style: normal;
  color: var(--blue);
}
.series-game-card > strong em:last-child {
  color: var(--red);
  text-align: right;
}
.series-game-card > strong small {
  font-size: 9px;
  color: var(--muted);
}
.series-game-card > b {
  font-size: 12px;
}
.series-game-card > small {
  font-size: 9px;
  color: var(--muted);
}
.series-game-card.complete {
  border-color: rgba(66, 211, 146, 0.48);
}
.series-game-card.incomplete {
  opacity: 0.82;
}
.global-analysis-card > span {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 1px;
}
.global-analysis-card > strong {
  font-size: 13px;
}
.global-analysis-card > strong em {
  font-style: normal;
  color: var(--blue);
}
.global-analysis-card > strong em:last-child {
  color: var(--red);
}
.global-analysis-card > div {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.global-analysis-card > div b {
  font-size: 9px;
  padding: 4px 6px;
  border: 1px solid #31596a;
  border-radius: 4px;
}
.global-analysis-card > small {
  font-size: 9px;
  color: var(--muted);
}
.global-detail-game {
  margin: 16px 0 24px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.global-detail-game h3 {
  padding: 12px 14px;
  margin: 0;
  background: #071a29;
  color: #dceaf2;
  font-size: 13px;
}
.global-detail-game .metric {
  padding-left: 12px;
  padding-right: 12px;
}
@media (max-width: 900px) {
  .series-game-overview {
    grid-template-columns: 1fr;
  }
  .global-tab {
    margin-left: 0;
  }
}

/* v0.8.6 · 更圆润的高级玻璃质感 */
:root {
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --soft-line: rgba(126, 181, 196, 0.18);
}
body {
  background:
    radial-gradient(
      circle at 48% -8%,
      rgba(13, 171, 172, 0.2),
      transparent 29%
    ),
    radial-gradient(circle at 2% 36%, rgba(30, 89, 131, 0.16), transparent 30%),
    radial-gradient(
      circle at 98% 28%,
      rgba(200, 155, 60, 0.12),
      transparent 27%
    ),
    linear-gradient(160deg, #010912 0%, #06131e 48%, #020911 100%);
}
.card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--soft-line);
  background: linear-gradient(
    145deg,
    rgba(8, 27, 41, 0.89),
    rgba(2, 12, 21, 0.82)
  );
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(10, 200, 185, 0.035);
  backdrop-filter: blur(26px) saturate(1.18);
}
.toolbar,
.series-nav {
  border-radius: 22px;
}
.team {
  border-top-width: 1px;
}
.team-head {
  padding: 21px 22px;
  border-bottom-color: rgba(107, 158, 174, 0.13);
}
select,
input,
button {
  border-radius: 13px;
  min-height: 40px;
}
.toolbar button,
.game-tab {
  border-radius: 999px;
}
.game-tab {
  padding: 0 17px;
}
.game-tab.active {
  box-shadow:
    0 9px 28px rgba(200, 155, 60, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.28);
}
.slot {
  margin: 6px 9px;
  padding: 10px 9px;
  border: 1px solid transparent;
  border-radius: 16px;
}
.slot:hover {
  border-color: rgba(72, 150, 170, 0.16);
  background: linear-gradient(
    90deg,
    rgba(10, 200, 185, 0.065),
    rgba(255, 255, 255, 0.018)
  );
  transform: translateX(2px);
}
.player-icon,
.champ-portrait,
.champ-placeholder {
  border-radius: 12px;
}
.player-icon {
  border-radius: 50%;
}
.bans {
  margin: 6px 10px 12px;
  padding: 13px 5px 0;
  border-top-color: rgba(107, 158, 174, 0.14);
}
.prediction-block {
  padding: 18px;
  border-radius: 20px;
  border-color: rgba(87, 164, 181, 0.24);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.04),
    0 14px 35px rgba(0, 0, 0, 0.18);
}
.bar {
  height: 10px;
}
.verdict {
  padding: 21px 8px;
}
.verdict strong {
  font-size: 15px;
}
.warning {
  border-radius: 14px;
  padding: 13px 15px;
}
.synergy-chip {
  border-radius: 15px;
  padding: 10px 12px;
}
.synergy-chip img {
  width: 29px;
  height: 29px;
  border-radius: 9px;
}
.synergy-chip.featured {
  background: linear-gradient(
    110deg,
    rgba(200, 155, 60, 0.18),
    rgba(10, 200, 185, 0.08)
  );
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.18);
}
.history,
.composition-analysis,
.breakdown {
  padding: 24px;
}
.composition-side,
.series-game-card,
.global-analysis-card {
  border-radius: 20px;
}
.strategy-tag,
.counter-summary,
.composition-risks,
.notes > div,
.model-health > span,
.hero-row,
.lineup-match {
  border-radius: 14px;
}
dialog {
  border-radius: 26px;
  box-shadow: 0 45px 140px rgba(0, 0, 0, 0.72);
}
.champion-suggestions,
.ban-suggestions {
  border-radius: 17px;
  padding: 8px;
}
.champion-suggestions button,
.ban-suggestions button {
  border-radius: 11px;
}
.champion-suggestions .add-new-champion {
  margin-top: 6px;
  border-color: rgba(217, 184, 108, 0.52);
  background: linear-gradient(120deg, rgba(74, 55, 16, 0.48), rgba(8, 24, 34, 0.94));
}
.add-symbol {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 184, 108, 0.5);
  border-radius: 10px;
  color: #f0d98f;
  font-size: 20px;
}
.champion-add-dialog {
  width: min(620px, calc(100vw - 36px));
}
.champion-add-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 12px;
  margin: 18px 0 12px;
}
.new-champion-preview {
  display: grid;
  gap: 5px;
  padding: 15px 17px;
  border: 1px solid rgba(217, 184, 108, 0.34);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(52, 39, 13, 0.42), rgba(5, 20, 29, 0.72));
}
.new-champion-preview span,
.new-champion-preview small {
  color: var(--muted);
  font-size: 9px;
}
.new-champion-preview strong {
  color: #f0d98f;
  font-size: 16px;
}
@media (max-width: 680px) {
  .champion-add-form { grid-template-columns: 1fr; }
}
.series-game-card,
.global-analysis-card {
  padding: 18px;
}
.series-box span {
  border-radius: 12px;
}
.global-detail-game {
  border-radius: 18px;
}
button:active {
  transform: translateY(1px) scale(0.985);
}
@keyframes synergyEnter {
  0% {
    opacity: 0;
    transform: translate(-50%, -42%) scale(0.76);
    filter: blur(10px);
  }
  55% {
    opacity: 1;
    transform: translate(-50%, -52%) scale(1.035);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes synergyLeave {
  to {
    opacity: 0;
    transform: translate(-50%, -58%) scale(0.94);
    filter: blur(6px);
  }
}
@keyframes heroPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  }
  50% {
    transform: translateY(-5px);
    box-shadow: 0 12px 38px rgba(200, 155, 60, 0.3);
  }
}
.synergy-popup {
  position: fixed;
  z-index: 1000;
  left: 50%;
  top: 48%;
  width: min(420px, calc(100vw - 36px));
  padding: 28px 30px;
  text-align: center;
  border: 1px solid rgba(232, 199, 115, 0.5);
  border-radius: 30px;
  background: linear-gradient(
    145deg,
    rgba(8, 29, 42, 0.96),
    rgba(3, 12, 21, 0.97)
  );
  box-shadow:
    0 35px 110px rgba(0, 0, 0, 0.72),
    0 0 70px rgba(10, 200, 185, 0.12),
    inset 0 1px rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(28px);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.synergy-popup.show {
  animation: synergyEnter 0.58s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}
.synergy-popup.leaving {
  animation: synergyLeave 0.45s ease forwards;
}
.synergy-popup-glow {
  position: absolute;
  width: 260px;
  height: 150px;
  left: 50%;
  top: -80px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse,
    rgba(200, 155, 60, 0.34),
    transparent 68%
  );
  filter: blur(8px);
}
.popular-combo-popup {
  border-color: rgba(52, 220, 207, 0.62);
  box-shadow: 0 35px 110px rgba(0, 0, 0, 0.72), 0 0 75px rgba(35, 218, 202, 0.2), inset 0 1px rgba(255, 255, 255, 0.09);
}
.popular-combo-popup .synergy-popup-kicker,
.popular-combo-popup > b { color: #52e1d3; }
.synergy-popup-kicker {
  position: relative;
  color: #d8bd78;
  font-size: 9px;
  letter-spacing: 2.5px;
}
.synergy-popup-heroes {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 18px 0 13px;
}
.synergy-popup-heroes img {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border: 2px solid rgba(224, 191, 108, 0.72);
  border-radius: 20px;
  animation: heroPulse 1.7s ease-in-out infinite;
}
.synergy-popup-heroes img:nth-child(2) {
  animation-delay: 0.15s;
}
.synergy-popup-heroes i {
  font-style: normal;
  font-size: 22px;
  color: var(--gold);
}
.synergy-popup > strong,
.synergy-popup > b,
.synergy-popup > small {
  position: relative;
  display: block;
}
.composition-popup {
  width: min(500px, calc(100vw - 36px));
  border-color: rgba(38, 210, 204, 0.58);
  background: linear-gradient(145deg, rgba(5, 39, 51, 0.97), rgba(3, 12, 23, 0.98));
  box-shadow:
    0 35px 120px rgba(0, 0, 0, 0.76),
    0 0 85px rgba(22, 211, 203, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.1);
}
.composition-popup.red {
  border-color: rgba(232, 64, 87, 0.62);
  background: linear-gradient(145deg, rgba(51, 13, 35, 0.97), rgba(3, 12, 23, 0.98));
  box-shadow:
    0 35px 120px rgba(0, 0, 0, 0.76),
    0 0 85px rgba(232, 64, 87, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.1);
}
.composition-popup-heroes {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 18px 0 15px;
}
.composition-popup-heroes img,
.composition-popup-heroes > span {
  width: 52px;
  height: 52px;
  object-fit: cover;
  display: grid;
  place-items: center;
  border: 1px solid rgba(77, 220, 213, 0.6);
  border-radius: 15px;
  background: #081622;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.45);
  animation: compositionHeroEnter 0.65s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.composition-popup.red .composition-popup-heroes img {
  border-color: rgba(232, 64, 87, 0.58);
}
.composition-popup-heroes > :nth-child(2) { animation-delay: 0.07s; }
.composition-popup-heroes > :nth-child(3) { animation-delay: 0.14s; }
.composition-popup-heroes > :nth-child(4) { animation-delay: 0.21s; }
.composition-popup-heroes > :nth-child(5) { animation-delay: 0.28s; }
.composition-popup-labels {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.composition-popup-labels b {
  padding: 6px 11px;
  border: 1px solid rgba(217, 184, 108, 0.42);
  border-radius: 999px;
  background: rgba(217, 184, 108, 0.1);
  color: #f0d98f;
  font-size: 11px;
  animation: flowLabelPop 0.5s 0.25s cubic-bezier(0.2, 1.2, 0.2, 1) both;
}
@keyframes compositionHeroEnter {
  from { opacity: 0; transform: translateY(18px) scale(0.72) rotate(-8deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes flowLabelPop {
  from { opacity: 0; transform: scale(0.55); }
  to { opacity: 1; transform: scale(1); }
}
.synergy-popup > strong {
  font-size: 19px;
  color: #f0e6d2;
}
.synergy-popup > b {
  margin-top: 8px;
  color: #43d8c9;
  font-size: 13px;
}
.synergy-popup > small {
  margin-top: 7px;
  color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.save-match {
  position: relative;
  background: linear-gradient(135deg, #0ac8b9, #087f83) !important;
  color: #ecffff !important;
  box-shadow:
    0 10px 28px rgba(10, 200, 185, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.24) !important;
}
.save-match:before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  display: inline-block;
  border-radius: 50%;
  background: #cffffa;
  box-shadow: 0 0 11px #fff;
}
.save-match:disabled {
  opacity: 0.45;
  box-shadow: none !important;
}
@keyframes noticeIn {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes noticeOut {
  to {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
}
.save-notice {
  position: fixed;
  z-index: 1100;
  right: 28px;
  top: 28px;
  width: min(390px, calc(100vw - 40px));
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid rgba(63, 216, 190, 0.4);
  border-radius: 19px;
  background: linear-gradient(
    145deg,
    rgba(5, 31, 39, 0.97),
    rgba(3, 15, 24, 0.97)
  );
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px);
  opacity: 0;
}
.save-notice.show {
  animation: noticeIn 0.4s cubic-bezier(0.2, 0.85, 0.2, 1) forwards;
}
.save-notice.leaving {
  animation: noticeOut 0.4s ease forwards;
}
.save-notice > i {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: rgba(10, 200, 185, 0.16);
  color: #5ce8da;
  font-style: normal;
  font-size: 19px;
}
.save-notice strong,
.save-notice span {
  display: block;
}
.save-notice strong {
  font-size: 13px;
  color: #eefdfa;
}
.save-notice span {
  margin-top: 4px;
  color: #91aeb6;
  font-size: 10px;
  line-height: 1.5;
}
.save-notice.error {
  border-color: rgba(232, 64, 87, 0.55);
}
.save-notice.error > i {
  background: rgba(232, 64, 87, 0.16);
  color: #ff8292;
}
.save-notice.warning {
  border-color: rgba(200, 155, 60, 0.55);
}
.save-notice.warning > i {
  background: rgba(200, 155, 60, 0.16);
  color: #e5bf68;
}
.lolesports-dialog {
  width: min(860px, calc(100vw - 32px));
  max-height: 90vh;
}
.lolesports-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: end;
  margin: 20px 0;
}
.lolesports-controls label {
  margin: 0;
}
.lolesports-matches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  max-height: 480px;
  overflow: auto;
  padding: 2px;
}
.lolesports-match {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  text-align: left;
  background: linear-gradient(
    145deg,
    rgba(7, 27, 41, 0.96),
    rgba(3, 14, 24, 0.94)
  );
  color: #e8f2f6;
  border: 1px solid rgba(63, 116, 132, 0.45);
  border-radius: 17px;
  box-shadow: none;
}
.lolesports-match:hover {
  border-color: var(--gold);
}
.lolesports-match span,
.lolesports-match small {
  font-size: 9px;
  color: var(--muted);
}
.lolesports-match strong {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.lolesports-match i {
  font-style: normal;
  color: var(--gold);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(200, 155, 60, 0.1);
}
@media (max-width: 720px) {
  .lolesports-controls,
  .lolesports-matches {
    grid-template-columns: 1fr;
  }
}

/* v0.8.9 · 搜索浮层与简化历史比赛卡片 */
.team {
  overflow: visible;
}
.team-head {
  border-radius: 25px 25px 0 0;
}
.slot {
  position: relative;
  z-index: 1;
}
.slot:focus-within {
  z-index: 220;
  isolation: isolate;
}
.player-select-wrap {
  position: relative;
  min-width: 0;
}
.player-select-wrap .player-select {
  width: 100%;
  padding-right: 34px;
}
.signature-star {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: 7px;
  width: 25px;
  min-height: 25px;
  height: 25px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(240, 205, 104, 0.7);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1a8, #c99a2d 58%, #725012);
  color: #fff5bd;
  font-size: 13px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(72, 42, 0, 0.8);
  box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.08), 0 0 16px rgba(240, 192, 65, 0.42);
  animation: signatureStarPulse 1.8s ease-in-out infinite;
}
.signature-star:hover {
  transform: translateY(-50%) scale(1.13) rotate(8deg);
  border-color: #fff0a4;
  box-shadow: 0 0 24px rgba(255, 208, 75, 0.72);
}
@keyframes signatureStarPulse {
  0%, 100% { filter: brightness(0.96); box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.08), 0 0 13px rgba(240, 192, 65, 0.34); }
  50% { filter: brightness(1.2); box-shadow: 0 0 0 5px rgba(200, 155, 60, 0.05), 0 0 23px rgba(240, 192, 65, 0.64); }
}
.signature-pick-popup {
  border-color: rgba(246, 207, 95, 0.68);
  background: linear-gradient(145deg, rgba(34, 29, 10, 0.97), rgba(3, 15, 24, 0.98));
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.76), 0 0 90px rgba(225, 177, 43, 0.22), inset 0 1px rgba(255, 255, 255, 0.11);
}
.signature-pick-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
}
.signature-pick-visual > img,
.signature-player {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(241, 202, 91, 0.72);
  border-radius: 22px;
  background: #0a1720;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
}
.signature-player > img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.signature-pick-visual > i { color: #ffe580; font-size: 26px; font-style: normal; animation: signatureStarPulse 1.5s ease-in-out infinite; }
.champion-search-wrap {
  z-index: auto;
}
.champion-suggestions {
  z-index: 300;
  top: calc(100% + 8px);
  max-height: 340px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.82),
    0 0 0 1px rgba(99, 178, 199, 0.12);
}
.slot:focus-within .champion-suggestions {
  z-index: 320;
}
.champion-suggestions button {
  min-height: 48px;
}
.lineup-results {
  gap: 10px;
}
.lineup-side-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.lineup-side-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(38, 201, 206, 0.28);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(4, 27, 39, 0.82), rgba(4, 13, 23, 0.9));
}
.lineup-side-panel.red {
  border-color: rgba(232, 64, 87, 0.28);
  background: linear-gradient(145deg, rgba(36, 13, 28, 0.75), rgba(4, 13, 23, 0.9));
}
.lineup-side-panel > header {
  margin-bottom: 12px;
}
.lineup-side-panel > header span {
  color: var(--blue);
  font-size: 8px;
  letter-spacing: 2px;
}
.lineup-side-panel.red > header span { color: var(--red); }
.lineup-side-panel > header h4 {
  margin: 4px 0 2px;
  font-size: 15px;
}
.lineup-side-panel > header small { color: var(--muted); }
.lineup-side-panel .lineup-match {
  grid-template-columns: 58px minmax(0, 1fr);
}
.lineup-side-panel .match-result {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.lineup-side-panel .match-lineup {
  grid-template-columns: repeat(5, minmax(62px, 1fr));
}
.lineup-match {
  grid-template-columns: 82px minmax(0, 1fr) minmax(170px, 220px);
  gap: 16px;
  padding: 14px 16px;
  border-color: rgba(70, 122, 139, 0.34);
  border-radius: 18px;
  background: linear-gradient(
    105deg,
    rgba(8, 25, 38, 0.94),
    rgba(5, 14, 24, 0.94)
  );
  font-size: 11px;
}
.lineup-match:hover {
  border-color: rgba(91, 174, 191, 0.55);
  background: linear-gradient(
    105deg,
    rgba(10, 33, 47, 0.98),
    rgba(6, 18, 29, 0.98)
  );
}
.lineup-match.exact {
  border-color: rgba(217, 184, 108, 0.6);
}
.match-similarity {
  display: grid;
  gap: 3px;
  color: #f1f7fb;
}
.match-similarity b {
  font-size: 14px;
}
.match-similarity small {
  font-size: 9px;
}
.match-main {
  display: grid;
  gap: 9px;
  min-width: 0;
}
.match-teams {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-teams i {
  padding: 0 8px;
  color: #708896;
  font-size: 9px;
  font-style: normal;
}
.match-champions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.match-champions img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 1px solid rgba(117, 164, 180, 0.35);
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.38);
}
.match-result {
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
}
.match-result > b {
  color: #42d392;
  font-size: 13px;
}
.match-result span {
  color: #b8c7d1;
  font-size: 10px;
}
.match-result small {
  font-size: 9px;
}
.match-similarity small {
  color: #6f8b98;
  font-size: 8px;
}
.match-owner {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.match-owner > span {
  color: #7893a0;
  font-size: 8px;
  letter-spacing: 0.7px;
}
.match-owner > strong {
  color: #edf7fb;
  font-size: 13px;
}
.match-owner > i {
  color: #76909c;
  font-size: 9px;
  font-style: normal;
}
.match-lineup {
  display: grid;
  grid-template-columns: repeat(5, minmax(84px, 1fr));
  gap: 6px;
}
.match-lineup > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 7px;
  padding: 6px;
  border: 1px solid rgba(75, 124, 141, 0.25);
  border-radius: 11px;
  background: rgba(4, 16, 26, 0.72);
}
.match-lineup img {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 8px;
}
.match-lineup b,
.match-lineup small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-lineup b {
  font-size: 9px;
}
.match-lineup small {
  color: #7893a0;
  font-size: 8px;
}
.match-lineup > div > span {
  display: none;
}
.match-result em {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(66, 211, 146, 0.12);
  color: #42d392;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.match-result.loss em {
  background: rgba(232, 64, 87, 0.12);
  color: var(--red);
}
.match-result.loss > b {
  color: #f0e6d2;
}
.history-empty {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(82, 124, 140, 0.35);
  border-radius: 18px;
  font-size: 11px;
}
.oracle-result-dialog {
  width: min(760px, calc(100vw - 36px));
}
.oracle-result-summary {
  display: grid;
  gap: 5px;
  margin: 12px 0 16px;
  padding: 16px 18px;
  border: 1px solid rgba(66, 211, 146, 0.3);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(16, 79, 70, 0.2), rgba(4, 20, 29, 0.65));
}
.oracle-result-summary strong {
  color: #63e6ad;
  font-size: 16px;
}
.oracle-result-summary span {
  color: #a8bbc7;
  font-size: 11px;
}
.oracle-result-matches {
  display: grid;
  gap: 9px;
  max-height: min(54vh, 560px);
  overflow: auto;
  padding-right: 5px;
}
.oracle-result-matches article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 13px 15px;
  border: 1px solid rgba(76, 132, 148, 0.3);
  border-radius: 16px;
  background: rgba(5, 19, 29, 0.78);
}
.oracle-result-matches article > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.oracle-result-matches span,
.oracle-result-matches small {
  color: var(--muted);
  font-size: 9px;
}
.oracle-result-matches strong {
  overflow: hidden;
  color: #edf7fb;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oracle-result-matches strong i {
  padding: 0 8px;
  color: var(--gold);
  font-size: 8px;
  font-style: normal;
}
.oracle-score {
  display: grid;
  justify-items: end;
  gap: 3px;
}
.oracle-score b {
  color: #f0d98f;
  font-size: 17px;
}
@media (max-width: 720px) {
  .lineup-side-sections { grid-template-columns: 1fr; }
  .lineup-match {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .match-result {
    grid-column: 1/-1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    text-align: left;
  }
  .match-champions img {
    width: 30px;
    height: 30px;
  }
  .match-lineup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v0.9.0 · 阵容胜率时间曲线 */
.power-curve {
  margin-top: 18px;
  padding: 24px;
  animation: panelIn 0.35s ease both;
}
.curve-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 22px;
}
.curve-chart {
  position: relative;
  min-height: 330px;
  padding: 48px 18px 34px;
  border: 1px solid rgba(73, 135, 153, 0.32);
  border-radius: 22px;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(10, 200, 185, 0.07),
      transparent 42%
    ),
    linear-gradient(180deg, rgba(7, 26, 40, 0.96), rgba(3, 13, 22, 0.94));
  overflow: hidden;
}
.curve-chart:before {
  content: "胜率";
  position: absolute;
  left: 16px;
  top: 17px;
  color: #718d9b;
  font-size: 9px;
  letter-spacing: 1px;
}
.curve-chart svg {
  display: block;
  width: 100%;
  height: 250px;
  overflow: visible;
  background: repeating-linear-gradient(
    to bottom,
    rgba(122, 163, 176, 0.09) 0,
    rgba(122, 163, 176, 0.09) 1px,
    transparent 1px,
    transparent 62.5px
  );
  border-radius: 12px;
}
.curve-half {
  stroke: rgba(240, 230, 210, 0.28);
  stroke-width: 1;
  stroke-dasharray: 8 8;
}
.curve-line {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px currentColor);
}
.curve-line.blue {
  stroke: var(--blue);
  color: var(--blue);
}
.curve-line.red {
  stroke: var(--red);
  color: var(--red);
}
.curve-legend {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 18px;
  display: flex;
  gap: 14px;
  font-size: 10px;
}
.curve-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #a8bbc5;
}
.curve-legend i {
  width: 18px;
  height: 3px;
  border-radius: 9px;
  background: currentColor;
}
.curve-legend .blue {
  color: var(--blue);
}
.curve-legend .red {
  color: var(--red);
}
.curve-markers {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 48px;
  height: 250px;
  pointer-events: none;
}
.curve-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    transparent,
    rgba(200, 155, 60, 0.45),
    transparent
  );
}
.curve-marker i {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #071522;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px currentColor;
}
.curve-marker b {
  position: absolute;
  top: 4px;
  left: 6px;
  color: #d9c486;
  font-size: 9px;
}
.curve-marker.blue {
  color: var(--blue);
}
.curve-marker.red {
  color: var(--red);
}
.curve-axis {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 22px;
  height: 10px;
}
.curve-axis span {
  position: absolute;
  transform: translateX(-50%);
  color: #6f8996;
  font-size: 8px;
}
.curve-summary {
  display: grid;
  gap: 12px;
}
.power-windows {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.power-windows article,
.power-spikes article {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(69, 115, 133, 0.35);
  border-radius: 16px;
  background: rgba(5, 18, 29, 0.78);
  overflow: hidden;
}
.power-windows article:before,
.power-spikes article:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--blue);
}
.power-windows article.red:before,
.power-spikes article.red:before {
  background: var(--red);
}
.power-windows span {
  color: #819aa7;
  font-size: 8px;
}
.power-windows b {
  font-size: 11px;
  white-space: nowrap;
}
.power-windows small,
.power-spikes small {
  color: #839aa6;
  font-size: 8px;
  line-height: 1.5;
}
.power-spikes {
  display: grid;
  gap: 7px;
  max-height: 245px;
  overflow: auto;
}
.power-spikes article {
  grid-template-columns: 1fr auto;
}
.power-spikes article b {
  font-size: 10px;
}
.power-spikes article span {
  color: var(--gold);
  font-size: 9px;
}
.power-spikes article small {
  grid-column: 1/-1;
}
.curve-empty {
  min-height: 210px;
  display: grid;
  place-content: center;
  gap: 7px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(73, 135, 153, 0.32);
  border-radius: 22px;
}
.curve-empty b {
  font-size: 32px;
  color: #426273;
}
.curve-series-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.curve-series-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  text-align: left;
  color: #dceaf2;
  background: linear-gradient(
    145deg,
    rgba(7, 27, 41, 0.96),
    rgba(3, 14, 24, 0.92)
  );
  border: 1px solid #245366;
  border-radius: 20px;
  box-shadow: none;
}
.curve-series-card span {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 1px;
}
.curve-series-card b {
  font-size: 12px;
}
.curve-series-card small {
  color: var(--muted);
  font-size: 9px;
}
@media (max-width: 1050px) {
  .curve-layout {
    grid-template-columns: 1fr;
  }
  .power-spikes {
    max-height: none;
  }
}
@media (max-width: 700px) {
  .curve-series-grid,
  .power-windows {
    grid-template-columns: 1fr;
  }
  .curve-chart {
    padding-left: 10px;
    padding-right: 10px;
  }
  .curve-markers,
  .curve-axis {
    left: 10px;
    right: 10px;
  }
}

/* Final PWA mobile toolbar override. */
@media (max-width: 720px) {
  .toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end;
  }
  .toolbar label,
  .toolbar button {
    width: 100%;
  }
  #save-match,
  #demo,
  #mobile-tools-toggle {
    grid-column: 1 / -1;
  }
  #mobile-tools-toggle {
    display: block;
  }
  #api-settings,
  #pipeline-settings,
  #roster-settings,
  #live-lab,
  #export {
    display: none;
  }
  body.mobile-tools-open #api-settings,
  body.mobile-tools-open #pipeline-settings,
  body.mobile-tools-open #roster-settings,
  body.mobile-tools-open #live-lab,
  body.mobile-tools-open #export {
    display: block;
  }
}
