/* 3초 여행 — 디자인 기준(글자·여백·카드·버튼 상태)
 *
 * 다른 스타일시트 뒤에 불러와 화면 전체의 기준값을 한곳에서 맞춘다.
 *  · 좌우 여백  모바일 16 · 태블릿 24 · 데스크톱 32
 *  · 컨테이너  목록·홈 최대 1120 · 여행 만들기 폼 최대 720
 *  · 섹션 간격  모바일 30 · 데스크톱 44 / 섹션 제목→첫 카드 14
 *  · 카드 사이  모바일 12 · 데스크톱 18 / 카드 안 여백 14–16
 *  · 글자  본문 15(줄높이 1.55) · 보조 12–14 · 카드 제목 16 · 섹션 제목 20 · 페이지 제목 22–28
 *  · 누르는 곳 최소 44×44
 */

:root {
  --c-text-mute: #6B727C;          /* 작은 회색 글자도 흰 배경에서 4.5:1 이상 */
  --space-section: 30px;
  --gap-card: 12px;
  --radius-card: 16px;
  --touch: 44px;
}
@media (max-width: 359px) { :root { --app-side-padding: 16px; } }
@media (min-width: 768px) { :root { --app-side-padding: 24px; } }
@media (min-width: 1024px) { :root { --app-side-padding: 32px; --space-section: 44px; --gap-card: 18px; } }

/* ===== 글자 ===== */
body { font-size: 15px; line-height: 1.55; }
.page-title { font-size: clamp(22px, 5.6vw, 28px); line-height: 1.25; }
.section-title { font-size: 20px; line-height: 1.3; }
.hero-title { line-height: 1.2; }
.page-sub, .section-sub, .form-hint, .tool-note { font-size: 13.5px; line-height: 1.55; }
.nowrap { white-space: nowrap; }

/* ===== 여백 ===== */
.section-block { margin: var(--space-section) 0; }
.section-head { margin-bottom: 14px; }
.form-row { margin-bottom: 22px; }
.form-label { display: block; margin-bottom: 7px; }

/* 여행 만들기 폼은 읽기 좋은 폭(720)으로 가운데 */
@media (min-width: 800px) {
  #createTripPage .page-scroll { padding-inline: max(var(--app-side-padding), calc((100% - 720px) / 2)); }
}

/* ===== 로고 — 휴대폰에서는 작은 영문 태그라인을 잘라 내고 글자만 크게 ===== */
@media (max-width: 767px) {
  .topbar-brand-logo {
    height: 26px; width: auto; max-height: none;
    aspect-ratio: 742 / 120;
    object-fit: cover; object-position: top;
  }
}

/* ===== 여행 코스 카드 — 사진(고정 비율) + 읽기 쉬운 본문 ===== */
.roadmap-grid {
  gap: var(--gap-card);
  /* 최대 4열, 카드 최소 136px — 휴대폰 2열, 아주 좁거나 확대하면 1열 */
  grid-template-columns: repeat(auto-fill, minmax(max(min(100%, 136px), calc((100% - 3 * var(--gap-card)) / 4)), 1fr)) !important;
}
.roadmap-list {
  display: grid !important;
  gap: var(--gap-card);
  /* 추천 목록 — 카드 최소 240px 기준으로 1·2·3열 */
  grid-template-columns: repeat(auto-fill, minmax(max(min(100%, 240px), calc((100% - 2 * var(--gap-card)) / 3)), 1fr));
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  scroll-snap-type: none;
}
.roadmap-card,
.roadmap-list > .roadmap-card,
#exploreGrid .roadmap-card:nth-child(5n+1) {
  grid-column: auto !important;
  aspect-ratio: auto !important;
  height: auto !important;
  flex: none !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--c-surface) !important;
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-align: left;
}
.roadmap-card::before { display: none !important; }
.roadmap-grid .roadmap-card { animation: none !important; }   /* 반쯤 투명하게 보이던 등장 효과 제거 */
.rc-media {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 10px;
  background-size: cover !important;
  background-position: center !important;
}
.roadmap-list .rc-media { aspect-ratio: 16 / 9; }
.rc-media .rc-top { display: flex; gap: 6px; flex-wrap: wrap; }
.roadmap-card .rc-bottom { padding: 12px 14px 14px; gap: 3px; flex: 1; }
.roadmap-card .rc-place { color: var(--c-text-soft); opacity: 1; font-size: 12.5px; font-weight: 600; }
.roadmap-card .rc-title { color: var(--c-text); text-shadow: none; font-size: 16px; line-height: 1.3; }
.roadmap-card .rc-info { color: var(--c-text-soft); opacity: 1; font-size: 13px; margin-top: 2px; }
.roadmap-card .rc-bottom .rc-likes {
  background: none !important; padding: 0; margin-top: auto; padding-top: 6px;
  color: var(--c-text-soft); font-size: 12.5px; font-weight: 600;
}
.rc-sample, .rc-reason { font-size: 12px; }

/* ===== 작은 글자 최소 크기와 대비 ===== */
.tab-button, .tab-fab-button { font-size: 12px; }
.tab-button { color: var(--c-text-soft); }
.sample-badge, .edited-badge, .sc-flag, .schedule-card-meta-line .schedule-category,
.schedule-price-tag, .form-label-meta, .book-estimate, .meta-pill { font-size: 12px; }

/* ===== 누르는 곳 최소 44px ===== */
.chip, .chip-mini, .section-more, .btn-text, .sort-tab, .edit-button, .move-btn,
.search-submit, .setting-row, .sc-more summary, .view-toggle button, .star, .action-btn {
  min-height: var(--touch);
}
.icon-btn, .move-btn, .star { min-width: var(--touch); }
.section-more, .btn-text { display: inline-flex; align-items: center; }
.sheet-head .icon-btn { width: var(--touch); height: var(--touch); }

/* ===== 버튼 — 기본·선택·초점·비활성·로딩 ===== */
.btn { min-height: var(--touch); }
.btn:focus-visible, .chip:focus-visible, .action-btn:focus-visible, .btn-text:focus-visible,
.roadmap-card:focus-visible, .day-chip:focus-visible, .search-submit:focus-visible {
  outline: 2px solid var(--c-focus); outline-offset: 2px;
}
.btn:disabled, .btn[aria-disabled="true"], .action-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"]::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  border-radius: 50%; border: 2px solid currentColor; border-color: var(--c-text-soft) transparent var(--c-text-soft) transparent;
  animation: btn-spin .8s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn[aria-busy="true"]::after { animation: none; } }
.chip.is-active, .chip[aria-pressed="true"] { font-weight: 700; }

/* ===== 시트 — 제목·닫기·내용·확정 같은 구조 ===== */
.sheet-head h2, .sheet-head h3 { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.3; }

/* ===== 금액 행 — 항목 왼쪽, 숫자 오른쪽 정렬, 합계 강조 ===== */
.money-row dd { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.money-row--total dt, .money-row--total dd { font-size: 16px; font-weight: 800; }

/* 점검 후 보정 */
:root { --c-text-mute: #646B75; }                       /* 연한 배경(#F5F6F8)에서도 4.5:1 이상 */
.search-card .search-submit, .btn-edit { min-height: var(--touch); }
.btn-edit { padding-inline: 16px; }
/* 별점 — 흰 배경에서 그래픽 대비 3:1 이상 */
.rv-stars, .review-item .rv-stars, .review-preview .rv-stars, .mlc-stars { color: #8A5A00 !important; }   /* 흰 바탕 6:1 */
.star-row .star { color: #737A84; }   /* 빈 별도 회색 카드 위 3:1 이상 */
.star-row .star.is-on, .star-row .star.hov { color: #8A5A00; }

/* 확대를 허용했으므로 iPhone 이 입력칸을 누를 때 자동 확대하지 않도록 16px */
@media (max-width: 767px) { input, select, textarea, .form-input { font-size: 16px !important; } }

/* 확대 200%(폭 약 195px)에서도 가로로 넘치지 않게 — 버튼 줄·별점은 줄바꿈 */
.tool-actions, .roadmap-cta-row, #roadmapDetailPage .roadmap-cta-row, .star-row, .mlc-actions, .schedule-actions { flex-wrap: wrap; }
#roadmapDetailPage .roadmap-cta-row .btn { flex: 1 1 auto; }
.btn { white-space: normal; }
@media (max-width: 299px) { .tool-form, .tool-actions { grid-template-columns: 1fr; } }
.tool-row { grid-template-columns: 1fr auto var(--touch); }
.tool-remove { width: var(--touch); height: var(--touch); }
.tool-check { min-height: var(--touch); }

/* 경비 기록 */
.exp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; margin: 8px 0 10px; }
.exp-field .form-label { margin-bottom: 4px; font-size: 13px; }
.exp-row small { color: var(--c-text-soft); font-size: 12px; }
.exp-cats { margin-top: 10px; }
.exp-settle { margin-top: 10px; font-size: 14px; }
.exp-settle p { margin: 2px 0; }
.exp-settle-h { font-weight: 700; }
@media (max-width: 299px) { .exp-form { grid-template-columns: 1fr; } }

/* 여행 중 보기 */
.now-next { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--c-text); color: var(--c-bg); }
.now-next[hidden] { display: none; }
.nn-head { margin: 0 0 8px; font-size: 13px; opacity: .85; }
.nn-head strong { opacity: 1; }
.nn-row { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; }
.nn-label { flex: 0 0 auto; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.16); }
.nn-place { display: flex; flex-direction: column; min-width: 0; }
.nn-place strong { overflow-wrap: anywhere; }
.nn-place small { font-size: 12.5px; opacity: .8; }
.nn-done { margin: 4px 0; }
.nn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.now-next .btn-soft { background: rgba(255,255,255,.14); color: inherit; border-color: transparent; }
.now-next .btn-text { color: inherit; text-decoration: underline; }

/* 고정·다녀옴 */
.pin-btn, .visit-btn {
  min-height: var(--touch); min-width: var(--touch); padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--c-border); background: var(--c-surface); font-size: 12.5px; font-weight: 700; color: var(--c-text-soft);
}
.pin-btn.is-on, .visit-btn.is-on { background: var(--c-text); color: var(--c-bg); border-color: var(--c-text); }
.pin-badge, .visited-badge { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-text); }
.schedule-card.is-visited { background: var(--c-surface-2); }
.schedule-card.is-visited .schedule-place-name { color: var(--c-text-soft); }

/* 오프라인 안내 */
.offline-banner {
  margin: 0; padding: 8px var(--app-side-padding); font-size: 13px; line-height: 1.5;
  background: #F6EFD9; color: #4A3A0B; text-align: center;
}
.offline-banner[hidden] { display: none; }

/* 화면 전환 때 초점을 받는 제목은 누를 수 있는 요소가 아니므로 초점 테두리를 그리지 않는다 */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus, .page-title[tabindex="-1"]:focus { outline: none; box-shadow: none; }

/* ===================== 모바일 2차 — 320~430px ===================== */
:root { --phone-gap: 12px; }

/* 공통 터치 대상 */
.topbar-back { width: var(--touch); height: var(--touch); }
.city-clear { width: 36px; height: 36px; right: 4px; }
.city-clear::after { content: ''; position: absolute; inset: -4px; }    /* 누르는 면은 44px */
.btn-text { min-width: var(--touch); padding: 0 8px; justify-content: center; }
.form-details > summary, .budget-more > summary, .budget-why > summary, .dest-advanced > summary { min-height: var(--touch); display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check-row { min-height: var(--touch); }
.search-card input[type="search"] { align-self: stretch; min-height: var(--touch); }
.budget-input { min-height: 56px; }

/* 하단 메뉴: 활성 탭은 아이콘과 글자 모두로 */
.tab-button.is-active .tab-ico { stroke-width: 2.6; }
.tab-button.is-active .tab-ico path, .tab-button.is-active .tab-ico circle, .tab-button.is-active .tab-ico rect, .tab-button.is-active .tab-ico polygon { fill: color-mix(in srgb, currentColor 14%, transparent); }

/* 마이: 게스트 안내 두 줄까지 */
.profile-email { white-space: normal; overflow: hidden; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.45; }
.profile-info { min-width: 0; flex: 1; }

/* 결과: 도구 줄과 점검 버튼 */
.schedule-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 10px; }
.schedule-toolbar[hidden] { display: none; }
.schedule-toolbar .view-toggle { margin: 0; }
.checks-btn {
  min-height: var(--touch); padding: 0 12px; border-radius: 12px; border: 1px solid var(--c-border);
  background: var(--c-surface); font-size: 13px; font-weight: 700; color: var(--c-text-soft); margin-left: auto;
}
.checks-btn.is-warn { color: #9A3624; border-color: #F0C9C0; background: #FDF3F1; }
.budget-why { margin-top: 8px; font-size: 13.5px; }
.budget-why summary { color: var(--c-text-soft); font-weight: 600; }
.tools-section { margin: var(--space-section) 0; }
.tools-section[hidden] { display: none; }
.tools-section > .section-sub { margin-top: 4px; }
.rc-reason-line { font-size: 12.5px; font-weight: 600; color: var(--c-blue); margin-top: 2px; }
.day-chip-cost { font-size: 12.5px; }

@media (max-width: 479px) {
  .section-block { margin: 26px 0; }
  .page-header { margin: 4px 0 10px; }

  /* 홈 히어로: 장식을 빼고 제목·설명·버튼만 */
  .hero-card { padding: 18px 16px; gap: 12px; border-radius: 20px; }
  .hero-title { font-size: 24px; margin: 0 0 6px; }
  .hero-sub { font-size: 14px; line-height: 1.5; }
  .hero-cta { min-height: var(--touch); padding: 0 16px; font-size: 14.5px; }
  .hero-route, .hero-aurora { display: none; }
  .search-card { min-height: 48px; margin: 12px 0 4px; }
  .home-subh { margin: 12px 0 6px; font-size: 13px; }
  /* 스타일 칩은 한 줄로 밀어 보기 — 오른쪽이 흐려져 다음 항목이 있음을 알린다 */
  .home-styles {
    flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none;
    margin-right: calc(-1 * var(--app-side-padding)); padding-right: 28px;
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
  }
  .home-styles::-webkit-scrollbar { display: none; }
  .home-styles .chip { flex: 0 0 auto; }
  .section-head { margin-bottom: 10px; }
  .section-title { font-size: 19px; }

  /* 여행 만들기: 머리글·진행 표시 압축, 인기 도시는 글자 칩 */
  #createTripPage .page-header .page-sub { display: none; }
  #createTripPage .page-title { font-size: 22px; }
  .step-progress { margin: 10px 0 14px; }
  .step-dot { width: 28px; height: 28px; font-size: 13px; }
  .step-dot span { font-size: 12px; }
  .step-h { font-size: 18px; margin-bottom: 12px; }
  .draft-banner { padding: 8px 12px; font-size: 13px; }
  .dest-quick { display: flex !important; flex-wrap: wrap; gap: 8px; }
  .dest-quick button {
    min-height: var(--touch) !important; padding: 0 14px !important; align-items: center !important;
    background: var(--c-surface) !important; color: var(--c-text) !important; border: 1px solid var(--c-border);
    border-radius: 999px !important; font-size: 14px; font-weight: 600;
  }
  .dest-quick button.is-active { background: var(--c-text) !important; color: var(--c-bg) !important; border-color: var(--c-text); }
  .budget-input { font-size: 30px; }

  /* 결과: 첫 화면에 첫 장소까지 — 금액 세 개는 한 줄, 조정 방법은 옆으로 넘기기 */
  .schedule-head .page-title { font-size: 22px; }
  .schedule-actions { width: 100%; }
  .action-btn { flex: 1 1 0; justify-content: center; padding: 0 8px; }
  .save-status { margin: 4px 0 8px; font-size: 12.5px; }
  .budget-panel { padding: 12px; }
  .money-rows--panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .money-rows--panel .money-row { flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; border: 0; }
  .money-rows--panel .money-row dt { font-size: 12px; color: var(--c-text-soft); }
  .money-rows--panel .money-row dt small { display: block; font-size: 11.5px; }
  .money-rows--panel .money-row dd { font-size: 15px !important; font-weight: 800; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .budget-alts { display: flex !important; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 10px calc(-1 * 12px) 0; padding: 0 12px; flex-wrap: nowrap; }
  .budget-alts[hidden] { display: none !important; }
  .budget-alts::-webkit-scrollbar { display: none; }
  .budget-alts-title { flex: 0 0 100%; display: none; }
  .budget-alt { flex: 0 0 auto; width: auto; min-width: 150px; max-width: 220px; padding: 8px 12px; }
  .budget-alt-detail { display: none; }
  .budget-alt-label { font-size: 14px; }
  .day-row { margin-top: 6px; }
}

/* 2열이 들어갈 폭(380~767px): 세로 카드 2열, 사진은 낮게 */
@media (min-width: 380px) and (max-width: 767px) {
  .rc-media { aspect-ratio: 16 / 10; }
}
/* 좁은 폭(379px 이하): 한 줄 가로 카드 — 도시·코스명·기간·스타일을 먼저 */
@media (max-width: 379px) {
  .roadmap-grid, .roadmap-list { grid-template-columns: 1fr !important; }
  .roadmap-card, .roadmap-list > .roadmap-card, #exploreGrid .roadmap-card:nth-child(5n+1) { flex-direction: row !important; align-items: stretch; }
  .rc-media { aspect-ratio: auto !important; width: 96px; flex: 0 0 96px; min-height: 104px; padding: 6px; }
  .roadmap-card .rc-bottom { padding: 10px 12px; }
  .roadmap-card .rc-title { font-size: 15px; }
}
/* 탐색 결과: 1열(좁은 폭) → 2열(380px 이상) → 4열(768px 이상) */
@media (min-width: 380px) and (max-width: 767px) {
  #exploreGrid, #popularRoadmaps { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
.explore-state { margin: 0 0 10px; font-size: 13px; color: var(--c-text-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.explore-state[hidden] { display: none; }

@media (max-width: 479px) {
  .budget-alt { display: flex; flex-direction: column; justify-content: center; min-height: var(--touch); padding: 4px 12px; gap: 0; }
  .budget-alt-label, .budget-alt-total { white-space: nowrap; }
  .budget-alt-total { font-size: 12px; }
  .budget-why { margin-top: 4px; }
  .money-rows--panel .money-row dd { font-size: 16px !important; }
  .save-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 359px) {
  .action-btn svg { display: none; }
  .action-btn { font-size: 13px; padding: 0 6px; }
}

.budget-meta { margin: 6px 0 0; font-size: 12.5px; color: var(--c-text-soft); }
.budget-meta[hidden], .budget-meta:empty { display: none; }
.cost-why-h { margin: 14px 0 4px; font-size: 14px; font-weight: 800; }
.day-row { display: flex; align-items: center; gap: 8px; }
.day-row .day-chips { flex: 1 1 auto; min-width: 0; }
.day-row .checks-btn { flex: 0 0 auto; margin-left: 0; }
@media (max-width: 479px) {
  .budget-panel { padding: 12px; }
  .money-rows--panel { gap: 4px; }
  .budget-alts { margin-top: 8px; }
  .day-chip { padding: 6px 10px; }
  .schedule-toolbar { margin: 8px 0; }
}
@media (max-width: 479px) {
  .money-rows--panel { grid-template-columns: auto auto auto; justify-content: space-between; column-gap: 8px; }
  .money-rows--panel .money-row dd { font-size: 15px !important; white-space: nowrap; word-break: keep-all; }
}

/* 인원·객실 +/− 버튼도 44px */
.stepper button { width: var(--touch); height: var(--touch); }

/* 가로로 눕힌 휴대폰(높이 500px 이하): 폭은 넓어도 세로가 짧으므로 머리글·히어로·하단 메뉴를 낮춘다 */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --nav-h: 56px; --topbar-h: 44px; }
  .topbar-brand-logo { height: 26px; width: auto; aspect-ratio: 742 / 120; object-fit: cover; object-position: top; max-height: none; }
  .hero-card { min-height: 0 !important; padding: 16px 20px !important; gap: 10px; }
  .hero-greet, .hero-route, .hero-aurora, .hero-preview { display: none !important; }
  .hero-title { font-size: 24px !important; margin: 0 0 4px; }
  .hero-text { max-width: 100% !important; }
  .tab-button, .tab-fab-button { height: var(--nav-h) !important; }
  .tab-fab-button { flex-direction: row !important; align-items: center !important; justify-content: center; gap: 6px; padding-bottom: 0 !important; }
  .tab-fab-button .fab-plus { width: 40px; height: 40px; margin: 0; font-size: 24px; }
  .tab-button { flex-direction: row; gap: 6px; }
}

/* 확대 200%(폭 260px 이하): 인원 줄은 위아래로, 금액 세 개는 한 줄씩 */
@media (max-width: 260px) {
  .stepper-row { flex-wrap: wrap; gap: 6px; }
  .money-rows--panel { grid-template-columns: 1fr !important; }
  .money-rows--panel .money-row { flex-direction: row !important; justify-content: space-between; }
}
/* 넓은 화면: 예산 조정 방법은 칸으로 */
@media (min-width: 480px) {
  .budget-alts:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
  .budget-alts .budget-alts-title { grid-column: 1 / -1; }
}

/* ===== 데스크톱 3차: 첫 화면에 인기 코스의 도시·기간까지 보이게 ===== */
@media (min-width: 1024px) {
  #homePage .hero-card { min-height: 0 !important; padding: 28px 40px; }
  #homePage .hero-card h1, #homePage .hero-title { font-size: clamp(30px, 2.6vw, 38px); }
  #homePage .search-card { margin-top: 12px; }
  #homePage .home-subh { margin-top: 14px; }
  #homePage .section-block:first-of-type { margin-top: 28px; }
  .roadmap-grid .rc-media { aspect-ratio: 16 / 7; }
}
/* 높이가 낮은 데스크톱 창(노트북 1366×768 등) */
@media (min-width: 1024px) and (max-height: 820px) {
  #homePage .hero-card .hero-preview, #homePage .hero-greet { display: none !important; }
  #homePage .hero-card { padding: 22px 36px !important; }
  #homePage .home-subh { margin-top: 10px; }
}

/* 데스크톱·태블릿: 시트와 입력 양식이 화면 끝까지 늘어나지 않게 */
@media (min-width: 768px) {
  .bottom-sheet { max-width: 640px; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  #bookingSheet { max-width: 760px; }
  .wizard-body, #createPage .page-scroll > form, .auth-form, #feedbackForm { max-width: 640px; margin-left: auto; margin-right: auto; }
}

/* ===== 예약 후보 시트 ===== */
#bookingFilters { flex-wrap: wrap; white-space: normal; overflow: visible; row-gap: 8px; }
.book-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px 10px; align-items: start; }
.book-row.is-selected { background: var(--c-surface-2); border-radius: 12px; }
.book-check-label { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; }
.book-check { -webkit-appearance: checkbox !important; appearance: auto !important; width: 22px; height: 22px; accent-color: var(--c-text); cursor: pointer; margin: 0; opacity: 1 !important; position: static !important; }
.book-badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-text-soft); vertical-align: 1px; }
.book-badge.is-booked { background: #E7F6EC; color: #17663A; }
.book-actions { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 6px; }
.book-actions .book-link { margin-top: 0; min-height: 44px; display: inline-flex; align-items: center; }
.book-mark { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--c-border, #E5E7EB); background: var(--c-surface); font-size: 13px; font-weight: 600; color: var(--c-text); cursor: pointer; }
.book-mark.is-on { background: #E7F6EC; border-color: #BFE5CC; color: #17663A; }
.book-ref { display: grid; gap: 4px; margin-top: 6px; max-width: 260px; }
.book-ref label { font-size: 12px; color: var(--c-text-soft); }
.book-saved { margin: 0 18px 10px; font-size: 13px; font-weight: 600; color: var(--c-text); }
.book-hint { margin: 0 0 8px; font-size: 12.5px; color: var(--c-text-soft); text-align: center; }
.book-hint.is-nudge { color: #B42318; font-weight: 600; }
#bookingConfirm[aria-disabled="true"] { opacity: .5; }
@media (max-width: 379px) {
  .book-row { grid-template-columns: 44px minmax(0, 1fr); }
  .book-row .book-price { grid-column: 2; text-align: left; }
  .book-row .book-price .book-estimate { text-align: left; }
}
@media (prefers-color-scheme: dark) {
  :root.allow-dark .book-badge.is-booked, :root.allow-dark .book-mark.is-on { background: #12361F; color: #8FE0AE; border-color: #1E5A33; }
}

/* ===== 비회원 저장 안내 · 로그인 안내 · 비밀번호 재설정 ===== */
.save-choice { display: grid; gap: 10px; padding: 4px 18px 12px; }
.save-opt { border: 1px solid var(--c-border, #E5E7EB); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; line-height: 1.55; color: var(--c-text-soft); }
.save-opt p { margin: 0; }
.save-opt.is-current { background: var(--c-surface-2); }
.save-opt-title { font-size: 15px; font-weight: 700; color: var(--c-text) !important; margin-bottom: 4px !important; }
.save-opt-tag { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--c-surface); border: 1px solid var(--c-border, #E5E7EB); color: var(--c-text-soft); margin-left: 6px; vertical-align: 1px; }
#saveChoiceSheet .sheet-foot { display: grid; gap: 8px; }
.auth-notice { margin: 0 auto 14px; max-width: 640px; padding: 10px 14px; border-radius: 12px; background: var(--c-surface-2); font-size: 13.5px; line-height: 1.5; color: var(--c-text); }
.auth-notice.is-error { background: #FEF3F2; color: #B42318; }
.auth-forgot { display: block; margin: 6px auto 0; min-height: 44px; font-size: 13.5px; color: var(--c-text-soft); text-decoration: underline; background: none; border: 0; cursor: pointer; }
.auth-reset-title { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
@media (prefers-color-scheme: dark) { :root.allow-dark .auth-notice.is-error { background: #3A1512; color: #FDA29B; } }
.social-btn.is-off { opacity: .55; } .social-off { font-weight: 500; font-size: 12.5px; }

/* ===== 설정: 테마(시스템/라이트/다크) · 알림 상태 · 초기화 안내 ===== */
:root.theme-dark {
  --c-primary: #EEF2F6; --c-primary-strong: #FFFFFF; --c-accent: #C9D3DE; --c-on-ink: #111418;
  --c-sky: #22303F; --c-mint: #2F4A66;
  --c-bg:        #111418;
  --c-surface:   #1A1E24;
  --c-surface-2: #22272E;
  --c-border:    #2E343C;
  --c-divider:   #262B32;
  --c-text:      #EEF2F6;
  --c-text-soft: #A9B1BB;
  --c-text-mute: #7A828C;
}
:root.theme-dark .book-badge.is-booked, :root.theme-dark .book-mark.is-on { background: #12361F; color: #8FE0AE; border-color: #1E5A33; }
:root.theme-dark .auth-notice.is-error { background: #3A1512; color: #FDA29B; }
.setting-row--block { display: grid !important; gap: 8px; align-items: start; justify-items: stretch; justify-content: stretch !important; cursor: default; }
.setting-row--block > * { width: 100%; }
.setting-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--c-text-soft); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--c-surface-2); }
.seg label { position: relative; display: flex; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { flex: 1; min-height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--c-text-soft); }
.seg input:checked + span { background: var(--c-surface); color: var(--c-text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg input:focus-visible + span { outline: 2px solid var(--c-text); outline-offset: 2px; }
.reset-panel { margin: 4px 0 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--c-border, #E5E7EB); background: var(--c-surface); font-size: 13px; line-height: 1.55; }
.reset-lead { margin: 0 0 8px; font-weight: 600; color: var(--c-text); }
.reset-h { margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--c-text-soft); }
.reset-list { margin: 0; padding-left: 18px; color: var(--c-text); }
.reset-list li + li { margin-top: 2px; }
.reset-warn { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: #FEF3F2; color: #B42318; font-weight: 600; }
:root.theme-dark .reset-warn { background: #3A1512; color: #FDA29B; }
.reset-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.btn-danger { background: #B42318; color: #fff; border: 0; min-height: 44px; border-radius: 12px; font-weight: 700; }
.pref-hint { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--c-surface-2); font-size: 13px; color: var(--c-text); }
.survey-count { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--c-text-soft); }
.fb-preview { margin-top: 8px; display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--c-border, #E5E7EB); border-radius: 12px; }
.fb-preview img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: var(--c-surface-2); }
.fb-preview-meta { display: grid; gap: 6px; font-size: 12.5px; color: var(--c-text-soft); min-width: 0; overflow-wrap: anywhere; }
.fb-preview-meta .btn { justify-self: start; min-height: 44px; }

/* 다크 모드(시스템 따름)에서도 진한 바탕 토큰을 뒤집는다 */
@media (prefers-color-scheme: dark) {
  :root.allow-dark {
  --c-primary: #EEF2F6; --c-primary-strong: #FFFFFF; --c-accent: #C9D3DE; --c-on-ink: #111418;
  --c-sky: #22303F; --c-mint: #2F4A66;
  }
}

/* 다크 모드: 손으로 칠한 밝은 면 */
:root.theme-dark .bottom-tab-nav { background: rgba(26,30,36,.96); border-top-color: var(--c-border); }
:root.theme-dark .day-chip.is-active .day-chip-cost { color: var(--c-on-ink); opacity: .8; }
:root.theme-dark .sub-toggle, :root.theme-dark .sub-cta, :root.theme-dark .sub-footnote, :root.theme-dark .sub-cancel-block { background: var(--c-surface-2); }
:root.theme-dark .sub-toggle-btn.is-on { background: var(--c-surface); color: var(--c-text); }
:root.theme-dark .book-cb { background: var(--c-surface); }
:root.theme-dark .setting-sub button.is-active { background: var(--c-surface); }
:root.theme-dark { --c-bg-soft: var(--c-surface-2); }
@media (prefers-color-scheme: dark) {
:root.allow-dark .bottom-tab-nav { background: rgba(26,30,36,.96); border-top-color: var(--c-border); }
:root.allow-dark .day-chip.is-active .day-chip-cost { color: var(--c-on-ink); opacity: .8; }
:root.allow-dark .sub-toggle, :root.allow-dark .sub-cta, :root.allow-dark .sub-footnote, :root.allow-dark .sub-cancel-block { background: var(--c-surface-2); }
:root.allow-dark .sub-toggle-btn.is-on { background: var(--c-surface); color: var(--c-text); }
:root.allow-dark .book-cb { background: var(--c-surface); }
:root.allow-dark .setting-sub button.is-active { background: var(--c-surface); }
:root.allow-dark { --c-bg-soft: var(--c-surface-2); }
}

/* 다크 모드: 대비 보정 */
:root.theme-dark .hero-cta { color: #111418; }
:root.theme-dark .sub-badge--accent { color: var(--c-on-ink); }
:root.theme-dark .budget-alt-total, :root.theme-dark .budget-panel .is-over, :root.theme-dark .money-row .is-over, :root.theme-dark .budget-over-amt { color: #F97066; }
:root.theme-dark .book-hint.is-nudge { color: #F97066; }
:root.theme-dark .money-row--over dt, :root.theme-dark .money-row--over dd { color: #F97066; }
:root.theme-dark .money-row--under dd { color: #6CCF95; }
:root.theme-dark { --c-text-mute: #8F97A1; --c-blue: #86AEDC; --c-focus: #86AEDC; }
@media (prefers-color-scheme: dark) {
:root.allow-dark .hero-cta { color: #111418; }
:root.allow-dark .sub-badge--accent { color: var(--c-on-ink); }
:root.allow-dark .budget-alt-total, :root.allow-dark .budget-panel .is-over, :root.allow-dark .money-row .is-over, :root.allow-dark .budget-over-amt { color: #F97066; }
:root.allow-dark .book-hint.is-nudge { color: #F97066; }
:root.allow-dark .money-row--over dt, :root.allow-dark .money-row--over dd { color: #F97066; }
:root.allow-dark .money-row--under dd { color: #6CCF95; }
:root.allow-dark { --c-text-mute: #8F97A1; --c-blue: #86AEDC; --c-focus: #86AEDC; }
}

/* 다크 모드: 로고 글자색 뒤집기, 히어로 테두리 */
:root.theme-dark .topbar-brand-logo { filter: invert(1) hue-rotate(180deg); }
:root.theme-dark #homePage .hero-card { box-shadow: inset 0 0 0 1px var(--c-border); }
@media (prefers-color-scheme: dark) {
:root.allow-dark .topbar-brand-logo { filter: invert(1) hue-rotate(180deg); }
:root.allow-dark #homePage .hero-card { box-shadow: inset 0 0 0 1px var(--c-border); }
}

/* 네이버 버튼: 흰 글자가 읽히도록 브랜드 초록을 어둡게(#03C75A 2.3:1 → #00843D 4.9:1) */
.social-btn--naver { background: #00843D; }
/* 별점 — 다크 모드 */
:root.theme-dark .rv-stars, :root.theme-dark .mlc-stars { color: #E8B54A !important; }
:root.theme-dark .star-row .star { color: #7A828C; }
:root.theme-dark .star-row .star.is-on, :root.theme-dark .star-row .star.hov { color: #E8B54A; }
@media (prefers-color-scheme: dark) {
:root.allow-dark .rv-stars, :root.allow-dark .mlc-stars { color: #E8B54A !important; }
:root.allow-dark .star-row .star { color: #7A828C; }
:root.allow-dark .star-row .star.is-on, :root.allow-dark .star-row .star.hov { color: #E8B54A; }
}

/* ===== 서버 깨우기 안내 ===== */
.wake-banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h, 64px) + env(safe-area-inset-bottom, 0px) + 24px); z-index: 9000;
  display: flex; align-items: center; gap: 10px; max-width: min(92vw, 480px); padding: 10px 16px; border-radius: 999px;
  background: var(--c-primary); color: var(--c-on-ink); font-size: 13.5px; font-weight: 600; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.wake-banner[hidden] { display: none; }
@media (min-width: 1024px) { .wake-banner { bottom: 24px; } }   /* 데스크톱은 하단 메뉴가 없다 */
.wake-banner.is-error { background: #B42318; color: #fff; border-radius: 14px; }
.wake-spin { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: wakeSpin .8s linear infinite; }
@keyframes wakeSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wake-spin { animation: none; border-right-color: currentColor; opacity: .6; } }

/* ===== 일정 점검: 해결 필요 / 정보 확인 필요, 바로 가기, 시간 다시 맞추기 ===== */
.dc-group { margin: 10px 0 4px; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; }
.dc-group--warn { color: #B42318; }
.dc-group--check { color: var(--c-text-soft); }
.dc-jump { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 6px 0; min-height: 44px; font: inherit; color: inherit; cursor: pointer; }
.dc-jump:hover .dc-go, .dc-jump:focus-visible .dc-go { text-decoration: underline; }
.dc-go { font-weight: 700; color: var(--c-text-soft); }
.dc-fix { margin: 6px 0 2px; min-height: 44px; }
.schedule-card.is-flash { outline: 3px solid #F59E0B; outline-offset: 2px; transition: outline-color .3s; }
:root.theme-dark .dc-group--warn { color: #F97066; }
@media (prefers-color-scheme: dark) { :root.allow-dark .dc-group--warn { color: #F97066; } }

/* ===== 예산 대안: 조합 · 한도 변경 ===== */
.budget-alt.is-combo { border-color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-text); }
.budget-alt.is-combo .budget-alt-label::before { content: '추천 · '; font-weight: 800; }
.budget-alt.is-limit { border-style: dashed; }
.budget-alts-limit { margin-top: 6px; }
.ai-card { margin: 0 0 12px; padding: 14px 16px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; }
.ai-card-title { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--c-blue); }
.ai-card-text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--c-text); white-space: pre-wrap; }
.ai-card-note { margin: 0; font-size: 13.5px; color: var(--c-text-soft); }
.ai-card-redo { margin-top: 8px; min-height: 44px; }
.ai-card-retry { margin-top: 8px; min-height: 44px; }
.budget-alt.is-combo .budget-alt-detail { display: block !important; font-weight: 600; color: var(--c-text); }
.budget-alts-none { margin: 0 0 6px; font-size: 13px; color: var(--c-text-soft); }

/* ===== 날짜 탭: 탭은 한 줄 전체, 비용·점검은 아래 줄 ===== */
.day-row { display: block !important; }
.day-row .day-chips { display: flex; gap: 8px; overflow-x: auto; scroll-padding-inline: 16px; scrollbar-width: none; padding-bottom: 2px; }
.day-row .day-chips::-webkit-scrollbar { display: none; }
.day-row .day-chip { flex: 0 0 auto; min-height: 44px; }
.day-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.day-sub-cost { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--c-text-soft); font-variant-numeric: tabular-nums; }

/* 모션 감소: 도시 목록은 흐르지 않고 줄바꿈 — 복제 묶음은 숨긴다 */
@media (prefers-reduced-motion: reduce) {
  .city-marquee-track { animation: none !important; transform: none !important; flex-wrap: wrap; width: auto !important; gap: 8px; }
  .city-marquee-group[aria-hidden="true"] { display: none !important; }
  .city-marquee-group { flex-wrap: wrap; }
  .city-marquee { mask-image: none !important; -webkit-mask-image: none !important; }
}
.dc-drop { margin: 2px 0 6px; min-height: 44px; }

/* PDF(인쇄): 다크 테마여도 흰 종이에 검은 글자, 여백 */
@media print {
  @page { margin: 14mm 12mm; }
  html, body { background: #fff !important; color: #000 !important; }
  #printSheet, #printSheet * { color: #000 !important; background: transparent !important; }
  #printSheet .ps-addr, #printSheet .ps-sub, #printSheet .ps-cat { color: #444 !important; }
  #printSheet .ps-day { break-inside: auto; }
  #printSheet h2 { break-after: avoid-page; }
}
.exp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.exp-undo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: var(--c-surface-2); font-size: 13.5px; }
.exp-undo[hidden] { display: none; }
.tool-edit { min-height: 44px; min-width: 44px; padding: 0 8px; background: none; border: 0; color: var(--c-text-soft); font-weight: 600; text-decoration: underline; cursor: pointer; }

/* 달력 일요일 — 흰 바탕 5.6:1, 다크 바탕 5.9:1 */
.cal-cell.is-sun, .cal-w-sun { color: #C42B1C; }
:root.theme-dark .cal-cell.is-sun, :root.theme-dark .cal-w-sun { color: #F97066; }
@media (prefers-color-scheme: dark) {
  :root.allow-dark .cal-cell.is-sun, :root.allow-dark .cal-w-sun { color: #F97066; }
}
.rain-offer { display: grid; gap: 8px; margin-top: 10px; }
.rain-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; }
.rain-row .btn { min-height: 44px; }

/* 계정 삭제 */
.setting-danger > span:first-child { color: #B42318; font-weight: 600; }
:root[data-theme="dark"] .setting-danger > span:first-child { color: #FDA29B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .setting-danger > span:first-child { color: #FDA29B; } }
#deletePanel .form-label { display: block; margin: 12px 0 6px; font-size: 14px; }
#deletePanel .form-input { width: 100%; min-height: 44px; }

/* 꼭 갈 장소 확인 */
#mustResolve { margin-top: 8px; min-height: 44px; }
.must-list { display: grid; gap: 10px; margin-top: 10px; font-size: 14px; }
.must-row { display: grid; gap: 4px; min-width: 0; }
.must-row select { width: 100%; min-height: 44px; text-overflow: ellipsis; }
.must-row.is-miss { color: var(--text-secondary, #555); margin: 0; }
