/* 제주 바다(청록)와 현무암(짙은 회색)을 바탕으로, 차 길만 감귤색으로 눈에 띄게 한다. */
:root {
  color-scheme: light dark;
  --paper: #edf1f0;
  --surface: #ffffff;
  --surface-2: #f5f8f7;
  --ink: #1d2426;
  --muted: #5a6668;
  --line: #d3dbda;
  --accent: #0a6670;
  --accent-soft: #d9ecea;
  --road: #e8761c;
  --road-soft: #fdeedf;
  --trail: #0a8a96;
  --warning: #9a3412;
  --warning-bg: #fff1e6;
  --good: #17694a;
  --good-bg: #e2f3ea;
  --map-bg: #dfe6e4;
  --meal: #c0532f;
  --cafe: #94702b;
  --snack: #a06a2c;
  --shop: #4b5fa0;
  --sight: #2e7d50;
  --lodging: #0a6670;
  --move: #6b7476;
  --parking: #59608a;
  --charge: #2f6fb3;
  --landmark: #6f7778;
  --radius: 18px;
  --tabs-height: 64px;
  --shadow: 0 1px 2px rgb(15 35 38 / .06), 0 6px 18px rgb(15 35 38 / .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111719;
    --surface: #1a2224;
    --surface-2: #20292b;
    --ink: #e9efee;
    --muted: #a3b1b2;
    --line: #2f3b3d;
    --accent: #5cc6cf;
    --accent-soft: #173436;
    --road: #f39a4a;
    --road-soft: #3a2a1c;
    --trail: #5cc6cf;
    --warning: #ffb98a;
    --warning-bg: #3a2418;
    --good: #8fd8b2;
    --good-bg: #183528;
    --map-bg: #2a3335;
    --meal: #e07a57;
    --cafe: #c39a4f;
    --snack: #c98e4c;
    --shop: #8496d6;
    --sight: #62b484;
    --lodging: #4fb3bd;
    --move: #8d9799;
    --parking: #8d93c4;
    --charge: #7fb0e6;
    --landmark: #8a9293;
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--tabs-height) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background-color: var(--paper); color: var(--ink); font: 15px/1.65 "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4, p, figure { margin: 0; }
h2 { font-size: 21px; line-height: 1.45; letter-spacing: -.03em; }
h3 { font-size: 19px; line-height: 1.45; letter-spacing: -.03em; }
h4 { font-size: 14px; line-height: 1.5; }
img { display: block; max-width: 100%; }
.page-width { width: min(100%, 1160px); padding-inline: 16px; margin-inline: auto; }
.small { font-size: 12px; line-height: 1.65; }
.muted { color: var(--muted); }
.load-status { margin: 48px 16px; padding: 24px; background: var(--surface); border-radius: var(--radius); }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px; z-index: 2000; background: var(--surface); }
.skip-link:focus { top: 8px; }

/* 첫 화면: 바다 사진 위에 제목 */
.hero { position: relative; min-height: min(68svh, 560px); display: flex; align-items: flex-end; color: #fff; background: #0d3e44; overflow: hidden; isolation: isolate; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(6 22 25 / .05) 30%, rgb(6 22 25 / .78) 100%); }
.hero.no-cover { min-height: 0; padding-top: 56px; }
.hero-inner { padding-block: 32px 30px; }
.hero h1 { font-size: clamp(36px, 10vw, 64px); line-height: 1.12; letter-spacing: -.05em; font-weight: 800; text-wrap: balance; }
.hero-dates { font-size: 15px; font-weight: 700; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.hero-subtitle { margin-top: 12px; font-size: 16px; max-width: 32em; opacity: .92; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.hero-facts span { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: rgb(255 255 255 / .18); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero-credit { position: absolute; right: 10px; top: 10px; font-size: 10px; opacity: .8; text-shadow: 0 1px 2px #0008; }

.trip-summary { display: grid; gap: 10px; padding-block: 16px 20px; }
.weather-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 6px; }
.weather-strip li { background: var(--surface); border-radius: 14px; padding: 10px 8px; text-align: center; display: grid; gap: 1px; }
.weather-strip strong { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.weather-sky { font-size: 15px; font-weight: 750; }
.weather-extra { font-size: 11px; color: var(--muted); }
.stay-box { background: var(--surface); border-radius: 14px; padding: 12px 14px; font-size: 13px; }
.stay-box strong { display: block; font-size: 15px; }
.stay-label { font-size: 12px; font-weight: 700; color: var(--accent); }

/* 날짜 탭 */
.day-tabs { position: sticky; top: 0; z-index: 1000; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px max(16px, calc((100vw - 1128px) / 2)); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { flex: 1 0 auto; min-width: 78px; min-height: 44px; display: grid; justify-items: center; padding: 6px 12px; border: 0; border-radius: 14px; background: var(--surface); color: var(--muted); line-height: 1.3; }
.day-tab strong { font-size: 14px; }
.day-tab span { font-size: 11px; font-variant-numeric: tabular-nums; }
.day-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.day-heading { padding-block: 26px 18px; }
.day-date { color: var(--accent); font-size: 13px; font-weight: 750; }
.day-heading h2 { font-size: 24px; line-height: 1.35; letter-spacing: -.04em; margin-top: 2px; text-wrap: balance; }
.day-stats { color: var(--muted); font-size: 13px; margin-top: 6px; }
.day-layout { display: grid; gap: 22px; }

/* 하루 동선 지도 */
.map-panel { min-width: 0; align-self: start; }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.map-toolbar h2 { font-size: 16px; }
.toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; cursor: pointer; }
input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--accent); flex-shrink: 0; }
#map { width: 100%; height: min(320px, 44vh); background: var(--map-bg); border-radius: var(--radius); z-index: 0; overflow: hidden; }
.map-status { margin-top: 8px; padding: 10px; background: var(--warning-bg); color: var(--warning); font-size: 12px; border-radius: 10px; }
.map-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 10px 0 6px; font-size: 12px; color: var(--muted); }
.map-legend li { display: flex; align-items: center; gap: 6px; }
.legend-dot { height: 10px; width: 10px; border-radius: 50%; background: var(--kind-color, var(--landmark)); flex-shrink: 0; }
.legend-line { display: inline-block; width: 22px; height: 0; border-top: 4px dotted var(--trail); flex-shrink: 0; }
.legend-car { border-top: 4px solid var(--road); border-radius: 2px; }

/* 시간표 */
.card-map-toggle { margin-bottom: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { position: relative; min-width: 0; padding-bottom: 14px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; scroll-margin-top: calc(var(--tabs-height) + 14px); transition: box-shadow .25s, outline-color .25s; outline: 2px solid transparent; outline-offset: -2px; }
.card.is-highlighted, .card.is-now { outline-color: var(--accent); }
.card-plain { background: transparent; box-shadow: none; border: 1px dashed var(--line); }
.card-body { padding: 16px; }
.card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.number { min-width: 26px; height: 26px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; background: var(--kind-color, var(--move)); color: #fff; font-size: 12px; font-weight: 800; flex-shrink: 0; }
time { font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kind { font-size: 12px; color: var(--kind-color, var(--muted)); font-weight: 700; margin-left: auto; }
.kind > span { margin-right: 4px; }
.state-label { font-size: 11px; font-weight: 800; padding: 2px 8px; border: 1px solid var(--accent); border-radius: 99px; color: var(--accent); }
.state-now { background: var(--accent); color: var(--surface); }
.card-title { border: 0; background: none; text-align: left; padding: 2px 0; width: 100%; min-height: 44px; font-size: inherit; font-weight: inherit; line-height: inherit; letter-spacing: inherit; }
.card-title:hover { color: var(--accent); }
.card-purpose { font-size: 14px; font-weight: 700; color: var(--kind-color, var(--accent)); }
.note { font-size: 14px; margin-top: 6px; }
.place-notes { font-size: 13px; margin-top: 8px; color: var(--muted); }
.address { margin-top: 10px; color: var(--muted); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); line-height: 1.5; }
.chip.hours { background: var(--accent-soft); border-color: transparent; color: var(--ink); font-weight: 650; }
.chip.good { background: var(--good-bg); border-color: transparent; color: var(--good); font-weight: 650; }
.chip.off, .chip.closed { background: var(--warning-bg); border-color: transparent; color: var(--warning); font-weight: 700; }
.chip.optional { border-style: dashed; }
.warning { margin-top: 12px; padding: 10px 12px; color: var(--warning); background: var(--warning-bg); border-radius: 12px; font-size: 13px; }
.warning p { display: flex; gap: 8px; align-items: baseline; }
.warning p + p { margin-top: 6px; }
.warning-icon { flex: 0 0 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--warning); color: var(--warning-bg); font-size: 11px; font-weight: 900; transform: translateY(2px); }
.source-info { font-size: 13px; margin-top: 12px; }
.source-info small { color: var(--muted); display: block; font-size: 11px; }

/* 사진 넘기기 */
.gallery { position: relative; background: var(--map-bg); }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 16 / 10; overscroll-behavior-x: contain; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline-offset: -3px; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery::after { content: ''; position: absolute; inset: auto 0 0; height: 44px; background: linear-gradient(transparent, rgb(0 0 0 / .45)); pointer-events: none; }
.gallery-nav { position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .85); color: #1d2426; font-size: 24px; line-height: 1; display: grid; place-items: center; padding-bottom: 3px; box-shadow: 0 1px 4px #0003; }
.gallery-nav.prev { left: 8px; }
.gallery-nav.next { right: 8px; }
.gallery-nav:disabled { opacity: 0; pointer-events: none; }
.gallery-count { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; color: #fff; background: rgb(0 0 0 / .5); padding: 2px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.gallery-credit { position: absolute; left: 10px; right: 60px; bottom: 6px; z-index: 1; font-size: 10px; color: #fff; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery.single .gallery-nav, .gallery.single .gallery-count { display: none; }

/* 이야기·메뉴 */
.story { margin-top: 14px; padding: 12px 14px; background: var(--accent-soft); border-radius: 14px; }
.story h4 { color: var(--accent); }
.story p { font-size: 14px; margin-top: 4px; line-height: 1.7; }
.story small, .menu small { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
.menu { margin-top: 14px; }
.menu ul { list-style: none; padding: 0; margin: 6px 0 0; }
.menu li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 5px 0; font-size: 14px; }
.menu li + li { border-top: 1px solid var(--line); }
.menu-name { font-weight: 650; }
.menu-badge { font-style: normal; font-size: 10px; font-weight: 800; color: var(--road); margin-left: 6px; }
.menu-dots { flex: 1; border-bottom: 1px dotted var(--line); min-width: 12px; translate: 0 -4px; }
.menu-price { font-variant-numeric: tabular-nums; font-weight: 700; }
.menu-note { flex-basis: 100%; color: var(--muted); font-size: 12px; margin: 0 !important; }

/* 지도 앱 버튼 */
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 6px; margin-top: 14px; }
.actions a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 6px; border-radius: 12px; font-size: 13px; text-decoration: none; font-weight: 700; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); }
.actions a::before, .route-links a::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.actions a.act-naver::before, .route-links a:nth-of-type(2)::before { background: #03c75a; }
.actions a.act-kakao::before, .route-links a:nth-of-type(1)::before { background: #f5cf00; }
.actions a.act-tmap::before, .route-links a:nth-of-type(3)::before { background: #3c5cff; }
.actions a.act-tel::before { background: var(--accent); }
.actions a:hover { border-color: var(--accent); }

/* 이동 구간: 카드 사이의 길. 차는 감귤색 실선, 걷는 길은 청록 점선 */
.transfer { position: relative; margin: 0 0 14px; padding: 2px 0 4px 40px; }
.transfer::before { content: ''; position: absolute; left: 15px; top: -14px; bottom: -14px; border-left: 4px solid var(--road); border-radius: 2px; }
.transfer-walk::before { border-left: 4px dotted var(--trail); }
.transfer-head { display: flex; gap: 10px; align-items: flex-start; }
.transfer-icon { position: absolute; left: 0; top: 2px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 17px; background: var(--road-soft); border: 2px solid var(--road); }
.transfer-walk .transfer-icon { background: var(--accent-soft); border-color: var(--trail); }
.transfer-text { min-width: 0; }
.transfer-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.transfer-time { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.transfer-car .transfer-time { color: var(--road); }
.transfer-walk .transfer-time { color: var(--trail); }
.transfer-dist { font-size: 13px; color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; }
.transfer-route { font-size: 13px; color: var(--muted); margin-top: 1px; }
.transfer-steps { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.transfer-source { font-size: 11px; color: var(--muted); margin-top: 2px; }
.transfer .warning { margin-top: 8px; }
.transfer-return { margin: 14px 0 0; padding-left: 40px; }
.transfer-return::before { top: 0; bottom: 0; }
.route-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.route-links-label { font-size: 12px; color: var(--muted); font-weight: 700; margin-right: 2px; }
.route-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 700; }
.mini-map-wrap { margin-top: 10px; min-width: 0; }
.mini-map { height: 190px; width: 100%; background: var(--map-bg); border-radius: 14px; position: relative; z-index: 0; touch-action: pan-y; overflow: hidden; }
.mini-map-wrap.is-expanded .mini-map { height: 360px; touch-action: none; }
.mini-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-expand { margin-top: 4px; min-height: 36px; padding: 4px 12px; border: 0; border-radius: 99px; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; margin-left: auto; }
.mini-status:empty { display: none; }
.mini-map .leaflet-control-attribution { max-width: 100%; font-size: 8px !important; }

/* 지도 마커 */
.route-marker { border: none; background: transparent; }
.marker-number { display: flex; justify-content: center; align-items: center; height: 32px; min-width: 32px; padding: 0 5px; border-radius: 99px; background: var(--kind-color, var(--lodging)); color: #fff; border: 2.5px solid #fff; font: 800 13px/1 -apple-system, "Apple SD Gothic Neo", sans-serif; box-shadow: 0 2px 6px #0004; }
.marker-number.marker-previous { height: 24px; min-width: 24px; font-size: 11px; border-width: 2px; opacity: .85; }
.leaflet-container { font-family: inherit; background: var(--map-bg); }
.leaflet-container a { color: #0a6670; }
.leaflet-popup-content { color: #1d2426; word-break: keep-all; line-height: 1.6; }
.popup-link { display: block; min-height: 44px; text-align: left; color: #0a6670; background: none; border: 0; padding: 8px 0; font-size: 13px; }
.leaflet-control-zoom a { min-width: 44px; min-height: 44px; line-height: 44px !important; }
.leaflet-control-attribution { font-size: 9px !important; }

/* 예비 후보 */
.extra-section { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.section-lede { color: var(--muted); font-size: 14px; margin-top: 2px; }
.backup-group { margin-top: 20px; }
.backup-group-title { font-size: 15px; color: var(--muted); margin-bottom: 10px; }
.backup-grid { display: grid; gap: 14px; }
.backup-card h3 { font-size: 18px; }
.backup-kind { display: block; margin: 0 0 2px; }
.needs-check { display: inline-block; vertical-align: middle; color: var(--warning); background: var(--warning-bg); font-size: 11px; padding: 1px 8px; border-radius: 99px; margin-left: 8px; }
.check-row { display: flex; align-items: start; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; min-height: 48px; }
.check-row input { margin-top: 3px; }
.check-row:has(input:checked) span { color: var(--muted); text-decoration: line-through; }
#trip-footer { padding-block: 36px 48px; color: var(--muted); font-size: 12px; }
#trip-footer p + p { margin-top: 6px; }

@media (min-width: 640px) {
  .trip-summary { grid-template-columns: 2fr 1fr; align-items: stretch; }
  .backup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .hero-inner { padding-block: 48px 44px; }
  .day-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: start; }
  #schedule { grid-column: 1; grid-row: 1; }
  .map-panel { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--tabs-height) + 18px); }
  #map { height: min(560px, 70vh); }
  .card-body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
