/* ==========================================================================
   GRAM QUARRY — 2D ILLUSTRATED ("ÇİZGİSEL") PROSPECTOR DESIGN SYSTEM
   Serious, Grounded Palette • Bold Ink Outlines • Full-Height Boards
   ========================================================================== */

:root {
  --ink-outline: #1C1917;
  --wood-dark: #3E2718;
  --wood-mid: #5C3D28;
  --wood-light: #7C5236;
  --cream-bg: #F5F0E6;
  --cream-card: #FAF7F2;
  --cream-border: #D6C7B2;
  --gold-top: #FDE68A;
  --gold-mid: #F59E0B;
  --gold-bot: #B45309;
  --green-top: #34D399;
  --green-mid: #059669;
  --green-bot: #065F46;
  --font-display: 'Fredoka', 'Nunito', sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #14181D;
  font-family: var(--font-body);
  color: var(--ink-outline);
}

.is-hidden {
  display: none !important;
}

/* ==========================================================================
   GAME VIEWPORT & SCENIC 2D ILLUSTRATED WORLD
   ========================================================================== */
.game-viewport {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #1E293B;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.75);
}

.scenic-world {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.scenic-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cloud-1 {
  animation: cloudFloat1 22s ease-in-out infinite alternate;
}

.cloud-2 {
  animation: cloudFloat2 26s ease-in-out infinite alternate;
}

@keyframes cloudFloat1 {
  0% { transform: translateX(-6px); }
  100% { transform: translateX(12px); }
}

@keyframes cloudFloat2 {
  0% { transform: translateX(8px); }
  100% { transform: translateX(-12px); }
}

/* ==========================================================================
   TOP ILLUSTRATED HUD BAR (Safe Below Telegram Close/Minimize Bar!)
   ========================================================================== */
.game-top-hud {
  position: relative;
  z-index: 25;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: calc(env(safe-area-inset-top, 10px) + 10px) 10px 6px;
}

/* On Mobile Fullscreen: Always clear Telegram's native Close & Minimize top buttons */
body.is-mobile-fullscreen .game-top-hud {
  padding-top: max(
    82px,
    calc(var(--tg-safe-area-inset-top, env(safe-area-inset-top, 34px)) + var(--tg-content-safe-area-inset-top, 48px))
  );
}

.hud-left-group {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.hud-player-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #F5F0E6;
  border: 2.6px solid var(--ink-outline);
  border-radius: 999px;
  padding: 3px 10px 3px 4px;
  box-shadow: 0 3px 0 var(--ink-outline);
  cursor: pointer;
  max-width: 138px;
  transition: transform 0.12s ease;
}

.hud-player-pill:active {
  transform: translateY(2px);
}

.hud-avatar-box {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg, #D97706 0%, #92400E 100%);
  border: 2.2px solid var(--ink-outline);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hud-player-name {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-outline);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-cartoon-pill {
  height: 32px;
  min-width: 32px;
  padding: 0 8px;
  border-radius: 11px;
  background: linear-gradient(180deg, #CBD5E1 0%, #94A3B8 100%);
  border: 2.5px solid var(--ink-outline);
  box-shadow: 0 3px 0 var(--ink-outline);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-outline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.mini-cartoon-pill.gold {
  background: linear-gradient(180deg, #FDE68A 0%, #D97706 100%);
  font-size: 14px;
}

.mini-cartoon-pill:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink-outline);
}

.hud-balance-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #F5F0E6;
  border: 2.6px solid var(--ink-outline);
  border-radius: 999px;
  padding: 3px 11px 3px 6px;
  box-shadow: 0 3px 0 var(--ink-outline);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.hud-balance-pill:active {
  transform: translateY(2px);
}

.hud-gram-gem {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hud-balance-stack {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-balance-val {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-outline);
}

.hud-hourly-val {
  background: linear-gradient(180deg, #34D399 0%, #059669 100%);
  border: 2px solid var(--ink-outline);
  border-radius: 999px;
  padding: 1px 6px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: #FFFFFF;
}

/* ==========================================================================
   STAGE BODY WRAPPER (Holds Home Stage & Full-Height Boards)
   ========================================================================== */
.stage-body-wrap {
  position: relative;
  z-index: 15;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.home-stage {
  position: relative;
  z-index: 10;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4px 10px 8px;
  overflow: hidden;
}

/* Top-Center Utility Pills (TR & ?) Between Left and Right Slot Columns */
.stage-top-utils {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-column {
  position: absolute;
  top: 8px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-column.left-col {
  left: 10px;
}

.side-column.right-col {
  right: 10px;
}

.equip-slots-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Grounded 2D Illustrated Equipment Slot Card */
.equip-slot-btn {
  position: relative;
  width: 72px;
  height: 76px;
  border-radius: 18px;
  background: linear-gradient(180deg, #F5F0E6 0%, #D6C7B2 100%);
  border: 3px solid var(--ink-outline);
  box-shadow: 0 4px 0 var(--ink-outline), inset 0 2px 0 rgba(255, 255, 255, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.equip-slot-btn.unlocked {
  background: linear-gradient(180deg, #FEF3C7 0%, #D97706 100%);
}

.equip-slot-btn:active {
  transform: translateY(3px) scale(0.96);
  box-shadow: 0 1px 0 var(--ink-outline);
}

.slot-lvl-pill {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 24px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #F59E0B 0%, #B45309 100%);
  border: 2.2px solid var(--ink-outline);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 var(--ink-outline);
  z-index: 3;
}

.equip-slot-btn.locked .slot-lvl-pill {
  background: #64748B;
  color: #F8FAFC;
}

.slot-art-wrap {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -4px;
}

.slot-prog-pill {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: #1E293B;
  color: #F8FAFC;
  border: 2px solid #CBD5E1;
  border-radius: 999px;
  padding: 1px 7px;
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 3;
}

.equip-slot-btn.unlocked .slot-prog-pill {
  background: #065F46;
  border-color: #A7F3D0;
  color: #FFFFFF;
}

/* ==========================================================================
   CENTER PROSPECTOR CHARACTER & CONNECTED SHOULDER-ARM SWING
   ========================================================================== */
.miner-center-scene {
  position: relative;
  width: 100%;
  max-width: 310px;
  margin: auto auto 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 12;
}

.miner-character-svg {
  width: 100%;
  max-width: 295px;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 6px 0 rgba(15, 23, 42, 0.35));
}

#oreRockGroup {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: rockImpactPulse 0.95s ease-in-out infinite;
}

.miner-center-scene.turbo-active #oreRockGroup {
  animation-duration: 0.48s;
}

#impactSparksGroup {
  transform-box: fill-box;
  transform-origin: center center;
  animation: sparkFlash 0.95s ease-in-out infinite;
}

.miner-center-scene.turbo-active #impactSparksGroup {
  animation-duration: 0.48s;
}

@keyframes pickaxeSwing {
  0% { transform: rotate(18deg); }
  42% { transform: rotate(-14deg); }
  52% { transform: rotate(-17deg); }
  100% { transform: rotate(18deg); }
}

@keyframes headBob {
  0%, 100% { transform: translateY(0) rotate(1.5deg); }
  45% { transform: translateY(2.5px) rotate(-2deg); }
}

@keyframes rockImpactPulse {
  0%, 38%, 100% { transform: scale(1); }
  46% { transform: scale(1.04, 0.95) translateX(-2px); }
  58% { transform: scale(0.99, 1.02); }
}

@keyframes sparkFlash {
  0%, 36%, 68%, 100% { opacity: 0; transform: scale(0.5); }
  45%, 54% { opacity: 1; transform: scale(1.12); }
}

/* Turbo 2x Pill */
.turbo-indicator {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  background: linear-gradient(180deg, #FDE68A 0%, #D97706 100%);
  border: 2.6px solid var(--ink-outline);
  border-radius: 999px;
  padding: 3px 12px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-outline);
  box-shadow: 0 3px 0 var(--ink-outline);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 25;
}

.turbo-indicator.active {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Floating +GRAM Yield Popups */
.floating-Yields-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.floating-yield-tag {
  position: absolute;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: #FEF3C7;
  background: rgba(28, 25, 23, 0.9);
  border: 2px solid #F59E0B;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  pointer-events: none;
  animation: floatUpYield 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes floatUpYield {
  0% {
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.75);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -6px) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -46px) scale(0.92);
  }
}

/* ==========================================================================
   BIG GLOSSY GOLDEN TIMER / CLAIM BUTTON
   ========================================================================== */
.bottom-action-zone {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 2px 0 4px;
}

.big-gold-timer-btn {
  position: relative;
  width: 246px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FDE68A 0%, #F59E0B 52%, #B45309 100%);
  border: 3.4px solid var(--ink-outline);
  box-shadow: 0 5px 0 var(--ink-outline), inset 0 2px 0 rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.big-gold-timer-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--ink-outline);
}

.timer-btn-shine {
  position: absolute;
  top: 3px;
  left: 16px;
  right: 16px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.timer-btn-main {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink-outline);
  line-height: 1.05;
  letter-spacing: 0.5px;
}

.timer-btn-sub {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 800;
  color: #3E2004;
  margin-top: 1px;
}

/* ==========================================================================
   FULL-HEIGHT ILLUSTRATED BOARDS (Tasks, Ekip/Ref, Wallet)
   Stretches all the way down to the bottom navigation dock!
   ========================================================================== */
.wood-board-overlay {
  position: absolute;
  inset: 2px 10px 6px 10px;
  z-index: 30;
  display: none;
  flex-direction: column;
}

.wood-board-overlay.active {
  display: flex;
  animation: boardPopIn 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes boardPopIn {
  0% { opacity: 0; transform: scale(0.96) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.wood-board-frame {
  flex: 1;
  min-height: 0;
  height: 100%;
  background: linear-gradient(180deg, #5C3D28 0%, #3E2718 100%);
  border: 3.4px solid var(--ink-outline);
  border-radius: 24px;
  padding: 12px;
  box-shadow: 0 6px 0 var(--ink-outline), inset 0 2px 0 rgba(255, 232, 182, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wood-board-header {
  text-align: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.wood-title-3d {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: #FEF3C7;
  text-shadow: 0 3px 0 var(--ink-outline), -1.5px -1.5px 0 var(--ink-outline), 1.5px -1.5px 0 var(--ink-outline), -1.5px 1.5px 0 var(--ink-outline), 1.5px 1.5px 0 var(--ink-outline);
  letter-spacing: 0.3px;
}

.cream-card {
  background: var(--cream-bg);
  border: 2.8px solid var(--ink-outline);
  border-radius: 18px;
  padding: 11px;
  box-shadow: inset 0 2px 0 #FFFFFF, 0 3px 0 rgba(28, 25, 23, 0.25);
}

.cream-card.flex-fill-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cream-card-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-outline);
  margin-bottom: 4px;
}

.cream-card-desc {
  font-size: 11.5px;
  font-weight: 700;
  color: #57534E;
  line-height: 1.36;
  margin-bottom: 9px;
}

.glossy-green-btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #34D399 0%, #059669 55%, #065F46 100%);
  border: 2.8px solid var(--ink-outline);
  box-shadow: 0 4px 0 var(--ink-outline), inset 0 2px 0 rgba(255, 255, 255, 0.45);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 1.5px 0 var(--ink-outline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.glossy-green-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink-outline);
}

.glossy-green-btn:disabled {
  background: #94A3B8;
  cursor: not-allowed;
  opacity: 0.75;
}

/* Invite & Social Row */
.invite-cta-row {
  display: flex;
  gap: 8px;
  margin-bottom: 9px;
}

.invite-cta-row .glossy-green-btn {
  flex: 1;
}

.copy-square-btn {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #E2D6C3;
  border: 2.8px solid var(--ink-outline);
  box-shadow: 0 4px 0 var(--ink-outline);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.social-share-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.soc-btn {
  flex: 1;
  height: 34px;
  border-radius: 11px;
  border: 2.4px solid var(--ink-outline);
  box-shadow: 0 3px 0 var(--ink-outline);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.soc-btn.tg { background: #0284C7; }
.soc-btn.x  { background: #1E293B; }
.soc-btn.wa { background: #15803D; }
.soc-btn.fb { background: #1D4ED8; }
.soc-btn.ms { background: #6D28D9; }
.soc-btn.cp { background: #B45309; }

.ref-summary-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  text-align: center;
  flex-shrink: 0;
}

.ref-sum-col {
  background: #FAF7F2;
  border: 2.4px solid var(--ink-outline);
  border-radius: 13px;
  padding: 6px;
}

.ref-sum-lbl {
  font-size: 11px;
  font-weight: 800;
  color: #57534E;
  margin-bottom: 2px;
}

.ref-sum-val {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-outline);
}

.cream-divider {
  border: none;
  border-top: 2px dashed #C7B69E;
  margin: 8px 0;
  flex-shrink: 0;
}

.cream-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding-right: 2px;
}

.cream-scroll-list.full-height-list {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.cream-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #FAF7F2;
  border: 2.3px solid var(--ink-outline);
  border-radius: 13px;
  padding: 8px 10px;
  flex-shrink: 0;
}

.cream-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.cream-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #E7DEC8;
  border: 2.2px solid var(--ink-outline);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cream-item-title {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-outline);
}

.cream-item-sub {
  font-size: 10.5px;
  font-weight: 700;
  color: #57534E;
}

.cream-mini-btn {
  background: linear-gradient(180deg, #FDE68A 0%, #D97706 100%);
  border: 2.3px solid var(--ink-outline);
  border-radius: 10px;
  padding: 5px 10px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-outline);
  box-shadow: 0 2.5px 0 var(--ink-outline);
  cursor: pointer;
  white-space: nowrap;
}

.cream-mini-btn:disabled {
  background: #CBD5E1;
  color: #475569;
  cursor: default;
}

/* ==========================================================================
   WALLET BOARD STYLES
   ========================================================================== */
.wallet-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.wallet-title-lbl {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #57534E;
}

.wallet-bind-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #E7DEC8;
  border: 2.2px solid var(--ink-outline);
  border-radius: 999px;
  padding: 3px 9px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-outline);
  cursor: pointer;
}

.wallet-big-balance-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.wallet-big-num {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  color: var(--ink-outline);
}

.wallet-meta-lines {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: #57534E;
  margin-bottom: 8px;
}

.wallet-input-drawer {
  background: #FAF7F2;
  border: 2.3px solid var(--ink-outline);
  border-radius: 13px;
  padding: 8px;
}

.drawer-lbl {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #44403C;
  margin-bottom: 4px;
}

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

.cream-input {
  flex: 1;
  height: 34px;
  border-radius: 9px;
  border: 2.2px solid var(--ink-outline);
  background: #FFFFFF;
  padding: 0 9px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-outline);
  outline: none;
}

.wallet-subtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.w-subtab {
  flex: 1;
  height: 32px;
  border-radius: 10px;
  border: 2.3px solid var(--ink-outline);
  background: #E7DEC8;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-outline);
  cursor: pointer;
}

.w-subtab.active {
  background: linear-gradient(180deg, #FDE68A 0%, #D97706 100%);
  box-shadow: 0 2.5px 0 var(--ink-outline);
}

/* ==========================================================================
   BOTTOM 4-BUTTON ILLUSTRATED ("ÇİZGİSEL") NAVIGATION DOCK
   ========================================================================== */
.game-bottom-dock {
  position: relative;
  z-index: 35;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 4px 10px calc(env(safe-area-inset-bottom, 8px) + 6px);
}

.gdock-card {
  height: 66px;
  border-radius: 18px;
  background: linear-gradient(180deg, #F5F0E6 0%, #D6C7B2 100%);
  border: 2.8px solid var(--ink-outline);
  box-shadow: 0 4px 0 var(--ink-outline), inset 0 2px 0 rgba(255, 255, 255, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.14s ease;
}

.gdock-card.active {
  background: linear-gradient(180deg, #FDE68A 0%, #D97706 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 0 var(--ink-outline), inset 0 2px 0 #FEF3C7;
}

.gdock-card:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--ink-outline);
}

.gdock-art {
  width: 36px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gdock-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-outline);
  line-height: 1;
}

/* ==========================================================================
   MODALS (Equipment Upgrade, FAQ, Language Selector, Sponsored Ad)
   ========================================================================== */
.wood-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wood-modal-backdrop.active {
  display: flex;
}

.wood-modal-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: linear-gradient(180deg, #5C3D28 0%, #3E2718 100%);
  border: 3.4px solid var(--ink-outline);
  border-radius: 24px;
  padding: 16px 14px 14px;
  box-shadow: 0 8px 0 var(--ink-outline), inset 0 2px 0 rgba(255, 232, 182, 0.35);
}

.wood-modal-card.wide {
  max-width: 390px;
}

.red-close-btn {
  position: absolute;
  top: -10px;
  right: -8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, #EF4444 0%, #991B1B 100%);
  border: 3px solid var(--ink-outline);
  box-shadow: 0 3px 0 var(--ink-outline);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.equip-showcase-box {
  background: var(--cream-bg);
  border: 2.8px solid var(--ink-outline);
  border-radius: 18px;
  padding: 12px;
  text-align: center;
  margin-bottom: 10px;
}

.equip-modal-art {
  width: 72px;
  height: 72px;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.equip-progress-big {
  display: inline-block;
  background: #FDE68A;
  border: 2.3px solid var(--ink-outline);
  border-radius: 999px;
  padding: 2px 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.equip-modal-name {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink-outline);
}

.equip-compare-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cream-bg);
  border: 2.8px solid var(--ink-outline);
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.equip-comp-side {
  text-align: center;
  flex: 1;
}

.hex-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2.4px solid var(--ink-outline);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hex-level-badge.silver { background: #CBD5E1; }
.hex-level-badge.gold   { background: #F59E0B; color: #FFFFFF; }

.comp-stat-row {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-outline);
}

.equip-comp-arrows {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #B45309;
  padding: 0 6px;
}

.equip-mode-check {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream-bg);
  border: 2.4px solid var(--ink-outline);
  border-radius: 12px;
  padding: 7px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-outline);
  cursor: pointer;
}

/* FAQ & Language Grid */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 310px;
  overflow-y: auto;
}

.faq-item {
  background: #FAF7F2;
  border: 2.2px solid var(--ink-outline);
  border-radius: 13px;
  padding: 8px 10px;
}

.faq-item h4 {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-outline);
  margin-bottom: 3px;
}

.faq-item p {
  font-size: 11.5px;
  font-weight: 700;
  color: #57534E;
  line-height: 1.38;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  max-height: 290px;
  overflow-y: auto;
}

.lang-option-btn {
  background: #FAF7F2;
  border: 2.3px solid var(--ink-outline);
  border-radius: 11px;
  padding: 7px 6px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-outline);
  cursor: pointer;
  text-align: center;
}

.lang-option-btn.active {
  background: #FDE68A;
  box-shadow: 0 2.5px 0 var(--ink-outline);
}

.ad-prog-track {
  width: 100%;
  height: 14px;
  background: #CBD5E1;
  border: 2.4px solid var(--ink-outline);
  border-radius: 999px;
  overflow: hidden;
}

.ad-prog-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #34D399 0%, #059669 100%);
  transition: width 0.25s linear;
}

/* ==========================================================================
   SAFE TOAST NOTIFICATION (Below Telegram Fullscreen Bar & Top HUD)
   ========================================================================== */
.toast-box {
  position: fixed;
  top: max(92px, calc(var(--tg-safe-area-inset-top, env(safe-area-inset-top, 28px)) + 64px));
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  z-index: 120;
  background: #FEF3C7;
  border: 2.8px solid var(--ink-outline);
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: 0 4px 0 var(--ink-outline);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-outline);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 90%;
  text-align: center;
}

.toast-box.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
