/* ============================================================
   디자인 시스템 — Modern Light (D-051)
   색/간격/라운드/그림자를 토큰으로 정의하고, 테마 파일(/static/themes/*.css)이
   토큰을 재정의한다 (D-014). 컴포넌트는 토큰만 참조 → 테마 교체로 전체가 바뀐다.
   ============================================================ */
:root {
  /* 표면/배경 — 화이트 캔버스 (D-063) */
  --c-bg: #ffffff;
  --c-surface: #ffffff;
  --c-surface-2: #f6f5f2;   /* 따뜻한 미묘 채움(thead, chip, 입력 배경) */
  /* 텍스트 */
  --c-text: #212121;        /* ink — 본문/링크 */
  --c-muted: #6c6c76;   /* a11y: 흰 배경 대비 4.5+ (D-119) */
  --c-ink: #17171c;         /* 니어블랙 — 강조/헤더 글자 */
  /* 경계 — 헤어라인 */
  --c-border: #d9d9dd;
  --c-border-light: #e5e7eb;
  /* 헤더 */
  --c-header: #ffffff;
  --c-header-text: #212121;
  /* 강조 — 니어블랙 주조 */
  --c-primary: #17171c;
  --c-primary-dark: #2c2c34;
  --c-primary-soft: #f3f3f5;
  --c-on-primary: #ffffff;   /* primary 채움 위 글자색 (테마가 재정의) */
  --c-admin-band: #17171c;   /* 관리자 헤더 밴드 — 테마 무관 다크 유지 */
  --c-danger: #b30000;
  --c-danger-dark: #8f0000;
  --c-success: #003c33;
  /* 브랜드 액센트 (장식 표면 금지, 강조에만) */
  --c-coral: #ff7759;
  --c-coral-soft: #ffad9b;
  --c-coral-bg: #fff7f4;
  --c-blue: #1863dc;        /* 에디토리얼 링크/페이지네이션 강조 */
  --c-green: #003c33;       /* 딥그린 밴드 */
  --c-navy: #071829;
  --c-stone: #eeece7;
  --c-pale-green: #edfce9;
  --c-form-focus: #9b60aa;  /* 입력 포커스 보라 */
  /* 보조(레거시 호환) */
  --c-thead: var(--c-surface-2);
  --c-btn: var(--c-surface);
  --c-btn-border: #d9d9dd;
  /* 폰트 (D-063) — 한글은 Pretendard/시스템 폴백 */
  --font-display: "Space Grotesk", "Pretendard", "Apple SD Gothic Neo", system-ui, sans-serif;
  --font-body: "Inter", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* 세리프 (D-234) — blog/magazine/studio 테마가 각자 같은 문자열로 선언하던 것을 여기로 */
  --font-serif: "Iowan Old Style", "Apple SD Gothic Neo", Georgia, "Nanum Myeongjo", serif;
  /* 미디어 비율 (D-234) — 카드가 쓰임새마다 다른 비율을 쓴다. .card[data-ratio]가 고른다 */
  --ratio-wide: 21 / 9;     /* 와이드 커버 */
  --ratio-hero: 16 / 10;    /* 히어로 커버 */
  --ratio-card: 16 / 10;    /* 일반 카드 (기본) */
  --ratio-book: 3 / 4;      /* 책 표지·공연 포스터 */
  --ratio-square: 1 / 1;    /* 상품·갤러리 */
  /* 편집 리듬 (D-234) — 테마가 재정의한다 */
  --section-gap: 56px;
  --page-top: var(--section-gap);   /* 헤더와 본문 사이 여백 (D-245) */
  --card-min: 230px;        /* .card-grid 한 칸의 최소폭 */
  /* 액센트 (D-234) — 기본은 주조색과 같다. 테마가 자기 색을 주면 승격 컴포넌트가 전부 따라간다 */
  --c-accent: var(--c-primary);
  --c-accent-soft: var(--c-primary-soft);
  /* 형태 — 라운드 스케일 */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  /* 깊이 — 플랫(보더 기반). 드롭다운/모달만 미묘한 리프트 유지 */
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 8px 30px rgba(17,23,41,.10);
  --ring: 0 0 0 3px rgba(76,110,230,.30);
  --ring-input: 0 0 0 3px rgba(155,96,170,.18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* 클래스 규칙(.btn 등)이 UA 기본을 덮는 문제 방지 */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--c-text); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--c-muted); text-decoration: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
/* 풀폭 셸: 본문/헤더/푸터가 화면을 꽉 채우되, 큰 화면에선 가장자리에 붙지 않게 반응형 좌우 여백 */
.container { max-width: none; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* ── 헤더 ─────────────────────────────── */
.site-header {
  background: var(--c-header); /* color-mix 미지원 폴백 */
  background: color-mix(in srgb, var(--c-header) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.logo { color: var(--c-ink); font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.logo:hover { text-decoration: none; opacity: .85; }
.nav { display: flex; align-items: center; }
.nav a { color: var(--c-header-text); margin-left: 14px; font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--c-primary); text-decoration: none; }
.nav .nick { color: var(--c-text); font-weight: 600; }
.main-menu { flex: 1; display: flex; align-items: center; }
.main-menu a { margin-left: 0; margin-right: 16px; }
.nav-search input {
  width: 150px; padding: 7px 12px; font-size: 13px; border: 1px solid var(--c-border);
  border-radius: var(--radius-pill); background: var(--c-surface-2); color: var(--c-text);
  transition: box-shadow .15s ease, width .2s ease;
}
.nav-search input:focus { width: 200px; border-color: var(--c-form-focus); box-shadow: var(--ring-input); outline: none; }
.nav-search input::placeholder { color: var(--c-muted); }
.badge-n {
  background: var(--c-danger); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: var(--radius-pill); padding: 1px 6px; margin-left: 3px; vertical-align: top;
}
/* 햄버거 토글은 데스크톱에서 숨김 (D-054) */
.nav-toggle { display: none; }
.nav-burger { display: none; }

/* ── 모바일 헤더: 햄버거 패널 (D-054) ── */
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; height: auto; min-height: 60px; gap: 0; }
  .logo { margin-right: auto; }
  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 42px; height: 42px; border-radius: 9px; cursor: pointer; margin-left: 10px;
  }
  .nav-burger:hover { background: var(--c-surface-2); }
  .nav-burger span { display: block; width: 22px; height: 2px; background: var(--c-header-text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  /* 열림 시 ☰ → ✕ */
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* 접힘: 메뉴/검색/계정 숨김 → 토글 시 전체폭으로 펼침 */
  .main-menu, .nav-search, .account-nav { display: none; flex: 0 0 100%; width: 100%; }
  .nav-toggle:checked ~ .main-menu,
  .nav-toggle:checked ~ .nav-search,
  .nav-toggle:checked ~ .account-nav { display: flex; }
  .nav-search { order: 1; padding: 10px 0 4px; }
  .main-menu { order: 2; flex-direction: column; align-items: stretch; }
  .account-nav { order: 3; flex-direction: column; align-items: stretch; padding-bottom: 12px; border-top: 1px solid var(--c-border-light); }

  .nav-search input, .nav-search input:focus { width: 100%; }
  .main-menu a, .account-nav a { margin: 0; padding: 12px 4px; border-bottom: 1px solid var(--c-border-light); }
  .account-nav a:last-child { border-bottom: none; }

  /* 서브메뉴는 펼쳐서 인라인 표시(hover 불필요) */
  .main-menu .menu-item { display: block; position: static; margin: 0; }
  .main-menu .menu-item > a .caret { display: none; }
  .main-menu .submenu {
    display: block; position: static; min-width: auto; padding: 0 0 0 16px;
    background: transparent; border: none; box-shadow: none;
  }
  .main-menu .submenu::before { display: none; }
  .main-menu .submenu a { padding: 10px 4px; border-radius: 0; }
}

/* ── 본문 컨테이너 ───────────────────────── */
/* main 은 .container 와 같은 요소(<main class="container">)라 class가 element를 이긴다.
   위아래 여백/패딩만 main 한정으로 .container(0 auto / 0 18px)보다 우선 적용 — 헤더/네비/푸터는 .container 그대로 */
main.container {
  background: var(--c-surface); margin: 0 auto 5px;
  padding: var(--page-top) clamp(16px, 4vw, 48px) 14px;
  border: 1px solid var(--c-border-light); border-radius: 0;
  box-shadow: var(--shadow-sm); min-height: 60vh;
}
/* 워크스페이스 셸 (D-254) — 자체 사이드바로 화면 전체를 쓰는 화면(스튜디오)이 고르는 본문 클래스.
   `.container` 를 아예 달지 않으므로 폭 상한·좌우 패딩·테두리·--page-top 이 처음부터 걸리지 않는다.
   상속해 놓고 음수 마진으로 되돌리던 방식은 컨테이너 값이 바뀔 때마다 깨졌다 — 실제로 D-245 의
   --page-top(60px)과 테마의 max-width:1160px 이 스튜디오 위·왼쪽에 여백을 만들었다. */
main.workspace { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: transparent; }
h1 { font-family: var(--font-display); font-size: clamp(30px, 4.4vw, 46px); font-weight: 500; letter-spacing: -.025em; line-height: 1.08; margin: 6px 0 20px; }
h2 { font-family: var(--font-display); font-size: clamp(21px, 2.6vw, 28px); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; margin: 34px 0 12px; }
h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }
.group-name { border-left: 3px solid var(--c-coral); padding-left: 12px; }

/* ── 테이블 ─────────────────────────────── */
.list-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.list-table th, .list-table td { padding: 11px 12px; border-bottom: 1px solid var(--c-border-light); text-align: left; }
.list-table thead th {
  background: transparent; font-weight: 400; color: var(--c-muted);
  font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid var(--c-border);
}
.list-table thead th:first-child { border-top-left-radius: var(--radius-sm); }
.list-table thead th:last-child { border-top-right-radius: var(--radius-sm); }
.list-table tbody tr { transition: background .12s ease; }
.list-table tbody tr:hover { background: var(--c-surface-2); }
.list-table .num { text-align: center; width: 64px; }
.list-table .date, .date { color: var(--c-muted); white-space: nowrap; font-size: 13px; }
.strong { font-weight: 600; }
.empty { color: var(--c-muted); text-align: center; padding: 28px 0; }
.comment-count { color: var(--c-primary); font-size: 12px; margin-left: 4px; font-weight: 600; }
.minus { color: var(--c-danger); }
.has-file { font-size: 12px; }

.board-head { display: flex; justify-content: space-between; align-items: flex-start; }
.board-head .desc, .desc { color: var(--c-muted); margin: -2px 0 14px; font-size: 14px; }

/* ── 탭/칩 ──────────────────────────────── */
.cat-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.cat { padding: 6px 15px; border: 1px solid var(--c-coral-soft); border-radius: var(--radius-sm); font-size: 14px; color: var(--c-coral-deep, #bf3b12); background: var(--c-coral-bg); transition: all .15s ease; }
.cat.current { background: var(--c-coral); color: #2a0e06; border-color: var(--c-coral); }
.cat:hover { text-decoration: none; border-color: var(--c-coral); color: var(--c-coral); }
.cat.current:hover { background: var(--c-coral); color: #2a0e06; }
.cat-badge {
  display: inline-block; background: var(--c-surface-2); border: 1px solid var(--c-border);
  color: var(--c-muted); font-size: 11px; padding: 2px 8px; border-radius: var(--radius-pill); margin-right: 4px;
}

.search-form { display: flex; gap: 7px; justify-content: flex-end; margin-bottom: 12px; }
.search-form input { padding: 8px 12px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); color: var(--c-text); }
.search-form input:focus { box-shadow: var(--ring-input); outline: none; border-color: var(--c-form-focus); }

/* ── 버튼 ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; font-size: 14px; font-weight: 500; cursor: pointer; line-height: 1.2;
  white-space: nowrap; /* 좁은 flex 셀에서 "등급 제거"가 세로로 꺾이는 것 방지 */
  font-family: var(--font-body);
  background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-border);
  border-radius: var(--radius-pill); transition: all .15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--c-ink); color: var(--c-ink); }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.btn-primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: var(--c-on-primary); }
.btn-danger { background: transparent; border-color: var(--c-danger); color: var(--c-danger); }
.btn-danger:hover { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: none; color: var(--c-danger); cursor: pointer; font-size: 13px; padding: 0; }

/* ── 페이지네이션 ───────────────────────── */
.pagination { margin-top: 18px; text-align: center; }
.page { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 8px; margin: 0 2px; border: 1px solid var(--c-border); border-radius: var(--radius-pill); font-size: 14px; background: var(--c-surface); color: var(--c-ink); }
.page:hover { border-color: var(--c-ink); color: var(--c-ink); text-decoration: none; }
.page.current { background: var(--c-primary); color: var(--c-on-primary); border-color: var(--c-primary); }

/* ── 글 본문 ────────────────────────────── */
.post-meta { color: var(--c-muted); font-size: 13px; border-bottom: 1px solid var(--c-border-light); padding-bottom: 12px; }
.post-meta span { margin-right: 12px; }
.post-content { padding: 22px 2px; word-break: break-word; min-height: 120px; font-size: 15.5px; line-height: 1.8; }
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.post-content h1 { font-size: 25px; margin: 24px 0 10px; border-bottom: 1px solid var(--c-border-light); padding-bottom: 6px; }
.post-content h2 { font-size: 21px; margin: 22px 0 8px; border-bottom: 1px solid var(--c-border-light); padding-bottom: 4px; }
.post-content h3 { font-size: 18px; margin: 18px 0 6px; }
.post-content h4, .post-content h5, .post-content h6 { font-size: 15px; margin: 12px 0 4px; }
.post-content table { border-collapse: collapse; margin: 14px 0; width: auto; max-width: 100%; }
.post-content th, .post-content td { border: 1px solid var(--c-border); padding: 8px 13px; }
.post-content thead th { background: var(--c-surface-2); font-weight: 600; }
.post-content pre {
  background: #0f172a; color: #e2e8f0; border: 1px solid #1e293b; border-radius: var(--radius-sm);
  padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.55; margin: 14px 0;
}
.post-content code {
  background: var(--c-surface-2); border-radius: 5px; padding: 2px 6px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em;
}
.post-content pre code { background: none; border: none; padding: 0; color: inherit; }
.post-content blockquote {
  margin: 14px 0; padding: 6px 16px; border-left: 4px solid var(--c-primary);
  background: var(--c-primary-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--c-text);
}
.post-content ul, .post-content ol { padding-left: 26px; margin: 8px 0; }
.post-content hr { border: none; border-top: 1px solid var(--c-border-light); margin: 18px 0; }
.post-content p { margin: 10px 0; }
.post-actions { display: flex; gap: 8px; margin: 8px 0 22px; }
.breadcrumb { font-size: 13px; color: var(--c-muted); }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-primary); }

.attachments { border-top: 1px solid var(--c-border-light); padding: 12px 2px; font-size: 14px; }
.attachments ul { margin: 6px 0 0; padding-left: 18px; }

/* ── 댓글 ───────────────────────────────── */
.comments { border-top: 1px solid var(--c-border); padding-top: 12px; margin-top: 8px; }
.comment { border-bottom: 1px solid var(--c-border-light); padding: 12px 4px; position: relative; }
.reply-arrow { position: absolute; left: -16px; top: 12px; color: var(--c-muted); }
.comment-meta { font-size: 13px; color: var(--c-muted); display: flex; gap: 10px; align-items: center; }
.reply-link { font-size: 12px; }
.comment-content { white-space: pre-wrap; word-break: break-word; margin-top: 4px; }
.comment-form textarea { width: 100%; margin: 12px 0 8px; }
.replying { font-size: 13px; color: var(--c-muted); margin: 12px 0 0; }
.inline { display: inline; }

/* ── 갤러리 ─────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 10px; }
.gallery-card { border: 1px solid var(--c-border-light); border-radius: var(--radius); overflow: hidden; color: var(--c-text); background: var(--c-surface); box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.gallery-card:hover { text-decoration: none; border-color: var(--c-ink); }
.gallery-thumb { height: 150px; background: var(--c-surface-2); display: flex; align-items: center; justify-content: center; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.no-thumb { color: var(--c-muted); font-size: 13px; }
.gallery-body { padding: 12px 14px; }
.gallery-title { font-size: 14px; font-weight: 600; }
.gallery-meta { font-size: 12px; color: var(--c-muted); margin-top: 4px; }

/* ── 알림 ───────────────────────────────── */
.notif-list { display: flex; flex-direction: column; }
.notif-item {
  display: flex; justify-content: space-between; gap: 12px; padding: 14px 12px;
  border-bottom: 1px solid var(--c-border-light); color: var(--c-text); border-radius: var(--radius-sm);
}
.notif-item:hover { background: var(--c-surface-2); text-decoration: none; }
.notif-item.unread { font-weight: 600; }
.notif-item.unread .notif-msg::before { content: "●"; color: var(--c-primary); font-size: 9px; margin-right: 6px; vertical-align: middle; }

/* ── 폼 ─────────────────────────────────── */
.form label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
/* **타입을 열거하지 않는다** (D-261). 예전엔 text·password·email·number… 를 나열했는데,
   그 방식은 새 입력 타입을 쓸 때마다 조용히 스타일이 빠진다 — D-253이 url·datetime-local 로,
   D-259/D-260 이 date·time 으로 같은 결함을 두 번 더 겪었다(캠페인 시작일, 발행 금지 시각).
   그래서 "글상자가 아닌 것"만 빼는 방식으로 뒤집어 이 계열을 끝낸다. 체크박스·라디오는
   아래에서 따로, file 은 .file-label 이, submit/버튼은 .btn 이 맡는다. */
.form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
.form textarea, .form select, .admin-search input, .role-head input, .role-head select {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm); font-family: inherit;
  background: var(--c-surface); color: var(--c-text); transition: border-color .15s ease, box-shadow .15s ease;
}
.form input:focus, .form textarea:focus, .form select:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--c-form-focus); box-shadow: var(--ring-input);
}
.form input:disabled { background: var(--c-surface-2); color: var(--c-muted); }
.form textarea { resize: vertical; }
.form-actions { display: flex; gap: 8px; }
/* 폼 안의 2단 행 (D-261) — 짧은 값 둘(기간 시작/끝, 발행 금지 시작/끝)을 나란히 둔다.
   studio/base.html 의 `.studio-cols` 와 같은 모양이지만 **그건 스튜디오 인라인 CSS 라
   관리자 화면에는 실리지 않는다** — D-258·D-259 가 그걸 모르고 갖다 써서 2단 배치가
   조용히 무효였다(테스트는 전부 통과했다). 코어에 정식 이름으로 둔다. */
.form-cols { display: flex; gap: 16px; flex-wrap: wrap; }
.form-cols > div { flex: 1; min-width: 200px; }
.form .checkbox { font-weight: 400; display: flex; align-items: center; gap: 7px; }
.form .checkbox input { width: auto; display: inline; margin: 0; }
.file-label input[type="file"] { margin-top: 6px; display: block; }

/* ── 인증/알림 박스 ─────────────────────── */
.auth-box { max-width: 420px; margin: 28px auto; }
.auth-alt { font-size: 13px; color: var(--c-muted); text-align: center; }
.error { background: #fef2f2; color: var(--c-danger-dark); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid #fecaca; }
.success { background: #f0fdf4; color: #15803d; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid #bbf7d0; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 16px; }
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }

/* ── 관리자 ─────────────────────────────── */
.admin-nav { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; padding: 12px; background: var(--c-surface-2); border-radius: var(--radius); }
.admin-nav .btn { box-shadow: none; }
.stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 130px; background: var(--c-surface); border: 1px solid var(--c-border-light); border-radius: var(--radius); text-align: center; padding: 22px 0; box-shadow: var(--shadow-sm); }
.stat-num { font-family: var(--font-display); font-size: 34px; font-weight: 400; letter-spacing: -.03em; color: var(--c-ink); }
.stat-label { color: var(--c-muted); font-size: 13px; }
.badge { background: var(--c-pale-green); color: var(--c-green); font-size: 11px; font-weight: 500; font-family: var(--font-mono); letter-spacing: .04em; padding: 3px 10px; border-radius: var(--radius-pill); }
.actions form { margin: 0; }
.actions { white-space: nowrap; }

/* 다크 푸터 밴드 (D-063) — 테마 무관 고정 니어블랙 */
.site-footer { background: #17171c; color: #b9b9c2; font-size: 13px; text-align: center; padding: 40px 0; margin-top: 56px; }
.site-footer a { color: #e7e7ee; }
.site-footer a:hover { color: #fff; }

/* AI 묶음 작성기 소스 카드 (D-064) */
.compose-src { border: 1px solid var(--c-border-light); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; background: var(--c-surface); }
.compose-src-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.compose-src textarea { width: 100%; margin-top: 6px; padding: 9px 11px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; background: var(--c-surface); color: var(--c-text); }
.compose-src .src-summary { background: var(--c-surface-2); }
.compose-src .src-cite { font-size: 12px; color: var(--c-blue); margin-left: 4px; }
.src-results { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.compose-presets { display: flex; gap: 16px; flex-wrap: wrap; }
.compose-presets label { display: flex; align-items: center; gap: 6px; }
.compose-presets select { width: auto; }
/* AI 보조 인라인 바 (D-064) — 에디터 위 "AI 글쓰기" 열기 버튼 */
.ai-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.ai-bar .ai-open { border-color: var(--c-coral); color: var(--c-coral); }

/* AI 글쓰기 레이어 팝업 (D-064) — 드래그 이동 + 닫기 */
.ai-modal {
  position: fixed; left: 50%; top: 12vh; transform: translateX(-50%);
  width: 460px; max-width: calc(100vw - 24px); z-index: 1200;
  background: var(--c-surface, #fff); color: var(--c-text, #17171c);
  border: 1px solid var(--c-border, #e3e3e6); border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.ai-modal[hidden] { display: none; }
.ai-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--c-border, #e3e3e6);
  cursor: move; user-select: none;
}
.ai-modal-title { font-weight: 600; font-size: 14px; }
.ai-modal-close {
  border: none; background: none; cursor: pointer; font-size: 16px;
  line-height: 1; color: var(--c-muted, #777); padding: 2px 6px; border-radius: 6px;
}
.ai-modal-close:hover { background: var(--c-bg, #f4f4f5); color: var(--c-text, #17171c); }
.ai-modal-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ai-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-preset {
  font-size: 12px; padding: 3px 9px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--c-border, #e3e3e6); background: var(--c-bg, #f4f4f5); color: var(--c-text, #17171c);
}
.ai-preset:hover { border-color: var(--c-coral); color: var(--c-coral); }
.ai-modal .ai-prompt, .ai-modal .ai-result { width: 100%; resize: vertical; font: inherit; }
.ai-modal .ai-result { background: var(--c-bg, #f8f8f9); }
.ai-ctx { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-muted, #555); }
.ai-ctx input { width: auto; margin: 0; }
.ai-gen-row { display: flex; align-items: center; gap: 10px; }
.ai-msg { font-size: 12px; color: var(--c-muted, #777); }
.ai-apply { display: flex; flex-wrap: wrap; gap: 6px; }

/* 상단 공지 바 (D-063) — 검정 스트립, 닫기 가능 */
.announce { background: #000; color: #fff; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-align: center; padding: 9px 40px; position: relative; }
.announce a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.announce a:hover { color: #fff; opacity: .8; }
.announce-close { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; opacity: .7; }
.announce-close:hover { opacity: 1; }

/* 모노 kicker 라벨 + 에디토리얼 밴드 (D-063) */
.mono-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.kicker { margin-bottom: 10px; }
.band { border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px); color: #fff; margin: 36px 0; }
.band.green { background: var(--c-green); }
.band.navy { background: var(--c-navy); }
.band h2 { font-family: var(--font-display); font-weight: 500; color: #fff; font-size: clamp(24px, 3.4vw, 40px); letter-spacing: -.02em; line-height: 1.08; margin: 8px 0 12px; }
.band p { color: #cfe8e2; max-width: 54ch; margin: 0 0 22px; }
.band .mono-label { color: var(--c-coral-soft); }
/* 다크 표면 위 버튼: 흰색 pill */
.btn-on-dark { background: #fff; color: var(--c-ink); border-color: #fff; }
.btn-on-dark:hover { background: #eee; color: var(--c-ink); border-color: #eee; }

.avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 5px; }
.avatar-lg { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); }
.avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }

/* 공개 회원 프로필 (D-133) */
.author-link { color: inherit; }
.author-link:hover { color: var(--c-primary); text-decoration: underline; }
.profile-head { display: flex; align-items: center; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--c-border); margin-bottom: 18px; }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--c-primary-soft); color: var(--c-primary-dark); font-weight: 800; font-size: 30px; }
.profile-meta h1 { margin: 0 0 4px; font-size: 22px; }
.level-badge { display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--c-primary-soft); color: var(--c-primary-dark); font-size: 12px; font-weight: 700; }
.profile-post-list { list-style: none; padding: 0; margin: 0; }
.profile-post-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--c-border-light); }
.profile-post-list .pp-title { font-weight: 600; }
.profile-post-list .pp-comments { color: var(--c-primary); font-weight: 700; margin-left: 4px; }
.profile-post-list .pp-meta { flex: none; font-size: 12px; white-space: nowrap; }

.vote-bar { display: flex; gap: 8px; align-items: center; margin: 4px 0 16px; flex-wrap: wrap; }
.like-count { color: var(--c-primary); font-size: 12px; margin-left: 4px; }
.notice-row { background: var(--c-primary-soft); }

.report-box summary, .report-box-sm summary { cursor: pointer; }
.report-box-sm { display: inline; font-size: 12px; color: var(--c-muted); }
.report-box-sm .report-form { display: inline; }
.report-box-sm input[type="text"] { width: 140px; padding: 4px 8px; font-size: 12px; border: 1px solid var(--c-border); border-radius: 6px; background: var(--c-surface); color: var(--c-text); }
.report-form { margin-top: 6px; }
.report-form input[type="text"] { display: inline-block; width: 280px; max-width: 60vw; }

.message-item { padding: 14px 10px; border-bottom: 1px solid var(--c-border-light); }
.message-item.unread { background: var(--c-primary-soft); }
.message-meta { font-size: 13px; color: var(--c-muted); display: flex; gap: 10px; align-items: center; }
.form-checks { margin-bottom: 12px; }
.faq-item { border-bottom: 1px solid var(--c-border-light); padding: 12px 4px; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.move-form select { padding: 6px 10px; font-size: 13px; width: auto; }
.reply-arrow-inline { color: var(--c-muted); }
mark { background: #fef08a; padding: 0 3px; border-radius: 3px; }

.banner-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.banner-row img { max-height: 90px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.poll-box { border: 1px solid var(--c-border-light); border-radius: var(--radius); padding: 8px 18px 14px; margin: 18px 0; background: var(--c-surface-2); }
.poll-item { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 14px; }
.poll-item > span:first-child { min-width: 120px; }
.poll-bar-bg { flex: 1; background: var(--c-border-light); border-radius: var(--radius-pill); height: 16px; overflow: hidden; }
.poll-bar { background: var(--c-primary); height: 100%; border-radius: var(--radius-pill); }
.popup-layer { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 100; align-items: center; justify-content: center; }
.popup-inner { background: var(--c-surface); color: var(--c-text); border-radius: var(--radius); max-width: 480px; width: 90%; max-height: 80vh; overflow-y: auto; padding: 24px; box-shadow: var(--shadow-lg); }

/* ── 블로그 스킨 (D-037) ───────────────────────────── */
.blog-layout { display: grid; grid-template-columns: 1fr 250px; gap: 32px; align-items: start; }
.blog-main { min-width: 0; }
.blog-card { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--c-border-light); }
.blog-card .blog-cover { flex: 0 0 210px; }
.blog-card .blog-cover img { width: 210px; height: 140px; object-fit: cover; border-radius: var(--radius); display: block; box-shadow: var(--shadow-sm); }
.blog-card-body { min-width: 0; }
.blog-card-title { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.35; font-weight: 700; }
.blog-card-title a { color: var(--c-text); text-decoration: none; }
.blog-card-title a:hover { color: var(--c-primary); }
.blog-excerpt { margin: 0 0 10px; color: var(--c-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-meta { font-size: 0.85rem; color: var(--c-muted); }
.blog-sidebar .tag-cloud { background: var(--c-surface); border: 1px solid var(--c-border-light); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.blog-sidebar .tag-cloud h3 { margin: 0 0 12px; font-size: 1rem; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: var(--radius-sm); background: var(--c-coral-bg); border: 1px solid var(--c-coral-soft); color: var(--c-coral); font-size: 0.85rem; text-decoration: none; transition: all .15s ease; }
.tag-chip:hover { background: var(--c-coral); color: #2a0e06; border-color: var(--c-coral); }
.tag-chip .tag-count { color: var(--c-coral-soft); font-size: 0.78rem; }
.tag-chip:hover .tag-count { color: #2a0e06; }
.tag-filter { color: var(--c-muted); margin-bottom: 16px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.post-nav { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0; padding-top: 18px; border-top: 1px solid var(--c-border); font-size: 0.95rem; }
.post-nav a { color: var(--c-primary); text-decoration: none; }
.post-nav-next { text-align: right; margin-left: auto; }
.related { margin: 30px 0; }
.related h3 { margin: 0 0 14px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.related-card { text-decoration: none; color: var(--c-text); }
.related-card img { width: 100%; height: 105px; object-fit: cover; border-radius: var(--radius-sm); display: block; margin-bottom: 6px; box-shadow: var(--shadow-sm); }
.related-title { font-size: 0.9rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 720px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-card { flex-direction: column; }
  .blog-card .blog-cover, .blog-card .blog-cover img { width: 100%; flex-basis: auto; }
}

/* ── 위키 (D-038) ───────────────────────────── */
.wiki-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--c-border); padding-bottom: 14px; }
.wiki-title { margin: 0; }
.wiki-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wiki-actions form.inline { margin: 0; }
.wiki-content { line-height: 1.85; font-size: 15.5px; }
.wiki-content a.wiki-link { color: var(--c-primary); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--c-primary) 40%, transparent); }
.wiki-content a.wiki-link:hover { border-bottom-color: var(--c-primary); }
.wiki-content a.wiki-link.new { color: var(--c-danger); border-bottom-color: color-mix(in srgb, var(--c-danger) 45%, transparent); }
.wiki-meta { color: var(--c-muted); font-size: 0.85rem; margin: 18px 0; }
.wiki-backlinks { margin-top: 24px; padding: 16px 18px; background: var(--c-surface-2); border: 1px solid var(--c-border-light); border-radius: var(--radius); }
.wiki-backlinks h3 { margin: 0 0 8px; font-size: 0.95rem; }
.wiki-backlinks ul { margin: 0; padding-left: 18px; }
.wiki-layout { display: grid; grid-template-columns: 1fr 290px; gap: 32px; align-items: start; }
.wiki-all { background: var(--c-surface); border: 1px solid var(--c-border-light); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.wiki-all h2 { font-size: 1rem; margin: 0 0 10px; }
.wiki-page-list { margin: 0; padding-left: 18px; max-height: 70vh; overflow: auto; }
.wiki-page-list li { margin: 5px 0; }
.wiki-tools { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; }
/* ── 에러 페이지 (404/500/503 등) ── */
.error-page { max-width: 560px; margin: 12vh auto; padding: 0 24px; text-align: center; }
.error-code { font-family: var(--font-display); font-size: 96px; font-weight: 400; line-height: 1; letter-spacing: -.04em; color: var(--c-ink); }
.error-title { font-family: var(--font-display); font-size: 24px; font-weight: 500; margin: 12px 0 6px; }
.error-msg { color: var(--c-muted); margin: 0 0 22px; }
.error-actions { display: flex; gap: 8px; justify-content: center; }

/* 재사용 검색 바 (위키/상점 등 공개 검색 입력) */
.wiki-search, .search-bar { display: flex; gap: 8px; }
.wiki-search input, .search-bar input { width: 220px; max-width: 100%; padding: 8px 12px; font-size: 14px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); color: var(--c-text); }
.wiki-search input:focus, .search-bar input:focus { outline: none; border-color: var(--c-form-focus); box-shadow: var(--ring-input); }
.rev-badge { font-size: 0.7em; color: var(--c-muted); vertical-align: middle; }
@media (max-width: 720px) { .wiki-layout { grid-template-columns: 1fr; } }

/* ── 관리자 목록 공통: 검색 + 페이지네이션 (D-043) ── */
.admin-search { display: flex; gap: 8px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
.admin-search input[type="text"] { min-width: 220px; width: auto; margin-top: 0; }
.admin-search select { width: auto; margin-top: 0; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.pager-info { color: var(--c-muted); font-size: 13px; padding: 0 8px; }
.pager .page-num { min-width: 34px; text-align: center; }
.pager .page-num.active { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); cursor: default; pointer-events: none; }

/* ── .form 밖의 입력 요소 외형 일반화 (D-053) ──
   테이블 인라인 편집(groups/menus/posts/shop_orders)·WAF 폼(.form-block)·admin-search의 select 등.
   width는 강제하지 않아 인라인 셀(택배사/송장/순서 등 inline 폭)을 깨지 않는다. 체크박스는 제외. */
.list-table input[type="text"], .list-table input[type="number"], .list-table input[type="email"], .list-table select,
.admin-search select,
.form-block input[type="text"], .form-block input[type="number"], .form-block input[type="email"], .form-block select, .form-block textarea {
  padding: 7px 10px; font-size: 14px; font-family: inherit; line-height: 1.3; vertical-align: middle;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: var(--c-surface); color: var(--c-text); max-width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.list-table input[type="text"]:focus, .list-table input[type="number"]:focus, .list-table input[type="email"]:focus, .list-table select:focus,
.admin-search select:focus,
.form-block input:focus, .form-block select:focus, .form-block textarea:focus {
  outline: none; border-color: var(--c-form-focus); box-shadow: var(--ring-input);
}
/* WAF 등 .form 아닌 블록 폼 레이아웃 */
.form-block .field { margin-bottom: 14px; }
.form-block .field > label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 600; }
.form-block .field > label small { font-weight: 400; color: var(--c-muted); }
.form-block input[type="text"] { width: 100%; max-width: 480px; }
.form-block .checkbox { font-weight: 400; display: flex; align-items: center; gap: 7px; margin: 6px 0; }
.form-block .checkbox input { width: auto; display: inline; margin: 0; }
.form-block .field textarea { width: 100%; max-width: 640px; }

/* 게시물 요약(TL;DR, D-110 P2) — 본문 위 한 줄 요약 박스 */
.post-summary { margin: 14px 0 18px; padding: 12px 14px; border-left: 3px solid var(--c-primary); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--c-primary) 6%, var(--c-surface)); font-size: 15px; }
.post-summary strong { margin-right: 6px; }

/* ── GEO — AI 크롤러 정책 (D-110) ── */
.geo-cat { border: 1px solid var(--c-border-light); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; background: var(--c-surface); }
.geo-cat legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.geo-cat > .desc { margin: 2px 0 8px; font-size: 13px; }
.geo-cat .checkbox small { color: var(--c-muted); }
.geo-preview { padding: 12px 14px; border: 1px solid var(--c-border-light); border-radius: var(--radius); background: var(--c-surface); font-size: 13px; line-height: 1.5; overflow-x: auto; }

/* ── 그룹/권한 관리 (D-048) ── */
.role-card { border: 1px solid var(--c-border-light); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; background: var(--c-surface); box-shadow: var(--shadow-sm); }
.role-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.role-head input { display: inline-block; width: auto; margin-top: 0; vertical-align: middle; }
.role-head label { display: inline-flex; align-items: center; gap: 6px; }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 14px; margin: 8px 0; }
.role-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ── 자동 등업 (D-058) ── */
.inline-rule { display: inline-flex; gap: 6px; align-items: center; margin: 0 4px 0 0; }
.inline-rule input, .inline-rule select { margin-top: 0; }
ul.promo-progress { list-style: none; padding: 0; margin: 8px 0; }
ul.promo-progress li { padding: 6px 10px; margin-bottom: 4px; border-radius: var(--radius); background: var(--c-surface); border: 1px solid var(--c-border-light); }
ul.promo-progress li.met { border-color: var(--c-primary); background: color-mix(in srgb, var(--c-primary) 8%, var(--c-surface)); }

/* ── 트리(드롭다운) 메뉴 (D-050) ── */
.main-menu .menu-item { position: relative; display: inline-block; margin-right: 16px; }
.main-menu .menu-item > a { margin: 0; }
.main-menu .menu-item .caret { font-size: 10px; opacity: .7; }
.main-menu .submenu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 168px;
  background: var(--c-surface); border: 1px solid var(--c-border-light); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 200;
}
/* 상위 메뉴와 서브메뉴 사이 6px 틈을 투명 브릿지로 메워 hover 끊김 방지 */
.main-menu .submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.main-menu .submenu a { display: block; margin: 0; padding: 8px 12px; color: var(--c-text); white-space: nowrap; border-radius: 7px; }
.main-menu .submenu a:hover { background: var(--c-surface-2); color: var(--c-primary); }
.main-menu .menu-item.has-sub:hover .submenu,
.main-menu .menu-item.has-sub:focus-within .submenu { display: block; }

/* 관리 메뉴 트리 행 (D-050) */
.list-table tr.menu-child td { background: var(--c-surface-2); }
/* 메뉴 순서 칸: ↑/↓ 버튼 + 숫자 입력을 한 줄로(.num의 width:64px 줄바꿈 방지) */
.list-table td.menu-order { white-space: nowrap; }
.list-table td.menu-order form { margin: 0; }
.list-table td.menu-order .btn-sm { padding: 4px 9px; }
.list-table td.menu-order input[type="number"] { width: 48px; margin-top: 0; vertical-align: middle; }
.muted { color: var(--c-muted); }

/* ── 관리자 헤더(브랜드 + 카테고리 드롭다운 메뉴 + 계정) 한 줄 통합 (D-052) ── */
.admin-header { background: var(--c-admin-band); color: #fff; position: sticky; top: 0; z-index: 60; }
.admin-header-inner { display: flex; align-items: center; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.admin-brand { color: #fff; font-family: var(--font-display); font-weight: 500; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; }
.admin-brand span { font-weight: 500; font-size: 12px; opacity: .7; margin-left: 2px; }
.admin-brand:hover { color: #fff; text-decoration: none; opacity: .92; }

/* 카테고리 드롭다운 메뉴바 (.admin-menu — messages.html의 .admin-nav와 분리) */
.admin-menu { display: flex; align-items: center; gap: 2px; flex: 1; flex-wrap: wrap; }
.admin-menu-item { position: relative; }
.admin-menu-item > a, .admin-menu-label {
  display: inline-block; color: #fff; font-size: 14px; font-weight: 500; line-height: 1.2;
  padding: 7px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap;
  transition: background .12s ease;
}
.admin-menu-item > a:hover, .admin-menu-label:hover,
.admin-menu-item.has-drop:hover .admin-menu-label,
.admin-menu-item.has-drop:focus-within .admin-menu-label { background: rgba(255,255,255,.16); color: #fff; text-decoration: none; }
.admin-menu-label .caret { font-size: 9px; opacity: .8; margin-left: 2px; }
.admin-drop {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 168px;
  background: var(--c-surface); border: 1px solid var(--c-border-light); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 200;
}
.admin-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.admin-drop a { display: block; padding: 8px 12px; color: var(--c-text); font-size: 13.5px; border-radius: 7px; white-space: nowrap; }
.admin-drop a:hover { background: var(--c-surface-2); color: var(--c-primary); text-decoration: none; }
.admin-menu-item.has-drop:hover .admin-drop,
.admin-menu-item.has-drop:focus-within .admin-drop { display: block; }

.admin-top { display: flex; align-items: center; gap: 14px; font-size: 13.5px; white-space: nowrap; margin-left: auto; }
.admin-top a { color: #fff; opacity: .85; }
.admin-top a:hover { color: #fff; opacity: 1; text-decoration: none; }
.admin-who { color: #fff; font-weight: 600; }

/* ── 소셜 로그인 (D-087/D-088) — 제공자 브랜드 버튼 + 프로필 연결 목록 ── */
.social-login { margin-top: 20px; padding-top: 4px; }
.social-login .auth-alt { margin-bottom: 10px; }
.btn.social-btn { font-weight: 600; }
.social-login .social-btn + .social-btn { margin-top: 8px; }
/* 카카오/네이버는 공식 브랜드 색(고정값 — 테마와 무관), 구글은 공식 라이트 버튼 규격 */
.btn.social-kakao { background: #fee500; border-color: #fee500; color: #191919; }
.btn.social-kakao:hover { background: #f2d900; border-color: #f2d900; color: #191919; }
.btn.social-naver { background: #03c75a; border-color: #03c75a; color: #fff; }
.btn.social-naver:hover { background: #02b351; border-color: #02b351; color: #fff; }
.btn.social-google { background: #fff; border-color: var(--c-border); color: #3c4043; }
.btn.social-google:hover { background: #f8f9fa; border-color: var(--c-ink); color: #3c4043; }

/* 프로필 ▸ 소셜 로그인 연결 — 불릿 대신 카드 행 */
.social-identities { list-style: none; padding: 0; margin: 12px 0 14px; }
.social-identities li {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px; margin-bottom: 8px;
  border: 1px solid var(--c-border-light); border-radius: 12px; background: var(--c-surface);
}
.social-identities li form { margin-left: auto; }
.social-identities .date { color: var(--c-muted); font-size: 13px; }

/* ── 언어 전환 (D-093) — 공개/관리자 헤더 공용 ── */
.lang-nav { display: inline-flex; gap: 6px; align-items: center; margin-left: 10px; }
.lang-nav .lang-link { font-size: 11px; letter-spacing: .04em; opacity: .5; text-decoration: none; }
.lang-nav .lang-link.on { opacity: 1; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   편집형 컴포넌트 (D-234) — 파생 테마가 각자 다시 만들던 것을 코어로
   ------------------------------------------------------------
   파생 10종 감사 결과(docs/main-renewal/01-design-system.md §1): 섹션 머리말이 7번,
   사진 카드 그리드가 6번, 빈 상태가 5번 다시 만들어져 있었다. 특히 `.empty`는
   **코어에 있는데도** 5번 다시 만들어졌다 — 없어서가 아니라 있는 줄 몰라서다.
   그래서 승격과 함께 카탈로그(docs/design-preview/components.html)를 둔다.

   기존 클래스명은 하나도 바꾸지 않는다 — 추가만 한다. 파생 10종은 코드 변경 없이 그대로 뜬다.
   색은 전부 토큰(--c-accent 등)을 통하므로 테마가 톤을 바꾸면 함께 바뀐다.
   주석에 경로를 적을 때 별표를 쓰지 않는다 — 별표+슬래시가 주석을 끝내 :root가 통째로
   날아간 사고가 있었다(01-design-system.md §5). 경로는 themes/<id>/ 처럼 쓴다.
   ============================================================ */

/* ── 섹션 리듬 ──
   본문 최상위 `<section>` 사이에만 준다. 바깥 요소 선택자로 두면 댓글 목록·관련글처럼
   안쪽에 있는 section 까지 벌어지고, 그건 이미 자기 여백을 갖고 있다.
   `.duo` 안의 두 섹션은 나란히 서므로 위 여백을 지운다 — 안 그러면 좌우 높이가 어긋난다. */
main.container > section { margin-top: var(--section-gap); }
.duo > section { margin-top: 0; }
/* 헤더와의 간격은 --page-top 이 혼자 책임진다 — 첫 요소의 margin 에 맡기면 그게 h1 이냐 div 냐에
   따라 페이지마다 달라진다(실제로 0·6·28·34·60px 로 흩어져 있었다, D-245). */
main.container > :first-child { margin-top: 0; }

/* ── 섹션 머리말 — .fbanner .blog-masthead .mag-masthead .jobs-head .re-head .bk-h 를 대체 ── */
.section-head {
  display: flex; align-items: flex-end; gap: 16px;
  padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--c-ink);
}
.section-head.thin { border-bottom-color: var(--c-border); }
.section-title {
  font-family: var(--font-display); font-size: 19px; font-weight: 700;
  letter-spacing: -.02em; color: var(--c-ink); margin: 0;
}
.section-head.lead .section-title { font-size: 23px; }
.section-desc { font-size: 13px; color: var(--c-muted); margin: 0 0 2px; }
.section-more { margin-left: auto; font-size: 13px; color: var(--c-muted); white-space: nowrap; }
.section-more:hover { color: var(--c-accent); }
/* .kicker 는 이미 코어에 있다(여백만). 승격 컴포넌트가 쓰는 모노 소제목 성격을 여기서 부여한다 —
   기존 사용처는 안쪽 .mono-label 이 글꼴/색을 다시 선언하므로 보이는 변화가 없다. */
.kicker {
  display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--c-accent);
}

/* 그리드 칸은 기본 최소폭이 `auto` 라 내용보다 좁아지지 않는다 — 제목 한 줄이 길면
   칸이 부풀어 페이지가 가로로 스크롤된다. 승격 그리드의 칸은 전부 줄어들 수 있게 한다. */
.hero-split > *, .duo > *, .card-grid > *, .read-list > * { min-width: 0; }

/* ── 히어로 — 좌 커버 / 우 사이드 패널 2단 ── */
.hero-split { display: grid; grid-template-columns: 1.62fr 1fr; gap: 26px; margin-top: 34px; align-items: stretch; }

/* ── 커버 아트 — .mag-cover-art .bk-cv-art .sp-hero 를 대체 ── */
.cover {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius); background: #111;
}
.cover-art {
  width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: var(--ratio-hero);
  transition: transform .6s cubic-bezier(.2,.7,.3,1);
}
.cover[data-ratio="wide"] .cover-art { aspect-ratio: var(--ratio-wide); }
.cover:hover .cover-art { transform: scale(1.03); }
.cover-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,14,0) 30%, rgba(10,10,14,.6) 66%, rgba(10,10,14,.92) 100%);
}
.cover-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 32px; }
.cover-text .kicker { color: #8fe3c4; }
.cover-title {
  font-family: var(--font-serif); font-size: clamp(24px, 2.7vw, 34px); font-weight: 400;
  line-height: 1.15; letter-spacing: -.02em; color: #fff; margin: 9px 0; max-width: 19ch;
}
.cover-excerpt { font-size: 14.5px; line-height: 1.6; color: #d2d2da; margin: 0; max-width: 52ch; }
.cover-meta { display: block; margin-top: 12px; font-family: var(--font-mono); font-size: 12px; color: #9c9ca6; }

/* ── 순위 사이드 패널 — 히어로 우측(짧은 순위 목록 + 행동 버튼) ── */
.hot { display: flex; flex-direction: column; padding: 22px 24px; border-radius: var(--radius); background: var(--c-surface-2); }
.hot-head { display: flex; align-items: center; gap: 8px; padding-bottom: 13px; margin-bottom: 4px; border-bottom: 1px solid var(--c-border); }
.hot-head h2 { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--c-ink); margin: 0; }
.hot-head .live { width: 6px; height: 6px; border-radius: 50%; background: var(--c-danger); box-shadow: 0 0 0 3px rgba(179,0,0,.14); }
.hot-head a { margin-left: auto; font-size: 12px; color: var(--c-muted); }
.hot-item { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--c-border-light); }
.hot-item:last-of-type { border-bottom: 0; }
.hot-item > span:last-child { display: block; min-width: 0; }
.hot-rank { flex: none; width: 13px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--c-accent); }
.hot-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--c-ink);
}
.hot-item:hover .hot-title { color: var(--c-accent); }
.hot-meta { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 11.5px; color: var(--c-muted); }
.hot-cta { margin-top: auto; padding-top: 16px; }

/* ── 카드 그리드 — .mag-grid .re-grid .gallery .bk-shelf .rsv-card 를 대체 ──
   한 칸의 최소폭은 --card-min. 인라인 style 로 칸마다 다르게 줄 수 있다. */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); gap: 26px 22px; }
.card-grid.cols-2 { grid-template-columns: 1fr 1fr; }

/* ── 카드 — .mag-card .re-card .gallery-card .bk-card 를 대체 ──
   자식이 전부 <span>(카드 전체가 <a> 라서)이므로 display:block 을 반드시 준다.
   빠뜨리면 "제목 발췌 가격"이 한 줄로 이어져 붙는다. */
.card { display: block; }
.card-media {
  display: block; position: relative; overflow: hidden; margin-bottom: 11px;
  border-radius: var(--radius-sm); background: var(--c-surface-2);
}
.card-media img {
  width: 100%; aspect-ratio: var(--ratio-card); object-fit: cover;
  transition: transform .45s cubic-bezier(.2,.7,.3,1);
}
.card:hover .card-media img { transform: scale(1.045); }
.card[data-ratio="book"] .card-media img { aspect-ratio: var(--ratio-book); }
.card[data-ratio="square"] .card-media img { aspect-ratio: var(--ratio-square); }
.card[data-ratio="wide"] .card-media img { aspect-ratio: var(--ratio-wide); }
.card-title {
  display: block; margin: 6px 0 5px; font-size: 15.5px; font-weight: 600;
  line-height: 1.34; letter-spacing: -.01em; color: var(--c-ink); transition: color .15s ease;
}
.card:hover .card-title { color: var(--c-accent); }
.card-excerpt { display: block; margin: 0 0 5px; font-size: 13.5px; line-height: 1.55; color: var(--c-text); }
/* 메타는 본문 글꼴 — 모노는 좁은 카드에서 줄바꿈된다 */
.card-meta { display: block; font-size: 11.8px; line-height: 1.45; color: var(--c-muted); }
.card.editorial .card-title { font-family: var(--font-serif); font-size: 17.5px; font-weight: 400; line-height: 1.28; }
/* 사진만 있는 카드(캡션이 곧 제목) — 미디어 아래 여백이 필요 없다 */
.card.media-only .card-media { margin-bottom: 0; }
/* 사진 위 캡션(갤러리) — 캡션이 곧 제목인 경우 .card-title 대신 쓴다 */
.card-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 10px 8px;
  background: linear-gradient(180deg, transparent, rgba(10,10,14,.8));
  color: #fff; font-size: 11.5px; font-weight: 500; line-height: 1.3;
}
/* 미디어 위 배지 — 코어 .badge(연녹 알약)를 카드 안에서만 오버레이로 되돌린다.
   바깥의 .badge 사용처(글 목록·스튜디오 등 70여 곳)는 그대로다. */
.card-media .badge {
  position: absolute; top: 9px; left: 9px; padding: 3px 8px;
  font-family: var(--font-body); font-size: 10.5px; font-weight: 600; letter-spacing: 0;
  background: rgba(10,10,14,.78); color: #fff; backdrop-filter: blur(4px);
}
.card-media .badge.accent { background: var(--c-accent); }
/* 가격/수치 강조 — .shop-price .re-price 를 대체 */
.price {
  display: block; font-family: var(--font-mono); font-size: 13.5px; font-weight: 700;
  color: var(--c-ink); font-variant-numeric: tabular-nums;
}
.price s { margin-right: 4px; font-size: 11.5px; font-weight: 400; color: var(--c-muted); }

/* ── 리스트 행 — .fthread .job-card .blog-item 을 대체 ── */
.row-list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--c-border-light); }
.row:last-child { border-bottom: 0; }
.row:hover .row-title { color: var(--c-accent); }
.row-rank { flex: none; width: 18px; text-align: center; font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--c-border); }
.row:nth-child(-n+3) .row-rank { color: var(--c-accent); }
.row-avatar {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--radius-pill); background: var(--c-surface-2);
  font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--c-muted);
}
.row-main { flex: 1; min-width: 0; }
.row-title {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14.6px; font-weight: 500; color: var(--c-ink); transition: color .15s ease;
}
.row-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; font-size: 11.8px; color: var(--c-muted); }
/* 행 안의 분류 꼬리표 — 코어 .cat(코랄 카테고리 탭)과 이름이 겹치므로 행 안에서만 눌러 쓴다 */
.row-meta .cat {
  display: inline-block; padding: 1px 6px; border: 0; border-radius: var(--radius-xs);
  background: var(--c-surface-2); font-size: 11px; font-weight: 600; color: var(--c-muted);
}
.row-meta .dot { opacity: .4; }
.row-stat { flex: none; text-align: right; font-family: var(--font-mono); font-size: 11.5px; color: var(--c-muted); }
.row-stat b { display: block; font-size: 13.5px; font-weight: 700; color: var(--c-danger); }
.row.compact { gap: 11px; padding: 10px 2px; }
.row.compact .row-title { font-size: 14px; }
.row.compact .row-stat { font-size: 11px; }

/* ── 읽을거리 리스트 — .blog-item .blog-thumb 를 대체 ──
   사진이 있지만 주가 아닐 때. 카드 그리드와의 차이는 이미지 면적이다 —
   큰 커버 아래에서 또 사진 그리드를 깔면 이미지가 겹쳐 화면을 먹는다(02-home.md §2). */
.read-list { display: grid; grid-template-columns: 1fr; }
.read-list.cols-2 { grid-template-columns: 1fr 1fr; column-gap: 36px; }
.read-item { display: flex; gap: 14px; align-items: flex-start; padding: 13px 2px; border-bottom: 1px solid var(--c-border-light); }
.read-thumb { flex: none; width: 96px; height: 64px; overflow: hidden; border-radius: var(--radius-xs); background: var(--c-surface-2); }
.read-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2,.7,.3,1); }
.read-item:hover .read-thumb img { transform: scale(1.07); }
.read-main { display: block; min-width: 0; padding-top: 1px; }
.read-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 3px 0 4px; font-family: var(--font-serif); font-size: 15.5px;
  line-height: 1.34; letter-spacing: -.01em; color: var(--c-ink); transition: color .15s ease;
}
.read-item:hover .read-title { color: var(--c-accent); }
.read-meta { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--c-muted); }
.read-item .kicker { font-size: 10px; letter-spacing: .11em; }

/* ── 칩 줄 — .jobs-chips .re-chips .cat-tabs 를 대체 ──
   기존 두 테마는 .re-chips .chip 처럼 한 단계 안쪽에서 선언하므로 이 규칙을 계속 이긴다. */
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { padding: 5px 13px; border: 1px solid var(--c-border); border-radius: var(--radius-pill); background: var(--c-surface); font-size: 12.5px; color: var(--c-muted); }
.chip:hover { border-color: var(--c-ink); color: var(--c-ink); text-decoration: none; }
.chip.on { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }

/* ── 배너 띠 — 운영자 등록 배너의 큰 배치 ──
   기존 .banner-row(상단 작은 띠)는 그대로 둔다. 이건 같은 banners 데이터의 다른 배치다.
   운영자 업로드 이미지는 비율을 알 수 없다 → 비율이 아니라 높이를 고정하고 cover 로 채운다.
   비율로 잡으면 1장일 때 화면 절반을 먹는다. */
.banner-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px;
  margin-top: var(--section-gap); padding-top: 26px; border-top: 1px solid var(--c-border-light);
}
.banner { display: block; position: relative; height: 132px; overflow: hidden; border-radius: var(--radius-sm); background: var(--c-surface-2); }
.banner img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.2,.7,.3,1); }
.banner:hover img { transform: scale(1.04); }
.banner-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 11px;
  background: linear-gradient(180deg, transparent, rgba(10,10,14,.78));
  color: #fff; font-size: 13px; font-weight: 600;
}

/* ── 2단 병렬 (레이아웃 유틸) — 사이드바 없이 두 섹션을 같은 급으로 나란히 ── */
.duo { display: grid; gap: 44px; align-items: start; }
.duo.wide-left { grid-template-columns: 1.75fr 1fr; }
.duo.even { grid-template-columns: 1fr 1fr; }

@media (max-width: 940px) {
  .hero-split, .duo.wide-left, .duo.even { grid-template-columns: 1fr; }
  .duo { gap: var(--section-gap); }
  .read-list.cols-2 { grid-template-columns: 1fr; }
  .card-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .cover-text { padding: 20px; }
  .banner { height: 112px; }
}

/* ── 관리자: 언어별 입력 (D-244) ──
   기본 언어는 원래 칸이 담당하고, 나머지 언어만 아래에 작게 붙는다. 두 곳에 같은 값을
   두면 어느 쪽이 진짜인지 알 수 없으므로 기본 언어 칸은 만들지 않는다. */
.tr-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.tr-lang {
  flex: none; width: 26px; font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .06em; color: var(--c-muted); text-align: right;
}
.tr-row input { margin-top: 0 !important; font-size: 13px; }
.tr-set { border: 1px solid var(--c-border-light); border-radius: var(--radius-sm); padding: 10px 14px 4px; margin: 10px 0; }
.tr-set legend { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--c-accent); padding: 0 6px; }

/* ── SNS 홍보 발행 (D-253) — 캘린더·미리보기·점검 ──
   홈이 목록이 아니라 캘린더인 이유는 docs/SOCIAL-PUBLISHING.md §4-1:
   "무엇이 있나"가 아니라 "언제가 비었나"에 답해야 한다. 그래서 빈 칸을 눈에 띄게 하고,
   실패는 별도 화면이 아니라 그 날짜 칸에 점으로 찍는다.
   ※ 폼/표/버튼은 관리자 공통 클래스(.form/.list-table/.btn)를 그대로 쓴다 — 여기서 다시 만들지 않는다. */
.social-cal { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; margin: 16px 0 24px; }
.social-wh { background: var(--c-surface-2); padding: 7px 10px; font-size: 12px; font-weight: 600; color: var(--c-muted); border-bottom: 1px solid var(--c-border); border-right: 1px solid var(--c-border-light); }
.social-wh:nth-child(7) { border-right: 0; }
.social-day { min-height: 132px; padding: 9px 8px; border-right: 1px solid var(--c-border-light); border-bottom: 1px solid var(--c-border-light); }
.social-day:nth-child(7n) { border-right: 0; }
/* 빈 날은 아주 옅은 채움으로만 — 빗금이 진하면 캘린더 전체가 회색으로 읽힌다 */
.social-day.is-empty { background: var(--c-surface-2); }
.social-daynum { font-family: var(--font-mono); font-size: 11px; color: var(--c-muted); margin-bottom: 7px; }
.social-day.is-today .social-daynum { color: var(--c-ink); font-weight: 700; }
.social-ev { display: block; border: 1px solid var(--c-border-light); border-left: 3px solid var(--c-border); border-radius: var(--radius-xs); padding: 5px 7px; margin-bottom: 5px; font-size: 12px; line-height: 1.45; background: var(--c-surface); }
.social-ev:hover { border-color: var(--c-ink); text-decoration: none; }
.social-ev.is-done { border-left-color: var(--c-green); }
.social-ev.is-scheduled, .social-ev.is-publishing { border-left-color: var(--c-blue); }
.social-ev.is-failed { border-left-color: var(--c-danger); background: #fef2f2; }
.social-evtime { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--c-muted); }
.social-evch { display: block; font-size: 10px; color: var(--c-muted); margin-top: 2px; }
.social-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c-danger); margin-left: 3px; vertical-align: middle; }
.social-addhint { display: block; border: 1px dashed var(--c-border); border-radius: var(--radius-xs); text-align: center; font-size: 11.5px; color: var(--c-muted); padding: 6px; background: var(--c-surface); }
.social-addhint:hover { border-color: var(--c-ink); color: var(--c-ink); text-decoration: none; }

/* 작성 화면 — 폼과 미리보기를 나란히. 미리보기는 접어두지 않는다(§16). */
.social-compose { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr); gap: 26px; align-items: start; }
.social-side { border-left: 1px solid var(--c-border-light); padding-left: 24px; }
.social-side h2 { margin-top: 0; }
.social-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.social-pv { border: 1px solid var(--c-border-light); border-radius: var(--radius-sm); overflow: hidden; background: var(--c-surface); }
.social-pv.is-over { border-color: var(--c-danger); }
.social-pvh { background: var(--c-surface-2); padding: 6px 10px; font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--c-border-light); }
.social-pvb { padding: 10px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.social-pvf { border-top: 1px solid var(--c-border-light); padding: 5px 10px; font-family: var(--font-mono); font-size: 11px; color: var(--c-muted); }
.social-sent { background: var(--c-surface-2); }
.social-body-card { border: 1px solid var(--c-border-light); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; }
.social-mask { font-family: var(--font-mono); color: var(--c-muted); letter-spacing: .08em; }

/* 발행 전 점검 — 경고이지 차단이 아니다(§11-4). 그래서 붉은 금지색을 쓰지 않는다. */
.social-checks { list-style: none; padding: 0; margin: 8px 0 20px; }
.social-checks li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 13px; line-height: 1.55; }
.social-checks .social-checkicon { font-family: var(--font-mono); font-weight: 700; flex-shrink: 0; }
.social-checks li.is-ok .social-checkicon { color: var(--c-green); }
.social-checks li.is-warn { color: #7a4a00; }
.social-checks li.is-warn .social-checkicon { color: #b06a00; }

/* 실패 배지 — 기존 .badge(연녹 알약)의 modifier라 다른 70여 곳에는 영향이 없다 */
.badge.is-fail { background: #fef2f2; color: var(--c-danger-dark); }

/* 월간 뷰 — 칸이 6주까지 늘어나므로 높이를 줄이고 표시를 성기게 한다.
   열 수(7)와 색 규칙은 주간과 공유한다: 같은 화면에서 두 뷰의 의미가 달라지면 안 된다. */
.social-cal.is-month .social-day { min-height: 92px; padding: 6px 5px; }
.social-cal.is-month .social-daynum { margin-bottom: 4px; }
.social-cal.is-month .social-ev { font-size: 11px; padding: 3px 5px; margin-bottom: 3px; line-height: 1.35; }
.social-cal.is-month .social-evtime { display: inline; margin-right: 3px; }
/* 앞뒤 달에서 물고 온 칸 — 흐리게 해서 "이 달이 아니다"를 한눈에 */
.social-cal.is-month .social-day.is-other { background: var(--c-surface-2); }
.social-cal.is-month .social-day.is-other .social-daynum { opacity: .45; }
.social-cal.is-month .social-day.is-other .social-ev { opacity: .6; }
/* 월간의 빈 칸 힌트는 글자 없이 + 만 — 42칸에 문구가 반복되면 격자가 글자로 뒤덮인다 */
.social-cal.is-month .social-addhint { padding: 3px; font-size: 12px; opacity: 0; transition: opacity .12s; }
.social-cal.is-month .social-day:hover .social-addhint { opacity: 1; }
/* 현재 보고 있는 주/달 표시 */
.social-calnow { font-family: var(--font-mono); font-size: 12.5px; color: var(--c-muted); margin-right: 4px; }

@media (max-width: 1000px) {
  .social-compose { grid-template-columns: 1fr; }
  .social-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--c-border-light); padding-top: 18px; }
}
@media (max-width: 860px) {
  .social-cal { grid-template-columns: 1fr; }
  .social-wh { display: none; }
  .social-day { min-height: auto; border-right: 0; }
}

/* AI 초안 3안 (D-253 §12) — 부르면 오는 도구라 기본 상태에서는 조용해야 한다.
   결과를 본문에 자동으로 넣지 않고 "이 안 쓰기"를 사람이 누르게 한다(§12-1). */
.social-ai { border: 1px solid var(--c-border-light); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; background: var(--c-surface-2); }
.social-aih { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13.5px; }
.social-aih .desc { margin: 0; font-size: 12px; }
.social-ai input[type="text"] { display: block; width: 100%; padding: 8px 11px; font-size: 13.5px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); font-family: inherit; }
.social-aibtns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.social-variants { display: grid; gap: 8px; margin-top: 10px; }
.social-var { border: 1px solid var(--c-border-light); border-radius: var(--radius-xs); background: var(--c-surface); padding: 9px 11px; }
.social-varh { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.social-varn { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--c-muted); }
.social-varlen { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--c-muted); }
.social-varb { font-size: 13px; line-height: 1.6; white-space: pre-wrap; margin-bottom: 8px; }
/* 근거에 없는 숫자 — 경고이지 차단이 아니다 */
.social-varwarn { font-size: 12px; color: #7a4a00; background: #fffbeb; border-radius: var(--radius-xs); padding: 5px 8px; margin-bottom: 8px; }

/* 체크박스·라디오 커스텀 디자인 (D-262) — SNS 마케팅 화면(.social-scope)에만 한정.
   사이트 전역은 브라우저 기본 컨트롤을 그대로 쓴다 — 사용자 요청으로 이 화면들만
   먼저 다듬는다. 나머지 화면(테이블 일괄선택 등)까지 넓히려면 여기 선택자를
   전역으로 바꾸면 되지만, 그건 별도 결정이다(D-261 후속 결정 3 참고).
   Tailwind/shadcn 은 쓰지 않는다 — 기존 손-CSS 관례(디자인 토큰 재사용)를 따른다. */
.social-scope input[type="checkbox"], .social-scope input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; flex: none; margin: 0; padding: 0;
  border: 1.5px solid var(--c-border); background: var(--c-surface);
  display: inline-grid; place-content: center; cursor: pointer; position: relative;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.social-scope input[type="checkbox"] { border-radius: var(--radius-xs); }
.social-scope input[type="radio"] { border-radius: 50%; }
.social-scope input[type="checkbox"]:hover, .social-scope input[type="radio"]:hover { border-color: var(--c-primary); }
.social-scope input[type="checkbox"]:checked, .social-scope input[type="radio"]:checked {
  background: var(--c-primary); border-color: var(--c-primary);
}
/* 체크 표시 — 아이콘 폰트 없이 회전한 테두리로 그린다(기존 코어 관례, SVG/폰트 추가 없음). */
.social-scope input[type="checkbox"]:checked::after {
  content: ""; width: 5px; height: 9px; margin-bottom: 2px;
  border: solid var(--c-on-primary); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.social-scope input[type="radio"]:checked::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-on-primary);
}
.social-scope input[type="checkbox"]:focus-visible, .social-scope input[type="radio"]:focus-visible {
  outline: none; box-shadow: var(--ring-input); border-color: var(--c-form-focus);
}
.social-scope .checkbox { font-weight: 400; display: flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 8px; }
.social-scope .checkbox:hover span { color: var(--c-primary); }
.social-scope .checkbox:last-child { margin-bottom: 0; }

/* 화면에서는 숨기고 스크린리더에는 읽히는 글자 (D-292) — Bootstrap 과 같은 이름이라 AdminLTE 테마에서도 같다 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* 표 안의 아이콘 링크 — 누를 자리를 넉넉히 */
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-sm); color: var(--c-muted, #667085); }
.icon-link:hover, .icon-link:focus-visible { background: var(--c-border-light); color: var(--c-primary, #2563eb); }
/* 관리자 글 상세 (D-292) */
.post-admin-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 18px; margin: 14px 0 18px; }
.post-admin-meta dt { font-size: 12px; color: var(--c-muted, #667085); }
.post-admin-meta dd { margin: 2px 0 0; font-weight: 500; }
.post-admin-body { border: 1px solid var(--c-border-light); border-radius: var(--radius-sm); padding: 18px; background: #fff; overflow-wrap: anywhere; }
.post-admin-body img { max-width: 100%; height: auto; }
.post-admin-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0; }
