/* LIVEOBD — Street-Racing-Thema (Neon-Nacht, frühe 2000er, PS1-HUD-Vibe) */
:root {
  --bg: #07040f;
  --panel: #120b26;
  --panel2: #1b1140;
  --line: #35206b;
  --text: #eef0ff;
  --dim: #9a8fc4;
  --accent: #00e5ff;   /* Elektro-Cyan */
  --neon: #ff2ec4;     /* Unterboden-Magenta */
  --lime: #aaff00;
  --warn: #ffb300;
  --bad: #ff2e4d;
  --good: #58ff9b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(120% 90% at 50% -20%, #1c0f3e 0%, var(--bg) 55%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column;
  overscroll-behavior: none;
}
/* PS1-Scanlines, hauchdünn — Deko, keine Lesehürde */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 90;
  background: repeating-linear-gradient(0deg,
    rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 3px);
}
#topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  padding-top: calc(8px + env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(27, 17, 64, 0.96), rgba(18, 11, 38, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 0 18px rgba(255, 46, 196, 0.15);
}
/* Menü bleibt im Vollbild bedienbar: schwebt halbtransparent über der Anzeige.
   Wichtig: main bekommt dann oben Platz, sonst verschwinden Inhalte darunter. */
:fullscreen #topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(18, 11, 38, 0.82), rgba(18, 11, 38, 0.55));
  backdrop-filter: blur(4px);
}
:fullscreen main { padding-top: calc(46px + env(safe-area-inset-top)); }
:fullscreen #view-tacho { padding-top: 0; } /* Canvas darf unter die Glasleiste */
#btn-fullscreen {
  background: var(--panel2); color: var(--dim); border: 1px solid var(--line);
  border-radius: 4px; padding: 5px 11px; font-size: 16px; cursor: pointer;
}
#btn-fullscreen:hover { color: var(--accent); border-color: var(--accent); }
#brand {
  font-weight: 900; font-style: italic; letter-spacing: 1px; font-size: 19px;
  background: linear-gradient(180deg, #ffffff 20%, #8ea0c0 50%, #e8ecf4 55%, #5c6f92 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.45));
}
#brand span {
  background: linear-gradient(180deg, #7df3ff, var(--accent) 60%, #0a8ea6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
#tabs::-webkit-scrollbar { display: none; }
#tabs button {
  background: none; border: 1px solid transparent; color: var(--dim);
  padding: 6px 13px; font-size: 14px; cursor: pointer;
  font-style: italic; font-weight: 700; letter-spacing: 0.4px;
  transform: skewX(-8deg); border-radius: 4px;
  white-space: nowrap;
}
#tabs button > * { transform: skewX(8deg); }
#tabs button.active {
  color: #fff; background: var(--panel2); border-color: var(--line);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.35), inset 0 -2px 0 var(--accent);
}
#connbadge {
  font-size: 12px; padding: 4px 10px; border-radius: 3px; white-space: nowrap;
  font-style: italic; transform: skewX(-8deg);
}
#connbadge.off { background: #3d0f1d; color: #ff8aa0; box-shadow: 0 0 8px rgba(255, 46, 77, 0.35); }
#connbadge.on  { background: #0e3524; color: var(--good); box-shadow: 0 0 8px rgba(88, 255, 155, 0.35); }
main { flex: 1; overflow: hidden; position: relative; }
.view { display: none; height: 100%; overflow-y: auto; padding: 14px; }
.view.active { display: block; }
#view-tacho { padding: 0; overflow: hidden; }

/* Querformat erzwingen (Handys/Tablets): Hochkant → Dreh-Hinweis */
#rotate-hint {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; padding: 30px;
}
#rotate-hint .phone {
  font-size: 64px; display: inline-block;
  animation: rotehint 1.6s ease-in-out infinite;
}
@keyframes rotehint { 0%, 25% { transform: rotate(0deg); } 60%, 100% { transform: rotate(90deg); } }
#rotate-hint h2 { font-style: italic; letter-spacing: 1px; color: var(--accent); }
#rotate-hint #rotate-back { margin-top: 18px; }
/* Dreh-Hinweis nur, wenn der Tacho offen ist (body.tacho-active setzt app.js) */
@media (orientation: portrait) and (pointer: coarse) {
  body.tacho-active #rotate-hint { display: flex; }
}

/* Startseite */
.hero {
  text-align: center; padding: 26px 14px 10px;
}
.hero h1 {
  font-style: italic; font-weight: 900; font-size: 30px; letter-spacing: 1px;
  background: linear-gradient(180deg, #fff 20%, #8ea0c0 50%, #e8ecf4 55%, #5c6f92 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.4));
}
.hero p { color: var(--dim); margin-top: 6px; font-size: 14px; }
.searchgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px; margin-top: 8px;
}
.searchgrid label { font-size: 11px; color: var(--dim); display: block; margin-bottom: 3px; font-style: italic; text-transform: uppercase; letter-spacing: 0.8px; }
.searchgrid input, .searchgrid select { width: 100%; }
.result-car {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 6px; background: var(--panel2);
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
}
.result-car:hover { border-color: var(--accent); }
.result-car .rc-name { font-weight: 800; font-style: italic; font-size: 16px; }
.result-car .rc-meta { color: var(--dim); font-size: 12px; margin-top: 2px; }
.result-car .rc-details { display: none; margin-top: 10px; }
.result-car.open .rc-details { display: block; }
.sigchip {
  display: inline-block; margin: 2px 4px 2px 0; padding: 3px 9px;
  background: rgba(0, 229, 255, 0.08); border: 1px solid var(--line);
  border-radius: 999px; font-size: 12px; color: var(--text);
}

/* Allgemeine Bausteine */
.card {
  background: linear-gradient(160deg, var(--panel), rgba(18, 11, 38, 0.75));
  border: 1px solid var(--line);
  border-left: 3px solid var(--neon);
  border-radius: 8px; padding: 14px; margin-bottom: 12px;
}
.card h2 {
  font-size: 14px; margin-bottom: 10px; color: var(--dim);
  font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 1.2px;
}
button.primary, button.ghost, button.danger {
  border-radius: 4px; padding: 10px 18px; font-size: 15px; cursor: pointer;
  border: 1px solid var(--line);
  font-style: italic; font-weight: 700; letter-spacing: 0.4px;
  transform: skewX(-8deg);
}
button.primary {
  background: linear-gradient(180deg, #33f0ff, #00b8d4); color: #041a20; border: none;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.45);
}
button.ghost { background: var(--panel2); color: var(--text); }
button.danger {
  background: #47101f; color: #ff9db0; border-color: #7a1f34;
  box-shadow: 0 0 10px rgba(255, 46, 77, 0.25);
}
button:disabled { opacity: .45; cursor: default; box-shadow: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
select, input[type=text] {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 4px; padding: 9px 10px; font-size: 15px;
}
select:focus, input[type=text]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.35);
}
.muted { color: var(--dim); font-size: 13px; }
a { color: var(--accent); }

/* Community-Formulare (Login/Registrierung/Reset) */
.fld {
  width: 100%; box-sizing: border-box; margin-bottom: 10px;
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 4px; padding: 11px 12px; font-size: 15px;
}
.fld:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 8px rgba(0, 229, 255, 0.35); }
.fld::placeholder { color: var(--dim); }
.pw-wrap { position: relative; margin-bottom: 10px; }
.pw-wrap .fld { margin-bottom: 0; padding-right: 44px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 18px;
  padding: 4px 6px; line-height: 1; opacity: .75;
}
.pw-eye:hover { opacity: 1; }
.linkbtn {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font-size: 13px; padding: 2px 0; text-decoration: underline;
}
.agree {
  display: flex; gap: 9px; align-items: flex-start; margin: 4px 0 12px;
  font-size: 13px; color: var(--dim); line-height: 1.4;
}
.agree input { margin-top: 2px; flex: 0 0 auto; }
.agree a { text-decoration: underline; }
textarea.fld { resize: vertical; min-height: 44px; font-family: inherit; line-height: 1.4; }

/* Diskussion / Item-Detail */
.feed-item[data-open="1"]:hover { border-left-width: 6px; background: rgba(0, 229, 255, 0.06); }
.cmt { padding: 8px 0; border-top: 1px solid var(--line); }
.cmt:first-child { border-top: none; }
.cmt .linkbtn { font-size: 12px; margin-left: 6px; }
.fz { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.fz td { padding: 4px 8px; border-bottom: 1px solid var(--line); }
.fz td:first-child { color: var(--dim); }
.fz td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.sumkv { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; margin: 8px 0; }
.sumkv span { color: var(--dim); }
.sumkv b { color: var(--text); font-style: normal; }

/* Community-Anwerbung (Startseite + Diagnose) */
.cta-banner { border: 1px solid var(--neon); border-radius: 12px; padding: 18px 18px 20px;
  margin-bottom: 16px; background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 46, 196, .22), transparent 60%),
    radial-gradient(120% 120% at 0% 100%, rgba(0, 229, 255, .18), transparent 55%), var(--panel); }
.cta-banner h2 { font-style: italic; margin-bottom: 6px; }
.cta-banner p { color: var(--text); font-size: 14px; line-height: 1.5; margin-bottom: 10px; }
.cta-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px;
  font-size: 13px; color: var(--dim); margin: 0 0 14px; }
@media (max-width: 560px) { .cta-list { grid-template-columns: 1fr; } }
.cta-banner .primary { font-size: 16px; }
.ask-community { background: none; border: 1px solid var(--neon); color: var(--neon);
  border-radius: 4px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; font-style: italic; }
.ask-community:hover { background: rgba(255, 46, 196, .15); }
.cta-list-wrap { display: grid; grid-template-columns: 1fr 440px; gap: 18px; align-items: start; }
@media (max-width: 820px) { .cta-list-wrap { grid-template-columns: 1fr; } }
.cta-pitch { display: flex; flex-direction: column; gap: 14px; }
.cta-feat { display: flex; gap: 12px; align-items: flex-start; }
.cta-feat > span { font-size: 24px; line-height: 1; }
.cta-feat b { font-style: italic; }
.cta-feat p { font-size: 13px; margin-top: 2px; line-height: 1.45; }
.cta-form { margin: 0; }

/* Community-Struktur (Facebook-artig): Kopfleiste + Unter-Navigation */
.cbar { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.cme { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cavatar { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-style: italic; color: #041a20; background: linear-gradient(180deg, #33f0ff, #00b8d4); }
.cname { font-style: italic; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
.cnav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px;
  position: sticky; top: 0; z-index: 5; scrollbar-width: none; }
.cnav::-webkit-scrollbar { display: none; }
.cnav-b { flex: 0 0 auto; position: relative; background: var(--panel2); color: var(--dim); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
.cnav-b.active { color: #041a20; background: linear-gradient(180deg, #33f0ff, #00b8d4); border-color: transparent; }
.cbadge { display: none; }
.cbadge.on { display: inline-block; min-width: 8px; height: 8px; margin-left: 6px; border-radius: 999px;
  background: var(--neon); box-shadow: 0 0 6px var(--neon); vertical-align: middle; }
#nav-online.on { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; margin-left: 6px;
  border-radius: 999px; background: var(--good); color: #062; font-size: 11px; font-weight: 800; text-align: center; box-shadow: none; }
.composer { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.composer .cavatar { width: 32px; height: 32px; font-size: 13px; }
.composer .muted { font-size: 13px; }
.feed-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { background: var(--panel2); color: var(--dim); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.chip.active { color: #041a20; background: linear-gradient(180deg, #33f0ff, #00b8d4); border-color: transparent; }
.csec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 17px; }
.csec-head b { font-style: italic; }
.cnote { background: rgba(255, 179, 0, .12); border: 1px solid var(--warn); color: var(--warn);
  border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
.cfold { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.cfold > summary { cursor: pointer; font-weight: 700; font-style: italic; color: var(--dim); padding: 4px 0; }
.cfold[open] > summary { color: var(--text); }

/* Chat-Channels */
.ch-list { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 4px; scrollbar-width: none; }
.ch-list::-webkit-scrollbar { display: none; }
.ch-chip { position: relative; flex: 0 0 auto; }
.ch-dot { position: absolute; top: 2px; right: 4px; width: 8px; height: 8px; border-radius: 999px;
  background: var(--neon); box-shadow: 0 0 6px var(--neon); }
.ch-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px;
  border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.ch-head b { font-style: italic; color: var(--accent); }

/* Live & Chat */
.chat-log { max-height: 260px; overflow-y: auto; margin-top: 8px; padding: 6px 0;
  border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.chat-line { font-size: 14px; line-height: 1.4; }
.chat-line b { color: var(--accent); font-style: normal; margin-right: 4px; }
.chat-line.pm-mine { text-align: right; }
.chat-line.pm-mine span { background: rgba(0, 229, 255, 0.16); border-radius: 10px; padding: 3px 10px; display: inline-block; }
.chat-line:not(.pm-mine) span { display: inline-block; }
#pm-log .chat-line:not(.pm-mine) span { background: var(--panel2); border-radius: 10px; padding: 3px 10px; }
.live-post { animation: livepulse 2s ease-in-out infinite; }
@keyframes livepulse { 0%, 100% { box-shadow: none; } 50% { box-shadow: -3px 0 12px rgba(255, 46, 196, 0.4); } }
.live-vals { display: flex; gap: 16px; flex-basis: 100%; margin-top: 6px; }
.live-vals span { text-align: center; font-variant-numeric: tabular-nums; }
.live-vals b { font-size: 20px; color: var(--neon); font-style: normal; }
.live-vals small { color: var(--dim); font-size: 11px; }
.tune-row { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 14px; border-top: 1px solid var(--line); cursor: pointer; }
.tune-row:first-child { border-top: none; }
.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gallery img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.img-pending { font-size: 12px; color: var(--dim); border: 1px dashed var(--line); border-radius: 6px; padding: 8px 10px; }

/* Verbindung / Log */
#log {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12px; background: #05020c; border: 1px solid var(--line);
  border-radius: 4px; padding: 8px; height: 220px; overflow-y: auto; white-space: pre-wrap;
}
#log .tx { color: var(--accent); }
#log .rx { color: var(--dim); }
#log .err { color: var(--bad); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.kv dt { color: var(--dim); }

/* Dashboard-Kacheln */
#tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile {
  background: linear-gradient(160deg, var(--panel), rgba(18, 11, 38, 0.7));
  border: 1px solid var(--line); border-bottom: 2px solid var(--accent);
  border-radius: 8px; padding: 12px; position: relative;
}
.tile .val {
  font-size: 30px; font-weight: 900; font-style: italic;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.55);
}
.tile .unit { font-size: 13px; color: var(--dim); margin-left: 4px; }
.tile .name { font-size: 12px; color: var(--dim); margin-top: 2px; }
.tile .mm { font-size: 11px; color: var(--dim); margin-top: 6px; }
.tile .rm {
  position: absolute; top: 6px; right: 8px; background: none; border: none;
  color: var(--dim); font-size: 14px; cursor: pointer;
}

/* Fehlercodes */
.dtc {
  border: 1px solid var(--line); border-left: 3px solid var(--bad);
  border-radius: 6px; padding: 10px 12px;
  margin-bottom: 8px; background: var(--panel2);
  display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
}
.dtc code {
  font-size: 17px; font-weight: 900; font-style: italic;
  text-shadow: 0 0 10px rgba(255, 46, 77, 0.5);
}
.dtc .badge { font-size: 11px; padding: 2px 8px; border-radius: 3px; font-style: italic; }
.badge.stored  { background: #47101f; color: #ff9db0; }
.badge.pending { background: #4a3305; color: #ffd08a; }
.badge.perm    { background: #1c2a4d; color: #9dbcff; }
.dtc .txt { flex-basis: 100%; color: var(--dim); font-size: 13px; }

/* Modal */
#modal {
  position: fixed; inset: 0; background: rgba(4, 2, 10, 0.75);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
#modal.open { display: flex; }
#modal .box {
  background: var(--panel); border: 1px solid var(--neon); border-radius: 10px;
  max-width: 460px; padding: 20px;
  box-shadow: 0 0 30px rgba(255, 46, 196, 0.35);
}
#modal h3 { margin-bottom: 10px; font-style: italic; }
#modal p { font-size: 14px; color: var(--dim); margin-bottom: 16px; line-height: 1.5; }
#modal p strong { color: var(--warn); }

/* DPF-Grafik */
.dpf-grid { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.dpf-ring { text-align: center; }
.dpf-ring-label { color: var(--dim); font-size: 13px; font-style: italic; margin-top: -6px; }
.dpf-side { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 12px; }
.dpf-ampel { display: flex; gap: 12px; align-items: center; }
.dpf-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.dpf-bar-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); }
.dpf-bar-head b { color: var(--text); font-style: italic; }
.dpf-bar-track { height: 14px; background: var(--panel2); border-radius: 7px; overflow: hidden; margin-top: 3px; }
.dpf-bar-fill { height: 100%; transition: width .4s; }

/* Experten: Switch, Routinen, Modal-Host */
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; font-style: italic; }
.switch input { width: 44px; height: 24px; appearance: none; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; position: relative; cursor: pointer; transition: background .2s; }
.switch input:checked { background: var(--good); }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked::after { transform: translateX(20px); }
.routine { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.routine:first-child { border-top: none; }
.modal-host .modal-bg {
  position: fixed; inset: 0; background: rgba(4, 2, 10, 0.75);
  display: none; align-items: center; justify-content: center; z-index: 55; padding: 20px;
}
.modal-host .modal-bg.open { display: flex; }
.modal-host .box {
  background: var(--panel); border: 1px solid var(--neon); border-radius: 10px;
  max-width: 480px; width: 100%; padding: 20px; box-shadow: 0 0 30px rgba(255, 46, 196, 0.35);
  max-height: 90vh; overflow-y: auto;
}
.modal-host .box h3 { font-style: italic; margin-bottom: 10px; }
.modal-host .box p { font-size: 14px; color: var(--dim); margin-bottom: 12px; line-height: 1.5; }
.modal-host .box p strong { color: var(--warn); }

/* Footer */
footer#appfoot {
  border-top: 1px solid var(--line); background: var(--panel);
  padding: 16px 14px calc(24px + env(safe-area-inset-bottom));
  font-size: 12px; color: var(--dim); text-align: center; line-height: 1.7;
}
footer#appfoot a { color: var(--accent); margin: 0 6px; white-space: nowrap; }
footer#appfoot .foot-legal { margin-top: 6px; }
/* Footerbug: die scrollenden Views brauchen unten Luft, damit nichts klebt */
.view { padding-bottom: 28px; }

/* Tacho-Vollbild */
#tachocanvas { display: block; width: 100%; height: 100%; touch-action: none; }
#tacho-ui {
  position: absolute; top: 10px; right: 10px; display: flex; gap: 8px; z-index: 5;
}
:fullscreen #tacho-ui { top: calc(10px + 44px); }
#tacho-ui button {
  background: rgba(18, 11, 38, 0.75); color: var(--dim); border: 1px solid var(--line);
  border-radius: 4px; padding: 8px 12px; font-size: 13px; cursor: pointer;
  font-style: italic; transform: skewX(-8deg);
}
#tacho-ui button.live-on {
  color: #fff; border-color: var(--neon); background: rgba(255, 46, 196, 0.35);
  animation: livepulse 1.4s ease-in-out infinite;
}
