/* Snowkeep Manor: Merge & Story — Cozy Stationery Craft Stylesheet (100% Offline, 0 External Fonts, 0 Backdrop Blur) */

:root {
  --font-display: 'Fredoka', 'M PLUS Rounded 1c', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Quicksand', 'Segoe UI', 'Trebuchet MS', system-ui, sans-serif;
  --ink: #4A2C20;
  --ink-soft: #6D4538;
  --cream: #FBF2DF;
  --cream-bright: #FFFDF7;
  --oak: #B38864;
  --oak-deep: #805841;
  --gold: #F4B956;
  --sage: #83B84E;
  --sky: #68B2D8;
  --coral: #CF5C52;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background: #DFD5C3 url('../assets/art/arena_bg.jpg') center center / cover no-repeat;
  user-select: none;
  -webkit-user-select: none;
}

.hidden {
  display: none !important;
}

/* Override UI Vault ink text to warm high-contrast cocoa-brown across all 9-slice surfaces */
[class*="uiv-cozy_stationery_craft-"] {
  color: var(--ink) !important;
  font-family: var(--font-display) !important;
  overflow: visible;
}

button {
  font-family: var(--font-display);
  color: var(--ink);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: visible !important;
}

button:disabled {
  opacity: 0.68;
  cursor: default;
}

/* =========================================================
   HEROIC NO-BOX TITLE SCREEN (Full-Bleed Key Art, 0 Login Box!)
   ========================================================= */
#title-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: url('../assets/art/title_bg.jpg') center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 34px;
}

.title-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(255, 248, 232, 0.08) 0%, rgba(58, 40, 33, 0.42) 100%);
}

.title-top-bar {
  position: relative;
  z-index: 5;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.title-corner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 800;
  border-width: 10px 14px 10px 14px !important;
  border-image-width: 10px 14px 10px 14px !important;
}

.title-corner-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ZERO background/border box wrapping H1 — floats directly over Key Art! */
.title-hero-stage {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.title-portrait-wrap {
  width: 136px;
  height: 136px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#title-clara-portrait {
  width: 126px;
  height: 126px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(74, 44, 32, 0.35));
}

.title-main-h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 5.2vw, 74px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0.5px;
  color: #FFFDF5;
  -webkit-text-stroke: 2.5px #5A382A;
  text-shadow: 0 5px 0 #5A382A, 0 10px 18px rgba(58, 36, 26, 0.38);
}

.title-subtitle {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 28px);
  font-weight: 800;
  color: #FFF6DC;
  -webkit-text-stroke: 1.2px #5A382A;
  text-shadow: 0 3px 0 #5A382A;
}

.title-cta-zone {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#btn-title-play {
  min-width: 240px;
  height: 62px;
  padding: 0 28px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3B2318 !important;
  filter: drop-shadow(0 6px 0 rgba(74, 44, 32, 0.35));
  transition: transform 0.14s ease;
}

#btn-title-play:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
}

.title-loader-box {
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: opacity 0.3s ease;
}

.title-loader-box.is-done {
  opacity: 0.92;
}

.title-loader-track {
  width: 100%;
  height: 24px;
  border-width: 8px 12px 6px 12px !important;
  border-image-width: 8px 12px 6px 12px !important;
  position: relative;
  overflow: hidden;
  padding: 0;
}

#title-loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #98CE58, #F4C353);
  border-radius: 6px;
  transition: width 0.18s ease;
}

#title-loader-text {
  font-size: 13px;
  font-weight: 800;
  color: #FFFDF7;
  text-shadow: 0 2px 3px #4A2C20;
}

/* =========================================================
   FULL-BLEED GAMEPLAY CANVAS & FLOATING CORNER HUD
   ========================================================= */
#game-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100vw;
  height: 100vh;
}

#ui-motion-overlay,
#cutin-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

#ui-motion-overlay { z-index: 25; }
#cutin-canvas { z-index: 80; }

#game-ui {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

/* TOP HUD BAR — strict flex-wrap: nowrap at 1280x720 */
.top-hud-bar {
  position: absolute;
  top: 6px;
  left: 10px;
  right: 10px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  pointer-events: none;
}

.hud-group {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  pointer-events: none;
}

.hud-pill-box {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 8px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border-width: 10px 14px 10px 14px !important;
  border-image-width: 10px 14px 10px 14px !important;
}

.hud-pill-box img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.hud-plus-btn {
  pointer-events: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #B8E07A;
  color: #3B2318;
  font-size: 16px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  border: 2px solid var(--ink);
  flex-shrink: 0;
}

.hud-nav-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 44px;
  padding: 0 8px;
  white-space: nowrap;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 800;
  border-width: 9px 11px 9px 11px !important;
  border-image-width: 9px 11px 9px 11px !important;
}

.hud-nav-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.hud-nav-btn span.lbl {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 92px;
}

.hud-icon-only {
  width: 44px;
  padding: 0;
}

.hud-nav-btn.is-off,
.hud-nav-btn.is-muted {
  opacity: 0.72;
}

/* Red-Dot Notification Badge — floats OUTSIDE top-right, NEVER clipped */
.notify-badge {
  position: absolute;
  top: -8px;
  right: -7px;
  z-index: 30;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #D94848;
  color: #FFFDF7;
  border: 2px solid #FFFDF7;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

/* GUEST ORDERS RAIL (Floating cleanly above the 7x9 Merge Board) */
#orders-rail {
  position: absolute;
  top: 62px;
  left: 18px;
  width: calc(61vw - 24px);
  height: 78px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  pointer-events: none;
}

.order-card {
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 76px;
  padding: 0 6px;
  min-width: 0;
  border-width: 10px 10px 10px 10px !important;
  border-image-width: 10px 10px 10px 10px !important;
}

.order-card.ready {
  filter: drop-shadow(0 0 6px rgba(131, 184, 78, 0.55));
}

.order-item-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

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

.order-name {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-rewards {
  display: flex;
  align-items: center;
  gap: 6px;
}

.order-serve-btn {
  flex-shrink: 0;
  height: 36px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 900;
  border-width: 7px 9px 7px 9px !important;
  border-image-width: 7px 9px 7px 9px !important;
}

.order-tier-pill {
  flex-shrink: 0;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(109, 69, 56, 0.14);
  font-size: 12px;
  font-weight: 800;
}

/* LIVE MANOR INLINE CONTROLS (positioned cleanly right under Canvas Diorama) */
#manor-inline-controls {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 48px;
  pointer-events: none;
}

.decor-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: auto;
}

.decor-chip-btn {
  height: 36px;
  padding: 0 5px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  border-width: 7px 8px 7px 8px !important;
  border-image-width: 7px 8px 7px 8px !important;
}

.decor-chip-btn.is-picked {
  filter: drop-shadow(0 2px 5px rgba(244, 185, 86, 0.7));
  transform: translateY(-2px);
}

#btn-manor-quick-reno {
  pointer-events: auto;
  height: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  border-width: 9px 11px 9px 11px !important;
  border-image-width: 9px 11px 9px 11px !important;
}

#btn-manor-quick-reno img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* BOTTOM BOARD ACTION DOCK (Compact Round 5 proportions, zero bloat!) */
.bottom-dock {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 8px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.dock-selected-panel {
  pointer-events: auto;
  position: relative;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 12px;
  min-width: 220px;
  max-width: min(520px, 50vw);
  border-width: 10px 14px 10px 14px !important;
  border-image-width: 10px 14px 10px 14px !important;
  transition: opacity 0.16s ease;
}

.dock-selected-panel.tut-suppressed {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

#sel-item-name {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-mini-btn {
  height: 36px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  border-width: 7px 9px 7px 9px !important;
  border-image-width: 7px 9px 7px 9px !important;
}

.dock-tools-row {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

/* Round 5 Compact Tool Buttons (70x70 with 42px icon -> 60% fill!) */
.tool-btn {
  pointer-events: auto;
  height: 68px;
  min-width: 74px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 900;
  border-width: 10px 12px 10px 12px !important;
  border-image-width: 10px 12px 10px 12px !important;
}

.tool-btn img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.tool-btn.is-active-boost {
  filter: drop-shadow(0 0 8px rgba(244, 185, 86, 0.85));
}

.tool-count {
  position: absolute;
  top: -8px;
  right: -7px;
  z-index: 25;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #6D4538;
  color: #FFFDF7;
  border: 2px solid #FFFDF7;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fever-dock-box {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding: 0 10px;
  border-width: 10px 14px 10px 14px !important;
  border-image-width: 10px 14px 10px 14px !important;
}

.fever-track {
  width: 112px;
  height: 18px;
  background: #C7B299;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}

#fever-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #F5A342, #FFD764);
  transition: width 0.2s ease;
}

#btn-dock-fever {
  height: 40px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  border-width: 8px 10px 8px 10px !important;
  border-image-width: 8px 10px 8px 10px !important;
}

/* =========================================================
   FLEX-SCROLL ANTI-SAAS 60/25/15 MODALS (ZERO CLIPPING @ 720p!)
   ========================================================= */
#modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(45, 29, 22, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

#active-modal-card.modal-card {
  width: min(940px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 6px 10px 10px;
}

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

.modal-ribbon {
  flex: 1 1 auto;
  min-width: 0;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  border-width: 11px 18px 11px 18px !important;
  border-image-width: 11px 18px 11px 18px !important;
}

.modal-head-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.modal-help-btn {
  width: 40px;
  height: 40px;
  font-size: 18px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 8px 9px 8px 9px !important;
  border-image-width: 8px 9px 8px 9px !important;
}

.modal-close-x {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close-x img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 14px 12px;
}

.modal-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.modal-tab {
  height: 42px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 800;
  border-width: 9px 14px 9px 14px !important;
  border-image-width: 9px 14px 9px 14px !important;
}

.pass-claim-all-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

#btn-pass-claim-all {
  height: 42px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 9px 14px 9px 14px !important;
  border-image-width: 9px 14px 9px 14px !important;
}

.wing-strip {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.wing-chip {
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
  border-width: 8px 10px 8px 10px !important;
  border-image-width: 8px 10px 8px 10px !important;
}

/* Balanced Containment Grids (minmax(0, 1fr)!) */
.shop-grid,
.cards-grid,
.m-grid {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

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

/* Visual-First 60/25/15 Cards (>=55% Artwork, <=3 word Title, Icon Currency Chips) */
.shop-card,
.upgrade-card,
.quest-card,
.season-card,
.story-card,
.stash-card,
.exit-jump-card,
.exit-jump-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 4px 6px 6px;
  text-align: center;
  position: relative;
}

.shop-art-wrap,
.card-art-box,
.m-art-box {
  width: 100%;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-art,
.card-art-img,
.m-art-img {
  max-width: 92%;
  max-height: 88px;
  width: auto;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px rgba(74, 44, 32, 0.22));
}

.card-art-img.is-locked-art,
.m-art-img.is-locked-art {
  filter: grayscale(0.9) opacity(0.45);
}

.shop-badge {
  position: absolute;
  top: -8px;
  right: 8px;
  z-index: 6;
  padding: 2px 8px;
  border-radius: 999px;
  background: #D85A4A;
  color: #FFFDF7;
  border: 2px solid #FFFDF7;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.card-title,
.m-title {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.card-delta,
.card-perk,
.m-delta {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
}

.cur-chip-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cur-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

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

.shop-buy-btn,
.card-cta,
.m-cta {
  width: 100%;
  height: 38px;
  font-size: 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 8px 10px 8px 10px !important;
  border-image-width: 8px 10px 8px 10px !important;
}

/* Settings Panel */
.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 8px;
  border-width: 12px 12px 12px 12px !important;
  border-image-width: 12px 12px 12px 12px !important;
}

.set-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.set-lbl,
.set-sec-title {
  font-size: 14px;
  font-weight: 800;
  min-width: 108px;
}

.set-line input[type="range"] {
  flex: 1 1 160px;
  accent-color: #83B84E;
}

.set-tog {
  min-width: 68px;
  height: 36px;
  font-size: 13px;
  font-weight: 900;
  border-width: 7px 10px 7px 10px !important;
  border-image-width: 7px 10px 7px 10px !important;
}

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

.lang-btn {
  height: 38px;
  font-size: 13px;
  font-weight: 800;
  border-width: 8px 10px 8px 10px !important;
  border-image-width: 8px 10px 8px 10px !important;
}

.gift-input {
  flex: 1 1 180px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 2px solid var(--ink-soft);
  background: #FFFDF7;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
}

.set-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.set-actions button {
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  border-width: 8px 10px 8px 10px !important;
  border-image-width: 8px 10px 8px 10px !important;
}

.set-saved-note {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

/* Exit Retention Modal */
.exit-wrap,
.celeb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 6px;
}

.exit-headline {
  font-size: 18px;
  font-weight: 900;
}

.exit-offline {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.exit-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 6px;
}

.exit-actions button {
  min-width: 150px;
  height: 46px;
  font-size: 15px;
  font-weight: 900;
  border-width: 9px 14px 9px 14px !important;
  border-image-width: 9px 14px 9px 14px !important;
}

/* 3-Icon Visual Flow Guide */
.guide-flow-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
}

.guide-step-card {
  flex: 1 1 0;
  max-width: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.guide-step-img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.guide-step-label {
  font-size: 15px;
  font-weight: 900;
}

.guide-arrow {
  font-size: 28px;
  font-weight: 900;
  color: var(--oak-deep);
}

.guide-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.guide-ok-btn,
.celeb-claim-btn {
  min-width: 180px;
  height: 48px;
  font-size: 16px;
  font-weight: 900;
  border-width: 10px 16px 10px 16px !important;
  border-image-width: 10px 16px 10px 16px !important;
}

/* Chest & Victory Celebrations */
.chest-hero-img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.victory-sub {
  font-size: 18px;
  font-weight: 900;
}

.celeb-rewards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.celeb-loot-chip {
  min-width: 104px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 17px;
  font-weight: 900;
}

.loot-ico {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.stash-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px;
  text-align: center;
}

.stash-empty-ico {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.stash-empty-txt {
  font-size: 15px;
  font-weight: 800;
}

/* Visual Spotlight FTUE (tut-hand & tut-spotlight) */
.tut-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.tut-spotlight {
  position: absolute;
  border: 4px solid #FFE27A;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(42, 26, 20, 0.32);
  animation: tutPulse 1.1s ease-in-out infinite;
  pointer-events: none;
}

.tut-hand {
  position: absolute;
  z-index: 52;
  pointer-events: none;
  animation: tutBounce 0.9s ease-in-out infinite;
}

.tut-pill {
  position: absolute;
  z-index: 52;
  padding: 4px 12px;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
  border-width: 10px 16px 10px 16px !important;
  border-image-width: 10px 16px 10px 16px !important;
}

.tut-skip {
  position: fixed;
  top: 66px;
  right: 18px;
  z-index: 55;
  pointer-events: auto;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
  border-width: 8px 11px 8px 11px !important;
  border-image-width: 8px 11px 8px 11px !important;
}

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

@keyframes tutBounce {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, 9px); }
}

/* Floating Selected-Item Tooltip (high z-index, viewport-clamped, never behind board cells!) */
.board-item-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 48;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  background: #FFFDF7;
  color: var(--ink);
  border: 2.5px solid #6D4538;
  box-shadow: 0 5px 14px rgba(58, 36, 26, 0.28);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  max-width: calc(100vw - 24px);
}

.board-item-tooltip .tip-tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 7px;
  background: #83B84E;
  color: #FFFDF7;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}

.board-item-tooltip .tip-sub {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-left: 2px;
}

/* Toast Notification */
#game-toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%) translateY(16px);
  z-index: 90;
  padding: 8px 18px;
  border-radius: 999px;
  background: #4A2C20;
  color: #FFFDF7;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

#game-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Preview-Only Debug Panel (strictly hidden when __MS_RELEASE__ === true) */
.dev-f2-pill {
  position: fixed;
  left: 14px;
  bottom: 84px;
  z-index: 95;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(74, 44, 32, 0.82);
  color: #FFFDF7;
  font-size: 12px;
  font-weight: 800;
}

.debug-panel {
  position: fixed;
  left: 14px;
  bottom: 116px;
  z-index: 96;
  width: 200px;
  padding: 10px;
  border-radius: 12px;
  background: #FBF2DF;
  border: 2px solid #5A382A;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dev-title {
  font-size: 13px;
  font-weight: 900;
}

.debug-panel button {
  padding: 6px 8px;
  border-radius: 8px;
  background: #E9D2AD;
  border: 1.5px solid #6D4538;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

/* Compact 720p & narrow viewport tuning */
@media (max-width: 1366px) {
  .hud-pill-box {
    height: 42px;
    font-size: 13px;
    padding: 0 6px;
    border-width: 9px 12px 9px 12px !important;
    border-image-width: 9px 12px 9px 12px !important;
  }
  .hud-nav-btn {
    height: 40px;
    padding: 0 5px;
    font-size: 12px;
    gap: 4px;
  }
  .hud-nav-btn span.lbl {
    max-width: 64px;
  }
  .hud-icon-only {
    width: 38px;
  }
}

@media (max-height: 780px) {
  .season-card .m-art-box {
    height: 76px;
  }
  .season-card .m-art-img {
    height: 68px;
    max-height: 72px;
  }
  .season-card .m-cta {
    height: 34px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  #orders-rail {
    width: calc(100vw - 24px);
    left: 12px;
  }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
