:root { --bg: #f4f1ea; --fg: #17191d; --card: #fff; --line: #c4bdae; --accent: #1d2b45; }
@media (prefers-color-scheme: dark) { :root { --bg: #14161b; --fg: #f2efe8; --card: #232730; --line: #454b57; --accent: #f0c482; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 18px/1.35 system-ui, sans-serif; background: var(--bg); color: var(--fg); }

#drive { display: none; position: fixed; inset: 0; background: #000; color: #ddd; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 24px; }
body.dark #drive { display: flex; }
body.dark #park { display: none; }
#d1 { font-size: 34px; margin: 0 0 14px; }
#d2 { font-size: 24px; color: #9a9a9a; margin: 0; }
#parked { margin-top: 56px; min-width: 320px; min-height: 96px; font-size: 30px; text-align: center;
  background: #1c1c1c; color: #fff; border-color: #777; }

main { padding: 12px 16px 40px; max-width: 1254px; margin: 0 auto; }
header { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; justify-content: space-between; }
h1 { font-size: 22px; margin: 0; }
h1 small { font-size: 14px; font-weight: normal; opacity: .7; }
#gps { font-size: 20px; font-variant-numeric: tabular-nums; }
button { font: inherit; min-height: 72px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--card); color: var(--fg); text-align: left; touch-action: manipulation; cursor: pointer; }
button:active { background: var(--line); }
button small { display: block; font-size: 15px; opacity: .75; margin-top: 4px; min-height: 1.3em; }
.row { display: flex; gap: 10px; margin: 12px 0; }
.row input { flex: 1; min-width: 0; font: inherit; min-height: 72px; padding: 0 14px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--card); color: var(--fg); }
.row button { text-align: center; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.debug { display: flex; gap: 12px; align-items: center; min-height: 64px; font-size: 15px; opacity: .8; }
.debug input { width: 28px; height: 28px; }
#fps { display: flex; align-items: center; justify-content: center; gap: 24px; height: 150px; font-size: 28px; }
#orb { width: 120px; height: 120px; border-radius: 50%; background: var(--accent); will-change: transform; }
#log { list-style: none; margin: 0; padding: 0; font: 14px/1.4 ui-monospace, Menlo, monospace; border-top: 2px solid var(--line); }
#log li { padding: 3px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
