/* ==========================================================================
   Base & Reset
   ========================================================================== */
:root {
  font-family: system-ui, -apple-system, "Noto Sans KR", sans-serif;
  color: #172b25;
  background: #f7f8f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  max-width: 860px;
  margin: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 760px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border: 1px solid #e7ebe6;
  border-radius: 22px;
  box-shadow: 0 12px 38px #254a3310;
}

/* ==========================================================================
   Header
   ========================================================================== */
header {
  background: #fff;
  border-bottom: 1px solid #e5eae5;
}

header .shell {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 22px;
  font-weight: 900;
  color: #17795d;
  letter-spacing: -1px;
}

.header-note {
  font-size: 13px;
  color: #84938b;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  max-width: 760px;
  padding: 63px 0 43px;
  margin: auto;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 2.5px;
  font-weight: 900;
  color: #3d9674;
}

.hero h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.14;
  letter-spacing: -3px;
  margin: 16px 0;
}

.hero em {
  font-style: normal;
  color: #17875f;
}

.hero p {
  color: #718278;
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================================
   Search & Form Controls
   ========================================================================== */
.search {
  padding: 28px;
}

.search h2,
.map-header h2 {
  margin: 0 0 25px;
  font-size: 23px;
  letter-spacing: -1px;
}

.field {
  min-height: 79px;
  border: 1px solid #e1e8e2;
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 13px;
  gap: 13px;
}

.destination {
  border-color: #b7dac5;
}

.field-icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #dff5e9;
  color: #16845c;
  font-size: 14px;
}

.destination-icon {
  background: #fff0df;
  color: #e08735;
}

.field-content {
  flex: 1;
  min-width: 0;
}

.field label {
  display: block;
  color: #8a9a90;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
}

.field strong {
  font-size: 14px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field small {
  display: block;
  color: #8a9a90;
  margin-top: 3px;
}

.field input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 14px;
  color: #172b25;
  background: transparent;
}

.field input::placeholder {
  color: #a7b2ab;
}

.connector {
  height: 20px;
  border-left: 2px dashed #b7c6bb;
  margin-left: 29px;
}

.text-button {
  border: 0;
  background: none;
  color: #13875c;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.search-button {
  border: 0;
  border-radius: 9px;
  background:#edf7f0;
  color: #16845c;
  font-weight: 800;
  padding: 9px 12px;
  white-space: nowrap;
}

.places {
  margin: 8px 0 0;
  border: 1px solid #e1e8e2;
  border-radius: 12px;
  max-height: 240px;
  overflow: auto;
}

.place {
  display: block;
  width: 100%;
  text-align: left;
  background: white;
  border: 0;
  border-bottom: 1px solid #eef1ed;
  padding: 12px 15px;
}

.place:hover,
.place:focus {
  background: #f1f8f3;
}

.place strong {
  display: block;
  font-size: 14px;
}

.place small {
  display: block;
  color: #829087;
  margin-top: 3px;
}

.selected {
  color: #147b58;
  font-size: 13px;
  margin: 12px 3px;
}

.primary {
  width: 100%;
  border: 0;
  background: #13875d;
  color: white;
  border-radius: 13px;
  padding: 17px 20px;
  font-weight: 800;
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
}

.primary:disabled {
  background: #b8cbc0;
  cursor: not-allowed;
}

.status {
  min-height: 20px;
  color: #74877a;
  font-size: 12px;
  margin: 14px 2px 0;
}

.status.error {
  color: #be4a3d;
}

/* ==========================================================================
   Map Section
   ========================================================================== */
.map-card {
  overflow: hidden;
}

.map-header {
  height: 94px;
  padding: 25px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.map-header h2 {
  margin: 6px 0 0;
}

.map-legend {
  font-size: 11px;
  color: #718278;
  display: flex;
  align-items: center;
  gap: 5px;
}

.map-legend i {
  width: 11px;
  height: 11px;
  background: #128c65;
  border-radius: 50%;
  margin-left: 7px;
}

.map-legend i + i {
  background: #e9a151;
}

.map-area {
  position: relative;
  margin: 0 16px;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f1;
}

.map-area svg {
  display: block;
  width: 100%;
  height: 390px;
}

.grid path {
  stroke: #e2ebe3;
  stroke-width: 1;
}

.map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #91a299;
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.map-caption {
  margin: 13px 23px 18px;
  color: #9aa79e;
  font-size: 11px;
}

/* ==========================================================================
   Results & Route Cards
   ========================================================================== */
.results {
  max-width: 760px;
  padding: 55px 0;
  margin: auto;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 15px;
  margin-bottom: 22px;
}

.section-title h2 {
  font-size: 28px;
  margin: 7px 0 0;
  letter-spacing: -1px;
}

.estimate-note {
  font-size: 12px;
  color: #84938b;
}

.route-card {
  background: #fff;
  border: 1px solid #e5ebe5;
  border-radius: 19px;
  padding: 25px;
  margin-bottom: 14px;
}

.route-card.recommended {
  border: 2px solid #1b9b70;
}

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

.badge {
  display: inline-block;
  background: #e4f7ec;
  color: #14875d;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 10px;
  margin-bottom: 9px;
}

.route-head h3 {
  font-size: 24px;
  margin: 0;
}

.route-head p {
  color: #718278;
  font-size: 13px;
  margin: 7px 0 0;
}

.route-head button {
  border: 1px solid #dce8de;
  border-radius: 10px;
  background: white;
  padding: 9px 12px;
  color: #187b5a;
  font-weight: 800;
  white-space: nowrap;
}

.stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid #edf0ed;
  border-bottom: 1px solid #edf0ed;
  margin: 20px 0;
  padding: 15px 0;
}

.stats span {
  color: #86958c;
  font-size: 12px;
}

.stats strong {
  display: block;
  color: #243a2c;
  font-size: 15px;
  margin-top: 4px;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 0 7px;
  border-left: 2px solid #cfe4d6;
}

.timeline li {
  position: relative;
  margin: 0 0 0 22px;
  padding: 0 0 22px;
  font-size: 14px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li:before {
  content: '';
  position: absolute;
  left: -29px;
  top: 2px;
  background: #159668;
  width: 12px;
  height: 12px;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #b6d9c5;
}

.timeline li.walk:before {
  background: #eba14b;
}

.timeline small {
  display: block;
  color: #86958c;
  margin-top: 4px;
}

.alternatives-title {
  font-size: 19px;
  margin: 30px 0 15px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  border-top: 1px solid #e4eae4;
  padding-top: 26px;
  padding-bottom: 40px;
  color: #9eaca2;
  font-size: 12px;
}

/* ==========================================================================
   Responsive (Media Queries)
   ========================================================================== */
@media (max-width: 800px) {
  .hero {
    padding: 42px 0 32px;
  }

  .map-area svg {
    height: 310px;
  }

  .map-header {
    height: 85px;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
  }

  .results {
    padding-top: 38px;
  }
}

@media (max-width: 480px) {
  .shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .search {
    padding: 20px;
  }

  .hero h1 {
    letter-spacing: -2px;
  }

  .map-legend {
    display: none;
  }

  .stats {
    gap: 12px;
  }

  .stats span {
    width: calc(50% - 12px);
  }
}
[hidden] {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f7f8f4;
}

.auth-card {
  background: white;
  width: 100%;
  max-width: 420px;
  padding: 36px;
  border-radius: 22px;
  box-shadow: 0 12px 38px #254a3310;
}

.auth-card h1 {
  color: #17795d;
}

.auth-card form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.auth-card input {
  width: 100%;
  padding: 13px;
  border: 1px solid #dce8de;
  border-radius: 10px;
}

.auth-card button {
  padding: 13px;
  border-radius: 10px;
  border: 1px solid #13875d;
  background: #13875d;
  color: white;
  font-weight: 700;
}

.auth-card button[type="button"] {
  background: white;
  color: #13875d;
}

#auth-message {
  color: #be4a3d;
  font-size: 13px;
}

#my-reservations {
  padding: 24px;
  margin-bottom: 32px;
}
/* 내 예약 목록 */
#my-reservations {
  margin-top: 24px;
  padding: 24px;
}

#my-reservations-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reservation-item {
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.reservation-title {
  margin: 0 0 12px;
  font-size: 18px;
}

.reservation-item p {
  margin: 8px 0;
  line-height: 1.6;
}

.reservation-item details {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: #f8fafc;
}

.reservation-item summary {
  cursor: pointer;
  font-weight: 600;
}

.reservation-item ol {
  padding-left: 22px;
}

.reservation-item li {
  margin: 8px 0;
}

.cancel-reservation-button {
  margin-top: 16px;
  padding: 10px 16px;
  border: 1px solid #dc2626;
  border-radius: 8px;
  background: white;
  color: #dc2626;
  cursor: pointer;
}

.cancel-reservation-button:hover {
  background: #fef2f2;
}

.cancel-reservation-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.real-map {
  width: 100%;
  height: 390px;
  border-radius: 12px;
  overflow: hidden;
}
.real-map {
  width: 100%;
  height: 390px;
  border-radius: 14px;
  overflow: hidden;
}

@media (max-width: 800px) {
  .real-map {
    height: 310px;
  }
}

.map-empty {
  pointer-events: none;
}