:root {
  color-scheme: light dark;
  --bg: #f4f4ef;
  --surface: #ffffff;
  --surface-soft: #e7efed;
  --text: #172221;
  --muted: #61706e;
  --line: #ccd8d5;
  --accent: #0b4f52;
  --accent-strong: #083d3f;
  --accent-soft: #d5e8e4;
  --warm: #b94a2e;
  --shadow: 0 14px 38px rgba(9, 51, 51, 0.12);
  --radius: 18px;
  --nav-height: 78px;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100dvh; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; }

.auth-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: linear-gradient(155deg, #0b4f52 0 42%, #143e40 42% 58%, #f4f4ef 58%); }
.auth-card { width: min(100%, 430px); padding: 30px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--accent); color: #f5f7f4; font-weight: 900; font-size: 27px; }
.eyebrow, .topbar-kicker { margin: 20px 0 7px; color: var(--warm); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; }
.auth-card h1 { margin: 0; max-width: 10ch; font-size: clamp(32px, 9vw, 46px); line-height: 1.08; letter-spacing: -0.045em; }
.auth-copy { margin: 18px 0 25px; color: var(--muted); line-height: 1.65; }
.admin-login { border-top: 1px solid var(--line); padding-top: 14px; }
.admin-login summary { color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 750; }
.admin-login[open] summary { margin-bottom: 16px; }
.auth-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 750; }
.field input { width: 100%; padding: 13px 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; outline: none; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field small { color: var(--muted); }
.form-error { margin: 0; color: #a22e21; font-weight: 700; }
.invite-notice { padding: 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }

.button { min-height: 44px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-weight: 800; transition: transform 140ms ease, background 140ms ease; }
.button:active { transform: scale(0.98); }
.button.primary { border-color: var(--accent); background: var(--accent); color: #f5f7f4; }
.button.secondary { color: var(--accent); border-color: var(--accent); }
.button.danger { color: #9d2f23; border-color: #d8aaa3; }
.button.wide { width: 100%; }
.button:disabled { opacity: 0.55; cursor: not-allowed; }

.app-shell { width: min(100%, 1100px); min-height: 100dvh; margin: 0 auto; padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); background: var(--bg); }
.topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; position: sticky; top: 0; z-index: 500; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(15px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -0.04em; }
.topbar-kicker { margin: 0 0 2px; font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.sync-state { color: var(--muted); font-size: 12px; }
.offline-download-button { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 10px; color: var(--accent); background: #fff; font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.offline-download-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.avatar-button { width: 42px; height: 42px; border: 0; border-radius: 13px; background: var(--accent); color: #f5f7f4; font-weight: 900; }
.view { padding: 18px 16px 30px; outline: none; }
.bottom-nav { position: fixed; left: 50%; bottom: 0; z-index: 600; transform: translateX(-50%); width: min(100%, 1100px); min-height: var(--nav-height); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); background: color-mix(in srgb, var(--surface) 96%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(18px); }
.nav-button { display: grid; place-items: center; align-content: center; gap: 4px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; }
.nav-button.active { background: var(--accent-soft); color: var(--accent-strong); }
.nav-symbol { font-size: 10px; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

.hero-panel { padding: 22px; border-radius: var(--radius); background: var(--accent); color: #f5f7f4; box-shadow: var(--shadow); }
.hero-panel .date { margin: 0 0 6px; color: #b9d8d4; font-size: 13px; font-weight: 800; }
.hero-panel h2 { margin: 0; font-size: clamp(27px, 7vw, 40px); line-height: 1.1; letter-spacing: -0.045em; }
.hero-panel p { margin: 12px 0 0; max-width: 55ch; color: #dceae7; line-height: 1.55; }
.trip-poster { overflow: hidden; margin-bottom: 16px; border: 1px solid #0b4f52; border-radius: 22px; background: #fdfbf5; box-shadow: var(--shadow); }
.poster-hero { min-height: 218px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 24px; color: #fffdf8; background: linear-gradient(90deg, rgba(4, 45, 58, .94) 0%, rgba(7, 71, 78, .71) 53%, rgba(4, 24, 33, .14) 100%), url('/photos/galata-tower.jpg') center 46% / cover; }
.poster-kicker { margin: 0 0 8px; color: #d9c17d; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.poster-lead h2 { margin: 0; max-width: 9ch; font-size: clamp(34px, 8vw, 55px); line-height: 1.02; letter-spacing: -.07em; }
.poster-copy { max-width: 31ch; margin: 12px 0 0; font-size: 14px; line-height: 1.55; }
.poster-stamp { flex: 0 0 auto; display: grid; place-items: center; width: 72px; height: 72px; border: 2px solid #f6d888; border-radius: 50%; background: rgba(8, 61, 63, .84); text-align: center; transform: rotate(-7deg); }
.poster-stamp strong { font-size: 23px; line-height: 1; }.poster-stamp span { margin-top: 3px; font-size: 10px; font-weight: 800; }
.poster-highlight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; padding: 12px; background: #e3f0ec; }
.trip-guide-poster { border: 5px solid #f8edd2; background: #fffdf7; }
.trip-guide-poster .poster-hero { min-height: 270px; align-items: flex-end; padding: 28px; background: linear-gradient(90deg, rgba(4, 45, 58, .96) 0%, rgba(7, 71, 78, .72) 50%, rgba(4, 24, 33, .12) 100%), url('/photos/galata-tower.jpg') center 46% / cover; }
.trip-guide-poster .poster-lead h2 { max-width: 11ch; font-size: clamp(36px, 8.5vw, 60px); }
.poster-overview { margin: 12px; padding: 14px 16px; border: 1px solid #9cc8cf; border-radius: 12px; background: linear-gradient(90deg, #e5f5f2, #f8fbf6); }
.poster-overview h3, .poster-route-card h3, .poster-basics h3, .poster-food h3 { margin: 0; color: var(--accent-strong); font-size: 17px; letter-spacing: -.04em; }.poster-overview p { margin: 7px 0 0; color: #395352; font-size: 13px; line-height: 1.55; }
.trip-guide-poster .poster-highlight-grid { padding: 0 12px 12px; background: transparent; }.trip-guide-poster .poster-highlight { position: relative; min-height: 130px; padding: 17px 12px 12px; overflow: hidden; border: 1px solid #c9ded7; border-radius: 12px; background: #eef7f4; box-shadow: 0 3px 0 rgba(11, 79, 82, .09); }.trip-guide-poster .poster-highlight:nth-child(2) { border-color: #efd2a0; background: #fff2dc; }.trip-guide-poster .poster-highlight:nth-child(3) { border-color: #cbd8eb; background: #ebeff8; }.poster-number { position: absolute; top: -10px; right: 7px; color: rgba(11,79,82,.12); font-size: 49px; font-weight: 950; letter-spacing: -.1em; }.poster-highlight h3 { position: relative; margin-top: 18px; font-size: 15px; }.poster-highlight p { position: relative; }
.poster-guide-grid { display: grid; grid-template-columns: 1.16fr .84fr; gap: 10px; padding: 0 12px 12px; }.poster-route-card, .poster-basics { padding: 15px; border: 1px solid #bed9d4; border-radius: 12px; background: #edf7f3; }.poster-basics { border-color: #d5dced; background: #f2f5fb; }.poster-subhead { margin: 4px 0 11px; color: var(--muted); font-size: 11px; font-weight: 750; }.poster-route-steps { display: grid; gap: 8px; }.poster-route-step { position: relative; min-height: 39px; padding: 2px 0 0 32px; color: var(--accent-strong); font-size: 13px; font-weight: 850; }.poster-route-step small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 650; }.poster-route-dot { position: absolute; left: 0; top: 0; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--warm); color: #fff; font-size: 11px; font-weight: 900; }.poster-route-step:not(:last-child)::after { content: ''; position: absolute; left: 10px; top: 25px; height: 18px; border-left: 2px dotted #69a9a6; }.poster-basic-row { margin: 8px 0; display: grid; gap: 2px; }.poster-basic-row strong { color: var(--warm); font-size: 11px; }.poster-basic-row span { color: #33494d; font-size: 11px; line-height: 1.35; }
.poster-food { margin: 0 12px 12px; padding: 15px; border: 1px solid #ecd19b; border-radius: 12px; background: #fff7e5; }.poster-food-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }.poster-food-card { min-height: 86px; padding: 9px; border-radius: 9px; background: #fffdf7; border: 1px solid #f0d9aa; }.poster-food-index { color: var(--warm); font-size: 10px; font-weight: 900; }.poster-food-card h4 { margin: 5px 0 3px; color: var(--accent-strong); font-size: 12px; letter-spacing: -.04em; }.poster-food-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.trip-guide-poster .poster-rules { margin: 0 12px 12px; padding: 14px 16px 8px; border-radius: 12px; background: #e7f0f9; border: 1px solid #bed1e6; }.trip-guide-poster .poster-actions { padding: 0 12px 14px; }
.trip-guide-poster .poster-actions a:last-child { grid-column: span 2; text-align: center; text-decoration: none; }
@media (max-width: 620px) { .trip-guide-poster .poster-hero { min-height: 240px; padding: 21px; }.poster-guide-grid { grid-template-columns: 1fr; }.poster-food-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 530px) { .poster-highlight-grid { grid-template-columns: 1fr; }.poster-highlight { min-height: 0; }.poster-actions { grid-template-columns: 1fr; }.trip-guide-poster .poster-actions a:last-child { grid-column: auto; }.sync-state { display: none; } }
.day-strip { margin: 16px -16px 18px; padding: 0 16px 4px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-chip { min-width: 72px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); text-align: center; }
.day-chip strong { display: block; color: var(--text); font-size: 16px; }
.day-chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }

.section-heading { margin: 24px 0 12px; display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.section-heading h2, .section-heading h3 { margin: 0; letter-spacing: -0.035em; }
.section-heading p { margin: 5px 0 0; color: var(--muted); }
.presentation-control { margin: 14px 0; padding: 14px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.presentation-control p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.presentation-control select { min-height: 46px; width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 750; }
.breakfast-guide { margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); overflow: hidden; }
.breakfast-guide h3 { margin: 0; letter-spacing: -0.03em; }
.breakfast-basis { margin: 5px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.breakfast-menu-list { display: flex; gap: 10px; margin: 0 -14px -3px; padding: 0 14px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.breakfast-menu-list::-webkit-scrollbar { display: none; }
.breakfast-menu-card { width: min(82vw, 300px); flex: 0 0 min(82vw, 300px); min-height: 222px; display: flex; flex-direction: column; gap: 8px; padding: 14px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.breakfast-menu-card h4 { margin: 0; font-size: 16px; letter-spacing: -0.02em; }
.breakfast-meta { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.breakfast-menu-copy { display: grid; gap: 3px; margin-top: 4px; }
.breakfast-local { color: var(--accent-strong); font-size: 15px; }
.breakfast-korean { color: var(--text); font-size: 13px; }
.breakfast-price { margin-top: 5px; color: var(--warm); font-size: 14px; font-weight: 850; }
.breakfast-price-note { color: var(--muted); font-size: 11px; line-height: 1.35; }
.breakfast-map { width: 100%; margin-top: auto; display: grid; place-items: center; text-decoration: none; }
.korean-fallback-guide { margin: 12px 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.korean-fallback-guide summary { cursor: pointer; color: var(--accent-strong); font-weight: 850; }
.korean-fallback-guide[open] summary { margin-bottom: 8px; }
.korean-fallback-list { display: grid; gap: 10px; }
.korean-fallback-card { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.korean-fallback-card h4 { margin: 0; font-size: 15px; letter-spacing: -0.02em; }
.agenda-periods { display: grid; gap: 18px; }
.time-period { padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface) 84%, var(--surface-soft)); }
.time-period-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 8px; color: var(--accent-strong); }
.time-period-heading strong { font-size: 15px; letter-spacing: -0.02em; }
.time-period-heading span { color: var(--muted); font-size: 11px; font-weight: 750; white-space: nowrap; }
.period-evening { background: color-mix(in srgb, var(--surface) 80%, #e8e0f0); }
.timeline { position: relative; display: grid; gap: 2px; }
.timeline::before { content: ""; position: absolute; left: 24px; top: 22px; bottom: 22px; width: 2px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 50px 1fr; gap: 10px; padding: 10px 0; }
.timeline-time { position: relative; z-index: 1; width: 50px; min-height: 44px; display: grid; place-items: center; align-self: start; padding: 4px; border-radius: 10px; background: var(--surface-soft); color: var(--accent-strong); font-size: 11px; font-weight: 850; text-align: center; font-variant-numeric: tabular-nums; }
.timeline-content { min-width: 0; padding: 14px 15px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.event-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.timeline-content h3, .optional-event-copy h4 { margin: 0; font-size: 17px; line-height: 1.35; }
.timeline-content p, .optional-event-copy p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.event-summary { font-size: 14px; }
.event-detail-note { padding: 10px 11px; border-radius: 10px; background: var(--surface-soft); font-size: 13px; }
.event-disclosure, .day-mobility-disclosure { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); overflow: hidden; }
.event-disclosure summary, .day-mobility-disclosure > summary { padding: 11px 12px; cursor: pointer; color: var(--accent-strong); font-size: 13px; font-weight: 850; }
.event-disclosure[open] > summary, .day-mobility-disclosure[open] > summary { border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.event-disclosure > :not(summary) { margin-left: 12px; margin-right: 12px; }
.event-disclosure > .event-mobility { margin-bottom: 12px; }
.event-mobility { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.event-mobility h4 { margin: 0; font-size: 14px; letter-spacing: -0.02em; }
.event-mobility-list { display: grid; gap: 7px; }
.event-mobility-row { display: grid; gap: 3px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.event-mobility-row:last-child { border-bottom: 0; padding-bottom: 0; }
.event-mobility-row span { color: var(--muted); line-height: 1.4; }
.event-mobility-links, .meal-choice-directions { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.day-mobility-disclosure { margin-top: 18px; background: var(--surface); }
.day-mobility-disclosure > .ride-section { padding: 0 14px 14px; margin-top: 0; }
.day-mobility-disclosure > .ride-section > .section-heading { margin-top: 12px; }
.souvenir-guide { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.souvenir-guide summary { padding: 13px 14px; cursor: pointer; color: var(--accent-strong); font-weight: 850; }
.souvenir-guide[open] summary { border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.souvenir-list { display: grid; gap: 10px; padding: 13px 14px; }
.souvenir-card { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.souvenir-card h4, .souvenir-card p { margin: 0; }
.souvenir-card h4 { font-size: 14px; }
.souvenir-card strong { color: var(--accent-strong); font-size: 13px; }
.souvenir-card p { color: var(--muted); font-size: 12px; line-height: 1.45; }
.souvenir-now span, .souvenir-later span { color: var(--text); font-weight: 850; }
.activity-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 7px; border-radius: 999px; background: var(--surface-soft); color: var(--accent-strong); font-size: 11px; font-weight: 850; white-space: nowrap; }
.activity-관광 { background: #d7ebea; color: #14565a; }
.activity-식사 { background: #f7e3cf; color: #884019; }
.activity-이동 { background: #dce8f4; color: #265477; }
.activity-개인시간 { background: #eee5d8; color: #66533d; }
.activity-휴식 { background: #e4e0f2; color: #574a7c; }
.activity-고정-일정 { background: #f2d9d7; color: #832e29; }
.meal-picker { display: grid; gap: 9px; margin-top: 13px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.meal-picker h4 { margin: 0; font-size: 14px; letter-spacing: -0.02em; }
.meal-picker > p { margin: -3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.meal-options { display: grid; gap: 7px; }
.meal-option { width: 100%; min-height: 58px; display: grid; gap: 2px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); text-align: left; }
.meal-option strong { font-size: 14px; }
.meal-option span { color: var(--accent-strong); font-size: 12px; font-weight: 750; }
.meal-option small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.meal-option .meal-hours { color: var(--text); font-weight: 720; margin-top: 2px; }
.meal-rank { width: fit-content; padding: 2px 6px; border-radius: 999px; font-size: 10px; font-weight: 850; line-height: 1.25; }
.meal-rank.primary { background: var(--accent-soft); color: var(--accent-strong); }
.meal-rank.fallback { background: #eceff3; color: #4b5563; }
.meal-hours-status { width: fit-content; padding: 2px 6px; border-radius: 999px; font-weight: 800; }
.meal-hours-status.verified { background: #dcefe3; color: #1e6a43; }
.meal-hours-status.caution { background: #fff0d6; color: #8a590d; }
.meal-option.selected { border: 2px solid var(--accent); background: var(--accent-soft); }
.meal-selected { display: flex; flex-wrap: wrap; gap: 7px 10px; align-items: center; padding-top: 2px; color: var(--accent-strong); font-size: 13px; }
.meal-hours-selected { flex-basis: 100%; color: var(--text); font-weight: 720; }
.meta-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.tag { padding: 5px 8px; border-radius: 8px; background: var(--surface-soft); color: var(--accent-strong); font-size: 11px; font-weight: 800; }
.place-link { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 850; text-decoration: underline; text-underline-offset: 3px; }

.map-toolbar { display: grid; gap: 11px; margin-bottom: 12px; }
.map-shell { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
#trip-map { height: min(62dvh, 610px); min-height: 390px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 12px 14px; color: var(--muted); font-size: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-line { width: 22px; height: 4px; border-radius: 3px; background: var(--accent); }
.legend-line.walk { background: repeating-linear-gradient(90deg, var(--warm) 0 3px, transparent 3px 8px); }
.legend-line.transit { background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 15px); }
.legend-line.ferry { background: repeating-linear-gradient(90deg, #2f74a6 0 16px, transparent 16px 22px); }
.legend-line.car { background: #735c9e; }
.sequence-marker-wrap { border: 0; background: transparent; }
.sequence-marker { width: 34px; height: 34px; display: grid; place-items: center; border: 3px solid var(--surface); border-radius: 50%; background: var(--accent); color: #f5f7f4; box-shadow: 0 3px 10px rgba(9, 51, 51, 0.28); font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; }
.map-empty { min-height: 390px; display: grid; place-items: center; padding: 30px; color: var(--muted); text-align: center; }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.map-popup h3 { margin: 0 0 5px; }
.map-popup button { margin-top: 7px; }

.day-section { margin-bottom: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.day-section summary { list-style: none; padding: 17px; cursor: pointer; }
.day-section summary::-webkit-details-marker { display: none; }
.day-summary-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.day-summary-line strong { font-size: 18px; letter-spacing: -0.025em; }
.day-summary-line span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.day-section summary p { margin: 7px 0 0; color: var(--muted); line-height: 1.45; }
.day-section[open] summary { background: var(--accent-soft); }
.day-events { padding: 5px 17px 15px; }
.day-event { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.day-event:last-child { border-bottom: 0; }
.day-event time { color: var(--accent); font-weight: 850; font-size: 12px; }
.day-event h4 { margin: 0 0 4px; }
.day-event p { margin: 0; color: var(--muted); line-height: 1.45; }

.ride-section { margin-top: 18px; }
.ride-section > .section-heading { margin-top: 0; }
.ride-list { display: grid; gap: 10px; }
.ride-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ride-card-top { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; }
.ride-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #f5f7f4; font-size: 12px; font-weight: 900; }
.ride-places { font-weight: 850; line-height: 1.4; }
.ride-mode { display: block; margin: 10px 0 6px 36px; color: var(--accent); }
.ride-steps { margin: 0 0 10px 36px; padding-left: 17px; color: var(--muted); line-height: 1.55; }
.ride-steps li + li { margin-top: 4px; }
.ride-alternative { margin: 0; padding: 10px; border-radius: 10px; background: var(--surface-soft); color: var(--muted); line-height: 1.5; }
.ride-alternative strong { color: var(--text); }
.ride-meta { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.route-source { color: var(--accent); font-size: 12px; font-weight: 800; text-underline-offset: 3px; }
.taxi-guide { margin-bottom: 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); overflow: hidden; }
.taxi-guide summary { padding: 12px 14px; cursor: pointer; color: var(--accent-strong); font-weight: 850; }
.taxi-guide-list { padding: 0 14px 14px; display: grid; gap: 9px; }
.taxi-guide-item { padding-top: 9px; border-top: 1px solid var(--line); }
.taxi-guide-item p { margin: 4px 0 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.fare-guide { margin-bottom: 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); overflow: hidden; }
.fare-guide summary { padding: 12px 14px; cursor: pointer; color: var(--accent-strong); font-weight: 850; }
.fare-guide-list { padding: 0 14px 14px; display: grid; gap: 6px; }
.fare-guide-list p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.fare-warning { padding-top: 5px; color: var(--warm); font-size: 12px; line-height: 1.45; }
.day-section .ride-section { padding: 0 17px 17px; }
.day-section .ride-section .section-heading { margin-top: 8px; }

.itinerary-shell { display: grid; gap: 14px; }
.itinerary-day-list { display: flex; gap: 8px; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
.itinerary-day-list::-webkit-scrollbar { display: none; }
.itinerary-list-label { display: none; }
.itinerary-day-button { min-width: 108px; display: grid; gap: 3px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted); text-align: left; }
.itinerary-day-button strong { color: var(--text); font-size: 14px; line-height: 1.3; }
.itinerary-day-button small { color: var(--muted); font-size: 11px; }
.itinerary-day-number, .itinerary-detail-kicker { color: var(--accent-strong); font-size: 11px; font-weight: 850; }
.itinerary-day-button.active { border: 2px solid var(--accent); padding: 10px 11px; background: var(--accent-soft); }
.itinerary-detail { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.itinerary-detail-heading { margin-bottom: 16px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.itinerary-detail-heading h3 { margin: 4px 0 0; font-size: clamp(24px, 5vw, 32px); letter-spacing: -0.04em; }
.itinerary-detail-heading p { margin: 7px 0 0; color: var(--muted); line-height: 1.55; }
.itinerary-detail-heading .itinerary-detail-kicker { margin: 0; }

.optional-plan-warning, .map-directions-note, .trip-prep-note { margin: 6px 0 10px; padding: 10px 11px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; font-weight: 750; line-height: 1.45; }
.trip-prep-disclosure, .map-directions { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.trip-prep-disclosure > summary, .map-directions > summary { padding: 13px 14px; cursor: pointer; color: var(--accent-strong); font-weight: 850; }
.trip-prep-disclosure[open] > summary, .map-directions[open] > summary { border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.trip-prep-disclosure > :not(summary), .map-directions > :not(summary) { margin-left: 14px; margin-right: 14px; }
.map-directions > .ride-section { margin-bottom: 14px; }
.viewer-notice { margin-top: 8px !important; color: inherit !important; font-weight: 750; }

.travel-tip { margin-top: 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.travel-tip > summary { padding: 15px 16px; cursor: pointer; color: var(--accent-strong); font-weight: 850; }
.travel-tip[open] > summary { border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.travel-tip-content { padding: 14px 16px 16px; }
.travel-tip-list { display: grid; gap: 10px; margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.58; }
.travel-tip-list li::marker { color: var(--accent); }
.travel-tip-sources { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

.progress-panel { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius); background: var(--accent); color: #f5f7f4; }
.progress-number { font-size: 34px; font-weight: 900; letter-spacing: -0.05em; }
.progress-panel p { margin: 2px 0 0; color: #d4e8e5; }
.check-group { margin-top: 21px; }
.check-group h3 { margin: 0 0 9px; color: var(--muted); font-size: 13px; }
.check-list { display: grid; gap: 8px; }
.check-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.check-row input { width: 21px; height: 21px; accent-color: var(--accent); }
.check-row label { line-height: 1.4; font-weight: 680; }
.check-scope { color: var(--muted); font-size: 11px; }
.check-row.done label { color: var(--muted); text-decoration: line-through; }
.custom-check-form, .weather-forecast, .optional-plans { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.custom-check-form h3, .weather-forecast h3, .optional-plans h3 { margin: 0; letter-spacing: -0.03em; }
.custom-check-form > p, .weather-disclaimer, .optional-plan-card > p, .weather-clothing { color: var(--muted); font-size: 13px; line-height: 1.5; }
.custom-check-form form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 11px; }
.custom-check-form input { min-width: 0; padding: 11px 12px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 11px; }
.custom-check-delete { padding: 7px 9px; border: 1px solid #d8aaa3; border-radius: 9px; background: var(--surface); color: #9d2f23; font-size: 12px; font-weight: 800; }
.weather-forecast { background: var(--surface-soft); }
.weather-day-list { display: flex; gap: 9px; margin: 12px -14px 2px; padding: 0 14px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.weather-day-card { min-width: 126px; flex: 0 0 126px; display: grid; gap: 4px; padding: 11px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 12px; }
.weather-day-card span, .weather-day-card small { color: var(--muted); }
.weather-temp { color: var(--accent-strong) !important; font-weight: 850; font-size: 15px; }
.weather-clothing { margin: 10px 0 6px; }.weather-clothing strong { color: var(--text); }
.weather-disclaimer { margin: 6px 0 9px; color: var(--warm); font-size: 12px; }
.optional-plans { background: var(--surface-soft); }
.optional-plan-card { margin-top: 10px; padding: 13px; border: 1px dashed var(--accent); border-radius: 13px; background: var(--surface); }
.optional-plan-card h4 { margin: 0; font-size: 16px; }
.optional-plan-card .timeline { margin-top: 10px; }
.optional-plan-card .day-events { margin-top: 8px; padding: 0; }
.optional-plan-card .day-event:last-child { border-bottom: 0; }

.sheet-dialog { width: min(calc(100% - 24px), 520px); max-height: 88dvh; padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow); overflow: auto; }
.sheet-dialog::backdrop { background: rgba(3, 22, 22, 0.58); backdrop-filter: blur(3px); }
.dialog-close { position: sticky; top: 10px; z-index: 2; float: right; margin: 10px 10px 0 0; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 800; }
.place-photo { width: 100%; aspect-ratio: 16 / 10; display: block; object-fit: cover; background: var(--surface-soft); }
.place-copy, .account-content { padding: 20px; }
.place-copy h2, .account-content h2 { margin: 0 0 4px; font-size: 28px; letter-spacing: -0.04em; }
.place-copy .local-name { color: var(--muted); }
.place-copy .description { margin: 17px 0; line-height: 1.6; }
.place-price { margin: 17px 0; padding: 15px; border-radius: 13px; background: var(--accent-soft); }
.place-guide { margin: 17px 0; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #f7f9fb; }
.place-guide h3 { margin: 0 0 7px; font-size: 16px; }
.place-guide p { margin: 7px 0; line-height: 1.55; }
.guide-points { margin: 9px 0; padding-left: 19px; }
.guide-points li { margin: 6px 0; line-height: 1.5; }
.guide-prompt { font-weight: 700; color: var(--ink); }
.price-label { margin: 0 0 3px; color: var(--accent-strong); font-size: 12px; font-weight: 800; }
.price-value { display: block; color: var(--accent-strong); font-size: 24px; letter-spacing: -0.03em; }
.price-order, .price-note, .price-warning { margin: 10px 0 0; line-height: 1.5; }
.price-note { color: var(--muted); font-size: 13px; }
.price-warning { color: var(--warm); font-size: 12px; font-weight: 750; }
.price-tag { text-decoration: none; }
.place-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-context { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.photo-credit { margin-top: 12px; color: var(--muted); font-size: 11px; }
.account-meta { margin: 16px 0; padding: 14px; border-radius: 13px; background: var(--surface-soft); }
.account-form { display: grid; gap: 14px; margin: 12px 0 20px; }
.account-actions { display: grid; gap: 9px; margin-top: 16px; }
.invite-result { margin-top: 14px; padding: 13px; border-radius: 12px; background: var(--accent-soft); word-break: break-all; }
.invite-result strong { display: block; margin-bottom: 5px; }

.toast-region { position: fixed; top: 82px; left: 50%; z-index: 1000; transform: translateX(-50%); width: min(calc(100% - 28px), 430px); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 12px 14px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-weight: 700; }
.loading-block { min-height: 55dvh; display: grid; place-items: center; color: var(--muted); }
.offline-banner { margin-bottom: 12px; padding: 12px 14px; border-radius: 12px; background: #f3dfd8; color: #6f2b20; font-weight: 750; }
.empty-state { padding: 30px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

@media (min-width: 760px) {
  .view { padding: 25px 28px 40px; }
  .today-layout { display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr); gap: 24px; align-items: start; }
  .today-layout .hero-column { position: sticky; top: 96px; }
  .day-strip { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .itinerary-shell { grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .itinerary-day-list { position: sticky; top: 98px; display: grid; gap: 7px; margin: 0; padding: 0; overflow: visible; }
  .itinerary-list-label { display: block; margin: 0 0 3px; color: var(--muted); font-size: 12px; font-weight: 800; }
  .itinerary-day-button { width: 100%; min-width: 0; }
  .itinerary-detail { padding: 22px; }
  .itinerary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .breakfast-menu-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
  .breakfast-menu-card { width: auto; min-width: 0; flex-basis: auto; }
  .day-section { margin: 0; }
  .bottom-nav { left: auto; right: 18px; bottom: 18px; transform: none; width: auto; min-height: 62px; grid-template-columns: repeat(4, 112px); padding: 6px; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
  .app-shell { padding-bottom: 40px; }
  .nav-button { grid-template-columns: auto auto; gap: 8px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111817;
    --surface: #192322;
    --surface-soft: #203330;
    --text: #e8efed;
    --muted: #9aaba8;
    --line: #334542;
    --accent: #64aaa4;
    --accent-strong: #b9e0dc;
    --accent-soft: #203c39;
    --warm: #e77b58;
    --shadow: 0 16px 42px rgba(0, 0, 0, 0.3);
  }
  .auth-screen { background: linear-gradient(155deg, #123f41 0 42%, #183638 42% 58%, #111817 58%); }
  .button.primary, .avatar-button, .hero-panel, .progress-panel { color: #0b2221; }
}

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