/* 여행계획 — 공통 스타일 */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --text: #17212b;
  --text-muted: #5d6b7a;
  --text-faint: #8b98a5;
  --border: #dde4ea;
  --accent: #0d7d8a;
  --accent-soft: #e3f3f5;
  --accent-text: #0a5f6a;
  --warn: #b45309;
  --warn-soft: #fdf1e0;
  --warn-border: #f0d3a8;
  --shadow: 0 1px 2px rgba(23, 33, 43, .06), 0 4px 14px rgba(23, 33, 43, .05);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151a;
    --surface: #19212a;
    --surface-2: #212b36;
    --text: #e5ecf2;
    --text-muted: #9aabba;
    --text-faint: #6f8194;
    --border: #2b3742;
    --accent: #3fb9c6;
    --accent-soft: #14343a;
    --accent-text: #7fd6e0;
    --warn: #e0a35c;
    --warn-soft: #33261a;
    --warn-border: #4d3a24;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--accent-text); }

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

/* ---------- 헤더 ---------- */

.navbtn {
  display: inline-block;
  flex: none;
  padding: 5px 13px 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.navbtn-row {
  margin: 24px 0 0;
  text-align: right;
}

.hero {
  padding: 32px 0 20px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.hero-top .eyebrow {
  margin: 0;
}

.hero .eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--accent-text);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -.02em;
}

.hero .lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.hero .members {
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
}

.dday {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- 여행 정보 카드 ---------- */

.info-body {
  padding: 0 16px 8px;
}

.info-body > section {
  padding: 15px 0;
  border-top: 1px solid var(--border);
}

.info-body h3 {
  margin: 0 0 10px;
  font-size: 15.5px;
  letter-spacing: -.01em;
}

.info-body h3 .ico {
  margin-right: 6px;
}

.info-body ul {
  margin: 0;
  padding-left: 20px;
}

.info-body li { margin-bottom: 6px; }

.info-body li:last-child { margin-bottom: 0; }

.sub {
  color: var(--text-muted);
  font-size: 14.5px;
}

/* 예약 / 숙박 정보 행 */

.rows {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.rows li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}

.rows li:first-child { border-top: 0; }

.rows .k {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.rows .v { font-size: 15px; }

.rows .v small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.info-body ul.rows { padding-left: 0; }

.info-body ul.rows li { margin-bottom: 0; }

/* ---------- EV 경고 블록 ---------- */

.info-body > section.ev {
  margin: 15px 0;
  padding: 15px 14px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  border-radius: 10px;
}

.info-body > section.ev h3 { color: var(--warn); }

.info-body > section.ev strong { color: var(--warn); }

/* ---------- 날짜 내비 ---------- */

.daynav {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 -16px;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}

.daynav::-webkit-scrollbar { display: none; }

.daynav .sep {
  flex: none;
  align-self: center;
  width: 1px;
  height: 16px;
  margin: 0 3px;
  background: var(--border);
}

.daynav a {
  flex: none;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.daynav a.today {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- 일정 ---------- */

.sched-head {
  display: flex;
  justify-content: flex-end;
  margin: 14px 0 10px;
}

#toggleAll {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.day {
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 60px;
}


.day > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.day > summary::-webkit-details-marker { display: none; }

.day > summary::after {
  content: "";
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .15s ease;
}

.day[open] > summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.day .date {
  flex: none;
  min-width: 70px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--accent-text);
}

.day.info .date {
  font-size: 15.5px;
  letter-spacing: -.02em;
}

.day .date span {
  margin-left: 3px;
  font-size: 13px;
  font-weight: 600;
}

.day .headline {
  min-width: 0;
}

.day .headline strong {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.day .headline em {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--text-muted);
}

.day[data-holiday] .date::before {
  content: attr(data-holiday);
}

.daybanner {
  margin: 0 16px 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  color: var(--warn);
  font-size: 13.5px;
  font-weight: 600;
}

.timeline {
  margin: 0;
  padding: 0 16px 14px;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px dashed var(--border);
}

.timeline li:first-child { border-top: 1px solid var(--border); }

.timeline .t {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  padding-top: 1px;
}

.timeline .t span {
  display: block;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--text-faint);
}

.timeline .what {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.timeline .meta {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.timeline .meta .dur {
  display: inline-block;
  padding: 1px 7px;
  margin-right: 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.timeline li.ev .what::before {
  content: "⚡ ";
}

.timeline li.ev .meta {
  color: var(--warn);
  font-weight: 600;
}

.timeline li.stay .what::before {
  content: "🛏 ";
}

.timeline li.meal .what::before {
  content: "🍚 ";
}

.timeline li.ship .what::before {
  content: "⛴ ";
}

/* ---------- 허브(목록) 페이지 ---------- */

.trips {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.trips li { margin-bottom: 14px; }

.trip-card {
  display: block;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}

.trip-card .when {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-text);
}

.trip-card h2 {
  margin: 4px 0 6px;
  font-size: 20px;
  letter-spacing: -.02em;
}

.trip-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
}

.trip-card .go {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-text);
}

.placeholder {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-faint);
  font-size: 14.5px;
  text-align: center;
}

/* ---------- 푸터 ---------- */

.foot {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
}

.foot a { color: var(--text-muted); }

/* ---------- 넓은 화면 ---------- */

@media (min-width: 640px) {
  .hero h1 { font-size: 34px; }
  .timeline { padding: 0 20px 18px; }
  .timeline li { grid-template-columns: 64px 1fr; gap: 16px; }
  .day > summary { padding: 16px 20px; }
  .info-body { padding: 0 20px 10px; }
  .rows li { grid-template-columns: 110px 1fr; }
}

@media print {
  .daynav, #toggleAll, .navbtn { display: none; }
  .day { break-inside: avoid; box-shadow: none; }
  .day > *:not(summary) { display: block !important; }  /* 접혀 있어도 인쇄됨 */
  body { background: #fff; }
}
