/* Orbit Slinger (/play/orbit-slinger, ADR 0110). Colors come from site.css and
   dark.css variables, so light, dark and night need no companion file; the map
   itself is always night sky. */

.os-page .play-intro { margin-bottom: 12px; }
.os { display: grid; gap: 14px; }
.os-nojs { color: var(--muted); }
.os-game { display: grid; gap: 10px; }
.os-hud { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 650; }
.os-stars { font-size: 1.05rem; }
.os-field { position: relative; }
.os-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: #070b1d;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  margin-inline: auto;
  cursor: crosshair;
}
.os-canvas:focus-visible { outline: 3px solid var(--accent-moon); outline-offset: 2px; }
.os-tip { margin: 6px 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.35; }
.os-bar { display: flex; align-items: center; gap: 12px; }
.os-gauge {
  position: relative;
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: visible;
}
.os-gauge span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent-moon); }
.os-gauge span.is-gentle { background: var(--accent-sun); }
.os-gauge i {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-inline-start: -1px;
  background: var(--accent-sun);
}
.os-power { min-width: 11ch; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; text-align: end; }
.os-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.os-btn {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.os-btn:hover, .os-btn:focus-visible { border-color: var(--accent-moon); }
.os-btn-strong { margin-inline-start: auto; background: var(--accent-sun); border-color: var(--accent-sun); color: #1d1f24; }
.os-result {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.os-result p { margin: 0 0 8px; }
.os-result .os-why p { margin-bottom: 0; }
.os-result-title { font-size: 1.1rem; }
.os-why p { color: var(--muted); }
.os-why a { color: var(--accent-moon); font-weight: 600; }
.os-keys { margin: 0; color: var(--muted); font-size: 0.8rem; }
@media (pointer: coarse) { .os-keys { display: none; } }

.os-levels h2 { margin: 6px 0 8px; font-size: 1.05rem; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.os-total { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.os-levels ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.os-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.os-pick[aria-current="true"] { border-color: var(--accent-sun); box-shadow: inset 0 0 0 1px var(--accent-sun); }
.os-pick:disabled { cursor: default; opacity: 0.7; }
.os-pick-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.os-pick-name { flex: 1; }
.os-pick-stars { font-size: 0.8rem; }

.os-card { max-width: 72ch; margin-top: 28px; }
.os-card h2 { font-size: 1.15rem; }
.os-card li { margin-bottom: 6px; }
.os-sources summary { cursor: pointer; color: var(--muted); }

/* Wide screens: the map as big as the window allows on the left, the controls,
   the result and the levels in a column beside it. */
@media (min-width: 1000px) {
  .os {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    grid-template-rows: repeat(6, auto) 1fr;
    column-gap: 24px;
    row-gap: 12px;
    align-items: start;
  }
  .os-game:not([hidden]) { display: contents; }
  .os-field { grid-column: 1; grid-row: 1 / span 7; }
  .os-hud, .os-bar, .os-buttons, .os-result, .os-keys, .os-levels, .os-nojs { grid-column: 2; }
  .os-levels ol { grid-template-columns: 1fr; gap: 6px; }
  .os-levels h2 { margin-top: 4px; }
}

/* Full screen on a phone: the map first, the levels list below the fold. */
.game-stage.is-full .os { max-width: none; justify-items: center; }
.game-stage.is-full .os-game { width: min(100%, 720px); }
.game-stage.is-full .os-levels { width: 100%; }
