/* Turnpin 3D: Toy Screw Puzzle — Plush Stitched Casual 16:9 Desktop Theme (100% Offline MSIX) */

:root {
  --font-display: 'Fredoka', 'Segoe UI Rounded', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --ink: #4E2A1A;
  --ink-deep: #2F160B;
  --cream: #FFF6E5;
  --maple: #ECBB89;
  --wood-rim: #A56249;
  --sky-soft: #82D0F1;
  --mint-soft: #B1E1E7;
  --gold-glow: #FFD54F;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #8AD0F5;
  font-family: var(--font-body);
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
}

.hidden {
  display: none !important;
}

button:focus {
  outline: none;
}

button:focus-visible {
  outline: 3px solid #FFD54F;
  outline-offset: 2px;
}

/* Full-bleed 3D Three.js WebGL Stage */
#game-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
  touch-action: none;
}

/* ==========================================================================
   HEROIC NO-BOX TITLE SCREEN (Full-Bleed Key Art + Living Mascot + 0-100% Bar)
   ========================================================================== */
#title-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  background-image: url('../assets/art/title_bg.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.title-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%, rgba(255, 250, 236, 0.12) 0%, rgba(42, 24, 14, 0.36) 100%);
  pointer-events: none;
}

.title-corner-dock {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 65;
  display: flex;
  align-items: center;
  gap: 8px;
}

.corner-icon-btn {
  position: relative;
  overflow: visible !important;
  min-width: 48px;
  height: 46px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-width: 10px 14px 11px 14px !important;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #2B140A !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

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

/* Heroic No-Box Stack: strictly transparent & borderless around h1! */
.title-hero-stack {
  position: relative;
  z-index: 62;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 0 20px;
}

.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-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(62, 32, 16, 0.38));
}

.title-emblem {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 5.4vw, 78px);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.02;
  color: #FFFDF5;
  -webkit-text-stroke: 2.5px #4E2A1A;
  text-shadow: 0 6px 0 #4E2A1A, 0 11px 22px rgba(45, 22, 10, 0.42);
}

.title-subtitle {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 800;
  color: #FFF6DC;
  text-shadow: 0 3px 0 #4E2A1A, 0 5px 12px rgba(45, 22, 10, 0.38);
  margin-bottom: 6px;
}

.boot-loader {
  width: min(360px, 78vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.boot-bar-track {
  width: 100%;
  height: 30px;
  border-width: 8px 10px 8px 10px !important;
  position: relative;
  display: flex;
  align-items: center;
}

.boot-bar-fill {
  height: 100%;
  width: 4%;
  min-width: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9DF235 0%, #55D418 55%, #3CA70C 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55);
  transition: width 0.16s ease-out;
}

.boot-loader-txt {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #FFFDF5;
  text-shadow: 0 2px 0 #4E2A1A;
}

.title-play-cta {
  min-width: 248px;
  height: 70px;
  padding: 0 34px;
  border-width: 14px 24px 16px 24px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #FFFFFF;
  text-shadow: 0 3px 0 #1E6307;
  filter: drop-shadow(0 8px 12px rgba(45, 22, 10, 0.32));
  overflow: visible !important;
}

.title-play-cta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ==========================================================================
   FULL-BLEED 3D GAMEPLAY HUD (Slim Top Bar + Floating Pills + Compact Dock)
   ========================================================================== */
#hud-root {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 14px 26px;
}

#hud-root button,
#hud-root .hud-interactive {
  pointer-events: auto;
}

/* Top Bar: strictly single row, flex-wrap: nowrap, compact height */
.top-hud {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  flex-wrap: nowrap;
}

.hud-left-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.stage-pill {
  height: 46px;
  padding: 0 10px;
  border-width: 10px 12px 10px 12px !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: default;
}

.stage-badge {
  color: #4E2A1A;
  font-size: 15px;
}

.stage-pins {
  background: #4E2A1A;
  color: #FFFDF5;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.timer-pill {
  height: 42px;
  padding: 0 8px;
  border-width: 9px 10px 9px 10px !important;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  cursor: default;
}

/* Center Top: 3 Active Color Collector Boxes + Next Queue Badge */
.collector-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
}

.collector-box {
  position: relative;
  width: 112px;
  height: 58px;
  border-radius: 16px;
  border: 3px solid #4E2A1A;
  box-shadow: 0 4px 0 #4E2A1A, inset 0 3px 0 rgba(255, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 6px;
  transition: transform 0.18s ease;
  pointer-events: auto;
}

.collector-box.skin-plush {
  border: 3.5px dashed #FFFDF5;
  outline: 2.5px solid #4E2A1A;
}

.collector-box.skin-brass {
  border: 3.5px solid #FFD54F;
  box-shadow: 0 4px 0 #7C4716, inset 0 3px 0 rgba(255, 255, 255, 0.65);
}

.collector-box.is-empty {
  background: rgba(251, 235, 209, 0.72);
  border-style: dashed;
  box-shadow: none;
}

.collector-holes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.collector-hole {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(45, 22, 10, 0.34);
  border: 2px solid rgba(45, 22, 10, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.collector-hole.is-filled {
  background: #FFFDF8;
  border-color: #4E2A1A;
  box-shadow: 0 2px 0 rgba(45, 22, 10, 0.35);
}

.collector-pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #4E2A1A;
}

.collector-shape-tag {
  font-size: 13px;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 1px 0 #3B1E10;
  line-height: 1;
}

.next-queue-pill {
  height: 46px;
  padding: 0 8px;
  border-width: 9px 10px 9px 10px !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  cursor: default;
}

.next-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #4E2A1A;
  display: inline-block;
}

/* Right Top Cluster: Currencies + Compact Painted Icon Buttons */
.hud-right-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.currency-pill {
  height: 44px;
  padding: 0 8px;
  border-width: 9px 10px 9px 10px !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  overflow: visible !important;
}

.currency-pill img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  pointer-events: none;
}

.hud-icon-btn {
  position: relative;
  overflow: visible !important;
  width: 48px;
  height: 48px;
  padding: 0;
  border-width: 8px 8px 10px 8px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3D1C0B !important;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hud-icon-exit {
  color: #C92345 !important;
}

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

/* Floating Red-Dot Badge (never clipped!) */
.notify-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 30;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #FF3B5C;
  border: 2px solid #FFFDF5;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(45, 16, 12, 0.35);
}

.notify-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 30;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FF3B5C;
  border: 2px solid #FFFDF5;
  display: none;
  pointer-events: none;
}

/* Mid-Left Slim Color Inventory Chips (compact floating strip, NOT a sidebar!) */
.color-inventory-strip {
  position: fixed;
  left: 14px;
  top: 72px;
  z-index: 22;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}

.inv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 246, 229, 0.9);
  border: 2.5px solid #4E2A1A;
  border-radius: 999px;
  padding: 3px 9px 3px 5px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #4E2A1A;
  box-shadow: 0 2px 0 rgba(78, 42, 26, 0.35);
  width: fit-content;
}

.inv-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #4E2A1A;
}

/* Bottom HUD Row: Left Camera Pills + Center Buffer & 4 Compact Boosters */
.bottom-hud {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.cam-tools-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  flex-shrink: 0;
}

.cam-btn-row {
  display: flex;
  gap: 6px;
}

.cam-pill-btn {
  height: 40px;
  padding: 0 10px;
  border-width: 8px 12px 10px 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #2B140A !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  overflow: visible !important;
}

.cam-pill-btn.is-active {
  filter: brightness(1.12);
}

.cam-pill-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 96px;
}

.rotate-hint-chip {
  background: rgba(255, 246, 229, 0.88);
  border: 2px solid #4E2A1A;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 800;
  color: #4E2A1A;
}

/* Bottom Center: Buffer Holding Tray + 4 Compact Boosters (74x74px Golden Ratio) */
.bottom-center-dock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

.buffer-dock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(251, 235, 209, 0.92);
  border: 3px solid #4E2A1A;
  border-radius: 20px;
  box-shadow: 0 4px 0 #4E2A1A;
  pointer-events: auto;
}

.buffer-slot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #C7996B;
  border: 2.5px solid #4E2A1A;
  box-shadow: inset 0 3px 4px rgba(56, 28, 12, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
}

.buffer-pin-cap {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid #4E2A1A;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 1px 0 #3B1E10;
}

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

.booster-btn {
  position: relative;
  overflow: visible !important;
  width: 76px;
  height: 76px;
  padding: 0;
  border-width: 10px 10px 12px 10px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.booster-btn img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 2px rgba(45, 22, 10, 0.28));
}

.booster-key {
  position: absolute;
  bottom: -6px;
  left: -6px;
  z-index: 8;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #4E2A1A;
  border: 2px solid #FFFDF5;
  color: #FFFDF5;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.booster-lbl {
  position: absolute;
  bottom: -21px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 8px;
  border-radius: 999px;
  background: #4E2A1A;
  border: 1.5px solid #FFFDF5;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: #FFFDF5;
  white-space: nowrap;
  pointer-events: none;
}

.bottom-right-spacer {
  width: 148px;
  flex-shrink: 0;
}

/* ==========================================================================
   MODALS — Flex Scroll Law (1280x720 Safe), Anti-SaaS 60/25/15, 0 backdrop-blur
   ========================================================================== */
#modal-root,
#exit-modal-root,
#guide-modal-root {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(38, 24, 16, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card,
.modal-shell {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  width: min(920px, 94vw);
  overflow: hidden;
  border-width: 20px 22px 22px 22px !important;
  cursor: default !important;
}

.exit-modal-card,
.exit-shell,
.guide-card,
.guide-shell {
  width: min(640px, 92vw);
}

.modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2px 44px 10px;
}

.modal-ribbon {
  min-width: 220px;
  max-width: 82%;
  padding: 2px 20px;
  border-width: 12px 32px 14px 32px !important;
  text-align: center;
  color: #FFFFFF !important;
  font-size: 20px;
  text-shadow: 0 2px 0 #1A4E85;
  cursor: default !important;
}

.modal-ribbon span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}

.modal-close-x {
  position: absolute;
  top: 0;
  right: 2px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

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

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 8px 10px;
}

.modal-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.m-tab {
  min-width: 150px;
  height: 44px;
  padding: 0 14px;
  border-width: 10px 16px 10px 16px !important;
  color: #FFFFFF !important;
  font-size: 15px;
  text-shadow: 0 2px 0 rgba(58, 18, 32, 0.65);
  overflow: visible !important;
}

.modal-tabs-4 {
  gap: 8px;
  flex-wrap: nowrap;
}

.modal-tabs-4 .m-tab {
  min-width: 112px;
  flex: 1 1 0;
  padding: 0 10px;
  font-size: 14px;
}

.modal-tabs-5 {
  gap: 8px;
  flex-wrap: nowrap;
}

.modal-tabs-5 .m-tab {
  min-width: 92px;
  flex: 1 1 0;
  padding: 0 8px;
  font-size: 14px;
}

.m-tab span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: inline-block;
}

.vf-grid {
  display: grid;
  gap: 12px;
  width: 100%;
}

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

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

.vf-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.vf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 6px 8px;
  border-width: 12px 13px 13px 13px !important;
  text-align: center;
  cursor: default !important;
  overflow: visible !important;
}

.vf-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 2px 10px;
  border-radius: 999px;
  border: 2px solid #4E2A1A;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  color: #FFFFFF;
  white-space: nowrap;
  pointer-events: none;
}

.vf-ribbon.b-starter { background: #2BB673; }
.vf-ribbon.b-popular { background: #1E96FC; }
.vf-ribbon.b-best    { background: #F59E0B; color: #3D1C08; }
.vf-ribbon.b-vip     { background: #EC4899; }

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

.vf-art {
  width: 86px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 5px 6px rgba(78, 42, 26, 0.25));
}

.vf-title,
.vf-heading {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #4E2A1A;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.vf-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-height: 24px;
}

.cur-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: inherit;
  font-variant-numeric: tabular-nums;
}

.chip-ico {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.lv-pill, .stat-pill, .star-pill {
  background: #4E2A1A;
  color: #FFF6DC;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
}

.star-pill {
  color: #FFD54F;
  letter-spacing: 2px;
}

.vf-cta {
  width: 100%;
  height: 44px;
  padding: 0 8px;
  border-width: 10px 14px 11px 14px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF !important;
  font-size: 14px;
  text-shadow: 0 2px 0 rgba(40, 20, 10, 0.65);
  overflow: visible !important;
}

.vf-cta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.pass-pills,
.sub-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pass-pill,
.sub-pill {
  height: 38px;
  padding: 0 12px;
  border-width: 8px 12px 8px 12px !important;
  color: #FFFFFF !important;
  font-size: 13px;
  text-shadow: 0 1px 0 #3B1E10;
}

.pass-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pass-prem-on {
  background: #2BB673;
  color: #FFFFFF;
}

.pass-track-row {
  width: 100%;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
}

.pass-track-row.is-locked {
  opacity: 0.72;
}

.track-tag {
  background: #7A4B2A;
  color: #FFF6E5;
  padding: 1px 6px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.track-tag.prem {
  background: #D97706;
  color: #FFFDF5;
}

.modal-guide-strip {
  padding: 0 8px 6px;
}

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

.inline-fg-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #4E2A1A;
}

.inline-fg-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inline-fg-ic {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.ver-footer-note {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #4E2A1A;
  opacity: 0.72;
}

/* Settings */
.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}

.set-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 250, 238, 0.85);
  border: 2.5px solid #D6A876;
  border-radius: 14px;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #4E2A1A;
}

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

.mini-pill {
  min-width: 72px;
  height: 40px;
  padding: 0 10px;
  border-width: 8px 12px 9px 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #FFFFFF !important;
  font-size: 13px;
  text-shadow: 0 1px 0 #2F160B;
}

.lang-select, .gift-input {
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 2.5px solid #4E2A1A;
  background: #FFFDF8;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  color: #4E2A1A;
}

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

.set-actions button {
  height: 46px;
  padding: 0 18px;
  border-width: 10px 16px 11px 16px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #FFFFFF !important;
  font-size: 15px;
  text-shadow: 0 2px 0 #2F160B;
}

/* Celebrations / Chest / Exit / Guide */
.celebrate-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.celebrate-stars {
  font-size: 44px;
  color: #FFB800;
  text-shadow: 0 4px 0 #4E2A1A;
  letter-spacing: 6px;
}

.celebrate-mascot {
  width: 126px;
  height: 126px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(78, 42, 26, 0.3));
}

.celebrate-rewards {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.reward-pill {
  height: 46px;
  padding: 0 14px;
  border-width: 10px 12px 10px 12px !important;
  display: inline-flex;
  align-items: center;
  color: #4E2A1A;
}

.celebrate-ctas, .exit-ctas, .guide-cta-wrap {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

.big-cta {
  min-width: 210px;
  height: 54px;
  padding: 0 22px;
  border-width: 12px 20px 13px 20px !important;
  color: #FFFFFF !important;
  font-size: 18px;
  text-shadow: 0 2px 0 #1E6307;
}

.jam-sub, .exit-saved-note {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: #4E2A1A;
  text-align: center;
  margin: 4px 0;
}

.exit-rewards-row,
.exit-rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.exit-jump-card,
.exit-jump-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-width: 12px 12px 12px 12px !important;
  color: #4E2A1A;
  font-size: 14px;
}

.exit-ico {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.exit-ctas button, .guide-cta-wrap button {
  min-width: 150px;
  height: 48px;
  padding: 0 18px;
  border-width: 10px 16px 11px 16px !important;
  color: #FFFFFF !important;
  font-size: 16px;
  text-shadow: 0 2px 0 #2F160B;
}

.guide-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 14px;
}

.guide-step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-width: 12px 12px 12px 12px !important;
  cursor: default !important;
}

.guide-ico {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.guide-lbl {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #4E2A1A;
  text-align: center;
}

.guide-arrow {
  font-size: 28px;
  font-weight: 900;
  color: #4E2A1A;
}

/* ==========================================================================
   VISUAL SPOTLIGHT FTUE (tut-spotlight + tut-hand — never blocks boosters!)
   ========================================================================== */
#tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
}

.tut-spotlight {
  position: absolute;
  width: 82px;
  height: 82px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 4px solid #FFD54F;
  box-shadow: 0 0 0 6px rgba(255, 213, 79, 0.35);
  animation: tutPulse 1.1s ease-in-out infinite;
  pointer-events: none;
}

.tut-hand {
  position: absolute;
  animation: tutTap 0.9s ease-in-out infinite;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(45, 22, 10, 0.45));
}

.tut-pill {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 4px 12px;
  border-width: 9px 12px 9px 12px !important;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #4E2A1A;
  white-space: nowrap;
  pointer-events: none;
}

.tut-skip-btn {
  position: fixed;
  top: 76px;
  right: 16px;
  height: 40px;
  padding: 0 14px;
  border-width: 8px 14px 10px 14px !important;
  color: #2B140A !important;
  font-size: 14px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  pointer-events: auto;
}

@keyframes tutPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.92; }
  50%      { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

@keyframes tutTap {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-6px, -8px) scale(0.92); }
}

/* Cut-in Canvas Overlay (idle-hidden, never blocks clicks) */
#cutin-overlay-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 95;
  pointer-events: none;
  display: none;
}

/* Toast Notification */
#game-toast {
  position: fixed;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 140;
  padding: 6px 18px;
  border-radius: 999px;
  background: #4E2A1A;
  border: 2.5px solid #FFD54F;
  color: #FFFDF5;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#game-toast.is-shown {
  opacity: 1;
}

#game-toast.is-pulse {
  animation: toastPop 0.28s ease-out;
}

@keyframes toastPop {
  0%   { transform: translateX(-50%) scale(0.88); }
  55%  { transform: translateX(-50%) scale(1.06); }
  100% { transform: translateX(-50%) scale(1); }
}

/* Preview-Only [DEV F2] Pill & Panel (strictly removed when __MS_RELEASE__ === true) */
.dev-f2-pill {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 90;
  padding: 5px 10px;
  border-radius: 999px;
  border: 2px solid #FFFDF5;
  background: #4E2A1A;
  color: #FFD54F;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.debug-panel {
  position: fixed;
  bottom: 52px;
  right: 12px;
  z-index: 150;
  width: 260px;
  padding: 10px;
  border-radius: 14px;
  background: #FFF6E5;
  border: 3px solid #4E2A1A;
  box-shadow: 0 6px 18px rgba(38, 22, 12, 0.35);
}

.dbg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

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

.dbg-grid button {
  padding: 6px 6px;
  border-radius: 8px;
  border: 2px solid #4E2A1A;
  background: #FFE5B8;
  color: #4E2A1A;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

/* ==========================================================================
   RESPONSIVE 1280x720 & NARROW VIEWPORT POLISH
   ========================================================================== */
@media (max-width: 1360px) {
  .collector-box { width: 96px; height: 52px; }
  .collector-hole { width: 21px; height: 21px; }
  .collector-pin-dot { width: 14px; height: 14px; }
  .hud-icon-btn { width: 42px; height: 42px; }
  .hud-icon-btn img { width: 26px; height: 26px; }
  .currency-pill { height: 40px; font-size: 14px; }
  .stage-pill { height: 42px; font-size: 13px; }
  .booster-btn { width: 70px; height: 70px; }
  .booster-btn img { width: 42px; height: 42px; }
  .vf-art-wrap { height: 76px; }
  .vf-art { width: 72px; height: 72px; }
  .vf-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .vf-grid-4, .vf-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-right-spacer { display: none; }
}
