/* ===== PVZ EXPEDITION: COMMERCIAL STREET-TECH TOWER DEFENSE UI ===== */
#screen-pvz {
  --pvz-bg: #0b0e14;
  --pvz-panel: #131823;
  --pvz-card: #1a2232;
  --pvz-lime: #c8ff00;
  --pvz-cyan: #00f5d4;
  --pvz-orange: #ff4d00;
  --pvz-gold: #ffd84d;
  --pvz-border: #2c384e;
  color: #f2f6ff;
}

.pvz-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  background: radial-gradient(circle at 12% 0%, rgba(200, 255, 0, 0.08), transparent 40%),
              radial-gradient(circle at 90% 100%, rgba(0, 245, 212, 0.08), transparent 40%),
              var(--pvz-bg);
  border: 2px solid var(--pvz-border);
  border-radius: 14px;
  padding: clamp(10px, 1.8vw, 18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

/* Override any global pill/oval button defaults inside PvZ */
#screen-pvz button {
  font: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
#screen-pvz button:active:not(:disabled) { transform: scale(0.96); }
#screen-pvz button:disabled { opacity: 0.45; cursor: not-allowed; }

.pvz-primary {
  min-height: 46px;
  padding: 10px 26px;
  background: linear-gradient(135deg, #d7ff2f, #a6e600);
  color: #0e130b;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.03em;
  border: 2px solid #0e130b;
  box-shadow: 0 6px 20px rgba(200, 255, 0, 0.3);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.pvz-primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }

.pvz-secondary {
  min-height: 44px;
  padding: 8px 18px;
  background: #1c2434;
  color: #d6e2f5;
  font-weight: 800;
  border: 1.5px solid #394866;
}
.pvz-secondary:hover:not(:disabled) { border-color: var(--pvz-cyan); color: #fff; }

/* ===== TOP PVZ SEED BANK BAR ===== */
#pvz-hud {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #1b2436 0%, #111722 100%);
  border: 2px solid #354563;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 20px rgba(0,0,0,0.45);
}

.pvz-bank-stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-width: 96px;
  padding: 6px 10px;
  background: #0b1019;
  border: 2px solid #415575;
  border-radius: 9px;
}
.pvz-crystal-readout {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.35rem;
  font-weight: 950;
  color: var(--pvz-lime);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(200, 255, 0, 0.45);
}
.pvz-crystal-readout img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(200, 255, 0, 0.7));
}
.pvz-base-pips {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #9bb0cc;
}
.pvz-pip {
  width: 12px;
  height: 8px;
  border-radius: 2px;
  background: #273245;
  border: 1px solid #455675;
}
.pvz-pip.on {
  background: var(--pvz-cyan);
  border-color: #a8fff4;
  box-shadow: 0 0 8px rgba(0, 245, 212, 0.65);
}

/* Real Seed Bank Cards (NO GRAY OVALS!) */
.pvz-cards {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.pvz-seed-card {
  position: relative;
  flex: 1;
  min-width: 78px;
  max-width: 142px;
  height: 76px;
  padding: 4px 6px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #25334a 0%, #161f2e 100%);
  border: 2px solid #475d80;
  border-radius: 8px;
  overflow: hidden;
  color: #f4f8ff;
}
.pvz-seed-card img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.7));
  pointer-events: none;
}
.pvz-seed-card .pvz-card-name {
  position: absolute;
  top: 3px;
  left: 5px;
  font-size: 0.68rem;
  font-weight: 900;
  color: #dbe7fa;
  text-shadow: 0 1px 3px #000;
}
.pvz-seed-card .pvz-card-cost {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 19px;
  line-height: 19px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 900;
  background: rgba(9, 13, 21, 0.92);
  color: var(--pvz-lime);
  border-top: 1px solid rgba(255,255,255,0.12);
  font-variant-numeric: tabular-nums;
}
.pvz-seed-card .pvz-card-cost.free {
  background: linear-gradient(90deg, #ff7a00, #ff4d00);
  color: #fff;
}
.pvz-seed-card .pvz-cd-mask {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--cd, 0%);
  background: rgba(6, 10, 18, 0.74);
  pointer-events: none;
  transition: height 0.12s linear;
}
.pvz-seed-card[aria-pressed='true'] {
  border-color: var(--pvz-lime);
  box-shadow: 0 0 0 2px rgba(200, 255, 0, 0.35), 0 0 18px rgba(200, 255, 0, 0.4);
  transform: translateY(-2px);
}
.pvz-seed-card:hover:not(:disabled) { border-color: #8eb3e6; }

/* Real Tactical Shovel Socket */
.pvz-shovel-btn {
  width: 72px;
  height: 76px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(180deg, #2b2320 0%, #191518 100%);
  border: 2px solid #6b4e3d;
  border-radius: 9px;
  color: #ffd7b5;
  font-size: 0.68rem;
  font-weight: 900;
}
.pvz-shovel-btn img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.8));
}
.pvz-shovel-btn[aria-pressed='true'] {
  border-color: var(--pvz-orange);
  background: linear-gradient(180deg, #522314 0%, #2a130c 100%);
  box-shadow: 0 0 18px rgba(255, 77, 0, 0.55);
  color: #fff;
}

/* ===== BATTLEFIELD STAGE (NO EXCEL GRID BORDERS!) ===== */
#pvz-board:not([hidden]) {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 2px solid #2e3e58;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
#pvz-board.pvz-compact:not([hidden]) {
  aspect-ratio: 500 / 480;
}
#pvz-stage, #pvz-drops { position: absolute; inset: 0; }
#pvz-stage canvas { position: absolute; inset: 0; display: block; width: 100% !important; height: 100% !important; margin: 0 !important; }

/* Grid aligned 1:1 to 4x9 painted checkerboard tiles on all 3 maps */
#pvz-grid {
  position: absolute;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--lanes), 1fr);
}
/* COMPLETELY INVISIBLE BY DEFAULT - GROUNDED LANDING HALO ON HOVER (NO HARSH BOX!) */
#screen-pvz #pvz-grid button {
  min-height: 0;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}
#screen-pvz #pvz-grid[data-placing='true'] button:hover,
#screen-pvz #pvz-grid button:focus-visible {
  background: radial-gradient(ellipse 75% 32% at 50% 88%, rgba(200, 255, 0, 0.28), rgba(200, 255, 0, 0.04) 72%, transparent 100%);
  box-shadow: none;
}
#screen-pvz #pvz-grid[data-placing='true'] button:hover::before {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 6%;
  height: 18%;
  border-radius: 999px;
  border: 2px solid rgba(200, 255, 0, 0.85);
  background: rgba(200, 255, 0, 0.14);
  box-shadow: 0 0 12px rgba(200, 255, 0, 0.45);
  pointer-events: none;
}
#screen-pvz #pvz-grid[data-shovel='true'] button:hover {
  background: radial-gradient(ellipse 78% 36% at 50% 86%, rgba(255, 77, 0, 0.32), transparent 85%);
  box-shadow: none;
}
#screen-pvz #pvz-grid[data-shovel='true'] button:hover::before {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 6%;
  height: 18%;
  border-radius: 999px;
  border: 2px solid rgba(255, 77, 0, 0.9);
  background: rgba(255, 77, 0, 0.16);
  pointer-events: none;
}

/* ===== REAL IMAGE DROPS (CRYSTALS, CHICKEN FEET, PARACHUTE AIRDROPS, TROPHY) ===== */
#pvz-drops { z-index: 4; pointer-events: none; }

@keyframes pvzFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0) scale(1); }
  50% { transform: translate(-50%, -50%) translateY(-7px) scale(1.06); }
}
@keyframes pvzSway {
  0%, 100% { transform: translate(-50%, -50%) rotate(-5deg) translateY(0); }
  50% { transform: translate(-50%, -50%) rotate(5deg) translateY(-6px); }
}

#screen-pvz .pvz-drop {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: 0;
  background: transparent;
  animation: pvzFloat 1.5s ease-in-out infinite;
}
#screen-pvz .pvz-drop img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(200, 255, 0, 0.75)) drop-shadow(0 4px 6px rgba(0,0,0,0.75));
}
#screen-pvz .pvz-drop-buff img {
  width: 62px;
  height: 62px;
  filter: drop-shadow(0 0 14px rgba(255, 168, 0, 0.85)) drop-shadow(0 4px 6px rgba(0,0,0,0.8));
}
#screen-pvz .pvz-drop-hero,
#screen-pvz .pvz-drop-weapon {
  animation: pvzSway 2.1s ease-in-out infinite;
}
#screen-pvz .pvz-drop-hero img,
#screen-pvz .pvz-drop-weapon img {
  width: 68px;
  height: 68px;
  filter: drop-shadow(0 0 14px rgba(0, 245, 212, 0.85)) drop-shadow(0 5px 8px rgba(0,0,0,0.8));
}
#screen-pvz .pvz-drop-tag {
  margin-top: -6px;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(11, 15, 24, 0.92);
  border: 1px solid var(--pvz-lime);
  color: var(--pvz-lime);
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.7);
}
#screen-pvz .pvz-drop-hero .pvz-drop-tag,
#screen-pvz .pvz-drop-weapon .pvz-drop-tag {
  border-color: var(--pvz-cyan);
  color: var(--pvz-cyan);
}
#screen-pvz .pvz-drop-buff .pvz-drop-tag {
  border-color: var(--pvz-gold);
  color: var(--pvz-gold);
}

/* Victory Trophy Drop */
#screen-pvz .pvz-trophy {
  position: absolute;
  left: 50%;
  top: 48%;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border: 2px solid var(--pvz-gold);
  border-radius: 14px;
  background: radial-gradient(circle, rgba(255, 216, 77, 0.32), rgba(14, 18, 28, 0.92));
  box-shadow: 0 0 36px rgba(255, 216, 77, 0.75);
  color: #fff3b0;
  animation: pvzFloat 1.1s ease-in-out infinite;
}
.pvz-trophy img { width: 84px; height: 84px; object-fit: contain; }

/* Wave Banner & Red Flag Bar */
#pvz-banner {
  position: absolute;
  z-index: 5;
  inset: 38% 0 auto;
  text-align: center;
  color: #ff3b4e;
  text-shadow: 0 3px 0 #111, 0 0 18px rgba(0, 0, 0, 0.95), 0 0 28px rgba(255, 59, 78, 0.65);
  font-size: clamp(22px, 4.2vw, 44px);
  font-weight: 950;
  letter-spacing: 0.04em;
  pointer-events: none;
}

#pvz-flags {
  position: absolute;
  z-index: 3;
  bottom: 12px;
  right: 16px;
  width: min(260px, 42%);
  height: 12px;
  border: 2px solid #0e131d;
  border-radius: 999px;
  background: linear-gradient(90deg, #b8ff1a var(--progress), #1c2638 var(--progress));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 4px 12px rgba(0,0,0,0.7);
  pointer-events: none;
}
#pvz-flags span {
  position: absolute;
  bottom: 2px;
  transform: translateX(-50%);
  color: #ff4252;
  font-size: 20px;
  text-shadow: 0 2px 4px #000;
}

/* ===== BOTTOM TACTICAL DOCK (SNIPER CHARGE + SKILL/UPGRADE + INLINE QUIZ) ===== */
#pvz-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 8px 12px;
  background: #121824;
  border: 1.5px solid #2b3850;
  border-radius: 10px;
}
.pvz-charge-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--pvz-gold);
}
.pvz-charge-pips { display: flex; gap: 5px; }
.pvz-charge-pip {
  width: 24px;
  height: 10px;
  background: #232d40;
  border: 1px solid #455675;
  transform: skewX(-16deg);
}
.pvz-charge-pip.lit {
  background: linear-gradient(90deg, #ffd84d, #ff8800);
  border-color: #fff2a8;
  box-shadow: 0 0 10px rgba(255, 216, 77, 0.7);
}
.pvz-unit-actions { display: flex; gap: 8px; align-items: center; }
.pvz-action-btn {
  padding: 7px 14px;
  background: linear-gradient(135deg, #22324d, #172236);
  border: 1.5px solid var(--pvz-cyan);
  color: #d8fffa;
  font-size: 0.84rem;
  font-weight: 900;
}
.pvz-action-btn:hover:not(:disabled) { background: #264066; box-shadow: 0 0 12px rgba(0, 245, 212, 0.35); }

/* Compact Floating Quiz Strip */
.pvz-quiz {
  flex: 1 1 100%;
  padding: 10px 12px;
  background: linear-gradient(135deg, #182336, #101724);
  border: 2px solid var(--pvz-lime);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.pvz-quiz-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.pvz-quiz-word {
  font-size: 1.25rem;
  font-weight: 950;
  color: #fff;
}
.pvz-quiz-speak {
  padding: 3px 9px;
  background: #24344f;
  border: 1px solid #4f6a94;
  color: #d7e7ff;
  font-size: 0.78rem;
  font-weight: 800;
}
.pvz-seconds {
  margin-left: auto;
  font-size: 1rem;
  font-weight: 950;
  color: var(--pvz-lime);
  font-variant-numeric: tabular-nums;
}
.pvz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.pvz-options button {
  min-height: 44px;
  padding: 8px 12px;
  text-align: left;
  background: #1f2b40;
  border: 1.5px solid #3c5070;
  color: #eef4ff;
  font-weight: 800;
}
.pvz-options button:hover { border-color: var(--pvz-lime); background: #283854; }

/* ===== PRE-BATTLE SCOUT & DECK SELECTION ===== */
.pvz-scout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 10px;
}
.pvz-scout-head h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 950;
  color: var(--pvz-lime);
}
.pvz-lineup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.pvz-lineup figure {
  margin: 0;
  padding: 10px;
  background: linear-gradient(180deg, #1b2436, #121824);
  border: 1.5px solid #31415e;
  border-top: 3px solid var(--pvz-orange);
  border-radius: 10px;
  text-align: center;
}
.pvz-lineup img {
  width: 100%;
  height: 112px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
}
.pvz-lineup figcaption { font-size: 0.9rem; font-weight: 900; margin-top: 4px; color: #fff; }
.pvz-lineup small { display: block; font-size: 0.76rem; color: #9db2cf; margin-top: 2px; }

.pvz-loadout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.pvz-pick-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
  background: linear-gradient(180deg, #1d273a, #141b29);
  border: 2px solid #344563;
  color: #edf3ff;
}
.pvz-pick-card img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6));
}
.pvz-pick-card .pvz-pick-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pvz-pick-card strong { font-size: 0.92rem; font-weight: 900; }
.pvz-pick-card small { font-size: 0.74rem; color: #9cb0cc; line-height: 1.25; }
.pvz-pick-card[aria-pressed='true'] {
  border-color: var(--pvz-lime);
  background: linear-gradient(180deg, #253624, #152118);
  box-shadow: 0 0 14px rgba(200, 255, 0, 0.25);
}

.pvz-scout-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid #26334a;
}
.pvz-scout-tip { margin: 0; font-size: 0.84rem; color: #9fb4d1; }

/* ===== COMMERCIAL ZZZ-STYLE SETTLEMENT MODAL (NO UGLY GRAY OVALS!) ===== */
.pvz-result-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 18px;
  background: linear-gradient(135deg, #161f30 0%, #0e1420 100%);
  border: 2px solid #384c6e;
  border-radius: 14px;
  margin-top: 8px;
}
.pvz-result-card.won { border-color: var(--pvz-lime); }
.pvz-result-card.lost { border-color: var(--pvz-orange); }

.pvz-result-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 60%, rgba(200, 255, 0, 0.16), transparent 70%), #0d121d;
  border: 1.5px solid #2a3852;
  border-radius: 10px;
  padding: 12px;
}
.pvz-result-hero img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.75));
}
.pvz-result-badge {
  margin-top: 8px;
  padding: 4px 14px;
  font-size: 0.85rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  border-radius: 4px;
  background: var(--pvz-lime);
  color: #10150c;
  transform: skewX(-10deg);
}
.pvz-result-card.lost .pvz-result-badge {
  background: var(--pvz-orange);
  color: #fff;
}

.pvz-result-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.pvz-result-title {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 950;
  color: #fff;
}
.pvz-unlock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(255, 216, 77, 0.18), rgba(255, 216, 77, 0.04));
  border: 1.5px solid var(--pvz-gold);
  border-radius: 10px;
}
.pvz-unlock img { width: 54px; height: 54px; object-fit: contain; }
.pvz-unlock strong { display: block; color: var(--pvz-gold); font-size: 1rem; }
.pvz-unlock span { font-size: 0.82rem; color: #dbe6f7; }

.pvz-recap-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 900;
  color: #8fa6c7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pvz-recap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}
.pvz-word-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  background: #131c2b;
  border: 1.5px solid #2b3a54;
  border-left: 3px solid var(--pvz-lime);
  border-radius: 8px;
}
.pvz-word-tile.miss { border-left-color: var(--pvz-orange); }
.pvz-word-info { min-width: 0; }
.pvz-word-info strong { display: block; font-size: 0.96rem; color: #fff; overflow-wrap: anywhere; }
.pvz-word-info span { display: block; font-size: 0.78rem; color: #a9bdd9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pvz-word-info small { font-size: 0.68rem; font-weight: 800; color: var(--pvz-lime); }
.pvz-word-tile.miss .pvz-word-info small { color: #ff8661; }

.pvz-speak-mini {
  flex: 0 0 auto;
  min-width: 44px;
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #22304a;
  border: 1px solid #445a80;
  border-radius: 8px;
  color: #dbeaff;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--m6-font);
}
.pvz-speak-mini:hover { border-color: var(--pvz-lime); color: var(--pvz-lime); }

.pvz-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
}

#pvz-status {
  margin: 6px 0 0;
  min-height: 18px;
  font-size: 0.82rem;
  color: #ffb86c;
  font-weight: 700;
}

@media (max-width: 720px) {
  .pvz-result-card { grid-template-columns: 1fr; }
  .pvz-result-hero img { max-height: 140px; }
  .pvz-seed-card { height: 68px; min-width: 62px; }
  .pvz-seed-card img { width: 38px; height: 38px; }
  .pvz-shovel-btn { width: 58px; height: 68px; }
  .pvz-bank-stats { min-width: 76px; padding: 4px 6px; }
  .pvz-crystal-readout { font-size: 1.05rem; }
}

/* Non-overlapping vocab surge badge & weapon loadout bar */
.pvz-drop-surge {
  animation: none;
  z-index: 18;
}

.pvz-drop-surge .pvz-drop-tag {
  background: linear-gradient(135deg, #0d3a4f, #1b2848);
  color: #ffe86b;
  border: 1.5px solid #4be4ff;
  box-shadow: 0 0 12px rgba(75, 228, 255, 0.55);
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.pvz-weapon-pill {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(16, 26, 44, 0.92);
  border: 1px solid rgba(124, 239, 255, 0.35);
  color: #cfeaff;
  font-size: 12px;
  font-weight: 800;
}

.pvz-action-upgrade {
  border-color: rgba(255, 213, 79, 0.72) !important;
  background: linear-gradient(180deg, rgba(84, 58, 12, 0.94), rgba(42, 28, 8, 0.96)) !important;
  color: #ffe87a !important;
}

.pvz-tactic-tip {
  font-size: 12px;
  color: #9bb4d4;
  font-weight: 600;
}

/* Feet-aligned grounded ghost preview on grid hover (zero placement jump!) */
.pvz-grid[data-placing="true"] button:hover::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  top: -12%;
  bottom: 12%;
  background-image: var(--ghost-img, none);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center bottom;
  opacity: 0.56;
  filter: drop-shadow(0 0 10px rgba(200, 255, 0, 0.72));
  pointer-events: none;
}
.pvz-grid[data-placing="true"][data-prop="true"] button:hover::after {
  left: 12%;
  right: 12%;
  top: 14%;
  bottom: 16%;
}

.pvz-grid button {
  position: relative;
}

/* 3-stage bar, recruit shortcut & gold coin reward strip */
.pvz-stage-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pvz-stage-btn {
  padding: 7px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(154, 184, 224, 0.28);
  background: rgba(16, 24, 38, 0.88);
  color: #cfe0f5;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.pvz-stage-btn[aria-pressed="true"] {
  border-color: #c8ff00;
  background: linear-gradient(135deg, rgba(44, 62, 16, 0.92), rgba(20, 32, 16, 0.96));
  color: #e6ff70;
}

.pvz-stage-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.pvz-recruit-jump {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 213, 79, 0.72);
  background: linear-gradient(135deg, rgba(72, 50, 12, 0.92), rgba(36, 24, 8, 0.96));
  color: #ffe87a;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.pvz-reward-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 10px 0 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 213, 79, 0.55);
  background: linear-gradient(135deg, rgba(64, 46, 10, 0.7), rgba(24, 20, 12, 0.85));
}

.pvz-reward-strip strong {
  color: #ffe66b;
  font-size: 15px;
}

.pvz-reward-strip span {
  color: #cbd9ec;
  font-size: 12px;
}

/* Real cropped first-frame sprite thumbnails for recruited agents on PvZ cards */
.pvz-sprite-thumb {
  display: inline-block;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background-size: 200% 200%;
  background-position: 0 0;
  background-repeat: no-repeat;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
}

.pvz-seed-card .pvz-sprite-thumb {
  width: 42px;
  height: 42px;
}

/* In-frame settlement modal overlay directly over the game battlefield */
.pvz-overlay {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(7, 11, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: pvzOverlayIn 0.24s ease-out;
}

.pvz-overlay[hidden] {
  display: none !important;
}

@keyframes pvzOverlayIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.pvz-overlay .pvz-result-card {
  width: min(920px, 96%);
  max-height: 94%;
  margin: 0;
  padding: 14px 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: stretch;
  font-family: var(--m6-font);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 0 1.5px rgba(200, 255, 0, 0.35);
}

.pvz-overlay .pvz-result-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.pvz-overlay .pvz-reward-strip {
  margin: 2px 0 4px;
  padding: 8px 12px;
  flex-shrink: 0;
}

.pvz-selftest-btn {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 9px;
  border: 1px solid rgba(154, 184, 224, 0.35);
  background: rgba(22, 32, 48, 0.9);
  color: #dbe9fa;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--m6-font);
  cursor: pointer;
  flex-shrink: 0;
}
.pvz-selftest-btn[aria-pressed='true'] {
  border-color: #c8ff00;
  color: #e6ff70;
  background: rgba(38, 54, 18, 0.9);
}

.pvz-overlay .pvz-recap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
}

.pvz-overlay .pvz-result-actions {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(154, 184, 224, 0.16);
  flex-shrink: 0;
}

/* 1.4s in-frame wrong-answer correct-meaning flash */
.pvz-flash {
  position: absolute;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  z-index: 38;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(12, 20, 34, 0.94);
  border: 2px solid #ffe86b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 18px rgba(255, 232, 107, 0.35);
  color: #ffffff;
  pointer-events: none;
  max-width: 90%;
}

.pvz-flash[hidden] {
  display: none !important;
}

.pvz-briefing-layer, .pvz-shatter-layer {
  position: absolute;
  inset: 0;
}
.pvz-briefing-layer {
  z-index: 36;
  display: grid;
  place-items: center;
  padding: 8px;
  background: #06111ac7;
  backdrop-filter: blur(6px);
}
.pvz-briefing-layer[hidden] { display: none; }
.pvz-briefing-card {
  box-sizing: border-box;
  width: min(100%, 460px);
  max-height: 100%;
  overflow: auto;
  margin: 0;
  padding: 8px;
  border: 1px solid #38e5ff88;
}
.pvz-briefing-rewards { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.pvz-briefing-rewards span { padding: 2px 6px; border: 1px solid #52667b; color: #d3e0ed; font-size: .75rem; }
.pvz-briefing-rewards [data-earned] { border-color: #c8ff00; color: #c8ff00; }
.pvz-briefing-card .pvz-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pvz-briefing-card button, .pvz-shatter-btn { min-height: 44px; }
.pvz-briefing-skip { color: #d3e0ed; }
.pvz-shatter-layer { pointer-events: none; z-index: 6; }
.pvz-shatter-btn {
  position: absolute;
  right: 4px;
  transform: translateY(-50%);
  pointer-events: auto;
  min-width: 44px;
  max-width: 38%;
  background: #102338ed;
  border: 1px solid #38e5ff;
  color: #e7faff;
  font-size: .75rem;
}
.pvz-learning-receipt { font-size: .75rem; color: #dfffa1; }
.pvz-warmup-list { display: grid; gap: 3px; margin-block: 6px; }
.pvz-warmup-word { display: grid; grid-template-columns: minmax(5ch, 1fr) 1.5fr auto; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.pvz-warmup-word button { min-width: 44px; }
.pvz-warmup-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pvz-mask-meanings .pvz-review-meaning { visibility: hidden; }
.pvz-laser-lane { position: absolute; inset-inline: 8%; z-index: 2; pointer-events: none; border-block: 1px solid #ffd54faa; background: #ffd54f22; }
.pvz-laser-btn { min-height: 44px; width: 100%; color: #131817; background: #ffd54f; font-weight: 800; }
.pvz-laser-btn:disabled { opacity: .65; }

.pvz-flash-tag {
  font-size: 11px;
  font-weight: 800;
  color: #10141c;
  background: #ffe86b;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.pvz-flash strong {
  font-size: 17px;
  color: #c8ff00;
}

.pvz-flash-meaning {
  font-size: 14px;
  color: #e6f2ff;
  font-weight: 700;
}

.pvz-warmup { max-height: 96%; overflow: auto; }
.pvz-warmup-dots, .pvz-memory { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pvz-warmup-dots { justify-content: center; }
.pvz-memory { width: 100%; justify-content: center; font-size: .85rem; color: #d2dae6; }
.pvz-memory span { overflow-wrap: anywhere; }
.pvz-warmup-dots .known, .pvz-memory .known { color: #c8ff00; }
.pvz-warmup-dots .review, .pvz-memory .review { color: #ffbc50; }
.pvz-briefing-active > :not(.pvz-memory) { display: none !important; }
.pvz-flip { perspective: 900px; }
.pvz-flip[hidden] { display: none; }
.pvz-flip-rotor { display: grid; transform-style: preserve-3d; transition: transform .32s ease; }
.pvz-flip-rotor.flipped { transform: rotateY(180deg); }
.pvz-flip-face {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid #596e44;
  background: #111d25;
  backface-visibility: hidden;
  overflow-wrap: anywhere;
}
.pvz-flip-back { transform: rotateY(180deg); }
.pvz-flip-face button { min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.pvz-flip-face .pvz-flip-word { font-size: clamp(1.4rem, 5vw, 2.6rem); color: #dcff79; }
.pvz-warmup .ready { animation: pvz-ready-pulse .95s ease-in-out infinite alternate; }
@keyframes pvz-ready-pulse { to { box-shadow: 0 0 18px #c8ff0099; } }

/* === Upper-Left Valorant/ZZZ Tactical Hero Cut-in Banner (Leaves Battlefield Visible!) === */
.pvz-cutin {
  position: absolute;
  inset: 0;
  z-index: 37;
  isolation: isolate;
  overflow: hidden;
  pointer-events: none;
}
.pvz-cutin[hidden] { display: none; }
.pvz-cutin-frame {
  position: absolute;
  top: 14px;
  left: 14px;
  width: min(560px, 92%);
  min-height: 122px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 10px 12px;
  border-radius: 14px;
  border: 2px solid var(--pvz-cutin-tint, #c8ff00);
  background:
    linear-gradient(125deg, rgba(14, 22, 36, 0.96) 0%, rgba(10, 16, 28, 0.92) 72%, rgba(28, 38, 18, 0.92) 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.72), 0 0 24px color-mix(in srgb, var(--pvz-cutin-tint, #c8ff00) 42%, transparent);
  animation: pvz-cutin-banner var(--pvz-cutin-duration, 1050ms) cubic-bezier(0.16, 1, 0.3, 1) both;
}
.pvz-cutin-frame img {
  flex: 0 0 96px;
  width: 96px;
  height: 112px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 0 12px var(--pvz-cutin-tint, #c8ff00));
  animation: pvz-cutin-agent var(--pvz-cutin-duration, 1050ms) both;
}
.pvz-cutin-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-family: var(--m6-font);
}
.pvz-cutin-skill {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pvz-cutin-tint, #c8ff00) 22%, #0c1420);
  border: 1px solid var(--pvz-cutin-tint, #c8ff00);
  color: var(--pvz-cutin-tint, #e4ff7a);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.pvz-cutin-word {
  color: #ffffff;
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.pvz-cutin-outcome {
  color: #ffe66b;
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  font-weight: 800;
}
.pvz-cutin-briefing .pvz-cutin-frame {
  width: min(460px, 88%);
  min-height: 92px;
}
.pvz-cutin-briefing .pvz-cutin-frame img {
  flex-basis: 68px;
  width: 68px;
  height: 80px;
}

/* === In-Battlefield Floating Tactical Quiz Overlay (Zero Scrolling!) === */
.pvz-quiz-layer {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 14px 14px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 32%, rgba(6, 11, 20, 0.72) 100%);
}
.pvz-quiz-layer[hidden] { display: none; }
.pvz-board-quiz {
  pointer-events: auto;
  width: min(640px, 96%);
  margin: 0;
  padding: 12px 16px 14px;
  border-radius: 14px;
  border: 2px solid #c8ff00;
  background: linear-gradient(160deg, rgba(15, 24, 38, 0.97), rgba(9, 14, 24, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.8), 0 0 22px rgba(200, 255, 0, 0.25);
  font-family: var(--m6-font);
}
.pvz-board-quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.pvz-board-quiz-caster {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pvz-board-quiz-caster img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  object-position: top center;
  background: rgba(200, 255, 0, 0.12);
  border: 1px solid rgba(200, 255, 0, 0.45);
}
.pvz-quiz-caster {
  color: #dfff79;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--m6-font);
}

/* === Enemy Overhead Word Badges & Lane Sniper Pills === */
.pvz-targets { position: absolute; inset: 0; z-index: 27; pointer-events: none; }
#screen-pvz .pvz-targets button {
  pointer-events: auto;
  position: absolute;
  min-height: 36px;
  min-width: 48px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1.5px solid #c8ff00;
  color: #f3ffc4;
  background: rgba(14, 24, 18, 0.94);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65), 0 0 10px rgba(200, 255, 0, 0.28);
  font: 700 clamp(.74rem, 1.6vw, .92rem)/1.2 var(--m6-font);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}
#screen-pvz .pvz-targets button:hover:not(:disabled) {
  transform: translate(-50%, -54%) scale(1.04);
  border-color: #ffffff;
  background: rgba(24, 44, 24, 0.98);
}
#screen-pvz .pvz-targets button.pvz-lane-target:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.04);
}
#screen-pvz .pvz-targets button[hidden] { display: none; }
#screen-pvz .pvz-targets button:disabled { pointer-events: none; }
#screen-pvz .pvz-targets button.is-cooldown {
  opacity: 0.46;
  border-color: rgba(148, 174, 206, 0.45);
  background: rgba(16, 22, 34, 0.82);
  color: #9cb2cf;
  box-shadow: none;
}
#screen-pvz .pvz-targets button.is-locked {
  border-color: #ffe66b;
  background: rgba(46, 52, 12, 0.98);
  color: #fff3a1;
  box-shadow: 0 0 18px rgba(255, 230, 107, 0.65);
}
.pvz-enemy-word { transform: translate(-50%, -50%); max-width: 44%; overflow-wrap: anywhere; }
.pvz-lane-target { right: 6px; transform: translateY(-50%); }
@keyframes pvz-cutin-banner {
  0% { transform: translateX(-36px) scale(0.96); opacity: 0; }
  14%, 80% { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(-16px) scale(0.98); opacity: 0; }
}
@keyframes pvz-cutin-agent {
  0% { transform: translateX(-24px) scale(0.9); opacity: 0; }
  18%, 82% { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(-10px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pvz-flip-rotor { transition: none; }
  .pvz-cutin-frame, .pvz-cutin-frame img, .pvz-warmup .ready { animation: none; }
}

@media (max-width: 720px) {
  .pvz-overlay {
    padding: 8px;
  }
  .pvz-overlay .pvz-result-card {
    grid-template-columns: 1fr;
    max-height: 96%;
  }
  .pvz-overlay .pvz-result-hero {
    display: none;
  }
  .pvz-overlay .pvz-recap {
    max-height: 150px;
  }
}

/* === Commercial Valorant / ZZZ 5-Word Interactive Warmup Studio === */
.pvz-warmup-studio {
  width: min(680px, 95%);
  padding: 20px 24px 18px;
  border-radius: 18px;
  border: 1.5px solid rgba(200, 255, 0, 0.35);
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 229, 255, 0.14), transparent 55%),
    linear-gradient(160deg, rgba(16, 24, 38, 0.97), rgba(9, 13, 24, 0.99));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pvz-warmup-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pvz-warmup-title strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
  color: #f4ff9e;
  letter-spacing: 0.02em;
}

.pvz-warmup-title small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #93accb;
}

.pvz-warmup-skip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(154, 184, 224, 0.25);
  background: transparent;
  color: #8ea7c7;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pvz-warmup-skip:hover {
  color: #e4f0ff;
  border-color: rgba(200, 255, 0, 0.5);
}

/* Clickable 5-Word Tab Bar */
.pvz-warmup-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.pvz-warmup-tab {
  padding: 7px 6px;
  border-radius: 9px;
  border: 1.5px solid rgba(130, 160, 200, 0.2);
  background: rgba(18, 26, 42, 0.85);
  color: #b4c8e2;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease;
}

.pvz-warmup-tab.active {
  border-color: #38e5ff;
  background: rgba(20, 48, 72, 0.95);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(56, 229, 255, 0.28);
}

.pvz-warmup-tab.review {
  border-color: rgba(255, 184, 0, 0.65);
  color: #ffd970;
}

.pvz-warmup-tab.known {
  border-color: rgba(200, 255, 0, 0.72);
  background: rgba(34, 52, 16, 0.85);
  color: #d9ff66;
}

/* 3D Hero Flashcard Stage */
.pvz-flip-stage {
  perspective: 1100px;
  width: 100%;
  height: 205px;
}

.pvz-flip-stage .pvz-flip-rotor {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.2, 0.85, 0.25, 1);
}

.pvz-flip-stage .pvz-flip-rotor.flipped {
  transform: rotateY(180deg);
}

.pvz-flip-stage .pvz-flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-sizing: border-box;
}

.pvz-flip-front {
  border: 2px solid rgba(56, 229, 255, 0.45);
  background:
    radial-gradient(circle at 50% 35%, rgba(56, 229, 255, 0.16), transparent 65%),
    linear-gradient(155deg, rgba(22, 34, 56, 0.96), rgba(12, 18, 32, 0.98));
  box-shadow: inset 0 0 28px rgba(56, 229, 255, 0.08);
}

.pvz-flip-stage .pvz-flip-back {
  transform: rotateY(180deg);
  border: 2px solid rgba(200, 255, 0, 0.58);
  background:
    radial-gradient(circle at 50% 45%, rgba(200, 255, 0, 0.14), transparent 65%),
    linear-gradient(155deg, rgba(26, 40, 24, 0.96), rgba(12, 18, 28, 0.98));
  box-shadow: inset 0 0 28px rgba(200, 255, 0, 0.08);
}

.pvz-face-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #79d8f0;
  text-transform: uppercase;
}

.pvz-face-word {
  font-size: clamp(32px, 4.8vw, 46px);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 24px rgba(56, 229, 255, 0.4);
  line-height: 1.1;
}

.pvz-back-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pvz-back-word {
  font-size: 20px;
  font-weight: 900;
  color: #c8ff00;
  letter-spacing: 0.03em;
}

.pvz-face-meaning {
  font-size: clamp(26px, 3.8vw, 36px);
  font-weight: 900;
  color: #ffffff;
  text-align: center;
  line-height: 1.25;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.pvz-face-hint {
  font-size: 12px;
  color: #93accb;
}

.pvz-warmup-speak {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(56, 229, 255, 0.65);
  background: rgba(14, 38, 58, 0.92);
  color: #8ef0ff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.pvz-warmup-speak.mini {
  padding: 4px 11px;
  font-size: 12px;
}

.pvz-warmup-speak:hover {
  background: rgba(24, 62, 92, 0.98);
}

/* Prev / Mark / Next Control Bar */
.pvz-warmup-nav {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 8px;
}

.pvz-nav-btn,
.pvz-mark-btn {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: 1.5px solid rgba(140, 170, 210, 0.28);
  background: rgba(22, 30, 48, 0.92);
  color: #dce9fa;
}

.pvz-nav-btn:hover {
  border-color: rgba(56, 229, 255, 0.6);
}

.pvz-mark-btn.review.on {
  border-color: #ffb800;
  background: rgba(74, 52, 10, 0.92);
  color: #ffe27a;
}

.pvz-mark-btn.known.on {
  border-color: #c8ff00;
  background: rgba(42, 62, 16, 0.92);
  color: #e6ff70;
}

/* Primary Start Battle CTA */
.pvz-warmup-footer {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.pvz-warmup-start {
  width: 100%;
  padding: 13px 24px;
  border-radius: 12px;
  border: 2px solid #c8ff00;
  background: linear-gradient(90deg, #c8ff00, #9ef01a);
  color: #0e141c;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(200, 255, 0, 0.32);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.pvz-warmup-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(200, 255, 0, 0.48);
}

@media (max-width: 640px) {
  .pvz-warmup-studio { padding: 14px; gap: 10px; }
  .pvz-warmup-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pvz-flip-stage { height: 175px; }
  .pvz-warmup-nav { grid-template-columns: 1fr 1fr; }
}

/* Typography polish: clean geometric sans, crisp weights (no blurry faux-900 YaHei) */
.pvz-warmup-studio,
.pvz-warmup-studio button {
  font-family: "Bahnschrift", "DIN Alternate", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.pvz-warmup-title strong {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pvz-warmup-tab {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pvz-face-word {
  font-family: "Bahnschrift", "DIN Alternate", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.pvz-face-meaning {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.pvz-warmup-start {
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pvz-warmup-studio,
.pvz-warmup-studio button {
  font-family: var(--m6-font) !important;
}
.pvz-face-word {
  font-family: 'Chakra Petch', var(--m6-display) !important;
}

/* === PvZ Classic Scale-Down Slam Layer (Pre-Battle 3-Beat + Wave 2/3) === */
.pvz-wave-slam {
  position: absolute;
  inset: 0;
  z-index: 34;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-family: var(--m6-font);
}
.pvz-wave-slam[hidden] { display: none; }
.pvz-slam-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 36px;
  border-radius: 14px;
  background: linear-gradient(90deg, transparent, rgba(10, 16, 28, 0.88) 16%, rgba(10, 16, 28, 0.88) 84%, transparent);
  animation: pvzSlamIn 0.46s cubic-bezier(0.18, 0.89, 0.32, 1.24) both;
}
.pvz-slam-sub {
  font-family: 'Chakra Petch', var(--m6-font);
  font-size: clamp(0.78rem, 1.4vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #8ee8ff;
  text-transform: uppercase;
}
.pvz-slam-title {
  font-size: clamp(2rem, 5.2vw, 3.8rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.85), 0 0 28px rgba(200, 255, 0, 0.45);
  line-height: 1.1;
}
.pvz-slam-go .pvz-slam-title {
  color: #c8ff00;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.9), 0 0 36px rgba(200, 255, 0, 0.72);
}
.pvz-slam-wave2 .pvz-slam-sub { color: #ff8c7a; }
.pvz-slam-wave2 .pvz-slam-title {
  font-size: clamp(1.7rem, 4vw, 3rem);
  color: #ff4d5a;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.9), 0 0 32px rgba(255, 62, 82, 0.65);
}
.pvz-slam-wave3 .pvz-slam-sub { color: #ffe173; }
.pvz-slam-wave3 .pvz-slam-title {
  font-size: clamp(1.8rem, 4.2vw, 3.2rem);
  color: #ffd54f;
  text-shadow: 0 6px 26px rgba(0, 0, 0, 0.92), 0 0 36px rgba(255, 196, 46, 0.72);
}
@keyframes pvzSlamIn {
  0% { transform: scale(2.45); opacity: 0; filter: blur(3px); }
  58% { transform: scale(0.95); opacity: 1; filter: blur(0); }
  78% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* === Wave 3 Dual-Color Numbered Cloze Blanks & Separated Pill Options === */
.pvz-quiz-word.is-cloze {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  font-family: 'Chakra Petch', var(--m6-font);
  letter-spacing: 0.04em;
}
.pvz-blank {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  margin: 0 2px;
  border-radius: 6px;
  font-size: 0.82em;
  font-weight: 800;
  line-height: 1.25;
}
.pvz-blank.blank-1,
.pvz-cloze-pill.blank-1 {
  background: rgba(56, 229, 255, 0.16);
  border: 1.5px solid #38e5ff;
  color: #8cf2ff;
}
.pvz-blank.blank-2,
.pvz-cloze-pill.blank-2 {
  background: rgba(200, 255, 0, 0.15);
  border: 1.5px solid #c8ff00;
  color: #e4ff7a;
}
.pvz-opt-cloze {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-family: var(--m6-font);
}
.pvz-opt-idx {
  color: #8fa6c7;
  font-size: 0.88em;
  font-weight: 700;
  margin-right: 2px;
}
.pvz-cloze-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-family: 'Chakra Petch', var(--m6-font);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.pvz-cloze-sep {
  color: #9cb2cf;
  font-weight: 800;
  font-size: 0.95rem;
}
@media (prefers-reduced-motion: reduce) {
  .pvz-slam-card { animation: none; }
}

.pvz-difficulty-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-family: var(--m6-font); }
#screen-pvz .pvz-difficulty { display: grid; align-content: start; gap: 5px; min-height: 92px; min-width: 0; padding: 9px; text-align: left; color: #f4f8ff; border: 1px solid var(--tier); border-radius: 3px; background: #101825; font-family: var(--m6-font); }
.pvz-difficulty-normal { --tier: #38e5ff; }
.pvz-difficulty-hard { --tier: #b366ff; }
.pvz-difficulty-hell { --tier: #ff3b4e; }
.pvz-difficulty strong { color: var(--tier); }
.pvz-difficulty-hell strong { color: #ffd54f; }
.pvz-difficulty-hard strong { text-shadow: 0 1px #ffd54f84; }
.pvz-difficulty span { font-size: .75rem; }
#screen-pvz .pvz-difficulty[aria-pressed='true'] { box-shadow: inset 0 -4px var(--tier); background: #263246; }
.pvz-support-cards .pvz-seed-card { aspect-ratio: 1; border-color: #ffd54f; }
.pvz-deployment { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.pvz-deployment h3 { grid-column: 1 / -1; margin: 0; font: 700 .9rem var(--m6-font); }
.pvz-support .pvz-pick-card { border-color: #8d7937; }
.pvz-hud-group { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pvz-hud-group > strong { flex-basis: 100%; font: 700 .72rem var(--m6-font); }
.pvz-cutin-finisher .pvz-cutin-outcome { color: #ffd54f; text-shadow: 0 0 10px #c87a12; }
.pvz-cutin-audio .pvz-cutin-frame::after { content: ''; position: absolute; inset: 35% 0; pointer-events: none; background: linear-gradient(167deg, transparent 46%, #b366ff44 49%, #e3d5ffbb 50%, transparent 52%); }
.pvz-pause-layer { display: grid; place-items: center; position: absolute; inset: 0; z-index: 60; background: #070b14bb; backdrop-filter: blur(6px); font-family: var(--m6-font); }
.pvz-pause-layer[hidden] { display: none; }
.pvz-pause-card { display: grid; gap: 8px; width: min(86%, 280px); max-height: 100%; overflow: auto; padding: 16px; background: #101825; border: 1px solid #38e5ff; }
.pvz-pause-card button, .pvz-pause-toggle { min-height: 44px; }
#screen-pvz #pvz-grid[data-tutorial='true'] button:first-child::after { content: '点此部署杰风'; position: absolute; left: 0; top: 100%; z-index: 4; width: max-content; padding: 4px 8px; color: #101825; background: #c8ff00; pointer-events: none; }
#screen-pvz #pvz-grid[data-tutorial='true'] button:first-child { outline: 2px solid #c8ff00; }
#screen-pvz .pvz-enemy-word:not(:disabled) { min-height: 44px; font: 800 clamp(.85rem, 2.3vw, 1.1rem) var(--m6-font); animation: pvz-word-beacon 1.6s ease-in-out infinite alternate; }
@keyframes pvz-word-beacon { from { box-shadow: 0 0 3px #38e5ff66; } to { box-shadow: 0 0 12px #38e5ffb0; } }
@media (prefers-reduced-motion: reduce) { #screen-pvz .pvz-enemy-word { animation: none; } }
@media (max-width: 600px) {
  .pvz-difficulty-cards { gap: 4px; }
  #screen-pvz .pvz-difficulty { padding: 6px; font-size: .8rem; }
  .pvz-difficulty span { font-size: .68rem; }
  .pvz-deployment { grid-template-columns: minmax(0, 1fr); }
  .pvz-support-hud { flex-basis: 100%; }
}

#screen-pvz { font-family: var(--m6-font); }
#pvz-grid { display: none !important; }
.pvz-departure { display: grid; gap: 18px; width: min(100%, 780px); margin: auto; padding: clamp(10px, 3vw, 28px); background: #101725; border: 1px solid #344864; }
.pvz-departure .pvz-difficulty-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
#screen-pvz .pvz-departure .pvz-difficulty { display: grid; grid-template-rows: auto 1fr auto; align-items: start; min-width: 0; height: 100%; border-top: 3px solid var(--tier); overflow-wrap: anywhere; }
.pvz-difficulty-normal { --tier: #38e5ff; }
.pvz-difficulty-hard { --tier: #b366ff; }
.pvz-difficulty-hell { --tier: #ff3b4e; }
.pvz-departure .pvz-difficulty strong { color: var(--tier); }
.pvz-departure .pvz-difficulty[aria-pressed='true'] { background: #253149; box-shadow: inset 0 0 0 1px var(--tier); }
.pvz-marksman { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pvz-marksman img { width: 56px; height: 68px; object-fit: cover; object-position: top; background: #19253a; }
.pvz-agent-drawer summary { cursor: pointer; padding: 12px; }
.pvz-agent-drawer button { min-height: 44px; }
#screen-pvz .pvz-board-pause { position: absolute; z-index: 25; right: 8px; top: 8px; min-width: 44px; min-height: 44px; background: #101725b8; border: 1px solid #ffffff55; border-radius: 8px; }
.pvz-board-pause[hidden] { display: none; }
.pvz-is-paused > :not(.pvz-pause-layer), .pvz-is-paused > :not(.pvz-pause-layer) * { animation-play-state: paused !important; }
.pvz-ammo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
#screen-pvz .pvz-ammo button { min-height: 48px; min-width: 0; padding: 6px; border-radius: 7px; border: 1px solid #38e5ff99; background: linear-gradient(165deg,#233b52,#111c29); color: #eefaff; font: 750 clamp(.85rem, 2.3vw, 1.1rem) var(--m6-font); overflow-wrap: anywhere; }
#screen-pvz .pvz-ammo button:disabled { opacity: .46; }
.pvz-ammo-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; }
.pvz-ammo-tools button { min-height: 44px; }
#screen-pvz .pvz-word-rescue { inset: 4% auto auto 3%; width: min(58%, 440px); max-height: 68%; pointer-events: none; }
#pvz-overlay .pvz-result-card { min-height: 0; max-height: 96%; overflow: auto; align-items: start; }
#pvz-overlay .pvz-result-body, #pvz-overlay .pvz-recap { max-height: none; overflow: visible; }
#pvz-overlay .pvz-result-actions { flex-wrap: wrap; }
#pvz-overlay .pvz-result-actions button { min-height: 44px; }
@media (max-width: 600px) {
  .pvz-departure { gap: 10px; }
  .pvz-ammo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  #pvz-overlay .pvz-result-card { grid-template-columns: minmax(0, 1fr); }
}

#screen-pvz .pvz-strike-dock { position: absolute; z-index: 28; inset: auto 10px 10px; width: min(calc(100% - 20px), 460px); margin-inline: auto; padding: 6px; border: 1px solid #54dfff; border-radius: 8px; background: #101e34e8; backdrop-filter: blur(9px); box-shadow: 0 0 16px #38e5ff44; font-family: var(--m6-font); }
#screen-pvz .pvz-strike-dock[hidden], #screen-pvz .pvz-strike-hud ~ #pvz-controls[hidden], #screen-pvz:has(.pvz-strike-hud) #pvz-controls[hidden] { display: none; }
.pvz-strike-ammo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
#screen-pvz .pvz-strike-ammo button { min-width: 0; min-height: 44px; padding: 4px 7px; border: 1px solid #66d6ed99; border-radius: 5px; background: linear-gradient(155deg, #234c62, #14233c 68%); color: #f1fbff; box-shadow: inset 0 -2px #53ddff44; font: 750 clamp(.82rem, 2.3vw, 1.05rem)/1.15 var(--m6-font); overflow-wrap: anywhere; touch-action: manipulation; }
#screen-pvz .pvz-strike-ammo button:is(:hover,:focus-visible):enabled { outline: 2px solid #c8ff00; outline-offset: -2px; }
#screen-pvz .pvz-strike-ammo button:active:enabled { transform: translateY(2px); background: #326581; }
#screen-pvz .pvz-strike-ammo button:disabled { opacity: .55; }
.pvz-strike-tools { display: flex; align-items: center; justify-content: center; gap: 6px; color: #ffd58e; }
.pvz-strike-tools:empty { display: none; }
#screen-pvz .pvz-strike-tools button { min-height: 44px; font-family: var(--m6-font); }
.pvz-strike-reload { display: block; padding: 8px; text-align: center; color: #b8eaff; animation: pvz-strike-breathe 1.5s ease-in-out infinite alternate; }
@keyframes pvz-strike-breathe { from { opacity: .55; } to { opacity: 1; } }
#screen-pvz .pvz-strike-hud { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 10px; font: 700 .85rem var(--m6-font); }
.pvz-strike-meter { display: flex; align-items: center; gap: 4px; }
.pvz-strike-meter i { width: clamp(8px, 2vw, 19px); height: 7px; transform: skewX(-13deg); background: #344153; }
.pvz-strike-meter .pvz-strike-on { background: #38e5ff; box-shadow: 0 0 7px #38e5ff66; }
.pvz-strike-charge .pvz-strike-on { background: #c8ff00; box-shadow: 0 0 7px #c8ff0077; }
.pvz-strike-combo { padding: 3px 6px; color: #ffe395; background: #42321d; }
#screen-pvz .pvz-strike-live #pvz-flags { top: 14px; right: 62px; bottom: auto; width: min(25%, 180px); }
#screen-pvz .pvz-strike-live #pvz-grid { pointer-events: none; }
#screen-pvz .pvz-strike-live .pvz-board-pause { z-index: 32; }

#screen-pvz .pvz-arena-live #pvz-stage canvas { touch-action: none; font-family: var(--m6-font); }
#screen-pvz:has(.pvz-arena-live) #pvz-controls { display: none; }
#screen-pvz:has(.pvz-arena-live) #pvz-hud { font-family: var(--m6-font); }
#screen-pvz .pvz-arena-live #pvz-drops, #screen-pvz .pvz-arena-live #pvz-flags { display: none; }
#screen-pvz .pvz-arena-live .pvz-board-pause { z-index: 38; }
.pvz-arena-layer { position: absolute; inset: 0; z-index: 36; display: grid; place-items: center; padding: 10px; background: #080e199c; backdrop-filter: blur(5px); font-family: var(--m6-font); }
.pvz-arena-layer[hidden] { display: none; }
.pvz-arena-card { width: min(560px, 100%); max-height: 100%; min-width: 0; overflow: auto; padding: clamp(12px, 3vw, 26px); color: #f6f9ff; background: linear-gradient(150deg, #1b2a42, #101625); border: 1px solid #38e5ff77; border-top: 3px solid #38e5ff; box-shadow: 0 14px 35px #0009; }
.pvz-arena-card > strong { display: block; font-size: clamp(19px, 4vw, 32px); overflow-wrap: anywhere; }
.pvz-arena-card > small { display: block; margin-bottom: 8px; color: #8decfd; }
.pvz-arena-card button { font-family: var(--m6-font); min-height: 44px; overflow-wrap: anywhere; }
.pvz-arena-options, .pvz-arena-offers { display: grid; gap: 7px; margin: 8px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pvz-arena-offers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#screen-pvz .pvz-arena-offers button { display: grid; align-content: center; gap: 4px; color: #fff1ad; border: 1px solid #dbab50; border-radius: 3px; background: linear-gradient(140deg, #574018, #201c29); }
.pvz-arena-offers small { font-size: .75em; color: #eedeb1; }
@media (max-width: 600px) {
  #screen-pvz .pvz-arena-live #pvz-stage canvas { inset: 50% 0 auto; height: auto !important; aspect-ratio: 16 / 9; transform: translateY(-50%); }
  .pvz-arena-offers { grid-template-columns: 1fr; }
}
#screen-pvz .pvz-strike-cutin { inset: 7% auto auto 3%; width: min(65%, 380px); padding: 0; pointer-events: none; background: none; }
.pvz-strike-cutin-frame { display: grid; grid-template-columns: minmax(42px, 26%) 1fr; align-items: center; background: linear-gradient(105deg, var(--strike-accent, #38e5ff), #1b344b 42%, #101a2a); border-block: 2px solid var(--strike-accent, #38e5ff); clip-path: polygon(7% 0,100% 0,94% 100%,0 100%); }
#screen-pvz .pvz-strike-cutin-frame img { width: 100%; height: clamp(48px, 11vw, 102px); object-fit: cover; object-position: center 17%; }
.pvz-strike-cutin-copy { display: grid; padding: 5px 10px; font: 750 .87rem var(--m6-font); color: white; }
@media (prefers-reduced-motion: reduce) { .pvz-strike-reload { animation: none; } }
