.courier { max-width: 1160px; padding-top: 24px; padding-bottom: 22px; }
.courier button { font: inherit; cursor: pointer; }
.courier [hidden] { display: none; }
.courier-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.courier-heading h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); letter-spacing: -.055em; line-height: 1.05; margin-bottom: .4rem; }
.courier-heading p { color: var(--text-muted); font-size: 1rem; }
.flight-deck { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #42516d; border-radius: 18px; height: clamp(380px, calc(100svh - 224px), 605px); background: #181c39; color: #f3fffd; }
canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
canvas:focus-visible { outline: 3px solid #88fadd; outline-offset: -4px; }
.hud { position: absolute; inset: 0 0 auto; display: flex; align-items: stretch; gap: 8px; padding: 14px; pointer-events: none; }
.hud-cell { display: grid; align-content: center; gap: 3px; padding: 7px 11px; background: #10172bee; border: 1px solid #3a5368; border-radius: 10px; }
.hud-cell span, .hud-cell label { color: #b7ccd7; font-size: .84rem; line-height: 1.1; }
.hud-cell strong { font-variant-numeric: tabular-nums; font-size: 1.2rem; line-height: 1.1; }
.hud-meters { margin-left: auto; gap: 7px; }
.hud-meters label { display: grid; grid-template-columns: 5.1em 4.1em; align-items: center; gap: 7px; }
.hud-meters meter { width: 100%; height: 12px; }
.hud-meters meter[data-charged="true"] { filter: drop-shadow(0 0 4px #ffd97c); }
.flight-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 60px 12px 18px; background: radial-gradient(ellipse at center, #050b1a9c, #050b1a05 82%); }
.flight-dialog { width: min(100%, 426px); padding: 21px 19px; text-align: center; background: #0f172de8; border: 1px solid #45657a; border-radius: 16px; box-shadow: 0 20px 70px #030d23b0; }
.flight-dialog h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); letter-spacing: -.045em; margin-bottom: 6px; }
.flight-dialog p { color: #c9dde5; font-size: 1rem; line-height: 1.4; }
.flight-overlay[data-state="ended"] .flight-dialog { animation: courier-result-enter 430ms ease-out 120ms both; }
@keyframes courier-result-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .flight-overlay[data-state="ended"] .flight-dialog { animation: none; }
}
.flight-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 15px; }
.courier .launch, .courier .share, .courier .pause, .touch-controls button { min-height: 44px; padding: 8px 15px; border: 1px solid #64c9b7; border-radius: 9px; background: #1c374b; color: #effffc; font-weight: 650; }
.courier .launch { background: #89f7d9; border-color: #89f7d9; color: #0c2430; }
.courier .launch:hover { background: #bbffe9; }
.courier .share:hover, .courier .pause:hover { background: #265266; }
.flight-dialog [data-share-status]:empty { display: none; }
.flight-dialog [data-share-status] { margin-top: 8px; }
.touch-controls, .touch-notes { display: none; }
.keyboard-notes, .touch-notes { color: var(--text-muted); margin-top: 12px; font-size: .92rem; }
.keyboard-notes span { display: inline-block; width: .6em; }
kbd { padding: 1px 4px; border: 1px solid var(--border); border-radius: 4px; color: var(--text); }
@media (max-width: 570px) {
  .courier { padding-top: 16px; }
  .flight-deck { height: clamp(336px, 53svh, 510px); border-radius: 13px; }
  .hud { padding: 7px; gap: 4px; }
  .hud-cell { padding: 5px; }
  .hud-cell span, .hud-cell label { font-size: .82rem; }
  .hud-meters label { grid-template-columns: 5em 2.6em; gap: 4px; }
}
@media (pointer: coarse), (max-width: 570px) {
  .keyboard-notes { display: none; }
  .touch-notes { display: block; }
  .touch-controls { display: flex; position: absolute; inset: auto 8px 8px; gap: 6px; }
  .touch-controls button { touch-action: none; user-select: none; background: #111f37ef; }
  .touch-controls [data-control="boost"] { margin-left: auto; }
  .touch-controls button.pressed { background: #89f7d9; color: #0c2430; }
}
