/* =====================================================================
   트래블 스크랩북 테마 (청량한 빈티지)
   - 하늘색·바다색·민트 + 산호 포인트, 깨끗한 흰 모눈 종이
   - 옛 지도, 우표, 소인, 짐 꼬리표, 기차표, 항공 우편 봉투, 사진 모서리
   - 모든 요소는 반듯하게 (기울이기 없음)
   - 글꼴: 나눔손글씨 갈맷글 (fonts/galmaet.woff2)
   app.css 뒤에 불러와서 색·모양만 덮어써요 (기능·배치는 그대로)
   ===================================================================== */
@font-face {
  font-family: "Galmaet";
  src: url("fonts/galmaet.woff2") format("woff2");
  font-display: swap;
}
:root {
  --ink: #24364d;
  --sky: #4a9fd8;
  --ocean: #2f6f9f;
  --deep: #1f5378;
  --mint: #7fcfc2;
  --mint-d: #3e9c8f;
  --coral: #ef7f68;
  --coral-d: #c9604a;
  --aqua: #e6f3f8;
  --paper: #fcfcf9;
  --grid: #e3ecf1;
  --edge: #c9dce6;
  --tag: #9fc9df;

  --accent: var(--sky);
  --accent-soft: var(--aqua);
  --bg: var(--paper);
  --card: #ffffff;
  --text: var(--ink);
  --muted: #6f8597;
  --line: #d6e3ea;
  --danger: #d4543b;
  --radius: 4px;
  --font: "Galmaet", "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --airmail: repeating-linear-gradient(-45deg, var(--coral) 0 10px, #fff 10px 16px, var(--sky) 16px 26px, #fff 26px 32px);
  --corners:
    linear-gradient(135deg, var(--deep) 11px, transparent 11px) top left / 22px 22px no-repeat,
    linear-gradient(225deg, var(--deep) 11px, transparent 11px) top right / 22px 22px no-repeat,
    linear-gradient(45deg, var(--deep) 11px, transparent 11px) bottom left / 22px 22px no-repeat,
    linear-gradient(315deg, var(--deep) 11px, transparent 11px) bottom right / 22px 22px no-repeat;
}

/* ---------- 모눈 종이와 글꼴 ---------- */
body, button, input, select, textarea { font-family: var(--font); }
body {
  font-size: 17px; color: var(--ink); background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
}
h2, h3, .brand, .pd-name, .tl-date, .cm-title { font-weight: 400; color: var(--ocean); }
h2 { font-size: 30px; }
h3 { font-size: 22px; color: var(--ink); }
b, strong { font-weight: 400; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 15px; }

/* ---------- 입력칸 ---------- */
.field > span { font-size: 16px; font-weight: 400; color: var(--ocean); letter-spacing: .5px; }
.field input, .field select, .field textarea, .search-row input, .cm-form input, .bulk-name, .bulk-card select, .bulk-card .grid2 input, .link-box {
  border: 1.5px solid var(--edge); border-radius: 4px; background: #fff; font-size: 18px; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus, .search-row input:focus, .cm-form input:focus, .bulk-name:focus {
  outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(74, 159, 216, .18);
}
.field textarea {
  background-image: repeating-linear-gradient(transparent, transparent 27px, var(--line) 27px, var(--line) 28px);
  line-height: 28px; padding-top: 8px;
}

/* ---------- 버튼 ---------- */
.primary { background: var(--sky); color: #fff; border: 0; border-bottom: 3px solid var(--ocean); border-radius: 4px; font-size: 21px; font-weight: 400; padding: 12px; }
.primary:active { border-bottom-width: 1px; transform: translateY(2px); }
.primary:disabled { opacity: .55; }
.btn { background: #fff; color: var(--ocean); border: 1.5px solid var(--tag); border-radius: 4px; font-size: 17px; font-weight: 400; }
.btn.danger { color: var(--danger); border-color: #f0b4a6; }
.search-row button, .cm-form button { background: var(--ocean); color: #fff; border-radius: 4px; font-size: 19px; font-weight: 400; }
.chip-btn { background: #fff; color: var(--ocean); border: 1.5px dashed var(--tag); border-radius: 4px; font-size: 18px; font-weight: 400; }
.link { color: var(--ocean); font-size: 18px; font-weight: 400; }

/* ---------- 로그인: 항공 우편 봉투 ---------- */
.auth-card {
  position: relative; background: #fff; border: 7px solid; border-image: var(--airmail) 7; padding: 30px 22px 22px;
}
.auth-card::before { content: "Travel Scrapbook"; display: block; font-size: 18px; color: var(--muted); letter-spacing: 1px; }
.auth-card::after { /* 우표 */
  content: "✈"; position: absolute; top: 16px; right: 16px; width: 54px; height: 62px; display: flex; align-items: center; justify-content: center;
  background: var(--mint); color: #fff; font-size: 26px; border: 4px dotted #fff; outline: 1.5px solid var(--edge);
}
.brand { font-size: 38px; color: var(--ocean); margin-top: 2px; }
.seg { background: var(--aqua); border-radius: 4px; }
.seg button { font-size: 19px; font-weight: 400; color: var(--muted); border-radius: 3px; }
.seg button.on { background: #fff; color: var(--ocean); box-shadow: inset 0 -3px 0 var(--sky); }
.invite-banner { background: var(--aqua); color: var(--ink); border: 1.5px solid var(--tag); border-radius: 4px; font-size: 16px; }
.invite-banner b { color: var(--ocean); }
.invite-banner.error { background: #fdece8; color: var(--danger); border-color: #f0b4a6; }

/* ---------- 위·아래 막대 ---------- */
.topbar { background: var(--ocean); border-bottom: 4px double #a9d4ef; }
.topbar select { background: #fff; color: var(--ink); border: 0; border-radius: 4px; font-size: 19px; font-weight: 400; }
.avatar { background: #fff; color: var(--ocean); border: 2px solid #a9d4ef; font-size: 20px; font-weight: 400; }
.cm .avatar, .member .avatar { background: var(--aqua); border-color: var(--tag); font-size: 16px; }
.tabbar { background: #fff; border-top: 4px double var(--line); }
.tabbar button { font-size: 17px; font-weight: 400; color: #9aaab7; }
.tabbar button span { filter: grayscale(1); opacity: .45; }
.tabbar button.on { color: var(--ocean); }
.tabbar button.on span { filter: none; opacity: 1; }
.tabbar button.on::after { content: ""; width: 32px; height: 3px; border-radius: 2px; background: var(--sky); margin-top: 1px; }
.fab { /* 도장 */
  background: var(--sky); color: #fff; border: 2px dashed #fff; outline: 3px solid var(--sky); outline-offset: 3px;
  box-shadow: none; font-size: 32px; font-weight: 400;
}

/* ---------- 지도: 청량한 옛 지도 + 우표 핀 ---------- */
#map, .mini-map { background: #cfe8f1; }
/* 지도를 살짝 바래게 하고, 아래의 연한 하늘색 바탕이 비쳐 보이게 (청량한 옛 지도 느낌) */
.leaflet-tile-pane { filter: grayscale(.35) saturate(.85) brightness(1.04) contrast(.92); opacity: .82; }
.mini-map { border: 1.5px solid var(--edge); border-radius: 4px; }
.pin { /* 우표 */
  width: 44px; height: 48px; border-radius: 0; background: #fff; padding: 3px;
  border: 3px dotted #fff; outline: 1.5px solid var(--edge); box-shadow: 0 2px 6px rgba(36, 54, 77, .25);
}
.pin img { border-radius: 0; }
.pin-wrap::after { border-top-color: var(--ocean); bottom: -10px; }
.pin-num {
  top: -8px; right: -8px; min-width: 22px; height: 20px; border-radius: 3px; background: var(--deep); color: #fff; border: 2px solid #fff;
  font-family: var(--font); font-size: 14px; font-weight: 400;
}
.pin.small { width: 30px; height: 30px; border-radius: 3px; padding: 0; background: var(--deep); color: #fff; border: 2px solid #fff; outline: none; font-family: var(--font); font-size: 17px; font-weight: 400; }
.map-empty { background: #fff; border: 1.5px solid var(--line); border-left: 6px solid var(--sky); border-radius: 4px; font-size: 16px; }

/* ---------- 타임라인 ---------- */
.tl-date { font-size: 24px; margin: 24px 0 10px; padding-bottom: 4px; border-bottom: 2px dashed var(--edge); }
.card { background: #fff; border: 1.5px solid var(--line); border-radius: 4px; padding: 12px; box-shadow: none; }
.card .thumb { /* 우표 */
  border-radius: 0; background: var(--aqua); border: 3px dotted #fff; outline: 1.5px solid var(--edge); padding: 0;
}
.card b { font-size: 22px; font-weight: 400; line-height: 1.15; }
.card .comment { font-size: 18px; line-height: 1.25; }
.card small { font-size: 14px; color: var(--muted); }
.empty { font-size: 21px; }

/* ---------- 기록장: 기차표 ---------- */
.section-head h2 { font-size: 32px; }
.trip-card { position: relative; border: 1.5px solid var(--tag); border-left: 8px solid var(--sky); padding-right: 64px; }
.trip-card::after { /* 뜯는 쪽 */
  content: "ADMIT ONE"; position: absolute; top: 0; right: 0; bottom: 0; width: 50px; border-left: 2px dashed var(--tag);
  display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; font-size: 15px; letter-spacing: 1px; color: var(--ocean);
}
.trip-card[data-kind="gathering"] { border-color: #a6dcd2; border-left-color: var(--mint); }
.trip-card[data-kind="gathering"]::after { border-left-color: #a6dcd2; color: var(--mint-d); }
.trip-card[data-kind="daily"] { border-color: #f3b9ab; border-left-color: var(--coral); }
.trip-card[data-kind="daily"]::after { border-left-color: #f3b9ab; color: var(--coral-d); }
.stats { gap: 12px; }
.stats div { /* 우표 3장 */
  background: var(--sky); color: #fff; border: 4px dotted #fff; outline: 1.5px solid var(--edge); border-radius: 0; padding: 10px 6px;
}
.stats div:nth-child(2) { background: var(--mint); }
.stats div:nth-child(3) { background: var(--deep); }
.stats b { color: #fff; font-size: 32px; font-weight: 400; line-height: 1; }
.stats small { color: rgba(255, 255, 255, .92); font-size: 15px; }

/* ---------- 바텀 시트 ---------- */
.sheet-backdrop { background: rgba(31, 83, 120, .3); }
.sheet-body {
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px; border-top: 4px double var(--edge); border-radius: 14px 14px 0 0;
}
.grabber { background: var(--tag); }
.sheet-close { background: #fff; border: 1.5px solid var(--tag); color: var(--ocean); }

/* ---------- 기록 상세 ---------- */
.g-item { padding: 6px; background: var(--corners); }
.g-item img { border-radius: 0; border: 9px solid #fff; outline: 1px solid var(--line); background: #fff; }
.pd-cat { background: #fff; color: var(--ocean); border: 1.5px solid var(--tag); border-radius: 3px; font-size: 16px; font-weight: 400; }
.pd-name { /* 짐 꼬리표 */
  position: relative; display: inline-block; max-width: 100%; margin: 10px 0 8px; padding: 22px 20px 8px 34px;
  background: var(--aqua); font-size: 30px; line-height: 1.1; color: var(--ink);
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 18px 100%, 0 50%);
}
.pd-name::before { /* 끈 구멍 */
  content: ""; position: absolute; left: 13px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 2px var(--tag);
}
.pd-name::after { content: "DESTINATION"; position: absolute; left: 34px; top: 4px; font-size: 13px; letter-spacing: 1px; color: var(--ocean); }
.pd-comment { background: #fff; border: 0; border-left: 5px solid var(--sky); border-radius: 0; font-size: 21px; line-height: 1.3; }
.pd-memo { /* 항공 우편 */
  position: relative; background: #fff; border: 6px solid; border-image: var(--airmail) 6; border-radius: 0;
  padding: 26px 14px 12px; font-size: 18px; line-height: 1.5; margin-top: 12px;
}
.pd-memo::before { content: "MEMO"; position: absolute; top: 6px; left: 14px; font-size: 14px; letter-spacing: 1px; color: var(--muted); }
.pd-meta { font-size: 15px; }
.divider { height: 0; background: none; border-top: 2px dashed var(--edge); }
.member { border-bottom: 1px dashed var(--line); }
.member .grow { font-size: 18px; }
.member button { font-size: 16px; font-weight: 400; }

/* ---------- 친구 한마디 ---------- */
.cm-title { font-size: 22px; }
.cm-title small { background: var(--sky); color: #fff; border-radius: 3px; padding: 0 6px; font-size: 15px; }
.cm-body { background: #fff; border: 1.5px solid var(--line); border-top: 5px solid var(--mint); border-radius: 0; }
.cm:nth-child(even) .cm-body { border-top-color: var(--sky); }
.cm-head b { font-size: 16px; font-weight: 400; color: var(--mint-d); }
.cm:nth-child(even) .cm-head b { color: var(--ocean); }
.cm-head small, .cm-del { font-size: 14px; }
.cm-text { font-size: 19px; line-height: 1.3; }

/* ---------- 고르기 칩 ---------- */
.cats label span, .cand { background: #fff; border: 1.5px solid var(--edge); border-radius: 4px; font-size: 17px; }
.cand { font-size: 16px; }
.cats label input:checked + span, .cand.on { background: var(--sky); color: #fff; border-color: var(--sky); font-weight: 400; }
.cand.on small { color: rgba(255, 255, 255, .9); }
.cand small { font-size: 13px; }
.cands-label { font-size: 15px; font-weight: 400; color: var(--ocean); }

/* ---------- 사진 넣기·한꺼번에 기록 ---------- */
.add-photo { border: 2px dashed var(--tag); border-radius: 4px; background: #fff; color: var(--ocean); }
.add-photo small { font-size: 15px; }
.photo-strip img, .bulk-ph img { border-radius: 0; border: 3px dotted #fff; outline: 1.5px solid var(--edge); }
.results button, .choice, .bulk-card { background: #fff; border: 1.5px solid var(--line); border-radius: 4px; box-shadow: none; }
.results button b, .choice b { font-size: 20px; font-weight: 400; }
.results small, .choice small { font-size: 14px; }
.choice { border-left: 6px solid var(--sky); }
.choice:nth-child(2) { border-left-color: var(--mint); }
.bulk-status { background: var(--aqua); border: 1.5px solid var(--tag); border-radius: 4px; font-size: 16px; }
.bulk-summary { font-size: 19px; }
.bulk-check .num { background: var(--deep); border-radius: 3px; font-size: 16px; font-weight: 400; }
.bulk-name { font-size: 19px; }
.bulk-meta { font-size: 14px; }

/* ---------- 테마 고르기 ---------- */
.theme-opt { border: 1.5px solid var(--line); border-radius: 4px; }
.theme-opt.on { border-color: var(--sky); box-shadow: inset 0 0 0 1px var(--sky); background: var(--aqua); }
.theme-txt b { font-size: 20px; font-weight: 400; }
.theme-txt small { font-size: 14px; }
.theme-opt.on .theme-check { background: var(--sky); }

/* ---------- 알림 ---------- */
.toast { background: var(--deep); font-size: 17px; border-radius: 4px; }
