/* The wiki's dark theme (wiki.aiwaysdrivers.org userall.css tokens). */
:root {
  color-scheme: dark;
  --bg: #090d10; --panel: #10181d; --panel2: #0c1318; --ink: #eaf1f3; --dim: #9fb0b8; --line: #20303a;
  --brand: #22c7de; --brand-deep: #0fb6ce; --amber: #ffc24d;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 14px/1.4 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; }
.top { display: flex; align-items: center; gap: 18px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--panel2); }
.top .brand { color: var(--brand); text-decoration: none; font-weight: 600; white-space: nowrap; }
.top h1 { font-size: 16px; font-weight: 500; margin: 0; flex: 1; }
.top nav { display: flex; gap: 16px; }
.top nav a { color: var(--dim); text-decoration: none; }
.top nav a:hover, .top .brand:hover { color: var(--amber); }
main { display: flex; height: calc(100% - 46px); }
#stage { position: relative; flex: 1; min-width: 0; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#c:active { cursor: grabbing; }
#msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dim);
  font-size: 18px; pointer-events: none; text-align: center; padding: 24px; }
#msg[hidden] { display: none; }
#views { position: absolute; left: 16px; bottom: 34px; display: flex; gap: 10px; }
#views button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff55; background: #2a2d33cc;
  color: #fff; font-size: 20px; cursor: pointer; }
#info { position: absolute; left: 16px; bottom: 8px; font-size: 11px; color: #ffffff80; }
#panel { width: 440px; overflow-y: auto; padding: 14px 18px 18px; border-left: 1px solid var(--line); background: var(--panel); }
.cap { margin: 14px 0 6px; color: var(--dim); font-size: 12px; }
.note { color: var(--dim); font-size: 12px; margin: 6px 0 0; }
button { font: inherit; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill, .switch { border: 1px solid #ffffff40; background: #2a2d33; color: #fff; border-radius: 20px; padding: 8px 16px;
  cursor: pointer; text-align: left; }
.pill.on, .switch.on { background: var(--brand-deep); border-color: var(--brand); color: #04161a; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ffffff66; cursor: pointer; padding: 0; }
.swatch.on { border: 3px solid #fff; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* narrow screens: the car on top, the panel below */
@media (max-width: 820px) {
  main { flex-direction: column; height: auto; }
  #stage { height: 62vh; flex: none; }
  #panel { width: 100%; border-left: 0; border-top: 1px solid var(--line); }
  .top h1 { display: none; }
}
/* tests (?ui=0): the canvas alone, the window's size */
body.bare .top, body.bare #panel, body.bare #views, body.bare #info { display: none; }
body.bare main { height: 100%; }
