:root { --ink:#1d2224; --mute:#68727a; --line:#d9dde0; --bg:#fff; --soft:#f4f5f6; --accent:#c2410c; --accent-d:#9a3412; }
* { box-sizing: border-box; }
html, body { margin:0; height:100%; background:#fff; color:var(--ink); font:15px/1.4 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color-scheme: light; }
#app { display:flex; height:100%; }
#panel { width:380px; max-width:100%; flex:none; overflow-y:auto; padding:14px 16px 24px; border-right:1px solid var(--line); background:var(--bg); }
#map { flex:1; min-width:0; }
header { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
h1 { margin:0; font-size:21px; letter-spacing:-.01em; }
#who { margin-left:auto; color:var(--mute); font-size:13px; }
section { margin:14px 0; }
.label { font-weight:600; font-size:13px; margin-bottom:6px; }
.muted { color:var(--mute); font-weight:400; font-size:13px; }
button, .btn { font:inherit; padding:7px 13px; border:1px solid var(--accent); background:var(--accent); color:#fff; border-radius:6px; cursor:pointer; display:inline-block; }
button:hover, .btn:hover { background:var(--accent-d); }
button.ghost, .btn.ghost { background:#fff; color:var(--ink); border-color:var(--line); }
button.ghost:hover, .btn.ghost:hover { background:var(--soft); }
button:disabled { opacity:.45; cursor:default; }
.row { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.seg { display:inline-flex; border:1px solid var(--line); border-radius:6px; overflow:hidden; }
.seg button { border:0; border-radius:0; background:#fff; color:var(--ink); padding:8px 16px; border-right:1px solid var(--line); }
.seg button:last-child { border-right:0; }
.seg button[aria-checked="true"] { background:var(--ink); color:#fff; }
.stats { display:flex; gap:22px; }
.stats div { display:flex; flex-direction:column; }
.stats b { font-size:22px; font-variant-numeric:tabular-nums; }
.stats span { color:var(--mute); font-size:12px; }
#elev { height:110px; border:1px solid var(--line); border-radius:6px; background:var(--soft); position:relative; }
#elev svg { width:100%; height:100%; display:block; }
#elev-read { min-height:18px; margin-top:4px; }
ol#wps { list-style:none; margin:0; padding:0; }
#wps li { display:flex; align-items:center; gap:8px; padding:5px 0; border-bottom:1px solid var(--soft); }
#wps .dot { width:22px; height:22px; border-radius:50%; background:var(--ink); color:#fff; font-size:12px; display:flex; align-items:center; justify-content:center; flex:none; }
#wps li:first-child .dot { background:#15803d; }
#wps li:last-child:not(:first-child) .dot { background:var(--accent); }
#wps .t { flex:1; font-size:13px; font-variant-numeric:tabular-nums; }
#wps .x { padding:2px 8px; font-size:13px; }
#msg { min-height:18px; font-size:13px; color:var(--accent-d); margin:6px 0; }
input[type=text], input[type=email], input[type=password] { font:inherit; padding:7px 9px; border:1px solid var(--line); border-radius:6px; max-width:100%; }
ul#mine { list-style:none; padding:0; margin:0; }
#mine li { display:flex; gap:8px; align-items:baseline; padding:6px 0; border-bottom:1px solid var(--soft); }
#mine a { color:var(--ink); text-decoration:none; font-weight:600; cursor:pointer; }
#mine a:hover { text-decoration:underline; }
#mine .m { color:var(--mute); font-size:12px; margin-left:auto; white-space:nowrap; }
#mine .del { padding:1px 7px; font-size:12px; }
footer { margin-top:20px; font-size:12px; }
dialog { border:1px solid var(--line); border-radius:10px; padding:20px 22px; max-width:92vw; background:#fff; color:var(--ink); }
dialog::backdrop { background:rgba(0,0,0,.25); }
dialog h2 { margin:0 0 10px; font-size:18px; }
dialog label { display:block; margin:8px 0; font-size:13px; }
dialog label input { display:block; margin-top:3px; }
.err { color:#b91c1c; min-height:18px; font-size:13px; }
#btn-panel { display:none; position:absolute; top:10px; left:10px; z-index:5; padding:6px 11px; }
.wp { width:22px; height:22px; border-radius:50%; background:var(--ink); color:#fff; border:2px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.4); font-size:11px; display:flex; align-items:center; justify-content:center; cursor:grab; }
.wp.start { background:#15803d; } .wp.end { background:var(--accent); }
.hover-dot { width:12px; height:12px; border-radius:50%; background:#fff; border:3px solid var(--accent); }
@media (max-width: 700px) {
  #panel { position:absolute; z-index:4; top:0; bottom:0; left:0; width:340px; box-shadow:2px 0 12px rgba(0,0,0,.2); transform:translateX(-100%); transition:transform .2s; }
  #app.open #panel { transform:none; }
  #btn-panel { display:block; }
  header { padding-left:46px; }
}
