:root {
  /* 디자인 개정 11차 (2026-10-10 사용자 「4번으로, 서체는 Pretendard」): 잉크와 종이.
     메뉴 레일은 버건디 → 잉크 남색, 버건디는 강조 한 점으로. 글씨는 검정 대신 따뜻한 회색 다섯 단계
     (토스식 위계를 종이 바탕에 맞춤 — g900 제목 · g800 이름 · g700 본문 · g600 보조 · g500 흐린 설명). */
  --platform-bg: #fbfaf7; /* 종이 */
  --platform-surface: #ffffff;
  --platform-ink: #1d1c19;   /* g900 제목 */
  --platform-g800: #35332e;  /* 이름·진한 본문 */
  --platform-muted: #4f4c45; /* g700 본문 */
  --platform-faint: #6d6960; /* g600 보조 — 종이 위 5.2:1 */
  --platform-g500: #8c877d;  /* 흐린 설명·시각 — 큰 글씨·장식만 */
  --platform-blue: #9e1b32;      /* 버건디 — 주행동·선택·급함 한 점 */
  --platform-blue-dark: #7f1528;
  --platform-blue-soft: #f6ebed;
  --platform-navy: #14161f;      /* 잉크 남색 — 레일·큰 판 */
  --platform-navy-deep: #0d0e14;
  --platform-gold: #b8955a;      /* 가는 선·작은 표식에만 */
  --platform-cyan: #e05c72;
  --platform-line: #e2ddd6; /* 종이 위 괘선 — 따뜻한 회색 */
  --platform-line-strong: #c9c2b8;
  --platform-paid: #15803d;
  --platform-denied: #dc2626;
  --platform-partial: #b45309; /* 작은 배지 텍스트 대비 4.5:1 확보 */
  --platform-radius: 6px;
  --platform-sidebar: 92px; /* 안B 아이콘 레일 (2026-08-02) — 종전 240px 패널 폐기 */
  --platform-shadow: 0 1px 3px rgba(23, 24, 31, 0.06);
}

[data-theme="dark"] {
  --platform-bg: #0d0e14;
  --platform-surface: #14161f;
  --platform-ink: #f4f1ea;
  --platform-g800: #e7e3da;
  --platform-muted: #cbc6ba;
  --platform-faint: #9a958a;
  --platform-g500: #8c877d;
  --platform-blue: #f4849a;
  --platform-blue-soft: rgba(158, 27, 50, 0.22);
  --platform-line: #2a2b33;
  --platform-line-strong: #3b3d47;
  --platform-shadow: none;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body.platform {
  margin: 0;
  min-width: 320px;
  /* 개정 10차: 배경 질감 제거 — 순수 플랫 면, 선으로 구획한다 */
  background: var(--platform-bg);
  color: var(--platform-ink);
  /* 가변 폰트 우선 — 타입 증명 §4: Pretendard Variable 선행 (2026-07-30 공용 승격, 종전 홈·인트로 한정) */
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
  letter-spacing: -0.02em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

.platform a {
  color: inherit;
  text-decoration: none;
}

.platform button,
.platform input {
  font: inherit;
}

.platform button {
  color: inherit;
}

/* 개정 10차: 2-톤 구조 — 다크 네이비 사이드바 + 시안 상단 라인 */
.platform-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--platform-sidebar);
  flex-direction: column;
  border-top: 4px solid var(--platform-cyan);
  background: var(--platform-navy);
  padding: 24px 14px 20px;
  color: rgba(255, 255, 255, 0.86);
}

.platform-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 22px;
}

/* 브랜드 마크 — 로고 A3 (핀테크 타일, assets/logo.svg). 타일 배경은 로고 자체에 있다 */
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-name {
  display: block;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand-caption {
  display: block;
  margin-top: -1px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 500;
}

.platform-nav {
  display: grid;
  gap: 1px;
}

.platform-nav a {
  position: relative;
  display: flex;
  min-height: 44px; /* 터치 타깃 44px 플로어 (omd check HIT-002, 2026-07-29) */
  align-items: center;
  border-radius: 4px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.platform-nav a:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
}

.platform-nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 700;
}

.platform-nav a.active::before {
  position: absolute;
  left: 0;
  width: 2px;
  height: 100%;
  border-radius: 0;
  background: #43c8df;
  content: "";
}

.nav-separator {
  height: 1px;
  margin: 12px 10px;
  background: rgba(255, 255, 255, 0.12);
}

/* 개정 10차 잔여: 메뉴 그룹 라벨 — 초소형·자간 확장 (스레드 nav-section 문법) */
.nav-group-label {
  margin: 16px 14px 5px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.platform-nav .nav-group-label:first-child {
  margin-top: 2px;
}

.sidebar-status {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 10px 0;
}

.sidebar-status strong,
.sidebar-status span {
  display: block;
}

.sidebar-status strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-status span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

.platform-overlay {
  display: none;
}

.platform-shell {
  min-height: 100vh;
  margin-left: var(--platform-sidebar);
}

.platform-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 62px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--platform-line);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  padding: 0 30px;
}

[data-theme="dark"] .platform-topbar {
  background: rgba(20, 22, 31, 0.94);
}

.topbar-context {
  color: var(--platform-muted);
  font-size: 13px;
  font-weight: 600;
}

.topbar-note {
  color: var(--platform-faint);
  font-size: 12px;
}

.mobile-menu,
.mobile-brand {
  display: none;
}

.platform-main {
  width: min(1180px, calc(100% - 60px));
  margin: 0 auto;
  padding: 30px 0 60px;
}

.page-heading {
  max-width: 760px;
}

/* 개정 10차: eyebrow → 제목 → 설명 3단 헤딩 — 초소형 라벨은 자간을 넓혀 대비 */
.eyebrow {
  margin: 0 0 8px;
  color: var(--platform-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 29px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.page-heading p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--platform-muted);
  font-size: 13px;
  line-height: 1.65;
}

.global-search {
  position: relative;
  margin-top: 34px;
}

.global-search::before {
  position: absolute;
  top: 50%;
  left: 22px;
  width: 15px;
  height: 15px;
  transform: translateY(-58%);
  border: 2px solid var(--platform-faint);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.global-search::after {
  position: absolute;
  top: calc(50% + 7px);
  left: 36px;
  width: 7px;
  height: 2px;
  transform: rotate(45deg);
  border-radius: 2px;
  background: var(--platform-faint);
  content: "";
  pointer-events: none;
}

.global-search input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--platform-line-strong);
  border-radius: 4px;
  outline: 0;
  background: var(--platform-surface);
  padding: 0 148px 0 54px;
  color: var(--platform-ink);
  font-size: 14px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.global-search input::placeholder {
  color: var(--platform-faint);
}

.global-search input:focus {
  border-color: var(--platform-blue);
  box-shadow: 0 0 0 2px rgba(158, 27, 50, 0.10);
}

.search-state {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  border: 1px solid var(--platform-line);
  border-radius: 3px;
  background: var(--platform-bg);
  padding: 5px 9px;
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 600;
}

.home-brief {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
  padding: 14px 20px;
  transition: border-color 0.14s ease;
}

.home-brief:hover {
  border-color: var(--platform-blue);
}

.home-brief .hb-kind {
  border-radius: 3px;
  background: var(--platform-blue-soft);
  padding: 3px 8px;
  color: var(--platform-blue);
  font-size: 12px;
  font-weight: 700;
}

.home-brief .hb-title {
  font-size: 14px;
  font-weight: 700;
}

.home-brief .hb-meta {
  margin-left: auto;
  color: var(--platform-faint);
  font-size: 12px;
}

.section-block {
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.section-head p,
.section-link {
  margin: 0;
  color: var(--platform-faint);
  font-size: 13px;
}

.section-link {
  color: var(--platform-blue);
  font-weight: 600;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.action-card {
  min-height: 148px;
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
  padding: 20px;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.action-card:hover {
  border-color: var(--platform-line-strong);
}

.action-card .card-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 4px;
  background: var(--platform-blue-soft);
  color: var(--platform-blue);
  font-size: 12px;
  font-weight: 800;
}

.action-card h3 {
  margin: 20px 0 5px;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.action-card p {
  margin: 0;
  color: var(--platform-muted);
  font-size: 13px;
}

.home-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.surface-card {
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
  padding: 20px;
}

.surface-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
}

.surface-card .surface-desc {
  margin: 4px 0 0;
  color: var(--platform-muted);
  font-size: 13px;
}

.empty-inline {
  display: flex;
  min-height: 164px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  border: 1px dashed var(--platform-line-strong);
  border-radius: 6px;
  background: var(--platform-bg);
  color: var(--platform-muted);
  text-align: center;
  font-size: 13px;
}

.empty-inline strong,
.empty-inline span {
  display: block;
}

.empty-inline strong {
  color: var(--platform-ink);
  font-size: 14px;
}

.empty-inline span {
  margin-top: 4px;
  color: var(--platform-faint);
}

/* 빈 상태 문법 (보상의 기록에서 이식): 현재 상태 + 다음 행동 + 필요 시 이동 링크 */
.empty-inline a {
  display: inline-block;
  margin-top: 8px;
  color: var(--platform-blue);
  font-size: 13px;
  font-weight: 700;
}

.tabs-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  border-bottom: 1px solid var(--platform-line);
}

.tab-button {
  position: relative;
  border: 0;
  background: transparent;
  padding: 13px 16px 14px;
  color: var(--platform-muted);
  font-size: 14px;
  font-weight: 650;
  cursor: default;
}

/* 개정 10차: 활성 탭 = 밑줄이 아니라 채운 배경 pill */
.tab-button {
  border-radius: 3px;
}

.tab-button.active {
  color: var(--platform-blue-dark);
  background: var(--platform-blue-soft);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.filter-chip {
  border: 1px solid var(--platform-line);
  border-radius: 3px;
  background: var(--platform-surface);
  padding: 8px 12px;
  color: var(--platform-muted);
  font-size: 13px;
}

.filter-chip.active {
  border-color: var(--platform-blue);
  color: var(--platform-blue);
  font-weight: 650;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.55fr);
  min-height: 420px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
}

.workspace-list {
  border-right: 1px solid var(--platform-line);
  padding: 22px;
}

.workspace-detail {
  display: grid;
  place-items: center;
  padding: 40px;
  text-align: center;
}

.workspace-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--platform-muted);
  font-size: 13px;
  font-weight: 650;
}

/* 목록 칼럼 라벨을 h2로 승격 (헤딩 스킵 해소, 2026-07-31 잔여 화면 정돈) — 시각은 기존 라벨 그대로 */
.workspace-label h2 {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
}

.workspace-count {
  color: var(--platform-faint);
  font-variant-numeric: tabular-nums;
}

.list-empty {
  margin-top: 20px;
  border-top: 1px solid var(--platform-line);
  padding: 28px 2px;
  color: var(--platform-faint);
  font-size: 13px;
}

.detail-empty-mark {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border: 1px solid var(--platform-line-strong);
  border-radius: 12px;
  background: var(--platform-bg);
}

/* 빈 상태 일러스트 — 도해 스타일 (문서·폴더) */
.empty-illust {
  display: block;
  width: 108px;
  max-width: 40%;
  margin: 0 auto 14px;
}

.workspace-detail strong {
  display: block;
  font-size: 16px;
}

.workspace-detail p {
  max-width: 360px;
  margin: 7px auto 0;
  color: var(--platform-muted);
  font-size: 13px;
}

.notice {
  margin-top: 24px;
  border: 1px solid var(--platform-line);
  border-radius: 6px;
  background: var(--platform-surface);
  padding: 14px 18px;
  color: var(--platform-muted);
  font-size: 12px;
  text-align: center;
}

.dictionary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.dictionary-card {
  min-height: 190px;
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
  padding: 21px;
}

.dictionary-card .dictionary-label {
  color: var(--platform-muted);
  font-size: 13px;
  font-weight: 650;
}

.dictionary-card .dictionary-count {
  margin-top: 18px;
  color: var(--platform-ink);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.dictionary-card .dictionary-unit {
  margin-left: 3px;
  color: var(--platform-muted);
  font-size: 14px;
  font-weight: 600;
}

.dictionary-card p {
  margin: 18px 0 0;
  color: var(--platform-faint);
  font-size: 13px;
}

.platform-footer {
  border-top: 1px solid var(--platform-line);
  padding: 22px 40px;
  color: var(--platform-faint);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 1100px) {
  /* 옛 240px 사이드바 시절의 --platform-sidebar: 224px 를 지웠다(2026-10-04) —
     레일은 폭과 상관없이 92px인데 본문만 224px 밀려 패드에서 왼쪽이 160px 비었다 */
  .platform-main {
    width: calc(100% - 48px);
    padding-top: 44px;
  }

  .platform-topbar {
    padding: 0 28px;
  }

  .home-panels {
    grid-template-columns: 1fr;
  }

  /* 태블릿(768~1100)에서 3열을 고집하면 카드가 160px까지 눌려 글자가 잘린다.
     아이패드·갤럭시탭으로도 발표 준비를 하므로 이 구간을 비워 두면 안 된다. */
  .action-grid,
  .menu-grid,
  .dictionary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 좁은 태블릿·큰 폰(768~860)은 한 줄로 — 두 열도 좁다 */
@media (max-width: 860px) {
  .action-grid,
  .menu-grid {
    grid-template-columns: 1fr;
  }
  /* 한 열이 되면 세로 구분선이 어긋난다 — 위쪽 괘선만 남긴다 */
  body.platform .action-grid > * + *,
  body.platform .install-guide-grid > * + * {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 767px) {
  .platform-sidebar {
    width: min(84vw, 300px);
    transform: translateX(-100%);
    transition: transform 0.14s ease;
  }

  .platform-sidebar.open {
    transform: translateX(0);
  }

  .platform-overlay.show {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: block;
    background: rgba(20, 22, 31, 0.42);
  }

  .platform-shell {
    margin-left: 0;
  }

  .platform-topbar {
    height: 60px;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 16px;
  }

  .topbar-context,
  .topbar-note {
    display: none;
  }

  .mobile-menu {
    position: relative;
    display: block;
    width: 38px;
    height: 38px;
    border: 1px solid var(--platform-line);
    border-radius: 4px;
    background: var(--platform-surface);
    cursor: pointer;
  }

  .mobile-menu::before,
  .mobile-menu::after,
  .mobile-menu span {
    position: absolute;
    left: 10px;
    width: 16px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--platform-ink);
    content: "";
  }

  .mobile-menu::before {
    top: 12px;
  }

  .mobile-menu span {
    top: 18px;
  }

  .mobile-menu::after {
    top: 24px;
  }

  .mobile-brand {
    display: block;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.025em;
  }

  .platform-main {
    width: auto;
    padding: 34px 18px 60px;
  }

  .page-heading h1 {
    font-size: 29px;
  }

  .page-heading p:not(.eyebrow) {
    font-size: 14px;
  }

  .global-search {
    margin-top: 26px;
  }

  .global-search input {
    height: 46px;
    padding-right: 22px;
    font-size: 14px;
  }

  .search-state {
    display: none;
  }

  .section-block {
    margin-top: 44px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .action-grid,
  .dictionary-grid {
    grid-template-columns: 1fr;
  }

  .action-card {
    min-height: 0;
    padding: 20px;
  }

  .action-card h3 {
    margin-top: 16px;
  }

  .surface-card {
    padding: 20px;
  }

  .tabs-toolbar {
    overflow-x: auto;
  }

  .tab-button {
    flex: 0 0 auto;
  }

  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
    min-height: 480px;
  }

  .workspace-list {
    border-right: 0;
    border-bottom: 1px solid var(--platform-line);
  }

  .workspace-detail {
    padding: 38px 24px;
  }

  .dictionary-card {
    min-height: 190px;
  }

  .platform-footer {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media print {
  .platform-sidebar,
  .platform-topbar,
  .platform-overlay,
  .global-search,
  .filter-bar {
    display: none !important;
  }

  .platform-shell {
    margin-left: 0;
  }

  .platform-main {
    width: 100%;
    padding: 0;
  }

  .surface-card,
  .action-card,
  .workspace-grid,
  .dictionary-card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ==============================
   사례·판례 조회 화면 (실데이터)
   ============================== */

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.filter-selects select {
  font: inherit;
  font-size: 0.87rem;
  color: var(--platform-ink);
  background: var(--platform-surface);
  border: 1px solid var(--platform-line);
  border-radius: 4px;
  padding: 8px 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.14s ease;
}

.filter-selects select:focus {
  border-color: var(--platform-blue);
}

.filter-reset {
  font-size: 0.87rem;
  color: var(--platform-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
}

.filter-reset:hover {
  color: var(--platform-blue);
}

/* 플랫폼 공용 버튼 — 아웃라인 기본 + 필 primary(화면당 1개) (2026-07-31 잔여 화면 정돈).
   care 화면은 style.css의 동명 .btn(뒤 로드)이 이겨 기존 시각 유지 — 회귀 없음.
   .btn.btn-primary 이중 클래스: `.platform button { color: inherit }`(0,1,1) 특이도 대응 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--platform-line-strong);
  border-radius: 4px;
  background: var(--platform-surface);
  color: var(--platform-ink);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}

.btn:hover {
  border-color: var(--platform-faint);
}

.btn.btn-primary {
  background: var(--platform-blue);
  border-color: var(--platform-blue);
  color: #ffffff;
}

.btn.btn-primary:hover {
  background: var(--platform-blue-dark);
  border-color: var(--platform-blue-dark);
}

.btn.btn-danger {
  color: var(--platform-denied);
}

/* 앵커형 .btn — `.platform a { color: inherit }`(0,1,1)가 muted 부모색을 상속시키는 것 차단 */
.platform a.btn {
  color: var(--platform-ink);
}

.platform a.btn.btn-primary {
  color: #ffffff;
}

.case-rows {
  overflow-y: auto;
  max-height: 640px;
}

.case-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--platform-line);
  cursor: pointer;
}

.case-row:hover {
  background: var(--platform-blue-soft);
}

.case-row.active {
  background: var(--platform-blue-soft);
  box-shadow: inset 3px 0 0 var(--platform-blue);
}

.case-row h3,
.case-row h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-row .case-meta {
  font-size: 0.8rem;
  color: var(--platform-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.badge-result {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  border-radius: 3px;
  padding: 2px 7px;
  /* 캔버스 배경(#f5f7fa) 위 muted는 4.4999:1로 AA 0.0001 미달 — 흰 배경으로 뿌리 교정 (2026-07-31).
     paid/denied/partial 동색 텍스트도 흰 바탕에서 전부 4.5:1 이상 */
  background: var(--platform-surface);
  color: var(--platform-muted);
  border: 1px solid var(--platform-line);
}

.badge-result.paid { color: var(--platform-paid); border-color: currentColor; }
.badge-result.denied { color: var(--platform-denied); border-color: currentColor; }
.badge-result.partial { color: var(--platform-partial); border-color: currentColor; }

.badge-grade {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  border-radius: 3px;
  padding: 2px 7px;
  color: var(--platform-blue-dark);
  background: var(--platform-blue-soft);
}

/* 고객 진행상태 배지 — 연한 동색 배경 + 진한 동색 텍스트 (색+텍스트 병기 원칙) */
.badge-status {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  border-radius: 3px;
  padding: 2px 7px;
}

.st-recall { color: #8a4c07; background: #f7ead6; }
.st-meet { color: #7f1528; background: #f6ebed; }
.st-met { color: #087a55; background: #e1f2eb; }
.st-hold { color: #4f4c45; background: #efede7; }
.st-reject { color: #b3261e; background: #f8dfd9; }
.st-cancel { color: #8e3b30; background: #f3e3e0; }

/* 진행상태 선택 버튼 — 현재 상태만 채워진다. 재클릭 = 해제 */
.status-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 4px 0 14px;
}

.status-btn {
  border: 1px solid var(--platform-line);
  border-radius: 3px;
  background: var(--platform-surface);
  padding: 6px 10px;
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.status-btn:hover {
  border-color: var(--platform-line-strong);
}

.status-btn.on.st-recall { color: #8a4c07; background: #f7ead6; border-color: #e5cfa4; }
.status-btn.on.st-meet { color: #7f1528; background: #f6ebed; border-color: #e3c4ca; }
.status-btn.on.st-met { color: #087a55; background: #e1f2eb; border-color: #b2ddcb; }
.status-btn.on.st-hold { color: #35332e; background: #efede7; border-color: #cfc9be; }
.status-btn.on.st-reject { color: #b3261e; background: #f8dfd9; border-color: #edbcb3; }
.status-btn.on.st-cancel { color: #8e3b30; background: #f3e3e0; border-color: #dfc0ba; }

@media (max-width: 719px) {
  .status-btn {
    padding: 11px 14px;
  }
}

/* 조직도 노드 — 들여쓰기 트리, 좌측 연결선 */
.org-node {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-left: 2px solid var(--platform-line);
  padding: 7px 0 7px 12px;
  margin-bottom: 2px;
}

/* 미팅 차수 일정 — 행 단위 목록 + 빠른 추가 줄 */
.meeting-list {
  display: grid;
  gap: 6px;
}

.meeting-row,
.meeting-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.meeting-add {
  margin-top: 10px;
  border-top: 1px solid var(--platform-line);
  padding-top: 10px;
}

.meeting-row input.mt-date,
.meeting-add input[type="date"] {
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--platform-line-strong);
  border-radius: 4px;
  padding: 5px 8px;
  color: var(--platform-ink);
  background: var(--platform-surface);
}

/* 알릴의무 셀프체크 항목 — 질문과 예/아니오를 한 줄에, 좁으면 줄바꿈 */
.check-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--platform-line);
  padding: 12px 0;
}

.check-item:last-child {
  border-bottom: 0;
}

.check-q {
  font-size: 13px;
  line-height: 1.6;
}

.check-a {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

@media (max-width: 719px) {
  .check-item {
    flex-direction: column;
    align-items: stretch;
  }
}

.case-detail-body {
  text-align: left;
  width: 100%;
}

.case-detail-body .detail-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

/* 상세 제목 h2 + 소제목 h3 — 헤딩 스킵 해소 (2026-07-31 잔여 화면 정돈). 구 h3 제목 선택자는 호환 유지 */
.case-detail-body h2,
.case-detail-body h3.detail-title {
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
}

.case-detail-body h3:not(.detail-title) {
  margin: 16px 0 6px;
  font-size: 14px;
  font-weight: 700;
}

.detail-fields {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px 14px;
  font-size: 0.9rem;
  padding: 14px 0;
  border-top: 1px solid var(--platform-line);
  border-bottom: 1px solid var(--platform-line);
}

.detail-fields dt {
  color: var(--platform-muted);
  margin: 0;
}

.detail-fields dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.detail-summary {
  margin: 16px 0;
  font-size: 0.93rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.detail-link {
  display: inline-block;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--platform-blue);
  margin-top: 4px;
}

/* 홈 히어로 — 상담 실사 이미지로 첫인상을 만든다 */
.home-hero {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
}

.home-hero .hero-copy {
  flex: 1 1 52%;
  padding: 30px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.home-hero .hero-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--platform-blue);
}

.home-hero h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.home-hero .hero-copy p {
  margin: 0;
  color: var(--platform-muted);
  font-size: 14px;
}

.home-hero .hero-visual {
  flex: 1 1 48%;
  min-height: 190px;
  position: relative;
}

.home-hero .hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

@media (max-width: 860px) {
  .home-hero {
    flex-direction: column-reverse;
  }
  .home-hero .hero-visual {
    min-height: 150px;
  }
  .home-hero .hero-copy {
    padding: 22px 24px;
  }
  .home-hero h1 {
    font-size: 21px;
  }
}

/* 사파리 설치 안내 — 설치 이벤트가 없는 기기용 수동 안내 (다크 사이드바 안) */
.install-guide {
  margin: 8px 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  line-height: 1.5;
}

.install-guide strong {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  margin-bottom: 2px;
}

.install-guide span {
  color: rgba(255, 255, 255, 0.6);
}

/* 내 프로필 — FC 사진과 명함 정보, 본인이 직접 수정한다 */
.profile-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--platform-surface);
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  box-shadow: var(--platform-shadow);
  padding: 24px;
}

.profile-photo {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--platform-line-strong);
  background: var(--platform-bg);
}

.profile-photo.placeholder {
  display: grid;
  place-items: center;
  color: var(--platform-faint);
  font-size: 26px;
  font-weight: 800;
}

.profile-main {
  flex: 1 1 auto;
  min-width: 0;
}

.profile-main .p-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-main .p-name small {
  margin-left: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--platform-muted);
}

.profile-rows {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  font-size: 13.5px;
}

.profile-rows .row {
  display: flex;
  gap: 10px;
}

.profile-rows .row .k {
  flex: 0 0 58px;
  color: var(--platform-faint);
}

.profile-rows .row .v {
  color: var(--platform-ink);
  word-break: keep-all;
}

.profile-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.profile-actions button {
  border: 1px solid var(--platform-line-strong);
  background: var(--platform-surface);
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.profile-actions button.primary {
  background: var(--platform-blue);
  border-color: var(--platform-blue);
  color: #ffffff;
}

.profile-edit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.profile-edit label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--platform-muted);
  font-weight: 600;
}

.profile-edit input {
  border: 1px solid var(--platform-line-strong);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 14px;
  min-height: 40px;
}

.profile-edit .span2 {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .profile-rows .row {
    justify-content: center;
  }
  .profile-edit {
    grid-template-columns: 1fr;
    text-align: left;
    width: 100%;
  }
  .profile-actions {
    justify-content: center;
  }
}

/* 명함 실물 — 이미지로 변환되는 영역 (화면 밖 렌더) */
.namecard-stage {
  position: fixed;
  left: -9999px;
  top: 0;
}

.namecard {
  position: relative;
  width: 630px;
  height: 360px;
  background: #16223c url("img/card-bg-navy.jpg") center / cover no-repeat;
  color: #f4efe4;
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  font-family: "Paperlogy", "Pretendard Variable", "Pretendard", sans-serif;
}

.namecard .n-kicker {
  font-size: 13px;
  letter-spacing: 0.3em;
  color: #c9a14a;
}

.namecard .n-name {
  margin-top: 14px;
  font-size: 40px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.namecard .n-name small {
  margin-left: 10px;
  font-size: 20px;
  font-weight: 600;
  color: rgba(244, 239, 228, 0.8);
}

.namecard .n-rule {
  height: 1px;
  background: rgba(201, 161, 74, 0.45);
  margin: 18px 0;
}

.namecard .n-rows {
  display: grid;
  gap: 7px;
  font-size: 16px;
}

.namecard .n-rows .k {
  display: inline-block;
  width: 74px;
  color: #c9a14a;
  font-size: 13px;
  letter-spacing: 0.1em;
}

.namecard .n-photo {
  position: absolute;
  right: 48px;
  top: 44px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(201, 161, 74, 0.6);
}

/* 홈 자료 현황 타일 — 개정 10차: 칸막이형 격자 (gap 0 + 셀 사이 선, 표처럼 붙인다) */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
}

.stat-tile {
  background: var(--platform-surface);
  border: 0;
  border-right: 1px solid var(--platform-line);
  border-radius: 0;
  padding: 17px 19px;
}

.stat-row .stat-tile:last-child {
  border-right: 0;
}

.stat-tile .stat-label {
  font-size: 0.8rem;
  color: var(--platform-muted);
}

.stat-tile .stat-value {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.stat-tile .stat-sub {
  font-size: 0.8rem;
  color: var(--platform-faint);
}

@media (max-width: 720px) {
  .stat-row {
    grid-template-columns: 1fr;
  }
  .stat-tile {
    border-right: 0;
    border-bottom: 1px solid var(--platform-line);
  }
  .stat-row .stat-tile:last-child {
    border-bottom: 0;
  }
  .case-rows {
    max-height: 420px;
  }
  /* 모바일은 고정 배경의 스크롤 재합성 비용을 피한다 (Codex 4차 사소 1) */
  body.platform {
    background-attachment: scroll;
  }
}

/* ==============================
   마감 폴리시 — 차세대 수준의 기본기
   ============================== */

/* 가변 폰트 최적화 렌더링 */
body.platform {
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

/* 키보드 포커스 링 — 접근성은 최상위 플랫폼의 기본기 */
.platform :focus-visible {
  outline: 2px solid var(--platform-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 텍스트 선택 색 */
.platform ::selection {
  background: rgba(158, 27, 50, 0.14);
}

/* 상단바 고정 + 블러 */
.platform-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
}

[data-theme="dark"] .platform-topbar {
  background: rgba(20, 22, 31, 0.97);
}

/* 모바일 62px 네이비 슬림 상단바 — 홈 구현의 공용 승격 (2026-07-30 통일 패스).
   사이드바의 네이비+시안 4px 문법을 모바일 상단바가 이어받는다.
   위의 .platform-topbar 재선언(마감 폴리시)이 배경을 덮지 않도록 이 위치(뒤)에 둔다. */
@media (max-width: 767px) {
  .platform-topbar,
  [data-theme="dark"] .platform-topbar {
    height: 62px;
    border-bottom: 0;
    border-top: 4px solid var(--platform-cyan);
    background: var(--platform-navy);
  }

  .mobile-brand {
    color: #ffffff;
  }

  /* 휴대폰에서는 숨지만(display:none), 남색 바탕 위 회색으로 남지 않게 색도 맞춘다 */
  .topbar-context,
  .topbar-note {
    color: rgba(244, 241, 234, 0.72);
  }

  .mobile-menu {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.28);
  }

  .mobile-menu::before,
  .mobile-menu::after,
  .mobile-menu span {
    background: #ffffff;
  }
}

/* 개정 10차: 조용한 모션 — 색만 바뀌고 형태는 움직이지 않는다.
   리프트·눌림·확대 제거, 호버는 배경 미세 틴트로만 답한다 */
.action-card,
.stat-tile,
.surface-card,
.platform button,
.platform .btn,
.suggest-item {
  transition: color 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}

.action-card:hover,
.stat-tile:hover {
  background: #fbfaf7;
  border-color: var(--platform-line-strong);
}

/* 목록 스크롤바 절제 */
.case-rows {
  scrollbar-width: thin;
  scrollbar-color: var(--platform-line-strong) transparent;
}

.case-rows::-webkit-scrollbar {
  width: 6px;
}

.case-rows::-webkit-scrollbar-thumb {
  background: var(--platform-line-strong);
  border-radius: 999px;
}

/* 숫자 정렬 일관성 */
.platform .workspace-count,
.platform .search-state,
.platform .card-index {
  font-variant-numeric: tabular-nums;
}

/* 홈 통합검색 제안 패널 */
.global-search {
  position: relative;
}

.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--platform-surface);
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  box-shadow: 0 8px 24px rgba(23, 24, 31, 0.10);
  z-index: 25;
  max-height: 420px;
  overflow-y: auto;
  padding: 6px;
}

.search-suggest .suggest-label {
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--platform-muted);
  padding: 10px 12px 4px;
}

.search-suggest .suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 9px 12px;
  cursor: pointer;
}

.search-suggest .suggest-item:hover {
  background: var(--platform-blue-soft);
}

.search-suggest .suggest-item .t {
  font-weight: 600;
  font-size: 0.95rem;
}

.search-suggest .suggest-item .d {
  font-size: 0.83rem;
  color: var(--platform-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-suggest .suggest-item .full {
  margin-top: 6px;
  font-size: 0.87rem;
  color: var(--platform-ink);
  line-height: 1.6;
}

.search-suggest .suggest-more {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--platform-blue);
  background: var(--platform-blue-soft);
  border: none;
  border-radius: 4px;
  padding: 11px 12px;
  margin-top: 6px;
  cursor: pointer;
  text-align: center;
}

.search-suggest .suggest-empty {
  padding: 14px 12px;
  font-size: 0.9rem;
  color: var(--platform-muted);
}

/* 검수 반영 폴리시 */
[hidden] {
  display: none !important;
}

.tab-button {
  cursor: pointer;
}

/* 목록 스크롤 신호: 하단 안쪽 그림자 (subtle) */
.case-rows {
  box-shadow: inset 0 -14px 12px -14px rgba(20, 22, 31, 0.28);
}

/* 빈 상세의 사각형 마크는 깨진 이미지처럼 읽혀 제거 */
.detail-empty-mark {
  display: none;
}

/* 모바일 터치 타겟 44px 확보 */
@media (max-width: 719px) {
  .filter-chip {
    padding: 11px 18px;
  }
  .tab-button {
    padding: 11px 18px;
  }
  .mobile-menu {
    width: 44px;
    height: 44px;
  }
  .search-suggest .suggest-item {
    padding: 12px;
  }
}

/* 홈 대시보드 — 랜딩 히어로 대신 압축 헤딩 */
.page-heading.compact {
  margin-bottom: 18px;
}

.page-heading.compact h1 {
  font-size: 1.53rem;
  margin: 0;
}

.page-heading.compact p {
  margin: 4px 0 0;
  font-size: 0.93rem;
  color: var(--platform-muted);
}

/* 대시보드 위젯 목록 */
.widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--platform-line);
  font-size: 0.93rem;
}

.widget-list li:last-child {
  border-bottom: none;
}

.widget-list a {
  color: var(--platform-ink);
  font-weight: 600;
}

.widget-list a:hover {
  color: var(--platform-blue);
}

.widget-list .w-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--platform-muted);
  margin-top: 2px;
}

.dday-chip {
  display: inline-block;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--platform-blue-dark);
  background: var(--platform-blue-soft);
  border-radius: 3px;
  padding: 3px 8px;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

/* 사례 화면 필터도 모바일 터치 44px 확보 (Codex 2차 중요4) */
@media (max-width: 719px) {
  .filter-selects select,
  .filter-reset {
    min-height: 44px;
  }
}

/* 모바일 터치 타겟 44px 일괄 보정 (Codex 3차 중요4·재검수) */
@media (max-width: 767px) {
  .platform .btn,
  .profile-actions button,
  .profile-edit input,
  .install-primary,
  .install-secondary,
  .install-back,
  .status-btn,
  .meeting-add input[type="date"],
  .meeting-row input.mt-date,
  .install-guide-grid .guide-card a,
  .install-main input,
  .install-main select,
  .install-main button {
    min-height: 44px;
  }
  .install-back {
    display: inline-flex;
    align-items: center;
  }
}

/* 케어 위젯 표지 썸네일 */
.empty-inline .w-cover {
  width: 52px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: var(--platform-shadow);
}

/* 사이드바 바로가기 설치 버튼 — 하단 고정 (업무공간 표시 자리를 대체) */
.install-btn {
  display: block;
  width: calc(100% - 20px);
  margin: 14px 10px 0;
  margin-top: auto;
  padding: 11px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  /* 아웃라인 급 — 필 primary는 화면당 1개(홈: "케어센터 열기")만. 설치는 1회성 태스크 (샤프 비평 상-2, 전 화면 공용) */
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.install-btn:hover {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

/* 초대 버튼 — 설치 버튼 위. 주액션은 설치 하나만 두고 이쪽은 테두리형 */
.invite-btn {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
}

.invite-btn:hover {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.install-btn + .install-btn { margin-top: 0; }

/* 설치 안내 겹침창 — 화면을 떠나지 않고 그 자리에서 처리한다 */
.install-modal-back {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 22, 31, 0.45);
}

.install-modal-back[hidden] { display: none; }

.install-modal {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--platform-line);
  border-radius: 6px;
  background: var(--platform-surface);
  padding: 22px 24px 24px;
}

.install-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.install-modal-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.install-modal-x {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--platform-line);
  border-radius: 4px;
  background: transparent;
  color: var(--platform-muted);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease;
}

.install-modal-x:hover { border-color: var(--platform-blue); color: var(--platform-blue); }

.install-modal-desc {
  margin: 8px 0 0;
  color: var(--platform-muted);
  font-size: 13px;
  line-height: 1.6;
}

.install-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.install-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--platform-line);
  border-radius: 6px;
  overflow: hidden;
}

.install-modal-grid > div {
  border-left: 1px solid var(--platform-line);
  padding: 14px 16px;
}

.install-modal-grid > div:first-child { border-left: none; }

.install-modal-grid h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.install-modal-grid ol {
  margin: 0;
  padding-left: 18px;
  color: var(--platform-muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.install-modal-note {
  margin: 14px 0 0;
  color: var(--platform-faint);
  font-size: 12px;
  line-height: 1.6;
}

.install-modal-note:empty { display: none; }

/* 개정 10차: 등장 모션 폐기 — 형태 변화 없는 조용한 화면 (0.14초 색 전환만) */

/* ==============================
   시작 스플래시 — 헌법 모션 예외 1건 (세션당 1회, 1.5초 이내)
   ============================== */

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--platform-navy);
}

.splash-center {
  text-align: center;
  animation: splash-in 0.3s ease both;
}

.splash-mark {
  position: relative;
  display: inline-block;
  width: 68px;
  height: 68px;
  overflow: hidden;
  border-radius: 22%;
}

.splash-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

/* 광택 스윕 — 스플래시 한정 그라데이션 허용 (헌법 예외 조항) */
.splash-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.45) 50%, transparent 60%);
  transform: translateX(-130%);
  animation: splash-shine 0.55s ease 0.35s forwards;
}

.splash-name {
  margin: 12px 0 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.splash-cap {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
}

.app-splash {
  animation: splash-out 0.3s ease 1s forwards;
}

@keyframes splash-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes splash-shine {
  to { transform: translateX(130%); }
}

@keyframes splash-out {
  to { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .splash-shine { display: none; }
  .splash-center { animation: none; }
  .app-splash { animation: none; }
}

/* ==============================
   바로가기 설치 화면 (web/install.html)
   ============================== */

.install-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.install-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  border-bottom: 1px solid var(--platform-line);
  background: rgba(255, 255, 255, 0.97);
  padding: 0 30px;
}

.install-back {
  color: var(--platform-blue);
  font-size: 13px;
  font-weight: 700;
}

.install-main {
  width: min(880px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 60px;
  flex: 1 1 auto;
}

.install-status-row {
  margin-top: 18px;
}

.install-state {
  display: inline-block;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--platform-line-strong);
  background: var(--platform-surface);
  color: var(--platform-muted);
}

.install-state.ready {
  color: var(--platform-blue-dark);
  background: var(--platform-blue-soft);
  border-color: var(--platform-blue-soft);
}

.install-state.ok {
  color: var(--platform-paid);
  background: #e8f4ee;
  border-color: #e8f4ee;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.install-primary {
  border: 1px solid var(--platform-blue);
  border-radius: 4px;
  background: var(--platform-blue);
  padding: 12px 20px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.install-primary:hover {
  background: var(--platform-blue-dark);
  border-color: var(--platform-blue-dark);
}

/* `.platform button { color: inherit }`(0,1,1)가 .install-primary(0,1,0)를 이겨
   파랑 필 위 잉크 글자(대비 2.62)가 되던 결함 — .btn-primary와 동일 계열 특이도 교정 (2026-07-31) */
.platform .install-primary {
  color: #ffffff;
}

.install-primary:disabled,
.platform .install-primary:disabled {
  border-color: var(--platform-line);
  background: var(--platform-bg);
  color: var(--platform-muted);
  cursor: default;
}

.install-secondary {
  border: 1px solid var(--platform-line-strong);
  border-radius: 4px;
  background: var(--platform-surface);
  padding: 12px 20px;
  color: var(--platform-ink);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.install-secondary:hover {
  border-color: var(--platform-faint);
}

.install-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  margin-top: 28px;
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  background: var(--platform-surface);
}

.guide-card {
  border-right: 1px solid var(--platform-line);
  padding: 18px 20px;
  transition: background-color 0.14s ease;
}

.guide-card:last-child {
  border-right: 0;
}

.guide-card.focus {
  background: var(--platform-blue-soft);
}

.guide-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.guide-card ol {
  margin: 0;
  padding-left: 18px;
  color: var(--platform-muted);
  font-size: 12px;
  line-height: 1.7;
}

.install-note {
  margin-top: 16px;
  color: var(--platform-faint);
  font-size: 12px;
}

@media (max-width: 760px) {
  .install-guide-grid {
    grid-template-columns: 1fr;
  }
  .guide-card {
    border-right: 0;
    border-bottom: 1px solid var(--platform-line);
  }
  .guide-card:last-child {
    border-bottom: 0;
  }
  .install-topbar {
    padding: 0 16px;
  }
}

/* ══ 아이콘 레일 (안B 채택, 2026-08-02) ═══════════════════════════════════
   탐색은 좁은 버건디 레일이, 현재 위치·브랜드는 흰 상단바가 맡는다(역할 분리).
   콘텐츠 폭이 종전보다 148px 넓어진다. 라벨은 아이콘 아래 10px로 남겨 학습 비용을 없앤다. */
.platform.platform { --rail-w: 92px; }
body.platform .platform-sidebar {
  width: var(--rail-w);
  padding: 0;
  /* 메뉴가 늘어 노트북 높이(768px 안팎)를 넘는다 — 아래 항목이 잘리지 않게 세로로만 넘긴다 */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}
body.platform .platform-sidebar > * { flex-shrink: 0; } /* 넘칠 때 항목이 눌려 찌그러지지 않게 */
body.platform .platform-brand {
  display: grid; place-items: center;
  min-height: 60px; padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
body.platform .platform-brand .brand-mark { margin: 0; }
body.platform .platform-brand > span:last-child { display: none; } /* 브랜드 문자는 상단바로 이관 */

body.platform .platform-nav { padding: 10px 8px; }
body.platform .nav-group-label {
  margin: 12px 0 6px; text-align: center;
  font-size: 11px; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.62); /* 9px·42%는 안 읽혔다(2026-10-07 점검 — 기능 글자 11px 하한) */
}
body.platform .platform-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 56px; padding: 7px 4px;
  border-radius: 6px; text-align: center;
}
body.platform .platform-nav a::before { content: none; } /* 좌측 인셋 막대 → 면 강조로 교체 */
body.platform .platform-nav a.active {
  color: #f4f1ea;
  background: rgba(251, 250, 247, 0.10); /* 잉크 레일 위 현재 위치 — 밝은 면 대신 한 단계 밝은 잉크(11차) */
}
body.platform .nav-icon {
  width: 21px; height: 21px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
body.platform .nav-label {
  font-size: 11px; font-weight: 650; letter-spacing: -0.03em;
  white-space: nowrap; overflow: hidden; max-width: 100%;
}
body.platform .sidebar-status { display: none; } /* 레일에는 설명문을 두지 않는다 */

/* 하단 도구 — 아이콘 급으로 축소 (초대·설치는 1회성) */
body.platform .install-btn {
  width: calc(100% - 16px); margin: 6px 8px 0;
  min-height: 38px; padding: 8px 4px;
  font-size: 11px; font-weight: 700;
}
body.platform .install-btn:last-of-type { margin-bottom: 12px; }

/* 상단바 — 브랜드 + 현재 위치 */
body.platform .platform-topbar { padding-left: 26px; }
body.platform .topbar-brand {
  font-size: 15px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--platform-ink);
}
body.platform .topbar-brand + .topbar-context {
  padding-left: 12px; margin-left: 12px;
  border-left: 1px solid var(--platform-line);
  color: var(--platform-muted); font-weight: 600;
}

@media (max-width: 767px) {
  /* 모바일은 레일을 남기지 않는다 — 상단바 + 전폭 드로어 (터치 영역 확보) */
  body.platform .platform-sidebar { width: min(78vw, 300px); }
  body.platform .platform-brand { min-height: 62px; }
  body.platform .platform-brand > span:last-child { display: block; }
  body.platform .platform-nav a {
    flex-direction: row; justify-content: flex-start;
    gap: 12px; min-height: 46px; padding: 0 14px; text-align: left;
  }
  body.platform .nav-label { font-size: 14px; font-weight: 600; }
  body.platform .nav-group-label { text-align: left; margin-left: 14px; font-size: 11px; }
  body.platform .install-btn { font-size: 12px; min-height: 44px; }
  body.platform .topbar-brand { display: none; } /* 모바일 상단바는 기존 mobile-brand 사용 */
}

/* 하단 도구 라벨 — 레일은 짧게, 모바일 드로어는 전체 */
body.platform .install-btn .u-full { display: none; }
body.platform .install-btn .u-short { display: inline; }
@media (max-width: 767px) {
  body.platform .install-btn .u-full { display: inline; }
  body.platform .install-btn .u-short { display: none; }
}


/* ══ 에디토리얼 통일 (2026-08-02) ═══════════════════════════════════════════
   홈에서 검증한 괘선 조판을 전 화면 공용 컴포넌트에 적용한다.
   카드(흰 면 + 테두리 + 그림자 + 라운드)를 걷어내고 굵은 괘선 2px = 구획 시작,
   헤어라인 1px = 항목 사이로 통일. 화면마다 같은 문법을 쓰게 되어 8화면이 한 벌이 된다.
   원 정의는 위에 남겨 두었다 — 이 블록만 걷으면 종전 카드 문법으로 돌아간다. */

/* 제호 행 — eyebrow→제목→설명 3단을 한 줄 조판으로 (반복되면 서식이 된다) */
body.platform .page-heading {
  max-width: none;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px;
  padding-bottom: 11px; border-bottom: 2px solid var(--platform-ink);
}
body.platform .page-heading .eyebrow {
  order: 2; margin: 0;
  color: var(--platform-faint); font-size: 12px; font-weight: 600; letter-spacing: 0;
}
body.platform .page-heading h1 {
  order: 1; font-size: 19px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.3;
}
body.platform .page-heading p:not(.eyebrow) {
  order: 3; width: 100%; margin: 2px 0 0;
  font-size: 12.5px; line-height: 1.6; color: var(--platform-muted);
}

/* 구획 — 굵은 괘선 아래로 */
body.platform .section-block { margin-top: 32px; }
body.platform .section-head {
  align-items: baseline; gap: 12px; margin-bottom: 0;
  padding-bottom: 9px; border-bottom: 2px solid var(--platform-ink);
}
body.platform .section-head h2 { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
body.platform .section-head p, body.platform .section-link { font-size: 12px; }

/* 면 폐기 — 카드는 배경 없는 구획이 된다 */
body.platform .surface-card {
  border: 0; border-radius: 0; background: none; box-shadow: none;
  padding: 16px 0 0;
}
body.platform .surface-card + .surface-card { border-top: 1px solid var(--platform-line); margin-top: 16px; }

/* 빈 상태 — 점선 상자 폐기, 조판으로 */
body.platform .empty-inline {
  min-height: 0; margin-top: 14px; padding: 22px 0;
  border: 0; border-bottom: 1px solid var(--platform-line);
  border-radius: 0; background: none; justify-content: flex-start; text-align: left;
}

/* 필터 — 알약 폐기, 밑줄 탭 문법 */
body.platform .filter-chip {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; padding: 12px 8px; margin-right: 12px;
  min-width: 44px; min-height: 44px; /* 터치 타깃 플로어 (HIT-002) */
  font-size: 13px; font-weight: 600;
}
body.platform .filter-chip.active {
  border-bottom-color: var(--platform-blue);
  color: var(--platform-blue); font-weight: 700;
}
body.platform .filter-bar { gap: 0; border-bottom: 1px solid var(--platform-line); }
body.platform .pill-tabs { border-bottom: 1px solid var(--platform-line); gap: 0; }
body.platform .pill-tabs .tab-button {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; padding: 10px 2px; margin-right: 20px; font-weight: 600;
}
body.platform .pill-tabs .tab-button.active {
  background: none; border-bottom-color: var(--platform-blue); color: var(--platform-blue);
}

/* 2단 작업 영역 — 카드 상자 폐기, 세로 괘선으로만 분할 */
body.platform .workspace-grid {
  margin-top: 0; overflow: visible;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  column-gap: 32px;
}
body.platform .workspace-list { border-right: 1px solid var(--platform-line); padding: 14px 32px 0 0; }
body.platform .workspace-detail { padding: 26px 0; place-items: start; text-align: left; }
body.platform .workspace-detail > div { text-align: left; }

/* 목록 행 — 헤어라인 + 좌측 인셋 막대(선택 문법 유지) */
body.platform .case-row {
  border: 0; border-bottom: 1px solid var(--platform-line); border-radius: 0;
  background: none; box-shadow: none; padding: 13px 12px 13px 0;
}
body.platform .case-row:hover { background: none; color: var(--platform-blue); }
body.platform .case-row.active { background: var(--platform-blue-soft); }

/* 지표 — 칸막이 격자 폐기, 조판으로 */
body.platform .stat-row {
  display: flex; flex-wrap: wrap; gap: 20px 56px;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  padding: 18px 0 0;
}
body.platform .stat-tile { border: 0; padding: 0; background: none; }
body.platform .stat-tile:hover { background: none; }
body.platform .stat-tile .stat-label { font-size: 11px; letter-spacing: 0.06em; }
body.platform .stat-tile .stat-value { font-size: 32px; letter-spacing: -0.05em; }
body.platform .stat-tile .stat-sub { font-size: 11.5px; }

/* 검색 — 라운드 상자 폐기, 밑줄 입력 */
body.platform .global-search input {
  border: 0; border-bottom: 1px solid var(--platform-line-strong);
  border-radius: 0; background: none; padding-left: 26px;
}
body.platform .global-search input:focus { border-bottom-color: var(--platform-ink); outline: none; }
body.platform .global-search::before { left: 2px; }
body.platform .global-search::after { left: 16px; }

/* 버튼 — 라운드 폐기(각진 조판). 필 primary는 화면당 1개 원칙 유지 */
body.platform .btn { border-radius: 0; }

@media (max-width: 900px) {
  body.platform .workspace-grid { grid-template-columns: 1fr; }
  body.platform .workspace-list { border-right: 0; border-bottom: 1px solid var(--platform-line); padding: 14px 0 18px; }
  body.platform .workspace-detail { padding: 18px 0; }
}

/* 제호 행 보강 — h1에 <br>이 있는 화면에서 아이브로우가 행 사이로 끼는 것 방지 */
body.platform .page-heading h1 { flex: 0 1 auto; }
body.platform .page-heading .eyebrow { margin-left: auto; align-self: baseline; }

/* 탭 — 알약·색면 폐기, 밑줄 문법 (tabs-toolbar 계열까지) */
body.platform .tabs-toolbar {
  gap: 0; border-bottom: 1px solid var(--platform-line); margin-bottom: 0;
  background: none; padding: 0;
}
body.platform .tab-button {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; padding: 12px 8px; margin-right: 16px;
  min-width: 44px; min-height: 44px;
  font-size: 13.5px; font-weight: 600; color: var(--platform-muted);
}
body.platform .tab-button.active,
body.platform .tab-button[aria-selected="true"] {
  background: none; color: var(--platform-blue); font-weight: 700;
  border-bottom-color: var(--platform-blue);
}

/* 검색 우측 상태 표기 — 상자 폐기 */
body.platform .search-state {
  border: 0; background: none; padding: 0;
  color: var(--platform-faint); font-size: 12px; font-weight: 600;
}

/* 잔여 카드 문법 정리 (2026-08-02 검수) — 오버라이드가 놓친 화면별 컴포넌트 */
body.platform .action-card,
body.platform .guide-card,
body.platform .home-panels > *,
body.platform .library-list > li {
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
body.platform .action-grid,
body.platform .install-guide-grid { gap: 0 36px; }
body.platform .action-card {
  border-top: 1px solid var(--platform-line); padding: 16px 0 18px;
}
body.platform .guide-card {
  border-top: 1px solid var(--platform-line); padding: 14px 0 16px;
}
body.platform .install-note {
  border: 0; border-top: 1px solid var(--platform-line); border-radius: 0;
  background: none; padding: 14px 0 0; margin-top: 22px;
}
body.platform .local-button, body.platform .install-primary,
body.platform .install-secondary, body.platform .install-back { border-radius: 0; }
body.platform .notice {
  border: 0; border-top: 1px solid var(--platform-line); border-radius: 0;
  background: none; padding: 14px 0 0; text-align: left;
}
/* 3열 안내 그리드의 세로 구분선 — 카드 테두리 대신 헤어라인 1줄만 */
body.platform .action-grid > * + *,
body.platform .install-guide-grid > * + * {
  border-left: 1px solid var(--platform-line); padding-left: 28px;
}

/* 케어 화면 탭은 tab-button 클래스가 없다 — 직계 버튼까지 밑줄 문법 적용 (코덱스 검수 2026-08-02) */
body.platform .pill-tabs > button {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; padding: 12px 8px; margin-right: 16px;
  min-width: 44px; min-height: 44px;
  font-weight: 600; color: var(--platform-muted);
}
body.platform .pill-tabs > button.active,
body.platform .pill-tabs > button[aria-selected="true"] {
  background: none; color: var(--platform-blue); font-weight: 700;
  border-bottom-color: var(--platform-blue);
}

/* 제호 행에 h1을 감싼 래퍼가 있는 화면(발행 데스크) — 래퍼를 1번 자리에 둔다 */
body.platform .page-heading .desk-title-row {
  order: 1; display: flex; align-items: baseline; gap: 10px;
}
body.platform .page-heading .desk-title-row h1 { margin: 0; }

body.platform .profile-card {
  border: 0; border-radius: 0; background: none; box-shadow: none;
}

/* 열람 비밀번호 상자 — 고객관리는 platform.css만 싣는다. style.css에만 있던 규칙을 옮겨
   오버레이로 띄운다(2026-09-27). 에디토리얼 문법: 라운드 없음·그림자 없음·굵은 괘선으로 구획 시작 */
body.platform .vault-veil {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(20, 22, 31, 0.55);
}
body.platform .vault-box {
  width: min(420px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 22px 22px 20px;
  background: var(--platform-surface); color: var(--platform-ink);
  border: 1px solid var(--platform-line-strong); border-top: 2px solid var(--platform-ink);
  border-radius: 0; box-shadow: none;
}
body.platform .vault-box h2 { margin: 0 0 8px; font-size: 19px; font-weight: 700; letter-spacing: -0.035em; }
body.platform .vault-why {
  margin: 0 0 18px; font-size: 12.5px; line-height: 1.65;
  color: var(--platform-muted); word-break: keep-all;
}
body.platform .vault-box label {
  display: block; margin: 0 0 5px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--platform-muted);
}
body.platform .vault-box input {
  width: 100%; margin: 0 0 14px; padding: 9px 11px;
  font: inherit; font-size: 14px;
  border: 1px solid var(--platform-line-strong); border-radius: 0;
  background: var(--platform-surface); color: var(--platform-ink);
}
body.platform .vault-box input:focus { outline: none; border-color: var(--platform-blue); }
body.platform .vault-err {
  margin: 0 0 12px; padding: 7px 10px;
  background: var(--platform-blue-soft);
  font-size: 12px; font-weight: 700; color: var(--platform-blue);
}
body.platform .vault-err[hidden] { display: none; }
body.platform .vault-row { display: flex; gap: 8px; }
body.platform .vault-row .btn { flex: 1; min-height: 40px; }

/* ══ 터치 기기 (폰·패드, 2026-09-28) ═══════════════════════════════════════════
   손가락으로 누르는 기기에서만 건다 — 마우스 쓰는 PC의 밀도는 그대로 둔다.
   1) 단추·선택칸은 최소 36px (관리자 직급 선택칸이 26px이었다)
   2) 아이폰은 16px보다 작은 입력칸을 누르면 화면을 확대해 버린다 — 입력칸 글자를 16px로 */
@media (pointer: coarse) {
  body.platform button,
  body.platform select,
  body.platform .install-back,
  body.platform input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    min-height: 36px;
  }
  body.platform .install-back { display: inline-flex; align-items: center; }
  body.platform input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  body.platform select,
  body.platform textarea {
    font-size: 16px !important;
  }
}

/* ══ 폰 하단 탭 (2026-10-04) — platform.js buildTabs 가 만든다. 위 2px 잉크 괘선, 그림자 없음 ══ */
.mobile-tabs { display: none; }
@media (max-width: 767px) {
  .mobile-tabs {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: var(--platform-bg); border-top: 2px solid var(--platform-ink);
  }
  .mobile-tabs a, .mobile-tabs button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 58px; padding: 6px 0; border: 0; background: none;
    font: inherit; font-size: 11px; font-weight: 700; color: var(--platform-muted); cursor: pointer;
    transition: color .14s;
  }
  .mobile-tabs a.on { color: var(--platform-blue); }
  .mobile-tabs .nav-icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  body.has-tabs .platform-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* 화면별 「?」 도움말 (2026-10-11) — 제목 옆 동그란 단추, 제목 아래 접힌 항목(첫 항목은 펼침) */
.mg-help-btn { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 10px; vertical-align: 0.15em;
  border: 1px solid var(--platform-line-strong); border-radius: 50%; background: transparent; color: var(--platform-muted);
  font: 700 14px/1 inherit; cursor: pointer; position: relative; }
.mg-help-btn::before { content: ""; position: absolute; inset: -9px; } /* 누르는 자리 44px */
body.platform .page-heading .mg-help-btn { order: 1; align-self: center; margin-left: -4px; } /* 제호 행은 flex 순서로 놓인다 — 제목 바로 뒤 */
#h-date { display: inline-block; } /* 홈 날짜 옆에 「?」가 같은 줄로 */
.mg-help-btn:hover, .mg-help-btn[aria-expanded="true"] { border-color: var(--platform-ink); color: var(--platform-ink); }
.mg-help { max-width: 720px; margin: 4px 0 24px; display: flex; flex-direction: column; gap: 6px; }
.mg-help[hidden], .mg-news[hidden] { display: none; }
.mg-help-item { background: var(--platform-surface, #fff); border: 1px solid var(--platform-line); border-radius: 10px; }
.mg-help-item > summary { cursor: pointer; min-height: 44px; padding: 8px 14px; display: flex; align-items: center; gap: 8px; font-weight: 700; list-style: none; }
.mg-help-item > summary::-webkit-details-marker { display: none; }
.mg-help-item > summary::after { content: "›"; margin-left: auto; color: var(--platform-faint); transform: rotate(90deg); transition: transform .15s; }
.mg-help-item[open] > summary::after { transform: rotate(-90deg); }
.mg-help-item > summary small { font-weight: 500; color: var(--platform-muted); font-size: 12px; }
.mg-help-body { padding: 0 14px 12px; font-size: 14px; line-height: 1.65; color: var(--platform-g800, var(--platform-ink)); }
.mg-help-body ul { margin: 0; padding-left: 18px; } .mg-help-body li { margin: 3px 0; } .mg-help-body p { margin: 0; }
.mg-news { margin: 0 0 24px; padding: 18px 20px; border: 1px solid var(--platform-line-strong); border-radius: 12px; background: var(--platform-surface, #fff); max-width: 720px; }
.mg-news-h { margin: 0 0 8px; font-size: 13px; font-weight: 750; color: var(--platform-ink); }
.mg-news ul { margin: 0 0 14px; padding-left: 18px; font-size: 14px; line-height: 1.65; color: var(--platform-g800, var(--platform-ink)); }

/* AI 입력 (2026-10-13, 하랑지점 방식) — 노트북은 오른쪽 아래 떠 있는 창, 폰은 아래 판. 제안 표만, 저장은 사람이 */
.ai-pill { position: fixed; right: 24px; bottom: 24px; z-index: 46; min-height: 44px; padding: 0 18px; border: 0; border-radius: 22px;
  background: var(--platform-navy); color: #f4f1ea; font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; box-shadow: 0 2px 10px rgba(20, 22, 31, .22); }
.ai-pill[hidden], .ai-dock[hidden] { display: none; }
.ai-dock { position: fixed; right: 24px; bottom: 24px; z-index: 46; width: min(440px, calc(100vw - 32px)); max-height: min(640px, 76vh);
  display: flex; flex-direction: column; background: var(--platform-surface, #fff); border: 1px solid var(--platform-line-strong); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(20, 22, 31, .18); }
.ai-head { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--platform-line); }
.ai-head strong { font-size: 15px; } .ai-head span { font-size: 12px; color: var(--platform-muted); }
.ai-x { margin-left: auto; min-height: 36px; padding: 0 10px; border: 0; background: transparent; color: var(--platform-muted); font: inherit; font-size: 13px; cursor: pointer; }
.ai-log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.6; }
.ai-say.me { align-self: flex-end; max-width: 85%; padding: 8px 12px; border-radius: 12px; background: var(--platform-navy); color: #f4f1ea; }
.ai-say.bot { color: var(--platform-g800, var(--platform-ink)); }
.ai-say.bot small { color: var(--platform-faint); }
.ai-say.card { border: 1px solid var(--platform-line); border-radius: 10px; padding: 8px 10px; }
.ai-say.card.old { opacity: .5; pointer-events: none; }
.ai-rows { display: flex; flex-direction: column; }
.ai-row { display: grid; grid-template-columns: 22px auto minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--platform-line); }
.ai-row:last-child { border-bottom: 0; }
.ai-row input[type="checkbox"] { width: 18px; height: 18px; }
.ai-kind { font-size: 12px; font-weight: 750; color: var(--platform-blue); white-space: nowrap; }
.ai-cust { min-height: 36px; max-width: 100%; font: inherit; font-size: 13px; }
.ai-what { grid-column: 2 / -1; font-size: 13.5px; color: var(--platform-ink); overflow-wrap: anywhere; }
.ai-note { grid-column: 2 / -1; font-size: 12px; color: #8a4c07; }
.ai-row.unsure { background: #fbf3e4; }
.ai-acts { display: flex; align-items: center; gap: 10px; padding-top: 8px; }
.ai-msg { font-size: 12.5px; color: var(--platform-muted); }
.ai-form { display: flex; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid var(--platform-line); }
.ai-form textarea { flex: 1; min-height: 44px; resize: vertical; padding: 8px 10px; font: inherit; font-size: 14px; border: 1px solid var(--platform-line-strong); border-radius: 8px; }
@media (max-width: 767px) {
  .ai-pill { right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .ai-dock { left: 0; right: 0; bottom: 0; width: auto; max-height: 82vh; border-radius: 14px 14px 0 0; z-index: 60; }
  .ai-form textarea { font-size: 16px; }   /* 아이폰이 16px 아래 칸을 누르면 화면을 키운다 */
}
.ai-form .btn.btn-primary { background: var(--platform-navy); border-color: var(--platform-navy); }   /* 버건디는 「고른 것 저장」 하나만 */
a.ai-pill { display: inline-flex; align-items: center; text-decoration: none; }
body.platform .ai-pill, body.platform .ai-pill:visited { color: #f4f1ea; }   /* 공용 「button·a 글자색 상속」 규칙이 남색 위 검은 글자로 덮던 것 */
body.platform .ai-form .btn.btn-primary { color: #fff; }
body.platform .ai-go { margin-left: 4px; font-weight: 700; color: var(--platform-blue); text-decoration: underline; text-underline-offset: 3px; }
