/* ---------- paper plane: the game at the end of the page ---------- */
.plane-stage { position: relative; width: 100%; max-width: 960px; margin: 28px auto 0; }
.plane-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px;
}
.plane-sky { font-variant-numeric: tabular-nums; } /* the ramadan clock ticks without jiggling */
.plane-score { white-space: nowrap; font-size: 15px; letter-spacing: .04em; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.plane-frame { position: relative; }
.plane-canvas {
  display: block; width: 100%;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 16px;
  cursor: pointer; touch-action: manipulation;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.plane-stage.is-running .plane-canvas { cursor: default; touch-action: none; }
.plane-canvas:focus-visible { outline-width: 2px; outline-offset: 4px; }
.plane-stage.is-running .plane-canvas:focus-visible { outline: none; } /* mid-flight the ring is just noise */

/* the panel sits low so the idle plane has the sky to itself; clicks fall through to the canvas */
.plane-panel {
  position: absolute; inset: 0 0 9% 0; display: grid; justify-items: center; align-content: end;
  padding: 16px; pointer-events: none; text-align: center;
  transition: opacity .25s var(--ease), visibility .25s;
}
.plane-stage.is-running .plane-panel { opacity: 0; visibility: hidden; }
.plane-card {
  display: grid; justify-items: center; gap: 10px; max-width: 100%;
  padding: 14px 22px 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
}
.plane-stage[data-mode="idle"] .plane-card { background: none; }
.plane-card .btn { pointer-events: auto; }
.plane-note { font-family: var(--hand); font-size: clamp(24px, 3.2vw, 32px); line-height: 1.1; margin: 0 0 6px; color: var(--ink); transform: rotate(-1.5deg); text-wrap: balance; }
.plane-result { font-size: 14px; margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.plane-hint { font-size: 13px; margin: 0; color: var(--muted); }
.plane-stage [hidden] { display: none; }

@media (max-width: 600px) {
  .plane-stage { margin-top: 20px; }
  .plane-card { padding: 12px 14px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .plane-panel { transition: none; }
  .plane-note { transform: none; }
}
body.pro #plane { display: none !important; }
.plane-devnote { margin: 6px 0 0; font: 600 20px/1.2 "Caveat", cursive; color: var(--accent, #2346ff); }
.plane-devnote a { color: inherit; pointer-events: auto; }
