* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  /* creamy light (default) — matches the mobile app */
  --bg:#f3efe6; --surface:#fbf8f1; --surface2:#ece6d9; --text:#2a2620; --muted:#7c7466; --faint:#a99f8d; --border:#e0d8c8;
  --accent:#5b6ef5; --mouse:#e0862c; --good:#2fae7a; --danger:#e5484d;
  --panel:var(--surface); --panel2:var(--surface2);
  font-family:'Hanken Grotesk',system-ui,sans-serif; background:var(--bg); color:var(--text);
  height:100%; overflow:hidden;
}
body[data-theme="dark"] {
  --bg:#0d0f14; --surface:#171a21; --surface2:#1f232c; --text:#f3f5f9; --muted:#9096a6; --faint:#5f6675; --border:#252a34;
  --accent:#7d8bff; --mouse:#f2a93b; --good:#3ecf97; --danger:#ff6b6f;
}
.hidden { display:none !important; }
.mono { font-family:'DM Mono',monospace; }

#app { display:flex; height:100vh; }

/* sidebar */
#sidebar { width:320px; flex:none; background:var(--panel); border-right:1px solid var(--border); display:flex; flex-direction:column; overflow-y:auto; }
.brand { display:flex; align-items:center; gap:11px; padding:18px 18px 14px; border-bottom:1px solid var(--border); }
.brand-mark { width:34px; height:34px; border-radius:9px; background:var(--accent); display:flex; align-items:center; justify-content:center; }
.brand-title { font-weight:800; font-size:16px; }
.brand-sub { font-size:11px; color:var(--faint); font-weight:700; letter-spacing:.5px; }

.panel { padding:14px 16px; border-bottom:1px solid var(--border); }
.panel-head { font-size:11px; font-weight:800; letter-spacing:.9px; color:var(--faint); text-transform:uppercase; margin-bottom:12px; display:flex; align-items:center; justify-content:space-between; }
.mini { background:var(--panel2); border:1px solid var(--border); color:var(--muted); border-radius:7px; width:24px; height:24px; cursor:pointer; font-size:13px; }
.mini:hover { color:var(--text); }

/* session list */
.sess { background:var(--panel2); border:1px solid var(--border); border-radius:11px; padding:11px 12px; margin-bottom:9px; cursor:pointer; transition:border-color .15s; }
.sess:hover { border-color:var(--faint); }
.sess.active { border-color:var(--accent); background:color-mix(in srgb, var(--accent) 12%, var(--panel2)); }
.sess-name { font-weight:700; font-size:14px; display:flex; align-items:center; gap:7px; }
.sess-name input { flex:1; background:transparent; border:none; color:var(--text); font:inherit; font-weight:700; padding:2px 0; outline:none; border-bottom:1px solid transparent; }
.sess-name input:focus { border-bottom-color:var(--accent); }
.sess-meta { font-size:11px; color:var(--muted); margin-top:5px; display:flex; gap:7px; flex-wrap:wrap; }
.tag-live { font-size:9px; font-weight:800; letter-spacing:.4px; padding:1px 5px; border-radius:4px; color:var(--mouse); background:color-mix(in srgb, var(--mouse) 18%, transparent); }
.empty-list { color:var(--faint); font-size:13px; padding:6px 2px; }

/* controls */
.playrow { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.ctrl { background:var(--panel2); border:1px solid var(--border); color:var(--text); border-radius:9px; width:38px; height:38px; cursor:pointer; font-size:15px; display:flex; align-items:center; justify-content:center; }
.ctrl:hover { border-color:var(--faint); }
.ctrl.play { background:var(--accent); border-color:var(--accent); color:#0d0f14; font-weight:700; }
select { background:var(--panel2); border:1px solid var(--border); color:var(--text); border-radius:9px; height:38px; padding:0 8px; font:inherit; font-size:13px; cursor:pointer; }
.clock { font-size:13px; color:var(--muted); margin-left:auto; }

.chk { display:flex; align-items:center; gap:9px; font-size:13px; padding:6px 0; cursor:pointer; color:var(--text); }
.chk input { width:16px; height:16px; accent-color:var(--accent); cursor:pointer; }
.slider-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; font-size:12px; color:var(--muted); }
.slider-row input { flex:1; accent-color:var(--mouse); max-width:130px; }

#player-toggles .ptog { display:flex; align-items:center; gap:9px; font-size:13px; padding:6px 0; cursor:pointer; }
.pdot { width:11px; height:11px; border-radius:50%; flex:none; }
.distance { font-size:12px; color:var(--muted); margin-top:8px; }

.export-row { display:flex; gap:7px; margin-top:10px; }
.mini2 { flex:1; background:var(--panel2); border:1px solid var(--border); color:var(--text); border-radius:8px; padding:8px 0; cursor:pointer; font:inherit; font-size:12px; font-weight:700; }
.mini2:hover { border-color:var(--accent); }
#mapstyle { width:100%; }

/* main */
#main { flex:1; position:relative; }
#map { position:absolute; inset:0; }
.empty { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; text-align:center; background:var(--bg); z-index:5; }
.empty-title { font-size:20px; font-weight:800; }
.empty-sub { font-size:14px; color:var(--muted); margin-top:6px; }

/* scrub bar */
#scrubwrap { position:absolute; left:0; right:0; bottom:0; z-index:10; background:linear-gradient(to top, color-mix(in srgb, var(--bg) 96%, transparent), color-mix(in srgb, var(--bg) 70%, transparent) 70%, transparent); padding:26px 24px 16px; }
#events { position:relative; height:0; }
.evmark { position:absolute; top:12px; width:2px; height:12px; border-radius:1px; transform:translateX(-1px); }
.evmark .evlabel { position:absolute; bottom:14px; left:50%; transform:translateX(-50%); font-size:9px; white-space:nowrap; color:var(--muted); background:var(--panel); padding:1px 5px; border-radius:4px; border:1px solid var(--border); opacity:0; transition:opacity .15s; pointer-events:none; }
.evmark:hover .evlabel { opacity:1; }
#scrub { width:100%; accent-color:var(--accent); height:6px; cursor:pointer; }
#scrub-labels { display:flex; justify-content:space-between; align-items:center; margin-top:6px; font-size:12px; color:var(--muted); font-family:'DM Mono',monospace; }
#scrub-title { color:var(--text); font-family:'Hanken Grotesk',sans-serif; font-weight:700; }

/* map markers */
.dot { border-radius:50%; border:3px solid #fff; box-shadow:0 3px 8px rgba(0,0,0,.5); }
.dot-label { font-family:'Hanken Grotesk',sans-serif; font-size:11px; font-weight:800; color:#fff; text-shadow:0 1px 4px rgba(0,0,0,.95); text-align:center; margin-top:3px; white-space:nowrap; }
.truemouse { width:14px; height:14px; border-radius:50%; background:var(--mouse); border:2px solid #fff; box-shadow:0 0 0 3px color-mix(in srgb, var(--mouse) 45%, transparent), 0 2px 6px rgba(0,0,0,.6); }
