/* Sunmelon: Fruit Drop — Plush Stitched Casual 16:9 Widescreen CSS (Offline MSIX Pure) */
/* ZERO external Google Fonts network calls; ZERO backdrop-filter blur over canvas. */

:root {
  --font-display: 'Fredoka', 'Lilita One', 'Comic Sans MS', 'Segoe UI Rounded', 'Trebuchet MS', ui-rounded, system-ui, sans-serif;
  --font-body: 'Nunito', 'Segoe UI Rounded', 'Trebuchet MS', system-ui, -apple-system, sans-serif;
  --sky-blue: #76C5F4;
  --honey-cream: #EACF8E;
  --cocoa-ink: #4E2A1A;
  --cocoa-deep: #3A1B0E;
  --terracotta: #974A33;
  --warm-ivory: #FFF9EE;
  --caramel: #CE7A47;
  --wood-muted: #90755C;
  --leaf-green: #55D418;
  --sun-gold: #FFC629;
  --berry-rose: #F04B6B;
}

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

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #87CEF7;
  color: var(--cocoa-deep);
  font-family: var(--font-body);
  user-select: none;
  -webkit-user-select: none;
}

.hidden {
  display: none !important;
}

.num-tabular {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
}

button {
  font-family: var(--font-display);
  cursor: pointer;
  outline: none;
  border: none;
  background: transparent;
}

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

/* =====================================================================
   TITLE SCREEN (Heroic Full-Bleed Orchard — Zero Boxed Login Card)
   ===================================================================== */
.title-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.title-bg-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.title-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 44%, rgba(255, 250, 224, 0.14) 0%, rgba(78, 42, 26, 0.18) 72%, rgba(58, 27, 14, 0.34) 100%);
  pointer-events: none;
}

.title-meta-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 10px 16px;
  pointer-events: none;
}

.title-meta-left,
.title-corner-bar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  pointer-events: auto;
  min-width: 0;
}

.title-pill-lbl {
  font-size: 11.5px;
  font-weight: 900;
  opacity: 0.78;
}

.title-play-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.title-continue-btn {
  min-width: 186px;
  height: 70px;
  padding: 0 22px;
  border-radius: 22px;
  border-width: 14px 20px 15px 20px !important;
  border-image-width: 14px 20px 15px 20px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 900;
  color: #FFFFFF !important;
  text-shadow: 0 2px 0 var(--cocoa-deep);
  filter: drop-shadow(0 7px 0 rgba(58, 27, 14, 0.36));
  white-space: nowrap;
  transition: transform 120ms ease;
}

.title-continue-btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.title-continue-score {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(58, 27, 14, 0.38);
  color: #FFE484;
  font-size: 14px;
  font-weight: 900;
}

.title-hero-stage {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 0 24px;
  background: transparent;
  border: none;
  max-width: 90vw;
}

.title-kicker {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.35vw, 19px);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #FFFDF5;
  text-shadow: 0 2px 0 var(--cocoa-ink), 0 4px 10px rgba(58, 27, 14, 0.35);
}

.game-main-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0.02em;
  color: #FFFDF5;
  -webkit-text-stroke: 2.5px var(--cocoa-ink);
  text-shadow: 0 6px 0 var(--cocoa-ink), 0 10px 22px rgba(58, 27, 14, 0.38);
  white-space: nowrap;
}

.title-mascot-host {
  position: relative;
  width: clamp(164px, 16vw, 228px);
  height: clamp(164px, 16vw, 228px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 2px;
}

.title-mascot-img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 12px 14px rgba(58, 27, 14, 0.32));
}

.title-loading {
  width: min(360px, 76vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.loading-bar-track {
  width: 100%;
  height: 30px;
  padding: 2px;
  border-width: 8px 12px !important;
  border-image-width: 8px 12px !important;
  display: flex;
  align-items: center;
}

.loading-bar-fill {
  height: 100%;
  min-width: 18px;
  border-width: 5px 8px !important;
  border-image-width: 5px 8px !important;
  transition: width 120ms ease-out;
}

.loading-label {
  display: flex;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #FFFDF5;
  text-shadow: 0 2px 0 var(--cocoa-ink);
}

.title-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.title-play-btn {
  min-width: 240px;
  height: 70px;
  padding: 0 36px;
  border-radius: 22px;
  border-width: 15px 24px 16px 24px !important;
  border-image-width: 15px 24px 16px 24px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 900;
  color: #214008 !important;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55);
  filter: drop-shadow(0 7px 0 rgba(58, 27, 14, 0.36));
  transition: transform 120ms ease;
}

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

.title-play-btn:active {
  transform: translateY(2px) scale(0.97);
}

.title-mode-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-chip {
  height: 40px;
  min-width: 96px;
  padding: 0 14px;
  border-radius: 16px;
  border-width: 9px 14px !important;
  border-image-width: 9px 14px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--cocoa-deep) !important;
  opacity: 0.88;
  transition: transform 120ms ease, opacity 120ms ease;
}

.mode-chip.active {
  opacity: 1;
  transform: scale(1.06);
  filter: drop-shadow(0 3px 0 rgba(78, 42, 26, 0.4));
}

/* =====================================================================
   GAMEPLAY SCREEN & FLOATING HUD (100vw x 100vh Full-Bleed)
   ===================================================================== */
.game-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 10;
}

.game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.cutin-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 65;
  display: none;
}

.hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 8px 14px;
  pointer-events: none;
}

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

.mode-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hud-mode-btn,
.hud-pill-btn,
.hud-action-pill,
.hud-currency-pill,
.hud-vip-pill {
  height: 42px;
  padding: 0 11px;
  border-radius: 15px;
  border-width: 9px 11px 9px 11px !important;
  border-image-width: 9px 11px 9px 11px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: clamp(12.5px, 0.95vw, 14px);
  font-weight: 800;
  color: var(--cocoa-deep) !important;
  white-space: nowrap;
  overflow: visible !important;
  position: relative;
}

.hud-vip-pill {
  cursor: default !important;
  color: #8A4300 !important;
}

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

.hud-mode-btn {
  opacity: 0.82;
}

.hud-mode-btn.active {
  opacity: 1;
  filter: drop-shadow(0 3px 0 rgba(78, 42, 26, 0.35));
  color: #7A2E0E !important;
}

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

.hud-currency-pill {
  cursor: default !important;
  min-width: 72px;
}

.hud-nav-btn {
  height: 44px;
  padding: 0 12px;
  border-radius: 15px;
  border-width: 9px 14px 10px 14px !important;
  border-image-width: 9px 14px 10px 14px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: clamp(12.5px, 0.95vw, 14px);
  font-weight: 800;
  color: var(--cocoa-deep) !important;
  white-space: nowrap;
  position: relative;
  overflow: visible !important;
}

.hud-nav-btn > span:not(.notify-badge) {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 92px;
  display: inline-block;
}

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

.hud-sq-btn,
.hud-icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-width: 8px 8px 9px 8px !important;
  border-image-width: 8px 8px 9px 8px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible !important;
  flex-shrink: 0;
}

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

.notify-badge {
  position: absolute;
  top: -8px;
  right: -7px;
  z-index: 30;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #F04B6B;
  border: 2px solid #FFFDF5;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

/* Status Toast Pill */
.hud-toast {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 28;
  padding: 4px 28px;
  border-width: 10px 24px !important;
  border-image-width: 10px 24px !important;
  font-size: 15px;
  font-weight: 900;
  color: #FFFFFF !important;
  text-shadow: 0 2px 0 var(--cocoa-deep);
  white-space: nowrap;
  pointer-events: none;
}

/* =====================================================================
   COMPACT BOOSTER DOCK (Round 5 Spatial Ratio: 80x80 tiles, 46px icons)
   ===================================================================== */
.booster-dock {
  position: absolute;
  right: max(16px, 2.2vw);
  bottom: 18px;
  z-index: 24;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: auto;
}

.booster-btn {
  width: 80px;
  height: 80px;
  padding: 0;
  border-radius: 16px;
  border-width: 10px 10px 12px 10px !important;
  border-image-width: 10px 10px 12px 10px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible !important;
  transition: transform 120ms ease;
}

.booster-btn:hover {
  transform: translateY(-3px) scale(1.04);
}

.booster-btn.armed {
  filter: drop-shadow(0 0 10px rgba(255, 200, 40, 0.95));
  transform: translateY(-4px) scale(1.06);
}

.booster-btn img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  pointer-events: none;
  margin-top: -6px;
}

.booster-key {
  position: absolute;
  top: -8px;
  left: -7px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--cocoa-ink);
  border: 2px solid #FFE484;
  color: #FFFDF5;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.tool-count {
  position: absolute;
  top: -8px;
  right: -7px;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 999px;
  background: #55D418;
  border: 2px solid #FFFDF5;
  color: #1A3A05;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.tool-count.empty {
  background: #F04B6B;
  color: #FFFFFF;
}

.booster-name {
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--cocoa-ink);
  color: #FFFDF5;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* =====================================================================
   VISUAL SPOTLIGHT FTUE OVERLAY
   ===================================================================== */
.tut-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
}

.tut-spotlight {
  position: absolute;
  border-radius: 999px;
  border: 4px solid #FFE45E;
  box-shadow: 0 0 0 9999px rgba(42, 24, 12, 0.24);
  pointer-events: none;
  animation: tutPulse 1.3s ease-in-out infinite;
}

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

.tut-hand {
  position: absolute;
  z-index: 56;
  pointer-events: none;
  filter: drop-shadow(0 5px 6px rgba(58, 27, 14, 0.45));
  animation: tutBounce 0.9s ease-in-out infinite;
}

@keyframes tutBounce {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6px, -10px) scale(1.08); }
}

.tut-pill {
  position: absolute;
  z-index: 57;
  padding: 4px 18px;
  border-width: 10px 14px !important;
  border-image-width: 10px 14px !important;
  font-size: 16px;
  font-weight: 900;
  color: var(--cocoa-deep) !important;
  white-space: nowrap;
  pointer-events: none;
}

.tut-skip-btn {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 58;
  height: 40px;
  padding: 0 20px;
  border-width: 9px 16px !important;
  border-image-width: 9px 16px !important;
  font-size: 14px;
  font-weight: 900;
  color: var(--cocoa-deep) !important;
  pointer-events: auto;
}

/* =====================================================================
   STRICT FLEX-SCROLL ANTI-SAAS MODALS (Plush Stitched Casual 9-Slice)
   ===================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(42, 22, 12, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: min(920px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  border-width: 18px 20px 18px 20px !important;
  border-image-width: 18px 20px 18px 20px !important;
  color: var(--cocoa-deep);
  position: relative;
}

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

.modal-head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2px 46px 8px;
  flex-shrink: 0;
}

.modal-ribbon {
  padding: 2px 34px;
  border-width: 11px 28px !important;
  border-image-width: 11px 28px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-title-text {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 2px 0 var(--cocoa-deep);
  white-space: nowrap;
}

.modal-close-x {
  position: absolute;
  right: 4px;
  top: 2px;
  width: 42px;
  height: 42px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-x img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(58, 27, 14, 0.35));
}

.modal-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2px 8px 10px;
  flex-shrink: 0;
}

.modal-tab-btn {
  height: 42px;
  padding: 0 18px;
  border-width: 9px 14px !important;
  border-image-width: 9px 14px !important;
  font-size: 14px;
  font-weight: 900;
  color: var(--cocoa-deep) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.modal-tab-btn.is-active {
  color: #FFFFFF !important;
  text-shadow: 0 2px 0 var(--cocoa-deep);
}

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

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 8px 2px;
  flex-shrink: 0;
}

/* Anti-SaaS 60/25/15 Visual Card Grid */
.visual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

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

.vf-card-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 6px 6px 8px;
  border-width: 11px 12px 11px 12px !important;
  border-image-width: 11px 12px 11px 12px !important;
  position: relative;
  overflow: visible !important;
  text-align: center;
  min-height: 196px;
}

.vf-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  background: #F04B6B;
  border: 2px solid #FFFDF5;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 900;
  white-space: nowrap;
  z-index: 4;
}

.vf-badge.gold {
  background: #FFAE00;
  color: var(--cocoa-deep);
}

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

.vf-art-wrap img {
  width: 94px;
  height: 94px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(58, 27, 14, 0.22));
}

.vf-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: var(--cocoa-deep);
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vf-chip-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 900;
  color: #7A320C;
}

.vf-chip-line img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.vf-cta {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border-radius: 14px;
  border-width: 8px 14px 9px 14px !important;
  border-image-width: 8px 14px 9px 14px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 900;
  color: var(--cocoa-deep) !important;
  white-space: nowrap;
}

.vf-cta img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Festival Horizontal Milestone Track (SYS-02 3D/7D/30D + 1-Click Claim-All) */
.festival-strip {
  padding: 7px 10px;
  margin-bottom: 10px;
  border-radius: 16px;
  border-width: 11px 12px !important;
  border-image-width: 11px 12px !important;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.festival-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 900;
  color: var(--cocoa-deep);
}

.pass-mini-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.pass-mini-tab {
  height: 32px;
  padding: 0 10px;
  border-radius: 12px;
  border-width: 7px 10px !important;
  border-image-width: 7px 10px !important;
  font-size: 12px !important;
  font-weight: 900;
  color: var(--cocoa-deep) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.pass-mini-tab.is-active {
  color: #FFFFFF !important;
  text-shadow: 0 1px 0 var(--cocoa-deep);
}

.festival-head-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.pass-pts-readout {
  font-size: 13px;
  font-weight: 900;
  color: #7A320C;
  white-space: nowrap;
}

.pass-overflow-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: #FFAE00;
  border: 2px solid #FFFDF5;
  color: var(--cocoa-deep);
  font-size: 11.5px;
  font-weight: 900;
  white-space: nowrap;
}

.pass-claim-all-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border-width: 7px 12px !important;
  border-image-width: 7px 12px !important;
  font-size: 12.5px !important;
  font-weight: 900;
  color: var(--cocoa-deep) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

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

.milestone-steps.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.milestone-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 12px;
  background: rgba(255, 250, 236, 0.72);
  border: 2px solid #D9A76A;
}

.milestone-node.done {
  border-color: #55D418;
  background: #ECFFDF;
}

.milestone-node img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.milestone-pts {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--cocoa-deep);
}

/* Quest mini bar */
.q-bar-wrap {
  width: 92%;
  height: 12px;
  border-radius: 999px;
  background: #D8B48A;
  overflow: hidden;
  border: 2px solid var(--cocoa-ink);
}

.q-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #77E62E, #46B80C);
  border-radius: 999px;
}

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

.setting-panel {
  padding: 8px 12px;
  border-width: 10px 12px !important;
  border-image-width: 10px 12px !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--cocoa-deep);
}

.setting-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.setting-slider {
  width: 150px;
  accent-color: #55D418;
  cursor: pointer;
}

.toggle-btn {
  min-width: 72px;
  height: 36px;
  padding: 0 12px;
  border-width: 7px 12px !important;
  border-image-width: 7px 12px !important;
  font-size: 13px;
  font-weight: 900;
  color: var(--cocoa-deep) !important;
}

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

.lang-btn {
  height: 38px;
  padding: 0 8px;
  border-width: 8px 10px !important;
  border-image-width: 8px 10px !important;
  font-size: 13px;
  font-weight: 800;
  color: var(--cocoa-deep) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-btn.active {
  color: #FFFFFF !important;
  text-shadow: 0 1px 0 var(--cocoa-deep);
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* 3-Icon Visual Feature Guide */
.guide-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* Game Over Celebration Layout */
.gameover-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.gameover-score {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 900;
  color: #FF8C00;
  -webkit-text-stroke: 1.5px var(--cocoa-ink);
  text-shadow: 0 4px 0 var(--cocoa-ink);
}

.gameover-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.lb-strip {
  width: 100%;
  padding: 8px 12px;
  border-width: 10px 12px !important;
  border-image-width: 10px 12px !important;
  display: flex;
  justify-content: space-around;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.modal-cta-big {
  min-width: 138px;
  height: 46px;
  padding: 0 16px;
  border-radius: 15px;
  border-width: 10px 16px !important;
  border-image-width: 10px 16px !important;
  font-size: 15px;
  font-weight: 900;
  color: var(--cocoa-deep) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

/* Preview-Only Debug Panel (STRICTLY NOT MOUNTED WHEN window.__MS_RELEASE__ === true) */
.dev-pill {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 95;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(30, 18, 10, 0.84);
  border: 2px solid #FFD54F;
  color: #FFE484;
  font-size: 12px;
  font-weight: 800;
}

.debug-panel {
  position: fixed;
  left: 14px;
  bottom: 52px;
  z-index: 96;
  width: 248px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(34, 20, 12, 0.94);
  border: 2px solid #FFD54F;
  color: #FFFDF5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

.debug-panel button {
  padding: 6px 8px;
  border-radius: 8px;
  background: #5E341D;
  color: #FFFDF5;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

/* 1280x720 Compact Fit */
@media (max-width: 1366px), (max-height: 760px) {
  .hud-top,
  .title-meta-bar {
    padding: 6px 10px;
  }
  .hud-mode-btn,
  .hud-pill-btn,
  .hud-action-pill,
  .hud-currency-pill,
  .hud-vip-pill,
  .hud-nav-btn {
    height: 38px;
    padding: 0 9px;
    font-size: 12.5px;
  }
  .hud-nav-btn > span:not(.notify-badge) {
    max-width: 72px;
  }
  .hud-sq-btn,
  .hud-icon-btn {
    width: 38px;
    height: 38px;
  }
  .hud-sq-btn img,
  .hud-icon-btn img {
    width: 22px;
    height: 22px;
  }
  .booster-dock {
    right: 14px;
    bottom: 16px;
    gap: 8px;
  }
  .booster-btn {
    width: 72px;
    height: 72px;
  }
  .booster-btn img {
    width: 42px;
    height: 42px;
  }
  .vf-art-wrap {
    height: 76px;
  }
  .vf-art-wrap img {
    width: 72px;
    height: 72px;
  }
  .vf-card-portrait {
    min-height: 164px;
    padding: 4px 6px 6px;
  }
}

@media (max-width: 900px) {
  .visual-grid,
  .visual-grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hud-nav-btn > span:not(.notify-badge) {
    display: none;
  }
}
