/* ---- Crafting Overlay ---- */
#crafting-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: transparent;
  z-index: 650;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#crafting-overlay.active,
#crafting-overlay:not(.hidden) {
  opacity: 1;
}

#forge-window {
  position: absolute;
  width: 1095px;
  height: 335px;
  pointer-events: auto;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  left: 152.5px; /* (1400 - 1095) / 2 */
  top: 350px;
  background: transparent;
}

#forge-bg-overlay {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 12px;
  right: 12px;
  background: url('../Misc/Inventory/Forge bg.png') no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 1;
  border-radius: 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

#forge-frame-overlay {
  position: absolute;
  inset: 0;
  background: url('../Misc/Inventory/Forge frame.png') no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 5;
}

#close-forge-btn {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 64px;
  height: 64px;
  background: linear-gradient(to bottom, #ff5555, #cc1111);
  border: 4px solid #ffffff;
  border-radius: 50%;
  color: white;
  font-family: 'Fredoka One', cursive, sans-serif;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  z-index: 10;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  line-height: 1;
  padding: 0;
  text-shadow: 1px 2px 0px rgba(0,0,0,0.3);
}

#close-forge-btn:hover {
  transform: scale(1.1);
  filter: brightness(1.15);
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

#close-forge-btn:active {
  transform: scale(0.95);
  filter: brightness(0.9);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* Slots inside the forge */
#forge-window .ingredient-slot,
#forge-window .result-slot {
  position: absolute;
  width: 244px;
  height: 245px;
  background-image: url('../Misc/Inventory/Square.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: filter 0.15s ease;
  z-index: 2;
  top: 45px;
}

#forge-window .ingredient-slot[data-slot="1"] {
  left: 45px;
}

#forge-window .ingredient-slot[data-slot="2"] {
  left: 301px;
}

#forge-window .result-slot {
  left: 805px;
}

/* Hover effects for slots - zoomed but keeping layout clean */
#forge-window .ingredient-slot:hover,
#forge-window .result-slot:hover {
  filter: brightness(1.15) drop-shadow(0 4px 8px rgba(0,0,0,0.25));
}

/* Ensure images inside slot fit and look premium */
#forge-window .ingredient-slot img,
#forge-window .result-slot img {
  transition: transform 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#forge-window .ingredient-slot:hover img,
#forge-window .result-slot:hover img {
  transform: scale(1.15);
}

#forge-btn {
  position: absolute;
  left: 583px;
  top: 130px;
  width: 184px;
  height: 74px;
  background: url('../Misc/Inventory/forge button.png') no-repeat;
  background-size: 100% 100%;
  border: none;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.1s ease, filter 0.1s ease, opacity 0.1s ease;
  outline: none;
  font-family: 'RetroMario', sans-serif;
  color: #ffffff;
  font-size: 32px;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 8px; /* Offset for stone slab texture visual balance */
}

#forge-btn:hover:not([disabled]) {
  filter: brightness(1.15);
  transform: scale(1.05);
}

#forge-btn:active:not([disabled]) {
  transform: scale(0.95);
}

#forge-btn[disabled] {
  filter: grayscale(1) opacity(0.6);
  cursor: not-allowed;
}


/* Dev panel: no pointer-events when hidden */
#dev-panel.hidden { pointer-events: none !important; }

/* Anvil hitbox above tap-zone */
#anvil-hitbox { cursor: pointer; pointer-events: auto !important; z-index: 20 !important; }

/* =====================================================
   SHOP UI
   ===================================================== */
#shop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
#shop-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

#shop-window {
  position: relative;
  width: 808px;
  height: 815px;
  pointer-events: auto;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  border-radius: 45px;
}
#shop-overlay:not(.hidden) #shop-window {
  transform: scale(1.15);
}

#shop-bg-overlay {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: url('../Misc/Inventory/Frame bg.png') no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 1;
}

#shop-frame-overlay {
  position: absolute;
  inset: 0;
  background: url('../Misc/Inventory/Frame.png') no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 5;
}

#close-shop-btn {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 64px;
  height: 64px;
  background: linear-gradient(to bottom, #ff5555, #cc1111);
  border: 4px solid #ffffff;
  border-radius: 50%;
  color: white;
  font-family: 'Fredoka One', cursive, sans-serif;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#close-shop-btn:hover { transform: scale(1.1); }
#close-shop-btn:active { transform: scale(0.9); }

#shop-tabs {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  gap: 20px;
}
.shop-tab {
  background: #2a2a2a;
  border: 4px solid #1a1a1a;
  color: #888;
  padding: 10px 40px;
  font-family: 'RetroMario', sans-serif;
  font-size: 28px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.4);
}
.shop-tab.active {
  background: #ffe566;
  color: #1a1a1a;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.shop-tab:hover:not(.active) {
  background: #3a3a3a;
  color: #aaa;
}

.shop-content {
  position: absolute;
  top: 130px;
  bottom: 50px;
  left: 50px;
  right: 50px;
  z-index: 6;
  display: flex;
  flex-direction: column;
}

.shop-coming-soon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'RetroMario', sans-serif;
  font-size: 40px;
  color: #ffe566;
  text-shadow: 2px 2px 0 #1a1a1a;
}

#shop-sell-grid-viewport,
#shop-buy-grid-viewport {
  flex: 1;
  overflow-y: auto;
  border: 4px solid #1a1a1a;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.4);
  padding: 20px;
  margin-bottom: 20px;
}
#shop-sell-grid-viewport::-webkit-scrollbar, #shop-buy-grid-viewport::-webkit-scrollbar { width: 12px; }
#shop-sell-grid-viewport::-webkit-scrollbar-track, #shop-buy-grid-viewport::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 6px; }
#shop-sell-grid-viewport::-webkit-scrollbar-thumb, #shop-buy-grid-viewport::-webkit-scrollbar-thumb { background: #ffe566; border-radius: 6px; border: 2px solid #1a1a1a; }

#shop-sell-grid,
#shop-buy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  justify-content: center;
  justify-items: center;
}

#shop-sell-controls,
#shop-buy-controls {
  position: relative;
  height: 120px;
  background: rgba(0, 0, 0, 0.6);
  border: 4px solid #1a1a1a;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  gap: 20px;
}

.shop-detail-close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 44px;
  height: 44px;
  background: linear-gradient(to bottom, #ff5555, #cc1111);
  border: 3px solid #ffffff;
  border-radius: 50%;
  color: white;
  font-family: 'Fredoka One', cursive, sans-serif;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 12;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 0;
}
.shop-detail-close-btn:hover { transform: scale(1.1); }
.shop-detail-close-btn:active { transform: scale(0.9); }

#shop-sell-item-icon,
#shop-buy-item-icon {
  width: 80px;
  height: 80px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#shop-sell-item-name,
#shop-buy-item-name {
  flex: 1;
  font-family: 'Fredoka One', sans-serif;
  font-size: 28px;
  color: white;
  text-shadow: 2px 2px 0 #000;
}

#shop-sell-item-price,
#shop-buy-item-price {
  font-family: 'RetroMario', sans-serif;
  font-size: 32px;
  color: #ff55ff;
  text-shadow: 2px 2px 0 #000;
  margin-right: 20px;
}

#shop-sell-btn,
#shop-buy-btn {
  background: #55ff55;
  border: 4px solid #1a1a1a;
  border-radius: 16px;
  padding: 15px 40px;
  font-family: 'RetroMario', sans-serif;
  font-size: 28px;
  color: #1a1a1a;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}
#shop-sell-btn:hover, #shop-buy-btn:hover { background: #77ff77; transform: translateY(-2px); }
#shop-sell-btn:active, #shop-buy-btn:active { background: #33cc33; transform: translateY(2px); box-shadow: none; }

.shop-item-slot {
  aspect-ratio: 244 / 245;
  background-image: url('../Misc/Inventory/Square.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  transition: filter 0.15s ease, transform 0.2s;
  user-select: none;
  cursor: pointer;
  width: 100%;
}
.shop-item-slot:hover {
  filter: brightness(1.15) drop-shadow(0 4px 8px rgba(0,0,0,0.25));
}
.shop-item-slot:hover img {
  transform: scale(1.15);
}
.shop-item-slot:active img {
  transform: scale(0.95);
}
.shop-item-slot.selected {
  filter: brightness(1.3) drop-shadow(0 0 15px #ffe566);
  z-index: 2;
}
.shop-item-slot img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.4));
  pointer-events: none;
  transition: transform 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.shop-item-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #8df5a8;
  color: #1a1a1a;
  padding: 4px 10px;
  border-radius: 12px;
  font-family: 'RetroMario', sans-serif;
  font-size: 16px;
  border: 2px solid #1a1a1a;
  pointer-events: none;
  z-index: 10;
}

/* =====================================================
   INVENTORY REDESIGN (MODERN DRAGGABLE GRID)
   ===================================================== */

#inventory-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#inventory-window {
  position: absolute;
  width: 808px;
  height: 815px;
  pointer-events: auto;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  border-radius: 45px;
  left: 296px;
  top: 792px;
}

#inventory-bg-overlay {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: url('../Misc/Inventory/Frame bg.png') no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 1;
}

#inventory-frame-overlay {
  position: absolute;
  inset: 0;
  background: url('../Misc/Inventory/Frame.png') no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 5;
}

#close-inventory-btn {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 64px;
  height: 64px;
  background: linear-gradient(to bottom, #ff5555, #cc1111);
  border: 4px solid #ffffff;
  border-radius: 50%;
  color: white;
  font-family: 'Fredoka One', cursive, sans-serif;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  z-index: 10;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  line-height: 1;
  padding: 0;
  text-shadow: 1px 2px 0px rgba(0,0,0,0.3);
}

#close-inventory-btn:hover {
  transform: scale(1.1);
  filter: brightness(1.15);
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

#close-inventory-btn:active {
  transform: scale(0.95);
  filter: brightness(0.9);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

#inventory-grid-viewport {
  position: absolute;
  top: 38px;
  bottom: 38px;
  left: 38px;
  right: 38px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 3;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

#inventory-grid-viewport::-webkit-scrollbar {
  width: 10px;
}

#inventory-grid-viewport::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 5px;
}

#inventory-grid-viewport::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 5px;
}

#inventory-grid-viewport::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
  border: 2px solid transparent;
  background-clip: padding-box;
}

#inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
}

/* Inventory Item Slot */
.inventory-slot {
  aspect-ratio: 244 / 245;
  background-image: url('../Misc/Inventory/Square.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  transition: filter 0.15s ease;
  user-select: none;
}

.inventory-slot.occupied {
  cursor: pointer;
}

.inventory-slot.occupied:hover {
  filter: brightness(1.15) drop-shadow(0 4px 8px rgba(0,0,0,0.25));
}

.inventory-slot.occupied:hover .inventory-slot-img {
  transform: scale(1.15);
}

.inventory-slot.occupied:active .inventory-slot-img {
  transform: scale(0.95);
}

.inventory-slot-img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.4));
  pointer-events: none;
  transition: transform 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.inventory-slot-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #8df5a8;
  color: #000;
  font-family: 'Fredoka One', cursive, sans-serif;
  font-size: 24px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 10px;
  border: 2.5px solid #2a2a2a;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  line-height: 1.1;
}

/* =====================================================
   ITEM TOOLTIP SYSTEM
   ===================================================== */
#item-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 12000;
  background: rgba(15, 12, 10, 0.88);
  border: 3.5px solid #8c6e5a;
  border-radius: 16px;
  padding: 16px 20px;
  width: 320px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.12s ease, transform 0.12s ease;
  box-sizing: border-box;
}

#item-tooltip.visible {
  opacity: 1;
  transform: scale(1);
}

.tooltip-name {
  font-family: 'RetroMario', sans-serif;
  font-size: 26px;
  color: #ffe566;
  margin-bottom: 6px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.5);
}

.tooltip-rarity {
  font-family: 'Fredoka One', cursive, sans-serif;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.rarity-common { color: #b8b8b8; text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.rarity-uncommon { color: #8df5a8; text-shadow: 0 0 8px rgba(141, 245, 168, 0.4); }
.rarity-rare { color: #5dade2; text-shadow: 0 0 8px rgba(93, 173, 226, 0.4); }
.rarity-epic { color: #af7ac5; text-shadow: 0 0 8px rgba(175, 122, 197, 0.4); }
.rarity-legendary { color: #eb984e; text-shadow: 0 0 10px rgba(235, 152, 78, 0.5); }

.tooltip-desc {
  font-family: 'Fredoka One', cursive, sans-serif;
  font-size: 16px;
  color: #ebd6c5;
  line-height: 1.45;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
/* Forged Result Waiting for Claim */
#forge-window .result-slot.ready-to-claim {
  animation: claim-pulse 1.8s infinite ease-in-out;
  filter: brightness(1.25) drop-shadow(0 0 14px rgba(255, 200, 50, 0.8));
  cursor: pointer;
}

@keyframes claim-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

#forge-dust-cost {
  position: absolute;
  left: 583px;
  top: 212px;
  width: 184px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-family: 'Fredoka One', cursive, sans-serif;
  color: #ffb700;
  font-size: 34px;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
  z-index: 3;
  pointer-events: none;
  transition: color 0.2s, transform 0.2s;
}

#forge-dust-cost img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
}

#forge-dust-cost.insufficient {
  color: #ff5555;
  animation: cost-shiver 0.35s ease-in-out infinite;
}

@keyframes cost-shiver {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px) rotate(-1deg); }
  75% { transform: translateX(3px) rotate(1deg); }
}

#tiger-container {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  z-index: 11;
  background-repeat: no-repeat;
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}

#tiger-shadow {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.8;
  z-index: 10;
}

#closeup-view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 45;
  overflow: hidden;
  background: #000;
}

#closeup-bg {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

#tiger-closeup-container {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  z-index: 11;
  background-repeat: no-repeat;
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}

#close-closeup-btn {
  position: absolute;
  top: 40px;
  left: 40px;
  z-index: 100;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  font-family: Arial, sans-serif;
  line-height: 1;
}

#close-closeup-btn:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.85);
  border-color: #ffe566;
  color: #ffe566;
}

#npc-speech-bubble {
  position: absolute;
  left: 50%;
  top: 350px; /* Centered above the Tiger's head since it is now slimmer */
  transform: translate(-50%, -20px) scale(0.9);
  width: 940px;
  min-height: 200px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 30px 50px;
  box-sizing: border-box;
  
  /* Custom Beautiful Retro Speech Bubble */
  background: #fffbef; /* Warm cream/parchment color */
  border: 6px solid #1a1a1a;
  border-radius: 20px;
  box-shadow: 0 10px 0px rgba(0, 0, 0, 0.15), 0 20px 25px rgba(0, 0, 0, 0.15);
  
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Triangular pointer pointing down to the tiger */
#npc-speech-bubble::before {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 15px;
  border-style: solid;
  border-color: #1a1a1a transparent transparent transparent;
  display: block;
  width: 0;
}

#npc-speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 9px;
  border-style: solid;
  border-color: #fffbef transparent transparent transparent;
  display: block;
  width: 0;
}

#npc-speech-bubble.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

#npc-speech-bubble.hide-prop {
  opacity: 0;
  pointer-events: none;
}

#npc-speech-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  width: 100%;
}

.npc-speech-option-btn {
  background: #fdf5e6;
  border: 4px solid #1a1a1a;
  border-radius: 12px;
  padding: 16px 24px;
  font-family: 'RetroMario', sans-serif;
  font-size: 32px;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: left;
  box-shadow: 0 4px 0px rgba(0,0,0,0.1);
}

.npc-speech-option-btn:hover {
  background: #ffe566;
  transform: translateY(-4px);
  box-shadow: 0 8px 0px rgba(0,0,0,0.15);
}

.npc-speech-option-btn:active {
  transform: translateY(2px);
  box-shadow: 0 0px 0px rgba(0,0,0,0.15);
}

#npc-speech-text {
  font-family: 'RetroMario', sans-serif;
  font-size: 64px; /* Even bigger, massive pixel art font! */
  color: #1a1a1a;
  line-height: 1.25;
  text-align: center;
  word-break: break-word;
  white-space: pre-wrap;
  text-shadow: none;
  font-weight: normal;
}
