:root {
  --accent: #0f6fde;
  --accent-dark: #0b57ad;
  --accent-soft: #e7f0fd;
  --green: #1f9d55;
  --green-dark: #187f44;
  --orange: #e8891d;
  --red: #c62828;
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #d9dfe6;
  --text: #1b2430;
  --muted: #5d6b7a;
  --ink: #0f1a2a;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .18);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 "Inter", system-ui, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; line-height: 1.2; }
button:hover { background: #f1f5fa; border-color: #b8c4d0; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
button.primary:hover { background: var(--accent-dark); }
button.go { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }
button.go:hover { background: var(--green-dark); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover { background: #eef2f6; color: var(--text); }
button.danger:hover { background: #fdeaea; border-color: #d88; color: var(--red); }
button:disabled { opacity: .55; cursor: wait; }
.btn-lg { padding: 12px 22px; font-size: 16px; border-radius: 10px; }
code { background: #eef1f4; padding: 1px 6px; border-radius: 4px; font-size: 13px; }
pre { background: var(--ink); color: #e8eef4; padding: 14px 16px; border-radius: 10px; white-space: pre-wrap; font: 13px/1.55 ui-monospace, Consolas, "SF Mono", monospace; margin: 8px 0; }
.ok { color: var(--green-dark); }
.err { color: var(--red); }

/* ---------- landing ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 22px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -.2px; }
.brand .logo { width: 30px; height: 30px; }
.site-header nav { display: flex; gap: 20px; margin-left: 12px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { color: var(--text); }
.site-header .sp { flex: 1; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.08; margin: 0 0 18px; letter-spacing: -1px; color: var(--ink); }
.hero h1 span { color: var(--accent); }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 0 0 26px; max-width: 540px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .fine { font-size: 13px; color: var(--muted); margin-top: 12px; }
.hero-shot { position: relative; }
.hero-shot img { width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: #fff; display: block; }
.hero-shot .tag { position: absolute; right: -10px; top: -14px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; box-shadow: var(--shadow); }
.logos { text-align: center; color: var(--muted); font-size: 13px; padding: 8px 0 40px; }
.logos span { display: inline-block; margin: 4px 14px; font-weight: 600; opacity: .8; }

section.block { padding: 64px 0; }
section.block.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: 1.4px; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
section.block h2 { font-size: clamp(26px, 3vw, 36px); margin: 0 0 12px; letter-spacing: -.6px; color: var(--ink); }
section.block > .wrap > p.sub { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 0 36px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card .num { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; }
.card .ico { font-size: 26px; }
.usecases .card { padding: 18px; }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 10px 30px rgba(15,111,222,.18); }
.plan .badge { position: absolute; top: -12px; left: 22px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.plan h3 { font-size: 20px; margin: 4px 0 2px; }
.plan .price { font-size: 36px; font-weight: 800; letter-spacing: -1px; color: var(--ink); margin: 8px 0 2px; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .for { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 18px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; font-size: 14.5px; border-top: 1px solid #eef1f4; }
.plan li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 700; }
.plan li.no { color: var(--muted); } .plan li.no::before { content: "–"; color: #aab; }
.plan button { width: 100%; }
.waitlist { background: linear-gradient(135deg, #0f6fde, #0b3f86); color: #fff; border-radius: 18px; padding: 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; }
.waitlist h2 { color: #fff; margin: 0 0 8px; }
.waitlist p { margin: 0; opacity: .9; }
.waitlist form { display: flex; gap: 8px; }
.waitlist input { flex: 1; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff; }
.waitlist input::placeholder { color: rgba(255,255,255,.7); }
.waitlist button { background: #fff; color: var(--accent-dark); border-color: #fff; font-weight: 700; padding: 12px 18px; }
.waitlist .msg { margin-top: 10px; font-size: 14px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
footer.site-footer { padding: 36px 0; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; }
footer a { color: var(--muted); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .grid3, .grid4, .pricing { grid-template-columns: 1fr; }
  .waitlist { grid-template-columns: 1fr; padding: 26px; }
  .site-header nav { display: none; }
}

/* ---------- app ---------- */
body.app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.topbar { background: var(--ink); color: #fff; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.topbar .brand { color: #fff; font-size: 16px; }
.topbar .group { display: flex; align-items: center; gap: 6px; padding-left: 12px; border-left: 1px solid #334456; }
.topbar .label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #9fb0c1; margin-right: 2px; }
.topbar select, .topbar input[type=text] { padding: 6px 8px; border-radius: 8px; border: 1px solid #334456; background: #223042; color: #fff; }
.topbar button { background: #223042; color: #fff; border-color: #334456; }
.topbar button:hover { background: #2f4257; }
.topbar button.go { background: var(--green); border-color: var(--green); }
.topbar button.go:hover { background: var(--green-dark); }
.topbar .sp { flex: 1; }
#status { background: #fff; border-bottom: 1px solid var(--line); padding: 4px 12px; font-size: 12px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
#status b { color: var(--text); }
#status .unsaved { color: #b25e00; font-weight: 600; }
#main { flex: 1; display: flex; min-height: 0; }
#side { width: 430px; max-width: 48vw; overflow-y: auto; padding: 10px; border-right: 1px solid var(--line); background: var(--bg); }
#map { flex: 1; }
body.placing #map { cursor: crosshair; }
.side-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 8px; gap: 8px; }
.side-head h2 { font-size: 15px; margin: 0; }
.empty { text-align: center; background: #fff; border: 2px dashed var(--line); border-radius: 12px; padding: 24px 16px; color: var(--muted); }
.empty h3 { margin: 0 0 6px; color: var(--text); font-size: 16px; }
.empty .btns { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }

.pt { background: #fff; border: 2px solid transparent; border-radius: 12px; padding: 10px; margin-bottom: 10px; box-shadow: var(--shadow); }
.pt.active { border-color: var(--accent); }
.pt .row { display: flex; gap: 6px; margin-bottom: 7px; align-items: center; }
.pt input[type=text], .pt select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; background: #fff; }
.pt input:focus, .pt select:focus { outline: 2px solid #9cc4f2; border-color: var(--accent); }
.pt .name { flex: 1; font-weight: 600; font-size: 15px; }
.pt .loc { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.pt .note { flex: 1; font-size: 13px; }
.pt label { font-size: 13px; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.swatch { width: 16px; height: 16px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #c5ccd3; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; font-weight: 600; }
.badge.ok { background: #dff3e4; color: #1b6f30; }
.badge.todo { background: #fdebd0; color: #8a5200; }
.badge.none { background: #f6dede; color: #9a1c1c; }
.msg { font-size: 12.5px; margin: 0 0 7px; padding: 5px 8px; border-radius: 6px; }
.msg.notice { margin-bottom: 10px; padding: 8px 10px; font-size: 13px; }
.msg.notice ul { margin: 4px 0 0 18px; padding: 0; }
.msg.ok { background: #e7f6ea; color: #1b6f30; } .msg.err { background: #fbe6e6; color: #9a1c1c; } .msg.warn { background: #fff4de; color: #7a5000; }
.choices { margin: 0 0 7px; padding: 0; list-style: none; }
.choices li { font-size: 13px; padding: 5px 8px; border: 1px solid #e3d39a; margin-bottom: 3px; cursor: pointer; background: #fffbe8; border-radius: 6px; }
.choices li:hover { background: #ffefb0; }
details.more { margin: 2px 0 6px; border-top: 1px solid #edf0f3; padding-top: 6px; }
details.more summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.links a { font-size: 12.5px; text-decoration: none; color: var(--accent); border: 1px solid #c8daf1; border-radius: 6px; padding: 3px 8px; background: #f5f9fe; }
.links a:hover { background: #e4eefb; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.formats { font-size: 12px; color: #44505c; background: #f3f5f7; padding: 6px 8px; border-radius: 6px; margin: 6px 0; line-height: 1.6; font-family: ui-monospace, Consolas, monospace; }

.cats { background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 12px; box-shadow: var(--shadow); }
.cats h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.cat { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.cat input[type=text] { flex: 1; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.cat input[type=color] { width: 30px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.cat .n { font-size: 11px; color: var(--muted); width: 22px; text-align: right; }

.pin { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); position: relative; }
.pin::after { content: ""; position: absolute; width: 8px; height: 8px; background: #fff; border-radius: 50%; top: 7px; left: 7px; }
.pin.todo { border: 3px dashed #c00; }
.lbl { white-space: nowrap; font: bold 13px system-ui; color: #222; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; margin: -26px 0 0 18px; }
.leaflet-control-attribution { font-size: 10px; }

dialog { border: 0; border-radius: 14px; padding: 0; max-width: 95vw; box-shadow: var(--shadow-lg); color: var(--text); }
dialog::backdrop { background: rgba(10,20,30,.55); }
dialog .inner { padding: 18px 22px; }
dialog h2 { margin: 0 0 8px; font-size: 20px; }
dialog textarea { width: min(720px, 84vw); height: 230px; font: 12.5px ui-monospace, Consolas, monospace; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
dialog .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
dialog .tabs { display: flex; gap: 4px; margin-bottom: 10px; }
dialog .tabs button { border-radius: 999px; font-size: 13px; }
dialog .tabs button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); font-weight: 600; }
.prompt-box { position: relative; }
.prompt-box button.copy { position: absolute; right: 8px; top: 8px; font-size: 12px; padding: 4px 9px; }
#dExport .inner { width: min(1100px, 95vw); max-height: 92vh; overflow: auto; }
#dExport .opts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 10px; font-size: 13.5px; }
#dExport .opts label { display: flex; align-items: center; gap: 5px; }
#dExport .opts input[type=text] { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; }
#dExport img { max-width: 100%; max-height: 62vh; border: 1px solid #999; display: block; background: #eee; }
#dHelp .inner { width: min(860px, 94vw); max-height: 88vh; overflow-y: auto; }
#dHelp h3 { margin: 18px 0 6px; font-size: 16px; border-bottom: 2px solid var(--accent); padding-bottom: 3px; }
#dHelp .tip { background: #eaf3fd; border-left: 4px solid var(--accent); padding: 8px 12px; border-radius: 0 6px 6px 0; margin: 8px 0; }
#dHelp .warn { background: #fff4de; border-left: 4px solid #e0a020; padding: 8px 12px; border-radius: 0 6px 6px 0; margin: 8px 0; }
#dHelp table { border-collapse: collapse; width: 100%; font-size: 13px; }
#dHelp td, #dHelp th { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
#dHelp th { background: #eef1f4; }
.close-x { float: right; }

#mobile-toggle { display: none; }
@media (max-width: 760px) {
  #main { flex-direction: column; }
  #side { width: 100%; max-width: none; max-height: 50%; border-right: 0; border-bottom: 1px solid var(--line); }
  #side.hidden { display: none; }
  #map { min-height: 45vh; }
  #mobile-toggle { display: inline-block; }
  .topbar .group { border-left: 0; padding-left: 0; flex-wrap: wrap; }
  .topbar { gap: 6px 10px; }
  #status span:last-child { display: none; }
}

/* free-first landing */
.free-band { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px 32px; box-shadow: var(--shadow); }
.free-band h2 { margin: 0 0 8px; }
.free-band p { margin: 0; color: var(--muted); max-width: 640px; }
.more-soon { text-align: center; color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.soon-form { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.soon-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; min-width: 240px; }

/* map style thumbnails */
.thumbs { display: flex; gap: 6px; }
.topbar button.thumb { position: relative; width: 62px; height: 44px; padding: 0; overflow: hidden; border: 2px solid #334456; border-radius: 8px; background: #223042; }
.topbar button.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topbar button.thumb span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; line-height: 1.5; padding: 0 2px; background: rgba(15,26,42,.78); color: #fff; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar button.thumb:hover { border-color: #8fb4e8; background: #223042; }
.topbar button.thumb.on { border-color: #4da3ff; box-shadow: 0 0 0 2px rgba(77,163,255,.45); }
