:root {
  --bg: #fdfcfa;
  --fg: #222;
  --muted: #6b6b6b;
  --line: #e6e2dc;
  --accent: #1f6f78;
  --tag-bg: #eef4f4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616;
    --fg: #e8e6e3;
    --muted: #9a9a9a;
    --line: #2e2e2e;
    --accent: #6cc3cc;
    --tag-bg: #1f2b2c;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  line-height: 1.75;
  word-break: keep-all;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }
.site-header {
  max-width: 760px; margin: 0 auto; padding: 20px 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.site-title { font-weight: 700; color: var(--fg); }
.home-link { color: var(--muted); font-size: .9rem; }
.site-footer {
  max-width: 760px; margin: 0 auto; padding: 24px 16px 40px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem;
}

h1 { font-size: 1.9rem; line-height: 1.3; margin: .5em 0 .2em; }
.intro, .meta { color: var(--muted); }
.meta { font-size: .9rem; margin: 0 0 1.2em; }
.tag {
  display: inline-block; margin-left: 6px; padding: 0 8px;
  background: var(--tag-bg); border-radius: 999px; font-size: .8rem;
}

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.tabs button {
  font: inherit; font-size: .95rem; cursor: pointer;
  padding: 4px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
}
.tabs button.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.trip-list { display: grid; gap: 28px; }
.trip-card[hidden] { display: none; }
.trip-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.trip-card h2 { font-size: 1.3rem; margin: 12px 0 2px; }
.trip-card h2 a { color: var(--fg); }
.trip-card .meta { margin-bottom: .4em; }
.trip-card p { margin: 0; }
.empty { color: var(--muted); }

.trip { font-size: 1.05rem; }
.breadcrumb { margin: 0; font-size: .9rem; }
.photo { margin: 28px 0; }
.photo img { border-radius: 6px; }
.photo figcaption { color: var(--muted); font-size: .85rem; text-align: center; margin-top: 6px; }
.subpages, .album-link { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
.subpages h2 { font-size: 1.1rem; }
.album-link a { font-weight: 600; }

.planned { margin: 28px 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.planned > h2 { font-size: 1.1rem; margin: 0 0 12px; }
.badge {
  display: inline-block; vertical-align: middle; padding: 0 8px;
  border: 1px solid var(--accent); color: var(--accent);
  border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.6;
}
h1 .badge { font-size: .9rem; }
.plan-note {
  padding: 10px 14px; border-left: 3px solid var(--accent);
  background: var(--tag-bg); border-radius: 4px; font-size: .95rem;
}
.trip table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.trip th, .trip td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }

/* Planned trips: flight cards */
:root { --card: #fff; --warn: #b4532a; --warn-bg: #fbeee6; --ok: #2e7d4f; --ok-bg: #e6f4ea; }
@media (prefers-color-scheme: dark) {
  :root { --card: #1e1e1e; --warn: #f0a07a; --warn-bg: #3a2519; --ok: #7fd3a0; --ok-bg: #1b3326; }
}
.flights { display: grid; gap: 12px; margin: 16px 0; }
.flight { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.flight-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.flight-no { font-weight: 700; color: var(--fg); }
.flight-who { margin-left: auto; padding: 0 10px; border-radius: 999px; background: var(--tag-bg); color: var(--accent); font-weight: 600; }
.flight-route { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.flight-end { display: flex; flex-direction: column; min-width: 0; }
.flight-end:last-child { text-align: right; align-items: flex-end; }
.flight-time { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.flight-code { font-weight: 600; font-size: .9rem; }
.flight-place { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.flight-line { flex: 1; text-align: center; color: var(--accent); position: relative; }
.flight-line::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--line); z-index: 0; }
.flight-line { z-index: 1; }
.flight-note { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--warn); }

/* Planned trips: day-by-day itinerary */
.itinerary { list-style: none; padding: 0; margin: 16px 0; border-left: 2px solid var(--line); }
.day { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 0 0 18px 16px; position: relative; }
.day::before {
  content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
}
.day-date { font-weight: 700; font-size: .95rem; line-height: 1.5; }
.day-n { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); }
.day-body p { margin: 0 0 4px; font-size: .95rem; }
.day-city { font-weight: 700; color: var(--accent); }
.day-tag { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 999px; background: var(--tag-bg); font-size: .75rem; color: var(--fg); font-weight: 600; }
.day-label { display: inline-block; min-width: 2.6em; color: var(--muted); font-size: .8rem; font-weight: 600; }
@media (max-width: 520px) {
  .day { grid-template-columns: 1fr; gap: 2px; }
  .day-n { display: inline; margin-right: 6px; }
}

/* Planned trips: restaurant cards */
.restaurants { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0 24px; }
.restaurant { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; }
.restaurant h4 { margin: 0 0 4px; font-size: 1.05rem; line-height: 1.4; }
.restaurant p { margin: 0; font-size: .9rem; line-height: 1.6; }
.restaurant-kind { color: var(--accent); font-size: .78rem !important; font-weight: 600; }
.restaurant-why { color: var(--fg); }
.warns { margin: 8px 0 0 !important; display: flex; flex-wrap: wrap; gap: 4px; }
.warn { padding: 0 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--warn-bg); color: var(--warn); }
.warn-ok { background: var(--ok-bg); color: var(--ok); }
.restaurant-tip { margin-top: 8px !important; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--muted); }
.restaurant-tip::before { content: "Tip · "; font-weight: 600; color: var(--fg); }

.phrase-card { margin: 12px 0 24px; padding: 16px 18px; border-radius: 10px; background: var(--tag-bg); border: 1px solid var(--line); }
.phrase-card .zh { font-size: 1.25rem; font-weight: 600; line-height: 1.6; margin: 0 0 8px; }
.phrase-card .tr { margin: 0; color: var(--muted); font-size: .9rem; }

/* Source links on place and restaurant cards */
.sources { margin-top: auto !important; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.sources a {
  font-size: .75rem; font-weight: 600; padding: 1px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--accent);
}
.sources a:hover { text-decoration: none; border-color: var(--accent); }
.sources a::after { content: " ↗"; }

/* Timed itinerary items and confirmed/draft status */
.day-items { list-style: none; padding: 0; margin: 4px 0 0; }
.day-items li { display: grid; grid-template-columns: 3.4em 1fr; gap: 8px; font-size: .93rem; line-height: 1.55; padding: 2px 0; }
.day-time { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; font-size: .85rem; padding-top: 1px; }
.day-note { color: var(--muted); font-size: .85rem !important; font-style: italic; }
.day-status { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.day-status-confirmed { background: var(--ok-bg); color: var(--ok); }
.day-status-draft { background: var(--warn-bg); color: var(--warn); }
.day-draft::before { border-style: dashed; }
