/* ==========================================================================
   css/style.css — Maplebolt: Screw Sort Puzzle
   Archetype: `playstore_glossy_casual` (Sunlit Maple & Brass Craft Workbench)
   Hard Invariants:
   - ZERO `backdrop-filter` anywhere
   - Exact 9-slice `border-image` on `btn_primary.png` & `frame_panel.png`
   - Every button hosting `.notify-badge` has `overflow: visible !important; position: relative;`
   - Responsive `minmax(0, 1fr)` grids + `clamp()` typography across all 9 languages
   ========================================================================== */

:root {
  --wood-bg: #C9884A;
  --wood-dark: #5C351E;
  --backplate: #F8ECE0;
  --rail-bg: #4B2B17;
  --rail-border: #DAAF73;
  --brass-accent: #E6A832;
  --text-main: #3B2111;
  --text-muted: #6E4930;
  --parchment-solid: #FAF0E2;
  --parchment-card: #FFF7EB;
  --walnut-deep: #341C0E;
  --daily-purple: #6C5CE7;
  --daily-purple-dark: #4834D4;
  --amber-warn: #F5A11C;
  --red-crit: #E23B3B;
  --emerald-hi: #A6EC5C;
  --emerald-lo: #29B836;
  --font-display: 'Lilita One', 'Fredoka', 'Trebuchet MS', sans-serif;
  --font-hud: 'Fredoka', 'Nunito', 'Segoe UI', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  font-family: var(--font-body);
  background-color: var(--wood-dark);
  color: var(--text-main);
}

.hidden {
  display: none !important;
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

/* ==========================================================================
   1. 9-SLICE ANTI-DISTORTION CHROME (`btn_primary.png` & `frame_panel.png`)
   ========================================================================== */
.btn-primary-9slice,
.btn-9slice-primary {
  box-sizing: border-box;
  position: relative;
  overflow: visible !important;
  background: transparent !important;
  border-style: solid;
  border-color: transparent;
  border-width: 16px 20px 16px 20px;
  border-image: url('../assets/ui/btn_primary.png') 157 161 156 161 fill / 16px 20px 16px 20px / 0 stretch;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #FFFFFF;
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: clamp(13px, 1.05vw, 17px);
  line-height: 1.15;
  text-shadow: 0 2px 0 #074719, 0 1px 4px rgba(0, 0, 0, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2px 10px;
  min-height: 46px;
  transition: transform 0.12s ease;
}

.btn-primary-9slice:hover:not(:disabled),
.btn-9slice-primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-primary-9slice:active:not(:disabled),
.btn-9slice-primary:active:not(:disabled) {
  transform: translateY(2px);
}

.panel-9slice {
  box-sizing: border-box;
  background: transparent !important;
  border-style: solid;
  border-color: transparent;
  border-width: 40px 32px 34px 32px;
  border-image: url('../assets/ui/frame_panel.png') 308 216 224 216 fill / 40px 32px 34px 32px / 0 stretch;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--text-main);
}

/* ==========================================================================
   2. RED-DOT NOTIFICATION BADGE OVERFLOW LAW (NEVER CLIP!)
   ========================================================================== */
.has-badge,
[data-notify] {
  position: relative !important;
  overflow: visible !important;
}

.btn-label {
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
}

.notify-badge {
  position: absolute;
  top: -11px;
  right: -2px;
  z-index: 35;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FF5E57 0%, #D62828 100%);
  border: 2px solid #FFFDF5;
  color: #FFFFFF;
  font-family: var(--font-hud);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
  text-shadow: 0 1px 0 #7A1010;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.38);
  animation: notifyPulse 1.8s ease-in-out infinite;
}

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

/* ==========================================================================
   3. SCREEN LAYERS & SUNLIT TITLE SCREEN
   ========================================================================== */
.screen-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#title-screen {
  background: #8B542F url('../assets/art/title_bg.jpg') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
}

.title-scrim-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(46, 24, 10, 0.14) 0%, rgba(36, 18, 7, 0.52) 100%);
  pointer-events: none;
}

.title-center-card {
  position: relative;
  z-index: 2;
  width: min(860px, 94vw);
}

.title-card-inner {
  background: var(--parchment-solid);
  border-radius: 14px;
  padding: clamp(14px, 2vw, 24px);
  border: 2px solid rgba(185, 125, 56, 0.35);
}

.title-hero-row {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
}

.title-portrait-wrap {
  position: relative;
  flex: 0 0 clamp(150px, 19vw, 225px);
  height: clamp(165px, 21vw, 245px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: radial-gradient(circle at 50% 55%, rgba(255, 222, 138, 0.65) 0%, rgba(248, 236, 224, 0) 72%);
  border-radius: 20px;
}

#title-portrait {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.title-brand-col {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.title-kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #4E2D18;
  color: #FFE7B3;
  padding: 5px 13px;
  border-radius: 999px;
  border: 2px solid #DAAF73;
  font-weight: 700;
  font-size: clamp(11px, 0.95vw, 13.5px);
}

.mini-bolt-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.game-logo-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.3vw, 44px);
  line-height: 1.08;
  color: #FFFDF5;
  -webkit-text-stroke: 2px #4A2511;
  text-shadow: 0 4px 0 #4A2511, 0 6px 12px rgba(59, 33, 17, 0.35);
  background: linear-gradient(180deg, #7A4322 0%, #522B14 100%);
  padding: 10px 18px;
  border-radius: 16px;
  border: 3px solid #E3A74A;
}

.boot-loading-wrap {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.boot-bar-track {
  width: 100%;
  height: 18px;
  background: #3B2111;
  border-radius: 999px;
  border: 2px solid #DAAF73;
  padding: 2px;
  overflow: hidden;
}

.boot-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5FD34A 0%, #FFD166 100%);
  transition: width 0.16s ease-out;
}

.boot-bar-label {
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.title-cta-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.title-play-btn {
  min-width: 220px;
  min-height: 58px;
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: 0.5px;
}

.title-sub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   4. TOP WALNUT & BRASS HUD RAIL (`56px`)
   ========================================================================== */
#game-screen {
  background: #7F4B2D url('../assets/art/arena_bg.jpg') center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.top-walnut-rail {
  width: 100%;
  min-height: 56px;
  padding: 6px clamp(10px, 1.8vw, 26px);
  background: linear-gradient(180deg, #5C351E 0%, #3E2212 100%);
  border-bottom: 3px solid var(--rail-border);
  box-shadow: 0 4px 12px rgba(24, 12, 5, 0.38);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 10;
}

.hud-cluster {
  display: flex;
  align-items: center;
  gap: clamp(5px, 0.55vw, 9px);
  min-width: 0;
}

.hud-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.btn-walnut-pill {
  position: relative;
  overflow: visible !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  padding: 0 clamp(9px, 0.85vw, 13px);
  border-radius: 999px;
  background: linear-gradient(180deg, #7D492A 0%, #4E2B17 100%);
  border: 2px solid #E3A74A;
  box-shadow: 0 3px 0 #2A150A;
  color: #FFFDF5;
  font-size: clamp(11px, 0.88vw, 13.5px);
  font-weight: 700;
  text-shadow: 0 1px 0 #2A150A;
}

.btn-walnut-pill:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-shop-gold {
  background: linear-gradient(180deg, #E89C25 0%, #B86B11 100%);
  border-color: #FFE58F;
  color: #FFFDF5;
  text-shadow: 0 2px 0 #5C3105;
}

.btn-lang-pill {
  min-width: 48px;
  background: linear-gradient(180deg, #5E3A22 0%, #3A2010 100%);
  border-color: #F3C677;
  letter-spacing: 0.4px;
}

.btn-daily-pill {
  position: relative;
  overflow: visible !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 clamp(9px, 0.85vw, 13px);
  border-radius: 999px;
  background: linear-gradient(180deg, #7D6FF0 0%, #5243C2 100%);
  border: 2px solid #DFD9FF;
  box-shadow: 0 3px 0 #2C2178;
  color: #FFFFFF;
  font-size: clamp(11px, 0.85vw, 13px);
  font-weight: 700;
  text-shadow: 0 1px 0 #251B66;
}

.btn-walnut-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(180deg, #754427 0%, #4A2916 100%);
  border: 2px solid #DAAF73;
  box-shadow: 0 3px 0 #2A150A;
  color: #FFF6E5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-quit-accent {
  background: linear-gradient(180deg, #B5443A 0%, #7E261F 100%);
  border-color: #F4A59E;
}

.hud-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: #331B0E;
  border: 2px solid #C9884A;
  color: #FFFDF5;
}

.hud-level-badge {
  background: #E6A832;
  color: #3B2111;
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: clamp(11px, 0.88vw, 13px);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.hud-curio-title {
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: clamp(11.5px, 0.92vw, 14px);
  color: #FFF8EC;
  white-space: nowrap;
}

.hud-stat-pill,
.hud-coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 11px;
  border-radius: 999px;
  background: #331B0E;
  border: 2px solid #E3A74A;
  color: #FFFFFF;
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: clamp(12px, 0.95vw, 14.5px);
  text-shadow: 0 2px 0 #1F1008;
}

.hud-tabular {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ==========================================================================
   5. 16:9 WORKBENCH BODY (`>= 94%` WIDTH, `65%` BOARD + `35%` COMMAND RAIL)
   ========================================================================== */
.workbench-layout {
  flex: 1 1 auto;
  width: min(1760px, 96vw);
  min-height: 0;
  padding: clamp(8px, 1.1vh, 14px) 0;
  display: grid;
  grid-template-columns: minmax(0, 64fr) minmax(300px, 36fr);
  gap: clamp(10px, 1.2vw, 18px);
  align-items: stretch;
}

.board-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-radius: 22px;
  background: rgba(66, 36, 18, 0.28);
  border: 3px solid rgba(218, 175, 115, 0.65);
  box-shadow: 0 10px 24px rgba(32, 16, 6, 0.34);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#board-canvas {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transform: translateZ(0);
  will-change: transform;
  contain: layout style paint;
}

/* Tutorial / Hammer Target Banner */
.tutorial-banner {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  width: min(600px, 92%);
  background: #FFF6E5;
  border: 3px solid #E3A74A;
  border-radius: 16px;
  padding: 8px 14px;
  box-shadow: 0 6px 16px rgba(43, 22, 10, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tutorial-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-tutorial-skip {
  height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.tutorial-banner-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: #3B2111;
}

.tutorial-banner-copy strong {
  font-family: var(--font-hud);
  font-size: 14px;
  color: #5C2C10;
}

.tutorial-banner-copy span {
  font-size: 12.5px;
  font-weight: 700;
  color: #6B442A;
}

/* Bottom Board Status & Steady Hands Balance Strip */
.board-status-bar {
  flex: 0 0 38px;
  contain: layout style;
  background: linear-gradient(180deg, #4B2B17 0%, #361E0F 100%);
  border-top: 2px solid var(--rail-border);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #FFF8EC;
  font-size: 12.5px;
  font-weight: 700;
}

.hover-xray-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #FFECC7;
}

.xray-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6AE368;
  flex-shrink: 0;
}

.xray-dot.is-blocked {
  background: #F5A11C;
}

.board-telemetry-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.hud-moves-chip {
  color: #EAD2B5;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.balance-meter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: help;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.balance-meter-wrap.is-sag-risk {
  background: rgba(180, 92, 22, 0.34);
  border-color: rgba(255, 179, 71, 0.72);
}

@keyframes balanceWarnFlash {
  0%, 100% { background: rgba(180, 92, 22, 0.25); }
  30% { background: rgba(204, 58, 34, 0.78); }
  65% { background: rgba(180, 92, 22, 0.45); }
}

.balance-meter-wrap.is-balance-warn {
  animation: balanceWarnFlash 0.65s ease;
}

.balance-label {
  color: #FFE7B3;
  font-size: 12px;
}

.balance-track {
  position: relative;
  width: 74px;
  height: 10px;
  border-radius: 999px;
  background: #221209;
  border: 1.5px solid #C9884A;
  overflow: hidden;
}

.balance-fill {
  height: 100%;
  background: linear-gradient(90deg, #5BD84E 0%, #FFD166 100%);
  transition: width 0.2s ease, background 0.2s ease;
}

.balance-fill.is-low {
  background: linear-gradient(90deg, #E2513A 0%, #F5A11C 100%);
}

.balance-threshold-tick {
  position: absolute;
  left: 70%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 253, 245, 0.92);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}

.balance-pct {
  color: #FFFDF5;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

/* ==========================================================================
   6. RIGHT 35% DARK WALNUT & BRASS COMMAND RAIL
   ========================================================================== */
.command-rail {
  min-width: 0;
  min-height: 0;
  background: linear-gradient(180deg, var(--rail-bg) 0%, #311A0D 100%);
  border: 3px solid var(--rail-border);
  border-radius: 22px;
  padding: clamp(9px, 1.3vh, 15px);
  box-shadow: 0 10px 24px rgba(26, 13, 5, 0.42);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(8px, 1.35vh, 14px);
  overflow: hidden;
}

.rail-card {
  background: rgba(33, 17, 8, 0.68);
  border: 2px solid rgba(218, 175, 115, 0.55);
  border-radius: 16px;
  padding: clamp(8px, 1.15vh, 14px) 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#active-boxes-panel {
  flex: 1.15 1 auto;
}

#buffer-dock-panel {
  flex: 1.0 1 auto;
}

#juice-panel {
  flex: 0.72 0 auto;
}

#tool-belt-panel {
  flex: 1.35 1 auto;
}

.rail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: clamp(5px, 0.8vh, 10px);
}

.rail-section-title {
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: clamp(12px, 0.95vw, 14.5px);
  color: #FFEAC2;
  text-shadow: 0 1px 0 #1C0E06;
  white-space: nowrap;
}

/* 6.1 Active Collector Boxes + Queue Strip */
.box-queue-strip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 243, 224, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(230, 168, 50, 0.45);
}

.queue-label {
  font-size: 11px;
  font-weight: 700;
  color: #EAD2B5;
}

.queue-icons-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.queue-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #FFFDF5;
  object-fit: contain;
}

.active-boxes-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 9px;
  align-items: stretch;
}

.collector-box {
  position: relative;
  min-width: 0;
  min-height: clamp(50px, 7.2vh, 84px);
  border-radius: 15px;
  padding: 8px 10px;
  border: 2.5px solid #FFE599;
  box-shadow: 0 4px 0 rgba(18, 9, 4, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.collector-box.is-xray-target {
  transform: translateY(-2px) scale(1.03);
  border-color: #FFFFFF;
}

.collector-box[data-color="red"]    { background: linear-gradient(180deg, #F6532D 0%, #B82508 100%); }
.collector-box[data-color="blue"]   { background: linear-gradient(180deg, #2B95F8 0%, #0A58AD 100%); }
.collector-box[data-color="amber"]  { background: linear-gradient(180deg, #DC840C 0%, #8E4A02 100%); border-color: #FFF0B3; }
.collector-box[data-color="green"]  { background: linear-gradient(180deg, #3CD04A 0%, #198224 100%); }
.collector-box[data-color="violet"] { background: linear-gradient(180deg, #AD4BFF 0%, #6814BD 100%); }
.collector-box[data-color="pink"]   { background: linear-gradient(180deg, #FF6EC7 0%, #BF2483 100%); }

.box-fill-badge {
  position: static;
  align-self: center;
  flex: 0 0 auto;
  padding: 1px 8px;
  border-radius: 999px;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: #FFFDF5;
  background: rgba(24, 12, 5, 0.80);
  border: 1.5px solid rgba(255, 232, 168, 0.72);
  pointer-events: none;
}

.box-fill-badge.has-bolts {
  color: #FFFFFF;
  background: rgba(20, 9, 3, 0.86);
  border-color: #FFE58F;
}

.box-sockets-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(22, 11, 4, 0.80);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 232, 168, 0.78);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.68);
}

.box-socket {
  width: clamp(24px, 2.8vh, 31px);
  height: clamp(24px, 2.8vh, 31px);
  border-radius: 50%;
  background: rgba(14, 7, 3, 0.86);
  border: 2px dashed rgba(255, 224, 140, 0.36);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.box-socket.is-filled {
  background: radial-gradient(circle at 35% 30%, #FFFDF5 0%, #F5E7C8 76%, #CCB286 100%);
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 0 0 1.5px rgba(24, 12, 5, 0.88), 0 2px 6px rgba(0, 0, 0, 0.58);
}

.collector-box[data-color="amber"] .box-socket.is-filled {
  background: radial-gradient(circle at 35% 30%, #FFFFFF 0%, #FFF4D6 74%, #E6C78A 100%);
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 0 0 2px #261002, 0 0 8px rgba(255, 248, 214, 0.85);
}

.box-socket img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
}

.collector-box[data-color="amber"] .box-socket.is-filled img {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.82)) contrast(1.14) saturate(1.12);
}

/* 6.2 6->8 Slot Buffer Dock */
.buffer-dock-card {
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.buffer-dock-card[data-pressure="tight"] {
  border-color: var(--amber-warn);
  background: rgba(78, 42, 8, 0.72);
}

.buffer-dock-card[data-pressure="critical"] {
  border-color: var(--red-crit);
  background: rgba(92, 18, 18, 0.76);
  animation: dockCritPulse 0.85s ease-in-out infinite;
}

@keyframes dockCritPulse {
  0%, 100% { border-color: #E23B3B; }
  50% { border-color: #FF9E80; }
}

.buffer-status-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(166, 236, 92, 0.18);
  color: #C8F79C;
  border: 1px solid rgba(166, 236, 92, 0.45);
}

.buffer-dock-card[data-pressure="tight"] .buffer-status-chip {
  background: rgba(245, 161, 28, 0.25);
  color: #FFE082;
  border-color: #F5A11C;
}

.buffer-dock-card[data-pressure="critical"] .buffer-status-chip {
  background: rgba(226, 59, 59, 0.35);
  color: #FFCDD2;
  border-color: #FF8A80;
}

.buffer-slots-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
  gap: 7px;
  align-items: center;
}

.buffer-slot {
  aspect-ratio: 1 / 1;
  max-height: clamp(44px, 6.2vh, 64px);
  margin: 0 auto;
  width: 100%;
  max-width: clamp(44px, 6.2vh, 64px);
  border-radius: 12px;
  background: #241309 url('../assets/ui/slot_tile.png') center center / contain no-repeat;
  border: 2px solid #9E6B3B;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.buffer-slot.is-xray-target {
  border-color: #FFE066;
  transform: scale(1.06);
}

.buffer-slot img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

/* 6.3 Auto-Play Workshop Juice Bar */
.juice-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.juice-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.juice-pct-badge {
  font-family: var(--font-hud);
  font-size: 12px;
  font-weight: 700;
  color: #C8F79C;
  font-variant-numeric: tabular-nums;
}

.juice-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.juice-track {
  flex: 1 1 auto;
  height: 18px;
  border-radius: 999px;
  background: #1E1008;
  border: 2px solid #C9884A;
  padding: 2px;
  overflow: hidden;
}

.juice-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #47A828 0%, #A6EC5C 60%, #FFF176 100%);
  transition: width 0.22s ease-out;
}

.btn-juice-cta {
  position: relative;
  overflow: visible !important;
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5BD84E 0%, #248F2D 100%);
  border: 2px solid #E8FF99;
  box-shadow: 0 3px 0 #135218;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  text-shadow: 0 1px 0 #135218;
}

.btn-juice-cta.is-ready {
  background: linear-gradient(180deg, #FFD54F 0%, #F57F17 100%);
  border-color: #FFFDF5;
  color: #3B2111;
  text-shadow: none;
}

/* 6.4 Precision Tool Belt (`minmax(0, 1fr)` compact responsive grid) */
.tool-belt-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 0.9vh, 10px);
  align-items: stretch;
}

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

.tool-btn {
  position: relative;
  overflow: visible !important;
  min-height: clamp(54px, 7.2vh, 78px);
  padding: 6px 4px 5px;
  border-radius: 13px;
  background: linear-gradient(180deg, #7A4728 0%, #4C2A16 100%);
  border: 2px solid #DAAF73;
  box-shadow: 0 3px 0 #261309;
  color: #FFFDF5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.tool-btn.is-active-mode {
  background: linear-gradient(180deg, #FFB300 0%, #E65100 100%);
  border-color: #FFFDF5;
}

.tool-btn-restart {
  grid-column: span 2;
  flex-direction: row;
  gap: 7px;
}

.tool-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.tool-name {
  font-size: clamp(10px, 0.78vw, 12px);
  font-weight: 700;
  color: #FFF8EC;
  text-shadow: 0 1px 0 #241208;
  line-height: 1.1;
}

.hotkey-tag {
  position: absolute;
  top: -4px;
  left: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 5px;
  background: #2B170C;
  border: 1.5px solid #DAAF73;
  color: #FFE599;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
}

.tool-count {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #29B836;
  border: 1.5px solid #FFFDF5;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  text-shadow: 0 1px 0 #0F5216;
  pointer-events: none;
}

/* ==========================================================================
   7. MODALS, GALLERY, DAILY, PASS, SHOP, VICTORY, SETTINGS & EXIT RETENTION
   (ZERO backdrop-filter: blur!)
   ========================================================================== */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(28, 14, 6, 0.74);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: min(860px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

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

.modal-inner-surface {
  background: var(--parchment-solid);
  border-radius: 14px;
  padding: clamp(12px, 1.6vw, 20px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(90vh - 76px);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #5C351E 0%, #3E2212 100%);
  border: 2px solid #E3A74A;
  border-radius: 13px;
  padding: 8px 14px;
  color: #FFFDF5;
}

.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.8vw, 26px);
  color: #FFFDF5;
  -webkit-text-stroke: 1.2px #2B150A;
  text-shadow: 0 2px 0 #2B150A;
}

.btn-icon-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #9E3329;
  border: 2px solid #FFD0C9;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-tabs-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn {
  position: relative;
  overflow: visible !important;
  padding: 7px 16px;
  border-radius: 999px;
  background: #E8D5BC;
  border: 2px solid #B98856;
  color: #4A2916;
  font-weight: 700;
  font-size: 13.5px;
}

.tab-btn.is-active {
  background: linear-gradient(180deg, #E89C25 0%, #B86B11 100%);
  border-color: #5C351E;
  color: #FFFDF5;
  text-shadow: 0 1px 0 #4A2511;
}

/* Multi-column Modal Grids (`minmax(0, 1fr)` anti-clipping law) */
.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

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

.grid-2col > *, .grid-3col > *, .grid-4col > * {
  min-width: 0;
  max-width: 100%;
}

/* Curio & Theme Cards */
.workshop-item-card {
  background: var(--parchment-card);
  border: 2px solid #D4AC7D;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  color: var(--text-main);
}

.workshop-item-card.is-locked {
  background: #EFE1CE;
  border-color: #C4A482;
}

.curio-thumb-canvas {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  background: #F4E4CE;
  border: 1.5px solid #CFA574;
}

.card-title-sm {
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 13.5px;
  color: #3B2111;
}

.card-desc-sm {
  font-size: 11.5px;
  font-weight: 600;
  color: #6B472E;
  line-height: 1.3;
}

/* Shop Cards */
.shop-card {
  position: relative;
  background: var(--parchment-card);
  border: 2.5px solid #DAAF73;
  border-radius: 16px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  text-align: center;
}

.shop-card.is-featured {
  background: linear-gradient(180deg, #FFF9EC 0%, #FCE8C3 100%);
  border-color: #E6A832;
}

.shop-ribbon-tag {
  align-self: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #D9443A;
  color: #FFFFFF;
  font-family: var(--font-hud);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.shop-pack-art {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.btn-secondary {
  position: relative;
  overflow: visible !important;
  min-height: 42px;
  padding: 6px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #7D492A 0%, #4E2B17 100%);
  border: 2px solid #DAAF73;
  box-shadow: 0 3px 0 #281409;
  color: #FFFDF5;
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: clamp(12px, 0.95vw, 14px);
  text-shadow: 0 1px 0 #241107;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Settings Rows & Sliders */
.settings-section-card {
  background: var(--parchment-card);
  border: 2px solid #D7B388;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-label-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.settings-label-col strong {
  font-size: 13.5px;
  color: #3B2111;
}

.settings-label-col span {
  font-size: 11.5px;
  color: #6E4930;
}

.slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-wrap input[type="range"] {
  width: 130px;
  accent-color: #29B836;
  cursor: pointer;
}

.toggle-pill-btn {
  min-width: 66px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #B89B7D;
  border: 2px solid #7A583B;
  color: #FFFDF5;
  font-weight: 700;
  font-size: 12px;
}

.toggle-pill-btn.is-on {
  background: #29B836;
  border-color: #16691E;
}

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

.lang-btn {
  height: 34px;
  border-radius: 10px;
  background: #EFE1CE;
  border: 2px solid #C69F74;
  color: #3B2111;
  font-weight: 700;
  font-size: 12px;
}

.lang-btn.is-active {
  background: #4E2B17;
  border-color: #E6A832;
  color: #FFFDF5;
}

/* Exit Retention Modal (`js/exit_modal.js` classes) */
.exit-modal-card {
  width: min(520px, 92vw);
}

.exit-modal-sub {
  margin: 8px 0;
  background: var(--parchment-solid);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  color: #3B2111;
}

.exit-rewards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.exit-reward-card {
  width: 100%;
  background: var(--parchment-card);
  border: 2px solid #E3A74A;
  border-radius: 13px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: #3B2111;
}

.exit-reward-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.exit-reward-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.exit-reward-title {
  font-weight: 800;
  font-size: 13.5px;
  color: #3B2111;
}

.exit-reward-desc {
  font-size: 12px;
  font-weight: 600;
  color: #6E4930;
}

.exit-reward-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #29B836;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 11.5px;
  flex-shrink: 0;
}

/* Cut-in Canvas & Toast */
.cutin-overlay-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 55;
  pointer-events: none;
}

.toast-container {
  position: fixed;
  bottom: 54px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(740px, 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.toast-pill {
  background: #3B2111;
  border: 2px solid #FFD166;
  color: #FFFDF5;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.38);
}

/* Preview-Only `[DEV F2]` Debug Corner Pill & Drawer (Upper-left below Top HUD — zero status bar overlap!) */
.dev-f2-pill {
  position: fixed;
  top: 62px;
  left: 8px;
  z-index: 90;
  background: rgba(24, 14, 8, 0.86);
  border: 1.5px solid #FFD166;
  color: #FFD166;
  font-family: monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

#debug-panel {
  position: fixed;
  top: 88px;
  left: 8px;
  z-index: 91;
  width: 280px;
  background: #22130B;
  border: 2px solid #FFD166;
  border-radius: 12px;
  padding: 10px;
  color: #FFFDF5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

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

.debug-btn {
  padding: 5px 6px;
  border-radius: 7px;
  background: #4E2D18;
  border: 1px solid #DAAF73;
  color: #FFFDF5;
  font-size: 11px;
  font-weight: 700;
}

/* ==========================================================================
   8. RESPONSIVE BREAKPOINTS (`1280x720` & `< 900px` Split-Screen Safe)
   ========================================================================== */
@media (max-width: 1180px) {
  .hud-curio-title {
    display: none;
  }
  .grid-4col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .title-hero-row {
    flex-direction: column;
    text-align: center;
  }
  .title-brand-col {
    align-items: center;
  }
  .top-walnut-rail {
    min-height: 46px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 4px 8px;
    gap: 5px;
  }
  .btn-walnut-pill, .btn-daily-pill, .hud-stage-pill, .hud-stat-pill, .hud-coin-pill, .btn-walnut-icon {
    height: 32px;
  }
  .btn-walnut-icon {
    width: 32px;
  }
  .workbench-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(210px, 44fr) minmax(0, 56fr);
    width: 97vw;
    padding: 5px 0;
    gap: 6px;
  }
  .board-status-bar {
    flex: 0 0 30px;
    font-size: 11.5px;
    padding: 0 10px;
  }
  .command-rail {
    padding: 6px 8px;
    gap: 5px;
    overflow-y: auto;
  }
  .rail-card {
    padding: 5px 9px;
    border-radius: 12px;
  }
  .rail-card-header {
    margin-bottom: 3px;
  }
  .collector-box {
    min-height: 40px;
    padding: 4px 6px;
  }
  .box-socket {
    width: 20px;
    height: 20px;
  }
  .buffer-slot {
    max-height: 34px;
    max-width: 34px;
  }
  .juice-header-row {
    margin-bottom: 3px;
  }
  .juice-track {
    height: 14px;
  }
  .btn-juice-cta {
    height: 26px;
    font-size: 10.5px;
  }
  .tool-belt-grid {
    gap: 5px;
  }
  .tool-btn {
    min-height: 40px;
    padding: 3px 3px;
    flex-direction: row;
    gap: 5px;
  }
  .tool-icon {
    width: 17px;
    height: 17px;
  }
  .grid-3col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   9. SEASONS 2–4 (v2.1 → v5.0) EXTENSIONS — ZERO backdrop-filter, ZERO overflow
   ========================================================================== */
@media (max-width: 1440px) {
  .hud-curio-title {
    display: none;
  }
}

.hud-shard-pill {
  border-color: #B89BFF;
  background: linear-gradient(180deg, #3C225E 0%, #24123B 100%);
}

.xray-toggle-chip {
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #3B2416;
  border: 1.5px solid #B6906C;
  color: #EAD2B5;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.xray-toggle-chip.is-active {
  background: linear-gradient(180deg, #1BB9FF 0%, #0A7AD6 100%);
  border-color: #FFFDF5;
  color: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(124, 232, 255, 0.55);
  text-shadow: 0 1px 0 #074178;
}

#board-stage.is-xray-active {
  box-shadow: inset 0 0 0 2px rgba(124, 232, 255, 0.65);
}

@keyframes refusalPillShake {
  0%, 100% { transform: translateX(0); background: transparent; }
  20% { transform: translateX(-5px); background: rgba(255, 196, 174, 0.92); border-radius: 999px; }
  45% { transform: translateX(5px); background: rgba(255, 196, 174, 0.92); border-radius: 999px; }
  70% { transform: translateX(-3px); background: rgba(255, 214, 186, 0.85); border-radius: 999px; }
}

.hover-xray-pill.is-refusal-flash {
  animation: refusalPillShake 0.36s ease;
}

/* Victory Modal — zero scrollbar / zero clipping at 1920x1000 & 1280x720; leaves top HUD clickable (#2238) */
#modal-victory.modal-scrim {
  top: 52px;
  padding-top: 10px;
}

#modal-victory .modal-card.modal-compact {
  width: min(600px, 92vw);
  max-height: calc(100vh - 68px);
}

#modal-victory .modal-inner-surface {
  padding: 12px 16px;
  gap: 8px;
  max-height: none;
  overflow: visible;
}

#modal-victory .modal-scroll-body {
  overflow: visible;
  padding-right: 0;
  gap: 8px;
}

.victory-banner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.victory-stars-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
}

.victory-stars-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding-top: 2px;
}

.victory-star-svg {
  width: 34px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(92, 46, 12, 0.28));
}

.victory-star-svg:nth-child(2) {
  width: 42px;
  height: 42px;
  transform: translateY(-4px);
}

.victory-star-svg.is-missed {
  opacity: 0.62;
  filter: none;
}

.victory-star-criteria {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.victory-star-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.victory-star-pill.is-met {
  background: #E7F7E3;
  border: 1.5px solid #41A52C;
  color: #1D5E14;
}

.victory-star-pill.is-missed {
  background: #F4E6D3;
  border: 1.5px solid #C69F74;
  color: #6B472E;
}

.victory-shard-line {
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(114, 62, 18, 0.10);
  border: 1px solid rgba(156, 92, 30, 0.28);
  font-size: 11.5px;
  font-weight: 700;
  color: #4E2B11;
  line-height: 1.3;
  text-align: center;
}

button.is-confirm-armed {
  outline: 2.5px solid #FFE58F;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(255, 196, 54, 0.42), 0 4px 12px rgba(92, 42, 6, 0.45) !important;
  filter: brightness(1.08) saturate(1.15);
}

.balance-meter-wrap.is-sag-caution {
  box-shadow: 0 0 0 2px rgba(245, 161, 28, 0.72);
  border-radius: 8px;
}

#modal-victory .workshop-item-card {
  padding: 8px 10px;
  gap: 4px;
}

@media (max-height: 540px) {
  #modal-victory .modal-inner-surface {
    max-height: calc(92vh - 74px);
    overflow: hidden;
  }
  #modal-victory .modal-scroll-body {
    overflow-y: auto;
  }
}

.hud-timer-chip {
  padding: 2px 9px;
  border-radius: 999px;
  background: #6B2418;
  border: 1.5px solid #FFD166;
  color: #FFF8E1;
  font-family: var(--font-hud);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.modal-tabs-row {
  flex-wrap: wrap;
}

.season-tag-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #4E2B17;
  border: 1.5px solid #E3A74A;
  color: #FFE7B3;
  font-family: var(--font-hud);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.progress-pill-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #2C180D;
  border: 1.5px solid #C9884A;
  overflow: hidden;
  padding: 1px;
}

.progress-pill-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #47A828 0%, #FFD166 100%);
  transition: width 0.2s ease;
}

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

.stamp-cell {
  height: 30px;
  border-radius: 8px;
  background: #EFE1CE;
  border: 1.5px solid #C69F74;
  color: #5C351E;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stamp-cell.is-stamped {
  background: linear-gradient(180deg, #5FD34A 0%, #299422 100%);
  border-color: #165912;
  color: #FFFFFF;
  text-shadow: 0 1px 0 #124A0E;
}

.forge-banner-card {
  background: linear-gradient(180deg, #3E215E 0%, #27133D 100%);
  border: 2px solid #C8A8F0;
  border-radius: 14px;
  padding: 10px 14px;
  color: #FFFDF5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.replay-stats-strip {
  position: relative;
  z-index: 2;
  width: 100%;
  background: #EFE1CE;
  border: 1.5px solid #C69F74;
  border-radius: 11px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #3B2111;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 8px;
}

