/* TextBab 앱 스타일. 토큰은 :root 에, 다크 모드는 prefers-color-scheme 로 재정의 */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f3f5; --line: #e3e6ea; --line-strong: #cfd4da;
  --fg: #1b1f24; --fg-2: #4a525c; --muted: #6b737d;
  --primary: #0f766e; --primary-hover: #0d5f59; --primary-fg: #ffffff; --primary-soft: #e6f4f2;
  --ok: #157f3b; --ok-soft: #e7f6ec; --warn: #a15c00; --warn-soft: #fff4e0; --bad: #c0362c; --bad-soft: #fdecea;
  --info-soft: #e8f1fd; --info: #1f5fbf;
  --radius: 10px; --radius-sm: 6px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --sidebar-w: 232px; --topbar-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1215; --surface: #171b20; --surface-2: #1e2329; --line: #2a3038; --line-strong: #39414b;
    --fg: #e8ebee; --fg-2: #c2c8cf; --muted: #8d96a0;
    --primary: #2bb3a6; --primary-hover: #3cc6b8; --primary-fg: #06201d; --primary-soft: #12302d;
    --ok: #4cc77a; --ok-soft: #13301f; --warn: #f0a640; --warn-soft: #33260f; --bad: #f2776c; --bad-soft: #3a1714;
    --info-soft: #14243b; --info: #7fb0f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--fg); background: var(--bg); }
a { color: var(--primary); }
h1 { font-size: 22px; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 20px 0 8px; color: var(--fg-2); }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.hint { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* 브랜드 */
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--fg); text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: var(--primary-fg); font-size: 15px; }

/* 인증 레이아웃 */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.auth-links { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--muted); }

/* 앱 레이아웃 */
.layout-app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; z-index: 30; }
.sidebar .brand { padding: 4px 8px 16px; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-heading { font-size: 12px; color: var(--muted); margin: 18px 8px 6px; text-transform: uppercase; letter-spacing: .04em; }
.nav-link { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--fg-2); text-decoration: none; font-size: 14px; }
.nav-link:hover { background: var(--surface-2); color: var(--fg); }
.nav-link.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-link.is-disabled { color: var(--muted); cursor: default; }
.nav-link.is-disabled:hover { background: none; }
.nav-link small { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; }
.app-shell { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.content { padding: 24px; max-width: 1200px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.menu-toggle { display: none; }

/* 드롭다운 */
.dropdown { position: relative; }
.org-switch, .user-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 6px 8px; font: inherit; color: var(--fg); cursor: pointer; }
.org-switch:hover, .user-btn:hover { background: var(--surface-2); }
.org-name { font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13px; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(16, 24, 40, .14); padding: 6px; z-index: 40; }
.dropdown-right { left: auto; right: 0; }
.dropdown-label { font-size: 12px; color: var(--muted); padding: 6px 10px 4px; margin: 0; word-break: break-all; }
.dropdown-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: var(--radius-sm); font: inherit; font-size: 14px; color: var(--fg); text-decoration: none; cursor: pointer; }
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item.is-current { color: var(--primary); font-weight: 600; cursor: default; }
.dropdown-item.is-disabled { color: var(--muted); cursor: default; }
.dropdown-menu form { margin: 0; }

/* 카드·표 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row > span:first-child { flex: 1; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.steps { padding-left: 20px; margin: 0 0 12px; }
.steps li { margin-bottom: 6px; }
.stack { display: grid; gap: 8px; }

/* 폼 */
.form { display: grid; gap: 14px; }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.form-grid .form-actions { grid-column: 1 / -1; }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row .grow { flex: 1 1 240px; }
.form-inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.field { display: grid; gap: 6px; font-size: 14px; }
.field > span { font-weight: 600; color: var(--fg-2); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 11px; min-height: 40px;
}
input:disabled { background: var(--surface-2); color: var(--muted); }
input[aria-invalid=true] { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: 13px; margin: 0; }
.form-actions { display: flex; gap: 8px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-block { width: 100%; }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn-link { border: 0; background: none; color: var(--primary); padding: 0; min-height: 0; font-weight: 500; }
.btn-link:hover { background: none; text-decoration: underline; }
.btn-danger-ghost { color: var(--bad); border-color: transparent; background: none; }
.btn-danger-ghost:hover { background: var(--bad-soft); }
.icon-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 40px; height: 40px; font-size: 18px; color: var(--fg); cursor: pointer; }

/* 배지·알림·토스트 */
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--fg-2); border: 1px solid var(--line); }
.badge-muted { color: var(--muted); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.alert { padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 14px; }
.alert-bad { background: var(--bad-soft); color: var(--bad); }
.alert-info { background: var(--info-soft); color: var(--info); }
.toast { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.toast-ok { background: var(--ok-soft); color: var(--ok); }
.toast-bad { background: var(--bad-soft); color: var(--bad); }
.toast-warn { background: var(--warn-soft); color: var(--warn); }

/* 오류·홈 */
.error-page h1 { margin-top: 4px; }
.home-actions { display: flex; gap: 8px; margin-top: 16px; }

/* 모바일 */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 24px rgba(0, 0, 0, .2); }
  .sidebar.is-open { transform: none; }
  .app-shell { margin-left: 0; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .topbar { padding: 0 12px; }
  .content { padding: 16px; }
  .hide-sm { display: none; }
  .org-name { max-width: 140px; }
  .auth-card { padding: 22px 18px; }
}

/* part004: 탭·마법사·목록 보조 */
.crumb { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.crumb a { color: var(--muted); }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 14px; color: var(--fg-2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px; }
.tab:hover { color: var(--fg); }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert ul { margin: 0 0 8px; padding-left: 18px; }
.alert .form-inline { margin-left: 8px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--fg); margin: 4px 0; }
.check input { margin-top: 3px; }
.alert .check { color: inherit; margin-top: 8px; }
.field-check { align-self: end; padding-bottom: 10px; }
.field-wide { grid-column: 1 / -1; }
.form-grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { font-weight: 600; color: var(--fg-2); font-size: 14px; margin-bottom: 6px; padding: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; }
.chip:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.inline-inputs { display: flex; gap: 8px; align-items: center; }
.inline-inputs input { flex: 1; }
.input-sm { width: 110px !important; min-height: 32px !important; padding: 4px 8px !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.summary { max-width: 360px; font-size: 13px; color: var(--fg-2); word-break: break-word; }
.row-bad td { background: var(--bad-soft); }
.error-cause { display: block; color: var(--bad); font-size: 12px; margin-top: 2px; }
.badge-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.platform { font-size: 13px; font-weight: 600; }
.time-pair small { color: var(--muted); }
.empty { text-align: center; padding: 40px 20px; }
.empty .btn { margin-top: 8px; }
.spaced { margin-top: 12px; }
.change-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.change-box summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.menu-details { position: relative; }
.menu-details > summary { list-style: none; }
.menu-details > summary::-webkit-details-marker { display: none; }
.popover { position: absolute; right: 0; top: calc(100% + 6px); width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(16, 24, 40, .14); padding: 14px; z-index: 30; gap: 8px; }
.wizard-steps { display: flex; gap: 16px; list-style: none; padding: 0; margin: 0 0 16px; counter-reset: step; flex-wrap: wrap; }
.wizard-steps li { counter-increment: step; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.wizard-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 12px; }
.wizard-steps li.is-current { color: var(--primary); font-weight: 600; }
.wizard-steps li.is-current::before { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.wizard-steps li.is-done::before { content: '✓'; background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.choice { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--fg); text-decoration: none; }
.choice:hover { border-color: var(--primary); background: var(--primary-soft); }
.choice span { color: var(--muted); font-size: 13px; }
.choice.is-disabled { opacity: .55; cursor: default; }
.choice.is-disabled:hover { border-color: var(--line-strong); background: none; }
.test-result { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.test-result.is-ok { background: var(--ok-soft); border-color: transparent; }
.test-result.is-bad { background: var(--bad-soft); border-color: transparent; }
.test-title { font-weight: 700; margin-bottom: 6px; }
.test-checks { list-style: none; padding: 0; margin: 0 0 6px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.test-checks .ok { color: var(--ok); }
.test-checks .bad { color: var(--bad); font-weight: 600; }
.test-guide { margin: 0; font-size: 14px; color: var(--fg); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.policy-table td { vertical-align: top; }
.form-inline > label { white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--fg-2); }
.form-inline select { width: auto; max-width: 100%; }
.policy-table .form-inline { flex-wrap: wrap; }
.btn { white-space: nowrap; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 16px; }
.check.grow { flex: 1; }

/* part007: 원고함·에디터·캘린더·대시보드·알림 */
.tab .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.tab.is-active .count { background: var(--primary-soft); color: var(--primary); }
.qbadge { font-size: 12px; font-weight: 600; white-space: nowrap; }
.q-ok { color: var(--ok); } .q-warn { color: var(--warn); } .q-fail { color: var(--bad); }
.st-pending_approval, .st-draft { background: var(--info-soft); color: var(--info); border-color: transparent; }
.st-quality_failed, .st-failed { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.st-scheduled, .st-publishing { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.st-published { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.st-awaiting_manual, .st-generating { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.editor-meta { margin: 0; color: var(--muted); font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.editor-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.title-input { font-size: 20px !important; font-weight: 700; }
.editor-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
[data-autosave-status].is-error { color: var(--bad); font-weight: 600; }
.editor-side { display: grid; gap: 12px; position: sticky; top: calc(var(--topbar-h) + 12px); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel h2 { font-size: 14px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.kv.small { font-size: 13px; grid-template-columns: 80px 1fr; }
.facts { margin: 4px 0 0; padding-left: 16px; }
mark { background: var(--warn-soft); color: var(--warn); padding: 0 2px; border-radius: 3px; }
.editor-actions { display: flex; gap: 8px; justify-content: flex-end; }
.editor-secondary { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: flex-start; }
.action-box { position: relative; }
.action-box[open] > form { position: absolute; z-index: 20; margin-top: 6px; width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, .14); }
.action-box > summary { list-style: none; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.media-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.media-thumb { width: 64px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.approve-card { max-width: 640px; }
.approve-time { font-size: 18px; font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { display: grid; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--fg); box-shadow: var(--shadow); }
.stat:hover { border-color: var(--primary); }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-bad .stat-value { color: var(--bad); }
.meter { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 8px; }
.meter span { display: block; height: 100%; background: var(--primary); }
.meter.is-warn span { background: var(--warn); }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal-head { padding: 8px; font-size: 12px; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-day { min-height: 110px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; align-content: start; gap: 4px; }
.calendar.week .cal-day { min-height: 320px; }
.cal-day.is-other { background: var(--bg); }
.cal-day.is-today .cal-date { background: var(--primary); color: var(--primary-fg); border-radius: 999px; padding: 0 6px; }
.cal-date { font-size: 12px; color: var(--muted); justify-self: start; }
.cal-item { display: block; font-size: 12px; padding: 3px 6px; border-radius: 4px; text-decoration: none; color: var(--fg); border-left: 3px solid; background: var(--surface-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-item[draggable=true] { cursor: grab; }
.cal-item .t { font-weight: 700; }
.cal-item.s-published { opacity: .75; } .cal-item.s-failed { outline: 1px dashed var(--bad); }
.c0 { border-color: #0f766e; } .c1 { border-color: #2563eb; } .c2 { border-color: #d97706; } .c3 { border-color: #9333ea; }
.c4 { border-color: #db2777; } .c5 { border-color: #059669; } .c6 { border-color: #4b5563; } .c7 { border-color: #b45309; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border-width: 5px; border-style: solid; }
.btn.is-on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.bell { position: relative; font-size: 16px; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 4px; }
.notif-menu { width: 320px; max-height: 420px; overflow-y: auto; }
.dropdown-item.is-unread, .list-row.is-unread { font-weight: 700; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--fg); text-align: left; cursor: pointer; }
.link-btn:hover { color: var(--primary); }
.grow { flex: 1; }
@media (max-width: 1024px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-side { position: static; }
}
@media (max-width: 768px) {
  .calendar { grid-template-columns: 1fr; }
  .cal-head { display: none; }
  .cal-day { min-height: 0; }
  .cal-day.is-other { display: none; }
}
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.manual-box { border-color: var(--warn); }
.action-box.inline { display: inline-block; }

/* ── 플랫폼 관리자(part009) ── */
.layout-admin .sidebar { border-top: 4px solid var(--bad); }
.layout-admin .topbar { border-bottom-color: var(--bad-soft); }
.layout-admin .brand .badge { margin-left: .4rem; font-size: .65rem; vertical-align: middle; }
pre.diff { white-space: pre-wrap; font-size: .8rem; background: var(--surface-2); padding: .75rem; border-radius: var(--radius-sm); max-height: 420px; overflow: auto; }
pre.diff span { display: block; }
pre.diff .diff-add { background: var(--ok-soft); }
pre.diff .diff-del { background: var(--bad-soft); }

/* devplan002 part005: 대시보드 체크리스트·진행 막대 */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.checklist li { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.checklist li.is-done { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.progress-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; padding: 4px 0; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--primary); }
.progress-row.is-short .bar > span { background: var(--warn); }
.progress-row.is-short .progress-value { color: var(--warn); font-weight: 600; }
.progress-value { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
.text-warn { color: var(--warn); }
.text-bad { color: var(--bad); }
.card-bad { border-color: var(--bad); }

/* ───────── 놀아 계정 로그인 버튼 (account.nola.kr/developers/button 공식 CSS — 색·크기 값 변경 금지, CSP 위해 자체 호스팅) ───────── */
.nolaa-btn {
  --nolaa-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Crect x='1.5' y='1.5' width='45' height='45' rx='11' fill='%23FFFFFF' stroke='%2315120F' stroke-width='2.8'/%3E%3Cg transform='translate(24 24) scale(.7) translate(-26.35 -23.75)'%3E%3Cpath d='M14.6 8.4c-2.3 0-3.9 1.8-3.9 4.2v19.6c0 5 3.7 8.6 8.9 8.6h16.1c2.3 0 3.9-1.5 3.9-3.7s-1.7-3.8-4-3.9l-15.1-.6c-1.4 0-2-.8-2-2.3V12.6c0-2.4-1.6-4.2-3.9-4.2z' fill='%2315120F'/%3E%3Crect x='32' y='6.6' width='10' height='10' rx='2.4' fill='%23D6342C'/%3E%3C/g%3E%3C/svg%3E");
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px;
  border-radius: 8px; border: 1px solid transparent; font-family: inherit; font-weight: 700; font-size: 14px; line-height: 1;
  white-space: nowrap; text-decoration: none; cursor: pointer; -webkit-appearance: none; appearance: none; -webkit-font-smoothing: antialiased;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.nolaa-btn::before { content: ""; flex: none; display: inline-block; background-image: var(--nolaa-mark); background-repeat: no-repeat; background-position: center; background-size: contain; }
.nolaa-btn--44 { height: 44px; }
.nolaa-btn--44::before { width: 22px; height: 22px; }
.nolaa-btn--light { background-color: #FFFFFF; border-color: #DADDE3; color: #15120F; }
.nolaa-btn--light:hover { background-color: #F5F6F8; text-decoration: none; }
.nolaa-btn--light:active { background-color: #EBEDF1; }
.nolaa-btn:focus-visible { outline: 2px solid #D6342C; outline-offset: 2px; }
/* 다른 로그인 버튼(전체 폭)보다 작게 두지 않는다(브랜드 가이드) */
.nolaa-btn--block { display: flex; width: 100%; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line, #e5e7eb); }
.mail-test { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); align-items: flex-end; }
