/* glroo 디자인 시스템 — 웜화이트/잉크 베이스 + 시그니처 아쿠아(#15c6d9). 라이트/다크 의미 토큰. 자세한 철학은 DESIGN.md. */

:root {
  --font-display: "Pretendard Variable", Pretendard, sans-serif;
  --font-logo: "Outfit", var(--font-display);    /* 로고 워드마크 전용 */
  --font-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  --font-mono: "JetBrains Mono", "D2Coding", ui-monospace, SFMono-Regular, monospace;
}

:root, [data-theme="light"] {
  --bg: #FDFCF8;
  --surface: #FFFFFF;
  --surface-2: #f6f6f1;
  --border: #E7E5DC;
  --border-strong: #D6D3C8;
  --text-strong: #14171A;
  --text: #41464B;
  --text-muted: #676B71;
  --brand: #15c6d9;            /* 시그니처 아쿠아 — 채움·강조(버튼·보더·아이콘) */
  --brand-hover: #2FDCE8;      /* 채움 호버(더 깊은 아쿠아) */
  --brand-text: #0C7A86;       /* 텍스트·링크용 딥 아쿠아(흰 배경 AA 4.9:1, DESIGN.md §3.2) — 밝은 --brand은 흰 배경 텍스트로 2:1라 텍스트엔 이 딥 아쿠아 사용 */
  --brand-soft: #E2FBFD;       /* 아쿠아 틴트 배경 */
  --on-brand: #062A2E;         /* 아쿠아 버튼 위 잉크 텍스트 */
  --success: #0C7040;          /* 자기 틴트 칩 위에서도 AA로 읽히는 딥 톤 */
  --warning: #865D0E;
  --danger: #BE2026;
  --vote-down: #B8442D;        /* 아쿠아 추천과 구분되는 비추천 */
  --info: #2C5BBE; --info-soft: #E8F0FE;  /* 모더레이터 등 정보성 칩(아쿠아 브랜드와 구분) */
  --shadow-sm: 0 1px 2px rgba(16,18,20,.05);
  --shadow: 0 1px 2px rgba(16,18,20,.04), 0 8px 24px rgba(16,18,20,.07);
}

[data-theme="dark"] {
  --bg: #151515;
  --surface: #1E1E1F;
  --surface-2: #292A2B;
  --border: #353637;
  --border-strong: #4A4B4D;
  --text-strong: #FFFFFF;
  --text: #ECECEE;
  --text-muted: #A9ABB0;
  --brand: #15c6d9;
  --brand-hover: #7BF1F7;
  --brand-text: #15C6D9;       /* 검정 배경에선 시그니처 아쿠아가 텍스트로도 잘 읽힘 */
  --brand-soft: #103034;       /* 깊은 아쿠아 틴트 패널 */
  --on-brand: #062A2E;
  --success: #46C98A;
  --warning: #E0A52A;
  --danger: #F2555A;
  --vote-down: #F0855F;
  --info: #A8C8F4; --info-soft: color-mix(in srgb, #6AA0EA 22%, transparent);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.32);
}

/* ---- reset & base ---- */
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--text-strong); line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
img { max-width: 100%; }
button { font-family: inherit; }
/* 더블탭 확대 제스처 제거(불필요한 확대 인터랙션 차단) */
a, button, label, summary, .btn, .sorttabs__tab, .votebox__btn { touch-action: manipulation; }

::selection { background: var(--brand-soft); color: var(--brand-text); }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; border-radius: 6px; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 8px 16px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- icons ---- */
/* FontAwesome Jelly 글리프 — 크기는 font-size로(SVG 시절 width/height 대체) */
.icon { font-size: 1.05em; width: 1.1em; line-height: 1; flex-shrink: 0; vertical-align: -0.125em; }
.icon--lg { font-size: 1.25em; }

/* ---- topbar ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 20px; height: 64px;
}
.logo {
  font-family: var(--font-logo);
  font-weight: 400; font-size: 30px; color: var(--brand-text);
  letter-spacing: -0.04em; line-height: 1; white-space: nowrap;
}
/* glroo의 'oo' — 같은 폰트의 두 o를 letter-spacing으로 바짝 붙여 무한대(∞) 느낌.
   값(-0.14em)을 줄이면 더 붙고, 키우면 더 벌어진다. */
.logo__oo { letter-spacing: -0.14em; margin-left: -0.03em; }
.searchbar { flex: 1; max-width: none; position: relative; display: flex; align-items: center; }
.searchbar .icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 16px; width: 18px; vertical-align: 0;
  color: var(--text-muted); pointer-events: none;
}
/* input[type="search"]로 명시도를 높여 전역 폼 input 규칙(동일 명시도·후순위)보다 우선 */
.searchbar input[type="search"] {
  width: 100%; height: 40px; padding: 0 14px 0 40px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  /* 16px: 모바일 포커스 시 자동 확대 방지 */
  font-size: 16px; line-height: normal; transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
.searchbar input::placeholder { color: var(--text-muted); }
.searchbar input[type="search"]:focus { border-color: var(--brand-text); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; }
/* 브라우저 기본 검색 장식/취소 버튼 제거(아이콘 겹침 방지) */
.searchbar input::-webkit-search-decoration,
.searchbar input::-webkit-search-cancel-button,
.searchbar input::-webkit-search-results-button { -webkit-appearance: none; appearance: none; }
/* 모바일 검색: 데스크톱에선 아이콘 버튼·다이얼로그 숨김(인라인 검색바 사용), 모바일에선 반대 */
/* .topbar__actions 한정으로 명시도를 올려 뒤따르는 .btn{display:inline-flex}에 안 밀리게(데스크톱 숨김 보장) */
.topbar__actions .searchbtn { display: none; }
.searchdialog {
  position: fixed; top: 0; left: 0; right: 0; margin: 0;
  width: 100%; max-width: 100%; padding: 0; border: 0;
  background: var(--bg); color: var(--text);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
}
.searchdialog::backdrop { background: rgba(0,0,0,.42); }
.searchdialog[open] { animation: searchdialog-in .18s ease; }
@keyframes searchdialog-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.searchdialog__form {
  display: flex; align-items: center; gap: 10px;
  max-width: 1240px; margin: 0 auto; padding: 9px 14px; min-height: 56px;
}
.searchdialog__form .searchbar { flex: 1; max-width: none; }
.topbar__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
/* 헤더 컨트롤 높이·라운드를 검색바(높이 40 / radius 12)에 통일 — 검색바·글쓰기·아이콘·아바타가 한 줄에서 키가 딱 맞게. */
.topbar__actions .btn { height: 40px; border-radius: 12px; }
.topbar__actions .btn--icon { width: 40px; padding: 0; }
.topbar__actions .usermenu__trigger { padding: 3px; }
.topbar__actions .usermenu__trigger .avatar { width: 32px; height: 32px; }
.usermenu { position: relative; display: flex; align-items: center; }
.usermenu__trigger {
  border: 1px solid transparent; background: transparent; cursor: pointer; padding: 2px;
  border-radius: 50%; display: inline-flex; transition: border-color .14s, box-shadow .14s;
}
.usermenu__trigger:hover { border-color: var(--border-strong); }
.usermenu.is-open .usermenu__trigger { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.usermenu__dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 226px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 6px; z-index: 60;
  display: none; animation: menu-pop .14s ease;
}
.usermenu.is-open .usermenu__dropdown { display: block; }
@keyframes menu-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.usermenu__dropdown a, .usermenu__dropdown button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 12px; border-radius: 9px; font-size: 14px; font-weight: 500;
  color: var(--text); background: transparent; border: none; cursor: pointer; text-align: left;
}
.usermenu__dropdown a:hover, .usermenu__dropdown button:hover { background: var(--surface-2); color: var(--text-strong); text-decoration: none; }
.usermenu__dropdown .icon { color: var(--text-muted); width: 1.2em; }
.usermenu__head { padding: 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); border-radius: 9px 9px 0 0; }
.usermenu__id { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.usermenu__id strong { color: var(--text-strong); font-weight: 700; font-size: 14px; }
.usermenu__id .muted { font-size: 12.5px; }
.usermenu__sep { height: 1px; background: var(--border); margin: 6px 8px; }

/* ---- shell / 3-pane ---- */
.shell {
  max-width: 1240px; margin: 0 auto; padding: 26px 24px 56px;
  display: grid; grid-template-columns: 155px minmax(0, 1fr) 264px; gap: 15px;
  align-items: start;
}
.shell--narrow { grid-template-columns: minmax(0, 600px); justify-content: center; }
.main { min-width: 0; }

/* ---- sidebar (그룹/보드 내비 트리) ---- */
.sidebar { font-size: 14px; position: sticky; top: 88px; }
.sidebar nav { display: flex; flex-direction: column; gap: 1px; }

/* 링크 행 공통 — 홈·내 글루·보드 모두 같은 행 리듬 */
.sidebar__link {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 9px; line-height: 1.35;
  color: var(--text); font-weight: 500;
  transition: background .14s, color .14s;
}
.sidebar__link .icon { color: var(--text-muted); font-size: 1em; transition: color .14s; }
.sidebar__link:hover { background: var(--surface-2); color: var(--text-strong); }
.sidebar__link:hover .icon { color: var(--text); }
.sidebar__link.is-active { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.sidebar__link.is-active .icon { color: var(--brand-text); }

/* 카테고리 구분 라벨(예: 분야) — 작은 대문자 아이브로 */
.sidebar__eyebrow {
  margin: 10px 0 2px; padding: 0 10px;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .07em;
}

/* 그룹(IT·Design…) — 보드를 자식으로 묶는 섹션. 제목은 보드보다 진하게. */
.sidebar__group { margin-top: 12px; }
.sidebar__eyebrow + .sidebar__group,
.sidebar__eyebrow + .sidebar__solo { margin-top: 4px; }
.sidebar__title {
  display: flex; align-items: center;
  padding: 6px 10px; border-radius: 9px; font-size: 13.5px;
  color: var(--text-strong); font-weight: 600;
  transition: background .14s, color .14s;
}
.sidebar__title:hover { background: var(--surface-2); }
.sidebar__title.is-active { background: var(--brand-soft); color: var(--brand-text); }

/* 보드 목록 — 제목 아래 가이드 라인으로 묶어 트리 위계를 또렷하게 */
.sidebar__boards {
  display: flex; flex-direction: column; gap: 1px;
  margin: 2px 0 0 19px; padding-left: 9px;
  border-left: 1px solid var(--border-strong);
}
.sidebar__boards .sidebar__link { font-size: 13.5px; padding: 6px 10px; }

/* 단일 보드 그룹(공지사항·자유게시판) — 그룹 제목 격의 한 줄 섹션 링크 */
.sidebar__solo {
  display: flex; align-items: center; margin-top: 12px;
  padding: 6px 10px; border-radius: 9px; font-size: 13.5px;
  color: var(--text-strong); font-weight: 600;
  transition: background .14s, color .14s;
}
.sidebar__solo:hover { background: var(--surface-2); }
.sidebar__solo.is-active { background: var(--brand-soft); color: var(--brand-text); }

/* 즐겨찾는 보드 — 별 아이브로 + 보드 색 점으로 그룹 트리와 구분되는 개인 영역 */
.sidebar__eyebrow--fav { display: flex; align-items: center; gap: 6px; }
.sidebar__eyebrow--fav .icon { font-size: 11px; width: auto; color: var(--warning); }
.sidebar__fav { display: flex; flex-direction: column; gap: 1px; }
.sidebar__fav .sidebar__link { font-size: 13.5px; padding: 6px 10px; }
.sidebar__fav .huedot { width: 12px; height: 12px; border-radius: 4px; }

/* ---- context panel ---- */
.panel { font-size: 14px; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 20px; }
.panel__card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
.panel__title { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px; }
.panel__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; counter-reset: rank; }
.panel__list li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: baseline; }
.panel__list li::before { counter-increment: rank; content: counter(rank); font-family: var(--font-display); font-weight: 700; color: var(--brand-text); font-size: 13px; }
.panel__list a { color: var(--text-strong); font-weight: 500; line-height: 1.4; display: block; }
.panel__list a:hover { color: var(--brand-text); }
.panel__meta { display: block; font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 7px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 11px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap;
  background: transparent; color: var(--text); vertical-align: middle;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
/* 버튼 안 아이콘은 라벨과 같은 높이로 — 버튼 높이 일관성 보장 */
.btn .icon { font-size: 1em; }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); }
/* 경계선을 ~3:1로 — border-strong(1.5:1)만으로는 버튼 윤곽이 거의 안 보임. hover에서 --text-muted로 한 단계 더 또렷해짐 */
.btn--ghost { border-color: color-mix(in srgb, var(--text-muted) 62%, var(--border-strong)); color: var(--text-strong); background: var(--surface); }
.btn--ghost:hover { border-color: var(--text-muted); background: var(--surface-2); }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn--sm { padding: 5px 11px; font-size: 13px; border-radius: 9px; }
.btn--lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn--icon { padding: 9px; color: var(--text-strong); }
.btn--icon.btn--ghost { background: transparent; border-color: transparent; }
.btn--icon.btn--ghost:hover { background: var(--surface-2); }
.inline { display: inline; }

/* ---- chips & tags ---- */
.chip {
  display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px;
  background: var(--surface-2); font-size: 12.5px; color: var(--text); font-weight: 500;
}
a.chip:hover { color: var(--brand-text); text-decoration: none; }
.chip--brand { background: var(--brand-soft); color: var(--brand-text); }
.chip--type { background: transparent; border: 1px solid var(--border-strong); color: var(--text-muted); }
.chip--danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-weight: 600; }

.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.tag:hover { color: var(--brand-text); background: var(--brand-soft); text-decoration: none; }

/* ---- avatar ---- */
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: inline-flex; flex-shrink: 0; }
.avatar--sm { width: 26px; height: 26px; }
.avatar--lg { width: 88px; height: 88px; font-size: 34px; border-radius: 24px; }
.avatar--fallback {
  align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-text);
  font-family: var(--font-display); font-weight: 700;
}

.muted { color: var(--text-muted); font-weight: 400; }

/* ---- page head ---- */
.page-head { margin-bottom: 30px; }
.page-head__title { font-size: 27px; letter-spacing: -0.03em; }
.page-head__desc { color: var(--text-muted); margin-top: 7px; font-size: 15px; max-width: 60ch; }
.page-head__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand-text); }
.section-title { font-size: 17px; margin: 38px 0 16px; letter-spacing: -0.02em; }
.section-title:first-child { margin-top: 0; }

/* ---- sort tabs ---- */
.sorttabs { display: inline-flex; gap: 2px; background: var(--surface-2); border-radius: 11px; padding: 3px; }
.page-head .sorttabs { margin-top: 16px; }
.sorttabs__tab { padding: 6px 15px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--text-muted); transition: color .14s, background .14s; }
.sorttabs__tab:hover { color: var(--text-strong); text-decoration: none; }
.sorttabs__tab.is-active { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-sm); }
/* 토픽 탭(보드 내 태그 필터): 탭이 많을 수 있어 한 줄 pill 대신 줄바꿈 허용. */
.topictabs { display: flex; flex-wrap: wrap; width: 100%; }

/* ---- 홈: 보드 바로가기 nav ---- */
.groupnav { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 24px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.groupnav::-webkit-scrollbar { display: none; }
.groupnav__pill { flex: none; padding: 8px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--text-muted); background: var(--surface-2); white-space: nowrap; transition: color .14s, background .14s; }
.groupnav__pill:hover { color: var(--brand-text); text-decoration: none; }
.groupnav__pill.is-active { background: var(--brand-soft); color: var(--brand-text); }

/* ---- 홈 상단 랭킹 보드(인기·조회·최신 — 한국 커뮤니티식 제목 리스트). 데스크탑 2단 / 모바일 1단 ---- */
.rankboard { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
.rankcard { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.rankcard--latest, .rankcard--news { grid-column: 1 / -1; }
.rankcard__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.rankcard__title { font-size: 13.5px; font-weight: 700; color: var(--text-strong); display: inline-flex; align-items: center; gap: 8px; }
.rankcard__title .icon { color: var(--brand-text); font-size: 14px; }
.rankcard__more { font-size: 12px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex: none; }
.rankcard__more:hover { color: var(--brand-text); text-decoration: none; }
.rankcard__more .icon { font-size: 10px; }
.rankcard__list { list-style: none; margin: 0; padding: 0; }
.rankcard--latest .rankcard__list, .rankcard--news .rankcard__list { columns: 2; column-gap: 22px; }
.rankcard__item { display: flex; align-items: center; gap: 9px; padding: 4.5px 0; line-height: 1.4; font-size: 14px; }
.rankcard--latest .rankcard__item, .rankcard--news .rankcard__item { break-inside: avoid; }
/* 게시판 라벨 박스 — 순번 숫자 대신 "어느 게시판 글인지"를 색 박스로 표시. 색은 util.boardColorVars(보드별 고정) */
/* 채도는 calc(S * var(--bsat,1)) — 기본 1(유채색 그대로), --bsat:0이면 무채색(회색) */
.rankcard__board {
  flex: none; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2.5px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: -.01em;
  background: hsl(var(--bh), calc(70% * var(--bsat, 1)), 93%); color: hsl(var(--bh), calc(48% * var(--bsat, 1)), 37%); transition: filter .14s;
}
.rankcard__board:hover { text-decoration: none; filter: brightness(.96); }
[data-theme="dark"] .rankcard__board { background: hsl(var(--bh), calc(32% * var(--bsat, 1)), 21%); color: hsl(var(--bh), calc(68% * var(--bsat, 1)), 76%); }
/* 최신순·최신 뉴스는 2단이라 칼럼 폭이 좁다 — 박스를 줄이고 제목 최소폭을 둬 제목이 한 글자로 뭉개지지 않게 */
.rankcard--latest .rankcard__board, .rankcard--news .rankcard__board { max-width: 72px; }
.rankcard--latest .rankcard__ttl, .rankcard--news .rankcard__ttl { min-width: 56px; }
.rankcard__link { flex: 1; min-width: 0; color: var(--text); }
.rankcard__link:hover { color: var(--brand-text); text-decoration: none; }
.rankcard__link:hover .rankcard__ttl { text-decoration: underline; }
.rankcard__ttl { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rankcard__cmt { flex: none; font-size: 12px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; }
.rankcard__cmt .icon { font-size: 11px; }
.rankcard__metric { flex: none; font-size: 12px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rankcard__metric .icon { font-size: 11px; }
.rankcard__empty { font-size: 13px; color: var(--text-muted); padding: 6px 0; margin: 0; }
@media (max-width: 760px) {
  .rankboard { grid-template-columns: 1fr; gap: 12px; margin-bottom: 24px; }
  .rankcard--latest .rankcard__list, .rankcard--news .rankcard__list { columns: 1; }
}

/* ---- 피드 제목 행(제목 좌 · 정렬 우) — 홈·그룹·게시판 공용 ---- */
/* 랭킹 '더보기' → #feed 앵커 점프 시 sticky 토픽바(64px)에 가리지 않도록 여백 */
.feed-anchor { scroll-margin-top: 80px; }
.feedhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 0px 5px; }
.feedhead__title { min-width: 0; }
.feedhead .sorttabs { margin: 0; }
.feedhead--section { align-items: center; margin: 40px 0 18px; }
.feedhead--section .section-title { margin: 0; }
.feedhead__actions { display: flex; justify-content: flex-start; margin-top: 16px; }
/* 정렬 컬럼: Hot/New/Best + (Best일 때) Day·Week·Month */
.feedsort { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.subtabs { display: inline-flex; gap: 2px; background: var(--surface-2); border-radius: 9px; padding: 2px; }
.subtabs__tab { padding: 5px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); transition: color .14s, background .14s; }
.subtabs__tab:hover { color: var(--text-strong); text-decoration: none; }
.subtabs__tab.is-active { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-sm); }

/* ---- post card (카드 전체 클릭: stretched link) ---- */
.postlist { display: flex; flex-direction: column; gap: 2px; padding: 0px 5px; }
.postcard {
  position: relative;
  display: flex; gap: 16px; padding: 20px 16px;
  margin: 0 -16px;
  border-radius: 14px;
  transition: background .14s;
}
.postcard:hover { background: var(--surface-2); }
.postcard:first-child { margin-top: -4px; }
/* 카드 사이 구분선: radius와 충돌하던 border-bottom 대신, 좌우 inset된 직선.
   마지막 카드엔 긋지 않아 목록 끝의 떠 있는 밑줄을 없앤다. hover 시엔 배경에 묻혀 자연스럽게 사라진다. */
.postcard:not(:last-child)::before {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 0;
  height: 1px; background: var(--border); pointer-events: none;
  transition: opacity .14s;
}
.postcard:hover::before { opacity: 0; }
.postcard__body { flex: 1; min-width: 0; }
.postcard__top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 13px; color: var(--text-muted); }
/* 제목 링크를 카드 전체로 확장 — 본문/썸네일 어디를 눌러도 상세로 이동 */
.postcard__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
/* 카드 위에 얹히는 클릭 가능 요소(보드·태그·작성자)는 stretched link 위로 */
.postcard__board, .postcard__tags, .postcard__author { position: relative; z-index: 1; }
.postcard__board { color: var(--text-muted); font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.postcard__board:hover { color: var(--brand-text); }
.postcard__title { font-size: 17px; line-height: 1.35; margin-bottom: 6px; }
.postcard__title a { color: var(--text-strong); }
.postcard:hover .postcard__title a { color: var(--brand-text); }
.postcard__excerpt { font-size: 14px; color: var(--text-muted); line-height: 1.55; margin-bottom: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.postcard__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.postcard__meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.postcard__author { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 500; }
.postcard__author:hover { color: var(--brand-text); }
.metastat { display: inline-flex; align-items: center; gap: 5px; }
.metastat .icon { color: var(--text-muted); }
.postcard__thumb { flex-shrink: 0; width: 132px; height: 92px; border-radius: 12px; overflow: hidden; background: var(--surface-2); align-self: center; }
.postcard__thumb img { width: 100%; height: 100%; object-fit: cover; }

.loadmore { text-align: center; margin: 32px 0; }

/* ---- vote ---- */
.votebox { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border-radius: 11px; padding: 3px; }
.votebox--col { flex-direction: column; align-self: flex-start; }
.votebox__btn {
  border: none; background: transparent; cursor: pointer; color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; padding: 0; font-size: 16px;
  transition: background .14s, color .14s;
}
.votebox__btn:hover { background: var(--surface); color: var(--text-strong); }
.votebox__up.is-on { color: var(--brand-text); }
.votebox__down.is-on { color: var(--vote-down); }
.votebox__score { min-width: 22px; text-align: center; font-weight: 700; color: var(--text-strong); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.votebox--lg .votebox__btn { width: 34px; height: 34px; }

/* ---- post detail ---- */
.post__header { margin-bottom: 24px; }
.post__title { font-size: 32px; line-height: 1.2; margin: 12px 0 16px; letter-spacing: -0.03em; }
.post__meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); flex-wrap: wrap; }
.post__author { display: inline-flex; align-items: center; gap: 9px; color: var(--text-strong); font-weight: 600; }
.post__author:hover { color: var(--brand-text); }
.post__meta .levelbadge { margin-left: 0; }
.post__owner-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.post__cover { margin: 0 0 24px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.post__cover img { width: 100%; display: block; }
.post__ai-note { margin: 18px 0 0; font-size: 12.5px; color: var(--text-muted); }
.post__tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 24px 0; }

/* ---- 출처(참고 자료) ---- */
.sources { margin: 28px 0; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.sources__title { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; margin: 0 0 12px; }
.sources__title .icon { font-size: 13px; width: auto; color: var(--text-muted); }
.sources__list { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.sources__item { font-size: 14px; color: var(--text); line-height: 1.55; overflow-wrap: anywhere; }
.sources__item::marker { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sources__item a { color: var(--brand-text); font-weight: 500; }
.sources__item a:hover { text-decoration: underline; text-underline-offset: 2px; }
.sources__item a .icon { font-size: .82em; width: auto; color: var(--text-muted); vertical-align: -0.05em; }
.post__actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin: 28px 0;
}
.glue-btn.is-on, .pin-btn.is-on { border-color: var(--brand-text); color: var(--brand-text); background: var(--brand-soft); }
.glue-btn.is-on .icon, .pin-btn.is-on .icon { color: var(--brand-text); }

.workmeta {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; margin-bottom: 24px;
  display: grid; gap: 12px; font-size: 14px;
}
.workmeta__item { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.workmeta__label { font-weight: 600; color: var(--text-muted); min-width: 64px; font-size: 13px; }

/* ---- prose ---- */
.prose { max-width: 680px; font-size: 16.5px; line-height: 1.75; color: var(--text); overflow-wrap: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose h1, .prose h2 { margin: 32px 0 14px; font-size: 23px; }
.prose h3 { margin: 24px 0 10px; font-size: 19px; }
.prose p { margin: 16px 0; }
.prose a { color: var(--brand-text); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
/* @멘션 링크 — 일반 본문 링크와 구분되는 은은한 강조(밑줄 대신 배경 칩) */
.mention { color: var(--brand-text); font-weight: 600; text-decoration: none; background: var(--brand-soft); padding: 0 4px; border-radius: 5px; }
.mention:hover { text-decoration: underline; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 16px 0; }
.prose li { margin: 6px 0; }
.prose pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; margin: 18px 0; }
.prose code { background: var(--surface-2); border-radius: 6px; padding: 2px 6px; font-size: 0.88em; font-family: var(--font-mono); }

/* @멘션 자동완성 팝오버(댓글 입력창) */
.mention-pop { position: absolute; z-index: 300; margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16); max-height: 244px; overflow-y: auto; min-width: 200px; }
.mention-pop[hidden] { display: none; }
.mention-pop__item { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 8px; cursor: pointer; min-height: 44px; }
.mention-pop__item.is-active, .mention-pop__item:hover { background: var(--brand-soft); }
.mention-pop__av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.mention-pop__av--ph { display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-muted); font-size: 12px; font-weight: 700; }
.mention-pop__txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mention-pop__name { font-weight: 600; color: var(--text-strong); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-pop__handle { font-size: 12.5px; color: var(--text-muted); }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 18px 0; padding: 4px 18px; border-left: 3px solid var(--brand-text); color: var(--text-muted); }
.prose img { border-radius: 12px; margin: 18px 0; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; width: 100%; font-size: 14px; margin: 18px 0; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose th { background: var(--surface-2); font-weight: 600; }

/* ---- 본문 단독 링크: 임베드 / 미리보기 카드(src/linkpreview.js) ---- */
.prose .embed, .prose .linkcard { margin: 20px 0; max-width: 100%; }
.embed__facade:focus-visible, .linkcard:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }

/* 일반 링크 미리보기 카드(텔레그램식: 파비콘·제목·설명·썸네일) */
.linkcard { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.prose a.linkcard { color: inherit; text-decoration: none; }
.linkcard:hover { border-color: var(--border-strong); background: var(--surface-2); box-shadow: var(--shadow-sm); }
.linkcard__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; }
.linkcard__site { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkcard__favicon { flex: none; width: 16px; height: 16px; border-radius: 4px; margin: 0; }
.linkcard__title { font-size: 15.5px; font-weight: 700; color: var(--text-strong); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.linkcard__desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.linkcard__thumb { flex: none; width: 168px; align-self: stretch; background: var(--surface-2); border-left: 1px solid var(--border); }
.linkcard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; border-radius: 0; }

/* 임베드 공통(페이사드 버튼 → 클릭 시 iframe 교체) */
.embed { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.embed__facade { position: relative; display: block; width: 100%; margin: 0; padding: 0; border: none; background: var(--surface-2); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.embed__frame { display: block; width: 100%; border: 0; }

/* 동영상(16:9) — 썸네일 + 재생 버튼 + 하단 라벨 바 */
.embed--video .embed__facade, .embed--video .embed__frame { aspect-ratio: 16 / 9; }
.embed__thumb { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; border-radius: 0; }
.embed__thumb--blank { background: linear-gradient(135deg, var(--surface-2), var(--border-strong)); }
.embed__play { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; display: flex; align-items: center; justify-content: center; padding-left: 3px; color: #fff; background: rgba(16,18,20,.6); border-radius: 999px; transition: background .15s, transform .15s; }
.embed__facade:hover .embed__play { background: var(--brand); color: var(--on-brand); transform: scale(1.06); }
.embed__bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 24px 14px 12px; background: linear-gradient(to top, rgba(0,0,0,.74), transparent); }
.embed__badge { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.embed--video .embed__badge { color: #fff; background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 6px; }
.embed--video .embed__title { min-width: 0; color: #fff; font-weight: 600; font-size: 14px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 소셜(X·인스타) — 카드형 페이사드 → 클릭 시 게시물 iframe */
.embed--social { background: var(--surface); }
.embed__facade--card { display: flex; align-items: stretch; min-height: 96px; }
.embed__media { flex: none; width: 132px; background: var(--surface-2); border-right: 1px solid var(--border); }
.embed__media img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; border-radius: 0; }
.embed__media--blank { background: linear-gradient(135deg, var(--surface-2), var(--border-strong)); }
.embed__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; }
.embed--social .embed__badge { align-self: flex-start; color: var(--text-muted); background: var(--surface-2); padding: 2px 8px; border-radius: 6px; }
.embed--social .embed__title { color: var(--text-strong); font-weight: 700; font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.embed__desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.embed__cta { margin-top: auto; font-size: 12.5px; font-weight: 600; color: var(--brand-text); }
.embed--social .embed__frame { height: 580px; background: var(--surface); }
/* 인스타 임베드(/embed/captioned)는 항상 라이트라 흰 배경 유지. X는 테마 토글(&theme=dark, main.js)을 따르도록 --surface. */
.embed[data-embed="instagram"] .embed__frame { background: #fff; }

@media (max-width: 560px) {
  .linkcard { flex-direction: column-reverse; }
  .linkcard__thumb { width: 100%; height: 168px; align-self: auto; border-left: none; border-top: 1px solid var(--border); }
  .embed__facade--card { flex-direction: column; }
  .embed__media { width: 100%; height: 150px; border-right: none; border-bottom: 1px solid var(--border); }
  .embed--social .embed__frame { height: 70vh; max-height: 580px; } /* 작은 화면에서 고정 580px가 과대해지는 것 방지 */
}

/* ---- comments ---- */
.comments { margin-top: 12px; }
.comment { padding: 18px 0; border-bottom: 1px solid var(--border); }
.comment__head { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.comment__author { display: inline-flex; align-items: center; gap: 7px; color: var(--text-strong); font-weight: 600; }
.comment__author:hover { color: var(--brand-text); }
.comment__body { margin: 8px 0; font-size: 15px; }
/* 좁은 폭에서 버튼이 넘쳐 잘리던 문제 → flex-wrap. 삭제 버튼만 form(전역 .inline=display:inline)이라
   정렬이 틀어지던 것 → inline-flex로 정규화. votebox는 액션버튼과 키를 맞추려 살짝 컴팩트하게. */
.comment__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; }
.comment__foot form { display: inline-flex; margin: 0; }
.comment__foot .votebox { padding: 2px; }
.comment__foot .votebox__btn { width: 28px; height: 28px; font-size: 15px; }
.comment--deleted { color: var(--text-muted); font-size: 14px; font-style: italic; }
/* 대댓글: depth만큼 들여쓰기(시각 최대 4단계, 모바일 보호) + 왼쪽 스레드 가이드선 */
.comment--reply { padding-left: calc(var(--depth, 1) * 18px); position: relative; }
.comment--reply::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: calc((var(--depth, 1) - 1) * 18px + 5px); width: 2px; background: var(--border); border-radius: 2px; }
.comment-form { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.comment-form textarea { width: 100%; }
.comments__login { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; text-align: center; color: var(--text-muted); }
.comments__login a { color: var(--brand-text); font-weight: 600; }

/* ---- forms ---- */
.field { display: block; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.label { display: block; font-size: 14px; font-weight: 600; color: var(--text-strong); margin-bottom: 7px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="datetime-local"], select, textarea {
  width: 100%; padding: 11px 14px; border-radius: 11px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  /* 16px: 모바일(iOS)에서 포커스 시 자동 확대(줌)를 막는 최소 크기 */
  font-size: 16px; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand-text); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; }
textarea { resize: vertical; line-height: 1.65; }
.field__hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 14.5px; cursor: pointer; line-height: 1.5; }
.check a { color: var(--brand-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.check input { width: 17px; height: 17px; accent-color: var(--brand-text); flex-shrink: 0; margin-top: 2px; }
.consent-notice { margin: 8px 0; padding: 10px 14px; background: var(--surface-2); border-radius: 11px; font-size: 13px; }
.consent-notice summary { cursor: pointer; color: var(--text-strong); font-weight: 600; }
.consent-notice ul { margin: 8px 0 2px; padding-left: 1.2em; color: var(--text-muted); line-height: 1.7; }
.consent-notice strong { color: var(--text); }
.form-error { background: color-mix(in srgb, var(--danger) 9%, transparent); color: var(--danger); border-radius: 11px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.form-success { background: color-mix(in srgb, var(--success) 11%, transparent); color: var(--success); border-radius: 11px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.form-warn { background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--warning); border-radius: 11px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.form-warn .icon { font-size: 14px; flex: none; }

/* compose */
.compose__showcase { border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin: 0 0 18px; }
.compose__showcase legend { padding: 0 8px; }
.compose__cover-preview:not([hidden]) { display: block; margin-top: 10px; max-height: 220px; border-radius: 12px; border: 1px solid var(--border); }
.compose__aicheck { margin: 2px 0 18px; }
.compose__submit { display: flex; align-items: center; gap: 14px; }

/* ---- 위지윅 에디터 ---- */
.editor { border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.editor:focus-within { border-color: var(--brand-text); box-shadow: 0 0 0 3px var(--brand-soft); }
.editor__bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.editor__tabs { display: inline-flex; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 2px; }
.editor__tab { padding: 5px 13px; border: none; background: transparent; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.editor__tab.is-active { background: var(--brand-soft); color: var(--brand-text); }
.editor__tools { display: inline-flex; align-items: center; gap: 1px; margin-left: auto; flex-wrap: wrap; }
.editor__tool { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 7px; border: none; background: transparent; border-radius: 8px; color: var(--text); cursor: pointer; font-weight: 800; font-size: 14px; }
.editor__tool:hover { background: var(--surface); color: var(--brand-text); }
.editor__tool .icon { color: inherit; }
.editor__tool--text { font-family: var(--font-display); }
.editor__div { width: 1px; height: 18px; background: var(--border-strong); margin: 0 5px; }
.editor__area { display: block; width: 100%; border: none; background: transparent; padding: 14px 16px; font-size: 16px; line-height: 1.7; color: var(--text); resize: vertical; min-height: 300px; font-family: var(--font-body); }
.editor__area:focus { outline: none; box-shadow: none; border: none; }
.editor__preview { padding: 16px; min-height: 300px; max-width: none; }
.editor__preview > *:first-child { margin-top: 0; }
.editor__foot { margin-top: 8px; font-size: 13px; min-height: 18px; }
.editor__hint { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; line-height: 1.5; }
.editor__hint .icon { font-size: .9em; width: auto; color: var(--text-muted); flex: none; }

/* ---- auth ---- */
.authcard { max-width: 380px; margin: 48px auto; }
.authcard--wide { max-width: 560px; }
.authcard--wide .check { margin: 2px 0 20px; }
.authcard__title { font-size: 26px; margin-bottom: 6px; letter-spacing: -0.03em; }
.authcard__sub { color: var(--text-muted); margin-bottom: 24px; }
.authcard form { margin-top: 20px; }
.authcard__divider { display: flex; align-items: center; gap: 14px; color: var(--text-muted); font-size: 13px; margin: 20px 0; }
.authcard__divider::before, .authcard__divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.authcard__alt { margin-top: 24px; font-size: 14px; color: var(--text-muted); text-align: center; }
.authcard__alt a { color: var(--brand-text); font-weight: 600; }
.authcard__alt a:hover { text-decoration: underline; text-underline-offset: 2px; }
.authcard--center { text-align: center; }
.authcard__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; margin-bottom: 18px; }
.authcard__icon.is-ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.authcard__icon.is-warn { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.authcard__icon.is-brand { background: var(--brand-soft); color: var(--brand-text); }
.authcard__icon .icon { font-size: 24px; width: auto; }
.authcard__lead { color: var(--text-muted); margin: 0 0 14px; line-height: 1.6; }
.authcard__lead strong { color: var(--text-strong); font-weight: 700; }
.authcard__hint { font-size: 13px; margin: 0 0 22px; }
.authcard__resend { margin-top: 16px; }

/* ---- 이메일 인증 배너 ---- */
.vbanner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  max-width: 1240px; margin: 14px auto 0; padding: 12px 24px;
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warning) 34%, var(--border)); border-radius: 12px; }
.vbanner__text { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); font-weight: 500; }
.vbanner__text .icon { font-size: 15px; width: auto; color: var(--warning); flex-shrink: 0; }
.vbanner__text strong { font-weight: 700; }
.vbanner__action { flex-shrink: 0; }
@media (max-width: 760px) { .vbanner { margin: 12px 16px 0; padding: 12px 16px; } }

/* ---- 메인 상단 공지 배너 ---- */
/* variant별 강조색은 --annc 한 변수로 받아 배경 틴트·좌측 액센트·아이콘 칩·CTA에 일관 적용 */
.annc { position: relative; display: flex; align-items: center; gap: 14px;
  margin: 0 0 20px; padding: 15px 18px;
  border: 1px solid color-mix(in srgb, var(--annc) 30%, var(--border));
  border-left: 3px solid var(--annc); border-radius: 16px;
  background: color-mix(in srgb, var(--annc) 8%, var(--surface));
  box-shadow: var(--shadow-sm); }
.annc--info { --annc: var(--info); }
.annc--brand { --annc: var(--brand-text); }
.annc--success { --annc: var(--success); }
.annc--warning { --annc: var(--warning); }
.annc__icon { flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: color-mix(in srgb, var(--annc) 15%, var(--surface)); color: var(--annc); }
.annc__icon .icon { font-size: 17px; width: auto; }
.annc__body { flex: 1 1 auto; min-width: 0; }
.annc__title { color: var(--text-strong); font-weight: 700; font-size: 15px; line-height: 1.35; margin: 0; letter-spacing: -0.01em; }
.annc__text { color: var(--text-muted); font-size: 13.5px; line-height: 1.5; margin: 3px 0 0; }
/* CTA는 액센트 색을 텍스트로 — 모든 variant·테마에서 대비 안전(밝은 톤 채움 버튼은 흰 글씨 대비가 약함) */
.annc__cta { flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; white-space: nowrap;
  color: var(--annc); background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--annc) 42%, var(--border)); transition: background .15s, border-color .15s; }
.annc__cta:hover { background: color-mix(in srgb, var(--annc) 10%, var(--surface)); text-decoration: none; }
.annc__cta .icon { font-size: .9em; width: auto; }
.annc__close { flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; transition: background .15s, color .15s; }
.annc__close:hover { background: color-mix(in srgb, var(--text-muted) 14%, transparent); color: var(--text-strong); }
.annc__close .icon { font-size: 15px; width: auto; }
.annc--closing { opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease; }
@media (max-width: 680px) {
  /* 닫기 버튼은 absolute로 우상단 고정 → 우측 패딩으로 본문이 버튼 밑으로 흐르지 않게 자리를 비워둔다 */
  .annc { flex-wrap: wrap; gap: 10px 12px; padding: 14px 46px 14px 14px; border-radius: 14px; }
  .annc__cta { order: 3; }
  .annc__close { position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; }
}

/* 공지 이력 목록(관리자) */
.anlist { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.anrow .brow__name { font-weight: 600; }
.anrow--off .brow__name, .anrow--ended .brow__name { color: var(--text-muted); }
.anbadge { display: inline-flex; align-items: center; gap: 4px; flex: none;
  padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: -0.01em; }
.anbadge .icon { font-size: 10px; width: auto; }
.anbadge--live { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.anbadge--scheduled { background: var(--info-soft); color: var(--info); }
.anbadge--waiting { background: var(--brand-soft); color: var(--brand-text); }
.anbadge--ended, .anbadge--off { background: var(--surface-2); color: var(--text-muted); }
.anbadge--lock { background: transparent; border: 1px solid var(--border-strong); color: var(--text-muted); font-weight: 600; }
.anncform { margin-top: 2px; }

/* ---- group / board grid ---- */
.boardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.boardgrid__card {
  display: flex; flex-direction: column; gap: 6px; padding: 20px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
  color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.boardgrid__card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.boardgrid__name { font-size: 16px; }
.boardgrid__desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; flex: 1; }
.boardgrid__count { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

/* ---- profile ---- */
.profile__header { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.profile__id { flex: 1; min-width: 240px; }
.profile__name { font-size: 28px; letter-spacing: -0.03em; }
.profile__username { color: var(--text-muted); margin: 3px 0 12px; font-size: 15px; }
.profile__bio { margin-bottom: 12px; max-width: 60ch; line-height: 1.6; }
.profile__expertise { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.profile__links { display: flex; gap: 8px; flex-wrap: wrap; }
.profile__links a { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--text-muted); border: 1px solid var(--border-strong); border-radius: 9px; padding: 5px 11px; }
.profile__links a:hover { color: var(--brand-text); border-color: var(--brand-text); text-decoration: none; }
.profile__side { display: flex; flex-direction: column; gap: 14px; align-items: flex-end; }
.profile__stats { display: flex; gap: 24px; margin: 0; }
.profile__stats div { text-align: center; }
.profile__stats dt { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.profile__stats dd { margin: 0; font-size: 22px; font-weight: 800; color: var(--text-strong); font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.profile__section { margin-top: 40px; }

.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; overflow-x: auto; padding: 4px 0; }
.heatmap__cell { width: 13px; height: 13px; border-radius: 3px; background: var(--surface-2); }
.heatmap__cell--1 { background: color-mix(in srgb, var(--brand) 28%, var(--surface-2)); }
.heatmap__cell--2 { background: color-mix(in srgb, var(--brand) 50%, var(--surface-2)); }
.heatmap__cell--3 { background: color-mix(in srgb, var(--brand) 75%, var(--surface-2)); }
.heatmap__cell--4 { background: var(--brand); }

.workgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 18px; }
.workcard { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface); color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; display: block; }
.workcard:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.workcard__cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--surface-2); }
.workcard__cover--empty { display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.workcard__cover--empty .icon { font-size: 30px; width: auto; }
.workcard__body { padding: 14px 16px; }
.workcard__title { font-size: 15px; line-height: 1.4; }
.workcard__stack { font-size: 12.5px; color: var(--text-muted); margin: 5px 0; }
.workcard__meta { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; display: flex; gap: 12px; flex-wrap: wrap; row-gap: 4px; }

/* ---- glue ---- */
.gluelist { display: flex; flex-direction: column; gap: 14px; }
.gluecard { display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; background: var(--surface); }
.gluecard__body { flex: 1; min-width: 0; }
.gluecard__title { font-size: 16px; margin-bottom: 5px; }
.gluecard__title a:hover { color: var(--brand-text); }
.gluecard__excerpt { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }
.gluecard__memo { font-size: 13.5px; background: var(--brand-soft); color: var(--text); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.gluecard__meta { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---- search ---- */
.search-users__row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.usercard { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; background: var(--surface); color: var(--text); min-width: 150px; transition: border-color .15s; }
.usercard:hover { border-color: var(--border-strong); text-decoration: none; }
.usercard .avatar { width: 48px; height: 48px; font-size: 20px; }
.usercard__name { font-weight: 700; color: var(--text-strong); }
.usercard__sub { font-size: 12.5px; color: var(--text-muted); }

/* ---- empty state ---- */
.empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--border-strong); border-radius: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty--page { border: none; padding-top: 88px; }
.empty__code { font-family: var(--font-display); font-size: 56px; font-weight: 800; color: var(--brand-text); margin: 0; letter-spacing: -0.04em; }
.empty__title { font-size: 18px; font-weight: 700; color: var(--text-strong); margin: 0; }
.empty__hint { color: var(--text-muted); margin-bottom: 10px; }

/* ---- theme toggle ---- */
.theme-toggle { position: relative; }
.theme-toggle__sun, .theme-toggle__moon, .theme-toggle__sys { display: none; align-items: center; }
[data-theme-pref="light"] .theme-toggle__sun { display: inline-flex; }
[data-theme-pref="dark"] .theme-toggle__moon { display: inline-flex; }
[data-theme-pref="system"] .theme-toggle__sys { display: inline-flex; }

/* ---- admin panel ---- */
.shell--admin { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; max-width: 1180px; }
.admin-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; color: var(--brand-text);
  background: var(--brand-soft); border-radius: 999px; padding: 4px 11px;
}
.admin-badge .icon { font-size: 13px; width: auto; }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 28px; }
.statcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 4px;
}
.statcard__label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.statcard__value { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--text-strong); letter-spacing: -0.02em; }
.statcard__value--sm { font-size: 20px; }
.statcard__value--ok { color: var(--success); }
.statcard__value--warn { color: var(--danger); }
.statcard__sub { font-size: 12px; color: var(--text-muted); }

.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.admin-block { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; }
.admin-block__head { display: flex; align-items: center; justify-content: space-between; }
.admin-block .section-title { margin-top: 0; }

.adtable-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.adtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.adtable th { text-align: left; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.adtable td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.adtable tbody tr:last-child td { border-bottom: none; }
.adtable tbody tr:hover { background: var(--surface-2); }
.adtable a { color: var(--text-strong); font-weight: 600; }
.adtable a:hover { color: var(--brand-text); }
.adtable__self { background: var(--brand-soft); }
.adtable__self:hover { background: var(--brand-soft); }
.adtable__off td { opacity: .5; }
.adtable--kv th { text-transform: none; color: var(--text-muted); font-weight: 600; width: 130px; }
.adtable--kv td { color: var(--text-strong); }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 5px; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.bar__label { font-size: 12.5px; color: var(--text-muted); font-family: var(--font-mono); }
/* 대시보드 추이 막대 */
.trend { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 8px; }
.trend__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.trend__bars { flex: 1; display: flex; align-items: flex-end; gap: 3px; width: 100%; justify-content: center; }
.trend__bar { width: 12px; border-radius: 4px 4px 0 0; min-height: 3px; }
.trend__bar--posts { background: var(--brand); }
.trend__bar--users { background: color-mix(in srgb, var(--brand) 40%, var(--surface-2)); }
.trend__label { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.trend__legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-muted); margin-top: 12px; }
.trend__legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; vertical-align: -1px; margin-right: 5px; }
.ranklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ranklist li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.ranklist li:last-child { border-bottom: none; }
.ranklist__rank { font-family: var(--font-display); font-weight: 800; color: var(--brand-text); width: 18px; font-size: 13px; }
.ranklist__name { flex: 1; min-width: 0; color: var(--text-strong); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranklist__val { color: var(--text-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.adtable__actions { text-align: right; white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }

.adfilter { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.adfilter input[type="text"] { max-width: 280px; }
.adfilter select { width: auto; }
.adinline { display: inline; }
.adinline select { width: auto; padding: 5px 28px 5px 10px; font-size: 13px; border-radius: 8px; }

.rolechip, .statuschip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: capitalize; }
.rolechip--user { background: var(--surface-2); color: var(--text-muted); }
.rolechip--moderator { background: var(--info-soft); color: var(--info); }
.rolechip--staff { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.rolechip--admin { background: var(--brand-soft); color: var(--brand-text); }
.statuschip--active { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.statuschip--suspended { background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--warning); }
.statuschip--banned { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

.auditlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.auditlist li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.auditlist__action { background: var(--surface-2); padding: 2px 8px; border-radius: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--text-strong); }
.auditlist__meta { margin-left: auto; font-size: 12px; color: var(--text-muted); }

/* ---- 게시판 구조 관리(/admin/boards): 접었다 펴는 행 + 빠른 동작 ---- */
.bdgroup { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); margin-bottom: 14px; }
.bdrow { display: flex; align-items: flex-start; gap: 6px; }
.bddisc { flex: 1; min-width: 0; }
.bddisc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.bddisc > summary::-webkit-details-marker { display: none; }
.bddisc[open] > summary { background: var(--surface-2); }
.disc-caret { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); white-space: nowrap; padding-left: 8px; }
.disc-caret svg { width: 13px; height: 13px; }
.bddisc[open] > summary .disc-caret { color: var(--brand-text); }

.bdgroup__bar { padding: 14px 16px; border-radius: 16px; }
.bdgroup__bar:hover { background: var(--surface-2); }
.bdgroup__name { font-weight: 700; font-size: 16px; color: var(--text-strong); letter-spacing: -0.01em; }
.bdgroup--off .bdgroup__name { color: var(--text-muted); }

.bdboards { padding: 0 8px 4px; display: flex; flex-direction: column; gap: 5px; }
.brow { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.brow__bar { padding: 10px 12px; border-radius: 12px; }
.brow__bar:hover { background: var(--surface-2); }
.brow__name { font-weight: 600; color: var(--text-strong); }
.brow--off .brow__name { color: var(--text-muted); }

.bdcount { font-size: 12.5px; white-space: nowrap; }
.bdoff { font-size: 11px; font-weight: 700; color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); padding: 1px 8px; border-radius: 999px; }
.bdtag { background: var(--surface-2); color: var(--text-muted); }
.bdrole { background: var(--info-soft); color: var(--info); }
/* 운영진 배지(보드 한정 운영 권한) — 시그니처 아쿠아 틴트 */
.bdmod { background: var(--brand-soft); color: var(--brand-text); display: inline-flex; align-items: center; gap: 4px; }
.bdmod .icon { font-size: 10px; }
/* 비공개 보드 배지 + 멤버 관리 */
.bdprivate { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); display: inline-flex; align-items: center; gap: 4px; }
.bdprivate .icon { font-size: 10px; }
.bdmembers-link { margin-top: 2px; }
/* 보드 운영 화면(운영진) — 메인 셸의 admin-block 카드를 섹션 단위로 쌓는다 */
.bmanage__sec { margin-bottom: 20px; }
.bmanage__hint { margin: -4px 0 12px; font-size: 13px; }
.bdmember { display: inline-flex; align-items: center; gap: 10px; }
.bdmember__id { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.bdmember__id strong { color: var(--text-strong); font-weight: 600; }
.bdmember__id .muted { font-size: 12.5px; }
/* 사이드바 내비의 비공개 보드 자물쇠 표시 */
.navlock { font-size: 10px; color: var(--text-muted); margin-left: 4px; vertical-align: baseline; }
.huedot { width: 14px; height: 14px; border-radius: 4px; background: hsl(var(--bh), calc(60% * var(--bsat, 1)), 72%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); flex: none; }
[data-theme="dark"] .huedot { background: hsl(var(--bh), calc(48% * var(--bsat, 1)), 58%); }

.bdquick { display: flex; align-items: center; gap: 4px; padding: 11px 10px 0 0; flex: none; }
.bdquick .btn:disabled { opacity: .34; cursor: not-allowed; }
.bdmove { display: inline-flex; gap: 2px; }
.bdmove .btn--icon { padding: 6px; }
.bdmove .btn--icon svg { width: 15px; height: 15px; display: block; }

/* 관리자 글 수정 — 글 정보 헤더 */
.postmeta { margin-bottom: 18px; }
.postmeta__title { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; color: var(--text-strong); letter-spacing: -0.01em; }
.postmeta__title:hover { color: var(--brand-text); }
.postmeta__title svg { width: 14px; height: 14px; color: var(--text-muted); }
.postmeta__facts { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13.5px; }
.postmeta__facts a { color: var(--text-strong); font-weight: 600; }
.postmeta__facts a:hover { color: var(--brand-text); }
.bdempty { padding: 2px 18px 12px; font-size: 13.5px; }

/* 펼친 편집 폼 */
.bdpanel { padding: 4px 16px 16px; }
.bdform { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 14px; align-items: end; }
.bdform__f { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; }
.bdform__f--wide { grid-column: 1 / -1; }
.bdform__f--narrow { max-width: 130px; }
.bdform__lab { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.bdform input, .bdform select { width: 100%; }
.bdform__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px dashed var(--border); padding-top: 12px; }

/* 그룹/보드 추가 디스클로저 */
.bdgroup__foot { padding: 2px 8px 10px; }
.bdadd { border: 1px dashed var(--border-strong); border-radius: 12px; }
.bdadd--group { margin: 16px 0 22px; }
.bdadd__sum { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 11px 16px; font-weight: 600; font-size: 14px; color: var(--text-strong); }
.bdadd__sum::-webkit-details-marker { display: none; }
.bdadd__sum svg { width: 15px; height: 15px; }
.bdadd[open] .bdadd__sum { color: var(--brand-text); }
.bdform--add { padding: 0 16px 16px; }

/* ---- 백업 · 복구(/admin/backup) ---- */
.bk-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.bk-list li { display: flex; gap: 14px; align-items: baseline; padding: 11px 14px; font-size: 14px; }
.bk-list li:not(:last-child) { border-bottom: 1px solid var(--border); }
.bk-list__k { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-strong); min-width: 150px; flex: none; }
.bk-list__k svg { width: 16px; height: 16px; color: var(--text-muted); }
.bk-list__v { color: var(--text-muted); min-width: 0; }
.bk-steps { margin: 12px 0 0; padding-left: 20px; line-height: 1.95; color: var(--text); font-size: 14px; }
.bk-steps li { margin: 4px 0; }
.cmdblock { margin: 8px 0; padding: 11px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-strong); overflow-x: auto; white-space: pre; }

.adform-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1; }
.adform-inline input[type="text"] { width: auto; flex: 1; min-width: 120px; padding: 7px 11px; font-size: 14px; }
.adform-inline input.num { width: 64px; flex: none; }
/* 게시판 박스 색상 선택(팔레트 스와치 + 자동) — 게시판 관리 인라인 폼 */
.huepick { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; flex: none; }
.huepick__sw { position: relative; display: inline-flex; line-height: 0; cursor: pointer; }
.huepick__sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.huepick__dot { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 5px; background: hsl(var(--bh), calc(60% * var(--bsat, 1)), 72%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .12s; }
.huepick__sw--auto .huepick__dot { background: var(--surface-2); color: var(--text-muted); font-size: 9px; font-weight: 800; box-shadow: inset 0 0 0 1px var(--border-strong); }
.huepick__sw:hover .huepick__dot { transform: scale(1.12); }
.huepick__sw input:checked + .huepick__dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--text-strong); }
[data-theme="dark"] .huepick__dot { background: hsl(var(--bh), calc(48% * var(--bsat, 1)), 58%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
/* 커스텀 색상 스와치 — <input type=color>로 색조(hue) 선택. 미선택이면 + 글리프, 선택되면 실제 보드색 */
.huepick__sw--custom .huepick__color { z-index: 2; }                 /* 피커가 클릭을 받도록(라디오 위로) */
.huepick__sw--custom input[type="radio"] { pointer-events: none; }   /* 클릭은 피커가 받고, 라디오는 상태·값만 */
.huepick__dot--custom { background: var(--surface-2); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.huepick__dot--custom svg { width: 11px; height: 11px; }
.huepick__sw--custom.is-set .huepick__dot--custom { color: transparent; background: hsl(var(--bh), calc(60% * var(--bsat, 1)), 72%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.huepick__sw--custom.is-set .huepick__dot--custom svg { display: none; }
[data-theme="dark"] .huepick__sw--custom.is-set .huepick__dot--custom { background: hsl(var(--bh), calc(48% * var(--bsat, 1)), 58%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.huepick__sw--custom input[type="radio"]:checked ~ .huepick__dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--text-strong); }
/* 글 유형 아이콘 픽커(huepick의 아이콘판) + 유형 행 머리의 아이콘 글리프 */
.iconpick { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.iconpick__sw { position: relative; display: inline-flex; line-height: 0; cursor: pointer; }
.iconpick__sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.iconpick__dot { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border-strong); transition: transform .12s; }
.iconpick__sw:hover .iconpick__dot { transform: scale(1.1); }
.iconpick__sw input:checked + .iconpick__dot { color: var(--brand-text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--text-strong); }
.ptglyph { display: inline-flex; align-items: center; justify-content: center; width: 26px; color: var(--text-muted); }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 28px 0; }
.pager__info { font-size: 14px; color: var(--text-muted); }

@media (max-width: 900px) {
  .admin-cols { grid-template-columns: 1fr; }
}

/* ---- toast ---- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--text-strong); color: var(--bg); padding: 11px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 500; z-index: 200; box-shadow: var(--shadow);
  animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---- footer ---- */
.footer { max-width: 1240px; margin: 0 auto; padding: 32px 24px 40px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }
.footer__links { display: flex; gap: 18px; margin-bottom: 10px; }
.footer__links a { color: var(--text-muted); }
.footer__links a:hover { color: var(--brand-text); }

/* ---- 법적 고지 페이지 ---- */
.legal { max-width: 720px; margin: 8px auto 0; }
.legal__title { font-size: 28px; letter-spacing: -0.03em; margin-bottom: 6px; }
.legal__updated { color: var(--text-muted); font-size: 13.5px; margin-bottom: 28px; }
.legal section { margin-bottom: 26px; }
.legal h2 { font-size: 17px; margin-bottom: 10px; }
.legal p { color: var(--text); line-height: 1.75; margin: 8px 0; }
.legal ul { margin: 8px 0; padding-left: 1.3em; color: var(--text); line-height: 1.75; }
.legal li { margin: 5px 0; }
.legal strong { color: var(--text-strong); font-weight: 700; }
.legal a { color: var(--brand-text); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.legal code { background: var(--surface-2); border-radius: 6px; padding: 2px 6px; font-size: 0.88em; font-family: var(--font-mono); }
.legal__lead { margin-bottom: 26px; }
.legal__note { margin-top: 28px; padding: 14px 16px; background: var(--surface-2); border-radius: 12px; font-size: 13.5px; color: var(--text-muted); }
.legal__tbd { display: inline-block; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); font-size: 12.5px; font-weight: 600; }
.legal__table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; line-height: 1.6; }
.legal__table th, .legal__table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; color: var(--text); }
.legal__table th { background: var(--surface-2); color: var(--text-strong); font-weight: 700; }

/* 회원가입 봇 차단용 허니팟(사람에겐 비표시) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 위험 작업(회원 탈퇴 등) */
.danger-zone { margin-top: 40px; border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--border)); border-radius: 14px; padding: 20px 22px; }
.danger-zone h2 { font-size: 16px; color: var(--danger); margin-bottom: 6px; }
.danger-zone p { color: var(--text-muted); font-size: 14px; margin-bottom: 14px; line-height: 1.6; }
.danger-zone .field { max-width: 320px; }

/* 설정 섹션(보안·데이터) */
.settings-grouphead { font-size: 19px; letter-spacing: -0.02em; margin: 44px 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.settings-grouphead + .settings-security { margin-top: 18px; }
.settings-security, .settings-data { margin-top: 26px; }
.settings-security h2, .settings-data h2 { font-size: 16px; margin-bottom: 6px; }

/* 설정: 프로필 사진(기본 아바타) */
.settings-avatar { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; margin-bottom: 22px; }
.settings-avatar h2 { font-size: 17px; }
.settings-avatar > p { margin: 6px 0 16px; font-size: 14px; }
.avatar--xl { width: 96px; height: 96px; border-radius: 50%; }
.avatarform__main { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.avatarform__controls { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.avatarform__bgs { display: flex; flex-wrap: wrap; gap: 9px; }
.bgswatch { position: relative; display: inline-flex; cursor: pointer; }
.bgswatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.bgswatch__dot { width: 26px; height: 26px; border-radius: 50%; background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); transition: transform .12s, box-shadow .12s; }
.bgswatch:hover .bgswatch__dot { transform: scale(1.09); }
.bgswatch input:focus-visible + .bgswatch__dot,
.bgswatch.is-on .bgswatch__dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand-text); }
.avatarform__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.settings-security p, .settings-data p { color: var(--text-muted); font-size: 14px; margin-bottom: 14px; line-height: 1.6; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge--on { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }

/* 2단계 인증 설정·복구 코드 */
.twofa-qr { display: flex; justify-content: center; margin: 8px 0 12px; }
.twofa-qr img { border-radius: 10px; background: #fff; padding: 8px; }
.twofa-secret { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.twofa-secret code { font-size: 14px; color: var(--text-strong); letter-spacing: 0.04em; word-break: break-all; }
.recovery-codes { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recovery-codes li { background: var(--surface-2); border-radius: 8px; padding: 10px; text-align: center; }
.recovery-codes code { font-size: 15px; letter-spacing: 0.06em; color: var(--text-strong); }

/* 패스키 목록 */
.passkey-list { list-style: none; padding: 0; margin: 16px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.passkey-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.passkey-item__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.passkey-item__meta strong { color: var(--text-strong); }
.passkey-item__meta .muted { font-size: 12.5px; }
.passkey-add { margin-top: 18px; }

/* ---- 모바일 내비: 우하단 플로팅 버튼(FAB) + 우측 드로어 ---- */
/* FAB: 기본 숨김(데스크탑은 고정 사이드바 사용), 모바일에서만 노출. 드로어(z:100) 위로 떠서 열기/닫기 토글. */
.fab {
  display: none;
  position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 110;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand); color: var(--on-brand);
  align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(16,18,20,.22), 0 2px 6px rgba(16,18,20,.16);
  transition: transform .2s cubic-bezier(.4,0,.2,1), background .15s, box-shadow .2s, bottom .26s ease;
}
.fab:hover { background: var(--brand-hover); }
.fab:active { transform: scale(.93); }
.fab .icon { font-size: 21px; }
.fab__icon { display: inline-flex; align-items: center; justify-content: center; }
.fab__icon--close { display: none; }
/* 열리면 메뉴→X 모핑 + 잉크색으로 전환(닫기 버튼임을 명확히) */
body.drawer-open .fab { background: var(--text-strong); color: var(--bg); }
body.drawer-open .fab__icon--menu { display: none; }
body.drawer-open .fab__icon--close { display: inline-flex; }
/* 쿠키 동의 배너가 떠 있는 동안엔 FAB를 위로 올려 겹침 방지 */
body:has(.cookiebar) .fab { bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }

.drawer { display: none; }
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .26s ease; }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 88%; max-width: 360px;
  background: var(--bg); border-left: 1px solid var(--border);
  border-radius: 16px 0 0 16px;
  padding: 16px 16px calc(100px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: -16px 0 48px rgba(16,18,20,.18);
}
.drawer.is-open .drawer__panel { transform: translateX(0); }

.drawer__head { display: flex; align-items: center; justify-content: space-between; height: 40px; margin-bottom: 14px; padding: 0 4px; }
.drawer__x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--surface-2); color: var(--text-strong);
}
.drawer__x:hover { background: var(--border); }
.drawer__x .icon { font-size: 16px; }

/* 프로필 카드(로그인 시) — 모바일에서 아바타 드롭다운을 대체하는 진입점 */
.drawer__profile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px;
  background: var(--surface-2); margin-bottom: 10px;
  transition: background .14s;
}
.drawer__profile:hover { background: var(--border); }
.drawer__avatar { width: 46px; height: 46px; font-size: 19px; }
.drawer__profile-id { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; flex: 1; }
.drawer__profile-id strong { color: var(--text-strong); font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer__profile-id .muted { font-size: 13px; color: var(--text-muted); }
.drawer__profile-go { color: var(--text-muted); flex: none; }
.drawer__profile-go .icon { font-size: 13px; }

.drawer__cta { margin-bottom: 6px; }
.drawer__auth { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }

/* 내비 영역 — 데스크탑 사이드바 마크업 재사용, 타깃을 키워 모바일 터치 사용성 확보 */
.drawer__nav { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--border); }
.drawer__nav .sidebar__link { padding: 11px 12px; font-size: 15px; border-radius: 12px; gap: 12px; }
.drawer__nav .sidebar__link .icon { font-size: 17px; }
.drawer__nav .sidebar__solo,
.drawer__nav .sidebar__title { padding: 10px 12px; font-size: 14.5px; border-radius: 12px; }
.drawer__nav .sidebar__solo { margin-top: 6px; }
.drawer__nav .sidebar__group { margin-top: 8px; }
.drawer__nav .sidebar__boards { margin-left: 21px; }
.drawer__nav .sidebar__boards .sidebar__link { font-size: 14px; padding: 9px 12px; }
.drawer__nav .sidebar__eyebrow { margin-top: 14px; font-size: 11.5px; }

/* 푸터(설정·관리자·로그아웃) */
.drawer__foot { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--border); }
.drawer__foot form { display: contents; }
.drawer__foot-link {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 500;
  color: var(--text); background: transparent; border: none; cursor: pointer; font-family: inherit;
}
.drawer__foot-link .icon { color: var(--text-muted); font-size: 16px; width: 1.1em; }
.drawer__foot-link:hover { background: var(--surface-2); color: var(--text-strong); }
.drawer__foot-link:hover .icon { color: var(--text); }
.drawer__foot-link--danger:hover { background: color-mix(in srgb, var(--danger) 9%, transparent); color: var(--danger); }
.drawer__foot-link--danger:hover .icon { color: var(--danger); }

body.no-scroll { overflow: hidden; }
/* 드로어가 열리면 더 높은 z-index의 고정 요소(쿠키 배너·토스트)가 위로 떠 보이지 않게 숨김(이미 inert 처리됨) */
body.drawer-open .cookiebar, body.drawer-open .toast { display: none; }

/* ---- responsive ---- */
@media (max-width: 1040px) {
  .shell { grid-template-columns: 155px minmax(0, 1fr); gap: 28px; }
  .panel { display: none; }
}
@media (max-width: 760px) {
  .topbar__inner { padding: 0 14px; gap: 10px; height: 56px; }
  .logo { font-size: 26px; }
  .shell, .shell--narrow { grid-template-columns: minmax(0, 1fr); padding: 10px 10px 56px; }
  .sidebar { display: none; }
  .fab { display: inline-flex; }
  .drawer { display: block; }
  .topbar__inner > .searchbar { display: none; }
  .topbar__actions .searchbtn { display: inline-flex; }
  .hide-mobile { display: none !important; }
  .topbar__actions { gap: 4px; }
  /* 글쓰기(유일한 채움 버튼)는 모바일에서 액션 맨 오른쪽 + 아이콘만(40×40) — 고스트 아이콘 사이 중간에 끼어 튀던 문제 해결 */
  .topbar__write { order: 1; width: 40px; padding: 0; }
  .topbar__write .hide-mobile-inline { display: none; }
  .postcard { padding: 16px 12px; margin: 0 -12px; gap: 12px; }
  /* 구분선 inset을 모바일 패딩(12px)에 맞춰 카드 가장자리와 정렬 */
  .postcard:not(:last-child)::before { left: 12px; right: 12px; }
  .postcard__thumb { width: 88px; height: 66px; }
  .field-row { grid-template-columns: 1fr; }
  .profile__header { gap: 16px; }
  .profile__side { align-items: flex-start; flex-direction: row; width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
  .profile__stats { gap: 16px; flex-wrap: wrap; }
  .post__title { font-size: 25px; }
  .page-head__title { font-size: 22px; }
  .workgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .boardgrid { grid-template-columns: 1fr; }
  /* 모바일 터치 타깃 ~40px 확보 */
  .btn--icon { min-width: 40px; min-height: 40px; }
  .sorttabs__tab { padding-top: 8px; padding-bottom: 8px; }
  .adtable .adinline select, .adtable .btn--sm { min-height: 40px; }
  .editor__tool { min-width: 40px; height: 40px; }
  /* 게시판 구조: 좁은 화면에선 '편집' 글자를 접고 연필 아이콘만 */
  .disc-caret__label { display: none; }
  .bdquick .btn--sm { min-height: 36px; }
}
@media (min-width: 761px) {
  .hide-mobile-inline { display: inline; }
}
@media (max-width: 380px) {
  .hide-mobile-inline { display: none; }
}

/* ===== 알림 종 배지 ===== */
.notifbell { position: relative; }
.notifbell__dot {
  position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger, #e5484d); color: #fff; font-size: 10px; font-weight: 700;
  line-height: 1; border-radius: 999px; box-shadow: 0 0 0 2px var(--bg);
}

/* ===== 알림 목록 ===== */
.notiflist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.notifitem { border-bottom: 1px solid var(--border); }
.notifitem--unread { background: var(--brand-soft); }
.notifitem__link { display: flex; align-items: center; gap: 12px; padding: 14px 12px; color: var(--text); }
.notifitem__link:hover { background: var(--surface); text-decoration: none; }
.notifitem__icon { flex: none; color: var(--brand-text); font-size: 16px; }
.notifitem__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notifitem__text { font-size: 14px; }
.notifitem__ctx { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notifitem__time { flex: none; font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ===== 모달(신고 등) ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  width: 100%; max-width: 420px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 22px; box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.modal__title { font-size: 17px; font-weight: 700; color: var(--text-strong); margin: 0 0 14px; }
.modal .field { margin-bottom: 12px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ===== 쿠키 동의 배너 ===== */
.cookiebar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 250;
  width: calc(100% - 32px); max-width: 680px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 16px; box-shadow: 0 8px 28px rgba(0,0,0,.18);
}
.cookiebar__text { flex: 1; min-width: 200px; margin: 0; font-size: 13px; color: var(--text); line-height: 1.5; }
.cookiebar__actions { display: flex; gap: 8px; flex: none; }

/* ===== 푸터 사업자 정보 ===== */
.footer__biz { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0; font-style: normal; font-size: 12px; color: var(--text-muted); }
.footer__biz a { color: var(--text-muted); }

/* ===== Q&A 해결됨 / 답변 채택 ===== */
.chip--solved { background: color-mix(in srgb, var(--success, #1fa971) 14%, transparent); color: var(--success, #1fa971); display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.chip--solved .icon { font-size: 11px; }
.comment--accepted { border: 1px solid color-mix(in srgb, var(--success, #1fa971) 40%, var(--border)); background: color-mix(in srgb, var(--success, #1fa971) 6%, transparent); border-radius: 12px; padding: 12px 14px; }
.comment__accepted { display: inline-flex; align-items: center; gap: 5px; color: var(--success, #1fa971); font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.comment__accepted .icon { font-size: 12px; }
.comment__edited { font-size: 12px; }
.accept-btn.is-on { color: var(--success, #1fa971); }
.accept-btn.is-on .icon { color: var(--success, #1fa971); }

/* ===== 댓글 인라인 수정 ===== */
.comment-edit, .comment-reply { margin: 6px 0 4px; }
.comment-edit textarea, .comment-reply textarea { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; resize: vertical; }
.comment-edit textarea:focus, .comment-reply textarea:focus { outline: none; border-color: var(--brand-text); }
.comment-edit__actions { display: flex; gap: 8px; margin-top: 8px; }

/* ===== 보드/태그 구독 ===== */
.feedhead__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feedhead__subs { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.feedhead__subs .icon { font-size: 12px; }
/* 작성 권한이 없을 때 '글쓰기' 자리에 대신 보이는 안내(운영진만/지정 멤버만 보드) */
.feedhead__writenote { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.feedhead__writenote .icon { font-size: 12px; }
.tag-actions { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; }
.subscribe-btn .icon { font-size: 13px; }
.subscribe-btn.is-on { color: var(--brand-text); border-color: var(--brand-text); background: var(--brand-soft); }

/* ===== 레벨 / 배지 ===== */
.levelbadge {
  display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand-text); letter-spacing: -.01em;
}
.levelbadge--expert { background: color-mix(in srgb, #e0a106 18%, transparent); color: #b07f04; }
.levelbadge--legend { background: color-mix(in srgb, #e0a106 28%, transparent); color: #9a6f04; }
/* 다크 모드: 짙은 금색 글자는 어두운 배경에서 안 보임 → 밝은 금색으로(틴트 배경은 그대로 톤 유지) */
[data-theme="dark"] .levelbadge--expert { background: color-mix(in srgb, #e0a106 22%, transparent); color: #f0c861; }
[data-theme="dark"] .levelbadge--legend { background: color-mix(in srgb, #e0a106 30%, transparent); color: #f5d27a; }
.profile__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip--badge { display: inline-flex; align-items: center; gap: 5px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.chip--badge .icon { font-size: 11px; }
.levelprog { margin-top: 12px; }
.levelprog__track { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.levelprog__bar { display: block; height: 100%; border-radius: 999px; background: var(--brand-text); transition: width .4s ease; }
.levelprog__cap { font-size: 12px; margin: 6px 0 0; }

/* ===== 검색 필터 ===== */
.searchfilters { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; }
.searchfilters__row { display: flex; flex-wrap: wrap; gap: 7px; }
.filterchip {
  padding: 5px 13px; border-radius: 999px; font-size: 13px; color: var(--text-muted);
  border: 1px solid var(--border); background: var(--surface); white-space: nowrap; transition: color .12s, background .12s, border-color .12s;
}
.filterchip:hover { color: var(--text); text-decoration: none; border-color: var(--border-strong); }
.filterchip.is-active { background: var(--brand-text); color: var(--on-brand); border-color: var(--brand-text); font-weight: 600; }

/* ===== 온보딩 ===== */
.onboard { max-width: 720px; margin: 0 auto; }
.onboard__head { text-align: center; margin-bottom: 28px; }
.onboard__title { font-size: clamp(22px, 4vw, 30px); font-weight: 800; color: var(--text-strong); letter-spacing: -.02em; }
.onboard__sub { color: var(--text-muted); margin-top: 8px; }
.onboard__group { margin-bottom: 22px; }
.onboard__grouptitle { font-size: 14px; font-weight: 700; color: var(--text-strong); margin: 0 0 10px; }
.onboard__boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.boardpick {
  position: relative; display: flex; flex-direction: column; gap: 3px; cursor: pointer;
  padding: 13px 15px; border: 1.5px solid var(--border-strong); border-radius: 13px; transition: border-color .12s, background .12s;
}
.boardpick:has(input:checked) { border-color: var(--brand-text); background: var(--brand-soft); }
.boardpick input { position: absolute; opacity: 0; pointer-events: none; }
.boardpick__check { position: absolute; top: 10px; right: 11px; color: var(--brand-text); font-size: 13px; opacity: 0; transition: opacity .12s; }
.boardpick:has(input:checked) .boardpick__check { opacity: 1; }
.boardpick__name { font-weight: 700; color: var(--text-strong); font-size: 14.5px; padding-right: 18px; }
.boardpick__desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.onboard__actions { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
@media (max-width: 600px) { .onboard__boards { grid-template-columns: 1fr 1fr; } .onboard__actions { flex-direction: column-reverse; } .onboard__actions .btn { width: 100%; } }

/* ===== 이의신청 큐(관리자) ===== */
.appeal-msg { max-width: 520px; white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; }
.appeal-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.appeal-form__note { flex: 1; min-width: 140px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
.adtable__sub td { padding-top: 0; border-top: none; }

/* ============================================================
   TAG TICKER ("Hashflow") — 홈 피드 위 흐르는 인기태그 레일 (테스트용·독립).
   완전 제거: 이 블록 전체 + home.ejs의 include 한 줄 + views/partials/tagticker.ejs 삭제.
   다른 CSS는 .tagticker* 에 의존하지 않음(append-only). 토큰만 사용 → 다크모드 자동 대응.
   ============================================================ */
.tagticker { position: relative; margin: 4px 0 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.tagticker__viewport {
  overflow: hidden;
  /* 가장자리 페이드: 태그가 페이지 배경(--bg)으로 녹아들어 박스 경계가 안 보이게 함(라이트·다크 자동). */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.tagticker__track { display: flex; width: max-content; animation: tagticker-flow 56s linear infinite; will-change: transform; }
/* 호버·키보드 포커스 시 정지 → 읽고 클릭할 수 있게 */
.tagticker:hover .tagticker__track,
.tagticker:focus-within .tagticker__track { animation-play-state: paused; }
.tagticker__set { display: flex; align-items: center; gap: 9px; flex: none; margin: 0; padding: 0 4.5px; list-style: none; }
.tagticker__item { flex: none; }
.tagticker__pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 13px; border-radius: 999px;
  background: var(--surface);
  border: 1px solid hsl(var(--bh), calc(40% * var(--bsat, 1)), 80%);  /* 보드 hue 시스템 재사용 — 랭킹보드와 색감 통일 */
  font-size: 13px; font-weight: 600; letter-spacing: -.01em; color: var(--text);
  white-space: nowrap;
  transition: border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.tagticker__hash { color: hsl(var(--bh), calc(48% * var(--bsat, 1)), 50%); font-weight: 700; }
.tagticker__pill:hover {
  border-color: hsl(var(--bh), calc(55% * var(--bsat, 1)), 62%);
  color: hsl(var(--bh), calc(48% * var(--bsat, 1)), 37%);   /* .rankcard__board 라이트 텍스트 공식과 동일 */
  box-shadow: var(--shadow-sm); text-decoration: none;
}
[data-theme="dark"] .tagticker__pill { background: var(--surface-2); border-color: hsl(var(--bh), calc(28% * var(--bsat, 1)), 30%); }
[data-theme="dark"] .tagticker__hash { color: hsl(var(--bh), calc(60% * var(--bsat, 1)), 70%); }
[data-theme="dark"] .tagticker__pill:hover { border-color: hsl(var(--bh), calc(55% * var(--bsat, 1)), 50%); color: hsl(var(--bh), calc(68% * var(--bsat, 1)), 76%); }

@keyframes tagticker-flow { from { transform: translateX(0); } to { transform: translateX(-50%); } }  /* 한 세트 폭 = 이음매 없음 */
/* 모션 최소화 선호: 흐름 정지, 복제 세트 숨김 → 정적 태그 줄(가장자리 페이드 유지). */
@media (prefers-reduced-motion: reduce) {
  .tagticker__track { animation: none; transform: none; }
  .tagticker__set[aria-hidden="true"] { display: none; }
}

/* ===================== DM(쪽지) ===================== */
.avatar--md { width: 40px; height: 40px; border-radius: 13px; font-size: 16px; }

/* 받은 쪽지함 목록 */
.dmlist { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.dmlist__link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: inherit; }
.dmlist__link:hover { background: var(--surface-2); }
.dmlist__item--unread .dmlist__link { background: var(--brand-soft); }
.dmlist__body { flex: 1; min-width: 0; }
.dmlist__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dmlist__name { font-size: 15px; }
.dmlist__time { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.dmlist__preview { display: block; font-size: 13.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dmlist__item--unread .dmlist__preview { color: var(--text); font-weight: 500; }
.dmlist__badge { flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* 대화 헤더 */
.dm-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.dm-head__back { flex-shrink: 0; transform: rotate(180deg); }
.dm-head__who { display: flex; align-items: center; gap: 10px; color: inherit; min-width: 0; }
.dm-head__id { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.dm-head__id .muted { font-size: 12.5px; }
.dm-head__actions { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }

/* 대화(메시지 + 입력) */
.dm-conversation { display: flex; flex-direction: column; gap: 14px; }
.dm-messages { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; padding: 4px; }
.dm-messages__empty { text-align: center; padding: 32px 12px; }
.dm-msg { display: flex; flex-direction: column; max-width: 78%; }
.dm-msg--mine { align-self: flex-end; align-items: flex-end; }
.dm-msg--theirs { align-self: flex-start; align-items: flex-start; }
.dm-msg__bubble { padding: 9px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.dm-msg--mine .dm-msg__bubble { background: var(--brand); color: var(--on-brand); border-bottom-right-radius: 5px; }
.dm-msg--theirs .dm-msg__bubble { background: var(--surface-2); color: var(--text-strong); border-bottom-left-radius: 5px; }
.dm-msg__deleted { color: var(--text-muted); font-style: italic; }
.dm-msg__meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11.5px; color: var(--text-muted); }
.dm-msg__report { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 2px 4px; border-radius: 6px; font-size: 11.5px; line-height: 1; }
.dm-msg__report:hover { color: var(--danger); background: var(--surface-2); }

/* 입력창 */
.dm-composer { display: flex; gap: 8px; align-items: flex-end; }
.dm-composer__input { flex: 1; resize: vertical; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text-strong); font: inherit; font-size: 14.5px; }
.dm-composer__input:focus { outline: none; border-color: var(--brand); }
.dm-composer__send { flex-shrink: 0; }
.dm-composer__note { padding: 10px 0; font-size: 13.5px; }
