* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #2a7de1;
  --blue-d: #1f63b8;
  --navy: #14233a;
  --ink: #2a3441;
  --line: #e6eaf0;
  --bg: #f4f7fb;
}

body {
  font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background: #fff;
}

.inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.nav .inner { display: flex; align-items: center; height: 62px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--blue), var(--blue-d)); color: #fff; display: grid; place-items: center; font-weight: 800; }
.brand-name { font-weight: 700; font-size: 17px; }
.brand-name i { font-style: normal; font-size: 12px; color: #9aa6b5; font-weight: 500; margin-left: 2px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; color: #54606e; }
.nav nav a:hover { color: var(--blue); }
.nav-cta { background: var(--blue); color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.nav-cta:hover { background: var(--blue-d); }

.hero { background: linear-gradient(120deg, #14233a 0%, #1f3f6b 55%, #2a7de1 100%); color: #fff; padding: 70px 0 64px; }
.hero h1 { font-size: 40px; line-height: 1.25; letter-spacing: -.5px; }
.hero p { margin-top: 16px; font-size: 16px; color: #d3ddec; }
.btn-primary { display: inline-block; background: var(--blue); color: #fff; font-weight: 700; padding: 13px 26px; border-radius: 10px; border: none; cursor: pointer; font-size: 15px; }
.hero .btn-primary { background: #fff; color: var(--blue-d); margin-top: 26px; }
.hero .btn-primary:hover { background: #eaf2ff; }
.btn-primary:hover { background: var(--blue-d); }
.btn-primary.full { width: 100%; }

.pipeline { display: flex; align-items: center; gap: 14px; margin-top: 40px; flex-wrap: wrap; }
.pipe { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 14px 18px; }
.pipe b { display: block; font-size: 14px; }
.pipe span { font-size: 12px; color: #c6d3e6; }
.arrow { color: #9fb6d6; font-size: 20px; }

.section { padding: 64px 0; }
.section.alt { background: var(--bg); }
.sec-title { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.sec-sub { color: #6b7787; margin-top: 6px; margin-bottom: 30px; }

.feature-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fcard { border: 1px solid var(--line); border-radius: 14px; padding: 26px 22px; background: #fff; }
.ficon { width: 38px; height: 38px; border-radius: 10px; background: #eaf2ff; color: var(--blue); display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }
.fcard h3 { font-size: 17px; margin-bottom: 8px; }
.fcard p { font-size: 14px; color: #6b7787; }

.region-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.region-sel { padding: 10px 16px; border: 1px solid #cfd8e3; border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; min-width: 140px; }
.region-sel:focus { outline: none; border-color: var(--blue); }

.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.tab { padding: 9px 18px; border-radius: 22px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; color: #54606e; }
.tab.on { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 600; }

.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.more-wrap { text-align: center; margin-top: 24px; }
.btn-more { background: #fff; border: 1px solid #cfd8e3; color: #44505e; padding: 11px 28px; border-radius: 24px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-more:hover { border-color: var(--blue); color: var(--blue); }
.card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; transition: transform .12s, box-shadow .12s; cursor: pointer; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20,35,58,.1); }
.card img { width: 100%; height: 150px; object-fit: cover; display: block; background: #dde4ee; }
.card-body { padding: 14px 15px 16px; }
.card-cat { display: inline-block; font-size: 11px; color: var(--blue); background: #eaf2ff; padding: 2px 9px; border-radius: 5px; margin-bottom: 7px; }
.card-body h3 { font-size: 16px; }
.card-region { font-size: 12px; color: #9aa6b5; margin: 2px 0 8px; }
.card-body p { font-size: 13px; color: #6b7787; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.builder { display: block; }
.builder.has-result { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: stretch; }
.builder-form { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: #fff; }
.bf { margin-bottom: 18px; }
.bf > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.bf > label small { color: #9aa6b5; font-weight: 400; }
.sel-all { float: right; padding: 3px 11px; border-radius: 12px; border: 1px solid var(--blue); background: #fff; color: var(--blue); font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.sel-all:hover { background: #eaf2ff; }
.sel-all.on { background: var(--blue); color: #fff; }
.bf select { width: 100%; padding: 11px 12px; border: 1px solid #cfd8e3; border-radius: 8px; font-size: 14px; font-family: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 13px; border-radius: 18px; border: 1px solid #cfd8e3; background: #fff; cursor: pointer; font-size: 13px; user-select: none; }
.chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.district-chips { max-height: 128px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 8px; gap: 6px; align-content: flex-start; }
.district-chips .dchip { padding: 6px 11px; font-size: 12px; }
.meal-tag { color: #e8553b; }

.rating { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.stars { position: relative; display: inline-block; font-size: 12px; line-height: 1; white-space: nowrap; }
.stars::before { content: "★★★★★"; color: #d8dee8; letter-spacing: 1px; }
.stars::after { content: "★★★★★"; color: #f5a623; letter-spacing: 1px; position: absolute; left: 0; top: 0; width: var(--p, 0%); overflow: hidden; white-space: nowrap; }
.rating b { font-size: 11px; font-weight: 700; color: #c7841a; }
.dt-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.dt-rating .stars { font-size: 16px; }
.dt-rating .rating b { font-size: 14px; }
.rating-cap { font-size: 12px; color: #9aa6b5; }

.builder-result { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; min-height: 380px; position: relative; display: flex; flex-direction: column; }
.map { width: 100%; flex: 1; min-height: 380px; background: #e8edf4; }
.route-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #7a8696; background: rgba(244,247,251,.92); font-size: 15px; padding: 20px; }

.loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(255,255,255,.94); z-index: 5; }
.loading p { color: var(--blue-d); font-weight: 600; font-size: 15px; }
.spinner { width: 44px; height: 44px; border: 4px solid #dbe6f5; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.simulation { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 30px; }
.sim-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sim-head h3 { font-size: 20px; }
.btn-ghost { background: #fff; border: 1px solid var(--blue); color: var(--blue); padding: 9px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px; }
.btn-ghost:hover { background: #eaf2ff; }

.day-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.day-tab { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; }
.day-tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }

.timeline { position: relative; }
.tl-item { display: grid; grid-template-columns: 64px 1fr; gap: 32px; padding-bottom: 22px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 81px; top: 8px; bottom: -14px; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-time { text-align: right; font-weight: 700; color: var(--blue); font-size: 14px; padding-top: 2px; }
.tl-dot { position: absolute; left: 76px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--blue); }
.tl-card { border: 1px solid var(--line); border-radius: 12px; padding: 0; overflow: hidden; display: flex; align-items: center; cursor: pointer; }
.tl-card:hover { box-shadow: 0 6px 16px rgba(20,35,58,.1); }
.tl-card img { width: 130px; height: 110px; object-fit: cover; flex-shrink: 0; align-self: center; background: #dde4ee; }
.tl-info { padding: 12px 16px; }
.tl-info .order { font-size: 12px; color: #9aa6b5; }
.tl-info h4 { font-size: 16px; margin: 1px 0 4px; }
.tl-info .meta { font-size: 12px; color: #6b7787; }
.tl-info .meta span { margin-right: 10px; }
.tl-info p { font-size: 13px; color: #6b7787; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.share-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.share-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fff; cursor: pointer; }
.share-card:hover { box-shadow: 0 8px 20px rgba(20,35,58,.08); }
.share-card h3 { font-size: 16px; margin-bottom: 6px; }
.share-card .sc-meta { font-size: 12px; color: #9aa6b5; }
.share-empty { color: #9aa6b5; font-size: 14px; }

.foot { background: var(--navy); color: #aeb9c8; padding: 30px 0; text-align: center; font-size: 13px; }
.foot .src { color: #7c8aa0; font-size: 12px; margin-top: 6px; }

.modal { position: fixed; inset: 0; background: rgba(15,25,40,.5); display: grid; place-items: center; z-index: 2000; padding: 20px; }
.modal-box { background: #fff; border-radius: 14px; padding: 28px; width: 100%; max-width: 420px; }
.modal-box h3 { font-size: 19px; }
.modal-desc { font-size: 13px; color: #6b7787; margin: 6px 0 18px; }
.modal-box label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.modal-box input { width: 100%; padding: 11px 12px; border: 1px solid #cfd8e3; border-radius: 8px; font-size: 14px; font-family: inherit; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.modal-msg { font-size: 13px; margin-top: 12px; text-align: center; font-weight: 600; }

.detail-box { max-width: 520px; padding: 0; overflow: hidden; position: relative; display: flex; flex-direction: column; max-height: 90vh; }
.modal-x { position: absolute; top: 10px; right: 12px; z-index: 2; width: 32px; height: 32px; border: none; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.modal-x:hover { background: rgba(0,0,0,.65); }
.dt-img { width: 100%; height: 240px; object-fit: cover; display: block; background: #dde4ee; flex: 0 0 auto; }
.dt-body { padding: 22px 24px 26px; overflow-y: auto; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.dt-body h3 { font-size: 22px; margin: 8px 0 2px; }
.dt-region { font-size: 13px; color: #9aa6b5; margin-bottom: 8px; }
.dt-meta { list-style: none; padding: 0; margin: 0 0 14px; border-top: 1px solid var(--line); }
.dt-meta li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dt-meta li b { color: #1f63b8; min-width: 64px; font-weight: 600; }
.dt-desc { font-size: 14px; color: #4a5563; line-height: 1.7; }
.dt-links { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.dt-links a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.dt-links .lk-tel { background: #eaf2ff; color: var(--blue-d); }
.dt-links .lk-web { background: var(--blue); color: #fff; }
.dt-links .lk-nav { background: #03c75a; color: #fff; }
.dt-links a:hover { opacity: .9; }

.leaflet-popup-content .naver-link { display: inline-block; margin-top: 6px; padding: 4px 10px; border-radius: 6px; background: #03c75a; color: #fff !important; font-weight: 600; text-decoration: none; }
.leaflet-popup-content .naver-link:hover { opacity: .9; }

.num-marker { background: var(--blue); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

.day-tabs { flex-wrap: wrap; }

@media (max-width: 880px) {
  .hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 28px; }
  .feature-cards, .card-grid, .share-list { grid-template-columns: repeat(2, 1fr); }
  .builder.has-result { grid-template-columns: 1fr; }
  .nav nav { display: none; }
  .section { padding: 40px 0; }

  main { display: flex; flex-direction: column; }
  #builder { order: -1; }
}
@media (max-width: 520px) {
  .hero { padding: 36px 0 32px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; }
  .card-grid, .feature-cards, .share-list { grid-template-columns: 1fr; }
  .sec-title { font-size: 22px; }
  .builder-form { padding: 18px; }
  .district-chips { max-height: 112px; }
  .tl-card img { width: 96px; height: 96px; }
  .tl-item { grid-template-columns: 48px 1fr; gap: 22px; }
  .tl-item::before { left: 61px; }
  .tl-dot { left: 56px; }
  .detail-box { max-height: 88vh; }
  .dt-img { height: 180px; }
  .dt-body { padding: 18px 18px 22px; }
}
