:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #021d27;
  color: #f3fdff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; margin: 0; overscroll-behavior: none; overflow-x: hidden; }
body {
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: radial-gradient(circle at 50% -20%, #087c8f 0, #043b4a 38%, #021d27 78%);
  touch-action: manipulation;
}

.card { width: min(100%, 480px); max-width: calc(100vw - 36px); }
.landing { text-align: center; padding: 44px 26px; }
.landing p { color: #bcebf1; line-height: 1.55; }
.controller { display: grid; gap: 18px; }
header { display: flex; align-items: center; justify-content: center; gap: 14px; }
h1 { margin: 0; font-size: 34px; letter-spacing: .02em; }
header p { margin: 2px 0 0; color: #8ed7e1; }
.wave-mark { font-size: 58px; line-height: .6; color: #41e1e3; transform: rotate(-8deg); }

.status-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(133, 234, 241, .24);
  border-radius: 16px;
  background: rgba(0, 20, 29, .5);
}
.status-panel small { display: block; margin-top: 4px; color: #9ccfd5; }
.status-dot { width: 13px; height: 13px; border-radius: 50%; background: #f5b942; box-shadow: 0 0 18px currentColor; }
.status-dot.connected { background: #45e58b; }
.status-dot.error { background: #ff6577; }

.meter { padding: 22px 0 6px; }
.meter-track { position: relative; height: 34px; overflow: hidden; border-radius: 20px; background: #00151d; border: 1px solid #155766; }
.meter-fill { position: absolute; left: 50%; top: 0; height: 100%; width: 0; background: linear-gradient(90deg, #1cb9d0, #43e5b2); transition: width 60ms linear, left 60ms linear; }
.meter-center { position: absolute; left: 50%; top: 0; width: 2px; height: 100%; background: #efffff; transform: translateX(-1px); }
.meter-labels { display: flex; justify-content: space-between; margin-top: 9px; color: #8ed7e1; font-size: 12px; font-weight: 700; letter-spacing: .09em; }
#steeringValue { color: white; font-size: 17px; }

.angles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.angles div { padding: 14px; text-align: center; border-radius: 14px; background: rgba(0, 20, 29, .42); }
.angles small { display: block; color: #8ed7e1; font-weight: 700; letter-spacing: .1em; }
.angles strong { display: block; margin-top: 3px; font-size: 25px; }

button { width: 100%; min-height: 58px; border: 0; border-radius: 14px; color: white; font-size: 17px; font-weight: 800; letter-spacing: .04em; }
button:disabled { opacity: .42; }
.primary { background: linear-gradient(135deg, #047ec0, #06a6b3); box-shadow: 0 10px 30px rgba(0, 147, 190, .25); }
.secondary { background: #086171; border: 1px solid #27abba; }
.hint { margin: -4px 8px 0; text-align: center; color: #9ccfd5; font-size: 13px; line-height: 1.45; }

@media (orientation: landscape) and (max-height: 540px) {
  body { place-items: start center; }
  .controller { grid-template-columns: 1fr 1fr; width: min(100%, 760px); gap: 12px 20px; }
  header, .status-panel { grid-column: span 2; }
  .meter { padding-top: 10px; }
  .hint { display: none; }
}
