/* ============================================================================
 * css/game.css — Brioche Boulevard (UI Vault: cozy_stationery_craft · Rounds 5-9)
 * Hand-inked Cream Stationery (#FBF2DF), Honey Wood, Cocoa Ink (#5C382B / #3A241B)
 * STRICT INVARIANTS:
 *   - 25+ Genuine 9-Slice UI Regions from `assets/ui/vault_cozy_stationery_craft/`
 *   - ZERO old defective sticker-overlapping Diffusion buttons (`assets/ui/btn_*.png`)
 *   - Full-Bleed Unboxed Title Screen (0 BOXED_LOGIN_TITLE_SCREEN)
 *   - ZERO backdrop-filter: blur(...) over canvas, ZERO shadowBlur
 *   - overflow: visible !important on buttons (.notify-badge & pop-out icons never clip)
 *   - flex-wrap: nowrap !important on #top-command-bar at 1920x1080 & 1280x720
 * ============================================================================ */

:root {
  --cream-bg: #F5E9D1;
  --parchment: #FBF2DF;
  --parchment-card: #F9EFDA;
  --parchment-warm: #F8DFB7;
  --ink: #3A241B;
  --cocoa: #5C382B;
  --caramel: #F9CC90;
  --honey: #D59B65;
  --brioche: #8C4E2B;
  --latte: #D2B896;
  --sage: #83B84E;
  --sky: #68B2D8;
  --rose: #CF5C52;
  --font-display: 'Fredoka', 'M PLUS Rounded 1c', 'Trebuchet MS', sans-serif;
  --font-body: 'Quicksand', 'Segoe UI', sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--cream-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ----------------------------------------------------------------------------
 * 1. GENUINE UI VAULT 9-SLICE SURFACES (`vault_cozy_stationery_craft`)
 * ---------------------------------------------------------------------------- */
.panel-9slice {
  background-color: #F8ECD5;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 16px 17px 16px 17px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/frame_modal.png') 44 46 45 46 fill / 16px 17px 16px 17px / 0 stretch;
  border-radius: 14px;
  box-shadow: none;
  color: var(--ink);
}

.subpanel-9slice {
  background-color: #F8E2BC;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 13px 12px 13px 12px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/frame_subpanel.png') 63 57 63 60 fill / 13px 12px 13px 12px / 0 stretch;
  border-radius: 12px;
  color: var(--ink);
}

.pill-9slice {
  background-color: #F8DFB7;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 9px 15px 9px 15px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/hud_pill.png') 69 98 67 97 fill / 9px 15px 9px 15px / 0 stretch;
  border-radius: 14px;
  color: var(--ink);
}

.ribbon-9slice {
  background-color: #F7DCB1;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 13px 22px 13px 22px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/ribbon_header.png') 66 85 66 90 fill / 13px 22px 13px 22px / 0 stretch;
  border-radius: 12px;
  color: var(--ink);
}

.slot-9slice {
  background-color: #EFD6AD;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/slot_tile.png') 57 55 58 55 fill / 10px / 0 stretch;
  border-radius: 10px;
}

.card-common-9slice {
  background-color: #F9EFDA;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 9px 10px 9px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_common.png') 44 37 43 41 fill / 10px 9px 10px 9px / 0 stretch;
  border-radius: 12px;
}

.card-rare-9slice {
  background-color: #F9EFDA;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 9px 10px 9px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_rare.png') 44 38 43 38 fill / 10px 9px 10px 9px / 0 stretch;
  border-radius: 12px;
}

.card-epic-9slice {
  background-color: #F9EFDA;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 9px 10px 9px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_epic.png') 44 37 41 40 fill / 10px 9px 10px 9px / 0 stretch;
  border-radius: 12px;
}

.card-legendary-9slice {
  background-color: #F9EFDA;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 9px 10px 9px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_legendary.png') 44 39 43 39 fill / 10px 9px 10px 9px / 0 stretch;
  border-radius: 12px;
}

/* ----------------------------------------------------------------------------
 * 2. 4+ GENUINE 9-SLICE BUTTON STATES (Green / Blue / Amber / Coral / Locked)
 * ---------------------------------------------------------------------------- */
button {
  font-family: var(--font-display);
  cursor: pointer;
  position: relative;
  overflow: visible !important;
  color: #1F1815;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 0.12s ease, filter 0.12s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.btn-label {
  display: inline-block;
  font-weight: 700;
  white-space: nowrap;
}

.btn-9slice {
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 12px;
  box-shadow: none;
  min-height: 36px;
  padding: 2px 8px;
}

/* State 1: Matcha Green Primary (`btn_primary.png`) */
.btn-primary,
.btn-primary-alt {
  background-color: #95B853;
  border-width: 9px 11px 9px 11px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_primary.png') 50 53 49 54 fill / 9px 11px 9px 11px / 0 stretch;
  color: #1E2B12;
}

/* State 2: Sky Blue Secondary (`btn_secondary.png`) */
.btn-secondary,
.btn-cozy-pill {
  background-color: #66B3DE;
  border-width: 9px 11px 9px 11px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_secondary.png') 50 54 49 53 fill / 9px 11px 9px 11px / 0 stretch;
  color: #162634;
}

/* State 3: Honey Amber Craft (`hud_pill.png` / `ribbon_header.png`) */
.btn-amber,
.btn-rush-gauge {
  background-color: #F8DFB7;
  border-width: 9px 13px 9px 13px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/hud_pill.png') 69 98 67 97 fill / 9px 13px 9px 13px / 0 stretch;
  color: #3A241B;
}

.btn-amber.rush-live,
.btn-rush-gauge.rush-live {
  background-color: #DB6653;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_danger.png') 49 52 50 52 fill / 9px 11px 9px 11px / 0 stretch;
  color: #24120F;
}

/* State 4: Terracotta Danger / Warm Accent (`btn_danger.png`) */
.btn-danger {
  background-color: #DB6653;
  border-width: 9px 11px 9px 11px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_danger.png') 49 52 50 52 fill / 9px 11px 9px 11px / 0 stretch;
  color: #24120F;
}

/* State 5: Taupe Parchment Locked (`btn_disabled.png`) */
.btn-disabled {
  background-color: #CAB399;
  border-width: 9px 10px 9px 10px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_disabled.png') 50 52 50 52 fill / 9px 10px 9px 10px / 0 stretch;
  color: #3B2F28;
}

/* Stationery Notebook Tabs (`btn_disabled` inactive -> `btn_primary` / `hud_pill` active) */
.btn-tab-craft {
  background-color: #CAB399;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 8px 8px 8px 8px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_disabled.png') 50 52 50 52 fill / 8px / 0 stretch;
  border-radius: 10px;
  color: #3B2F28;
  font-size: 13px;
  min-height: 34px;
  padding: 2px 4px;
}

.btn-tab-craft.active-tab {
  background-color: #95B853;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_primary.png') 50 53 49 54 fill / 8px / 0 stretch;
  color: #1B2910;
}

.btn-icon-util {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  flex-shrink: 0;
}

.btn-mute-util {
  min-width: 46px;
  height: 40px;
  min-height: 40px;
  padding: 0 6px;
  font-size: 12.5px;
  flex-shrink: 0;
}

.util-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
  pointer-events: none;
}

/* Red-Dot Notification Badge (FLOATS ABOVE CORNERS — NEVER CLIPPED) */
.notify-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #E04F3E;
  border: 2px solid #FFFDF7;
  z-index: 35;
  pointer-events: none;
}

.notify-badge[hidden] {
  display: none !important;
}

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

/* ----------------------------------------------------------------------------
 * 3. PILLAR 1: FULL-BLEED HEROIC NO-BOX TITLE SCREEN
 *    CRITICAL: 0 background / 0 border on any ancestor of h1.game-logo-title!
 * ---------------------------------------------------------------------------- */
#title-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #F5E9D1 url('../assets/art/title_bg.jpg') center / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px 34px 18px 34px;
}

.title-top-row {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.lang-pill-select {
  appearance: none;
  background-color: #F8DFB7;
  border: 2.5px solid #5C382B;
  border-radius: 12px;
  padding: 6px 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  color: #3A241B;
  cursor: pointer;
}

.title-hero-unboxed {
  background: transparent !important;
  border: none !important;
  border-image: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 1120px;
  margin: auto 0;
}

.title-crest-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px;
  background-color: #F7DCB1;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 20px 10px 20px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/ribbon_header.png') 66 85 66 90 fill / 10px 20px 10px 20px / 0 stretch;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #3A241B;
}

.crest-ico {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.game-logo-title {
  margin: 2px 0 6px 0;
  font-family: var(--font-display);
  font-size: clamp(54px, 4.9vw, 72px);
  font-weight: 800;
  line-height: 1.06;
  color: #FFFDF7;
  -webkit-text-stroke: 3.5px #5C382B;
  paint-order: stroke fill;
  text-shadow:
    0 5px 0 #5C382B,
    0 10px 24px rgba(58, 36, 27, 0.36);
  letter-spacing: 0.6px;
  text-align: center;
}

.title-scene-actors {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 32px;
  margin-top: 4px;
}

.title-portrait-frame {
  position: relative;
  width: 250px;
  height: 310px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
}

#title-hero-portrait {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: 50% 94%;
  filter: drop-shadow(0 10px 14px rgba(58, 36, 27, 0.28));
}

.title-cta-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-bottom: 34px;
}

.loading-box {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.loading-track {
  width: 100%;
  height: 28px;
  background-color: #B38558;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 8px 10px 6px 12px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/bar_track.png') 70 67 29 89 fill / 8px 10px 6px 12px / 0 stretch;
  overflow: hidden;
  display: flex;
  align-items: center;
}

#title-loading-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #83B84E 0%, #CACB62 100%);
  border-radius: 6px;
  transition: width 0.14s ease-out;
}

.loading-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 800;
  color: #3A241B;
  text-shadow: 0 1px 0 rgba(255, 253, 247, 0.85);
  font-variant-numeric: tabular-nums;
}

#btn-title-play {
  min-width: 248px;
  min-height: 62px;
  font-size: 22px;
  letter-spacing: 0.4px;
  border-width: 13px 18px 13px 18px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_primary.png') 50 53 49 54 fill / 13px 18px 13px 18px / 0 stretch;
  filter: drop-shadow(0 8px 14px rgba(58, 36, 27, 0.3));
}

.title-footer-meta {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #3A241B;
  background: rgba(251, 242, 223, 0.78);
  border: 1.5px solid rgba(92, 56, 43, 0.35);
  border-radius: 999px;
  padding: 3px 16px;
}

/* ----------------------------------------------------------------------------
 * 4. PILLAR 2: WIDESCREEN COMMAND BAR & 720p-SAFE WORKSPACE
 * ---------------------------------------------------------------------------- */
#game-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--cream-bg);
}

#top-command-bar {
  height: 54px;
  width: 100%;
  padding: 4px 12px;
  display: flex;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(180deg, #FBF2DF 0%, #F2DEC0 100%);
  border-bottom: 2.5px solid #5C382B;
  z-index: 25;
}

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

.currency-pill {
  position: relative;
  overflow: visible !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 8px 0 4px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13.5px;
  color: #3A241B;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hud-popout-btn {
  padding-left: 6px;
  padding-right: 10px;
}

.hud-icon-pop {
  width: 28px;
  height: 28px;
  margin: -6px 2px -6px -8px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 2px rgba(58, 36, 27, 0.25));
  pointer-events: none;
}

.hud-icon-sm {
  width: 21px;
  height: 21px;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
}

.hud-rate-tag {
  font-size: 13px;
  color: #2A5B33;
  font-weight: 800;
}

/* Main 3-Column Workspace (Generous Center Playfield + Zero Footer Bar!) */
#bistro-workspace {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr) 282px;
  gap: 8px;
  padding: 6px 8px 8px 8px;
}

.dock-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  padding: 5px 6px;
  gap: 5px;
}

.dock-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.dock-tabs > * {
  min-width: 0;
  max-width: 100%;
}

.dock-tabs > button {
  width: 100%;
  min-width: 0;
}

.dock-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 2px;
}

.dock-header-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  color: #3A241B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-help-circle {
  width: 26px;
  height: 26px;
  min-height: 26px;
  border-radius: 50%;
  background: #F8DFB7;
  border: 2px solid #5C382B;
  color: #3A241B;
  font-weight: 800;
  font-size: 13px;
  padding: 0;
  flex-shrink: 0;
}

.dock-scroll-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 2px;
}

/* PILLAR 5: 60/25/15 VISUAL DOCK CARDS (9-Slice + Real Art + Icon Stat Chips!) */
.dock-card {
  background-color: #F9EFDA;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 8px 8px 8px 8px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_common.png') 44 37 43 41 fill / 8px / 0 stretch;
  border-radius: 11px;
  padding: 3px 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dock-card.unlocked-highlight {
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_legendary.png') 44 39 43 39 fill / 8px / 0 stretch;
}

.dock-card-visual-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.dock-art-frame {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  background: linear-gradient(180deg, #FFFDF7 0%, #F4DFB8 100%);
  border: 1.5px solid rgba(92, 56, 43, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 3px;
}

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

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

.dock-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.dock-card-name {
  font-family: var(--font-display);
  font-size: 12.6px;
  font-weight: 700;
  color: #3A241B;
  line-height: 1.14;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
  min-width: 0;
}

.dock-card-lv {
  font-size: 12px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 7px;
  background: #F4DFB8;
  color: #6B3C21;
  flex-shrink: 0;
}

.dock-stat-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  min-width: 0;
}

.mini-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  font-weight: 700;
  color: #4E3328;
  white-space: nowrap;
}

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

.roi-preview {
  color: #2A5B33;
  font-weight: 800;
  font-size: 12.5px;
  white-space: nowrap;
}

.dock-card > button {
  width: 100%;
  min-height: 31px;
  padding: 1px 6px;
  font-size: 13px;
  border-width: 7px 9px 7px 9px;
}

/* Central Bistro Stage */
#bistro-canvas-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 3px solid #5C382B;
  border-radius: 18px;
  overflow: hidden;
  background: var(--cream-bg);
}

#bistro-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

#hud-combo-pill {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 20;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(251, 242, 223, 0.92);
  border: 2px solid #5C382B;
  font-size: 13px;
  font-weight: 800;
  color: #3A241B;
}

#hud-combo-pill img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Cozy Pastel Storybook Celebratory Cut-in Ribbon (Bottom-center — 0 Drive-Thru / Kitchen occlusion!) */
#storybook-ribbon-banner {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(16px) scale(0.92);
  z-index: 32;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 10px;
  max-width: min(88%, 460px);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.15), opacity 0.2s ease;
}

#storybook-ribbon-banner.ftue-clearance {
  bottom: 66px;
}

#storybook-ribbon-banner.ribbon-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.ribbon-banner-portrait {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 50%;
  background: #FFFDF7;
  border: 2px solid #5C382B;
  flex-shrink: 0;
}

.ribbon-banner-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  color: #3A241B;
  line-height: 1.15;
}

.ribbon-banner-sub {
  font-size: 12px;
  color: #6B3C21;
  font-weight: 700;
  line-height: 1.15;
}

/* ----------------------------------------------------------------------------
 * 5. PILLAR 3: VISUAL SPOTLIGHT RING + POINTER HAND (`tut-hand`) + 3-ICON FLOW
 * ---------------------------------------------------------------------------- */
#ftue-coach-bar {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 520px);
  z-index: 38;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 10px;
  box-shadow: none;
}

.ftue-bar-ico {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.ftue-step-pill {
  background: #F4B956;
  border: 2px solid #5C382B;
  border-radius: 9px;
  padding: 2px 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: #3A241B;
  flex-shrink: 0;
}

#ftue-step-text {
  flex: 1;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #3A241B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tut-spotlight-layer {
  position: fixed;
  inset: 0;
  z-index: 65;
  pointer-events: none !important;
}

.tut-spotlight {
  position: fixed;
  border: 3.5px solid #F4B956;
  outline: 2.5px solid #5C382B;
  border-radius: 18px;
  pointer-events: none !important;
  will-change: transform;
  animation: spotlightPulse 1.2s ease-in-out infinite;
}

@keyframes spotlightPulse {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, 0, 0) scale(1.03); }
}

.tut-hand {
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none !important;
  will-change: transform;
  animation: tutHandBob 0.95s ease-in-out infinite;
}

@keyframes tutHandBob {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-10deg); }
  50% { transform: translate3d(0, -10px, 0) rotate(-4deg); }
}

.tut-hand-cue {
  background: #5C382B;
  color: #FFFDF7;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  border: 2px solid #F4B956;
  white-space: nowrap;
}

.ftue-highlight {
  outline: 3px solid #F4B956;
  outline-offset: 2px;
}

/* 3-Icon Visual Flow Strip (`js/feature_guides.js`) */
.modal-guide-card {
  width: min(92vw, 660px);
}

.coach-flow-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 4px;
}

.coach-step-tile {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 12px 8px;
}

.coach-step-art {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  background: linear-gradient(180deg, #FFFDF7 0%, #F4DFB8 100%);
  border: 2px solid rgba(92, 56, 43, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.coach-step-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.coach-step-lbl {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #3A241B;
  line-height: 1.2;
}

.coach-flow-arrow {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: #8C4E2B;
  flex-shrink: 0;
}

.coach-footer-row {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.btn-cta-wide {
  min-width: 200px;
  min-height: 48px;
  font-size: 16px;
}

/* ----------------------------------------------------------------------------
 * 6. MODALS (ZERO backdrop-filter: blur! 60/25/15 Anti-SaaS Grids!)
 * ---------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(46, 30, 22, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  position: relative;
  width: min(92vw, 900px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 12px;
  overflow: hidden;
}

.modal-card.modal-compact {
  width: min(90vw, 560px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 2px dashed rgba(92, 56, 43, 0.28);
  padding-bottom: 6px;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.modal-hdr-ico {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 23px);
  color: #3A241B;
}

.btn-modal-close {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.btn-modal-close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

/* Boutique Shop 3x3 Visual-First Grid (`60/25/15`) */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 4px;
}

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

.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 8px 6px 8px;
  gap: 5px;
  background-color: #F9EFDA;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 9px 10px 9px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_common.png') 44 37 43 41 fill / 10px 9px 10px 9px / 0 stretch;
  border-radius: 13px;
}

.shop-card.rarity-rare {
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_rare.png') 44 38 43 38 fill / 10px 9px 10px 9px / 0 stretch;
}

.shop-card.rarity-epic {
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_epic.png') 44 37 41 40 fill / 10px 9px 10px 9px / 0 stretch;
}

.shop-card.rarity-legendary {
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_legendary.png') 44 39 43 39 fill / 10px 9px 10px 9px / 0 stretch;
}

.shop-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 4;
  background: #5C382B;
  color: #FFE6AC;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
}

.shop-art-wrap {
  width: 100%;
  height: 102px;
  border-radius: 10px;
  background: linear-gradient(180deg, #FFFDF7 0%, #F5E0BA 100%);
  border: 1.5px solid rgba(92, 56, 43, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.shop-pack-img {
  max-width: 100%;
  max-height: 94px;
  object-fit: contain;
}

.shop-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: #3A241B;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-chips-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: nowrap;
  width: 100%;
}

.shop-buy-btn {
  width: 100%;
  min-height: 36px;
}

#btn-rush-hour {
  gap: 6px;
  padding-left: 10px;
  padding-right: 10px;
  flex-shrink: 0;
}

#btn-rush-hour .hud-icon-sm {
  margin-right: 2px;
}

.ledger-wallet-hint {
  padding: 5px 10px;
  border-radius: 9px;
  background: #FFF8E6;
  border: 1.5px solid #D59B65;
  color: #5C382B;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* Juicy Flying Coin & Golden Bean Reward VFX + Wallet Feedback Pop (0 backdrop-filter, 0 shadowBlur!) */
.fly-currency-node {
  position: fixed;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  pointer-events: none !important;
  z-index: 240;
  will-change: transform, opacity;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(92, 56, 43, 0.35));
}

.fly-burst-ring {
  position: fixed;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  border-radius: 50%;
  border: 3px solid #F4B956;
  background: radial-gradient(circle, rgba(255, 243, 196, 0.72) 0%, rgba(244, 185, 86, 0) 70%);
  pointer-events: none !important;
  z-index: 235;
  animation: flyBurstRing 0.42s ease-out forwards;
}

@keyframes flyBurstRing {
  0% { transform: scale(0.45); opacity: 0.95; }
  100% { transform: scale(2.35); opacity: 0; }
}

.wallet-pop {
  animation: walletPop 0.34s cubic-bezier(0.2, 0.95, 0.35, 1.25);
}

@keyframes walletPop {
  0% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(1.13); filter: brightness(1.14); }
  100% { transform: scale(1); filter: brightness(1); }
}

.wallet-delta-float {
  position: fixed;
  pointer-events: none !important;
  z-index: 245;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #1F5B2C;
  background: #FFFDF7;
  border: 2px solid #83B84E;
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
  animation: walletDeltaUp 0.95s ease-out forwards;
}

.wallet-delta-float.bean-delta {
  color: #6B3C21;
  border-color: #F4B956;
  background: #FFF6DC;
}

@keyframes walletDeltaUp {
  0% { transform: translate(-50%, 0) scale(0.85); opacity: 0; }
  18% { transform: translate(-50%, 6px) scale(1.06); opacity: 1; }
  80% { transform: translate(-50%, 16px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, 24px) scale(0.95); opacity: 0; }
}

/* 12-Hour Offline Bistro Ledger */
.ledger-summary-pill {
  padding: 6px 12px;
  border-radius: 10px;
  background: #F4DFB8;
  color: #3A241B;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 8px 0;
  font-variant-numeric: tabular-nums;
}

.ledger-table td {
  padding: 6px 8px;
  border-bottom: 1.5px dashed rgba(92, 56, 43, 0.22);
  font-size: 13.5px;
  color: #3A241B;
}

.ledger-line-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ledger-line-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.ledger-table tr.ledger-total-row td {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #6B3C21;
  border-top: 2.5px solid #5C382B;
  border-bottom: none;
}

.ledger-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ledger-actions-grid > * {
  min-width: 0;
  max-width: 100%;
}

/* Events Modal (Tabbed Visual Milestone Track — Lesson #43 & #55) */
.ev-tabs-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.ev-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
}

.ev-hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.ev-hero-art {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  background: linear-gradient(180deg, #FFFDF7 0%, #F4DFB8 100%);
  border: 1.5px solid rgba(92, 56, 43, 0.22);
  padding: 4px;
  object-fit: contain;
  flex-shrink: 0;
}

.ev-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.ev-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #3A241B;
}

.ev-prog-track {
  width: 100%;
  max-width: 320px;
  height: 20px;
  background-color: #B38558;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 6px 8px 5px 10px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/bar_track.png') 70 67 29 89 fill / 6px 8px 5px 10px / 0 stretch;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ev-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #83B84E 0%, #CACB62 100%);
  border-radius: 4px;
}

.ev-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ev-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.ev-community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ev-promo-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
}

.ev-promo-art {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.ev-promo-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ev-promo-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: #3A241B;
}

/* Pillar 6: Icon Settings Modal */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 10px;
}

.settings-lbl-grp {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: #3A241B;
}

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

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

.btn-toggle-pill {
  min-width: 58px;
  min-height: 34px;
}

.craft-slider {
  width: 126px;
  accent-color: #83B84E;
  cursor: pointer;
}

.giftcode-input {
  padding: 6px 10px;
  border: 2px solid #5C382B;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  background: #FFFDF7;
  color: #3A241B;
  width: 152px;
}

/* Pillar 6: 3-Star Victory Celebration Modal */
.celeb-modal-card {
  align-items: center;
  text-align: center;
  gap: 6px;
}

#celeb-star-canvas {
  width: 340px;
  height: 112px;
  display: block;
  pointer-events: none;
}

.celeb-sub-text {
  margin: 0;
  font-size: 14px;
  color: #5C382B;
}

.celeb-hero-img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin: 4px 0;
}

.reward-chip-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 6px 0 8px 0;
}

.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #FFFDF7;
  border: 2.5px solid #D59B65;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #3A241B;
}

.reward-chip img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Exit Modal Quick-Jump Cards */
.exit-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0;
}

.exit-reward-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 8px;
  background: #FFFDF7;
  border: 2px solid #D59B65;
  border-radius: 12px;
  gap: 5px;
}

.exit-card-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.exit-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
}

.exit-card-title {
  font-size: 13px;
  color: #3A241B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exit-card-sub {
  font-size: 12px;
  color: #5C382B;
}

.exit-note-copy {
  margin: 4px 0 8px;
  font-size: 13.5px;
  color: #3A241B;
}

/* Toast Notification (sits cleanly above #storybook-ribbon-banner -> 0 overlap!) */
#bistro-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  pointer-events: none;
}

/* Preview-Only DEV F2 Pill & Panel (Tucked inside canvas corner -> 0 dock collision!) */
#dev-f2-pill {
  position: fixed;
  top: 64px;
  right: 302px;
  z-index: 42;
  background: #3A241B;
  color: #FFE6AC;
  border: 1.5px solid #F4B956;
  border-radius: 8px;
  font-size: 12px;
  min-height: 26px;
  padding: 2px 8px;
}

#debug-panel {
  position: fixed;
  bottom: 46px;
  right: 16px;
  z-index: 145;
  width: 280px;
  background: #FBF2DF;
  border: 3px solid #5C382B;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Seasons 1-3 Hub (60/25/15 Visual-First Portrait & Medal Cards with Vault 9-Slice) */
.seasons-tabs-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.seasons-tabs-bar > button {
  min-width: 0;
  width: 100%;
}

.szn-pager {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-pager-sm {
  min-width: 34px;
  min-height: 32px;
  padding: 0 6px;
}

.szn-page-lbl {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: #3A241B;
  white-space: nowrap;
}

.szn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 2px;
}

.szn-grid > * {
  min-width: 0;
  max-width: 100%;
}

.vf-card-portrait,
.vf-medal-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 8px;
  gap: 5px;
  background-color: #F9EFDA;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 9px 10px 9px;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_common.png') 44 37 43 41 fill / 10px 9px 10px 9px / 0 stretch;
  border-radius: 13px;
}

.vf-card-portrait.szn-highlight,
.vf-medal-tile.szn-highlight {
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_legendary.png') 44 39 43 39 fill / 10px 9px 10px 9px / 0 stretch;
}

.szn-art {
  position: relative;
  width: 100%;
  height: 114px;
  border-radius: 10px;
  background: linear-gradient(180deg, #FFFDF7 0%, #F5E0BA 100%);
  border: 1.5px solid rgba(92, 56, 43, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.szn-hero-img {
  width: 100%;
  height: 102px;
  object-fit: contain;
  display: block;
}

.szn-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #5C382B;
  color: #FFE6AC;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 8px;
}

.szn-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: #3A241B;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.szn-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #FFF6DC;
  border: 1.5px solid #D59B65;
  font-size: 12.5px;
  font-weight: 700;
  color: #3A241B;
  max-width: 100%;
  white-space: nowrap;
}

.szn-chip-ico,
.szn-btn-ico {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.szn-cta {
  width: 100%;
  min-height: 36px;
}

/* ----------------------------------------------------------------------------
 * 7. 1280x720 WIDESCREEN COMPACT GUARD (0 WRAP, 0 CLIP, 0 HIT_BLOCKED!)
 * ---------------------------------------------------------------------------- */
@media (max-width: 1460px) {
  #top-command-bar {
    height: 48px;
    padding: 3px 8px;
    gap: 5px;
  }
  .hud-cluster {
    gap: 4px;
  }
  .currency-pill {
    min-height: 32px;
    padding: 0 6px 0 3px;
    font-size: 13px;
  }
  .hud-icon-pop {
    width: 24px;
    height: 24px;
    margin: -4px 1px -4px -6px;
  }
  #top-command-bar .btn-9slice {
    min-height: 32px;
    padding: 1px 6px;
    border-width: 7px 8px 7px 8px;
    font-size: 13px;
  }
  #top-command-bar .btn-icon-util {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
  }
  #top-command-bar .btn-mute-util {
    min-width: 40px;
    height: 34px;
    min-height: 34px;
    padding: 0 4px;
  }
  #bistro-workspace {
    grid-template-columns: 222px minmax(0, 1fr) 222px;
    gap: 6px;
    padding: 5px 6px 6px 6px;
  }
  .dock-column {
    padding: 3px 4px;
    gap: 4px;
    border-width: 10px 9px 10px 9px;
  }
  .btn-tab-craft {
    min-height: 29px;
    border-width: 6px;
    font-size: 12.5px;
  }
  .dock-header-title {
    font-size: 13px;
  }
  .dock-scroll-list {
    gap: 4px;
  }
  /* Compact 6-card fit inside 720p right dock -> ZERO half-clipped buttons! */
  .dock-card {
    padding: 2px 4px;
    gap: 2px;
    border-width: 6px;
  }
  .dock-art-frame {
    width: 38px;
    height: 38px;
    padding: 2px;
  }
  .dock-card-name {
    font-size: 12.5px;
  }
  .dock-card > button {
    min-height: 26px;
    border-width: 5px 7px 5px 7px;
    font-size: 12.5px;
    padding: 0 4px;
  }
  #dev-f2-pill {
    top: 56px;
    right: 240px;
  }
}

@media (max-width: 980px) {
  #bistro-workspace {
    grid-template-columns: 206px minmax(0, 1fr) 206px;
  }
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #bistro-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(260px, 1fr) 170px 170px;
  }
  #bistro-canvas-wrap {
    order: 1;
  }
  #left-dock-panel {
    order: 2;
  }
  #right-dock-panel {
    order: 3;
  }
  .title-scene-actors {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .title-portrait-frame {
    height: 200px;
  }
}
