/* 센터링(가칭) 공통 스타일 · 2026.10 개편: 시프티(구조) + 플러그(시각 언어) 참고 */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #191f28;
  --muted: #6b7684;
  --line: #e5e8eb;
  --brand: #16875c;       /* 녹색 하나만 강조색으로 */
  --brand-2: #4fb08a;
  --brand-soft: #e9f5ef;
  --accent: #16875c;
  --accent-soft: #e9f5ef;
  --danger: #e5484d;
  --danger-soft: #fdeeee;
  --warn: #4e5968;
  --warn-soft: #f2f4f6;
  --ok: #16875c;
  --ok-soft: #e9f5ef;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(130,140,160,.08);
  --font: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --top-h: 60px;
  --lnb-w: 232px;
  --sub: #8b95a1;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 15px; -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 1.55rem; margin-top: 0; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
code { background: #f2f4f6; padding: 1px 6px; border-radius: 6px; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---------- 앱 셸: 상단 바 + 왼쪽 메뉴 ---------- */
body.ct-shell { padding: var(--top-h) 0 0 var(--lnb-w); }
body.ct-shell.rail { --lnb-w: 76px; }
.ct-top { position: fixed; top: 0; left: 0; right: 0; height: var(--top-h); z-index: 60; background: #fff; border-bottom: 1px solid #f2f4f6; display: flex; align-items: center; gap: 10px; padding: 0 20px 0 16px; }
.ct-top .burger { display: none; border: 0; background: none; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; color: #4e5968; }
.ct-top .burger svg { width: 22px; height: 22px; }
.ct-top .logo { font-size: 1.12rem; }
.ct-top .beta { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid #d1d6db; color: #4e5968; }
.ct-top .spacer { flex: 1; }
.ct-top .fb-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--brand); color: var(--brand); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.ct-top .fb-btn:hover { background: var(--brand-soft); }
.ct-top .fb-btn svg { width: 16px; height: 16px; }
.ct-lnb { position: fixed; top: var(--top-h); left: 0; bottom: 0; width: var(--lnb-w); z-index: 55; background: #fff; border-right: 1px solid #f2f4f6; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.ct-lnb .sec { font-size: .74rem; font-weight: 600; color: var(--sub); padding: 14px 12px 6px; }
.ct-lnb a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #4e5968; font-weight: 600; font-size: .94rem; white-space: nowrap; }
.ct-lnb a svg { width: 20px; height: 20px; flex: none; color: #8b95a1; }
.ct-lnb a:hover { background: #f2f4f6; text-decoration: none; }
.ct-lnb a.active { background: var(--brand-soft); color: var(--brand); }
.ct-lnb a.active svg { color: var(--brand); }
.ct-lnb a .tag { font-style: normal; margin-left: auto; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #f2f4f6; color: #6b7684; }
.ct-lnb a.active .tag { background: #fff; color: var(--brand); }
.ct-lnb .foot { margin-top: auto; padding: 12px; font-size: .76rem; color: var(--sub); line-height: 1.5; }
body.rail .ct-lnb { padding: 16px 10px; align-items: center; }
body.rail .ct-lnb a { width: 52px; height: 48px; justify-content: center; padding: 0; }
body.rail .ct-lnb a span, body.rail .ct-lnb a .tag, body.rail .ct-lnb .sec, body.rail .ct-lnb .foot { display: none; }
body.rail .ct-lnb a svg { width: 22px; height: 22px; }
.ct-dim { display: none; }
@media (max-width: 900px) {
  body.ct-shell, body.ct-shell.rail { padding-left: 0; }
  .ct-top { padding: 0 12px 0 6px; }
  .ct-top .burger { display: grid; place-items: center; }
  .ct-top .fb-btn b { display: none; }
  .ct-top .ai-status { display: none; }
  .ct-lnb, body.rail .ct-lnb { width: 260px; transform: translateX(-100%); transition: transform .2s; align-items: stretch; padding: 16px 12px; }
  body.rail .ct-lnb a { width: auto; height: auto; justify-content: flex-start; padding: 10px 12px; }
  body.rail .ct-lnb a span, body.rail .ct-lnb .sec, body.rail .ct-lnb .foot { display: revert; }
  body.lnb-open .ct-lnb { transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.12); }
  body.lnb-open .ct-dim { display: block; position: fixed; inset: var(--top-h) 0 0 0; background: rgba(0,0,0,.3); z-index: 54; }
}
/* 플러그식 한 문장 요약: "9월, 상담사 6명에게 1,234만원을 지급해요" */
.headline { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.35; margin: 4px 0 16px; color: #191f28; }
.headline em { font-style: normal; color: var(--brand); }
.headline em.warn { color: #191f28; } .headline em.danger { color: #e5484d; } .headline em.ok { color: #16875c; }
.headline small { display: block; font-size: .9rem; font-weight: 500; color: var(--sub); margin-top: 4px; letter-spacing: -0.01em; }
@media (max-width: 760px) { .headline { font-size: 1.25rem; } }
.page-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-title h1 { margin: 0; }

/* 상단 내비 (구형, 셸이 없을 때만) */
.topnav { position: sticky; top: 0; z-index: 50; background: rgba(247,246,242,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topnav .inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 12px 20px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); font-size: 1.05rem; white-space: nowrap; flex: none; }
.logo .mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); position: relative; }
.logo .mark::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 2.5px solid #fff; }
.logo small { font-weight: 500; }
.topnav nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav nav a { color: var(--muted); padding: 6px 8px; border-radius: 8px; font-size: .88rem; white-space: nowrap; }
@media (max-width: 1280px) and (min-width: 901px) { .logo small { display: none; } .topnav nav a { padding: 5px 6px; font-size: .84rem; } }
.topnav nav a:hover, .topnav nav a.active { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.topnav .spacer { flex: 1; }
.ai-status { font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: #f2f4f6; color: var(--muted); white-space: nowrap; }
.ai-status.on { background: var(--ok-soft); color: var(--ok); }
.ai-status.demo { background: var(--warn-soft); color: var(--warn); }

/* 레이아웃 */
.wrap { max-width: 1240px; margin: 0 auto; padding: 32px 32px 80px; }
.narrow { max-width: 880px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) { .g2, .g3, .g4 { grid-template-columns: minmax(0,1fr); } }
.card { background: var(--surface); border: 1px solid transparent; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4em; }
.card.soft { background: #fff; border-color: #e5e8eb; box-shadow: none; }
.card.accent { background: #fff; border-color: #e5e8eb; box-shadow: none; }
.card.danger { background: var(--danger-soft); border-color: #f6c9ca; box-shadow: none; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--brand-soft); color: var(--brand); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.gray { background: #f2f4f6; color: var(--muted); }
.kpi { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.kpi small { font-size: .9rem; font-weight: 500; }
.kpi-label { color: var(--muted); font-size: .88rem; }

/* 버튼/폼 */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff; padding: 9px 16px; border-radius: 8px; font-weight: 700; font-size: .9rem; cursor: pointer; font-family: inherit; transition: background .12s, border-color .12s; }
.btn:hover { background: #116b49; text-decoration: none; }
.btn.ghost { background: #fff; color: #4e5968; border-color: #e5e8eb; }
.btn.ghost:hover { background: #f6f7f9; border-color: #d1d6db; }
.btn.sm { padding: 5px 11px; font-size: .84rem; }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea { font-family: inherit; font-size: .95rem; padding: 8px 10px; border: 1px solid #e5e8eb; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,135,92,.14); }
textarea { min-height: 90px; resize: vertical; }
label { font-size: .86rem; color: var(--muted); display: block; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* 표 */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-weight: 600; color: var(--sub); font-size: .82rem; background: #f9fafb; }
td { border-bottom-color: #f2f4f6; }
tr:hover > td { background-color: #f9fafb; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th { white-space: nowrap; }
.btn { white-space: nowrap; }
.grid.top { align-items: start; }
table input, table select { padding: 6px 8px; font-size: .9rem; }
.table-wrap { overflow-x: auto; border: 1px solid #f2f4f6; border-radius: 14px; background: #fff; }
.table-wrap table th:first-child, .table-wrap table td:first-child { padding-left: 14px; }
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--danger); font-weight: 700; }
.part { color: var(--warn); font-weight: 700; }

/* 문서형 페이지 (사업계획서) */
.doc-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 36px; }
@media (max-width: 1000px) { .doc-layout { grid-template-columns: minmax(0,1fr); } .toc { display: none; } }
.toc { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 90px); overflow: auto; font-size: .9rem; }
.toc a { display: block; color: var(--muted); padding: 4px 10px; border-left: 2px solid transparent; }
.toc a.sub { padding-left: 22px; font-size: .85rem; }
.toc a.active { color: var(--brand); border-left-color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.doc section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 34px; margin-bottom: 22px; box-shadow: var(--shadow); scroll-margin-top: 80px; }
.doc section h2 .no { color: var(--brand-2); margin-right: 8px; }
.doc section h3 { margin-top: 1.4em; scroll-margin-top: 80px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: .35em; }
.callout { border-left: 3px solid var(--brand); background: #fff; padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 14px 0; }
.callout.warn { border-color: var(--warn); background: var(--warn-soft); }
.callout.danger { border-color: var(--danger); background: var(--danger-soft); }
.callout.accent { border-color: var(--accent); background: var(--accent-soft); }
.src { font-size: .78rem; color: var(--muted); vertical-align: super; }
.src a { color: var(--muted); }
.cover { background: linear-gradient(135deg, #0f5c3f, #4fb08a); color: #fff; border-radius: 18px; padding: 42px 40px; margin-bottom: 22px; }
.cover h1 { font-size: 2.3rem; margin-bottom: .3em; }
.cover p { color: #d3ecdf; max-width: 760px; }
.cover .meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; color: #d3ecdf; margin-top: 18px; }
.assump { font-size: .8rem; color: var(--warn); background: var(--warn-soft); padding: 1px 7px; border-radius: 6px; font-weight: 600; }

/* 차트 */
.chart { width: 100%; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 11px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* 앱(데모) 레이아웃 */
.app { display: grid; grid-template-columns: 230px minmax(0,1fr); min-height: calc(100vh - var(--top-h)); }
@media (min-width: 901px) { body.ct-shell .app .side { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; } }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; } .side { display: none; } }
.side { background: #fff; color: #4e5968; padding: 18px 12px; border-right: 1px solid #e5e8eb; }
.side .center-name { color: #191f28; font-weight: 700; padding: 6px 10px 14px; border-bottom: 1px solid #f2f4f6; margin-bottom: 10px; }
.side .center-name small { display: block; color: #8b95a1; font-weight: 400; }
.side a { display: flex; align-items: center; gap: 10px; color: #4e5968; padding: 9px 12px; border-radius: 9px; font-size: .93rem; font-weight: 600; cursor: pointer; }
.side a:hover { background: #f2f4f6; text-decoration: none; }
.side a.active { background: #e9f5ef; color: #16875c; }
.side a .badge { margin-left: auto; background: var(--danger); color: #fff; font-size: .72rem; border-radius: 999px; padding: 1px 7px; }
.side .sec { font-size: .72rem; letter-spacing: .08em; color: #8b95a1; padding: 14px 12px 4px; }
main.main { padding: 24px 28px 60px; overflow-x: hidden; }
.main-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.main-head h1 { font-size: 1.5rem; margin: 0; }
.main-head p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.alert-bar { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: var(--danger-soft); border: 1px solid #f6c9ca; margin-bottom: 14px; }
.alert-bar strong { color: var(--danger); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 9px 14px; font-family: inherit; font-size: .93rem; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 700; }
.cal { display: grid; grid-template-columns: 60px repeat(6, minmax(0,1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; font-size: .82rem; }
.cal .h { background: #f9fafb; padding: 8px; font-weight: 700; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
.cal .t { padding: 6px; color: var(--muted); border-top: 1px solid #f2f4f6; text-align: right; }
.cal .c { border-top: 1px solid #f2f4f6; border-left: 1px solid #f2f4f6; padding: 3px; min-height: 44px; }
.ev { border-radius: 7px; padding: 3px 6px; margin-bottom: 3px; font-size: .76rem; line-height: 1.35; color: #fff; }
.ev small { display: block; opacity: .85; font-size: .7rem; color: #fff; }

/* 폰 목업 (보호자 앱) */
.phone { width: 330px; height: 660px; border-radius: 40px; background: #191f28; padding: 12px; box-shadow: 0 20px 40px rgba(0,0,0,.18); flex: none; }
.phone .screen { width: 100%; height: 100%; border-radius: 30px; background: #f6f7f9; overflow: auto; }
.phone .ph-head { background: var(--brand); color: #fff; padding: 22px 18px 16px; }
.phone .ph-body { padding: 14px; }
.phone .ph-card { background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--line); font-size: .86rem; }

/* 슬라이드 (피치덱) */
.deck { max-width: 980px; margin: 0 auto; }
.slide { aspect-ratio: 16/9; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 48px 56px; margin-bottom: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.slide h2 { font-size: 1.9rem; }
.slide .num { position: absolute; right: 24px; bottom: 16px; color: var(--muted); font-size: .8rem; }
.slide.dark { background: linear-gradient(135deg, #0f5c3f, #4fb08a); color: #fff; }
.slide.dark h1, .slide.dark h2 { color: #fff; }
.slide.dark p { color: #d3ecdf; }
/* 모바일 */
@media (max-width: 900px) {
  .topnav .inner { flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px; }
  .topnav nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .topnav nav::-webkit-scrollbar { display: none; }
  .topnav nav a { white-space: nowrap; padding: 5px 9px; }
  .logo small { display: none; }
  .wrap { padding: 16px 12px 60px; }
  .cover { padding: 24px 20px; border-radius: 14px; }
  .cover h1 { font-size: 1.55rem; }
  .doc section { padding: 20px 16px; }
  .app { grid-template-columns: 1fr; min-height: auto; }
  .side { display: block; position: sticky; top: var(--top-h, 0); z-index: 40; padding: 6px 8px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .side .center-name, .side .sec, .side > div { display: none; }
  .side a { display: inline-flex; padding: 7px 10px; font-size: .88rem; }
  main.main { padding: 16px 12px 70px; }
  .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0,1fr) !important; }
  .g2, .g3 { grid-template-columns: minmax(0,1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .g4 .card { padding: 14px; }
  .main-head h1 { font-size: 1.3rem; }
  .kpi { font-size: 1.5rem; }
  .phone { width: 100%; max-width: 340px; height: 640px; }
  .slide { padding: 24px 22px; aspect-ratio: auto; min-height: 60vh; }
  .slide h2 { font-size: 1.35rem; }
  .slide .big { font-size: 2rem !important; }
  .modal { padding: 18px 16px; }
}
@media print {
  .topnav, .toc, .no-print { display: none !important; }
  body { background: #fff; }
  .doc-layout { display: block; }
  body { font-size: 12.5px; }
  .g2 { grid-template-columns: 1fr 1fr !important; }
  .g3 { grid-template-columns: repeat(3, 1fr) !important; }
  .g4 { grid-template-columns: repeat(4, 1fr) !important; }
  .card { padding: 12px 14px; }
  .kpi { font-size: 1.4rem; }
  .wrap { padding: 0; max-width: none; }
  .doc section { box-shadow: none; border: 0; padding: 6px 0 0; margin-bottom: 8px; break-inside: auto; }
  .doc section + section { break-before: page; }
  .card { box-shadow: none; break-inside: avoid; }
  tr, .callout, .kpi { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  .cover { padding: 26px 28px; margin-bottom: 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .slide { break-after: page; box-shadow: none; }
}

/* 모달/토스트 */
.modal-bg { position: fixed; inset: 0; background: rgba(20,30,28,.45); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 16px; max-width: 760px; width: 100%; max-height: 86vh; overflow: auto; padding: 24px 26px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #191f28; color: #fff; padding: 12px 20px; border-radius: 12px; font-size: .9rem; z-index: 200; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.ai-out { white-space: pre-wrap; background: #f9fafb; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: .92rem; min-height: 60px; }
.ai-out:has(.md) { white-space: normal; }
.md .md-h { font-weight: 700; color: var(--brand); margin: 8px 0 4px; }
.md ul, .md ol { margin: 2px 0 6px; padding-left: 1.3em; }
.md li { margin-bottom: 2px; }
.spinner { width: 16px; height: 16px; border: 2px solid #d3ecdf; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 30px 0; }

/* ---------- 2026.10 개편 추가분 ---------- */
.logo .mark { width: 30px; height: 30px; border-radius: 9px; background: #16875c; }
.ai-status { font-size: .78rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: #f2f4f6; color: #6b7684; }
.ai-status.on { background: #e9f5ef; color: #16875c; }
.ai-status.demo { background: #f2f4f6; color: #6b7684; }
.pill { padding: 3px 10px; border-radius: 6px; font-size: .76rem; font-weight: 700; }
.pill.ok { background: #e9f5ef; color: #16875c; }
.pill.warn { background: #f2f4f6; color: #4e5968; }
.pill.danger { background: #fdeeee; color: #e5484d; }
.pill.gray { background: #f2f4f6; color: #6b7684; }
.pill.accent { background: #e9f5ef; color: #16875c; }
.tabs { gap: 2px; border-bottom: 1px solid #e5e8eb; }
.tabs button { font-size: 1rem; font-weight: 700; color: #b0b8c1; padding: 10px 14px; }
.tabs button.active { color: #191f28; border-bottom-color: #191f28; }
.modal-bg { background: rgba(0,0,0,.4); }
.modal { border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.fb-modal { max-width: 560px; }
.fb-head { display: flex; align-items: center; justify-content: space-between; }
.fb-head h2 { margin: 0 0 4px; font-size: 1.35rem; }
.fb-x { border: 0; background: #f2f4f6; width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: #6b7684; }
.fb-rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.fb-rate button { border: 1.5px solid #e5e8eb; background: #fff; border-radius: 12px; padding: 12px 6px; font: inherit; font-weight: 700; color: #4e5968; cursor: pointer; }
.fb-rate button:hover { border-color: #d1d6db; }
.fb-rate button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.footer { color: var(--sub); }
/* ---------- 로그인 · 내 센터 (2026-10-11) ---------- */
.auth-wrap { max-width: 440px; margin: 24px auto; }
.auth-card { padding: 28px 26px; }
.auth-card h1 { font-size: 1.5rem; margin: 10px 0 0; }
.auth-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--brand); }
.auth-logo .mark { width: 22px; height: 22px; border-radius: 7px; background: var(--brand); display: inline-block; }
.auth-btns { display: grid; gap: 10px; }
.auth-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 12px; font-weight: 700; font-size: 1rem; text-decoration: none !important; }
.auth-btn svg { width: 20px; height: 20px; }
.auth-btn.kakao { background: #FEE500; color: rgba(0,0,0,.85); }
.auth-btn.naver { background: #03C75A; color: #fff; }
.auth-btn.naver b { font-family: Arial, sans-serif; font-weight: 900; font-size: 1.1rem; }
.auth-or { display: flex; align-items: center; gap: 10px; color: #8b95a1; font-size: .82rem; margin: 6px 0 2px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: #e5e8eb; }
.auth-seg, .seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #f2f4f6; border-radius: 12px; padding: 4px; }
.auth-seg button, .seg2 button { border: 0; background: none; border-radius: 9px; padding: 9px; font: inherit; font-weight: 600; color: #6b7684; cursor: pointer; }
.seg2 button small { display: block; font-weight: 500; font-size: .76rem; color: #8b95a1; }
.auth-seg button.on, .seg2 button.on { background: #fff; color: #191f28; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.btn.block { display: flex; width: 100%; justify-content: center; height: 48px; font-size: 1rem; }
.hub { max-width: 640px; margin: 0 auto; }
.hub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.hub-list { display: grid; gap: 10px; }
.hub-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: inherit; text-decoration: none !important; }
.hub-item .chev { font-size: 1.6rem; color: #b0b8c1; }
.hub-new { margin-top: 12px; }
.hub-new summary { cursor: pointer; list-style: none; }
.hub-new summary::-webkit-details-marker { display: none; }
.who-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: #4e5968; text-decoration: none !important; padding: 6px 10px; border-radius: 999px; background: #f2f4f6; white-space: nowrap; }
@media (max-width: 640px) {
  .wrap { padding: 18px 14px 96px; }
  .card { padding: 18px 16px; }
  .auth-wrap { margin: 6px auto; }
  input, select, textarea { font-size: 16px !important; } /* iOS 확대 방지 */
  .btn { min-height: 40px; }
  .who-chip b { display: none; }
}

/* 앱 탭: 휴대폰에서는 아래쪽 고정 (엄지로 누르기 쉽게) */
@media (max-width: 640px) {
  body.ct-shell .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; background: #fff; border-top: 1px solid #e5e8eb; border-bottom: 0; padding: 0 0 env(safe-area-inset-bottom); display: flex; overflow-x: auto; box-shadow: 0 -4px 16px rgba(0,0,0,.05); }
  body.ct-shell .tabs .tab { flex: 1 0 auto; min-width: 62px; font-size: .8rem; padding: 15px 8px 14px; border-bottom: 0; border-top: 2px solid transparent; margin: 0; text-align: center; }
  body.ct-shell .tabs .tab.on { border-top-color: #16875c; color: #16875c; }
  #cinfo { width: 100%; }
}

.logout-btn { border: 1px solid #e5e8eb; background: #fff; color: #4e5968; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.logout-btn:hover { background: #f6f7f9; }
@media (max-width: 640px) { .fb-btn b { display: none; } .ai-status { display: none; } }

.ck-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 10px 2px; border-top: 1px solid #f2f4f6; font: inherit; cursor: pointer; color: inherit; }
.ck-row:hover { background: #fafbfc; }
.ck-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #d1d6db; display: grid; place-items: center; flex: none; color: #fff; font-size: .8rem; font-weight: 800; }
.ck-dot.on { background: #16875c; border-color: #16875c; }

/* 공용: 켜기 스위치·3분할 선택 */
.sw{position:relative;width:42px;height:24px;flex:none;display:inline-block}.sw input{opacity:0;width:0;height:0}.sw span{position:absolute;inset:0;background:#d1d6db;border-radius:999px;cursor:pointer;transition:.15s}.sw span::after{content:'';position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:.15s}.sw input:checked+span{background:#16875c}.sw input:checked+span::after{transform:translateX(18px)}
.seg3{display:inline-grid;grid-auto-flow:column;gap:4px;background:#f2f4f6;border-radius:10px;padding:3px}.seg3 button{border:0;background:none;border-radius:8px;padding:7px 14px;font:inherit;font-weight:600;color:#6b7684;cursor:pointer}.seg3 button.on{background:#fff;color:#0f5c3f;box-shadow:0 1px 3px rgba(0,0,0,.08)}

.kstep { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0; }
.kstep div { background: #f7f8fa; border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: .92rem; }
.kstep b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #16875c; color: #fff; font-size: .78rem; margin-right: 6px; }
.kstep small { display: block; font-weight: 500; color: #6b7684; font-size: .8rem; margin-top: 2px; }
@media (max-width: 560px) { .kstep { grid-template-columns: 1fr; } }

.bf { border: 1px solid #cfe8dc; }
.bf-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; margin-top: 12px; }
.bf-box { background: #f7f8fa; border-radius: 12px; padding: 12px 14px; min-width: 0; }
.bf-t { font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.bf-txt { white-space: pre-wrap; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.bf-goal { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px 28px; gap: 8px; align-items: center; padding: 4px 0; font-size: .92rem; }
.bf-goal > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-dots i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #e5e8eb; margin-left: 3px; }
.bf-dots i.on { background: #16875c; }
.bf-dv { color: #4e5968; font-size: .82rem; font-weight: 600; }
@media (max-width: 900px) { .bf-grid { grid-template-columns: 1fr; } }

.gcanvas { border: 1px solid #e5e8eb; border-radius: 14px; padding: 8px; background: #fff; overflow-x: auto; touch-action: manipulation; }
.gpanel { border: 1px solid #cfe8dc; background: #f4faf7; border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.gacts { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.gacts button { border: 1px solid #d1d6db; background: #fff; border-radius: 10px; padding: 9px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.gacts button.main { background: #16875c; border-color: #16875c; color: #fff; }
.gfields { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.gfields label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: #6b7684; }
.gfields label input { width: 120px; }
.gfields label.ck { flex-direction: row; align-items: center; gap: 6px; color: #333d4b; font-size: .92rem; }
.gfields label.ck input { width: auto; }
.gfields .lbl { display: block; font-size: .82rem; color: #6b7684; margin-bottom: 4px; }
.gtypes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.gtypes button { display: flex; align-items: center; gap: 6px; border: 1px solid #e5e8eb; background: #fff; border-radius: 10px; padding: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.gtypes button.on { border-color: #16875c; background: #e8f5ef; color: #0f5c3f; }

/* 휴대폰 보완 (2026-10-12) */
@media (max-width: 640px) {
  body.ct-shell .tabs { flex-wrap: nowrap; }
  .ct-top .beta { display: none; }
  .who-chip { display: none !important; }
  .ppl .table-wrap { overflow: visible; }
  .ppl table, .ppl tbody { display: block; width: 100%; }
  .ppl tr:first-child { display: none; }
  .ppl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; padding: 12px 0; border-bottom: 1px solid #eef0f2; }
  .ppl td { padding: 0 !important; border: 0 !important; text-align: left !important; }
  .ppl td input, .ppl td select { width: 100%; }
  .ppl td:empty { display: none; }
  .ppl .row { flex-wrap: wrap; }
  .ppl .row input { min-width: 0; flex: 1 1 140px; }
}

/* 예시 둘러보기 바: 휴대폰에서는 버튼을 한 줄로 밀어 보기 */
@media (max-width: 640px) { .demo-bar { padding: 12px 14px; } .demo-bar .demo-desc { display: none; } .demo-bar .row { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; } .demo-bar .row::-webkit-scrollbar { display: none; } .demo-bar .btn { flex: none; } }

/* 휴대폰: 하단 탭 바가 페이지를 옆으로 늘리지 않게 */
@media (max-width: 640px) { body.ct-shell .tabs { width: 100%; max-width: 100vw; box-sizing: border-box; } html, body { overflow-x: hidden; } }

/* 휴대폰: 예시 바는 접혀 있고 '메뉴'로 펼침 */
.demo-tgl { display: none; }
@media (max-width: 640px) { .demo-tgl { display: inline-flex; } .demo-bar:not(.open) .demo-acts { display: none; } .demo-bar:not(.open) .demo-hint { margin-top: 8px; padding-top: 8px; } }
@media (max-width: 640px) { .demo-bar > .row:first-child > b { white-space: nowrap; } .demo-bar:not(.open) > .row:first-child .seg { display: none !important; } .demo-bar.open > .row:first-child .seg { order: 9; width: 100%; } }

/* 휴대폰: 사람 표의 각 칸에 작은 라벨 */
@media (max-width: 640px) { .ppl td[data-l]::before { content: attr(data-l); display: block; font-size: .72rem; color: #8b95a1; margin-bottom: 2px; } .ppl td.num { text-align: left !important; font-weight: 600; } .ppl tr { grid-template-columns: 1fr 1fr; align-items: end; } }

/* 로그인 확인 전에는 왼쪽 메뉴를 감춤 (로그인 전 사용자는 손님 메뉴만) */
.ct-lnb.pending > a:not([data-k="home"]), .ct-lnb.pending > .sec, .ct-lnb.pending > .foot { visibility: hidden; }
