:root {
  color-scheme: light;
  --bg-cream: #fcf5ef;
  --bg-canvas: #e6e0d6;
  --surface: #ffffff;
  --map-base: #e9e2d4;
  --ink: #080808;
  --ink-2: #6b6258;
  --ink-3: #9a8f82;
  --ink-4: #b6a692;
  --accent: #d95300;
  --accent-press: #b84500;
  --accent-tint: #fdf0e8;
  --green: #1b5e20;
  --blue: #2f5d8c;
  --red: #b42318;
  --line: #e3e0dd;
  --line-2: #ece4d9;
  --line-3: #eee7de;
  --r-pill: 15px;
  --control-height: 46px;
  --shadow-card: 0 14px 30px -18px rgba(120, 70, 20, 0.5);
  --shadow-float: 0 20px 50px -20px rgba(0, 0, 0, 0.45);
  --font-body: "Noto Sans JP", "Noto Sans KR", sans-serif;
  --font-display: "Mohave", sans-serif;
  --font-en: "Albert Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--ink);
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:active,
a:active {
  transform: translateY(1px);
}

a {
  color: var(--accent);
  text-decoration: none;
}

svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.hidden {
  display: none !important;
}

.site-shell {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg-cream);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 73px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-cream);
}

.brand {
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.9;
}

.brand span {
  color: var(--ink-4);
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.31em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-right: auto;
}

.nav button,
.nav a {
  position: relative;
  padding: 4px 0 5px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  white-space: nowrap;
}

.nav button.active,
.nav a:hover {
  color: var(--ink);
}

.nav button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 2px;
  background: var(--accent);
}

.top-actions,
.language-switch,
.traveler-chip {
  display: flex;
  align-items: center;
}

.top-actions {
  gap: 14px;
  flex: 0 0 auto;
}

.language-switch {
  overflow: hidden;
  border: 1px solid #d6cfc6;
  border-radius: var(--r-pill);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.language-switch button {
  min-width: 40px;
  min-height: 28px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink-2);
}

.language-switch button.active {
  background: var(--ink);
  color: #fff;
}

.traveler-chip {
  gap: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
}

.traveler-chip span {
  display: grid;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  place-items: center;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 40px;
  border-bottom: 1px solid var(--line-3);
  background: var(--surface);
  flex-wrap: wrap;
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(300px, 100%);
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg-cream);
  color: var(--ink-4);
}

.searchbox input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.filterbar select,
.near-button,
.results-panel select {
  height: var(--control-height);
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg-cream);
  color: var(--ink);
  outline: 0;
  font-size: 12px;
}

.filterbar select,
.results-panel select {
  padding: 0 34px 0 15px;
}

.near-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 18px;
  border-color: var(--accent);
  background: #fff;
  color: var(--accent);
  font-weight: 600;
}

.map-stage {
  position: relative;
  height: calc(100dvh - 156px);
  min-height: 560px;
  overflow: hidden;
  background: var(--map-base);
}

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--map-base);
}

.leaflet-container {
  background: var(--map-base);
  font-family: var(--font-body);
}

.leaflet-tile {
  filter: saturate(0.55) sepia(0.16) brightness(1.04);
}

.results-panel {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 22px;
  z-index: 430;
  display: flex;
  width: min(386px, calc(100vw - 44px));
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line-2);
  background: rgba(252, 245, 239, 0.96);
  box-shadow: var(--shadow-float);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#collapseResults {
  position: static;
  flex: 0 0 34px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 0;
  line-height: 1;
  box-shadow: var(--shadow-card);
  place-items: center;
}

#collapseResults::before {
  content: "‹";
  font-size: 26px;
  line-height: 1;
  transform: translateY(-1px);
}

.results-panel.collapsed {
  transform: translateX(calc(-100% - 28px));
  opacity: 0;
  pointer-events: none;
}

.open-results {
  position: absolute;
  top: 32px;
  left: 22px;
  z-index: 440;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.open-results.is-hidden {
  display: none;
}

.results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.results-head p,
.map-count {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
}

.results-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.results-head button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 26px;
}

.result-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.spot-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 15px 16px 16px 19px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--green);
  background: #fff;
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
}

.spot-card.paid {
  border-left-color: var(--accent);
}

.spot-card.carstay {
  border-left-color: var(--blue);
}

.spot-card.free-carstay {
  border-left-color: var(--blue);
}

.spot-card.active,
.spot-card:hover {
  border-color: #e2c3ac;
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.spot-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.42;
}

.spot-meta,
.spot-card p,
.selected-card p,
.detail-muted {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--green);
  color: #fff;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge.paid {
  background: var(--accent);
}

.badge.carstay {
  background: var(--blue);
}

.badge.free-carstay {
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.rating-price {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}

.rating-price strong,
.price {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}

.spot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

.spot-action-hint {
  color: var(--accent);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.favorite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 84px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink-3);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
}

.favorite span {
  font-size: 15px;
  line-height: 1;
}

.favorite.saved {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
}

.map-count {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 420;
  display: none;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.9);
}

.results-panel.collapsed ~ .map-count {
  display: block;
  left: 78px;
  max-width: calc(100% - 108px);
}

.selected-card {
  position: absolute;
  top: 22px;
  right: 32px;
  z-index: 430;
  width: min(312px, calc(100vw - 64px));
  padding: 20px 56px 20px 20px;
  border-top: 3px solid var(--accent);
  background: #fff;
  box-shadow: var(--shadow-float);
}

.selected-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--bg-cream);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  place-items: center;
}

.selected-close:hover {
  background: #fff;
}

.selected-card h2 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.4;
}

.selected-card .primary {
  width: 100%;
  margin-top: 16px;
}

.camp-pin {
  display: block;
  width: 30px;
  height: 30px;
  border: 5px solid var(--accent);
  border-radius: 50% 50% 50% 0;
  background: #fff;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.45);
  transform: rotate(-45deg);
}

.camp-pin.free,
.camp-pin.paid {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 0;
  background: center / contain no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 10px 9px rgba(0, 0, 0, 0.35));
  transform: none;
}

.camp-pin.free {
  background-image: url("./assets/free.png");
}

.camp-pin.paid {
  background-image: url("./assets/paid.png");
}

.camp-pin.carstay {
  border-color: var(--blue);
}

.camp-pin.free-carstay {
  border-color: var(--blue);
  background: #e9fbf3;
}

.camp-pin.selected {
  border-color: var(--ink);
}

.camp-pin.free.selected,
.camp-pin.paid.selected {
  filter: drop-shadow(0 10px 9px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 0 var(--ink));
  transform: scale(1.12);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-float);
}

.leaflet-popup-content {
  margin: 10px 14px;
  font-size: 12px;
}

.screen-detail,
.screen-community,
.screen-add {
  min-height: calc(100dvh - 73px);
  padding: 44px 40px 72px;
  background: var(--bg-cream);
}

.back-button {
  margin-bottom: 24px;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 28px;
}

.detail-main,
.detail-side,
.community-hero,
.feed,
.add-card {
  border: 1px solid var(--line-2);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.detail-main,
.detail-side {
  padding: 28px;
}

.detail-side > .favorite {
  width: 100%;
  margin-bottom: 18px;
}

.detail-main h1,
.community-hero h1,
.add-card h1 {
  margin: 12px 0 18px;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.32;
}

.facility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.facility {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--bg-cream);
}

.facility span {
  color: var(--ink-3);
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-section-grid {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.detail-section {
  padding: 16px;
  background: var(--bg-cream);
}

.detail-section h2 {
  margin: 0 0 10px;
  color: var(--ink-3);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-section li {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

.detail-section li::before {
  content: "•";
  margin-right: 8px;
  color: var(--accent);
}

.source-list,
.community-list {
  display: grid;
  gap: 10px;
}

.source-list {
  margin-top: 18px;
}

.source-list a,
.community-item {
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--bg-cream);
  color: var(--ink-2);
  font-size: 13px;
}

.spot-detail-page {
  background: var(--bg-cream);
}

.static-detail-shell {
  min-height: 100dvh;
}

.static-detail {
  padding: 42px 40px 76px;
}

.map-return-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-bottom: 22px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.map-return-button:hover {
  background: var(--accent-press);
  color: #fff;
}

.static-detail .detail-layout {
  max-width: 1180px;
  margin: 0 auto;
}

.static-detail-nav {
  margin-right: 0;
  margin-left: auto;
}

.static-detail-language {
  margin-left: 16px;
}

.detail-kicker {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ad-panel {
  display: grid;
  min-height: 220px;
  margin-top: 20px;
  border: 1px dashed var(--line);
  background: var(--bg-cream);
  color: var(--ink-4);
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.12em;
  place-items: center;
  text-transform: uppercase;
}

.primary,
.outline {
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.primary:hover {
  background: var(--accent-press);
}

.outline {
  background: transparent;
  color: var(--accent);
}

.community-hero,
.feed,
.add-card {
  max-width: 960px;
  margin: 0 auto 18px;
  padding: 34px;
}

.kicker {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.26em;
}

.community-hero p:not(.kicker) {
  max-width: 720px;
  color: var(--ink-2);
  line-height: 1.9;
}

.community-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.feed-head h2 {
  margin: 0;
}

.feed-head span {
  color: var(--ink-3);
  font-size: 12px;
}

.add-card {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

.add-card label {
  display: grid;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12px;
}

.add-card input,
.add-card select,
.add-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-cream);
  color: var(--ink);
  outline: 0;
}

.add-card input,
.add-card select {
  min-height: 42px;
  padding: 0 12px;
}

.add-card textarea {
  padding: 12px;
  resize: vertical;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.stepper span {
  padding: 8px;
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-family: var(--font-en);
  font-size: 11px;
  text-align: center;
}

.stepper .active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  padding: 20px;
  background: rgba(8, 8, 8, 0.46);
  place-items: center;
}

.login-card {
  position: relative;
  width: min(420px, 100%);
  padding: 30px;
  border-top: 3px solid var(--accent);
  background: #fff;
  box-shadow: var(--shadow-float);
}

.login-card h2 {
  margin: 10px 0 12px;
  font-size: 28px;
}

.login-card p:not(.kicker) {
  color: var(--ink-2);
  line-height: 1.8;
}

.login-error {
  padding: 10px 12px;
  border: 1px solid #edc4b0;
  border-radius: 14px;
  background: #fff2ec;
  color: #9f3a16;
  font-size: 12px;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  background: var(--bg-cream);
  color: var(--ink-2);
  font-size: 22px;
}

@media (max-width: 920px) {
  .site-shell {
    max-width: none;
    min-height: 100dvh;
  }

  .topbar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 73px;
    gap: 12px;
    padding: 14px;
    overflow: visible;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .brand strong {
    font-size: 18px;
    white-space: nowrap;
  }

  .brand span,
  .traveler-chip b {
    display: none;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin: 0;
  }

  .nav button {
    display: grid;
    min-height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: #fff;
    color: var(--ink-2);
    font-size: 0;
    place-items: center;
  }

  .nav button::before {
    font-family: var(--font-en);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
  }

  .nav button[data-scope-nav="free"]::before {
    content: "FREE";
  }

  .nav button[data-scope-nav="freeCarstay"]::before {
    content: "FREE CAR";
  }

  .nav button[data-scope-nav="camp"]::before {
    content: "PAID";
  }

  .nav button[data-scope-nav="carstay"]::before {
    content: "PAID CAR";
  }

  .nav button.active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
  }

  .nav button.active::after {
    display: none;
  }

  .top-actions {
    position: static;
    grid-column: 2;
    grid-row: 1;
    flex: 0 0 auto;
    min-width: 0;
    margin-left: 0;
    gap: 6px;
    transform: none;
  }

  .language-switch {
    flex: 0 0 auto;
    width: 96px;
    min-width: 96px;
    font-size: 10px;
  }

  .language-switch button {
    flex: 1 0 0;
    min-width: 0;
    min-height: 24px;
    padding: 0;
  }

  .traveler-chip span {
    width: 28px;
    height: 28px;
  }

  .filterbar {
    overflow-x: auto;
    padding: 10px 14px;
    flex-wrap: nowrap;
  }

  .searchbox {
    width: 210px;
    flex: 0 0 auto;
  }

  .filterbar select,
  .near-button {
    flex: 0 0 auto;
  }

  .map-stage {
    height: calc(100dvh - 248px);
    min-height: 520px;
  }

  .results-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: min(64dvh, 560px);
    padding: 16px;
    transform: translateY(0);
  }

  .results-panel.collapsed {
    transform: translateY(calc(100% + 18px));
  }

  .open-results {
    top: auto;
    left: 14px;
    bottom: 16px;
  }

  .selected-card {
    top: auto;
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
    max-height: min(52dvh, 420px);
    overflow-y: auto;
    padding: 16px 56px 16px 16px;
    z-index: 460;
  }

  .selected-card .primary {
    min-height: 50px;
  }

  .selected-close {
    top: 12px;
    right: 12px;
  }

  .map-count {
    top: 14px;
    left: 14px;
  }

  .results-panel.collapsed ~ .map-count {
    left: 14px;
    max-width: calc(100% - 28px);
  }

  .screen-detail,
  .screen-community,
  .screen-add {
    padding: 24px 18px 86px;
  }

  .static-detail {
    padding: 24px 18px 72px;
  }

  .detail-layout,
  .facility-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .static-detail-nav {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .static-detail-language {
    margin-left: 0;
  }

  .map-return-button {
    width: 100%;
    justify-content: center;
  }

  .community-hero,
  .feed,
  .add-card {
    padding: 24px 18px;
  }

}

@media (max-width: 520px) {
  .traveler-chip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
