:root {
  --ink: #1c1915;
  --paper: #f6f1e7;
  --card: #fffdf8;
  --line: #e2d8c8;
  --green: #0c6b3c;
  --green-bg: #e5f6ec;
  --amber: #8a4b08;
  --red: #8f1d1d;
  --red-bg: #fde8e4;
  --blue: #1d4e89;
  --muted: #6d645b;
  --shadow: 0 10px 30px rgba(40, 28, 12, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.wrap { max-width: 520px; margin: 0 auto; padding: 16px 16px 88px; }
h1, h2, p, a, button, label, small, strong, td, th {
  overflow-wrap: break-word;
}
h1 { font-size: 1.7rem; line-height: 1.15; margin: 0 0 6px; letter-spacing: -0.03em; }
.lede { color: var(--muted); margin: 0 0 18px; line-height: 1.45; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
label { display: block; font-weight: 700; margin: 12px 0 6px; }
input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 14px 12px;
  min-height: 48px;
}
textarea { min-height: 88px; }
.btn, a.btn, button.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 64px;
  margin-top: 12px;
  padding: 16px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow: visible;
  overflow-wrap: break-word;
}
.btn, .btn * { text-decoration: none; }
.btn-label {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1.3;
}
.btn.secondary {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn .ur { color: inherit; opacity: 0.86; }
.ur { display: block; font-weight: 650; font-size: 0.95rem; line-height: 1.35; }
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 8px 8px;
  border-radius: 14px;
  border: 2px solid var(--rail, var(--ink));
  background: #fff;
  color: var(--ink);
  text-align: center;
  white-space: normal;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--rail, var(--ink)) 75%, #000);
  transform: translateY(0);
}
.choice:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--rail, var(--ink));
}
.choice-copy { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.choice-en { font-weight: 800; font-size: 0.95rem; line-height: 1.15; }
.choice .ur { color: var(--muted); font-weight: 700; font-size: 0.8rem; line-height: 1.2; }
.choice.found { --rail: var(--green); }
.choice.none { --rail: #b86a12; }
.choice.blocked { --rail: var(--red); }
.choice.skipped { --rail: var(--blue); }
.choice.on {
  background: var(--rail);
  color: #fff;
  border-color: var(--rail);
  transform: translateY(4px);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.2);
}
.choice.on .ur { color: #fff; }
.photo-actions { display: grid; gap: 0; }
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.gps {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #efe7da;
  line-height: 1.4;
}
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pill {
  border-radius: 999px;
  padding: 4px 10px;
  background: #efe7da;
  font-size: 0.82rem;
  font-weight: 700;
}
.pill.A { background: #f6d98a; }
.pill.warn { background: var(--red-bg); color: var(--red); }
.warn-box {
  background: var(--red-bg);
  color: var(--red);
  border-radius: 14px;
  padding: 12px;
  font-weight: 700;
}
.progress {
  height: 10px;
  background: #efe7da;
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 14px;
}
.progress span { display: block; height: 100%; background: var(--green); }
.stop {
  margin-top: 16px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  overflow-wrap: break-word;
  line-height: 1.4;
}
.cluster-current,
.cluster-opt {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}
.cluster-current { border-color: var(--ink); }
.cluster-menu { max-height: 46vh; overflow: auto; padding-bottom: 4px; }
.cluster-opt.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.site {
  display: block;
  width: 100%;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-top: 8px;
  white-space: normal;
}
.site strong, .site small { display: block; line-height: 1.35; }
.site small { color: var(--muted); margin-top: 4px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 99px; margin-right: 6px; background: #c8bfb2; }
.dot.found { background: var(--green); }
.dot.none { background: #b86a12; }
.dot.blocked { background: var(--red); }
.dot.skipped { background: var(--blue); }
.map-frame {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #d9d3c7;
  height: 280px;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }
.camera {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: #111;
}
.camera video,
.camera img {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  max-height: calc(100dvh - 140px);
  object-fit: contain;
  background: #000;
}
.camera video { pointer-events: none; }
.review-note {
  margin: 0;
  padding: 8px 16px 0;
  color: #fff;
  text-align: center;
  line-height: 1.35;
}
.camera-bar {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #111;
}
.camera-bar .btn { margin-top: 0; }
.camera .error {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 16px;
  background: #3a1212;
  color: #fff;
  text-align: center;
}
.camera .error:empty { display: none; }
.gps.good { background: var(--green-bg); color: var(--green); }
.btn:disabled { opacity: 0.45; }
.shots { display: grid; gap: 10px; margin-top: 12px; }
.shots figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.shots img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: #111;
}
.shot-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
}
.shot-actions button {
  min-height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}
.shot-actions .remove { color: var(--red); border-color: var(--red); }
.bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #1c1915; color: white;
}
.bar span { min-width: 0; flex: 1; line-height: 1.3; }
.bar button {
  flex: 0 1 auto;
  max-width: 48%;
  background: transparent;
  color: white;
  border: 1px solid #c8bfb2;
  border-radius: 999px;
  padding: 10px 14px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  font-weight: 700;
}
.error { color: var(--red); font-weight: 700; }
.hidden { display: none; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top h1 { min-width: 0; }
.linkish {
  flex: 0 0 auto;
  background: none;
  border: 0;
  color: var(--blue);
  font-weight: 800;
  padding: 8px 0;
  white-space: normal;
}
