* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; color: #222; }
body { display: flex; flex-direction: column; height: 100vh; }

header {
  flex: 0 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px;
  background: #1a1a1a; color: #eee;
  border-bottom: 1px solid #000;
}
header h1 { font-size: 16px; margin: 0 0 0 12px; font-weight: 500; display: inline; }
.header-left { display: flex; align-items: center; }
.back-link { color: #aaa; text-decoration: none; font-size: 13px; }
.back-link:hover { color: #fff; }
.auth-status { color: #aaa; font-size: 12px; margin-right: 12px; }

main {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

#sidebar {
  flex: 0 0 320px;
  overflow-y: auto;
  background: #f6f6f6;
  border-right: 1px solid #ddd;
  padding: 12px 14px;
}

#map { flex: 1 1 auto; }

.step {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.step h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em;
  margin: 0 0 8px 0; color: #555;
}
.step .hint { color: #777; font-size: 12px; margin: 4px 0 8px; }

label { display: block; font-size: 12px; color: #444; margin: 8px 0 4px; }
label.checkbox { display: flex; align-items: center; gap: 6px; }
input[type="text"], textarea, select {
  width: 100%; padding: 6px 8px; font-size: 13px;
  border: 1px solid #ccc; border-radius: 3px;
  font-family: inherit;
}
textarea { resize: vertical; }
select { background: #fff; }

button {
  padding: 7px 12px; font-size: 13px;
  background: #eee; border: 1px solid #bbb; border-radius: 3px;
  cursor: pointer;
}
button:hover:not([disabled]) { background: #ddd; }
button[disabled] { opacity: 0.5; cursor: not-allowed; }
button.primary {
  background: #2d7; color: #fff; border-color: #1a5;
  font-weight: 600;
}
button.primary:hover:not([disabled]) { background: #1c6; }
button.primary[disabled] { background: #aaa; border-color: #888; }

.toggle-group { display: flex; gap: 12px; margin: 6px 0; }
.toggle-group label { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.pos { background: #2d7; }
.dot.neg { background: #d33; }

.counts { display: flex; gap: 16px; font-size: 12px; color: #444; margin: 6px 0; }
.row { display: flex; gap: 6px; margin-top: 6px; }
.row button { flex: 1; }

.status { font-size: 12px; color: #555; margin-top: 8px; min-height: 1.2em; }
.status.error { color: #c33; }

details { margin-top: 8px; }
details summary { cursor: pointer; font-size: 12px; color: #666; padding: 4px 0; }
details > * { margin-top: 6px; }

#snapshot-preview-wrap {
  background: #eee; border: 1px solid #ccc; border-radius: 3px;
  padding: 4px; margin: 4px 0;
  min-height: 60px;
  display: flex; align-items: center; justify-content: center;
}
#snapshot-preview { max-width: 100%; max-height: 180px; }

#setup-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  padding: 12px 16px; background: #fff3cd; border: 1px solid #ffc107;
  border-radius: 4px; font-size: 13px; z-index: 10000;
}
