/* Late for Class – only what's specific to this game.
   Header and buttons come from /css/style.css. */

.lfc-layout {
  gap: 16px;
}

.lfc-hud {
  display: flex;
  gap: 28px;
}

.lfc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.lfc-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lfc-coin {
  color: var(--warn);
}

/* The stage sits in a centred column, so it needs its own width */
.lfc-stage {
  position: relative;
  width: min(100%, 960px);
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  touch-action: none;         /* swipes steer the runner, not the page */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.lfc-view {
  width: 100%;
}

.lfc-canvas {
  display: block;
}

.lfc-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  background: var(--overlay-light);
  text-align: center;
}

.lfc-overlay p {
  margin: 0;
}

.lfc-overlay .game-actions {
  margin-top: 10px;
}

.lfc-keys,
.lfc-swipe {
  text-align: center;
}

.lfc-swipe {
  display: none;
}

@media (pointer: coarse) {
  .lfc-keys {
    display: none;
  }
  .lfc-swipe {
    display: block;
  }
}

@media (max-width: 480px) {
  .lfc-hud {
    gap: 16px;
  }
  .lfc-value {
    font-size: 20px;
  }
}

kbd {
  display: inline-block;
  min-width: 22px;
  margin: 0 1px;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
}

/* Phone held sideways: fit the screen height (see css/style.css) */
@media (orientation: landscape) and (max-height: 540px) {
  .lfc-stage { width: min(960px, var(--play-w), calc(var(--play-h) * 1.77)); }
  .lfc-keys, .lfc-swipe { display: none; }
}
@media (orientation: landscape) and (max-height: 540px) {
  :root { --land-side: 236px; }
}
