@import url('/vendor/leaflet.css');
:root {
  --ink: #253c30;
  --green: #244e3d;
  --moss: #687e59;
  --paper: #f5f3ea;
  --cream: #e8e5d7;
  --muted: #6e796d;
  --line: #dcded0;
  --white: #fdfcf8;
  --gold: #b17742;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin: 0 0 1rem;
}
h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  line-height: 1.14;
  font-size: clamp(2.3rem, 4vw, 3.5rem);
  letter-spacing: -0.035em;
}
h1 em {
  color: var(--moss);
  font-weight: 400;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.08rem;
}
small {
  display: block;
  color: var(--muted);
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: white;
  padding: 0.8rem 1.2rem;
  min-height: 46px;
  font-weight: 600;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  gap: 0.5rem;
}
button:hover,
.button:hover {
  background: #173e2e;
  text-decoration: none;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.secondary {
  background: #e9eddf;
  color: var(--green);
}
.secondary:hover {
  background: #dce3d1;
}
.danger {
  background: none;
  color: #914f3f;
  font-size: 0.88rem;
  margin-top: 1rem;
}
.danger:hover {
  background: #f3e1d8;
}
.text-button {
  background: none;
  color: var(--muted);
  padding: 0.2rem 0.5rem;
  font-weight: 400;
}
.text-button:hover {
  background: var(--cream);
  color: var(--ink);
}
.full {
  width: 100%;
}
.topbar {
  height: 88px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  gap: 1rem;
}
.brand {
  font-family: Georgia, serif;
  font-size: 2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  line-height: 1;
}
.brand:hover {
  text-decoration: none;
}
.brand-icon {
  font-size: 2.7rem;
}
.brand-sub {
  font-family: system-ui, sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.19em;
  color: var(--muted);
  width: 95px;
  line-height: 1.6;
  margin-left: 1rem;
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}
nav {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  font-size: 0.85rem;
}
nav form {
  margin: 0;
}
.eyebrow {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  color: var(--moss);
  display: block;
  margin-bottom: 0.9rem;
}
.intro {
  color: var(--muted);
  max-width: 620px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1.3rem;
}
.content {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 2rem;
}
.small {
  max-width: 820px;
}
.narrow {
  max-width: 560px;
  margin: 3rem auto;
  padding: 2rem;
}
.back {
  display: block;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.quiet,
.hint {
  color: var(--muted);
  font-size: 0.85rem;
}
.fine {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1.8rem;
}
.row,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.section-heading {
  margin-bottom: 1.5rem;
}
.section-heading h2,
.section-heading h3 {
  margin: 0;
}
.section-heading > span {
  color: var(--muted);
  font-size: 0.8rem;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
input,
select {
  width: 100%;
  padding: 0.78rem 0.85rem;
  border: 1px solid #cfd5c6;
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  margin-top: 0.35rem;
  min-height: 46px;
}
input:focus,
select:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #b8c998;
  outline-offset: 2px;
}
/* Native date controls must be allowed to shrink inside mobile forms. */
input[type='date'],
input[type='datetime-local'] {
  display: block;
  box-sizing: border-box;
  /* WebKit's native date content must not determine the control's width. */
  width: 0;
  min-width: 100%;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
input::-webkit-date-and-time-value {
  display: block;
  min-width: 0;
  text-align: left;
}
input::-webkit-datetime-edit {
  min-width: 0;
  padding: 0;
}
input[type='file'] {
  font-size: 0.78rem;
  padding: 0.6rem;
}
summary {
  cursor: pointer;
  min-height: 44px;
  align-content: center;
  font-size: 0.88rem;
  color: var(--green);
}
details > form {
  margin: 1rem 0;
}
details {
  margin: 1rem 0;
}
details.card {
  margin-top: 0;
}
.map-layout {
  display: grid;
  grid-template-columns: 345px minmax(0, 1fr);
}
.map-sidebar {
  padding: 2.4rem 2rem;
  background: var(--paper);
  border-right: 1px solid var(--line);
}
.map-sidebar h1 {
  font-size: 2.6rem;
}
.map-sidebar .intro {
  font-size: 0.9rem;
}
.map-sidebar .primary {
  width: 100%;
  margin: 0.7rem 0 1.7rem;
}
.filters {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.filters h2 {
  font-size: 1rem;
}
.filters label {
  font-size: 0.76rem;
}
.filters .two {
  gap: 0.6rem;
}
.filters input {
  font-size: 0.74rem;
  padding: 0.6rem 0.4rem;
}
.legend {
  display: flex;
  gap: 1rem;
  font-size: 0.7rem;
  margin-top: 1.5rem;
  color: var(--muted);
}
.dot {
  display: inline-block;
  background: var(--green);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 0.3rem;
}
.dot.friend {
  background: var(--gold);
}
.map-area {
  position: relative;
  min-height: 680px;
  background: #e2e7d6;
}
#map {
  height: 100%;
  min-height: 520px;
  z-index: 1;
}
.map-note {
  position: absolute;
  top: 20px;
  left: 60px;
  z-index: 500;
  background: var(--white);
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 3px 12px #243d2210;
  font-size: 0.82rem;
}
.map-note span {
  color: var(--muted);
}
.locate {
  position: absolute;
  bottom: 40px;
  right: 20px;
  z-index: 500;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 3px 15px #0002;
}
.locate:hover {
  color: white;
}
.map-status:not(:empty) {
  position: absolute;
  left: 15px;
  bottom: 10px;
  max-width: 70%;
  z-index: 501;
  background: var(--white);
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
}
.places-section {
  grid-column: 1/-1;
  padding: 2rem 4%;
  border-top: 1px solid var(--line);
}
.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.3rem;
}
.place-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 1.3rem;
  color: var(--ink);
}
.place-card:hover {
  border-color: var(--moss);
  text-decoration: none;
}
.place-glyph {
  float: right;
  font-size: 2.4rem;
  color: #91a07b;
}
.place-card .eyebrow {
  margin-top: 0.5rem;
  font-size: 0.6rem;
}
.place-card h3 {
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
  margin: 0.4rem 0;
}
.place-card p {
  font-size: 0.76rem;
  color: var(--muted);
}
.empty {
  text-align: center;
  border: 1px dashed #c3cdb6;
  border-radius: 14px;
  padding: 2.5rem;
  color: var(--muted);
}
.empty h2 {
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.empty-icon {
  font-size: 2.5rem;
  color: var(--moss);
}
.empty p {
  margin: 0;
}
.auth-shell {
  max-width: 1050px;
  min-height: 72vh;
  margin: 3.5rem auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding: 0 2rem;
}
.auth-story h1 {
  font-size: 4rem;
}
.auth-story p {
  color: var(--muted);
}
.auth-form {
  padding: 2.3rem;
}
.auth-form h2 {
  font-family: Georgia, serif;
  font-size: 1.9rem;
  font-weight: 400;
}
.auth-form .full {
  margin: 0.6rem 0 1rem;
}
.forest-art {
  display: flex;
  align-items: end;
  height: 160px;
  gap: -1rem;
  color: #81936d;
  overflow: hidden;
  border-bottom: 1px solid #b8c6a8;
}
.forest-art span {
  font-size: 9rem;
  line-height: 1;
}
.forest-art span:nth-child(2) {
  font-size: 12rem;
  color: #395c43;
}
.forest-art span:nth-child(3) {
  font-size: 7rem;
  color: #a4b493;
}
.editor-grid,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 1fr);
  gap: 2rem;
  align-items: start;
}
.editor-grid #map {
  height: 530px;
  border-radius: 13px;
  border: 1px solid var(--line);
  min-height: 0;
}
.editor-grid #map-status {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.8rem 0;
}
.editor-grid form > h2 {
  border-top: 1px solid var(--line);
  padding-top: 1.3rem;
  margin-top: 1.5rem;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.photo-grid figure {
  margin: 0;
}
.photo-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.list-row.card {
  padding: 1.2rem;
}
.list-row strong {
  font-size: 1.2rem;
}
.visit h3 {
  font-size: 0.95rem;
}
.visit .section-heading {
  margin-bottom: 0.5rem;
}
.pill {
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  background: #e8eddd;
  font-size: 0.7rem;
  color: var(--green);
  white-space: nowrap;
}
.pill.muted {
  background: #eeece5;
  color: var(--muted);
}
.count {
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.5rem;
}
.weather,
.weather-note {
  background: #f0f2e8;
  border-radius: 8px;
  padding: 0.7rem;
  font-size: 0.8rem;
  margin-top: 1rem;
}
.weather-note {
  color: var(--muted);
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
th,
td {
  padding: 0.4rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.sticky {
  position: sticky;
  top: 20px;
}
footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  .topbar {
    height: auto;
    min-height: 80px;
    flex-wrap: wrap;
    padding: 1rem 5%;
    gap: 0.8rem;
  }
  .brand-sub {
    display: none;
  }
  nav {
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
  }
  nav .text-button {
    font-size: 0.78rem;
    min-height: 30px;
  }
  .map-layout {
    grid-template-columns: 270px minmax(0, 1fr);
  }
  .map-sidebar {
    padding: 1.5rem;
  }
  .map-sidebar h1 {
    font-size: 2.1rem;
  }
  .auth-shell {
    gap: 2rem;
  }
  .auth-story h1 {
    font-size: 3rem;
  }
  .editor-grid,
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail-grid aside {
    grid-row: 1;
  }
  .editor-grid #map {
    height: 350px;
  }
  .auth-form {
    padding: 1.5rem;
  }
  .sticky {
    position: static;
  }
}
@media (max-width: 600px) {
  .topbar {
    padding: 0.85rem 5%;
    gap: 0.6rem;
  }
  .brand {
    font-size: 1.7rem;
  }
  .brand-icon {
    font-size: 2rem;
  }
  nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.3rem;
  }
  nav form {
    display: flex;
  }
  nav a {
    padding: 0.3rem 0;
  }
  .map-layout {
    display: flex;
    flex-direction: column;
  }
  .map-sidebar {
    padding: 1.4rem 5%;
    border-right: 0;
  }
  .map-sidebar h1 {
    font-size: 2.2rem;
  }
  .map-sidebar h1 br {
    display: none;
  }
  .map-sidebar h1 em {
    margin-left: 0.2rem;
  }
  .map-sidebar .intro {
    font-size: 0.85rem;
    max-width: 330px;
  }
  .map-sidebar .primary {
    margin: 0.2rem 0 1rem;
  }
  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 0.8rem;
    padding-top: 1rem;
  }
  .filters h2 {
    grid-column: 1/-1;
    margin-bottom: 0.6rem;
  }
  .filters .two {
    grid-column: 1/-1;
  }
  .filters .row {
    grid-column: 1/-1;
    justify-content: flex-start;
  }
  .legend {
    margin-top: 1rem;
  }
  .map-area {
    min-height: 420px;
    height: 420px;
  }
  #map {
    height: 420px;
    min-height: 0;
  }
  .places-section {
    padding: 1.5rem 5%;
  }
  .section-heading {
    align-items: flex-start;
  }
  .section-heading > span {
    max-width: 130px;
    text-align: right;
  }
  .place-grid {
    grid-template-columns: 1fr;
  }
  .content {
    margin: 1.5rem auto;
    padding: 0 5%;
  }
  .narrow {
    margin: 1.5rem 5%;
    padding: 1.4rem;
  }
  .auth-shell {
    grid-template-columns: 1fr;
    margin: 2rem auto;
    gap: 1rem;
    padding: 0 5%;
  }
  .auth-story h1 {
    font-size: 2.7rem;
  }
  .auth-story h1 br {
    display: none;
  }
  .auth-story p,
  .forest-art {
    display: none;
  }
  .auth-form {
    padding: 1.6rem;
  }
  .card {
    padding: 1.2rem;
  }
  footer {
    font-size: 0.8rem;
  }
  .map-note {
    top: 12px;
    left: 55px;
  }
  .locate {
    bottom: 30px;
    right: 12px;
  }
  .editor-grid {
    gap: 1rem;
  }
  .editor-grid #map {
    height: 300px;
  }
  .photo-grid img {
    height: 140px;
  }
}

.filter-toggle {
  display: none;
}
@media (max-width: 600px) {
  .map-sidebar .eyebrow,
  .map-sidebar .intro,
  .map-sidebar .legend {
    display: none;
  }
  .map-sidebar h1 {
    font-size: 1.75rem;
    margin-bottom: 0.8rem;
  }
  .map-sidebar h1 em {
    margin-left: 0.3rem;
  }
  .map-sidebar .primary {
    margin: 0 0 0.65rem;
  }
  .js .filter-toggle {
    display: flex;
    width: 100%;
    min-height: 40px;
    padding: 0.45rem;
    font-size: 0.82rem;
  }
  .js .filters:not(.is-open) {
    display: none;
  }
  .map-area {
    height: 52vh;
    min-height: 380px;
  }
  .map-area #map {
    height: 100%;
  }
}

/* Native modal: image stays inside the viewport, without cropping. */
.photo-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border: 0;
  background: rgb(15 24 20 / 96%);
  color: white;
  box-sizing: border-box;
}
.photo-viewer[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.photo-viewer::backdrop {
  background: #0f1814;
}
.photo-viewer-close {
  flex: none;
  align-self: flex-end;
  background: #fff;
  color: #244e3d;
  min-height: 44px;
}
.photo-viewer > img {
  display: block;
  min-height: 0;
  max-width: 100%;
  max-height: calc(100% - 5rem);
  object-fit: contain;
  margin: auto;
}
.photo-viewer > img[hidden] {
  display: none;
}
[data-photo-preview] {
  cursor: zoom-in;
}
