:root {
  --ink: #182329;
  --muted: #647076;
  --paper: #f4f1ea;
  --accent: #bd4536;
  --line: #d7d5cf;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
}
button,
input,
textarea {
  font: inherit;
}
button {
  touch-action: manipulation;
}
header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px clamp(20px, 5vw, 64px);
  background: var(--ink);
  color: #fff;
}
header b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #ffffff66;
  border-radius: 50%;
  font:
    22px Georgia,
    serif;
}
header small,
.step {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
header h1 {
  margin: 2px 0 0;
  font:
    500 24px Georgia,
    serif;
}
main {
  width: min(1100px, calc(100% - 32px));
  margin: 44px auto;
}
.hero {
  padding: 18px 4px 34px;
}
.hero h2 {
  max-width: 850px;
  margin: 4px 0 16px;
  font:
    500 clamp(40px, 6vw, 70px) / 0.98 Georgia,
    serif;
}
.hero > p:last-child {
  max-width: 630px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}
.step {
  margin: 0;
  color: var(--accent);
}
.card {
  margin-bottom: 24px;
  padding: clamp(22px, 4vw, 44px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 18px 50px #1823290d;
}
.section-title {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
}
.section-title > span {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}
.section-title h3 {
  margin: 0 0 6px;
  font:
    500 clamp(25px, 3vw, 36px) / 1.1 Georgia,
    serif;
}
.section-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.media-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
}
.photo-picker {
  min-height: 245px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.photo-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border: 2px dashed #adb4b3;
  border-radius: 18px;
  background: #f8f8f5;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}
.photo-choice:hover {
  border-color: var(--accent);
  background: #fbf5f2;
}
.photo-choice i {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font: 26px/1 sans-serif;
}
.photo-choice span,
.hint {
  color: var(--muted);
  font-size: 13px;
}
.hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.photo-wrap {
  position: relative;
  overflow: hidden;
  height: 245px;
  border-radius: 18px;
  background: #eee;
}
.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.floating {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: #fffffff0;
  color: var(--ink);
  font-weight: 700;
}
.location-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.action {
  flex: 1;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8f8f5;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}
.action:hover {
  border-color: var(--accent);
}
.action small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 400;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.coords {
  grid-template-columns: repeat(2, 1fr);
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
}
.wide {
  grid-column: 1/-1;
}
.block {
  margin-top: 20px;
}
input,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #bfc5c3;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
  outline: none;
}
input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #bd45361a;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
.map-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.map-options > span {
  font-size: 13px;
  font-weight: 800;
}
.map-style-switch {
  display: flex;
  gap: 6px;
}
.map-style-switch button {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.map-style-switch button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 12px;
}
.map-toolbar button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}
.map-toolbar button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.map-toolbar .secondary {
  color: var(--muted);
}
.map-toolbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#map {
  height: 480px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #e8e5de;
}
.maplibregl-canvas.drawing {
  cursor: crosshair;
}
fieldset {
  display: flex;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}
legend {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
}
.choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
}
.choice input {
  width: auto;
}
.choice:has(input:checked).negative {
  border-color: var(--ink);
  background: #edf0ef;
}
.choice:has(input:checked).positive {
  border-color: var(--accent);
  background: #fff1ed;
}
.export-card {
  background: #fffaf7;
}
.export-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.download {
  padding: 17px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.download.dark {
  background: var(--ink);
}
.download:disabled {
  opacity: 0.55;
}
.error {
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  background: #fff1ed;
  color: #792e25;
}
.status {
  text-align: center;
  color: var(--muted);
}
.privacy {
  max-width: 760px;
  margin: 16px auto 34px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  main {
    width: calc(100% - 20px);
    margin: 22px auto;
  }
  .hero {
    padding: 8px 8px 24px;
  }
  .card {
    padding: 20px;
    border-radius: 18px;
  }
  .media-grid,
  .form-grid,
  .coords,
  .export-actions {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  #map {
    height: 390px;
  }
  .map-toolbar button {
    flex: 1;
  }
  .section-title {
    gap: 12px;
  }
  .section-title > span {
    flex-basis: 34px;
    height: 34px;
  }
  .photo-wrap {
    min-height: 215px;
    height: 215px;
  }
  .photo-picker {
    min-height: 215px;
    grid-template-columns: 1fr;
  }
  .photo-choice {
    min-height: 102px;
  }
  .map-options {
    align-items: flex-start;
    flex-direction: column;
  }
  fieldset {
    flex-wrap: wrap;
  }
  .choice {
    flex: 1;
  }
}
