/* Flappy Kiro page styles */

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  /* Light background around the play area */
  background: #e8f4fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Positioned so overlays (e.g. the debug Tuning_Panel) can be absolutely placed */
.game-container {
  position: relative;
  line-height: 0;
}

#game {
  display: block;
  /* Fit the 480×640 portrait canvas to the window, preserving aspect ratio */
  height: 100vh;
  max-height: 100vh;
  max-width: 100vw;
  aspect-ratio: 480 / 640;
  width: auto;
  /* Crisp, nearest-neighbour scaling for the retro pixel look */
  image-rendering: crisp-edges; /* fallback for older Firefox */
  image-rendering: pixelated;
  touch-action: none;
}

/* Developer-only Tuning_Panel overlay (?debug=1, toggled with D) */
.tuning-panel {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  box-sizing: border-box;
  width: min(320px, calc(100% - 16px));
  max-height: calc(100% - 16px);
  overflow-y: auto;
  padding: 8px 10px;
  background: rgba(20, 24, 32, 0.9);
  color: #f5f5f5;
  border-radius: 6px;
  font: 12px/1.4 system-ui, sans-serif;
  touch-action: auto;
}

.tuning-panel[hidden] {
  display: none;
}

.tuning-panel__title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
}

.tuning-panel__row {
  display: grid;
  grid-template-columns: 1fr 1fr 64px;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.tuning-panel__range,
.tuning-panel__number {
  min-width: 0;
  margin: 0;
}

.tuning-panel__number {
  box-sizing: border-box;
  width: 100%;
  font: inherit;
}

.tuning-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tuning-panel :focus-visible {
  outline: 2px solid #ffd54f;
  outline-offset: 1px;
}
