html {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}
body {
  align-items: flex-start;
  overflow: hidden;
}

/* ── btn-new-game alias ──────────────── */
.btn-new-game {
  font-family: inherit;
  background: #27272a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-new-game:hover {
  background: #3f3f46;
}

/* ── Progress Bar ────────────────────── */
#progressBar {
  background: #27272a;
  border-radius: 10px;
  padding: 14px 14px 10px;
  margin-bottom: 12px;
  min-height: 61px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#progressBar::-webkit-scrollbar {
  display: none;
}
.progress-track {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 44px;
  position: relative;
}
.progress-emoji {
  font-size: 20px;
  line-height: 1;
  transition: transform 300ms ease, filter 300ms ease;
  filter: grayscale(1) opacity(0.35);
}
.progress-img {
  height: 22px;
  object-fit: contain;
  transition: transform 300ms ease;
}
.progress-step.reached .progress-emoji {
  filter: grayscale(0) opacity(1);
  transform: scale(1.15);
}
.progress-step.reached .progress-img {
  transform: scale(1.15);
}
.progress-step.current .progress-emoji {
  filter: grayscale(0) opacity(1);
  transform: scale(1.3);
}
.progress-step.current .progress-img {
  transform: scale(1.3);
}
.progress-name {
  font-size: 9px;
  font-weight: 600;
  color: #52525b;
  letter-spacing: 0.02em;
  transition: color 300ms ease;
}
.progress-step.reached .progress-name {
  color: #a1a1aa;
}
.progress-step.current .progress-name {
  color: #fff;
}
.progress-connector {
  width: 16px;
  height: 2px;
  background: #3f3f46;
  flex-shrink: 0;
  transition: background 300ms ease;
}
.progress-connector.filled {
  background: #fbc73c;
}

/* ── Board ───────────────────────────── */
#board {
  position: relative;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: #27272a;
  border-radius: 12px;
  padding: 10px;
  aspect-ratio: 1;
  overflow: hidden;
  touch-action: none;
}
.cell {
  background: #3f3f46;
  border-radius: 8px;
}

/* ── Animated tiles ── */
.tile {
  position: absolute;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  will-change: left, top, transform, opacity;
}
.tile-emoji { line-height: 1; }
.tile-img { object-fit: contain; pointer-events: none; }
.tile-name { line-height: 1; letter-spacing: -0.02em; margin-top: 2px; }

.moveTile {
  transition: left 100ms ease-in-out, top 100ms ease-in-out;
  z-index: 1;
}
.mergeTile {
  transform: scale(0);
  transition: transform 150ms cubic-bezier(0, 0.2, 0, 1.5);
  z-index: 3;
}
.newTile {
  transform: scale(0);
  transition: transform 200ms ease-out;
  z-index: 2;
}

/* ── Tile colors ─────────────────────── */
.tile[data-value="2"] { background: #e4e4e7; color: #27272a; }
.tile[data-value="4"] { background: #d4d4d8; color: #27272a; }
.tile[data-value="8"] { background: #fde047; color: #27272a; }
.tile[data-value="16"] { background: #eab308; color: #fff; }
.tile[data-value="32"] { background: #ec4899; color: #fff; }
.tile[data-value="64"] { background: #a855f7; color: #fff; }
.tile[data-value="128"] { background: #f59e0b; color: #fff; }
.tile[data-value="256"] {
  background: #0ea5e9;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 20px #0ea5e9;
}

/* ── Tax tile ────────────────────────── */
.taxTile {
  background: #3f3f46 !important;
  color: #71717a !important;
  outline: 2px dashed #52525b;
  outline-offset: -4px;
}
.tax-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a1a1aa;
}
.tax-countdown {
  font-size: 20px;
  font-weight: 700;
  color: #71717a;
}


/* ── Onboarding (game-specific) ─────── */
.onboarding-tax-preview { display: flex; justify-content: center; margin-bottom: 12px; }
.onboarding-tax-tile {
  width: 80px; height: 80px;
  background: #3f3f46;
  border-radius: 8px;
  outline: 2px dashed #52525b;
  outline-offset: -4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.onboarding-stages { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.onboarding-stage {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 6px 12px; background: #3f3f46; border-radius: 8px;
}
.onboarding-stage-img { height: 24px; width: 32px; object-fit: contain; flex-shrink: 0; }
.onboarding-stage strong { font-size: 13px; font-weight: 700; min-width: 60px; }
.onboarding-stage small { font-size: 12px; color: #a1a1aa; flex: 1; }
