/* TacoLocoRush — pixel-perfect arcade UI */
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('assets/fonts/press-start-2p.woff2') format('woff2');
}
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('assets/fonts/vt323.woff2') format('woff2');
}
@font-face {
  font-family: 'Bungee';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('assets/fonts/bungee.woff2') format('woff2');
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0612;
  font-family: 'VT323', monospace;
  color: #fff;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  background:
    radial-gradient(ellipse at center, #1a0b25 0%, #050208 70%),
    #050208;
  overflow: hidden;
}

#viewport {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1280px;
  height: 720px;
  background: #000;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(1);
  overflow: hidden;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  box-shadow:
    0 0 0 4px #2a1530,
    0 0 0 8px #100610,
    0 30px 80px rgba(0,0,0,0.8),
    0 0 120px rgba(255,140,40,0.15);
  border-radius: 6px;
}

.scene {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.scene.active { display: block; }
.scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* ═══════════════════════════════════════════════════════
   PIXEL ART / TYPOGRAPHY
═══════════════════════════════════════════════════════ */
.pixel {
  font-family: 'Press Start 2P', monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.chunk {
  font-family: 'Bungee', 'Press Start 2P', sans-serif;
  letter-spacing: 1px;
}
.txt-vt {
  font-family: 'VT323', monospace;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════
   TOP BAR — capsules with pixel border
═══════════════════════════════════════════════════════ */
.topbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 50;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.cap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: linear-gradient(180deg, #5a3220 0%, #3d1e0e 100%);
  border: 3px solid #7c4a30;
  border-radius: 30px;
  box-shadow:
    inset 0 2px 0 rgba(255,200,150,0.18),
    inset 0 -3px 0 rgba(0,0,0,0.4),
    0 3px 0 #2a1408,
    0 5px 0 #0d0604;
  height: 44px;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #fff8e0;
  text-shadow: 2px 2px 0 #2a1408;
  white-space: nowrap;
  position: relative;
}
.cap .ico {
  width: 34px;
  height: 34px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(1px 1px 0 #2a1408);
}

.cap.ico-heart .ico,
.cap.ico-coin .ico{
  width: 50px;
  height: 50px;
}

.cap.ico-coin .ico{
  width: 60px;
  height: 60px;
}

.cap.ico-star .ico {
  width: 38px;
  height: 38px;
}
.cap.ico-heart .ico { background-image: url('assets/icons/chile.png'); }
.cap.ico-coin  .ico { background-image: url('assets/icons/coin.png'); }
.cap.ico-gem   .ico { background-image: url('assets/icons/row-up.png'); }
.cap.ico-star  .ico { background-image: url('assets/icons/start.png'); }
.cap.ico-customer .ico {
  background: linear-gradient(180deg, #ffd9b8 0%, #d49a72 100%);
  clip-path: polygon(50% 0%, 70% 30%, 70% 50%, 100% 100%, 0% 100%, 30% 50%, 30% 30%);
}

.cap .add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: linear-gradient(180deg, #4dd06a 0%, #2c9648 100%);
  border: 2px solid #1a5a2c;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  margin-left: 4px;
  cursor: pointer;
  box-shadow: 0 2px 0 #143820;
  transition: transform 80ms;
  font-family: 'Press Start 2P', monospace;
  line-height: 1;
}
.cap .add:hover { transform: translateY(-1px); }
.cap .add:active { transform: translateY(1px); box-shadow: 0 1px 0 #143820; }

.cap .lvl-badge {
  background: linear-gradient(180deg, #ffd24a 0%, #e08818 100%);
  color: #5a2a08;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  border: 2px solid #7a4108;
  text-shadow: 1px 1px 0 rgba(255,220,150,0.5);
}

.cap .xp-bar {
  width: 110px;
  height: 14px;
  background: #1a0a06;
  border: 2px solid #2a1408;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.cap .xp-fill {
  height: 100%;
  background: linear-gradient(180deg, #ff8c2c 0%, #e85510 60%, #c83a08 100%);
  border-right: 2px solid #fff8e0;
  transition: width 300ms ease-out;
}
.cap .xp-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 9px;
  text-shadow: 1px 1px 0 #000;
}

.topbar .spacer { flex: 1; }

.icon-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(180deg, #5a3220 0%, #3d1e0e 100%);
  border: 3px solid #7c4a30;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow:
    inset 0 2px 0 rgba(255,200,150,0.18),
    0 3px 0 #2a1408,
    0 5px 0 #0d0604;
  transition: transform 80ms;
  color: #fff8e0;
  font-size: 20px;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #2a1408; }

/* ═══════════════════════════════════════════════════════
   PAPEL PICADO (banderines mexicanos animados)
═══════════════════════════════════════════════════════ */
.papel-row {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  pointer-events: none;
  z-index: 5;
}
.papel {
  width: 92px;
  height: 78px;
  position: relative;
  transform-origin: top center;
  animation: papelSway 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,0.3));
}
.papel:nth-child(2n) { animation-delay: -1s; animation-duration: 3.4s; }
.papel:nth-child(3n) { animation-delay: -2s; animation-duration: 2.8s; }

@keyframes papelSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* ═══════════════════════════════════════════════════════
   BUTTONS — pixel chunky style
═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #5dd170 0%, #2e9645 100%);
  color: #fff8e0;
  border: 4px solid #1a5a2c;
  border-radius: 12px;
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.3),
    inset 0 -4px 0 rgba(0,0,0,0.3),
    0 4px 0 #143820,
    0 6px 0 #050a04,
    0 8px 16px rgba(0,0,0,0.4);
  cursor: pointer;
  text-shadow: 2px 2px 0 #143820;
  transition: transform 60ms;
  position: relative;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 3px 0 rgba(255,255,255,0.3), 0 1px 0 #143820; }

.btn-red    { background: linear-gradient(180deg, #ff7a4a 0%, #d83c1a 100%); border-color: #6c1a08; box-shadow: inset 0 3px 0 rgba(255,255,255,0.3), inset 0 -4px 0 rgba(0,0,0,0.3), 0 4px 0 #4a0e04, 0 6px 0 #0a0202, 0 8px 16px rgba(0,0,0,0.4); text-shadow: 2px 2px 0 #4a0e04; }
.btn-yellow { background: linear-gradient(180deg, #ffd24a 0%, #e08818 100%); border-color: #7a4108; color: #4a2208; text-shadow: 2px 2px 0 #fff5cc; box-shadow: inset 0 3px 0 rgba(255,255,255,0.4), inset 0 -4px 0 rgba(0,0,0,0.2), 0 4px 0 #4a2208, 0 6px 0 #0a0502, 0 8px 16px rgba(0,0,0,0.4); }
.btn-blue   { background: linear-gradient(180deg, #5ac8f5 0%, #2880c8 100%); border-color: #103860; box-shadow: inset 0 3px 0 rgba(255,255,255,0.3), inset 0 -4px 0 rgba(0,0,0,0.3), 0 4px 0 #082848, 0 6px 0 #02080e, 0 8px 16px rgba(0,0,0,0.4); }

.btn-lg { padding: 22px 64px; font-size: 28px; border-width: 5px; border-radius: 16px; }
.btn-sm { padding: 8px 16px; font-size: 12px; border-width: 3px; border-radius: 8px; }

/* ═══════════════════════════════════════════════════════
   PANEL — wooden / parchment
═══════════════════════════════════════════════════════ */
.panel {
  position: relative;
  background:
    repeating-linear-gradient(90deg, #fdf2dc 0 4px, #f6e6c2 4px 8px),
    #fdf2dc;
  border: 5px solid #8b5a2b;
  border-radius: 14px;
  padding: 24px;
  box-shadow:
    inset 0 0 0 2px #c89060,
    inset 0 0 30px rgba(139, 90, 43, 0.15),
    0 6px 0 #4a2a14,
    0 10px 0 #0a0502,
    0 14px 32px rgba(0,0,0,0.6);
}
.panel-banner {
  position: absolute;
  top: -28px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #d83c1a 0%, #a02208 100%);
  border: 4px solid #4a0e04;
  border-radius: 8px;
  padding: 10px 36px;
  font-family: 'Press Start 2P', monospace;
  color: #fff8e0;
  text-shadow: 2px 2px 0 #4a0e04;
  font-size: 18px;
  box-shadow: 0 4px 0 #2a0802, 0 6px 12px rgba(0,0,0,0.5);
  white-space: nowrap;
}
.panel-banner::before, .panel-banner::after {
  content: '';
  position: absolute;
  bottom: -8px;
  width: 16px; height: 12px;
  background: #6c1a08;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.panel-banner::before { left: -12px; clip-path: polygon(0 0, 100% 0, 100% 100%); background: #6c1a08; }
.panel-banner::after  { right: -12px; clip-path: polygon(0 0, 100% 0, 0 100%); background: #6c1a08; }

/* dotted divider */
.divider {
  border: 0;
  border-top: 3px dashed #8b5a2b;
  margin: 14px 0;
}

/* ═══════════════════════════════════════════════════════
   TICKETS (pedido bubbles above customers)
═══════════════════════════════════════════════════════ */
.ticket {
  position: absolute;
  width: 220px;
  background: #fdf2dc;
  border: 4px solid #8b5a2b;
  border-radius: 14px;
  padding: 10px;
  box-shadow:
    inset 0 0 0 2px #c89060,
    0 4px 0 #4a2a14,
    0 6px 12px rgba(0,0,0,0.5);
  pointer-events: none;
  transition: transform 200ms, opacity 200ms;
  z-index: 30;
}
.ticket::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 14px solid #8b5a2b;
}
.ticket .pat-bar {
  height: 12px;
  background: #2a1408;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 2px solid #4a2a14;
  position: relative;
}
.ticket .pat-fill {
  height: 100%;
  background: linear-gradient(180deg, #5dd170 0%, #2e9645 100%);
  transition: width 100ms linear, background 300ms;
  position: relative;
}
.ticket .pat-fill.warn { background: linear-gradient(180deg, #ffd24a 0%, #e08818 100%); }
.ticket .pat-fill.danger { background: linear-gradient(180deg, #ff7a4a 0%, #d83c1a 100%); animation: dangerPulse 0.5s ease-in-out infinite; }
@keyframes dangerPulse { 50% { filter: brightness(1.3); } }

.ticket .row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ticket .ing {
  width: 38px;
  height: 38px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.4));
}
.ticket .ing.ing-tortilla { background-image: url('assets/ingredientes/tortilla.png'); }
.ticket .ing.ing-meat     { background-image: url('assets/ingredientes/meat.png'); }
.ticket .ing.ing-onion    { background-image: url('assets/ingredientes/onion.png'); }
.ticket .ing.ing-cilantro { background-image: url('assets/ingredientes/cilantro.png'); }
.ticket .ing.ing-salsa    { background-image: url('assets/ingredientes/salsa.png'); }
.ticket .ing.done { filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.4)) brightness(1.2); }
.ticket .ing.pending { opacity: 0.42; filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.4)) grayscale(0.6); }

.ticket.served {
  animation: ticketServed 600ms forwards;
}
@keyframes ticketServed {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.15) translateY(-10px); opacity: 1; }
  100% { transform: scale(0) translateY(-40px); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════
   INGREDIENT DISPENSERS (bottom shelf)
═══════════════════════════════════════════════════════ */
.shelf {
  position: absolute;
  bottom: 38px;
  left: 110px;
  right: 180px;
  display: flex;
  gap: 8px;
  justify-content: center;
  z-index: 40;
}
.disp {
  width: 100px;
  height: 100px;
  background: linear-gradient(180deg, #d4a868 0%, #8b5a2b 100%);
  border: 4px solid #4a2a14;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    inset 0 3px 0 rgba(255,220,160,0.4),
    inset 0 -4px 0 rgba(0,0,0,0.3),
    0 4px 0 #2a1408,
    0 6px 0 #0a0502;
  position: relative;
  transition: transform 80ms;
  overflow: hidden;
}
.disp::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  background:
    radial-gradient(ellipse at center top, rgba(255,240,200,0.4) 0%, transparent 50%);
  pointer-events: none;
}
.disp .ico {
  width: 48px;
  height: 48px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.4));
  transition: transform 100ms;
}
.disp .lbl {
  margin-top: 2px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #fff8e0;
  text-shadow: 2px 2px 0 #2a1408;
  letter-spacing: 1px;
}
.disp[data-key="tortilla"] { border-color: #b08838; }
.disp[data-key="meat"]     { border-color: #6a2a14; background: linear-gradient(180deg, #c08260 0%, #6a2a14 100%); }
.disp[data-key="onion"]    { border-color: #8848aa; background: linear-gradient(180deg, #e0a8c8 0%, #8848aa 100%); }
.disp[data-key="cilantro"] { border-color: #486a14; background: linear-gradient(180deg, #88c060 0%, #486a14 100%); }
.disp[data-key="salsa"]    { border-color: #aa2820; background: linear-gradient(180deg, #e87060 0%, #aa2820 100%); }

.disp:hover { transform: translateY(-3px); }
.disp:hover .ico { transform: scale(1.1); }
.disp:active { transform: translateY(2px); box-shadow: inset 0 3px 0 rgba(255,220,160,0.4), 0 1px 0 #2a1408; }
.disp.flash-ok { animation: flashOk 240ms; }
.disp.flash-bad { animation: flashBad 240ms; }
.disp.highlight { animation: highlightPulse 1s ease-in-out infinite; }
.disp.locked { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.6); }
.disp.locked::after {
  content: '🔒';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 32px;
  pointer-events: none;
}
@keyframes flashOk {
  0%, 100% { box-shadow: inset 0 3px 0 rgba(255,220,160,0.4), inset 0 -4px 0 rgba(0,0,0,0.3), 0 4px 0 #2a1408, 0 6px 0 #0a0502; }
  50% { box-shadow: inset 0 0 0 4px #5dd170, inset 0 0 30px #5dd170, 0 4px 0 #2a1408, 0 0 30px #5dd170; }
}
@keyframes flashBad {
  0%, 100% { box-shadow: inset 0 3px 0 rgba(255,220,160,0.4), inset 0 -4px 0 rgba(0,0,0,0.3), 0 4px 0 #2a1408, 0 6px 0 #0a0502; transform: translateX(0); }
  25% { transform: translateX(-6px); box-shadow: inset 0 0 0 4px #d83c1a, 0 4px 0 #2a1408; }
  75% { transform: translateX(6px); box-shadow: inset 0 0 0 4px #d83c1a, 0 4px 0 #2a1408; }
}
@keyframes highlightPulse {
  0%, 100% { transform: translateY(-2px); filter: brightness(1.2); }
  50% { transform: translateY(-6px); filter: brightness(1.5) drop-shadow(0 0 12px rgba(255,220,100,0.8)); }
}

.trash-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 60px;
  height: 130px;
  background: linear-gradient(180deg, #5a5050 0%, #2a2828 100%);
  border: 4px solid #1a1818;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 32px;
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.15),
    0 4px 0 #0a0808,
    0 6px 0 #050404;
  z-index: 40;
}
.trash-btn:active { transform: translateY(2px); }

/* ═══════════════════════════════════════════════════════
   FLOATING TEXT (PERFECT! +25, ¡DELICIOSO!, etc.)
═══════════════════════════════════════════════════════ */
.float-burst {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 100;
  text-align: center;
}
.float-burst .big {
  font-family: 'Bungee', sans-serif;
  font-size: 110px;
  color: #ffd24a;
  text-shadow:
    4px 4px 0 #b85410,
    8px 8px 0 #4a2208,
    0 0 24px rgba(255,210,74,0.6);
  letter-spacing: 4px;
  animation: bigBurst 1.4s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
  display: block;
  line-height: 0.9;
}
.float-burst .add {
  font-family: 'Press Start 2P', monospace;
  font-size: 56px;
  color: #5dd170;
  text-shadow:
    3px 3px 0 #1a5a2c,
    5px 5px 0 #050a04;
  display: block;
  margin-top: 6px;
  animation: addBurst 1.4s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
@keyframes bigBurst {
  0% { transform: scale(0.2) rotate(-12deg); opacity: 0; }
  20% { transform: scale(1.2) rotate(2deg); opacity: 1; }
  40% { transform: scale(1) rotate(0); }
  85% { transform: scale(1) rotate(0); opacity: 1; }
  100% { transform: scale(1.1) translateY(-30px); opacity: 0; }
}
@keyframes addBurst {
  0% { transform: scale(0) translateY(20px); opacity: 0; }
  30% { transform: scale(1.3) translateY(0); opacity: 1; }
  50% { transform: scale(1) translateY(0); }
  85% { opacity: 1; }
  100% { transform: scale(1) translateY(-50px); opacity: 0; }
}

.delicioso {
  position: absolute;
  background: #fff8e0;
  border: 3px solid #2a1408;
  border-radius: 10px;
  padding: 8px 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: #d83c1a;
  white-space: nowrap;
  z-index: 80;
  animation: delicioso 1.6s ease-out forwards;
  pointer-events: none;
  box-shadow: 3px 3px 0 #2a1408;
}
.delicioso::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 24px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid #2a1408;
}
.delicioso .heart { color: #d83c1a; }
@keyframes delicioso {
  0% { transform: scale(0) translateY(20px); opacity: 0; }
  20% { transform: scale(1.1); opacity: 1; }
  35% { transform: scale(1); }
  80% { opacity: 1; transform: scale(1) translateY(-8px); }
  100% { opacity: 0; transform: scale(1) translateY(-24px); }
}

.coin-fly {
  position: absolute;
  width: 32px;
  height: 32px;
  background-image: url('assets/icons/coin.png');
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 90;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5));
}

.combo-badge {
  position: absolute;
  top: 80px;
  left: 14px;
  background: linear-gradient(180deg, #2a1408 0%, #0a0502 100%);
  border: 3px solid #b85410;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #ffd24a;
  text-shadow: 2px 2px 0 #4a2208;
  z-index: 50;
  display: none;
  animation: comboShake 200ms;
}
.combo-badge.show { display: block; }
.combo-badge .small { font-size: 9px; color: #5dd170; display: block; margin-top: 2px; }
@keyframes comboShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px) rotate(-2deg); }
  75% { transform: translateX(3px) rotate(2deg); }
}

/* stars (3-star rating) */
.stars-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.star {
  width: 38px;
  height: 38px;
  background: linear-gradient(180deg, #5a4a3a 0%, #2a1808 100%);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5));
}
.star.filled {
  background: radial-gradient(circle, #ffe478 0%, #f5a31a 80%);
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5)) drop-shadow(0 0 10px rgba(255,210,74,0.6));
}

/* Map level cards */
.map-grid {
  position: absolute;
  top: 145px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 160px);
  gap: 16px;
  z-index: 10;
}
.map-card {
  position: relative;
  width: 160px;
  height: 225px;
  border: 5px solid #2a1408;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffe879 0%, var(--map-a) 34%, #ff8a16 62%, var(--map-b) 100%);
  box-shadow:
    inset 0 0 0 4px rgba(255,244,170,0.55),
    inset 0 -8px 0 rgba(94,30,4,0.35),
    0 5px 0 #2a1408,
    0 8px 0 #0a0502;
  transition: transform 120ms;
}
.map-card.locked {
  opacity: 0.45;
  filter: grayscale(0.65);
}
.map-art {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 82px;
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, var(--map-a) 0%, var(--map-b) 100%);
  box-shadow: inset 0 0 24px rgba(255,255,255,0.25);
}
.map-art.has-image {
  background-size: 100% auto;
  background-position: center 69%;
  background-repeat: no-repeat;
}
.map-card-body {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 14px;
  height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.map-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 42px;
  color: #fff8e0;
  line-height: 1;
  text-shadow: 3px 3px 0 #6a2a08, 5px 5px 0 #2a1408;
}
.map-name {
  margin-top: 16px;
  min-height: 24px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #fff8e0;
  text-shadow: 2px 2px 0 #8a2a08, 3px 3px 0 #2a1408;
  text-align: center;
  line-height: 1.35;
}
.map-stars {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.map-star {
  width: 27px;
  height: 27px;
  background: linear-gradient(180deg, #4a2b08 0%, #150802 100%);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.65));
}
.map-star.filled {
  background: radial-gradient(circle, #ffe478 0%, #f5a31a 80%);
}
.map-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 36px;
  text-shadow: 2px 2px 0 #000;
}

/* ═══════════════════════════════════════════════════════
   SPLASH SCENE
═══════════════════════════════════════════════════════ */
#scene-splash .bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
#scene-splash .papel-row {
  top: 0;
  z-index: 6;
}
#scene-splash .logo-wrap {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  width: 800px;
}
#scene-splash .logo {
  font-family: 'Bungee', sans-serif;
  font-size: 100px;
  letter-spacing: 2px;
  line-height: 0.95;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.7));
  animation: logoBob 3s ease-in-out infinite;
}
.logo .l-taco { color: #ffd24a; text-shadow: 5px 5px 0 #b85410, 10px 10px 0 #2a1408; }
.logo .l-loco { color: #ff7a4a; text-shadow: 5px 5px 0 #b85410, 10px 10px 0 #2a1408; }
.logo .l-rush { color: #5dd170; text-shadow: 5px 5px 0 #1a5a2c, 10px 10px 0 #2a1408; }
@keyframes logoBob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}
#scene-splash .splash-tagline {
  margin-top: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #fff8e0;
  text-shadow: 3px 3px 0 #2a1408;
  letter-spacing: 3px;
}

#scene-splash .characters {
  position: absolute;
  bottom: 105px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
  z-index: 8;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.6));
}
#scene-splash .characters img {
  height: 360px;
  image-rendering: pixelated;
  animation: charBob 2.6s ease-in-out infinite;
}
#scene-splash .characters img:nth-child(2) { animation-delay: -0.6s; height: 390px; }
#scene-splash .characters img:nth-child(3) { animation-delay: -1.2s; }
@keyframes charBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

#scene-splash .start-row {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 12;
}
#scene-splash .start-btn {
  background: url('assets/buttons/startbutton.png') no-repeat center / contain;
  width: 620px;
  height: 190px;
  cursor: pointer;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.7));
  animation: startPulse 1.6s ease-in-out infinite;
  border: none;
}
@keyframes startPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
#scene-splash .mini-btns {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 12;
}
.mini-btn {
  width: 76px;
  height: 56px;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 175%;
  border: 0;
  cursor: pointer;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.65));
  transition: transform 80ms;
}
.mini-btn.sound-btn { background-image: url('assets/buttons/soundbutton.png'); }
.mini-btn.info-btn { background-image: url('assets/buttons/infobutton.png'); }
.mini-btn.store-btn { background-image: url('assets/buttons/store.png'); }
.mini-btn.muted { filter: grayscale(0.9) brightness(0.75) drop-shadow(0 4px 8px rgba(0,0,0,0.65)); }
.mini-btn:active { transform: translateY(2px); }

/* ═══════════════════════════════════════════════════════
   LEVEL INTRO SCENE
═══════════════════════════════════════════════════════ */
#scene-intro .bg, #scene-game .bg, #scene-complete .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
#scene-intro .intro-panel {
  position: absolute;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  width: 540px;
  text-align: center;
  z-index: 20;
}
.city-banner {
  font-family: 'Bungee', sans-serif;
  font-size: 38px;
  color: #fff8e0;
  text-shadow: 3px 3px 0 #4a0e04;
  margin: 0 auto 0 auto;
  letter-spacing: 3px;
  background: linear-gradient(180deg, #d83c1a 0%, #a02208 100%);
  border: 4px solid #4a0e04;
  border-radius: 10px;
  padding: 14px 40px;
  display: inline-block;
  position: relative;
  top: -50px;
  box-shadow: 0 5px 0 #2a0802, 0 7px 12px rgba(0,0,0,0.5);
}
.city-banner::before, .city-banner::after {
  content: '';
  position: absolute;
  bottom: -10px;
  width: 22px; height: 14px;
  background: #6c1a08;
}
.city-banner::before { left: -16px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.city-banner::after  { right: -16px; clip-path: polygon(0 0, 100% 0, 0 100%); }

.day-pill {
  display: inline-block;
  background: linear-gradient(180deg, #5dd170 0%, #2e9645 100%);
  border: 4px solid #1a5a2c;
  border-radius: 10px;
  padding: 8px 24px;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #fff8e0;
  text-shadow: 2px 2px 0 #143820;
  margin-top: -22px;
  box-shadow: 0 4px 0 #143820, 0 6px 0 #0a0502;
}

.intro-mission {
  font-family: 'Press Start 2P', monospace;
  font-size: 22px;
  color: #2a1408;
  text-shadow: 1px 1px 0 #fff5cc;
  margin: 18px 6px 14px;
  line-height: 1.5;
}
.intro-mission .num {
  color: #d83c1a;
  font-size: 30px;
  text-shadow: 1px 1px 0 #fff5cc, 2px 2px 0 rgba(0,0,0,0.2);
}

.intro-rewards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 12px 0;
}
.reward-chunk {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff5d4;
  border: 3px solid #8b5a2b;
  border-radius: 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  color: #2a1408;
}
.reward-chunk img { width: 28px; height: 28px; image-rendering: pixelated; }
.reward-chunk .chef-portrait {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: #ffd5a8;
  border: 3px solid #8b5a2b;
  background-size: 200% 200%;
  background-position: center 30%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

/* ═══════════════════════════════════════════════════════
   GAME SCENE LAYOUT
═══════════════════════════════════════════════════════ */
#scene-game .game-bg {
  position: absolute;
  inset: 0;
  background: url('assets/imgs/taco-cart-inside2.png') no-repeat center / cover;
  image-rendering: pixelated;
  z-index: 2;
}
#scene-game .papel-row {
  top: 60px;
  z-index: 6;
}

/* Side menu (left chalkboard) */
.chalk {
  position: absolute;
  left: 14px;
  top: 110px;
  width: 130px;
  background: #1a2a18;
  border: 6px solid #4a3a14;
  border-radius: 10px;
  padding: 10px 6px;
  font-family: 'Press Start 2P', monospace;
  color: #fff8e0;
  text-shadow: 1px 1px 0 #000;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
  z-index: 8;
  box-shadow: inset 0 0 0 2px #6a4a14, 0 4px 0 #0a0a0a;
}
.chalk .red { color: #ff7a4a; }
.chalk .green { color: #5dd170; }
.chalk hr { border: 0; border-top: 1px dashed #5a5a3a; margin: 6px 0; }

/* Right neon "TACOS" */
.neon-tacos {
  position: absolute;
  right: 14px;
  top: 110px;
  width: 130px;
  height: 130px;
  background: #050208;
  border: 5px solid #2a1408;
  border-radius: 14px;
  display: grid;
  place-items: center;
  z-index: 8;
  box-shadow: inset 0 0 0 2px #1a0a04, 0 4px 0 #0a0502;
  overflow: hidden;
}
.neon-tacos::before {
  content: 'TACOS';
  font-family: 'Bungee', sans-serif;
  font-size: 26px;
  color: #ff3c8a;
  text-shadow:
    0 0 6px #ff3c8a,
    0 0 12px #ff3c8a,
    0 0 24px #ff3c8a;
  position: absolute;
  top: 14px;
  animation: neonFlicker 4s infinite;
}
.neon-tacos::after {
  content: '';
  position: absolute;
  bottom: 18px;
  width: 70px;
  height: 50px;
  border: 4px solid #5dd170;
  border-radius: 50% 50% 8px 8px / 60% 60% 8px 8px;
  border-top: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(93,209,112,0.15) 100%);
  box-shadow: 0 0 12px #5dd170, inset 0 0 8px #5dd170;
}
@keyframes neonFlicker {
  0%, 100%, 35%, 38% { opacity: 1; }
  36%, 37% { opacity: 0.4; }
  72%, 73% { opacity: 0.6; }
}

/* Customer queue area — fits inside truck window */
.queue-area {
  position: absolute;
  top: 95px;
  left: 280px;
  right: 280px;
  height: 370px;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  z-index: 10;
  pointer-events: none;
}
.cust {
  position: relative;
  width: 300px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  transition: transform 300ms;
  pointer-events: none;
}
.cust img {
  position: relative;
  top: 34px;
  height: 290px;
  image-rendering: pixelated;
  clip-path: inset(0 0 30% 0);
  filter: drop-shadow(0 8px 0 rgba(0,0,0,0.3));
  transition: transform 200ms;
}
.cust.served img { animation: custServed 700ms forwards; }
@keyframes custServed {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-20px) scale(1.05); }
  100% { transform: translateX(140px) translateY(-20px) scale(1.05); opacity: 0; }
}
.cust.angry img { animation: angryShake 250ms ease-in-out infinite; }
@keyframes angryShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px) rotate(-1deg); }
  75% { transform: translateX(3px) rotate(1deg); }
}

/* Counter — hidden, taco-cart-inside has its own counter graphic */
.counter { display: none; }

/* Bottom HUD bar (timer / urgency) */
.bottom-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: rgba(0,0,0,0.4);
  z-index: 35;
}
.bottom-bar .fill {
  height: 100%;
  background: linear-gradient(180deg, #2880c8 0%, #103860 100%);
  transition: width 200ms linear;
}

/* ═══════════════════════════════════════════════════════
   LEVEL COMPLETE / FAIL / GAME OVER
═══════════════════════════════════════════════════════ */
#scene-complete .complete-panel,
#scene-fail .fail-panel {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 640px;
  max-width: 92%;
  z-index: 20;
}

/* Shop uses a scroll container instead of absolute centering */
.shop-scroll {
  position: absolute;
  top: 58px;
  left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  scrollbar-width: thin;
  scrollbar-color: #8b5a2b #1a0808;
}
.shop-scroll::-webkit-scrollbar { width: 8px; }
.shop-scroll::-webkit-scrollbar-track { background: #1a0808; }
.shop-scroll::-webkit-scrollbar-thumb { background: #8b5a2b; border-radius: 4px; }
.shop-scroll::-webkit-scrollbar-thumb:hover { background: #c89060; }

#scene-shop .shop-panel {
  position: relative;
  top: auto; left: auto;
  transform: none;
  margin: 32px auto 28px;
  width: 640px;
  max-width: 92%;
  z-index: 20;
}

#scene-complete .next-stop {
  font-family: 'Bungee', sans-serif;
  font-size: 18px;
  color: #2e9645;
  letter-spacing: 2px;
  text-align: center;
  margin: 4px 0 10px;
}
#scene-complete .city-name {
  font-family: 'Bungee', sans-serif;
  font-size: 78px;
  color: #ffd24a;
  text-shadow: 4px 4px 0 #b85410, 8px 8px 0 #4a2208, 0 0 20px rgba(255,210,74,0.4);
  letter-spacing: 4px;
  text-align: center;
  margin: 6px 0 14px;
  line-height: 1;
}
#scene-complete .city-preview {
  width: 86%;
  height: 130px;
  margin: 0 auto;
  background: linear-gradient(180deg, #1a3060 0%, #050a18 100%);
  border: 4px solid #8b5a2b;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
}
#scene-complete .stat-row {
  display: flex;
  justify-content: space-around;
  font-family: 'Press Start 2P', monospace;
  color: #2a1408;
  font-size: 14px;
  margin: 14px 0;
}
#scene-complete .stat-row .v { color: #d83c1a; font-size: 18px; }

/* particles */
.confetti {
  position: absolute;
  pointer-events: none;
  z-index: 15;
}

/* Toast feedback */
.toast {
  position: absolute;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,10,8,0.92);
  border: 3px solid #b85410;
  padding: 8px 18px;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #ffd24a;
  border-radius: 8px;
  z-index: 80;
  pointer-events: none;
  animation: toastIn 1.6s ease-out forwards;
}
@keyframes toastIn {
  0% { opacity: 0; transform: translate(-50%, -10px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* Pause overlay */
.pause-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 5, 12, 0.85);
  display: none;
  place-items: center;
  z-index: 200;
  flex-direction: column;
  gap: 18px;
}
.pause-overlay.show { display: grid; }

/* Tweaks panel additions (the rest is in tweaks-panel.jsx) */
.tweaks-panel-host {
  font-family: 'VT323', monospace;
}

/* Shop */
#scene-shop .shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}
#scene-shop .shop-item {
  background: #fff5d4;
  border: 4px solid #8b5a2b;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}
#scene-shop .shop-item .shop-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 36px;
}
#scene-shop .shop-item .shop-icon img,
#scene-shop .shop-item .shop-icon .shop-upgrade-icon {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
  filter: drop-shadow(0 2px 2px rgba(42,20,8,0.25));
}
#scene-shop .shop-item .shop-icon-combo,
#scene-shop .shop-item .shop-icon-speed {
  width: 64px;
  height: 64px;
}
#scene-shop .shop-item .shop-icon-combo img,
#scene-shop .shop-item .shop-icon-combo .shop-upgrade-icon,
#scene-shop .shop-item .shop-icon-speed img,
#scene-shop .shop-item .shop-icon-speed .shop-upgrade-icon {
  width: 64px !important;
  height: 64px !important;
}
#scene-shop .shop-item .shop-name { font-family: 'Press Start 2P', monospace; font-size: 12px; color: #2a1408; }
#scene-shop .shop-item .shop-desc { font-family: 'VT323', monospace; font-size: 18px; color: #6a3a14; line-height: 1.2; }
#scene-shop .shop-item .shop-cost {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #d83c1a;
  line-height: 1;
}
#scene-shop .shop-item .shop-cost img,
#scene-shop .shop-item .shop-cost .shop-coin {
  display: block;
  width: 60px !important;
  height: 60px !important;
  max-width: 60px !important;
  max-height: 60px !important;
  flex: 0 0 60px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}
#scene-shop .shop-item.bought { opacity: 0.6; }
#scene-shop .shop-item.bought .shop-cost { color: #2e9645; }

/* Loading splash */
#preloader {
  position: fixed;
  inset: 0;
  background: #0a0612;
  display: grid;
  place-items: center;
  z-index: 999;
  font-family: 'Press Start 2P', monospace;
  color: #ffd24a;
  font-size: 16px;
  text-align: center;
  transition: opacity 400ms;
}
#preloader.hide { opacity: 0; pointer-events: none; }
#preloader .loader-bar {
  width: 320px; height: 16px;
  background: #2a1408;
  border: 3px solid #b85410;
  margin-top: 20px;
  border-radius: 4px;
  overflow: hidden;
}
#preloader .loader-fill {
  width: 0%; height: 100%;
  background: linear-gradient(180deg, #ff8c2c 0%, #d83c1a 100%);
  transition: width 200ms;
}

/* small responsive: tweaks toggles for narrower screens */
@media (max-width: 800px) {
  /* still scaled by viewport transform */
}

/* ═══════════════════════════════════════════════════════
   CHALKBOARD — recipe mini-icons
═══════════════════════════════════════════════════════ */
.ck-recipe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 3px 0;
  padding: 3px 4px;
  background: rgba(255,248,224,0.07);
  border-radius: 4px;
}
.ck-ing {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.5));
}
.ck-ing-tortilla { background-image: url('assets/ingredientes/tortilla.png'); }
.ck-ing-meat     { background-image: url('assets/ingredientes/meat.png'); }
.ck-ing-onion    { background-image: url('assets/ingredientes/onion.png'); }
.ck-ing-cilantro { background-image: url('assets/ingredientes/cilantro.png'); }
.ck-ing-salsa    { background-image: url('assets/ingredientes/salsa.png'); }

/* ═══════════════════════════════════════════════════════
   BUILD PLATE — shows taco in progress above dispensers
═══════════════════════════════════════════════════════ */
.build-plate {
  position: absolute;
  bottom: 152px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 42;
  background: rgba(10,5,2,0.72);
  border: 3px solid #8b5a2b;
  border-radius: 14px;
  padding: 10px 20px;
  min-width: 100px;
  min-height: 68px;
  pointer-events: none;
  transition: opacity 250ms;
}
.build-plate.empty { opacity: 0.25; }
.build-plate-label {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #ffd24a;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  pointer-events: none;
}
.bp-ing {
  width: 48px;
  height: 48px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5));
  animation: bpPopIn 180ms cubic-bezier(0.2,1.5,0.4,1);
}
.bp-ing-tortilla { background-image: url('assets/ingredientes/tortilla.png'); }
.bp-ing-meat     { background-image: url('assets/ingredientes/meat.png'); }
.bp-ing-onion    { background-image: url('assets/ingredientes/onion.png'); }
.bp-ing-cilantro { background-image: url('assets/ingredientes/cilantro.png'); }
.bp-ing-salsa    { background-image: url('assets/ingredientes/salsa.png'); }
@keyframes bpPopIn {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  100% { transform: scale(1) rotate(0);      opacity: 1; }
}

/* ═══════════════════════════════════════════════════════
   COMBO BADGE — tiers
═══════════════════════════════════════════════════════ */
.combo-badge.tier-2 {
  border-color: #ff7a4a;
  color: #ff7a4a;
}
.combo-badge.tier-3 {
  border-color: #d83c1a;
  color: #ff3c8a;
  font-size: 14px;
  box-shadow: 0 0 10px rgba(255,60,138,0.5);
}
.combo-badge.tier-max {
  border-color: #ffd24a;
  color: #ffd24a;
  font-size: 16px;
  text-shadow: 0 0 8px #ffd24a, 2px 2px 0 #4a2208;
  box-shadow: 0 0 18px rgba(255,210,74,0.7);
  animation: comboShake 80ms, comboPulse 1s ease-in-out infinite;
}
@keyframes comboPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(255,210,74,0.7); }
  50%       { box-shadow: 0 0 32px rgba(255,210,74,1.0); }
}

/* ═══════════════════════════════════════════════════════
   GEM SHOP — premium section
═══════════════════════════════════════════════════════ */
.gem-section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #5ac8f5;
  text-shadow: 2px 2px 0 #082848;
  text-align: center;
  margin: 14px 0 8px;
  padding: 6px;
  background: linear-gradient(180deg, #0a1830 0%, #050e1e 100%);
  border: 2px solid #2880c8;
  border-radius: 8px;
}
.gem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.shop-item-gem {
  background: linear-gradient(180deg, #0e1e38 0%, #050e1e 100%);
  border: 3px solid #2880c8;
  border-radius: 10px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 80ms;
  position: relative;
}
.shop-item-gem:hover  { transform: translateY(-2px); border-color: #5ac8f5; }
.shop-item-gem:active { transform: translateY(1px); }
.shop-item-gem .gem-icon { font-size: 32px; line-height: 1; }
.shop-item-gem .gem-name { font-family: 'Press Start 2P', monospace; font-size: 9px; color: #5ac8f5; }
.shop-item-gem .gem-desc { font-family: 'VT323', monospace; font-size: 16px; color: #7ab8e0; line-height: 1.2; }
.shop-item-gem .gem-cost {
  display: flex; align-items: center; gap: 4px;
  font-family: 'Press Start 2P', monospace; font-size: 11px; color: #5ac8f5;
}
.shop-item-gem .gem-qty {
  position: absolute; top: 6px; right: 8px;
  font-family: 'Press Start 2P', monospace; font-size: 9px;
  color: #ffd24a; background: rgba(0,0,0,0.5); padding: 2px 4px; border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════
   ROTATE OVERLAY — shown on portrait phones
═══════════════════════════════════════════════════════ */
#rotate-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, #1a0b25 0%, #050208 70%), #050208;
  display: none;
  place-items: center;
  z-index: 1000;
  text-align: center;
  font-family: 'Press Start 2P', monospace;
}
.rotate-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px 24px;
}
.rotate-phone {
  font-size: 72px;
  line-height: 1;
  animation: phoneTilt 2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes phoneTilt {
  0%, 40%, 100% { transform: rotate(0deg); }
  55%, 85% { transform: rotate(90deg); }
}
.rotate-title {
  font-size: 18px;
  color: #ffd24a;
  text-shadow: 3px 3px 0 #b85410, 5px 5px 0 #2a1408;
  letter-spacing: 2px;
  line-height: 1.4;
}
.rotate-msg {
  font-size: 11px;
  color: #fff8e0;
  text-shadow: 2px 2px 0 #000;
  line-height: 2.2;
  letter-spacing: 1px;
}
.rotate-arrow {
  font-size: 56px;
  color: #5dd170;
  text-shadow: 0 0 12px rgba(93,209,112,0.8), 3px 3px 0 #1a5a2c;
  animation: arrowPulse 1s ease-in-out infinite;
  line-height: 1;
}
@keyframes arrowPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════
   FULLSCREEN HINT — tap-to-fullscreen nudge (landscape mobile)
═══════════════════════════════════════════════════════ */
#fs-hint {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2000;
}
#fs-hint-btn {
  background: rgba(10,6,18,0.82);
  border: 2px solid #ffd24a;
  border-radius: 8px;
  color: #ffd24a;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 8px 12px;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 0 12px rgba(255,210,74,0.35);
  animation: fsHintPulse 1.8s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
#fs-hint-btn:active { transform: scale(0.95); }
@keyframes fsHintPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255,210,74,0.35); }
  50%       { box-shadow: 0 0 22px rgba(255,210,74,0.7); }
}

/* ═══════════════════════════════════════════════════════
   LANDSCAPE PHONE — ensure touch targets are hit-friendly
   (game already scales correctly; these polish touch UX)
═══════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
  .disp { min-width: 44px; min-height: 44px; }
  .btn, .icon-btn, .mini-btn { -webkit-tap-highlight-color: transparent; }
  .map-card { -webkit-tap-highlight-color: transparent; }
}
