/* 主公选择：全屏，在 #stage 外，不受 zoom/scale */
#lord-picker-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 220;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(90, 50, 20, 0.4), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, #121a2c 55%, #080c14 100%);
  color: #e8eef8;
  font-family: "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  padding: 16px 16px 20px;
  box-sizing: border-box;
}
#lord-picker-overlay.show {
  display: flex;
}
.lord-picker-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.lord-picker-header h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  color: #f0d78c;
}
.lord-picker-hint {
  font-size: 0.85rem;
  color: #8a97b0;
}
#lord-picker-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
  padding: 4px 2px 12px;
  align-content: start;
  justify-items: center;
  /* thin gold scrollbar (picker scroller only) */
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 140, 55, 0.55) transparent;
}
#lord-picker-grid::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
#lord-picker-grid::-webkit-scrollbar-track {
  background: transparent;
}
#lord-picker-grid::-webkit-scrollbar-thumb {
  background: rgba(168, 128, 48, 0.65);
  border-radius: 4px;
}
#lord-picker-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 162, 39, 0.85);
}
#lord-picker-grid::-webkit-scrollbar-corner {
  background: transparent;
}
.lord-pick-card {
  position: relative;
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  text-align: center;
  color: inherit;
  display: block;
  width: 100%;
  max-width: 168px;
  box-shadow: none;
  transition: filter 0.15s, transform 0.12s;
}
.lord-pick-card:hover {
  border: none;
  outline: none;
  box-shadow: none;
  transform: translateY(-1px);
}
.lord-pick-card:hover .lord-pick-art {
  filter: brightness(1.06);
}
.lord-pick-card.is-on {
  border: none;
  outline: none;
  box-shadow: none;
}
.lord-pick-card.is-on .lord-pick-art {
  filter: brightness(1.14) drop-shadow(0 0 10px rgba(255, 215, 106, 0.85));
  /* oval halo lordoval5: solid ~3px gold ring + wide outer bloom (follows ellipse) */
  box-shadow:
    0 0 0 3px #ffd76a,
    0 0 18px 8px rgba(255, 215, 106, 0.95),
    0 0 28px 14px rgba(240, 215, 140, 0.8),
    0 0 42px 22px rgba(240, 215, 140, 0.4);
}
.lord-pick-card:focus,
.lord-pick-card:focus-visible {
  outline: none;
  box-shadow: none;
}
#lord-picker-overlay .lord-pick-art {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 50%;
  overflow: hidden;
  background: #1a2438;
  display: block;
  border: none;
  outline: none;
  box-shadow: none;
  transition: filter 0.15s, box-shadow 0.15s;
}
/* bottom readability wash + caption over portrait */
.lord-pick-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48%;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(6, 10, 18, 0.55) 42%,
    rgba(4, 8, 14, 0.88) 100%
  );
  pointer-events: none;
  z-index: 1;
}
.lord-pick-name,
.lord-pick-skill,
.lord-pick-text {
  position: absolute;
  left: 10%;
  right: 10%;
  z-index: 2;
  margin: 0;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}
.lord-pick-name {
  bottom: 22%;
  font-weight: 800;
  font-size: 0.95rem;
  color: rgba(240, 215, 140, 0.92);
}
.lord-pick-skill {
  bottom: 10%;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}
.lord-pick-text {
  display: none;
}
.lord-picker-foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(212, 168, 75, 0.2);
}
#lord-picker-confirm {
  cursor: pointer;
  border: 1px solid #7eb0ff;
  border-radius: 8px;
  padding: 10px 22px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(180deg, #3d7cff, #1a4ab0);
}
#lord-picker-confirm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#btn-lord-skill {
  cursor: pointer;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.8rem;
  color: #1a1208;
  background: linear-gradient(180deg, #f0d78c, #c9a227);
  border: 1px solid #f5e6a8;
}
#btn-lord-skill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#btn-lord-skill.active {
  outline: 2px solid #fff4c2;
  box-shadow: 0 0 12px rgba(240, 215, 140, 0.55);
}
#hud-controls .btn-end,
#hud-controls .btn-sac,
#hud-controls #btn-lord-skill {
  white-space: nowrap;
}
