/* 춘천트립 공통 스타일 — design/minimal_mobile_app_template.html 기준 */
:root {
  --primary: #5548e8; --primary-dark: #4336d4; --primary-soft: #f0efff; --primary-mid: #dcd9ff;
  --ink: #191c27; --ink-soft: #343949; --muted: #667085; --muted-light: #8a90a0;
  --line: #eceef3; --surface: #ffffff; --surface-soft: #f8f9fc; --page: #f1f2f7;
  --danger: #d23f3f; --danger-soft: #fdeeee; --warn: #b46a00; --warn-soft: #fff4e2;
  --ok: #1f8a63; --ok-soft: #e7f8f2;
  --radius: 22px; --shadow: 0 22px 75px rgba(25, 28, 48, .11);
  --nav-h: calc(75px + env(safe-area-inset-bottom));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  display: grid; place-items: center; min-height: 100dvh; overflow: hidden;
  background: var(--page); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, "SUIT", "Noto Sans KR", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #b1aaff; outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.icon { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.85; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.sm { width: 18px; height: 18px; } .icon.xs { width: 14px; height: 14px; } .icon.lg { width: 26px; height: 26px; }

/* ───── 앱 셸 ───── */
.app { position: relative; display: flex; flex-direction: column; width: min(100%, 440px); height: min(916px, calc(100dvh - 40px));
  overflow: hidden; border: 1px solid #e9eaf1; border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); isolation: isolate; }
.screen-area { position: relative; flex: 1; min-height: 0; }
.screen { height: 100%; padding: 27px 26px 45px; overflow-y: auto; scrollbar-width: none; overscroll-behavior-y: contain; outline: none; }
.screen::-webkit-scrollbar { display: none; }
.screen.no-pad { padding: 0; overflow: hidden; }
.app.hide-nav .bottom-nav { display: none; }
.offline-banner { padding: 8px 16px; background: #24283b; color: #fff; font-size: 12px; text-align: center; }

.bottom-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: none; min-height: var(--nav-h);
  padding: 10px 11px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #eff0f4; background: white; z-index: 5; }
.tab-button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; min-height: 44px;
  border-radius: 12px; color: #8a8f9c; font-size: 11px; font-weight: 720; }
.tab-button .icon { width: 23px; height: 23px; stroke-width: 1.9; }
.tab-button[aria-current="page"] { color: var(--primary); }
.tab-button[aria-current="page"] .icon { stroke-width: 2.3; }

/* ───── 상단 ───── */
.top-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 850; font-size: 22px; letter-spacing: -1.2px; }
.logo-square { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--ink); color: #fff; }
.logo-square svg { width: 19px; height: 19px; stroke-width: 2.4; }
.logo-dot, .accent { color: var(--primary); }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 13px; background: #f6f7fb; color: var(--ink); flex: none; }
.icon-button .badge-dot { position: absolute; right: 10px; top: 10px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: var(--primary); }
.page-header { display: flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 8px; }
.page-header h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 820; letter-spacing: -.6px; }
.back-button { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -10px; border: 0; background: transparent; color: var(--ink); border-radius: 12px; }

/* ───── 글자 ───── */
h1, h2, h3, p { margin-top: 0; }
.eyebrow { margin: 0; color: var(--primary); font-size: 11px; line-height: 1.5; font-weight: 800; letter-spacing: 1.4px; }
.hero, .page-hero { padding-top: 24px; }
.hero h1, .page-hero h1 { margin: 12px 0 10px; font-size: clamp(27px, 7.4vw, 33px); line-height: 1.33; letter-spacing: -1.6px; font-weight: 850; }
.hero p.lead, .page-hero p.lead { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 32px 0 14px; }
.section-heading h2 { margin: 0; font-size: 19px; font-weight: 820; letter-spacing: -.8px; }
.section-sub { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.text-action { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 2px; border: none; background: none; color: var(--primary); font-size: 13px; font-weight: 750; }
.text-action .icon { width: 15px; height: 15px; }
.text-action.danger { color: var(--danger); }

/* ───── 버튼 ───── */
.primary-button, .secondary-button, .ghost-button, .danger-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 59px; padding: 0 18px;
  border: 0; border-radius: 16px; font-size: 15px; font-weight: 820; text-align: center; }
.primary-button { background: var(--primary); color: white; }
.primary-button:hover:not(:disabled), .primary-button:active:not(:disabled) { background: var(--primary-dark); }
.primary-button:disabled, .secondary-button:disabled { background: #d0d2e4; color: white; cursor: not-allowed; }
.secondary-button { background: var(--primary-soft); color: var(--primary); }
.ghost-button { background: #f4f5f8; color: var(--ink-soft); }
.danger-button { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 44px; border-radius: 13px; font-size: 13px; padding: 0 14px; width: auto; }
.btn-row { display: flex; gap: 10px; } .btn-row > * { flex: 1; }
.btn-stack { display: grid; gap: 10px; }
.chip-button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-soft); font-size: 13px; font-weight: 720; }
.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.is-busy::after { content: ""; position: absolute; width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.6); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.secondary-button.is-busy::after, .ghost-button.is-busy::after { border-color: var(--primary-mid); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── 카드 ───── */
.card { padding: 20px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.card + .card { margin-top: 12px; }
.card.soft { background: var(--primary-soft); border-color: #e6e3ff; }
.card.dark { background: #1c2033; color: #fff; border: 0; }
.card h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.5px; }

.progress-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 24px 22px; background: var(--primary-soft); border-radius: var(--radius); min-height: 170px; }
.progress-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px; color: #5b52a4; font-size: 12px; font-weight: 750; }
.tiny-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.progress-value { font-size: 40px; font-weight: 850; line-height: 1; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.progress-value small { font-size: 20px; letter-spacing: 0; }
.progress-description { margin: 12px 0 0; color: #5d58a0; font-size: 12px; line-height: 1.5; }
.progress-ring { position: relative; display: grid; place-items: center; flex: none; width: 108px; height: 108px; border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--value, 0) * 1%), #d9d5fb 0); }
.progress-ring::before { content: ""; position: absolute; width: 82px; height: 82px; border-radius: 50%; background: var(--primary-soft); }
.progress-center { position: relative; z-index: 1; color: var(--primary); }
.progress-center .icon { width: 30px; height: 30px; stroke-width: 2.2; }

.task-list { display: grid; gap: 10px; }
.task-row { display: flex; width: 100%; min-height: 72px; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border: 1px solid var(--line); border-radius: 17px; background: #fff; text-align: left; }
.task-row .task-main { display: flex; flex: 1; min-width: 0; align-items: center; gap: 12px; min-height: 44px; }
.task-check { display: grid; place-items: center; width: 29px; height: 29px; flex: none; border: 2px solid #e1e2ed; border-radius: 50%; color: transparent; }
.task-check svg { width: 16px; height: 16px; }
.task-row.is-done { border-color: #e7e3ff; background: #fbfaff; }
.task-row.is-done .task-check { border-color: var(--primary); background: var(--primary); color: #fff; }
.task-row.is-skipped .task-check { border-color: #c8cbd6; background: #eef0f4; color: #8a8f9c; }
.task-row.is-arrived { border-color: var(--primary-mid); }
.task-row.is-arrived .task-check { border-color: var(--primary); color: var(--primary); }
.task-info { display: grid; gap: 4px; flex: 1; min-width: 0; }
.task-info strong { font-size: 14px; font-weight: 750; letter-spacing: -.25px; }
.task-info small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.task-row.is-done .task-info strong { color: #7f7d93; }
.task-chevron { width: 16px; height: 16px; color: #b3b6c0; }
.add-inline { display: flex; width: 100%; align-items: center; justify-content: center; gap: 7px; min-height: 48px; margin-top: 11px; padding: 12px; border: 1px dashed #d6d3f3; border-radius: 15px; color: var(--primary); background: #fff; font-size: 13px; font-weight: 780; }

.feature-card { position: relative; display: block; overflow: hidden; padding: 24px; min-height: 160px; border-radius: 22px; background: #1c2033; color: white; }
.feature-card::before, .feature-card::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; pointer-events: none; }
.feature-card::before { width: 180px; height: 180px; right: -67px; top: -60px; }
.feature-card::after { width: 125px; height: 125px; right: -34px; top: -36px; }
.feature-kicker { color: #c4c1ff; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.feature-card h3 { margin: 12px 0 12px; font-size: 19px; line-height: 1.45; letter-spacing: -.65px; }
.feature-card p { margin: 0 0 12px; color: #d4d6e4; font-size: 13px; line-height: 1.6; }
.feature-link { display: inline-flex; align-items: center; gap: 4px; color: white; font-size: 13px; font-weight: 740; }
.feature-link svg { width: 16px; height: 16px; }

/* ───── 입력 ───── */
.search-box { display: flex; align-items: center; gap: 10px; height: 53px; padding: 0 8px 0 16px; border: 1px solid #ececf3; border-radius: 15px; background: #f8f9fc; color: #7d8291; }
.search-box:focus-within { border-color: var(--primary-mid); background: white; }
.search-box .icon { width: 20px; height: 20px; }
.search-box input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.search-box input::placeholder { color: #8c91a0; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -26px; padding: 2px 26px; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: none; min-height: 40px; padding: 0 15px; border: 1px solid #e3e5ec; border-radius: 999px; background: white; color: #5e6474; font-size: 13px; font-weight: 740; }
.filter-chip[aria-pressed="true"], .filter-chip.selected { background: var(--primary); border-color: var(--primary); color: white; }

.field { display: grid; gap: 7px; margin-top: 18px; }
.field > label, .field-label { color: #4c5262; font-size: 13px; font-weight: 800; }
.field .hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
.field .error-text { color: var(--danger); font-size: 12px; font-weight: 650; }
.input, .select, .textarea { width: 100%; min-height: 51px; padding: 0 14px; border: 1px solid #dddfea; border-radius: 13px; background: #fff; color: var(--ink); outline: 0; font-size: 15px; }
.textarea { min-height: 110px; padding: 13px 14px; line-height: 1.6; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; font-size: 14px; line-height: 1.5; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 8px 10px; border: 1px solid #e1e3eb; border-radius: 14px; background: #fff; font-size: 13px; font-weight: 720; text-align: center; }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.choice input:focus-visible + span { outline: 3px solid #b1aaff; outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #dddfea; border-radius: 13px; }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; }
.stepper output { min-width: 32px; text-align: center; font-weight: 800; }

/* ───── 상태 표시 ───── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: #f2f3f7; color: #4c5262; font-size: 11px; font-weight: 750; line-height: 1.5; }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.dark { background: #24283b; color: #fff; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.notice { display: flex; gap: 10px; padding: 13px 14px; border-radius: 14px; background: var(--surface-soft); color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.notice .icon { width: 18px; height: 18px; margin-top: 2px; }
.notice.warn { background: var(--warn-soft); color: #7a4a00; }
.notice.danger { background: var(--danger-soft); color: #8f2626; }
.notice.primary { background: var(--primary-soft); color: #3e35a8; }
.empty-state { padding: 36px 18px; border: 1px dashed #dcdfe9; border-radius: 20px; text-align: center; color: var(--muted); }
.empty-state > .icon { display: block; margin: 0 auto 12px; width: 32px; height: 32px; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 15px; }
.empty-state p { margin: 0 0 14px; font-size: 13px; line-height: 1.6; }
.empty-state .btn-stack { max-width: 260px; margin: 0 auto; }
.error-state { padding: 28px 18px; border-radius: 20px; background: var(--danger-soft); text-align: center; color: #8f2626; }
.error-state strong { display: block; margin-bottom: 6px; }
.error-state p { margin: 0 0 12px; font-size: 13px; }
.skeleton { border-radius: 16px; background: linear-gradient(90deg, #f1f2f6 0%, #e8e9ef 50%, #f1f2f6 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skeleton.row { height: 96px; margin-bottom: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.divider { height: 1px; margin: 20px 0; background: var(--line); border: 0; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px 12px; margin: 0; font-size: 13px; line-height: 1.6; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }

/* ───── 목록 메뉴 ───── */
.menu-list { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; }
.menu-row { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 62px; padding: 12px 16px; border: 0; border-bottom: 1px solid #f0f0f5; background: white; text-align: left; }
.menu-row:last-child { border-bottom: 0; }
.menu-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: #f5f4ff; color: var(--primary); flex: none; }
.menu-row strong { flex: 1; font-size: 14px; font-weight: 740; }
.menu-row .menu-meta { color: var(--muted); font-size: 12px; }
.menu-row > .icon:last-child { width: 16px; height: 16px; color: #a9adb8; }

/* ───── 시트·대화상자 ───── */
dialog.sheet { width: min(100% - 32px, 400px); max-width: none; max-height: calc(100dvh - 48px); padding: 24px; border: 0; border-radius: 24px; color: var(--ink); box-shadow: 0 24px 60px rgba(15,20,40,.2); overflow-y: auto; }
dialog.sheet.bottom { margin: auto auto 0; width: min(100%, 440px); border-radius: 24px 24px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
dialog.sheet::backdrop { background: rgba(17, 20, 37, .48); }
.dialog-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-title h2 { margin: 0; font-size: 19px; letter-spacing: -.7px; }
.dialog-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: #f4f5f8; flex: none; }
.dialog-description { margin: 8px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.dialog-actions { display: grid; gap: 10px; margin-top: 20px; }
.option-list { display: grid; gap: 8px; }
.option-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; text-align: left; }
.option-item[aria-checked="true"], .option-item.selected { border-color: var(--primary); background: var(--primary-soft); }

.toast { position: absolute; z-index: 30; left: 50%; bottom: calc(var(--nav-h) + 16px); width: max-content; max-width: calc(100% - 42px);
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: #24283b; color: white; font-size: 13px; font-weight: 650; line-height: 1.5;
  opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: opacity .2s, transform .2s; box-shadow: 0 12px 28px rgba(10,12,26,.2); }
.app.hide-nav .toast { bottom: 24px; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; background: transparent; color: #b8b4ff; font-weight: 800; min-height: 32px; }

/* 하단 고정 행동 영역 (입력 화면) */
.sticky-actions { position: sticky; bottom: -45px; margin: 24px -26px -45px; padding: 14px 26px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(to top, #fff 78%, rgba(255,255,255,0)); z-index: 3; }

@media (max-width: 600px) {
  body { display: block; background: white; }
  .app { width: 100%; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .screen { padding-top: 20px; }
}
@media (max-width: 370px) { .screen { padding-left: 18px; padding-right: 18px; } .filter-row { margin: 0 -18px; padding: 2px 18px; } .sticky-actions { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ───── PC(넓은 화면) 레이아웃: 창 전체를 쓰고 하단 탭은 왼쪽 메뉴로 ───── */
@media (min-width: 900px) {
  body { display: block; background: var(--surface-soft); }
  .app { flex-direction: row; width: 100%; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; background: var(--surface-soft); }
  .bottom-nav { order: -1; display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; width: 220px; min-height: 0; height: 100%;
    padding: 28px 14px; border-top: 0; border-right: 1px solid var(--line); }
  .bottom-nav::before { content: "춘천트립"; display: block; padding: 0 12px 22px; color: var(--ink); font-size: 22px; font-weight: 850; letter-spacing: -1px; }
  .tab-button { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 14px; font-size: 15px; }
  .tab-button[aria-current="page"] { background: var(--primary-soft); }
  .app.hide-nav .bottom-nav { display: flex; }               /* PC에서는 입력 화면에서도 메뉴 유지 */
  .screen-area { flex: 1; min-width: 0; }
  .screen { padding: 36px max(40px, calc((100% - 960px) / 2)) 60px; background: #fff; }
  .screen.no-pad { padding: 0; }
  .filter-row { margin: 0; padding: 2px 0; }
  .sticky-actions { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .toast, .app.hide-nav .toast { left: calc(50% + 110px); bottom: 28px; }
  .hero h1, .page-hero h1 { font-size: 36px; }
  .task-list, .menu-list { max-width: 960px; }
  dialog.sheet.bottom { margin: auto; border-radius: 24px; width: min(100% - 32px, 480px); }
}
@media (min-width: 900px) and (max-height: 600px) { .bottom-nav::before { padding-bottom: 8px; } }
/* 선택된 칩은 눈에 띄게 (여행 취향·음식 선택 등) */
.chip-button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-button[aria-pressed="true"]::before { content: "✓"; font-weight: 900; margin-right: 2px; }
.chip-button.is-custom[aria-pressed="true"]::before { content: none; }
