/* ==========================================================================
 * Cloverbell Market: Cozy Shop Sim — UI Vault Upgrade (`cozy_stationery_craft`)
 * Round 5 Commercial Spatial & Visual Overhaul:
 *   1. Full-Bleed 100vw x 100vh Cozy Store Floor (eliminates opaque SaaS topbar
 *      and solid left/right/bottom walls; pointer-events: none HUD shells).
 *   2. Hand-Inked Cream Stationery (#FBF2DF) + Cocoa Ink (#6D4538) + 25/25
 *      Modular UI Vault assets from assets/ui/vault_cozy_stationery_craft/.
 *   3. Pop-Out Silhouette Icons on Cash, Gems, Shop, Notebook, Seasons & Crest.
 *   4. Collapsible Left Stationery Drawer (Decor/Biscuit/Staff), Floating Right
 *      Paper Order Slip (Till/Wholesale/Catering), Compact Bottom-Left Carton Tray,
 *      and Single-Row Top HUD across both 1920x1080 and 1280x720.
 *   5. ZERO backdrop-filter blur; WCAG >= 4.5:1 warm cocoa ink (#3D2216 / #4A2B1D).
 * ========================================================================== */

:root,
[data-ui-vault-style='cozy_stationery_craft'] {
  --cozy-cream: #FBF2DF;
  --cozy-cream-deep: #F3E2C1;
  --cozy-honey: #DEB469;
  --cozy-wood: #B77437;
  --cozy-cocoa: #6D4538;
  --cozy-ink: #4A2B1D;
  --cozy-ink-deep: #2C170F;
  --cozy-ink-muted: #664234;
  --cozy-sage: #83B84E;
  --cozy-sky: #68B2D8;
  --cozy-terracotta: #CF5C52;
  --font-display: 'Fredoka', 'M PLUS Rounded 1c', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --font-body: 'Quicksand', 'M PLUS Rounded 1c', 'Segoe UI', sans-serif;
  /* TrackBUIMotion v2.1 — UI Vault <-> Slot VFX & Spine Motion Contract */
  --tb-slot-style: 'cozy_stationery_craft';
  --tb-slot-shape: rect;
  --tb-slot-radius: 14px;
  --tb-slot-chamfer: 0px;
  --tb-slot-inset: 3px 3px 3px 3px;
  --tb-slot-palette: warm_honey;
  --tb-slot-mode: chaser_slot;
  --tb-slot-daylight: 1;
  --tb-slot-z: 3;
}

html, body {
  background-color: #E3C99F !important;
  color: var(--cozy-ink) !important;
  font-family: var(--font-body) !important;
}

/* Never clip pop-out icons or red notification badges */
button,
[data-notify-id],
.cm-pill,
.cm-shop-badge-pill,
.cm-hud-btn,
.cm-hud-icon-btn,
.cm-pill-btn,
.cm-tab-btn,
.cm-lift-btn,
.cm-widget-pill,
.cm-carton-card,
.cm-shop-card,
.cm-btn,
.cm-mini-btn,
.btn-9slice {
  overflow: visible !important;
  position: relative;
}

.notify-badge {
  position: absolute !important;
  box-sizing: border-box !important;
  top: -4px !important;
  right: 0 !important;
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background: #D94B3D !important;
  border: 2px solid #FFFDF7 !important;
  box-shadow: 0 2px 4px rgba(44, 23, 15, 0.38) !important;
  z-index: 42 !important;
  pointer-events: none !important;
}

/* ========================================================================= */
/* 1. CORE 9-SLICE VAULT PRIMITIVES (`assets/ui/vault_cozy_stationery_craft`) */
/* ========================================================================= */

/* 1A. Large Wood-Framed Stationery Modal (`frame_modal.png`) */
.frame-9slice,
.cm-title-card.frame-9slice,
.cm-modal-card.frame-9slice,
#exit-retention-modal .cm-exit-card {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 18px 20px 18px 20px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/frame_modal.png') 44 46 45 46 fill / 18px 20px 18px 20px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: brightness(0.95) saturate(1.06) drop-shadow(0 14px 28px rgba(44, 23, 15, 0.38)) !important;
  color: var(--cozy-ink) !important;
}

/* 1B. Botanical Corner Stationery Subpanel (`frame_subpanel.png`) */
.cm-tut-card.frame-9slice,
.cm-debug-panel,
.cm-photo-bar {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 12px 12px 12px 12px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/frame_subpanel.png') 63 57 63 60 fill / 12px 12px 12px 12px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 8px 18px rgba(44, 23, 15, 0.28)) !important;
  color: var(--cozy-ink) !important;
}

/* 1C. Hand-Inked Parchment Ribbon Header (`ribbon_header.png`) */
.cm-brand-kicker,
.cm-modal-head h2,
.cm-ledger-banner,
#exit-retention-modal .cm-exit-title {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px 22px 10px 22px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/ribbon_header.png') 66 85 66 90 fill / 10px 22px 10px 22px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cozy-ink-deep) !important;
  font-family: var(--font-display) !important;
  text-shadow: 0 1px 0 rgba(255, 250, 238, 0.65) !important;
  filter: drop-shadow(0 3px 6px rgba(44, 23, 15, 0.22));
}

.cm-modal-head {
  flex-shrink: 0 !important;
  padding: 2px 2px 0 2px !important;
}

.cm-modal-head h2 {
  min-height: 44px !important;
  max-width: calc(100% - 44px) !important;
  padding: 4px 16px !important;
  margin: 0 !important;
  font-size: clamp(16px, 1.35vw, 20px) !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  text-align: center !important;
  overflow: visible !important;
}

.cm-ledger-banner {
  width: 100% !important;
  min-height: 52px !important;
  padding: 6px 18px !important;
  margin: 2px 0 !important;
  font-size: clamp(14px, 1.2vw, 17px) !important;
  font-weight: 800 !important;
  line-height: 1.28 !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  overflow: visible !important;
  flex-shrink: 0 !important;
}

/* 1D. Primary CTA Button — Cozy Sage Moss (`btn_primary.png`) */
.btn-9slice,
.cm-btn-sage,
.cm-mini-btn.cm-btn-sage,
.cm-shutter-open,
#btn-hud-shop.cm-hud-shop-btn,
#exit-retention-modal #btn-stay-play {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px 13px 10px 13px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_primary.png') 50 53 49 54 fill / 10px 13px 10px 13px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #20120B !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 0 rgba(255, 252, 240, 0.5) !important;
  filter: drop-shadow(0 3px 5px rgba(44, 23, 15, 0.26));
  padding: 0 6px !important;
}

.btn-9slice:hover:not(:disabled),
.cm-btn-sage:hover:not(:disabled),
.cm-shutter-open:hover:not(:disabled),
#btn-hud-shop.cm-hud-shop-btn:hover:not(:disabled),
#exit-retention-modal #btn-stay-play:hover:not(:disabled) {
  filter: brightness(1.06) drop-shadow(0 4px 8px rgba(44, 23, 15, 0.34)) !important;
}

/* 1E. Secondary Button — Cozy Sky Cerulean (`btn_secondary.png`) */
.cm-btn-gold,
.cm-mini-btn.cm-btn-gold,
.cm-shutter-nextday,
#btn-hud-seasons.cm-hud-seasons-btn,
#btn-pay-card,
#btn-exact-helper {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px 13px 10px 13px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_secondary.png') 50 54 49 53 fill / 10px 13px 10px 13px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #1A1412 !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 0 rgba(255, 253, 248, 0.52) !important;
  filter: drop-shadow(0 3px 5px rgba(44, 23, 15, 0.24));
  padding: 0 6px !important;
}

/* 1F. Danger / Exit / Alert Button — Cozy Terracotta Coral (`btn_danger.png`) */
.cm-btn-coral-soft,
.cm-shutter-closed,
.cm-quit-btn,
#btn-quit-title,
#btn-clear-change,
.cm-pilferer-pill,
.cm-spill-pill,
.cm-stockout-pill,
#exit-retention-modal #btn-confirm-quit {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px 12px 10px 12px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_danger.png') 49 52 50 52 fill / 10px 12px 10px 12px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #24110B !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 0 rgba(255, 238, 228, 0.45) !important;
  filter: drop-shadow(0 3px 5px rgba(44, 23, 15, 0.28));
  padding: 0 6px !important;
}

/* 1G. Neutral Cream / Mini Stationery Button (`slot_tile.png`) */
.cm-btn-cream,
.cm-mini-btn:not(.cm-btn-sage):not(.cm-btn-gold):not(.cm-btn-coral-soft) {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 9px 10px 9px 10px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/slot_tile.png') 57 55 58 55 fill / 9px 10px 9px 10px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cozy-ink-deep) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  padding: 0 4px !important;
  filter: drop-shadow(0 2px 3px rgba(44, 23, 15, 0.2));
}

/* 1H. Disabled / Locked Button — Muted Kraft Linen (`btn_disabled.png`) */
button:disabled,
.btn-9slice:disabled,
.cm-btn:disabled,
.cm-mini-btn:disabled,
.cm-lift-btn.is-locked {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 9px 11px 9px 11px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_disabled.png') 50 52 50 52 fill / 9px 11px 9px 11px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #4A2B1D !important;
  opacity: 0.90 !important;
  filter: none !important;
}

/* 1I. Round Terracotta Hand-Inked Close Button (`btn_close.png`) */
.cm-close-btn,
.cm-drawer-close-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  border: none !important;
  border-image: none !important;
  border-radius: 50% !important;
  background: url('../assets/ui/vault_cozy_stationery_craft/btn_close.png') center / contain no-repeat !important;
  box-shadow: none !important;
  font-size: 0 !important;
  color: transparent !important;
  flex-shrink: 0 !important;
  cursor: pointer;
  filter: drop-shadow(0 3px 5px rgba(44, 23, 15, 0.34));
  transition: transform 0.12s ease, filter 0.12s ease;
}

.cm-close-btn:hover,
.cm-drawer-close-btn:hover {
  transform: scale(1.08);
  filter: brightness(1.06) drop-shadow(0 4px 7px rgba(44, 23, 15, 0.4));
}

.cm-close-btn > span,
.cm-drawer-close-btn > span {
  display: none !important;
}

/* 1J. Wooden Progress Bars (`bar_track.png` + `bar_fill_primary.png`) */
.cm-loading-track,
.cm-meter-track {
  height: 18px !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 5px 10px 4px 11px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/bar_track.png') 70 67 29 89 fill / 5px 10px 4px 11px / 0 stretch !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.cm-loading-fill,
.cm-meter-fill {
  height: 100% !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 3px 6px 3px 6px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/bar_fill_primary.png') 38 38 36 35 fill / 3px 6px 3px 6px / 0 stretch !important;
  border-radius: 0 !important;
}

/* ========================================================================= */
/* 2. TITLE SCREEN POLISH                                                    */
/* ========================================================================= */

.cm-title-card.frame-9slice {
  width: min(510px, 90vw) !important;
  padding: 8px 18px 14px !important;
}

.cm-brand-kicker {
  font-size: 11.5px !important;
  padding: 0 8px !important;
  margin-bottom: 8px !important;
  letter-spacing: 0.04em !important;
}

.cm-brand-title {
  color: #FFFDF7 !important;
  -webkit-text-stroke: 3px #5A3526 !important;
  text-shadow: 0 3px 0 #5A3526 !important;
}

.cm-brand-tagline {
  color: var(--cozy-ink) !important;
  font-weight: 700 !important;
}

.cm-title-cta-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cm-play-cta {
  min-width: 215px !important;
  min-height: 52px !important;
  font-size: 20px !important;
  border-width: 12px 18px 12px 18px !important;
}

.cm-new-game-btn {
  min-height: 36px !important;
  padding: 2px 14px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.cm-new-game-btn.cm-btn-confirm-warn {
  background: linear-gradient(180deg, #FFE4CC 0%, #F4B48C 100%) !important;
  border-color: #A63E26 !important;
  color: #5A1E12 !important;
}

.cm-lang-select {
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 9px 14px 9px 14px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/hud_pill.png') 69 98 67 97 fill / 9px 14px 9px 14px / 0 stretch !important;
  border-radius: 0 !important;
  color: var(--cozy-ink-deep) !important;
  padding: 0 8px !important;
  min-height: 38px !important;
  filter: drop-shadow(0 3px 5px rgba(44, 23, 15, 0.25));
}

.cm-lang-select option {
  background: #FBF2DF;
  color: #2C170F;
}

#btn-quit-title {
  min-height: 38px !important;
  padding: 0 8px !important;
}

/* ========================================================================= */
/* 3. FULL-BLEED 100vw x 100vh COZY STORE FLOOR (ZERO SAAS WALLS!)           */
/* ========================================================================= */

#game-workbench.cm-workbench {
  position: relative !important;
  display: block !important;
  width: 100vw !important;
  height: 100vh !important;
  background: #DFC08E !important;
  overflow: hidden !important;
}

.cm-columns-grid {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  gap: 0 !important;
  pointer-events: none !important;
}

#center-stage-panel.cm-center-stage {
  position: absolute !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

#diorama-stage-wrap.cm-diorama-wrap {
  position: absolute !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: #E8D2AE !important;
  pointer-events: auto !important;
  z-index: 1 !important;
}

#diorama-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* ========================================================================= */
/* 4. FLOATING SINGLE-ROW TOP HUD + POP-OUT SILHOUETTE ICONS                 */
/* ========================================================================= */

.cm-top-ribbon {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 52px !important;
  padding: 6px 12px 4px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  background: linear-gradient(180deg, rgba(66, 39, 24, 0.32) 0%, rgba(66, 39, 24, 0.08) 68%, rgba(66, 39, 24, 0) 100%) !important;
  border-bottom: none !important;
  box-shadow: none !important;
  z-index: 60 !important;
  pointer-events: none !important;
  overflow: visible !important;
}

.cm-ribbon-left,
.cm-ribbon-right {
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  min-width: 0 !important;
  overflow: visible !important;
}

/* Hand-Inked Stationery HUD Pills (`hud_pill.png`) */
.cm-shop-badge-pill,
.cm-pill {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 36px !important;
  padding: 0 4px !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 9px 14px 9px 14px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/hud_pill.png') 69 98 67 97 fill / 9px 14px 9px 14px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cozy-ink-deep) !important;
  font-family: var(--font-display) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  filter: drop-shadow(0 3px 5px rgba(44, 23, 15, 0.26));
  max-width: none !important;
}

.cm-shop-badge-pill {
  padding-left: 2px !important;
}

.cm-shop-crest-pop {
  position: relative !important;
  z-index: 9 !important;
  width: 34px !important;
  height: 34px !important;
  margin: -10px 2px -10px -13px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 3px 3px rgba(44, 23, 15, 0.36));
  pointer-events: none;
}

.cm-shop-lv {
  padding: 1px 6px !important;
  border-radius: 8px !important;
  background: #F4C35E !important;
  border: 1.5px solid #6D4538 !important;
  color: #2C170F !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.cm-shop-name-lbl {
  color: var(--cozy-ink-deep) !important;
  font-size: 13px !important;
  max-width: 140px;
}

.cm-mini-pop {
  width: 24px !important;
  height: 24px !important;
  margin: -6px 2px -6px -7px !important;
  z-index: 8 !important;
  filter: drop-shadow(0 2px 2px rgba(44, 23, 15, 0.3));
}

/* Currency Capsules with Bold POP-OUT Coin & Gem Icons! */
.cm-currency-pill {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  padding-left: 2px !important;
  padding-right: 4px !important;
}

.cm-currency-pill > .uiv-icon-pop {
  position: relative !important;
  z-index: 9 !important;
  width: 34px !important;
  height: 34px !important;
  margin: -10px 4px -10px -14px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 3px 3px rgba(44, 23, 15, 0.38)) !important;
  pointer-events: none !important;
}

#btn-shutter {
  height: 36px !important;
  padding: 0 5px !important;
  font-size: 12px !important;
  border-width: 9px 12px 9px 12px !important;
}

/* Tier 2 HUD Buttons (`slot_tile.png`) + Tier 1 Shop (`btn_primary.png`) & Seasons (`btn_secondary.png`) */
.cm-hud-btn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  height: 36px !important;
  padding: 0 6px !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 9px 11px 9px 11px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/slot_tile.png') 57 55 58 55 fill / 9px 11px 9px 11px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cozy-ink-deep) !important;
  font-family: var(--font-display) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  filter: drop-shadow(0 3px 4px rgba(44, 23, 15, 0.25));
}

.cm-hud-btn > .uiv-icon-pop {
  position: relative !important;
  z-index: 9 !important;
  width: 28px !important;
  height: 28px !important;
  margin: -8px 3px -8px -10px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 2px 2px rgba(44, 23, 15, 0.36)) !important;
  pointer-events: none !important;
}

#btn-hud-shop.cm-hud-shop-btn {
  height: 38px !important;
  padding: 0 10px 0 6px !important;
  font-size: 12.5px !important;
  filter: drop-shadow(0 4px 6px rgba(44, 23, 15, 0.32)) drop-shadow(0 0 6px rgba(244, 195, 94, 0.45)) !important;
}

#btn-hud-seasons.cm-hud-seasons-btn,
#btn-hud-notebook,
#btn-hud-licenses {
  padding-right: 9px !important;
}

/* Tier 3 Compact Utility Icon Buttons (`<= 38px`, icon ~62% height) */
.cm-hud-icon-btn {
  box-sizing: border-box !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 8px 8px 8px 8px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/slot_tile.png') 57 55 58 55 fill / 8px 8px 8px 8px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cozy-ink-deep) !important;
  filter: drop-shadow(0 3px 4px rgba(44, 23, 15, 0.24));
  flex-shrink: 0 !important;
}

.cm-hud-icon-btn .cm-icon-sm,
.cm-hud-icon-btn .cm-vault-gear-icon {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain !important;
}

.cm-hud-icon-btn.cm-quit-btn {
  border-width: 8px 9px 8px 9px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_danger.png') 49 52 50 52 fill / 8px 9px 8px 9px / 0 stretch !important;
  color: #FFFDF7 !important;
}

.cm-hud-icon-btn.cm-quit-btn .cm-svg-icon {
  color: #FFFDF7 !important;
}

/* ========================================================================= */
/* 5. HORIZONTAL SHOPLIFT FLOOR BAR + COLLAPSIBLE LEFT STATIONERY DRAWER     */
/* ========================================================================= */

/* Floating Horizontal Floor Switcher (sits in top window clearance above shelves!) */
#shoplift-rail.cm-shoplift-rail {
  position: fixed !important;
  top: 56px !important;
  left: 12px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
  z-index: 34 !important;
  pointer-events: auto !important;
}

.cm-lift-btn {
  box-sizing: border-box !important;
  height: 32px !important;
  padding: 0 5px !important;
  gap: 4px !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 8px 10px 8px 10px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/slot_tile.png') 57 55 58 55 fill / 8px 10px 8px 10px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cozy-ink-deep) !important;
  font-family: var(--font-display) !important;
  font-size: 11.5px !important;
  filter: drop-shadow(0 3px 4px rgba(44, 23, 15, 0.24));
}

.cm-lift-btn.is-active {
  border-width: 8px 11px 8px 11px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_primary.png') 50 53 49 54 fill / 8px 11px 8px 11px / 0 stretch !important;
  color: #1F120A !important;
}

.cm-lift-btn.is-locked {
  border-width: 8px 10px 8px 10px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_disabled.png') 50 52 50 52 fill / 8px 10px 8px 10px / 0 stretch !important;
}

.cm-lift-num {
  padding: 1px 5px !important;
  border-radius: 6px !important;
  background: #5A3526 !important;
  color: #FFFDF7 !important;
  font-size: 10px !important;
}

/* Piggy Jar Tips Pill — cleanly docked in Top HUD Rail (outside central arena!) */
.cm-hud-tips-pill {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 32px !important;
  padding: 0 4px !important;
  margin-left: 4px !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 8px 12px 8px 12px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/hud_pill.png') 69 98 67 97 fill / 8px 12px 8px 12px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cozy-ink-deep) !important;
  font-family: var(--font-display) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  filter: brightness(0.95) saturate(1.06) drop-shadow(0 3px 4px rgba(44, 23, 15, 0.24));
}

.cm-hud-tips-pill .cm-icon-sm {
  width: 18px !important;
  height: 18px !important;
}

.cm-hud-tips-pill .cm-piggy-lbl {
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  color: var(--cozy-ink-muted) !important;
}

.cm-hud-tips-pill #till-piggy-val {
  color: var(--cozy-ink-deep) !important;
  font-weight: 800 !important;
}

/* Left Floating Stationery Drawer (`Decor | Biscuit | Staff`) — Collapsed to Tabs by Default! */
#left-rail-panel.cm-left-rail {
  position: fixed !important;
  top: 93px !important;
  left: 12px !important;
  width: clamp(276px, 19.5vw, 328px) !important;
  max-height: calc(100vh - 216px) !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  z-index: 38 !important;
  pointer-events: auto !important;
}

#left-rail-panel.is-drawer-collapsed {
  width: auto !important;
  max-height: none !important;
}

#left-rail-panel.is-drawer-collapsed > .cm-rail-pane,
#left-rail-panel.is-drawer-collapsed #btn-left-drawer-close {
  display: none !important;
}

#left-rail-panel .cm-rail-tabs {
  display: flex !important;
  align-items: flex-end !important;
  gap: 4px !important;
  padding: 0 4px !important;
  margin-bottom: -4px !important;
  background: transparent !important;
  border-bottom: none !important;
  z-index: 5 !important;
}

#left-rail-panel.is-drawer-collapsed .cm-rail-tabs {
  margin-bottom: 0 !important;
}

#left-rail-panel #btn-left-drawer-close {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  margin-bottom: 3px !important;
}

#left-rail-panel > .cm-rail-pane {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 12px 12px 12px 12px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/frame_subpanel.png') 63 57 63 60 fill / 12px 12px 12px 12px / 0 stretch !important;
  padding: 4px 5px !important;
  max-height: calc(100vh - 254px) !important;
  filter: brightness(0.93) saturate(1.08) drop-shadow(0 10px 22px rgba(44, 23, 15, 0.34));
}

/* Manila Folder Tabs (`tab_active.png` + `slot_tile.png`) */
.cm-tab-btn {
  box-sizing: border-box !important;
  flex: 1 1 auto !important;
  min-width: 54px !important;
  height: 32px !important;
  padding: 0 6px !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 8px 9px 6px 9px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/slot_tile.png') 57 55 58 55 fill / 8px 9px 6px 9px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cozy-ink-deep) !important;
  font-family: var(--font-display) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  filter: drop-shadow(0 2px 3px rgba(44, 23, 15, 0.22));
}

.cm-tab-btn.is-active {
  height: 35px !important;
  border-width: 10px 9px 5px 14px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/tab_active.png') 96 30 29 161 fill / 10px 9px 5px 14px / 0 stretch !important;
  color: #24120B !important;
  filter: drop-shadow(0 3px 5px rgba(44, 23, 15, 0.28));
}

#left-rail-panel.is-drawer-collapsed .cm-tab-btn.is-active {
  height: 32px !important;
  border-width: 8px 10px 8px 10px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/hud_pill.png') 69 98 67 97 fill / 8px 10px 8px 10px / 0 stretch !important;
}

.cm-help-pill {
  width: 28px !important;
  height: 28px !important;
  margin-bottom: 2px !important;
  background: #FBF2DF !important;
  border: 2px solid #6D4538 !important;
  color: #4A2B1D !important;
  box-shadow: 0 2px 3px rgba(44, 23, 15, 0.24) !important;
}

/* Stationery Cards inside Left Drawer */
.cm-row-card,
.cm-staff-controls-card {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px 9px 10px 9px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_common.png') 44 37 43 41 fill / 10px 9px 10px 9px / 0 stretch !important;
  border-radius: 0 !important;
  padding: 2px 4px !important;
}

.cm-row-card.is-placed,
.cm-biscuit-card {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px 9px 10px 9px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_rare.png') 44 38 43 38 fill / 10px 9px 10px 9px / 0 stretch !important;
  border-radius: 0 !important;
  padding: 3px 5px !important;
}

/* ========================================================================= */
/* 6. FLOATING RIGHT PAPER ORDER SLIP (`Till | Wholesale | Catering`)        */
/* ========================================================================= */

#right-workbench-panel.cm-right-workbench {
  position: fixed !important;
  top: 56px !important;
  right: 12px !important;
  width: clamp(298px, 20.2vw, 362px) !important;
  max-height: calc(100vh - 68px) !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  z-index: 36 !important;
  pointer-events: auto !important;
}

#right-workbench-panel .cm-rail-tabs {
  display: flex !important;
  align-items: flex-end !important;
  gap: 4px !important;
  padding: 0 6px !important;
  margin-bottom: -4px !important;
  background: transparent !important;
  border-bottom: none !important;
  z-index: 5 !important;
}

#right-workbench-panel > .cm-rail-pane {
  box-sizing: border-box !important;
  flex: 0 1 auto !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 12px 12px 13px 12px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/frame_subpanel.png') 63 57 63 60 fill / 12px 12px 13px 12px / 0 stretch !important;
  border-radius: 0 !important;
  padding: 4px 5px 5px 5px !important;
  gap: 6px !important;
  max-height: calc(100vh - 104px) !important;
  filter: brightness(0.92) saturate(1.09) drop-shadow(0 10px 24px rgba(44, 23, 15, 0.34));
  overflow: visible !important;
}

#pane-right-wholesale,
#pane-right-catering {
  overflow: hidden !important;
  height: calc(100vh - 116px) !important;
}

/* Customer Order Header Slip (`card_rare.png`) */
.cm-till-customer {
  box-sizing: border-box !important;
  flex-direction: column !important;
  align-items: stretch !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px 9px 10px 9px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_rare.png') 44 38 43 38 fill / 10px 9px 10px 9px / 0 stretch !important;
  border-radius: 0 !important;
  padding: 1px 3px !important;
  gap: 5px !important;
}

.cm-till-cust-top {
  gap: 7px !important;
}

.cm-cust-avatar {
  width: 38px !important;
  height: 44px !important;
  border: 2px solid #6D4538 !important;
  background: #FBF2DF !important;
}

.cm-pay-tag {
  background: #F4C35E !important;
  border: 1.5px solid #5A3526 !important;
  color: #24120B !important;
}

.cm-order-total-pill {
  background: #FFF5D6 !important;
  border: 1.5px solid #7A4B38 !important;
  color: var(--cozy-ink-deep) !important;
}

.cm-order-total-pill.is-active {
  background: linear-gradient(90deg, #FFF2BF 0%, #FFE296 100%) !important;
  border-color: #A56A1E !important;
}

.cm-piggy-pill {
  background: #FBF2DF !important;
  border: 1.5px solid #8A5B47 !important;
  color: var(--cozy-ink-deep) !important;
}

/* Conveyor Belt Paper Slip (`card_common.png`) + Belt Item Tiles (`slot_tile.png`) */
.cm-conveyor-box {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px 9px 10px 9px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_common.png') 44 37 43 41 fill / 10px 9px 10px 9px / 0 stretch !important;
  border-radius: 0 !important;
  padding: 2px 3px !important;
}

.cm-belt-grid {
  min-height: 54px !important;
  gap: 5px !important;
}

.cm-belt-item {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 6px 7px 6px 7px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/slot_tile.png') 57 55 58 55 fill / 6px 7px 6px 7px / 0 stretch !important;
  border-radius: 0 !important;
  padding: 2px 3px !important;
  color: var(--cozy-ink-deep) !important;
  min-height: 44px !important;
}

.cm-belt-item img,
.cm-belt-item .cm-icon-md {
  width: 32px !important;
  height: 32px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}

.cm-belt-item .cm-row-title {
  font-size: 10.5px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: break-word !important;
  line-height: 1.15 !important;
  text-align: left !important;
}

.cm-belt-item:hover:not(:disabled) {
  filter: brightness(1.06) drop-shadow(0 2px 4px rgba(44, 23, 15, 0.25));
}

/* Kraft Bag Stack (`card_common.png`) */
.cm-bag-box {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 9px 9px 9px 9px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_common.png') 44 37 43 41 fill / 9px 9px 9px 9px / 0 stretch !important;
  border-radius: 0 !important;
  padding: 1px 4px !important;
  min-height: 48px !important;
}

/* Retro LCD Window (Crisp Olive Paper Readout, High Contrast, compact <= 40px) */
.cm-lcd-screen {
  padding: 3px 7px !important;
  border-radius: 9px !important;
  background: linear-gradient(180deg, #DDE8D0 0%, #C6DAB5 100%) !important;
  border: 2px solid #5A3526 !important;
  box-shadow: inset 0 2px 4px rgba(44, 23, 15, 0.14) !important;
  color: #1A2F1C !important;
}

.cm-lcd-cell {
  line-height: 1.12 !important;
}

.cm-lcd-cell span {
  font-size: 9px !important;
}

.cm-lcd-cell strong {
  font-size: 12.5px !important;
}

/* Cash Drawer — Hugs Content Cleanly (ZERO Empty Blank Desert!) */
.cm-payment-box {
  flex: 0 0 auto !important;
  justify-content: flex-start !important;
  gap: 5px !important;
}

.cm-denom-grid {
  gap: 4px !important;
  margin-bottom: 4px !important;
}

.cm-denom-btn {
  box-sizing: border-box !important;
  height: 34px !important;
  padding: 0 2px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  color: var(--cozy-ink-deep) !important;
}

.cm-denom-btn.is-bill {
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 8px 9px 8px 9px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_rare.png') 44 38 43 38 fill / 8px 9px 8px 9px / 0 stretch !important;
  filter: drop-shadow(0 2px 3px rgba(44, 23, 15, 0.22));
}

.cm-denom-btn.is-coin {
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 8px 8px 8px 8px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_legendary.png') 44 39 43 39 fill / 8px 8px 8px 8px / 0 stretch !important;
  filter: drop-shadow(0 2px 3px rgba(44, 23, 15, 0.22));
}

.cm-drawer-actions {
  gap: 6px !important;
}

.cm-drawer-actions .cm-btn {
  height: 38px !important;
  font-size: 13px !important;
}

/* Wholesale & Catering Cards */
.cm-ws-card {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px 9px 10px 9px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_common.png') 44 37 43 41 fill / 10px 9px 10px 9px / 0 stretch !important;
  border-radius: 0 !important;
  padding: 2px 4px !important;
}

.cm-ws-card .cm-ws-top {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 4px !important;
}

.cm-ws-card .cm-row-title {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: break-word !important;
  line-height: 1.2 !important;
  font-size: 11.5px !important;
}

.cm-ws-card .cm-order-btn {
  width: 100% !important;
  height: auto !important;
  min-height: 30px !important;
  border-width: 7px 10px 7px 10px !important;
  padding: 1px 6px !important;
  font-size: 11.5px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

.cm-filter-pill {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 6px 8px 6px 8px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/slot_tile.png') 57 55 58 55 fill / 6px 8px 6px 8px / 0 stretch !important;
  border-radius: 0 !important;
  padding: 0 3px !important;
  color: var(--cozy-ink-deep) !important;
}

.cm-filter-pill.is-active {
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_primary.png') 50 53 49 54 fill / 6px 8px 6px 8px / 0 stretch !important;
}

/* ========================================================================= */
/* 7. COMPACT FLOATING BOTTOM-LEFT STOCK CARTONS TRAY & DIORAMA WIDGETS      */
/* ========================================================================= */

#carton-tray-wrap.cm-carton-tray {
  position: fixed !important;
  left: 12px !important;
  bottom: 10px !important;
  width: auto !important;
  min-width: 340px !important;
  max-width: min(585px, 56vw) !important;
  height: auto !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 11px 12px 11px 12px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/frame_subpanel.png') 63 57 63 60 fill / 11px 12px 11px 12px / 0 stretch !important;
  border-radius: 0 !important;
  padding: 2px 5px 3px 5px !important;
  z-index: 34 !important;
  pointer-events: auto !important;
  filter: brightness(0.93) saturate(1.08) drop-shadow(0 8px 18px rgba(44, 23, 15, 0.3));
}

.cm-carton-header {
  margin-bottom: 4px !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

.cm-carton-title-group {
  color: var(--cozy-ink-deep) !important;
  font-family: var(--font-display) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.cm-carton-title-group strong,
#carton-count-badge,
#lbl-aisle-margin {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.cm-carton-actions {
  gap: 4px !important;
  flex-shrink: 0 !important;
}

#btn-restock-all {
  height: 30px !important;
  border-width: 7px 10px 7px 10px !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
}

.cm-carton-actions .cm-mini-btn:not(#btn-restock-all) {
  height: 30px !important;
  min-width: 30px !important;
  border-width: 6px 7px 6px 7px !important;
  font-size: 11px !important;
}

.cm-carton-slots {
  gap: 6px !important;
  padding: 4px 3px 2px 3px !important;
}

/* Polaroid/Kraft Carton Cards (`<= 84px`, icon fills ~62% height) */
.cm-carton-card {
  box-sizing: border-box !important;
  width: 78px !important;
  height: 66px !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 8px 8px 8px 8px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/slot_tile.png') 57 55 58 55 fill / 8px 8px 8px 8px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: 1px !important;
  filter: drop-shadow(0 3px 4px rgba(44, 23, 15, 0.24));
}

.cm-carton-card.is-selected {
  border-width: 8px 8px 8px 8px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_legendary.png') 44 39 43 39 fill / 8px 8px 8px 8px / 0 stretch !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 6px rgba(244, 195, 94, 0.85)) drop-shadow(0 3px 4px rgba(44, 23, 15, 0.28)) !important;
}

.cm-carton-icons {
  width: 44px !important;
  height: 36px !important;
}

.cm-carton-box-img {
  width: 38px !important;
  height: 36px !important;
}

.cm-carton-prod-img {
  width: 24px !important;
  height: 24px !important;
  border-color: #6D4538 !important;
  background: #FFFDF7 !important;
}

/* Floating Diorama Status Widgets (Upper-Right beside Till Slip, over curtain!) */
.cm-diorama-widgets {
  position: fixed !important;
  top: 60px !important;
  right: calc(clamp(298px, 20.2vw, 362px) + 22px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 7px !important;
  z-index: 33 !important;
  pointer-events: none !important;
}

.cm-diorama-widgets > * {
  pointer-events: auto !important;
}

.cm-widget-pill {
  box-sizing: border-box !important;
  height: 34px !important;
  padding: 0 7px !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 8px 13px 8px 13px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/hud_pill.png') 69 98 67 97 fill / 8px 13px 8px 13px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cozy-ink-deep) !important;
  font-size: 11.5px !important;
  filter: drop-shadow(0 3px 5px rgba(44, 23, 15, 0.26));
}

.cm-widget-pill.cm-stockout-pill,
.cm-widget-pill.cm-pilferer-pill,
.cm-widget-pill.cm-spill-pill {
  border-width: 8px 12px 8px 12px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_danger.png') 49 52 50 52 fill / 8px 12px 8px 12px / 0 stretch !important;
  color: #24110B !important;
  text-shadow: 0 1px 0 rgba(255, 238, 228, 0.45) !important;
}

.cm-rush-pill {
  box-sizing: border-box !important;
  height: 34px !important;
  padding: 0 8px !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 8px 10px 8px 10px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_legendary.png') 44 39 43 39 fill / 8px 10px 8px 10px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cozy-ink-deep) !important;
  filter: drop-shadow(0 0 6px rgba(244, 195, 94, 0.75)) drop-shadow(0 4px 8px rgba(44, 23, 15, 0.3));
}

.cm-toast-stack {
  position: fixed !important;
  left: 16px !important;
  bottom: 132px !important;
  z-index: 9600 !important;
  max-width: 390px !important;
  pointer-events: none !important;
}

.cm-toast {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 9px 13px 9px 13px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/hud_pill.png') 69 98 67 97 fill / 9px 13px 9px 13px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 6px !important;
  color: var(--cozy-ink-deep) !important;
  filter: drop-shadow(0 4px 8px rgba(44, 23, 15, 0.28));
}

/* Tutorial Coachmark — Centered on open floor so it NEVER blocks Cash Drawer or Cartons! */
.cm-tut-overlay {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  bottom: 14px !important;
  max-width: min(410px, 44vw) !important;
  z-index: 4500 !important;
}

/* ========================================================================= */
/* 8. MODALS — BOUTIQUE SHOP, NOTEBOOK, LICENSES, SEASONS, LEDGER, SETTINGS  */
/* ========================================================================= */

.cm-modal-backdrop {
  padding: 12px !important;
  background: rgba(44, 24, 16, 0.56) !important;
}

.cm-modal-card {
  position: relative !important;
  z-index: 6010 !important;
  display: flex !important;
  flex-direction: column !important;
  max-height: calc(100vh - 24px) !important;
  overflow: hidden !important;
  gap: 7px !important;
  padding: 6px 10px 8px 10px !important;
}

/* Persistent 3-star victory fan anchored cleanly ABOVE #modal-day-report frame (never fades out) */
#modal-day-report .cm-modal-card {
  position: relative !important;
  overflow: visible !important;
  margin-top: 38px !important;
  max-height: calc(100vh - 54px) !important;
}

.cm-modal-head,
.cm-modal-tabs,
.cm-modal-foot-grid,
.cm-shop-footer {
  flex-shrink: 0 !important;
}

.cm-giftcode-feedback {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-giftcode-feedback.is-error {
  background: #FDE8E6;
  border: 1.5px solid #CF5C52;
  color: #7D231B;
}

.cm-giftcode-feedback.is-ok {
  background: #E7F5DE;
  border: 1.5px solid #639A3F;
  color: #2B5719;
}

.cm-pass-meta-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.cm-cycle-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #EFE2C6;
  border: 1.5px solid #A8805B;
  color: var(--cozy-ink-deep);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.cm-cycle-badge.is-overflow {
  background: #FFE8A3;
  border-color: #C78920;
  color: #5C3408;
}

#btn-pass-claim-all {
  height: 28px !important;
  font-size: 11px !important;
  border-width: 6px 9px 6px 9px !important;
  white-space: nowrap !important;
}

/* UI Vault v2.2 Tactile Harmony (0 shadowBlur, badge-safe overflow: visible) */
.tb-btn-tactile {
  overflow: visible !important;
  box-shadow: inset 0 1px 0 var(--uiv-bevel-hi, rgba(255, 255, 255, 0.72)), inset 0 -2px 0 var(--uiv-bevel-lo, rgba(109, 69, 56, 0.28));
}

#modal-settings .cm-settings-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  gap: 6px !important;
  padding: 2px 2px 6px 2px !important;
}

#modal-settings .cm-setting-row {
  border-width: 8px 9px 8px 9px !important;
  padding: 3px 8px !important;
  gap: 3px !important;
}

#modal-settings .cm-chk-pill {
  border-width: 8px 8px 8px 8px !important;
  padding: 2px 6px !important;
  font-size: 11.5px !important;
}

#modal-seasons .cm-seasons-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  gap: 6px !important;
  padding: 2px 2px 8px 2px !important;
}

#modal-seasons .cm-pass-tier-card,
#modal-seasons .cm-pass-finale-card {
  border-width: 8px 8px 8px 8px !important;
  padding: 2px 4px !important;
  gap: 4px !important;
}

#modal-seasons .cm-pass-tier-card .cm-row-title,
#modal-seasons .cm-pass-finale-card .cm-row-title {
  font-size: 11px !important;
  line-height: 1.15 !important;
}

#modal-seasons .cm-pass-tier-card .cm-row-sub,
#modal-seasons .cm-pass-finale-card .cm-row-sub {
  font-size: 9.5px !important;
  line-height: 1.15 !important;
}

#modal-seasons .cm-pass-tier-card .cm-mini-btn,
#modal-seasons .cm-pass-finale-card .cm-mini-btn {
  height: 27px !important;
  border-width: 6px 8px 6px 8px !important;
  font-size: 10.5px !important;
}

#modal-seasons .cm-cards-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

#modal-seasons .cm-charms-grid .cm-grid-card {
  border-width: 8px 8px 8px 8px !important;
  padding: 2px 4px !important;
  gap: 4px !important;
}

#modal-seasons .cm-charms-grid .cm-grid-card-icon {
  width: 28px !important;
  height: 28px !important;
}

#modal-seasons .cm-charms-grid .cm-row-title {
  font-size: 11px !important;
  line-height: 1.15 !important;
}

#modal-seasons .cm-charms-grid .cm-row-sub {
  font-size: 9.5px !important;
  line-height: 1.15 !important;
}

#modal-seasons .cm-charms-grid .cm-mini-btn {
  height: 27px !important;
  border-width: 6px 7px 6px 7px !important;
  font-size: 10.5px !important;
}

#modal-seasons .cm-season-banner .cm-btn {
  height: 32px !important;
  font-size: 12px !important;
  border-width: 7px 10px 7px 10px !important;
}

#modal-shop .cm-shop-grid {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  gap: 8px !important;
  padding: 6px 4px 8px 4px !important;
}

#modal-shop .cm-shop-grid[data-count="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

#modal-shop .cm-shop-card {
  padding: 14px 6px 6px 6px !important;
  gap: 4px !important;
}

#modal-shop .cm-shop-art {
  width: 62px !important;
  height: 62px !important;
}

#modal-shop .cm-shop-card .btn-9slice,
#modal-shop .cm-shop-card .cm-btn {
  min-width: 104px !important;
  height: 34px !important;
  font-size: 12.5px !important;
}

#modal-licenses .cm-grid-card,
#modal-notebook .cm-grid-card {
  border-width: 9px 9px 9px 9px !important;
  padding: 3px 6px !important;
  gap: 5px !important;
}

.cm-ledger-star-fan {
  position: absolute;
  left: 50%;
  top: -84px;
  transform: translateX(-50%);
  width: 184px;
  height: 74px;
  pointer-events: none;
  z-index: 6;
  filter: drop-shadow(0 5px 10px rgba(84, 44, 14, 0.36));
}

.cm-ledger-star-fan svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

@keyframes cmLedgerStarSlam {
  0% { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(0.55); }
  58% { opacity: 1; transform: translateX(-50%) translateY(3px) scale(1.1); }
  80% { opacity: 1; transform: translateX(-50%) translateY(-1px) scale(0.97); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.cm-ledger-star-fan.is-slamming {
  animation: cmLedgerStarSlam 0.46s cubic-bezier(0.22, 1.3, 0.36, 1) both;
}

.cm-modal-tabs {
  gap: 6px !important;
  padding: 2px 2px 0 2px !important;
}

/* Rarity-Differentiated Stationery Cards inside Shop & Modals */
.cm-shop-card,
.cm-grid-card,
.cm-ledger-grid,
.cm-setting-row,
.cm-board-table,
.cm-chk-pill,
#exit-retention-modal .cm-exit-reward-card {
  box-sizing: border-box !important;
  background: transparent !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 11px 10px 11px 10px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_common.png') 44 37 43 41 fill / 11px 10px 11px 10px / 0 stretch !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cozy-ink) !important;
}

.cm-shop-card {
  padding: 18px 8px 8px 8px !important;
  filter: drop-shadow(0 4px 8px rgba(44, 23, 15, 0.2));
}

.cm-shop-card.is-featured,
.cm-pass-header-card,
.cm-chest-reward-item {
  border-width: 11px 10px 11px 10px !important;
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_legendary.png') 44 39 43 39 fill / 11px 10px 11px 10px / 0 stretch !important;
}

.cm-grid-card:nth-child(3n+2) {
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_rare.png') 44 38 43 38 fill / 11px 10px 11px 10px / 0 stretch !important;
}

.cm-grid-card:nth-child(3n+3) {
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_epic.png') 44 37 41 40 fill / 11px 10px 11px 10px / 0 stretch !important;
}

.cm-shop-badge {
  top: -11px !important;
  right: 6px !important;
  background: #6D4538 !important;
  color: #FFFDF7 !important;
  border: 2px solid #FBF2DF !important;
  box-shadow: 0 2px 4px rgba(44, 23, 15, 0.34);
  z-index: 10 !important;
}

.cm-shop-card .btn-9slice,
.cm-shop-card .cm-btn {
  min-width: 120px !important;
  height: 38px !important;
  font-size: 13.5px !important;
}

.cm-shop-title,
.cm-row-title {
  color: var(--cozy-ink-deep) !important;
}

.cm-shop-desc,
.cm-row-sub,
.cm-pane-hint,
.cm-cust-sub {
  color: var(--cozy-ink-muted) !important;
}

.cm-cust-sub {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: break-word !important;
  line-height: 1.2 !important;
  font-size: 10.5px !important;
}

.cm-theme-strip {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 4px !important;
}

.cm-theme-strip .cm-tiny-select {
  width: 100% !important;
  height: 26px !important;
  padding: 2px 6px !important;
  font-size: 11px !important;
}

.cm-search-input,
.cm-compact-select {
  background: #FFFDF7 !important;
  border: 2px solid #6D4538 !important;
  color: var(--cozy-ink-deep) !important;
}

/* Preview Debug Pill — tucked neatly out of the way */
.cm-debug-pill {
  bottom: 4px !important;
  left: 50% !important;
  background: rgba(251, 242, 223, 0.92) !important;
  border-color: #6D4538 !important;
  color: #4A2B1D !important;
}

/* ========================================================================= */
/* 9. PHOTO MODE (100% CLEAN SCENIC STORE VIEW)                              */
/* ========================================================================= */

body.is-photo-mode .cm-top-ribbon,
body.is-photo-mode #left-rail-panel,
body.is-photo-mode #right-workbench-panel,
body.is-photo-mode #carton-tray-wrap,
body.is-photo-mode #shoplift-rail,
body.is-photo-mode .cm-diorama-widgets,
body.is-photo-mode .cm-debug-pill,
body.is-photo-mode #tutorial-overlay {
  display: none !important;
}

/* ========================================================================= */
/* 10. 1280x720 / 1366x768 COMPACT LAPTOP GUARD (STRICT 1-ROW TOP HUD!)      */
/* ========================================================================= */

@media (max-width: 1480px) {
  .cm-top-ribbon {
    height: 46px !important;
    padding: 4px 8px 2px 8px !important;
    gap: 4px !important;
  }

  .cm-ribbon-left,
  .cm-ribbon-right {
    gap: 3px !important;
  }

  .cm-shop-badge-pill,
  .cm-pill {
    height: 30px !important;
    border-width: 6px 8px 6px 8px !important;
    border-image: url('../assets/ui/vault_cozy_stationery_craft/hud_pill.png') 69 98 67 97 fill / 6px 8px 6px 8px / 0 stretch !important;
    font-size: 10.5px !important;
    gap: 3px !important;
    padding: 0 2px !important;
  }

  .cm-shop-crest-pop {
    width: 24px !important;
    height: 24px !important;
    margin: -6px 1px -6px -7px !important;
  }

  .cm-shop-name-lbl {
    display: none !important;
  }

  .cm-currency-pill {
    font-size: 11px !important;
  }

  .cm-currency-pill > .uiv-icon-pop {
    width: 24px !important;
    height: 24px !important;
    margin: -6px 2px -6px -8px !important;
  }

  .cm-mini-pop {
    width: 18px !important;
    height: 18px !important;
    margin: -4px 1px -4px -4px !important;
  }

  #btn-shutter {
    height: 30px !important;
    font-size: 10px !important;
    border-width: 6px 8px 6px 8px !important;
    padding: 0 2px !important;
  }

  .cm-hud-btn {
    height: 30px !important;
    border-width: 6px 7px 6px 7px !important;
    font-size: 10.5px !important;
    padding: 0 4px !important;
    gap: 2px !important;
  }

  .cm-hud-btn > .uiv-icon-pop {
    width: 21px !important;
    height: 21px !important;
    margin: -5px 2px -5px -6px !important;
  }

  #btn-hud-radio .cm-btn-label {
    display: none !important;
  }

  #btn-hud-shop.cm-hud-shop-btn {
    height: 32px !important;
    font-size: 10.5px !important;
    padding: 0 7px 0 4px !important;
  }

  #btn-hud-seasons.cm-hud-seasons-btn,
  #btn-hud-notebook,
  #btn-hud-licenses {
    padding-right: 6px !important;
  }

  .cm-hud-icon-btn {
    width: 29px !important;
    height: 29px !important;
    border-width: 5px 5px 5px 5px !important;
  }

  .cm-hud-icon-btn .cm-icon-sm,
  .cm-hud-icon-btn .cm-vault-gear-icon {
    width: 17px !important;
    height: 17px !important;
  }

  #shoplift-rail.cm-shoplift-rail {
    top: 48px !important;
    left: 8px !important;
    gap: 3px !important;
  }

  .cm-lift-btn {
    height: 28px !important;
    font-size: 10.5px !important;
    border-width: 6px 8px 6px 8px !important;
  }

  .cm-hud-tips-pill {
    height: 28px !important;
    font-size: 10.5px !important;
    border-width: 6px 9px 6px 9px !important;
    gap: 3px !important;
    padding: 0 2px !important;
  }

  .cm-hud-tips-pill .cm-icon-sm {
    width: 15px !important;
    height: 15px !important;
  }

  #modal-settings .cm-modal-head h2,
  #modal-seasons .cm-modal-head h2,
  #modal-shop .cm-modal-head h2 {
    min-height: 36px !important;
    border-width: 8px 18px 8px 18px !important;
    padding: 2px 12px !important;
    font-size: 15.5px !important;
  }

  #modal-shop .cm-shop-art {
    width: 54px !important;
    height: 54px !important;
  }

  #modal-shop .cm-shop-title {
    font-size: 12.5px !important;
  }

  #modal-shop .cm-shop-desc {
    font-size: 10.5px !important;
  }

  #modal-shop .cm-shop-card .btn-9slice,
  #modal-shop .cm-shop-card .cm-btn {
    height: 32px !important;
    font-size: 12px !important;
    border-width: 7px 10px 7px 10px !important;
  }

  #left-rail-panel.cm-left-rail {
    top: 80px !important;
    left: 8px !important;
    width: 268px !important;
    max-height: calc(100vh - 196px) !important;
  }

  #left-rail-panel.is-drawer-collapsed {
    width: auto !important;
  }

  #right-workbench-panel.cm-right-workbench {
    top: 48px !important;
    right: 8px !important;
    width: 316px !important;
    max-height: calc(100vh - 56px) !important;
  }

  #right-workbench-panel > .cm-rail-pane {
    border-width: 10px 10px 11px 10px !important;
    padding: 3px 4px !important;
    gap: 4px !important;
    max-height: calc(100vh - 88px) !important;
  }

  .cm-tab-btn {
    height: 28px !important;
    font-size: 10.5px !important;
    min-width: 46px !important;
    padding: 0 4px !important;
  }

  .cm-tab-btn.is-active {
    height: 31px !important;
  }

  .cm-till-customer {
    border-width: 8px 8px 8px 8px !important;
  }

  .cm-cust-avatar {
    width: 32px !important;
    height: 38px !important;
  }

  .cm-belt-grid {
    min-height: 48px !important;
    gap: 4px !important;
  }

  .cm-belt-item img,
  .cm-belt-item .cm-icon-md {
    width: 28px !important;
    height: 28px !important;
  }

  .cm-denom-btn {
    height: 30px !important;
    font-size: 11.5px !important;
  }

  .cm-drawer-actions .cm-btn {
    height: 33px !important;
    font-size: 11.5px !important;
  }

  .cm-diorama-widgets {
    top: 56px !important;
    right: 332px !important;
    gap: 5px !important;
  }

  .cm-widget-pill {
    height: 29px !important;
    font-size: 10.5px !important;
    border-width: 6px 10px 6px 10px !important;
  }

  .cm-widget-pill.cm-stockout-pill,
  .cm-widget-pill.cm-pilferer-pill,
  .cm-widget-pill.cm-spill-pill {
    border-width: 6px 10px 6px 10px !important;
  }

  #carton-tray-wrap.cm-carton-tray {
    left: 8px !important;
    bottom: 8px !important;
    width: auto !important;
    min-width: 280px !important;
    max-width: min(468px, 40vw) !important;
    border-width: 8px 9px 8px 9px !important;
    padding: 2px 4px 2px 4px !important;
  }

  .cm-carton-header {
    font-size: 10.5px !important;
    gap: 4px !important;
    margin-bottom: 3px !important;
  }

  .cm-carton-title-group {
    gap: 3px !important;
  }

  .cm-carton-title-group .cm-icon-md {
    width: 16px !important;
    height: 16px !important;
  }

  .cm-carton-title-group strong {
    font-size: 10.5px !important;
    max-width: 78px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #carton-count-badge,
  #lbl-aisle-margin {
    font-size: 9.5px !important;
    padding: 1px 5px !important;
  }

  .cm-carton-actions {
    gap: 3px !important;
  }

  #btn-restock-all {
    height: 25px !important;
    font-size: 10px !important;
    border-width: 5px 7px 5px 7px !important;
    padding: 0 2px !important;
  }

  .cm-carton-actions .cm-mini-btn:not(#btn-restock-all) {
    height: 25px !important;
    min-width: 24px !important;
    border-width: 5px 5px 5px 5px !important;
    padding: 0 2px !important;
    font-size: 9.5px !important;
  }

  .cm-carton-card {
    width: 68px !important;
    height: 58px !important;
  }

  .cm-carton-icons {
    width: 38px !important;
    height: 32px !important;
  }

  .cm-carton-box-img {
    width: 34px !important;
    height: 32px !important;
  }

  .cm-carton-prod-img {
    width: 20px !important;
    height: 20px !important;
  }
}

.cm-new-game-modal {
  max-width: 440px !important;
  width: min(440px, 92vw) !important;
}

.cm-new-game-warn-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  margin: 8px 0 14px;
  background: rgba(255, 244, 232, 0.92);
  border: 2px solid #D97A54;
  border-radius: 12px;
  color: #4A2416;
}

.cm-new-game-summary {
  font-weight: 800;
  font-size: 14px;
  color: #7D2E1D;
  background: rgba(232, 98, 85, 0.12);
  border: 1px solid rgba(198, 59, 47, 0.28);
  border-radius: 8px;
  padding: 6px 10px;
  text-align: center;
}

.cm-new-game-warn-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 600;
  color: #4A2416;
  text-align: center;
}

.cm-btn.cm-btn-danger {
  background: linear-gradient(180deg, #E86A5A 0%, #C43D2F 100%) !important;
  border: 2px solid #7E2017 !important;
  color: #FFFDF8 !important;
  text-shadow: 0 1px 2px rgba(68, 14, 10, 0.45);
}

.cm-btn.cm-btn-danger:hover {
  filter: brightness(1.06);
}

/* ========================================================================= */
/* 11. RC11 UX CLARITY: HELP MODAL, CARD TERMINAL PROMPT, SHUTTER CONFIRM    */
/* ========================================================================= */

.cm-help-pill {
  position: relative !important;
  z-index: 12 !important;
  pointer-events: auto !important;
}

.cm-help-pill span {
  pointer-events: none;
}

#modal-guide {
  z-index: 6200 !important;
}

.cm-guide-head {
  width: 100%;
  margin-bottom: -4px;
}

.cm-guide-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: #F4D89E;
  border: 1.5px solid #6D4538;
  color: #3D2216;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cm-pay-tag.is-card {
  background: #2E73D9 !important;
  border-color: #1A468A !important;
  color: #FFFDF8 !important;
}

.cm-card-terminal {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-card-terminal-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #EAF2FF;
  border: 1.5px solid #4A83D6;
  color: #1A3C72;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
}

.cm-card-chip-svg {
  flex-shrink: 0;
  color: #2E73D9;
}

.cm-card-terminal.is-ready .cm-card-terminal-banner {
  background: #D8ECFF;
  border-color: #1E64C8;
  color: #103266;
  box-shadow: 0 0 0 2px rgba(46, 115, 217, 0.24);
}

@keyframes cmCardReadyPulse {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 4px rgba(46, 115, 217, 0.45)); }
  50% { filter: brightness(1.08) drop-shadow(0 0 10px rgba(46, 115, 217, 0.85)); }
}

.cm-card-terminal.is-ready #btn-pay-card:not(:disabled) {
  animation: cmCardReadyPulse 1.35s ease-in-out infinite;
}

#till-scan-prompt.is-card-ready {
  color: #1A4B96 !important;
  font-weight: 800 !important;
}

#till-cust-sub.is-card-ready {
  color: #1A4B96 !important;
  font-weight: 800 !important;
}

#btn-shutter.cm-btn-confirm-warn {
  border-image: url('../assets/ui/vault_cozy_stationery_craft/btn_danger.png') 50 53 49 54 fill / 9px 12px 9px 12px / 0 stretch !important;
  color: #FFFDF8 !important;
  text-shadow: 0 1px 2px rgba(56, 14, 10, 0.55) !important;
}

@media (max-width: 1480px) {
  #btn-shutter.cm-btn-confirm-warn {
    border-width: 6px 8px 6px 8px !important;
  }
  .cm-card-terminal-banner {
    padding: 4px 6px;
    font-size: 10.5px;
  }
}

/* ========================================================================= */
/* 12. RC18 ECONOMY, STAR GEM BOUTIQUE, PATRON CREST, CHECK-IN & POLISH      */
/* ========================================================================= */

.cm-gem-chip-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: -3px;
  flex-shrink: 0;
  pointer-events: none;
}

.cm-inline-gem-chip {
  width: 13px;
  height: 13px;
  object-fit: contain;
  vertical-align: -2px;
  margin-right: 2px;
}

.cm-gem-cost-btn,
.cm-title-with-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
}

#modal-shop .cm-shop-grid[data-count="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#modal-shop .cm-shop-grid[data-count="5"] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Golden Cloverbell Patron Shopfront Crest in Top HUD */
.cm-patron-crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFE896 0%, #DF9B2C 100%);
  border: 2px solid #6B4423;
  box-shadow: 0 1px 3px rgba(62, 34, 16, 0.35);
  flex-shrink: 0;
}

.cm-patron-crest.is-hidden {
  display: none !important;
}

.cm-patron-crest img {
  width: 15px !important;
  height: 15px !important;
}

/* Offline Idle Ledger Collect Pill */
.cm-idle-ledger-pill {
  background: linear-gradient(180deg, #FFF3CC 0%, #F2CF78 100%) !important;
  border-color: #8C5C1C !important;
  color: #4A2B12 !important;
  font-weight: 800 !important;
}

/* #3895: Always-visible Title Secondary Navigation Row */
.cm-title-secondary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.cm-title-sec-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(253, 246, 227, 0.92);
  border: 1.8px solid #8E624F;
  color: #4A2C22;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.cm-title-sec-btn:hover:not(:disabled) {
  background: #FFF6DC;
  border-color: #C98A2E;
  transform: translateY(-1px);
}

.cm-title-sec-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* #3896: Prevent Exact Change till button text truncation across all 9 languages */
.cm-drawer-actions.has-helper {
  grid-template-columns: 0.78fr 1.22fr !important;
  gap: 5px !important;
}

.cm-drawer-actions.has-helper #btn-submit-change {
  grid-column: 1 / -1 !important;
}

.cm-drawer-actions.has-helper #btn-exact-helper {
  border-width: 7px 9px 7px 9px !important;
  padding: 0 6px !important;
}

.cm-drawer-actions.has-helper #btn-exact-helper > span {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

/* 7-Day Cozy Market Check-In Calendar Grid inside Notebook (all 7 days visible above the fold at 720p!) */
#notebook-content-grid.is-calendar-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

#notebook-content-grid.is-calendar-grid .cm-cal-card.is-grand-day7 {
  grid-column: span 2;
}

.cm-calendar-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #FFF6E0;
  border: 2px solid #D4A46A;
  color: #4A2A1A;
  font-weight: 800;
  font-size: 13px;
}

.cm-cal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  gap: 5px;
  padding: 8px 6px !important;
}

.cm-cal-card.is-today {
  border-image: url('../assets/ui/vault_cozy_stationery_craft/card_legendary.png') 44 39 43 39 fill / 11px 10px 11px 10px / 0 stretch !important;
}

.cm-cal-art {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.cm-cal-reward {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #4A2A1A;
}

/* Seasons Charms & Hall dual-banner row (Prosperity + Artisan Heritage Showcase) */
.cm-hall-dual-banners {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 1366px) {
  .cm-drawer-actions.has-helper .cm-btn {
    height: 30px !important;
    font-size: 11px !important;
  }
  .cm-drawer-actions.has-helper #btn-exact-helper > span {
    font-size: 11px !important;
  }
  #modal-shop .cm-shop-grid[data-count="6"] .cm-shop-card {
    padding: 10px 6px 6px 6px !important;
  }
  #modal-shop .cm-shop-grid[data-count="6"] .cm-shop-art {
    width: 48px !important;
    height: 48px !important;
  }
}

/* #4093: Hide staggered locked secondary HUD buttons/tabs cleanly at early levels */
.is-feature-locked {
  display: none !important;
}

/* #3441: Crisp tactile error shake on premature Give Change & invalid gift code */
@keyframes cm-shake-error {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.is-shake-error {
  animation: cm-shake-error 0.34s ease !important;
}
