/* ============================================================================
 * Cedarcrest Valley Merge (d465e50193f2) — Commercial Cozy Stationery Stylesheet
 * UI Vault: cozy_stationery_craft · Archetype: cozy_pastel_storybook
 * - STRICTLY ZERO external Google Fonts (@import / fonts.googleapis.com)
 * - STRICTLY ZERO backdrop-filter: blur
 * - High-contrast cocoa ink on warm cream/pastel stationery surfaces
 * - Round 5 & Round 8 Spatial Proportions + 9-Language 720p/1080p Safe
 * ============================================================================ */

:root {
  --cv-font-display: 'Trebuchet MS', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --cv-font-body: 'Segoe UI', 'Trebuchet MS', system-ui, -apple-system, sans-serif;
  --cv-paper: #FBF2DF;
  --cv-paper-warm: #F6E6C4;
  --cv-ink: #3A2218;
  --cv-ink-soft: #634133;
  --cv-cedar: #6D4538;
  --cv-green: #83B84E;
  --cv-sky: #68B2D8;
  --cv-coral: #CF5C52;
  --cv-gold: #D97706;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #3A2821;
  color: var(--cv-ink);
  font-family: var(--cv-font-body);
  user-select: none;
}

.hidden {
  display: none !important;
}

/* Solid light/pastel fallback fills behind 9-slice border-images so contrast is always >= 7:1 */
.uiv-cozy_stationery_craft-frame-modal,
.uiv-cozy_stationery_craft-frame-subpanel,
.uiv-cozy_stationery_craft-hud-pill,
.uiv-cozy_stationery_craft-slot-tile,
.uiv-cozy_stationery_craft-card-common,
.uiv-cozy_stationery_craft-card-rare,
.uiv-cozy_stationery_craft-card-epic,
.uiv-cozy_stationery_craft-card-legendary {
  background-color: #FBF2DF;
  color: #3A2218;
}

.uiv-cozy_stationery_craft-ribbon-header {
  background-color: #F2DFB8;
  color: #3A2218;
}

.uiv-cozy_stationery_craft-btn-primary {
  background-color: #9ED06C;
  color: #233810;
}

.uiv-cozy_stationery_craft-btn-secondary {
  background-color: #8AC8E8;
  color: #16364A;
}

.uiv-cozy_stationery_craft-btn-danger {
  background-color: #EA8B82;
  color: #3B120E;
}

.uiv-cozy_stationery_craft-btn-disabled {
  background-color: #DDD2BE;
  color: #54463C;
}

.uiv-cozy_stationery_craft-tab-active {
  background-color: #F6DF9E;
  color: #3A2218;
}

img.currency-chip {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  flex: 0 0 20px;
  pointer-events: none;
}

/* ==========================================================================
 * 1. Boot Progress Loader (0-100%)
 * ========================================================================== */
.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, #5C4336 0%, #2F201A 100%);
  transition: opacity 220ms ease;
}

.boot-loader.is-done {
  opacity: 0;
  pointer-events: none;
}

.boot-card {
  width: min(420px, 88vw);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.boot-title {
  font-family: var(--cv-font-display);
  font-size: 24px;
  font-weight: 900;
  color: #3A2218;
}

.boot-bar-track {
  width: 100%;
  height: 26px;
  padding: 2px;
  border-width: 7px 10px !important;
  border-image-width: 7px 10px !important;
  display: flex;
  align-items: center;
  background-color: #E5D4B3;
}

.boot-bar-fill {
  height: 100%;
  width: 8%;
  border-width: 4px 6px !important;
  border-image-width: 4px 6px !important;
  background-color: #83B84E;
  transition: width 120ms ease-out;
}

.boot-pct {
  font-size: 14px;
  font-weight: 800;
  color: #5A392E;
}

/* ==========================================================================
 * 2. Heroic No-Box Sunlit Valley Title Screen (0 BOXED_LOGIN_TITLE_SCREEN)
 * ========================================================================== */
.title-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 20px 26px;
}

.title-bg-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../assets/art/title_bg.jpg') center center / cover no-repeat;
}

.title-bg-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 56%, rgba(46, 30, 20, 0.08) 0%, rgba(36, 24, 16, 0.36) 100%);
}

.title-top-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.title-corner-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.title-util-pill {
  height: 40px;
  padding: 4px 14px;
  border-width: 7px 14px !important;
  border-image-width: 7px 14px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}

.title-hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  margin: auto 0;
}

.title-mascot-wrap {
  position: relative;
  width: clamp(148px, 16vw, 210px);
  height: clamp(148px, 16vw, 210px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.title-mascot-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(32, 20, 12, 0.42));
}

.game-title {
  margin: 0;
  font-family: var(--cv-font-display);
  font-size: clamp(38px, 4.6vw, 68px);
  font-weight: 900;
  line-height: 1.06;
  color: #FFFDF7;
  -webkit-text-stroke: 2.5px #4A2E22;
  text-shadow: 0 4px 0 #4A2E22, 0 8px 16px rgba(24, 14, 8, 0.55);
}

.game-subtitle {
  margin: -2px 0 4px;
  font-family: var(--cv-font-display);
  font-size: clamp(15px, 1.45vw, 21px);
  font-weight: 800;
  color: #FFF6DC;
  text-shadow: 0 2px 5px rgba(28, 16, 10, 0.88);
}

.title-cta-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.title-play-cta {
  min-width: 264px;
  height: 56px;
  padding: 6px 32px;
  border-width: 11px 24px !important;
  border-image-width: 11px 24px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 900;
}

.title-secondary-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.title-sec-btn {
  height: 44px;
  padding: 4px 18px;
  border-width: 9px 18px !important;
  border-image-width: 9px 18px !important;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
}

/* ==========================================================================
 * 3. Full-Bleed 16:9 Gameplay Screen + Floating Corner HUD (Single-Row!)
 * ========================================================================== */
.game-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  touch-action: none;
}

/* Grounded Characters (Left: Artisan · Right: Baker, pointer-events: none) */
.char-dock {
  position: fixed;
  bottom: 8px;
  width: 184px;
  height: 204px;
  z-index: 18;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.char-dock-left {
  left: 10px;
}

.char-dock-right {
  right: 10px;
}

.char-dock canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* Floating Top HUD — strictly single-row nowrap at 1920x1080 and 1280x720! */
.top-hud {
  position: fixed;
  top: 8px;
  left: 12px;
  right: 12px;
  z-index: 30;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

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

.hud-pill-box {
  pointer-events: auto;
  height: 40px;
  padding: 3px 12px;
  border-width: 6px 14px 6px 12px !important;
  border-image-width: 6px 14px 6px 12px !important;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 800;
  color: #3A2218;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hud-clickable {
  cursor: pointer;
}

.hud-clickable.is-armed {
  outline: 2.5px solid #2F855A;
  outline-offset: 1px;
}

.hud-mini-bar {
  width: 58px;
  height: 14px;
  padding: 1px;
  border-width: 4px 5px !important;
  border-image-width: 4px 5px !important;
  display: inline-flex;
  align-items: center;
  background-color: #E5D4B3;
}

.hud-mini-fill {
  height: 100%;
  width: 100%;
  border-width: 3px 4px !important;
  border-image-width: 3px 4px !important;
  background-color: #83B84E;
  transition: width 160ms ease;
}

.hud-icon-btn {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 5px;
  border-width: 6px 7px !important;
  border-image-width: 6px 7px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #3A2218;
  overflow: visible !important;
}

.hud-icon-btn img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  pointer-events: none;
}

/* ==========================================================================
 * 4. Perpetual 3-Order Villager Strip (Top-Center Floating Stationery Cards)
 * ========================================================================== */
.orders-strip {
  position: fixed;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  max-width: min(860px, 92vw);
}

.order-ticket-card {
  pointer-events: auto;
  min-width: 196px;
  max-width: 268px;
  height: 58px;
  padding: 4px 8px;
  border-width: 6px 8px !important;
  border-image-width: 6px 8px !important;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  overflow: visible !important;
}

.order-ticket-card.is-order-ready {
  outline: 2.5px solid #4D9A2A;
  outline-offset: 1px;
}

.order-npc-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: #EFE0C2;
  border: 1.5px solid #8C624C;
  object-fit: cover;
  pointer-events: none;
}

.order-req-list {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
}

.order-req-chip {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #F4E6CA;
  border: 1.5px solid #B6926E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.order-req-chip.has-item {
  background: #DCF5C9;
  border-color: #4D9A2A;
}

.order-req-chip img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  pointer-events: none;
}

.order-tier-tag {
  position: absolute;
  bottom: -4px;
  right: -4px;
  padding: 0 4px;
  height: 15px;
  line-height: 14px;
  border-radius: 6px;
  background: #5A392E;
  color: #FFFDF7;
  font-size: 11.5px;
  font-weight: 800;
}

.order-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.order-reward-mini {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 800;
  color: #4A2E22;
  white-space: nowrap;
}

.order-reward-mini img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.order-deliver-btn {
  height: 26px;
  padding: 1px 8px;
  border-width: 4px 8px !important;
  border-image-width: 4px 8px !important;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
 * 5. Bottom Centered Valley Tool Dock (Compact 92x84px, 57% Icon, 9-Lang Safe)
 * ========================================================================== */
.tool-dock {
  position: fixed;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 10px;
  pointer-events: none;
}

.tool-btn {
  pointer-events: auto;
  width: 92px;
  height: 84px;
  flex: 0 0 92px;
  padding: 4px 1px 3px;
  border-width: 5px 4px !important;
  border-image-width: 5px 4px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  overflow: visible !important;
  position: relative;
}

.tool-btn.is-tool-ready {
  outline: 2.5px solid #4D9A2A;
  outline-offset: 2px;
}

.tool-btn img.tool-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 48px;
  pointer-events: none;
}

.tool-btn .tool-lbl {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #3A2218;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:lang(de) .tool-btn .tool-lbl,
:lang(ru) .tool-btn .tool-lbl,
:lang(fr) .tool-btn .tool-lbl,
:lang(pt-BR) .tool-btn .tool-lbl {
  font-size: 11.5px;
  letter-spacing: -0.03em;
}

.tool-hotkey {
  position: absolute;
  top: -7px;
  left: -6px;
  z-index: 24;
  min-width: 20px;
  height: 19px;
  padding: 0 4px;
  border-radius: 6px;
  background: #5A392E;
  border: 1.5px solid #FFFDF7;
  color: #FFFDF7;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.tool-count {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 25;
  height: 21px;
  padding: 0 6px;
  border-radius: 10px;
  background: #3F7D20;
  border: 1.5px solid #FFFDF7;
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.tool-count img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

/* ==========================================================================
 * 6. Visual Spotlight FTUE Overlay
 * ========================================================================== */
.ftue-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
}

.ftue-target-ring {
  position: fixed;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  border: 3.5px solid #F59E0B;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.36);
  pointer-events: none;
  animation: uivSpotlightPulse 1.25s ease-in-out infinite;
}

.ftue-hand-ptr {
  position: fixed;
  width: 42px;
  height: 42px;
  pointer-events: none;
}

.ftue-banner-pill {
  position: fixed;
  bottom: 98px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 18px;
  background: #FBF2DF;
  border: 2.5px solid #6D4538;
  color: #3A2218;
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
}

.ftue-skip-btn {
  position: fixed;
  top: 58px;
  right: 16px;
  pointer-events: auto;
  height: 36px;
  padding: 4px 14px;
  border-width: 6px 12px !important;
  border-image-width: 6px 12px !important;
  font-size: 13px;
  font-weight: 800;
}

/* ==========================================================================
 * 7. Idle-Hidden Cut-in & Breakout Overlays
 * ========================================================================== */
#cutin-overlay-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1200;
  pointer-events: none;
  display: none;
}

#ui-motion-host {
  position: fixed;
  inset: 0;
  z-index: 2500;
  pointer-events: none;
}

#victory-breakout-host {
  position: fixed;
  inset: 0;
  z-index: 1800;
}

/* ==========================================================================
 * 8. Commercial Anti-SaaS 60/25/15 Modals & 3-Icon Feature Guides
 * ========================================================================== */
.modal-backdrop, .fg-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(38, 25, 18, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fg-backdrop {
  z-index: 2300;
}

.modal-card {
  position: relative;
  width: min(940px, 94vw);
  max-height: min(640px, 90vh);
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.md-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.md-ribbon {
  padding: 6px 30px 8px;
  border-width: 8px 26px !important;
  border-image-width: 8px 26px !important;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 900;
  color: #3A2218;
}

.md-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.md-help-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-width: 6px 7px !important;
  border-image-width: 6px 7px !important;
  font-size: 16px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.md-close-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

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

.md-body-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 4px 4px;
}

/* Tabs & Anti-SaaS 4-Column Card Grids */
.qp-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
}

.qp-tab-btn {
  height: 40px;
  padding: 4px 14px;
  border-width: 7px 14px !important;
  border-image-width: 7px 14px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.sn-tabs .qp-tab-btn {
  padding: 4px 11px;
  font-size: 12.5px;
}

.settings-version-foot {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #734D3E;
  opacity: 0.85;
  padding-top: 2px;
}

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

.shop-card, .upgrade-card, .qp-card {
  position: relative;
  padding: 10px 8px 9px;
  border-width: 9px 9px !important;
  border-image-width: 9px 9px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  text-align: center;
  min-height: 196px;
  overflow: visible !important;
}

.shop-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 1px 9px;
  border-radius: 9px;
  background: #CF5C52;
  border: 1.5px solid #FFFDF7;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 900;
  white-space: nowrap;
}

.shop-card-art, .qp-card-art, .sn-art {
  width: 96px;
  height: 96px;
  object-fit: contain;
  flex: 0 0 96px;
  pointer-events: none;
}

.shop-card-title, .qp-card-title, .sn-heading {
  font-size: 13.5px;
  font-weight: 800;
  color: #3A2218;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qp-chip-item, .sn-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.qp-chip-group {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #4A2E22;
}

.shop-buy-btn, .qp-mini-btn {
  width: 100%;
  height: 36px;
  padding: 3px 10px;
  border-width: 7px 12px !important;
  border-image-width: 7px 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 800;
}

/* Timed Pass Hero Banner & 5-Tier Grid */
.qp-hero-banner {
  padding: 10px 14px;
  border-width: 9px 12px !important;
  border-image-width: 9px 12px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qp-banner-art {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex: 0 0 60px;
}

.qp-banner-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qp-banner-title {
  font-size: 16px;
  font-weight: 900;
  color: #3A2218;
}

.qp-xp-bar {
  width: 100%;
  height: 18px;
  padding: 1px;
  border-width: 5px 7px !important;
  border-image-width: 5px 7px !important;
  background-color: #E5D4B3;
}

.qp-xp-fill {
  height: 100%;
  border-width: 4px 5px !important;
  border-image-width: 4px 5px !important;
  background-color: #83B84E;
}

.qp-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qp-action-btn {
  height: 38px;
  padding: 4px 14px;
  border-width: 7px 13px !important;
  border-image-width: 7px 13px !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 800;
}

.qp-tier-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.qp-quest-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.qp-giftcode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-width: 7px 12px !important;
  border-image-width: 7px 12px !important;
}

.qp-code-input {
  flex: 1 1 auto;
  height: 36px;
  padding: 4px 12px;
  border-radius: 8px;
  border: 2px solid #8C624C;
  background: #FFFDF7;
  color: #3A2218;
  font-size: 14px;
  font-weight: 700;
}

/* Settings Panel */
.settings-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.setting-strip {
  padding: 8px 14px;
  border-width: 6px 12px !important;
  border-image-width: 6px 12px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.setting-lbl {
  font-size: 14px;
  font-weight: 800;
  color: #3A2218;
  white-space: nowrap;
}

.setting-strip input[type="range"] {
  flex: 1 1 auto;
  accent-color: #83B84E;
  cursor: pointer;
}

.setting-select {
  height: 34px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 2px solid #8C624C;
  background: #FFFDF7;
  color: #3A2218;
  font-size: 13.5px;
  font-weight: 700;
}

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

.settings-act-btn {
  height: 42px;
  padding: 4px 12px;
  border-width: 8px 14px !important;
  border-image-width: 8px 14px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 800;
}

/* 3-Icon Feature Guides Modal */
.fg-panel {
  width: min(560px, 92vw);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.fg-ribbon {
  padding: 6px 28px 8px;
  border-width: 7px 24px !important;
  border-image-width: 7px 24px !important;
  font-size: 20px;
  font-weight: 900;
  color: #3A2218;
}

.fg-icon-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.fg-step-pill {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 8px;
  border-width: 8px 10px !important;
  border-image-width: 8px 10px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

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

.fg-step-lbl {
  font-size: 13.5px;
  font-weight: 800;
  color: #3A2218;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fg-arrow {
  font-size: 22px;
  font-weight: 900;
  color: #5A392E;
}

.fg-gotit-btn {
  min-width: 180px;
  height: 46px;
  padding: 4px 24px;
  border-width: 9px 22px !important;
  border-image-width: 9px 22px !important;
  font-size: 16px;
  font-weight: 900;
}

/* Preview-Only [DEV F2] Pill & Panel */
.dev-f2-pill {
  position: fixed;
  bottom: 8px;
  right: 10px;
  z-index: 3200;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1.5px solid #6D4538;
  background: #FBF2DF;
  color: #3A2218;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.debug-panel {
  position: fixed;
  bottom: 38px;
  right: 10px;
  z-index: 3200;
  width: 215px;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid #6D4538;
  background: #FBF2DF;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.debug-action-btn {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #8C624C;
  background: #F3E2C0;
  color: #3A2218;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

/* Responsive 1280x720 & <960px Guards */
@media (max-width: 1366px) {
  .hud-pill-box {
    padding: 3px 9px;
    font-size: 13px;
    gap: 5px;
  }
  .hud-mini-bar {
    width: 44px;
  }
  .hud-icon-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }
  .hud-icon-btn img {
    width: 23px;
    height: 23px;
  }
  .char-dock {
    width: 152px;
    height: 170px;
  }
  .order-ticket-card {
    min-width: 176px;
    height: 52px;
  }
}

@media (max-width: 960px) {
  .hud-mini-bar {
    display: none;
  }
  .char-dock {
    width: 112px;
    height: 128px;
  }
  .qp-tier-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .shop-grid, .qp-quest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
