/* =========================================================
   국제학교 라운지 — Home styles
   Light theme, Noto Sans KR, teal-green trust palette
   ========================================================= */

:root {
  /* Neutrals */
  --ink: #17212B;
  --muted: #5B6672;
  --bg: #F6F7F8;
  --border: #E3E6EA;
  --card: #FFFFFF;

  /* Accent — trustworthy teal-green */
  --accent: #0E6B5C;
  --accent-strong: #0A5649;
  --accent-tint: #E6F2EF;
  --accent-ink: #0A4B40;

  /* Badges / lounge tags */
  --parent-fg: #084C40;      /* 인증 학부모 */
  --parent-bg: #D4E8E2;
  --teacher-fg: #6B3708;     /* 인증 교사 */
  --teacher-bg: #F6DFC8;
  --shared-fg: #2A3566;      /* 함께 라운지 */
  --shared-bg: #D8DFF4;

  /* Semantic */
  --success: #15803D;
  --danger: #DC2626;

  /* Shape & motion */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(23, 33, 43, 0.04);
  --shadow-md: 0 6px 20px rgba(23, 33, 43, 0.08);
  --ring: 0 0 0 3px rgba(14, 107, 92, 0.30);
  --t-fast: 140ms ease;
  --t: 200ms ease;

  /* Layout */
  --maxw: 1200px;
  --header-h: 64px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Noto Sans KR', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
}
.skip-link:focus { left: 12px; }

/* ---------- Icons ---------- */
.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; flex: none; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* ========================================================= */
/* Header                                                     */
/* ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.3px; }
.brand-name { white-space: nowrap; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #1A9E7F 100%);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: 4px; }
.main-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast);
}
@media (max-width: 1180px) {
  .header-inner { gap: 14px; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 8px 8px; font-size: 13px; }
}
.main-nav a:hover { color: var(--ink); background: var(--bg); }
.main-nav a.active { color: var(--accent); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { color: var(--ink); border-color: var(--border); background: #fff; }
.btn-ghost:hover { border-color: #C9CFD6; background: var(--bg); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* OAuth(소셜 로그인) 버튼 */
.oauth-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.btn-oauth { padding: 12px 16px; font-size: 15px; border: 1px solid var(--border); background: #fff; color: var(--ink); }
.btn-oauth .oauth-ic { flex: none; }
.btn-oauth:hover { border-color: #C9CFD6; background: var(--bg); }
.btn-google { background: #fff; color: #1F2328; }
.btn-kakao { background: #FEE500; color: #191600; border-color: #FEE500; }
.btn-kakao:hover { background: #F3DC00; border-color: #F3DC00; }
.oauth-list[aria-disabled="true"] { opacity: .6; }
.btn-oauth:disabled { cursor: not-allowed; }

/* 로그인 상태 — 헤더 유저 칩 */
.user-chip { display: inline-flex; align-items: center; gap: 8px; }
.user-chip .uc-name { font-size: 14px; font-weight: 600; color: var(--ink); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.user-chip a.uc-name:hover { color: var(--accent); text-decoration: underline; }
.user-chip .uc-admin { color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); font-weight: 600; }
.user-chip .uc-admin:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* 알림 — 헤더 종 아이콘 + 드롭다운 */
.notif-wrap { position: relative; display: inline-flex; }
.notif-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  background: #fff; color: var(--muted);
  border: 1px solid var(--border); border-radius: 50%;
  cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.notif-btn:hover { color: var(--ink); background: var(--bg); border-color: #C9CFD6; }
.notif-btn.has-unread { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 38%, transparent); }
.notif-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.notif-dot {
  position: absolute; top: -3px; right: -3px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 1;
  border: 2px solid #fff; border-radius: 999px;
}
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: 340px; max-height: 440px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.np-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; background: var(--card);
  border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 700; color: var(--ink);
}
.np-close { background: none; border: 0; padding: 0 2px; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }
.np-close:hover { color: var(--ink); }
.np-empty { margin: 0; padding: 30px 20px; text-align: center; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.np-item {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--ink);
}
.np-item:last-child { border-bottom: 0; }
.np-item:hover { background: var(--bg); }
.np-item.is-new { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.np-item.is-new:hover { background: color-mix(in srgb, var(--accent) 11%, transparent); }
.np-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.np-ic-like { background: #FDECEC; color: var(--danger); }
.np-ic-cmt { background: var(--accent-tint); color: var(--accent-ink); }
.np-body { display: block; min-width: 0; }
.np-msg { display: block; font-size: 13.5px; line-height: 1.5; }
.np-msg strong { font-weight: 700; }
.np-sub {
  display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.np-time { display: block; margin-top: 3px; font-size: 11.5px; color: #8A939D; }
@media (max-width: 520px) {
  .notif-panel { position: fixed; top: calc(var(--header-h) + 8px); left: 16px; right: 16px; width: auto; }
}

/* 정렬 탭 (최신순/인기순) */
.sort-tabs { display: inline-flex; gap: 2px; margin: 0 0 14px; padding: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; }
.sort-tab { font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 6px 16px; cursor: pointer; }
.sort-tab:hover { color: var(--ink); }
.sort-tab.is-on { color: #fff; background: var(--accent); }

/* 국내/해외 교사 라운지 토글 */
.region-toggle { display: inline-flex; gap: 4px; margin: 0 0 18px; padding: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; }
.region-tab { font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; border-radius: 999px; padding: 9px 22px; cursor: pointer; transition: background .15s, color .15s; }
.region-tab:hover { color: var(--ink); }
.region-tab.is-on { color: #fff; background: var(--accent); }
@media (max-width: 480px) { .region-toggle { display: flex; width: 100%; } .region-tab { flex: 1; text-align: center; padding: 10px 8px; } }

/* 마이페이지 */
.mp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.mp-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex: none; }
.mp-id h1 { line-height: 1.2; }
.mp-info { margin: 0 0 18px; border-top: 1px solid var(--border); }
.mp-info > div { display: flex; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--border); }
.mp-info dt { width: 96px; flex: none; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0; }
.mp-info dd { margin: 0; font-size: 14px; color: var(--ink); }
.mp-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ========================================================= */
/* 커뮤니티 — 피드 / 글쓰기 / 글 보기                        */
/* ========================================================= */
.community-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.community-head h2 { margin: 0; font-size: 17px; color: var(--ink); }
.community-head #writeBtn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.community-empty, .community-note { font-size: 14px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 0; }
.community-note { color: #8A6D1A; background: #FBF6E8; border-color: #EBD9A6; }

/* 교사 인증 신청 배너 */
.verify-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 30px 0 4px; }
.verify-cta .vc-text { display: flex; flex-direction: column; gap: 2px; }
.verify-cta .vc-text strong { font-size: 15px; color: var(--ink); }
.verify-cta .vc-text span { font-size: 13.5px; color: var(--muted); }
.verify-cta .btn { flex: none; white-space: nowrap; }

/* 필수 입력 표시 */
.field-label .req { color: #C0392B; font-weight: 700; margin-left: 2px; }

/* 404 */
.notfound { text-align: center; padding: 56px 20px 72px; }
.notfound .nf-code { font-size: 72px; font-weight: 700; line-height: 1; color: var(--accent); letter-spacing: -2px; }
.notfound h1 { margin: 14px 0 8px; font-size: 24px; color: var(--ink); }
.notfound p { margin: 0 auto 24px; max-width: 460px; color: var(--muted); font-size: 15px; }
.notfound .nf-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* 글쓰기 폼 */
.write-card { max-width: 640px; }
.field { display: block; margin: 0 0 16px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field-input { width: 100%; font: inherit; font-size: 14.5px; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.field-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
textarea.field-input { resize: vertical; min-height: 220px; line-height: 1.7; }
.write-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 4px; }
#writeGate { font-size: 14px; }

/* 사진 첨부 */
.field-hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.write-file { display: block; font-size: 13px; color: var(--muted); }
.write-file::file-selector-button { font: inherit; margin-right: 10px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer; transition: background var(--t), border-color var(--t); }
.write-file::file-selector-button:hover { background: var(--bg); border-color: #D4DAE1; }
.img-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.img-thumb { position: relative; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--bg); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(17,24,28,.72); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.img-del:hover { background: rgba(17,24,28,.9); }

/* 닉네임 변경 폼 */
.mp-nick-form { margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.mp-nick-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* 글 보기 본문 */
.pv-body { font-size: 15.5px; line-height: 1.85; color: #2A3139; margin-top: 18px; white-space: normal; word-break: break-word; }
.pv-images { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.pv-img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); }
.comment-section { max-width: 760px; margin-top: 36px; }
.comment-section .cmt-title { font-size: 16px; color: var(--ink); margin: 0 0 6px; }

/* 가입 완료(welcome) 페이지 */
.welcome-wrap { max-width: 560px; margin: 48px auto 64px; text-align: center; }
.welcome-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.welcome-wrap h1 { font-size: 24px; margin: 0 0 8px; color: var(--ink); }
.welcome-wrap .lead { color: var(--muted); margin: 0 0 24px; }
.welcome-steps { list-style: none; counter-reset: wc; margin: 0 0 26px; padding: 0; text-align: left; }
.welcome-steps li { counter-increment: wc; position: relative; padding: 14px 16px 14px 52px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); margin-top: 10px; }
.welcome-steps li::before { content: counter(wc); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.welcome-steps li strong { display: block; font-size: 14.5px; color: var(--ink); }
.welcome-steps li span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.welcome-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 정보글 하단 "지금 라운지에서는" 위젯 */
.lounge-widget { max-width: 760px; margin-top: 32px; padding: 20px 22px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.lounge-widget .lw-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.lounge-widget .lw-h { font-size: 16px; color: var(--ink); margin: 0; }
.lounge-widget .lw-live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: lwPulse 2s ease-in-out infinite; }
@keyframes lwPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .lounge-widget .lw-live { animation: none; } }
.lounge-widget .lw-list { list-style: none; margin: 0; padding: 0; }
.lounge-widget .lw-item { border-top: 1px solid var(--border); }
.lounge-widget .lw-item:first-child { border-top: 0; }
.lounge-widget .lw-link { display: block; padding: 11px 2px; text-decoration: none; min-height: 44px; }
.lounge-widget .lw-link:hover .lw-title { color: var(--accent); text-decoration: underline; }
.lounge-widget .lw-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; font-weight: 500; line-height: 1.45; color: var(--ink); }
.lounge-widget .lw-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted, #6B7682); margin-top: 5px; }
.lounge-widget .lw-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.lounge-widget .lw-ln { font-weight: 600; }
.lounge-widget .lw-parent .lw-dot { background: #1A9E7F; }
.lounge-widget .lw-parent .lw-ln { color: var(--parent-fg); }
.lounge-widget .lw-shared .lw-dot { background: #5B6BC0; }
.lounge-widget .lw-shared .lw-ln { color: var(--shared-fg); }
.lounge-widget .lw-teacher .lw-dot { background: #C97A2B; }
.lounge-widget .lw-teacher .lw-ln { color: var(--teacher-fg); }
.lounge-widget .lw-student .lw-dot { background: #7A5BC0; }
.lounge-widget .lw-preteacher .lw-dot { background: #7A5BC0; }
.lounge-widget .lw-student .lw-ln { color: var(--student-fg, #4A3480); }
.lounge-widget .lw-preteacher .lw-ln { color: var(--student-fg, #4A3480); }
.lounge-widget .lw-lock { display: inline-flex; vertical-align: -1px; color: var(--teacher-fg); }
.lounge-widget .lw-foot { margin-top: 12px; text-align: right; }

/* 사이드바 라운지 매너 카드 */
.manner-list { list-style: none; counter-reset: manner; margin: 10px 0 0; padding: 0; }
.manner-list li { counter-increment: manner; position: relative; padding: 9px 0 9px 30px; font-size: 13.5px; line-height: 1.55; color: var(--ink); border-top: 1px solid var(--border); }
.manner-list li:first-child { border-top: 0; padding-top: 2px; }
.manner-list li::before { content: counter(manner); position: absolute; left: 0; top: 10px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-tint, #E6F2EF); color: var(--accent); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.manner-list li:first-child::before { top: 3px; }

.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 10px; padding: 7px; color: var(--ink); }

/* ========================================================= */
/* Verification notice strip                                  */
/* ========================================================= */
.verify-strip {
  background: linear-gradient(100deg, #0A4B40 0%, #0E6B5C 55%, #148C74 100%);
  color: #fff;
}
.verify-strip-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.verify-strip .vs-icon {
  width: 40px; height: 40px; flex: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  display: grid; place-items: center;
}
.verify-strip h1 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; }
.verify-strip p { margin: 2px 0 0; font-size: 13px; color: rgba(255,255,255,0.82); }
.verify-strip .btn { margin-left: auto; background: #fff; color: var(--accent-ink); }
.verify-strip .btn:hover { background: #E6F2EF; }

/* 홈 취지 소개 밴드 */
.mission { background: var(--accent-tint, #E6F2EF); border-bottom: 1px solid #D6E8E2; }
.mission-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.mission-ic {
  width: 40px; height: 40px; flex: none;
  border-radius: 12px;
  background: #fff;
  color: var(--accent);
  display: grid; place-items: center;
  border: 1px solid #D6E8E2;
}
.mission h2 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--accent-ink); }
.mission p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink); max-width: 860px; }
.mission strong { color: var(--accent-ink); }
@media (max-width: 560px) {
  .mission-inner { padding: 18px 20px; }
  .mission-ic { display: none; }
}

/* ========================================================= */
/* Page layout                                                */
/* ========================================================= */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 14px;
}
.section-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.4px; }
.section-head .more { font-size: 13px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.section-head .more:hover { color: var(--accent-strong); }
.section + .section { margin-top: 36px; }
.subtle { color: var(--muted); font-size: 13px; }

/* ---------- Lounge cards ---------- */
.lounge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.lounge-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}
.lounge-card h3 { color: var(--text); }
.lounge-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--lc, var(--accent));
}
.lounge-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #D4DAE1; }
.lounge-card .lc-top { display: flex; align-items: center; gap: 12px; }
.lounge-card .lc-emoji {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--lc-tint, var(--accent-tint)); color: var(--lc, var(--accent));
}
.lounge-card h3 { margin: 0; font-size: 16px; font-weight: 700; }
.lounge-card .lc-meta { font-size: 12px; color: var(--muted); }
.lounge-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.lounge-card .lc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
/* 글 수는 한 줄을 통째로 써서 '전용 표시'와 겹치지 않게 한다 */
.lounge-card .lc-count { flex: 0 0 100%; order: -1; margin-bottom: 7px; padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.lounge-card .lc-foot > span:not(.lc-count) { white-space: nowrap; }
.lounge-card .lc-lock { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--teacher-fg); }

.lounge-parent { --lc: #0E6B5C; --lc-tint: #E6F2EF; }
.lounge-teacher { --lc: #B45309; --lc-tint: #FBEFE3; }
.lounge-shared  { --lc: #343F7A; --lc-tint: #EEF0F8; }
.lounge-preteacher { --lc: #0B6E99; --lc-tint: #E6F1F7; }

/* ---------- Feed tabs ---------- */
.feed-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.feed-tab {
  background: none; border: none;
  padding: 10px 14px 12px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.feed-tab:hover { color: var(--ink); }
.feed-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Post feed ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 8px 16px;
  padding: 18px 2px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.post:hover { background: #fbfcfd; }
.post-rank {
  grid-row: 1 / -1;
  font-size: 18px; font-weight: 800; color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.3; text-align: center;
}
.post-rank.cold { color: #B8C0C8; }
.post-main { min-width: 0; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.post-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.45; letter-spacing: -0.2px; }
.post-title a:hover { color: var(--accent); }
.post-excerpt { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--muted); }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #C2C8CF; }
.post-author { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--ink); }
.avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #7FBFB0, #4E9F8C);
  color: #fff; font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center; flex: none;
}
.post-stat { display: inline-flex; align-items: center; gap: 4px; }

.post-aside { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; }
.post-thumb {
  width: 108px; height: 76px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--accent-tint);
  flex: none; overflow: hidden; display: block;
}
.post-thumb svg { display: block; width: 100%; height: 100%; }
.bookmark {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.bookmark:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-tint); }

/* ---------- Badges & tags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 600; line-height: 1.4;
}
.badge svg { width: 13px; height: 13px; stroke-width: 2.2; }
.badge-parent { color: var(--parent-fg); background: var(--parent-bg); }
.badge-teacher { color: var(--teacher-fg); background: var(--teacher-bg); }
.badge-shared { color: var(--shared-fg); background: var(--shared-bg); }
.badge-preteacher { color: #4A2E8C; background: #E6E0F7; }

.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500;
  background: #EDEFF2; color: #4A5560;
  border: 1px solid #D9DDE2;
}
.tag.hot { color: var(--accent); background: var(--accent-tint); border-color: transparent; }

/* ========================================================= */
/* Sidebar                                                    */
/* ========================================================= */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--header-h) + 20px); }
.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.widget h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.widget h3 .icon { color: var(--accent); }

/* School finder */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 6px 12px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  transition: all var(--t-fast);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.field-search { position: relative; }
.field-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.field-search input {
  width: 100%; padding: 10px 12px 10px 38px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 13.5px; font-family: inherit; color: var(--ink); background: var(--bg);
}
.field-search input:focus { background: #fff; border-color: var(--accent); outline: none; box-shadow: var(--ring); }
.field-search input::placeholder { color: #9AA3AC; }

/* Admission schedule */
.sched-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sched-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.sched-item:last-child { border-bottom: none; }
.sched-date {
  flex: none; width: 48px; text-align: center;
  background: var(--accent-tint); color: var(--accent-ink);
  border-radius: 8px; padding: 6px 4px;
}
.sched-date .d { font-size: 17px; font-weight: 700; line-height: 1; }
.sched-date .m { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.sched-body { min-width: 0; }
.sched-body .sch-name { font-size: 13.5px; font-weight: 600; margin: 0 0 2px; }
.sched-body .sch-label { font-size: 12px; color: var(--muted); margin: 0; }
.sched-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-decoration: none; color: var(--ink);
}
.sched-link:hover { color: var(--accent-ink); }
.sched-link .sch-name { font-size: 13.5px; font-weight: 600; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sched-link .sch-name .subtle { font-size: 11.5px; font-weight: 400; }
.sched-link .icon-sm { flex: none; color: var(--muted); }
.sched-link:hover .icon-sm { color: var(--accent-ink); }

/* Market / board list */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.mini-item:last-child { border-bottom: none; }
.mini-item .mi-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; flex: none; }
.mini-item .mi-title { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-item:hover .mi-title { color: var(--accent); }
.mini-item .mi-price { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.mini-item .mi-meta { font-size: 11.5px; color: var(--muted); }

/* Guide widget */
.guide-widget { background: linear-gradient(135deg, #E6F2EF 0%, #F2F8F6 100%); border-color: #CBE4DD; }
.guide-widget p { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

/* ========================================================= */
/* Footer                                                     */
/* ========================================================= */
.site-footer { background: #0F1A2A; color: #C6CFDA; margin-top: 40px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 44px 24px 32px; display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.4fr; gap: 32px; }
.footer-inner .brand { color: #fff; margin-bottom: 12px; }
.footer-about p { font-size: 13px; line-height: 1.6; color: #93A1B2; margin: 0; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: #fff; margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 13.5px; color: #AEBBC9; }
.footer-col a:hover { color: #fff; }

.rules-box { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 18px; }
.rules-box h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.rules-box ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.rules-box li { font-size: 12.5px; line-height: 1.55; color: #AEBBC9; }
.rules-box li strong { color: #E7EDF4; font-weight: 600; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); }
.footer-bottom-inner { max-width: var(--maxw); margin: 0 auto; padding: 18px 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; font-size: 12.5px; color: #7E8CA0; }
.footer-bottom a { color: #AEBBC9; }
.footer-bottom a:hover { color: #fff; }

/* Placeholder marker */
.ph { color: var(--muted); font-style: normal; background: repeating-linear-gradient(45deg, #EEF1F4, #EEF1F4 6px, #E6EAEE 6px, #E6EAEE 12px); padding: 0 5px; border-radius: 4px; font-size: 0.92em; }

/* ========================================================= */
/* Responsive                                                 */
/* ========================================================= */
@media (max-width: 960px) {
  .page { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-row: auto; }
  .lounge-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .header-actions .btn-ghost { display: none; }
  .header-actions .user-chip .btn-ghost { display: inline-flex; }
  .user-chip .uc-name { max-width: 80px; }
  .verify-strip-inner { flex-wrap: wrap; }
  .verify-strip .btn { margin-left: 0; width: 100%; justify-content: center; }
  .post { grid-template-columns: 1fr; }
  .post-rank { display: none; }
  .post-aside { flex-direction: row; align-items: center; justify-content: space-between; }
  .post-thumb { width: 92px; height: 64px; order: -1; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 560px) {
  /* 좁은 화면: 종 아이콘 자리를 만들려고 '마이페이지' 버튼을 감추고
     나머지를 한 단계 조인다. (닉네임을 누르면 마이페이지로 갑니다) */
  .header-actions .user-chip .uc-mypage { display: none; }
  .header-actions { gap: 7px; }
  .user-chip { gap: 6px; }
  .user-chip .btn-sm { padding: 6px 9px; font-size: 12.5px; }
  .notif-btn { width: 32px; height: 32px; }
  .notif-btn svg { width: 17px; height: 17px; }
}

@media (max-width: 420px) {
  .header-inner, .verify-strip-inner, .page { padding-left: 16px; padding-right: 16px; }
  .header-inner { gap: 12px; }
  .brand { font-size: 16px; }
  .brand-name small { display: none; }
  .header-actions .btn-primary { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Mobile nav drawer */
.mobile-nav { display: none; }
.mobile-nav.open { display: block; border-bottom: 1px solid var(--border); background: #fff; }
.mobile-nav nav { max-width: var(--maxw); margin: 0 auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 2px; }
.mobile-nav a { padding: 11px 10px; border-radius: 8px; font-weight: 500; color: var(--ink); }
.mobile-nav a:hover { background: var(--bg); }

/* ========================================================= */
/* Sub-page: content container + page header                  */
/* ========================================================= */
.container { max-width: var(--maxw); margin: 0 auto; padding: 28px 24px 64px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.6px; }
.page-head .lead { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; max-width: 680px; }
.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 6px; align-items: center; }
.breadcrumb a:hover { color: var(--accent); }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: #FFF8EC; border: 1px solid #F2E2C4; color: #7A5A1E;
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; margin: 16px 0 22px;
}
.notice svg { flex: none; color: #C8912E; margin-top: 1px; }
.notice strong { font-weight: 700; }

/* ---------- Filter bar ---------- */
.filter-bar { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.filter-bar .field + .field { margin-top: 12px; }
.filter-bar .frow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-bar label,
.filter-bar .frow-label { font-size: 12.5px; font-weight: 700; color: var(--muted); width: 58px; flex: none; }
.filter-bar .frow + .frow { margin-top: 12px; }
.search-input { flex: 1; min-width: 220px; font: inherit; font-size: 13.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; }
.search-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.search-input::placeholder { color: #9AA3AC; }
.result-count { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.result-count b { color: var(--ink); font-weight: 700; }

/* ---------- School directory ---------- */
.school-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.school-card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  display: flex; flex-direction: column; gap: 10px;
}
.school-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #D4DAE1; }
.sc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sc-name { margin: 0; letter-spacing: -0.2px; }
.sc-name .kr { display: block; font-size: 16px; font-weight: 700; color: var(--ink); }
.sc-name .en { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.sc-region { flex: none; font-size: 12px; font-weight: 600; color: var(--accent-ink); background: var(--accent-tint); padding: 4px 10px; border-radius: var(--radius-pill); }
.sc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.curr { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--muted); background: var(--bg); }
.curr.ib { color: var(--accent); background: var(--accent-tint); border-color: transparent; }
.curr.ap { color: var(--shared-fg); background: var(--shared-bg); border-color: transparent; }
.curr.british { color: var(--teacher-fg); background: var(--teacher-bg); border-color: transparent; }
.curr.american { color: #1D5FB0; background: #E9F0FB; border-color: transparent; }
.curr.unknown { color: #8A7322; background: #FBF4DD; border-color: transparent; }
.sc-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding-top: 4px; border-top: 1px dashed var(--border); }
.sc-foot a { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.sc-foot a:hover { color: var(--accent-strong); }

.empty-state { display: none; text-align: center; padding: 48px 20px; color: var(--muted); background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-state.show { display: block; }
.empty-state svg { color: #C2C8CF; margin-bottom: 10px; }

@media (max-width: 760px) {
  .school-grid { grid-template-columns: 1fr; }
  .filter-bar label,
  .filter-bar .frow-label { width: 100%; }
}

/* ---------- Join / verify flow ---------- */
.join-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.join-main { display: flex; flex-direction: column; gap: 18px; }

.steps { display: flex; gap: 8px; list-style: none; margin: 0 0 4px; padding: 0; }
.steps li { flex: 1; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; align-items: center; gap: 8px; }
.steps li .num { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 11px; display: grid; place-items: center; font-weight: 700; }
.steps li.on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-tint); }
.steps li.on .num { background: var(--accent); color: #fff; }

.join-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.join-card h2 { margin: 0 0 4px; font-size: 17px; }
.join-card .step-desc { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.join-card .step-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--accent); text-transform: uppercase; }

.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .opt-body { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 16px; transition: border-color var(--t), background var(--t), box-shadow var(--t); height: 100%; }
.opt .opt-body .opt-ic { font-size: 22px; }
.opt .opt-body h3 { margin: 8px 0 4px; font-size: 15px; }
.opt .opt-body p { margin: 0; font-size: 12.5px; color: var(--muted); }
.opt:hover .opt-body { border-color: #C9CFD6; }
.opt input:checked + .opt-body { border-color: var(--accent); background: var(--accent-tint); box-shadow: var(--ring); }
.opt input:focus-visible + .opt-body { box-shadow: var(--ring); }

.jfield { margin-bottom: 14px; }
.jfield:last-child { margin-bottom: 0; }
.jfield label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.jfield label .req { color: #C0392B; margin-left: 2px; }
.jfield textarea { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px; resize: vertical; min-height: 160px; line-height: 1.7; }
.jfield textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: #fff; }
.jfield input[type="text"], .jfield input[type="email"], .jfield input[type="password"], .jfield select {
  width: 100%; font: inherit; font-size: 13.5px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
}
.jfield input:focus-visible, .jfield select:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: #fff; }
.jfield .hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* 폼 안내 메시지 */
.form-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); min-height: 1em; }
.form-note.is-error { color: #C0392B; }
.form-note.is-ok { color: #15803D; }

/* 본문 속 링크가 링크답게 보이도록 (가입·로그인 카드, 사이드 카드, 힌트) */
.doc-meta a, .side-card a, .jfield .hint a, .form-note a,
.step-desc a, .mp-nick-form a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc-meta a:hover, .side-card a:hover, .jfield .hint a:hover,
.form-note a:hover, .step-desc a:hover { color: #0A5245; }

/* 메일 링크 랜딩 배너 (인증 완료 / 링크 만료) */
.auth-banner {
  margin: 0 0 18px;
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.65;
  color: #0A5245;
  background: var(--accent-tint, #E6F2EF);
  border: 1px solid rgba(14, 107, 92, 0.25);
  border-radius: var(--radius-sm, 8px);
}
.auth-banner.is-error {
  color: #8C2B20;
  background: #FBEEEC;
  border-color: rgba(192, 57, 43, 0.3);
}
.auth-banner a { color: inherit; }

/* 로그인·소셜 구분선 */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* 글 상세 로그인 안내(게이트) */
.login-gate { margin-top: 28px; padding: 36px 24px; text-align: center; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.login-gate-icon { line-height: 1; margin-bottom: 12px; color: var(--accent); }
.login-gate-icon svg { width: 34px; height: 34px; }
.login-gate h2, .post-article .login-gate h2 { font-size: 19px; margin: 0 0 8px; padding: 0; border-left: 0; color: var(--ink); text-align: center; word-break: keep-all; }
.login-gate p, .post-article .login-gate p { margin: 0 auto 20px; max-width: 420px; color: var(--muted); font-size: 14px; line-height: 1.6; text-align: center; word-break: keep-all; }
.login-gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.upload-zone { border: 1.5px dashed var(--border); border-radius: var(--radius-sm); padding: 24px; text-align: center; color: var(--muted); background: var(--bg); }
.upload-zone svg { color: #B5BDC5; margin-bottom: 6px; }
.upload-zone b { color: var(--ink); }

.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink); padding: 10px 0; }
.agree input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.agree a { color: var(--accent); font-weight: 600; }

.join-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

.join-side { display: flex; flex-direction: column; gap: 14px; }
.side-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.side-card h4 { margin: 0 0 10px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.side-card h4 svg { color: var(--accent); flex: none; }
.side-card ul { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.side-card li { font-size: 12.5px; color: var(--muted); line-height: 1.55; display: flex; gap: 8px; }
.side-card li svg { color: var(--accent); flex: none; margin-top: 2px; }
.side-card.tint { background: var(--accent-tint); border-color: transparent; }
.side-card.tint h4, .side-card.tint strong { color: var(--accent-ink); }
.side-card.tint p { margin: 0; font-size: 12.5px; color: var(--accent-ink); line-height: 1.6; }

@media (max-width: 860px) {
  .join-layout { grid-template-columns: 1fr; }
  .steps { flex-wrap: wrap; }
  .steps li { flex: 1 1 100%; }
}

/* ---------- Lounge thread list ---------- */
.lounge-head { display: flex; align-items: center; gap: 10px; }
.lounge-head .badge-shared { font-size: 12px; font-weight: 700; color: var(--shared-fg); background: var(--shared-bg); padding: 4px 11px; border-radius: var(--radius-pill); }

.series-banner { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.series-banner .pin { font-size: 11.5px; font-weight: 700; color: var(--accent); letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 5px; }
.series-banner h2, .series-banner h3 { margin: 8px 0 6px; font-size: 18px; }
.series-banner p { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.series-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.series-list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); transition: border-color var(--t), background var(--t); }
.series-list a:hover { border-color: var(--accent); background: var(--accent-tint); }
.series-list .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.series-list .n-pro { background: var(--ink); font-size: 11px; }
.series-list .t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.series-list .arw { margin-left: auto; color: var(--muted); }

/* Homepage teacher-series hub banner */
.home-series { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; background: linear-gradient(135deg, var(--accent) 0%, #0b574a 100%); color: #fff; border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow-sm); transition: transform var(--t), box-shadow var(--t); }
.home-series:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.home-series .hs-text { flex: 1 1 340px; min-width: 0; }
.home-series .hs-tag { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; color: #fff; background: rgba(255,255,255,0.18); border-radius: 999px; padding: 4px 11px; margin-bottom: 12px; }
.home-series h2 { color: #fff; font-size: 24px; margin: 0 0 8px; }
.home-series p { color: rgba(255,255,255,0.9); font-size: 14px; line-height: 1.6; margin: 0 0 16px; max-width: 54ch; }
.home-series .hs-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: #fff; }
.home-series .hs-cta .icon { transition: transform var(--t); }
.home-series:hover .hs-cta .icon { transform: translateX(3px); }
.home-series .hs-steps { display: flex; flex-direction: column; gap: 8px; flex: none; }
.home-series .hs-steps span { position: relative; font-size: 13px; font-weight: 600; color: #fff; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); border-radius: var(--radius-sm); padding: 9px 16px 9px 34px; }
.home-series .hs-steps span::before { content: ""; position: absolute; left: 15px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #fff; }
@media (max-width: 640px) { .home-series { padding: 22px 20px; } .home-series h2 { font-size: 20px; } .home-series .hs-steps { flex-direction: row; flex-wrap: wrap; } }

.thread-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow-sm); }
.thread { display: flex; gap: 12px; align-items: baseline; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.thread:last-child { border-bottom: none; }
.thread:hover { background: #FAFBFC; }
.thread .tcat { flex: none; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); color: var(--shared-fg); background: var(--shared-bg); }
.thread .tbody { flex: 1; min-width: 0; }
.thread .tbody .tt { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.thread .tbody .tm { font-size: 12px; color: var(--muted); margin-top: 3px; }
.thread .tc { flex: none; font-size: 12.5px; font-weight: 700; color: var(--accent); }

/* ---------- Post article (reading) ---------- */
.post-article { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 34px; box-shadow: var(--shadow-sm); max-width: 760px; }
.post-article .pa-cat { font-size: 12px; font-weight: 700; color: var(--shared-fg); background: var(--shared-bg); padding: 4px 11px; border-radius: var(--radius-pill); }
.post-article h1 { font-size: 24px; line-height: 1.35; margin: 14px 0 10px; }
.post-article .pa-meta { font-size: 12.5px; color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.post-article .pa-meta .verified { color: var(--accent-ink); background: var(--accent-tint); font-weight: 600; padding: 2px 8px; border-radius: var(--radius-pill); }
.post-article h2 { font-size: 17px; margin: 26px 0 8px; padding-left: 10px; border-left: 3px solid var(--accent); }
.post-article p { font-size: 14.5px; line-height: 1.8; margin: 0 0 14px; color: #2A3139; }
.post-article ul, .post-article ol { margin: 0 0 16px; padding-left: 20px; }
.post-article li { font-size: 14.5px; line-height: 1.75; margin-bottom: 7px; color: #2A3139; }
.post-article strong { font-weight: 700; color: var(--ink); }
.post-article .callout { background: var(--accent-tint); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13.5px; color: var(--accent-ink); margin: 18px 0; line-height: 1.7; }
.post-article .disclaimer { background: #FFF8EC; border: 1px solid #F2E2C4; color: #7A5A1E; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 12.5px; line-height: 1.65; margin: 20px 0 0; }
.series-nav { display: flex; justify-content: space-between; gap: 12px; max-width: 760px; margin-top: 18px; }
.series-nav a { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--ink); transition: border-color var(--t); }
.series-nav a:hover { border-color: var(--accent); color: var(--accent); }
.series-nav a.next { text-align: right; }
.series-nav a .lbl { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.series-nav .spacer { flex: 1; }

@media (max-width: 640px) {
  .post-article { padding: 22px 18px; }
}
@media (max-width: 520px) {
  .role-grid { grid-template-columns: 1fr; }
  .join-actions { flex-direction: column-reverse; }
  .join-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- Role badges ---------- */
.rb { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: var(--radius-pill); white-space: nowrap; }
.rb-p { color: var(--parent-fg); background: var(--parent-bg); }
.rb-t { color: var(--teacher-fg); background: var(--teacher-bg); }
.rb-s { color: #114868; background: #D5E8F5; }
/* 예비 교사 — 현직 교사(주황)와 구분되게 보라 계열 */
.rb-pt { color: #4A2E8C; background: #E6E0F7; }

/* ---------- Lounge intro header variants ---------- */
.lounge-head .badge-parent { font-size: 12px; font-weight: 700; color: var(--parent-fg); background: var(--parent-bg); padding: 4px 11px; border-radius: var(--radius-pill); }
.lounge-head .badge-teacher { font-size: 12px; font-weight: 700; color: var(--teacher-fg); background: var(--teacher-bg); padding: 4px 11px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 5px; }

/* Locked notice (teacher lounge) */
/* 큰 패널은 채도를 올리면 과해진다 — 알약만 진해지고 박스는 원래 톤 유지 */
.lounge-locked { display: flex; gap: 12px; align-items: flex-start; background: #FBEFE3; border: 1px solid #EBD3B0; color: #7A4E12; border-radius: var(--radius); padding: 14px 16px; font-size: 13px; line-height: 1.6; margin-bottom: 20px; }
.lounge-locked svg { flex: none; color: var(--teacher-fg); margin-top: 1px; }
.lounge-locked strong { color: #6A430F; }

/* Student lounge header badge */
.lounge-head .badge-student { font-size: 12px; font-weight: 700; color: #15507A; background: #E4F0F8; padding: 4px 11px; border-radius: var(--radius-pill); }
.lounge-head .badge-preteacher { font-size: 12px; font-weight: 700; color: #4A2E8C; background: #E6E0F7; padding: 4px 11px; border-radius: var(--radius-pill); }

/* ---------- Popular ranking widget ---------- */
.pop-rank { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 22px; }
.pop-rank-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.pop-rank-head h2 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0; display: flex; align-items: center; gap: 6px; }
.pop-rank-head h2::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: var(--accent); }
.pop-rank-tabs { display: inline-flex; gap: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 2px; }
.pr-tab { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); background: transparent; border: none; border-radius: var(--radius-pill); padding: 5px 12px; cursor: pointer; transition: color .15s, background .15s; }
.pr-tab:hover { color: var(--ink); }
.pr-tab.is-on { color: #fff; background: var(--accent); }
.pop-rank-list { list-style: none; margin: 0; padding: 0; }
.pr-item { display: flex; align-items: flex-start; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--border); }
.pr-item:first-child { border-top: none; }
.pr-num { flex: none; width: 22px; text-align: center; font-size: 14px; font-weight: 700; color: var(--muted); line-height: 1.5; }
.pr-num.hot { color: var(--accent); }
.pr-link { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.pr-title { font-size: 14.5px; font-weight: 500; color: var(--ink); line-height: 1.45; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.pr-link:hover .pr-title { color: var(--accent); }
.pr-meta { font-size: 12px; color: var(--muted); }
.pr-lock { flex: none; display: inline-flex; color: var(--teacher-fg); }
.pr-lock svg { width: 13px; height: 13px; }
.pop-rank-empty { font-size: 13.5px; color: var(--muted); margin: 6px 2px 2px; }

/* ---------- Mypage level card ---------- */
.mp-level { background: var(--accent-tint); border: 1px solid #CFE6DF; border-radius: var(--radius); padding: 14px 16px; margin: 0 0 18px; }
.mp-level-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.mp-level-badge { font-size: 12px; font-weight: 700; color: #fff; background: var(--accent); padding: 2px 9px; border-radius: var(--radius-pill); }
.mp-level-name { font-size: 15px; font-weight: 700; color: var(--accent-ink); }
.mp-level-count { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.mp-level-bar { height: 8px; border-radius: var(--radius-pill); background: #D6E8E2; overflow: hidden; }
.mp-level-fill { display: block; height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--accent) 0%, #1A9E7F 100%); transition: width .4s ease; }
.mp-level-hint { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.mp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.mp-stat { background: #fff; border: 1px solid #CFE6DF; border-radius: 10px; padding: 10px 8px; text-align: center; }
.mp-stat-n { display: block; font-size: 18px; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.mp-stat-l { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 회원 탈퇴 */
.mp-danger { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.mp-danger-link { background: none; border: none; padding: 0; font-size: 12.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.mp-danger-link:hover { color: #C0392B; }
.mp-danger-box { margin-top: 12px; background: #FBEEEC; border: 1px solid #F0CFC9; border-radius: var(--radius); padding: 14px 16px; }
.mp-danger-box p { font-size: 13.5px; color: #7A2E22; margin: 0 0 10px; }
.mp-danger-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #7A2E22; margin-bottom: 12px; cursor: pointer; }
.mp-danger-check input { margin-top: 2px; }
.btn-danger { background: #C0392B; color: #fff; border: 1px solid #C0392B; }
.btn-danger:hover { background: #A93226; border-color: #A93226; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

/* Inline field helpers (verify-teacher, etc.) */
.hint-inline { font-weight: 400; font-size: 12px; color: var(--muted); }
.field-help { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

/* ---------- Admin approval panel ---------- */
.ad-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 16px; flex-wrap: wrap; }
.ad-tabs { display: inline-flex; gap: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 2px; }
.ad-tab { font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; border: none; border-radius: var(--radius-pill); padding: 6px 14px; cursor: pointer; }
.ad-tab:hover { color: var(--ink); }
.ad-tab.is-on { color: #fff; background: var(--accent); }
.ad-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ad-item { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 16px 18px; }
.ad-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ad-nick { font-size: 15px; color: var(--ink); }
.ad-email { font-size: 12.5px; color: var(--muted); margin-left: 8px; }
.ad-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: var(--radius-pill); }
.ad-badge.wait { color: var(--teacher-fg); background: var(--teacher-bg); }
.ad-badge.ok { color: var(--parent-fg); background: var(--parent-bg); }
.ad-badge.no { color: #8A2B2B; background: #FBE6E6; }
.ad-fields { margin: 0 0 12px; }
.ad-fields > div { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); }
.ad-fields > div:first-child { border-top: none; }
.ad-fields dt { width: 84px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0; }
.ad-fields dd { margin: 0; font-size: 14px; color: var(--ink); line-height: 1.55; overflow-wrap: anywhere; }
.ad-evidence { white-space: pre-wrap; }
.ad-file { margin-bottom: 12px; }
.ad-nofile { font-size: 12.5px; color: var(--muted); }
.ad-actions { display: flex; gap: 10px; }
.ad-msg { font-size: 13px; margin: 10px 0 0; }

/* Thread category color variants */
.thread .tcat.info { color: var(--accent-ink); background: var(--accent-tint); }
.thread .tcat.parent { color: var(--parent-fg); background: var(--parent-bg); }
.thread .tcat.teacher { color: var(--teacher-fg); background: var(--teacher-bg); }
.thread .tcat.hot { color: #B23B2E; background: #FBE9E7; }
.thread .pin-ic { color: var(--accent); margin-right: 2px; vertical-align: -2px; }
.thread .tbody .tm .rb { margin-right: 2px; }

/* Notice page */
.notice-article .notice-pin { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff; background: var(--accent); padding: 3px 10px; border-radius: var(--radius-pill); margin-bottom: 10px; }
.notice-article > h1 { margin-top: 0; }

/* Pinned operator notice rows (top of every lounge list) */
.thread.is-notice { background: var(--accent-tint); }
.thread.is-notice:hover { background: #E2F0ED; }
.thread.is-notice + .thread:not(.is-notice):not(.is-pinned),
.thread.is-pinned + .thread:not(.is-pinned) { border-top: 2px solid var(--border); }
.thread .tcat.notice { color: #fff; background: var(--accent); }
.thread.is-notice .tbody .tt { font-weight: 700; }
.thread.is-notice .tbody .tt a { color: var(--accent-ink); }
/* 운영자가 고정한 글 — 공지보다 한 단계 옅게 */
.thread.is-pinned { background: #F6FAF9; }
.thread.is-pinned:hover { background: var(--accent-tint); }
.thread .tcat.pinned { display: inline-flex; align-items: center; gap: 3px;
  color: var(--accent); background: #fff; box-shadow: inset 0 0 0 1px var(--accent); }
.thread .tcat.pinned .ic-pin { flex: none; }
.thread.is-pinned .tbody .tt { font-weight: 600; }

/* 글 상세 — 운영자 고정 버튼 */
.pin-admin { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pin-admin .btn { display: inline-flex; align-items: center; gap: 6px; }
.pin-admin .btn.is-on { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pin-admin-note { font-size: 12.5px; color: var(--muted); }

/* Lounge sub-tabs (category filter row, visual) */
.lounge-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.lounge-tabs .chip { cursor: pointer; }

/* 커뮤니티 페이지 번호(1 2 3 …) */
.pager {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px; margin: 18px 0 4px;
}
.pg-btn {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all var(--t-fast);
}
.pg-btn:hover:not(:disabled):not(.is-on) { border-color: var(--accent); color: var(--accent); }
.pg-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; cursor: default; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.post-empty { list-style: none; padding: 28px 12px; text-align: center; color: var(--muted); font-size: 14px; }

/* 가입 닉네임: 입력칸 + "새로 뽑기" 버튼 한 줄 배치 */
.nick-row { display: flex; gap: 8px; align-items: stretch; }
.nick-row input { flex: 1 1 auto; min-width: 0; }
.nick-row .nick-roll { flex: none; white-space: nowrap; }

/* ---------- Comments ---------- */
.comments { max-width: 760px; margin-top: 26px; }
.comments h3 { font-size: 15px; margin: 0 0 4px; }
.comments .csub { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }
.comment { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment:last-of-type { border-bottom: none; }
/* 알림을 눌러 들어온 댓글 — 잠깐 강조 */
.comment.is-target {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  box-shadow: inset 3px 0 0 var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding-left: 12px; padding-right: 10px;
  transition: background var(--t), box-shadow var(--t);
}
.comment .av { width: 36px; height: 36px; border-radius: 50%; flex: none; background: linear-gradient(135deg, #7FBFB0, #4E9F8C); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.comment.t-av .av { background: linear-gradient(135deg, #E0A86A, #C9822F); }
.comment .cbody { flex: 1; min-width: 0; }
.comment .chead { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.comment .chead .nm { font-size: 13px; font-weight: 700; color: var(--ink); }
.comment .chead .time { font-size: 12px; color: #97A09A; }
.comment p { margin: 0; font-size: 14px; line-height: 1.7; color: #2A3139; }
.comment .cactions { margin-top: 7px; font-size: 12px; color: var(--muted); display: flex; gap: 16px; }
.comment .cactions span { display: inline-flex; align-items: center; gap: 4px; }
.comment.reply { margin-left: 48px; }
.comment.reply::before { content: "↳"; color: #B8C0C8; margin-right: 4px; margin-left: -18px; }

.comment-form { margin-top: 18px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; max-width: 760px; }
.comment-form textarea { width: 100%; font: inherit; font-size: 13.5px; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; resize: vertical; min-height: 64px; }
.comment-form textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.comment-form .cf-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.comment-form .cf-note { font-size: 12px; color: var(--muted); }

@media (max-width: 520px) {
  .comment.reply { margin-left: 24px; }
}

/* ===== 좋아요 / 신고 (글·댓글 공용) ===== */
.pv-actions { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); max-width: 760px; }
.like-btn, .report-btn, .cmt-reply-btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: var(--radius-pill); padding: 7px 14px; font-size: 13px; font-weight: 600;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.like-btn:hover { border-color: #F3B4B4; color: #E0556F; background: #FDF3F4; }
.like-btn.is-on { border-color: #F2A9B4; color: #E0556F; background: #FCECEF; }
.like-btn.is-on .ic-heart { fill: #E0556F; stroke: #E0556F; }
.like-btn .like-n { font-variant-numeric: tabular-nums; min-width: 8px; }
.report-btn:hover { border-color: #E4B36b; color: #B8740E; background: #FBF4E8; }
.like-btn:disabled { opacity: .6; cursor: default; }

/* 댓글 내 작은 버튼 */
.comment .cactions { margin-top: 9px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.like-sm, .report-sm, .cmt-reply-btn { padding: 4px 10px; font-size: 12px; }
.like-sm .ic-heart { width: 13px; height: 13px; }
.report-sm .ic-flag { width: 12px; height: 12px; }
.cmt-reply-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }

/* 신고 모달 */
.report-modal-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(23,33,43,.45); display: grid; place-items: center; padding: 20px; animation: rmFade .15s ease; }
@keyframes rmFade { from { opacity: 0; } to { opacity: 1; } }
.report-modal { background: #fff; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.25); width: 100%; max-width: 420px; padding: 22px 22px 18px; }
.report-modal .rm-title { margin: 0 0 4px; font-size: 17px; color: var(--ink); }
.report-modal .rm-desc { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.rm-reasons { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.rm-reason { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; color: var(--ink); }
.rm-reason:hover { background: var(--bg); }
.rm-reason input { accent-color: var(--accent); width: 16px; height: 16px; }
.report-modal .rm-detail { width: 100%; font: inherit; font-size: 13.5px; color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 11px; resize: vertical; min-height: 56px; }
.report-modal .rm-detail:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.report-modal .rm-note { margin: 10px 0 0; font-size: 13px; }
.report-modal .rm-note.is-error { color: var(--danger); }
.report-modal .rm-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ===== Marketplace (장터) ===== */
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 4px; }
.market-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: box-shadow var(--t), transform var(--t); }
.market-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.market-card .mc-thumb { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #E6F2EF, #D4E8E2); display: grid; place-items: center; color: var(--accent); }
.market-card .mc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.market-card .mc-cat { font-size: 11px; font-weight: 600; color: var(--accent-ink); background: var(--accent-tint); align-self: flex-start; padding: 1px 8px; border-radius: var(--radius-pill); }
.market-card .mc-title { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.market-card .mc-price { font-size: 15px; font-weight: 700; color: var(--ink); }
.market-card .mc-price .free { color: var(--success); }
.market-card .mc-meta { font-size: 12px; color: var(--muted); margin-top: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.market-card .mc-status { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: var(--radius-pill); }
.mc-status.on { color: var(--success); background: #E7F4EC; }
.mc-status.done { color: var(--muted); background: var(--bg); }

/* ===== FAQ accordion ===== */
.faq-list { max-width: 760px; margin-top: 8px; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { cursor: pointer; padding: 16px 2px; font-size: 14.5px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 20px; font-weight: 400; line-height: 1; flex: none; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a { padding: 0 2px 18px; font-size: 13.5px; line-height: 1.75; color: #2A3139; }
.faq-item .faq-a p { margin: 0 0 10px; }
.faq-item .faq-a p:last-child { margin-bottom: 0; }

/* ===== Simple doc / form pages ===== */
.doc-meta { font-size: 12.5px; color: var(--muted); margin: -4px 0 20px; }
.doc-toc { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 24px; max-width: 760px; }
.doc-toc strong { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.doc-toc ol { margin: 0; padding-left: 18px; }
.doc-toc li { font-size: 13.5px; margin: 4px 0; }
.doc-toc a { color: var(--accent); }

/* ===== Empty state ===== */
.empty-state { max-width: 560px; margin: 40px auto 56px; padding: 44px 28px; text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.empty-state svg { color: var(--accent); opacity: .7; margin-bottom: 14px; }
.empty-state h2 { font-size: 18px; margin: 0 0 8px; color: var(--ink); }
.empty-state p { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 0 auto 20px; max-width: 420px; }

/* ===== Series footer (교사되기 시리즈 전체) ===== */
.series-more { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.series-foot { max-width: 760px; margin: 28px 0 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.series-foot h2 { font-size: 17px; margin: 0 0 6px; }
.series-foot-intro { font-size: 13px; color: var(--muted); margin: 0 0 16px; line-height: 1.65; }
.series-foot-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.series-foot-list li { margin: 0; }
.series-foot-list a, .series-foot-list li.is-current span:first-child ~ span, .series-foot-list li.is-current { display: flex; }
.series-foot-list a { align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); transition: border-color var(--t), background var(--t); }
.series-foot-list a:hover { border-color: var(--accent); background: var(--accent-tint); }
.series-foot-list li.is-current { align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--accent); border-radius: var(--radius-sm); background: var(--accent-tint); }
.series-foot-list .sfn { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.series-foot-list li.is-current .sfn { background: var(--accent); }
.series-foot-list .sft { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.series-foot-list li.is-current .sft { color: var(--accent); }
.series-foot-list li.is-prologue { grid-column: 1 / -1; }
.series-foot-list li.is-prologue a, .series-foot-list li.is-prologue.is-current { border-style: dashed; }
.series-foot-list .sfn-pro { background: var(--ink); }
@media (max-width: 640px) { .series-foot-list { grid-template-columns: 1fr; } }

/* ===== Series disclosure (라운지 정보글 — 눌러서 펼치는 버튼) ===== */
.series-disclosure { margin-top: 22px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); overflow: hidden; }
.series-disclosure > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 18px; user-select: none; transition: background var(--t); }
.series-disclosure > summary::-webkit-details-marker { display: none; }
.series-disclosure > summary:hover { background: var(--accent-tint); }
.series-disclosure > summary:focus-visible { outline: none; box-shadow: var(--ring); }
.series-disclosure .sd-ic { flex: none; color: var(--accent); display: inline-flex; }
.series-disclosure .sd-label { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.series-disclosure .sd-label small { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--accent); }
.series-disclosure .sd-chevron { flex: none; color: var(--muted); display: inline-flex; transition: transform var(--t); }
.series-disclosure[open] .sd-chevron { transform: rotate(180deg); }
.series-disclosure .sd-body { padding: 0 18px 18px; }
.series-disclosure .sd-body > p { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.65; }
@media (prefers-reduced-motion: reduce) { .series-disclosure .sd-chevron { transition: none; } }

/* ===== 교사 전용 비밀글 배지 ===== */
.rb-lock { color: var(--teacher-fg); background: var(--teacher-bg); display: inline-flex; align-items: center; gap: 3px; }
.rb-lock .ic { vertical-align: -1px; }

/* ===== 댓글 답글(대댓글) ===== */
.comment .cactions .cmt-reply-btn { background: none; border: none; padding: 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--accent); cursor: pointer; }
.comment .cactions .cmt-reply-btn:hover { text-decoration: underline; }
.reply-form { margin-top: 10px; }
.reply-form textarea { width: 100%; font: inherit; font-size: 13.5px; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 11px; resize: vertical; min-height: 54px; }
.reply-form textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.reply-form .rf-foot { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ===== 투표(폴) — 글 보기 위젯 + 글쓰기 빌더 ===== */
.pv-poll { margin: 20px 0 4px; padding: 16px; background: var(--panel, #fff); border: 1px solid var(--border); border-radius: var(--radius); }
.pv-poll.is-busy { opacity: .6; pointer-events: none; }
.poll-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.poll-head strong { font-size: 15px; color: var(--ink); }
.poll-total { font-size: 12.5px; color: var(--muted); }
.poll-opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; margin-top: 8px; padding: 10px 14px; font: inherit; font-size: 14px; color: var(--ink); text-align: left; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; overflow: hidden; transition: border-color var(--t); }
.poll-opt:first-of-type { margin-top: 0; }
.poll-opt:hover { border-color: var(--accent); }
.poll-opt:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.poll-opt.is-mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent-tint) 40%, #fff); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: var(--accent-tint); z-index: 0; transition: width .35s ease; }
.poll-opt.is-mine .poll-bar { background: color-mix(in srgb, var(--accent) 18%, #fff); }
.poll-opt-label { position: relative; z-index: 1; flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.poll-mine-mark { display: inline-block; margin-left: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; vertical-align: 1px; }
.poll-pct { position: relative; z-index: 1; flex: none; font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.poll-opt.is-mine .poll-pct { color: var(--accent-ink); }
/* 투표 전 — 결과를 감춘 상태. 고를 수 있는 보기처럼만 보인다 */
.poll-opt.is-hidden-result { justify-content: flex-start; }
.poll-opt.is-hidden-result .poll-opt-label { flex: 1; }
.poll-opt.is-hidden-result::after {
  content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); transition: border-color var(--t);
}
.poll-opt.is-hidden-result:hover::after { border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .poll-bar { transition: none; } }

#pollBuilder { margin-top: 10px; padding: 14px; background: var(--accent-tint); border-radius: var(--radius-sm); }
.poll-opt-row { margin-top: 8px; }
.poll-opt-row:first-child { margin-top: 0; }
.poll-builder-foot { display: flex; gap: 8px; margin-top: 10px; }
#pollBuilder .field-hint { display: block; margin-top: 10px; }

/* 재직 정보 칩 — 닉네임 옆 "제주 · DP" */
.wf {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; margin-left: 2px;
  background: #EDEFF2; color: #4A5560;
  border: 1px solid #D9DDE2; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 600; line-height: 1.5;
  white-space: nowrap; vertical-align: middle;
}
.wf i { font-style: normal; color: #9AA4AE; }
.post-meta .wf, .comment .chead .wf { flex: none; }
.tm .wf { margin-right: 2px; }

/* 마이페이지 — 재직 정보 설정 폼 */
.mp-work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mp-work-grid .field { margin: 0; }
@media (max-width: 560px) { .mp-work-grid { grid-template-columns: 1fr; } }

/* 운영자 대시보드 */
.ad-dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ad-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ad-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--card); }
.ad-card.is-warn { border-color: #E6B98A; background: #FDF6EE; }
.ad-card-l { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.ad-card-v { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.ad-card.is-warn .ad-card-v { color: #8A4A10; }
.ad-card-s { display: block; font-size: 11.5px; color: #8A939D; }
.ad-drip { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); padding: 10px 14px; }
.ad-drip-row { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.ad-drip-row + .ad-drip-row { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--border); }
.ad-drip-row strong { font-size: 12px; color: var(--ink); min-width: 74px; }
.ad-drip-row .is-warn-t { color: #B4540A; font-weight: 600; }
@media (max-width: 760px) { .ad-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .ad-cards { grid-template-columns: 1fr; } }

/* 교사 인증 반려 안내 */
.vt-reject { display: block; border: 1px solid #E6B98A; border-left: 3px solid #C9822F; background: #FDF6EE; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 16px; font-size: 13.5px; line-height: 1.65; color: var(--ink); }
.vt-reject-reason { display: block; margin-top: 8px; padding: 10px 12px; background: #fff; border: 1px solid #EBD3B0; border-radius: var(--radius-sm); white-space: pre-wrap; }
.vt-reject-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #8A4A10; margin-bottom: 4px; }
.vt-reject-foot { display: block; margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* 마이페이지 — 반려 표시 */
.mp-reject { display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; color: #8A4A10; background: var(--teacher-bg); }
.mp-reject-why { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); white-space: pre-wrap; }
.mp-reject-link { display: inline-block; margin-top: 5px; font-size: 12.5px; font-weight: 600; color: var(--accent); }

/* 라운지 카드 — 활동량 */
.lc-count { font-size: 12px; font-weight: 600; color: var(--muted); }
.lc-count strong { color: var(--accent); font-weight: 700; }

/* 헤더 검색 아이콘 */
.hdr-search {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  color: var(--muted); background: #fff;
  border: 1px solid var(--border); border-radius: 50%;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.hdr-search:hover { color: var(--ink); background: var(--bg); border-color: #C9CFD6; }
.hdr-search:focus-visible { outline: none; box-shadow: var(--ring); }

/* 검색 페이지 */
.search-box { display: flex; gap: 8px; max-width: 640px; margin: 0 0 18px; }
.search-input {
  flex: 1; min-width: 0; font: inherit; font-size: 15px;
  padding: 11px 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-pill);
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.search-box .btn { flex: none; }
.s-ex { margin-top: 4px; font-size: 13px; line-height: 1.6; color: var(--muted); }
#searchResults mark { background: #FDF0C8; color: inherit; padding: 0 1px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── 정적 글 페이지에 실리는 답변 ────────────────────────────────
   검색으로 들어온 사람이 질문만 보고 나가지 않게 앞 몇 개를 보여준다. */
.thread-answers { margin: 22px 0 0; }
.thread-answers > h2 { font-size: 16px; margin: 0 0 12px; }
.thread-answers .ta-more { font-size: 13px; font-weight: 400; color: var(--muted); }
.ta {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); padding: 13px 15px; margin-bottom: 10px;
}
.ta:last-child { margin-bottom: 0; }
.ta-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.ta-rb {
  font-size: 11.5px; font-weight: 700; line-height: 1.7;
  padding: 0 8px; border-radius: var(--radius-pill);
  background: var(--accent-tint); color: var(--accent-ink);
}
.ta-nm { font-size: 13px; font-weight: 600; color: var(--ink); }
.ta-body p { margin: 0 0 7px; font-size: 14.5px; line-height: 1.72; color: var(--ink); }
.ta-body p:last-child { margin-bottom: 0; }
.ta-cut { color: var(--muted); }

/* ── 정보글 안의 비교표 ───────────────────────────────────────────
   좁은 화면에서는 표만 옆으로 밀어서 본다. 페이지 전체가 가로로
   밀리면 안 되므로 감싸는 쪽에서 스크롤을 받는다. */
.pa-table-wrap {
  margin: 18px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.pa-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; }
.pa-table th, .pa-table td {
  padding: 10px 13px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border); line-height: 1.6;
}
.pa-table thead th {
  background: var(--accent-tint); color: var(--accent-ink);
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.pa-table tbody th {
  background: var(--bg); font-weight: 600; color: var(--ink);
  white-space: nowrap; width: 1%;
}
/*  표를 옆으로 밀어도 맨 왼쪽 항목 이름은 붙어 있게 —
    4열짜리 표를 폰에서 볼 때 지금 보는 줄이 뭔지 놓치지 않도록. */
.pa-table thead th:first-child,
.pa-table tbody th {
  position: sticky; left: 0; z-index: 1;
  box-shadow: 1px 0 0 var(--border);
}
.pa-table tbody tr:last-child th,
.pa-table tbody tr:last-child td { border-bottom: 0; }
.pa-table td strong { color: var(--accent-ink); }
@media (max-width: 560px) { .hdr-search { width: 32px; height: 32px; } }

/* 데이터 글 — 표 / 통계 박스 */
.tbl-wrap { overflow-x: auto; margin: 14px 0 18px; -webkit-overflow-scrolling: touch; }
.data-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 420px; }
.data-tbl th { background: var(--shared-bg); color: var(--shared-fg); text-align: left; padding: 8px 10px; font-weight: 700; white-space: nowrap; border-bottom: 2px solid #B9C3E4; }
.data-tbl td { padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-tbl tbody tr:nth-child(odd) { background: #FAFBFC; }
.data-tbl td:first-child { color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0 18px; }
.stat-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 10px; text-align: center; background: var(--card); }
.stat-n { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.stat-l { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.callout { border: 1px solid #E6B98A; border-left: 3px solid #C9822F; background: #FDF6EE; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 13px 16px; margin: 16px 0 22px; }
.callout p { margin: 0; font-size: 14px; line-height: 1.7; }
.pa-note { font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--border); padding-left: 10px; margin: -6px 0 18px; }
@media (max-width: 640px) { .stat-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 400px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }

/* 운영자 — 누를 수 있는 현황 카드 */
.ad-card.is-clickable { cursor: pointer; text-align: left; width: 100%; font: inherit; transition: border-color var(--t-fast), background var(--t-fast); }
.ad-card.is-clickable:hover { border-color: var(--accent); background: var(--accent-tint); }
.ad-card.is-clickable:focus-visible { outline: none; box-shadow: var(--ring); }
.ad-card-l { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ad-card-go { font-size: 11px; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* 운영자 — 회원 명단 */
.ad-members { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.ad-members-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.ad-members-head strong { font-size: 14px; }
.ad-members-body { max-height: 440px; overflow: auto; padding: 4px 14px 12px; }
.ad-mtbl { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 13px; }
.ad-mtbl th { position: sticky; top: 0; background: var(--card); text-align: left; padding: 8px 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.ad-mtbl td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-mtbl td:first-child { white-space: normal; min-width: 110px; }
.ad-mtbl td:nth-child(5), .ad-mtbl td:nth-child(6), .ad-mtbl th:nth-child(5), .ad-mtbl th:nth-child(6) { text-align: right; }
.ad-mtbl tr:last-child td { border-bottom: 0; }
.ad-mtag { display: inline-block; margin-left: 5px; white-space: nowrap; padding: 0 6px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.ad-mtag.is-admin { color: #fff; background: var(--accent); }
.ad-mtag.is-demo { color: var(--muted); background: var(--bg); border: 1px solid var(--border); }
.ad-mtag.is-ok { color: var(--teacher-fg); background: var(--teacher-bg); }
.ad-mtbl .ad-mmail { font-size: 12px; color: var(--muted); max-width: 190px; overflow: hidden; text-overflow: ellipsis; }

/* 글 본문 안의 막대그래프 */
.pv-chart {
  margin: 18px 0 20px; padding: 14px 16px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card);
}
.pv-chart figcaption {
  font-size: 13px; font-weight: 700; color: var(--ink);
  margin-bottom: 11px; padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.pvc-row {
  display: grid; grid-template-columns: 92px 1fr minmax(68px, max-content);
  align-items: center; gap: 10px; margin-bottom: 7px;
}
.pvc-row:last-child { margin-bottom: 0; }
.pvc-l {
  font-size: 12.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pvc-track { height: 18px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.pvc-bar {
  display: block; height: 100%;
  background: color-mix(in srgb, var(--accent) 38%, #fff);
  border-radius: 4px; transition: width .4s ease;
}
.pvc-row.is-top .pvc-bar { background: var(--accent); }
.pvc-v {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pvc-row.is-top .pvc-v { color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) { .pvc-bar { transition: none; } }
@media (max-width: 480px) {
  .pvc-row { grid-template-columns: 70px 1fr minmax(56px, max-content); gap: 7px; }
  .pvc-l, .pvc-v { font-size: 11.5px; }
}

/* 비로그인 미리보기 — 앞부분만 보이고 아래가 흐려진다 */
.pv-body.is-preview { position: relative; max-height: 340px; overflow: hidden; }
.pv-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 110px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 88%);
  pointer-events: none;
}
.login-gate.is-under-preview { margin-top: -6px; border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }

/* ── 홈 아래 "최근 올라온 글" — 크롤러용 정적 목록 ───────────────── */
.recent-threads { padding-top: 8px; padding-bottom: 36px; }
.recent-threads h2 { font-size: 19px; margin: 0 0 4px; }
.recent-threads .subtle { margin: 0 0 14px; font-size: 13px; }
.rt-list { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; }
.rt-list li { padding: 7px 0; border-bottom: 1px solid var(--line, #E7EDF4);
  display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rt-list a { color: inherit; text-decoration: none; flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rt-list a:hover { color: var(--accent, #0E6B5C); text-decoration: underline; }
.rt-meta { flex: 0 0 auto; font-size: 12px; color: var(--muted, #6B7A8C); }
.rt-more { margin: 16px 0 0; font-size: 14px; }
.rt-more a { color: var(--accent, #0E6B5C); font-weight: 500; text-decoration: none; }
.rt-more a:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .rt-list { grid-template-columns: 1fr; }
  .rt-meta { display: none; }
}

/* ── 라운지 안 검색 (정렬 탭 옆) ─────────────────────────────────── */
.lounge-toolbar { display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin: 0 0 14px; }
.lounge-toolbar .sort-tabs { margin: 0; }
.lounge-search { position: relative; display: flex; align-items: center;
  margin-left: auto; min-width: 190px; max-width: 280px; flex: 0 1 240px; }
.lounge-search svg { position: absolute; left: 11px; width: 15px; height: 15px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
  pointer-events: none; }
.lounge-search input { width: 100%; font: inherit; font-size: 13.5px;
  color: var(--ink); background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 30px 8px 32px; outline: none;
  transition: border-color .15s, background .15s; }
.lounge-search input::placeholder { color: var(--muted); }
.lounge-search input:focus { background: #fff; border-color: var(--accent); }
.lounge-search input::-webkit-search-cancel-button { display: none; }
.ls-clear { position: absolute; right: 6px; width: 22px; height: 22px;
  font-size: 17px; line-height: 1; color: var(--muted); background: none;
  border: 0; border-radius: 50%; cursor: pointer; }
.ls-clear:hover { color: var(--ink); background: var(--border); }
@media (max-width: 560px) {
  .lounge-search { margin-left: 0; flex: 1 1 100%; max-width: none; }
}

/* ── 카드 아무 데나 눌러도 글로 ──────────────────────────────────── */
.thread.is-clickable { cursor: pointer; }
.thread.is-clickable:hover { background: var(--bg); }
.thread.is-clickable:hover .tt a { color: var(--accent); }

/* ── 운영자 전용: 댓글 작성자 고르기 ─────────────────────────────── */
.as-picker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 10px 0 0; padding: 9px 11px; background: #FFF8E8;
  border: 1px solid #F0DFB4; border-radius: 8px; font-size: 13px; }
.as-picker label { font-weight: 600; color: #8A6A1E; margin: 0; }
.as-picker select { font: inherit; font-size: 13px; color: var(--ink);
  background: #fff; border: 1px solid #E3D3A8; border-radius: 6px;
  padding: 5px 8px; max-width: 320px; }
.as-hint { font-size: 12px; color: #A8893E; margin-left: auto; }
/* 답글 폼 안에서는 더 좁으니 조금 작게, 넘치지 않게 */
.reply-form .as-picker { margin-top: 8px; padding: 7px 9px; font-size: 12.5px; }
.reply-form .as-picker select { max-width: 100%; }

/* ── 운영자 회원 목록: 최근 접속 ─────────────────────────────────── */
.ad-seen { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ad-seen.is-fresh { color: var(--accent); font-weight: 600; }
.ad-seen.is-stale { color: #B45B4B; }

/* 회원 명단 — 글/댓글 숫자를 눌러 펼치는 목록 */
.ad-cnt {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  min-width: 30px;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ad-cnt:hover { background: var(--accent-tint); }
.ad-cnt.is-open { background: var(--accent); border-color: var(--accent); color: #fff; }
.ad-cnt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ad-act > td { background: var(--bg); padding: 0; }
.ad-act-box { padding: 12px 14px; }
.ad-act-head {
  margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.ad-act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ad-act-list > li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.ad-act-link {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  text-decoration: none; color: inherit;
}
.ad-act-link:hover strong, .ad-act-link:hover .ad-act-on { text-decoration: underline; }
.ad-act-lounge, .ad-act-cat {
  font-size: 11.5px; line-height: 1.6; padding: 0 7px; border-radius: 999px;
  background: var(--accent-tint); color: var(--accent); white-space: nowrap;
}
.ad-act-cat { background: #F0F1F1; color: var(--muted); }
.ad-act-on { font-size: 13px; color: var(--muted); }
.ad-act-body {
  margin: 6px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.ad-act-body.is-dim { color: var(--muted); }
.ad-act-when { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ── 운영자: 발행 전 승인 ────────────────────────────────────────── */
.dq-badge { display: inline-block; min-width: 20px; padding: 1px 7px;
  margin-left: 6px; font-size: 12px; font-weight: 700; color: #fff;
  background: #C0552F; border-radius: 999px; vertical-align: middle; }
.dq-bulk { position: sticky; top: 8px; z-index: 5; display: flex;
  align-items: center; gap: 8px; margin: 0 0 12px; padding: 9px 12px;
  background: var(--accent); color: #fff; border-radius: 8px; font-size: 13px; }
.dq-bulk span { font-weight: 600; margin-right: auto; }
/*  초록 바 위의 보조 버튼 — .btn-ghost 는 배경이 흰색이라 글씨가 묻힌다 */
.dq-bulk .btn-ghost { color: #fff; background: transparent;
  border-color: rgba(255,255,255,.7); }
.dq-bulk .btn-ghost:hover { background: rgba(255,255,255,.16);
  border-color: #fff; color: #fff; }
.dq-bulk .btn-primary { background: #fff; color: var(--accent);
  border-color: #fff; font-weight: 700; }
.dq-bulk .btn-primary:hover { background: #EAF4F1; color: var(--accent); }
.dq-card { border: 1px solid var(--border); border-radius: 10px;
  padding: 13px 15px; margin: 0 0 10px; background: #fff; }
.dq-card.is-ok { border-color: var(--accent); background: #F4FAF8; }
.dq-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.dq-pick { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.dq-when { font-weight: 700; color: var(--ink); }
.dq-by { margin-left: auto; font-weight: 500; color: var(--ink); }
.dq-state { background: var(--accent); color: #fff; border-radius: 999px;
  padding: 1px 9px; font-weight: 700; }
.dq-title { font-size: 16px; margin: 0 0 7px; }
.dq-body { font-size: 14px; line-height: 1.6; }
.dq-body p { margin: 0; }
.dq-body p.gap { height: 7px; }
.dq-cmts { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border); }
.dq-c { font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.dq-c b { color: var(--accent); margin-right: 6px; }
.dq-foot { display: flex; gap: 7px; margin-top: 11px; }

/* ── 운영자 큰 탭 (현황 / 유저 승인 / 올라갈 글) ────────────────── */
.ad-sections { display: flex; gap: 4px; margin: 18px 0 22px;
  border-bottom: 1px solid var(--border); overflow-x: auto; }
.ads-tab { position: relative; font: inherit; font-size: 15px; font-weight: 600;
  color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 16px; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.ads-tab:hover { color: var(--ink); }
.ads-tab.is-on { color: var(--accent); border-bottom-color: var(--accent); }
.ads-badge { display: inline-block; min-width: 19px; margin-left: 5px;
  padding: 1px 6px; font-size: 11.5px; font-weight: 700; color: #fff;
  background: #C0552F; border-radius: 999px; vertical-align: middle; }
@media (max-width: 520px) { .ads-tab { font-size: 14px; padding: 10px 11px; } }
/*  큰 탭에서 접힌 묶음 — 안쪽 코드가 hidden 을 되돌려도 가려집니다 */
[data-pane].ads-off { display: none !important; }

/*  hidden 속성이 항상 먹게.
 *  display 를 지정한 묶음(.join-layout, .verify-cta 등)은 기본 [hidden] 규칙보다
 *  세서, JS 로 hidden 을 걸어도 그대로 보이는 일이 있었다. */
[hidden] { display: none !important; }

/* ── 모바일 하단 탭바 ─────────────────────────────────────────────
   760px 이하에서만. 헤더의 주 메뉴가 숨는 지점과 같다. */
.tabbar, .tb-sheet { display: none; }
@media (max-width: 760px) {
  body.has-tabbar { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 18px rgba(15, 26, 42, .05);
    transition: transform .18s ease;
  }
  @supports (backdrop-filter: blur(8px)) {
    .tabbar { background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(10px); }
  }
  .tabbar.is-typing { transform: translateY(110%); }
  .tb-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 56px; padding: 6px 2px 5px;
    background: none; border: 0; font: inherit; cursor: pointer;
    color: var(--muted); font-size: 11.5px; font-weight: 500; letter-spacing: -.01em;
    text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }
  .tb-item svg { transition: transform .12s ease; }
  .tb-item:active svg { transform: scale(.9); }
  .tb-item.is-on { color: var(--accent); font-weight: 700; }
  .tb-item.is-on svg { stroke-width: 2.3; }
  .tb-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 10px; }
  /* 글쓰기는 한 단계 눈에 띄게 */
  .tb-item[data-tb="write"] svg { color: #fff; background: var(--accent); border-radius: 12px;
    padding: 5px; width: 32px; height: 32px; box-sizing: border-box; margin: -5px 0; }
  .tb-item[data-tb="write"] { color: var(--accent-ink); }

  /* 라운지 시트 */
  .tb-sheet { display: block; position: fixed; inset: 0; z-index: 150; }
  .tb-sheet[hidden] { display: none; }
  .tb-sheet-bg { position: absolute; inset: 0; background: rgba(15, 26, 42, .38);
    opacity: 0; transition: opacity .2s ease; }
  .tb-sheet-panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: #fff; border-radius: 18px 18px 0 0;
    padding: 8px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1);
    max-height: 80vh; overflow-y: auto;
  }
  .tb-sheet.is-open .tb-sheet-bg { opacity: 1; }
  .tb-sheet.is-open .tb-sheet-panel { transform: none; }
  .tb-sheet-head { display: flex; align-items: center; justify-content: space-between;
    padding: 10px 4px 8px; font-size: 16px; }
  .tb-sheet-x { display: grid; place-items: center; width: 40px; height: 40px; margin-right: -8px;
    background: none; border: 0; border-radius: 10px; color: var(--muted); cursor: pointer; }
  .tb-sheet-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .tb-lounge { display: flex; flex-direction: column; gap: 2px; min-height: 64px; justify-content: center;
    padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg);
    color: var(--ink); text-decoration: none; }
  .tb-lounge:active { background: var(--accent-tint); }
  .tb-lounge.is-on { border-color: var(--accent); background: var(--accent-tint); }
  .tb-l-name { font-weight: 700; font-size: 15px; }
  .tb-l-sub { font-size: 12.5px; color: var(--muted); }
  .tb-l-teacher .tb-l-name { color: var(--accent-ink); }
  html.tb-lock, html.tb-lock body { overflow: hidden; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .tabbar, .tb-sheet-bg, .tb-sheet-panel, .tb-item svg { transition: none; }
}
