/* =====================================================================
   일정(planner.js) · 스크랩북(scrapbook.js) 화면
   색은 테마 변수(--accent, --card, --line …)를 따라가서 보라 글래스 테마에서도 자연스럽게 보여요.
   종이·폴라로이드·마스킹테이프 느낌은 스크랩북 캔버스 안에서만 써요.
   ===================================================================== */

/* 공통 */
.notice { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; font-size: 14px; line-height: 1.5; }
.notice.warn { background: #fff6dd; color: #6b4e00; }
.notice.error { background: #fdf0e8; color: var(--danger); }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.notice code { font-size: 12px; background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 5px; word-break: break-all; }
.empty.small { padding: 24px 12px; font-size: 14px; }
.icon-btn {
  min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; padding: 0 8px;
}
.icon-btn:disabled { opacity: .35; }
/* 키보드로 움직일 때만 테두리 표시. 칩 모양 선택지(숨긴 체크박스)만 글자 칸에 표시하고, 입력칸 제목에는 표시하지 않음 */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.cats label:has(input:focus-visible) > span, .mini-seg label:has(input:focus-visible) > span, .swatches label:has(input:focus-visible) > span,
.sb-el:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.spinner {
  width: 32px; height: 32px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--line);
  border-top-color: var(--accent); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.sticky-actions { position: sticky; bottom: calc(-20px - var(--safe-b)); background: var(--bg); padding: 12px 0 calc(8px + var(--safe-b)); margin-top: 12px; z-index: 2; }
.sticky-actions .btn-row { margin-top: 8px; }
.sticky-actions .btn-row .btn { flex: 1; }
.mini-seg { margin: 0 0 12px; }
.mini-seg label { flex: 1; }
.mini-seg label input { display: none; }
.mini-seg label span { display: block; text-align: center; padding: 10px; border-radius: 9px; font-weight: 700; color: var(--muted); }
.mini-seg label input:checked + span { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }


/* ---------- 일정 ---------- */
.plan-nav { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 6px; }
.plan-nav .link { min-height: 44px; }
.plan-head h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-seg { margin: 12px 0 14px; }
.plan-actions { margin-bottom: 14px; }
.plan-actions .btn-row { margin-top: 8px; }
.plan-actions .btn-row .btn { flex: 1; min-height: 44px; }
.ai-btn { background: linear-gradient(135deg, var(--accent), var(--accent-2, #9e90d6)); }
.day-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.day-chip {
  flex: none; min-width: 74px; min-height: 52px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; scroll-snap-align: start;
}
.day-chip small { color: var(--muted); font-size: 11px; }
.day-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.day-chip.on small { color: rgba(255,255,255,.85); }
.day-chip .dot { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.day-chip.on .dot { background: #fff; }
.plan-map { height: 190px; margin-bottom: 12px; }
.pin.small.unverified { background: #9a9a9a; }
.plan-list { list-style: none; margin: 0; padding: 0; }
.plan-item, .draft-item {
  display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; margin-bottom: 8px; align-items: flex-start;
}
.pi-time { flex: none; width: 48px; font-weight: 800; font-size: 14px; line-height: 1.25; color: var(--accent); }
.pi-time small { color: var(--muted); font-weight: 600; }
.pi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pi-title b { font-size: 15px; word-break: keep-all; }
.pi-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: var(--muted); align-items: center; }
.pi-notes { font-size: 13px; color: var(--muted); white-space: pre-wrap; }
.pi-tools { display: grid; grid-template-columns: 44px; gap: 4px; }
.pi-tools .icon-btn { min-height: 34px; font-size: 12px; }
@media (min-width: 520px) { .pi-tools { grid-template-columns: 44px 44px 44px; } .pi-tools .icon-btn { min-height: 44px; } }
.vbadge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-chip); background: #eceff0; color: #4b5563; }
.vbadge.ok { background: #e3f7ec; color: #0b7a44; }
.vbadge.warn { background: #fff1d6; color: #8a5a00; }
.vbadge.ai { background: var(--accent-soft); color: var(--accent); }
.place-now { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 8px; }
.place-now small { color: var(--muted); flex-basis: 100%; }

/* AI 미리보기·변경 비교 */
.ai-loading { text-align: center; padding: 28px 12px; display: flex; flex-direction: column; gap: 6px; }
.ai-loading small { color: var(--muted); }
.draft-day h4 { margin: 16px 0 8px; font-size: 14px; color: var(--muted); }
.draft-item { cursor: pointer; }
.draft-item input, .diff-card input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.draft-item:has(input:not(:checked)), .diff-card:has(input:not(:checked)) { opacity: .5; }
.diff-card { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); padding: 10px; margin-bottom: 8px; cursor: pointer; }
.diff-card.upd { border-left-color: #f0b400; }
.diff-card.add { border-left-color: #0bce83; }
.diff-card.del { border-left-color: var(--danger); }
.diff-card .grow { flex: 1; min-width: 0; }
.op-badge { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; color: #fff; }
.op-badge.upd { background: #d99a00; } .op-badge.add { background: #08a86a; } .op-badge.del { background: var(--danger); }
table.diff { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13px; table-layout: fixed; }
table.diff th { width: 44px; text-align: left; color: var(--muted); font-weight: 600; vertical-align: top; padding: 3px 0; }
table.diff td { padding: 3px 4px; vertical-align: top; word-break: break-word; }
table.diff del { color: #a33; background: #fdecec; text-decoration: line-through; }
table.diff ins { color: #0b6b3b; background: #e5f7ed; text-decoration: none; }

/* 예산 */
.budget-cards { display: flex; gap: 8px; margin-bottom: 10px; }
.budget-cards div { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.budget-cards small { display: block; color: var(--muted); font-size: 12px; }
.budget-cards b { font-size: 17px; color: var(--accent); word-break: break-all; }
.budget-cards .over b { color: var(--danger); }
.budget-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; font-size: 14px; }
.budget-table th, .budget-table td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line); }
.budget-table th:first-child, .budget-table td:first-child { text-align: left; }
.budget-table thead th { font-size: 12px; color: var(--muted); }
.exp-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 6px; min-height: 56px; }
.exp-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.exp-row .exp-ic { font-size: 22px; }

/* 준비물 */
.ck-add { margin-bottom: 12px; }
.ck-add input { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 16px; background: var(--card); }
.ck-progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.ck-progress span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.ck-list { list-style: none; padding: 0; margin: 10px 0 0; }
.ck-list li { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; padding-left: 4px; }
.ck-list label { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px; cursor: pointer; }
.ck-list input { width: 22px; height: 22px; accent-color: var(--accent); }
.ck-list li.done span { text-decoration: line-through; color: var(--muted); }
.ck-list .icon-btn { border: 0; background: none; color: var(--muted); }
.swatches { display: flex; gap: 8px; }
.swatches input { display: none; }
.swatches span { display: block; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); }
.swatches input:checked + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- 스크랩북: 종이·폴라로이드·테이프 ---------- */
.sb-canvas { position: relative; width: 1000px; height: 1400px; transform-origin: 0 0; overflow: hidden; }
.sb-canvas.bg-paper { background: #f6efe1 radial-gradient(rgba(120, 90, 40, .07) 1.2px, transparent 1.4px) 0 0 / 22px 22px; }
.sb-canvas.bg-grid { background-color: #fbfaf4; background-image: linear-gradient(#d9e8f2 1.5px, transparent 1.5px), linear-gradient(90deg, #d9e8f2 1.5px, transparent 1.5px); background-size: 50px 50px; }
.sb-canvas.bg-kraft { background: #d7b98e radial-gradient(rgba(90, 60, 20, .12) 1.5px, transparent 2px) 0 0 / 18px 18px; }
.sb-canvas.bg-mint { background: #e3f5ef; }
.sb-canvas.bg-lilac { background: #efe6fb; }
.sb-el { position: absolute; transform-origin: 50% 50%; user-select: none; -webkit-user-select: none; }
.sb-photo { width: 100%; height: 100%; position: relative; }
.sb-photo img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.sb-crop { position: relative; width: 100%; height: 100%; overflow: hidden; }
.sb-photo.frame-polaroid { background: #fff; padding: 4% 4% 16%; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.sb-photo.frame-tape { box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.sb-photo.frame-tape::before, .sb-photo.frame-tape::after {
  content: ""; position: absolute; width: 30%; height: 11%; min-height: 26px; background: rgba(247, 200, 208, .8); z-index: 1;
}
.sb-photo.frame-tape::before { top: -5%; left: -6%; transform: rotate(-28deg); }
.sb-photo.frame-tape::after { bottom: -5%; right: -6%; transform: rotate(-28deg); background: rgba(201, 228, 246, .85); }
.sb-photo.frame-round .sb-crop { border-radius: 40px; }
.sb-caption { position: absolute; left: 4%; right: 4%; bottom: 2%; height: 12%; display: flex; align-items: center; justify-content: center; font-family: Gaegu, cursive; font-size: 40px; color: #3a352f; overflow: hidden; white-space: nowrap; }
.sb-missing { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #eee, #eee 12px, #f7f7f7 12px, #f7f7f7 24px); color: #888; font-size: 32px; }
.sb-text { width: 100%; height: 100%; line-height: 1.3; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.sb-text.font-hand { font-family: Gaegu, "Gowun Dodum", cursive; font-weight: 700; }
.sb-text.font-basic { font-family: var(--font-text, sans-serif); }
.sb-sticker { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; line-height: 1; }
.sb-tape { width: 100%; height: 100%; opacity: .85; clip-path: polygon(2% 0, 98% 4%, 100% 100%, 0 96%); }

/* 페이지 목록 */
.sb-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.sb-page-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.sb-thumb { border: 0; padding: 0; background: none; width: 100%; aspect-ratio: 1000 / 1400; overflow: hidden; border-radius: 6px; position: relative; display: block; }
.sb-thumb .sb-canvas { position: absolute; left: 0; top: 0; transform: scale(var(--s, .15)); pointer-events: none; }
.sb-page-meta { display: flex; flex-direction: column; min-width: 0; }
.sb-page-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.sb-page-tools { display: flex; gap: 4px; }
.sb-page-tools .icon-btn { flex: 1; min-width: 0; }

/* 편집기 (전체 화면) */
.sb-editor { position: fixed; inset: 0; z-index: 900; background: #ece6da; display: flex; flex-direction: column; }
body.sb-open .tabbar, body.sb-open .fab { visibility: hidden; }
.sb-top { display: flex; align-items: center; gap: 6px; padding: calc(8px + var(--safe-t)) 10px 8px; background: var(--card); border-bottom: 1px solid var(--line); }
.sb-title { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 16px; background: var(--bg); }
.sb-status { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sb-status.dirty { color: #b45309; font-weight: 700; }
.sb-save { min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--radius-sm); background: var(--accent); color: #fff; font-weight: 800; }
.sb-stage { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 12px; touch-action: pan-x pan-y; }
.sb-wrap { margin: 0 auto; position: relative; box-shadow: 0 8px 30px rgba(0,0,0,.18); }
.sb-wrap .sb-el { touch-action: none; cursor: grab; }
.sb-wrap .sb-el.sel { cursor: move; }
.sb-selbox { position: absolute; transform-origin: 50% 50%; pointer-events: none; outline: calc(3px * var(--inv, 1)) dashed var(--accent); outline-offset: calc(4px * var(--inv, 1)); }
.sb-selbox .h { pointer-events: auto; }
.sb-wrap .h { position: absolute; width: calc(30px * var(--inv, 1)); height: calc(30px * var(--inv, 1)); border-radius: 50%; background: #fff; border: calc(3px * var(--inv, 1)) solid var(--accent); touch-action: none; z-index: 5; }
/* 손가락으로 잡기 쉽게 보이지 않는 터치 영역을 넓힘 (약 44px) */
.sb-wrap .h::after { content: ""; position: absolute; inset: calc(-8px * var(--inv, 1)); }
.sb-wrap .h-size { right: calc(-15px * var(--inv, 1)); bottom: calc(-15px * var(--inv, 1)); cursor: nwse-resize; }
.sb-wrap .h-rot { left: 50%; top: calc(-56px * var(--inv, 1)); margin-left: calc(-15px * var(--inv, 1)); cursor: grab; background: var(--accent); }
.sb-tools { background: var(--card); border-top: 1px solid var(--line); padding: 8px 8px calc(8px + var(--safe-b)); }
.sb-add, .sb-ctx { display: flex; gap: 6px; overflow-x: auto; }
.sb-add button { flex: 1; min-height: 56px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.sb-add button span { font-size: 22px; }
.sb-ctx button { flex: none; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); font-size: 13px; font-weight: 700; white-space: nowrap; }
.sb-ctx button.danger { color: var(--danger); }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.sticker-grid button { min-height: 52px; font-size: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.tape-chip { display: block; width: 36px; height: 14px; margin: auto; transform: rotate(-12deg); }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.bg-grid button { border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 6px; font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.bg-grid button.on { border-color: var(--accent); }
.bg-grid .sb-canvas { width: 70px; height: 98px; display: block; border-radius: 6px; }
.sb-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.sb-photo-grid button { padding: 0; border: 3px solid transparent; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; background: var(--line); }
.sb-photo-grid button.on { border-color: var(--accent); }
.sb-photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sb-tpls .choice { cursor: pointer; }
.sb-tpls .choice input { width: 20px; height: 20px; accent-color: var(--accent); }
.sb-tpls .choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }

/* ---------- 기록장 타임라인: 기록 + 계획 ---------- */
.tl-time { font-size: 12px; font-weight: 700; color: var(--accent); }
.tl-linked { font-size: 12px; color: var(--muted); }
.card.plan-card { border-style: dashed; border-color: var(--accent-2, var(--accent)); background: color-mix(in srgb, var(--card) 70%, var(--accent-soft)); }
.plan-card .plan-thumb {
  flex-direction: column; font-weight: 800; font-size: 15px; color: var(--accent); background: var(--card);
  border: 1px dashed var(--line); line-height: 1.2; text-align: center;
}
.plan-card .plan-thumb small { font-size: 11px; color: var(--muted); font-weight: 600; }
.plan-tag { font-size: 11px; font-weight: 800; color: var(--accent); }
.tl-foot { margin-top: 18px; text-align: center; }
.tl-foot .hint { margin-top: 8px; }

/* ---------- 새 기록장: 일정 시작 카드 ---------- */
.start-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.start-card > b { font-size: 16px; }
.start-card .choice-list { margin-top: 10px; }
.plan-actions .btn-row .btn { min-width: 0; padding-left: 10px; padding-right: 10px; }
.plan-actions > .link { display: block; margin: 6px auto 0; min-height: 44px; }
.imp-days { margin: 8px 0; padding-left: 18px; font-size: 14px; }
.bulk-plan { margin: 8px 0 6px; }
.bulk-plan label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bulk-plan small { font-size: 12px; color: var(--muted); font-weight: 600; }
.bulk-plan input, .bulk-plan select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); font-size: 15px; }


/* ---------- 일정 화면 정리 (상단 한 줄 · 작은 날짜 칩 · 버튼 통일) ---------- */
.plan-top { display: flex; align-items: center; gap: 2px; margin: -6px -8px 10px; }
.plan-title { flex: 1; min-width: 0; padding: 0 4px; }
.plan-title h2 { font-size: 20px; line-height: 1.3; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-title small { display: block; color: var(--muted); font-size: 12px; }
.icon-btn.ghost { border: 0; background: none; font-size: 20px; color: var(--heading, var(--text)); }
.icon-btn.ghost:hover { background: var(--accent-soft); }
.plan-seg { margin: 0 0 12px; }
.plan-seg button { padding: 8px; font-size: 14px; }
.day-chips { gap: 6px; scrollbar-width: none; margin: 0 -4px; padding: 2px 4px 4px; }
.day-chips::-webkit-scrollbar { display: none; }
.day-chip { min-width: 58px; min-height: 44px; padding: 4px 8px; border-radius: var(--radius-sm); gap: 0; }
.day-chip b { font-size: 13px; }
.day-chip small { font-size: 11px; }
.day-chip .dot { top: 5px; right: 5px; width: 5px; height: 5px; background: var(--accent-2, var(--accent)); }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 14px 0 10px; }
.day-head h3 { margin: 0; font-size: 18px; color: var(--heading, var(--text)); }
.day-head small { color: var(--muted); font-size: 13px; }
.plan-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 0 0 12px; }
.btn-main, .btn-sub {
  min-height: 48px; border-radius: var(--radius); font-weight: 700; font-size: 15px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
}
.btn-main { border: 0; background: var(--accent); color: #fff; }
.btn-main:active { filter: brightness(.92); }
.btn-sub { border: 1px solid var(--accent-2, var(--accent)); background: var(--card); color: var(--accent); }
.day-empty { text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px 14px 14px; }
.day-empty p { margin: 0 0 14px; color: var(--muted); }
.day-empty .plan-actions { margin: 0; }
.choice:disabled { opacity: .5; }
@media (min-width: 720px) { .plan-title h2 { font-size: 22px; } }

/* 스크랩북 이미지로 저장·공유 */
.exp-preview { display: block; width: 100%; max-width: 360px; margin: 4px auto 0; aspect-ratio: 1000 / 1400; object-fit: contain; border-radius: var(--radius-sm); box-shadow: 0 6px 20px rgba(0,0,0,.15); background: #fff; }
.exp-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }

.exp-mode { margin: 0 0 10px; }
.exp-preview.story { aspect-ratio: 1080 / 1920; max-width: 260px; }
.sb-head-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- 스크랩북 스토리 보기 ---------- */
.sb-story {
  position: fixed; inset: 0; z-index: 950; background: #15121f; color: #fff; display: flex; flex-direction: column;
  padding-top: var(--safe-t); padding-bottom: var(--safe-b); user-select: none; -webkit-user-select: none; touch-action: none; outline: none;
}
.st-bars { display: flex; gap: 4px; padding: 10px 12px 6px; }
.st-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.st-bars b { display: block; height: 100%; width: 0; background: #fff; }
.st-head { display: flex; align-items: center; gap: 2px; padding: 0 6px 4px 14px; }
.st-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-title b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-title small { font-size: 12px; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-btn { width: 44px; height: 44px; flex: none; border: 0; background: none; color: #fff; font-size: 18px; border-radius: 50%; }
.st-btn:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.st-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.st-wrap { position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.st-wrap .sb-canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.st-zone { position: absolute; top: 0; bottom: 0; border: 0; background: none; padding: 0; }
.st-zone.prev { left: 0; width: 33%; }
.st-zone.next { right: 0; width: 67%; }
.st-zone:focus-visible { outline: 3px solid rgba(255,255,255,.8); outline-offset: -6px; }
.st-paused { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.55); padding: 8px 16px; border-radius: 999px; font-size: 14px; display: none; pointer-events: none; }
.sb-story.paused .st-paused { display: block; }

/* ---------- 스크랩북 개선: 새 배경 · 장식 · 편집 상단 · 자동 저장 ---------- */
.sb-canvas.bg-linen { background-color: #f3eee4; background-image: repeating-linear-gradient(0deg, rgba(120,100,70,.06) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, rgba(120,100,70,.06) 0 1px, transparent 1px 4px); }
.sb-canvas.bg-white { background: #ffffff; }
.sb-canvas.bg-cream { background: #fbf6ea; }
.sb-canvas.bg-sky { background: #e4f1fb; }
.sb-canvas.bg-peach { background: #fde8de; }
.sb-canvas.bg-night { background: #2b2840; }
.sb-canvas.bg-lined { background-color: #fffdf6; background-image: linear-gradient(90deg, transparent 89px, rgba(220,80,80,.35) 89px, rgba(220,80,80,.35) 91px, transparent 91px), repeating-linear-gradient(180deg, transparent 0 54px, #dbe6f0 54px 56px); }
.sb-canvas.bg-dots { background-color: #fff7f2; background-image: radial-gradient(circle at 20px 20px, rgba(110,95,174,.18) 4px, transparent 4.5px); background-size: 40px 40px; }
.sb-canvas.bg-stripe { background-color: #ffffff; background-image: repeating-linear-gradient(90deg, #f3f0fb 0 40px, transparent 40px 80px); }
.sb-canvas.bg-check { background-color: #ffffff; background-image: linear-gradient(90deg, rgba(240,170,180,.28) 50%, transparent 50%), linear-gradient(rgba(240,170,180,.28) 50%, transparent 50%); background-size: 60px 60px; }
.sb-text { box-sizing: border-box; }
canvas.sb-deco { display: block; width: 100%; height: 100%; }
.sb-page-tools .sb-edit-btn { flex: 1; min-height: 40px; font-size: 14px; }
.sb-titlebox { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sb-titlebox .sb-title { width: 100%; padding: 6px 10px; font-size: 15px; }
.sb-status { border: 0; background: none; padding: 0 2px; text-align: left; font-size: 11px; color: var(--muted); min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-status:disabled { cursor: default; }
.sb-status.dirty { color: #b45309; }
.sb-status.error { color: var(--danger); font-weight: 700; text-decoration: underline; cursor: pointer; }
.sb-top .icon-btn:disabled { opacity: .35; }
.sb-save { flex: none; }
.st-sec { margin: 16px 0 8px; font-size: 14px; color: var(--muted); }
.deco-list { display: flex; flex-wrap: wrap; gap: 6px; }
.deco-list .cand { min-height: 40px; }
.sb-auto { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; min-height: 40px; }
.sb-auto input { width: 20px; height: 20px; accent-color: var(--accent); }
.swatches { flex-wrap: wrap; }
.swatches .sw-none { background: repeating-linear-gradient(135deg, #fff 0 6px, #e5e5e5 6px 8px); }
.bg-grid .sb-canvas.bg-lined { background-size: auto; }
@media (max-width: 380px) { .sb-top { gap: 2px; padding-left: 6px; padding-right: 6px; } .sb-top .icon-btn { min-width: 38px; } }

/* 배경으로 깐 사진은 고정 (손가락·마우스가 통과) */
.sb-el.locked { pointer-events: none; }
/* 선택하면 세부 도구 + 넣기 막대 두 줄 */
.sb-tools .sb-ctx + .sb-add { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 2px; }
.sb-tools .sb-ctx + .sb-add button { min-height: 48px; }
/* 사진 자르기 */
.crop-ratios { margin-bottom: 10px; }
.crop-stage { display: flex; justify-content: center; background: #1d1a26; border-radius: var(--radius); padding: 10px; touch-action: none; user-select: none; -webkit-user-select: none; }
.crop-wrap { position: relative; display: inline-block; line-height: 0; overflow: hidden; }
.crop-img { display: block; max-width: 100%; max-height: 52vh; pointer-events: none; }
.crop-box { position: absolute; box-shadow: 0 0 0 9999px rgba(0,0,0,.5); outline: 2px solid #fff; outline-offset: -2px; cursor: move; touch-action: none;
  background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 33.333% 33.333%; background-position: -1px -1px; }
.crop-box i { position: absolute; width: 28px; height: 28px; border: 4px solid #fff; touch-action: none; }
.crop-box i::after { content: ""; position: absolute; inset: -10px; } /* 손가락으로 잡기 쉽게 */
.crop-box [data-c=nw] { left: 0; top: 0; border-right: 0; border-bottom: 0; cursor: nwse-resize; }
.crop-box [data-c=ne] { right: 0; top: 0; border-left: 0; border-bottom: 0; cursor: nesw-resize; }
.crop-box [data-c=sw] { left: 0; bottom: 0; border-right: 0; border-top: 0; cursor: nesw-resize; }
.crop-box [data-c=se] { right: 0; bottom: 0; border-left: 0; border-top: 0; cursor: nwse-resize; }
.sb-photo-grid button.on { outline: 3px solid var(--accent); outline-offset: -3px; }

/* ---------- 내 여행 목록(🧳) · 여행 상태 ---------- */
.top-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 20px; }
.trip-card { padding: 0; align-items: stretch; gap: 0; }
.trip-card .trip-pick { flex: 1; min-width: 0; display: flex; gap: 12px; padding: 10px; border: 0; background: none; text-align: left; border-radius: var(--radius); }
.trip-card .trip-pick .body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.trip-card .icon-btn { align-self: center; margin-right: 8px; border: 0; background: none; font-size: 20px; }
.trip-card.on, .trip-all.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.trip-all { justify-content: center; font-weight: 700; color: var(--heading, var(--text)); min-height: 48px; align-items: center; }
.trip-status { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: var(--radius-chip); background: #eceff0; color: #4b5563; margin-right: 2px; }
.trip-status.plan { background: var(--accent-soft); color: var(--accent); }
.trip-status.now { background: #e3f7ec; color: #0b7a44; }
.trip-status.done { background: #eceaf2; color: #6b6580; }
#journal .section-head small { font-size: 13px; }

/* 여행 정보 더 넣기 */
.more-info { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px; margin-bottom: 14px; }
.more-info summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; color: var(--heading, var(--text)); }
.more-info[open] summary { margin-bottom: 6px; }
.more-info summary small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.budget-in { display: grid; grid-template-columns: minmax(0, 1fr) 86px; gap: 6px; }
.budget-in input, .budget-in select { min-width: 0; }
.cover-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.cover-pick input { display: none; }
.cover-pick img, .cover-pick .cover-auto { display: flex; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); border: 3px solid transparent; align-items: center; justify-content: center; text-align: center; font-size: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 700; line-height: 1.2; }
.cover-pick input:checked + img, .cover-pick input:checked + .cover-auto { border-color: var(--accent); }

/* ===== Phase 2: 일정 상태 (예정 / 방문 완료 / 취소) · 동행자 · 지도 일정 핀 ===== */
.pst { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: var(--radius-chip); background: var(--accent-soft); color: var(--accent); }
.pst.done { background: #e3f7ec; color: #0b7a44; }
.pst.cancelled { background: #eceff0; color: #6b7280; }
.plan-item.st-done { border-left: 4px solid #2fa36b; }
.plan-item.st-cancelled { opacity: .62; }
.plan-item.st-cancelled .pi-title b { text-decoration: line-through; }
.pi-who { font-size: 12px; color: var(--muted); }
.pi-rec { align-self: flex-start; border: 0; background: #e3f7ec; color: #0b7a44; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-chip); cursor: pointer; text-align: left; }
.pi-tools .done-btn { color: #0b7a44; font-weight: 900; font-size: 15px; }
.pi-tools .done-btn:disabled { opacity: .35; }
.pi-tools.four { grid-template-columns: 40px 40px; }
@media (min-width: 520px) { .pi-tools.four { grid-template-columns: 44px 44px 44px 44px; } }
.pd-meta .pst { align-self: flex-start; }
.who-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.who-pick .chk { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-chip); background: var(--card); font-size: 14px; cursor: pointer; }
.who-pick .chk:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.pin.small.st-done { background: #2fa36b; }
.pin.small.st-cancelled { background: #b8b8b8; opacity: .7; }
/* 지도: 계획 일정 핀 (예정 = 점선 테두리, 완료 = 초록, 취소 = 회색) */
.pin.plan-pin { width: 34px; height: 34px; font-size: 15px; border: 2.5px dashed var(--accent); background: var(--card); }
.pin.plan-pin.done { border: 2.5px solid #2fa36b; }
.pin.plan-pin.cancelled { border-color: #aaa; filter: grayscale(1); opacity: .6; }
.pin.plan-pin img, .pin.plan-pin img.ic { width: 20px; height: 20px; object-fit: contain; }
.pin-num.plan { background: #fff; color: var(--accent); border-color: var(--accent); font-size: 10px; min-width: 26px; height: 18px; top: -8px; right: -12px; }
.map-bar { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 450; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none; }
.map-bar > * { pointer-events: auto; }
.map-bar .mini-seg { margin: 0; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.map-bar .mini-seg button { flex: none; padding: 8px 12px; white-space: nowrap; }
.map-bar select { padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-chip); background: var(--card); font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.12); max-width: 180px; }
.add-plan-pop .leaflet-popup-content { margin: 8px; }
.add-plan-pop .leaflet-popup-content-wrapper { border-radius: var(--radius); }
.pi-reason { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.who-pick .chk { flex: none; white-space: nowrap; }
.who-pick .chk span { display: inline; margin: 0; font-size: 14px; font-weight: inherit; color: inherit; }
.who-pick .chk input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

/* ===== Phase 3: 여러 스크랩북 · 기록 글 넣기 ===== */
.sb-books { display: flex; gap: 6px; align-items: center; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.sb-book { flex: none; border: 1px solid var(--line); background: var(--card); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; cursor: pointer; }
.sb-book small { margin-left: 4px; color: var(--muted); font-weight: 600; }
.sb-book.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.sb-book.on small { color: rgba(255,255,255,.85); }
.sb-book.add { border-style: dashed; color: var(--accent); }
.rec-list { display: flex; flex-direction: column; gap: 6px; }
.rec-pick { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-sm, 10px); padding: 8px 12px; cursor: pointer; }
.rec-pick small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 앨범 갤러리 */
.sb-album .sb-thumb { box-shadow: 4px 4px 0 var(--accent-soft, #ece8f7), 0 2px 10px rgba(0,0,0,.08); }
.sb-album-empty { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 40px; background: var(--card); }
.sb-album-empty small { font-size: 13px; color: var(--muted); }
.sb-album-head { align-items: center; gap: 6px; }
.sb-album-head h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-rec.add { background: var(--accent-soft, #ece8f7); color: var(--accent); }
.verify-hint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: #8a5a00; background: #fff6e0; border-radius: var(--radius); padding: 8px 12px; margin-top: 8px; }

/* 일정 사이 이동 방법 */
.pi-move { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: -2px 0 6px 22px; padding: 4px 0 4px 16px;
  border-left: 2px dashed var(--accent); font-size: 12.5px; color: var(--text); }
.pi-move small { font-size: 11.5px; }
.pv-move { color: var(--accent); font-weight: 600; }
.transit-grid { gap: 6px; }

/* ===== 타임라인 드래그 앤 드롭 ===== */
.plan-list .plan-item { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; transition: transform .16s ease; }
.plan-list.dragging .pi-move { display: none; }
.plan-item.drag-active { position: relative; z-index: 20; transition: none; outline: 2.5px solid var(--accent); outline-offset: -1px;
  box-shadow: 0 14px 30px rgba(110, 95, 174, .35); background: var(--card); }
body.plan-dragging { -webkit-user-select: none; user-select: none; cursor: grabbing; }
.drag-handle { cursor: grab; touch-action: none; font-size: 18px; color: var(--accent); }
.drag-handle:active { cursor: grabbing; }

/* ===== 타임라인 카드 오른쪽 버튼 (완료 · 수정 · 드래그) — 테두리 없이 가로 정렬 ===== */
.plan-list .plan-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; column-gap: 10px; align-items: start; }
.plan-list .plan-item .pi-body { min-width: 0; }
.pi-tools, .pi-tools.four { display: flex; flex-direction: row; align-items: center; gap: 2px; margin: -6px -6px 0 0; }
.pi-btn { width: 44px; height: 44px; min-width: 44px; padding: 0; border: 0; background: transparent; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.pi-btn svg { width: 20px; height: 20px; }
.pi-btn:hover, .pi-btn:focus-visible { background: var(--accent-soft, #efeaf9); }
.pi-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pi-btn.done-btn { color: var(--accent); }
.pi-btn.done-btn:disabled { opacity: 1; cursor: default; color: #b9b3c9; }
.pi-btn.done-btn.is-done { color: #2fa36b; }
.pi-btn.edit-btn { color: #8a84a0; }
.pi-btn.drag-handle { color: #bdb8cc; cursor: grab; touch-action: none; font-size: inherit; }
.pi-btn.drag-handle:active, .plan-item.drag-active .pi-btn.drag-handle { color: var(--accent); cursor: grabbing; }
/* 좁은 휴대폰: 제목 영역이 너무 좁아지지 않게 버튼 줄을 카드 아래 오른쪽으로 */
@media (max-width: 420px) {
  .plan-list .plan-item { grid-template-columns: 48px minmax(0, 1fr); }
  .plan-list .plan-item .pi-tools { grid-column: 1 / -1; justify-self: end; margin: -8px -6px -8px 0; }
}
/* 고르기 모드: 체크 칸 자리 */
.plan-list .plan-item.pickable, .plan-list .plan-item.picked { grid-template-columns: 48px minmax(0, 1fr); }

/* 대중교통 단계별 안내 · 길찾기 */
.pi-move { flex-direction: column; align-items: stretch; gap: 4px; }
.pi-move-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.route-btn { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft, #efeaf9);
  padding: 6px 10px; border-radius: 999px; text-decoration: none; white-space: nowrap; min-height: 32px; display: inline-flex; align-items: center; }
.pi-steps { margin: 2px 0 0; padding-left: 20px; font-size: 12.5px; color: var(--text); }
.pi-steps li { margin: 1px 0; }
.pi-steps-note { font-size: 11.5px; }
.pv-steps { flex-basis: 100%; font-size: 12px; color: var(--text); opacity: .85; }

/* 이동 수단·시간 고치기 */
.move-edit { width: 36px; height: 36px; min-width: 36px; border: 0; background: transparent; border-radius: 10px; color: #8a84a0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.move-edit svg { width: 17px; height: 17px; }
.move-edit:hover, .move-edit:focus-visible { background: var(--accent-soft, #efeaf9); color: var(--accent); }
.route-btn + .move-edit { margin-left: 0; }
.pi-move-head .route-btn:only-of-type { margin-left: auto; }
.pi-move-head:not(:has(.route-btn)) .move-edit { margin-left: auto; }
.tr-min { display: flex; align-items: center; gap: 8px; }
.tr-min input { flex: 1; min-width: 0; text-align: center; }
.tr-modes { gap: 6px; }

/* ---------- 지도 탭: 작은 원형 번호 마커 · 그룹 마커 · 날짜 칩 · 하단 장소 카드 (map-view.js) ---------- */
.mk-wrap { background: none; border: 0; display: flex; align-items: center; justify-content: center; } /* 40px 터치 영역 */
.mk {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; letter-spacing: -.3px; line-height: 1; white-space: nowrap;
  background: #fff; color: var(--accent); border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.28);
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.mk.long { font-size: 9.5px; letter-spacing: -.5px; }
.mk.st-planned { border-style: dashed; }
.mk.st-done { background: var(--accent); color: #fff; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--accent), 0 1px 4px rgba(0,0,0,.3); }
.mk.st-cancelled { background: #eceff0; color: #8a9096; border: 2px solid #b8bec4; }
.mk.mk-ic { font-size: 15px; background: #fff; color: inherit; border: 2px solid var(--accent); }
.mk.mk-ic img { width: 18px; height: 18px; object-fit: contain; }
.mk.sel { transform: scale(1.35); box-shadow: 0 0 0 3px rgba(255,255,255,.95), 0 0 0 6px var(--accent), 0 4px 12px rgba(0,0,0,.35); }
.map-has-sel .mk:not(.sel) { opacity: .62; }
.mk-group {
  min-width: 40px; height: 40px; padding: 0 6px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 800; white-space: nowrap;
  border: 3px solid rgba(255,255,255,.95); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent), 0 2px 8px rgba(0,0,0,.3);
  transition: transform .15s ease;
}
.mk-group.big { min-width: 46px; height: 46px; border-radius: 23px; font-size: 13.5px; }
.mk-group.sel { box-shadow: 0 0 0 4px var(--accent), 0 2px 8px rgba(0,0,0,.35); }
.mk-wrap:hover .mk-group, .mk-wrap:focus-visible .mk-group { transform: scale(1.08); }
.mk-wrap:focus-visible { outline: none; }
.mk-wrap:focus-visible .mk, .mk-wrap:focus-visible .mk-group { outline: 3px solid var(--accent); outline-offset: 3px; }
.mk-spider-c { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; opacity: .8; }

.map-bar { flex-direction: column; align-items: flex-start; gap: 6px; }
.day-pills { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 2px; scrollbar-width: none; }
.day-pills::-webkit-scrollbar { display: none; }
.day-pill {
  flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px; border-radius: var(--radius-chip);
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 13px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); min-height: 34px;
}
.day-pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.day-pill.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.day-pill.on i { box-shadow: 0 0 0 1.5px #fff; }

.map-card {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 470; max-width: 520px; margin: 0 auto;
  background: var(--card); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.2); padding: 12px 12px 10px;
  animation: mc-up .18s ease-out;
}
@keyframes mc-up { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.mc-row { display: flex; gap: 10px; align-items: flex-start; }
.mc-thumb { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; flex: none; }
.mc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mc-title { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.mc-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-no { flex: none; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 10px; background: var(--accent); color: #fff; }
.mc-no.st-planned { background: #fff; color: var(--accent); border: 1.5px dashed var(--accent); }
.mc-no.st-cancelled { background: #eceff0; color: #6b7280; }
.mc-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mc-st { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: var(--radius-chip); background: var(--accent-soft); color: var(--accent); }
.mc-st.st-done { background: #e3f7ec; color: #0b7a44; }
.mc-st.st-cancelled { background: #eceff0; color: #6b7280; }
.mc-time { font-size: 13.5px; }
.mc-x { flex: none; width: 36px; height: 36px; margin: -6px -6px 0 0; border: 0; background: none; color: var(--muted); font-size: 16px; border-radius: 50%; }
.mc-actions { display: flex; gap: 8px; margin-top: 10px; }
.mc-actions .btn { flex: 1; min-height: 42px; padding: 8px 10px; }
/* 카드가 열리면 ＋ 버튼을 카드 위로 올려서 겹치지 않게 */
body.map-card-open .fab { bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--map-card-h, 150px) + 24px); transition: bottom .18s ease; }
body.map-card-open #view-map .leaflet-control-attribution { display: none; }
/* 타임라인에서 보기: 잠깐 강조 */
.plan-item.flash { animation: pi-flash 2.2s ease-out; }
@keyframes pi-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ===== 이동 줄 한 줄 정리: 🚶 도보 12분(690m) [🗺️ 길찾기] [✏️] — 모든 이동 수단 같은 배치, 줄바꿈 없이 ===== */
.pi-move { gap: 2px; padding: 2px 0 2px 12px; }
.pi-move-head { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; min-height: 36px; }
.mv-info { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 4px; white-space: nowrap; overflow: hidden; font-size: 13px; }
.mv-ic { flex: none; }
.mv-main { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.mv-dist { flex: none; color: var(--muted); font-size: 12px; }
.pi-move-head .route-btn { flex: none; margin-left: auto; gap: 3px; padding: 0 10px; min-height: 34px; }
.pi-move-head .move-edit { flex: none; margin-left: 0; width: 36px; height: 36px; }
.pi-move-head:not(:has(.route-btn)) .move-edit { margin-left: auto; }
.mv-detail { display: block; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 22px; margin-top: -4px; }
.pi-steps { margin-top: 0; }
/* 아주 좁은 화면: 길찾기는 아이콘만 (기능·터치 영역은 그대로) */
@media (max-width: 359px) {
  .pi-move-head .mv-lbl { display: none; }
  .pi-move-head .route-btn { width: 36px; padding: 0; justify-content: center; }
}
.pi-move .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 국가 고르기 (직접 만든 목록 — 안드로이드 앱 화면에서 datalist 를 못 골라서) */
.cn-field { position: relative; }
.cn-field > label { display: flex; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.cn-sugg { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 4px; max-height: 220px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 4px; }
.cn-sugg button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 11px 12px; border-radius: 8px; font-size: 15px; min-height: 44px; }
.cn-sugg button:hover, .cn-sugg button:focus-visible { background: var(--accent-soft, #efeaf9); }
/* 예산: 금액 칸과 1인/전체 칸, 옆의 교통 칸 높이를 똑같이 */
.more-info .grid2 .field input, .more-info .grid2 .field select, .budget-in input, .budget-in select { height: 52px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
.budget-in select { padding-left: 8px; padding-right: 4px; }

/* 타임라인 위 작은 지도: 누르면 지도 탭에서 크게 (휴대폰에서는 지도를 끌지 않고 화면이 스크롤돼요) */
.plan-map { position: relative; cursor: pointer; }
.map-open-hint { position: absolute; right: 8px; top: 8px; z-index: 450; pointer-events: none; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.92); color: var(--accent); padding: 5px 10px; border-radius: 999px; box-shadow: 0 1px 6px rgba(0,0,0,.15); }
/* 여행 기간 밖 날짜의 마커 (12/1-2 처럼 날짜로 표시) */
.mk.xlong { width: auto; min-width: 30px; padding: 0 6px; border-radius: 15px; font-size: 9.5px; letter-spacing: -.4px; }
.day-pill small { font-size: 10.5px; font-weight: 600; opacity: .75; }

/* 여행 기간 밖 날짜 (날짜를 바꾸며 보관한 일정·기간 밖 실제 기록) */
.day-chip.out { border-style: dashed; opacity: .85; }
.day-chip.out small { color: #b45309; }
.out-note, .out-day { margin: 8px 0 10px; }
.out-recs-h { margin: 14px 0 6px; font-size: 14px; }
