:root {
  --ink: #191a18;
  --muted: #74756f;
  --paper: #fffdf8;
  --canvas: #e9e9e4;
  --card: #fff;
  --line: #ece8df;
  --red: #ed402c;
  --navy: #102334;
  --yellow: #f8c64b;
  --green: #dceee1;
  --shadow: 0 16px 36px rgba(24, 24, 20, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Inter", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
  background: var(--paper);
  box-shadow: 0 0 70px rgba(26, 27, 24, .15);
}
.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 480px);
  min-height: 72px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,253,248,.95);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}
.header-brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px 12px 12px 4px; color: #fff; background: var(--red); font-family: "DM Serif Display", Georgia, serif; font-size: 22px; transform: rotate(-3deg); }
.header-copy small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.header-copy strong { display: block; font-size: 15px; letter-spacing: -.025em; }
.header-actions { display: flex; gap: 8px; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-main { padding-top: 72px; }
.page-content { padding: 25px 20px 28px; }
.page-kicker { margin: 0 0 6px; color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.page-title { margin: 0; font-size: 27px; line-height: 1.25; letter-spacing: -.045em; }
.page-lede { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.search-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; min-height: 55px; margin-top: 20px; padding: 7px 8px 7px 15px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 10px 25px rgba(30,29,24,.06); }
.search-bar svg { width: 18px; height: 18px; fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; }
.search-bar input { min-width: 0; padding: 0 10px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.search-bar input::placeholder { color: #aaa9a2; }
.search-submit { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 13px; color: #fff; background: var(--ink); cursor: pointer; }

.chip-row { display: flex; gap: 8px; margin: 18px -20px 0; padding: 0 20px 8px; overflow-x: auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 37px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 10px; font-weight: 700; cursor: pointer; }
.chip.active { border-color: var(--ink); color: #fff; background: var(--ink); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 27px 0 14px; }
.section-head h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; }
.section-head a, .section-head span { color: var(--muted); font-size: 9px; font-weight: 700; }

.place-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.place-card { overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: #fff; }
.place-image { position: relative; height: 145px; overflow: hidden; }
.place-image img { height: 100%; object-fit: cover; }
.place-tag { position: absolute; top: 10px; left: 10px; padding: 5px 7px; border-radius: 7px; color: #fff; background: rgba(16,35,52,.78); backdrop-filter: blur(7px); font-size: 7px; font-weight: 800; }
.save-button { position: absolute; top: 9px; right: 9px; display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); cursor: pointer; }
.save-button svg { width: 15px; height: 15px; fill: transparent; stroke: var(--ink); stroke-width: 1.8; }
.save-button.saved svg { fill: var(--red); stroke: var(--red); }
.place-copy { padding: 12px; }
.place-copy small { color: var(--red); font-size: 7px; font-weight: 800; }
.place-copy h3 { margin: 6px 0 5px; font-size: 13px; letter-spacing: -.025em; }
.place-copy p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.place-stats { display: flex; gap: 7px; margin-top: 9px; color: #666762; font-size: 8px; font-weight: 700; }

.promo-card { position: relative; min-height: 190px; margin-top: 20px; padding: 24px; overflow: hidden; border-radius: 25px; color: #fff; background: var(--red); }
.promo-card::after { position: absolute; right: -70px; bottom: -90px; width: 220px; height: 220px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; content: ""; box-shadow: 0 0 0 34px rgba(255,255,255,.05), 0 0 0 68px rgba(255,255,255,.03); }
.promo-card small { color: #ffd1c7; font-size: 8px; font-weight: 800; }
.promo-card h2 { position: relative; z-index: 1; max-width: 290px; margin: 8px 0; font-size: 23px; line-height: 1.25; letter-spacing: -.04em; }
.promo-card p { position: relative; z-index: 1; max-width: 280px; margin: 0; color: rgba(255,255,255,.72); font-size: 9px; line-height: 1.55; }

.product-list { display: grid; gap: 12px; }
.product-card { display: grid; grid-template-columns: 115px 1fr; min-height: 125px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.product-card img { height: 100%; object-fit: cover; }
.product-copy { display: flex; padding: 15px; flex-direction: column; justify-content: center; }
.product-copy small { color: var(--red); font-size: 7px; font-weight: 800; }
.product-copy h3 { margin: 6px 0 4px; font-size: 14px; letter-spacing: -.025em; }
.product-copy p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.product-price { margin-top: 9px; font-size: 11px; font-weight: 800; }

.saved-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.summary-card { padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.summary-card span { display: block; color: var(--muted); font-size: 8px; }
.summary-card strong { display: block; margin-top: 5px; font-size: 22px; }
.saved-route { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 15px; border-radius: 19px; color: #fff; background: var(--navy); }
.route-number { display: grid; flex: 0 0 35px; place-items: center; width: 35px; height: 35px; border-radius: 12px; color: var(--ink); background: var(--yellow); font-size: 11px; font-weight: 800; }
.saved-route strong { display: block; font-size: 11px; }
.saved-route span { display: block; margin-top: 3px; color: rgba(255,255,255,.55); font-size: 8px; }
.saved-route svg { width: 17px; height: 17px; margin-left: auto; fill: none; stroke: #fff; stroke-width: 1.8; }
.empty-note { display: none; padding: 35px 20px; color: var(--muted); text-align: center; font-size: 10px; }

.bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 50; display: grid; grid-template-columns: repeat(5,1fr); width: min(100%,480px); min-height: 76px; margin: 0 auto; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); border-radius: 0; background: rgba(255,255,255,.97); box-shadow: 0 -12px 34px rgba(26,27,24,.08); backdrop-filter: blur(18px); }
.nav-item { display: flex; align-items: center; justify-content: center; gap: 5px; color: #8a8b85; font-size: 8px; font-weight: 700; flex-direction: column; }
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: var(--red); }

.map-page .app-shell { height: 100vh; padding: 0; overflow: hidden; }
.map-page .app-main { position: relative; height: 100vh; padding: 72px 0 76px; }
#kakao-map { width: 100%; height: 100%; background: #e8ece6; }
.map-search { position: absolute; top: 88px; right: 16px; left: 16px; z-index: 10; display: grid; grid-template-columns: auto 1fr auto; align-items: center; min-height: 52px; padding: 6px 7px 6px 14px; border: 1px solid rgba(25,26,24,.08); border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: 0 12px 30px rgba(30,33,28,.15); }
.map-search svg { width: 18px; height: 18px; fill: none; stroke: var(--red); stroke-width: 2; }
.map-search input { min-width: 0; padding: 0 10px; border: 0; outline: 0; background: transparent; font-size: 10px; }
.map-search button { width: 39px; height: 39px; padding: 0; border: 0; border-radius: 12px; color: #fff; background: var(--ink); cursor: pointer; }
.map-chips { position: absolute; top: 150px; left: 0; z-index: 10; display: flex; width: 100%; gap: 7px; padding: 8px 16px; overflow-x: auto; scrollbar-width: none; }
.map-chips::-webkit-scrollbar { display: none; }
.map-chip { flex: 0 0 auto; min-height: 33px; padding: 0 12px; border: 1px solid rgba(25,26,24,.1); border-radius: 999px; color: #5f605b; background: rgba(255,255,255,.94); box-shadow: 0 5px 14px rgba(24,25,22,.08); font-size: 9px; font-weight: 700; cursor: pointer; }
.map-chip.active { border-color: var(--ink); color: #fff; background: var(--ink); }
.map-controls { position: absolute; right: 15px; bottom: 190px; z-index: 10; display: grid; gap: 8px; }
.map-control { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(25,26,24,.08); border-radius: 13px; background: #fff; box-shadow: 0 8px 18px rgba(24,25,22,.12); cursor: pointer; }
.map-control svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map-place-card { position: absolute; right: 15px; bottom: 92px; left: 15px; z-index: 12; display: grid; grid-template-columns: 88px 1fr auto; align-items: center; min-height: 82px; padding: 9px; border: 1px solid rgba(25,26,24,.08); border-radius: 19px; background: rgba(255,255,255,.97); box-shadow: 0 15px 35px rgba(24,25,22,.18); transform: translateY(140px); transition: transform .25s ease; }
.map-place-card.active { transform: translateY(0); }
.map-place-card img { width: 78px; height: 64px; border-radius: 13px; object-fit: cover; }
.map-place-copy { padding: 0 11px; }
.map-place-copy small { color: var(--red); font-size: 7px; font-weight: 800; }
.map-place-copy h2 { margin: 4px 0 3px; font-size: 13px; }
.map-place-copy p { margin: 0; color: var(--muted); font-size: 8px; }
.map-place-link { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--ink); font-size: 12px; }
.map-error { position: absolute; inset: 72px 0 76px; z-index: 4; display: none; align-items: center; justify-content: center; padding: 30px; color: var(--muted); background: #eef0eb; text-align: center; font-size: 11px; line-height: 1.6; }
.map-error.visible { display: flex; }

@media (max-width: 359px) {
  .page-content { padding-right: 15px; padding-left: 15px; }
  .chip-row { margin-right: -15px; margin-left: -15px; padding-right: 15px; padding-left: 15px; }
  .app-header { padding-right: 15px; padding-left: 15px; }
}
