/* ==========================================================
   디자인 시스템 — 토큰 (8px 그리드, 4px 베이스라인)
   ========================================================== */
@font-face {
  font-family: "Pretendard";
  src: url("fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920; font-style: normal; font-display: swap;
}
:root {
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* 색 — 포인트는 초록 하나. 파랑은 '현황 띠' 전용. */
  --c-primary: #2ac769;  --c-primary-hover: #22b35c;  --c-primary-soft: #e9f9ef;  --c-primary-text: #1a9a4c;
  --c-info: #3b76f6;     --c-info-deep: #2f63d9;      --c-info-soft: #eef3ff;    --c-info-text: #2856c7;
  --c-warn-soft: #fff5db; --c-warn-text: #8a5a00;
  --c-danger: #dc3b3b;   --c-danger-soft: #fdeaea;    --c-danger-text: #b42626;

  --c-bg: #f3f4f6;  --c-surface: #ffffff;  --c-surface-2: #f8f9fa;  --c-surface-3: #f1f2f4;
  --c-border: #e5e7ea;  --c-border-strong: #d0d4da;
  --c-text: #191c1f;  --c-text-2: #4a5059;  --c-text-3: #878d96;  --c-text-4: #aeb3ba;

  /* 간격 (8px 그리드) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  /* 반경 */
  --r-1: 6px; --r-2: 8px; --r-3: 12px; --r-4: 16px; --r-pill: 999px;
  /* 그림자 */
  --sh-1: 0 1px 2px rgba(25,28,31,.04);
  --sh-2: 0 2px 8px rgba(25,28,31,.06);
  --sh-3: 0 12px 32px rgba(25,28,31,.14);
  /* 크기 */
  --h-control: 40px; --h-control-sm: 32px; --h-row: 48px; --sidebar-w: 240px;
  --t: 120ms ease;
}

/* ==========================================================
   베이스 / 타이포 (14/20 본문, 제목 24/32)
   ========================================================== */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 20px; color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--c-info-text); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 14px; line-height: 20px; font-weight: 700; }
.sub { color: var(--c-text-3); font-size: 13px; line-height: 20px; }
.num { font-variant-numeric: tabular-nums; }
b { font-weight: 600; }
.lucide { width: 20px; height: 20px; stroke-width: 1.75; flex: none; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: #d7dadf; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

/* ==========================================================
   레이아웃
   ========================================================== */
.app { display: flex; height: 100vh; }
.sidebar { width: var(--sidebar-w); flex: none; background: var(--c-surface); border-right: 1px solid var(--c-border); display: flex; flex-direction: column; padding: var(--s-6) var(--s-4); }
.brand { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-2); height: 40px; margin-bottom: var(--s-8); }
.brand .logo { width: 32px; height: 32px; border-radius: var(--r-2); background: var(--c-primary); display: grid; place-items: center; color: #fff; }
.brand .logo .lucide { width: 18px; height: 18px; }
.brand .name { font-weight: 700; font-size: 15px; line-height: 20px; letter-spacing: -0.01em; }
.brand .ver { font-size: 12px; line-height: 16px; color: var(--c-text-3); }
.nav-label { font-size: 11px; line-height: 16px; font-weight: 600; color: var(--c-text-4); padding: 0 var(--s-3); margin-bottom: var(--s-2); letter-spacing: .06em; }
.nav-item { position: relative; display: flex; align-items: center; gap: var(--s-3); height: 40px; padding: 0 var(--s-3); border-radius: var(--r-2); color: var(--c-text-2); font-weight: 500; cursor: pointer; transition: background var(--t), color var(--t); user-select: none; margin-bottom: var(--s-1); }
.nav-item .lucide { color: var(--c-text-3); }
.nav-item:hover { background: var(--c-surface-2); color: var(--c-text); }
.nav-item.active { background: var(--c-primary); color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(42,199,105,.28); }
.nav-item.active .lucide { color: #fff; }
.nav-item.active .badge { background: rgba(255,255,255,.22); color: #fff; }
.nav-item .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s-2); }
.quit-btn { width: 100%; justify-content: center; color: var(--c-text-3); }
.quit-btn:hover { color: var(--c-danger, #e5484d); }
.active-profile { background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--r-3); padding: var(--s-3) var(--s-4); display: flex; align-items: center; gap: var(--s-3); }
.active-profile::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); flex: none; }
.active-profile .lbl { font-size: 11px; line-height: 16px; color: var(--c-text-3); }
.active-profile .val { font-weight: 700; line-height: 20px; }

.main { flex: 1; min-width: 0; overflow: auto; padding: var(--s-8); }
.page { display: none; max-width: 1040px; }
.page.active { display: block; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); min-height: 56px; }
.page-head p { margin-top: var(--s-1); }
.page-head > :last-child { flex: none; margin-top: var(--s-1); }

/* ==========================================================
   컴포넌트
   ========================================================== */
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-3); padding: var(--s-6); box-shadow: var(--sh-1); margin-bottom: var(--s-4); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); height: 32px; margin-bottom: var(--s-4); }
.card-head h2 { display: flex; align-items: center; gap: var(--s-2); }
.card-head h2 .lucide { width: 18px; height: 18px; color: var(--c-text-3); }
.card-head .more { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--c-text-3); cursor: pointer; font-weight: 500; }
.card-head .more:hover { color: var(--c-primary-text); }
.card-head .more .lucide { width: 14px; height: 14px; }
.card-head .cap { font-size: 12px; color: var(--c-text-4); margin-left: auto; }

/* KPI 타일 — 첫 타일만 초록 */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); margin-bottom: var(--s-4); }
.kpi { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-3); padding: var(--s-4) var(--s-6); box-shadow: var(--sh-1); min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; }
.kpi .k { font-size: 13px; line-height: 16px; color: var(--c-text-3); font-weight: 500; }
.kpi .v { font-size: 28px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: var(--s-1); }
.kpi .v small { font-size: 14px; font-weight: 600; color: var(--c-text-3); }
.kpi .d { font-size: 12px; line-height: 16px; color: var(--c-text-3); display: flex; align-items: center; gap: var(--s-1); }
.kpi .d .lucide { width: 14px; height: 14px; }
.kpi .d.up { color: var(--c-primary-text); }
.kpi.accent { background: var(--c-primary); border-color: var(--c-primary); color: #fff; box-shadow: 0 8px 20px rgba(42,199,105,.3); }
.kpi.accent .k, .kpi.accent .d, .kpi.accent .v small { color: rgba(255,255,255,.85); }
/* 2단 */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-4); align-items: start; }
.report-row { display: flex; justify-content: space-between; align-items: center; height: 40px; border-bottom: 1px solid var(--c-border); }
.report-row:last-child { border-bottom: 0; }
.report-row .k { color: var(--c-text-2); font-size: 13px; }
.report-row .v { font-weight: 700; color: var(--c-primary-text); font-size: 16px; }
.report-row .v small { font-size: 12px; color: var(--c-text-3); font-weight: 500; margin-left: 2px; }
.mini-list .item { display: flex; align-items: center; gap: var(--s-3); height: 48px; border-bottom: 1px solid var(--c-border); }
.mini-list .item:last-child { border-bottom: 0; }
.mini-list .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); flex: none; }
.mini-list .t { flex: 1; min-width: 0; }
.mini-list .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 20px; }
.mini-list .t span { font-size: 12px; color: var(--c-text-3); line-height: 16px; }
.mini-list .empty { padding: var(--s-6) 0; }
.profile-mini { background: var(--c-primary); color: #fff; border-radius: var(--r-3); padding: var(--s-4) var(--s-6); margin-bottom: var(--s-4); }
.profile-mini .n { font-weight: 700; font-size: 16px; line-height: 24px; }
.profile-mini .s { font-size: 12px; opacity: .85; line-height: 16px; }
.profile-mini .pm-select { margin: var(--s-2) 0; background-color: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); color: #fff; font-weight: 700;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); }
.profile-mini .pm-select:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.profile-mini .pm-select option { color: var(--c-text); }
/* 현황 띠(지원 현황 화면용) */
.band { background: var(--c-primary); color: #fff; border-radius: var(--r-3); padding: var(--s-6); display: flex; margin-bottom: var(--s-4); box-shadow: var(--sh-2); }
.band-group { flex: 1; min-width: 0; }
.band-group + .band-group { border-left: 1px solid rgba(255,255,255,.22); padding-left: var(--s-6); margin-left: var(--s-6); }
.band-title { display: flex; align-items: center; gap: var(--s-2); font-weight: 700; font-size: 13px; line-height: 16px; height: 16px; margin-bottom: var(--s-4); color: rgba(255,255,255,.92); }
.band-title .lucide { width: 16px; height: 16px; }
.band-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); height: 32px; }
.band-row .k { font-size: 13px; color: rgba(255,255,255,.78); }
.band-row .v { font-size: 22px; line-height: 32px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.band-row .v.text { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }

/* 버튼 — 높이 40 / 32 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); height: var(--h-control); padding: 0 var(--s-4); border-radius: var(--r-2); border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); font-weight: 600; cursor: pointer; transition: all var(--t); white-space: nowrap; }
.btn:hover { background: var(--c-surface-2); border-color: var(--c-border-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn .lucide { width: 16px; height: 16px; }
.btn.primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn.primary:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }
.btn.info { background: var(--c-info); border-color: var(--c-info); color: #fff; }
.btn.info:hover { background: var(--c-info-deep); }
.btn.danger { color: var(--c-danger-text); }
.btn.danger:hover { background: var(--c-danger-soft); border-color: #f5c2c2; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--c-text-2); }
.btn.ghost:hover { background: var(--c-surface-3); }
.btn.sm { height: var(--h-control-sm); padding: 0 var(--s-3); font-size: 13px; border-radius: var(--r-1); }
.btn.lg { height: 48px; padding: 0 var(--s-6); font-size: 15px; border-radius: var(--r-3); }
.btn.icon { width: var(--h-control-sm); padding: 0; }

/* 입력 — 높이 40 */
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field label { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--c-text-2); }
.input { width: 100%; height: var(--h-control); padding: 0 var(--s-3); border: 1px solid var(--c-border); border-radius: var(--r-2); background: #fff; outline: none; transition: border var(--t), box-shadow var(--t); }
.input::placeholder { color: var(--c-text-4); }
.input:hover { border-color: var(--c-border-strong); }
.input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(0,179,91,.14); }
textarea.input { height: auto; min-height: 96px; padding: var(--s-2) var(--s-3); resize: vertical; line-height: 20px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23878d96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 12px center; }
.input-row { display: flex; gap: var(--s-2); align-items: center; }
.input-row .input { flex: 1; }

/* 테이블 — 행 48 */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--c-text-3); font-size: 12px; line-height: 16px; height: 40px; padding: 0 var(--s-4); border-bottom: 1px solid var(--c-border); background: var(--c-surface-2); white-space: nowrap; }
.table td { height: var(--h-row); padding: var(--s-2) var(--s-4); border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; } .table tr.clickable:hover td { background: var(--c-surface-2); }
.table .ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-wrap { border: 1px solid var(--c-border); border-radius: var(--r-3); overflow: hidden; background: #fff; box-shadow: var(--sh-1); }
.empty { padding: var(--s-10); text-align: center; color: var(--c-text-3); }

/* 배지 — 높이 24 */
.badge { display: inline-flex; align-items: center; gap: var(--s-1); height: 24px; padding: 0 var(--s-2); border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--c-surface-3); color: var(--c-text-2); }
.badge.success { background: var(--c-primary-soft); color: var(--c-primary-text); }
.badge.info { background: var(--c-info-soft); color: var(--c-info-text); }
.badge.warn { background: var(--c-warn-soft); color: var(--c-warn-text); }
.badge.danger { background: var(--c-danger-soft); color: var(--c-danger-text); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.kbd { display: inline-block; font-size: 12px; line-height: 20px; padding: 0 var(--s-2); border: 1px solid var(--c-border); border-radius: var(--r-1); background: var(--c-surface-2); color: var(--c-text-2); margin: 2px 4px 2px 0; }

/* 로그 */
.log { background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--r-2); padding: var(--s-2) var(--s-4); height: 240px; overflow: auto; font-size: 13px; }
.log .line { display: flex; gap: var(--s-3); min-height: 28px; align-items: center; border-bottom: 1px solid var(--c-border); }
.log .line:last-child { border-bottom: 0; }
.log .line .t { color: var(--c-text-4); font-variant-numeric: tabular-nums; flex: none; font-size: 12px; }
.log .line .m { color: var(--c-text-2); }
.log .line.success .m { color: var(--c-primary-text); font-weight: 600; }
.log .line.warn .m { color: var(--c-warn-text); }
.log .line.error .m { color: var(--c-danger-text); font-weight: 600; }
.log .line.detail .m { color: var(--c-text-3); }

/* 단계 안내 */
.steps { display: flex; flex-direction: column; background: var(--c-surface-2); border-radius: var(--r-2); padding: var(--s-2) var(--s-4); }
.step { display: flex; align-items: center; gap: var(--s-3); height: 40px; }
.step + .step { border-top: 1px solid var(--c-border); }
.step .n { width: 24px; height: 24px; border-radius: 50%; background: var(--c-text); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.step > div { display: flex; align-items: baseline; gap: var(--s-2); min-width: 0; }
.step b { white-space: nowrap; } .step span { font-size: 13px; color: var(--c-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 프로필 목록 */
.profile-item { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-6); border: 1px solid var(--c-border); border-radius: var(--r-3); background: #fff; margin-bottom: var(--s-3); transition: all var(--t); box-shadow: var(--sh-1); }
.profile-item { cursor: pointer; }
.profile-item:hover { border-color: var(--c-border-strong); box-shadow: var(--sh-2); }
.profile-item .actions, .profile-item .files { cursor: auto; }
.profile-item.active { border-color: var(--c-primary); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary-text); display: grid; place-items: center; font-weight: 700; font-size: 16px; flex: none; }
.profile-item .info { flex: 1; min-width: 0; }
.profile-item .title { font-weight: 700; display: flex; align-items: center; gap: var(--s-2); line-height: 24px; }
.profile-item .meta { font-size: 13px; line-height: 20px; color: var(--c-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-item .ready { width: 160px; flex: none; }
.profile-item .actions { display: flex; gap: var(--s-2); flex: none; }
.progress { height: 8px; background: var(--c-surface-3); border-radius: 8px; overflow: hidden; margin-top: var(--s-1); }
.progress > i { display: block; height: 100%; background: var(--c-primary); border-radius: 8px; }

/* 탭 — 높이 40 */
.tabs { display: flex; gap: var(--s-2); border-bottom: 1px solid var(--c-border); margin-bottom: var(--s-6); }
.tab { height: 40px; display: flex; align-items: center; padding: 0 var(--s-3); cursor: pointer; color: var(--c-text-3); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--c-text); }
.tab.active { color: var(--c-primary-text); border-color: var(--c-primary); }
.tab-pane { display: none; } .tab-pane.active { display: block; }

/* 모달 */
.modal-bg { position: fixed; inset: 0; background: rgba(25,28,31,.4); display: none; align-items: center; justify-content: center; z-index: 120; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: var(--r-4); width: min(920px, 94vw); max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--sh-3); }
.modal-head { display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 var(--s-6); border-bottom: 1px solid var(--c-border); }
.modal-body { padding: var(--s-6); overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s-2); height: 72px; align-items: center; padding: 0 var(--s-6); border-top: 1px solid var(--c-border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.form-grid .span2 { grid-column: span 2; }
.rows-table th { height: 32px; padding: 0 var(--s-1); background: transparent; border-bottom: 0; }
.rows-table td { height: auto; padding: var(--s-1); border-bottom: 0; }
.rows-table .input { height: var(--h-control-sm); padding: 0 var(--s-2); font-size: 13px; border-radius: var(--r-1); }
.rows-table textarea.input { height: auto; min-height: 32px; padding: 6px var(--s-2); }

/* 토스트 */
.toast-wrap { position: fixed; right: var(--s-6); bottom: var(--s-6); display: flex; flex-direction: column; gap: var(--s-2); z-index: 130; }
.toast { background: var(--c-text); color: #fff; height: 40px; display: flex; align-items: center; padding: 0 var(--s-4); border-radius: var(--r-2); font-size: 13px; box-shadow: var(--sh-2); animation: fade .18s; }
.toast.success { background: var(--c-primary-hover); } .toast.error { background: var(--c-danger); }
@keyframes fade { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none; } }

/* 유틸 */
.row { display: flex; align-items: center; gap: var(--s-2); }
.row.end { justify-content: flex-end; }
.mt-4 { margin-top: var(--s-4); } .mb-3 { margin-bottom: var(--s-3); } .mb-4 { margin-bottom: var(--s-4); }

[hidden] { display: none !important; }

/* ==========================================================
   입력 — 아이콘 / 상태
   ========================================================== */
.input-wrap { position: relative; flex: 1; }
.input-wrap > .lucide { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--c-text-4); pointer-events: none; transition: color var(--t); }
.input-wrap .input { padding-left: 40px; }
.input-wrap:focus-within > .lucide { color: var(--c-primary); }
.input-wrap .clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: 0; background: transparent; border-radius: 50%; color: var(--c-text-4); cursor: pointer; display: none; place-items: center; }
.input-wrap .clear .lucide { position: static; transform: none; width: 14px; height: 14px; color: inherit; }
.input-wrap .clear:hover { background: var(--c-surface-3); color: var(--c-text-2); }
.input-wrap.filled .clear { display: grid; }
.input-wrap.filled .input { padding-right: 36px; }
.input.filled { border-color: var(--c-border-strong); }
.field .help { font-size: 12px; line-height: 16px; color: var(--c-text-3); }
.field .help.error { color: var(--c-danger-text); }
.field.error .input { border-color: var(--c-danger); box-shadow: 0 0 0 3px rgba(220,59,59,.12); }

/* ==========================================================
   셀렉트 — 커스텀 드롭다운
   ========================================================== */
.sel { position: relative; width: 100%; }
.sel-trigger { display: flex; align-items: center; gap: var(--s-2); width: 100%; height: var(--h-control); padding: 0 12px 0 12px; border: 1px solid var(--c-border); border-radius: var(--r-2); background: #fff; cursor: pointer; text-align: left; transition: border var(--t), box-shadow var(--t); }
.sel-trigger:hover { border-color: var(--c-border-strong); }
.sel.open .sel-trigger, .sel-trigger:focus-visible { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(42,199,105,.14); }
.sel-trigger .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-trigger .txt.ph { color: var(--c-text-4); }
.sel-trigger .lucide.lead { width: 18px; height: 18px; color: var(--c-text-3); }
.sel-trigger .lucide.chev { width: 16px; height: 16px; color: var(--c-text-3); transition: transform var(--t); }
.sel.open .sel-trigger .chev { transform: rotate(180deg); color: var(--c-primary); }
.sel.sm .sel-trigger { height: var(--h-control-sm); border-radius: var(--r-1); font-size: 13px; padding: 0 8px; }
.sel-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-3); box-shadow: var(--sh-3); padding: var(--s-2); z-index: 40; display: none; max-height: 280px; overflow: auto; animation: selin .14s ease; }
.sel.open .sel-menu { display: block; }
.sel.up .sel-menu { top: auto; bottom: calc(100% + 6px); }
.sel-opt { display: flex; align-items: center; gap: var(--s-2); height: 40px; padding: 0 var(--s-3); border-radius: var(--r-2); cursor: pointer; color: var(--c-text); }
.sel-opt:hover, .sel-opt.hl { background: var(--c-surface-2); }
.sel-opt.on { background: var(--c-primary-soft); color: var(--c-primary-text); font-weight: 600; }
.sel-opt .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-opt .sub { font-size: 12px; color: var(--c-text-3); }
.sel-opt .check { width: 16px; height: 16px; opacity: 0; color: var(--c-primary); }
.sel-opt.on .check { opacity: 1; }
.sel-opt.empty { color: var(--c-text-3); cursor: default; }
.sel.sm .sel-opt { height: 32px; font-size: 13px; }
.sel-group { font-size: 11px; font-weight: 600; color: var(--c-text-4); padding: var(--s-2) var(--s-3) var(--s-1); letter-spacing: .04em; }
@keyframes selin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 프로필 요약 */
.psum { display: flex; flex-direction: column; gap: var(--s-3); }
.psum .who { display: flex; align-items: center; gap: var(--s-3); }
.psum .who .name { font-weight: 700; font-size: 16px; line-height: 24px; }
.psum .who .sub { display: block; }
.psum .line { display: flex; align-items: center; gap: var(--s-2); font-size: 13px; color: var(--c-text-2); height: 24px; }
.psum .line .lucide { width: 16px; height: 16px; color: var(--c-text-4); }
.psum .line.none { color: var(--c-text-4); }
.psum .bar { margin-top: var(--s-1); }
.psum .bar .k { display: flex; justify-content: space-between; font-size: 12px; color: var(--c-text-3); line-height: 16px; }
.psum .bar .progress { width: 100%; }
.psum .empty { padding: var(--s-4) 0; text-align: left; }

/* ---------- 첨부 파일 ---------- */
.file-list{display:flex;flex-direction:column;gap:8px}
.file-row{display:flex;align-items:center;gap:16px;padding:12px 16px;border:1px solid var(--c-border);border-radius:var(--r-md);background:var(--c-surface)}
.file-row .fr-icon{width:40px;height:40px;border-radius:var(--r-md);display:grid;place-items:center;background:var(--c-bg);color:var(--c-text-sub);flex:none}
.file-row.has .fr-icon{background:var(--c-primary-soft,#e9f8ef);color:var(--c-primary)}
.file-row .fr-body{flex:1;min-width:0}
.file-row .fr-kind{font-weight:600;font-size:14px}
.file-row .fr-name{font-size:13px;color:var(--c-text-sub);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-row .fr-name.none{color:var(--c-text-muted,#9aa3ad)}
.file-row .fr-acts{display:flex;gap:8px;flex:none}

/* 프로필 카드 첨부 파일 칩 */
.profile-item .files{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.chip{display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 8px;border-radius:12px;background:var(--c-primary-soft);color:var(--c-primary-text);font-size:12px;font-weight:500;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chip svg{width:12px;height:12px;flex:none}
a.chip{text-decoration:none;cursor:pointer}
a.chip:hover{background:var(--c-primary);color:#fff}
.file-row .fr-name a{color:var(--c-primary-text);text-decoration:none}
.file-row .fr-name a:hover{text-decoration:underline}
.chip.none{background:var(--c-bg);color:var(--c-text-3)}

.quit-screen{position:fixed;inset:0;background:var(--c-bg);display:grid;place-items:center;z-index:9999;font-size:16px;color:var(--c-text-2);text-align:center;line-height:1.7}

/* ---------- 상단 헤더 + 계정 메뉴 ---------- */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }
.topbar { height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--s-8); background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.topbar-right { position: relative; display: flex; align-items: center; gap: var(--s-3); }
.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.avatar-btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.avatar-circle { width: 32px; height: 32px; border-radius: 50%; background: var(--c-primary); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; text-transform: uppercase; }
.avatar-circle.lg { width: 40px; height: 40px; font-size: 16px; }
.user-menu { position: absolute; top: 44px; right: 0; width: 280px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-3); box-shadow: var(--sh-3); padding: var(--s-2); z-index: 40; }
.um-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border-bottom: 1px solid var(--c-border); margin-bottom: var(--s-2); }
.um-name { font-weight: 700; line-height: 20px; }
.um-email { font-size: 12px; line-height: 16px; color: var(--c-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.um-item { display: flex; align-items: center; gap: var(--s-3); width: 100%; height: 40px; padding: 0 var(--s-3); border: 0; background: none; border-radius: var(--r-2); color: var(--c-text-2); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.um-item .lucide { width: 18px; height: 18px; color: var(--c-text-3); }
.um-item:hover { background: var(--c-surface-2); color: var(--c-text); }
.um-item.danger { color: var(--c-danger-text); } .um-item.danger .lucide { color: var(--c-danger); }
.um-sep { height: 1px; background: var(--c-border); margin: var(--s-2) 0; }
.reagree { flex: none; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-8); background: var(--c-warn-soft); color: var(--c-warn-text); border-bottom: 1px solid #f3dfa0; }

/* ---------- 로그인 / 회원가입 ---------- */
.auth { position: fixed; inset: 0; z-index: 100; background: var(--c-bg); overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 64px var(--s-4); }
.auth-card { width: min(440px, 100%); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-4); box-shadow: var(--sh-2); padding: var(--s-8); }
.auth-brand { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-8); }
.auth-brand .logo { width: 40px; height: 40px; border-radius: var(--r-3); background: var(--c-primary); color: #fff; display: grid; place-items: center; }
.auth-brand .name { font-weight: 700; font-size: 16px; }
.auth-form { display: flex; flex-direction: column; gap: var(--s-4); }
.auth-form h1 { font-size: 22px; line-height: 28px; font-weight: 700; margin: 0; }
.auth-form .hint { font-size: 12px; line-height: 16px; color: var(--c-text-3); margin-top: var(--s-1); }
.auth-form .hint.weak { color: var(--c-danger-text); } .auth-form .hint.strong { color: var(--c-primary-text); }
.auth-form .input.code { font-size: 24px; letter-spacing: 8px; text-align: center; height: 56px; font-weight: 700; }
.auth-err { min-height: 0; font-size: 13px; line-height: 20px; color: var(--c-danger-text); }
.auth-err:empty { display: none; }
.auth-links { display: flex; justify-content: space-between; gap: var(--s-3); font-size: 13px; }
.auth-links a, .auth-foot a, .sub a { color: var(--c-text-2); text-decoration: underline; text-underline-offset: 3px; }
.auth-foot { margin-top: var(--s-6); text-align: center; font-size: 12px; color: var(--c-text-3); }
.consents { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); background: var(--c-surface-2); border-radius: var(--r-3); }
.check-row { display: flex; align-items: center; gap: var(--s-3); font-size: 13px; line-height: 20px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--c-primary); flex: none; }
.check-row.all { font-weight: 700; padding-bottom: var(--s-2); border-bottom: 1px solid var(--c-border); }
.check-row a { color: var(--c-text); text-decoration: underline; text-underline-offset: 3px; }
.dev-note { padding: var(--s-3) var(--s-4); background: var(--c-warn-soft); color: var(--c-warn-text); border-radius: var(--r-2); font-size: 13px; line-height: 20px; }
.dev-note b { font-size: 20px; letter-spacing: 4px; }
.modal.narrow { width: min(640px, 94vw); }
.md { font-size: 14px; line-height: 24px; color: var(--c-text-2); overflow-wrap: anywhere; }
.md h2, .md h3, .md h4 { color: var(--c-text); margin: 24px 0 8px; line-height: 28px; } .md h2 { font-size: 20px; } .md h3 { font-size: 16px; } .md h4 { font-size: 14px; }
.md h2:first-child, .md h3:first-child { margin-top: 0; }
.md p { margin: 0 0 12px; } .md ul, .md ol { margin: 0 0 12px; padding-left: 22px; } .md li { margin: 4px 0; }
.md table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 13px; line-height: 20px; }
.md th, .md td { border: 1px solid var(--c-border); padding: 8px 12px; text-align: left; vertical-align: top; } .md th { background: var(--c-surface-2); font-weight: 600; color: var(--c-text); }
.md blockquote { margin: 0 0 12px; padding: 8px 16px; border-left: 3px solid var(--c-primary); background: var(--c-surface-2); border-radius: var(--r-1); }
.md code { font-size: 12px; background: var(--c-surface-2); padding: 1px 6px; border-radius: 4px; }
.md a { color: var(--c-primary-text); }
.danger-zone { border-color: var(--c-danger-soft); }
.mt-4 { margin-top: var(--s-4); } .mb-4 { margin-bottom: var(--s-4); }

/* ---------- 첫 화면(체험) / 미리보기 ---------- */
.auth-card:has(#f-landing:not([hidden])), .auth-card:has(#f-preview:not([hidden])) { width: min(560px, 100%); }
.landing h1 { font-size: 26px; line-height: 36px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); padding: var(--s-8) var(--s-4); border: 2px dashed var(--c-border-2, #cfd4da); border-radius: var(--r-3); background: var(--c-surface-2); cursor: pointer; text-align: center; transition: border-color var(--t), background var(--t); }
.dropzone:hover, .dropzone.over { border-color: var(--c-primary); background: var(--c-primary-soft); }
.dropzone .lucide { width: 32px; height: 32px; color: var(--c-primary); }
.dropzone span { font-size: 12px; color: var(--c-text-3); }
.dropzone.busy { pointer-events: none; opacity: .6; }
.preview { display: flex; flex-direction: column; gap: var(--s-2); }
.preview .pv-row { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); background: var(--c-surface-2); border-radius: var(--r-2); }
.preview .pv-row .lucide { width: 18px; height: 18px; color: var(--c-primary); flex: none; margin-top: 1px; }
.preview .pv-k { font-size: 12px; color: var(--c-text-3); line-height: 16px; }
.preview .pv-v { font-weight: 500; }
.preview .pv-v.none { color: var(--c-text-4); font-weight: 400; }
/* ---------- 공지사항 ---------- */
.avatar-btn { position: relative; }
.avatar-dot { position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--c-danger); border: 2px solid var(--c-surface); }
.um-item .badge { margin-left: auto; }
.notice-list { padding: 0; }
.notice-item { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-6); border-bottom: 1px solid var(--c-border); cursor: pointer; }
.notice-item:last-child { border-bottom: 0; } .notice-item:hover { background: var(--c-surface-2); }
.notice-item .ni-kind { flex: none; }
.notice-item .ni-title { font-weight: 600; } .notice-item.unread .ni-title::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c-danger); margin-left: 8px; vertical-align: middle; }
.notice-item .ni-date { margin-left: auto; color: var(--c-text-3); font-size: 12px; flex: none; }
.notice-foot { justify-content: space-between; }
.steps-ob { display: flex; flex-direction: column; gap: var(--s-3); }
.steps-ob .st { display: flex; gap: var(--s-4); padding: var(--s-4); border: 1px solid var(--c-border); border-radius: var(--r-3); }
.steps-ob .st-ic { width: 40px; height: 40px; border-radius: var(--r-2); background: var(--c-primary-soft); color: var(--c-primary-text); display: grid; place-items: center; flex: none; }
.steps-ob .st-n { font-size: 12px; color: var(--c-primary-text); font-weight: 700; line-height: 16px; }
.steps-ob .st-t { font-weight: 700; line-height: 20px; margin: 2px 0 4px; }
.steps-ob .st-b { color: var(--c-text-2); font-size: 13px; line-height: 20px; }

.acc-foot { margin-top: var(--s-8); text-align: right; } .acc-foot a { color: var(--c-text-3); text-decoration: underline; text-underline-offset: 3px; } .acc-foot a:hover { color: var(--c-danger-text); }

/* 설정 층(계정·공지·입력 기록)에서는 사이드바를 숨기고 상단 로고가 홈 버튼이 된다 */
.brand { text-decoration: none; color: inherit; cursor: pointer; }
.topbar-brand { display: none; margin: 0; height: auto; }
.topbar-brand .name { font-size: 15px; }
.app.solo .sidebar { display: none; }
.app.solo .topbar-brand { display: flex; }

/* ---------- 예시 모드 ---------- */
.auth-btns { display: flex; gap: var(--s-2); }
.demo-banner { flex: none; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-8); background: var(--c-primary-soft); color: var(--c-primary-text); border-bottom: 1px solid #cdeedb; font-size: 13px; }
.demo-banner .lucide { width: 18px; height: 18px; flex: none; } .demo-banner span { flex: 1; } .demo-banner b { color: var(--c-text); }
.demo-try { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4); margin-bottom: var(--s-4); border: 1px dashed var(--c-primary); border-radius: var(--r-3); background: var(--c-primary-soft); }
.demo-try > .lucide { width: 24px; height: 24px; color: var(--c-primary-text); flex: none; } .demo-try div { flex: 1; } .demo-try b { display: block; } .demo-try span { font-size: 13px; color: var(--c-text-2); }
.demo-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--c-warn-soft); color: var(--c-warn-text); font-size: 11px; font-weight: 700; vertical-align: middle; }

.file-quota { margin-bottom: var(--s-4); } .file-quota .q-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }

/* ---------- 사이드바 사용량 ---------- */
.usage { border: 1px solid var(--c-border); border-radius: var(--r-3); padding: var(--s-3) var(--s-4); cursor: pointer; background: var(--c-surface); }
.usage:hover { border-color: var(--c-primary); }
.u-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-2); }
.u-plan { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--c-surface-3); color: var(--c-text-2); }
.u-plan.pro { background: var(--c-primary); color: #fff; }
.u-link { font-size: 12px; color: var(--c-primary-text); font-weight: 600; }
.u-row { display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; color: var(--c-text-3); margin-top: var(--s-2); } .u-row b { color: var(--c-text); font-weight: 600; }
.usage .progress { margin-top: 4px; height: 4px; }
/* ---------- 이용권 페이지 ---------- */
.plan-now { display: flex; align-items: center; gap: var(--s-6); }
.plan-now .pn-plan { font-size: 18px; font-weight: 700; } .plan-now .pn-meta { color: var(--c-text-3); font-size: 13px; }
.plan-now .pn-stats { display: flex; gap: var(--s-8); margin-left: auto; } .plan-now .pn-stat b { display: block; font-size: 18px; } .plan-now .pn-stat span { font-size: 12px; color: var(--c-text-3); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-bottom: var(--s-4); }
.plan { position: relative; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-3); padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-2); }
.plan.best { border: 2px solid var(--c-primary); box-shadow: 0 8px 24px rgba(42,199,105,.15); }
.p-tag { position: absolute; top: -12px; left: var(--s-6); background: var(--c-primary); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.p-name { font-weight: 700; font-size: 15px; } .p-price { font-size: 28px; font-weight: 800; line-height: 36px; } .p-price small { font-size: 13px; font-weight: 500; color: var(--c-text-3); }
.p-sub { color: var(--c-text-3); font-size: 13px; }
.plan ul { margin: var(--s-3) 0 var(--s-4); padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--c-text-2); }
.plan li::before { content: "✓"; color: var(--c-primary-text); font-weight: 700; margin-right: 8px; }
.plan .btn { margin-top: auto; justify-content: center; }

.beta-note { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-6); margin-bottom: var(--s-4); background: var(--c-primary-soft); border: 1px solid #cdeedb; border-radius: var(--r-3); color: var(--c-text-2); font-size: 14px; }
.beta-note .lucide { width: 24px; height: 24px; color: var(--c-primary-text); flex: none; } .beta-note b { color: var(--c-text); }

/* 주소 칸 안 태그(예시 페이지 표시) */
.input-wrap .in-tag { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--c-warn-soft); color: var(--c-warn-text); font-size: 12px; font-weight: 700; pointer-events: none; }
.input-wrap .in-tag .lucide { width: 12px; height: 12px; }
.input-wrap:has(.in-tag:not([hidden])) .input { padding-right: 150px; }

/* 예시 모드 안내 모달 */
.modal.gate { width: min(440px, 94vw); }
.gate-body { padding: var(--s-8); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.gate-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary-text); display: grid; place-items: center; margin-bottom: var(--s-2); }
.gate-icon .lucide { width: 26px; height: 26px; }
.gate-body h2 { font-size: 20px; line-height: 28px; margin: 0; }
.gate-body .sub { margin: 0; line-height: 22px; }
.gate-actions { display: flex; flex-direction: column; gap: var(--s-2); width: 100%; margin-top: var(--s-4); }
.gate-actions .btn { justify-content: center; }
.gate-skip { font-size: 13px; color: var(--c-text-3); text-decoration: underline; text-underline-offset: 3px; margin-top: var(--s-2); }

#modal-gate { z-index: 130; }   /* 다른 모달 위에 뜬다 */
/* 이용권 페이지 가운데 정렬 */
/* 사이드바 없는 설정 층(이용권·공지·입력 기록·계정)은 가운데 정렬 */
#page-plans.page.active, #page-notices.page.active, #page-history.page.active, #page-account.page.active { max-width: 1040px; margin: 0 auto; }

/* 대표 아이콘(이미지 로고) */
.brand .logo { background: transparent; overflow: hidden; } .brand .logo img { width: 100%; height: 100%; display: block; }
.auth-brand .logo { background: transparent; overflow: hidden; } .auth-brand .logo img { width: 100%; height: 100%; display: block; }

.cf-turnstile-slot { min-height: 0; } .cf-turnstile-slot:empty { display: none; }

/* 지원 예정 목록 */
.wish-list { display: flex; flex-direction: column; }
.wish-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--c-border); }
.wish-row:last-child { border-bottom: 0; }
.wish-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--c-primary); flex: none; }
.wish-row .w-main { flex: 1; min-width: 0; }
.wish-row .w-co { font-weight: 600; } .wish-row .w-co[contenteditable]:focus { outline: 1px solid var(--c-primary); border-radius: 4px; padding: 0 4px; }
.wish-row .w-url { font-size: 12px; color: var(--c-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wish-row .w-dday { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--c-surface-3); color: var(--c-text-2); flex: none; }
.wish-row .w-dday.soon { background: var(--c-danger-soft); color: var(--c-danger-text); }
.wish-row .w-date { height: 30px; border: 1px solid var(--c-border); border-radius: var(--r-1); font: inherit; font-size: 12px; padding: 0 6px; color: var(--c-text-2); }
.wish-row .w-acts { display: flex; gap: var(--s-1); flex: none; }
.wish-list .empty { padding: var(--s-8); text-align: center; color: var(--c-text-3); }

.plan.locked { opacity: .7; } .plan.locked .p-soon { position: absolute; top: -12px; left: var(--s-6); background: var(--c-text-3); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }

/* 경력기술서 가져오기 — 항목·결과 체크 목록 */
.cr-item, .cr-rcard { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--c-border); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.cr-item:hover, .cr-rcard:hover { border-color: var(--c-primary); }
.cr-item input, .cr-rcard input { margin-top: 3px; flex: none; }
.cr-body { min-width: 0; flex: 1; }
.cr-prev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 햄버거 / 바텀 네비 — 평소(넓은 화면)엔 숨김 ===== */
.hamburger { display: none; }
.bottom-nav { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; background: var(--c-surface); border-top: 1px solid var(--c-border); height: 62px; padding-bottom: env(safe-area-inset-bottom, 0px); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--c-text-3); font-size: 11px; font-weight: 600; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
.bn-item .lucide { width: 22px; height: 22px; }
.bn-item.active, .bn-item.active .lucide { color: var(--c-primary); }
.bn-badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--c-primary); color: #fff; font-size: 10px; line-height: 16px; text-align: center; font-weight: 700; }

/* 모바일 접속 안내 바텀시트 (아래에서 올라오는 시트) */
.sheet-bg { position: fixed; inset: 0; z-index: 250; background: rgba(25,28,31,.42); display: none; align-items: flex-end; }
.sheet-bg.open { display: flex; }
.sheet { width: 100%; background: var(--c-surface); border-radius: 22px 22px 0 0; padding: 10px 22px calc(26px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 32px rgba(25,28,31,.18); animation: sheetup .3s cubic-bezier(.2,.9,.2,1); }
@keyframes sheetup { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 40px; height: 4px; border-radius: 999px; background: var(--c-border); margin: 0 auto 18px; }
.sheet-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--c-primary-soft, #eafaf1); color: var(--c-primary); display: grid; place-items: center; margin-bottom: 14px; }
.sheet-icon .lucide { width: 26px; height: 26px; }
.sheet h2 { font-size: 19px; line-height: 26px; margin: 0 0 10px; font-weight: 700; }
.sheet p { margin: 0 0 10px; line-height: 22px; color: var(--c-text-2); }
.sheet .btn.lg { width: 100%; margin-top: 10px; }

/* ===== 모바일 / 좁은 화면 (≤860px) ===== */
@media (max-width: 860px) {
  .app { display: block; height: auto; min-height: 100vh; }
  .sidebar { display: none; }          /* 모바일은 바닥 네비게이션으로 대체 */
  .hamburger { display: none; }
  .bottom-nav { display: flex; }

  .content { height: auto; min-height: 100vh; }
  .topbar { padding: 0 var(--s-4); position: sticky; top: 0; z-index: 100; }
  .topbar-brand { display: flex; }
  .topbar-brand .ver { display: none; }

  .main { padding: var(--s-4) var(--s-4) 80px; }   /* 바닥 네비에 안 가리게 아래 여백 */
  .page { max-width: 100%; }
  .page-head { flex-wrap: wrap; min-height: 0; gap: var(--s-2); }

  .kpis { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
  .cols { grid-template-columns: 1fr; }

  .demo-banner, .reagree { flex-wrap: wrap; padding: var(--s-3) var(--s-4); }
  .band { flex-wrap: wrap; gap: var(--s-4); }
  /* 모바일 PC-전용 안내는 바텀시트(#mobile-notice)가 접속 시 대신 해주므로, 홈 안의 설치 배너는 숨긴다 */
  #install-banner { display: none !important; }
  /* 모바일 크롬엔 확장 설치가 안 되므로, 눌러도 막다른 길인 '설치하기' 링크도 숨긴다 */
  #ext-install-link { display: none; }

  /* 프로필 편집 탭은 가로 스크롤 */
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tabs .tab { white-space: nowrap; }

  /* 모달 꽉 차게 + 내부 스크롤 */
  .modal { width: 94vw; max-height: 92vh; }
  .modal-head, .modal-foot { padding: 0 var(--s-4); height: 60px; }
  .modal-body { padding: var(--s-4); }

  /* ===== 모바일: 표를 가로 스크롤 대신 '행 = 세로 카드'로. 헤더는 숨기고 칸마다 data-label 을 붙인다. ===== */
  .table-wrap { overflow: visible; }
  .table { font-size: 14px; }
  .table thead { display: none; }
  .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 14px; border-bottom: 1px solid var(--c-border); }
  .table tr:last-child { border-bottom: 0; }
  .table tr.clickable:hover td { background: transparent; }
  .table td { height: auto; padding: 4px 0; border: 0; display: flex; gap: 12px; align-items: baseline; }
  .table td::before { content: attr(data-label); flex: 0 0 72px; color: var(--c-text-3); font-size: 12px; font-weight: 600; line-height: 20px; }
  .table td[data-label=""] { justify-content: flex-end; padding-top: 2px; }
  .table td[data-label=""]::before { display: none; }
  .table .ellipsis { max-width: none; white-space: normal; overflow: visible; text-overflow: clip; flex: 1; }
  /* 빈 상태(colspan) 행은 테두리 없이 가운데 안내만 */
  .table tr:has(td[colspan]) { border: 0; padding: 0; }
  .table td[colspan] { display: block; text-align: center; padding: var(--s-6) 0; }
  .table td[colspan]::before { display: none; }

  /* 프로필 편집 입력표: 각 항목을 카드로, 라벨 위 + 입력칸 아래로 세로 스택 */
  .rows-table tr { border: 1px solid var(--c-border); border-radius: 10px; padding: 10px 12px 12px; margin-bottom: 10px; }
  .rows-table td { display: block; padding: 5px 0; }
  .rows-table td::before { display: block; flex: none; margin-bottom: 3px; }
  .rows-table td[data-label=""] { text-align: right; padding: 2px 0 0; }
  .rows-table td[data-label=""]::before { display: none; }
  .rows-table .input { width: 100%; min-width: 0; height: var(--h-control); font-size: 14px; }
  .rows-table textarea.input { height: auto; min-height: 60px; }

  /* 약관·공지 안의 표도 세로 카드로 */
  .md table, .md tbody, .md tr, .md td { display: block; }
  .md thead { display: none; }
  .md tr { border: 1px solid var(--c-border); border-radius: 10px; padding: 8px 12px; margin: 0 0 8px; }
  .md td { border: 0; padding: 3px 0; display: flex; gap: 10px; align-items: baseline; }
  .md td::before { content: attr(data-label); flex: 0 0 84px; color: var(--c-text-3); font-size: 12px; font-weight: 600; }

  /* 단계(1·2·3) 설명은 한 줄 자르지 말고 줄바꿈해 전부 보이게 */
  .step { height: auto; align-items: flex-start; padding: var(--s-2) 0; }
  .step > div { flex-wrap: wrap; align-items: baseline; }
  .step b { white-space: normal; }
  .step span { white-space: normal; overflow: visible; text-overflow: clip; }

  /* 카드 제목 줄(제목+뱃지+버튼)이 한 줄에 안 들어가면 줄바꿈 */
  .card-head { flex-wrap: wrap; height: auto; gap: var(--s-2); }
  .card-head h2 { white-space: nowrap; }

  /* 이용권: '사용 중' 요약을 세로로, 통계 라벨이 세로로 쪼개지지 않게 */
  .plan-now { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
  .plan-now .pn-stats { margin-left: 0; gap: var(--s-6); flex-wrap: wrap; }
  .plan-now .pn-stat { min-width: 84px; }
  .plan-now .pn-stat span { white-space: normal; }
  .plans { grid-template-columns: 1fr; }

  /* 프로필 카드: 세로로 쪼개지지 않게 줄바꿈. 이름은 한 줄, 진행바·첨부는 아래로 */
  .profile-item { flex-wrap: wrap; align-items: center; }
  .profile-item .info { flex: 1 1 auto; min-width: 0; }
  .profile-item .title { white-space: normal; }
  .profile-item .actions { flex: none; }
  .profile-item .ready { width: 100%; order: 10; margin-top: 10px; }
  .profile-item .files { flex-basis: 100%; order: 11; }

  /* 지원 예정 행: 제목은 윗줄, 마감일·날짜·버튼은 아랫줄로 감싸기 */
  .wish-row { flex-wrap: wrap; }
  .wish-row .w-main { flex: 1 1 60%; }
  .wish-row .w-dday { order: 3; }
  .wish-row .w-date { order: 4; }
  .wish-row .w-acts { order: 5; margin-left: auto; margin-top: 6px; }

  /* 데스크톱 전용/모바일 전용 표시 토글 */
  .only-desktop { display: none !important; }
  .only-mobile { display: block !important; }

  /* 모달·로그인(전체화면)이 떠 있으면 바닥 네비는 숨긴다.
     안 숨기면 바닥 네비(z-index 200)가 모달 위로 떠서 저장/취소 버튼을 가리고,
     로그인 화면 위로도 비쳐 보인다. */
  body:has(.modal-bg.open) .bottom-nav,
  body:has(#auth:not([hidden])) .bottom-nav { display: none; }

  /* 토스트·재인증 위젯은 바닥 네비(62px) 위로 올려 가리지 않게 */
  .toast-wrap { right: var(--s-4); left: var(--s-4); bottom: calc(62px + var(--s-3)); align-items: center; z-index: 210; }
  #ts-reauth { bottom: calc(62px + 16px) !important; }
}
.only-mobile { display: none; }

/* 아주 좁은 화면(≤400px): KPI도 한 줄에 하나 */
@media (max-width: 400px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .topbar-brand .name { font-size: 14px; }
}
