/* â”€â”€ RESET / BASE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;   /* stay within the visible viewport on mobile (toolbars/URL bar) */
  overflow: hidden;
  background: #0a0604;
  color: #e8d8b0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
}

:root {
  /* Tiki display font for headers/titles/labels; body keeps the readable serif above */
  --font-display: 'Original Surfer', Georgia, 'Times New Roman', serif;
}
#header-title, .tab-btn, .sub-tab-btn, .rp-tab-btn,
.section-label, .mix-section-header, .rum-cat-label,
.games-title, .rs-section-title, .shaker-title, .wall-picker-title,
.trophy-title, #tutorial-title, .tut-menu-title, .tut-menu-name,
.msg-card .msg-title, .tt-cat, .order-card-name,
#warn-critical-box h2, #resource-empty-box h1, #recipe-popup h2, .tiki-popup h2,
.game-modal-header, .rp-recipe-detail h2 {
  font-family: var(--font-display);
}

/* â”€â”€ HEADER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#header {
  height: 44px;
  min-height: 44px;
  background: #1a0d04;
  border-bottom: 2px solid #5a3010;
  display: grid;
  /* Give the bar name (left) all the free space; pack buttons + settings to the right.
     Above 1000px the room crumb is pinned by JS (_syncRoomCrumbPosition) to sit over
     the scene's own horizontal center, not the header's — see updateRoomNav(). */
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}
#header-left { display: flex; align-items: center; gap: 12px; min-width: 0; overflow: hidden; }
#header-title { font-size: 21px; font-weight: bold; color: #d4a040; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Above 1000px this is pinned by JS (_syncHeaderStatsPosition) to the scene's own
   left edge instead of sitting in normal header flow — see updateRoomNav(). */
#header-stats { display: flex; align-items: center; gap: 12px; }
#money-display { color: #40c060; font-size: 16px; font-weight: bold; white-space: nowrap; flex-shrink: 0; }
#vibe-display  { color: #e0a030; font-size: 15px; white-space: nowrap; flex-shrink: 0; }
#header-center { display: flex; align-items: center; gap: 8px; }
/* Fallback for ≤1000px, where the header wraps and JS positioning is skipped
   (see _syncRoomCrumbPosition) — grows to fill its wrapped row and centers
   its own text within it. */
#header-room-crumb { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; min-width: 0; }
/* Tablet / small-desktop: the action toolbar can't fit inline in the 44px header
   row (above the 640px mobile breakpoint it overflowed off the right edge and
   vanished — the "missing 2nd top toolbar"). Wrap it onto its own full-width second
   row so it stays visible. Below 641px the mobile ☰ menu owns these actions; above
   1000px they fit inline on one row as before. */
@media (min-width: 641px) and (max-width: 1000px) {
  #header {
    height: auto;
    min-height: 44px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "left    settings"
      "stats   stats"
      "center  center";
    row-gap: 5px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  #header-left    { grid-area: left; }
  #header-stats   { grid-area: stats; }
  #header-settings { grid-area: settings; }
  #header-center  { grid-area: center; flex-wrap: wrap; }
}
#master-pause-btn {
  font-size: 13px; font-weight: 700; padding: 3px 14px;
  border: 1px solid #7a5020; border-radius: 3px;
  background: transparent; color: #f0c060; cursor: pointer; white-space: nowrap;
}
#master-pause-btn:hover { background: #2a1a08; color: #ffd060; }
/* Paused: the button brightens to a lit gold so it's obvious the game is held */
#master-pause-btn.active {
  background: #f0c060; border-color: #f7d989; color: #2a1408;
  box-shadow: 0 0 10px rgba(240,192,96,0.75);
}
#paused-banner {
  position: fixed; top: 52px; left: 50%; transform: translateX(-50%);
  z-index: 400; background: rgba(122,32,16,0.94); color: #ffcf90;
  border: 2px solid #b04020; border-radius: 20px;
  padding: 7px 22px; font-size: 14px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 4px 18px rgba(0,0,0,0.55); pointer-events: none;
}
#games-header-btn, #feedback-header-btn { font-size: 13px; color: #f0c060; font-weight: 600; padding: 2px 8px; border: 1px solid #7a5020; border-radius: 3px; background: transparent; cursor: pointer; white-space: nowrap; }
#games-header-btn:hover, #feedback-header-btn:hover { background: #2a1a08; color: #ffd060; }
#header-settings {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}
#settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid #3a2008;
  border-radius: 5px;
  color: #d6bc80;
  cursor: pointer;
  font-size: 15px;
  padding: 4px 8px;
  line-height: 1;
  transition: border-color 0.15s;
}
#settings-btn:hover { border-color: #6a4020; color: #f0c060; }

/* The three upper-right scene icons (sun · camera · sprocket) share ONE box size
   so they read as a matched set — equal square footprint, content centred, and
   the ⚙️ glyph nudged down to the ~16px optical size of the sun/camera (#463). */
.scene-bright-btn, .scene-cam-btn, #settings-btn {
  box-sizing: border-box;
  width: 32px; height: 30px;
  padding: 0;
}
.scene-cam-btn, #settings-btn { font-size: 15px; }

/* ── FLOATING CONTROL MENUS (speaker + sun) ── */
.ctrl-menu {
  z-index: 4000;
  min-width: 208px;
  background: #1c1108;
  border: 1px solid #6a4020;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 26px rgba(0,0,0,0.6);
}
.ctrl-menu-title {
  color: #f0c060;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ctrl-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.ctrl-row-lbl { color: #d6bc80; font-size: 13px; width: 96px; flex: none; white-space: nowrap; }
.ctrl-row-lbl em { color: #8a6a40; font-style: normal; font-size: 10px; text-transform: uppercase; }
.ctrl-slider {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 4px; background: #3a2008; border-radius: 2px; outline: none; cursor: pointer;
}
.ctrl-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #c08030; cursor: pointer; }
.ctrl-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #c08030; border: none; cursor: pointer; }

/* Brightness button, sits in the header to the left of the camera. */
.scene-bright-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #24160a;
  border: 1px solid #4a2e12;
  border-radius: 5px;
  color: #e8c070;
  cursor: pointer;
  padding: 4px 8px;
  transition: border-color 0.15s, background 0.15s;
}
.scene-bright-btn:hover { background: #34200c; border-color: #6a4020; }

/* â”€â”€ MAIN (3-col) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* â”€â”€ LEFT PANEL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#left-panel {
  width: 330px;
  min-width: 330px;
  display: flex;
  flex-direction: column;
  background: #12090300;
  border-right: 2px solid #3a1e08;
  overflow: hidden;
}

#tab-bar {
  display: flex;
  flex-direction: column;
  background: #180b02;
  border-bottom: 2px solid #3a1e08;
}
.tab-row {
  display: flex;
  width: 100%;
}
.tab-row:first-child {
  border-bottom: 1px solid #2a1408;
}
.tab-btn {
  flex: 1;
  padding: 8px 2px;
  background: none;
  border: none;
  color: #c6a670;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.tab-btn:hover  { background: #241208; color: #e0b060; }
.tab-btn.active { background: #2a1408; color: #f0c060; border-bottom: 2px solid #d48020; }

#panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  background: #110804;
}
#panel-content::-webkit-scrollbar { width: 5px; }
#panel-content::-webkit-scrollbar-track { background: #0a0502; }
#panel-content::-webkit-scrollbar-thumb { background: #5a3010; border-radius: 3px; }

/* search bars — frozen to the top of their scrolling list like a spreadsheet header */
.search-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 8px;
  background: #110804;
  box-shadow: 0 5px 7px -5px rgba(0, 0, 0, 0.6);
}
.tab-search {
  width: 100%;
  padding: 5px 26px 5px 8px;
  background: #1e0e04;
  border: 1px solid #4a2808;
  border-radius: 4px;
  color: #e0c080;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}
.tab-search::placeholder { color: #6a4820; }
.tab-search:focus { border-color: #8a5020; }
.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6a4820;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 0;
  display: none;
}
.search-clear.visible { display: block; }
.search-clear:hover { color: #c08040; }

/* â”€â”€ SECTION LABELS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.section-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  color: #c79150;
  text-transform: uppercase;
  margin: 8px 0 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid #2a1408;
}

/* â”€â”€ DECORATE TAB â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* merged shop+owned list */
.decor-item-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
  background: #160a02;
}
.decor-qty {
  min-width: 22px;
  font-size: 13px;
  font-weight: bold;
  color: #60a040;
  text-align: right;
  flex-shrink: 0;
}
.decor-art-wrap {
  width: 32px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.decor-art-wrap svg { width: 32px; height: 40px; }
.decor-art-wrap .item-emoji { font-size: 26px; }
.decor-art-wrap.can-drag { cursor: grab; }
.decor-art-wrap.can-drag:active { cursor: grabbing; }
.decor-art-wrap.can-drag svg,
.decor-art-wrap.can-drag .item-emoji { pointer-events: none; }
.decor-art-wrap.no-stock { opacity: 0.35; cursor: default; }
.decor-info { flex: 1; min-width: 0; }
.decor-name { font-size: 13px; color: #d6bc80; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.decor-price { font-size: 12px; color: #70a050; }

.decor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 6px;
}
.tray-item {
  background: #1e0e04;
  border: 1px solid #3a2010;
  border-radius: 5px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: grab;
  user-select: none;
  transition: border-color 0.15s, background 0.15s;
}
.tray-item:hover       { background: #2a1808; border-color: #7a4820; }
.tray-item:active      { cursor: grabbing; }
.tray-item.out-of-stock{ opacity: 0.4; cursor: not-allowed; }
.tray-item svg         { width: 38px; height: 52px; }
.tray-item .item-emoji { font-size: 31px; line-height: 1; }
.tray-item .item-label { font-size: 12px; color: #ccb184; text-align: center; line-height: 1.2; }
.tray-item .item-count { font-size: 12px; color: #60a040; }

/* shop section inside decorate tab */
.shop-item-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 4px;
  border-radius: 4px;
  border: 1px solid #2a1608;
  margin-bottom: 4px;
  background: #160a02;
}
.shop-item-row .si-art { width: 28px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.shop-item-row .si-art svg { width: 28px; height: 36px; }
.shop-item-row .si-art .item-emoji { font-size: 24px; }
.shop-item-row .si-info { flex: 1; min-width: 0; }
.shop-item-row .si-name { font-size: 13px; color: #d6bc80; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-item-row .si-price { font-size: 12px; color: #70a050; }
.buy-btn {
  padding: 3px 7px;
  background: #3a6820;
  border: 1px solid #5a8830;
  border-radius: 3px;
  color: #c0e090;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.buy-btn:hover   { background: #4a8828; }
.buy-btn:active  { background: #2a5018; }
.buy-btn.cant-afford { background: #3a3a3a; border-color: #555; color: #888; cursor: not-allowed; }

/* â”€â”€ MIX TAB â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Glass selector */
.glass-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.glass-btn {
  background: #1e0e04;
  border: 1px solid #3a2010;
  border-radius: 6px;
  padding: 10px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #c6a670;
  font-size: 21px;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.glass-btn:hover  { background: #2a1808; border-color: #6a4020; }
.glass-btn.sel    { background: #2a1808; border-color: #d4a020; color: #f0c030; }
.glass-btn span   { font-size: 12.5px; color: #d8bc8a; line-height: 1.15; text-align: center; }
.glass-icon svg   { width: 38px; height: 50px; display: block; margin: 0 auto; }

/* Garnish tray: fixed 6×2 grid of compact tiles — everything visible at once,
   no scrolling. Tiles shrink to 4-across on narrow phones. */
.garnish-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  width: 100%;
}
.garnish-tile {
  position: relative;
  background: #1e0e04;
  border: 1px solid #3a2010;
  border-radius: 5px;
  padding: 6px 2px 5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #c6a670;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.garnish-tile:hover  { background: #2a1808; border-color: #6a4020; }
.garnish-tile:active { background: #34200a; border-color: #d4a020; }
@media (max-width: 560px) {
  .garnish-grid { grid-template-columns: repeat(4, 1fr); }
}

/* â”€â”€ RUM BOTTLE ICON â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.rum-bottle-icon svg { width: 14px; height: 22px; display: inline-block; vertical-align: middle; margin-right: 4px; }
.cellar-bottle-icon  { display: inline-block; cursor: pointer; margin-right: 6px; vertical-align: middle; }
.cellar-bottle-icon svg { width: 18px; height: 28px; }

/* â”€â”€ PARROT ANIMATION â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes parrotRock {
  0%, 82%, 100% { transform: rotate(0deg); }
  84%  { transform: rotate(-12deg); }
  87%  { transform: rotate(12deg);  }
  90%  { transform: rotate(-7deg);  }
  93%  { transform: rotate(7deg);   }
  96%  { transform: rotate(-3deg);  }
  98%  { transform: rotate(2deg);   }
}
.parrot-anim { animation: parrotRock 28s ease-in-out infinite; transform-origin: 50% 85%; }
.parrot-anim.delay-1 { animation-delay: -6s; }
.parrot-anim.delay-2 { animation-delay: -12s; }
.parrot-anim.delay-3 { animation-delay: -18s; }
.parrot-anim.delay-4 { animation-delay: -23s; }

/* Ship's Wheel — turns slowly, with pauses, in either direction (#439). Animates
   the whole rendered svg so the block-print colour + key plates turn together. */
@keyframes shipWheelTurn {
  0%, 12%  { transform: rotate(0deg); }
  30%, 40% { transform: rotate(26deg); }
  57%      { transform: rotate(0deg); }
  74%, 84% { transform: rotate(-26deg); }
  100%     { transform: rotate(0deg); }
}
.placed-item[data-key="ship_wheel"] svg {
  animation: shipWheelTurn 18s ease-in-out infinite;
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

/* ── NPC WALKERS ──────────────────────────────────────────────────────────── */
@keyframes npcWaddle {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%       { transform: translateY(-4px) rotate(1.5deg); }
}
.npc-walker {
  position: absolute;
  width: 104px;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  z-index: 15;
  bottom: 55px;
  transition: opacity 0.4s ease;
}
.npc-walker.fading { opacity: 0; }
.npc-avatar {
  width: 104px;
  height: 120px;
  overflow: hidden;
  transform-origin: 50% 90%;
  position: relative;
}
/* A lei draped on a bird's neck — click it to take it off (#310). */
.npc-lei {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 74px;
  height: 46px;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: pointer;
  z-index: 4;
}
.npc-lei svg { width: 100%; height: 100%; }
.npc-avatar.walking { animation: npcWaddle 0.42s ease-in-out infinite; }
.npc-sprite {
  width: 104px;
  display: block;
  transform-origin: center;
}
.npc-sprite svg { width: 104px; height: 148px; display: block; }
.npc-walker .parrot-anim { animation: none; }
.npc-walker .parrot-perch { display: none; }
/* Bird popup — large animated sprite, perch visible, parrotRock runs freely */
.npc-popup-sprite { width: 160px; margin: 8px auto 12px; }
.npc-popup-sprite svg { width: 100%; height: auto; display: block; }
.npc-bubble {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: #fffef5;
  border: 1.5px solid #6a3810;
  border-radius: 10px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #2a1008;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.22);
}
.npc-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #6a3810;
}
.npc-bubble::before {
  content: '';
  position: absolute;
  bottom: -5px; left: 50%;
  transform: translateX(-50%);
  border: 3px solid transparent;
  border-top-color: #fffef5;
  z-index: 3;
}
.npc-grumpy .npc-bubble {
  background: #c01818 !important;
  color: #fff !important;
  border-color: #8a0808 !important;
}
.npc-grumpy .npc-bubble::after  { border-top-color: #8a0808 !important; }
.npc-grumpy .npc-bubble::before { border-top-color: #c01818 !important; }
.npc-avatar.grumpy { animation: npcGrumpyStomp 0.55s ease-in-out infinite !important; }
@keyframes npcGrumpyStomp {
  0%, 100% { transform: translateY(0)   rotate(0deg); }
  30%       { transform: translateY(-4px) rotate(-4deg); }
  70%       { transform: translateY(-2px) rotate(4deg); }
}
.npc-avatar.npc-idle { animation: npcIdle 2.2s ease-in-out infinite; }
@keyframes npcIdle {
  0%, 100% { transform: rotate(0deg)  translateY(0); }
  30%       { transform: rotate(-4deg) translateY(-1px); }
  70%       { transform: rotate(4deg)  translateY(-1px); }
}
/* Bopping while the record player spins (#107): a lively hop + twist. */
.npc-avatar.npc-dancing { animation: npcDance 0.5s ease-in-out infinite; }
@keyframes npcDance {
  0%   { transform: translateY(0)    rotate(-9deg); }
  25%  { transform: translateY(-8px) rotate(7deg); }
  50%  { transform: translateY(0)    rotate(9deg); }
  75%  { transform: translateY(-8px) rotate(-7deg); }
  100% { transform: translateY(0)    rotate(-9deg); }
}
.npc-avatar.npc-flying .npc-wing-up {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: npcWingFlap 0.28s ease-in-out infinite alternate;
}
@keyframes npcWingFlap {
  0%   { transform: scaleY(1); }
  100% { transform: scaleY(0.18); }
}
.npc-name-tag {
  display: none;
}

/* Shaker section */
/* Mixing Station + filter frozen at the top of the scrolling Mix panel (#174) */
.mix-sticky-head {
  position: sticky;
  top: -8px;              /* cancel #panel-content's 8px top padding so it pins flush */
  z-index: 6;
  background: #110804;    /* matches #panel-content so scrolled rows hide behind it */
  margin: -8px -8px 8px;  /* bleed over the panel padding for a clean full-width bar */
  padding: 8px 8px 6px;
  box-shadow: 0 6px 8px -4px rgba(0,0,0,0.6);
}
.mix-sticky-head .search-wrap { margin-bottom: 0; }
.shaker-box {
  background: #1a0d04;
  border: 1px solid #4a2808;
  border-radius: 6px;
  padding: 7px;
  margin-bottom: 8px;
}
.shaker-title { font-size: 13px; color: #d6bc80; margin-bottom: 5px; display: flex; justify-content: space-between; }
.shaker-contents { min-height: 30px; margin-bottom: 5px; }
.shaker-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #2a1808;
  border: 1px solid #5a3010;
  border-radius: 12px;
  padding: 2px 6px;
  margin: 2px;
  font-size: 12px;
  color: #d0b070;
}
.shaker-tag .st-stack { display: inline-flex; flex-direction: column; line-height: 1.15; }
.shaker-tag button {
  background: none; border: none; color: #a06030; cursor: pointer; font-size: 13px; padding: 0 0 0 2px; line-height: 1;
}
.technique-label { font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; color: #8a6838; margin: 2px 0 4px; }
.technique-row { display: flex; gap: 4px; margin-bottom: 7px; }
.tech-btn {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 4px 2px;
  background: #150a03; border: 1px solid #3a2408; border-radius: 5px;
  color: #b09060; cursor: pointer;
}
.tech-btn:hover { background: #221208; border-color: #5a3010; }
.tech-btn.sel { background: #3a2208; border-color: #c08830; color: #f5c060; box-shadow: 0 0 0 1px rgba(200,140,40,0.4) inset; }
.tech-btn .tech-emoji { font-size: 16px; line-height: 1; }
.tech-btn .tech-name  { font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.shaker-actions { display: flex; gap: 5px; }
.pour-btn, .clear-btn {
  flex: 1;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.pour-btn  { background: #4a2808; border-color: #8a4818; color: #f0c060; }
.pour-btn:hover:not(:disabled)  { background: #5a3810; }
.pour-btn:disabled { background: #1e1408; border-color: #3a2808; color: #604820; cursor: not-allowed; opacity: 0.5; }
.clear-btn { background: #2a1414; border-color: #6a2424; color: #c07070; }
.clear-btn:hover { background: #3a1a1a; }

/* Ingredient rows in Mix tab */
.mix-section-header { font-size: 12px; color: #c79150; letter-spacing: 1px; text-transform: uppercase; margin: 6px 0 3px; }
.mix-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 2px;
  border-bottom: 1px solid #1e0e04;
}
.mix-row .mr-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; font-size: 13px; color: #d6bc80; }
/* Depleted ingredient: dimmed but still listed (#67) */
.mix-row.out-of-stock .mr-name,
.mix-row.out-of-stock .mr-qty { opacity: 0.4; }
.mix-row .mr-rum-stack { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.mix-row .mr-rum-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rum-cat-sub { display: block; font-size: 11px; font-style: italic; color: #9a7848; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mix-row .mr-qty  { font-size: 12px; color: #80a060; min-width: 42px; text-align: center; white-space: nowrap; }
.mix-row .mr-oz   { font-size: 11px; color: #6a7850; min-width: 50px; text-align: right; }
.qty-btn {
  width: 20px; height: 20px;
  background: #2a1808; border: 1px solid #5a3010; border-radius: 3px;
  color: #e0c080; cursor: pointer; font-size: 17px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; padding: 0;
}
.qty-btn:hover { background: #3a2010; }
.qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }


/* â”€â”€ SHOP TAB â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.shop-sticky-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #110804;
  margin: -8px -8px 0;
  padding: 8px 8px 4px;
  border-bottom: 1px solid #2a1408;
}
.shop-sub-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.sub-tab-btn {
  flex: 1; padding: 4px; background: #1e0e04; border: 1px solid #3a2010;
  border-radius: 3px; color: #c6a670; cursor: pointer; font-size: 13px; font-family: inherit;
}
.sub-tab-btn:hover  { background: #2a1808; }
.sub-tab-btn.active { background: #2a1808; border-color: #d4a020; color: #f0c060; }

.rum-category { margin-bottom: 10px; }
.rum-cat-label { font-size: 12px; color: #cba060; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.rum-row {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 3px; border-bottom: 1px solid #1e0e04;
}
.rum-row .rr-name { flex: 1; font-size: 13px; color: #d6bc80; }
.rum-row .rr-owned { font-size: 12px; color: #4a8a40; min-width: 50px; text-align: center; }
.rum-row .rr-price { font-size: 12px; color: #9a9a70; min-width: 36px; text-align: right; }

.ing-row {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 3px; border-bottom: 1px solid #1e0e04;
}
.ing-row .ir-emoji { font-size: 17px; }
.ing-row .ir-name  { flex: 1; font-size: 13px; color: #d6bc80; }
.ing-row .ir-qty   { font-size: 12px; color: #4a8a40; min-width: 48px; text-align: center; white-space: nowrap; }
.ing-row .ir-price { font-size: 12px; color: #9a9a70; min-width: 36px; text-align: right; }
.ing-row .ir-perbuy { font-size: 11px; color: #cba060; font-style: italic; white-space: nowrap; }

/* â”€â”€ ROOM â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#room-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}
#room {
  width: 100%;
  height: 100%;
  position: relative;
}
#bar-scene {
  width: 100%;
  height: 100%;
  display: block;
}

/* Placed items */
.placed-item {
  position: absolute;
  cursor: move;
  user-select: none;
  z-index: 10;
}
/* Wall-perspective rotation (⟳ Rotate): the art is the long face, .rot3d-cap
   the end cross-section folded 90° toward the viewer. */
.rot3d { position: relative; transform-style: preserve-3d; }
.rot3d > svg { display: block; }
.rot3d-cap svg { display: block; }
.placed-item.selected {
  outline: 2px dashed #d4a020;
  outline-offset: 2px;
}
/* Finish swatches in the item editor (color / stain / material choices) */
#ie-finish-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.ie-fin {
  width: 20px; height: 20px;
  border-radius: 4px;
  border: 2px solid #3a2010;
  cursor: pointer;
  padding: 0;
}
.ie-fin.active { border-color: #f0c060; box-shadow: 0 0 4px #f0c060; }
/* Rotated items swap the element-box outline for #sel-bounds, which hugs the
   projected 3D shape. */
.placed-item.selected.sel-hidden-outline { outline: none; }
#sel-bounds {
  position: absolute;
  pointer-events: none;
  z-index: 600;
  outline: 2px dashed #d4a020;
  outline-offset: 2px;
  display: none;
}
/* Only the drawn art is interactive — clicking the transparent parts of an item's
   box (e.g. a light's empty area or its glow) shouldn't grab or select it. Painted
   SVG shapes, emoji, and framed artwork stay clickable and events bubble to the
   item's own click/drag handlers. */
.placed-item { pointer-events: none; }
.placed-item svg { pointer-events: none; }
.placed-item svg * { pointer-events: auto; }
.placed-item .pe,
.placed-item img,
.placed-item canvas { pointer-events: auto; }
/* The fish tank is a solid rectangular sprite made of divs, so its whole box
   should be grabbable — not just the inner fish/coral SVGs (#101). */
.placed-item.placed-tank,
.placed-item.placed-tank .fish-tank,
.placed-item.placed-tank .ft-front,
.placed-item.placed-tank .ft-top,
.placed-item.placed-tank .ft-side { pointer-events: auto; }
.placed-item svg  { display: block; }
.placed-item .pe  { line-height: 1; }

/* Item editor */
#item-editor {
  position: absolute;
  background: #1e0e04ee;
  border: 1px solid #5a3010;
  border-radius: 6px;
  padding: 8px 10px;
  z-index: 50;
  display: none;
  gap: 6px;
  flex-direction: column;
}
#item-editor.visible { display: flex; }
#item-editor label { font-size: 13px; color: #d6bc80; }
#item-editor input[type=range] { width: 120px; }
#item-editor .ie-btns { display: flex; gap: 6px; }
.ie-btn {
  padding: 4px 8px; border-radius: 3px; border: 1px solid;
  cursor: pointer; font-size: 13px; font-family: inherit;
}
.ie-delete  { background: #3a1010; border-color: #7a2020; color: #f07070; }
.ie-remove  { background: #3a1010; border-color: #7a2020; color: #f07070; }
.ie-sell    { background: #1a2a0a; border-color: #4a7010; color: #90d040; }
.ie-close   { background: #1e1408; border-color: #4a3010; color: #d6bc80; }
.ie-layer   { background: #0e1a2a; border-color: #2a4a7a; color: #80b0e0; }
.ie-duplicate { background: #3a2a0a; border-color: #7a5010; color: #f0c060; }

/* â”€â”€ RIGHT PANEL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#right-panel {
  width: 315px;
  min-width: 315px;
  display: flex;
  flex-direction: column;
  background: #100700;
  border-left: 2px solid #3a1e08;
  overflow: hidden;
}
.rp-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  color: #c79150;
  text-transform: uppercase;
  padding: 5px 8px 3px;
  border-bottom: 1px solid #2a1408;
  background: #180b02;
}

/* Order section */
#rp-order {
  border-bottom: 2px solid #3a1e08;
  min-height: 50px;
}
.order-card {
  padding: 8px;
}
.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.order-card-name { font-size: 14px; color: #f0c060; font-weight: bold; }
.order-timer-row { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.order-timer { font-size: 15px; color: #e04040; font-weight: bold; font-variant-numeric: tabular-nums; }
.order-timer.ok { color: #e0c040; }
.order-timer.good { color: #40c060; }
.pause-btn {
  padding: 2px 6px;
  background: #2a1808;
  border: 1px solid #5a3810;
  border-radius: 3px;
  color: #d6bc80;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.pause-btn:hover { background: #3a2010; }
.pause-btn.paused { border-color: #a06020; color: #f0a030; }
.order-wants { font-size: 13px; color: #d0b070; margin-bottom: 4px; }
.order-tip   { font-size: 13px; color: #60c080; }
.no-order    { padding: 10px 8px; font-size: 13px; color: #4a3020; font-style: italic; }

/* Inventory section */
#rp-inventory {
  border-bottom: 2px solid #2a1408;
  flex-shrink: 0;
  max-height: 160px;
  overflow-y: auto;
}
#rp-inventory::-webkit-scrollbar { width: 4px; }
#rp-inventory::-webkit-scrollbar-thumb { background: #3a1e08; }
#rp-rums, #rp-ings {
  padding: 3px 8px;
}
.inv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 1px 0;
  color: #a09060;
}
.inv-row .inv-name { color: #d6bc80; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-row .inv-qty  { color: #60a040; flex-shrink: 0; }

/* Right panel tabs — two explicit rows: Log+Recipes / Menu+Merch+Music */
#rp-tabs {
  display: flex;
  flex-direction: column;
  background: #180b02;
  border-bottom: 1px solid #3a1e08;
  flex-shrink: 0;
}
.rp-tab-row { display: flex; }
.rp-tab-btn {
  flex: 1 1 0;                   /* buttons share their row evenly */
  padding: 6px 2px;
  background: none;
  border: none;
  color: #7a5830;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.rp-tab-btn:hover  { background: #241208; color: #c09050; }
.rp-tab-btn.active { background: #1e0e04; color: #f0c060; border-bottom: 2px solid #d48020; }

/* Message feed */
#rp-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#rp-recipes {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
#rp-recipes.hidden { display: none; }
#rp-feed.hidden    { display: none; }
#rp-cellar.hidden  { display: none; }
#rp-merch.hidden   { display: none; }   /* was missing: Merch stayed painted over the Log, freezing it */
#rp-music.hidden   { display: none; }
#rp-exterior.hidden { display: none; }
/* Exterior room styler that takes over the whole right panel (#331) */
#rp-exterior { padding: 14px 12px; overflow-y: auto; }
#rp-exterior .rp-ext-head { font-size: 16px; font-weight: 700; color: #ffd27a; margin-bottom: 4px; }
#rp-exterior .rp-ext-sub  { font-size: 12px; color: #b09060; line-height: 1.4; margin-bottom: 14px; }
#rp-exterior .shirt-ctrl-row { align-items: flex-start; margin-bottom: 10px; }
#rp-exterior .shirt-chips { display: flex; flex-wrap: wrap; gap: 5px; }
#rp-merch {
  flex: 1;
  overflow-y: auto;              /* was missing — a long merch list couldn't scroll */
}
#rp-music {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
#rp-cellar {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.cellar-rum-card {
  background: #160a02;
  border: 1px solid #2a1408;
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 5px;
  cursor: pointer;
}
.cellar-rum-card:hover { border-color: #6a3810; }
.cellar-rum-name  { font-size: 14px; color: #d4a040; font-weight: bold; }
.cellar-rum-oz    { font-size: 12px; color: #c79150; float: right; margin-top: 1px; }
.cellar-rum-origin { font-size: 12px; color: #c79150; }
.cellar-rum-drag  {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 6px;
  font-size: 11px;
  background: #2a1206;
  border: 1px solid #4a2208;
  border-radius: 3px;
  color: #a07040;
  cursor: grab;
}
.cellar-rum-drag:active { cursor: grabbing; }

/* Rum sign placed in the room â€” now uses .placed-item.rum-sign-item */
.rp-recipe-card {
  background: #160a02;
  border: 1px solid #2a1408;
  border-radius: 5px;
  padding: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.rp-recipe-card:hover { border-color: #6a3810; }
.rp-recipe-card.locked { opacity: 0.55; }
.rp-recipe-card { display: flex; align-items: center; gap: 8px; }
.rp-recipe-glass { font-size: 24px; flex-shrink: 0; }
.rp-recipe-info { flex: 1; min-width: 0; }
.rp-recipe-name  { font-size: 14px; color: #d4a040; font-weight: bold; margin-bottom: 2px; }
.rp-recipe-preview { font-size: 14px; letter-spacing: 1px; opacity: 0.8; }
/* memorization progress bar under each recipe name (#344) */
.rp-mem-bar { height: 5px; background: #241608; border-radius: 3px; overflow: hidden; margin-top: 3px; }
.rp-mem-fill { height: 100%; background: #4a8a2e; border-radius: 3px; transition: width 0.3s ease; }
.rp-mem-fill.full { background: #40c060; box-shadow: 0 0 5px rgba(64,192,96,0.6); }
/* memorization flag (gray → green when fully memorized) */
.recipe-flag { color: #6a6a6a; cursor: pointer; font-size: 19px; line-height: 1; flex-shrink: 0; padding: 0 2px; transition: color 0.15s; }
.recipe-flag:hover { color: #9a9a9a; }
.recipe-flag.memorized { color: #40c060; }
.recipe-flag.memorized:hover { color: #60d080; }
.rp-recipe-locked-tag { font-size: 11px; color: #604828; margin-top: 3px; }
#messages {
  flex: 1;
  overflow-y: auto;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#messages::-webkit-scrollbar { width: 4px; }
#messages::-webkit-scrollbar-thumb { background: #3a1e08; }

.msg-card {
  background: #180b02;
  border: 1px solid #2a1408;
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 12px;
  color: #a09060;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
@keyframes orderFlash {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(240,192,96,0); }
  50%       { box-shadow: inset 0 0 0 1px rgba(240,192,96,0.45); background: #200e04; }
}
.msg-order-pending { animation: orderFlash 2s ease-in-out infinite; }
@keyframes expireBar {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}
.msg-expire-bar {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: rgba(200,150,80,0.45);
  transform-origin: left;
  animation: expireBar linear forwards;
  pointer-events: none;
}
.msg-card:hover { border-color: #5a3010; background: #1e0e04; }
.msg-card.msg-serve { border-left: 2px solid #40c060; }
.msg-card.msg-sale  { border-left: 2px solid #40c060; }
.msg-card.msg-info  { border-left: 2px solid #4080c0; }
/* warnings — orange */
.msg-card.msg-warn  { border-left: 3px solid #e09020; background: #221402; }
.msg-card.msg-warn:hover { background: #2c1a04; border-left-color: #f0a830; }
.msg-card.msg-warn  .msg-title { color: #f0a830; }
/* bad things (customers leaving / disappointed) — red */
.msg-card.msg-expire,
.msg-card.msg-bad   { border-left: 3px solid #e0442e; background: #210a06; }
.msg-card.msg-expire:hover,
.msg-card.msg-bad:hover { background: #2c0e08; border-left-color: #f06048; }
.msg-card.msg-expire .msg-title,
.msg-card.msg-bad    .msg-title { color: #f06048; }
/* feedback prompt card — teal/green left accent to stand out as a CTA */
.msg-card.msg-prompt,
.msg-card.msg-tip   { border-left: 3px solid #30a060; background: #0e1e10; }
.msg-card.msg-prompt:hover,
.msg-card.msg-tip:hover { background: #122016; border-left-color: #40c070; }
.msg-card.msg-prompt .msg-title,
.msg-card.msg-tip    .msg-title { color: #60d080; }
.msg-card.msg-prompt .fb-prompt-cta,
.msg-card.msg-tip    .fb-prompt-cta { display:inline-block; margin-top:7px; background:#142c18; color:#60c060; border:1px solid #2a5030; border-radius:4px; padding:4px 12px; font-size:12px; cursor:pointer; font-family:inherit; }
.msg-card.msg-prompt .fb-prompt-cta:hover,
.msg-card.msg-tip    .fb-prompt-cta:hover { background:#1e3e22; color:#80d870; border-color:#3a6840; }
/* "Go to Mix" link on drink-request log entries (#58) */
/* One shared style for EVERY log-card action button — new buttons must use a
   .log-*-cta class and join these two selector lists (see CLAUDE.md). */
.msg-card .log-mix-cta,
.msg-card .log-merch-cta,
.msg-card .log-menu-cta,
.msg-card .log-music-cta,
.msg-card .log-rum-cta,
.msg-card .log-bath-setup-cta,
.msg-card .log-bathroom-cta { display:inline-block; margin-top:7px; background:#2a1a08; color:#f0c060; border:1px solid #7a5020; border-radius:4px; padding:4px 12px; font-size:12px; cursor:pointer; font-family:inherit; }
.msg-card .log-mix-cta:hover,
.msg-card .log-merch-cta:hover,
.msg-card .log-menu-cta:hover,
.msg-card .log-music-cta:hover,
.msg-card .log-rum-cta:hover,
.msg-card .log-bath-setup-cta:hover,
.msg-card .log-bathroom-cta:hover { background:#3a2510; color:#ffd060; border-color:#a06a28; }

/* User-poll log cards (created on the dev dashboard, pushed to every player) */
.msg-card.msg-poll { border-left: 3px solid #c890f0; cursor: default; }
.msg-card.msg-poll .msg-title { color: #d8a8f0; }
.msg-card .poll-question { font-weight: 600; color:#f0dcb0; line-height:1.4; margin:2px 0 8px; }
.msg-card .poll-opts-wrap { display:flex; flex-direction:column; gap:6px; }
.msg-card .log-poll-opt { display:block; width:100%; text-align:left; background:#2a1a08; color:#f0c060; border:1px solid #7a5020; border-radius:6px; padding:8px 12px; font-size:13px; cursor:pointer; font-family:inherit; }
.msg-card .log-poll-opt:hover { background:#3a2510; color:#ffd060; border-color:#a06a28; }
.msg-card .log-poll-result { padding:7px 12px; border:1px solid #3a2510; border-radius:6px; font-size:13px; color:#c0a060; background:#180e04; }
.msg-card .log-poll-result.chosen { border-color:#c890f0; color:#e8d0f8; background:#1e1226; font-weight:600; }
.msg-card .poll-voted-note { margin-top:8px; font-size:12px; color:#a0824a; }

/* ── Record player up-close view ── */
.rpv-shelf-wrap { position: relative; padding: 6px 10px 0; }
.rpv-shelf { display: flex; gap: 14px; justify-content: center; align-items: flex-end; min-height: 100px; flex-wrap: wrap; }
.rpv-shelf-board { height: 10px; margin: 0 4px; background: #6a4620; border-radius: 3px; border-bottom: 3px solid #4a2e12; }
.rpv-sleeve { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
  padding: 4px 6px 6px; border: 1px solid transparent; border-radius: 6px; transition: border-color 0.15s, background 0.15s; }
.rpv-sleeve:hover    { background: rgba(180,120,40,0.08); }
.rpv-sleeve.selected { border-color: #7a5020; background: rgba(180,120,40,0.14); }
.rpv-sleeve.playing .rpv-sleeve-name::after { content: ' ♪'; color: #60c080; }
.rpv-sleeve-name { font-size: 11px; color: #c8a060; text-align: center; max-width: 90px; }
.rpv-flying-vinyl { position: absolute; width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at center, #c8452a 0 15%, #151210 16% 100%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5); z-index: 5; pointer-events: none;
  transition: transform 0.7s cubic-bezier(0.3, 0.1, 0.3, 1); }
.rpv-spin { animation: rpv-rotate 1.8s linear infinite; }
@keyframes rpv-rotate { to { transform: rotate(360deg); } }

/* Low-stock rums breathe gently in the shop list, echoing the log-card timer */
.rum-row.low-pulse { animation: low-stock-pulse 2.4s ease-in-out infinite; border-radius: 4px; }
@keyframes low-stock-pulse {
  0%, 100% { background: transparent; }
  50%      { background: rgba(224, 128, 32, 0.16); }
}
.msg-card .msg-top  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.msg-card .msg-title{ font-size: 13px; color: #d0b060; }
.msg-card .msg-time { font-size: 11px; color: #504030; }
.msg-card .msg-body { color: #907050; }
.log-countdown { display: inline-block; color: #f0a830; font-weight: bold; white-space: nowrap; background: #2a1502; border: 1px solid #5a3810; border-radius: 4px; padding: 0 5px; }

/* â”€â”€ RECIPE COMPARISON POPUP â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#recipe-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
#recipe-overlay.hidden { display: none; }
#recipe-popup {
  background: #1a0d04;
  border: 2px solid #7a4010;
  border-radius: 8px;
  padding: 16px 20px 20px 20px;
  max-width: 440px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
/* Sticky header with an always-reachable ✕ so long scorecards (e.g. the Zombie)
   can be closed without scrolling to the bottom (#73). */
#recipe-popup .popup-head {
  position: sticky; top: -16px; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #1a0d04; margin: -16px -20px 8px; padding: 14px 20px 8px;
  border-bottom: 1px solid #2a1408;
}
#recipe-popup .popup-head h2 { margin: 0; }
#recipe-popup .popup-x-close {
  flex-shrink: 0; width: 32px; height: 32px; line-height: 1; font-size: 16px;
  background: #3a1c08; color: #f0c060; border: 1px solid #8a5020; border-radius: 6px;
  cursor: pointer;
}
#recipe-popup .popup-x-close:hover { background: #5a2c10; color: #ffd060; border-color: #c08040; }
/* Bird-drinking scene inside the scorecard */
@keyframes drinkTip {
  0%   { transform: rotate(0deg);   opacity: 1; }
  22%  { transform: rotate(-35deg); opacity: 1; }
  68%  { transform: rotate(-35deg); opacity: 1; }
  100% { transform: rotate(0deg);   opacity: 1; }
}
@keyframes birdSip {
  0%   { transform: rotate(0deg); }
  18%  { transform: rotate(12deg); }
  34%  { transform: rotate(0deg); }
  52%  { transform: rotate(12deg); }
  68%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}
.popup-serve-scene {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  margin: 10px 0 8px;
}
.popup-serve-bird {
  width: 84px;
  flex-shrink: 0;
  transform-origin: 50% 80%;
  animation: birdSip 3.2s ease-in-out 0.15s both;
}
.popup-serve-bird svg {
  width: 100%;
  height: auto;
  display: block;
}
.popup-serve-glass {
  font-size: 58px;
  line-height: 1;
  padding-bottom: 18px;
  animation: drinkTip 3.2s ease-in-out 0.15s forwards;
  transform-origin: 50% 95%;
  user-select: none;
}
#recipe-popup h2 { font-size: 19px; color: #f0c060; margin-bottom: 10px; }
/* Large variant — used by the Aloha Vibe / Money "how it works" popups */
#recipe-popup.popup-large { max-width: 800px; padding: 32px 40px 40px; font-size: 28px; }
#recipe-popup.popup-large h2 { font-size: 40px; margin-bottom: 14px; }
#recipe-popup.popup-large p  { font-size: 28px; }
#recipe-popup.popup-large .fb-icon-btn { font-size: 26px; }
#recipe-popup.popup-large .popup-close { font-size: 24px; padding: 13px; margin-top: 8px; }
.popup-score-row { font-size: 26px; font-weight: bold; color: #40c060; text-align: center; margin: 8px 0; }
.popup-score-sub { text-align: center; color: #80a060; font-size: 14px; margin-bottom: 12px; }
.popup-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.popup-col h3 { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #c79150; margin-bottom: 6px; border-bottom: 1px solid #2a1408; padding-bottom: 3px; }
.popup-col ul { list-style: none; padding: 0; }
.popup-col ul li { font-size: 13px; color: #d6bc80; padding: 2px 0; }
.popup-col ul li.matched { color: #60c080; }
.popup-col ul li.missed  { color: #c06060; }
.popup-tip-row { text-align: center; font-size: 21px; color: #60c080; font-weight: bold; margin-bottom: 12px; }
.popup-buy-recipe {
  width: 100%;
  padding: 8px;
  background: #2a4818;
  border: 1px solid #5a8028;
  border-radius: 4px;
  color: #a0e070;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 8px;
}
.popup-buy-recipe:hover { background: #3a6020; }
.popup-close {
  width: 100%;
  padding: 7px;
  background: #2a1408;
  border: 1px solid #5a3010;
  border-radius: 4px;
  color: #d6bc80;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.popup-close:hover { background: #3a1e08; }
.fb-icon-btn {
  background: none; border: none; color: #7a5030; font-size: 14px;
  cursor: pointer; vertical-align: middle; padding: 0 3px;
  opacity: 0.6; line-height: 1; flex-shrink: 0;
}
.fb-icon-btn:hover { opacity: 1; color: #c08040; }

/* â”€â”€ DRINK ANIMATION â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#drink-anim {
  position: absolute;
  pointer-events: none;
  z-index: 250;
  bottom: 280px;
  left: 18%;
  opacity: 0;
  text-align: center;
  transform: translateX(-50%);
}
#drink-anim .drink-glass { font-size: 94px; display: block; line-height: 1; }
#drink-anim .drink-info  {
  display: block;
  font-size: 17px;
  color: #f0e060;
  text-shadow: 0 1px 4px #000;
  margin-top: 4px;
  white-space: nowrap;
  font-weight: bold;
}
@keyframes drinkServe {
  0%   { opacity: 0;   transform: translateX(-50%) scale(0.5) rotate(0deg); }
  8%   { opacity: 1;   transform: translateX(-50%) scale(1)   rotate(0deg); }
  20%  { opacity: 1;   transform: translateX(-50%) scale(1)   rotate(35deg); }
  36%  { opacity: 1;   transform: translateX(-50%) scale(1)   rotate(0deg); }
  72%  { opacity: 1;   transform: translateX(-50%) scale(1)   rotate(0deg); }
  100% { opacity: 0.6; transform: translateX(80vw) scale(0.85) rotate(5deg); }
}
#drink-anim.pouring { animation: drinkServe 3.9s cubic-bezier(0.4,0,0.6,1) forwards; }


/* â”€â”€ INFO POPUP (rum/ingredient detail) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#info-popup {
  position: fixed;
  z-index: 300;
  background: #1a0d04;
  border: 2px solid #7a4010;
  border-radius: 6px;
  padding: 10px 14px;
  max-width: 260px;
  font-size: 13px;
  color: #d6bc80;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}
#info-popup h4 { font-size: 15px; color: #f0c060; margin-bottom: 4px; }
#info-popup .ip-sub { font-size: 12px; color: #c79150; margin-bottom: 6px; }
#info-popup .ip-desc { color: #ccb184; line-height: 1.5; }
#info-popup.hidden { display: none; }

/* â”€â”€ SCROLLBAR UNIVERSAL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #0a0502; }
::-webkit-scrollbar-thumb { background: #3a1e08; border-radius: 3px; }

/* â”€â”€ LIGHTING OVERLAY â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Wall/floor/ceiling coverings read too bright at full saturation — knock them
   back so they sit into the room's dim lighting (#84). */
#covering-layer { filter: brightness(0.68); }
#scene-dimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;               /* just under the lighting overlay so lights stay lit */
  background: #000;
  opacity: 0;
  transition: opacity 0.18s ease;
}
/* Moody shade — dark multiply layer + edge vignette, deepens the room when lamps
   are lit so the screen-blend light pools glow warm in the dark (lighting Phase A) */
#lighting-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;               /* above the dimmer, below the light-pool overlay */
  mix-blend-mode: multiply;
  background: none;
  transition: opacity 0.2s ease;
}
#lighting-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  mix-blend-mode: screen;
}
/* Phase C canvas light-map — above the objects (z-index 10) so it modulates them;
   multiply blend darkens shadow, warm light keeps/tints. Hidden unless canvas mode. */
#light-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 30;              /* above placed items (10) AND birds/NPCs (15) so the
                              light-map modulates them too; below editor UI (50) */
  mix-blend-mode: multiply;
  display: none;
}
/* Scene Brightness control in the room-nav bar (#100) */
.scene-bright-ctrl { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.scene-bright-lbl  { color: #c8a060; font-size: 12px; white-space: nowrap; }
#scene-bright-slider { width: 110px; max-width: 34vw; accent-color: #f0c060; height: 16px; cursor: pointer; }

/* â”€â”€ GAME OVER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#gameover-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
#gameover-box {
  text-align: center;
  padding: 40px 50px;
  background: #1a0d04;
  border: 2px solid #7a4010;
  border-radius: 12px;
  max-width: 440px;
}
#gameover-box h1 { font-size: 33px; color: #f0c060; margin-bottom: 12px; }
#gameover-box p  { font-size: 17px; color: #d6bc80; margin-bottom: 24px; line-height: 1.5; }
#gameover-box button {
  padding: 10px 28px;
  background: #4a6818;
  border: 1px solid #8aaa30;
  border-radius: 6px;
  color: #c0e080;
  font-size: 17px;
  font-family: inherit;
  cursor: pointer;
}
#gameover-box button:hover { background: #5a7820; }

/* ── GENERIC TIKI POPUP ──────────────────────────────────────────────────────── */
.tiki-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
}
.tiki-popup {
  text-align: center;
  padding: 30px 38px;
  background: #1a0d04;
  border: 2px solid #7a4010;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
}
.tiki-popup h2 { font-size: 24px; color: #f0c060; margin-bottom: 12px; }
.tiki-popup p  { font-size: 15px; color: #d6bc80; margin-bottom: 20px; line-height: 1.6; }

/* ── OUT-OF-RESOURCE POPUP (money / vibe = 0) ────────────────────────────────── */
#resource-empty-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 600;
  display: flex; align-items: center; justify-content: center;
}
#resource-empty-box {
  text-align: center;
  padding: 36px 44px;
  background: #1a0d04;
  border: 2px solid #7a4010;
  border-radius: 12px;
  max-width: 440px;
}
#resource-empty-box h1 { font-size: 31px; color: #f0c060; margin-bottom: 12px; }
#resource-empty-box p  { font-size: 17px; color: #d6bc80; margin-bottom: 24px; line-height: 1.5; }
.re-btns { display: flex; gap: 12px; justify-content: center; }
.re-btns button { padding: 11px 26px; border-radius: 6px; font-size: 17px; font-family: inherit; cursor: pointer; }
.re-add  { background: #4a6818; border: 1px solid #8aaa30; color: #c0e080; }
.re-add:hover  { background: #5a7820; }
.re-quit { background: #3a1410; border: 1px solid #a04030; color: #e0907a; }
.re-quit:hover { background: #4a1a14; }

/* ── COLORING BOOK — paint bucket cursor ─────────────────────────────────────── */
.coloring-bucket-cursor {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M9 10 L25 16 L21 27 L7 22 Z' fill='%23cfd8dc' stroke='%23263238' stroke-width='1.6'/%3E%3Cellipse cx='17' cy='13' rx='9' ry='3.2' fill='%23eceff1' stroke='%23263238' stroke-width='1.6'/%3E%3Cpath d='M10 11 Q17 3 24 13' fill='none' stroke='%23263238' stroke-width='1.6'/%3E%3Cpath d='M7 22 q-3 4 -1 8 q3 -2 1 -8 z' fill='%23e53935'/%3E%3C/svg%3E") 6 30, crosshair;
}

/* â”€â”€ RECIPE PANEL DETAIL VIEW â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* ── GAMES TAB ─────────────────────────────────────────────────────────────── */
.games-header { padding: 12px 10px 6px; border-bottom: 1px solid #2a1408; }
.games-title  { font-size: 18px; color: #f0c060; font-weight: bold; }
.games-subtitle { font-size: 12px; color: #a8895f; margin-top: 3px; }
.games-grid   { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.game-card {
  background: #130800;
  border: 1px solid #2a1408;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  transition: border-color 0.15s;
}
.game-card:hover { border-color: #6a3010; }
.game-card-owned { border-color: #3a5010; background: #0e1208; }
.game-card-emoji { font-size: 31px; flex-shrink: 0; width: 36px; text-align: center; }
.game-card-body  { flex: 1; min-width: 0; }
.game-card-name  { font-size: 13px; color: #d4a040; font-weight: bold; margin-bottom: 3px; }
.game-card-desc  { font-size: 11px; color: #705030; line-height: 1.4; }
.game-card-footer { flex-shrink: 0; }
.game-btn {
  padding: 5px 10px; border-radius: 4px; border: 1px solid;
  font-size: 12px; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.game-btn-play   { background: #2a5010; border-color: #4a8020; color: #a0e040; }
.game-btn-play:hover { background: #3a6018; }
.game-btn-unlock { background: #4a2808; border-color: #8a4818; color: #f0c060; }
.game-btn-unlock:hover:not(:disabled) { background: #5a3810; }
.game-btn-unlock.cant-afford { opacity: 0.45; cursor: not-allowed; }
.game-btn-soon   { background: #1a1a28; border-color: #2a2a40; color: #505068; cursor: not-allowed; }

/* ── MASK DESIGNER MODAL ───────────────────────────────────────────────────── */
.game-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center; z-index: 9000;
}
.game-modal {
  background: #130a02; border: 2px solid #4a2808; border-radius: 10px;
  width: 680px; max-width: 96vw; max-height: 90vh; overflow: auto;
}
.game-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid #2a1408;
  font-size: 18px; color: #f0c060; font-weight: bold;
}
.game-modal-close {
  background: none; border: none; color: #a8895f; font-size: 19px; cursor: pointer;
}
.game-modal-close:hover { color: #f0c060; }
.game-modal-body { display: flex; gap: 16px; padding: 16px; }
.mask-preview-area {
  display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0;
}
#mask-canvas { border-radius: 8px; background: #0a0602; border: 1px solid #2a1408; }
.mask-name-input {
  background: #0e0802; border: 1px solid #3a1e08; border-radius: 4px;
  color: #d4a040; font-family: inherit; font-size: 14px; padding: 5px 8px;
  width: 218px; text-align: center;
}
.mask-controls { flex: 1; display: flex; flex-direction: column; gap: 10px; }
/* Poster Designer — the poster is the hero (centred); controls flank it on both
   sides and the title/print action sit underneath. Wraps on narrow screens. */
.poster-layout { display: flex; gap: 16px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.poster-stage { flex: 0 0 auto; order: 0; display: flex; justify-content: center; }
.poster-stage #poster-canvas { background: #0a0602; border: 1px solid #2a1408; }
.poster-col { flex: 1 1 150px; min-width: 138px; max-width: 210px; display: flex; flex-direction: column; gap: 12px; }
.poster-under { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; }
.poster-titles { display: flex; gap: 8px; width: 100%; }
@media (max-width: 560px) {
  /* Stack: poster on top, both control columns below it, then title/print. */
  .poster-stage { order: -1; width: 100%; }
  .poster-col { max-width: none; }
}
.mc-label { font-size: 11px; color: #a8895f; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.mc-row   { display: flex; flex-wrap: wrap; gap: 5px; }
.mc-chip {
  padding: 3px 9px; border-radius: 12px; border: 1px solid #2a1408;
  background: #1e0e04; color: #a07040; font-size: 12px; cursor: pointer; font-family: inherit;
  text-transform: capitalize;
}
.mc-chip:hover { border-color: #6a3010; color: #d4a040; }
.mc-chip.active { background: #3a1808; border-color: #c07020; color: #f0c060; }
.mc-colors { display: flex; flex-wrap: wrap; gap: 5px; }
.mc-color {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid #1a0a02;
  cursor: pointer; transition: transform 0.1s, border-color 0.1s;
}
.mc-color:hover { transform: scale(1.15); }
.mc-color.active { border-color: #ffffff; transform: scale(1.15); }
.mc-toggle { font-size: 12px; color: #a07040; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.game-save-btn {
  margin-top: 6px; padding: 8px 20px; background: #2a5010; border: 1px solid #4a8020;
  border-radius: 5px; color: #a0e040; font-family: inherit; font-size: 14px; cursor: pointer;
}
.game-save-btn:hover { background: #3a6018; }

/* ── EMAIL GATE (mandatory, one-time, shown before the game itself) ────────── */
.email-gate-body { flex-direction: column; gap: 12px; text-align: center; }
.email-gate-body p { margin: 0; color: #d4c0a0; font-size: 14px; line-height: 1.5; }
#eg-email {
  background: #0e0802; border: 1px solid #3a1e08; border-radius: 5px;
  color: #f0c060; font-family: inherit; font-size: 15px; padding: 9px 12px;
  width: 100%; box-sizing: border-box; text-align: center;
}
#eg-email:focus { outline: none; border-color: #c07020; }
.email-gate-status { min-height: 16px; font-size: 12.5px; color: #e0a060; }
.email-gate-status.err { color: #e06050; }
#eg-submit:disabled { opacity: 0.6; cursor: default; }

/* Branded action button (mobile hamburger menu, koi feed, etc.). This class had
   NO rule, so it rendered as a bare grey browser button off our tiki brand (#387).
   Warm wood gradient + gold display type, matching the game's modal buttons. */
.action-btn {
  padding: 10px 14px; background: linear-gradient(#2c1a10, #1c0f06);
  border: 1px solid #6a4420; border-radius: 8px; color: #f0c878;
  font-family: var(--font-display); font-size: 15px; cursor: pointer; text-align: center;
  letter-spacing: 0.02em; transition: background .12s, border-color .12s, color .12s;
  box-shadow: 0 1px 0 rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,220,150,0.07);
}
.action-btn:hover { background: linear-gradient(#3a2416, #241408); border-color: #a06828; color: #ffd98a; }
.action-btn:active { transform: translateY(1px); }

/* ── Tiki Trivia ─────────────────────────────────────────────────────────────── */
.game-modal-body.tt-body { flex-direction: column; align-items: stretch; gap: 12px; max-width: 540px; margin: 0 auto; }
.tt-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.tt-progress { color: #cba060; }
.tt-won { color: #90d040; font-weight: bold; }
.tt-cat { display: inline-block; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #d09040; border: 1px solid #5a3810; border-radius: 10px; padding: 2px 9px; }
.tt-q { font-size: 19px; color: #f0d8a0; line-height: 1.45; font-weight: bold; }
.tt-opts { display: flex; flex-direction: column; gap: 8px; }
.tt-opt { text-align: left; padding: 11px 14px; border-radius: 8px; border: 1px solid #5a3810; background: #1f1106; color: #e0c080; font-size: 17px; font-family: inherit; cursor: pointer; transition: background .12s, border-color .12s; }
.tt-opt:hover:not(:disabled) { background: #2a1808; border-color: #7a5020; }
.tt-opt:disabled { cursor: default; }
.tt-opt.correct { background: #16330f; border-color: #4a9a2a; color: #a8e070; }
.tt-opt.wrong { background: #3a1410; border-color: #a04030; color: #e0907a; }
.tt-fact { background: #160e04; border-left: 3px solid #c08040; border-radius: 0 6px 6px 0; padding: 10px 12px; font-size: 14px; color: #c0a878; line-height: 1.55; margin-top: 10px; }
.tt-fact b { color: #e0b860; }
.tt-next { align-self: flex-end; margin-top: 10px; }
.tt-results { text-align: center; padding: 14px 0; }
.tt-results h2 { font-size: 26px; color: #f0c040; margin-bottom: 8px; }
.tt-score { font-size: 17px; color: #d6bc80; }
.tt-payout { font-size: 35px; color: #90d040; font-weight: bold; margin: 12px 0; }
.tt-bonus { font-size: 15px; color: #f0c040; margin-bottom: 8px; }
.tt-actions { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.tt-actions .mc-chip { font-size: 14px; padding: 8px 16px; }

/* ── Trivia reward popup (tiered prize + confetti) ── */
.tt-reward { position: relative; overflow: hidden; }
.tt-reward-inner { position: relative; z-index: 2; }
.tt-confetti-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.tt-confetti { position: absolute; top: -8%; line-height: 1;
  animation-name: ttConfettiFall; animation-timing-function: linear;
  animation-iteration-count: infinite; will-change: transform, opacity; }
@keyframes ttConfettiFall {
  0%   { transform: translateY(0) rotate(0deg);      opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translateY(440px) rotate(300deg); opacity: 0; }
}
.tt-reward-badge { display: inline-block; margin: 10px 0 4px;
  padding: 5px 16px; border-radius: 999px; font-weight: 800; font-size: 16px;
  color: #2a1a08; background: linear-gradient(180deg, #ffd968, #f0a838);
  box-shadow: 0 2px 10px rgba(240,168,56,0.45); }
.tt-reward-art { display: flex; align-items: center; justify-content: center;
  height: 96px; margin: 6px 0; animation: ttRewardPop 0.5s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes ttRewardPop { 0% { transform: scale(0.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.tt-reward-name { font-size: 18px; color: #f4e6c0; margin-top: 2px; }
.tt-reward-name b { color: #ffd968; }
.tt-reward-note { font-size: 13px; color: #a8c890; margin-top: 4px; }

/* ── Fish Tank Builder ──────────────────────────────────────────────────────── */
/* ── 3D glass aquarium: front face + angled top and side faces for depth ── */
.fish-tank { position: relative; width: 100%; aspect-ratio: 1.9 / 1.12;
  filter: drop-shadow(3px 6px 8px rgba(0,0,0,0.5)); }
.ft-front { position: absolute; left: 0; top: 15%; width: 82%; bottom: 0; overflow: hidden;
  border-radius: 2px 2px 4px 4px;
  background: linear-gradient(180deg, #3f8fc0 0%, #2b76aa 50%, #1d6290 100%);
  border: 4px solid #0e0c08; box-sizing: border-box;
  box-shadow: inset 0 8px 22px rgba(150,215,245,0.30), inset 0 -12px 22px rgba(0,30,55,0.5); }
.ft-top { position: absolute; inset: 0; z-index: 1;
  clip-path: polygon(0% 15%, 82% 15%, 100% 0%, 18% 0%);
  background: linear-gradient(115deg, rgba(205,240,253,0.95) 0%, rgba(140,200,232,0.85) 55%, rgba(96,166,206,0.85) 100%); }
.ft-top-shimmer { position: absolute; left: 24%; top: 5%; width: 44%; height: 40%;
  background: rgba(255,255,255,0.45); border-radius: 50%; filter: blur(2.5px); }
.ft-side { position: absolute; inset: 0; z-index: 1;
  clip-path: polygon(82% 15%, 100% 0%, 100% 85%, 82% 100%);
  background: linear-gradient(100deg, rgba(30,92,132,0.97) 0%, rgba(12,50,84,0.98) 100%); }
/* glass highlight sheen across the front */
.ft-glass { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.05) 18%, rgba(255,255,255,0) 34%); }

/* ── Fish tank up-close view (feed + scrub) ── */
.fish-tank.ftv-big { width: 100%; aspect-ratio: 2 / 1.18; }
.ftv-big .ft-front { cursor: pointer; }
.ftv-fish { position: absolute; left: 0; top: 0; width: 12%; min-width: 36px; max-width: 64px;
  will-change: transform; pointer-events: none; z-index: 3; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.25)); }
.ftv-fish svg { display: block; width: 100%; height: auto; }
.ftv-food { position: absolute; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f0d27a, #a8791c);
  box-shadow: 0 0 2px rgba(0,0,0,0.4); pointer-events: none; z-index: 4; will-change: transform, opacity; }
.ftv-algae { position: absolute; z-index: 5; cursor: pointer;
  border-radius: 46% 54% 60% 40% / 55% 45% 55% 45%;
  background: radial-gradient(circle at 40% 35%, rgba(120,180,70,0.72), rgba(60,120,40,0.62));
  box-shadow: inset 0 0 6px rgba(30,70,20,0.6); }
.ftv-algae::after { content: ''; position: absolute; inset: 18%; border-radius: inherit;
  background: radial-gradient(circle at 60% 60%, rgba(150,200,90,0.55), transparent 70%); }
.ftv-algae.scrubbed { animation: ftvScrub 0.34s ease-out forwards; pointer-events: none; }
@keyframes ftvScrub { to { opacity: 0; transform: scale(0.3) rotate(20deg); } }
.ftv-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ftv-stat { font-size: 13px; color: #b09060; white-space: nowrap; }
.ft-sand { position: absolute; left: 0; right: 0; bottom: 0; height: 13%; background: linear-gradient(180deg, #e6cf94, #cba968); border-radius: 45% 45% 0 0 / 16px 16px 0 0; }
.ft-bubble { position: absolute; bottom: 12%; border-radius: 50%; background: rgba(225,248,255,0.5); animation-name: ftBubble; animation-timing-function: linear; animation-iteration-count: infinite; pointer-events: none; }
@keyframes ftBubble { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 0.55; } 100% { transform: translateY(-150px); opacity: 0; } }
.ft-plant { position: absolute; bottom: 8%; transform-origin: 50% 100%; animation: ftSway 5.5s ease-in-out infinite; }
.ft-plant:nth-child(even) { animation-duration: 7s; }
/* While being dragged in the builder, hold still and lift above its neighbours (#87). */
.ft-plant-dragging { animation: none !important; z-index: 6; filter: brightness(1.15); }
.ft-coral-dragging { z-index: 6; filter: brightness(1.15); }
.ft-plant svg { display: block; height: 100%; width: auto; }
@keyframes ftSway { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
.ft-coral { position: absolute; bottom: 9%; width: 15%; }
.ft-coral svg { display: block; width: 100%; height: auto; }
.ft-fish { position: absolute; left: 6%; animation-name: ftSwim; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.ft-fish svg { display: block; width: 100%; height: auto; }
@keyframes ftSwim { 0% { left: 6%; transform: scaleX(1); } 47% { transform: scaleX(1); } 50% { left: 78%; transform: scaleX(-1); } 97% { transform: scaleX(-1); } 100% { left: 6%; transform: scaleX(1); } }
.ft-cat-title { font-size: 14px; color: #d6bc80; font-weight: bold; margin: 6px 0 4px; }
.ft-buy-row { display: flex; flex-wrap: wrap; gap: 7px; }
.ft-buy { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 82px; padding: 6px 4px; background: #160e04; border: 1px solid #4a2c10; border-radius: 8px; cursor: pointer; font-family: inherit; transition: border-color .12s, background .12s; }
.ft-buy:hover { border-color: #c08040; background: #1f1206; }
.ft-buy:disabled { opacity: 0.5; cursor: default; }
.ft-buy-art { height: 34px; display: flex; align-items: center; justify-content: center; }
.ft-buy-art svg { height: 30px; width: auto; max-width: 70px; }
.ft-buy-name { font-size: 11px; color: #e0c890; text-align: center; line-height: 1.1; }
.ft-buy-price { font-size: 11px; color: #90d040; font-weight: bold; }
.ft-foot { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.ft-foot-info { font-size: 13px; color: #c0a060; flex: 1; }

/* ── Lei Maker ──────────────────────────────────────────────────────────────── */
.lei-stage { width: 100%; max-width: 290px; margin: 0 auto; }
.placed-lei { transform-origin: 50% 6%; animation: leiSway 6s ease-in-out infinite; }
@keyframes leiSway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }

/* Hawaiian Shirt Designer controls */
.shirt-controls { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.shirt-ctrl-row { display: flex; align-items: center; gap: 8px; }
.shirt-ctrl-label { font-size: 12px; font-weight: 700; color: #c79150; width: 56px; flex-shrink: 0; }
.shirt-swatches, .shirt-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.shirt-swatch { width: 24px; height: 24px; border-radius: 4px; border: 2px solid #3a2010; cursor: pointer; padding: 0; }
.shirt-swatch.sel { border-color: #fff; box-shadow: 0 0 0 1px #c08030; }
/* Per-pattern print-size sliders (one row per selected motif). */
.shirt-ctrl-row-top { align-items: flex-start; }
.shirt-sizes { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.shirt-size-item { display: flex; align-items: center; gap: 8px; }
.shirt-size-lbl { font-size: 11px; color: #d6bc80; width: 84px; flex-shrink: 0; white-space: nowrap; }
.shirt-size-slider { flex: 1; min-width: 0; accent-color: #c8804a; }
.shirt-size-hint { font-size: 11px; color: #8a6838; font-style: italic; }

/* Tiki Mug Collection gallery */
.mugc-count { text-align: center; color: #d6bc80; font-size: 15px; padding: 8px 0 12px; }
.mugc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; padding: 4px 12px 14px; }
.mugc-card { background: #160c04; border: 1px solid #3a2010; border-radius: 8px; padding: 8px; text-align: center; }
.mugc-card img { width: 90px; height: auto; border-radius: 4px; background: #fff; }
.mugc-name { font-size: 13px; color: #d4a040; margin: 6px 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mugc-place { width: 100%; }

/* Record Room track list */
.rr-track { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #160c04; border: 1px solid #3a2010; border-radius: 8px; cursor: pointer; margin-bottom: 6px; transition: background 0.15s, border-color 0.15s; }
.rr-track:hover { background: #241406; border-color: #7a4820; }
.rr-track.playing { border-color: #40c060; background: #14240e; }
.rr-track-icon { font-size: 26px; line-height: 1; }
.rr-track-name { flex: 1; color: #d4a040; font-size: 17px; font-weight: bold; }
.rr-track.playing .rr-track-name { color: #80e090; }
.rr-track-status { font-size: 13px; color: #c79150; white-space: nowrap; }
.rr-track.playing .rr-track-status { color: #40c060; }

.rp-back-btn {
  display: block;
  padding: 5px 8px;
  margin-bottom: 8px;
  background: #1e0e04;
  border: 1px solid #3a2010;
  border-radius: 4px;
  color: #d6bc80;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.rp-back-btn:hover { background: #2a1808; color: #f0c060; }
.rp-recipe-detail { padding: 4px 0; }
.rp-recipe-detail h2 { font-size: 26px; color: #f0c060; margin-bottom: 4px; }
.rp-recipe-detail .rp-detail-sub { font-size: 15px; color: #c79150; margin-bottom: 10px; font-style: italic; }
.rp-recipe-detail .rp-detail-components { list-style: none; padding: 0; }
.rp-recipe-detail .rp-detail-components li { font-size: 21px; color: #d6bc80; padding: 6px 0; border-bottom: 1px solid #1e0e04; }
/* recipe history block */
.rp-detail-history { margin-top: 16px; padding: 10px 12px; background: #160c04; border: 1px solid #2a1608; border-radius: 6px; }
.rp-detail-history-label { font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: #c79150; margin-bottom: 6px; }
.rp-detail-history p { font-size: 13px; line-height: 1.55; color: #ccb184; }
/* add-a-recipe button */
.rp-add-recipe-btn { width: 100%; margin-top: 10px; padding: 12px; background: #2a1808; border: 1px dashed #7a5020; border-radius: 6px; color: #f0c060; font-family: inherit; font-size: 17px; cursor: pointer; }
.rp-add-recipe-btn:hover { background: #3a2410; border-color: #c08030; }
/* recipe submission modal */
.game-modal.rs-modal { width: 92vw; max-width: 1000px; height: 92vh; max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; }
.rs-body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.rs-intro { color: #ccb184; font-size: 15px; line-height: 1.5; margin-bottom: 14px; }
.rs-toprow { display: flex; gap: 14px; flex-wrap: wrap; }
.rs-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 180px; }
.rs-field > span { font-size: 13px; text-transform: uppercase; color: #7a5030; }
.rs-field input, .rs-field select, .rs-field textarea { background: #1a0e04; color: #d4b060; border: 1px solid #5a3810; border-radius: 4px; padding: 7px 9px; font-size: 15px; font-family: inherit; box-sizing: border-box; width: 100%; }
.rs-section-title { font-size: 17px; color: #f0c060; font-weight: bold; margin: 18px 0 8px; border-bottom: 1px solid #3a2010; padding-bottom: 4px; }
.rs-hint { font-size: 13px; color: #c79150; font-weight: normal; }
.rs-subhead { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #c79150; margin: 10px 0 4px; grid-column: 1 / -1; }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 16px; }
.rs-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.rs-row-name { flex: 1; font-size: 15px; color: #d6bc80; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-qty { width: 72px; background: #1a0e04; color: #d4b060; border: 1px solid #5a3810; border-radius: 4px; padding: 5px 6px; font-size: 14px; font-family: inherit; flex-shrink: 0; }
.rs-new-row { display: flex; gap: 8px; margin-bottom: 6px; }
.rs-new-name { flex: 1; background: #1a0e04; color: #d4b060; border: 1px solid #5a3810; border-radius: 4px; padding: 6px 8px; font-size: 14px; font-family: inherit; }
.rs-new-qty { width: 90px; background: #1a0e04; color: #d4b060; border: 1px solid #5a3810; border-radius: 4px; padding: 6px 8px; font-size: 14px; font-family: inherit; }
.rs-status { min-height: 18px; font-size: 14px; margin-top: 10px; }
.rs-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid #2a1608; flex-shrink: 0; }

/* â”€â”€ SALE MESSAGE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.msg-card.msg-sale { border-left: 2px solid #d48020; }

/* â”€â”€ ORDER BANNER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#order-banner {
  display: none;
  position: absolute;
  top: 12%;
  left: 50%;
  z-index: 50;
  background: rgba(20, 8, 2, 0.92);
  border: 2px solid #d48020;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 18px;
  font-weight: bold;
  color: #f0c060;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 18px rgba(0,0,0,0.7);
}
#order-banner.banner-enter {
  display: block;
  animation: bannerSlideIn 2.5s ease forwards;
}
#order-banner.banner-exit {
  display: block;
  animation: bannerSlideOut 0.6s ease forwards;
}
@keyframes bannerSlideIn {
  0%   { transform: translateX(-200%); opacity: 0; }
  15%  { transform: translateX(-50%);  opacity: 1; }
  85%  { transform: translateX(-50%);  opacity: 1; }
  100% { transform: translateX(-50%);  opacity: 1; }
}
@keyframes bannerSlideOut {
  0%   { transform: translateX(-50%);  opacity: 1; }
  100% { transform: translateX(200%);  opacity: 0; }
}

/* ── WARNING TOASTS (routine) — slide in, hold, then exit to the right like an order ── */
#warn-toast-stack {
  position: absolute;
  top: 19%;
  left: 50%;
  width: 0;
  z-index: 55;
  pointer-events: none;
}
.warn-toast {
  position: absolute;
  left: 0;
  transform: translateX(-50%);
  width: max-content;
  max-width: 340px;
  background: rgba(38, 10, 2, 0.94);
  border: 2px solid #e07020;
  border-radius: 8px;
  padding: 8px 16px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.7);
  pointer-events: none;
}
.warn-toast .wt-title { display: block; font-size: 15px; font-weight: bold; color: #f5c062; white-space: nowrap; }
.warn-toast .wt-body  { display: block; font-size: 13px; color: #e0aa6a; line-height: 1.35; margin-top: 2px; white-space: normal; }
/* Out-of-stock toast: 2x bigger than a standard warning (#67) */
.warn-toast.wt-large            { max-width: 520px; padding: 16px 30px; border-width: 3px; }
.warn-toast.wt-large .wt-title  { font-size: 30px; }
.warn-toast.wt-large .wt-body   { font-size: 26px; margin-top: 6px; }
.oos-btn { background: none; border: none; color: #f0c040; font-weight: 700; cursor: pointer; padding: 0; font-size: inherit; text-decoration: underline; }
.warn-toast.wt-enter { animation: warnToastIn 0.45s ease forwards; }
.warn-toast.wt-exit  { animation: warnToastOut 0.55s ease forwards; }
@keyframes warnToastIn  { 0% { transform: translateX(-160%); opacity: 0; } 100% { transform: translateX(-50%); opacity: 1; } }
@keyframes warnToastOut { 0% { transform: translateX(-50%);  opacity: 1; } 100% { transform: translateX(200%); opacity: 0; } }

/* ── FLOOR POOP ── */
.floor-poop {
  position: absolute;
  z-index: 4;
  cursor: pointer;
  animation: poopDrop 0.45s cubic-bezier(0.22,1,0.36,1);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.55));
}
.floor-poop:hover { filter: drop-shadow(0 2px 6px rgba(240,200,80,0.5)); }
.poop-popup {
  position: absolute;
  z-index: 200;
  background: #1a0d04;
  border: 1px solid #7a4020;
  border-radius: 6px;
  padding: 5px 7px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.65);
}
.poop-cleanup-btn {
  background: #3a1c08;
  color: #f0c060;
  border: 1px solid #8a5020;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.poop-cleanup-btn:hover { background: #5a2c10; border-color: #c08040; }
.poop-popup { display: flex; flex-direction: column; gap: 5px; }
.poop-bathroom-btn {
  background: #12240a; color: #8fd45a; border: 1px solid #4a7a30;
  border-radius: 4px; padding: 5px 12px; font-size: 12px; font-family: inherit;
  cursor: pointer; white-space: nowrap;
}
.poop-bathroom-btn:hover { background: #1c360f; color: #b0f070; border-color: #6aa040; }
@keyframes vibeFloat {
  0%   { opacity: 1; transform: translateY(0); }
  70%  { opacity: 1; transform: translateY(-38px); }
  100% { opacity: 0; transform: translateY(-50px); }
}
.vibe-float-text {
  position: absolute;
  z-index: 300;
  font-size: 15px;
  font-weight: bold;
  color: #f0c060;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  pointer-events: none;
  animation: vibeFloat 1.4s ease-out forwards;
  white-space: nowrap;
}
@keyframes poopDrop {
  0%   { transform: translateY(-24px) scale(0.4); opacity: 0; }
  65%  { transform: translateY(5px)   scale(1.2); opacity: 1; }
  100% { transform: translateY(0)     scale(1);   opacity: 1; }
}

/* ── EVENT PERFORMERS ───────────────────────────────────────────────────── */
.event-performer {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  /* Above placed items (z 10) and birds (z 15) so special performers always read
     as being in front of the furniture and fixtures (#133). */
  z-index: 20;
  animation: perfEntrance 0.55s cubic-bezier(0.34,1.56,0.64,1) both;
}
.event-performer.exiting { animation: perfExit 0.5s ease-in forwards; }
/* Cannon-firing FX (#147) */
.cannon-flash { font-size: 26px; animation: cannonFlash 0.3s ease-out forwards; transform-origin: center; }
.cannon-smoke { font-size: 18px; opacity: 0.85; animation: cannonSmoke 1s ease-out forwards; }
.cannon-ball  { will-change: transform, opacity; }
@keyframes cannonFlash { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes cannonSmoke { 0% { transform: translate(0,0) scale(0.5); opacity: 0.9; } 100% { transform: translate(26px,-22px) scale(1.4); opacity: 0; } }

/* Musical notes that float up when a bird plays a placed instrument */
.instrument-note { font-size: 18px; opacity: 0; animation: instrNoteFloat 1.7s ease-out forwards; }
@keyframes instrNoteFloat {
  0%   { opacity: 0; transform: translateY(0) rotate(-8deg) scale(0.7); }
  18%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-46px) rotate(10deg) scale(1.15); }
}
.event-performer-label {
  font-size: 11px; color: #f0c060;
  background: rgba(0,0,0,0.55); border-radius: 4px; padding: 1px 7px;
  white-space: nowrap; letter-spacing: 0.3px;
}
@keyframes perfEntrance { 0% { opacity:0; transform:scale(0.25) translateY(50px); } 100% { opacity:1; transform:scale(1) translateY(0); } }
@keyframes perfExit     { 0% { opacity:1; transform:scale(1); } 100% { opacity:0; transform:scale(0.2) translateY(40px); } }
@keyframes perfTurtleBody { 0%,100% { transform:rotate(-4deg); } 50% { transform:rotate(4deg) translateY(-3px); } }
@keyframes perfFlameL  { 0%,100% { transform:scaleX(1) scaleY(1); opacity:1; } 35% { transform:scaleX(0.75) scaleY(1.35); opacity:0.85; } 70% { transform:scaleX(1.2) scaleY(0.8); opacity:0.95; } }
@keyframes perfFlameR  { 0%,100% { transform:scaleX(1) scaleY(1); opacity:1; } 35% { transform:scaleX(1.2) scaleY(0.8); opacity:0.9; } 70% { transform:scaleX(0.75) scaleY(1.35); opacity:0.85; } }
@keyframes perfDolphinHula { 0%,100% { transform:rotate(-7deg); } 50% { transform:rotate(7deg); } }
.perf-turtle-body { animation: perfTurtleBody 0.65s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 75%; }
.perf-flame-l { animation: perfFlameL 0.38s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 90%; }
.perf-flame-r { animation: perfFlameR 0.38s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 90%; }
/* Fire batons tossed up and spinning — two staggered so one's always aloft. */
@keyframes perfBatonToss {
  0%   { transform: translateY(6px)  rotate(0deg); }
  50%  { transform: translateY(-46px) rotate(180deg); }
  100% { transform: translateY(6px)  rotate(360deg); }
}
.perf-baton   { transform-box: fill-box; transform-origin: 50% 55%; }
.perf-baton-1 { animation: perfBatonToss 0.9s ease-in-out infinite; }
.perf-baton-2 { animation: perfBatonToss 0.9s ease-in-out infinite; animation-delay: -0.45s; }
.perf-dolphin-body { animation: perfDolphinHula 1.05s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 60%; }
@keyframes perfBearBob  { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-3px) rotate(1.5deg); } }
@keyframes perfUkeStrum { 0%,100% { transform: translateY(-2px) rotate(6deg); } 50% { transform: translateY(3px) rotate(-10deg); } }
.perf-bear-body { animation: perfBearBob 1.15s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 92%; }
.perf-uke-strum { animation: perfUkeStrum 0.3s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 15%; }
@keyframes perfPigBob  { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-3px) rotate(1deg); } }
@keyframes perfPanFlip { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-11px) rotate(180deg); } }
.perf-pig-body { animation: perfPigBob 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 92%; }
.perf-pan-flip { animation: perfPanFlip 1.15s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 120%; }
@keyframes perfCatBob { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-3px) rotate(1deg); } }
@keyframes perfShaker { 0%,100% { transform: translate(-1px,1px) rotate(-9deg); } 50% { transform: translate(1px,-3px) rotate(11deg); } }
.perf-cat-body { animation: perfCatBob 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 92%; }
.perf-shaker { animation: perfShaker 0.22s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 90%; }

/* ── Penguin wedding party ── */
.wedding-penguin svg, .wedding-arch svg, .corp-banner svg { display: block; }
.peng-body { animation: pengWaddle 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.wedding-guest:nth-child(odd)  .peng-body { animation-duration: 1.1s; }
.wedding-guest:nth-child(even) .peng-body { animation-duration: 1.7s; }
@keyframes pengWaddle { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-2px); } }
.pw-couple { display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.pw-couple .peng-body { animation: pengWaddle 1.4s ease-in-out infinite; }
.wedding-confetti {
  position: absolute; top: -6%; font-size: 16px; pointer-events: none; z-index: 8;
  animation-name: weddingFall; animation-timing-function: linear; animation-iteration-count: infinite;
  will-change: transform, opacity;
}
@keyframes weddingFall {
  0%   { transform: translateY(0) rotate(0deg);      opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translateY(360px) rotate(220deg); opacity: 0; }
}

/* ── CRITICAL WARNING (modal — stays until the player closes it) ── */
#warn-critical-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 590;
  display: flex; align-items: center; justify-content: center;
  animation: wcFade 0.2s ease;
}
@keyframes wcFade { from { opacity: 0; } to { opacity: 1; } }
#warn-critical-box {
  text-align: center;
  padding: 28px 34px;
  background: #1f0c04;
  border: 2px solid #c0401a;
  border-radius: 12px;
  max-width: 400px;
  box-shadow: 0 0 40px rgba(192,64,26,0.35);
}
#warn-critical-box .wc-icon { font-size: 52px; margin-bottom: 6px; }
#warn-critical-box h2 { font-size: 25px; color: #f5b84a; margin-bottom: 10px; }
#warn-critical-box p  { font-size: 17px; color: #d8b080; margin-bottom: 22px; line-height: 1.5; }
.wc-close {
  padding: 11px 30px; border-radius: 6px; font-size: 17px; font-family: inherit; cursor: pointer;
  background: #7a2410; border: 1px solid #d06030; color: #f0c0a0;
}
.wc-close:hover { background: #8a2c14; }

/* â”€â”€ PANEL COLLAPSE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.panel-collapse-btn {
  position: absolute;
  background: #3a2004;
  border: 1px solid #c09020;
  border-radius: 4px;
  color: #f0d040;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  width: 13px;
  padding: 16px 0;
  text-align: center;
  z-index: 20;
  line-height: 1;
  transition: background 0.15s, color 0.15s, left 0.25s, right 0.25s;
}
.panel-collapse-btn:hover { background: #5a3008; color: #ffe060; }

/* Buttons are siblings of the panels (not children) so display:none on the panel doesn't hide them */
#left-collapse-btn {
  position: fixed;
  left: 330px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
}
#left-panel.panel-collapsed { display: none; }
#left-collapse-btn.collapsed { left: 0; }

#right-collapse-btn {
  position: fixed;
  right: 315px;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
}
#right-panel.panel-collapsed { display: none; }
#right-collapse-btn.collapsed { right: 0; }

/* â”€â”€ BAR NAME EDIT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#bar-name-display { cursor: pointer; border-bottom: 1px dashed transparent; }
#bar-name-display:hover { border-bottom-color: currentColor; opacity: 0.85; }
#bar-name-input {
  font-size: 17px;
  font-family: inherit;
  background: #1e0e04;
  border: 1px solid #d48020;
  border-radius: 3px;
  color: #f0c060;
  padding: 1px 5px;
  width: 140px;
}

/* â”€â”€ SHOP OWNED COLUMN HEADER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.shop-col-header {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 6px;
  padding: 0 2px 2px 2px;
}
.shop-owned-label {
  font-size: 11px;
  font-weight: bold;
  color: #40c060;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: right;
}

/* â”€â”€ MERCH TAB â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.merch-intro {
  font-size: 12px;
  color: #c79150;
  font-style: italic;
  padding: 6px 4px 8px;
  border-bottom: 1px solid #2a1408;
  margin-bottom: 8px;
}
.merch-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 7px 5px;
  border: 1px solid #2a1808;
  border-radius: 5px;
  margin-bottom: 6px;
  background: #110804;
}
.merch-art {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.merch-art svg { width: 36px; height: 36px; }
.merch-info { flex: 1; min-width: 0; }
.merch-name { font-size: 13px; color: #d4a040; font-weight: bold; margin-bottom: 3px; }
.merch-details { display: flex; gap: 10px; margin-bottom: 5px; }
.merch-wholesale { font-size: 12px; color: #a8895f; }
.merch-stock { font-size: 12px; color: #60a040; }
.merch-stock.merch-empty { color: #c06060; }
.merch-resell-row { display: flex; align-items: center; gap: 5px; }
.merch-label { font-size: 12px; color: #a8895f; }
.merch-price-input {
  width: 52px;
  padding: 2px 4px;
  font-size: 13px;
  font-family: inherit;
  background: #1a0e06;
  border: 1px solid #4a2808;
  border-radius: 3px;
  color: #f0c060;
}

/* â”€â”€ EVENTS SECTION (inside Merch tab) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.events-header {
  font-size: 15px;
  font-weight: bold;
  color: #f0c060;
  border-top: 1px solid #3a1e08;
  margin-top: 12px;
  padding-top: 10px;
  padding-bottom: 3px;
}
.events-intro {
  font-size: 12px;
  color: #c79150;
  font-style: italic;
  margin-bottom: 8px;
}
.events-upcoming-label,
.events-catalog-label {
  font-size: 12px;
  font-weight: bold;
  color: #c08040;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 8px 0 5px;
}
.event-upcoming-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1204;
  border: 1px solid #5a8010;
  border-radius: 5px;
  padding: 6px 8px;
  margin-bottom: 5px;
}
.event-upcoming-emoji { font-size: 24px; flex-shrink: 0; }
.event-upcoming-info  { flex: 1; min-width: 0; }
.event-upcoming-name  { font-size: 13px; color: #d4a040; font-weight: bold; }
.event-upcoming-sub   { font-size: 12px; color: #a8895f; margin-top: 1px; }
.event-countdown {
  font-size: 13px;
  font-weight: bold;
  color: #80d040;
  flex-shrink: 0;
  min-width: 48px;
  text-align: right;
}
.event-card {
  background: #130c04;
  border: 1px solid #2a1808;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 7px;
  transition: border-color 0.15s;
}
.event-card:hover { border-color: #5a3010; }
.event-card.event-cant-afford { opacity: 0.55; }
.event-card-top {
  display: flex;
  gap: 8px;
  margin-bottom: 7px;
}
.event-emoji { font-size: 31px; flex-shrink: 0; line-height: 1; }
.event-card-info { flex: 1; min-width: 0; }
.event-card-name { font-size: 14px; color: #d4a040; font-weight: bold; margin-bottom: 2px; }
.event-card-desc { font-size: 12px; color: #907050; line-height: 1.4; margin-bottom: 3px; }
.event-card-stats { font-size: 12px; color: #706040; }
.event-card-stats b { color: #c08040; }
.event-card-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.event-breakeven {
  font-size: 12px;
  color: #706848;
  flex: 1;
  min-width: 0;
}

/* â”€â”€ MENU PANEL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.private-active-card {
  background: #2a1e0e;
  border: 1px solid #c8891a;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}
.private-active-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.private-active-info { flex: 1; }
.private-active-name {
  font-size: 15px;
  font-weight: 600;
  color: #f0c060;
  margin-bottom: 2px;
}
.private-active-sub {
  font-size: 13px;
  color: #ccb184;
  line-height: 1.4;
}
.private-countdown {
  color: #40c060;
  font-weight: 600;
}
.private-active-note {
  font-size: 12px;
  color: #cba060;
  margin-top: 6px;
  font-style: italic;
}

/* ── ROOM NAVIGATION ─────────────────────────────────────────────────────── */
/* Now lives inline in the header (#header-room-crumb) — the scene bar that used
   to hold this + the channel toggle + camera + brightness is gone, and the room
   canvas expands upward to fill the reclaimed space. */
.room-nav-current { white-space: nowrap; color: #c8a060; font-weight: 600; }
.room-nav-sep     { color: #6a4828; }
.room-nav-back {
  background: none;
  border: 1px solid #5a3818;
  color: #c8a060;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
}
.room-nav-back:hover { background: #2a1a08; }
.room-nav-del {
  background: none;
  border: 1px solid #6a3020;
  color: #c88a70;
  font-size: 12px;
  line-height: 1;
  padding: 2px 7px;
  border-radius: 3px;
  cursor: pointer;
}
.room-nav-del:hover { background: #3a1810; border-color: #a04430; color: #ffb090; }

/* ── DOORWAYS ──────────────────────────────────────────────────────────────── */
.doorway-el {
  position: absolute;
  cursor: grab;
  z-index: 5;
  display: flex;
  flex-direction: column-reverse;  /* label appears above the arch */
  align-items: center;
  gap: 3px;
  transition: filter 0.15s;
}
.doorway-el:hover { filter: brightness(1.5) drop-shadow(0 0 6px #c08020); }
.doorway-el:hover .doorway-label { display: block; }
/* Side-wall doors: a full-room overlay drawing the door in room coordinates so
   its bottom rides the wall/floor junction. Only the door shape takes clicks. */
.doorway-el.side-door {
  left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none;
  display: block;
}
.doorway-el.side-door svg { pointer-events: none; }
.doorway-el.side-door .side-door-hit { pointer-events: auto; cursor: grab; }
.doorway-el.side-door .doorway-label { pointer-events: auto; cursor: grab; }
.doorway-label {
  display: none;               /* revealed on hover only (owner request) */
  font-size: 11px;
  color: #c8a060;
  background: rgba(8,5,3,0.85);
  border: 1px solid #5a3010;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  margin-bottom: 2px;
}

/* Exterior entrance — the door into the Main Bar glows with a gentle pulse so
   it reads as clickable (the ambient birds tell the player to step inside; no
   baked "come in" words). Label still appears on hover like any doorway. */
.ext-door-invite { animation: extDoorPulse 1.8s ease-in-out infinite; }
@keyframes extDoorPulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(240,190,90,0.45)); }
  50%      { filter: drop-shadow(0 0 12px rgba(255,210,110,0.95)); }
}

/* ── WALL PICKER MODAL ──────────────────────────────────────────────────── */
#wall-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
#wall-picker-modal {
  background: #1a1008;
  border: 1px solid #8a5020;
  border-radius: 10px;
  padding: 20px 24px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wall-picker-title {
  font-size: 19px;
  font-weight: 700;
  color: #f0c060;
}
.wall-picker-sub {
  font-size: 14px;
  color: #c6a670;
}
.wall-picker-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wall-btn {
  background: #2a1808;
  border: 1px solid #7a4818;
  color: #e0b870;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.wall-btn:hover { background: #3a2010; border-color: #c0801a; }
.wall-picker-cancel {
  background: none;
  border: none;
  color: #a8895f;
  font-size: 13px;
  cursor: pointer;
  align-self: center;
}
.wall-picker-cancel:hover { color: #c08040; }

/* ── ROOM TYPE CARDS IN DECORATE TAB ─────────────────────────────────────── */
.room-type-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  border-bottom: 1px solid #2a1808;
}
.room-type-emoji { font-size: 24px; flex-shrink: 0; width: 28px; text-align: center; }
.room-type-info  { flex: 1; min-width: 0; }
.room-type-name  { font-size: 14px; font-weight: 600; color: #e0c080; }
.room-type-desc  { font-size: 12px; color: #806848; line-height: 1.3; margin-top: 1px; }

/* ── ROOM TRANSITION ──────────────────────────────────────────────────────── */
@keyframes roomFadeOut { from { opacity:1; } to { opacity:0; } }
@keyframes roomFadeIn  { from { opacity:0; } to { opacity:1; } }
.room-fade-out { animation: roomFadeOut 0.25s forwards; }
.room-fade-in  { animation: roomFadeIn  0.3s forwards; }

#rp-menu {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
#rp-menu.hidden { display: none; }

/* ── TROPHY CABINET ──────────────────────────────────────────────────────── */
#trophy-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
#trophy-modal {
  background: #1a1008; border: 1px solid #c08020; border-radius: 10px;
  padding: 20px 24px; max-width: 480px; width: 90%;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  max-height: 80vh; overflow-y: auto;
}
.trophy-title { font-size: 21px; font-weight: 700; color: #f0c060; }
.trophy-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%;
}
.trophy-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 6px; border-radius: 6px; text-align: center;
}
.trophy-item.earned  { background: #2a1c08; border: 1px solid #c08020; }
.trophy-item.locked  { background: #120c04; border: 1px solid #2a1808; opacity: 0.5; }
.trophy-icon { font-size: 33px; }
.trophy-name { font-size: 13px; font-weight: 600; color: #e0c060; }
.trophy-desc { font-size: 11px; color: #a8895f; line-height: 1.3; }

/* ── MENU BUY ALL ────────────────────────────────────────────────────────── */
.menu-buy-all-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; background: #1a1008; border-bottom: 1px solid #3a2010;
  flex-shrink: 0;
}
.menu-buy-all-label { font-size: 14px; font-weight: 600; color: #f0c060; }
.menu-buy-all-cost  { font-size: 12px; color: #c6a670; flex: 1; }

/* ── TUTORIAL OVERLAY ────────────────────────────────────────────────────────── */
/* Faded-menu parchment card — matches the room/covering/doorway palette
   (cream base, sepia-ink text/borders, terracotta accent) instead of the old
   dark-brown-and-gold generic-modal theme. */
#tutorial-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.80);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
#tutorial-overlay.hidden { display: none; }
#tutorial-card {
  background: #e6d6ac;
  border: 2px solid #7d6647;
  border-radius: 14px;
  padding: 44px 52px 36px;
  max-width: 620px; width: 92%;
  text-align: center;
  position: relative;
  box-shadow: 0 0 50px rgba(90,65,30,0.25);
}
#tutorial-art {
  font-size: 104px; line-height: 1;
  margin-bottom: 20px;
  letter-spacing: 6px;
}
#tutorial-title {
  color: #4a3620; font-size: 33px; font-weight: bold;
  margin-bottom: 14px;
}
#tutorial-body {
  color: #5a4530; font-size: 20px; line-height: 1.8;
  margin-bottom: 30px; min-height: 100px;
}
.tut-counter {
  font-size: 15px; color: #8a7550; margin-bottom: 10px; letter-spacing: 1px;
}
.tutorial-dots {
  display: flex; justify-content: center; gap: 10px; margin-bottom: 24px;
}
.tutorial-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #d3c096; border: 1px solid #a8926a;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}
.tutorial-dot.active { background: #8a5a34; border-color: #8a5a34; }
.tutorial-btns {
  display: flex; gap: 12px; justify-content: space-between; align-items: center;
}
.tut-btn {
  background: #d3c096; border: 1px solid #a8926a;
  color: #4a3620; border-radius: 8px; padding: 12px 32px;
  cursor: pointer; font-family: inherit; font-size: 19px;
  transition: background 0.15s;
}
.tut-btn:hover { background: #c4b087; }
.tut-btn-primary { background: #8a5a34; color: #f2e6c9; border-color: #6b4527; }
.tut-btn-primary:hover { background: #6b4527; }
.tut-skip {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none;
  color: #8a7550; font-size: 26px; cursor: pointer; line-height: 1;
}
.tut-skip:hover { color: #4a3620; }

/* ── TUTORIALS MENU ──────────────────────────────────────────────────────────── */
#tutorials-menu-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
#tutorials-menu-card {
  background: #e6d6ac;
  border: 2px solid #7d6647;
  border-radius: 14px;
  padding: 30px 34px 28px;
  max-width: 520px; width: 92%;
  position: relative;
  box-shadow: 0 0 40px rgba(90,65,30,0.22);
}
.tut-menu-title { color: #4a3620; font-size: 28px; font-weight: bold; text-align: center; margin-bottom: 6px; }
.tut-menu-sub   { color: #7a6a4a; font-size: 17px; text-align: center; margin-bottom: 20px; }
.tut-menu-list  { display: flex; flex-direction: column; gap: 10px; }
.tut-menu-item {
  display: flex; align-items: center; gap: 14px;
  background: #dccb9c; border: 1px solid #b9a77f;
  border-radius: 10px; padding: 14px 16px;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.tut-menu-item:hover { background: #cdb98d; border-color: #8a5a34; }
.tut-menu-icon { font-size: 40px; line-height: 1; flex-shrink: 0; }
.tut-menu-info { flex: 1; min-width: 0; }
.tut-menu-name { color: #4a3620; font-size: 19px; font-weight: bold; margin-bottom: 3px; }
.tut-menu-desc { color: #6b5a3e; font-size: 15px; line-height: 1.5; }
.tut-menu-go   { color: #8a5a34; font-size: 21px; flex-shrink: 0; }
.tut-menu-footer {
  border-top: 1px solid #b9a77f;
  margin-top: 18px;
  padding-top: 14px;
}
.tut-startup-toggle {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; color: #7a6a4a; font-size: 15px; user-select: none;
}
.tut-startup-toggle input[type="checkbox"] {
  width: 17px; height: 17px; accent-color: #8a5a34; cursor: pointer; flex-shrink: 0;
}

/* ── HUD WARNING STATES ──────────────────────────────────────────────────────── */
.hud-warn   { color: #ffaa00 !important; }
.hud-danger { color: #ff3030 !important; animation: hud-pulse 1s ease-in-out infinite; }
@keyframes hud-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

/* ── WALL & FLOOR COVERINGS ──────────────────────────────────────────────────── */
.surfaces-panel {
  background: #180e04;
  border: 1px solid #3a2010;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
}
.surface-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 3px;
  margin-bottom: 8px;
}
.surf-btn {
  background: #2e1a08;
  border: 1px solid #4a2a12;
  border-radius: 5px;
  color: #b08848;
  font-size: 11px;
  font-family: inherit;
  padding: 5px 3px;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: background 0.12s, border-color 0.12s;
}
.surf-btn:hover { background: #3e2410; border-color: #7a4820; }
.surf-btn.surf-sel {
  background: #5a3010;
  border-color: #c07828;
  color: #f0c868;
  font-weight: bold;
}
.surf-dot { color: #60b840; font-size: 9px; }
.covering-list { display: flex; flex-direction: column; gap: 4px; }
.covering-card {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #221408;
  border: 1px solid #3a2210;
  border-radius: 6px;
  padding: 5px 7px;
  cursor: pointer;
  transition: border-color 0.12s;
}
.covering-card:hover { border-color: #6a3818; }
.covering-swatch {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid #5a3818;
  flex-shrink: 0;
}
.rug-swatch {
  width: 46px; height: 30px;
  border: none; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.rug-swatch svg { display: block; }
.covering-info { flex: 1; min-width: 0; }
.covering-name { font-size: 12px; color: #d4a050; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.covering-type { font-size: 10px; color: #806040; }
.cov-applied-tag { color: #60b840; }
.surf-check { color: #60b840; font-size: 14px; margin-right: 2px; flex-shrink: 0; }
.surf-rm-btn { flex-shrink: 0; }
.covering-empty { padding: 8px; color: #806040; font-size: 12px; text-align: center; }

/* ── TIKI CRUISE ─────────────────────────────────────────────────────────────── */
.cruise-deck {
  background: #100c04;
  border: 1px solid #3a2808;
  border-radius: 8px;
  padding: 10px 10px 8px;
  margin-bottom: 8px;
}
.cruise-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 13px;
  color: #c8a860;
}
.cruise-lbl { color: #906840; }
.cruise-price-row { flex-direction: column; align-items: flex-start; gap: 4px; }
.cruise-price-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cruise-adj {
  background: #3a2008;
  border: 1px solid #6a4018;
  border-radius: 4px;
  color: #e0b060;
  font-size: 12px;
  padding: 3px 8px;
  cursor: pointer;
  font-family: inherit;
}
.cruise-adj:hover { background: #4a2c10; }
.cruise-price-val {
  font-size: 16px;
  font-weight: bold;
  color: #f0c840;
  min-width: 48px;
  text-align: center;
}
.cruise-launch-btn {
  width: 100%;
  background: linear-gradient(180deg, #1a5a8a 0%, #0e3a60 100%);
  border: 1px solid #3a8ac0;
  border-radius: 6px;
  color: #d0f0ff;
  font-size: 15px;
  font-family: inherit;
  padding: 8px;
  cursor: pointer;
  margin: 6px 0 4px;
  letter-spacing: 0.5px;
  transition: background 0.15s;
}
.cruise-launch-btn:hover { background: linear-gradient(180deg, #2a6a9a 0%, #1a4a70 100%); }
.cruise-note { font-size: 10px; color: #706040; text-align: center; }
.cruise-completed { font-size: 10px; color: #7a6040; margin-top: 6px; text-align: right; }
.cruise-underway {
  font-size: 15px;
  color: #f0c840;
  text-align: center;
  margin-bottom: 6px;
}
.cruise-pbar-wrap {
  height: 10px;
  background: #1a1208;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #3a2810;
  margin-bottom: 6px;
}
.cruise-pbar {
  height: 100%;
  background: linear-gradient(90deg, #1a5a8a, #3090c0);
  border-radius: 5px;
  animation: cruiseFill 120s linear forwards;
}
@keyframes cruiseFill { from { width: 0% } to { width: 100% } }
.cruise-eta { font-size: 11px; color: #90a8c0; text-align: center; }


/* ── Koi Pond up-close feeding view ─────────────────────────────────────────── */
.kp-water {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: 50% / 44%;
  overflow: hidden;
  cursor: pointer;
  background:
    radial-gradient(ellipse 120% 80% at 50% 30%, #2a86a4 0%, #14607e 45%, #0c3446 100%);
  box-shadow: inset 0 0 44px rgba(0,0,0,0.55), inset 0 6px 18px rgba(255,255,255,0.08);
  border: 3px solid #2f2413;
  touch-action: none;
}
.kp-koi {
  position: absolute; left: 0; top: 0;
  width: 44px; height: 22px;
  will-change: transform;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,0.35));
}
.kp-food {
  position: absolute; left: 0; top: 0;
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f0c06a, #9a5418);
  box-shadow: 0 0 3px rgba(0,0,0,0.4);
  will-change: transform, opacity;
  pointer-events: none;
}
.kp-pad {
  position: absolute;
  width: 54px; height: 32px;
  margin: -16px 0 0 -27px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #3a9a3a, #256a24);
  box-shadow: inset -4px -4px 8px rgba(0,0,0,0.25);
  opacity: 0.9;
  pointer-events: none;
}
.kp-pad::after {
  content: ''; position: absolute; left: 50%; top: 8%;
  width: 2px; height: 44%;
  background: #0e3a10; transform: translateX(-50%);
}
.kp-shimmer {
  position: absolute;
  width: 60px; height: 10px;
  border-radius: 50%;
  background: rgba(180,230,245,0.18);
  pointer-events: none;
  animation: kpShimmer 5s ease-in-out infinite;
}
@keyframes kpShimmer {
  0%, 100% { opacity: 0.10; transform: translateX(0) scaleX(1); }
  50%      { opacity: 0.26; transform: translateX(10px) scaleX(1.15); }
}
.kp-ripple {
  position: absolute;
  border: 2px solid rgba(255,255,255,0.55);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: kpRipple 0.6s ease-out forwards;
}
@keyframes kpRipple {
  from { width: 4px;  height: 4px;  opacity: 0.7; }
  to   { width: 40px; height: 40px; opacity: 0;   }
}

/* Pulsing highlight on the sidebar item during the drag tutorial */
@keyframes decorGrabPulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 4px rgba(240,190,60,0.22), 0 0 18px rgba(240,190,60,0.45); }
  50%      { transform: scale(1.06); box-shadow: 0 0 0 7px rgba(240,190,60,0.10), 0 0 26px rgba(240,190,60,0.75); }
}

/* Aligned Ideal-vs-Made scorecard grid — both columns share rows so items line up */
.popup-scorecard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 12px;
  margin-bottom: 12px;
  align-items: start;
}
.popup-sc-head {
  font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
  color: #c79150; margin-bottom: 4px;
  border-bottom: 1px solid #2a1408; padding-bottom: 3px;
}
.popup-sc-cell { font-size: 13px; color: #d6bc80; padding: 2px 0; min-height: 18px; }
.popup-sc-cell.matched   { color: #60c080; }
.popup-sc-cell.missed    { color: #c06060; }
.popup-sc-cell.made-extra { color: #c8a86a; }
.popup-sc-cell.blank     { color: #4a3020; }

/* ── BLOG & FORUM + SCENE SCREENSHOT ─────────────────────────────────────────── */
/* Camera button — sits in the header just right of the brightness (sun) button. */
.scene-cam-btn {
  display: flex; align-items: center; justify-content: center;
  background: #241206; border: 1px solid #4a2c10; color: #e8c88a;
  border-radius: 5px; font-size: 16px; line-height: 1; padding: 4px 8px;
  cursor: pointer;
}
.scene-cam-btn:hover { background: #34200c; border-color: #6a4020; color: #f0c060; }

/* Stable ⇄ Beta release-channel toggle — now lives in the ⚙️ Settings menu. */
.channel-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; padding: 2px 6px;
  -webkit-tap-highlight-color: transparent;
}
.ch-label {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #6a5230; transition: color .15s ease; white-space: nowrap; user-select: none;
}
.ch-label.active { color: #f0c060; }                       /* Stable bright when active */
.channel-toggle.beta .ch-beta.active { color: #ff9a5a; }   /* Beta bright (orange) when active */
.ch-track {
  position: relative; width: 30px; height: 15px; flex-shrink: 0;
  background: #241206; border: 1px solid #7a5020; border-radius: 8px;
  transition: border-color .18s ease;
}
.channel-toggle.beta .ch-track { border-color: #b06428; }
.ch-knob {
  position: absolute; top: 1px; left: 1px; width: 11px; height: 11px;
  border-radius: 50%; background: #f0c060;
  transition: left .18s ease, background .18s ease;
}
.channel-toggle.beta .ch-knob { left: 16px; background: #ff9a5a; }

/* Full-scene drag-to-capture overlay */
.scene-shot-overlay { background: rgba(10,6,4,0.18); box-shadow: 0 0 0 2px #f0c060 inset; }
.scene-shot-hint {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  background: rgba(10,6,4,0.9); color: #f0c060; border: 1px solid #6a4020;
  border-radius: 6px; padding: 5px 12px; font-size: 12px; white-space: nowrap;
  pointer-events: none; max-width: 94%; overflow: hidden; text-overflow: ellipsis;
}
.scene-shot-sel {
  position: absolute; border: 2px dashed #f0c060; background: rgba(240,192,96,0.12);
  pointer-events: none;
}

/* Blog / Forum modal internals */
.bf-tabs { display: flex; gap: 6px; padding: 10px 16px 0; }
.bf-tab {
  background: #1a0e04; border: 1px solid #3a2008; color: #c8a060;
  border-radius: 8px 8px 0 0; padding: 7px 16px; font-size: 14px; cursor: pointer;
}
.bf-tab.active { background: #2a1608; color: #f0c060; border-color: #6a4020; border-bottom-color: #2a1608; }
#bf-body { padding: 12px 16px 16px; overflow: auto; }

.bf-composer {
  background: #160c04; border: 1px solid #2a1608; border-radius: 10px;
  padding: 12px; margin-bottom: 14px;
}
.bf-text {
  width: 100%; resize: vertical; min-height: 44px; background: #0a0604;
  border: 1px solid #3a2008; border-radius: 6px; color: #e8d8b0;
  font-family: inherit; font-size: 14px; padding: 8px;
}
.bf-composer-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.bf-cat-select {
  background: #0a0604; border: 1px solid #3a2008; border-radius: 6px;
  color: #e8d8b0; font-size: 13px; padding: 6px 8px;
}
.bf-shot-note { font-size: 12px; color: #c8a060; margin-top: 8px; }
.bf-muted { color: #8a6838; }
.bf-link {
  background: none; border: none; color: #d08040; cursor: pointer;
  font-size: 12px; text-decoration: underline; padding: 0 2px;
}
#bf-shot-preview { margin-top: 8px; }

.bf-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bf-chip {
  background: #1a0e04; border: 1px solid #3a2008; color: #c8a060;
  border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer;
}
.bf-chip.active { background: #7a4a10; color: #f0c060; border-color: #a0824a; }

.bf-feed { display: flex; flex-direction: column; gap: 12px; }
.bf-post {
  background: #160c04; border: 1px solid #2a1608; border-radius: 10px; padding: 12px;
}
.bf-posthead { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #f0c060; }
.bf-postcat {
  background: #2a1608; border: 1px solid #4a2c10; color: #d4b060;
  border-radius: 999px; padding: 1px 9px; font-size: 11px;
}
.bf-posttime { margin-left: auto; color: #6a5230; font-size: 12px; }
.bf-posttext { margin-top: 6px; color: #d6bc80; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.forum-shot {
  margin-top: 8px; border: 1px solid #2a1608; border-radius: 8px; overflow: hidden;
  background: #0a0604;
  max-width: 100%;   /* never spill past the feed/screen edge (mobile) */
}
/* Any image in a blog/forum post scales down to fit — never wider than the screen. */
.bf-feed img, .bf-post img { max-width: 100%; height: auto; }
.bf-feed { max-width: 100%; }

/* ── CELLAR BOTTLE POPUP ── */
/* Tall popup: the bottle fills the full height on the LEFT, all other info is
   right-justified in a column that spans the same height. */
/* Warm orange-brown popup (not the near-black default) so the rum bottles read
   clearly against a tiki-palette background (#359). */
.cbp-modal { max-width: 520px; width: 94vw; background: linear-gradient(158deg, #5c3818 0%, #402612 100%); border-color: #8a5422; }
.cbp-body { display: flex; flex-direction: row; align-items: stretch; padding: 0; }
.cbp-left {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-start;
  background: rgba(24,12,4,0.30); border-right: 1px solid rgba(0,0,0,0.28); padding: 14px 16px;
}
.cbp-left svg { height: clamp(260px, 58vh, 460px); width: auto; display: block; }
.cbp-left-empty { align-items: center; justify-content: center; min-width: 150px; }
.cbp-noimg {
  color: #8a6840; font-size: 14px; font-style: italic; text-align: center; line-height: 1.5;
  padding: 20px 14px; border: 1px dashed #5e4020; border-radius: 8px;
}
.cbp-right {
  flex: 1; display: flex; flex-direction: column; align-items: flex-end; text-align: right;
  padding: 18px 20px; gap: 14px; justify-content: space-between; min-width: 0;
}
.cbp-cat { color: #c8a060; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.cbp-notes { color: #d6bc80; font-size: 14.5px; line-height: 1.6; }
.cbp-stats { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.cbp-stat {
  background: #241505; border: 1px solid #5e4020; border-radius: 6px;
  padding: 7px 13px; color: #e8c878; font-size: 15px;
}
.cbp-stat b { color: #ffdf9a; }
.cbp-stat-empty { color: #8a6840; }
.cbp-buywrap { width: 100%; }
.cbp-buywrap .popup-buy-recipe { width: 100%; }
.cbp-btnnote { color: #c07040; font-size: 12px; text-align: right; margin-top: 4px; }

/* ── ART TOOL (#362) ── */
#art-tool { position: fixed; inset: 0; display: flex; flex-direction: column; background: #0f0a06; color: #e8d8b0; font-family: -apple-system, Segoe UI, Roboto, Georgia, serif; }
.at-body { flex: 1; min-height: 0; display: flex; }
/* Dashboard tab-nav carried into the Art tool so it reads as a dev-page tab. */
.at-topnav { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 16px 0; background: #140c05; border-bottom: 1px solid #2a1608; }
.at-dnav { padding: 9px 15px; color: #a0824a; text-decoration: none; font-size: 14px; font-weight: 700; border-bottom: 2px solid transparent; }
.at-dnav:hover { color: #f0c060; }
.at-dnav.on { color: #f0c060; border-bottom-color: #f0c060; }
.at-side { width: 280px; flex-shrink: 0; border-right: 1px solid #2a1808; display: flex; flex-direction: column; background: #140c05; }
.at-head { font-size: 18px; font-weight: 800; color: #f0c060; padding: 16px 16px 8px; }
.at-search { margin: 0 12px 8px; padding: 9px 11px; background: #1e130a; border: 1px solid #4a3018; border-radius: 7px; color: #f0e2c4; font-size: 14px; font-family: inherit; }
.at-search:focus { outline: none; border-color: #c08030; }
.at-tabs { display: flex; gap: 6px; margin: 0 12px 8px; }
.at-tab { flex: 1; padding: 7px 10px; background: #1a1008; border: 1px solid #3a2410; border-radius: 7px; color: #a0824a; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; }
.at-tab:hover { color: #d4b478; }
.at-tab.on { background: #3a2410; color: #f0c060; border-color: #7a5020; }
.at-recent { padding: 0 12px 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.at-recent:empty { display: none; }
.at-recent-lbl { width: 100%; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #7a6a4a; margin-bottom: 1px; }
.at-recent-chip { background: #241505; border: 1px solid #4a3018; color: #d8b878; border-radius: 12px; padding: 3px 9px; font-size: 12px; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.at-recent-chip:hover { border-color: #a06828; color: #ffd27a; }
.at-recent-chip.on { background: #3a2610; border-color: #c08030; color: #ffd27a; }
.at-recent-n { background: #4a3018; color: #f0d090; border-radius: 8px; padding: 0 5px; font-size: 10px; }
.at-list { flex: 1; overflow-y: auto; padding: 0 8px 16px; }
.at-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #8a6838; margin: 12px 6px 4px; }
.at-item { display: block; width: 100%; text-align: left; background: none; border: none; color: #d4b478; font-size: 14px; font-family: inherit; padding: 7px 9px; border-radius: 6px; cursor: pointer; }
.at-item:hover { background: #221408; }
.at-item.on { background: #3a2410; color: #f0c060; font-weight: 700; }
.at-ret { color: #8a6838; font-size: 11px; font-style: italic; }
.at-main { flex: 1; overflow-y: auto; padding: 22px 26px; }
.at-empty { color: #6a5230; font-style: italic; margin-top: 40px; text-align: center; }
.at-preview-head { margin-bottom: 16px; }
.at-title { font-size: 20px; font-weight: 800; color: #f0c060; }
.at-key { font-size: 12px; color: #8a6838; font-weight: 400; margin-left: 6px; }
.at-cat2 { font-size: 12.5px; color: #a0824a; margin-top: 2px; }
.at-stage { display: flex; gap: 28px; align-items: flex-end; background: #160e06; border: 1px solid #2a1808; border-radius: 12px; padding: 22px; min-height: 260px; }
.at-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.at-cell-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #8a6838; }
.at-art { display: flex; align-items: flex-end; justify-content: center; }
.at-ref svg { opacity: 0.9; }
.at-swatches { display: flex; gap: 7px; flex-wrap: wrap; margin: 14px 0 4px; }
.at-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #4a3018; cursor: pointer; }
.at-sw.on { border-color: #f0c060; box-shadow: 0 0 0 2px rgba(240,192,96,0.3); }
.at-size-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; color: #c8a060; font-size: 13px; flex-wrap: wrap; }
.at-size-row input[type=range] { flex: 1; max-width: 320px; accent-color: #c08030; }
.at-size-row > span:first-child { width: 50px; }
#at-w-val, #at-h-val { width: 48px; }
.at-rand { background: #2a1808; border: 1px solid #6a4820; color: #ffd27a; border-radius: 7px; padding: 7px 12px; font-size: 13px; font-family: inherit; cursor: pointer; }
.at-rand:hover { background: #3a2410; border-color: #a06828; }
/* Light sprite-editor palette (#370) */
.at-recolor { margin: 14px 0 4px; }
.at-pal { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.at-pal-sw { width: 30px; height: 30px; border-radius: 7px; border: 2px solid #4a3018; overflow: hidden; cursor: pointer; padding: 0; display: inline-flex; }
.at-pal-sw input[type=color] { width: 150%; height: 150%; margin: -25%; border: none; background: none; cursor: pointer; padding: 0; }
.at-ship { max-width: 620px; }
.at-ship-lbl { font-size: 13px; color: #d4b478; font-weight: 700; margin-bottom: 6px; }
.at-ship-lbl span { color: #8a6838; font-weight: 400; }
.at-ta-wrap { position: relative; }
.at-notes { width: 100%; min-height: 90px; background: #1e130a; border: 1px solid #4a3018; border-radius: 8px; padding: 11px; color: #f0e2c4; font-size: 15px; font-family: inherit; resize: vertical; }
.at-notes:focus { outline: none; border-color: #c08030; }
.at-mic { position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; border-radius: 50%; background: #2a1808; border: 1px solid #6a4820; color: #ffd27a; font-size: 17px; cursor: pointer; }
.at-mic.rec { background: #7a1010; border-color: #e05040; }
.at-send { margin-top: 12px; padding: 12px 20px; background: linear-gradient(#3a7a2a, #2e6020); color: #eaffea; border: 1px solid #4a8a2e; border-radius: 9px; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; }
.at-send:disabled { opacity: 0.55; }
.at-status { margin-left: 12px; font-size: 14px; font-weight: 700; }
.at-note { color: #8a6838; font-size: 12px; margin-top: 10px; line-height: 1.5; }

/* ── SPRITE STUDIO (#370 Plan A) ── */
.at-preview-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.at-modes { margin-left: auto; display: flex; gap: 6px; }
.at-mode { background: #221a10; border: 1px solid #5a4020; color: #c8a060; border-radius: 8px; padding: 7px 13px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; }
.at-mode.on { background: #3a2610; border-color: #c08030; color: #ffd27a; }
.ast-wrap { display: flex; gap: 20px; align-items: flex-start; margin: 12px 0 16px; flex-wrap: wrap; }
.ast-current-col { flex: 0 0 auto; }
.ast-current { background: #160e06; border: 1px solid #2a1808; border-radius: 12px; padding: 16px; width: 176px; height: 200px; display: flex; align-items: center; justify-content: center; }
.ast-current svg, .ast-art svg { max-width: 100%; max-height: 100%; height: auto; }
.ast-cands-col { flex: 1; min-width: 280px; }
.ast-grid { display: flex; gap: 14px; flex-wrap: wrap; }
.ast-card { background: #160e06; border: 1px solid #2a1808; border-radius: 12px; padding: 12px; width: 188px; display: flex; flex-direction: column; gap: 7px; }
.ast-card.ast-dropped { opacity: 0.4; }
.ast-art { height: 150px; display: flex; align-items: center; justify-content: center; background: #0e0906; border-radius: 8px; }
.ast-lbl { font-size: 14px; font-weight: 700; color: #f0d8a8; }
.ast-note { font-size: 11.5px; color: #8f8474; line-height: 1.45; }
.ast-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ast-actions .at-rand { padding: 6px 10px; font-size: 12.5px; }
.ast-promote { background: #17330f !important; border-color: #4a8a2e !important; color: #b8f0a0 !important; }
.ast-iter { display: flex; flex-direction: column; gap: 6px; }
.ast-iter .at-notes { min-height: 52px; font-size: 13px; }
.ast-iter .at-send { margin-top: 0; padding: 8px 12px; font-size: 13px; }
.ast-iter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ast-iter-status { margin-left: 0; font-size: 12.5px; }
.ast-empty { color: #8a6840; font-style: italic; line-height: 1.7; padding: 22px; border: 1px dashed #3a2410; border-radius: 10px; }
.ast-request { max-width: 640px; margin-top: 8px; }
.ast-req-row { display: flex; align-items: center; gap: 14px; margin-top: 9px; flex-wrap: wrap; }
.ast-req-row select { background: #1e130a; color: #f0e2c4; border: 1px solid #4a3018; border-radius: 6px; padding: 6px; font-family: inherit; }
.ast-req-row .at-send { margin-top: 0; }
.ast-toggle { display: flex; gap: 8px; margin-bottom: 14px; }
.ast-toggle .at-mode[disabled] { opacity: 0.55; cursor: default; }
.ast-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ast-ref { background: #241505; border: 1px solid #5a3a18; color: #e0b060; border-radius: 6px; padding: 2px 7px; font-size: 11px; font-family: ui-monospace, Menlo, Consolas, monospace; cursor: pointer; white-space: nowrap; }
.ast-ref:hover { border-color: #c08030; color: #ffd27a; }
.ast-delete { color: #e0805a !important; }
.ast-input { width: 100%; background: #1e130a; border: 1px solid #4a3018; border-radius: 8px; padding: 9px 11px; color: #f0e2c4; font-size: 14px; font-family: inherit; margin-bottom: 8px; }
.ast-input:focus { outline: none; border-color: #c08030; }
.at-item-new { color: #ffd27a; font-weight: 700; }

@media (max-width: 700px) { .at-side { width: 44%; } .at-main { padding: 14px; } }

/* ── RARE RUMS (#377 / #378) ── */
.rum-rare-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e02a2a; box-shadow: 0 0 4px rgba(224,42,42,0.7); margin-right: 5px; vertical-align: middle; flex-shrink: 0; }
.rr-rare-tag, .rc-rare-tag { color: #e8b0a0; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rr-rare-tag { min-width: 44px; text-align: right; }
.cbp-rare-note { color: #e8b0a0; font-size: 13px; line-height: 1.5; background: #2a1408; border: 1px solid #6a2820; border-radius: 8px; padding: 10px 12px; text-align: center; }
.tt-prize { color: #a8e090; font-size: 17px; font-weight: 700; margin: 6px 0; display: flex; align-items: center; justify-content: center; gap: 4px; }

/* ── WORLD RUM MAP (#335) — full-screen (#374) ── */
.rm-modal { width: 100vw; max-width: none; height: 100vh; max-height: 100vh; border-radius: 0; display: flex; flex-direction: column; }
.rm-body { padding: 0; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.rm-viewport { position: relative; width: 100%; flex: 1; min-height: 0; overflow: hidden; background: #20516b; border-top: 1px solid #2a1408; touch-action: none; cursor: grab; }
.rm-viewport:active { cursor: grabbing; }
#rm-svg { width: 100%; height: 100%; display: block; }
.rm-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.rm-zoom button { width: 40px; height: 40px; border-radius: 8px; background: rgba(20,12,4,0.82); border: 1px solid #6a4820; color: #ffd27a; font-size: 22px; line-height: 1; cursor: pointer; }
.rm-zoom button:hover { background: rgba(40,24,8,0.92); }
.rm-hint { padding: 10px 14px; color: #b09060; font-size: 12.5px; text-align: center; }
.rc-modal { max-width: 560px; width: 95vw; max-height: 90vh; display: flex; flex-direction: column; }
.rc-hero { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid #2a1408; background: linear-gradient(120deg, #3a2410, #241505); }
.rc-badge { width: 58px; height: 58px; border-radius: 50%; background: #160c04; border: 2px solid #6a4820; display: flex; align-items: center; justify-content: center; font-size: 34px; flex-shrink: 0; overflow: hidden; }
.rc-hero-txt { flex: 1; min-width: 0; }
.rc-name { font-size: 21px; font-weight: 800; color: #f0c060; line-height: 1.1; }
.rc-region2 { font-size: 12px; color: #b09050; text-transform: uppercase; letter-spacing: 0.07em; margin-top: 3px; }
.rc-hero-actions { display: flex; gap: 8px; align-items: center; }
.rc-body { padding: 16px 18px 18px; overflow-y: auto; }
.rc-hist { color: #d6bc80; font-size: 14.5px; line-height: 1.6; margin: 0 0 14px; }
.rc-collect-head { color: #e8c878; font-size: 14px; margin-bottom: 8px; }
.rc-none { color: #b09060; font-style: italic; line-height: 1.55; margin-bottom: 12px; }
.rc-bar { height: 7px; background: #160c04; border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.rc-bar-fill { height: 100%; background: #40c060; border-radius: 4px; }
.rc-rums2 { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.rc-rums2 li { display: flex; align-items: center; gap: 10px; background: #241505; border: 1px solid #3a2410; border-radius: 8px; padding: 9px 11px; }
.rc-rums2 li.have { border-color: #3a5a28; }
.rc-rum-main { display: flex; align-items: flex-start; gap: 9px; flex: 1; min-width: 0; }
.rc-rum-mark { flex-shrink: 0; }
.rc-rum-name { font-size: 14px; color: #e8c878; font-weight: 700; }
.rc-rums2 li.have .rc-rum-name { color: #a8e090; }
.rc-rum-attr { font-size: 12px; color: #a0824a; line-height: 1.4; margin-top: 2px; }
.rc-buy { flex-shrink: 0; background: #7a4a10; color: #f0c060; border: 1px solid #a06820; border-radius: 6px; padding: 7px 11px; font-size: 12.5px; font-weight: 700; font-family: inherit; cursor: pointer; white-space: nowrap; }
.rc-buy.rc-buy-new { background: #2e6020; border-color: #4a8a2e; color: #eaffea; }
.rc-buy:hover:not(:disabled) { filter: brightness(1.12); }
.rc-buy:disabled { opacity: 0.5; cursor: default; }
.rc-breakout { width: 100%; background: #16324a; color: #a8d8f0; border: 1px solid #2a5f80; border-radius: 8px; padding: 11px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; margin-bottom: 10px; }
.rc-breakout:hover { background: #1e4260; }
.rc-body .popup-close { margin-top: 2px; }
.rm-carib-btn { position: absolute; left: 12px; bottom: 12px; background: rgba(20,12,4,0.82); border: 1px solid #6a4820; color: #a8d8f0; border-radius: 8px; padding: 9px 13px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; }
.rm-carib-btn:hover { background: rgba(40,24,8,0.92); }

/* ── RUM CELLAR SHOWCASE — category / country tabs (#336) ── */
.csc-toolbar { flex-shrink: 0; padding: 10px 12px 8px; background: #160e08; border-bottom: 1px solid #3a2410; display: flex; flex-direction: column; gap: 8px; }
.csc-modes { display: flex; gap: 8px; }
.csc-modes .mc-chip { font-size: 13px; padding: 5px 12px; text-transform: none; }
.csc-tabstrip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.csc-tabstrip .mc-chip { white-space: nowrap; flex-shrink: 0; text-transform: none; }
.csc-count { opacity: 0.65; font-size: 10px; }
.csc-content { flex: 1; overflow-y: auto; padding: 18px 20px; background:
  linear-gradient(rgba(14,10,8,0.92),rgba(14,10,8,0.92)),
  repeating-linear-gradient(0deg,#241a12 0 3px,#1c140e 3px 26px); }

/* ── LEI INVENTORY + BIRD PICKER (#310) ── */
.lei-inv-grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.lei-inv-card { background: #1c120a; border: 1px solid #4a3018; border-radius: 10px; padding: 10px; width: 150px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.lei-inv-art { width: 112px; }
.lei-inv-actions { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.lei-inv-actions .game-save-btn, .lei-inv-actions .mc-chip { width: 100%; margin: 0; }
.lei-inv-empty { color: #a08050; font-style: italic; text-align: center; padding: 24px 12px; line-height: 1.5; }
.lei-bird-list { display: flex; flex-direction: column; gap: 8px; }
.lei-bird-choice { display: flex; align-items: center; gap: 12px; background: #1c120a; border: 1px solid #4a3018; border-radius: 8px; padding: 8px 12px; cursor: pointer; color: #e8d8b0; font-family: inherit; font-size: 15px; text-align: left; }
.lei-bird-choice:hover { border-color: #8a5a2a; background: #26180c; }
.lei-bird-sprite { width: 40px; height: 52px; overflow: hidden; flex: none; display: flex; align-items: flex-start; justify-content: center; }
.lei-bird-sprite svg { width: 40px; height: auto; }
.lei-bird-name { font-weight: 600; }

/* ── RENAME HUT MODAL (#167) ──────────────────────────────────────────────────── */
.rh-label { display: block; font-size: 12px; color: #c8a060; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.rh-input {
  width: 100%; padding: 9px 10px; background: #0a0604; border: 1px solid #3a2008;
  border-radius: 6px; color: #e8d8b0; font-size: 15px; font-family: inherit;
}
.rh-input:focus { outline: none; border-color: #7a5020; }
.rh-actions { display: flex; gap: 10px; margin-top: 16px; }

/* Green-tinted lemon standing in for the lime emoji (🍋‍🟩) on platforms that
   can't render the ZWJ sequence as one glyph (see ingEmoji in game.js). */
.lime-fb { display: inline-block; filter: hue-rotate(55deg) saturate(1.5) brightness(0.95); }

/* String lights are a thin strip of tiny bulbs — the art carries an invisible
   oversized hit-rect; overflow:visible lets it extend above/below the strip so
   the whole strand (plus margin) is easy to click and drag. */
.placed-item[data-key="lamp_string"] svg,
.placed-item[data-key="lamp_string_white"] svg {
  overflow: visible;
}

/* ── OPENING MONTAGE ─────────────────────────────────────────────────────── */
#intro-montage {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #e8dcbe;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.9s ease;
}
#intro-montage.mtg-done { opacity: 0; }
#mtg-stage { position: absolute; inset: 0; }
#mtg-svg, #mtg-svg-p { width: 100%; height: 100%; display: block; }
/* Two stacked shots: PROFILE on top first, REAR approach underneath. The pan
   swings the camera behind — profile slides out and fades, rear fades in. */
#mtg-profile, #mtg-rear { position: absolute; inset: 0; }
#mtg-profile {
  z-index: 2; opacity: 1; transform: translateX(0) scale(1);
  transition: opacity 0.85s ease, transform 0.85s ease;
}
#mtg-rear { z-index: 1; opacity: 0; transition: opacity 0.85s ease; }
#intro-montage.mtg-pan #mtg-profile { opacity: 0; transform: translateX(-18%) scale(1.06); }
#intro-montage.mtg-pan #mtg-rear { opacity: 1; }
/* Title over the profile (rowing) shot only — lives inside #mtg-profile so it
   pans/fades out WITH that layer for free when the camera swings behind (no
   separate exit animation needed). Fun tiki display-font stack (Papyrus/
   Luminari/Chalkduster are playful hand-carved-looking faces where available;
   Copperplate + serif carry the tone everywhere else). */
.mtg-title {
  position: absolute;
  left: 0; right: 0; top: 7%;
  text-align: center;
  pointer-events: none;
  z-index: 3;
  font-family: 'Luminari', 'Chalkduster', 'Papyrus', 'Copperplate', Georgia, serif;
  font-size: clamp(22px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f3dfa0;
  text-shadow:
    0 1px 0 #7c5327,
    0 2px 0 #5c3c1c,
    0 3px 5px rgba(47,35,24,0.6),
    0 0 26px rgba(238,224,176,0.35);
  animation: mtgTitleIn 1s ease 0.35s both;
}
@keyframes mtgTitleIn {
  0%   { opacity: 0; transform: translateY(-16px) scale(0.9); }
  65%  { opacity: 1; transform: translateY(2px) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .mtg-title { animation: none; opacity: 1; }
}

#mtg-caption {
  position: absolute;
  left: 0; right: 0; bottom: 40px;
  text-align: center;
  color: #f4ead0;
  font-family: 'Georgia', serif;
  font-size: clamp(15px, 2.6vw, 24px);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 6px rgba(20,12,6,0.7);
  pointer-events: none;
  z-index: 3;
  animation: mtgCapIn 0.9s ease both;
}
@keyframes mtgCapIn { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: none; } }
#mtg-skip {
  position: absolute;
  right: 16px; bottom: 16px;
  z-index: 2;
  background: rgba(42,26,12,0.72);
  color: #ffd27a;
  border: 1px solid #6a4820;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
#mtg-skip:hover { background: rgba(60,38,18,0.9); }

/* All animated montage groups pivot around their own box */
.mtg-bob, .mtg-row, .mtg-paddle, .mtg-oar, .mtg-sway, .mtg-dance, .mtg-bubble, #mtg-land,
.mtg-dolphin-body, .mtg-splash-out, .mtg-splash-in,
.mtg-turtle-walk, .mtg-turtle-face, .mtg-turtle-bob {
  transform-box: fill-box;
}
.mtg-wave {
  animation-name: mtgWave;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}
@keyframes mtgWave { from { transform: translateX(0); } to { transform: translateX(-40px); } }

.mtg-bob {
  transform-origin: 50% 100%;
  animation: mtgBob 2.7s ease-in-out infinite;
}
@keyframes mtgBob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(1deg); }
}

.mtg-row {
  transform-origin: 50% 88%;
  animation: mtgRow 1.15s ease-in-out infinite;
}
@keyframes mtgRow {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.mtg-paddle { transform-origin: 50% 14%; }
.mtg-paddle-l { animation: mtgPaddle 1.15s ease-in-out infinite; }
.mtg-paddle-r { animation: mtgPaddle 1.15s ease-in-out infinite reverse; }
@keyframes mtgPaddle {
  0%, 100% { transform: rotate(-20deg); }
  50% { transform: rotate(22deg); }
}

/* profile-shot rowing oar (side view): dip forward, pull back */
.mtg-oar {
  transform-origin: 50% 6%;
  animation: mtgOar 1.15s ease-in-out infinite;
  animation-delay: var(--oar-delay, 0s);
}
@keyframes mtgOar {
  0%, 100% { transform: rotate(-28deg); }
  50% { transform: rotate(16deg); }
}

/* profile-shot dolphin: one leap arc ahead of the canoe, splash at takeoff and
   re-entry keyed to the same timeline. Default opacity 0 so a reduced-motion
   skip (below) leaves it hidden rather than frozen mid-leap. */
.mtg-dolphin-body, .mtg-splash-out, .mtg-splash-in { opacity: 0; }
.mtg-dolphin-body { animation: mtgDolphinLeap 2.1s ease-in-out 1s 1 both; }
@keyframes mtgDolphinLeap {
  0%   { opacity: 0; transform: translate(0,6px) rotate(-6deg); }
  5%   { opacity: 1; transform: translate(6px,-6px) rotate(0deg); }
  28%  { transform: translate(46px,-64px) rotate(26deg); }
  50%  { transform: translate(80px,-56px) rotate(2deg); }
  72%  { transform: translate(114px,-6px) rotate(-32deg); }
  84%  { opacity: 1; transform: translate(128px,16px) rotate(-54deg); }
  90%, 100% { opacity: 0; transform: translate(130px,18px) rotate(-56deg); }
}
.mtg-splash-out { animation: mtgSplashOut 2.1s ease-out 1s 1 both; }
@keyframes mtgSplashOut {
  0%, 4%    { opacity: 0; transform: scale(0.4); }
  9%        { opacity: 0.85; transform: scale(1); }
  22%, 100% { opacity: 0; transform: scale(1.5); }
}
.mtg-splash-in { animation: mtgSplashIn 2.1s ease-out 1s 1 both; }
@keyframes mtgSplashIn {
  0%, 76%   { opacity: 0; transform: scale(0.4); }
  81%       { opacity: 0.9; transform: scale(1.1); }
  92%, 100% { opacity: 0; transform: scale(1.7); }
}

/* Island turtle: a slow there-and-back amble along the sand (rear/approach
   shot only). Split across three independently-timed layers so nothing has
   to fight over transform order —
   - .mtg-turtle-walk: pure translateX, the actual back-and-forth trek.
   - .mtg-turtle-face: pure scaleX, snapped (steps(1)) exactly at the two
     turning points so it flips to face the way it's about to walk.
   - .mtg-turtle-bob: a quick shell-rock layered on top for a plodding gait.
   All three share one 9s cycle so the flip lands right as translateX's
   ease-in-out settles to ~0 velocity at each end — no visible skate. */
.mtg-turtle-walk { transform-origin: 50% 100%; animation: mtgTurtleWalk 9s ease-in-out infinite; }
@keyframes mtgTurtleWalk { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(54px); } }
.mtg-turtle-face { transform-origin: 50% 100%; animation: mtgTurtleFace 9s steps(1) infinite; }
@keyframes mtgTurtleFace { 0%, 49.9% { transform: scaleX(1); } 50%, 99.9% { transform: scaleX(-1); } }
.mtg-turtle-bob { transform-origin: 50% 100%; animation: mtgTurtleBob 0.9s ease-in-out infinite; }
@keyframes mtgTurtleBob { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(2.5deg); } }

.mtg-sway {
  transform-origin: 50% 100%;
  animation-name: mtgSway;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}
@keyframes mtgSway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

/* The rear-approach beats are GATED: they only start once the camera has panned
   behind the boat (JS adds .rear-go to #mtg-rear at pan time), so their delays
   are relative to the pan, not to page load. Before the pan the island sits far
   and small and the walkers are hidden. */
#mtg-land { transform-origin: 50% 100%; transform: translateY(-52px) scale(0.24); }
#mtg-rear.rear-go #mtg-land { animation: mtgDolly 4.6s ease-in-out both; }
@keyframes mtgDolly {
  0% { transform: translateY(-52px) scale(0.24); }
  100% { transform: translateY(0) scale(1); }
}

/* The SAME crew birds hop out of the canoe onto the sand (one continuous motion —
   no vanish/reappear), drop their paddles, then dance in place until the crossfade.
   All gated by .rear-go so the beats time from the pan. The hop delta is per-bird
   via --hop-dx/--hop-dy. */
/* the boat (and the crew riding it) drift UP to come alongside the shore during
   the approach — gentle, gated so it times from the pan */
#mtg-rear.rear-go .mtg-boat-in { animation: mtgBoatIn 4.6s ease-out both; }
@keyframes mtgBoatIn {
  0%   { transform: translate(-28px, 46px); }
  100% { transform: translate(0, 0); }
}

.mtg-cb, .mtg-oar-hold, .mtg-dance { animation-fill-mode: both; }
#mtg-rear.rear-go .mtg-cb {
  animation-name: mtgHop; animation-duration: 0.7s; animation-timing-function: ease-out;
}
@keyframes mtgHop {
  0%   { transform: translate(0, 0); }
  55%  { transform: translate(calc(var(--hop-dx) * 0.6), calc(var(--hop-dy) - 26px)); }
  100% { transform: translate(var(--hop-dx), var(--hop-dy)); }
}
/* the paddle is dropped (fades) as they climb out */
#mtg-rear.rear-go .mtg-oar-hold { animation-name: mtgFadeAway; animation-duration: 0.4s; animation-timing-function: ease; }
@keyframes mtgFadeAway { 0% { opacity: 1; } 100% { opacity: 0; } }
/* dance: bounce + happy rotate, looping through the ~4s celebration window */
.mtg-dance { transform-origin: 50% 100%; }
#mtg-rear.rear-go .mtg-dance {
  animation-name: mtgDance; animation-duration: 0.7s;
  animation-timing-function: ease-in-out; animation-iteration-count: infinite;
}
@keyframes mtgDance {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30%      { transform: translateY(-9px) rotate(9deg); }
  65%      { transform: translateY(-3px) rotate(-9deg); }
}

/* speech bubbles pop in, hold, pop out */
.mtg-bubble { transform-origin: 50% 100%; opacity: 0; }
#mtg-rear.rear-go .mtg-bubble {
  animation-name: mtgPop; animation-duration: 1.9s;
  animation-timing-function: ease; animation-fill-mode: both;
}
@keyframes mtgPop {
  0%   { opacity: 0; transform: scale(0.5); }
  12%  { opacity: 1; transform: scale(1.05); }
  20%  { transform: scale(1); }
  80%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.9); }
}

@keyframes mtgCapFade {
  0% { opacity: 0; }
  6%, 44% { opacity: 1; }
  52% { opacity: 0; }
  60%, 92% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .mtg-bob, .mtg-row, .mtg-paddle, .mtg-sway, .mtg-wave,
  .mtg-dolphin-body, .mtg-splash-out, .mtg-splash-in,
  .mtg-turtle-walk, .mtg-turtle-face, .mtg-turtle-bob { animation: none; }
}
