* { box-sizing: border-box; }
html, body { touch-action: none; -webkit-user-select: none; user-select: none; margin: 0; height: 100%; overflow: hidden; background: #0f1219; color: #e8ecf3; font: 14px/1.4 system-ui, sans-serif; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }

#status { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 18px; text-align: center; max-width: 80vw; }
#status:empty { display: none; }
#score { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 20px; text-shadow: 0 2px 6px #000; }

#panel {
  position: fixed; top: 16px; right: 16px; width: 270px; padding: 14px 16px;
  background: rgba(12, 15, 22, 0.82); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px;
  backdrop-filter: blur(6px);
}
#panel .head { display: flex; align-items: center; justify-content: space-between; }
#panel h1 { margin: 0; font-size: 16px; }
#toggle { display: none; border: 0; border-radius: 6px; padding: 4px 8px; background: rgba(255, 255, 255, 0.1); color: inherit; font-size: 12px; }
.help.touch { display: none; }

.stick { position: fixed; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.06); display: none; pointer-events: none; }
.stick.active { display: block; }
.stick .knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }
.stick.aim .knob { background: rgba(255, 140, 90, 0.7); }
#panel h2 { margin: 14px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: #9aa5b8; }
#panel .sub { margin: 2px 0 10px; color: #9aa5b8; font-size: 12px; }
#panel dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; }
#panel dt { color: #9aa5b8; white-space: nowrap; }
#panel dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
#ratio { color: #7ee08a; }
.brand { margin: 0 0 8px; font-size: 12px; }
.muted { color: #9aa5b8; }
#swap { width: 100%; padding: 8px; border: 0; border-radius: 6px; background: #3b6cf6; color: white; font-weight: 600; cursor: pointer; }
#swap:hover { background: #4d7bff; }
.help { margin: 10px 0 0; color: #9aa5b8; font-size: 12px; }
code { background: rgba(255, 255, 255, 0.08); padding: 1px 4px; border-radius: 4px; }

/* Phones and other touch screens: compact, collapsible panel at the top so thumbs stay free. */
@media (pointer: coarse), (max-width: 640px) {
  #toggle { display: block; }
  #panel { top: 8px; right: 8px; left: auto; bottom: auto; width: 210px; padding: 8px 10px; font-size: 12px; }
  #panel h1 { font-size: 13px; }
  #panel .sub { display: none; }
  #panel h2 { margin-top: 8px; font-size: 11px; }
  #panel.collapsed dl, #panel.collapsed h2, #panel.collapsed .brand, #panel.collapsed #swap, #panel.collapsed .help { display: none; }
  #swap { padding: 6px; font-size: 12px; }
  .help.desktop { display: none; }
  .help.touch { display: block; }
  #score { top: 8px; left: 12px; transform: none; font-size: 16px; }
}
body:not(.showroom) #panel .showroom { display: none; }
