/* Aegis Protocol: Tiny Backyard Heroes — Ant-Scale Cartoon Backyard + Zero-Scroll 13" Laptop Sticker UI */
:root {
  --ink: #1d1b2f;
  --paper: #fffaf0;
  --sun: #ffc93c;
  --hot: #ff5a36;
  --card: #fffdf7;
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

/* Override sticker.css paneled wood floor with our approved ant-scale cartoon backyard! */
body {
  background:
    linear-gradient(180deg, rgba(20, 44, 16, 0.22), rgba(20, 44, 16, 0.36)),
    url('./assets/home_backyard.jpg') center center / cover no-repeat fixed !important;
  background-color: #2f5c20;
}

/* Polish the RTG home screen over the lush cartoon backyard */
.rtg-hero p {
  display: inline-block;
  background: rgba(29, 27, 47, 0.78);
  color: #fffaf0;
  padding: 5px 14px;
  border-radius: 999px;
  border: 2px solid #fffaf0;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.rtg-home {
  padding-top: 14px !important;
  padding-bottom: 18px !important;
  gap: 12px !important;
}

.rtg-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem) !important;
  margin-bottom: 6px !important;
}

.rtg-panel {
  background: rgba(255, 250, 240, 0.96) !important;
}

.rtg-how {
  background: rgba(255, 250, 240, 0.95) !important;
  color: var(--ink) !important;
  border: 3px solid var(--ink) !important;
  border-radius: 16px !important;
  padding: 12px 18px !important;
  box-shadow: 0 4px 0 var(--ink), 0 10px 24px rgba(0, 0, 0, 0.35) !important;
  max-width: 680px !important;
}

.rtg-how h2 {
  color: var(--ink) !important;
  font-size: 1.1rem !important;
  margin-bottom: 6px !important;
}

.rtg-how p {
  margin: 4px 0 !important;
  font-size: 0.88rem !important;
}

/* Lock raid view into 100vh zero-scroll layout for 13" laptops (1366x768 / 1440x900 / 1280x720) */
.aegis-shell {
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 7px 10px 8px;
  max-width: 1460px;
  margin: 0 auto;
}

/* Top Boss & Raid Header Bar */
.aegis-topbar {
  background: rgba(255, 250, 240, 0.96);
  border: 3.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--ink);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.boss-hud {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.boss-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.boss-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phase-pill {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--sun);
  color: var(--ink);
  white-space: nowrap;
}

.boss-name {
  font-family: "Luckiest Guy", "Arial Black", system-ui, sans-serif;
  font-size: 1.02rem;
  letter-spacing: 0.4px;
  color: var(--ink);
}

.boss-hp-text {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
}

.boss-bar-outer {
  position: relative;
  width: 100%;
  height: 14px;
  background: #2b2523;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}

.boss-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #e63946, #ff5a36, #ffb703);
  transition: width 60ms linear;
}

.boss-shield-fill {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  background: rgba(56, 189, 248, 0.82);
  transition: width 60ms linear;
}

.phase-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.5px;
  background: var(--paper);
  opacity: 0.85;
}

.boss-cast-outer {
  position: relative;
  width: 100%;
  height: 19px;
  background: #f3ead8;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.boss-cast-outer.interruptible {
  border-color: #7209b7;
  box-shadow: 0 0 12px rgba(157, 78, 221, 0.7);
}

.boss-cast-outer.danger {
  border-color: #e63946;
  box-shadow: 0 0 10px rgba(255, 90, 54, 0.55);
}

.boss-cast-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(255, 183, 3, 0.58);
  transition: width 50ms linear;
}

.boss-cast-outer.interruptible .boss-cast-fill {
  background: rgba(157, 78, 221, 0.58);
}

.boss-cast-outer.danger .boss-cast-fill {
  background: rgba(255, 90, 54, 0.55);
}

.boss-cast-label {
  position: relative;
  z-index: 2;
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--ink);
}

.boss-cast-time {
  position: relative;
  z-index: 2;
  margin-left: auto;
  font-size: 0.73rem;
  font-weight: 800;
}

/* Main 2-Column Workspace */
.aegis-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 282px 1fr;
  gap: 9px;
}

@media (max-width: 960px) {
  .aegis-main {
    grid-template-columns: 1fr;
  }
  .aegis-sidebar {
    display: none;
  }
}

/* Left Sidebar: Role & Difficulty Dials, Batting Cage Drill, 5x5 Matrix, and Clickable Party Frames */
.aegis-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.side-card {
  background: rgba(255, 250, 240, 0.96);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--ink);
  padding: 6px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-card.grow {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.card-title {
  font-family: "Luckiest Guy", cursive;
  font-size: 0.86rem;
  letter-spacing: 0.4px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dial-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.73rem;
  font-weight: 700;
}

.dial-select {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 5px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  width: 176px;
  max-width: 176px;
}

/* 5x5 Equipment x Skill Matrix Widget */
.matrix-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.axis-pill {
  background: #f3ead8;
  border: 2px solid var(--ink);
  border-radius: 9px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.axis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.69rem;
  font-weight: 800;
}

.pips-row {
  display: flex;
  gap: 3px;
}

.pip {
  flex: 1;
  height: 8px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.pip.filled.equip { background: #ff5a36; }
.pip.filled.skill { background: #2b8aeb; }

.axis-sub {
  font-size: 0.63rem;
  font-weight: 700;
  color: #5c5346;
}

/* Squad Party Frames (Click any teammate to hot-swap roles!) */
.party-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  padding-right: 2px;
}

.party-member {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 9px;
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform 90ms ease, background 90ms ease;
}

.party-member.swappable {
  cursor: pointer;
}

.party-member.swappable:hover {
  background: #eef6ff;
  transform: translateX(2px);
}

.party-member.me {
  background: #fff6c2;
  border-width: 2.5px;
}

.pm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.71rem;
  font-weight: 800;
}

.pm-bar {
  width: 100%;
  height: 6px;
  background: #e2d6c1;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}

.pm-fill {
  height: 100%;
  background: #2fb36d;
}

/* Right Column: 3/4 Perspective Stage + Visible GCD & 4-Move Action Bar */
.aegis-center {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
}

.stage-wrap {
  flex: 1;
  min-height: 0;
  border: 3.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--ink);
  overflow: hidden;
  position: relative;
  background: #3d6b26;
}

#raidCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* Floating Batting Cage Drill Coaching Strip */
.drill-banner {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  background: rgba(255, 250, 240, 0.95);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink), 0 8px 18px rgba(0, 0, 0, 0.32);
  padding: 5px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 24px);
  pointer-events: none;
}

.drill-score-pill {
  font-family: "Luckiest Guy", cursive;
  font-size: 0.92rem;
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
  color: var(--ink);
}

.drill-hint-text {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

/* Dramatic Nintendo Phase Transition Comic Banner */
.phase-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  background: linear-gradient(135deg, #ffc93c, #ff7b29);
  border: 4px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 0 0 4px #fffaf0, 0 8px 0 var(--ink), 0 18px 34px rgba(0, 0, 0, 0.45);
  padding: 12px 26px;
  text-align: center;
  pointer-events: none;
  animation: phaseSlam 260ms cubic-bezier(0.22, 1.4, 0.36, 1);
}

.phase-banner-title {
  font-family: "Luckiest Guy", cursive;
  font-size: 1.7rem;
  letter-spacing: 0.6px;
  color: #fffaf0;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ink);
  line-height: 1.05;
}

.phase-banner-sub {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
  background: #fffaf0;
  border: 2px solid var(--ink);
  border-radius: 999px;
  display: inline-block;
  padding: 2px 12px;
  margin-top: 5px;
}

@keyframes phaseSlam {
  0% { transform: translate(-50%, -50%) scale(0.55) rotate(-4deg); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}

/* Bottom Action & Visible Cooldown Bar */
.action-hud {
  background: rgba(255, 250, 240, 0.96);
  border: 3.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--ink);
  padding: 6px 12px 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.gcd-strip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gcd-meter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 340px;
}

.gcd-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.gcd-track {
  flex: 1;
  height: 10px;
  background: #e2d6c1;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}

.gcd-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #ffc93c);
}

.ping-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ping-btn {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  white-space: nowrap;
}

.ping-btn.active {
  background: var(--sun);
}

.ping-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--ink);
}

.moves-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.move-btn {
  position: relative;
  overflow: visible;
  font-family: inherit;
  text-align: left;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--ink);
  padding: 5px 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 52px;
  transition: transform 90ms ease, box-shadow 90ms ease;
}

.move-btn:active:not(.locked) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

.move-btn.locked {
  background: #e6dccb;
  opacity: 0.68;
  cursor: not-allowed;
}

.move-btn.ko-locked {
  background: #d8d4ce;
  border-color: #6b6660;
  opacity: 0.54;
  filter: grayscale(0.85);
  cursor: not-allowed;
  box-shadow: 0 1px 0 #6b6660;
}

.gcd-label.ko {
  color: #b91c1c;
}

.move-btn.off-gcd {
  border-color: #7209b7;
}

/* Impossible-to-miss Smart Action Prompts! */
.move-prompt-badge {
  display: none;
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  font-family: "Luckiest Guy", cursive;
  font-size: 0.72rem;
  letter-spacing: 0.4px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  box-shadow: 0 2px 0 var(--ink);
  white-space: nowrap;
}

.move-btn.prompt-block {
  background: #fff7cc;
  border-color: #ff9f1c;
  box-shadow: 0 0 0 3px #ffc93c, 0 0 18px rgba(255, 183, 3, 0.85), 0 3px 0 var(--ink);
  animation: promptPulse 0.55s ease-in-out infinite alternate;
}
.move-btn.prompt-block .move-prompt-badge {
  display: inline-block;
  background: #ffc93c;
  color: var(--ink);
}

.move-btn.prompt-interrupt {
  background: #f5e6ff;
  border-color: #7209b7;
  box-shadow: 0 0 0 3px #c77dff, 0 0 18px rgba(157, 78, 221, 0.9), 0 3px 0 var(--ink);
  animation: promptPulse 0.48s ease-in-out infinite alternate;
}
.move-btn.prompt-interrupt .move-prompt-badge {
  display: inline-block;
  background: #9d4edd;
  color: #fffaf0;
}

.move-btn.prompt-heal {
  background: #e6ffef;
  border-color: #197342;
  box-shadow: 0 0 0 3px #2fb36d, 0 0 16px rgba(47, 179, 109, 0.85), 0 3px 0 var(--ink);
  animation: promptPulse 0.55s ease-in-out infinite alternate;
}
.move-btn.prompt-heal .move-prompt-badge {
  display: inline-block;
  background: #2fb36d;
  color: #fffaf0;
}

.move-btn.prompt-smash {
  background: #fff0e6;
  border-color: #e63946;
  box-shadow: 0 0 0 3px #ff5a36, 0 0 16px rgba(255, 90, 54, 0.85), 0 3px 0 var(--ink);
  animation: promptPulse 0.55s ease-in-out infinite alternate;
}
.move-btn.prompt-smash .move-prompt-badge {
  display: inline-block;
  background: #ff5a36;
  color: #fffaf0;
}

@keyframes promptPulse {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-2px) scale(1.025); }
}

.move-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  position: relative;
  z-index: 3;
}

.move-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.move-tag {
  font-size: 0.63rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--sun);
}

.move-tag.off {
  background: #e0aaff;
}

.move-name {
  font-family: "Luckiest Guy", cursive;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  color: var(--ink);
  position: relative;
  z-index: 3;
}

.move-desc {
  font-size: 0.66rem;
  font-weight: 700;
  color: #5c5346;
  position: relative;
  z-index: 3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Visible GCD Sweep & Cooldown Countdown Overlays on Move Buttons */
.move-gcd-sweep {
  position: absolute;
  inset: auto 0 0 0;
  height: 0%;
  border-radius: 0 0 9px 9px;
  background: rgba(56, 189, 248, 0.35);
  pointer-events: none;
  z-index: 1;
}

.move-cd-overlay {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: rgba(29, 27, 47, 0.78);
  color: #fffaf0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "Luckiest Guy", cursive;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  z-index: 4;
  pointer-events: none;
}

/* Post-Raid / Drill Complete 5x5 Modal Overlay */
.raid-modal {
  position: absolute;
  inset: 16px;
  background: rgba(255, 250, 240, 0.96);
  border: 4px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 8px 0 var(--ink), 0 16px 32px rgba(0, 0, 0, 0.35);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  gap: 12px;
}

/* Interactive Garden Horde Warm-Up Banner & GO Button */
.drill-banner.interactive {
  pointer-events: auto;
  padding: 6px 12px 6px 14px;
}

.horde-go-btn {
  pointer-events: auto;
  font-family: "Luckiest Guy", cursive;
  font-size: 0.96rem;
  letter-spacing: 0.5px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffe066 0%, #ffb703 100%);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 5px 16px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--ink), 0 0 14px rgba(255, 195, 0, 0.72);
  transition: transform 90ms ease, box-shadow 90ms ease;
  animation: hordePulse 0.9s ease-in-out infinite alternate;
}

.horde-go-btn:hover {
  transform: translateY(-1px) scale(1.03);
}

.horde-go-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

@keyframes hordePulse {
  from { box-shadow: 0 3px 0 var(--ink), 0 0 10px rgba(255, 195, 0, 0.55); }
  to { box-shadow: 0 3px 0 var(--ink), 0 0 22px rgba(255, 120, 40, 0.9); }
}

.horde-wait-pill {
  font-size: 0.76rem;
  font-weight: 800;
  background: #eef6ff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--ink);
  white-space: nowrap;
}

/* Garden Horde Up-Front 5-Bug Hero Picker Modal (fits cleanly in 1366x768 with zero scrollbars) */
.bug-picker-modal {
  inset: 10px;
  padding: 12px 14px;
  gap: 9px;
  background: rgba(255, 250, 240, 0.96);
}

.bug-picker-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.bug-picker-title {
  font-family: "Luckiest Guy", cursive;
  font-size: 1.55rem;
  letter-spacing: 0.6px;
  margin: 0;
  color: var(--ink);
  line-height: 1.08;
}

.bug-picker-sub {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #5c5346;
}

.bug-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  max-width: 980px;
  align-items: stretch;
}

.bug-card {
  font-family: inherit;
  background: #ffffff;
  border: 3px solid var(--ink);
  border-radius: 15px;
  box-shadow: 0 4px 0 var(--ink);
  padding: 8px 8px 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  transition: transform 110ms ease, box-shadow 110ms ease, background 110ms ease;
}

.bug-card:hover {
  transform: translateY(-4px);
  background: #fffdf0;
  box-shadow: 0 8px 0 var(--ink), 0 0 0 3px var(--sun);
}

.bug-card:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--ink);
}

.bug-card-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.bug-arch-pill {
  font-size: 0.63rem;
  font-weight: 800;
  background: #eef6ff;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 1px 6px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bug-hp-pill {
  font-size: 0.64rem;
  font-weight: 800;
  color: #b91c1c;
  white-space: nowrap;
}

.bug-sprite-wrap {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 70%, rgba(255, 224, 102, 0.35), transparent 72%);
  border-radius: 50%;
}

.bug-sprite-img {
  max-width: 78px;
  max-height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(29, 27, 47, 0.25));
}

.bug-card-name {
  font-family: "Luckiest Guy", cursive;
  font-size: 0.96rem;
  letter-spacing: 0.3px;
  color: var(--ink);
  line-height: 1.05;
}

.bug-moves-box {
  width: 100%;
  background: #f7f0e2;
  border: 2px solid var(--ink);
  border-radius: 9px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.bug-move-line {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-key {
  flex-shrink: 0;
  font-size: 0.59rem;
  font-weight: 800;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  padding: 1px 4px;
}

.bm-key.e {
  background: #7209b7;
}

.bug-mates-row {
  min-height: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
}

.bug-mate-chip {
  font-size: 0.63rem;
  font-weight: 800;
  background: #8ce9b8;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 1px 6px;
  color: var(--ink);
}

.bug-mate-open {
  font-size: 0.63rem;
  font-weight: 700;
  color: #8a7f6d;
}

.bug-pick-cta {
  margin-top: auto;
  width: 100%;
  font-family: "Luckiest Guy", cursive;
  font-size: 0.84rem;
  letter-spacing: 0.4px;
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 9px;
  padding: 4px 6px;
  color: var(--ink);
  box-shadow: 0 2px 0 var(--ink);
}

.bug-card:hover .bug-pick-cta {
  background: #8ce9b8;
}

/* Garden Horde Wipe Leaderboard Modal */
.horde-stats-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.horde-leaderboard {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 3px 0 var(--ink);
}

.hlb-head,
.hlb-row {
  display: grid;
  grid-template-columns: 1.3fr 1.3fr 0.9fr 0.9fr;
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  text-align: left;
  align-items: center;
}

.hlb-head {
  background: var(--ink);
  color: #fffaf0;
  font-size: 0.68rem;
  letter-spacing: 0.4px;
}

.hlb-row {
  border-top: 1.5px solid #e2d6c1;
  color: var(--ink);
}

.hlb-row.me {
  background: #fff6c2;
}

/* Compact 2-column squad roster for 9-20 player Hordes & injured/critical healer highlights */
.party-list.compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
}

.party-list.compact .party-member {
  padding: 2px 5px;
}

.party-list.compact .pm-top {
  font-size: 0.65rem;
}

.pm-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.party-member.injured {
  background: #fffbeb;
  border-color: #f59e0b;
  box-shadow: 0 0 0 1.5px rgba(245, 158, 11, 0.32);
}

.party-member.critical {
  background: #ffe0e3;
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.45);
  animation: critCardPulse 0.65s ease-in-out infinite alternate;
}

.party-member.ko {
  opacity: 0.52;
  filter: grayscale(0.8);
}

.party-member.shouting {
  background: #fff3bf;
  border-color: #e63946;
  box-shadow: 0 0 0 2.5px rgba(255, 59, 48, 0.65);
  animation: critCardPulse 0.48s ease-in-out infinite alternate;
}

.ping-btn.help-shout {
  background: #ffe066;
  border-color: #d62828;
  color: #1d1b2f;
}
.ping-btn.help-shout:hover {
  background: #ffd43b;
}

@keyframes critCardPulse {
  from { background: #ffe4e6; box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35); }
  to { background: #fecdd3; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.72); }
}

.horde-leaderboard {
  max-height: 220px;
  overflow-y: auto;
}

/* 5:00 Lawn Sprinkler Shift Countdown Pill */
.sprinkler-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Luckiest Guy", cursive;
  font-size: 0.88rem;
  letter-spacing: 0.4px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  background: #caf0f8;
  color: #023e8a;
  box-shadow: 0 2px 0 var(--ink);
  white-space: nowrap;
}
.sprinkler-pill.paused {
  background: #e9f5f9;
  color: #4a6b7c;
}
.sprinkler-pill.warn {
  background: #ffe066;
  color: var(--ink);
}
.sprinkler-pill.urgent {
  background: #ff5a36;
  color: #fffaf0;
  animation: sprinklerPulse 0.48s ease-in-out infinite alternate;
}
.sprinkler-pill.on {
  background: #00b4d8;
  color: #ffffff;
}
@keyframes sprinklerPulse {
  from { transform: scale(1); box-shadow: 0 2px 0 var(--ink); }
  to { transform: scale(1.07); box-shadow: 0 2px 0 var(--ink), 0 0 14px rgba(255, 90, 54, 0.85); }
}

/* AI Teammates Checkbox Bar inside Garden Horde 5-Bug Picker */
.ai-bots-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  max-width: 980px;
  background: #eef6ff;
  border: 2.5px solid var(--ink);
  border-radius: 13px;
  padding: 6px 12px;
  box-shadow: 0 3px 0 var(--ink);
}
.ai-bots-label {
  font-family: "Luckiest Guy", cursive;
  font-size: 0.84rem;
  letter-spacing: 0.4px;
  color: var(--ink);
  white-space: nowrap;
}
.ai-bots-checks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.ai-bot-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  transition: transform 80ms ease, background 80ms ease;
}
.ai-bot-check:hover:not(.disabled) {
  transform: translateY(-1px);
  background: #fff9db;
}
.ai-bot-check.checked {
  background: #8ce9b8;
  box-shadow: 0 2px 0 var(--ink);
}
.ai-bot-check.disabled {
  opacity: 0.65;
  cursor: default;
}
.ai-bot-check input {
  margin: 0;
  accent-color: #197342;
  cursor: inherit;
}
.ai-bots-mult {
  display: inline-flex;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
}
.ai-mult-btn {
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  border: none;
  background: transparent;
  color: var(--ink);
  padding: 3px 8px;
  cursor: pointer;
}
.ai-mult-btn.active {
  background: var(--sun);
}
.ai-mult-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.ai-bots-count {
  font-size: 0.74rem;
  font-weight: 900;
  background: var(--ink);
  color: #fffaf0;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.bug-mate-chip.ai {
  background: #caf0f8;
  color: #023e8a;
  border-color: #0077b6;
}
