/* ==========================================================================
   CHEFBILL: CUỘC CHIẾN NẤU ĂN — LANDSCAPE 16:9 MAIN HUB & SHOWDOWN STYLES
   100% SIL Open Font License 1.1 Typography:
   - Chokokutai (Triện Khắc Gỗ Giả Tượng Hình Chữ Hoa)
   - Potta One (Nét Cọ Khắc Gỗ Á Đông)
   - Baloo 2 ExtraBold & Fredoka Bold (Ultra-Legible Vietnamese UI)
   ========================================================================== */
@font-face {
  font-family: 'Chokokutai';
  src: url('../assets/fonts/Chokokutai-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Potta One';
  src: url('../assets/fonts/PottaOne-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Baloo 2';
  src: url('../assets/fonts/Baloo2-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Water Brush';
  src: url('../assets/fonts/WaterBrush-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Coiny';
  src: url('../assets/fonts/Coiny.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fredoka';
  src: url('../assets/fonts/Fredoka-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-calligraphy: 'Chokokutai', 'Potta One', 'Water Brush', cursive;
  --font-display: 'Potta One', 'Baloo 2', 'Coiny', cursive;
  --font-primary: 'Baloo 2', 'Fredoka', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --bg-deep: #140806;
  --bg-warm: #27100b;
  --red-ba3: #ef4444;
  --red-ba3-dark: #991b1b;
  --orange-ba4: #f97316;
  --orange-ba4-dark: #9a3412;
  --gold-michelin: #facc15;
  --gold-bright: #fde047;
  --cream-thermal: #fffbeb;
  --wood-dark: #3e1f14;
  --wood-mid: #5c2e1e;
  --wood-border: #eab308;
  --cyan-ninja: #00e5ff;
  --green-fresh: #22c55e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #2b1109 0%, #0e0504 100%);
  color: #fff;
  font-family: var(--font-primary);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 16:9 / Adaptive Landscape Viewport Container (Supports 16:9, 16:10, 4:3 & Squarish Windows without crushing board height) */
#game-viewport {
  position: relative;
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(100dvh, calc(100vw * 3 / 4));
  container-type: size;
  container-name: gamevp;
  background: linear-gradient(180deg, #2a1215 0%, #431810 48%, #26110c 100%);
  border: 3px solid rgba(250, 204, 21, 0.55);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(249, 115, 22, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Subtle Concept Art Backdrop Layer */
.hub-backdrop {
  position: absolute;
  inset: 0;
  background-image: url('../assets/chefbill_main_hub_concept.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.26;
  filter: saturate(1.15) contrast(1.05);
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#game-viewport.art-preview-mode .hub-backdrop {
  opacity: 1;
  z-index: 25;
}

/* Top HUD Bar */
.top-hud {
  position: relative;
  z-index: 30;
  height: 9.5%;
  background: linear-gradient(180deg, rgba(28, 12, 8, 0.95) 0%, rgba(45, 19, 12, 0.88) 100%);
  border-bottom: 2px solid rgba(250, 204, 21, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2%;
  gap: 0.8rem;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hud-appicon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 2px solid var(--gold-michelin);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.5);
  object-fit: cover;
}

.hud-title-box h1 {
  font-size: clamp(0.85rem, 1.35vw, 1.2rem);
  font-weight: 900;
  color: var(--gold-bright);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.hud-title-box p {
  font-size: clamp(0.62rem, 0.85vw, 0.76rem);
  color: #fed7aa;
  font-weight: 600;
}

.hud-currencies {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.currency-pill {
  background: rgba(20, 8, 5, 0.85);
  border: 1.5px solid rgba(250, 204, 21, 0.5);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: clamp(0.7rem, 1vw, 0.9rem);
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hud-btn {
  background: linear-gradient(180deg, #5c2e1e, #3a1a10);
  color: #fef08a;
  border: 1.5px solid rgba(250, 204, 21, 0.6);
  border-radius: 10px;
  padding: 0.3rem 0.65rem;
  font-size: clamp(0.68rem, 0.92vw, 0.82rem);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.hud-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
}

.hud-btn.active-toggle {
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  color: #fff;
}

/* ==========================================================================
   MAIN HUB SCREEN (16:9 COURTYARD DIORAMA)
   ========================================================================== */
#hub-screen {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.6% 1.2%;
  gap: 0.6%;
}

/* 1. Judges Grand Table (Top-Center) */
.judges-grand-stage {
  background: linear-gradient(180deg, rgba(68, 26, 15, 0.94), rgba(43, 16, 10, 0.94));
  border: 2px solid var(--gold-michelin);
  border-radius: 14px;
  padding: 0.45% 1.2%;
  box-shadow: 0 6px 20px rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.judges-banner-title {
  min-width: 190px;
}

.judges-banner-title .badge {
  display: inline-block;
  background: linear-gradient(90deg, #dc2626, #ea580c);
  color: #fff;
  font-size: clamp(0.58rem, 0.78vw, 0.7rem);
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid #fde047;
}

.judges-banner-title h2 {
  font-size: clamp(0.78rem, 1.1vw, 0.98rem);
  color: var(--gold-bright);
  margin-top: 2px;
}

.judges-banner-title p {
  font-size: clamp(0.6rem, 0.8vw, 0.74rem);
  color: #fde68a;
}

.judges-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  justify-content: center;
}

.judge-card {
  background: rgba(24, 9, 6, 0.86);
  border: 1.5px solid rgba(250, 204, 21, 0.5);
  border-radius: 12px;
  padding: 0.3rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.judge-card:hover, .judge-card.active {
  border-color: #fde047;
  background: rgba(124, 45, 18, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.35);
}

.judge-avatar {
  background: radial-gradient(circle at 50% 65%, rgba(250, 204, 21, 0.32), rgba(20, 8, 5, 0.65));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold-michelin);
  overflow: visible;
  flex-shrink: 0;
}

.judge-avatar.judge-avatar-toddler {
  width: 37px;
  height: 37px;
}

.judge-card.judge-card-toddler .judge-hub-sprite {
  transform: scale(0.84);
  transform-origin: bottom center;
}

.judge-info strong {
  display: block;
  font-size: clamp(0.68rem, 0.92vw, 0.82rem);
  color: #fff;
}

.judge-info span {
  font-size: clamp(0.56rem, 0.75vw, 0.68rem);
  color: #fcd34d;
}

.score-paddle {
  background: radial-gradient(circle, #fef08a 0%, #eab308 100%);
  color: #7c2d12;
  font-weight: 900;
  font-size: clamp(0.65rem, 0.88vw, 0.78rem);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.judge-speech-box {
  min-width: 240px;
  max-width: 290px;
  background: #fffbeb;
  color: #451a03;
  border: 2px solid #f59e0b;
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  font-size: clamp(0.62rem, 0.82vw, 0.75rem);
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

/* 2. Center Courtyard Twin Kitchens & Showdown Pedestal */
.courtyard-middle {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr 1.35fr;
  gap: 0.85%;
  flex: 1;
  min-height: 0;
}

.team-wing {
  border-radius: 14px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.team-wing.ba3-wing {
  background: linear-gradient(155deg, rgba(127, 29, 29, 0.92) 0%, rgba(69, 10, 10, 0.94) 100%);
  border: 2px solid rgba(248, 113, 113, 0.65);
}

.team-wing.ba4-wing {
  background: linear-gradient(155deg, rgba(154, 52, 18, 0.92) 0%, rgba(67, 20, 7, 0.94) 100%);
  border: 2px solid rgba(251, 146, 60, 0.65);
}

.team-wing.selected-team {
  border-color: var(--gold-bright);
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.45), inset 0 0 18px rgba(250, 204, 21, 0.15);
}

.wing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wing-title-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.mc-badge-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 70%, rgba(250, 204, 21, 0.32), rgba(0, 0, 0, 0.45));
  border: 2px solid var(--gold-michelin);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  flex-shrink: 0;
}

.wing-title-group h3 {
  font-size: clamp(0.82rem, 1.15vw, 1.02rem);
  color: #fff;
  font-weight: 900;
}

.wing-title-group p {
  font-size: clamp(0.6rem, 0.8vw, 0.72rem);
  color: #fde68a;
}

.team-select-tag {
  font-size: clamp(0.58rem, 0.78vw, 0.7rem);
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.35);
}

.team-wing.selected-team .team-select-tag {
  background: var(--gold-michelin);
  color: #451a03;
  border-color: #fff;
}

/* Sous-Chefs Cards inside Team Wing */
.sous-chefs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.sous-card {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: background 0.15s ease;
}

.sous-card:hover {
  background: rgba(250, 204, 21, 0.18);
  border-color: var(--gold-michelin);
}

.sous-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: radial-gradient(circle at 50% 70%, rgba(250, 204, 21, 0.25), rgba(0, 0, 0, 0.45));
  border: 1.5px solid rgba(250, 204, 21, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}

.sous-text strong {
  display: block;
  font-size: clamp(0.66rem, 0.9vw, 0.8rem);
  color: #fef08a;
}

.sous-text span {
  font-size: clamp(0.55rem, 0.74vw, 0.66rem);
  color: #fed7aa;
  line-height: 1.2;
}

/* 3 Cooking Stations Preview in Wing */
.wing-stations-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.station-mini {
  background: rgba(20, 8, 5, 0.72);
  border: 1px dashed rgba(250, 204, 21, 0.45);
  border-radius: 8px;
  padding: 0.3rem;
  text-align: center;
  font-size: clamp(0.58rem, 0.76vw, 0.68rem);
  color: #fff;
}

.station-mini b {
  display: block;
  color: #fde047;
  font-size: clamp(0.62rem, 0.82vw, 0.74rem);
}

.wing-mission-bar {
  background: rgba(0, 0, 0, 0.52);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(0.6rem, 0.8vw, 0.72rem);
  border: 1px solid rgba(255,255,255,0.16);
}

/* Center Pedestal: Mâm Cơm 3 Món & Mode Selector */
.center-pedestal {
  background: radial-gradient(circle at top, rgba(92, 46, 30, 0.95), rgba(38, 16, 10, 0.96));
  border: 2px solid var(--gold-michelin);
  border-radius: 16px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.7);
}

.vs-emblem {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  color: #fff;
  font-weight: 900;
  font-size: clamp(0.72rem, 1vw, 0.88rem);
  padding: 0.2rem 0.75rem;
  border-radius: 99px;
  border: 2px solid #fef08a;
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.7);
}

.brass-tray-showcase {
  width: 100%;
  background: radial-gradient(circle, #78350f 0%, #451a03 100%);
  border: 2.5px solid #facc15;
  border-radius: 14px;
  padding: 0.45rem;
  box-shadow: inset 0 0 15px rgba(250, 204, 21, 0.3);
}

.brass-tray-showcase h4 {
  font-size: clamp(0.68rem, 0.92vw, 0.82rem);
  color: #fef08a;
  margin-bottom: 0.3rem;
}

.tray-3-dishes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
}

.tray-dish-slot {
  background: rgba(255, 251, 235, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.5);
  border-radius: 8px;
  padding: 0.25rem 0.15rem;
  font-size: clamp(0.55rem, 0.72vw, 0.65rem);
  color: #fff;
}

.tray-dish-slot .dish-emoji {
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  display: block;
}

.mode-switch-group {
  display: flex;
  gap: 0.3rem;
  width: 100%;
}

.mode-pill-btn {
  flex: 1;
  background: rgba(0,0,0,0.5);
  color: #fed7aa;
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: 8px;
  padding: 0.28rem 0.2rem;
  font-size: clamp(0.56rem, 0.74vw, 0.66rem);
  font-weight: 800;
  cursor: pointer;
}

.mode-pill-btn.active {
  background: var(--gold-michelin);
  color: #451a03;
  border-color: #fff;
}

/* 3. Market & Bill Universe Guests Promenade */
.market-guests-strip {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr;
  gap: 0.8%;
}

.strip-panel {
  background: rgba(28, 12, 8, 0.9);
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  border-radius: 12px;
  padding: 0.35rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.strip-label {
  font-size: clamp(0.62rem, 0.82vw, 0.74rem);
  font-weight: 800;
  color: var(--gold-bright);
  white-space: nowrap;
}

.ingredients-row, .guests-row {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.ing-chip, .guest-chip {
  background: rgba(69, 26, 3, 0.85);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 8px;
  padding: 0.2rem 0.42rem;
  font-size: clamp(0.58rem, 0.76vw, 0.68rem);
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  transition: transform 0.12s ease, background 0.12s ease;
}

.ing-chip:hover, .guest-chip:hover, .ing-chip.fresh-buff {
  background: rgba(234, 88, 12, 0.9);
  border-color: #fef08a;
  transform: scale(1.06);
}

/* 4. Bottom Action Dock */
.bottom-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.2%;
}

.dock-nav-btns {
  display: flex;
  gap: 0.45rem;
}

.dock-btn {
  background: linear-gradient(180deg, #4a2215 0%, #2b120a 100%);
  color: #fef08a;
  border: 1.5px solid rgba(250, 204, 21, 0.55);
  border-radius: 11px;
  padding: 0.45rem 0.8rem;
  font-size: clamp(0.66rem, 0.9vw, 0.8rem);
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dock-btn:hover {
  background: linear-gradient(180deg, #6b311e 0%, #3d1a0f 100%);
  border-color: #fff;
}

.cta-play-btn {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 55%, #eab308 100%);
  color: #fff;
  border: 2.5px solid #fef08a;
  border-radius: 14px;
  padding: 0.52rem 1.5rem;
  font-size: clamp(0.82rem, 1.2vw, 1.08rem);
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6), 0 0 15px rgba(250, 204, 21, 0.5);
  transition: transform 0.14s ease;
}

.cta-play-btn:hover {
  transform: scale(1.04);
}

/* ==========================================================================
   SPLIT-SCREEN OVERCOOKED × MATCH-3 SHOWDOWN ARENA (16:9)
   ========================================================================== */
#battle-screen {
  position: relative;
  z-index: 20;
  flex: 1;
  display: none;
  flex-direction: column;
  padding: 0.45% 1%;
  gap: 0.45%;
  background: linear-gradient(180deg, rgba(22, 9, 6, 0.94), rgba(36, 14, 9, 0.96));
  overflow: hidden;
}

#battle-screen.active {
  display: flex;
}

/* Parabolic Projectile Layer (Match-3 Board -> Overcooked Stoves) */
#fx-projectile-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 55;
  overflow: hidden;
}

.fx-flying-item {
  position: absolute;
  font-size: 1.55rem;
  filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.95));
  pointer-events: none;
  z-index: 56;
  transition: transform 0.46s cubic-bezier(0.2, 0.85, 0.35, 1.15), opacity 0.46s ease;
}

.fx-float-score {
  position: absolute;
  font-size: 0.86rem;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  z-index: 57;
  animation: floatUpFade 0.85s ease-out forwards;
}

@keyframes floatUpFade {
  0% { transform: translateY(0) scale(0.85); opacity: 1; }
  100% { transform: translateY(-34px) scale(1.1); opacity: 0; }
}

/* Gameplay Concept Art Overlay */
.battle-art-overlay {
  position: absolute;
  inset: 0;
  z-index: 48;
  background-image: url('../assets/chefbill_gameplay_concept.jpg');
  background-size: cover;
  background-position: center;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1.2%;
}

.battle-art-overlay.show {
  display: flex;
}

.art-overlay-badge {
  background: rgba(20, 8, 5, 0.88);
  color: #fef08a;
  border: 2px solid var(--gold-michelin);
  border-radius: 999px;
  padding: 0.4rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0,0,0,0.85);
}

/* Top Overcooked Order Rail + 4 Judges + Timer */
.battle-header {
  position: relative;
  z-index: 50;
  display: grid;
  grid-template-columns: 1.25fr 1.35fr auto;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(180deg, rgba(48, 19, 11, 0.96), rgba(30, 11, 7, 0.96));
  border: 2px solid var(--gold-michelin);
  border-radius: 12px;
  padding: 0.28rem 0.65rem;
}

/* Left: RestoBill Thermal Ticket Rail */
.battle-ticket-rail {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  overflow-x: auto;
}

.k80-ticket {
  background: #fffbeb;
  color: #451a03;
  border: 1.5px solid #d97706;
  border-top: 4px solid #dc2626;
  border-radius: 7px;
  padding: 0.18rem 0.42rem;
  min-width: 125px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.k80-ticket.urgent {
  border-color: #ef4444;
  background: #fef2f2;
  animation: pulseBurn 0.55s infinite alternate;
}

.k80-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(0.54rem, 0.7vw, 0.64rem);
  font-weight: 900;
  gap: 0.25rem;
}

.k80-guest-line {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.k80-dishes {
  font-size: clamp(0.55rem, 0.72vw, 0.66rem);
  font-weight: 800;
  color: #7c2d12;
  white-space: nowrap;
}

.k80-bar-bg {
  width: 100%;
  height: 5px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}

.k80-bar-fill {
  height: 100%;
  background: #22c55e;
  transition: width 0.25s linear, background 0.25s ease;
}

/* Center: Timer + 4 VIP Judges Mini Balcony + Live Commentary */
.battle-center-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.battle-clock-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mode-tag-pill, .mission-tag-pill {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fde68a;
  font-size: clamp(0.54rem, 0.72vw, 0.65rem);
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
}

.timer-badge {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  font-weight: 900;
  font-size: clamp(0.76rem, 1.05vw, 0.94rem);
  padding: 0.12rem 0.65rem;
  border-radius: 99px;
  border: 1.5px solid #fef08a;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.6);
}

.battle-judges-mini {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.j-mini {
  background: rgba(20, 8, 5, 0.86);
  border: 1px solid rgba(250, 204, 21, 0.55);
  border-radius: 99px;
  padding: 2px 8px 2px 4px;
  font-size: clamp(0.54rem, 0.7vw, 0.64rem);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.j-mini b {
  color: #fde047;
}

.battle-live-commentary {
  font-size: clamp(0.56rem, 0.74vw, 0.67rem);
  color: #fed7aa;
  font-weight: 700;
  max-width: 460px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-header-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Split-Screen Arena (Left: Đội Bà 3 vs Right: Đội Bà 4) */
.battle-arena-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75%;
  min-height: 0;
}

.player-side {
  border-radius: 13px;
  padding: 0.42rem 0.55rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.32rem;
  min-height: 0;
}

.player-side.p1-side {
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.9) 0%, rgba(42, 10, 10, 0.96) 100%);
  border: 2px solid #f87171;
}

.player-side.p2-side {
  background: linear-gradient(180deg, rgba(154, 52, 18, 0.9) 0%, rgba(48, 17, 7, 0.96) 100%);
  border: 2px solid #fb923c;
}

/* 1. Side Top Bar: Chef + Sous-Chefs Active Skills + Score */
.side-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.42);
  border-radius: 10px;
  padding: 0.24rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.side-chef-id {
  display: flex;
  align-items: center;
  gap: 0.38rem;
}

.chef-avatar-pill {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 65%, rgba(250, 204, 21, 0.3), rgba(0, 0, 0, 0.5));
  border: 1.5px solid var(--gold-michelin);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}

.side-chef-id strong {
  display: block;
  font-size: clamp(0.6rem, 0.8vw, 0.72rem);
  color: #fff;
}

.role-badge {
  color: #fde047;
  font-size: clamp(0.54rem, 0.72vw, 0.64rem);
}

.side-chef-id small {
  display: block;
  font-size: clamp(0.52rem, 0.68vw, 0.62rem);
  color: #fed7aa;
  font-weight: 700;
}

.sous-skills-bar {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sous-skill-btn {
  background: linear-gradient(180deg, #451a03, #270e04);
  border: 1.5px solid #facc15;
  border-radius: 8px;
  padding: 0.14rem 0.42rem 0.14rem 0.28rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.28rem;
  transition: transform 0.12s ease, background 0.12s ease;
}

.skill-btn-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.sous-skill-btn:hover:not(.cooldown) {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #b45309, #78350f);
}

.sous-skill-btn.cooldown {
  opacity: 0.58;
  border-color: rgba(255,255,255,0.25);
  cursor: default;
}

.sous-skill-btn span {
  font-size: clamp(0.54rem, 0.72vw, 0.64rem);
  font-weight: 800;
  color: #fef08a;
}

.sous-skill-btn b {
  font-size: clamp(0.48rem, 0.62vw, 0.56rem);
  color: #4ade80;
}

.sous-skill-btn.cooldown b {
  color: #fca5a5;
}

.side-score-box {
  text-align: right;
}

.side-score-box span {
  display: block;
  font-size: clamp(0.72rem, 0.98vw, 0.88rem);
  font-weight: 900;
  color: #fde047;
}

.side-score-box small {
  font-size: clamp(0.54rem, 0.7vw, 0.64rem);
  color: #bbf7d0;
  font-weight: 800;
}

/* 2. Overcooked Kitchen Zone (3 Stoves + Sink + 3-Dish Brass Tray) */
.overcooked-kitchen-zone {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  background: rgba(18, 7, 4, 0.68);
  border: 1.5px solid rgba(250, 204, 21, 0.35);
  border-radius: 10px;
  padding: 0.3rem 0.42rem;
}

.pots-3-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.cook-pot {
  background: rgba(15, 6, 4, 0.9);
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  border-radius: 9px;
  padding: 0.24rem 0.35rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cook-pot.prepping {
  border-color: #38bdf8;
  background: rgba(12, 45, 72, 0.82);
}

.cook-pot.cooking {
  border-color: #fbbf24;
  background: rgba(92, 45, 12, 0.88);
}

.cook-pot.cooked {
  background: rgba(20, 83, 45, 0.94);
  border-color: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.55);
}

.cook-pot.burning {
  background: rgba(185, 28, 28, 0.96);
  border-color: #fef08a;
  animation: pulseBurn 0.45s infinite alternate;
}

@keyframes pulseBurn {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

.pot-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(0.54rem, 0.72vw, 0.64rem);
  font-weight: 800;
  color: #fde047;
}

.pot-slots-line {
  font-size: clamp(0.56rem, 0.75vw, 0.68rem);
  font-weight: 800;
  color: #fff;
}

.pot-gauge-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  overflow: hidden;
}

.pot-gauge-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  transition: width 0.2s linear, background 0.2s ease;
}

/* Overcooked Pass Row: Sink + 3-Dish Brass Tray + Serve Bell */
.kitchen-pass-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.35rem;
}

.sink-station {
  background: linear-gradient(180deg, #0f172a, #1e293b);
  border: 1.5px solid #38bdf8;
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  text-align: left;
}

.sink-station.dirty-alert {
  background: linear-gradient(180deg, #7f1d1d, #450a0a);
  border-color: #f87171;
  animation: pulseBurn 0.6s infinite alternate;
}

.sink-icon {
  font-size: clamp(0.95rem, 1.25vw, 1.15rem);
}

.sink-info strong {
  display: block;
  font-size: clamp(0.52rem, 0.68vw, 0.6rem);
  color: #7dd3fc;
}

.sink-info span {
  font-size: clamp(0.5rem, 0.65vw, 0.58rem);
  color: #e2e8f0;
  font-weight: 700;
}

.brass-tray-pass {
  background: radial-gradient(circle, rgba(120, 53, 15, 0.92), rgba(69, 26, 3, 0.95));
  border: 1.5px solid #facc15;
  border-radius: 8px;
  padding: 0.18rem 0.42rem;
}

.tray-pass-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(0.5rem, 0.66vw, 0.58rem);
  color: #fef08a;
  font-weight: 800;
  margin-bottom: 2px;
}

.tray-pass-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
}

.pass-slot {
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed rgba(250, 204, 21, 0.5);
  border-radius: 6px;
  padding: 2px 4px;
  text-align: center;
  font-size: clamp(0.52rem, 0.68vw, 0.6rem);
  font-weight: 800;
  color: #fed7aa;
}

.pass-slot.plated {
  background: rgba(22, 101, 52, 0.9);
  border: 1px solid #4ade80;
  color: #fff;
}

.serve-tray-btn {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  border: 2px solid #bbf7d0;
  border-radius: 9px;
  padding: 0.35rem 0.6rem;
  font-size: clamp(0.58rem, 0.78vw, 0.7rem);
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.serve-tray-btn.ready-glow {
  background: linear-gradient(135deg, #facc15, #ea580c);
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.9);
  animation: pulseBurn 0.5s infinite alternate;
}

/* 3. Match-3 Chopping Board (6x5 Cascading Grid) */
.board-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
}

.board-hint-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(0.52rem, 0.68vw, 0.62rem);
  color: #fde68a;
  padding: 0 2px;
}

.mini-shuffle-btn {
  background: rgba(92, 46, 30, 0.9);
  color: #fef08a;
  border: 1px solid rgba(250, 204, 21, 0.6);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: clamp(0.52rem, 0.68vw, 0.6rem);
  font-weight: 800;
  cursor: pointer;
}

.match-grid-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 4px;
  background: linear-gradient(180deg, #3b1c0e 0%, #241008 100%);
  border: 2.5px solid #d97706;
  border-radius: 11px;
  padding: 5px;
  flex: 1;
  min-height: 0;
  box-shadow: inset 0 3px 10px rgba(0,0,0,0.75);
}

.grid-tile {
  background: linear-gradient(180deg, #572a18 0%, #33160c 100%);
  border: 1.5px solid rgba(255, 237, 213, 0.22);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.95rem, 1.45vw, 1.32rem);
  cursor: pointer;
  position: relative;
  transition: transform 0.1s ease, background 0.12s ease, border-color 0.12s ease;
}

.grid-tile:hover {
  transform: scale(1.06);
  border-color: var(--gold-michelin);
  background: rgba(234, 88, 12, 0.55);
}

.grid-tile.selected {
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.28);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.8);
  transform: scale(1.08);
}

.grid-tile.booster-tile {
  background: radial-gradient(circle, #ca8a04 0%, #713f12 100%);
  border-color: #fef08a;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.65);
}

.grid-tile.hazard-fire {
  background: radial-gradient(circle, #dc2626 0%, #450a0a 100%);
  border-color: #fca5a5;
  animation: pulseBurn 0.5s infinite alternate;
}

.grid-tile.hazard-dish {
  background: radial-gradient(circle, #475569 0%, #1e293b 100%);
  border-color: #94a3b8;
}

.tile-tag {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-size: 0.46rem;
  font-weight: 900;
  color: #fde047;
  pointer-events: none;
}

/* Modal Overlay */
.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2%;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  width: min(820px, 92%);
  max-height: 88%;
  background: linear-gradient(180deg, #3b180e 0%, #1f0c07 100%);
  border: 2.5px solid var(--gold-michelin);
  border-radius: 16px;
  padding: 1.1rem 1.3rem;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.9);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid rgba(250, 204, 21, 0.35);
  padding-bottom: 0.6rem;
  margin-bottom: 0.8rem;
}

.modal-header h3 {
  color: var(--gold-bright);
  font-size: 1.1rem;
}

.close-modal-btn {
  background: #dc2626;
  color: #fff;
  border: 1.5px solid rgba(254, 240, 138, 0.75);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}

.chefbill-noti-preprompt {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 95;
  display: none;
  width: min(440px, 92vw);
  pointer-events: auto;
}

.chefbill-noti-preprompt.open {
  display: block;
}

.chefbill-noti-card {
  background: linear-gradient(180deg, #3b180e 0%, #1f0c07 100%);
  border: 2.5px solid var(--gold-michelin);
  border-radius: 16px;
  padding: 0.9rem 1.05rem;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.9);
  color: #fef3c7;
}

.chefbill-noti-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 900;
  color: #451a03;
  background: #facc15;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 0.35rem;
}

.chefbill-noti-card h4 {
  margin: 0.15rem 0 0.35rem;
  color: #fef08a;
  font-size: 1.02rem;
}

.chefbill-noti-card p {
  margin: 0 0 0.7rem;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #fde68a;
}

.chefbill-noti-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.chefbill-noti-btn {
  border: none;
  border-radius: 99px;
  padding: 0.45rem 0.95rem;
  font-weight: 900;
  font-size: 0.82rem;
  cursor: pointer;
}

.chefbill-noti-btn.allow {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ffffff;
  box-shadow: 0 3px 0 #14532d;
}

.chefbill-noti-btn.later {
  background: rgba(255, 255, 255, 0.12);
  color: #fef3c7;
  border: 1px solid rgba(250, 204, 21, 0.4);
}

.mission-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.mission-item-card {
  background: rgba(0,0,0,0.45);
  border: 1.5px solid rgba(250, 204, 21, 0.4);
  border-radius: 10px;
  padding: 0.55rem;
  cursor: pointer;
  transition: all 0.14s ease;
}

.mission-item-card:hover, .mission-item-card.active-mission {
  border-color: #fde047;
  background: rgba(154, 52, 18, 0.65);
}

.mission-item-card h4 {
  font-size: 0.82rem;
  color: #fef08a;
  margin-bottom: 0.2rem;
}

.mission-item-card p {
  font-size: 0.7rem;
  color: #fed7aa;
}

/* ==========================================================================
   ART-01: CHIBI PSEUDO-3D SPRITES, WARM RIM-LIGHT & SQUASH-AND-STRETCH
   ========================================================================== */
.chibi-sprite {
  display: block;
  object-fit: contain;
  pointer-events: none;
  transform-origin: bottom center;
  will-change: transform;
  animation: chibiBreathe 2.8s ease-in-out infinite;
}

/* Warm Rim-Light Anti-Paper-Cutout Filters */
.rim-ba3 {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.75))
          drop-shadow(0 -1px 5px rgba(239, 68, 68, 0.68))
          drop-shadow(0 0 8px rgba(250, 204, 21, 0.42));
}

.rim-ba4 {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.75))
          drop-shadow(0 -1px 5px rgba(249, 115, 22, 0.75))
          drop-shadow(0 0 8px rgba(253, 224, 71, 0.48));
}

.rim-judge {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.75))
          drop-shadow(0 0 6px rgba(250, 204, 21, 0.65));
}

.rim-guest {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.75))
          drop-shadow(0 0 5px rgba(251, 191, 36, 0.55));
}

/* Specific Chibi Sprite Sizes on Hub & Battle Screen */
.mc-sprite {
  width: 52px;
  height: 52px;
}

.sous-sprite {
  width: 42px;
  height: 42px;
  animation-delay: -0.9s;
}

.judge-hub-sprite {
  width: 42px;
  height: 42px;
  animation-delay: -0.45s;
}

.guest-hub-sprite {
  width: 26px;
  height: 26px;
  animation-delay: -1.2s;
}

.battle-mc-sprite {
  width: 38px;
  height: 38px;
}

.skill-sous-sprite {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.j-mini-sprite {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.18);
}

/* Mr Bin (~3-4yo toddler 1.6-heads-tall) noticeably smaller */
.j-mini-toddler {
  width: 18px;
  height: 18px;
}

.k80-guest-sprite {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* 2.5D Puppet Squash-and-Stretch Breathing & Action Keyframes */
@keyframes chibiBreathe {
  0%, 100% {
    transform: scale3d(1, 1, 1) translateY(0);
  }
  50% {
    transform: scale3d(1.035, 0.965, 1) translateY(1px);
  }
}

@keyframes chibiActionJump {
  0% { transform: scale3d(1, 1, 1) translateY(0); }
  30% { transform: scale3d(1.14, 0.88, 1) translateY(2px); }
  65% { transform: scale3d(0.92, 1.15, 1) translateY(-6px) rotate(-4deg); }
  100% { transform: scale3d(1, 1, 1) translateY(0); }
}

.chibi-bounce-now {
  animation: chibiActionJump 0.48s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* ==========================================================================
   ART-02 & ART-03: PSEUDO-3D TILES, POTS, DIORAMA STAGE & B3-1 SLICE UI
   ========================================================================== */

/* Hub Pseudo-3D Pots, Brass Tray & Ingredient Chips */
.station-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.station-mini-img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

.tray-showcase-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.28rem;
}

.hub-tray-sprite {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 8px rgba(250, 204, 21, 0.55));
}

.dish-slot-img {
  width: 26px;
  height: 26px;
  margin: 0 auto 2px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.65));
}

.tray-dish-slot span {
  display: block;
  font-weight: 800;
  color: #fff;
}

.tray-dish-slot small {
  display: block;
  font-size: 0.52rem;
  color: #fde68a;
  font-weight: 700;
}

.ing-chip-sprite {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

/* State 1: 3-2-1 Bếp Ơi Countdown Overlay */
.countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: radial-gradient(circle, rgba(42, 12, 8, 0.88) 0%, rgba(10, 4, 3, 0.94) 100%);
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.countdown-overlay.active {
  display: flex;
}

.countdown-card {
  background: linear-gradient(180deg, #451a03 0%, #1c0a04 100%);
  border: 3px solid var(--gold-michelin);
  border-radius: 20px;
  padding: 1.4rem 2.4rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(250, 204, 21, 0.45);
}

.countdown-mission-tag {
  font-size: clamp(0.78rem, 1.1vw, 0.98rem);
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.countdown-big-num {
  font-size: clamp(2.6rem, 4.8vw, 4.2rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 4px 16px rgba(239, 68, 68, 0.95), 0 0 24px rgba(250, 204, 21, 0.85);
  animation: chibiActionJump 0.55s ease infinite;
}

.countdown-sub {
  margin-top: 0.45rem;
  font-size: clamp(0.68rem, 0.92vw, 0.82rem);
  color: #fed7aa;
  font-weight: 700;
}

/* 2.5D Kitchen Diorama Stage behind the 3 Pots */
.kitchen-diorama-stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(180deg, rgba(69, 18, 12, 0.88) 0%, rgba(28, 9, 6, 0.95) 100%);
  border: 1.5px solid rgba(250, 204, 21, 0.42);
  border-radius: 9px;
  padding: 0.18rem 0.45rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -8px 18px rgba(239, 68, 68, 0.22);
}

.kitchen-diorama-stage.ba4-diorama {
  background: linear-gradient(180deg, rgba(78, 28, 10, 0.88) 0%, rgba(30, 11, 5, 0.95) 100%);
  box-shadow: inset 0 -8px 18px rgba(249, 115, 22, 0.25);
}

.diorama-chefs-group,
.diorama-vip-judges {
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
}

.diorama-actor {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.diorama-mc-img {
  width: 44px;
  height: 44px;
}

.diorama-sous-img {
  width: 36px;
  height: 36px;
}

.diorama-vip-img {
  width: 34px;
  height: 34px;
}

.actor-name-tag {
  font-size: 0.46rem;
  font-weight: 800;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.65);
  padding: 0 4px;
  border-radius: 4px;
  margin-top: -3px;
  white-space: nowrap;
}

.diorama-speech-bubble {
  background: rgba(255, 251, 235, 0.95);
  color: #451a03;
  border: 1.5px solid #f59e0b;
  border-radius: 8px;
  padding: 0.18rem 0.45rem;
  font-size: clamp(0.5rem, 0.66vw, 0.58rem);
  line-height: 1.25;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* 3 Pots with Pseudo-3D Sprites & Recipe Requirement Pills */
.pot-main-row {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  text-align: left;
}

.pot-sprite-img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.pot-info-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pot-reqs-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.req-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: 5px;
  padding: 1px 4px;
  font-size: clamp(0.46rem, 0.6vw, 0.54rem);
  color: #fef3c7;
  font-weight: 700;
}

.req-pill.req-done {
  background: rgba(22, 101, 52, 0.9);
  border-color: #4ade80;
  color: #fff;
}

.req-mini-img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.tray-title-with-img {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pass-tray-mini-img {
  width: 20px;
  height: 20px;
}

.pass-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

/* Pseudo-3D Sprite inside Match-3 Grid Tile */
.tile-sprite-img {
  width: 74%;
  height: 74%;
  max-width: 36px;
  max-height: 36px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.72));
  transition: transform 0.12s ease;
}

.grid-tile:hover .tile-sprite-img {
  transform: scale(1.1);
}

.fx-flying-sprite {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 8px rgba(250, 204, 21, 0.8));
}

/* K80 Thermal Receipt Result Sheet */
.k80-receipt-sheet {
  background: #fffbeb;
  color: #292524;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  border: 2px dashed #d97706;
  border-top: 6px solid #dc2626;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  font-family: 'Consolas', 'Courier New', monospace;
}

.k80-judges-celebration {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.6rem;
  background: linear-gradient(90deg, #fef3c7, #fde68a, #fef3c7);
  border: 1.5px solid #f59e0b;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.65rem;
}

.k80-judge-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  color: #7c2d12;
}

.k80-judge-badge img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* ==========================================================================
   COMBO 1 + 4: CAPYBILL-STYLE PRE-RENDERED 3D STAGE PLATES +
   DIEGETIC 2.5D SCENE STAGING + 3D GRAPHIC UI SPRITES (ZERO FLASH CSS BOXES)
   ========================================================================== */

/* Hide Hub Top Bar when inside Kitchen Battle so 100% of 16:9 viewport is used */
#game-viewport:has(#battle-screen.active) .top-hud {
  display: none !important;
}

/* Screen-reader & automated-test text preserved while displaying pure 3D Graphic Button Sprites */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.graphic-img-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s cubic-bezier(0.2, 0.9, 0.3, 1.3), filter 0.14s ease;
}

.graphic-img-btn:hover {
  transform: translateY(-4px) scale(1.06);
  filter: brightness(1.08) drop-shadow(0 0 18px rgba(250, 204, 21, 0.9));
}

.graphic-img-btn:active {
  transform: translateY(2px) scale(0.96);
}

.graphic-btn-sprite {
  display: block;
  height: clamp(64px, 7.2vh, 84px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.9));
}

.cta-play-sprite {
  height: clamp(78px, 9.2vh, 108px);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.94)) drop-shadow(0 0 20px rgba(249, 115, 22, 0.85));
}

.serve-btn-sprite {
  height: clamp(62px, 7vh, 82px);
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.92));
}

#p1-serve-btn.ready-glow .serve-btn-sprite {
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 26px rgba(74, 222, 128, 1))
    drop-shadow(0 0 18px rgba(250, 204, 21, 0.95));
  animation: pulseReadyBell 0.65s ease-in-out infinite alternate;
}

@keyframes pulseReadyBell {
  0% { transform: scale(1); }
  100% { transform: scale(1.08) translateY(-3px); }
}

/* ==========================================================================
   SCREEN 1: 3D COURTYARD FESTIVAL HUB (stage_hub_courtyard.jpg)
   Diegetic Placement matching Concept Art 1:
   - Top-Center Pavilion: 4 Large Judges (Ms Su, Mr Cún, Ms Tin, Mr Bin)
   - Left 3D Booth: Hero Trio Side-by-Side (Ms Bụp — Bà 3 — Ms Nhon) + 3 Pots
   - Right 3D Booth: Hero Trio Side-by-Side (Mr Mụp — Bà 4 — Ms Beo) + 3 Pots
   - Center Pedestal: Glowing VS Emblem + Large Mâm Đồng 3 Món (No Dark Box!)
   - Foreground Crowd: 5 Large Cheering Bill Universe Guests + 3D Play Buttons
   ========================================================================== */
.hub-backdrop {
  background-image: url('../assets/ui/stage_hub_courtyard.jpg') !important;
  background-size: cover !important;
  background-position: center center !important;
  opacity: 1 !important;
  filter: none !important;
}

.hub-backdrop::after {
  background: radial-gradient(
    ellipse 88% 82% at 50% 48%,
    rgba(20, 6, 2, 0.02) 0%,
    rgba(12, 4, 2, 0.42) 100%
  ) !important;
}

.top-hud {
  height: 7.5% !important;
  background: linear-gradient(180deg, rgba(22, 7, 3, 0.84) 0%, rgba(22, 7, 3, 0.2) 82%, transparent 100%) !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 0.25% 1.4% !important;
}

#hub-screen {
  padding: 0.2% 1.4% 0.6% !important;
  gap: 0.2% !important;
  justify-content: space-between !important;
}

/* 1. VIP Judges Pavilion (Large Chibi Judges Seated Inside 3D Central Pavilion Arch) */
.judges-grand-stage {
  width: min(920px, 64%);
  margin: 0 auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 0 !important;
}

.judges-banner-title {
  display: none !important;
}

.judges-row {
  display: flex !important;
  justify-content: center !important;
  gap: clamp(1.2rem, 2.2vw, 2.4rem) !important;
}

.judge-card {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.judge-card.active {
  background: transparent !important;
  transform: translateY(-6px) scale(1.08);
}

.judge-avatar {
  width: clamp(92px, 10.8vh, 122px) !important;
  height: clamp(92px, 10.8vh, 122px) !important;
  background: radial-gradient(circle at 50% 62%, rgba(250, 204, 21, 0.38) 0%, transparent 70%) !important;
  border: none !important;
}

.judge-hub-sprite {
  width: clamp(92px, 10.8vh, 122px) !important;
  height: clamp(92px, 10.8vh, 122px) !important;
  transform: translateY(4px);
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.94)) drop-shadow(0 0 14px rgba(250, 204, 21, 0.7));
}

.judge-avatar-toddler .judge-hub-sprite {
  width: clamp(78px, 9.2vh, 104px) !important;
  height: clamp(78px, 9.2vh, 104px) !important;
}

.judge-info {
  background: linear-gradient(180deg, #6b2910 0%, #321105 100%);
  border: 2px solid #fde047;
  border-bottom: 4px solid #140501;
  border-radius: 999px;
  padding: 2px 14px;
  margin-top: -10px;
  z-index: 3;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.92);
}

.judge-info span {
  display: none !important;
}

.score-paddle {
  position: absolute;
  top: 2px;
  right: -6px;
  width: 30px !important;
  height: 30px !important;
  font-size: 0.82rem !important;
  z-index: 4;
}

.judge-speech-box {
  max-width: 680px;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%) !important;
  color: #451a03 !important;
  border: 2px solid #d97706 !important;
  border-bottom: 4px solid #78350f !important;
  border-radius: 999px !important;
  padding: 3px 18px !important;
  font-size: clamp(0.64rem, 0.84vw, 0.78rem) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.88) !important;
}

/* 2. Left & Right 3D Courtyard Kitchen Booths (Hero Trio Standing Side-by-Side!) */
.courtyard-middle {
  grid-template-columns: 1.18fr 0.86fr 1.18fr !important;
  gap: 1.2% !important;
  align-items: center !important;
}

.team-wing {
  background: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 0.4rem !important;
  justify-content: center !important;
  gap: 0.25rem !important;
}

.team-wing.selected-team {
  background: radial-gradient(ellipse 78% 70% at 50% 48%, rgba(250, 204, 21, 0.28) 0%, transparent 72%) !important;
  border: none !important;
  box-shadow: none !important;
}

/* Center Hero Master Chef + Carved Wooden Booth Signboard */
.wing-header {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: 3px;
}

.wing-title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.mc-badge-icon {
  width: clamp(160px, 19vh, 215px) !important;
  height: clamp(160px, 19vh, 215px) !important;
  background: radial-gradient(circle at 50% 58%, rgba(251, 146, 60, 0.44) 0%, transparent 70%) !important;
  border: none !important;
  margin-top: 0;
}

.mc-sprite {
  width: clamp(160px, 19vh, 215px) !important;
  height: clamp(160px, 19vh, 215px) !important;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 20px rgba(250, 204, 21, 0.8));
}

.wing-title-group > div {
  background: linear-gradient(180deg, #883214 0%, #3b1206 100%);
  border: 2.5px solid #fde047;
  border-bottom: 5px solid #1a0602;
  border-radius: 999px;
  padding: 3px 20px;
  margin-top: -16px;
  z-index: 7;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.92);
}

.wing-title-group p {
  display: none !important;
}

.team-select-tag {
  margin-top: 2px;
  padding: 2px 14px !important;
  font-size: clamp(0.64rem, 0.82vw, 0.76rem) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.88);
}

/* Sous-Chefs Flanking Left & Right of the Master Chef Inside the 3D Booth! */
.sous-chefs-grid {
  position: relative;
  z-index: 5;
  display: flex !important;
  justify-content: space-between !important;
  width: 96%;
  margin: clamp(-145px, -16vh, -105px) auto 4px !important;
  padding: 0 2%;
  pointer-events: none;
}

.sous-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  pointer-events: auto;
}

.sous-icon {
  width: clamp(108px, 13vh, 146px) !important;
  height: clamp(108px, 13vh, 146px) !important;
  background: transparent !important;
  border: none !important;
}

.sous-sprite {
  width: clamp(108px, 13vh, 146px) !important;
  height: clamp(108px, 13vh, 146px) !important;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.94)) drop-shadow(0 0 14px rgba(251, 146, 60, 0.65));
}

.sous-text {
  background: linear-gradient(180deg, #5c240e 0%, #2e1005 100%);
  border: 1.5px solid #fde047;
  border-bottom: 4px solid #140501;
  border-radius: 999px;
  padding: 2px 12px;
  margin-top: -12px;
  z-index: 6;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.92);
}

.sous-text strong {
  font-size: clamp(0.62rem, 0.8vw, 0.74rem) !important;
}

.sous-text span {
  display: none !important;
}

/* 3 Sizzling Pots sitting directly on the Booth Countertop (No Rectangular Cards!) */
.wing-stations-row {
  display: flex !important;
  justify-content: center !important;
  gap: 1.1rem !important;
  margin-top: 4px;
}

.station-mini {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  font-size: 0 !important;
}

.station-mini-img {
  width: clamp(56px, 6.8vh, 76px) !important;
  height: clamp(56px, 6.8vh, 76px) !important;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 12px rgba(249, 115, 22, 0.7));
}

.station-mini b {
  display: inline-block;
  background: rgba(28, 10, 4, 0.88);
  border: 1.5px solid #f59e0b;
  border-bottom: 3px solid #140501;
  border-radius: 999px;
  padding: 1px 10px;
  margin-top: -6px;
  font-size: clamp(0.58rem, 0.74vw, 0.68rem) !important;
  color: #fef08a;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
}

.wing-mission-bar {
  align-self: center;
  width: auto !important;
  background: rgba(28, 10, 4, 0.88) !important;
  border: 1.5px solid #fde047 !important;
  border-bottom: 4px solid #140501 !important;
  border-radius: 999px !important;
  padding: 3px 16px !important;
  gap: 0.6rem !important;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.88) !important;
}

/* 3. Center Wooden Showcase Pedestal (Glowing VS Emblem + Large Mâm Đồng 3 Món, No Dark Box!) */
.center-pedestal {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.4rem !important;
}

.vs-emblem {
  background: radial-gradient(circle at 35% 30%, #ef4444 0%, #991b1b 65%, #450a0a 100%) !important;
  border: 3px solid #fde047 !important;
  border-bottom: 5px solid #450a0a !important;
  border-radius: 999px !important;
  padding: 4px 20px !important;
  font-size: clamp(0.75rem, 1vw, 0.92rem) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.9), 0 0 22px rgba(250, 204, 21, 0.75) !important;
}

.brass-tray-showcase {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

.tray-showcase-head {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 0 !important;
}

.hub-tray-sprite {
  width: clamp(130px, 15.5vh, 178px) !important;
  height: clamp(130px, 15.5vh, 178px) !important;
  filter:
    drop-shadow(0 14px 18px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 24px rgba(250, 204, 21, 0.85));
}

.tray-showcase-head > div {
  background: linear-gradient(180deg, #7c2d12 0%, #3b1206 100%);
  border: 2px solid #fde047;
  border-bottom: 4px solid #1a0602;
  border-radius: 999px;
  padding: 3px 16px;
  margin-top: -14px;
  z-index: 4;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.92);
}

.tray-showcase-head small {
  display: none !important;
}

.tray-3-dishes {
  display: flex !important;
  justify-content: center !important;
  gap: 0.5rem !important;
}

.tray-dish-slot {
  background: rgba(28, 10, 4, 0.88) !important;
  border: 1.5px solid #fde047 !important;
  border-bottom: 4px solid #120401 !important;
  border-radius: 999px !important;
  padding: 2px 10px 2px 5px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.88) !important;
}

.dish-slot-img {
  width: 30px !important;
  height: 30px !important;
}

.tray-dish-slot small {
  display: none !important;
}

.center-pedestal > div:last-child > div:first-child {
  display: none !important;
}

/* 4. Foreground Cheering Bill Universe Guests + 3D Graphic Bottom Dock */
.market-guests-strip {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-end !important;
  margin-bottom: -8px;
  z-index: 12;
  pointer-events: none;
}

/* Hide Market Strip on Main Stage so Foreground Cheering Guests Stand Out */
.market-guests-strip > .strip-panel:first-child {
  display: none !important;
}

.market-guests-strip > .strip-panel:last-child {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  pointer-events: auto;
}

.market-guests-strip .strip-label {
  display: none !important;
}

.guests-row {
  display: flex !important;
  justify-content: center !important;
  gap: clamp(1rem, 2vw, 2.2rem) !important;
}

.guest-chip {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.guest-chip:hover {
  transform: translateY(-6px) scale(1.08);
}

.guest-hub-sprite {
  width: clamp(68px, 8.2vh, 94px) !important;
  height: clamp(68px, 8.2vh, 94px) !important;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.94)) drop-shadow(0 0 12px rgba(56, 189, 248, 0.55));
}

.guest-chip span {
  background: rgba(24, 8, 3, 0.9);
  border: 1.5px solid #fde047;
  border-bottom: 3px solid #120401;
  border-radius: 999px;
  padding: 1px 10px;
  margin-top: -8px;
  font-size: clamp(0.56rem, 0.72vw, 0.66rem) !important;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
}

.bottom-dock {
  position: relative;
  z-index: 15;
  padding-top: 0 !important;
  align-items: center !important;
}

/* ==========================================================================
   SCREEN 2: 3D KITCHEN BATTLE STAGE (stage_kitchen_battle.jpg)
   Matches Concept Art 2:
   - Layer Z-0: Pre-Rendered 3D Kitchen Interior Stage Plate (100% Viewport)
   - Layer Z-1: Top Brushed-Steel Hanging K80 Ticket Rail & Carved Wooden Clock
   - Layer Z-2: Large Diegetic Chefs + 3 Sizzling 3D Pots on Stove Burners
   - Layer Z-3: Large 3D Perspective-Tilted Wooden Chopping Board (Zero Text Clutter!)
   - Layer Z-4: Glowing Curved Bezier Light Beams (#fx-arc-svg)
   ========================================================================== */
#battle-screen {
  background:
    radial-gradient(ellipse 92% 88% at 50% 50%, rgba(25, 8, 3, 0.04) 0%, rgba(12, 4, 2, 0.45) 100%),
    url('../assets/ui/stage_kitchen_battle.jpg') center center / cover no-repeat !important;
  perspective: 1200px;
  padding: 0.35% 1.4% 0.5% !important;
  gap: 0.25% !important;
}

/* Layer Z-4: 3D Glowing Curved Energy Beams SVG Overlay */
.fx-arc-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 54;
  overflow: visible;
}

.fx-arc-glow {
  fill: none;
  stroke: #fb7185;
  stroke-width: 16;
  stroke-linecap: round;
  opacity: 0.65;
  filter: blur(6px);
}

.fx-arc-core {
  fill: none;
  stroke: #fef08a;
  stroke-width: 6.5;
  stroke-linecap: round;
  stroke-dasharray: 14 8;
  filter: drop-shadow(0 0 8px #facc15) drop-shadow(0 0 18px #f97316);
  animation: arcDashFlow 0.32s linear infinite;
}

@keyframes arcDashFlow {
  from { stroke-dashoffset: 22; }
  to { stroke-dashoffset: 0; }
}

/* Layer Z-1: Floating Brushed-Steel Ticket Rail at Top of Kitchen */
.battle-header {
  position: relative;
  background: linear-gradient(180deg, rgba(24, 8, 3, 0.84) 0%, rgba(24, 8, 3, 0.3) 85%, transparent 100%) !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.35rem 0.6rem 0.15rem !important;
  box-shadow: none !important;
}

.battle-header::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 12px;
  right: 12px;
  height: 7px;
  border-radius: 99px;
  background: linear-gradient(180deg, #f8fafc 0%, #94a3b8 48%, #334155 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.k80-ticket {
  position: relative;
  margin-top: 4px;
  border-bottom: 4px solid #b45309 !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.88) !important;
  transform: perspective(300px) rotateX(-5deg);
  transform-origin: top center;
}

.timer-badge {
  background: linear-gradient(180deg, #7c2d12 0%, #451a03 100%) !important;
  border: 2.5px solid #fde047 !important;
  border-bottom: 5px solid #1c0802 !important;
  border-radius: 14px !important;
  padding: 3px 18px !important;
  font-size: clamp(0.95rem, 1.4vw, 1.25rem) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.92), 0 0 16px rgba(250, 204, 21, 0.55) !important;
}

.battle-live-commentary {
  display: none !important;
}

/* ==========================================================================
   DUAL-KITCHEN VS SHOWDOWN STAGE (LEFT: TEAM BÀ 3 vs RIGHT: TEAM BÀ 4)
   Matches chefbill_gameplay_concept.jpg 1:1
   ========================================================================== */
#p2-serve-btn.ready-glow .serve-btn-sprite {
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 26px rgba(74, 222, 128, 1))
    drop-shadow(0 0 18px rgba(250, 204, 21, 0.95));
  animation: pulseReadyBell 0.65s ease-in-out infinite alternate;
}

.battle-arena-split {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1.2% !important;
  flex: 1;
  min-height: 0;
}

.battle-arena-split #p1-container,
.battle-arena-split #p2-container {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 0.14rem !important;
  padding: 0 0.25rem 0.2rem !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-width: 0;
  min-height: 0;
}

.battle-arena-split .p1-left-kitchen-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-height: 0;
}

/* Floating Circular Sous-Chef Medallions & Score Pill (Left & Right Kitchens) */
.battle-arena-split .side-top-bar {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 0.2rem !important;
  margin-bottom: -6px;
  z-index: 22;
}

.battle-arena-split .side-chef-id {
  background: rgba(32, 11, 5, 0.86);
  border: 2px solid #f59e0b;
  border-bottom: 4px solid #1a0602;
  border-radius: 999px;
  padding: 2px 10px 2px 4px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.88);
}

.battle-arena-split .side-chef-id small {
  display: none !important;
}

.battle-arena-split .sous-skill-btn {
  border-radius: 999px;
  border: 2px solid #fde047;
  border-bottom: 4px solid #451a03;
  background: radial-gradient(circle at 35% 30%, #b45309 0%, #451a03 100%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.88), 0 0 12px rgba(250, 204, 21, 0.45);
  padding: 2px 10px 2px 4px;
}

.battle-arena-split .side-score-box {
  background: rgba(32, 11, 5, 0.88);
  border: 2px solid #fde047;
  border-bottom: 4px solid #1a0602;
  border-radius: 999px;
  padding: 2px 12px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.88);
}

.battle-arena-split .overcooked-kitchen-zone {
  background: transparent !important;
  border: none !important;
  padding: 0;
  gap: 0;
  position: relative;
}

/* Large Diegetic Chefs & Center VIP Guests standing inside Left & Right 3D Kitchen Booths */
.battle-arena-split .kitchen-diorama-stage {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.45rem;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 0.6% 0;
  margin: 0 0 -18px;
  z-index: 12;
}

/* Mirror Right Kitchen (#p2-diorama) so Bà 4, Mr Mụp & Ms Beo stand at the Right Counter and VIP Judges sit toward Center! */
.battle-arena-split #p2-diorama {
  flex-direction: row-reverse;
}

.battle-arena-split .diorama-chefs-group {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding-bottom: 4px;
}

.battle-arena-split .diorama-actor {
  position: relative;
}

.battle-arena-split .diorama-mc-img {
  width: clamp(98px, 11.4vh, 132px);
  height: clamp(98px, 11.4vh, 132px);
  transform: translateY(6px);
  filter:
    drop-shadow(0 10px 12px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 14px rgba(251, 146, 60, 0.78));
}

.battle-arena-split .diorama-sous-img {
  width: clamp(78px, 9.2vh, 106px);
  height: clamp(78px, 9.2vh, 106px);
  transform: translateY(6px);
  filter:
    drop-shadow(0 8px 10px rgba(0, 0, 0, 0.94))
    drop-shadow(0 0 10px rgba(250, 204, 21, 0.62));
}

/* VIP Guests seated toward the Center 2-Tier Pavilion */
.battle-arena-split .diorama-vip-judges {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 0.25rem 4px;
}

.battle-arena-split .diorama-vip-img {
  width: clamp(80px, 9.4vh, 108px);
  height: clamp(80px, 9.4vh, 108px);
  transform: translateY(4px);
  filter:
    drop-shadow(0 9px 12px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 12px rgba(250, 204, 21, 0.68));
}

.battle-arena-split .actor-name-tag {
  position: relative;
  z-index: 4;
  margin-top: -10px;
  font-size: clamp(0.52rem, 0.68vw, 0.64rem);
  padding: 1px 7px;
  border: 1.5px solid #fde047;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.92);
}

.battle-arena-split .diorama-speech-bubble {
  flex: 1;
  max-width: 310px;
  align-self: center;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #d97706;
  border-bottom: 4px solid #78350f;
  border-radius: 16px;
  padding: 0.22rem 0.65rem;
  font-size: clamp(0.52rem, 0.68vw, 0.62rem);
  line-height: 1.25;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.88);
}

/* 3 Sizzling 3D Pots on Left & Right Stove Counters (Zero Box Cards!) */
.battle-arena-split .pots-3-row {
  position: relative;
  z-index: 16;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  width: 98%;
  margin: 0 auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  transform: none !important;
}

.battle-arena-split .cook-pot {
  position: relative;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.battle-arena-split .cook-pot.cooked .pot-burner-wrap {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.78) 0%, rgba(21, 128, 61, 0.9) 65%, transparent 72%);
  border-color: #4ade80;
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.9), 0 8px 14px rgba(0, 0, 0, 0.92);
}

/* Glowing Circular Stove Burner Ring + Circular Medallion under each 3D Pot */
.pot-burner-wrap {
  position: relative;
  width: clamp(66px, 7.8vh, 88px);
  height: clamp(66px, 7.8vh, 88px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.75) 0%, rgba(124, 45, 18, 0.9) 65%, transparent 72%);
  border: 2.5px solid #fde047;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.85), 0 8px 14px rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pot-medallion {
  position: absolute;
  top: -5px;
  left: -6px;
  z-index: 5;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  background: radial-gradient(circle, #f97316 0%, #9a3412 100%);
  border: 2px solid #fef08a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.92);
}

.pot-medallion.cooked {
  background: radial-gradient(circle, #22c55e 0%, #15803d 100%);
  border-color: #fff;
}

.battle-arena-split .pot-sprite-img {
  width: clamp(64px, 7.5vh, 84px);
  height: clamp(64px, 7.5vh, 84px);
  transform: translateY(-5px) scale(1.16);
  filter:
    drop-shadow(0 8px 8px rgba(0, 0, 0, 0.95))
    drop-shadow(0 -2px 10px rgba(251, 146, 60, 0.85));
}

.battle-arena-split .pot-main-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.battle-arena-split .pot-info-col {
  background: rgba(28, 9, 4, 0.88);
  border: 1.5px solid #f59e0b;
  border-bottom: 3.5px solid #140501;
  border-radius: 12px;
  padding: 2px 7px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.9);
}

.battle-arena-split .cook-pot.cooked .pot-info-col {
  background: rgba(14, 62, 32, 0.92);
  border-color: #4ade80;
  border-bottom-color: #052e16;
}

.battle-arena-split .pot-top-line {
  background: rgba(24, 8, 3, 0.9);
  border: 1.5px solid rgba(250, 204, 21, 0.75);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: clamp(0.48rem, 0.6vw, 0.58rem);
  gap: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.88);
}

.battle-arena-split .req-pill {
  font-size: clamp(0.5rem, 0.62vw, 0.58rem);
  padding: 1px 6px;
  border-bottom: 2.5px solid rgba(0, 0, 0, 0.75);
  border-radius: 999px;
}

.battle-arena-split .req-mini-img {
  width: 15px;
  height: 15px;
}

.cook-pot.pot-receiving-glow .pot-burner-wrap {
  border-color: #fef08a !important;
  box-shadow: 0 0 34px rgba(250, 204, 21, 1), inset 0 0 20px rgba(74, 222, 128, 0.9) !important;
  transform: translateY(-5px) scale(1.08);
}

/* Counter Pass Ledge: Compact Floating Sink + Brass Tray + 3D Graphic Serve Bell Button */
.battle-arena-split .kitchen-pass-row {
  width: 98%;
  margin: 2px auto 0;
  z-index: 17;
  gap: 0.45rem;
  align-items: center;
}

.battle-arena-split .sink-station,
.battle-arena-split .brass-tray-pass {
  background: rgba(28, 10, 4, 0.86) !important;
  border-radius: 999px !important;
  border: 1.5px solid #f59e0b !important;
  border-bottom: 4px solid #140501 !important;
  padding: 2px 10px !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.88) !important;
}

.battle-arena-split .serve-btn-sprite {
  height: clamp(48px, 5.6vh, 64px);
}

/* ==========================================================================
   LAYER Z-3 (LOWER FOREGROUND):
   TWIN 3D PERSPECTIVE-TILTED WOODEN CHOPPING BOARDS (LEFT: BÀ 3 vs RIGHT: BÀ 4)
   ========================================================================== */
.battle-arena-split .board-wrapper {
  flex: 1;
  width: 98%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.12rem;
  min-height: 0;
  perspective: 950px;
}

/* Hide the old 3-step HTML instruction banner so the 3D kitchen is unobstructed */
.match3-howto-banner {
  display: none !important;
}

/* Sleek Floating Hint Pill right above each 3D Chopping Board */
.board-hint-bar {
  width: 96%;
  margin: 0 auto;
  background: rgba(32, 11, 5, 0.86);
  border: 1.5px solid #f59e0b;
  border-bottom: 4px solid #140501;
  border-radius: 999px;
  padding: 2px 12px;
  font-size: clamp(0.52rem, 0.66vw, 0.62rem);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.85);
}

.board-hint-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.auto-move-btn {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  color: #fff;
  border: 1.5px solid #fef08a;
  border-bottom: 3.5px solid #052e16;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: clamp(0.5rem, 0.64vw, 0.6rem);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.75);
}

.board-stage-inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  perspective: 760px;
  padding-bottom: 6px;
}

/* TWIN 3D PERSPECTIVE-TILTED WOODEN BUTCHER-BLOCK CHOPPING BOARDS (8x6 = 48 GEMS) */
.battle-arena-split .match-grid-board {
  width: 96%;
  margin: 0 auto;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: clamp(3px, 0.42vw, 6px);
  padding: clamp(5px, 0.65vw, 9px) clamp(7px, 0.85vw, 12px) clamp(8px, 0.95vw, 12px);
  background:
    repeating-linear-gradient(90deg, rgba(255, 210, 140, 0.045) 0px, rgba(255, 210, 140, 0.045) 22px, rgba(0, 0, 0, 0.06) 22px, rgba(0, 0, 0, 0.06) 44px),
    linear-gradient(180deg, #9a4e24 0%, #6e3214 55%, #4a1e0a 100%);
  border-top: 4px solid #fde68a;
  border-left: 5px solid #b45309;
  border-right: 5px solid #b45309;
  border-bottom: 16px solid #2b1004;
  border-radius: 18px;
  transform: rotateX(15deg);
  transform-origin: center bottom;
  transform-style: preserve-3d;
  box-shadow:
    0 10px 0 #140602,
    0 22px 36px rgba(0, 0, 0, 0.96),
    inset 0 4px 12px rgba(255, 224, 165, 0.45),
    inset 0 -8px 16px rgba(0, 0, 0, 0.75);
}

/* 3D Extruded Wooden Tile Cubes inside Recessed Chopping Board Slots (Zero Text Strip!) */
.grid-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 13px;
  border-top: 2.5px solid rgba(255, 243, 214, 0.58);
  border-left: 2px solid rgba(255, 220, 165, 0.32);
  border-right: 2px solid rgba(255, 220, 165, 0.32);
  border-bottom: 7px solid #230c04;
  background: radial-gradient(circle at 50% 42%, #854221 0%, #4e210e 78%, #321307 100%);
  box-shadow:
    0 4px 0 #120501,
    0 8px 14px rgba(0, 0, 0, 0.82),
    inset 0 3px 6px rgba(255, 255, 255, 0.28);
  user-select: none;
  touch-action: none;
  transform-style: preserve-3d;
}

/* Large, Glossy 2.5D Ingredient Sprites Popping Out of the 3D Tilted Boards */
.battle-arena-split .tile-sprite-img {
  width: 88%;
  height: 88%;
  max-width: 58px;
  max-height: 58px;
  transform: translateY(-3px) scale(1.16);
  filter:
    drop-shadow(0 7px 5px rgba(0, 0, 0, 0.92))
    drop-shadow(0 -1px 5px rgba(255, 237, 213, 0.52));
}

.grid-tile:hover {
  transform: translateY(-5px) scale(1.06);
}

/* Compact Circular Top Badge for Swap Hint (⇄) or Explosion (💥) */
.tile-top-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 900;
  border-radius: 50%;
  pointer-events: none;
  z-index: 6;
}

/* Auto-Hint: 2 adjacent tiles elevated in 3D space that can be swapped */
.grid-tile.hint-swap-tile {
  border-top: 3px solid #fef08a;
  border-left: 2.5px solid #facc15;
  border-right: 2.5px solid #facc15;
  border-bottom: 8px solid #a16207;
  background: radial-gradient(circle at 50% 42%, rgba(250, 204, 21, 0.68) 0%, rgba(146, 64, 14, 0.96) 100%);
  box-shadow:
    0 6px 0 #451a03,
    0 0 20px rgba(250, 204, 21, 0.98),
    inset 0 0 12px rgba(254, 240, 138, 0.6);
  animation: hintPulseSwap3D 0.75s ease-in-out infinite alternate;
  z-index: 4;
}

.grid-tile.hint-swap-tile .tile-top-badge {
  background: #facc15;
  color: #1c0a04;
  border: 2px solid #fff;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.85);
}

/* Auto-Hint: Partner tiles that will complete the Match-3 row/col */
.grid-tile.hint-partner-tile {
  border: 2.5px solid #4ade80;
  border-bottom: 7px solid #14532d;
  background: radial-gradient(circle at 50% 42%, rgba(34, 197, 94, 0.38) 0%, rgba(56, 24, 12, 0.94) 100%);
  box-shadow: 0 4px 0 #052e16, 0 0 14px rgba(74, 222, 128, 0.55);
}

/* Neighbor indicator when a player selects 1 tile to swap */
.grid-tile.swappable-neighbor {
  border: 2.5px dashed #38bdf8;
  border-bottom: 7px solid #0369a1;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.42), rgba(30, 15, 10, 0.92));
}

.grid-tile.swappable-neighbor .tile-top-badge {
  background: #0284c7;
  color: #fff;
  border: 1.5px solid #fff;
}

/* Phase 1 Visible Explosion: 3D Pop-Up Match-3 Tiles Glowing Before Launching */
.grid-tile.tile-matched-popping {
  border-top: 3px solid #fff !important;
  border-left: 3px solid #fef08a !important;
  border-right: 3px solid #fef08a !important;
  border-bottom: 9px solid #15803d !important;
  background: radial-gradient(circle, #4ade80 0%, #16a34a 52%, #ca8a04 100%) !important;
  box-shadow:
    0 9px 0 #052e16,
    0 0 28px rgba(250, 204, 21, 1),
    0 0 16px rgba(74, 222, 128, 1) !important;
  transform: translateY(-8px) scale(1.1) !important;
  z-index: 10 !important;
}

.grid-tile.tile-matched-popping .tile-top-badge {
  background: #dc2626;
  color: #fef08a;
  border: 2px solid #fef08a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.9);
}

@keyframes hintPulseSwap3D {
  0% { transform: translateY(-2px) scale(1); }
  100% { transform: translateY(-6px) scale(1.06); }
}

/* Floating Match-3 Action Toast Banner right over each 3D Board */
.match-toast-banner {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 30;
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  color: #fef08a;
  border: 2.5px solid #fef08a;
  border-bottom: 5px solid #450a0a;
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: clamp(0.64rem, 0.85vw, 0.78rem);
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.92), 0 0 24px rgba(250, 204, 21, 0.88);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.match-toast-banner.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ==========================================================================
   V4 HEROIC CHARACTER SCALE + MULTI-PLANE 3D PARALLAX & DEPTH-OF-FIELD STAGE
   Matches chefbill_main_hub_concept.jpg & chefbill_gameplay_concept.jpg 1:1
   ========================================================================== */
#game-viewport {
  --px: 0;
  --py: 0;
}

#hub-screen,
#battle-screen {
  position: relative;
  overflow: hidden;
  background: #140502 !important;
}

/* Layer 0: Crisp 2.5D Diorama Stage Plate (No Blur Separation — Unified Color Grading!) */
.parallax-bg-layer {
  position: absolute;
  inset: -3.5%;
  z-index: 10;
  pointer-events: none;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: translate3d(calc(var(--px, 0) * -18px), calc(var(--py, 0) * -10px), 0) scale(1.04);
  filter: brightness(0.9) saturate(1.16) contrast(1.06);
  will-change: transform;
}

.hub-parallax-bg {
  background-image: url('../assets/ui/stage_hub_courtyard.jpg');
}

.battle-parallax-bg {
  background-image: url('../assets/ui/stage_kitchen_battle.jpg');
}

/* Layer 0.5: Warm Stage Spotlights & Floating Bokeh Glow Behind Hero Characters */
.parallax-bokeh-layer {
  position: absolute;
  inset: -2%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle 340px at 20% 48%, rgba(251, 146, 60, 0.34) 0%, transparent 72%),
    radial-gradient(circle 340px at 80% 48%, rgba(250, 204, 21, 0.32) 0%, transparent 72%),
    radial-gradient(circle 300px at 50% 24%, rgba(253, 224, 71, 0.28) 0%, transparent 70%),
    radial-gradient(ellipse 95% 90% at 50% 50%, transparent 45%, rgba(10, 3, 1, 0.62) 100%);
  transform: translate3d(calc(var(--px, 0) * -10px), calc(var(--py, 0) * -6px), 0);
  will-change: transform;
}

/* Ensure all Foreground Content sits above the Parallax Stage Layers */
#hub-screen > *:not(.parallax-bg-layer):not(.parallax-bokeh-layer),
#battle-screen > *:not(.parallax-bg-layer):not(.parallax-bokeh-layer):not(#fx-projectile-layer):not(.countdown-overlay) {
  position: relative;
  z-index: 5;
}

/* --- Glowing Neon VS Emblem Circle (Hub & Battle Center) --- */
.neon-vs-circle {
  width: clamp(54px, 6.2vh, 68px);
  height: clamp(54px, 6.2vh, 68px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  font-weight: 900;
  letter-spacing: 1px;
  color: #fef08a;
  background: radial-gradient(circle at 38% 32%, #ef4444 0%, #991b1b 55%, #1e1b4b 100%);
  border: 3px solid #38bdf8;
  box-shadow:
    0 0 18px rgba(56, 189, 248, 0.95),
    0 0 32px rgba(239, 68, 68, 0.85),
    inset 0 0 12px rgba(254, 240, 138, 0.65),
    0 8px 18px rgba(0, 0, 0, 0.92);
  text-shadow: 0 0 10px #facc15, 0 3px 6px #000;
  z-index: 25;
}

/* ==========================================================================
   MAIN HUB (#hub-screen): HEROIC CHARACTER SCALE + PARALLAX FOREGROUND PLANES
   ========================================================================== */
#hub-screen {
  padding: 44px 1.2% 0.35% !important;
  justify-content: space-between !important;
}

/* Plane 1: 4 Grand Judges on VIP Balcony (Scaled up to 155px-182px!) */
#hub-screen .judges-grand-stage {
  transform: translate3d(calc(var(--px, 0) * 8px), calc(var(--py, 0) * 5px), 0);
  margin-top: -4px;
  gap: 0.1rem !important;
}

#hub-screen .judges-row {
  gap: clamp(1rem, 2.2vw, 2.2rem) !important;
}

#hub-screen .judge-avatar {
  width: clamp(134px, 15.6vh, 174px) !important;
  height: clamp(134px, 15.6vh, 174px) !important;
  background: radial-gradient(circle at 50% 58%, rgba(250, 204, 21, 0.52) 0%, transparent 70%) !important;
}

#hub-screen .judge-hub-sprite {
  width: clamp(134px, 15.6vh, 174px) !important;
  height: clamp(134px, 15.6vh, 174px) !important;
  filter:
    drop-shadow(0 14px 18px rgba(0, 0, 0, 0.96))
    drop-shadow(0 0 20px rgba(250, 204, 21, 0.88)) !important;
}

#hub-screen .judge-avatar-toddler,
#hub-screen .judge-avatar-toddler .judge-hub-sprite {
  width: clamp(114px, 13.4vh, 148px) !important;
  height: clamp(114px, 13.4vh, 148px) !important;
}

#hub-screen .score-paddle {
  top: 8px !important;
  right: -8px !important;
  width: 38px !important;
  height: 38px !important;
  font-size: 1rem !important;
  border: 2.5px solid #fff !important;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.92), 0 0 14px rgba(250, 204, 21, 0.9) !important;
}

#hub-screen .judge-info {
  margin-top: -16px !important;
  padding: 3px 18px !important;
}

#hub-screen .judge-info strong {
  font-size: clamp(0.74rem, 0.95vw, 0.88rem) !important;
}

/* Plane 2: Left & Right Kitchen Booths — Giant Hero Chefs (260px-305px) & Sous-Chefs (185px-222px)! */
#hub-screen .courtyard-middle {
  grid-template-columns: 1.24fr 0.78fr 1.24fr !important;
  gap: 0.6% !important;
  margin-top: -12px;
  transform: translate3d(calc(var(--px, 0) * 16px), calc(var(--py, 0) * 9px), 0);
}

.wing-roof-sign {
  position: absolute;
  top: -18px;
  z-index: 14;
  background: linear-gradient(180deg, #9a3412 0%, #431407 100%);
  color: #fef08a;
  font-size: clamp(0.88rem, 1.18vw, 1.12rem);
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 22px;
  border-radius: 12px;
  border: 2.5px solid #facc15;
  border-bottom: 5px solid #1c0802;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.92), 0 0 18px rgba(251, 146, 60, 0.65);
  text-shadow: 0 2px 4px #000;
}

.ba3-roof-sign {
  left: 18px;
  transform: rotate(-4deg);
}

.ba4-roof-sign {
  right: 18px;
  transform: rotate(4deg);
}

#hub-screen .team-wing {
  position: relative;
  gap: 0.1rem !important;
}

/* Giant Hero Master Chefs Bà 3 & Bà 4 (250px - 305px!) */
#hub-screen .mc-badge-icon {
  width: clamp(235px, 26.8vh, 298px) !important;
  height: clamp(235px, 26.8vh, 298px) !important;
  background: radial-gradient(circle at 50% 54%, rgba(251, 146, 60, 0.58) 0%, transparent 68%) !important;
}

#hub-screen .mc-sprite {
  width: clamp(235px, 26.8vh, 298px) !important;
  height: clamp(235px, 26.8vh, 298px) !important;
  filter:
    drop-shadow(0 18px 24px rgba(0, 0, 0, 0.98))
    drop-shadow(0 0 28px rgba(250, 204, 21, 0.92)) !important;
}

#hub-screen .wing-title-group > div {
  margin-top: -26px !important;
  padding: 4px 24px !important;
  border-width: 2.5px !important;
}

#hub-screen .wing-title-group h3 {
  font-size: clamp(0.84rem, 1.08vw, 1.02rem) !important;
}

/* Giant Flanking Sous-Chefs Ms Bụp, Ms Nhon, Mr Mụp, Ms Beo (178px - 222px!) */
#hub-screen .sous-chefs-grid {
  width: 100% !important;
  margin: clamp(-215px, -23.5vh, -170px) auto 0 !important;
  padding: 0 !important;
  z-index: 8;
}

#hub-screen .sous-icon {
  width: clamp(168px, 19.2vh, 214px) !important;
  height: clamp(168px, 19.2vh, 214px) !important;
}

#hub-screen .sous-sprite {
  width: clamp(168px, 19.2vh, 214px) !important;
  height: clamp(168px, 19.2vh, 214px) !important;
  filter:
    drop-shadow(0 14px 18px rgba(0, 0, 0, 0.96))
    drop-shadow(0 0 20px rgba(251, 146, 60, 0.85)) !important;
}

#hub-screen .sous-text {
  margin-top: -18px !important;
  padding: 3px 14px !important;
}

#hub-screen .sous-text strong {
  font-size: clamp(0.68rem, 0.86vw, 0.8rem) !important;
}

/* Sizzling Counter Pots right in front of the Chefs' Hands */
#hub-screen .wing-stations-row {
  margin-top: -10px !important;
  gap: 1.35rem !important;
  z-index: 10;
}

#hub-screen .station-mini-img {
  width: clamp(76px, 8.8vh, 98px) !important;
  height: clamp(76px, 8.8vh, 98px) !important;
  filter:
    drop-shadow(0 10px 14px rgba(0, 0, 0, 0.96))
    drop-shadow(0 0 16px rgba(249, 115, 22, 0.88)) !important;
}

/* Center Pedestal: Neon VS Circle + Giant Mâm Đồng 3 Món */
#hub-screen .center-pedestal {
  gap: 0.22rem !important;
  margin-top: -6px;
}

#hub-screen .vs-emblem {
  display: none !important;
}

#hub-screen .hub-tray-sprite {
  width: clamp(168px, 19.2vh, 214px) !important;
  height: clamp(168px, 19.2vh, 214px) !important;
  margin-top: -6px;
}

/* Plane 3: Close Foreground — 5 Giant Cheering Bill Universe Guests Framing the Center CTA Button! */
#hub-screen .market-guests-strip {
  width: 100%;
  margin-top: -18px;
  margin-bottom: 0 !important;
  z-index: 18 !important;
  overflow: visible !important;
  transform: translate3d(calc(var(--px, 0) * 26px), calc(var(--py, 0) * 12px), 0);
}

#hub-screen .guests-row {
  width: 100%;
  justify-content: space-between !important;
  align-items: flex-end !important;
  padding: 0 0.8%;
  gap: 0.4rem !important;
  overflow: visible !important;
}

/* Create the Center Stage Opening between MukBill (3rd) and BabyBill (4th) for the Giant VÀO BẾP NGAY Button! */
#hub-screen .guest-chip:nth-child(3) {
  margin-right: clamp(460px, 36vw, 560px) !important;
}

#hub-screen .guest-hub-sprite {
  width: clamp(132px, 15vh, 168px) !important;
  height: clamp(132px, 15vh, 168px) !important;
  filter:
    drop-shadow(0 14px 18px rgba(0, 0, 0, 0.96))
    drop-shadow(0 0 18px rgba(56, 189, 248, 0.78)) !important;
}

#hub-screen .guest-chip span {
  margin-top: -14px !important;
  padding: 2px 12px !important;
  font-size: clamp(0.64rem, 0.82vw, 0.76rem) !important;
}

/* Center the 3D Graphic Action Buttons right in the Foreground Opening between Left & Right Guests! */
#hub-screen .bottom-dock {
  justify-content: center !important;
  gap: 0.55rem !important;
  margin-top: clamp(-108px, -11.8vh, -82px) !important;
  padding-bottom: 2px !important;
  z-index: 24 !important;
  pointer-events: none;
  transform: translate3d(calc(var(--px, 0) * 26px), calc(var(--py, 0) * 12px), 0);
}

#hub-screen .bottom-dock > * {
  pointer-events: auto;
}

#hub-screen .dock-nav-btns {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
}

#hub-screen #btn-open-missions {
  height: auto !important;
  min-height: 0 !important;
  padding: 2px 14px !important;
  font-size: 0.66rem !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #7c2d12 0%, #3b1206 100%) !important;
  border: 2px solid #fde047 !important;
  border-bottom: 4px solid #1a0602 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.9) !important;
}

#hub-screen .cta-play-sprite {
  height: clamp(74px, 8.8vh, 96px) !important;
}

#hub-screen .dock-btn .graphic-btn-sprite {
  height: clamp(58px, 6.8vh, 76px) !important;
}

/* ==========================================================================
   BATTLE SCREEN (#battle-screen): HEROIC CHARACTER SCALE + PARALLAX VS ARENA
   Matches chefbill_gameplay_concept.jpg 1:1
   ========================================================================== */
#battle-screen .battle-arena-split {
  position: relative;
}

/* Center Floating Neon VS Emblem between Left Kitchen (Bà 3) & Right Kitchen (Bà 4) */
.battle-vs-circle {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 45;
  pointer-events: none;
}

/* Parallax shift on the Midground Chefs/Pots (z-index 30 so Serve Bell sits above Board Hint Bar!) */
#battle-screen .overcooked-kitchen-zone {
  position: relative;
  z-index: 30 !important;
  transform: translate3d(calc(var(--px, 0) * 14px), calc(var(--py, 0) * 8px), 0);
}

#battle-screen .board-wrapper {
  position: relative;
  z-index: 15 !important;
  transform: translate3d(calc(var(--px, 0) * 24px), calc(var(--py, 0) * 12px), 0);
}

/* Scale Up Battle Characters (Bà 3 & Bà 4: 170px-212px, Sous-Chefs: 136px-172px, VIPs: 132px-166px!) */
.battle-arena-split .kitchen-diorama-stage {
  position: relative;
  margin: -8px 0 -28px !important;
  padding: 0 1% !important;
  z-index: 12;
}

/* Float the Speech Bubble cleanly as a single-line pill so it never squishes between the giant characters! */
.battle-arena-split .diorama-speech-bubble {
  position: absolute !important;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 76% !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 12px !important;
  font-size: 0.58rem !important;
  border-radius: 999px !important;
  z-index: 25;
  margin: 0 !important;
  pointer-events: none;
}

.battle-arena-split .diorama-mc-img {
  width: clamp(164px, 18.4vh, 208px) !important;
  height: clamp(164px, 18.4vh, 208px) !important;
  transform: translateY(10px);
  filter:
    drop-shadow(0 14px 18px rgba(0, 0, 0, 0.96))
    drop-shadow(0 0 24px rgba(251, 146, 60, 0.94)) !important;
}

.battle-arena-split .diorama-sous-img {
  width: clamp(132px, 14.8vh, 168px) !important;
  height: clamp(132px, 14.8vh, 168px) !important;
  transform: translateY(10px);
  filter:
    drop-shadow(0 12px 16px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 18px rgba(250, 204, 21, 0.85)) !important;
}

.battle-arena-split .diorama-vip-img {
  width: clamp(128px, 14.4vh, 162px) !important;
  height: clamp(128px, 14.4vh, 162px) !important;
  transform: translateY(8px);
  filter:
    drop-shadow(0 12px 16px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 18px rgba(250, 204, 21, 0.85)) !important;
}

.battle-arena-split .pot-burner-wrap {
  width: clamp(86px, 9.8vh, 110px) !important;
  height: clamp(86px, 9.8vh, 110px) !important;
}

.battle-arena-split .pot-sprite-img {
  width: clamp(80px, 9.2vh, 102px) !important;
  height: clamp(80px, 9.2vh, 102px) !important;
}

/* Compact the middle pass row so Giant Characters + 3 Pots + 3D Chopping Boards fit 100% cleanly! */
.battle-arena-split .brass-tray-pass {
  display: none !important;
}

.battle-arena-split .kitchen-pass-row {
  position: absolute;
  right: 4px;
  bottom: -36px;
  z-index: 40 !important;
  width: auto !important;
  margin: 0 !important;
  gap: 0.35rem !important;
  pointer-events: none;
}

.battle-arena-split .kitchen-pass-row > * {
  pointer-events: auto;
}

.battle-arena-split .sink-station {
  padding: 2px 10px !important;
}

.battle-arena-split .sink-info strong {
  display: none !important;
}

.battle-arena-split .serve-btn-sprite {
  height: clamp(46px, 5.4vh, 60px) !important;
}

.battle-arena-split .board-hint-bar {
  padding-right: 265px !important;
}
.battle-arena-split .board-hint-actions .mini-shuffle-btn {
  display: none !important;
}

/* ==========================================================================
   V5 MOBILE-FIRST GIANT FOOD SPRITES & CHUNKY WOODEN/GOLDEN LABEL TYPOGRAPHY
   - Massively enlarges all food/pot/dish/ingredient sprites on Hub & Battle
   - Replaces tiny sentences with high-contrast 16px-24px Visual Labels
   ========================================================================== */

/* --- 1. TOP HUD BAR: BOLD READABLE LABELS & CURRENCY PILLS --- */
.top-hud {
  height: 52px !important;
  padding: 0 1.2rem !important;
}

.hud-appicon {
  width: 42px !important;
  height: 42px !important;
}

.hud-title-box h1 {
  font-size: clamp(1.15rem, 1.5vw, 1.42rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.6px !important;
  color: #fef08a !important;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.95), 0 0 12px rgba(245, 158, 11, 0.65) !important;
}

.hud-title-box p {
  display: none !important;
}

.currency-pill {
  font-size: clamp(0.98rem, 1.22vw, 1.16rem) !important;
  font-weight: 900 !important;
  padding: 4px 16px !important;
  border: 2.5px solid #facc15 !important;
  border-bottom: 4px solid #1c0802 !important;
  background: linear-gradient(180deg, #451a03 0%, #1c0802 100%) !important;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.9) !important;
}

.top-hud .hud-btn {
  font-size: clamp(0.92rem, 1.12vw, 1.06rem) !important;
  font-weight: 900 !important;
  padding: 5px 16px !important;
  border: 2px solid #facc15 !important;
  border-bottom: 4px solid #1c0802 !important;
}

/* --- 2. MAIN HUB (#hub-screen): GIANT CENTER 3-DISH TRAY, BIG POTS & CHUNKY LABELS --- */
#hub-screen .judge-info {
  padding: 4px 18px !important;
  border: 2.5px solid #fde047 !important;
  border-bottom: 5px solid #1a0602 !important;
  background: linear-gradient(180deg, #7c2d12 0%, #3b1206 100%) !important;
}

#hub-screen .judge-info strong {
  font-size: clamp(0.98rem, 1.22vw, 1.16rem) !important;
  letter-spacing: 0.3px !important;
  text-shadow: 0 2px 4px #000 !important;
}

#hub-screen .score-paddle {
  width: 46px !important;
  height: 46px !important;
  font-size: 1.38rem !important;
  font-weight: 900 !important;
  border: 3px solid #fff !important;
}

#hub-screen .judge-speech-box {
  font-size: clamp(0.95rem, 1.18vw, 1.12rem) !important;
  font-weight: 900 !important;
  padding: 4px 22px !important;
  background: linear-gradient(180deg, #9a3412 0%, #431407 100%) !important;
  color: #fef08a !important;
  border: 2.5px solid #facc15 !important;
  border-bottom: 5px solid #1c0802 !important;
  border-radius: 999px !important;
  text-shadow: 0 2px 4px #000 !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.92) !important;
}

/* Roof Signs & Chef Nameplates on Hub */
.wing-roof-sign {
  font-size: clamp(1.12rem, 1.45vw, 1.38rem) !important;
  padding: 5px 26px !important;
  border-width: 3px !important;
  border-bottom-width: 6px !important;
}

#hub-screen .wing-title-group h3 {
  font-size: clamp(1.04rem, 1.32vw, 1.24rem) !important;
  font-weight: 900 !important;
  text-shadow: 0 2px 4px #000 !important;
}

#hub-screen .team-select-tag {
  font-size: clamp(0.88rem, 1.08vw, 1.02rem) !important;
  font-weight: 900 !important;
  padding: 4px 16px !important;
  border-width: 2px !important;
}

#hub-screen .sous-text {
  padding: 4px 16px !important;
  border: 2.5px solid #fde047 !important;
  border-bottom: 5px solid #1a0602 !important;
  background: linear-gradient(180deg, #7c2d12 0%, #3b1206 100%) !important;
}

#hub-screen .sous-text strong {
  font-size: clamp(0.94rem, 1.16vw, 1.1rem) !important;
  font-weight: 900 !important;
  color: #fef08a !important;
  text-shadow: 0 2px 4px #000 !important;
}

/* Giant Sizzling Pots on Left & Right Wings (118px - 134px!) + Bold Dish Label */
#hub-screen .wing-stations-row {
  margin-top: -14px !important;
  gap: 1.1rem !important;
}

#hub-screen .station-mini-img {
  width: clamp(112px, 13vh, 136px) !important;
  height: clamp(112px, 13vh, 136px) !important;
  filter:
    drop-shadow(0 12px 16px rgba(0, 0, 0, 0.96))
    drop-shadow(0 0 20px rgba(249, 115, 22, 0.92)) !important;
}

#hub-screen .station-mini b {
  margin-top: -14px !important;
  padding: 3px 12px !important;
  font-size: clamp(0.84rem, 1.04vw, 0.98rem) !important;
  font-weight: 900 !important;
  color: #fef08a !important;
  background: linear-gradient(180deg, #7c2d12 0%, #320f04 100%) !important;
  border: 2px solid #facc15 !important;
  border-bottom: 4px solid #140501 !important;
  border-radius: 999px !important;
  text-shadow: 0 2px 4px #000 !important;
  white-space: nowrap !important;
}

#hub-screen .wing-mission-bar {
  padding: 5px 18px !important;
  font-size: clamp(0.88rem, 1.08vw, 1.02rem) !important;
  font-weight: 900 !important;
  border: 2.5px solid #facc15 !important;
  border-bottom: 5px solid #140501 !important;
  background: linear-gradient(180deg, #451a03 0%, #1c0802 100%) !important;
}

/* GIANT CENTER 3-DISH BRASS TRAY (290px - 336px!) + 3 WOODEN DISH LABEL TAGS */
#hub-screen .courtyard-middle {
  grid-template-columns: 1.14fr 0.98fr 1.14fr !important;
}

#hub-screen .center-pedestal {
  gap: 0.14rem !important;
  margin-top: -16px !important;
}

#hub-screen .hub-tray-sprite {
  width: clamp(286px, 31vh, 336px) !important;
  height: clamp(286px, 31vh, 336px) !important;
  margin-top: -14px !important;
  filter:
    drop-shadow(0 18px 26px rgba(0, 0, 0, 0.96))
    drop-shadow(0 0 34px rgba(250, 204, 21, 0.95)) !important;
}

#hub-screen #active-tray-title {
  margin-top: -32px !important;
  padding: 5px 24px !important;
  font-size: clamp(1.04rem, 1.3vw, 1.24rem) !important;
  font-weight: 900 !important;
  color: #fef08a !important;
  background: linear-gradient(180deg, #b45309 0%, #451a03 100%) !important;
  border: 2.5px solid #fde047 !important;
  border-bottom: 5px solid #1c0802 !important;
  border-radius: 999px !important;
  text-shadow: 0 2px 4px #000 !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.94) !important;
  position: relative;
  z-index: 6;
}

#hub-screen .tray-3-dishes {
  display: flex !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  margin-top: 2px !important;
}

#hub-screen .tray-dish-slot {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 3px 11px 3px 5px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #7c2d12 0%, #320f04 100%) !important;
  border: 2px solid #facc15 !important;
  border-bottom: 4px solid #140501 !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.92) !important;
}

#hub-screen .dish-slot-img {
  width: 34px !important;
  height: 34px !important;
  margin-top: 0 !important;
  filter:
    drop-shadow(0 4px 6px rgba(0, 0, 0, 0.9))
    drop-shadow(0 0 8px rgba(251, 146, 60, 0.85)) !important;
}

#hub-screen .tray-dish-slot span {
  font-size: clamp(0.84rem, 1.02vw, 0.96rem) !important;
  font-weight: 900 !important;
  color: #fef08a !important;
  text-shadow: 0 2px 4px #000 !important;
  white-space: nowrap !important;
  margin-top: 0 !important;
}

/* Chunky 3D Arcade Mode Switch Pills (Single Line!) */
#hub-screen .mode-switch-group {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  margin-top: 3px !important;
}

#hub-screen .mode-pill-btn {
  font-size: clamp(0.86rem, 1.04vw, 0.98rem) !important;
  font-weight: 900 !important;
  padding: 5px 13px !important;
  white-space: nowrap !important;
  border-radius: 12px !important;
  border: 2.5px solid rgba(250, 204, 21, 0.78) !important;
  border-bottom: 5px solid #140501 !important;
  text-shadow: 0 2px 3px #000 !important;
}

#hub-screen .mode-pill-btn.active {
  background: linear-gradient(180deg, #facc15 0%, #ca8a04 100%) !important;
  color: #1c0802 !important;
  border-color: #fff !important;
  border-bottom-color: #713f12 !important;
  text-shadow: none !important;
}

/* Foreground Guests & Mission Button Labels */
#hub-screen .guest-chip span {
  padding: 4px 16px !important;
  font-size: clamp(0.92rem, 1.14vw, 1.08rem) !important;
  font-weight: 900 !important;
  border: 2.5px solid #fde047 !important;
  border-bottom: 5px solid #120401 !important;
  background: linear-gradient(180deg, #7c2d12 0%, #2e0d04 100%) !important;
  color: #fef08a !important;
  text-shadow: 0 2px 4px #000 !important;
}

#hub-screen #btn-open-missions {
  padding: 4px 18px !important;
  font-size: clamp(0.9rem, 1.1vw, 1.04rem) !important;
  font-weight: 900 !important;
  border-width: 2.5px !important;
  border-bottom-width: 5px !important;
}

/* ==========================================================================
   3. BATTLE SCREEN (#battle-screen): GIANT POTS, BIG FOOD TILES & VISUAL LABELS
   ========================================================================== */

/* Top Battle Header: Visual K80 Order Cards + Large Clock + Bold Action Buttons */
.k80-ticket {
  min-width: 192px !important;
  padding: 4px 10px !important;
  border-radius: 12px !important;
}

.k80-guest-sprite {
  width: 34px !important;
  height: 34px !important;
}

.k80-guest-line span {
  font-size: clamp(0.88rem, 1.06vw, 1rem) !important;
  font-weight: 900 !important;
  color: #1c0802 !important;
}

.k80-price-tag {
  background: #dc2626;
  color: #fef08a;
  font-size: clamp(0.86rem, 1.04vw, 0.98rem) !important;
  font-weight: 900 !important;
  padding: 1px 8px;
  border-radius: 999px;
}

.k80-dishes {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 2px !important;
  font-size: clamp(0.82rem, 0.98vw, 0.94rem) !important;
  font-weight: 900 !important;
  color: #7c2d12 !important;
}

.k80-dish-icon {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.mode-tag-pill,
.mission-tag-pill {
  font-size: clamp(0.88rem, 1.08vw, 1.02rem) !important;
  font-weight: 900 !important;
  padding: 4px 14px !important;
  border: 2px solid #facc15 !important;
  border-bottom: 4px solid #140501 !important;
}

.timer-badge {
  font-size: clamp(1.22rem, 1.65vw, 1.52rem) !important;
  font-weight: 900 !important;
  padding: 3px 20px !important;
}

.battle-judges-mini .j-mini {
  font-size: clamp(0.88rem, 1.06vw, 1rem) !important;
  font-weight: 900 !important;
  padding: 2px 10px !important;
}

.battle-judges-mini .j-mini-sprite {
  width: 30px !important;
  height: 30px !important;
}

.battle-header-actions .hud-btn {
  font-size: clamp(0.88rem, 1.06vw, 1rem) !important;
  font-weight: 900 !important;
  padding: 5px 12px !important;
  border: 2px solid #facc15 !important;
  border-bottom: 4px solid #140501 !important;
}

/* Team Top Bar: Bold Team Labels, Skill Buttons & Score Box */
.battle-arena-split .side-chef-id {
  padding: 3px 14px 3px 5px !important;
}

.battle-arena-split .battle-mc-sprite {
  width: 42px !important;
  height: 42px !important;
}

.battle-arena-split .side-chef-id strong {
  font-size: clamp(0.96rem, 1.18vw, 1.12rem) !important;
  font-weight: 900 !important;
  color: #fef08a !important;
}

.battle-arena-split .sous-skill-btn {
  padding: 3px 12px 3px 5px !important;
}

.battle-arena-split .skill-sous-sprite {
  width: 40px !important;
  height: 40px !important;
}

.battle-arena-split .skill-btn-txt span {
  font-size: clamp(0.86rem, 1.04vw, 0.98rem) !important;
  font-weight: 900 !important;
}

.battle-arena-split .skill-btn-txt b {
  font-size: clamp(0.78rem, 0.94vw, 0.88rem) !important;
  font-weight: 900 !important;
}

.battle-arena-split .side-score-box {
  padding: 3px 16px !important;
}

.battle-arena-split .side-score-box span {
  font-size: clamp(1.08rem, 1.35vw, 1.28rem) !important;
  font-weight: 900 !important;
}

.battle-arena-split .side-score-box small {
  font-size: clamp(0.84rem, 1.02vw, 0.96rem) !important;
  font-weight: 900 !important;
}

/* Comic Action Speech Label & Character Name Tags on Battle Stage */
.battle-arena-split .diorama-speech-bubble {
  padding: 4px 18px !important;
  font-size: clamp(0.9rem, 1.1vw, 1.04rem) !important;
  font-weight: 900 !important;
  color: #7c2d12 !important;
  border: 2.5px solid #f59e0b !important;
  border-bottom: 5px solid #78350f !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.92) !important;
}

.battle-arena-split .actor-name-tag {
  display: none !important;
}

/* GIANT 6 COOKING POTS (116px - 128px!) + BOLD DISH LABELS + BIG ICON COUNTERS */
.battle-arena-split .pot-burner-wrap {
  width: clamp(104px, 11.8vh, 126px) !important;
  height: clamp(104px, 11.8vh, 126px) !important;
  border-width: 3px !important;
}

.battle-arena-split .pot-sprite-img {
  width: clamp(102px, 11.6vh, 124px) !important;
  height: clamp(102px, 11.6vh, 124px) !important;
  transform: translateY(-6px) scale(1.22) !important;
  filter:
    drop-shadow(0 10px 12px rgba(0, 0, 0, 0.96))
    drop-shadow(0 0 16px rgba(251, 146, 60, 0.92)) !important;
}

.pot-medallion {
  width: 32px !important;
  height: 32px !important;
  font-size: 0.96rem !important;
  border-width: 2.5px !important;
}

.battle-arena-split .pot-top-line {
  padding: 3px 12px !important;
  font-size: clamp(0.86rem, 1.05vw, 1rem) !important;
  font-weight: 900 !important;
  border: 2px solid #facc15 !important;
  border-bottom: 4px solid #140501 !important;
  background: linear-gradient(180deg, #451a03 0%, #1c0802 100%) !important;
  gap: 6px !important;
}

.pot-label-title {
  color: #fef08a;
  font-weight: 900;
  text-shadow: 0 2px 4px #000;
}

.pot-status-tag {
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 900;
  font-size: clamp(0.78rem, 0.94vw, 0.88rem);
}

.pot-status-tag.status-idle,
.pot-status-tag.status-prep {
  background: #9a3412;
  color: #fde047;
}

.pot-status-tag.status-cooked {
  background: #15803d;
  color: #fff;
}

.pot-status-tag.status-burn {
  background: #dc2626;
  color: #fef08a;
}

.battle-arena-split .pot-info-col {
  padding: 4px 8px !important;
  border-width: 2px !important;
  border-bottom-width: 4px !important;
}

.battle-arena-split .pot-reqs-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.battle-arena-split .req-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: clamp(0.92rem, 1.12vw, 1.06rem) !important;
  font-weight: 900 !important;
  padding: 2px 9px !important;
  border: 1.5px solid rgba(250, 204, 21, 0.65) !important;
  border-bottom: 3px solid rgba(0, 0, 0, 0.85) !important;
}

.battle-arena-split .req-mini-img {
  width: 26px !important;
  height: 26px !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
}

/* Board Hint Bar, Sink & Serve Bell Button */
.battle-arena-split .board-hint-bar {
  padding: 4px 245px 4px 14px !important;
  font-size: clamp(0.9rem, 1.1vw, 1.04rem) !important;
  font-weight: 900 !important;
  border: 2px solid #f59e0b !important;
  border-bottom: 4px solid #140501 !important;
}

.hint-inline-sprite {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin: 0 2px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.85));
}

.auto-move-btn {
  font-size: clamp(0.86rem, 1.04vw, 0.98rem) !important;
  font-weight: 900 !important;
  padding: 4px 14px !important;
  border-width: 2px !important;
  border-bottom-width: 4px !important;
}

.battle-arena-split .sink-station {
  padding: 4px 12px !important;
  font-size: clamp(0.88rem, 1.06vw, 1rem) !important;
  font-weight: 900 !important;
}

.battle-arena-split .serve-btn-sprite {
  height: clamp(50px, 5.8vh, 64px) !important;
}

/* GIANT MATCH-3 FOOD TILES ON BOTH CHOPPING BOARDS */
.battle-arena-split .tile-sprite-img {
  width: 96% !important;
  height: 96% !important;
  max-width: 68px !important;
  max-height: 68px !important;
  transform: translateY(-4px) scale(1.24) !important;
  filter:
    drop-shadow(0 8px 6px rgba(0, 0, 0, 0.94))
    drop-shadow(0 -1px 6px rgba(255, 237, 213, 0.62)) !important;
}

.tile-top-badge {
  width: 26px !important;
  height: 26px !important;
  font-size: 0.82rem !important;
}

.match-toast-banner {
  font-size: clamp(0.96rem, 1.2vw, 1.14rem) !important;
  padding: 0.38rem 1.25rem !important;
  border-width: 3px !important;
  border-bottom-width: 6px !important;
}

/* ==========================================================================
   V6: MULTI-PLANE 2.5D DIORAMA & CHARACTER BLEND-IN ARCHITECTURE
   + 8x6 (48 GEMS) CANDY CRUSH x BEJEWELED KINETIC MATCH-3 ENGINE
   + MOBILE-FIRST RESPONSIVE (clamp(), dvh, vw, P1 Priority on Mobile)
   ========================================================================== */

/* --- 1. 5-PLANE Z-DEPTH SANDWICH (Z-10 -> Z-20 -> Z-30 -> Z-40 -> Z-50) --- */
.diorama-layer-z10 {
  z-index: 10 !important;
}

.parallax-bg-layer.diorama-layer-z10 {
  z-index: 0 !important;
}

.parallax-bokeh-layer.diorama-layer-z10 {
  z-index: 1 !important;
}

.stove-underglow-layer.diorama-layer-z10 {
  z-index: 2 !important;
}

.diorama-layer-z20 {
  z-index: 20 !important;
}

.diorama-layer-z30 {
  z-index: 30 !important;
}

.diorama-layer-z32 {
  z-index: 32 !important;
}

.diorama-layer-z40 {
  z-index: 40 !important;
}

.diorama-layer-z50 {
  z-index: 50 !important;
}

#battle-arena-split {
  position: relative !important;
  z-index: 20 !important;
}

/* Counter-Anchored Character Pivot (Hips Locked Behind Stone Counters at 50% 92%) */
.chibi-sprite,
.character-actor-sprite {
  transform-origin: 50% 92% !important;
  animation: chibiCounterBreathe 2.8s ease-in-out infinite;
}

/* Waist-Taper Alpha Blend so Behind-Counter Characters Sit Seamlessly Inside the Stage Architecture */
.mc-sprite,
.sous-sprite,
.judge-hub-sprite,
.diorama-mc-img,
.diorama-sous-img,
.diorama-vip-img {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 84%, rgba(0, 0, 0, 0.55) 95%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 84%, rgba(0, 0, 0, 0.55) 95%, transparent 100%);
}

/* Judge sprites already hold a golden "10" paddle in their hand; hide duplicate HTML circle */
#hub-screen .score-paddle {
  display: none !important;
}

@keyframes chibiCounterBreathe {
  0%, 100% {
    transform: scale3d(1, 1, 1) translateY(0) rotate(0deg);
  }
  50% {
    transform: scale3d(1.028, 0.972, 1) translateY(1.5px) rotate(0.55deg);
  }
}

/* --- 2. WARM STOVE UNDER-GLOW & AO CONTACT SHADOWS --- */
.stove-underglow-layer {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 12 !important;
  mix-blend-mode: screen;
  overflow: hidden;
}

.stove-glow,
.stove-glow-spot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 122, 24, 0.48) 0%,
    rgba(255, 209, 102, 0.26) 44%,
    transparent 72%
  );
  animation: stoveGlowPulse 2.4s ease-in-out infinite alternate;
}

.glow-ba3-stove {
  left: 6%;
  top: 38%;
  width: 30vw;
  height: 28vh;
}

.glow-ba4-wok {
  right: 6%;
  top: 38%;
  width: 30vw;
  height: 28vh;
  animation-delay: -1.1s;
}

.glow-judges-lantern {
  left: 35%;
  top: 6%;
  width: 30vw;
  height: 22vh;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 209, 102, 0.38) 0%,
    rgba(251, 146, 60, 0.18) 50%,
    transparent 74%
  );
}

@keyframes stoveGlowPulse {
  0% {
    opacity: 0.72;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1.06);
  }
}

.char-stove-rim-glow {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 72%,
    rgba(255, 122, 24, 0.44) 0%,
    rgba(255, 209, 102, 0.22) 48%,
    transparent 72%
  );
  mix-blend-mode: screen;
}

/* Ambient Occlusion (AO) Contact Shadows Under Elbows, Pots, Tray & Step-Stool */
.ao-contact-shadow {
  display: block;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(22, 8, 3, 0.78) 0%,
    rgba(22, 8, 3, 0.38) 48%,
    transparent 74%
  );
}

.ao-judges-elbows,
.judge-elbow-shadow {
  width: 78%;
  height: 14px;
  margin: 0 auto -10px;
  z-index: 25;
}

.ao-waist-shadow,
.chef-waist-shadow {
  width: 74%;
  height: 18px;
  margin: -16px auto 0;
  z-index: 25;
}

.ao-hands-board,
.ao-brass-table,
.ao-sauce-bowl,
.sous-waist-shadow {
  width: 70%;
  height: 14px;
  margin: -12px auto 0;
  z-index: 25;
}

/* Mr Mụp's 4-Legged Wooden Step-Stool & Contact Shadow */
.sous-card-mup .sous-icon,
.actor-on-stool {
  position: relative;
}

.ao-stool-feet,
.ao-mup-stool,
.stool-step-shadow {
  width: 84%;
  height: 16px;
  margin: -10px auto 0;
  background:
    linear-gradient(180deg, #9a4e24 0%, #5c280e 60%, #2b1004 100%),
    radial-gradient(ellipse at center, rgba(15, 5, 2, 0.9) 0%, transparent 75%);
  border: 1.5px solid #fbbf24;
  border-bottom: 4px solid #1c0802;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.92);
}

.ao-pot-base,
.pot-base-shadow {
  width: 82%;
  height: 12px;
  margin: 0 auto -8px;
}

.ao-pedestal-tray,
.tray-contact-shadow {
  width: 76%;
  height: 20px;
  margin: 0 auto -18px;
}

/* Diegetic Wooden Signboards & Arch Ribbon */
.judges-arch-ribbon {
  display: none !important;
}

/* --- 3. FOREGROUND COUNTER & DESK OCCLUSION CUTOUT MASKS (Z-30) --- */
.diorama-occlusion-masks {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 30 !important;
  overflow: hidden;
}

.occlusion-unit,
.occlusion-mask {
  position: absolute;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.occlusion-mask-img {
  width: 100%;
  height: 100%;
  max-height: inherit;
  object-fit: contain;
  pointer-events: none;
  filter:
    drop-shadow(0 10px 18px rgba(12, 4, 1, 0.92))
    drop-shadow(0 -2px 8px rgba(255, 160, 64, 0.35));
}

/* Hub Screen Counter & Desk Waist-Lip Moulding Masks */
#hub-screen .occ-judges-desk {
  left: 50%;
  top: 20.5%;
  transform: translateX(-50%);
  width: min(540px, 40vw);
  max-height: 5.5vh;
  clip-path: inset(58% 0 0 0);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 45%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 45%, #000 100%);
  opacity: 0.42;
}

#hub-screen .occ-counter-ba3 {
  left: 3.5%;
  top: 56%;
  width: min(360px, 25vw);
  max-height: 5.5vh;
  clip-path: inset(60% 0 0 0);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 45%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 45%, #000 100%);
  opacity: 0.38;
}

#hub-screen .occ-counter-ba4 {
  right: 3.5%;
  top: 56%;
  width: min(360px, 25vw);
  max-height: 5.5vh;
  clip-path: inset(60% 0 0 0);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 45%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 45%, #000 100%);
  opacity: 0.38;
}

/* Ensure Hub Judges' Paddles, Nameplates, Pots, Center Pedestal & Foreground Guests sit above Z-30 Masks */
#hub-screen .judge-info,
#hub-screen .score-paddle,
#hub-screen .judge-speech-box,
#hub-screen .wing-title-group > div,
#hub-screen .team-select-tag,
#hub-screen .sous-text,
#hub-screen .wing-mission-bar {
  position: relative;
  z-index: 36 !important;
}

#hub-screen .wing-stations-row,
#hub-screen .center-pedestal {
  position: relative;
  z-index: 40 !important;
}

/* Battle Screen Counter Waist-Lip Masks & Center Diorama Tower (Spectator Booth) */
#battle-screen .occ-battle-counter-ba3 {
  left: 2%;
  top: 25.5%;
  width: min(320px, 24vw);
  max-height: 4.5vh;
  clip-path: inset(62% 0 0 0);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.65) 45%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.65) 45%, #000 100%);
  opacity: 0.36;
}

#battle-screen .occ-battle-counter-ba4 {
  right: 2%;
  top: 25.5%;
  width: min(320px, 24vw);
  max-height: 4.5vh;
  clip-path: inset(62% 0 0 0);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.65) 45%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.65) 45%, #000 100%);
  opacity: 0.36;
}

/* Center Diorama Tower on Battle Screen: 5 Guests Seated in Center Wooden Spectator Booth */
.battle-center-diorama-tower {
  position: absolute !important;
  left: 50% !important;
  top: 17.5% !important;
  transform: translateX(-50%) scale(0.92) !important;
  width: clamp(150px, 13vw, 200px) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none !important;
  z-index: 32 !important;
}

/* Judges are already shown in .battle-judges-mini above; keep Center Spectator Booth focused & uncluttered */
.battle-vip-judges-balcony {
  display: none !important;
}

.vip-judges-seated-row,
.balcony-judges-actors {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  z-index: 20;
}

.vip-seated-judge img,
.balcony-judge-sprite {
  width: clamp(34px, 3.8vh, 46px) !important;
  height: clamp(34px, 3.8vh, 46px) !important;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.92));
}

.judge-pos-bin img,
.balcony-toddler-sprite {
  width: clamp(28px, 3.2vh, 38px) !important;
  height: clamp(28px, 3.2vh, 38px) !important;
}

.vip-judges-desk-mask,
.occ-battle-judges-desk {
  position: relative !important;
  width: 92%;
  max-height: 32px;
  margin-top: -12px;
  z-index: 30;
}

.vip-balcony-signboard {
  background: linear-gradient(180deg, #7c2d12 0%, #3b1206 100%);
  border: 1.5px solid #fde047;
  border-bottom: 3px solid #140501;
  border-radius: 999px;
  padding: 1px 8px;
  margin-top: -6px;
  font-size: 0.48rem;
  font-weight: 900;
  color: #fef08a;
  z-index: 40;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.9);
}

/* Center Wooden Spectator Booth with 5 Bill Universe Guests Seated Behind Railing */
.battle-spectator-booth {
  position: relative;
  width: 96%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0;
}

.spectator-guests-seated,
.spectator-booth-guests {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  z-index: 20;
}

.spec-guest-img,
.spectator-guest-sprite {
  width: clamp(30px, 3.4vh, 42px) !important;
  height: clamp(30px, 3.4vh, 42px) !important;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.92));
}

.spectator-booth-mask,
.occ-spectator-booth {
  position: relative !important;
  width: 98%;
  max-height: 32px;
  margin-top: -12px;
  z-index: 30;
}

.battle-vs-circle {
  top: 25.5% !important;
  width: clamp(42px, 4.8vh, 56px) !important;
  height: clamp(42px, 4.8vh, 56px) !important;
  font-size: clamp(0.95rem, 1.35vw, 1.3rem) !important;
}

/* --- 4. 8x6 (48 GEMS) CANDY CRUSH x BEJEWELED POWER GEMS & DIRECTIONAL CLEAVERS --- */
.battle-arena-split .match-grid-board {
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(6, minmax(0, 1fr)) !important;
  gap: clamp(3px, 0.38vw, 6px) !important;
  padding: clamp(5px, 0.55vw, 9px) clamp(7px, 0.75vw, 12px) clamp(7px, 0.85vw, 11px) !important;
}

.battle-arena-split .grid-tile {
  border-radius: clamp(7px, 0.8vw, 12px) !important;
  border-bottom-width: clamp(3px, 0.45vh, 6px) !important;
  min-width: 0;
  min-height: 0;
}

.battle-arena-split .tile-sprite-img {
  width: 90% !important;
  height: 90% !important;
  max-width: 54px !important;
  max-height: 54px !important;
  transform: translateY(-2px) scale(1.16);
}

/* Directional Cleavers: Horizontal (🔪↔) vs Vertical (🔪↕) */
.battle-arena-split .tile-sprite-img.cleaver-h-img {
  transform: translateY(-2px) scale(1.22) rotate(-90deg) !important;
  filter:
    drop-shadow(0 4px 6px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 10px rgba(56, 189, 248, 0.95)) !important;
}

.battle-arena-split .tile-sprite-img.cleaver-v-img {
  transform: translateY(-2px) scale(1.22) rotate(0deg) !important;
  filter:
    drop-shadow(0 4px 6px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 10px rgba(251, 146, 60, 0.95)) !important;
}

/* 5 Power Gem Tile Auras */
.grid-tile.power-cleaver-h {
  background: radial-gradient(circle at 50% 45%, #0284c7 0%, #0369a1 58%, #1e293b 100%) !important;
  border-color: #7dd3fc !important;
  box-shadow:
    0 0 14px rgba(56, 189, 248, 0.88),
    inset 0 0 10px rgba(224, 242, 254, 0.65) !important;
}

.grid-tile.power-cleaver-v {
  background: radial-gradient(circle at 50% 45%, #ea580c 0%, #9a3412 58%, #2b1004 100%) !important;
  border-color: #fde047 !important;
  box-shadow:
    0 0 14px rgba(251, 146, 60, 0.88),
    inset 0 0 10px rgba(254, 240, 138, 0.65) !important;
}

.grid-tile.power-pressure-bomb {
  background: radial-gradient(circle at 50% 45%, #dc2626 0%, #7f1d1d 60%, #2a0606 100%) !important;
  border-color: #fef08a !important;
  box-shadow:
    0 0 18px rgba(239, 68, 68, 0.95),
    inset 0 0 12px rgba(253, 224, 71, 0.75) !important;
  animation: powerBombPulse 0.65s ease-in-out infinite alternate;
}

.grid-tile.power-pressure-bomb.bomb-stage-2-primed {
  background: radial-gradient(circle at 50% 45%, #facc15 0%, #dc2626 55%, #450a0a 100%) !important;
  border-color: #ffffff !important;
  box-shadow:
    0 0 26px rgba(250, 204, 21, 1),
    0 0 36px rgba(239, 68, 68, 1) !important;
  animation: powerBombStage2Flash 0.22s ease-in-out infinite alternate !important;
}

@keyframes powerBombPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

@keyframes powerBombStage2Flash {
  0% { transform: scale(1.04) rotate(-3deg); filter: brightness(1.1); }
  100% { transform: scale(1.14) rotate(3deg); filter: brightness(1.45); }
}

.grid-tile.power-homing-chili {
  background: radial-gradient(circle at 50% 45%, #16a34a 0%, #14532d 55%, #052e16 100%) !important;
  border-color: #86efac !important;
  box-shadow:
    0 0 16px rgba(74, 222, 128, 0.9),
    inset 0 0 10px rgba(254, 240, 138, 0.6) !important;
}

.grid-tile.power-rainbow-sauce {
  background:
    conic-gradient(from 0deg, #ef4444, #f59e0b, #eab308, #22c55e, #38bdf8, #a855f7, #ef4444) !important;
  border: 2.5px solid #ffffff !important;
  box-shadow:
    0 0 22px rgba(250, 204, 21, 1),
    0 0 34px rgba(244, 114, 182, 0.85),
    inset 0 0 14px rgba(255, 255, 255, 0.85) !important;
  animation: rainbowSauceGlow 1.2s ease-in-out infinite alternate;
}

@keyframes rainbowSauceGlow {
  0% { filter: brightness(1.05) saturate(1.2); transform: scale(1.02); }
  100% { filter: brightness(1.25) saturate(1.45); transform: scale(1.08); }
}

.tile-top-badge.badge-power {
  width: auto !important;
  min-width: 20px !important;
  height: 18px !important;
  padding: 0 4px !important;
  border-radius: 999px !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  background: linear-gradient(180deg, #ef4444 0%, #7f1d1d 100%) !important;
  border: 1.5px solid #fef08a !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9) !important;
}

/* --- 5. KINETIC VFX: GRAVITY FALL BOUNCE, HIT-STOP, DIRECTIONAL RECOIL, SLASH & SHOCKWAVE --- */
.tile-falling-bounce {
  animation: tileDropBounce 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tileDropBounce {
  0% {
    transform: translateY(-38%) scale3d(0.9, 1.12, 1);
  }
  70% {
    transform: translateY(5%) scale3d(1.08, 0.92, 1);
  }
  100% {
    transform: translateY(0) scale3d(1, 1, 1);
  }
}

.board-hitstop {
  filter: brightness(1.22) contrast(1.08);
}

.recoil-horizontal {
  animation: boardRecoilH 0.22s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.recoil-vertical {
  animation: boardRecoilV 0.22s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.recoil-blast {
  animation: boardRecoilBlast 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes boardRecoilH {
  0%, 100% { transform: rotateX(15deg) translateX(0); }
  25% { transform: rotateX(15deg) translateX(-10px); }
  60% { transform: rotateX(15deg) translateX(8px); }
}

@keyframes boardRecoilV {
  0%, 100% { transform: rotateX(15deg) translateY(0); }
  25% { transform: rotateX(15deg) translateY(9px); }
  60% { transform: rotateX(15deg) translateY(-6px); }
}

@keyframes boardRecoilBlast {
  0%, 100% { transform: rotateX(15deg) scale(1); }
  30% { transform: rotateX(15deg) scale(1.045) translateY(6px); }
  65% { transform: rotateX(15deg) scale(0.98) translateY(-4px); }
}

/* Full-Row / Full-Column Blade Slash Light Beam */
.fx-blade-slash-h,
.fx-blade-slash-v {
  position: fixed;
  pointer-events: none;
  z-index: 95;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, #38bdf8 20%, #ffffff 50%, #fde047 80%, transparent 100%);
  box-shadow:
    0 0 18px #ffffff,
    0 0 32px #38bdf8,
    0 0 48px #facc15;
}

.fx-blade-slash-h {
  height: 16px;
  transform: translateY(-50%) scaleX(0.1);
  animation: bladeSlashSweepH 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fx-blade-slash-v {
  width: 16px;
  background: linear-gradient(180deg, transparent 0%, #fb923c 20%, #ffffff 50%, #fde047 80%, transparent 100%);
  transform: translateX(-50%) scaleY(0.1);
  animation: bladeSlashSweepV 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes bladeSlashSweepH {
  0% { transform: translateY(-50%) scaleX(0.08); opacity: 1; }
  55% { transform: translateY(-50%) scaleX(1.06); opacity: 1; }
  100% { transform: translateY(-50%) scaleX(1.12); opacity: 0; }
}

@keyframes bladeSlashSweepV {
  0% { transform: translateX(-50%) scaleY(0.08); opacity: 1; }
  55% { transform: translateX(-50%) scaleY(1.06); opacity: 1; }
  100% { transform: translateX(-50%) scaleY(1.12); opacity: 0; }
}

/* Expanding Shockwave Ring for Pressure Bomb (3x3 / 5x5) & Rainbow Sauce */
.fx-shockwave-ring {
  position: fixed;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 94;
  border: 5px solid #fef08a;
  box-shadow:
    0 0 24px #ef4444,
    0 0 42px #f97316,
    inset 0 0 18px #fde047;
  transform: translate(-50%, -50%) scale(0.2);
  animation: shockwaveExpand 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes shockwaveExpand {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 1;
  }
  100% {
    width: var(--target-r, 160px);
    height: var(--target-r, 160px);
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0;
  }
}

/* Radial Food Juice Splash Particles */
.fx-juice-particle {
  position: fixed;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 93;
  background: var(--p-color, #fde047);
  box-shadow: 0 0 8px var(--p-color, #fde047);
  transform: translate(-50%, -50%);
  animation: juiceSplashFly 0.36s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes juiceSplashFly {
  0% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx, 20px)), calc(-50% + var(--dy, -20px))) scale(0.2);
    opacity: 0;
  }
}

/* --- 6. MOBILE-FIRST RESPONSIVE ARCHITECTURE (844x390 Mobile Landscape & Small Screens) --- */
/* Prioritize P1's 8x6 Board on Mobile in 1P vs AI mode; keep 50/50 in 2P Symmetric mode */
@media (max-width: 1024px), (max-height: 540px) {
  #game-viewport {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .top-hud {
    height: 32px !important;
    padding: 0 0.6rem !important;
  }

  .hud-appicon {
    width: 26px !important;
    height: 26px !important;
  }

  .hud-title-box h1 {
    font-size: 0.78rem !important;
  }

  .currency-pill,
  .top-hud .hud-btn {
    font-size: 0.68rem !important;
    padding: 2px 8px !important;
  }

  /* Compact Hub Screen for Mobile Landscape (844x390) */
  #hub-screen {
    padding: 34px 0.8% 0.2% !important;
  }

  #hub-screen .judge-avatar,
  #hub-screen .judge-hub-sprite {
    width: clamp(54px, 13dvh, 76px) !important;
    height: clamp(54px, 13dvh, 76px) !important;
  }

  #hub-screen .judge-avatar-toddler,
  #hub-screen .judge-avatar-toddler .judge-hub-sprite {
    width: clamp(46px, 11dvh, 64px) !important;
    height: clamp(46px, 11dvh, 64px) !important;
  }

  #hub-screen .judge-info {
    padding: 1px 8px !important;
    margin-top: -10px !important;
  }

  #hub-screen .judge-info strong {
    font-size: 0.62rem !important;
  }

  #hub-screen .score-paddle {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.72rem !important;
  }

  #hub-screen .judge-speech-box {
    font-size: 0.62rem !important;
    padding: 2px 12px !important;
  }

  #hub-screen .mc-badge-icon,
  #hub-screen .mc-sprite {
    width: clamp(86px, 21dvh, 120px) !important;
    height: clamp(86px, 21dvh, 120px) !important;
  }

  #hub-screen .sous-chefs-grid {
    margin: clamp(-86px, -20dvh, -64px) auto 0 !important;
  }

  #hub-screen .sous-icon,
  #hub-screen .sous-sprite {
    width: clamp(64px, 15.5dvh, 90px) !important;
    height: clamp(64px, 15.5dvh, 90px) !important;
  }

  #hub-screen .wing-title-group h3,
  #hub-screen .sous-text strong {
    font-size: 0.62rem !important;
  }

  #hub-screen .wing-roof-sign {
    font-size: 0.68rem !important;
    padding: 2px 10px !important;
    top: -10px !important;
  }

  #hub-screen .station-mini-img {
    width: clamp(42px, 10.5dvh, 58px) !important;
    height: clamp(42px, 10.5dvh, 58px) !important;
  }

  #hub-screen .station-mini b {
    font-size: 0.54rem !important;
    padding: 1px 6px !important;
  }

  #hub-screen .wing-mission-bar {
    font-size: 0.56rem !important;
    padding: 2px 8px !important;
  }

  #hub-screen .hub-tray-sprite {
    width: clamp(96px, 23dvh, 136px) !important;
    height: clamp(96px, 23dvh, 136px) !important;
  }

  #hub-screen #active-tray-title {
    font-size: 0.64rem !important;
    padding: 2px 10px !important;
    margin-top: -16px !important;
  }

  #hub-screen .dish-slot-img {
    width: 18px !important;
    height: 18px !important;
  }

  #hub-screen .tray-dish-slot span,
  #hub-screen .mode-pill-btn {
    font-size: 0.56rem !important;
    padding: 2px 6px !important;
  }

  #hub-screen .guest-hub-sprite {
    width: clamp(50px, 12.5dvh, 72px) !important;
    height: clamp(50px, 12.5dvh, 72px) !important;
  }

  #hub-screen .guest-chip:nth-child(3) {
    margin-right: clamp(180px, 28vw, 260px) !important;
  }

  #hub-screen .guest-chip span {
    font-size: 0.54rem !important;
    padding: 1px 6px !important;
  }

  #hub-screen .bottom-dock {
    margin-top: clamp(-48px, -11dvh, -34px) !important;
  }

  #hub-screen .cta-play-sprite {
    height: clamp(36px, 9dvh, 48px) !important;
  }

  #hub-screen .dock-btn .graphic-btn-sprite {
    height: clamp(28px, 7dvh, 38px) !important;
  }

  #hub-screen #btn-open-missions {
    font-size: 0.54rem !important;
    padding: 1px 8px !important;
  }

  /* Compact Battle Screen for Mobile Landscape (844x390) — Prioritize 8x6 Board Height! */
  #battle-screen {
    padding: 2px 0.5% 2px !important;
    gap: 1px !important;
  }

  /* P1 Priority Split on Mobile (1.36fr vs 0.92fr in 1P vs AI; 1fr vs 1fr in 2P Symmetric) */
  .battle-arena-split {
    grid-template-columns: 1.32fr 0.94fr !important;
    gap: 0.6% !important;
  }

  .battle-arena-split.mode-2p-symmetric {
    grid-template-columns: 1fr 1fr !important;
  }

  .battle-header {
    padding: 1px 6px !important;
    min-height: 0 !important;
  }

  .battle-judges-mini {
    display: none !important;
  }

  .k80-ticket {
    min-width: 104px !important;
    padding: 1px 5px !important;
    margin-top: 1px !important;
  }

  .k80-guest-sprite {
    width: 15px !important;
    height: 15px !important;
  }

  .k80-guest-line span,
  .k80-price-tag,
  .k80-dishes,
  .mode-tag-pill,
  .mission-tag-pill,
  .battle-header-actions .hud-btn {
    font-size: 0.5rem !important;
    padding: 1px 4px !important;
  }

  .k80-dish-icon {
    width: 14px !important;
    height: 14px !important;
  }

  .timer-badge {
    font-size: 0.66rem !important;
    padding: 1px 6px !important;
  }

  .battle-center-diorama-tower {
    top: 11.5% !important;
    width: 92px !important;
    transform: translateX(-50%) scale(0.58) !important;
  }

  .battle-vs-circle {
    top: 21% !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 0.6rem !important;
  }

  .battle-arena-split .side-top-bar {
    height: 24px !important;
    padding: 0 2px !important;
    margin-bottom: -2px !important;
    white-space: nowrap !important;
  }

  .battle-arena-split .chef-avatar-pill {
    width: 20px !important;
    height: 20px !important;
  }

  .battle-arena-split .battle-mc-sprite,
  .battle-arena-split .skill-sous-sprite {
    width: 16px !important;
    height: 16px !important;
  }

  .battle-arena-split .side-chef-id,
  .battle-arena-split .sous-skill-btn,
  .battle-arena-split .side-score-box {
    padding: 1px 5px !important;
    border-bottom-width: 2px !important;
    white-space: nowrap !important;
  }

  .battle-arena-split .skill-btn-txt b {
    display: none !important;
  }

  .battle-arena-split .side-chef-id strong,
  .battle-arena-split .skill-btn-txt span,
  .battle-arena-split .side-score-box span,
  .battle-arena-split .side-score-box small {
    font-size: 0.48rem !important;
    display: inline !important;
  }

  .battle-arena-split .kitchen-diorama-stage {
    margin: -2px 0 -8px !important;
    max-height: 36px !important;
  }

  .battle-arena-split .diorama-mc-img {
    width: 38px !important;
    height: 38px !important;
  }

  .battle-arena-split .diorama-sous-img,
  .battle-arena-split .diorama-vip-img {
    width: 30px !important;
    height: 30px !important;
  }

  .battle-arena-split .diorama-speech-bubble {
    font-size: 0.44rem !important;
    padding: 1px 6px !important;
  }

  .battle-arena-split .pots-3-row {
    gap: 3px !important;
  }

  .battle-arena-split .pot-top-line {
    display: none !important;
  }

  .battle-arena-split .pot-burner-wrap {
    width: 34px !important;
    height: 34px !important;
    border-width: 1.5px !important;
  }

  .battle-arena-split .pot-sprite-img {
    width: 32px !important;
    height: 32px !important;
    transform: translateY(-2px) scale(1.1) !important;
  }

  .pot-medallion {
    width: 13px !important;
    height: 13px !important;
    font-size: 0.44rem !important;
  }

  .battle-arena-split .pot-info-col {
    padding: 1px 4px !important;
    border-bottom-width: 2px !important;
  }

  .battle-arena-split .pot-reqs-wrap {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 2px !important;
  }

  .battle-arena-split .req-pill {
    font-size: 0.45rem !important;
    padding: 0 3px !important;
    gap: 2px !important;
    border-bottom-width: 1.5px !important;
  }

  .battle-arena-split .req-mini-img {
    width: 10px !important;
    height: 10px !important;
  }

  .battle-arena-split .kitchen-pass-row {
    bottom: -16px !important;
  }

  .battle-arena-split .sink-station,
  .battle-arena-split .board-hint-bar,
  .auto-move-btn {
    font-size: 0.46rem !important;
    padding: 1px 5px !important;
    border-bottom-width: 2px !important;
  }

  .battle-arena-split .board-hint-bar {
    padding-right: 110px !important;
  }

  .hint-inline-sprite {
    width: 12px !important;
    height: 12px !important;
  }

  .battle-arena-split .serve-btn-sprite {
    height: 20px !important;
  }

  .battle-arena-split .board-stage-inner {
    padding-bottom: 2px !important;
  }

  .battle-arena-split .match-grid-board {
    width: 99% !important;
    height: 100% !important;
    min-height: 185px !important;
    gap: 2px !important;
    padding: 3px 5px 4px !important;
    border-bottom-width: 5px !important;
    border-radius: 9px !important;
    transform: rotateX(6deg) !important;
  }

  .battle-arena-split .grid-tile {
    border-radius: 5px !important;
    border-bottom-width: 2px !important;
    padding: 1px !important;
  }

  .battle-arena-split .tile-sprite-img {
    width: 84% !important;
    height: 84% !important;
    max-width: 26px !important;
    max-height: 26px !important;
    transform: translateY(-1px) scale(1.08);
  }

  .tile-top-badge,
  .tile-top-badge.badge-power {
    min-width: 14px !important;
    width: auto !important;
    height: 12px !important;
    padding: 0 3px !important;
    font-size: 0.38rem !important;
    top: -3px !important;
    right: -2px !important;
  }
}

/* ==========================================================================
   7. PHYSICAL 60FPS DRAG & DROP GEM INTERACTION (PC MOUSE + MOBILE TOUCH)
   ========================================================================== */
.match-grid-board,
.grid-tile {
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}

.grid-tile {
  position: relative;
  cursor: grab;
  overflow: visible !important;
}

.grid-tile:active {
  cursor: grabbing;
}

.grid-tile .tile-sprite-img {
  position: relative;
  z-index: 4;
  pointer-events: none !important;
  will-change: transform;
}

.grid-tile.tile-dragging-origin {
  z-index: 68 !important;
  cursor: grabbing !important;
  border-color: #fde047 !important;
  background: radial-gradient(circle at 50% 45%, rgba(250, 204, 21, 0.34) 0%, rgba(30, 41, 59, 0.92) 85%) !important;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.75),
    0 0 18px rgba(250, 204, 21, 0.95),
    inset 0 0 10px rgba(254, 240, 138, 0.65) !important;
}

.grid-tile.tile-dragging-origin .tile-sprite-img {
  position: relative;
  z-index: 75 !important;
  filter:
    drop-shadow(0 12px 14px rgba(0, 0, 0, 0.9))
    drop-shadow(0 0 14px rgba(250, 204, 21, 0.95))
    brightness(1.12) !important;
}

.grid-tile.tile-drop-target {
  z-index: 54 !important;
  border-color: #34d399 !important;
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.42) 0%, rgba(6, 78, 59, 0.88) 100%) !important;
  box-shadow:
    0 0 18px rgba(52, 211, 153, 0.95),
    inset 0 0 12px rgba(250, 204, 21, 0.65) !important;
}

.grid-tile.tile-invalid-rebound {
  z-index: 60 !important;
  border-color: #f87171 !important;
  background: radial-gradient(circle at 50% 50%, rgba(239, 68, 68, 0.38) 0%, rgba(69, 10, 10, 0.9) 100%) !important;
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.92) !important;
}

/* ==========================================================================
   8. POWER GEM BEACON GLOW, SPINNING ENERGY HALO & "⚡TAP" CALL-TO-ACTION
   ========================================================================== */
.grid-tile.booster-tile.power-ready-glow {
  z-index: 12 !important;
  border-top: 2.5px solid #ffffff !important;
  border-left: 2.5px solid #fde047 !important;
  border-right: 2.5px solid #fde047 !important;
  border-bottom: 6px solid #b45309 !important;
  animation: powerGemBeaconFloat 0.62s ease-in-out infinite alternate !important;
}

.grid-tile.power-cleaver-h.power-ready-glow {
  background: radial-gradient(circle at 50% 42%, #38bdf8 0%, #0284c7 52%, #0c4a6e 100%) !important;
  box-shadow:
    0 6px 0 #082f49,
    0 0 18px rgba(56, 189, 248, 1),
    0 0 32px rgba(250, 204, 21, 0.85),
    inset 0 0 14px rgba(255, 255, 255, 0.85) !important;
}

.grid-tile.power-cleaver-v.power-ready-glow {
  background: radial-gradient(circle at 50% 42%, #fb923c 0%, #ea580c 52%, #7c2d12 100%) !important;
  box-shadow:
    0 6px 0 #431407,
    0 0 18px rgba(251, 146, 60, 1),
    0 0 32px rgba(250, 204, 21, 0.9),
    inset 0 0 14px rgba(255, 255, 255, 0.85) !important;
}

.grid-tile.power-pressure-bomb.power-ready-glow {
  background: radial-gradient(circle at 50% 42%, #facc15 0%, #ef4444 52%, #7f1d1d 100%) !important;
  box-shadow:
    0 6px 0 #450a0a,
    0 0 22px rgba(239, 68, 68, 1),
    0 0 36px rgba(250, 204, 21, 0.95),
    inset 0 0 16px rgba(255, 255, 255, 0.9) !important;
}

.grid-tile.power-homing-chili.power-ready-glow {
  background: radial-gradient(circle at 50% 42%, #4ade80 0%, #16a34a 52%, #064e3b 100%) !important;
  box-shadow:
    0 6px 0 #022c22,
    0 0 18px rgba(74, 222, 128, 1),
    0 0 32px rgba(250, 204, 21, 0.85),
    inset 0 0 14px rgba(255, 255, 255, 0.85) !important;
}

.grid-tile.power-rainbow-sauce.power-ready-glow {
  background: conic-gradient(from 0deg, #ef4444, #f59e0b, #fde047, #22c55e, #38bdf8, #a855f7, #ef4444) !important;
  box-shadow:
    0 6px 0 #3b0764,
    0 0 24px rgba(250, 204, 21, 1),
    0 0 40px rgba(244, 114, 182, 0.95),
    inset 0 0 16px rgba(255, 255, 255, 0.92) !important;
}

.grid-tile.booster-tile.power-combo-ready {
  border-color: #ffffff !important;
  box-shadow:
    0 7px 0 #450a0a,
    0 0 26px #fde047,
    0 0 44px #ef4444,
    inset 0 0 18px #ffffff !important;
}

/* Spinning Golden-Electric Sunburst Halo Ring Behind Every Power Gem */
.power-aura-ring {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  border: 2px dashed rgba(255, 255, 255, 0.92);
  background: radial-gradient(circle, rgba(254, 240, 138, 0.55) 0%, rgba(250, 204, 21, 0.15) 60%, transparent 78%);
  box-shadow: 0 0 12px rgba(254, 240, 138, 0.95);
  animation: powerAuraSpin 2.6s linear infinite;
}

@keyframes powerAuraSpin {
  0% { transform: rotate(0deg) scale(0.94); opacity: 0.88; }
  50% { transform: rotate(180deg) scale(1.06); opacity: 1; }
  100% { transform: rotate(360deg) scale(0.94); opacity: 0.88; }
}

@keyframes powerGemBeaconFloat {
  0% {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.04) saturate(1.15);
  }
  100% {
    transform: translateY(-7px) scale(1.09);
    filter: brightness(1.22) saturate(1.35);
  }
}

/* Bright Glowing Sprite Drop-Shadow on Power Gems */
.grid-tile.booster-tile .tile-sprite-img {
  filter:
    drop-shadow(0 6px 6px rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.98))
    drop-shadow(0 0 20px rgba(250, 204, 21, 0.95)) !important;
}

/* Top-Right Type/Range Badge (↔NỔ, ↕NỔ, 💣3×3, 🌶️×3, 🌟X2) */
.tile-top-badge.badge-power {
  width: auto !important;
  min-width: 24px !important;
  height: 17px !important;
  padding: 0 5px !important;
  top: -7px !important;
  right: -5px !important;
  border-radius: 999px !important;
  font-size: 0.54rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.2px;
  color: #ffffff !important;
  background: linear-gradient(180deg, #dc2626 0%, #7f1d1d 100%) !important;
  border: 1.5px solid #fef08a !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 10px rgba(250, 204, 21, 0.9) !important;
  z-index: 15 !important;
}

/* Bottom Call-To-Action Pill ("⚡TAP" / "⚡GHÉP") Telling Player to Tap or Drag */
.power-tap-cta {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  pointer-events: none;
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
  color: #1c0802;
  font-size: 0.5rem;
  font-weight: 900;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1.5px solid #ffffff;
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.92),
    0 0 12px rgba(250, 204, 21, 1);
  white-space: nowrap;
  animation: powerTapCtaPulse 0.5s ease-in-out infinite alternate;
}

.grid-tile.power-combo-ready .power-tap-cta {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  color: #fef08a;
  border-color: #fde047;
}

@keyframes powerTapCtaPulse {
  0% { transform: translateX(-50%) scale(0.95); }
  100% { transform: translateX(-50%) scale(1.1); }
}

@media (max-width: 1024px), (max-height: 540px) {
  .power-tap-cta {
    font-size: 0.36rem !important;
    padding: 1px 4px !important;
    bottom: -4px !important;
    border-width: 1px !important;
  }

  .power-aura-ring {
    inset: 2px !important;
    border-width: 1.5px !important;
  }
}

/* ==========================================================================
   V8 4-TIER DIFFICULTY & IDLE HINT DELAY SYSTEM (EASY / NORMAL / HARD / MASTER)
   ========================================================================== */
.difficulty-switch-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.2rem;
}

.diff-pill-btn {
  background: linear-gradient(180deg, rgba(46, 20, 10, 0.92), rgba(24, 9, 4, 0.96));
  color: #fde68a;
  border: 1.5px solid rgba(217, 119, 6, 0.72);
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  font-size: clamp(0.56rem, 0.72vw, 0.68rem);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.72);
}

.diff-pill-btn:hover {
  transform: translateY(-1px);
  border-color: #facc15;
}

.diff-pill-btn.active {
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  color: #fffbeb;
  border-color: #fef08a;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.85), 0 3px 8px rgba(0, 0, 0, 0.85);
}

.diff-pill-btn[data-diff="master"].active,
#btn-toggle-difficulty[data-diff="master"] {
  background: linear-gradient(180deg, #dc2626 0%, #7f1d1d 100%) !important;
  color: #fef08a !important;
  border-color: #fde047 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.92) !important;
}

.auto-move-btn.master-locked {
  background: linear-gradient(180deg, #451a03 0%, #1c0a04 100%) !important;
  color: #fbbf24 !important;
  border-color: #b45309 !important;
  opacity: 0.82;
}

/* ==========================================================================
   V9 REAL-TIME OVERCOOKED KITCHEN RUSH × ACTION MATCH-3 (5-STAGE STOVE,
   CLEAN PLATE STACK 3/3, EXPRESS K80 TICKETS, CHAOS EVENTS & FOAM/WATER VFX)
   ========================================================================== */

/* Spectator Emotion Bubble & Kitchen Chaos Event Banner */
.spectator-emotion-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(180deg, #fef9c3 0%, #fde047 100%);
  color: #451a03;
  border: 1.5px solid #f59e0b;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: clamp(0.52rem, 0.68vw, 0.64rem);
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  transition: transform 0.2s ease, background 0.2s ease;
}

.spectator-emotion-bubble.mood-angry,
.spectator-emotion-bubble.emotion-angry {
  background: linear-gradient(180deg, #ef4444 0%, #991b1b 100%);
  color: #fef08a;
  border-color: #fde047;
  animation: overcookedAlertPulse 0.42s ease-in-out infinite alternate;
}

.spectator-emotion-bubble.mood-happy,
.spectator-emotion-bubble.emotion-happy {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  color: #ffffff;
  border-color: #bbf7d0;
  transform: scale(1.04);
}

.kitchen-chaos-banner {
  display: none;
  position: relative;
  z-index: 55;
  margin: 0.08rem auto;
  padding: 0.14rem 0.85rem;
  border-radius: 999px;
  font-size: clamp(0.54rem, 0.72vw, 0.68rem);
  font-weight: 900;
  text-align: center;
  color: #fffbeb;
  background: linear-gradient(90deg, #7f1d1d 0%, #dc2626 50%, #7f1d1d 100%);
  border: 1.5px solid #fde047;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85), 0 0 16px rgba(239, 68, 68, 0.85);
  animation: overcookedAlertPulse 0.5s ease-in-out infinite alternate;
}

.kitchen-chaos-banner.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.kitchen-chaos-banner.chaos-rush_vip {
  background: linear-gradient(90deg, #78350f 0%, #d97706 50%, #78350f 100%);
  border-color: #fef08a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85), 0 0 18px rgba(250, 204, 21, 0.9);
}

.kitchen-chaos-banner.chaos-flare_up,
.kitchen-chaos-banner.chaos-flare {
  background: linear-gradient(90deg, #1e3a8a 0%, #ea580c 50%, #7c2d12 100%);
  border-color: #fed7aa;
}

/* Chef Mood Pill inside Kitchen Header */
.chef-mood-pill {
  position: absolute;
  top: 4px;
  right: 8px;
  z-index: 65;
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.48rem;
  border-radius: 999px;
  font-size: clamp(0.48rem, 0.62vw, 0.58rem);
  font-weight: 900;
  white-space: nowrap;
  border: 1.5px solid rgba(250, 204, 21, 0.72);
  background: rgba(20, 83, 45, 0.94);
  color: #bbf7d0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.chef-mood-pill.mood-ready,
.chef-mood-pill.mood-happy {
  background: linear-gradient(180deg, #16a34a 0%, #14532d 100%);
  color: #fef08a;
  border-color: #4ade80;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

.chef-mood-pill.mood-warn {
  background: linear-gradient(180deg, #ea580c 0%, #9a3412 100%);
  color: #fef08a;
  border-color: #fde047;
  animation: overcookedAlertPulse 0.38s ease-in-out infinite alternate;
}

.chef-mood-pill.mood-panic {
  background: linear-gradient(180deg, #dc2626 0%, #7f1d1d 100%);
  color: #ffffff;
  border-color: #fde047;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.95);
  animation: overcookedAlertPulse 0.28s ease-in-out infinite alternate;
}

/* 5-Stage Overcooked Stove Station Cards */
.cook-pot {
  position: relative;
  overflow: visible !important;
  transition: transform 0.16s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cook-pot.prepping,
.cook-pot.pot-prepping {
  border-color: rgba(56, 189, 248, 0.78) !important;
  background: linear-gradient(180deg, rgba(12, 45, 72, 0.92), rgba(8, 24, 42, 0.96)) !important;
  box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.22);
}

.cook-pot.cooking,
.cook-pot.pot-cooking {
  border-color: #f59e0b !important;
  background: linear-gradient(180deg, rgba(92, 40, 8, 0.95), rgba(48, 18, 4, 0.98)) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.55), inset 0 0 12px rgba(251, 191, 36, 0.28) !important;
}

.cook-pot.cooking .pot-sprite-img,
.cook-pot.pot-cooking .pot-sprite-img {
  animation: potSimmerShake 0.26s ease-in-out infinite alternate;
}

.cook-pot.cooked,
.cook-pot.pot-cooked {
  border-color: #22c55e !important;
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.96), rgba(10, 46, 24, 0.98)) !important;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.92), inset 0 0 14px rgba(74, 222, 128, 0.38) !important;
  animation: potCookedBounce 0.55s ease-in-out infinite alternate;
}

.cook-pot.warning,
.cook-pot.pot-warning {
  border-color: #ef4444 !important;
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.96), rgba(69, 10, 10, 0.98)) !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.95), inset 0 0 16px rgba(248, 113, 113, 0.45) !important;
  animation: potWarningFlash 0.32s ease-in-out infinite alternate;
}

.cook-pot.warning .pot-sprite-img,
.cook-pot.pot-warning .pot-sprite-img {
  animation: potSimmerShake 0.14s linear infinite alternate;
}

.cook-pot.burning,
.cook-pot.pot-burning {
  border-color: #dc2626 !important;
  background: linear-gradient(180deg, rgba(69, 10, 10, 0.98), rgba(18, 4, 4, 0.99)) !important;
  box-shadow: 0 0 24px rgba(220, 38, 38, 1), inset 0 0 20px rgba(239, 68, 68, 0.65) !important;
  animation: potBurnShake 0.16s linear infinite;
}

.pot-vfx-clouds {
  position: absolute;
  top: -9px;
  left: 6px;
  font-size: 0.68rem;
  line-height: 1;
  pointer-events: none;
  z-index: 8;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
  animation: potSteamFloat 0.9s ease-in-out infinite alternate;
}

.pot-bar-fill.bar-cooking {
  background: linear-gradient(90deg, #f59e0b 0%, #fde047 100%) !important;
}

.pot-bar-fill.bar-cooked {
  background: linear-gradient(90deg, #16a34a 0%, #4ade80 50%, #fef08a 100%) !important;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.9);
}

.pot-bar-fill.bar-warning {
  background: linear-gradient(90deg, #dc2626 0%, #f97316 50%, #fef08a 100%) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.95);
}

.pot-bar-fill.bar-burning {
  background: repeating-linear-gradient(45deg, #dc2626, #dc2626 6px, #450a0a 6px, #450a0a 12px) !important;
}

/* Floating Action CTA on Cooked / Warning / Burning Pots */
.pot-action-cta {
  margin-top: 2px;
  padding: 2px 5px;
  border-radius: 999px;
  font-size: clamp(0.44rem, 0.56vw, 0.52rem);
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fde68a;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(250, 204, 21, 0.35);
}

.pot-action-cta.cta-cooking,
.pot-action-cta.cta-simmering {
  background: rgba(180, 83, 9, 0.85);
  color: #fef08a;
  border-color: #fbbf24;
}

.pot-action-cta.cta-plate-now,
.pot-action-cta.cta-plate-ready {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  color: #ffffff;
  border: 1.5px solid #fef08a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85), 0 0 12px rgba(34, 197, 94, 0.95);
  animation: overcookedAlertPulse 0.42s ease-in-out infinite alternate;
}

.pot-action-cta.cta-warning-plate,
.pot-action-cta.cta-no-plate,
.pot-action-cta.cta-plate-urgent {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  color: #fef08a;
  border: 1.5px solid #fde047;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 14px rgba(239, 68, 68, 1);
  animation: overcookedAlertPulse 0.25s ease-in-out infinite alternate;
}

.pot-action-cta.cta-extinguish-now {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  border: 1.5px solid #fef08a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 14px rgba(56, 189, 248, 0.95);
  animation: overcookedAlertPulse 0.28s ease-in-out infinite alternate;
}

/* Overcooked Clean Plate Stack (3/3) & Sink Alert */
.clean-plate-rack {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0.16rem 0.48rem;
  border-radius: 7px;
  font-size: clamp(0.48rem, 0.62vw, 0.58rem);
  font-weight: 900;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid #4ade80;
  color: #dcfce7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.72);
}

.clean-plate-rack.plate-rack-ok {
  border-color: #4ade80;
  color: #dcfce7;
}

.clean-plate-rack.plate-rack-low {
  border-color: #fbbf24;
  color: #fef08a;
  background: rgba(120, 53, 15, 0.9);
}

.clean-plate-rack.plates-empty-alert,
.clean-plate-rack.plate-rack-empty {
  border-color: #ef4444;
  background: linear-gradient(180deg, #dc2626 0%, #7f1d1d 100%);
  color: #fef08a;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.95);
  animation: overcookedAlertPulse 0.32s ease-in-out infinite alternate;
}

.sink-station.dirty-alert,
.sink-station-btn.sink-urgent-alert {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%) !important;
  color: #fef08a !important;
  border-color: #fde047 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.95) !important;
  animation: overcookedAlertPulse 0.35s ease-in-out infinite alternate;
}

/* Dynamic K80 Thermal Order Tickets (Express 1-Dish & Combo 3-Dish) */
.k80-ticket {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.k80-ticket:hover {
  transform: translateY(-1px);
}

.k80-ticket.ticket-ready-serve {
  border-color: #22c55e !important;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%) !important;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.9), 0 3px 8px rgba(0, 0, 0, 0.75) !important;
  animation: potCookedBounce 0.55s ease-in-out infinite alternate;
}

.ticket-serve-cta {
  font-size: 0.44rem;
  font-weight: 900;
  color: #78350f;
  text-align: right;
  margin-top: 1px;
  white-space: nowrap;
}

.k80-ticket.ticket-ready-serve .ticket-serve-cta {
  color: #15803d;
  text-decoration: underline;
}

/* Kitchen Rat Raid Overlay on 8x6 Match-3 Tile */
.grid-tile.tile-rat-raid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.98), inset 0 0 12px rgba(220, 38, 38, 0.75) !important;
  animation: potBurnShake 0.22s linear infinite !important;
}

.rat-overlay-emoji {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  line-height: 1;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.45) 0%, rgba(0, 0, 0, 0.5) 100%);
  border-radius: inherit;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.95));
  pointer-events: none;
  animation: chibiActionJump 0.35s ease infinite alternate;
}

/* Foam Spray & Water Splash VFX Particles */
.fx-foam-puff {
  position: fixed;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 30%, #bae6fd 80%, transparent 100%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.95);
  pointer-events: none;
  z-index: 9999;
  animation: foamSprayFly 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fx-water-droplet {
  position: fixed;
  font-size: 1rem;
  pointer-events: none;
  z-index: 9999;
  filter: drop-shadow(0 2px 6px rgba(2, 132, 199, 0.9));
  animation: foamSprayFly 0.58s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes foamSprayFly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, -30px))) scale(1.35);
  }
}

@keyframes potSimmerShake {
  0% { transform: translateY(0) rotate(-3deg) scale(1.02); }
  100% { transform: translateY(-2px) rotate(3deg) scale(1.06); }
}

@keyframes potCookedBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-2px); }
}

@keyframes potWarningFlash {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.22) saturate(1.25); }
}

@keyframes potBurnShake {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-2px, 1px) rotate(-1.5deg); }
  50% { transform: translate(2px, -1px) rotate(1.5deg); }
  75% { transform: translate(-1px, -1px) rotate(-1deg); }
  100% { transform: translate(1px, 1px) rotate(1deg); }
}

@keyframes potSteamFloat {
  0% { transform: translateY(0) scale(0.95); opacity: 0.85; }
  100% { transform: translateY(-4px) scale(1.08); opacity: 1; }
}

@keyframes overcookedAlertPulse {
  0% { transform: scale(0.97); }
  100% { transform: scale(1.04); }
}

@media (max-width: 1024px), (max-height: 540px) {
  .spectator-emotion-bubble {
    display: none !important;
  }

  .kitchen-chaos-banner {
    font-size: 0.46rem !important;
    padding: 0.08rem 0.5rem !important;
  }

  .pot-action-cta {
    font-size: 0.38rem !important;
    padding: 1px 3px !important;
  }

  .clean-plate-rack {
    font-size: 0.42rem !important;
    padding: 0.1rem 0.32rem !important;
  }
}

/* ==========================================================================
   SPRINT 2: HAZARDS, SPECIAL RULES, BOSS SHOWDOWN & BSMB CREDITS
   ========================================================================== */

/* 1. HUD Battle Rule Pill */
.rule-tag-pill {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.9) 0%, rgba(120, 53, 15, 0.95) 100%);
  border: 1px solid #fbbf24;
  color: #fef08a;
  font-size: clamp(0.52rem, 0.7vw, 0.64rem);
  font-weight: 800;
  padding: 0.16rem 0.5rem;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.45);
  animation: rulePillPulse 2.5s infinite alternate;
  white-space: nowrap;
}

@keyframes rulePillPulse {
  0% { box-shadow: 0 0 6px rgba(251, 191, 36, 0.3); }
  100% { box-shadow: 0 0 14px rgba(251, 191, 36, 0.85); }
}

/* 2. HAZ-01 Moving Conveyor Belts (8x6 Chopping Board) */
.grid-tile.tile-conveyor-right {
  border-top: 2.5px dashed #38bdf8 !important;
  border-bottom: 2.5px dashed #0284c7 !important;
  box-shadow: inset 0 0 8px rgba(56, 189, 248, 0.4), 0 0 10px rgba(56, 189, 248, 0.35) !important;
  position: relative;
}

.grid-tile.tile-conveyor-left {
  border-top: 2.5px dashed #f43f5e !important;
  border-bottom: 2.5px dashed #be123c !important;
  box-shadow: inset 0 0 8px rgba(244, 63, 94, 0.4), 0 0 10px rgba(244, 63, 94, 0.35) !important;
  position: relative;
}

.tile-conveyor-indicator {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.52rem;
  font-weight: 900;
  padding: 1px 3px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.85);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.5);
  pointer-events: none;
  z-index: 6;
  line-height: 1;
}

.tile-conveyor-indicator.left {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.5);
}

/* 3. HAZ-02 Mukbang x3 Fever */
.mukbang-live-banner {
  background: linear-gradient(90deg, #dc2626 0%, #ea580c 50%, #dc2626 100%);
  color: #fff;
  font-weight: 900;
  padding: 0.35rem 1rem;
  border-radius: 8px;
  border: 2px solid #fef08a;
  box-shadow: 0 0 18px rgba(220, 38, 38, 0.95);
  animation: potBurnShake 0.4s infinite alternate;
  text-align: center;
}

.screen-mukbang-fever {
  box-shadow: inset 0 0 60px rgba(239, 68, 68, 0.45) !important;
}

/* 4. HAZ-03 120s Boss Showdown 4 Judges */
.boss-phase-pill {
  background: linear-gradient(135deg, #7c2d12 0%, #451a03 100%);
  border: 1.5px solid #facc15;
  color: #fef08a;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
}

.boss-fever-active {
  animation: feverRainbowGlow 1.2s infinite alternate !important;
}

@keyframes feverRainbowGlow {
  0% { box-shadow: inset 0 0 50px rgba(250, 204, 21, 0.5), 0 0 30px rgba(250, 204, 21, 0.6); }
  50% { box-shadow: inset 0 0 60px rgba(249, 115, 22, 0.6), 0 0 35px rgba(249, 115, 22, 0.7); }
  100% { box-shadow: inset 0 0 70px rgba(239, 68, 68, 0.6), 0 0 40px rgba(239, 68, 68, 0.8); }
}

/* 5. BSMB Studio Credits Component */
.bsmb-credits-sheet {
  background: radial-gradient(circle at 50% 20%, #1e1b4b 0%, #0f172a 100%);
  color: #f8fafc;
  padding: 1.2rem;
  border-radius: 12px;
  border: 2px solid #a855f7;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.5);
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
}

.bsmb-credits-header {
  border-bottom: 2px dashed rgba(216, 180, 254, 0.4);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.bsmb-credits-header h2 {
  font-size: 1.25rem;
  color: #fde047;
  margin: 0.2rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bsmb-credits-role-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(216, 180, 254, 0.25);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.bsmb-credits-role-card .role-title {
  font-size: 0.72rem;
  color: #c084fc;
  font-weight: 700;
  text-transform: uppercase;
}

.bsmb-credits-role-card .role-name {
  font-size: 0.95rem;
  font-weight: 900;
  color: #ffffff;
}

.bsmb-credits-dedication {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  border: 1px dashed #ec4899;
  border-radius: 8px;
  padding: 0.7rem;
  margin: 0.75rem 0;
  font-size: 0.82rem;
  color: #fbcfe8;
}

.bsmb-credits-universe {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.5rem;
  word-break: break-word;
}

/* ==========================================================================
   V10: MOBILE PORTRAIT (9:16) & SIDE-PANEL NARROW VIEWPORT ADAPTATION
   Mandate 2 Unified 9:16 Split-Screen (15% Ticket Rail / 30% Kitchen / 55% Grid)
   ========================================================================== */
@media (max-width: 1100px) and (max-aspect-ratio: 11/10), (max-width: 680px) {
  #game-viewport {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  /* 1. Top HUD Bar (Compact Wrap-Safe Mobile Header) */
  .top-hud {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    height: auto !important;
    min-height: 36px !important;
    padding: 4px 6px !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    justify-content: space-between !important;
    flex-shrink: 0 !important;
  }

  .hud-brand {
    gap: 5px !important;
  }

  .hud-appicon {
    width: 24px !important;
    height: 24px !important;
  }

  .hud-title-box h1 {
    font-size: 0.72rem !important;
  }

  .hud-subtitle {
    display: none !important;
  }

  .hud-stats-group {
    flex-wrap: wrap !important;
    gap: 3px !important;
    justify-content: flex-end !important;
  }

  .currency-pill,
  .top-hud .hud-btn {
    font-size: 0.56rem !important;
    padding: 2px 6px !important;
  }

  /* 2. Hub Screen (#hub-screen) — True 9:16 Mobile Portrait Layout */
  #hub-screen.active {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 4px 6px 6px !important;
    gap: 4px !important;
    flex: 1 1 auto !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  #hub-screen .judges-grand-stage,
  #hub-screen .courtyard-middle,
  #hub-screen #wing-ba3,
  #hub-screen #wing-ba4,
  #hub-screen .center-pedestal,
  #hub-screen .market-guests-strip,
  #hub-screen .bottom-dock {
    transform: none !important;
  }

  #hub-screen .judges-grand-stage {
    width: 100% !important;
    margin: 0 !important;
    padding: 3px 4px !important;
    background: rgba(28, 8, 4, 0.82) !important;
    border: 1px solid rgba(250, 204, 21, 0.45) !important;
    border-radius: 10px !important;
  }

  #hub-screen .judges-row {
    gap: 4px !important;
    justify-content: space-around !important;
  }

  #hub-screen .judge-avatar,
  #hub-screen .judge-hub-sprite {
    width: 44px !important;
    height: 44px !important;
  }

  #hub-screen .judge-avatar-toddler,
  #hub-screen .judge-avatar-toddler .judge-hub-sprite {
    width: 38px !important;
    height: 38px !important;
  }

  #hub-screen .judge-info {
    margin-top: -6px !important;
    padding: 1px 5px !important;
  }

  #hub-screen .judge-info strong {
    font-size: 0.54rem !important;
  }

  #hub-screen .judge-info small {
    display: none !important;
  }

  #hub-screen .score-paddle {
    width: 20px !important;
    height: 20px !important;
    font-size: 0.56rem !important;
    right: -4px !important;
    top: -2px !important;
  }

  #hub-screen .judge-speech-box {
    font-size: 0.58rem !important;
    padding: 2px 8px !important;
    margin-top: 2px !important;
    max-width: 98% !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  #hub-screen .courtyard-middle {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin: 0 !important;
    flex: 1 1 auto !important;
    align-items: stretch !important;
  }

  #hub-screen .team-wing {
    background: linear-gradient(180deg, rgba(45, 14, 6, 0.88) 0%, rgba(24, 8, 3, 0.94) 100%) !important;
    border: 1.5px solid rgba(250, 204, 21, 0.55) !important;
    border-radius: 12px !important;
    padding: 10px 4px 5px !important;
    gap: 3px !important;
    justify-content: space-between !important;
  }

  #hub-screen .wing-roof-sign {
    display: inline-block !important;
    position: absolute !important;
    top: -8px !important;
    font-size: 0.52rem !important;
    padding: 1px 7px !important;
    white-space: nowrap !important;
  }

  #hub-screen .mc-badge-icon,
  #hub-screen .mc-sprite {
    width: 52px !important;
    height: 52px !important;
  }

  #hub-screen .wing-title-group {
    padding: 1px 6px !important;
    margin-top: -8px !important;
  }

  #hub-screen .wing-title-group h3 {
    font-size: 0.55rem !important;
  }

  #hub-screen .sous-chefs-grid {
    margin: 0 auto !important;
    width: 100% !important;
    gap: 2px !important;
  }

  #hub-screen .sous-icon,
  #hub-screen .sous-sprite {
    width: 36px !important;
    height: 36px !important;
  }

  #hub-screen .sous-text {
    padding: 1px 4px !important;
    margin-top: -6px !important;
  }

  #hub-screen .sous-text strong {
    font-size: 0.48rem !important;
  }

  #hub-screen .stations-preview-row {
    margin-top: 0 !important;
    gap: 3px !important;
  }

  #hub-screen .station-mini-img {
    width: 26px !important;
    height: 26px !important;
  }

  #hub-screen .station-mini b {
    font-size: 0.45rem !important;
    padding: 1px 4px !important;
    margin-top: -5px !important;
  }

  #hub-screen .wing-mission-bar {
    font-size: 0.48rem !important;
    padding: 2px 5px !important;
    margin-top: 2px !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.2 !important;
  }

  #hub-screen .center-pedestal {
    grid-column: 1 / -1 !important;
    order: 3 !important;
    background: rgba(28, 9, 4, 0.88) !important;
    border: 1.5px solid rgba(250, 204, 21, 0.55) !important;
    border-radius: 12px !important;
    padding: 5px 6px !important;
    gap: 3px !important;
  }

  #hub-screen .golden-tray-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  #hub-screen .hub-tray-sprite {
    width: 52px !important;
    height: 52px !important;
  }

  #hub-screen #active-tray-title {
    font-size: 0.58rem !important;
    padding: 2px 8px !important;
    margin-top: -8px !important;
  }

  #hub-screen .tray-3-dishes {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 4px !important;
    margin-top: 3px !important;
  }

  #hub-screen .mode-switch-group,
  #hub-screen .difficulty-switch-group {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 3px !important;
    margin-top: 3px !important;
    width: 100% !important;
  }

  #hub-screen .mode-pill-btn,
  #hub-screen .diff-pill-btn {
    font-size: 0.52rem !important;
    padding: 2px 6px !important;
  }

  #hub-screen .market-guests-strip {
    margin-top: 0 !important;
    padding: 2px 4px !important;
    background: rgba(20, 6, 2, 0.78) !important;
    border-radius: 10px !important;
  }

  #hub-screen .guests-row {
    gap: 3px !important;
    justify-content: space-around !important;
    flex-wrap: nowrap !important;
  }

  #hub-screen .guest-chip:nth-child(3) {
    margin-right: 0 !important;
  }

  #hub-screen .guest-hub-sprite {
    width: 36px !important;
    height: 36px !important;
  }

  #hub-screen .guest-chip span {
    font-size: 0.45rem !important;
    padding: 1px 4px !important;
    margin-top: -6px !important;
  }

  #hub-screen .bottom-dock {
    margin-top: 0 !important;
    padding: 2px 4px !important;
    gap: 4px !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
  }

  #hub-screen .cta-play-sprite {
    height: 34px !important;
  }

  #hub-screen .dock-btn .graphic-btn-sprite {
    height: 26px !important;
  }

  #hub-screen .cta-center-stack {
    gap: 2px !important;
  }

  #hub-screen #btn-open-missions {
    font-size: 0.48rem !important;
    padding: 1px 6px !important;
  }

  /* 3. Battle Screen (#battle-screen) — Mandate 2 9:16 Vertical Split-Screen */
  #battle-screen.active {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 2px 4px 4px !important;
    gap: 3px !important;
    flex: 1 1 auto !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  /* Layer 1: Top Header & RestoBill Thermal Ticket Rail (~13%) */
  .battle-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    padding: 2px 4px !important;
    width: 100% !important;
    flex-shrink: 0 !important;
  }

  .battle-center-hud {
    order: 1 !important;
    width: 100% !important;
    gap: 2px !important;
  }

  .battle-judges-mini,
  .battle-live-commentary,
  .match3-howto-banner,
  .pot-action-cta {
    display: none !important;
  }

  .battle-clock-row {
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 3px !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  .timer-badge {
    font-size: 0.66rem !important;
    padding: 1px 6px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .mode-tag-pill,
  .mission-tag-pill,
  .rule-tag-pill,
  .hearts-tag-pill {
    font-size: 0.48rem !important;
    padding: 1px 5px !important;
    white-space: nowrap !important;
    max-width: 34cqw !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .battle-header-actions {
    order: 2 !important;
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 3px !important;
  }

  .battle-header-actions .hud-btn {
    font-size: 0.5rem !important;
    padding: 1px 5px !important;
    height: 20px !important;
    min-width: 22px !important;
  }

  .battle-ticket-rail {
    order: 3 !important;
    width: 100% !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    gap: 3px !important;
    padding: 1px 2px !important;
  }

  .battle-ticket-rail::-webkit-scrollbar {
    display: none !important;
  }

  .k80-ticket {
    min-width: 92px !important;
    flex: 1 1 30% !important;
    padding: 1px 4px !important;
    transform: none !important;
  }

  /* Layer 2 (28% Interactive Kitchen) & Layer 3 (56%+ 8x6 Cascading Grid) */
  .battle-center-diorama-tower,
  .battle-vs-circle {
    display: none !important;
  }

  .battle-arena-split {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    width: 100% !important;
  }

  #p1-container {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    padding: 0 2px !important;
    gap: 2px !important;
  }

  #p1-container .p1-left-kitchen-col {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  /* Compact Rival AI Status Bar on Mobile Portrait in 1P/Slice/Endless Mode */
  .battle-arena-split:not(.mode-2p-symmetric) #p2-container {
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 2px 6px !important;
    background: rgba(45, 14, 6, 0.92) !important;
    border: 1px solid rgba(251, 146, 60, 0.65) !important;
    border-radius: 8px !important;
  }

  .battle-arena-split:not(.mode-2p-symmetric) #p2-container .overcooked-kitchen-zone,
  .battle-arena-split:not(.mode-2p-symmetric) #p2-container .board-wrapper {
    display: none !important;
  }

  .battle-arena-split .side-top-bar {
    height: auto !important;
    min-height: 22px !important;
    padding: 1px 4px !important;
    margin-bottom: 0 !important;
    gap: 3px !important;
  }

  .battle-arena-split .overcooked-kitchen-zone {
    gap: 2px !important;
    width: 100% !important;
    flex: 0 0 auto !important;
  }

  .battle-arena-split .kitchen-diorama-stage {
    max-height: 28px !important;
    margin: 0 0 -4px !important;
  }

  .battle-arena-split .diorama-mc-img {
    width: 32px !important;
    height: 32px !important;
  }

  .battle-arena-split .diorama-sous-img,
  .battle-arena-split .diorama-vip-img {
    width: 26px !important;
    height: 26px !important;
  }

  .battle-arena-split .pots-3-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
  }

  .battle-arena-split .pot-station-card,
  .battle-arena-split .cook-pot {
    padding: 2px !important;
    width: 100% !important;
  }

  .battle-arena-split .pot-main-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1px !important;
  }

  .battle-arena-split .pot-burner-wrap {
    width: 30px !important;
    height: 30px !important;
  }

  .battle-arena-split .pot-sprite-img {
    width: 28px !important;
    height: 28px !important;
  }

  .battle-arena-split .pot-info-col {
    width: 100% !important;
    padding: 1px 2px !important;
    align-items: center !important;
  }

  .battle-arena-split .pot-reqs-wrap {
    justify-content: center !important;
    gap: 2px !important;
    width: 100% !important;
  }

  .battle-arena-split .kitchen-pass-row {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    width: 100% !important;
    margin: 1px 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .battle-arena-split .sink-station {
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
    padding: 1px 5px !important;
    font-size: 0.48rem !important;
  }

  .battle-arena-split .serve-bell-btn {
    flex: 0 0 auto !important;
  }

  .battle-arena-split .serve-btn-sprite {
    height: 20px !important;
  }

  .battle-arena-split .board-wrapper {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 2px !important;
  }

  .battle-arena-split .board-hint-row {
    width: 100% !important;
    gap: 3px !important;
  }

  .battle-arena-split .board-hint-bar {
    padding: 1px 6px !important;
    font-size: 0.48rem !important;
    min-height: 18px !important;
    max-height: 20px !important;
    flex: 0 0 auto !important;
  }

  .auto-move-btn {
    font-size: 0.48rem !important;
    padding: 1px 5px !important;
  }

  .battle-arena-split .board-stage-inner {
    width: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
  }

  .battle-arena-split .match-grid-board {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    min-height: 46cqh !important;
    max-height: 58cqh !important;
    gap: 3px !important;
    padding: 4px !important;
    transform: rotateX(3deg) !important;
    border-bottom-width: 4px !important;
  }

  .battle-arena-split .grid-tile {
    border-radius: 6px !important;
    padding: 1px !important;
  }

  .battle-arena-split .tile-sprite-img {
    width: 86% !important;
    height: 86% !important;
    max-width: 38px !important;
    max-height: 38px !important;
  }

  /* 4. Modals & Auto-Test Banner on Mobile Portrait */
  .modal-box {
    width: 96% !important;
    max-height: 92dvh !important;
    padding: 0.7rem !important;
  }

  .mission-list-grid {
    grid-template-columns: 1fr !important;
  }

  .k80-judges-celebration {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  #adlc-autotest-banner {
    width: 94vw !important;
    max-width: 94vw !important;
    padding: 5px 10px !important;
    font-size: 11px !important;
    border-radius: 12px !important;
    justify-content: space-between !important;
  }
}

/* ==========================================================================
   SPRINT 3 HP:P&S META-PROGRESSION & TACTICAL BOOSTERS STYLES (ECO-01 -> ECO-05)
   ========================================================================== */

/* Charge Ready Glowing Animation */
.sous-skill-btn.charge-ready-glow {
  box-shadow: 0 0 15px #fde047, inset 0 0 10px rgba(250, 204, 21, 0.6) !important;
  border-color: #facc15 !important;
  animation: skillChargePulse 1.2s infinite alternate !important;
}

@keyframes skillChargePulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.04); filter: brightness(1.25); }
}

.ready-badge {
  color: #fde047;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
}

/* In-Level Tactical Belt */
.tactical-belt {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  align-items: center;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  border-radius: 10px;
  padding: 0.2rem 0.5rem;
  margin-top: 0.2rem;
  z-index: 50;
  flex-shrink: 0;
}

.tactical-btn {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  background: linear-gradient(180deg, #334155, #1e293b);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 0.18rem 0.5rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease-out;
}

.tactical-btn:hover {
  transform: translateY(-1px);
  border-color: #facc15;
  background: linear-gradient(180deg, #475569, #334155);
}

.tactical-btn:active {
  transform: translateY(1px);
}

.tool-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.tool-label {
  font-size: 0.62rem;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
}

.tool-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #dc2626;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 900;
  padding: 0px 4px;
  border-radius: 99px;
  border: 1px solid #fff;
  line-height: 1.2;
}

/* ==========================================================================
   CONTAINER-SCALED PROPORTIONAL DUAL-KITCHEN LAYOUT (ALL NON-PORTRAIT VIEWPORTS)
   Covers 16:9, 16:10, 4:3, 5:4 & Squarish Desktop/Tablet Windows with ZERO Dead Zones!
   Guarantees both 8x6 Match-3 Chopping Boards occupy 54% - 62% of #game-viewport height!
   ========================================================================== */
@media (min-width: 1101px), (min-width: 681px) and (min-aspect-ratio: 11/10) {
  #battle-screen.active {
    height: 100% !important;
    max-height: 100cqh !important;
    padding: 0.35cqh 0.6cqw 0.4cqh !important;
    gap: 0.3cqh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
  }

  /* 1. Ultra-Compact Single-Line Top Battle Header (~5.0cqh) */
  .battle-header {
    height: clamp(24px, 5.0cqh, 38px) !important;
    min-height: 0 !important;
    max-height: 5.2cqh !important;
    padding: 1px 0.5cqw !important;
    gap: 0.35cqw !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
  }

  .battle-ticket-rail {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.28cqw !important;
    max-width: 33cqw !important;
    height: 100% !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    flex-shrink: 1 !important;
  }

  .battle-ticket-rail::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .k80-ticket {
    min-width: clamp(74px, 8.2cqw, 110px) !important;
    max-width: 116px !important;
    height: clamp(20px, 4.2cqh, 31px) !important;
    padding: 1px 4px !important;
    border-radius: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 0 !important;
    transform: none !important;
    flex-shrink: 0 !important;
  }

  .k80-guest-line {
    gap: 2px !important;
    line-height: 1 !important;
  }

  .k80-guest-sprite {
    width: clamp(11px, 1.9cqh, 15px) !important;
    height: clamp(11px, 1.9cqh, 15px) !important;
  }

  .k80-guest-line span,
  .k80-price-tag,
  .k80-dishes {
    font-size: clamp(0.38rem, 0.9cqh, 0.56rem) !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .k80-price-tag {
    padding: 0 4px !important;
  }

  .k80-dishes {
    margin-top: 1px !important;
    gap: 2px !important;
  }

  .k80-dish-icon {
    width: clamp(9px, 1.7cqh, 13px) !important;
    height: clamp(9px, 1.7cqh, 13px) !important;
  }

  .k80-timer-bar {
    height: 2px !important;
    margin-top: 1px !important;
  }

  .battle-center-hud {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 0.25cqw !important;
    overflow: hidden !important;
  }

  .battle-clock-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.25cqw !important;
    min-width: 0 !important;
    white-space: nowrap !important;
  }

  .mode-tag-pill,
  .mission-tag-pill,
  .rule-tag-pill,
  .hearts-tag-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: clamp(0.42rem, 0.95cqh, 0.62rem) !important;
    height: clamp(17px, 3.4cqh, 25px) !important;
    padding: 0 0.45cqw !important;
    border-width: 1px !important;
    border-bottom-width: 2px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }

  .mission-tag-pill {
    max-width: 12.5cqw !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 1 !important;
    display: inline-block !important;
    line-height: clamp(15px, 3.1cqh, 22px) !important;
  }

  .rule-tag-pill {
    max-width: 9.5cqw !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 1 !important;
    display: inline-block !important;
    line-height: clamp(15px, 3.1cqh, 22px) !important;
  }

  .timer-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: clamp(0.54rem, 1.25cqh, 0.84rem) !important;
    height: clamp(19px, 3.6cqh, 27px) !important;
    padding: 0 0.55cqw !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
  }

  .battle-judges-mini,
  .battle-live-commentary,
  .match3-howto-banner,
  .pot-action-cta {
    display: none !important;
  }

  .battle-header-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.2cqw !important;
    flex-shrink: 0 !important;
  }

  .battle-header-actions .hud-btn,
  .battle-header-actions .hud-btn.hud-icon-btn {
    min-width: clamp(19px, 2.0cqw, 27px) !important;
    height: clamp(18px, 3.4cqh, 25px) !important;
    padding: 0 0.3cqw !important;
    font-size: clamp(0.46rem, 1.05cqh, 0.68rem) !important;
    border-width: 1px !important;
    border-bottom-width: 2px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
  }

  /* 2. Center Spectator Booth & VS Emblem */
  .battle-center-diorama-tower {
    top: 8.5% !important;
    transform: translateX(-50%) scale(0.52) !important;
  }

  .battle-vs-circle {
    top: 15.5% !important;
    width: clamp(22px, 3.8cqh, 32px) !important;
    height: clamp(22px, 3.8cqh, 32px) !important;
    font-size: clamp(0.54rem, 1.1cqh, 0.78rem) !important;
  }

  /* 3. Split Arena & Player Side Columns */
  .battle-arena-split {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 100% !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.6cqw !important;
  }

  .battle-arena-split .player-side {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0.25cqh 0.4cqw !important;
    gap: 0.25cqh !important;
    overflow: hidden !important;
  }

  .battle-arena-split .p1-left-kitchen-col {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25cqh !important;
    min-height: 0 !important;
  }

  /* 4. Compact Single-Line Team Top Bar (~3.8cqh) */
  .battle-arena-split .side-top-bar {
    height: clamp(20px, 3.8cqh, 28px) !important;
    min-height: 0 !important;
    max-height: 4.0cqh !important;
    padding: 1px 0.35cqw !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.25cqw !important;
    flex-shrink: 0 !important;
  }

  .battle-arena-split .chef-avatar-pill {
    width: clamp(16px, 3.0cqh, 23px) !important;
    height: clamp(16px, 3.0cqh, 23px) !important;
  }

  .battle-arena-split .battle-mc-sprite,
  .battle-arena-split .skill-sous-sprite {
    width: clamp(15px, 2.8cqh, 21px) !important;
    height: clamp(15px, 2.8cqh, 21px) !important;
  }

  .battle-arena-split .side-chef-id {
    padding: 1px 0.45cqw 1px 0.2cqw !important;
    height: clamp(18px, 3.3cqh, 24px) !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    border-bottom-width: 2px !important;
  }

  .battle-arena-split .side-chef-id strong {
    font-size: clamp(0.44rem, 0.98cqh, 0.66rem) !important;
    display: inline !important;
    white-space: nowrap !important;
  }

  .battle-arena-split .side-chef-id small {
    display: none !important;
  }

  .battle-arena-split .sous-skills-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.22cqw !important;
    min-width: 0 !important;
  }

  .battle-arena-split .sous-skill-btn {
    padding: 1px 0.4cqw 1px 0.2cqw !important;
    height: clamp(18px, 3.3cqh, 24px) !important;
    white-space: nowrap !important;
    border-bottom-width: 2px !important;
  }

  .battle-arena-split .skill-btn-txt {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 3px !important;
  }

  .battle-arena-split .skill-btn-txt span {
    font-size: clamp(0.42rem, 0.92cqh, 0.62rem) !important;
    white-space: nowrap !important;
  }

  .battle-arena-split .skill-btn-txt b {
    font-size: clamp(0.38rem, 0.82cqh, 0.54rem) !important;
    white-space: nowrap !important;
  }

  .battle-arena-split .side-score-box {
    padding: 1px 0.45cqw !important;
    height: clamp(18px, 3.3cqh, 24px) !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    border-bottom-width: 2px !important;
  }

  .battle-arena-split .side-score-box span {
    font-size: clamp(0.48rem, 1.05cqh, 0.72rem) !important;
    display: inline !important;
  }

  .battle-arena-split .side-score-box small {
    font-size: clamp(0.4rem, 0.88cqh, 0.58rem) !important;
    display: inline !important;
    margin-left: 3px !important;
  }

  /* 5. Container-Scaled Midground Kitchen Stage (Characters + 3 Pots ~17.5cqh) */
  .battle-arena-split .overcooked-kitchen-zone {
    padding: 1px 0.25cqw !important;
    gap: 0.2cqh !important;
    flex-shrink: 0 !important;
  }

  .battle-arena-split .kitchen-diorama-stage {
    height: clamp(26px, 5.2cqh, 44px) !important;
    max-height: 5.2cqh !important;
    margin: -2px 0 -6px !important;
  }

  .battle-arena-split .diorama-mc-img {
    width: clamp(32px, 5.8cqh, 52px) !important;
    height: clamp(32px, 5.8cqh, 52px) !important;
    transform: translateY(3px) !important;
  }

  .battle-arena-split .diorama-sous-img,
  .battle-arena-split .diorama-vip-img {
    width: clamp(26px, 4.8cqh, 42px) !important;
    height: clamp(26px, 4.8cqh, 42px) !important;
    transform: translateY(3px) !important;
  }

  .battle-arena-split .diorama-speech-bubble {
    font-size: clamp(0.4rem, 0.88cqh, 0.56rem) !important;
    padding: 1px 7px !important;
    top: -1px !important;
  }

  .battle-arena-split .chef-mood-pill {
    display: none !important;
  }

  .battle-arena-split .pots-3-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.28cqw !important;
  }

  .battle-arena-split .cook-pot {
    padding: 1px 3px !important;
    gap: 1px !important;
    border-radius: 8px !important;
    min-width: 0 !important;
  }

  .battle-arena-split .pot-top-line {
    padding: 1px 4px !important;
    font-size: clamp(0.4rem, 0.88cqh, 0.56rem) !important;
    border-width: 1px !important;
    border-bottom-width: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    gap: 2px !important;
  }

  .battle-arena-split .pot-status-tag {
    font-size: clamp(0.38rem, 0.82cqh, 0.52rem) !important;
    padding: 0 3px !important;
  }

  .battle-arena-split .pot-burner-wrap {
    width: clamp(30px, 5.2cqh, 46px) !important;
    height: clamp(30px, 5.2cqh, 46px) !important;
    border-width: 1.5px !important;
    flex-shrink: 0 !important;
  }

  .battle-arena-split .pot-sprite-img {
    width: clamp(28px, 5.0cqh, 44px) !important;
    height: clamp(28px, 5.0cqh, 44px) !important;
    transform: translateY(-1px) scale(1.08) !important;
  }

  .pot-medallion {
    width: clamp(13px, 2.1cqh, 17px) !important;
    height: clamp(13px, 2.1cqh, 17px) !important;
    font-size: clamp(0.38rem, 0.82cqh, 0.5rem) !important;
  }

  .battle-arena-split .pot-info-col {
    padding: 1px 3px !important;
    border-width: 1px !important;
    border-bottom-width: 2px !important;
    min-width: 0 !important;
  }

  .battle-arena-split .pot-reqs-wrap {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 2px !important;
  }

  .battle-arena-split .req-pill {
    font-size: clamp(0.4rem, 0.88cqh, 0.54rem) !important;
    padding: 0 3px !important;
    gap: 1px !important;
    border-width: 1px !important;
    border-bottom-width: 1.5px !important;
  }

  .battle-arena-split .req-mini-img {
    width: clamp(9px, 1.6cqh, 12px) !important;
    height: clamp(9px, 1.6cqh, 12px) !important;
  }

  /* 6. Kitchen Pass Ledge & Single-Line Hint Bar (~3.2cqh) */
  .battle-arena-split .kitchen-pass-row {
    bottom: -19px !important;
    right: 3px !important;
    gap: 3px !important;
  }

  .battle-arena-split .clean-plate-rack,
  .battle-arena-split .sink-station {
    font-size: clamp(0.4rem, 0.88cqh, 0.54rem) !important;
    padding: 1px 5px !important;
    height: clamp(16px, 3.0cqh, 22px) !important;
  }

  .battle-arena-split .serve-btn-sprite {
    height: clamp(19px, 3.4cqh, 26px) !important;
  }

  .battle-arena-split .board-wrapper {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 0.25cqh !important;
  }

  .battle-arena-split .board-hint-bar {
    height: clamp(18px, 3.2cqh, 23px) !important;
    min-height: 0 !important;
    max-height: 3.4cqh !important;
    padding: 1px 135px 1px 8px !important;
    font-size: clamp(0.42rem, 0.92cqh, 0.58rem) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border-width: 1px !important;
    border-bottom-width: 2px !important;
    flex-shrink: 0 !important;
  }

  .hint-inline-sprite {
    width: clamp(10px, 1.8cqh, 13px) !important;
    height: clamp(10px, 1.8cqh, 13px) !important;
  }

  .auto-move-btn {
    font-size: clamp(0.4rem, 0.86cqh, 0.54rem) !important;
    padding: 0 6px !important;
    height: clamp(14px, 2.5cqh, 19px) !important;
    border-width: 1px !important;
    border-bottom-width: 1.5px !important;
  }

  /* 7. Twin 8x6 Match-3 Chopping Boards — Full Playable Height (54% - 62% of #game-viewport)! */
  .battle-arena-split .board-stage-inner {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    padding-bottom: 1px !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
  }

  .battle-arena-split .match-grid-board {
    flex: 1 1 0% !important;
    width: 99% !important;
    height: 100% !important;
    min-height: 52cqh !important;
    max-height: 65cqh !important;
    aspect-ratio: auto !important;
    gap: clamp(2px, 0.42cqh, 5px) !important;
    padding: clamp(3px, 0.55cqh, 6px) !important;
    border-bottom-width: clamp(3px, 0.75cqh, 6px) !important;
    border-radius: 10px !important;
    transform: rotateX(4deg) !important;
  }

  .battle-arena-split .grid-tile {
    border-radius: clamp(4px, 0.7cqh, 7px) !important;
    border-bottom-width: clamp(1.5px, 0.35cqh, 3px) !important;
    padding: 1px !important;
  }

  .battle-arena-split .tile-sprite-img {
    width: 86% !important;
    height: 86% !important;
    max-width: clamp(24px, 6.2cqh, 46px) !important;
    max-height: clamp(24px, 6.2cqh, 46px) !important;
    transform: translateY(-1px) scale(1.08) !important;
  }

  /* 8. Compact Tactical Belt (~3.5cqh) */
  .tactical-belt {
    height: clamp(20px, 3.5cqh, 25px) !important;
    min-height: 0 !important;
    max-height: 3.7cqh !important;
    padding: 1px 6px !important;
    margin-top: 1px !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
  }

  .tactical-btn {
    padding: 1px 6px !important;
    min-height: clamp(16px, 2.9cqh, 21px) !important;
    height: clamp(16px, 2.9cqh, 21px) !important;
  }
}

/* Upgrade Workshop Modal */
.workshop-level-banner {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(220, 38, 38, 0.2));
  border: 1.5px solid #eab308;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  text-align: center;
}

.upgrade-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 4px;
}

.upgrade-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  transition: border-color 0.2s ease;
}

.upgrade-card.max-level {
  border-color: #eab308;
  background: rgba(234, 179, 8, 0.08);
}

.upgrade-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.upgrade-icon {
  font-size: 1.6rem;
}

.upgrade-info h4 {
  font-size: 0.95rem;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-lvl {
  display: inline-block;
  background: #ca8a04;
  color: #000;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
}

.upgrade-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 0.3rem;
}

.upgrade-next {
  font-size: 0.78rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.4rem;
}

.upgrade-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cost-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fde047;
}

.upgrade-btn {
  border: none;
  border-radius: 8px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.upgrade-btn.can-upgrade {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  box-shadow: 0 2px 0 #14532d;
}

.upgrade-btn.cant-upgrade {
  background: #475569;
  color: #94a3b8;
  cursor: not-allowed;
}

.upgrade-max-badge {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 900;
  color: #facc15;
  background: rgba(250, 204, 21, 0.15);
  padding: 0.3rem;
  border-radius: 6px;
}

/* Near Miss Continue Modal Card */
.near-miss-card {
  text-align: center;
  padding: 0.4rem;
}

/* ==========================================================================
   SPRINT 4: CAPYBILL-STYLE PRESET ICON UI, TẾT CALLIGRAPHY & MODES (MOD-01..04)
   ========================================================================== */
.judges-arch-ribbon,
.vs-emblem,
.festive-calligraphy-title {
  font-family: var(--font-calligraphy) !important;
  font-weight: 400 !important;
  letter-spacing: 0.04em;
}

.countdown-mission-tag,
.hud-title-box h1 {
  font-family: 'Potta One', var(--font-display) !important;
  font-weight: 400 !important;
  letter-spacing: 0.03em;
}

.hud-title-box h1 {
  font-size: clamp(0.86rem, 1.15vw, 1.12rem) !important;
  white-space: nowrap !important;
  line-height: 1.15 !important;
}

.top-hud {
  gap: 0.35rem !important;
  padding: 0 0.8% !important;
}

.hud-currencies {
  gap: 0.3rem !important;
  flex-shrink: 1 !important;
}

.top-hud .currency-pill {
  padding: 0.18rem 0.48rem !important;
  font-size: clamp(0.64rem, 0.78vw, 0.78rem) !important;
  gap: 0.22rem !important;
  white-space: nowrap !important;
}

.hud-actions {
  gap: 0.28rem !important;
  flex-shrink: 0 !important;
}

.wing-roof-sign,
.diegetic-wood-sign h3,
.diegetic-wood-sign h4,
.timer-badge,
.side-score-box span,
.match-toast-banner,
.modal-header h3 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* Compact Single-Line Hint Bar & Inline Ingredient Icons (QOL-03 — Zero vertical bloat in 16:9 & 9:16) */
.board-hint-bar {
  max-height: clamp(18px, 3.4cqh, 24px) !important;
  min-height: clamp(16px, 3.0cqh, 21px) !important;
  padding: 1px 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.board-hint-bar img,
.hint-inline-sprite {
  width: clamp(10px, 1.8cqh, 14px) !important;
  height: clamp(10px, 1.8cqh, 14px) !important;
  max-width: 14px !important;
  max-height: 14px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  object-fit: contain !important;
}

/* Preset Icon Buttons on Top HUD & Battle Header (QOL-01 & QOL-03) */
.hud-btn.hud-icon-btn {
  position: relative;
  min-width: 30px;
  height: 26px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
  border-radius: 8px;
  background: linear-gradient(180deg, #5c2e1e 0%, #3e1f14 100%);
  border: 1.5px solid #facc15;
  box-shadow: 0 2px 0 #1f0d07, inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.hud-btn.hud-icon-btn:hover {
  transform: translateY(-1px) scale(1.05);
  border-color: #fde047;
}

.hud-red-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 8px #ef4444;
  animation: redDotPulse 1.2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes redDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.28); opacity: 0.85; }
}

/* Endless 3-Heart Survival Pill inside .battle-clock-row (MOD-03 — Zero extra height) */
.hearts-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(153, 27, 27, 0.92), rgba(69, 10, 10, 0.95));
  border: 1.5px solid #f87171;
  color: #fecaca;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}

.hearts-tag-pill.heart-hurt-shake {
  animation: heartHurtShake 0.45s ease;
}

@keyframes heartHurtShake {
  0%, 100% { transform: translateX(0) scale(1); }
  25% { transform: translateX(-4px) scale(1.15); }
  75% { transform: translateX(4px) scale(0.92); }
}

/* Compact Tactical Belt Preset Icons (QOL-01 — Saves vertical height for 8x6 grid) */
.tactical-belt {
  height: clamp(18px, 3.5cqh, 25px) !important;
  min-height: 0 !important;
  max-height: 3.7cqh !important;
  padding: 1px 6px !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
}

.tactical-btn {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 1px 7px !important;
  min-height: clamp(15px, 2.8cqh, 21px) !important;
  height: clamp(15px, 2.8cqh, 21px) !important;
  border-radius: 999px !important;
}

.tactical-btn .tool-icon {
  font-size: clamp(0.7rem, 1.5cqh, 0.9rem) !important;
}

.tactical-btn .tool-badge {
  position: static !important;
  font-size: clamp(0.58rem, 1.2cqh, 0.72rem) !important;
  padding: 0 4px !important;
  border-radius: 999px !important;
}

/* Quick VS Tug-of-War Sabotage Projectile (MOD-02) */
.fx-sabotage-beam {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  font-size: 1.45rem;
  font-weight: 900;
  color: #fde047;
  text-shadow: 0 0 12px #ef4444, 0 2px 4px #000;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.95));
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.52s ease;
}

/* Sprint 4 Modals: Quick VS Setup, Star Chests & Daily Judge Bounty */
.s4-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.s4-card {
  background: linear-gradient(180deg, rgba(62, 31, 20, 0.92), rgba(34, 15, 10, 0.96));
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.4rem;
}

.s4-card.unlocked-ready {
  border-color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.s4-card.claimed-done {
  opacity: 0.72;
  border-color: rgba(148, 163, 184, 0.4);
}

.s4-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.s4-choice-btn {
  background: rgba(30, 15, 10, 0.9);
  color: #fde68a;
  border: 1.5px solid rgba(250, 204, 21, 0.4);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.s4-choice-btn.active {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #1c0a05;
  border-color: #fff;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

/* ==========================================================================
   32-BIT ARGB 3D CARVED WOODEN & GOLDEN PLAQUE LABEL SPRITES
   ========================================================================== */
.judges-arch-ribbon.graphic-label-wrap,
.wing-roof-sign.graphic-label-wrap {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.hoanh-phi-sprite {
  height: clamp(36px, 6.4cqh, 58px) !important;
  width: auto !important;
  object-fit: contain !important;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.95));
  pointer-events: none;
}

.wing-sign-sprite {
  height: clamp(32px, 5.4cqh, 50px) !important;
  width: auto !important;
  object-fit: contain !important;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.95));
  pointer-events: none;
}

/* Remove semi-transparent ghost duplicate labels behind characters on Hub */
#hub-screen .wing-header .diegetic-wood-sign,
#hub-screen .cameo-spectator-strip,
#hub-screen .tray-3-dishes {
  display: none !important;
}

#hub-screen .dock-nav-btns {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
}

#hub-screen .dock-btn.graphic-img-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

#hub-screen .dock-btn.graphic-img-btn .graphic-btn-sprite {
  height: clamp(28px, 5.2cqh, 44px) !important;
  width: auto !important;
  object-fit: contain !important;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.92));
  transition: transform 0.15s ease;
}

#hub-screen .dock-btn.graphic-img-btn:hover .graphic-btn-sprite {
  transform: translateY(-2px) scale(1.05);
}



/* Responsive guard for 3D Wing Plaques & Center Pedestal above Bottom Dock */
.wing-sign-sprite {
  max-width: min(92%, 230px) !important;
  height: auto !important;
  max-height: clamp(24px, 5.0cqh, 46px) !important;
}

@media (max-width: 820px) {
  .wing-sign-sprite {
    max-width: 175px !important;
    max-height: 32px !important;
  }
  .hoanh-phi-sprite {
    max-width: 92vw !important;
    height: auto !important;
    max-height: 44px !important;
  }
}

@media (min-width: 1101px), (min-width: 681px) and (min-aspect-ratio: 11/10) {
  #hub-screen .hub-tray-sprite {
    width: clamp(130px, 22cqh, 185px) !important;
    height: clamp(130px, 22cqh, 185px) !important;
  }
  #hub-screen .center-pedestal {
    padding-bottom: clamp(48px, 7.8cqh, 64px) !important;
  }
}

/* ==========================================================================
   SPRINT 5 (MON-01 -> MON-03): SHOP MODAL, PIGGY BANK & GOLDEN APRON PASS
   ========================================================================== */
.s5-shop-tabs {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.s5-tab-btn {
  flex: 1;
  min-width: 140px;
  padding: 0.48rem 0.65rem;
  border-radius: 10px;
  border: 2px solid rgba(250, 204, 21, 0.35);
  background: rgba(24, 10, 6, 0.85);
  color: #fde68a;
  font-family: var(--font-primary);
  font-weight: 900;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.s5-tab-btn.active {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border-color: #fde047;
  color: #fff;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.55);
}

.s5-sku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 0.55rem;
}

.s5-sku-card {
  position: relative;
  background: linear-gradient(180deg, rgba(68, 28, 14, 0.95), rgba(32, 12, 6, 0.98));
  border: 2px solid rgba(251, 191, 36, 0.55);
  border-radius: 12px;
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.4rem;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.65);
}

.s5-sku-card.featured-starter {
  border-color: #22c55e;
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.45);
}

.s5-sku-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1.5px solid #fef08a;
}

.s5-piggy-hero {
  background: radial-gradient(circle at 50% 30%, rgba(244, 63, 94, 0.35), rgba(30, 12, 8, 0.96));
  border: 2px solid #fb7185;
  border-radius: 14px;
  padding: 0.85rem;
  text-align: center;
}

.s5-piggy-bar {
  width: 100%;
  height: 22px;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid #fda4af;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.55rem 0;
  position: relative;
}

.s5-piggy-fill {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #f43f5e, #fbbf24);
  transition: width 0.28s ease;
}

.s5-pass-banner {
  background: linear-gradient(135deg, rgba(161, 98, 7, 0.45), rgba(30, 15, 8, 0.96));
  border: 2px solid #facc15;
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.s5-tier-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 44vh;
  overflow-y: auto;
  padding-right: 4px;
}

.s5-tier-row {
  display: grid;
  grid-template-columns: 68px 1fr 1fr 115px;
  align-items: center;
  gap: 0.45rem;
  background: rgba(30, 14, 8, 0.9);
  border: 1.5px solid rgba(250, 204, 21, 0.35);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
}

.s5-tier-row.tier-unlocked {
  border-color: #4ade80;
  background: rgba(20, 60, 35, 0.45);
}

@media (max-width: 680px) {
  .s5-tier-row {
    grid-template-columns: 54px 1fr;
  }
}

/* ==========================================================================
   V11 USER VOICE FEEDBACK TUNING:
   1. 2X CHARACTER SPRITES ("Hình người gấp đôi lên") ON HUB & BATTLE
   2. 2X FOOD / DISH / POT / GEM SPRITES ("Đồ ăn hình cũng gấp đôi lên")
   3. TIGHT KITCHEN-TO-BOARD GAP ("Khoảng trống giữa xếp ngọc với cái bếp thu hẹp lại")
   ========================================================================== */

/* --- A. FIX HUB MASTER CHEF (BÀ 3 & BÀ 4) VISIBILITY & 2X CHARACTER + 2X FOOD SCALING --- */
#hub-screen .wing-title-group > .mc-badge-icon {
  background: radial-gradient(circle at 50% 58%, rgba(251, 146, 60, 0.52) 0%, transparent 72%) !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 0 !important;
  border-radius: 50% !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 28 !important;
}

/* Desktop & Landscape Hub (16:9): Giant 2x Characters & 2x Food Pots/Tray */
@media (min-width: 1101px), (min-width: 681px) and (min-aspect-ratio: 11/10) {
  #hub-screen .judge-avatar,
  #hub-screen .judge-hub-sprite {
    width: clamp(148px, 18.5cqh, 198px) !important;
    height: clamp(148px, 18.5cqh, 198px) !important;
  }

  #hub-screen .judge-avatar-toddler,
  #hub-screen .judge-avatar-toddler .judge-hub-sprite {
    width: clamp(128px, 16.0cqh, 170px) !important;
    height: clamp(128px, 16.0cqh, 170px) !important;
  }

  #hub-screen .mc-badge-icon,
  #hub-screen .mc-sprite {
    width: clamp(248px, 29.5cqh, 318px) !important;
    height: clamp(248px, 29.5cqh, 318px) !important;
  }

  #hub-screen .sous-icon,
  #hub-screen .sous-sprite {
    width: clamp(182px, 21.5cqh, 236px) !important;
    height: clamp(182px, 21.5cqh, 236px) !important;
  }

  #hub-screen .guest-hub-sprite {
    width: clamp(146px, 17.2cqh, 188px) !important;
    height: clamp(146px, 17.2cqh, 188px) !important;
  }

  #hub-screen .station-mini-img {
    width: clamp(118px, 14.5cqh, 152px) !important;
    height: clamp(118px, 14.5cqh, 152px) !important;
  }

  #hub-screen .center-pedestal {
    margin-top: -34px !important;
    padding-top: 0 !important;
    padding-bottom: clamp(68px, 10.8cqh, 92px) !important;
    gap: 0 !important;
  }

  #hub-screen .neon-vs-circle {
    width: clamp(38px, 5.2cqh, 48px) !important;
    height: clamp(38px, 5.2cqh, 48px) !important;
    font-size: clamp(0.95rem, 1.4cqw, 1.25rem) !important;
    margin-bottom: -10px !important;
    z-index: 30 !important;
  }

  #hub-screen .hub-tray-sprite {
    width: clamp(225px, 34cqh, 295px) !important;
    height: clamp(225px, 34cqh, 295px) !important;
    margin-top: -12px !important;
    margin-bottom: -14px !important;
    transform: scale(1.08) !important;
  }

  #hub-screen .tray-showcase-head > div {
    margin-top: -28px !important;
    padding: 2px 14px !important;
    z-index: 32 !important;
  }

  #hub-screen .pedestal-mode-wrap {
    margin-top: -4px !important;
    transform: scale(0.92) !important;
    z-index: 34 !important;
  }

  #hub-screen #hub-difficulty-group {
    margin-top: 2px !important;
  }
}

/* Mobile Portrait Hub (9:16): True 2x Characters & 2x Food Pots + 1.5x-2.5x Main Tray */
@media (max-width: 1100px) and (max-aspect-ratio: 11/10), (max-width: 680px) {
  #hub-screen.active {
    gap: 2px !important;
    padding: 2px 4px 3px !important;
    justify-content: space-between !important;
    overflow: hidden !important;
  }

  #hub-screen .judges-grand-stage {
    padding: 2px 4px !important;
  }

  #hub-screen .judge-avatar,
  #hub-screen .judge-hub-sprite {
    width: 74px !important;
    height: 74px !important;
  }

  #hub-screen .judge-avatar-toddler,
  #hub-screen .judge-avatar-toddler .judge-hub-sprite {
    width: 64px !important;
    height: 64px !important;
  }

  #hub-screen .team-wing {
    padding: 8px 3px 3px !important;
    gap: 1px !important;
  }

  #hub-screen .wing-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1px !important;
    margin-top: 4px !important;
  }

  #hub-screen .team-select-tag {
    order: -1 !important;
    margin-bottom: 1px !important;
    font-size: 0.52rem !important;
    padding: 1px 8px !important;
  }

  #hub-screen .mc-badge-icon,
  #hub-screen .mc-sprite {
    width: 86px !important;
    height: 86px !important;
  }

  #hub-screen .sous-chefs-grid {
    margin: -62px auto 1px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    padding: 0 2px !important;
    z-index: 26 !important;
  }

  #hub-screen .sous-icon,
  #hub-screen .sous-sprite {
    width: 64px !important;
    height: 64px !important;
  }

  #hub-screen .wing-stations-row {
    gap: 3px !important;
    margin-top: 1px !important;
  }

  #hub-screen .station-mini-img {
    width: 48px !important;
    height: 48px !important;
  }

  #hub-screen .center-pedestal {
    padding: 3px 5px !important;
    gap: 1px !important;
  }

  #hub-screen .neon-vs-circle {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.72rem !important;
    margin-bottom: -6px !important;
  }

  #hub-screen .hub-tray-sprite {
    width: 118px !important;
    height: 118px !important;
    margin-top: -4px !important;
    margin-bottom: -4px !important;
  }

  #hub-screen .dish-slot-img {
    width: 34px !important;
    height: 34px !important;
  }

  #hub-screen .market-guests-strip {
    padding: 1px 4px !important;
  }

  #hub-screen .guest-hub-sprite {
    width: 58px !important;
    height: 58px !important;
  }

  #hub-screen .bottom-dock {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 3px !important;
    padding: 1px 2px !important;
  }

  #hub-screen .dock-nav-btns {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 3px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  #hub-screen .dock-btn.graphic-img-btn .graphic-btn-sprite {
    height: 21px !important;
    max-width: 76px !important;
    width: auto !important;
  }

  #hub-screen .cta-play-btn {
    flex-shrink: 0 !important;
    padding: 0 !important;
  }

  #hub-screen .cta-play-btn .cta-play-sprite {
    height: 28px !important;
    max-width: 112px !important;
    width: auto !important;
  }
}

/* --- B. BATTLE SCREEN: 2X CHARACTERS, 2X FOOD/POTS/GEMS & NARROW KITCHEN-TO-BOARD GAP --- */

/* 1. Eliminate vertical dead space between Kitchen Zone and 8x6 Match-3 Gem Board */
.battle-arena-split .player-side,
.battle-arena-split #p1-container,
.battle-arena-split #p2-container {
  justify-content: flex-start !important;
  gap: 1px !important;
}

.battle-arena-split .p1-left-kitchen-col {
  gap: 1px !important;
  margin-bottom: 0 !important;
}

.battle-arena-split .overcooked-kitchen-zone {
  gap: 1px !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.battle-arena-split .board-wrapper {
  justify-content: flex-start !important;
  gap: 1px !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.battle-arena-split .board-stage-inner {
  justify-content: flex-start !important;
  align-items: stretch !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.battle-arena-split .match-grid-board {
  transform-origin: center top !important;
  transform: rotateX(2deg) !important;
  margin-top: 0 !important;
}

/* 2. Giant 2x Food Items inside the 8x6 Match-3 Chopping Board Tiles */
.battle-arena-split .grid-tile {
  padding: 0 !important;
}

.battle-arena-split .tile-sprite-img {
  width: 96% !important;
  height: 96% !important;
  max-width: none !important;
  max-height: none !important;
  transform: translateY(-1px) scale(1.22) !important;
}

/* 3. Desktop / Landscape Battle (16:9): 2x Characters, 2x Pots/Food & Tight Board Gap */
@media (min-width: 1101px), (min-width: 681px) and (min-aspect-ratio: 11/10) {
  .k80-ticket {
    height: clamp(24px, 4.6cqh, 36px) !important;
  }

  .k80-guest-sprite {
    width: clamp(20px, 3.6cqh, 28px) !important;
    height: clamp(20px, 3.6cqh, 28px) !important;
  }

  .k80-dish-icon {
    width: clamp(18px, 3.2cqh, 24px) !important;
    height: clamp(18px, 3.2cqh, 24px) !important;
  }

  .battle-arena-split .side-top-bar {
    height: clamp(22px, 4.0cqh, 30px) !important;
    max-height: 4.2cqh !important;
    margin-bottom: -2px !important;
  }

  .battle-arena-split .chef-avatar-pill {
    width: clamp(26px, 4.4cqh, 36px) !important;
    height: clamp(26px, 4.4cqh, 36px) !important;
  }

  .battle-arena-split .battle-mc-sprite,
  .battle-arena-split .skill-sous-sprite {
    width: clamp(24px, 4.2cqh, 34px) !important;
    height: clamp(24px, 4.2cqh, 34px) !important;
  }

  .battle-arena-split .kitchen-diorama-stage {
    height: clamp(46px, 8.2cqh, 74px) !important;
    max-height: 8.4cqh !important;
    margin: -2px 0 -10px !important;
    overflow: visible !important;
  }

  .battle-arena-split .diorama-mc-img {
    width: clamp(64px, 11.2cqh, 98px) !important;
    height: clamp(64px, 11.2cqh, 98px) !important;
    transform: translateY(6px) !important;
  }

  .battle-arena-split .diorama-sous-img,
  .battle-arena-split .diorama-vip-img {
    width: clamp(52px, 9.2cqh, 82px) !important;
    height: clamp(52px, 9.2cqh, 82px) !important;
    transform: translateY(6px) !important;
  }

  .battle-arena-split .cook-pot {
    padding: 0 2px !important;
    gap: 1px !important;
  }

  .battle-arena-split .pot-main-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
  }

  .battle-arena-split .pot-burner-wrap {
    width: clamp(52px, 8.8cqh, 78px) !important;
    height: clamp(52px, 8.8cqh, 78px) !important;
  }

  .battle-arena-split .pot-sprite-img {
    width: clamp(50px, 8.6cqh, 76px) !important;
    height: clamp(50px, 8.6cqh, 76px) !important;
    transform: translateY(-2px) scale(1.16) !important;
  }

  .battle-arena-split .req-mini-img {
    width: clamp(16px, 2.8cqh, 22px) !important;
    height: clamp(16px, 2.8cqh, 22px) !important;
  }

  .battle-arena-split .kitchen-pass-row {
    bottom: -17px !important;
    right: 4px !important;
  }

  .battle-arena-split .board-hint-bar {
    height: clamp(16px, 2.8cqh, 21px) !important;
    min-height: 0 !important;
    max-height: 3.0cqh !important;
    margin: 0 auto !important;
  }

  .board-hint-bar img,
  .hint-inline-sprite {
    width: clamp(16px, 2.8cqh, 22px) !important;
    height: clamp(16px, 2.8cqh, 22px) !important;
    max-width: 22px !important;
    max-height: 22px !important;
  }

  .battle-arena-split .match-grid-board {
    min-height: 56cqh !important;
    max-height: 62cqh !important;
  }
}

/* 4. Mobile Portrait Battle (9:16): 2x Characters, 2x Pots/Food & Snug Kitchen-to-Board Gap */
@media (max-width: 1100px) and (max-aspect-ratio: 11/10), (max-width: 680px) {
  #battle-screen.active {
    gap: 1px !important;
    padding: 1px 3px 2px !important;
  }

  .k80-guest-sprite {
    width: 28px !important;
    height: 28px !important;
  }

  .k80-dish-icon {
    width: 24px !important;
    height: 24px !important;
  }

  .battle-arena-split .side-top-bar {
    min-height: 24px !important;
    padding: 1px 3px !important;
    margin-bottom: -2px !important;
  }

  .battle-arena-split .chef-avatar-pill {
    width: 32px !important;
    height: 32px !important;
  }

  .battle-arena-split .battle-mc-sprite,
  .battle-arena-split .skill-sous-sprite {
    width: 28px !important;
    height: 28px !important;
  }

  .battle-arena-split .kitchen-diorama-stage {
    height: 66px !important;
    max-height: 68px !important;
    margin: -2px 0 -10px !important;
    overflow: visible !important;
  }

  .battle-arena-split .diorama-mc-img {
    width: 78px !important;
    height: 78px !important;
    transform: translateY(5px) !important;
  }

  .battle-arena-split .diorama-sous-img,
  .battle-arena-split .diorama-vip-img {
    width: 64px !important;
    height: 64px !important;
    transform: translateY(5px) !important;
  }

  .battle-arena-split .pots-3-row {
    gap: 2px !important;
  }

  .battle-arena-split .cook-pot {
    padding: 1px !important;
    gap: 0 !important;
  }

  .battle-arena-split .pot-burner-wrap {
    width: 64px !important;
    height: 64px !important;
  }

  .battle-arena-split .pot-sprite-img {
    width: 62px !important;
    height: 62px !important;
    transform: translateY(-2px) scale(1.18) !important;
  }

  .battle-arena-split .pot-info-col {
    margin-top: -5px !important;
    padding: 1px 2px !important;
    z-index: 6 !important;
  }

  .battle-arena-split .req-mini-img {
    width: 20px !important;
    height: 20px !important;
  }

  /* Overlay kitchen-pass-row onto right side of board-hint-bar to eliminate the middle gap row! */
  .battle-arena-split .kitchen-pass-row {
    position: absolute !important;
    bottom: -17px !important;
    right: 3px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    gap: 2px !important;
    z-index: 42 !important;
  }

  .battle-arena-split .sink-station {
    flex: 0 0 auto !important;
    width: auto !important;
    padding: 1px 5px !important;
    height: 17px !important;
  }

  .battle-arena-split .clean-plate-rack {
    padding: 1px 4px !important;
    height: 17px !important;
  }

  .battle-arena-split .serve-btn-sprite {
    height: 18px !important;
  }

  .battle-arena-split .board-hint-bar {
    min-height: 17px !important;
    max-height: 18px !important;
    padding: 0 150px 0 5px !important;
    margin: 0 !important;
  }

  .board-hint-bar img,
  .hint-inline-sprite {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
  }
}

/* ==========================================================================
   60FPS GPU COMPOSITOR LOCK & ZERO-JANK MOBILE WEBVIEW OPTIMIZATION
   Eliminates per-frame Gaussian blur filters, backdrop readbacks & layout thrash
   ========================================================================== */
*,
*::before,
*::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.parallax-bg-layer,
.parallax-bokeh-layer,
#hub-screen .judges-grand-stage,
#hub-screen .courtyard-middle,
#hub-screen .market-guests-strip,
#hub-screen .bottom-dock,
#battle-screen .overcooked-kitchen-zone,
#battle-screen .board-wrapper {
  transform: none !important;
  will-change: auto !important;
}

.parallax-bg-layer {
  filter: none !important;
}

.stove-underglow-layer,
.parallax-bokeh-layer,
.char-stove-rim-glow,
.ao-contact-shadow,
.power-aura-ring {
  display: none !important;
  animation: none !important;
}

.chibi-sprite,
.tile-sprite-img,
.judge-hub-sprite,
.mc-sprite,
.sous-sprite,
.guest-hub-sprite,
.station-mini-img,
.diorama-mc-img,
.diorama-sous-img,
.diorama-vip-img,
.pot-sprite-img,
.req-mini-img,
.k80-dish-icon,
.k80-guest-sprite,
.hoanh-phi-sprite,
.wing-sign-sprite,
.graphic-btn-sprite,
.cta-play-sprite,
.hub-tray-sprite,
.serve-btn-sprite {
  filter: none !important;
  -webkit-filter: none !important;
}

.chibi-sprite:not(.chibi-bounce-now) {
  animation: none !important;
}

.battle-arena-split .match-grid-board {
  transform: none !important;
  contain: layout style;
}

.battle-arena-split .grid-tile {
  contain: layout style;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35) !important;
}

.battle-arena-split .cook-pot,
.k80-ticket {
  contain: layout style;
}

/* ==========================================================================
   MOBILE HIGH-VISIBILITY TYPOGRAPHY & TOUCH-TARGET BOOST (SAMSUNG A11 / 9:16)
   Fixes microscopic 0.45rem-0.56rem (7px-9px) text & tiny 17px-21px buttons on phones
   while guaranteeing 100% single-screen fit on Hub & Battle (411x847 CSS px) and >=50% 8x6 board.
   ========================================================================== */
@media (max-width: 1100px) and (max-aspect-ratio: 11/10), (max-width: 680px) {
  /* --- 1. TOP HUD BAR (HUB SCREEN — High-Contrast & Compact 2-Row Currencies) --- */
  .top-hud {
    padding: 3px 5px !important;
    gap: 3px !important;
  }

  .hud-appicon {
    width: 28px !important;
    height: 28px !important;
  }

  .hud-title-box h1 {
    font-size: 0.96rem !important;
    letter-spacing: 0.02em !important;
  }

  .hud-currencies {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  .top-hud .currency-pill {
    font-size: 0.82rem !important;
    font-weight: 900 !important;
    padding: 2px 5px !important;
    min-height: 25px !important;
    border-width: 1.5px !important;
    justify-content: center !important;
    white-space: nowrap !important;
    color: #ffffff !important;
  }

  /* Fix black-on-dark-brown Chef Level pill (#btn-chef-level inline color:#000) */
  .top-hud #btn-chef-level,
  .top-hud .chef-lvl-pill {
    background: linear-gradient(135deg, #facc15, #ca8a04) !important;
    color: #1c0a05 !important;
    border-color: #fef08a !important;
  }

  .top-hud .hud-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  .top-hud .hud-btn.hud-icon-btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 31px !important;
    font-size: 1.08rem !important;
    padding: 0 !important;
    border-radius: 8px !important;
    border-width: 1.5px !important;
  }

  .hud-red-dot {
    width: 10px !important;
    height: 10px !important;
    top: -3px !important;
    right: -3px !important;
  }

  /* --- 2. HUB SCREEN: FITS 100% ON ONE SCREEN (411x847) WITH BIG READABLE LABELS --- */
  #hub-screen.active {
    padding: 2px 4px 3px !important;
    gap: 3px !important;
    justify-content: space-between !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  #hub-screen .judges-grand-stage {
    padding: 2px 4px !important;
    flex-shrink: 0 !important;
  }

  #hub-screen .hoanh-phi-sprite {
    max-width: 92vw !important;
    max-height: 30px !important;
  }

  #hub-screen .judge-avatar,
  #hub-screen .judge-hub-sprite {
    width: 48px !important;
    height: 48px !important;
  }

  #hub-screen .judge-avatar-toddler,
  #hub-screen .judge-avatar-toddler .judge-hub-sprite {
    width: 42px !important;
    height: 42px !important;
  }

  #hub-screen .judge-info {
    margin-top: -7px !important;
    padding: 1px 7px !important;
    border-width: 1.5px !important;
  }

  #hub-screen .judge-info strong {
    font-size: 0.8rem !important;
    font-weight: 900 !important;
  }

  #hub-screen .score-paddle {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    right: -4px !important;
    top: -2px !important;
  }

  #hub-screen .judge-speech-box {
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    padding: 1px 9px !important;
    margin-top: 1px !important;
  }

  #hub-screen .courtyard-middle {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 4px !important;
    flex: 0 0 auto !important;
  }

  #hub-screen .team-wing {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 3px 3px !important;
    gap: 2px !important;
  }

  #hub-screen .wing-sign-sprite {
    max-width: 176px !important;
    max-height: 28px !important;
  }

  #hub-screen .team-select-tag {
    font-size: 0.74rem !important;
    font-weight: 900 !important;
    padding: 2px 8px !important;
    margin-top: 7px !important;
    position: relative !important;
    z-index: 60 !important;
  }

  #hub-screen .mc-badge-icon,
  #hub-screen .mc-sprite {
    width: 56px !important;
    height: 56px !important;
  }

  #hub-screen .sous-chefs-grid {
    margin: -42px auto 0 !important;
  }

  #hub-screen .sous-icon,
  #hub-screen .sous-sprite {
    width: 43px !important;
    height: 43px !important;
  }

  #hub-screen .sous-text {
    padding: 1px 6px !important;
    margin-top: -7px !important;
  }

  #hub-screen .sous-text strong {
    font-size: 0.76rem !important;
    font-weight: 900 !important;
  }

  #hub-screen .wing-stations-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 2px !important;
    width: 100% !important;
  }

  #hub-screen .station-mini {
    font-size: 0 !important;
    line-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  #hub-screen .station-mini-img {
    width: 32px !important;
    height: 32px !important;
  }

  #hub-screen .station-mini b {
    font-size: 0.68rem !important;
    line-height: 1.12 !important;
    font-weight: 900 !important;
    padding: 1px 2px !important;
    margin-top: -4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    text-align: center !important;
    color: #fef08a !important;
  }

  #hub-screen .wing-mission-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 3px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    padding: 2px 4px !important;
    line-height: 1.12 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  #hub-screen .wing-mission-bar span {
    flex: 1 1 0% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }

  #hub-screen .wing-mission-bar strong {
    flex-shrink: 0 !important;
  }

  #hub-screen .center-pedestal {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 2px 5px !important;
    gap: 2px !important;
    flex: 0 0 auto !important;
  }

  #hub-screen .neon-vs-circle {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.76rem !important;
    margin-top: -8px !important;
    margin-bottom: -8px !important;
  }

  #hub-screen .hub-tray-sprite {
    width: 68px !important;
    height: 68px !important;
    margin-top: -2px !important;
    margin-bottom: -4px !important;
  }

  #hub-screen #active-tray-title {
    font-size: 0.84rem !important;
    font-weight: 900 !important;
    padding: 2px 10px !important;
  }

  #hub-screen .tray-showcase-head small {
    display: none !important;
  }

  #hub-screen .pedestal-mode-wrap {
    width: 100% !important;
    transform: none !important;
  }

  #hub-screen .mode-switch-group,
  #hub-screen .difficulty-switch-group {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
    margin-top: 2px !important;
  }

  #hub-screen .mode-pill-btn,
  #hub-screen .diff-pill-btn {
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    padding: 2px 3px !important;
    min-height: 26px !important;
    white-space: nowrap !important;
    text-align: center !important;
    justify-content: center !important;
  }

  #hub-screen .market-guests-strip {
    flex-shrink: 0 !important;
    padding: 1px 4px !important;
  }

  #hub-screen .guest-hub-sprite {
    width: 36px !important;
    height: 36px !important;
  }

  #hub-screen .guest-chip span {
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    padding: 1px 5px !important;
    margin-top: -7px !important;
    white-space: nowrap !important;
  }

  /* Sticky 2-Row Large Touch Dock — Always 100% visible & tappable at bottom of Hub */
  #hub-screen .bottom-dock {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 60 !important;
    background: linear-gradient(180deg, rgba(24, 8, 4, 0.92), rgba(16, 5, 2, 0.98)) !important;
    border-top: 1px solid rgba(250, 204, 21, 0.45) !important;
    border-radius: 10px 10px 0 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2px !important;
    padding: 2px 4px 2px !important;
    flex-shrink: 0 !important;
  }

  #hub-screen .dock-nav-btns {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 5px !important;
  }

  #hub-screen #btn-dock-workshop .graphic-btn-sprite,
  #hub-screen #btn-open-missions .graphic-btn-sprite {
    height: 28px !important;
    max-width: 135px !important;
    width: auto !important;
  }

  #hub-screen #btn-open-recipes .graphic-btn-sprite {
    height: 32px !important;
    max-width: 86px !important;
    width: auto !important;
  }

  #hub-screen .cta-play-btn,
  #hub-screen .graphic-img-btn {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
  }

  #hub-screen .cta-play-btn {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: transparent !important;
  }

  #hub-screen .cta-play-btn .cta-play-sprite {
    height: 40px !important;
    max-width: 160px !important;
    width: auto !important;
  }

  /* --- 3. BATTLE SCREEN (9:16): ALL 6 ROWS OF 8x6 BOARD UNCLIPPED + READABLE UI --- */
  #battle-screen.active {
    padding: 2px 3px 2px !important;
    gap: 2px !important;
    overflow: hidden !important;
  }

  .battle-header {
    gap: 2px !important;
    padding: 1px 2px !important;
  }

  .battle-clock-row {
    gap: 4px !important;
  }

  .rule-tag-pill {
    display: none !important;
  }

  .mode-tag-pill,
  .mission-tag-pill,
  .hearts-tag-pill {
    font-size: 0.78rem !important;
    font-weight: 900 !important;
    padding: 2px 7px !important;
    height: 24px !important;
    max-width: 44cqw !important;
  }

  .timer-badge {
    font-size: 0.96rem !important;
    font-weight: 900 !important;
    padding: 2px 9px !important;
    height: 26px !important;
  }

  .battle-header-actions {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
  }

  .battle-header-actions .hud-btn,
  .battle-header-actions .hud-btn.hud-icon-btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 28px !important;
    font-size: 1.02rem !important;
    padding: 0 !important;
    border-radius: 7px !important;
  }

  /* Equal-Height 3-Column RestoBill K80 Ticket Rail (Zero 3-Line Bulging) */
  .battle-ticket-rail {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
    overflow: hidden !important;
    padding: 1px 0 !important;
  }

  .k80-ticket {
    min-width: 0 !important;
    width: 100% !important;
    padding: 3px 4px !important;
    border-radius: 8px !important;
    gap: 2px !important;
  }

  .k80-guest-line {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 2px !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }

  .k80-guest-sprite {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
  }

  .k80-guest-line span {
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .k80-price-tag {
    font-size: 0.7rem !important;
    font-weight: 900 !important;
    padding: 1px 4px !important;
    flex-shrink: 0 !important;
  }

  .k80-dishes {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    min-width: 0 !important;
  }

  .k80-dishes,
  .k80-dishes span,
  .k80-dishes b,
  .k80-dishes small {
    font-size: 0.7rem !important;
    font-weight: 900 !important;
    line-height: 1.12 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .k80-dish-icon {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
  }

  .k80-timer-bar {
    height: 4px !important;
    margin-top: 1px !important;
    border-radius: 99px !important;
  }

  /* Chef Header & Sous-Chef Active Skills Bar (100% Width Fit — Zero Right Overflow) */
  .battle-arena-split .side-top-bar {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 30px !important;
    padding: 1px 3px !important;
    gap: 3px !important;
    justify-content: space-between !important;
    overflow: hidden !important;
  }

  .battle-arena-split .role-badge,
  .battle-arena-split .side-chef-id .chef-avatar-pill {
    display: none !important;
  }

  .battle-arena-split .side-chef-id {
    padding: 2px 7px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
  }

  .battle-arena-split .side-chef-id strong {
    font-size: 0.78rem !important;
    font-weight: 900 !important;
  }

  .battle-arena-split .sous-skills-bar {
    gap: 3px !important;
    flex: 1 1 auto !important;
    justify-content: center !important;
    min-width: 0 !important;
  }

  .battle-arena-split .sous-skill-btn {
    height: 28px !important;
    padding: 1px 5px 1px 3px !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    overflow: hidden !important;
  }

  .battle-arena-split .skill-sous-sprite {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
  }

  .battle-arena-split .skill-btn-txt {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .battle-arena-split .skill-btn-txt span {
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .battle-arena-split .skill-btn-txt b {
    display: none !important;
  }

  .battle-arena-split .side-score-box {
    height: 28px !important;
    padding: 2px 6px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .battle-arena-split .side-score-box span {
    font-size: 0.78rem !important;
    font-weight: 900 !important;
  }

  .battle-arena-split .side-score-box small {
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    margin-left: 2px !important;
  }

  @media (max-width: 560px) {
    .battle-arena-split .side-score-box small {
      display: none !important;
    }
  }

  /* Kitchen Stage Speech, Pots & Single-Row Ingredient Chips (Saves 38px height!) */
  .battle-arena-split .kitchen-diorama-stage {
    height: 46px !important;
    max-height: 48px !important;
    margin: -2px 0 -8px !important;
  }

  .battle-arena-split .diorama-mc-img {
    width: 68px !important;
    height: 68px !important;
  }

  .battle-arena-split .diorama-sous-img,
  .battle-arena-split .diorama-vip-img {
    width: 56px !important;
    height: 56px !important;
  }

  .battle-arena-split .diorama-speech-bubble {
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    padding: 2px 9px !important;
  }

  .battle-arena-split .chef-mood-pill {
    display: none !important;
  }

  .battle-arena-split .pot-burner-wrap {
    width: 52px !important;
    height: 52px !important;
  }

  .battle-arena-split .pot-sprite-img {
    width: 50px !important;
    height: 50px !important;
  }

  .pot-medallion {
    width: 20px !important;
    height: 20px !important;
    font-size: 0.7rem !important;
    font-weight: 900 !important;
  }

  .battle-arena-split .pot-top-line {
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    padding: 1px 4px !important;
  }

  .battle-arena-split .pot-status-tag {
    font-size: 0.7rem !important;
    font-weight: 900 !important;
    padding: 1px 4px !important;
  }

  .battle-arena-split .pots-3-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
    padding: 0 2px !important;
  }

  .battle-arena-split .cook-pot {
    min-width: 0 !important;
    padding: 2px 1px !important;
  }

  .battle-arena-split .pot-reqs-wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 2px !important;
    max-width: 100% !important;
  }

  .battle-arena-split .req-pill {
    font-size: 0.78rem !important;
    font-weight: 900 !important;
    padding: 1px 3px !important;
    gap: 2px !important;
    white-space: nowrap !important;
  }

  .battle-arena-split .req-mini-img {
    width: 16px !important;
    height: 16px !important;
  }

  /* Non-Overlapping Left Hint Bar + Right Pass/Serve Strip (26px) */
  .battle-arena-split .sink-info strong {
    display: none !important;
  }

  .battle-arena-split .kitchen-pass-row {
    bottom: -27px !important;
    right: 0 !important;
    gap: 3px !important;
  }

  .battle-arena-split .clean-plate-rack,
  .battle-arena-split .sink-station {
    font-size: 0.74rem !important;
    font-weight: 900 !important;
    padding: 1px 5px !important;
    height: 24px !important;
    white-space: nowrap !important;
  }

  .battle-arena-split .serve-btn-sprite {
    height: 25px !important;
  }

  .battle-arena-split .board-hint-bar {
    width: calc(100% - 210px) !important;
    max-width: calc(100% - 210px) !important;
    margin: 0 auto 0 0 !important;
    min-height: 25px !important;
    max-height: 26px !important;
    font-size: 0.74rem !important;
    font-weight: 900 !important;
    padding: 1px 4px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 3px !important;
  }

  .battle-arena-split #p1-hint-text {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .battle-arena-split .board-hint-actions {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
  }

  .board-hint-bar img,
  .hint-inline-sprite {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
  }

  .auto-move-btn,
  .mini-shuffle-btn {
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    height: 20px !important;
    padding: 0 4px !important;
    flex-shrink: 0 !important;
  }

  /* 8x6 Match-3 Board: Flex-Fit All 6 Rows Cleanly Above Tactical Belt (>=50% height) */
  .battle-arena-split .board-stage-inner {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .battle-arena-split .match-grid-board {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  /* Bottom Tactical Booster Belt (Big 32px Touch Buttons) */
  .tactical-belt {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 33px !important;
    padding: 2px 5px !important;
    gap: 5px !important;
  }

  .tactical-btn {
    flex: 1 1 0% !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px 6px !important;
    gap: 5px !important;
  }

  .tactical-btn .tool-icon {
    font-size: 1.08rem !important;
  }

  .tactical-btn .tool-badge {
    font-size: 0.84rem !important;
    font-weight: 900 !important;
    padding: 1px 6px !important;
  }

  /* Modals & K80 Receipt Readability Boost + Cutout Safe Area on Mobile Portrait */
  #game-viewport {
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .top-hud {
    padding-top: calc(max(var(--cutout-top, 0px), env(safe-area-inset-top, 0px)) + 3px) !important;
  }

  #hub-screen .bottom-dock {
    padding-bottom: calc(max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) + 3px) !important;
  }

  #battle-screen.active {
    padding-top: calc(max(var(--cutout-top, 0px), env(safe-area-inset-top, 0px)) + 2px) !important;
    padding-bottom: calc(max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) + 2px) !important;
  }

  .battle-header::before {
    display: none !important;
  }

  .modal-backdrop {
    padding: calc(max(var(--cutout-top, 0px), env(safe-area-inset-top, 0px)) + 6px) 6px calc(max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) + 6px) !important;
  }

  .modal-box {
    width: 96vw !important;
    max-height: calc(100dvh - max(var(--cutout-top, 0px), env(safe-area-inset-top, 0px)) - max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) - 14px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0.85rem !important;
  }

  .modal-header {
    flex-shrink: 0 !important;
  }

  #modal-body {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-header h3 {
    font-size: 1.08rem !important;
  }

  .close-modal-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.15rem !important;
  }

  .s5-tab-btn {
    font-size: 0.9rem !important;
    padding: 0.55rem 0.65rem !important;
  }

  .s5-sku-card,
  .upgrade-card,
  .s4-card {
    font-size: 0.9rem !important;
  }

  .upgrade-info h4 {
    font-size: 1.02rem !important;
  }

  .upgrade-desc,
  .upgrade-next,
  .cost-tag,
  .upgrade-btn {
    font-size: 0.88rem !important;
  }
}

/* ==========================================================================
   MOBILE LANDSCAPE HIGH-VISIBILITY & DISPLAY CUTOUT SAFE LAYOUT (19.5:9 / 16:9)
   Fixes:
   1. Edge-to-edge full-bleed background across punch-hole cutout (zero black bar)
      while padding HUD, Hub, Battle & Modals clear of --cutout-left / --cutout-right.
   2. Fits Main Hub 100% inside 891x411 CSS px (Judges + 3-Col Arena + Guests + Dock)
      with zero horizontal/vertical overflow.
   3. Pins Modal Header & Close [X] button inside viewport with smooth #modal-body scroll.
   4. Boosts Mobile Landscape Battle timer, K80 tickets, hint bar & tactical belt touch targets
      while keeping both P1 & P2 8x6 boards unclipped (~57% viewport height).
   ========================================================================== */
:root {
  --cutout-top: env(safe-area-inset-top, 0px);
  --cutout-right: env(safe-area-inset-right, 0px);
  --cutout-bottom: env(safe-area-inset-bottom, 0px);
  --cutout-left: env(safe-area-inset-left, 0px);
  --safe-top: max(var(--cutout-top, 0px), env(safe-area-inset-top, 0px));
  --safe-right: max(var(--cutout-right, 0px), env(safe-area-inset-right, 0px));
  --safe-bottom: max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px));
  --safe-left: max(var(--cutout-left, 0px), env(safe-area-inset-left, 0px));
}

@media (max-height: 520px) and (orientation: landscape) {
  #game-viewport {
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
  }

  /* 1. Top HUD Bar — Cutout-Safe Single Row (All 7 Currencies + All 9 Action Icons Visible) */
  .top-hud {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 35px !important;
    padding: 2px calc(max(var(--cutout-right, 0px), env(safe-area-inset-right, 0px)) + 8px) 2px calc(max(var(--cutout-left, 0px), env(safe-area-inset-left, 0px)) + 8px) !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .hud-brand {
    gap: 4px !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }

  .hud-appicon {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
  }

  .hud-title-box p {
    display: none !important;
  }

  .hud-title-box h1 {
    font-size: 0.78rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    max-width: 136px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .hud-currencies {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .top-hud .currency-pill {
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    padding: 1px 5px !important;
    height: 24px !important;
    min-height: 24px !important;
    border-width: 1.5px !important;
    white-space: nowrap !important;
    color: #ffffff !important;
  }

  .top-hud #btn-chef-level,
  .top-hud .chef-lvl-pill {
    background: linear-gradient(135deg, #facc15, #ca8a04) !important;
    color: #1c0a05 !important;
    border-color: #fef08a !important;
  }

  .top-hud .hud-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
    width: auto !important;
  }

  .top-hud .hud-btn.hud-icon-btn {
    width: 26px !important;
    min-width: 26px !important;
    height: 26px !important;
    font-size: 0.92rem !important;
    padding: 0 !important;
    border-radius: 6px !important;
    border-width: 1.5px !important;
  }

  /* 2. Main Hub (#hub-screen) — 100% Single-Screen Fit on 891x411 CSS px */
  #game-viewport:has(#battle-screen.active) #hub-screen,
  #hub-screen[style*="none"],
  #hub-screen.hidden {
    display: none !important;
  }

  #game-viewport:not(:has(#battle-screen.active)) #hub-screen:not([style*="none"]):not(.hidden) {
    height: calc(100dvh - 34px) !important;
    max-height: calc(100dvh - 34px) !important;
    width: 100% !important;
    padding: 3px calc(max(var(--cutout-right, 0px), env(safe-area-inset-right, 0px)) + 8px) calc(max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) + 4px) calc(max(var(--cutout-left, 0px), env(safe-area-inset-left, 0px)) + 8px) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 4px 6px !important;
    overflow: hidden !important;
  }

  #hub-screen .diorama-occlusion-masks {
    display: none !important;
  }

  #hub-screen .judges-grand-stage {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 2px 10px !important;
    height: 50px !important;
    min-height: 0 !important;
    margin: 0 !important;
    background: rgba(26, 9, 4, 0.84) !important;
    border: 1px solid rgba(250, 204, 21, 0.45) !important;
    border-radius: 10px !important;
  }

  #hub-screen .judges-banner-title {
    display: none !important;
  }

  #hub-screen .judges-arch-ribbon {
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  #hub-screen .hoanh-phi-sprite {
    max-height: 30px !important;
    max-width: 180px !important;
    width: auto !important;
  }

  #hub-screen .judges-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 0 !important;
    flex: 1 1 auto !important;
  }

  #hub-screen .judge-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  #hub-screen .judge-avatar,
  #hub-screen .judge-hub-sprite {
    width: 34px !important;
    height: 34px !important;
  }

  #hub-screen .judge-avatar-toddler,
  #hub-screen .judge-avatar-toddler .judge-hub-sprite {
    width: 30px !important;
    height: 30px !important;
  }

  #hub-screen .judge-info {
    margin-top: -5px !important;
    padding: 0 6px !important;
    white-space: nowrap !important;
  }

  #hub-screen .judge-info strong {
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
  }

  #hub-screen .judge-info span,
  #hub-screen .judge-info small {
    display: none !important;
  }

  #hub-screen .score-paddle {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.62rem !important;
    font-weight: 900 !important;
    right: -5px !important;
    top: -1px !important;
  }

  #hub-screen .judge-speech-box {
    font-size: 0.7rem !important;
    font-weight: 900 !important;
    padding: 2px 8px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Row 2: 3-Column Symmetric Arena (Team Bà 3 | Center Tray & Modes | Team Bà 4) */
  #hub-screen .courtyard-middle {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr) minmax(0, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    align-items: stretch !important;
  }

  #hub-screen #wing-ba3 {
    order: 1 !important;
  }

  #hub-screen .center-pedestal {
    order: 2 !important;
    grid-column: auto !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    transform: none !important;
    padding: 4px 6px !important;
    gap: 2px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: rgba(28, 9, 4, 0.88) !important;
    border: 1.5px solid rgba(250, 204, 21, 0.55) !important;
    border-radius: 10px !important;
  }

  #hub-screen #wing-ba4 {
    order: 3 !important;
  }

  #hub-screen .team-wing {
    position: relative !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 12px 5px 4px !important;
    gap: 2px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    background: linear-gradient(180deg, rgba(45, 14, 6, 0.88) 0%, rgba(24, 8, 3, 0.94) 100%) !important;
    border: 1.5px solid rgba(250, 204, 21, 0.55) !important;
    border-radius: 10px !important;
  }

  #hub-screen .wing-roof-sign {
    position: absolute !important;
    top: -7px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  #hub-screen .wing-sign-sprite {
    max-height: 22px !important;
    max-width: 148px !important;
    width: auto !important;
  }

  #hub-screen .wing-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    margin-top: 2px !important;
    width: 100% !important;
  }

  #hub-screen .wing-title-group .diegetic-wood-sign {
    display: none !important;
  }

  #hub-screen .mc-badge-icon,
  #hub-screen .mc-sprite {
    width: 44px !important;
    height: 44px !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
  }

  #hub-screen .team-select-tag {
    font-size: 0.7rem !important;
    font-weight: 900 !important;
    padding: 2px 7px !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  #hub-screen .sous-chefs-grid {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    gap: 4px !important;
    margin: -6px 0 0 !important;
    width: 100% !important;
  }

  #hub-screen .sous-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  #hub-screen .sous-icon,
  #hub-screen .sous-sprite {
    width: 36px !important;
    height: 36px !important;
  }

  #hub-screen .sous-text {
    padding: 1px 6px !important;
    margin-top: -6px !important;
  }

  #hub-screen .sous-text strong {
    font-size: 0.7rem !important;
    font-weight: 900 !important;
  }

  #hub-screen .sous-text span {
    display: none !important;
  }

  #hub-screen .wing-stations-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #hub-screen .station-mini {
    font-size: 0 !important;
    line-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  #hub-screen .station-mini-img {
    width: 28px !important;
    height: 28px !important;
  }

  #hub-screen .station-mini b {
    font-size: 0.66rem !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
    padding: 1px 3px !important;
    margin-top: -4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    color: #fef08a !important;
  }

  #hub-screen .wing-mission-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    font-size: 0.66rem !important;
    font-weight: 900 !important;
    padding: 2px 5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  #hub-screen .wing-mission-bar span {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #hub-screen .wing-mission-bar strong {
    flex-shrink: 0 !important;
  }

  #hub-screen .neon-vs-circle {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 0.7rem !important;
    margin: 0 !important;
  }

  #hub-screen .hub-tray-sprite {
    width: 78px !important;
    height: 78px !important;
    margin: -2px 0 !important;
    transform: none !important;
  }

  #hub-screen .tray-showcase-head > div {
    margin-top: 0 !important;
    padding: 0 !important;
  }

  #hub-screen #active-tray-title {
    font-size: 0.74rem !important;
    font-weight: 900 !important;
    padding: 2px 8px !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #hub-screen .tray-showcase-head small,
  #hub-screen .tray-3-dishes {
    display: none !important;
  }

  #hub-screen .pedestal-mode-wrap {
    width: 100% !important;
    transform: none !important;
  }

  #hub-screen .mode-switch-group,
  #hub-screen .difficulty-switch-group {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
    margin-top: 2px !important;
  }

  #hub-screen .mode-pill-btn,
  #hub-screen .diff-pill-btn {
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    padding: 2px 2px !important;
    min-height: 24px !important;
    white-space: nowrap !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Row 3: Left = 5 Bill Universe Guests | Right = Bottom Dock & VÀO BẾP NGAY */
  #hub-screen .market-guests-strip {
    grid-column: 1 / 2 !important;
    grid-row: 3 !important;
    margin: 0 !important;
    padding: 2px 6px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(20, 6, 2, 0.84) !important;
    border: 1px solid rgba(250, 204, 21, 0.4) !important;
    border-radius: 10px !important;
    min-width: 0 !important;
  }

  #hub-screen .market-guests-strip .strip-panel:first-child,
  #hub-screen .market-guests-strip .strip-label {
    display: none !important;
  }

  #hub-screen .market-guests-strip .strip-panel {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #hub-screen .guests-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 2px !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  #hub-screen .guest-chip,
  #hub-screen .guest-chip:nth-child(3) {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 0 !important;
    margin-right: 0 !important;
    min-width: 0 !important;
  }

  #hub-screen .guest-hub-sprite {
    width: 28px !important;
    height: 28px !important;
  }

  #hub-screen .guest-chip span {
    font-size: 0.62rem !important;
    font-weight: 900 !important;
    padding: 0 4px !important;
    margin-top: -5px !important;
    white-space: nowrap !important;
  }

  #hub-screen .bottom-dock {
    grid-column: 2 / 3 !important;
    grid-row: 3 !important;
    position: relative !important;
    margin: 0 !important;
    padding: 2px 6px !important;
    height: 44px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    background: rgba(20, 6, 2, 0.88) !important;
    border: 1px solid rgba(250, 204, 21, 0.45) !important;
    border-radius: 10px !important;
    min-width: 0 !important;
  }

  #hub-screen .dock-nav-btns {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 5px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  #hub-screen #btn-dock-workshop .graphic-btn-sprite,
  #hub-screen #btn-open-missions .graphic-btn-sprite {
    height: 26px !important;
    max-width: 120px !important;
    width: auto !important;
  }

  #hub-screen #btn-open-recipes .graphic-btn-sprite {
    height: 30px !important;
    max-width: 78px !important;
    width: auto !important;
  }

  #hub-screen .cta-play-btn {
    width: auto !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
  }

  #hub-screen .cta-play-btn .cta-play-sprite {
    height: 38px !important;
    max-width: 110px !important;
    width: auto !important;
  }

  /* 3. Battle Screen (#battle-screen) — Cutout-Safe Dual 8x6 Arena on Mobile Landscape */
  #battle-screen.active {
    padding: 3px calc(max(var(--cutout-right, 0px), env(safe-area-inset-right, 0px)) + 6px) calc(max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) + 3px) calc(max(var(--cutout-left, 0px), env(safe-area-inset-left, 0px)) + 6px) !important;
    gap: 2px !important;
  }

  .battle-header::before {
    display: none !important;
  }

  .battle-header {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 31px !important;
    padding: 1px 4px !important;
    gap: 4px !important;
  }

  .battle-ticket-rail {
    max-width: 39cqw !important;
    gap: 3px !important;
  }

  .k80-ticket {
    min-width: 96px !important;
    max-width: 112px !important;
    height: 27px !important;
    padding: 1px 4px !important;
  }

  .k80-guest-line span,
  .k80-price-tag,
  .k80-dishes {
    font-size: 0.64rem !important;
    font-weight: 900 !important;
  }

  .mode-tag-pill,
  .mission-tag-pill,
  .hearts-tag-pill {
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    height: 23px !important;
    padding: 0 7px !important;
  }

  .timer-badge {
    font-size: 0.82rem !important;
    font-weight: 900 !important;
    height: 25px !important;
    padding: 0 9px !important;
  }

  .battle-header-actions .hud-btn,
  .battle-header-actions .hud-btn.hud-icon-btn {
    min-width: 26px !important;
    height: 25px !important;
    font-size: 0.88rem !important;
    padding: 0 3px !important;
  }

  .battle-arena-split .side-top-bar {
    height: 23px !important;
    max-height: 24px !important;
  }

  .battle-arena-split .side-chef-id strong,
  .battle-arena-split .sous-skill-btn .skill-btn-txt span,
  .battle-arena-split .side-score-box span {
    font-size: 0.68rem !important;
    font-weight: 900 !important;
  }

  .battle-arena-split .req-pill {
    font-size: 0.68rem !important;
    font-weight: 900 !important;
  }

  .battle-arena-split .board-hint-bar {
    width: calc(100% - 172px) !important;
    max-width: calc(100% - 172px) !important;
    margin: 0 auto 0 0 !important;
    min-height: 19px !important;
    max-height: 20px !important;
    font-size: 0.66rem !important;
    font-weight: 900 !important;
    padding: 1px 4px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 2px !important;
  }

  .battle-arena-split #p1-hint-text,
  .battle-arena-split #p2-hint-text {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .auto-move-btn,
  .mini-shuffle-btn {
    font-size: 0.64rem !important;
    font-weight: 900 !important;
    height: 17px !important;
    padding: 0 4px !important;
    flex-shrink: 0 !important;
  }

  .battle-arena-split .clean-plate-rack,
  .battle-arena-split .sink-station {
    font-size: 0.66rem !important;
    font-weight: 900 !important;
    height: 19px !important;
    padding: 0 4px !important;
  }

  .battle-arena-split .serve-btn-sprite {
    height: 20px !important;
  }

  .battle-arena-split .board-stage-inner {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .battle-arena-split .match-grid-board {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .tactical-belt {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 25px !important;
    padding: 1px 4px !important;
    gap: 4px !important;
  }

  .tactical-btn {
    flex: 1 1 0% !important;
    height: 21px !important;
    min-height: 21px !important;
    padding: 0 6px !important;
    gap: 4px !important;
  }

  .tactical-btn .tool-icon {
    font-size: 0.88rem !important;
  }

  .tactical-btn .tool-badge {
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    padding: 0 5px !important;
  }

  /* 4. Modals & K80 Receipt — Pinned Header + Close [X] & Smooth Inner Scroll */
  .modal-backdrop {
    padding: 6px calc(max(var(--cutout-right, 0px), env(safe-area-inset-right, 0px)) + 12px) calc(max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) + 6px) calc(max(var(--cutout-left, 0px), env(safe-area-inset-left, 0px)) + 12px) !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal-box {
    width: min(92vw, 760px) !important;
    max-height: calc(100dvh - max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) - 12px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 8px 14px !important;
  }

  .modal-header {
    flex-shrink: 0 !important;
    padding-bottom: 5px !important;
    margin-bottom: 6px !important;
  }

  .modal-header h3 {
    font-size: 0.98rem !important;
  }

  .close-modal-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.05rem !important;
    flex-shrink: 0 !important;
  }

  #modal-body {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-right: 4px !important;
  }
}

/* ==========================================================================
   SPRINT 6 — iOS APP STORE LAUNCH: RESTORE PURCHASES BAR, WKWEBVIEW GESTURE
   LOCK, HOME INDICATOR GUARD & iPad 4:3 UNIVERSAL (PORTRAIT & LANDSCAPE)
   ========================================================================== */
#game-viewport,
.match-grid-board,
.grid-tile,
.tactical-belt,
.bottom-dock {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

.s6-restore-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.55rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 10px;
}

.s6-restore-bar .s6-restore-note {
  font-size: 0.76rem;
  font-weight: 700;
  color: #cbd5e1;
}

#btn-restore-purchases {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  border: 1.5px solid rgba(125, 211, 252, 0.75);
  border-radius: 999px;
  padding: 0.36rem 0.85rem;
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  transition: transform 0.12s ease, opacity 0.12s ease;
}

#btn-restore-purchases:active {
  transform: scale(0.97);
}

#btn-restore-purchases:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* iPad 4:3 Portrait (768x1024, 820x1180, 834x1194, 1024x1366, 1032x1376) */
@media (min-width: 740px) and (max-width: 1100px) and (max-aspect-ratio: 11/10) {
  #game-viewport {
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .top-hud {
    padding: calc(max(var(--cutout-top, 0px), env(safe-area-inset-top, 0px)) + 4px) 12px 5px !important;
  }

  .top-hud .hud-currencies {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .top-hud .currency-pill {
    font-size: 0.86rem !important;
    min-height: 28px !important;
  }

  #hub-screen .bottom-dock {
    padding: 4px 12px calc(max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) + 6px) !important;
  }

  #battle-screen.active {
    padding: calc(max(var(--cutout-top, 0px), env(safe-area-inset-top, 0px)) + 4px) 12px calc(max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) + 6px) !important;
    gap: 4px !important;
  }

  .battle-arena-split .board-stage-inner {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
  }

  .battle-arena-split .match-grid-board {
    width: 100% !important;
    max-width: min(94vw, 820px) !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
  }

  .tactical-belt {
    max-width: min(94vw, 820px) !important;
    width: 100% !important;
    margin: 0 auto !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 40px !important;
  }

  .tactical-btn {
    height: 32px !important;
    min-height: 32px !important;
  }
}

/* iPad 4:3 Landscape (1024x768, 1180x820, 1366x1024, 1376x1032) */
@media (min-width: 960px) and (orientation: landscape) and (max-aspect-ratio: 15/10) {
  #game-viewport {
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .top-hud {
    padding-top: max(var(--cutout-top, 0px), env(safe-area-inset-top, 0px)) !important;
    padding-left: calc(max(var(--cutout-left, 0px), env(safe-area-inset-left, 0px)) + 12px) !important;
    padding-right: calc(max(var(--cutout-right, 0px), env(safe-area-inset-right, 0px)) + 12px) !important;
  }

  #hub-screen {
    padding-bottom: calc(max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) + 6px) !important;
  }

  #hub-screen .bottom-dock {
    padding-bottom: max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) !important;
  }

  #battle-screen.active {
    padding-top: calc(max(var(--cutout-top, 0px), env(safe-area-inset-top, 0px)) + 4px) !important;
    padding-right: calc(max(var(--cutout-right, 0px), env(safe-area-inset-right, 0px)) + 10px) !important;
    padding-bottom: calc(max(var(--cutout-bottom, 0px), env(safe-area-inset-bottom, 0px)) + 6px) !important;
    padding-left: calc(max(var(--cutout-left, 0px), env(safe-area-inset-left, 0px)) + 10px) !important;
  }

  .battle-arena-split .board-stage-inner {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .battle-arena-split .match-grid-board {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 58cqh !important;
  }
}



