:root {
  /* ---- 사이트 색 (어느 여행에나 어울리게: 밝은 회백 바탕 · 먹색 글자 · 깊은 남색 · 산호색 포인트) ---- */
  --bg: #f4f5f7;            /* 페이지 바탕 */
  --fill: #ebedf1;          /* 옅은 채움 (고르기 버튼 바탕, 빈칸) */
  --surface: #ffffff;       /* 카드 */
  --ink: #111827;           /* 글자 */
  --ink-soft: #566072;      /* 보조 글자 */
  --ink-faint: #9aa3b2;     /* 흐린 글자 */
  --line: #e5e8ed;          /* 선 */
  --primary: #1e2b4f;       /* 누를 수 있는 것 · 지금 있는 곳 */
  --primary-soft: #e9edf7;
  --accent: #ef6a4c;        /* 포인트: 고른 것, 다녀온 길, 눈에 띄어야 하는 숫자 */
  --accent-soft: #fdebe6;
  --green: #14866d;         /* 돈이 남음 · 완료 */
  --green-soft: #dcf2eb;
  --red: #d8455e;           /* 삭제 · 알림 · 모자람 */
  --red-soft: #fbe4e8;
  --shadow-rgb: 16, 24, 40;

  /* 예전 이름 (처음에 이집트 색으로 지은 이름) — 새 이름을 가리킨다. 새로 쓸 때는 위 이름을 쓴다 */
  --sand: var(--bg);
  --sand-deep: var(--fill);
  --paper: var(--surface);
  --lapis: var(--primary);
  --lapis-soft: var(--primary-soft);
  --gold: var(--accent);
  --gold-soft: var(--accent-soft);
  --nile: var(--green);
  --nile-soft: var(--green-soft);
  --rose: var(--red);
  --rose-soft: var(--red-soft);

  --w: 848px;               /* 내용 폭 (PC 에서 2단 페이지는 더 넓게 → 맨 아래 'PC 화면') */
  --radius: 16px;
  --ring: 0 0 0 1px rgba(var(--shadow-rgb), .06), 0 1px 2px rgba(var(--shadow-rgb), .05), 0 4px 12px rgba(var(--shadow-rgb), .03);
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --serif: var(--sans);   /* 예전 명조 자리도 같은 글꼴로 */
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  -webkit-tap-highlight-color: rgba(30, 43, 79, .12);
  overflow-wrap: break-word;
  word-break: keep-all;
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { letter-spacing: -0.025em; }

/* 아이콘 (app.js 의 icon()) — 글자색을 따라감 */
.i { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--lapis); }

/* ---------- 여행 홈 첫 화면 (표지 사진) ---------- */
.trip-hero {
  position: relative; overflow: hidden;
  color: #fff;
  min-height: calc(250px + env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 22px;
  background: #22314d center 62% / cover no-repeat;
}
.trip-hero:not(.has-cover) { background-image: linear-gradient(135deg, #1e2b4f 0%, #2c4274 60%, #3a5a92 100%); }
.trip-hero.has-cover { min-height: calc(330px + env(safe-area-inset-top, 0px)); }
.trip-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .25) 100%);
}
.trip-hero.has-cover::before { background: linear-gradient(180deg, rgba(0, 0, 0, .32) 0%, rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, .66) 100%); }
.trip-hero > * { position: relative; z-index: 2; }
/* 사진이 없을 때: 가는 나라 모양을 옅게 */
/* 사진이 없을 때: 어느 여행에나 맞는 지구본 · 비행 경로 선 (assets/scene.js) */
.trip-hero > .hero-deco { position: absolute; z-index: 0; inset: 0; opacity: .2; }
.trip-hero.has-cover > .hero-deco { display: none; }
.hero-art { display: block; width: 100%; height: 100%; }
.hero-art .globe, .hero-art .route, .hero-art .ring { fill: none; stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.hero-art .route { stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; }
.hero-art .dot { fill: #fff; }
.trip-hero-top { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: var(--w); margin: 0 auto; }
.hero-btn {
  position: relative; border: 0; cursor: pointer; font: inherit;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; text-decoration: none;
  background: rgba(var(--shadow-rgb), .3);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
/* .back-home(하위 페이지 머리)의 회색 글자를 이기도록 */
.trip-hero .hero-btn { margin: 0; padding: 0; color: #fff; }
.hero-btn:active { transform: scale(.94); }
.hero-btn .i { width: 22px; height: 22px; }
.trip-hero-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; width: 100%; max-width: var(--w); margin: 0 auto; }
.trip-hero-meta { margin: 0 0 6px; font-size: 13px; font-weight: 500; opacity: .88; }
.trip-hero h1 { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.2; }
.trip-hero-dates { margin: 6px 0 0; font-size: 14px; opacity: .92; }
.countdown { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.countdown strong { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.countdown span { font-size: 12px; opacity: .88; margin-top: 5px; }

/* ---------- Layout ---------- */
main { max-width: calc(var(--w) + 32px); margin: 0 auto; padding: 8px 16px 64px; }
section { padding-top: 36px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
h2 { font-size: 19px; font-weight: 700; margin: 0; color: var(--ink); }
.section-head p { margin: 0; color: var(--ink-soft); font-size: 13px; }
/* 제목 오른쪽 '＋ 추가' */
.head-add {
  position: relative;
  display: inline-flex; align-items: center; gap: 3px;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--lapis); background: var(--lapis-soft);
  border: 0; border-radius: 999px; padding: 0 12px 0 9px; height: 34px; cursor: pointer;
}
.head-add::after { content: ""; position: absolute; inset: -5px; }
.head-add .i { width: 16px; height: 16px; stroke-width: 2.2; }
.card {
  background: var(--paper);
  border: 0;
  box-shadow: var(--ring);
  border-radius: var(--radius);
  padding: 20px;
}
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.tag.korea { background: var(--lapis-soft); color: var(--lapis); }
.tag.france { background: var(--rose-soft); color: var(--rose); }
.tag.plain { background: var(--sand); color: var(--ink-soft); }
.tag.home { background: var(--nile-soft); color: var(--nile); }
.todo { color: var(--ink-soft); font-size: 13px; font-style: normal; }
.todo::before { content: "✎ "; }

/* ---------- 시계 (여행 홈) ---------- */
.clock-card { display: grid; grid-template-columns: 1fr 1fr; padding: 16px 0 0; }
.clock-card > div { display: flex; flex-direction: column; padding: 0 18px 14px; }
.clock-card > div + div { border-left: 1px solid var(--line); }
.clock-card.one { grid-template-columns: 1fr; }
.clock-card.one > div + div { display: none; }
.clock-place { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.clock-card b { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; margin-top: 2px; font-variant-numeric: tabular-nums; }
.clock-card small { font-size: 13px; color: var(--ink-soft); }
.clock-note { grid-column: 1 / -1; margin: 0; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.clock-note:empty { display: none; }

/* ---------- Flights ---------- */
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.route h3 { margin: 0 0 14px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.legs { list-style: none; margin: 0; padding: 0; }
.leg { position: relative; padding: 0 0 18px 28px; }
.leg:last-child { padding-bottom: 0; }
.leg::before {
  content: "";
  position: absolute; left: 7px; top: 22px; bottom: 0;
  border-left: 2px dashed var(--line);
}
.leg:last-child::before { display: none; }
.leg .dot {
  position: absolute; left: 0; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--lapis);
}
.route.alt .leg .dot { border-color: var(--rose); }
.leg .when { font-weight: 700; font-size: 15px; }
.leg .what { font-size: 14px; color: var(--ink-soft); }
.leg .todo { display: block; margin-top: 2px; }
.way { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin: 4px 0 10px; }
.legs + .way { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.leg.layover { padding-bottom: 14px; }
.leg.layover .dot { width: 10px; height: 10px; left: 3px; top: 7px; border-width: 0; background: var(--line); }
.leg.layover .what { font-size: 13px; color: var(--ink-soft); background: var(--sand); display: inline-block; padding: 2px 10px; border-radius: 8px; }
.local-note { margin: 16px 0 0; font-size: 12px; color: var(--ink-soft); }
.flight { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.fno { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--lapis); background: var(--lapis-soft); padding: 3px 9px; border-radius: 6px; }
.fno .i { width: 13px; height: 13px; }
.flight a { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 500; text-decoration: none; padding: 5px 10px 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); }
.flight a .i { width: 14px; height: 14px; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.links a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 8px; border-radius: 12px; background: var(--lapis); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.links a + a { background: var(--lapis-soft); color: var(--lapis); }
.links a .i { width: 18px; height: 18px; }
.meet {
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--ring);
  color: var(--ink);
  font-size: 14px;
  display: flex; gap: 10px; align-items: center;
}
.meet .i { color: var(--lapis); }

/* ---------- Days ---------- */
.days { display: grid; gap: 10px; }
.day { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center; }
.day .num {
  width: 56px;
  text-align: center;
  border-radius: 14px;
  background: var(--sand-deep);
  padding: 7px 0 6px;
  line-height: 1.15;
}
.day .num small { display: block; font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.day .num b { display: block; font-size: 22px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.day .body { min-width: 0; }
.day .dayno { font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.day h3 { margin: 0 0 2px; font-size: 16px; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.day p { margin: 0; font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.day.today { box-shadow: 0 0 0 2px var(--lapis); }
.day.today .num { background: var(--lapis); color: #fff; }
.day.today .num small { color: rgba(255, 255, 255, .8); }
.day.past { opacity: .6; }
.today-badge { margin-left: 6px; vertical-align: 2px; background: var(--lapis); color: #fff; }

footer { text-align: center; color: var(--ink-faint); font-size: 12px; padding: 24px 16px 40px; }

@media (max-width: 520px) {
  .card { padding: 16px; }
}

/* ---------- Sub page header ---------- */
.page-head {
  color: var(--ink);
  padding: 2px 16px 0;
}
.page-head-inner { max-width: var(--w); margin: 0 auto; }
.page-head h1 { font-size: 28px; font-weight: 700; margin: 6px 0 2px; line-height: 1.25; }
.page-head p { margin: 0; font-size: 14px; color: var(--ink-soft); }
main > section.first { padding-top: 20px; }

/* ---------- Flights: 가는 편 / 오는 편 ---------- */
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  background: var(--sand-deep);
  border-radius: 14px;
}
.seg button {
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 11px;
  padding: 10px 6px 8px;
  cursor: pointer;
  line-height: 1.3;
}
.seg button small { display: block; font-size: 12px; font-weight: 400; }
.seg button small { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.seg button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .14); }
.seg button[aria-selected="true"] small { color: var(--ink-soft); }
.arrive {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--lapis);
  color: #fff;
}
.arrive span { font-size: 13px; opacity: .8; }
.arrive b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.arrive small { font-size: 12px; opacity: .7; }
#flight-panel .routes + .meet { margin-top: 12px; }

/* ---------- 폰 ---------- */
@media (max-width: 720px) {
  footer { padding-bottom: 28px; }
  main { padding-bottom: 24px; }
  .page-head h1 { font-size: 26px; }
  .arrive b { font-size: 24px; }
  .links a { padding: 14px 8px; }
}

/* ---------- 홈: 환율 계산기 ---------- */
.fx { padding: 14px 14px 0; overflow: hidden; }
.fx-cur { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px; border-radius: 12px; background: var(--sand); }
.fx-cur button {
  font: inherit; font-size: 14px; font-weight: 500;
  color: var(--ink-soft); background: transparent;
  border: 0; border-radius: 9px; padding: 8px 2px; cursor: pointer;
}
.fx-cur button[aria-checked="true"] { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .14); }
.fx-row {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 4px 0; padding: 6px 0 10px;
  border-bottom: 1px solid var(--line);
  cursor: text;
}
.fx-row:focus-within { border-color: var(--lapis); }
.fx-unit { font-size: 20px; font-weight: 600; color: var(--ink-faint); min-width: 1.4em; }
.fx-row input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 34px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); text-align: right; font-variant-numeric: tabular-nums;
  background: transparent; border: 0; outline: 0; padding: 4px 0;
}
.fx-row input::placeholder { color: #c3c9d3; }
.fx-out { list-style: none; margin: 2px 4px 4px; padding: 0; }
.fx-out li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fx-out li:last-child { border-bottom: 0; }
.fx-out .name { font-size: 15px; }
.fx-out b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-out b.muted { color: var(--ink-faint); font-weight: 500; }
.fx-out .fx-loading { display: block; text-align: center; color: var(--ink-soft); font-size: 14px; padding: 18px 0 8px; }
.fx-quick { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0 -14px; border-top: 1px solid var(--line); background: #f9fafb; }
.fx-quick:empty { display: none; }
.fx-quick div { padding: 10px 14px 11px; min-width: 0; }
.fx-quick div + div { border-left: 1px solid var(--line); }
.fx-quick small { display: block; font-size: 12px; color: var(--ink-soft); }
.fx-quick b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-note { margin: 8px 4px 0; font-size: 12px; color: var(--ink-faint); }

/* ---------- 일정: 지도 ---------- */
.map-card { padding: 0; overflow: hidden; }
.map-status { padding: 14px 16px; font-size: 14px; color: var(--ink-soft); }
.map-status b { color: var(--ink); }
.map { height: 320px; background: var(--sand-deep); z-index: 0; }
.map.map-off { display: grid; place-items: center; text-align: center; padding: 20px; color: var(--ink-soft); font-size: 14px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 16px; font-size: 12px; color: var(--ink-soft); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 22px; height: 0; }
.lg.done { border-top: 4px solid var(--gold); }
.lg.plan { border-top: 3px dashed var(--lapis); opacity: .6; }
.lg.here { width: 12px; height: 12px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 3px rgba(216, 69, 94, .25); }
.pin {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 12px var(--sans);
  color: var(--lapis); background: #fff;
  border: 2px solid var(--lapis);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.pin.visited { background: var(--gold); border-color: #fff; color: #fff; }
.move-ico { width: 24px; height: 24px; display: grid; place-items: center; color: var(--lapis); background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.move-ico .i { width: 14px; height: 14px; stroke-width: 2; }
.here-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--rose); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(216, 69, 94, .5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 14px rgba(216, 69, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(216, 69, 94, 0); } }
.leaflet-container { font-family: var(--sans); }

/* ---------- 일정: 펼치는 날짜 카드 ---------- */
details.day { display: block; padding: 0; }
details.day > summary {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 20px; gap: 14px; align-items: center;
  padding: 16px;
  list-style: none;
  cursor: pointer;
}
details.day > summary::-webkit-details-marker { display: none; }
details.day .chev { width: 10px; height: 10px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg); margin-bottom: 4px; transition: transform .2s; justify-self: center; }
details.day[open] .chev { transform: rotate(-135deg); margin: 4px 0 0; }
details.day .detail { padding: 0 16px 16px 86px; }
.plan { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.plan li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 5px 0; font-size: 14px; }
.plan time { font-weight: 700; color: var(--lapis); font-variant-numeric: tabular-nums; }
.memo { margin: 10px 0 0; padding: 10px 12px; font-size: 13px; background: var(--sand); border-radius: 10px; color: var(--ink-soft); }
.detail > .todo { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- 회비 ---------- */
.fund-total {
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--ring);
}
.fund-total > span { font-size: 13px; color: var(--ink-soft); }
.fund-total > b { display: block; font-size: 32px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; margin: 2px 0 14px; font-variant-numeric: tabular-nums; }
.fund-bar { height: 8px; border-radius: 99px; background: var(--sand-deep); overflow: hidden; }
.fund-bar i { display: block; height: 100%; width: 0; background: var(--lapis); border-radius: 99px; transition: width .6s ease; }
.fund-split { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12px; }
.fund-split div + div { text-align: right; }
.fund-split small { display: block; font-size: 12px; color: var(--ink-soft); }
.fund-split strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.fund-split strong.minus { color: var(--rose); }
.fund-who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fund-who span { font-size: 12px; background: var(--sand); padding: 3px 10px; border-radius: 99px; }
.fund-who .empty { background: none; padding: 0; color: var(--ink-soft); }
.exp-day { margin-top: 16px; }
.exp-date { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 0 4px 6px; }
.exp-list { list-style: none; margin: 0; padding: 4px 16px; }
.exp-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.exp-list li:last-child { border-bottom: 0; }
.exp-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--sand); color: var(--ink-soft); display: grid; place-items: center; }
.exp-ico .i { width: 18px; height: 18px; }
.exp-title { font-size: 15px; font-weight: 600; }
.exp-title small, .exp-amt small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.exp-amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-state { text-align: center; padding: 28px 16px; font-size: 14px; color: var(--ink-soft); }
.empty-state p { font-size: 14px; color: var(--ink-soft); margin: 0; }

@media (max-width: 720px) {
  .map { height: 280px; }
  details.day > summary { padding: 14px; gap: 12px; }
  details.day .detail { padding: 0 14px 14px 14px; }
  .fx-row input { font-size: 28px; }
}

/* ---------- 회비: 도시 탭 + 분류 버튼 ---------- */
#spend .seg button { font-size: 14px; padding: 9px 2px 7px; }
#spend .seg button small { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-btns {
  display: flex; gap: 8px;
  margin: 0 -16px 14px; padding: 2px 16px 6px;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none;
}
.cat-btns::-webkit-scrollbar { display: none; }
.cat-btns button {
  flex: none; scroll-snap-align: start;
  font: inherit; cursor: pointer;
  display: grid; grid-template-columns: auto auto; column-gap: 7px; align-items: center; justify-items: start;
  min-width: 84px; padding: 9px 12px;
  border-radius: 14px; border: 0; box-shadow: var(--ring); background: var(--paper); color: var(--ink);
}
.cat-btns .ci { grid-row: span 2; display: grid; color: var(--ink-soft); }
.cat-btns .cl { font-size: 13px; font-weight: 500; }
.cat-btns b:empty { display: none; }
.cat-btns b { font-size: 12px; font-weight: 500; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat-btns button.zero { opacity: .55; }
.cat-btns button[aria-pressed="true"] { background: var(--lapis); box-shadow: none; color: #fff; opacity: 1; }
.cat-btns button[aria-pressed="true"] .ci, .cat-btns button[aria-pressed="true"] b { color: rgba(255, 255, 255, .85); }
.spend-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 4px 0; }
.spend-sum span { font-size: 14px; color: var(--ink-soft); }
.spend-sum b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 숙소 페이지 ---------- */
.stay-total { padding: 18px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--ring); }
.stay-total > span { font-size: 13px; color: var(--ink-soft); }
.stay-total > b { display: block; font-size: 32px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stay-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 14px; }
.stay-chips span { font-size: 13px; color: var(--ink-soft); background: var(--sand); padding: 7px 10px; border-radius: 10px; display: flex; justify-content: space-between; gap: 6px; }
.stay-chips b { color: var(--ink); }
.stay-chips b { font-variant-numeric: tabular-nums; }
.stay-list { display: grid; gap: 14px; margin-top: 16px; }
.stay { padding: 0; overflow: hidden; }
.stay-photo { position: relative; aspect-ratio: 16 / 10; background: var(--sand-deep); }
.stay-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stay-ph { height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--ink-faint); background: var(--sand-deep); }
.stay-ph .i { width: 34px; height: 34px; stroke-width: 1.5; }
.stay-ph small { font-size: 13px; }
.stay-city { position: absolute; left: 12px; top: 12px; background: rgba(var(--shadow-rgb), .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 99px; }
.stay-body { padding: 16px; }
.stay-body h3 { margin: 0 0 10px; font-size: 18px; }
.stay-info { margin: 0; display: grid; gap: 8px; }
.stay-info div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; font-size: 14px; }
.stay-info dt { display: flex; align-items: center; gap: 5px; align-self: start; color: var(--ink-soft); font-size: 13px; line-height: 1.6; padding-top: 1px; }
.stay-info dt .i { width: 15px; height: 15px; color: var(--ink-faint); }
.stay-info dd { margin: 0; }
.stay-info dd a { font-size: 13px; white-space: nowrap; }
.stay-info small { color: var(--ink-soft); }
.nights { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ink-soft); background: var(--sand); padding: 0 8px; border-radius: 99px; }
.stay-btn { display: block; margin-top: 14px; text-align: center; padding: 12px; border-radius: 12px; background: var(--lapis-soft); color: var(--lapis); font-weight: 700; font-size: 14px; text-decoration: none; }

/* ---------- 회비: 입금 내역 / 삭제 ---------- */
.fund-log { margin-top: 10px; }
.fund-log summary { font-size: 13px; color: var(--ink-soft); cursor: pointer; padding: 4px 0; }
.fund-log ul { list-style: none; margin: 6px 0 0; padding: 0; }
.fund-log li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 7px 0; font-size: 13px; border-top: 1px solid var(--line); cursor: pointer; }
.fund-log li small { color: var(--ink-soft); }
.fund-log li b { font-variant-numeric: tabular-nums; }
.exp-list li { grid-template-columns: 34px minmax(0, 1fr) auto auto; cursor: pointer; }
.del {
  display: none;
  font: inherit; font-size: 12px; font-weight: 700;
  padding: 6px 10px; border-radius: 8px; border: 0;
  background: var(--rose); color: #fff; cursor: pointer;
}
li.show-del .del { display: block; }
li.deleting { opacity: .4; pointer-events: none; }
.sync-note { margin: 6px 2px 0; font-size: 12px; color: var(--rose); }
.sync-note:empty { display: none; }

/* ---------- 회비: 추가 버튼 + 입력 시트 ---------- */
.fab {
  position: fixed; right: 16px; bottom: 24px; z-index: 20;
  display: inline-flex; align-items: center; gap: 4px;
  font: inherit; font-size: 15px; font-weight: 700;
  padding: 13px 20px 13px 16px; border: 0; border-radius: 999px;
  background: var(--lapis); color: #fff;
  box-shadow: 0 6px 16px rgba(30, 43, 79, .3);
  cursor: pointer;
}
.fab .i { stroke-width: 2.2; }
.fab:active { transform: scale(.96); }
body.sheet-open { overflow: hidden; }
.sheet-back {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(var(--shadow-rgb), .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  animation: sheet-up .22s ease-out;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
/* PC · 태블릿: 아래에서 올라오지 않고 화면 가운데 팝업 (아래에서 올라오는 건 폰만) */
@media (min-width: 700px) {
  .sheet-back { align-items: center; padding: 24px; }
  .sheet { max-height: 86vh; border-radius: 20px; padding: 22px 22px 20px; box-shadow: 0 20px 50px rgba(var(--shadow-rgb), .25); animation: sheet-pop .18s ease-out; }
  .sheet-grip { display: none; }
  .sheet { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  #acct-body { max-width: 460px; }
}
@keyframes sheet-pop { from { transform: scale(.96); opacity: 0; } }
/* 손잡이: 잡기 쉽게 넓은 영역, 스크롤해도 위에 붙어 있음 */
.sheet-grip {
  position: sticky; top: -8px; z-index: 2;
  height: 28px; margin: -8px -16px 6px;
  background: var(--paper); border-radius: 22px 22px 0 0;
  cursor: grab; touch-action: none;
}
.sheet-grip::before { content: ""; position: absolute; left: 50%; top: 12px; width: 44px; height: 5px; margin-left: -22px; border-radius: 5px; background: var(--line); }
.sheet-grip:active { cursor: grabbing; }
.sheet .seg { margin-bottom: 4px; }
.sheet [data-for][hidden] { display: none; }
.f-label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-soft); margin: 14px 2px 6px; }
.f-input {
  width: 100%; font: inherit; font-size: 16px;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.f-input:focus { outline: 0; border-color: var(--lapis); }
.sheet .fx-row { margin: 0; padding: 6px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sheet .fx-row:focus-within { border-color: var(--lapis); }
.sheet .fx-row input { font-size: 28px; }
.chip-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 8px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row.wrap { flex-wrap: wrap; overflow: visible; margin-top: 0; }
.chip-row button {
  flex: none; font: inherit; font-size: 14px;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer;
}
.chip-row button[aria-pressed="true"] { background: var(--lapis); border-color: var(--lapis); color: #fff; font-weight: 700; }
.f-error { min-height: 1.4em; margin: 12px 2px 0; font-size: 13px; color: var(--rose); }
.sheet-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 6px; }
.btn-main, .btn-ghost { font: inherit; font-size: 16px; font-weight: 700; padding: 14px; border-radius: 14px; border: 0; cursor: pointer; }
.btn-main { background: var(--lapis); color: #fff; }
.btn-main:disabled { opacity: .6; }
.btn-ghost { background: var(--sand); color: var(--ink-soft); }

@media (max-width: 720px) {
  .fab { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}

/* 입력창: 도시 드롭다운 */
.f-select {
  padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236f685f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  cursor: pointer;
}

/* ---------- 사진 앨범 ---------- */
.album-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.album-bar span { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.album-select { font: inherit; font-size: 14px; font-weight: 700; color: var(--lapis); background: var(--lapis-soft); border: 0; border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.day-chips {
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); z-index: 5;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 6px; padding: 8px 16px;
  background: rgba(244, 245, 247, .94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.day-chips::-webkit-scrollbar { display: none; }
.day-chips button { flex: none; font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.day-chips b { color: var(--ink-faint); margin-right: 5px; font-size: 12px; }
.photo-day { margin-top: 14px; scroll-margin-top: 60px; }
.photo-day .exp-date small { font-weight: 400; margin-left: 4px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 14px; overflow: hidden; }
.ph { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: var(--sand-deep); cursor: pointer; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .15s; }
.ph-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .25); }
.ph.on img { transform: scale(.88); }
.ph.on { background: var(--lapis-soft); }
.ph.on .ph-check { background: var(--lapis); }
.ph.on .ph-check::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; height: 100%; }
@media (min-width: 600px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }

.upload-toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; z-index: 30;
  background: rgba(17, 24, 39, .92); color: #fff; font-size: 14px;
  padding: 10px 18px; border-radius: 99px; white-space: nowrap;
}
.select-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--paper); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(var(--shadow-rgb), .08);
}
.select-bar span { text-align: center; font-size: 14px; font-weight: 700; }
.select-bar button { padding: 11px 16px; font-size: 15px; }
.select-bar button:disabled { opacity: .45; }
.btn-ghost.danger { color: var(--rose); }
.sheet-actions.one { grid-template-columns: 1fr; margin-top: 16px; }
.f-label small { font-weight: 400; }

.lightbox { position: fixed; inset: 0; z-index: 60; background: #0d0b09; color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.lb-top { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; }
.lb-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.lb-meta { font-size: 14px; text-align: center; opacity: .9; }
.lb-pos { font-size: 13px; opacity: .6; min-width: 40px; text-align: right; }
.lb-stage { position: relative; display: grid; place-items: center; overflow: hidden; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 64px; border: 0; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.lb-nav .i, .lb-arrow .i { width: 28px; height: 28px; }
.lb-nav.prev { left: 0; border-radius: 0 12px 12px 0; }
.lb-nav.next { right: 0; border-radius: 12px 0 0 12px; }
.lb-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.lb-act { display: flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 15px; font-weight: 700; padding: 13px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.lb-act.main { background: #fff; color: var(--ink); }
@media (max-width: 720px) { .lb-nav { display: none; } }

/* 카드 안의 체크인 버튼 */
.route .links { grid-template-columns: 1fr; margin-top: 16px; }

/* ---------- 일정: 추가·수정 ---------- */
.plan li { align-items: start; }
.plan li.fixed, .plan li.mine { grid-template-columns: 48px minmax(0, 1fr) 20px; }
.plan li small { display: block; font-size: 12px; color: var(--ink-soft); }
.plan li .dur { display: inline-block; font-style: normal; font-size: 11px; font-weight: 600; color: var(--lapis); background: var(--lapis-soft); padding: 1px 7px; border-radius: 99px; margin-left: 6px; white-space: nowrap; vertical-align: middle; }
.plan .lock { display: grid; justify-items: center; padding-top: 2px; font-style: normal; color: var(--ink-faint); }
.plan .lock .i { width: 16px; height: 16px; }
.plan li.mine { cursor: pointer; border-radius: 8px; margin: 0 -6px; padding: 5px 6px; }
.plan li.mine:hover, .plan li.mine:focus { background: var(--sand); outline: 0; }
.plan .edit { font-style: normal; color: var(--lapis); text-align: center; }
.day-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.day-actions button { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 13px; font-weight: 500; padding: 7px 12px 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.day-actions button .i { width: 15px; height: 15px; }
.day-actions .act-add { background: var(--lapis); border-color: var(--lapis); color: #fff; }
.sheet-title { margin: 0 2px 4px; font-size: 18px; }
.sheet-actions.three { grid-template-columns: 1fr 1fr 2fr; }
input[type="time"].f-input { min-height: 48px; }
.stay-info .ci-time { display: block; font-size: 12px; margin-top: 2px; }

/* 일정: 기본 일정 삭제 · 되돌리기 */
.plan li.fixed { cursor: pointer; border-radius: 8px; margin: 0 -6px; padding: 5px 6px; }
.plan li.fixed:hover, .plan li.fixed:focus { background: var(--sand); outline: 0; }
.act-restore { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font: inherit; font-size: 12px; color: var(--ink-soft); background: none; border: 0; padding: 4px 2px; cursor: pointer; }
.act-restore .i, .p-reset .i { width: 14px; height: 14px; }
.p-reset { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font: inherit; font-size: 13px; color: var(--lapis); background: none; border: 0; padding: 4px 2px; cursor: pointer; }

/* 항공: 항목 눌러서 수정 */
.legs li[data-leg] { cursor: pointer; border-radius: 10px; }
.legs li[data-leg]:hover .what, .legs li[data-leg]:focus .what { text-decoration: underline; text-decoration-color: var(--line); }
.legs li[data-leg]:focus { outline: 0; }
.route .act-restore { margin-top: 12px; }

/* 숙소: 사진 위 연필 버튼 + 수정 시트 */
.stay-edit {
  position: absolute; right: 12px; top: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; background: rgba(255, 255, 255, .94); color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.stay-edit:active { transform: scale(.94); }
.stay-edited { position: absolute; left: 12px; bottom: 12px; font-size: 11px; background: rgba(var(--shadow-rgb), .6); color: #fff; padding: 2px 8px; border-radius: 99px; }
.f-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.s-photo { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--sand-deep); }
.s-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s-photo img:not([src]), .s-photo img[src=""] { visibility: hidden; }
.s-photo-btn { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; padding: 8px 14px 8px 11px; border-radius: 99px; background: rgba(255, 255, 255, .95); color: var(--ink); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.s-photo-btn .i { width: 17px; height: 17px; }

/* 일정: 도시 탭 */
.day-tabs { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); z-index: 5; margin-bottom: 12px; box-shadow: 0 4px 12px rgba(244, 245, 247, .9); }
.day-tabs button { font-size: 14px; padding: 9px 2px 7px; }
.day-tabs button small { font-size: 11px; }
/* PC: 위쪽 메뉴 바로 아래에 도시 탭이 붙게 */
@media (min-width: 721px) { .day-tabs, .day-chips { top: 62px; } }

/* 일정: 도시 간 이동 정보 카드 (날짜 세부 안에) */
.transfer {
  background: var(--sand-deep);
  border-radius: 12px;
  margin: 12px 0 4px;
  overflow: hidden;
}
.tf-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.tf-icon { font-size: 18px; flex-shrink: 0; }
.tf-route { flex: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
.tf-dur { font-size: 14px; font-weight: 700; color: var(--lapis); white-space: nowrap; }
.tf-toggle {
  font-size: 12px;
  color: var(--ink-faint);
  transition: transform .2s;
}
.transfer.open .tf-toggle { transform: rotate(180deg); }
.tf-options {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.tf-opt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--paper);
  border: 0;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.tf-opt:active { background: var(--sand); }
.tf-opt.on {
  background: var(--lapis-soft);
  font-weight: 600;
}
.tf-opt b { text-align: right; color: var(--lapis); font-size: 14px; white-space: nowrap; }
.tf-opt small {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.tf-note {
  padding: 0 16px 12px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ---------- 홈: 예상 금액 ---------- */
/* 총액은 흰 카드 안에 (바탕에 묻히지 않게) */
.budget-total {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px;
  padding: 16px 18px; margin-bottom: 14px;
}
.budget-total > span { grid-column: 1 / -1; font-size: 13px; color: var(--ink-soft); }
.budget-total b { grid-column: 1 / -1; font-size: 28px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.25; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.budget-total b.is-range { font-size: 26px; }
.budget-total small { font-size: 13px; color: var(--ink-soft); }
/* 도시 탭: 밑줄 */
#budget .seg { background: none; padding: 0; gap: 0; border-radius: 0; margin-bottom: 12px; border-bottom: 1px solid var(--line); grid-auto-columns: minmax(0, 1fr); }
#budget .seg button { position: relative; border-radius: 0; padding: 6px 2px 10px; font-size: 15px; font-weight: 600; color: var(--ink-faint); background: none; box-shadow: none; }
#budget .seg button small { font-size: 11.5px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink-faint); min-height: 1.35em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#budget .seg button[aria-selected="true"] { color: var(--ink); background: none; box-shadow: none; }
#budget .seg button[aria-selected="true"] small { color: var(--ink-soft); }
#budget .seg button[aria-selected="true"]::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.budget-list { list-style: none; margin: 0; padding: 0 16px 0 6px; }
.budget-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; background: var(--paper); position: relative; }
.budget-list li:last-child { border-bottom: 0; }
.budget-list li:focus { outline: 0; background: var(--sand); }
.b-main { min-width: 0; }
.b-title { display: block; font-size: 15px; font-weight: 600; }
.b-sub { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.b-sub:empty { display: none; }
.b-amt { font-size: 16px; font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.budget-list:has(+ .budget-city-sum) { border-radius: 16px 16px 0 0; }
.budget-city-sum {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 16px;
  background: #f9fafb; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px;
  box-shadow: var(--ring); clip-path: inset(0 -4px -4px -4px);
}
.budget-city-sum span { font-size: 14px; color: var(--ink-soft); }
.budget-city-sum b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.add-wide { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin-top: 12px; font: inherit; font-size: 15px; font-weight: 600; padding: 14px; border-radius: var(--radius); border: 1.5px dashed #d3d8e0; background: transparent; color: var(--ink-soft); cursor: pointer; }
.add-wide .i { width: 18px; height: 18px; }
.empty-state.small { padding: 22px 16px; }
.b-krw { margin: 8px 2px 0; font-size: 18px; font-weight: 700; color: var(--ink); min-height: 1.3em; font-variant-numeric: tabular-nums; }

/* ---------- 홈: 하고 싶은 것 ---------- */
.wish-form { padding: 14px; }
.wish-form .chip-row { margin: 0 0 10px; }
.wish-form textarea, .wish-edit {
  width: 100%; font: inherit; font-size: 16px; line-height: 1.5;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  resize: vertical; min-height: 84px;
}
.wish-form textarea:focus, .wish-edit:focus { outline: 0; border-color: var(--lapis); }
.wish-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.wish-foot span { font-size: 13px; color: var(--rose); }
.wish-foot .btn-main { padding: 11px 22px; font-size: 15px; }
#wish-list { display: grid; gap: 8px; margin-top: 12px; }
.wish { position: relative; padding: 14px 16px 12px; background: var(--paper); box-shadow: var(--ring); border-radius: 16px; cursor: pointer; }
.wish:focus { outline: 0; box-shadow: 0 0 0 2px var(--lapis); }
.wish p { margin: 6px 0 0; font-size: 15px; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.wish time { position: absolute; right: 14px; top: 14px; font-size: 12px; color: var(--ink-soft); }
.wish-who { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.wish-who.lapis { background: var(--lapis-soft); color: var(--lapis); }
.wish-who.gold { background: var(--gold-soft); color: #8a5f16; }
.wish-who.rose { background: var(--rose-soft); color: var(--rose); }
.wish-who.nile { background: var(--nile-soft); color: var(--nile); }

/* 하고 싶은 것: 지역·금액·시간 */
.wish-extra .f-label { margin-top: 10px; }
.wish-extra .chip-row { margin: 0; }
.wish-extra .chip-row button { font-size: 13px; padding: 6px 11px; }
.wish-2col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; margin-top: 2px; }
.wish-2col > div { min-width: 0; }
.wish-extra .f-label.sub { font-size: 12px; margin-top: 10px; margin-bottom: 4px; }
.wish-money { position: relative; display: flex; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.wish-money:focus-within { border-color: var(--lapis); }
.wish-money input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 12px 10px; border: 0; outline: 0; background: transparent; text-align: right; }
.wish-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wish-tags span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--sand); color: var(--ink-soft); padding: 3px 9px; border-radius: 99px; }
.wish-tags .i { width: 13px; height: 13px; }
.wish-tags b { color: var(--ink); font-weight: 700; }
.wish-tags small { font-size: 11px; }
#wish-edit-form .wish-extra { margin-top: 4px; }

/* 하고 싶은 것: 통화 선택 (버튼 아래로 열림) */
.cur-btn {
  flex: none; display: flex; align-items: center; gap: 4px;
  font: inherit; font-size: 14px; color: var(--ink);
  padding: 0 10px 0 12px; border: 0; border-left: 1px solid var(--line);
  border-radius: 0 11px 11px 0; background: var(--sand); cursor: pointer; white-space: nowrap;
}
.cur-btn i { font-size: 0; width: 7px; height: 7px; margin: 0 2px 3px 3px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .15s, margin .15s; }
.cur-btn[aria-expanded="true"] i { transform: rotate(-135deg); margin: 3px 2px 0 3px; }
.cur-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
  list-style: none; margin: 0; padding: 4px; min-width: 130px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(var(--shadow-rgb), .14);
}
.cur-menu li { padding: 10px 12px; border-radius: 8px; font-size: 15px; cursor: pointer; }
.cur-menu li:hover { background: var(--sand); }
.cur-menu li[aria-selected="true"] { background: var(--lapis); color: #fff; font-weight: 700; }

/* ---------- 입장료: 일반·학생 ---------- */
.mode-seg { margin: 4px 0 10px; }
.mode-seg button { font-size: 14px; padding: 10px 4px; }
.ticket { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--sand); }
.t-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.t-label { font-size: 14px; font-weight: 700; }
.t-price { display: flex; align-items: center; gap: 4px; padding: 0 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.t-price:focus-within { border-color: var(--lapis); }
.t-sym { font-weight: 600; color: var(--ink-faint); font-size: 15px; }
.t-price input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 0; border: 0; outline: 0; background: transparent; text-align: right; }
.t-step { display: flex; align-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.t-step button { width: 34px; height: 40px; font-size: 18px; border: 0; background: transparent; color: var(--lapis); cursor: pointer; }
.t-step button:active { background: var(--lapis-soft); }
.t-count { min-width: 34px; text-align: center; font-size: 14px; }
.t-sum { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 8px 2px 0; border-top: 1px solid var(--line); }
.t-sum span { font-size: 13px; color: var(--ink-soft); }
.t-total { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-krw { font-size: 16px; font-weight: 600; color: var(--ink-soft); }

/* 예상 금액: 범위 입력 */
.range-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.range-row .fx-row { margin: 0; padding: 4px 12px; }
.range-row .fx-row input { font-size: 22px; }
.range-row .fx-row input::placeholder { font-size: 15px; font-weight: 400; letter-spacing: 0; }
.range-tilde { font-size: 20px; color: var(--ink-faint); }
.range-hint { margin: 6px 2px 0; font-size: 12px; color: var(--ink-soft); }
/* 삭제 버튼이 숨겨지면(새로 추가할 때) 취소·저장을 넓게 */
.sheet-actions.three:has(> [hidden]) { grid-template-columns: 1fr 2fr; }

/* 예상 금액: 보는 단위 */
.view-cur { display: inline-grid; grid-auto-flow: column; gap: 2px; padding: 3px; border-radius: 10px; background: var(--sand); }
.view-cur button { font: inherit; font-size: 13px; padding: 5px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.view-cur button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .14); }


/* ---------- 홈: 여행 정보 ---------- */
#infos { padding-top: 40px; }
.info-list { padding: 0; overflow: hidden; }
.info + .info { border-top: 1px solid var(--line); }
.info-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.info-title {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; gap: 8px; align-items: center;
  width: 100%; padding: 15px 4px 15px 16px; border: 0; background: none; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink);
}
.info-name { font-size: 15px; font-weight: 600; word-break: keep-all; overflow-wrap: anywhere; }
.info-hints { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.info-hints .i { width: 14px; height: 14px; }
.info-chev { width: 9px; height: 9px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg); margin-bottom: 4px; justify-self: center; transition: transform .15s; }
.info.open .info-chev { transform: rotate(-135deg); margin: 4px 0 0; }
.info-go { display: grid; color: var(--lapis); justify-self: center; }
.info-go .i { width: 18px; height: 18px; }
.info-edit { display: grid; place-items: center; width: 42px; height: 42px; margin-right: 6px; border: 0; border-radius: 50%; background: none; color: var(--ink-faint); cursor: pointer; }
.info-edit .i { width: 18px; height: 18px; }
.info-edit:hover, .info-edit:focus { color: var(--ink); background: var(--sand); outline: 0; }
.info-detail { padding: 0 16px 16px; }
.info-body { padding: 12px 14px; border-radius: 12px; background: var(--sand); font-size: 15px; line-height: 1.7; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.info-body a { word-break: break-all; }
.info-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 10px; }
.info-photo { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--sand-deep); cursor: pointer; }
.info-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.info-loading { font-size: 13px; color: var(--ink-soft); }
.info-actions { display: grid; gap: 6px; margin-top: 10px; }
.info-btn { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.info-btn .i { width: 17px; height: 17px; color: var(--ink-faint); }
.info-btn.link { justify-content: center; background: var(--lapis); border-color: var(--lapis); color: #fff; font-weight: 700; }
.info-btn.link .i { color: rgba(255, 255, 255, .85); }

/* 여행 정보 입력 시트 */
.info-body-input { min-height: 140px; line-height: 1.6; resize: vertical; }
.i-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.i-photos:empty { display: none; }
.i-photo { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--sand-deep); }
.i-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.i-photo button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; }
.i-photo button .i { width: 14px; height: 14px; stroke-width: 2.2; }
.i-photo-add { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; padding: 12px; border-radius: 12px; border: 1.5px dashed #d3d8e0; font-size: 14px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.i-photo-add .i { width: 18px; height: 18px; }

/* 여행 정보: 링크 여러 개 */
.i-links { display: grid; gap: 8px; }
.i-link-row { display: grid; grid-template-columns: minmax(0, 1fr) 36px; grid-template-areas: "label del" "url url"; gap: 6px; padding: 8px; border-radius: 12px; background: var(--sand); }
.i-link-row [data-role=label] { grid-area: label; }
.i-link-row [data-role=url] { grid-area: url; }
.i-link-row .f-input { padding: 10px 12px; }
.i-link-del { grid-area: del; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.i-link-del .i { width: 18px; height: 18px; }
.i-link-add { display: block; width: 100%; margin-top: 8px; padding: 10px; border-radius: 12px; border: 1.5px dashed #d3d8e0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.body-link { white-space: nowrap; font-weight: 500; }

/* 예상 금액: 끌어서 순서 바꾸기 */
.b-drag { align-self: stretch; margin: -13px 0; display: grid; place-items: center; cursor: grab; touch-action: none; color: var(--line); }
.b-drag::before { content: ""; width: 10px; height: 16px; background: radial-gradient(circle, #c3c9d3 1.5px, transparent 1.7px) 0 0 / 5px 5.3px; }
.budget-list.sorting li { transition: transform .15s ease; }
.budget-list li.dragging { transition: none; z-index: 5; box-shadow: 0 8px 20px rgba(var(--shadow-rgb), .16); border-radius: 12px; border-bottom-color: transparent; }
.budget-list li.dragging .b-drag { cursor: grabbing; }
.budget-list.sorting { user-select: none; -webkit-user-select: none; }

/* ============================================
   메인 페이지 (여행 목록 · 사진 갤러리 · 캘린더)
   ============================================ */

/* ---------- 메인 머리 ---------- */
.main-head { max-width: calc(var(--w) + 32px); margin: 0 auto; padding: calc(28px + env(safe-area-inset-top, 0px)) 16px 10px; }
.main-head h1 { margin: 0; font-size: 28px; font-weight: 700; }

/* ---------- 메인 탭 ---------- */
.main-tabs {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: rgba(244, 245, 247, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.main-tabs button {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-faint);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 11px 4px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.main-tabs .i { width: 22px; height: 22px; }
.main-tabs button[aria-selected="true"] { color: var(--lapis); border-bottom-color: var(--lapis); font-weight: 700; }

/* ---------- 여행 카드 ---------- */
.trip-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px 44px 18px 20px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--ring);
  text-decoration: none;
  color: var(--ink);
}
.trip-card:active { transform: scale(.99); }
.trip-flag { width: 56px; height: 56px; border-radius: 14px; background: var(--sand); display: grid; place-items: center; font-size: 30px; }
.trip-info h3 { margin: 0 0 2px; font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trip-dates { margin: 0; font-size: 13px; color: var(--ink-soft); }
.trip-members { margin: 2px 0 0; font-size: 12px; color: var(--ink-soft); }
.trip-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--lapis-soft);
  color: var(--lapis);
  white-space: nowrap;
}
.trip-badge.now { background: var(--lapis); color: #fff; }

.trip-card-wrap {
  position: relative;
  margin-bottom: 10px;
}
.trip-card-wrap .trip-card { margin-bottom: 0; }
.trip-edit-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--ink-faint);
  cursor: pointer;
}
.trip-edit-btn .i { width: 18px; height: 18px; }
.trip-edit-btn:active { color: var(--ink); background: var(--sand); }

/* 나라 입력 + 국기 미리보기 */
.dest-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dest-flag {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}
.dest-row .f-input { flex: 1; }

.empty-msg { text-align: center; color: var(--ink-soft); font-size: 15px; line-height: 1.8; padding: 40px 16px; }

/* ---------- 사진 갤러리 ---------- */
.gallery-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--sand-deep);
  border-radius: 14px;
  margin-bottom: 12px;
}
.gallery-mode button {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 11px;
  padding: 9px 6px;
  cursor: pointer;
}
.gallery-mode button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .14); }

.gallery-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px 12px;
  padding: 2px 16px 6px;
}
.gallery-filter::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.chip.on { background: var(--lapis); border-color: var(--lapis); color: #fff; font-weight: 700; }

.gallery-group-title { font-size: 15px; margin: 16px 0 8px; }
.gallery-group-title:first-child { margin-top: 0; }
.gallery-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  border-radius: 14px;
  overflow: hidden;
}
.gallery-thumb { aspect-ratio: 1; background: var(--sand-deep); cursor: pointer; overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-empty { text-align: center; color: var(--ink-soft); font-size: 14px; padding: 40px 16px; }
@media (min-width: 600px) { .gallery-row { grid-template-columns: repeat(4, 1fr); } }

/* 라이트박스: 이전/다음 화살표 (메인 갤러리용, 앨범은 .lb-nav) */
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  display: grid; place-items: center;
  border: 0;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  z-index: 2;
}
.lb-prev { left: 0; border-radius: 0 12px 12px 0; }
.lb-next { right: 0; border-radius: 12px 0 0 12px; }
@media (max-width: 720px) { .lb-arrow { display: none; } }

/* ---------- 캘린더 ---------- */
.cal-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}
.cal-nav button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 0;
  box-shadow: var(--ring);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.cal-title { font-size: 19px; font-weight: 700; min-width: 140px; text-align: center; }

.cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day {
  min-height: 52px;
  padding: 4px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-day.other { background: transparent; border-color: transparent; }
.cal-day.today { border-color: var(--lapis); box-shadow: 0 0 0 1px var(--lapis) inset; }
.cal-num { font-size: 13px; font-weight: 500; text-align: center; }
.cal-day.today .cal-num { font-weight: 700; color: var(--lapis); }

.cal-bar {
  height: 5px;
  border-radius: 3px;
  margin-top: 1px;
}
.cal-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
}
/* 여행 색상 */
.c-lapis { background: var(--lapis); }
.c-gold  { background: var(--gold); }
.c-nile  { background: var(--nile); }
.c-rose  { background: var(--rose); }
.c-sand  { background: #b5a58a; }

.cal-legend { display: grid; gap: 6px; margin-top: 16px; }
.cal-legend-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--ring);
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.cal-legend-item small { font-size: 12px; font-weight: 400; color: var(--ink-soft); white-space: nowrap; }

/* ---------- 여행 추가 시트 ---------- */
.f-2col .range-tilde { text-align: center; align-self: center; color: var(--ink-soft); font-size: 18px; }
.member-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; }
.member-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--lapis-soft);
  color: var(--lapis);
  font-size: 14px;
  font-weight: 500;
}
.member-tag button {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  display: grid; place-items: center;
  background: rgba(30, 43, 79, .15);
  color: var(--lapis);
  cursor: pointer;
  padding: 0;
}
.member-tag button .i { width: 12px; height: 12px; stroke-width: 2.4; }
.member-add-row { display: flex; gap: 8px; margin-top: 8px; }
.member-add-row .f-input { flex: 1; }
/* 사람·도시 '＋ 추가': 회색 묶음 바탕에 묻히지 않게 파란 버튼 */
.add-btn {
  flex: none; display: inline-flex; align-items: center; gap: 3px;
  font: inherit; font-size: 15px; font-weight: 700;
  padding: 0 16px 0 12px; border: 0; border-radius: 12px;
  background: var(--lapis); color: #fff; cursor: pointer;
}
.add-btn .i { width: 18px; height: 18px; stroke-width: 2.2; }
.add-btn:active { transform: scale(.97); }

.cur-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.cur-chip {
  font: inherit;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
/* 통화 고르기: 이름이 같은 통화(파운드·페소 등)가 있어서 국기로 구분 */
.cur-chip .flag { font-size: 15px; }
.cur-chip.on { background: var(--lapis); border-color: var(--lapis); color: #fff; font-weight: 700; }
.cur-chip.fixed { background: var(--sand-deep); border-color: var(--sand-deep); color: var(--ink); cursor: default; opacity: .8; }

/* ---------- 뒤로가기 (하위 페이지 머리) ---------- */
.back-home {
  display: inline-flex; align-items: center; gap: 2px;
  margin-left: -6px; padding: 8px 8px 8px 0;
  font-size: 14px; font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.back-home .i { width: 20px; height: 20px; }
.back-home:hover { color: var(--ink); }
.member-empty { font-size: 13px; color: var(--ink-soft); align-self: center; }

/* ---------- 여행 경로 편집 ---------- */
.map-edit { display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 32px); margin: 0 16px 14px; padding: 10px; font: inherit; font-size: 14px; font-weight: 700; color: var(--lapis); background: var(--lapis-soft); border: 0; border-radius: 12px; cursor: pointer; }
.map-edit .i { width: 18px; height: 18px; }
.r-search-row { display: flex; gap: 8px; }
.r-search-row .f-input { flex: 1; }
.r-results { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }   /* 긴 주소가 칸을 밀어내지 않게 */
.r-results li { min-width: 0; }
.r-results:empty { display: none; }
.r-results button { width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; }
.r-results b { display: block; font-size: 15px; }
.r-results small { display: block; font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-loading { font-size: 13px; color: var(--ink-soft); padding: 8px 2px; }
.r-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.r-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--sand); }
.r-list li.r-empty { display: block; font-size: 13px; color: var(--ink-soft); text-align: center; padding: 18px; }
.r-no { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--lapis); color: #fff; font-size: 12px; font-weight: 700; }
.r-body b { font-size: 15px; }
.r-fields { display: flex; gap: 6px; margin-top: 6px; }
.r-fields select { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); max-width: 46%; }
.r-btns { display: flex; gap: 2px; }
.r-btns button { display: grid; place-items: center; width: 32px; height: 34px; border: 0; border-radius: 8px; background: #fff; color: var(--lapis); font-size: 13px; cursor: pointer; }
.r-btns .i { width: 16px; height: 16px; }
.r-btns button:disabled { opacity: .3; }
.r-btns [data-del] { color: var(--rose); }

/* ---------- 새 여행 만들기 창 ---------- */
.t-group { padding: 14px 14px 16px; margin-top: 12px; border-radius: 16px; background: var(--sand); }
.t-group .f-label:first-child { margin-top: 0; }
.f-hint { margin: -2px 2px 6px; font-size: 12px; color: var(--ink-soft); }
/* 여행 기간: 버튼 하나 + 달력 (시작일 → 끝나는 날) */
.range-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font: inherit; text-align: left; cursor: pointer;
  padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.range-btn[aria-expanded="true"] { border-color: var(--lapis); }
.range-text { display: flex; flex-direction: column; min-width: 0; }
.range-text b { font-size: 16px; font-weight: 600; }
.range-text small { font-size: 13px; color: var(--ink-soft); }
.range-text small:empty { display: none; }
.range-btn.empty b { font-weight: 400; color: var(--ink-faint); }
.range-btn > .i { color: var(--ink-faint); }
.rcal { margin-top: 8px; padding: 12px 10px 10px; border-radius: 14px; background: #fff; box-shadow: var(--ring); }
.rcal-head { display: flex; align-items: center; justify-content: space-between; }
.rcal-head b { font-size: 16px; }
.rcal-nav { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.rcal-nav:active { background: var(--sand); }
.rcal-hint { margin: 0 0 6px; text-align: center; font-size: 13px; color: var(--lapis); font-weight: 600; }
.rcal-dow, .rcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.rcal-dow span { text-align: center; font-size: 12px; color: var(--ink-faint); padding: 4px 0; }
.rcal-grid button {
  position: relative; height: 44px; padding: 0; border: 0; background: none;
  font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink); cursor: pointer;
}
.rcal-grid button span { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; }
/* 기간 띠: 사이 날짜는 꽉 채우고, 시작·끝은 반쪽만 */
.rcal-grid button.in::before,
.rcal-grid button.start:not(.end)::before,
.rcal-grid button.end:not(.start)::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 0; right: 0; background: var(--lapis-soft); }
.rcal-grid button.start:not(.end)::before { left: 50%; }
.rcal-grid button.end:not(.start)::before { right: 50%; }
.rcal-grid button.start span, .rcal-grid button.end span { background: var(--lapis); color: #fff; font-weight: 700; }
.rcal-grid button.today span { box-shadow: inset 0 0 0 1px var(--ink-faint); }
/* 사람·도시 태그: 비어 있으면 자리를 차지하지 않게 */
.member-tags { min-height: 0; margin-top: 8px; }
.member-tags:empty { display: none; }
.member-add-row { margin-top: 6px; }

/* 지도: 이동 경로 / 다닌 곳 전환 · 일정 장소 */
.map-mode { margin: 0 16px 10px; }
.map-mode button { font-size: 13px; padding: 8px 4px; }
.spot-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.spot-dot.visited { background: var(--gold); }
.p-place { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--sand); font-size: 15px; }
.p-place span { display: inline-flex; align-items: center; gap: 5px; }
.p-place .i { width: 17px; height: 17px; color: var(--ink-soft); }
.p-place button { display: grid; border: 0; background: none; color: var(--ink-soft); cursor: pointer; }

/* 새 여행 창: 표지 사진 */
.t-cover { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #fff; border: 1.5px dashed #d3d8e0; }
.t-cover.has { border: 0; }
.t-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.t-cover:not(.has) img { display: none; }
.t-cover-btns { position: absolute; inset: auto 10px 10px auto; display: flex; gap: 6px; }
.t-cover:not(.has) .t-cover-btns { inset: 0; justify-content: center; align-items: center; }
.t-cover-btn { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 13px 8px 10px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .95); color: var(--ink); cursor: pointer; box-shadow: 0 1px 6px rgba(0, 0, 0, .15); }
.t-cover:not(.has) .t-cover-btn { box-shadow: none; background: none; color: var(--ink-soft); }
.t-cover-btn .i { width: 17px; height: 17px; }

/* 항공편 추가·수정 창 */
.l-air { margin: 6px 2px 0; font-size: 13px; font-weight: 600; color: var(--lapis); }
.l-air:empty { display: none; }
.l-time { margin-top: 8px; }
.l-hint { margin: 8px 2px 0; }
#flight-empty small { font-size: 13px; color: var(--ink-faint); }
#flight-empty .add-wide { margin-top: 16px; }
#flight-restore:empty { display: none; }

/* 회비: 회비에서 빼는 것 */
.sep-card { margin-top: 12px; padding: 14px 16px 6px; }
.sep-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.sep-head b { font-size: 15px; }
.sep-edit { position: relative; display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 13px; font-weight: 600; color: var(--lapis); background: var(--lapis-soft); border: 0; border-radius: 99px; padding: 6px 12px 6px 10px; cursor: pointer; }
.sep-edit::after { content: ""; position: absolute; inset: -6px; }
.sep-edit .i { width: 15px; height: 15px; }
.sep-list { list-style: none; margin: 0; padding: 0; }
.sep-list li { border-top: 1px solid var(--line); }
.sep-list li:first-child { border-top: 0; }
.sep-list li, .sep-list a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; }
.sep-list li:has(> a) { display: block; padding: 0; }
.sep-list a { color: var(--ink); text-decoration: none; }
.sep-list a > .i { width: 18px; height: 18px; color: var(--ink-faint); }
.sep-list b { font-variant-numeric: tabular-nums; }
.sep-name { font-size: 15px; font-weight: 600; }
.sep-name small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.sep-list .sep-empty { display: block; padding: 8px 0 10px; font-size: 14px; color: var(--ink-soft); }
.stay-row a { display: contents; color: inherit; text-decoration: none; }
.exp-list li.stay-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
.sep-rows { display: grid; gap: 8px; margin-top: 12px; }
.sep-row { border-radius: 14px; background: #fff; box-shadow: var(--ring); overflow: hidden; }
.sep-row.on { box-shadow: 0 0 0 2px var(--lapis); }
.sep-toggle { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; font: inherit; font-size: 15px; font-weight: 600; text-align: left; color: var(--ink); background: none; border: 0; cursor: pointer; }
.sep-toggle > .i { color: var(--ink-soft); }
.sep-toggle span { flex: 1; }
.sep-toggle small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-faint); }
.sep-check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #d3d8e0; color: transparent; }
.sep-check .i { width: 15px; height: 15px; stroke-width: 2.6; }
.sep-row.on .sep-check { background: var(--lapis); border-color: var(--lapis); color: #fff; }
.sep-who { padding: 0 14px 12px 44px; }
.sep-who small { display: block; margin-bottom: 6px; font-size: 12px; color: var(--ink-soft); }
.sep-who .chip-row button { font-size: 13px; padding: 6px 12px; }

/* 회비: 뺀 분류 줄(눌러서 목록) · 목록 창 · 지출 수정 */
.sep-list button.sep-open { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; font: inherit; text-align: left; color: var(--ink); background: none; border: 0; cursor: pointer; }
.sep-list li:has(> button) { display: block; padding: 0; }
.sep-list button.sep-open > .i { width: 18px; height: 18px; color: var(--ink-faint); }
.sepv .sheet-title { margin-bottom: 0; }
.sepv-who { margin: 0 2px 12px; font-size: 13px; color: var(--ink-soft); }
.sepv .budget-total { margin-bottom: 4px; }
.sepv .exp-day:first-child { margin-top: 8px; }
.sepv .empty-state { margin-top: 12px; }
#sheet { z-index: 55; }   /* 뺀 분류 목록 위에서 추가·수정 창이 뜨도록 */
#spend .section-head .view-cur { flex-shrink: 0; }
.exp-list li[data-kind=expense] { grid-template-columns: 34px minmax(0, 1fr) auto; }
.exp-list li[data-kind=expense]:active { background: var(--sand); }
.stay-total .view-cur { margin-top: 12px; }

/* 회비 도시 탭: 금액이 없으면 아래 빈 줄 없이 (금액 있는 탭과 섞여도 가운데 정렬) */
#spend .seg button { display: flex; flex-direction: column; justify-content: center; }
#spend .seg button small:empty { display: none; }

/* 일정: 이곳까지 어떻게 가요 */
.p-move button { display: inline-flex; align-items: center; gap: 4px; }
.p-move .i { width: 16px; height: 16px; }

/* 가족 비밀번호 창 (처음 들어올 때) */
body.gate-open { overflow: hidden; }
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px 20px; background: var(--sand); }
.gate-box { width: 100%; max-width: 340px; text-align: center; }
.gate-ico { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; color: var(--lapis); background: var(--lapis-soft); }
.gate-ico .i { width: 26px; height: 26px; }
.gate h1 { margin: 0 0 6px; font-size: 24px; }
.gate p { margin: 0 0 20px; font-size: 15px; color: var(--ink-soft); }
.gate .f-input { text-align: center; font-size: 22px; letter-spacing: .3em; padding: 14px; }
.gate .f-input::placeholder { font-size: 16px; letter-spacing: 0; }
.gate-err { min-height: 1.4em; margin: 10px 0 12px !important; font-size: 14px !important; color: var(--rose) !important; }
.gate .btn-main { width: 100%; }

/* ---------- 하루 크게 보기 (지도 + 일정) ---------- */
article.day { display: grid; grid-template-columns: 56px minmax(0, 1fr) 12px; gap: 14px; align-items: center; padding: 16px; cursor: pointer; }
article.day:hover, article.day:focus-visible { box-shadow: 0 0 0 2px var(--lapis-soft), var(--ring); outline: 0; }
article.day.today:hover, article.day.today:focus-visible { box-shadow: 0 0 0 2px var(--lapis); }
article.day .chev { width: 9px; height: 9px; border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint); transform: rotate(-45deg); justify-self: center; }
.day-map-hint { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px !important; font-size: 12px !important; color: var(--lapis) !important; }
.day-map-hint .i { width: 13px; height: 13px; }

body.dv-open { overflow: hidden; }
.dayview {
  position: fixed; inset: 0; z-index: 45;
  display: grid; grid-template-rows: auto auto auto minmax(0, 1fr);
  background: var(--sand);
  padding-top: env(safe-area-inset-top, 0px);
}
.dv-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.dv-x { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--sand); color: var(--ink); cursor: pointer; }
.dv-x .i { width: 18px; height: 18px; }
.dv-head { min-width: 0; }
.dv-head b { display: block; font-size: 16px; }
.dv-head small { display: block; font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-map { height: 40vh; min-height: 200px; background: var(--sand-deep); }
.dv-map.map-off { display: grid; place-items: center; padding: 20px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.dv-bar { padding: 10px 16px; background: var(--lapis-soft); border-bottom: 1px solid var(--line); font-size: 13px; }
.dv-bar b { display: block; font-size: 13px; color: var(--ink); }
.dv-bar span { color: var(--lapis); font-weight: 600; }
.dv-bar .dv-bar-note { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.dv-body { overflow-y: auto; padding: 4px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
/* 일정 하나 = 카드 */
.dv-plan { list-style: none; display: grid; gap: 10px; margin: 12px 0 0; padding: 0; }
.dv-card {
  position: relative; padding: 12px 14px; border-radius: 14px;
  background: var(--paper); box-shadow: var(--ring); cursor: pointer;
  border-left: 3px solid transparent;
}
.dv-card.on { border-left-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), var(--ring); }
.dv-card:focus-visible { outline: 2px solid var(--lapis); outline-offset: 2px; }
.dv-c-head { display: flex; align-items: center; gap: 8px; }
.dv-c-ico { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 9px; background: var(--sand); color: var(--lapis); }
.dv-c-ico .i { width: 16px; height: 16px; }
.dv-c-head time { font-size: 14px; font-weight: 700; color: var(--lapis); font-variant-numeric: tabular-nums; }
.dv-no { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--lapis); color: #fff; font-size: 12px; font-weight: 700; }
.dv-card.on .dv-no { background: var(--gold); }
.dv-edit { display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; border: 0; border-radius: 50%; background: none; color: var(--ink-faint); cursor: pointer; }
.dv-edit .i { width: 16px; height: 16px; }
.dv-edit:hover { background: var(--sand); color: var(--ink); }
.dv-c-title { margin: 8px 0 0; font-size: 16px; font-weight: 600; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.dv-c-memo { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.dv-c-place, .dv-c-dur { display: flex; align-items: center; gap: 5px; margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }
.dv-c-place .i, .dv-c-dur .i { width: 14px; height: 14px; flex: none; color: var(--ink-faint); }
.dv-c-dur { font-weight: 600; color: var(--lapis); }
.dv-c-dur small { font-weight: 400; color: var(--ink-faint); }
.pin.dv-pin.on { background: var(--gold, var(--accent)); border-color: #fff; transform: scale(1.15); }

/* ---------- 위쪽 바: 왼쪽 홈(메인) · 오른쪽 메뉴 (assets/nav.js) ---------- */
:root { --bar-h: 52px; }
.top-bar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px;
  height: calc(var(--bar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 8px 0;
  background: rgba(244, 245, 247, .9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, transform .25s;
}
.top-bar.scrolled { border-bottom-color: var(--line); }
.top-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; text-decoration: none;
}
.top-btn:hover { background: var(--sand-deep); }
.top-btn:active { transform: scale(.94); }
.top-btn .i { width: 23px; height: 23px; }
.top-title { text-align: center; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s; }
.top-title.on { opacity: 1; }
/* 여행 홈: 표지에 버튼이 따로 있어서, 표지를 지나 내려가면 위쪽 바가 내려온다 */
.top-bar.float { position: fixed; left: 0; right: 0; transform: translateY(-100%); }
.top-bar.float.scrolled { transform: none; }

/* 메뉴 (오른쪽에서 나옴) */
body.menu-open { overflow: hidden; }
.menu-back {
  position: fixed; inset: 0; z-index: 47;
  display: flex; justify-content: flex-end;
  background: rgba(var(--shadow-rgb), .4);
  animation: menu-fade .18s ease-out;
}
.menu-panel {
  width: min(300px, 84vw); height: 100%; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  box-shadow: -8px 0 24px rgba(var(--shadow-rgb), .12);
  animation: menu-in .24s cubic-bezier(.2, .8, .3, 1);
}
@keyframes menu-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes menu-fade { from { opacity: 0; } to { opacity: 1; } }
.menu-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0 12px 10px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.menu-head b { display: block; font-size: 18px; line-height: 1.3; }
.menu-head small { display: block; font-size: 13px; color: var(--ink-soft); }
.menu-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu-panel li a {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 12px; border-radius: 12px;
  color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 500;
}
.menu-panel li a .i { width: 22px; height: 22px; flex: none; color: var(--ink-soft); }
.menu-panel li a:hover, .menu-panel li a:focus-visible { background: var(--sand); outline: 0; }
.menu-panel li a[aria-current="page"] { background: var(--lapis-soft); color: var(--lapis); font-weight: 700; }
.menu-panel li a[aria-current="page"] .i { color: var(--lapis); }
.menu-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--rose); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }

/* ---------- PC 화면 ---------- */
/* 위쪽 바의 홈·메뉴 버튼을 화면 끝이 아니라 내용 폭 끝에 맞춘다 */
.top-bar { padding-left: max(8px, calc((100% - var(--w)) / 2 - 10px)); padding-right: max(8px, calc((100% - var(--w)) / 2 - 10px)); }
@media (min-width: 900px) {
  /* 메인 탭: 화면 전체로 늘어나지 않게 */
  .main-tabs { grid-auto-columns: minmax(0, 150px); justify-content: center; }
  /* '+ 추가' 버튼도 내용 폭 오른쪽 끝에 */
  .fab { right: max(16px, calc((100vw - var(--w)) / 2)); bottom: 28px; }
}

@media (min-width: 1024px) {
  /* 2단으로 나누는 페이지는 넓게 */
  :root:has(#budget), :root:has(#route), :root:has(#spend), :root:has(#tab-trips) { --w: 1120px; }

  /* 여행 홈: 왼쪽 칸(시계 · 환율 · 여행 정보) / 오른쪽 칸(예상 금액 · 꼭 해볼 것) */
  main.home { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 32px; align-items: start; }
  main.home .home-col { display: block; min-width: 0; }
  main.home .home-b > section:first-child { padding-top: 20px; }

  /* 일정: 왼쪽 날짜 목록 / 오른쪽 지도 (스크롤해도 따라옴) */
  main:has(> #route) {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    column-gap: 32px; align-items: start;
  }
  main:has(> #route) > #days { grid-column: 1; grid-row: 1; padding-top: 20px; min-width: 0; }
  main:has(> #route) > #route { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--bar-h) + 16px); min-width: 0; }
  main:has(> #route) .map { height: min(58vh, 560px); }

  /* 회비: 왼쪽 총액 · 빼는 것 (따라옴) / 오른쪽 지출 내역 */
  main:has(> #spend) {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 32px; align-items: start;
  }
  main:has(> #spend) > #fund { grid-column: 1; grid-row: 1; position: sticky; top: calc(var(--bar-h) + 16px); min-width: 0; }
  main:has(> #spend) > #spend { grid-column: 2; grid-row: 1; padding-top: 20px; min-width: 0; }

  /* 메인: 여행 카드를 여러 칸으로 ('새 여행 만들기'도 같은 칸 크기로 나란히) */
  #tab-trips:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; align-items: stretch; }
  #trip-list { display: contents; }
  #trip-list > *, #tab-trips > .add-wide { margin: 0; }
  #trip-list > .trip-card-wrap { display: flex; }
  #trip-list > .trip-card-wrap > .trip-card { flex: 1; }
  #tab-trips > .add-wide { height: auto; min-height: 104px; }
  /* 여행이 없을 때: 안내 글 한 줄 → 그 아래 가운데 '새 여행 만들기' (칸 나누지 않음) */
  #trip-list > .empty-msg { grid-column: 1 / -1; padding: 48px 16px 8px; }
  #tab-trips:has(.empty-msg) > .add-wide { grid-column: 1 / -1; justify-self: center; width: 100%; max-width: 340px; min-height: 0; height: 52px; }

  /* 하루 크게 보기: 왼쪽 큰 지도 / 오른쪽 일정 */
  .dayview { grid-template-columns: minmax(0, 1fr) 440px; grid-template-rows: auto auto minmax(0, 1fr); }
  .dv-top { grid-column: 1 / -1; }
  .dv-map { grid-column: 1; grid-row: 2 / 4; height: auto; }
  .dv-bar { grid-column: 2; grid-row: 2; }
  .dv-body { grid-column: 2; grid-row: 3; border-left: 1px solid var(--line); }
}

/* ---------- 포인트 (단조롭지 않게) ---------- */
/* 섹션 제목 앞 색 아이콘 */
.section-head h2 { display: inline-flex; align-items: center; gap: 10px; }
.h-ico { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.h-ico .i { width: 17px; height: 17px; }
.h-ico.green { background: var(--green-soft); color: var(--green); }
.h-ico.coral { background: var(--accent-soft); color: var(--accent); }
.h-ico.violet { background: #eeebfb; color: #6d5bd0; }

/* 총액 카드 (예상 총 금액 · 회비 총액): 진한 남색으로 한눈에 */
.budget-total, .fund-total {
  background: linear-gradient(140deg, #1e2b4f 0%, #2d4175 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(30, 43, 79, .22);
}
.budget-total > span, .budget-total small, .fund-total > span, .fund-split small { color: rgba(255, 255, 255, .72); }
.budget-total .view-cur { background: rgba(255, 255, 255, .12); }
.budget-total .view-cur button { color: rgba(255, 255, 255, .78); }
.budget-total .view-cur button[aria-pressed="true"] { background: #fff; color: var(--primary); }
.fund-bar { background: rgba(255, 255, 255, .18); }
.fund-bar i { background: var(--accent); }
.fund-split strong.minus { color: #ffb4a6; }
.fund-who { border-top-color: rgba(255, 255, 255, .16); }
.fund-who span { background: rgba(255, 255, 255, .14); color: #fff; }
.fund-who .empty { color: rgba(255, 255, 255, .7); }

/* 날짜 카드의 날짜 칸: 옅은 남색 */
.day .num { background: var(--primary-soft); color: var(--primary); }
.day .num small { color: rgba(30, 43, 79, .7); }

/* ---------- 여행 설정: 도시별 일정 ---------- */
.city-plan { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.city-plan:empty { display: none; }
.cp-row {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto 28px; align-items: center; gap: 8px;
  padding: 10px 10px 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
}
.cp-no { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; }
.cp-main { min-width: 0; }
.cp-main b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-main small { display: block; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cp-step { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 2px; }
.cp-step button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; font: inherit; font-size: 17px; line-height: 1; color: var(--primary); cursor: pointer; }
.cp-step button:disabled { color: var(--ink-faint); cursor: default; }
.cp-step span { min-width: 34px; text-align: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cp-move { display: inline-flex; flex-direction: column; }
.cp-move button { width: 26px; height: 17px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-soft); cursor: pointer; padding: 0; }
.cp-move button:first-child .i { transform: rotate(180deg); }
.cp-move button:disabled { color: var(--line); cursor: default; }
.cp-move .i { width: 15px; height: 15px; }
.cp-del { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink-faint); cursor: pointer; }
.cp-del .i { width: 15px; height: 15px; }
.cp-del:hover { background: var(--fill); color: var(--red); }
.city-sum { margin: 8px 2px 0; font-size: 13px; color: var(--ink-soft); }
.city-sum:empty { display: none; }
.city-sum.ok { color: var(--green); font-weight: 600; }
.city-sum.warn { color: var(--accent); font-weight: 600; }
.city-sum.bad { color: var(--red); font-weight: 600; }

/* ---------- 여행 홈: 폰에서는 칸을 풀어 한 줄로 ---------- */
/* 시계 → 환율 → 예상 금액 → 꼭 해볼 것 → 여행 정보 (PC 는 'PC 화면'에서 두 칸) */
@media (max-width: 1023px) {
  main.home { display: flex; flex-direction: column; }
  main.home .home-col { display: contents; }
  .home #rates { order: 2; }
  .home #budget { order: 3; }
  .home #picks { order: 4; }
  .home #infos { order: 5; }
}
.home #clock { order: 1; padding-top: 20px; }

/* ---------- 꼭 해볼 것 (미션 · 도장 깨기) ---------- */
.h-ico.gold { background: #fdf1d8; color: #b7791f; }
.picks-progress { display: flex; align-items: center; gap: 10px; margin: -2px 2px 12px; }
.pp-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.pp-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #f5a524); transition: width .5s ease; }
#pp-text { font-size: 13px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
#picks .seg button { display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
#picks .seg button small { font-size: 11px; font-weight: 500; color: var(--ink-faint); min-height: 1.3em; font-variant-numeric: tabular-nums; }
#picks-list { display: grid; gap: 10px; margin-top: 12px; }
.pick { position: relative; background: var(--surface); box-shadow: var(--ring); border-radius: var(--radius); padding: 14px 16px 12px; }
.pick-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pick-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.pick-ico .i { width: 16px; height: 16px; }
.pick-city { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.pick-plan { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--primary); background: var(--primary-soft); padding: 2px 8px 2px 6px; border-radius: 99px; }
.pick-plan .i { width: 12px; height: 12px; }
.pick-check {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 11px 5px 8px;
  border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer;
}
.pick-check .i { width: 14px; height: 14px; }
.pick-check[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.pick h3 { margin: 10px 0 2px; font-size: 16.5px; line-height: 1.4; word-break: keep-all; }
.pick-desc { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.pick-spots { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.pick-spots a { display: grid; grid-template-columns: 22px minmax(0, 1fr) 16px; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; background: var(--bg); color: var(--ink); text-decoration: none; }
.pick-spots a:hover { background: var(--fill); }
.ps-no { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 700; }
.ps-no .i { width: 12px; height: 12px; }
.ps-text { min-width: 0; }
.ps-text b { display: block; font-size: 14px; line-height: 1.35; }
.ps-text small { display: block; font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
.pick-spots a > .i { width: 15px; height: 15px; color: var(--ink-faint); }
.pick-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pick-wish { display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; font-size: 12.5px; font-weight: 600; color: var(--red); text-decoration: none; }
.pick-wish .i { width: 14px; height: 14px; }
.pick-del { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink-faint); cursor: pointer; }
.pick-del .i { width: 15px; height: 15px; }
.pick-del:hover { background: var(--fill); color: var(--red); }
/* 해본 미션: '성공!' 도장 */
.pick.done h3, .pick.done .pick-desc { padding-right: 68px; }
.pick.done h3 { color: var(--ink-soft); }
.pick.done::after {
  content: "성공!"; position: absolute; right: 16px; top: 48px;
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  border: 2.5px solid var(--accent); color: var(--accent); font-size: 14px; font-weight: 800;
  transform: rotate(-14deg); opacity: .85; pointer-events: none;
}


/* ---------- 회원 화면 (AWS 서버 버전 · assets/account.js) ---------- */
.acct-gate { overflow-y: auto; align-items: start; padding: max(48px, env(safe-area-inset-top, 0px)) 20px 40px; }
.acct-box { max-width: 380px; margin: 0 auto; text-align: center; }
.acct-box form { text-align: left; margin-top: 8px; }
.acct-box .f-label { display: block; margin: 12px 0 6px; }
.acct-gate .f-input { text-align: left; font-size: 16px; letter-spacing: 0; padding: 12px 14px; }
.acct-gate .f-input::placeholder { font-size: 14px; }
.acct-box .btn-main { width: 100%; margin-top: 6px; }
.acct-links { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; color: var(--ink-faint); flex-wrap: wrap; }
.acct-links button { font: inherit; color: var(--primary); background: none; border: 0; padding: 4px 2px; cursor: pointer; font-weight: 600; }
.acct-note { font-size: 13px !important; color: var(--ink-soft) !important; background: var(--fill); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px !important; }
.acct-ok { font-size: 14px; color: var(--green); font-weight: 600; margin: 8px 0; }
.acct-home { display: block; text-align: center; text-decoration: none; margin-top: 18px; }

/* 메인 위쪽 '가족' 버튼 · 공지 */
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acct-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; color: var(--primary); background: var(--primary-soft); border: 0; border-radius: 99px; padding: 8px 14px 8px 11px; cursor: pointer; white-space: nowrap; }
.acct-btn .i { width: 17px; height: 17px; }
.site-notice { max-width: calc(var(--w) + 32px); margin: 0 auto 6px; padding: 10px 16px; font-size: 14px; color: var(--primary); background: var(--primary-soft); border-radius: 12px; }
.trip-group { display: inline-block; margin-left: 6px; padding: 1px 8px; font-size: 11px; font-weight: 600; color: var(--primary); background: var(--primary-soft); border-radius: 99px; }

/* 가족 · 내 계정 창 */
.fam-help { font-size: 13px; color: var(--ink-soft); margin: 0 0 12px; }
.fam-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: var(--bg); }
.fam-top { display: flex; align-items: center; gap: 8px; }
.fam-top b { font-size: 16px; }
.fam-tag { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 99px; }
.fam-code { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.fam-code code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 17px; font-weight: 700; letter-spacing: .06em; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; }
.fam-code button, .fam-actions button { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--primary); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 5px 10px; cursor: pointer; }
.fam-code .i, .fam-actions .i { width: 13px; height: 13px; }
.fam-actions button.danger { color: var(--red); }
.fam-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fam-members span { font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; }
.fam-members small { margin-left: 4px; color: var(--ink-faint); font-size: 11px; }
.fam-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fam-join { margin-top: 6px; }
.fam-me { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.fam-me small { color: var(--ink-soft); }

/* ---------- 트립메이트: '내 그룹' 메인 · 그룹 메인 위쪽 (assets/account.js) ---------- */
body.groups-home .main-tabs, body.groups-home .main-section { display: none !important; }
.groups-home-list { padding-top: 20px; }
.gh-title { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 12px; }
.gh-title h2 { margin: 0; font-size: 19px; }
.gh-title span { color: var(--ink-faint); font-size: 14px; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.group-card { position: relative; display: block; padding: 16px 44px 16px 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--ring); color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.group-card:hover { box-shadow: 0 0 0 2px var(--primary-soft), var(--ring); transform: translateY(-1px); }
.gc-top { display: flex; align-items: center; gap: 8px; }
.gc-top b { font-size: 17px; }
.gc-meta { margin: 4px 0 10px; font-size: 13px; color: var(--ink-soft); }
.gc-people { display: flex; }
.gc-people span { width: 28px; height: 28px; margin-right: -6px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--primary); background: var(--primary-soft); border: 2px solid var(--surface); }
.gc-next { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); }
.gc-next .i { width: 15px; height: 15px; color: var(--ink-faint); }
.gc-next b { margin-left: auto; color: var(--accent); }
.gc-go { position: absolute; right: 14px; top: 18px; color: var(--ink-faint); }
.gc-go .i { width: 18px; height: 18px; }
.gh-empty p { line-height: 1.7; }
.gh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.gh-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; flex: 1 1 200px; }
.gh-actions .i { width: 18px; height: 18px; }
/* PC: 반반 나누지 않고 왼쪽에 보통 크기 버튼 두 개 */
@media (min-width: 700px) {
  .gh-actions { margin-top: 18px; }
  .gh-actions button { flex: 0 0 auto; min-height: 0; height: 42px; padding: 0 18px; font-size: 14.5px; border-radius: 12px; }
  .gh-actions .btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
  .gh-actions .i { width: 16px; height: 16px; }
}

/* 그룹 메인 위쪽 */
.gh-left { min-width: 0; }
.gh-left h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-back { display: inline-flex; align-items: center; gap: 2px; margin-left: -4px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.gh-back .i { width: 17px; height: 17px; }
.gh-right { display: flex; align-items: center; gap: 8px; flex: none; }
.gh-code, .gh-manage { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; font: inherit; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); }
.gh-code small { font-size: 11px; color: var(--ink-faint); }
.gh-code code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 15px; letter-spacing: .05em; }
.gh-code .i { width: 15px; height: 15px; color: var(--ink-faint); }
.gh-code.copied { border-color: var(--green); }
.gh-code.copied .i { color: var(--green); }
.gh-code.copied small::after { content: " · 복사됨"; color: var(--green); }
.gh-manage { font-weight: 700; color: var(--primary); background: var(--primary-soft); border-color: transparent; }
.gh-manage .i { width: 17px; height: 17px; }
@media (max-width: 520px) { .gh-code small { display: none; } .gh-code { padding: 0 10px; } }

/* 창 안 입력 · 계정 정보 */
.sh-submit { width: 100%; margin-top: 12px; }
/* 계정 · 그룹 창: 빈 오류 줄이 자리 차지 않게 → '들어가기' 바로 아래 '닫기' */
#acct-body .gate-err:empty { display: none; }
#acct-body .sheet-actions.one { margin-top: 8px; }
#acct-body .gate-err { margin: 10px 0 0 !important; }
.sh-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.acct-info { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 4px 0 16px; font-size: 14.5px; }
.acct-info dt { color: var(--ink-soft); }
.acct-info dd { margin: 0; }
.fam-tag.ok { color: var(--green); background: var(--green-soft); }

/* ---------- PC 화면 정리 (1024px 이상) ----------
   모든 페이지 같은 폭 · '+ 추가' 버튼은 제목 줄 오른쪽 위 · 한 줄로 길게 늘어지는 곳은 칸 나누기 */
@media (min-width: 1024px) {
  :root { --w: 1120px; }

  /* '+ 추가' · '+ 사진': 화면 아래 구석이 아니라 제목 오른쪽 (스크롤하면 같이 올라감) */
  .fab {
    position: absolute; top: calc(var(--bar-h) + 8px); bottom: auto;
    right: max(16px, calc((100% - var(--w)) / 2));
    padding: 10px 18px 10px 14px; font-size: 14.5px;
    box-shadow: 0 4px 12px rgba(30, 43, 79, .18);
  }

  /* 여행 홈: 위 2단(시계 · 환율 · 여행 정보 / 예상 금액) → 아래 '꼭 해볼 것' 전체 폭 3칸 */
  main.home .home-col.home-b { display: contents; }
  main.home .home-a { grid-column: 1; grid-row: 1; }
  main.home #budget { grid-column: 2; grid-row: 1; }
  main.home #picks { grid-column: 1 / -1; grid-row: 2; }
  #picks .seg { max-width: 520px; }
  #picks-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  #picks-list > .pick { margin: 0; }
  #picks-list > .empty-state { grid-column: 1 / -1; }

  /* 숙소: 총액 칩 한 줄 · 숙소 카드 2칸 */
  .stay-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stay-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* 하고 싶은 것: 왼쪽 쓰는 칸(따라옴) / 오른쪽 목록 */
  #wishes { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 32px; align-items: start; }
  #wishes > .wish-form { position: sticky; top: calc(var(--bar-h) + 16px); grid-column: 1; margin: 0; }
  #wishes > :not(.wish-form) { grid-column: 2; }
  #wishes > #wish-list { margin-top: 0; }

  /* 회비 분류: 옆으로 넘기지 않고 4칸씩 */
  .cat-btns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin: 0 0 14px; padding: 2px 0 6px; }
  .cat-btns button { min-width: 0; grid-template-columns: auto minmax(0, 1fr); }

  /* 항공: 나란한 두 카드의 체크인 버튼 높이 맞추기 (카드 맨 아래로) */
  .card.route { display: flex; flex-direction: column; }
  .card.route > .links { margin-top: auto; padding-top: 12px; }

  /* 사진: 한 줄에 더 많이 */
  .photo-grid, .gallery-row { grid-template-columns: repeat(6, 1fr); }
}
