/* ==========================================================================
 * Coralbay Cove: Merge Mystery — Plush Stitched Casual UI Vault Styles (`css/game.css`)
 * UI Vault Style: `plush_stitched_casual` (Daylight Tropical Lagoon + Stitched Plush & Jelly 9-Slice)
 * STRICT INVARIANTS:
 *   1. ZERO blur filters (`backdrop-filter: blur`) over WebGL/Canvas anywhere!
 *   2. Genuine 9-slice `border-image` from `assets/ui/vault_plush_stitched_casual/` (>= 22 UI regions).
 *   3. `overflow: visible !important` on all buttons & badged containers; ellipsis ONLY on `.btn-label`.
 *   4. `flex-wrap: nowrap !important` on `#top-hud` & `.hud-cluster`; `minmax(0, 1fr)` on all grids (0 overflow in 9 langs).
 *   5. Readable HUD (`>= 13px`), generous playfield (`>= 42%` single canvas / `~76%` dual split stage), 0 boxed login card.
 * ========================================================================== */

:root {
  --sand-light: #FEF5DF;
  --sand-cream: #FBEBD1;
  --sand-warm: #E9CE9E;
  --driftwood: #A86D44;
  --cedar-deep: #6E3B20;
  --cocoa-ink: #3E2215;
  --lagoon: #38BDF8;
  --lagoon-deep: #0E7490;
  --ocean-ink: #134E6F;
  --emerald: #55D418;
  --gold-sun: #F5B942;
  --coral-pop: #F04B6B;
  --plum-ink: #3E2215;
  --text-dark: #2A160D;
  --text-light: #FFFDF5;

  /* UI Vault Motion Contract v2.2 Tokens (`plush_stitched_casual`) */
  --tb-slot-style: plush_stitched_casual;
  --tb-slot-shape: rect;
  --tb-slot-radius: 22px;
  --tb-slot-chamfer: 0px;
  --tb-slot-inset: 3px 3px 5px 3px;
  --tb-slot-palette: sakura;
  --tb-slot-mode: chaser_slot;
  --tb-slot-daylight: 1;
  --tb-slot-z: 3;
}

*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--ocean-ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
}

/* ==========================================================================
 * Plush Stitched Casual 9-Slice Regions (`assets/ui/vault_plush_stitched_casual/`)
 * ========================================================================== */
.panel-9slice,
.coral-modal-panel,
.modal-card {
  background-color: #FEF5DF;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 20px;
  box-shadow: none;
  border-width: 22px 24px 22px 24px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/frame_modal.png") 68 72 69 72 fill / 22px 24px 22px 24px / 0 stretch;
}

.subpanel-9slice {
  background-color: #FEF5DF;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 14px;
  box-shadow: none;
  border-width: 12px 13px 13px 13px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/frame_subpanel.png") 78 79 82 82 fill / 12px 13px 13px 13px / 0 stretch;
}

/* Tactile Glossy Jelly Buttons (WCAG >= 7:1 Contrast, Red-Dot Safe!) */
button {
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  overflow: visible !important;
  transition: transform 0.1s ease, filter 0.12s ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.94;
  filter: none;
}

button:not(:disabled):hover {
  filter: brightness(1.05);
}

button:not(:disabled):active {
  transform: translateY(2px);
}

.btn-label {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.2;
}

.btn-9slice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 2px 8px;
  background-color: #46AEFF;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 14px;
  box-shadow: none;
  border-width: 8px 13px 9px 13px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/btn_secondary.png") 64 194 87 90 fill / 8px 13px 9px 13px / 0 stretch;
  font-weight: 800;
  font-size: 13.5px;
  color: #101A2C;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-primary {
  background-color: #5CE01E;
  background-clip: padding-box;
  border-image: url("../assets/ui/vault_plush_stitched_casual/btn_primary.png") 65 94 67 90 fill / 8px 13px 9px 13px / 0 stretch;
  color: #182706;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.62);
}

.btn-secondary {
  background-color: #46AEFF;
  background-clip: padding-box;
  border-image: url("../assets/ui/vault_plush_stitched_casual/btn_secondary.png") 64 194 87 90 fill / 8px 13px 9px 13px / 0 stretch;
  color: #101A2C;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-danger {
  background-color: #F46480;
  background-clip: padding-box;
  border-image: url("../assets/ui/vault_plush_stitched_casual/btn_danger.png") 64 84 66 84 fill / 8px 13px 9px 13px / 0 stretch;
  color: #20070E;
  text-shadow: 0 1px 0 rgba(255, 225, 232, 0.55);
}

button.btn-9slice:disabled,
.btn-disabled-state {
  background-color: #C4C9D6 !important;
  background-clip: padding-box !important;
  box-shadow: none !important;
  border-image: url("../assets/ui/vault_plush_stitched_casual/btn_disabled.png") 63 85 82 85 fill / 8px 13px 9px 13px / 0 stretch !important;
  color: #201A28 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

/* Inline Coin / Currency Icon Chip inside CTA Buttons (0 ASCII `30c` Slop!) */
.btn-coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 253, 245, 0.86);
  border: 1.5px solid var(--cocoa-ink);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--cocoa-ink);
  line-height: 1.1;
  flex-shrink: 0;
}

.btn-coin-chip img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Red-Dot Notification Badge — NEVER clipped! */
.notify-badge {
  display: none;
  position: absolute;
  top: -8px;
  right: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #EF4444;
  border: 2.5px solid #FFFDF5;
  z-index: 35;
  pointer-events: none;
  animation: dotPulse 1.6s infinite ease-in-out;
}

.notify-badge.active {
  display: block;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}

/* ==========================================================================
 * Pillar 1: Full-Bleed Sun-Drenched Coralbay Title Screen (`0 BOXED_LOGIN_TITLE_SCREEN`)
 * ========================================================================== */
#title-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 68% 58% at 58% 48%, rgba(12, 42, 62, 0.22) 0%, rgba(12, 42, 62, 0) 75%),
    url("../assets/art/title_bg.jpg") center center / cover no-repeat;
  transition: opacity 0.32s ease;
}

#title-screen.hidden {
  display: none;
}

.title-top-controls {
  position: absolute;
  top: 18px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
}

.lang-pill-select {
  appearance: none;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 8px 14px 9px 14px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/hud_pill.png") 52 63 75 63 fill / 8px 14px 9px 14px / 0 stretch;
  color: var(--cocoa-ink);
  padding: 2px 10px;
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.title-center-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  width: min(1240px, 94vw);
  padding: 16px 24px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.title-hero-showcase {
  position: relative;
  width: clamp(260px, 26vw, 370px);
  height: clamp(320px, 42vh, 470px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}

#title-maya-portrait {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: 50% 94%;
  filter: drop-shadow(0 10px 18px rgba(30, 18, 12, 0.34));
}

/* Strictly 0 Boxed Card around H1! Floating tropical logo lettering + plush CTA */
.title-hero-copy {
  flex: 1;
  min-width: 0;
  max-width: 680px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 8px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-logo-title {
  margin: 0 0 12px;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", "Segoe UI", sans-serif;
  font-weight: 900;
  font-size: clamp(52px, 4.9vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.5px;
  color: #FFFDF2;
  -webkit-text-stroke: 3.5px #4E2A1A;
  paint-order: stroke fill;
  text-shadow:
    0 5px 0 #4E2A1A,
    0 9px 0 #2B140A,
    0 14px 24px rgba(16, 36, 52, 0.55);
}

.game-logo-sub {
  margin: 0 0 22px;
  padding: 6px 22px;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 26px 11px 26px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/ribbon_header.png") 68 156 70 158 fill / 10px 26px 11px 26px / 0 stretch;
  font-weight: 800;
  font-size: clamp(15px, 1.25vw, 19px);
  color: #FFFDF5;
  text-shadow: 0 2px 0 #1A3A5C;
}

.loading-box {
  margin: 0 auto 18px;
  width: min(390px, 100%);
}

.loading-bar-track {
  width: 100%;
  height: 28px;
  border-style: solid;
  border-color: transparent;
  border-width: 8px 10px 8px 10px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/bar_track.png") 61 63 60 61 fill / 8px 10px 8px 10px / 0 stretch;
  overflow: hidden;
  padding: 0;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  min-width: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, #55D418, #38BDF8, #FBBF24);
  transition: width 0.14s ease;
}

.loading-pct-label {
  margin-top: 6px;
  font-weight: 800;
  font-size: 15px;
  color: #FFFDF5;
  text-shadow: 0 2px 4px rgba(20, 12, 8, 0.78);
  font-variant-numeric: tabular-nums;
}

.title-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

#btn-title-play {
  min-width: 248px;
  height: 64px;
  padding: 4px 28px;
  border-width: 14px 22px 15px 22px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/btn_primary.png") 65 94 67 90 fill / 14px 22px 15px 22px / 0 stretch;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #182905;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
  filter: drop-shadow(0 8px 14px rgba(18, 34, 48, 0.42));
}

/* ==========================================================================
 * Pillar 2: Floating Plush Top HUD & Generous Split-Screen Stage (`>= 42%` Board Canvas)
 * ========================================================================== */
#game-workspace {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: url("../assets/art/arena_bg.jpg") center center / cover no-repeat;
}

/* Floating Non-SaaS Top Bar: Transparent Backdrop + Plush Pill Clusters + Single-Row Lock */
#top-hud {
  height: 48px;
  width: 98.8vw;
  max-width: 1900px;
  margin: 4px auto 3px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap !important;
  gap: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: 25;
  overflow: visible;
}

.hud-cluster {
  display: flex;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 7px;
  min-width: 0;
  overflow: visible;
}

.hud-stats-cluster {
  gap: 10px;
}

.hud-stat-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 8px 0 4px;
  background-color: #FEF5DF;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 14px;
  border-width: 8px 11px 9px 11px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/hud_pill.png") 52 63 75 63 fill / 8px 11px 9px 11px / 0 stretch;
  color: var(--cocoa-ink);
  font-weight: 800;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: visible !important;
}

.hud-stat-pill img,
.hud-stat-pill .hud-pop-icon {
  width: 28px;
  height: 28px;
  margin: -6px 2px -6px -10px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 2px rgba(46, 24, 12, 0.32));
}

.hud-sub-timer {
  font-size: 13px;
  font-weight: 800;
  color: #0F6A48;
  margin-left: 2px;
}

.xp-mini-bar {
  width: 48px;
  height: 9px;
  background: rgba(62, 34, 21, 0.22);
  border: 1px solid rgba(62, 34, 21, 0.45);
  border-radius: 5px;
  overflow: hidden;
}

.xp-mini-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #55D418, #22C55E);
}

.hud-action-btn {
  height: 38px;
  padding: 0 8px;
  font-size: 13px;
  flex-shrink: 0;
}

.hud-action-btn img {
  width: 21px;
  height: 21px;
  margin-left: -3px;
  object-fit: contain;
  flex-shrink: 0;
}

.hud-action-btn.x2-active {
  border-image: url("../assets/ui/vault_plush_stitched_casual/btn_primary.png") 65 94 67 90 fill / 8px 13px 9px 13px / 0 stretch;
}

/* Main Split-Screen Stage (`58%` Left Merge + `42%` Right Live Resort Island, `>= 98.8vw`) */
#split-stage {
  flex: 1;
  min-height: 0;
  width: 98.8vw;
  max-width: 1900px;
  margin: 0 auto 5px;
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  gap: 8px;
}

/* Left Column: 4 Guest Orders + 7x9 Board + Inspector/Stash */
#left-merge-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  min-height: 0;
}

/* 4-Slot Guest Order Tray (Plush Stitched Rarity Cards) */
#orders-tray {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  min-height: 82px;
}

.order-card {
  position: relative;
  min-width: 0;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 9px 10px 9px 10px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_common.png") 58 63 60 61 fill / 9px 10px 9px 10px / 0 stretch;
  padding: 2px 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  overflow: visible;
}

.order-card.ready {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_rare.png") 69 73 71 74 fill / 9px 10px 9px 10px / 0 stretch;
}

.order-card.special {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_epic.png") 52 67 53 74 fill / 9px 10px 9px 10px / 0 stretch;
}

.order-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.order-portrait {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sand-warm);
  border: 2px solid var(--cocoa-ink);
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
}

.order-meta {
  flex: 1;
  min-width: 0;
}

.order-guest-name {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.1;
  color: var(--cocoa-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-reward-line {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.1;
  color: #7C3A12;
}

.order-reward-line img {
  width: 16px;
  height: 16px;
}

.order-reqs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
}

.order-req-items {
  display: flex;
  align-items: center;
  gap: 4px;
}

.req-slot {
  position: relative;
  width: 34px;
  height: 34px;
  background-color: #FEF5DF;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 8px;
  border-width: 4px 4px 5px 4px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/slot_tile.png") 52 60 68 53 fill / 4px 4px 5px 4px / 0 stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.req-slot.met {
  outline: 2px solid #16A34A;
  border-radius: 8px;
}

.req-slot img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.req-tier-tag {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: var(--cocoa-ink);
  color: #FFFDF5;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 5px;
  z-index: 2;
}

.order-deliver-btn {
  height: 28px;
  padding: 0 7px;
  border-width: 6px 10px 7px 10px;
  font-size: 13px;
}

/* Center Board Row: 7x9 Canvas + Compact Round-5 Booster Rail */
#board-stage-row {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 6px;
}

#board-canvas-wrap {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  background: transparent;
  border: none;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#board-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* Round 5 Golden Ratio Boosters: 74x74px, icon 60% height, 0 width when all boosters hidden! */
#booster-rail {
  width: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

#booster-rail:not(:has(.booster-btn:not([hidden]):not([style*="display: none"]))) {
  display: none;
}

.booster-btn {
  width: 74px;
  height: 74px;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 9px 10px 11px 9px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/slot_tile.png") 52 60 68 53 fill / 9px 10px 11px 9px / 0 stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 2px;
  overflow: visible !important;
}

.booster-btn.armed {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_epic.png") 52 67 53 74 fill / 9px 10px 11px 9px / 0 stretch;
}

.booster-btn img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.booster-count {
  position: absolute;
  bottom: -6px;
  right: -4px;
  background: var(--cocoa-ink);
  color: #FFFDF5;
  border: 1.5px solid #FFFDF5;
  border-radius: 8px;
  padding: 0 5px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
}

.hotkey-chip {
  position: absolute;
  top: -6px;
  left: -5px;
  background: var(--cocoa-ink);
  color: #FFFDF5;
  font-size: 12.5px;
  font-weight: 800;
  padding: 0 5px;
  border-radius: 6px;
  line-height: 1.15;
}

/* Bottom Inspector + Chain Focus Bias + Single-Row Stash Dock */
#bottom-dock-bar {
  min-height: 52px;
  background-color: #FEF5DF;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 14px;
  border-width: 8px 11px 9px 11px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/frame_subpanel.png") 78 79 82 82 fill / 8px 11px 9px 11px / 0 stretch;
  padding: 2px 6px;
  display: grid;
  grid-template-columns: minmax(0, 48fr) minmax(0, 52fr);
  gap: 6px;
  align-items: center;
}

#inspector-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.inspector-info {
  min-width: 0;
  flex: 1 1 auto;
}

.inspector-title {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.15;
  color: var(--cocoa-ink);
  white-space: normal;
  overflow-wrap: break-word;
}

.inspector-sub {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--cedar-deep);
  white-space: normal;
  overflow-wrap: break-word;
}

.inspector-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.inspector-actions button {
  height: 30px;
  padding: 0 7px;
  border-width: 6px 10px 7px 10px;
  font-size: 13px;
}

#stash-strip {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  gap: 4px;
  min-width: 0;
}

#stash-strip::-webkit-scrollbar {
  display: none;
}

.stash-slot {
  width: clamp(30px, 2.15vw, 38px);
  height: clamp(30px, 2.15vw, 38px);
  flex-shrink: 0;
  border-style: solid;
  border-color: transparent;
  border-width: 6px 6px 7px 6px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/slot_tile.png") 52 60 68 53 fill / 6px 6px 7px 6px / 0 stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}

.stash-slot img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.stash-slot .stash-tier {
  position: absolute;
  bottom: -3px;
  right: -3px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  background: var(--cocoa-ink);
  color: #FFFDF5;
  padding: 1px 3px;
  border-radius: 4px;
}

/* Right Column: Live 5-Zone Resort Island + 3-Style Decor Picker */
#right-resort-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 0;
}

#zone-tabs-bar {
  display: flex;
  align-items: center;
  gap: 5px;
}

.zone-tab-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 34px;
  padding: 0 5px;
  background-color: #FEF5DF;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 12px;
  border-width: 6px 8px 7px 8px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/hud_pill.png") 52 63 75 63 fill / 6px 8px 7px 8px / 0 stretch;
  font-size: 13px;
  font-weight: 800;
  color: var(--cocoa-ink);
}

.zone-tab-btn:not(.locked) {
  flex: 2.1 1 auto;
}

.zone-tab-btn.active {
  border-image: url("../assets/ui/vault_plush_stitched_casual/tab_active.png") 55 41 34 47 fill / 8px 10px 7px 10px / 0 stretch;
  color: #240814;
}

#island-canvas-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  border-radius: 20px;
  border: 3px solid var(--cocoa-ink);
  overflow: hidden;
  background: #249197;
  box-shadow: 0 5px 0 rgba(62, 34, 21, 0.28);
}

#island-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#island-canvas:active {
  cursor: grabbing;
}

.island-overlay-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  background: rgba(42, 22, 13, 0.86);
  color: #FFFDF5;
  border: 1.5px solid rgba(255, 253, 245, 0.45);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
}

/* Renovation & 3-Style Decor Picker Panel */
#renovation-panel {
  border-style: solid;
  border-color: transparent;
  border-width: 11px 13px 12px 13px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/frame_subpanel.png") 78 79 82 82 fill / 11px 13px 12px 13px / 0 stretch;
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reno-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reno-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--cocoa-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reno-reward-tag {
  font-weight: 800;
  font-size: 13px;
  color: var(--lagoon-deep);
  white-space: nowrap;
}

.decor-picker-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.decor-style-btn {
  min-width: 0;
  height: 34px;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 7px 10px 8px 10px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/hud_pill.png") 52 63 75 63 fill / 7px 10px 8px 10px / 0 stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--cocoa-ink);
}

.decor-style-btn.selected {
  border-image: url("../assets/ui/vault_plush_stitched_casual/btn_primary.png") 65 94 67 90 fill / 7px 10px 8px 10px / 0 stretch;
  color: #182905;
}

.style-swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--cocoa-ink);
  flex-shrink: 0;
}

.reno-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reno-coin-progress {
  flex: 1;
  height: 24px;
  border-style: solid;
  border-color: transparent;
  border-width: 6px 8px 6px 8px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/bar_track.png") 61 63 60 61 fill / 6px 8px 6px 8px / 0 stretch;
  overflow: hidden;
  position: relative;
}

.reno-coin-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, #FBBF24, #55D418);
  transition: width 0.22s ease;
}

.reno-coin-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #FFFDF5;
  text-shadow: 0 1px 3px rgba(24, 12, 6, 0.9), 0 0 6px rgba(24, 12, 6, 0.7);
}

/* ==========================================================================
 * Collapsible Mystery Story & Clue Drawer (`[J]` — Non-Blocking Plush Modal)
 * ========================================================================== */
#story-drawer {
  position: fixed;
  top: 58px;
  right: 12px;
  bottom: 12px;
  width: min(448px, 92vw);
  background-color: #FEF5DF;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 20px;
  border-width: 20px 22px 20px 22px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/frame_modal.png") 68 72 69 72 fill / 20px 22px 20px 22px / 0 stretch;
  filter: drop-shadow(-8px 8px 14px rgba(30, 16, 10, 0.34));
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 10px;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(115%);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.26s;
}

#story-drawer.open {
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drawer-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--cocoa-ink);
}

#story-chapters-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.story-ch-pill {
  height: 32px;
  padding: 0 4px;
  font-size: 12.5px;
  font-weight: 800;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 6px 8px 7px 8px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/hud_pill.png") 52 63 75 63 fill / 6px 8px 7px 8px / 0 stretch;
  color: var(--cocoa-ink);
}

.story-ch-pill.active {
  border-image: url("../assets/ui/vault_plush_stitched_casual/tab_active.png") 55 41 34 47 fill / 7px 8px 6px 8px / 0 stretch;
  color: #240814;
}

.story-ch-pill.locked {
  opacity: 0.65;
}

#story-dialogue-stage {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.story-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.story-ch-heading {
  font-weight: 800;
  font-size: 15px;
  color: var(--cocoa-ink);
}

.story-free-badge {
  background: #D1FAE5;
  color: #065F46;
  border: 1.5px solid #059669;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.story-clue-polaroid {
  border-style: solid;
  border-color: transparent;
  border-width: 10px 12px 10px 12px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/frame_subpanel.png") 78 79 82 82 fill / 10px 12px 10px 12px / 0 stretch;
  padding: 4px 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.dialogue-turns-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialogue-turn {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.dialogue-portrait {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--sand-warm);
  border: 2px solid var(--cocoa-ink);
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
}

.dialogue-bubble {
  flex: 1;
  min-width: 0;
  background: #FFFDF5;
  border: 2px solid var(--cocoa-ink);
  border-radius: 14px;
  padding: 7px 10px;
}

.dialogue-speaker {
  font-weight: 800;
  font-size: 13px;
  color: var(--ocean-ink);
  margin-bottom: 2px;
}

.dialogue-line {
  font-size: 13px;
  line-height: 1.35;
}

.story-actions-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

/* ==========================================================================
 * Full-Screen Modals (Zero Blur Scrim + Plush Stitched Modal Frames & Ribbons)
 * ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(28, 18, 24, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

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

.modal-card,
.coral-modal-panel {
  width: min(1020px, 94vw);
  max-height: 89vh;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
  filter: drop-shadow(0 12px 22px rgba(20, 12, 8, 0.48));
}

.modal-card.compact,
.coral-modal-panel.compact {
  width: min(580px, 92vw);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-header h2,
.celebration-ribbon-title {
  margin: 0;
  display: inline-block;
  padding: 2px 18px;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 26px 11px 26px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/ribbon_header.png") 68 156 70 158 fill / 10px 26px 11px 26px / 0 stretch;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 900;
  color: #FFFDF5;
  -webkit-text-stroke: 1.8px #2A160D;
  paint-order: stroke fill;
  text-shadow: 0 2px 0 #2A160D;
}

.modal-close-btn {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: none;
  border-image: none;
  background: url("../assets/ui/vault_plush_stitched_casual/btn_close.png") center center / contain no-repeat;
  color: transparent;
  font-size: 0;
}

.modal-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 6px 4px 2px;
}

/* Illustrated Shop Grid (`5x2` Symmetrical 60/25/15 Plush Rarity Cards) */
.shop-utility-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.shop-utility-strip > * {
  min-width: 0;
  max-width: 100%;
}

#shop-packs-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 8px 4px;
}

#shop-packs-grid > * {
  min-width: 0;
  max-width: 100%;
}

.shop-pack-card {
  position: relative;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 12px 12px 12px 12px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_common.png") 58 63 60 61 fill / 12px 12px 12px 12px / 0 stretch;
  padding: 6px 4px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  overflow: visible;
}

.shop-card-rare {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_rare.png") 69 73 71 74 fill / 12px 12px 12px 12px / 0 stretch;
}
.shop-card-epic {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_epic.png") 52 67 53 74 fill / 12px 12px 12px 12px / 0 stretch;
}
.shop-card-legendary {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_legendary.png") 56 57 58 57 fill / 12px 12px 12px 12px / 0 stretch;
}

.shop-badge {
  position: absolute;
  top: -16px;
  right: 2px;
  background: #F59E0B;
  color: #1C1208;
  border: 2px solid var(--cocoa-ink);
  border-radius: 9px;
  padding: 1px 7px;
  font-size: 11.5px;
  font-weight: 900;
  z-index: 6;
}

.shop-art-wrap {
  width: 100%;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-pack-img {
  width: 100%;
  height: 106px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(42, 22, 13, 0.22));
}

.shop-pack-title {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.15;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cocoa-ink);
  width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
}

.shop-pack-desc {
  font-size: 13px;
  line-height: 1.2;
  color: var(--text-dark);
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

.shop-buy-btn {
  width: 100%;
  margin-top: auto;
  height: 36px;
  font-size: 14px;
}

.giftcode-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.giftcode-bar input {
  flex: 1;
  height: 38px;
  border-radius: 12px;
  border: 2px solid var(--cocoa-ink);
  padding: 0 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  background: #FFFDF5;
  color: var(--cocoa-ink);
  user-select: text;
  -webkit-user-select: text;
}

/* Discovery Album, Daily Stamps & Festival Pass Visual Cards */
#album-milestones-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.album-chain-block {
  margin-bottom: 10px;
  border-style: solid;
  border-color: transparent;
  border-width: 11px 12px 11px 12px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/frame_subpanel.png") 78 79 82 82 fill / 11px 12px 11px 12px / 0 stretch;
  padding: 4px 6px;
}

.album-chain-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--cocoa-ink);
  margin-bottom: 6px;
}

.album-tier-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.album-tier-slot {
  position: relative;
  height: 54px;
  border-style: solid;
  border-color: transparent;
  border-width: 6px 7px 7px 6px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/slot_tile.png") 52 60 68 53 fill / 6px 7px 7px 6px / 0 stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-tier-slot.unknown img {
  filter: brightness(0) opacity(0.25);
}

.album-tier-slot img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.album-tier-slot .tier-num {
  position: absolute;
  bottom: 0;
  right: 2px;
  font-size: 12px;
  font-weight: 800;
  color: var(--cocoa-ink);
}

#daily-stamps-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 4px 0;
}

.daily-stamp-card {
  min-width: 0;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 10px 10px 10px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_common.png") 58 63 60 61 fill / 10px 10px 10px 10px / 0 stretch;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.daily-stamp-card.ready {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_legendary.png") 56 57 58 57 fill / 10px 10px 10px 10px / 0 stretch;
}

.daily-day-tag,
.daily-amt {
  font-size: 13px;
  font-weight: 800;
  color: var(--cocoa-ink);
}

/* Seaside Festival Passes (`4x2` Visual Crate Cards — 0 Imageless Rows!) */
#pass-tabs-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pass-tab-btn {
  height: 38px;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 8px 12px 9px 12px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/hud_pill.png") 52 63 75 63 fill / 8px 12px 9px 12px / 0 stretch;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--cocoa-ink);
}

.pass-tab-btn.active {
  border-image: url("../assets/ui/vault_plush_stitched_casual/tab_active.png") 55 41 34 47 fill / 9px 12px 8px 12px / 0 stretch;
  color: #240814;
}

#pass-tiers-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 6px 2px;
}

.pass-tier-card {
  position: relative;
  min-width: 0;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 11px 11px 11px 11px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_common.png") 58 63 60 61 fill / 11px 11px 11px 11px / 0 stretch;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
}

.pass-tier-card.reached {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_rare.png") 69 73 71 74 fill / 11px 11px 11px 11px / 0 stretch;
}

.pass-tier-card.grand {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_legendary.png") 56 57 58 57 fill / 11px 11px 11px 11px / 0 stretch;
}

.pass-tier-art {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.pass-tier-badge {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--cocoa-ink);
}

.pass-dual-btns {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.pass-dual-btns button {
  height: 32px;
  padding: 0 4px;
  border-width: 6px 8px 7px 8px;
  font-size: 12.5px;
}

/* Pillar 6: Icon Settings Modal */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 8px;
  border-style: solid;
  border-color: transparent;
  border-width: 9px 11px 9px 11px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/frame_subpanel.png") 78 79 82 82 fill / 9px 11px 9px 11px / 0 stretch;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--cocoa-ink);
}

.settings-label-grp {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-label-grp img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.settings-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-controls input[type="range"] {
  width: 118px;
  accent-color: #22C55E;
  cursor: pointer;
}

.settings-toggle-pill {
  min-width: 64px;
  height: 34px;
}

.settings-grid-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.settings-vault-note {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: var(--cedar-deep);
  margin: 8px 0 4px;
}

/* Pillar 6: 3-Star Sunburst Celebration & Chest Reveal */
.celebration-sunburst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 340px;
  margin-left: -170px;
  margin-top: -190px;
  background: url("../js/ui_motion/textures/tex_sunburst_rays.png") center center / contain no-repeat;
  opacity: 0.42;
  pointer-events: none;
  z-index: 0;
  animation: sunburstSpin 14s linear infinite;
}

@keyframes sunburstSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.celebration-stars-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px auto 0;
}

#celebration-chest-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

#celebration-chest-img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  cursor: pointer;
}

.chest-jiggle {
  animation: chestShake 0.24s infinite alternate ease-in-out;
}

@keyframes chestShake {
  0% { transform: scale(1.06, 0.94) rotate(-5deg); }
  100% { transform: scale(0.95, 1.06) rotate(5deg); }
}

#celebration-rewards-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.reward-pop-card {
  border-style: solid;
  border-color: transparent;
  border-width: 10px 10px 10px 10px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_legendary.png") 56 57 58 57 fill / 10px 10px 10px 10px / 0 stretch;
  padding: 6px;
  text-align: center;
}

.reward-pop-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.rw-amt {
  font-weight: 900;
  font-size: 18px;
  color: var(--cocoa-ink);
}

.rw-sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--cedar-deep);
}

/* ==========================================================================
 * Pillar 3: Visual Spotlight Ring + Animated Pointer Hand (`tut-hand`) + 3-Icon Flow Strip
 * ========================================================================== */
#tutorial-target-ring.tut-spotlight {
  position: fixed;
  display: none;
  border: 4px solid #FDE047;
  border-radius: 20px;
  box-shadow:
    0 0 0 3px #4E2A1A,
    inset 0 0 0 2px rgba(255, 255, 255, 0.78);
  pointer-events: none;
  z-index: 78;
  animation: tutRingPulse 1.15s ease-in-out infinite;
}

@keyframes tutRingPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

#tut-hand.tut-hand {
  position: fixed;
  display: none;
  width: 52px;
  height: 52px;
  pointer-events: none;
  z-index: 81;
  filter: drop-shadow(0 5px 8px rgba(30, 16, 8, 0.45));
  animation: tutHandTap 0.9s ease-in-out infinite;
}

@keyframes tutHandTap {
  0%, 100% { transform: translate(0, 0) rotate(-14deg) scale(1); }
  45% { transform: translate(-6px, -8px) rotate(-10deg) scale(0.92); }
}

#tutorial-bar.tut-coachmark {
  position: fixed;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 3px 10px;
  background-color: #FEF5DF;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 14px;
  border-width: 9px 14px 10px 14px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/hud_pill.png") 52 63 75 63 fill / 9px 14px 10px 14px / 0 stretch;
  filter: drop-shadow(0 6px 12px rgba(30, 16, 8, 0.36));
  z-index: 80;
}

#tutorial-bar.tut-coachmark.active {
  display: inline-flex;
}

.tut-cue-label {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: var(--cocoa-ink);
  white-space: nowrap;
}

.tut-skip-btn {
  height: 28px;
  padding: 0 8px;
  border-width: 6px 10px 7px 10px;
  font-size: 13px;
}

/* 3-Icon Visual Feature Guide Strip (`[Icon 1] -> [Icon 2] -> [Icon 3]`, <= 4 words/step) */
.fg-flow-banner {
  position: fixed;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 125;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-style: solid;
  border-color: transparent;
  border-width: 14px 16px 14px 16px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/frame_modal.png") 68 72 69 72 fill / 14px 16px 14px 16px / 0 stretch;
  filter: drop-shadow(0 10px 18px rgba(24, 12, 6, 0.42));
}

.fg-step-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 92px;
  text-align: center;
}

.fg-step-pill img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.fg-step-pill span {
  font-size: 13px;
  font-weight: 800;
  color: var(--cocoa-ink);
  white-space: nowrap;
}

.fg-arrow {
  font-size: 20px;
  font-weight: 900;
  color: var(--cedar-deep);
}

/* Cheer Banner, Toast & Preview Debug */
#fever-cutin-toast {
  position: fixed;
  top: 64px;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -240%);
  border-style: solid;
  border-color: transparent;
  border-width: 10px 14px 10px 14px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/hud_pill.png") 52 63 75 63 fill / 10px 14px 10px 14px / 0 stretch;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 85;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

#fever-cutin-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

#fever-cutin-toast img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--cocoa-ink);
  object-fit: cover;
}

#hud-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #3E2215;
  color: #FFFDF5;
  border: 2px solid #F5B942;
  border-radius: 14px;
  padding: 8px 18px;
  font-weight: 800;
  font-size: 14px;
  z-index: 130;
  display: none;
  pointer-events: none;
}

#dev-f2-pill {
  position: fixed;
  bottom: 8px;
  right: 10px;
  z-index: 140;
  background: rgba(20, 18, 31, 0.88);
  color: #55D418;
  border: 1.5px solid #55D418;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 800;
}

#debug-panel {
  position: fixed;
  bottom: 40px;
  right: 10px;
  width: 280px;
  z-index: 140;
  background: rgba(20, 18, 31, 0.95);
  color: #FFFDF5;
  border: 2px solid #55D418;
  border-radius: 14px;
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 6px;
}

#debug-panel.open {
  display: flex;
}

/* ==========================================================================
 * Consolidated 3-Season Expansion Hub (`3x2` Plush Rarity Cards — `60/25/15`)
 * ========================================================================== */
.sm-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sm-tab-btn {
  height: 40px;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 8px 12px 9px 12px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/hud_pill.png") 52 63 75 63 fill / 8px 12px 9px 12px / 0 stretch;
  color: var(--cocoa-ink);
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
}

.sm-tab-btn.active {
  border-image: url("../assets/ui/vault_plush_stitched_casual/tab_active.png") 55 41 34 47 fill / 9px 12px 8px 12px / 0 stretch;
  color: #240814;
}

.sm-tab-btn.locked {
  opacity: 0.85;
}

.sm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 6px 4px;
}

.season-card {
  position: relative;
  min-width: 0;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 12px 13px 12px 13px;
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_common.png") 58 63 60 61 fill / 12px 13px 12px 13px / 0 stretch;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  overflow: visible;
}

.sm-rarity-rare {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_rare.png") 69 73 71 74 fill / 12px 13px 12px 13px / 0 stretch;
}
.sm-rarity-epic {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_epic.png") 52 67 53 74 fill / 12px 13px 12px 13px / 0 stretch;
}
.sm-rarity-legendary {
  border-image: url("../assets/ui/vault_plush_stitched_casual/card_legendary.png") 56 57 58 57 fill / 12px 13px 12px 13px / 0 stretch;
}

.sm-art-box {
  width: 100%;
  height: 116px;
  border-radius: 12px;
  background: rgba(255, 253, 245, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sm-art-img {
  width: 100%;
  height: 114px;
  object-fit: contain;
  display: block;
}

.sm-title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
  color: var(--cocoa-ink);
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sm-tag {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.15;
  color: var(--ocean-ink);
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sm-chips {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sm-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 253, 245, 0.92);
  border: 1.5px solid var(--driftwood);
  border-radius: 9px;
  padding: 2px 7px;
  font-weight: 800;
  font-size: 13px;
  color: var(--cocoa-ink);
}

.sm-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.sm-act-btn {
  width: 100%;
  height: 36px;
  margin-top: 2px;
  font-size: 13.5px;
}

.inspector-chain-strip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
  margin-left: 4px;
}

.inspector-chain-strip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
  background: #FFFDF5;
  border: 1px solid var(--driftwood);
}

.inspector-chain-strip img.cur-tier {
  border: 2px solid #059669;
  background: #D1FAE5;
}

/* ==========================================================================
 * 9-Language 1280x720 Responsive Single-Row HUD & Generous Playfield Guard
 * ========================================================================== */
@media (max-width: 1540px) {
  #top-hud {
    height: 44px;
    margin: 2px auto 2px;
    padding: 0 4px;
    gap: 4px;
  }
  .hud-cluster {
    gap: 4px;
  }
  .hud-stats-cluster {
    gap: 6px;
  }
  .hud-stat-pill {
    height: 34px;
    padding: 0 5px 0 2px;
    border-width: 7px 9px 8px 9px;
    gap: 3px;
    font-size: 13px;
  }
  .hud-stat-pill img,
  .hud-stat-pill .hud-pop-icon {
    width: 22px;
    height: 22px;
    margin: -4px 1px -4px -7px;
  }
  .xp-mini-bar {
    width: 28px;
  }
  .hud-action-btn {
    height: 34px;
    padding: 0 4px;
    border-width: 6px 9px 7px 9px;
    gap: 3px;
    font-size: 13px;
    max-width: 92px;
  }
  .hud-action-btn img {
    width: 17px;
    height: 17px;
    margin-left: -2px;
  }
  .hud-opt-label {
    display: none;
  }
  #orders-tray {
    min-height: 70px;
    gap: 5px;
  }
  .order-portrait {
    width: 28px;
    height: 28px;
  }
  #split-stage {
    grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
    gap: 6px;
  }
  .req-slot {
    width: 30px;
    height: 30px;
    border-width: 3px;
  }
  .req-slot img {
    width: 24px;
    height: 24px;
  }
  #bottom-dock-bar {
    min-height: 46px;
    padding: 1px 4px;
  }
  #renovation-panel {
    padding: 2px 4px;
    gap: 4px;
  }
  .decor-style-btn {
    height: 30px;
  }
  #booster-rail {
    width: 68px;
  }
  .booster-btn {
    width: 68px;
    height: 68px;
  }
  .booster-btn img {
    width: 40px;
    height: 40px;
  }
}
