/* ───────────────────────────────────────────────
   탭큐떱이알 — QWER 멤버 컬러 디자인 시스템
   Q 쵸단 #FFFFFF · W 마젠타 #EF87B5 · E 히나 #06BDED · R 시연 #C3D773
   ─────────────────────────────────────────────── */
:root {
  /* 멤버 원색 (테마와 무관하게 고정) */
  --q-chodan: #ffffff;
  --w-magenta: #ef87b5;
  --e-hina: #06bded;
  --r-siyeon: #c3d773;

  /* 라이트 모드: 쵸단의 화이트가 배경 */
  --paper: #ffffff;
  --surface: #f7f3f6;
  --ink: #2b2231;
  --ink-soft: #877e8d;
  --line: #ece5eb;
  --chodan-on-bg: #e9e2e8;          /* 흰 배경 위에서 쵸단 띠가 보이도록 */

  --accent: #d9569b;                /* 마젠타 진하게(가독용) — 버튼/강조 */
  --accent-soft: #fdeef5;
  --link: #0891ba;                  /* 히나 진하게 — 링크/탭 */
  --link-soft: #e8f8fd;
  --point: #8da33c;                 /* 시연 진하게 — 배지/카운트 */
  --danger: #c4452f;
  --concert: #9b5de5;               /* 콘서트 분류 칩 — 보라(다른 분류와 구분) */
  --festival: #e08a2e;              /* 페스티벌 분류 칩 — 앰버(콘서트 보라와 이웃, 축제 느낌) */
  --univ: #d94a6a;                  /* 대학축제 분류 칩 — 로즈(페스티벌 앰버 옆, 청춘 느낌) */
  --broadcast: #0d9488;             /* 방송 분류 칩 — 틸(히나 블루는 시상식이 가져감) */
  --hero-ink: #d6d2da;              /* 히어로 제목 기본색(연회색) — 어두운 스크림 위, 순백보다 부드럽게 */
  --brand-naver: #03c75a;           /* 본문 링크 카드 — 네이버 카페 */
  --brand-weverse: #00b89f;         /* 본문 링크 카드 — 위버스(민트) */
}
html[data-theme="dark"] {
  /* 다크 모드: 쵸단의 화이트가 글자색으로 */
  --paper: #1b1620;
  --surface: #272030;
  --ink: #f5f1f5;
  --ink-soft: #a99fb1;
  --line: #383044;
  --chodan-on-bg: #ffffff;

  --accent: #ef87b5;                /* 다크에선 원색 그대로가 잘 보임 */
  --accent-soft: #3a2533;
  --link: #06bded;
  --link-soft: #15303c;
  --point: #c3d773;
  --danger: #f07a64;
  --concert: #c79bff;               /* 콘서트 분류 칩 — 다크에서 밝은 보라 */
  --festival: #f0a94e;              /* 페스티벌 분류 칩 — 다크에서 밝은 앰버 */
  --univ: #f0788f;                  /* 대학축제 분류 칩 — 다크에서 밝은 로즈 */
  --broadcast: #2dd4bf;             /* 방송 분류 칩 — 다크에서 밝은 틸 */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* display:flex 등이 hidden 속성을 덮어쓰지 않도록 */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  font-size: 15px; line-height: 1.6;
  color: var(--ink); background: var(--paper);
  transition: background 0.2s, color 0.2s;
}
a { color: var(--link); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* 상단바 + 멤버 컬러 스트립(시그니처) */
.topbar { background: var(--paper); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; gap: 8px; height: 52px; }
/* 상단바 전체 항목(로고·메뉴·우측 그룹) 세로 가운데 정렬 */
.topbar-inner > * { align-self: center; }
.brand { display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink);
  flex: none; white-space: nowrap; }   /* 로고는 절대 줄바꿈·축소 금지(공간 우선 확보) */
.brand em { font-style: normal; }
/* 큐떱이알 글자별 멤버 컬러 (가독성 보정 변수 사용).
   큐=쵸단(흰색)은 헤더 흰 배경에서 안 보여 기본 글자색으로 표시. */
.brand .c-q { color: var(--ink); }       /* 큐 = Q 쵸단 */
.brand .c-w { color: var(--accent); }    /* 떱 = W 마젠타 */
.brand .c-e { color: var(--link); }      /* 이 = E 히나 */
.brand .c-r { color: var(--point); }     /* 알 = R 시연 */
.brand-logo { display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px; background: #2b2231; }
html[data-theme="dark"] .brand-logo { background: #131019; }
.member-strip { display: flex; height: 4px; }
.ms { flex: 1; }
.ms-q { background: var(--chodan-on-bg); }
.ms-w { background: var(--w-magenta); }
.ms-e { background: var(--e-hina); }
.ms-r { background: var(--r-siyeon); }

/* 햄버거 버튼 (모바일에서만 표시) */
.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 34px; height: 34px; padding: 0 7px; border: none; background: none; cursor: pointer; }
.nav-toggle-bar { display: block; height: 2px; border-radius: 2px; background: var(--ink); }
/* 계정·테마 그룹: 항상 상단바 우측 */
.nav-bar { display: flex; align-items: center; gap: 10px; margin-left: auto; }
/* 상단바 우측 항목(언어·닉네임·알림·관리·테마)을 세로 가운데로 통일 (표시 방식 차이로 인한 들쭉날쭉 방지) */
.nav-bar > * { display: inline-flex; align-items: center; align-self: center; }
.nav-user { color: var(--ink-soft); font-size: 13px; }
.nav-link { font-size: 13px; font-weight: 600; color: var(--ink); }
.nav-cta { background: var(--accent); color: #fff; padding: 5px 12px; border-radius: 999px; }
.nav-admin { color: var(--accent); }
/* 언어 선택 드롭다운 */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; cursor: pointer;
  color: var(--ink-soft); padding: 2px; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-icon { display: block; width: 20px; height: 20px; }
.lang-list { list-style: none; margin: 0; padding: 6px; position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 132px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); z-index: 70; }
.lang-opt { display: block; padding: 8px 12px; border-radius: 7px; font-size: 13px; color: var(--ink);
  white-space: nowrap; text-decoration: none; }
.lang-opt:hover { background: var(--surface); }
.lang-opt.active { color: var(--accent); font-weight: 700; }
/* 알림 종(닉네임 색과 통일) + 안 읽음 배지 */
.nav-bell { position: relative; display: inline-flex; align-items: center;
  color: var(--ink-soft); line-height: 1; padding: 2px; text-decoration: none; }
.nav-bell-icon { display: block; width: 20px; height: 20px; }
.nav-bell-badge { position: absolute; top: -6px; right: -8px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
/* 알림 목록 */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item { display: flex; align-items: baseline; gap: 10px; padding: 12px 10px;
  border-bottom: 1px solid var(--line); }
.notif-item.unread { background: var(--accent-soft); border-radius: 8px; }
.notif-text { flex: 1; min-width: 0; color: var(--ink); font-size: 14px; }
.notif-time { flex-shrink: 0; font-size: 12px; color: var(--ink-soft); }
.notif-gone { color: var(--ink-soft); font-size: 12px; }
/* 페이지 이동 그룹: 모바일에선 왼쪽 드로어로 슬라이드 */
.nav-menu { position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
  width: 78%; max-width: 300px; display: flex; flex-direction: column; align-items: stretch;
  background: var(--paper); box-shadow: 2px 0 18px rgba(0, 0, 0, 0.18);
  transform: translateX(-100%); transition: transform 0.25s ease;
  overflow-y: auto; -webkit-overflow-scrolling: touch; }
.nav-menu.open { transform: translateX(0); }
.nav-menu .nav-link { padding: 15px 20px; border-bottom: 1px solid var(--line); font-size: 15px; }
.drawer-head { display: flex; align-items: center; justify-content: space-between;
  padding: 13px 12px 13px 20px; border-bottom: 1px solid var(--line); }
.drawer-title { font-weight: 800; font-size: 15px; }
.drawer-close { border: none; background: none; color: var(--ink-soft);
  width: 32px; height: 32px; font-size: 17px; cursor: pointer; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.4);
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease; }
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.theme-toggle { border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  width: 30px; height: 30px; border-radius: 999px; cursor: pointer; font-size: 14px;
  line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
html[data-theme="light"] .theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-dark { display: none; }

/* 공통 */
.page-title { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; margin: 20px 0 12px; }
.page-title .count { font-size: 14px; color: var(--point); font-weight: 700; vertical-align: 4px; }
.section-title { font-size: 16px; font-weight: 700; margin: 24px 0 10px; }
.flash { background: var(--accent-soft); border-left: 3px solid var(--accent);
  padding: 10px 14px; margin: 14px 0; border-radius: 6px; font-size: 14px; }
.btn { display: inline-block; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.btn:disabled { background: var(--line); border-color: var(--line); color: var(--ink-soft);
  cursor: not-allowed; opacity: 1; }   /* 제출 중 등 비활성: 회색 */
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="dark"] .btn-primary { color: #2b1020; }
.btn-hina { background: var(--link); border-color: var(--link); color: #fff; }
html[data-theme="dark"] .btn-hina { color: #08222b; }
.btn-danger { background: var(--paper); border-color: var(--danger); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.link-danger { background: none; border: none; color: var(--danger);
  font-size: 12px; cursor: pointer; padding: 0; }
.empty { color: var(--ink-soft); text-align: center; padding: 36px 0; font-size: 14px; }

/* 목록 */
.list-head { display: flex; align-items: center; justify-content: space-between; }
.search { display: flex; gap: 8px; margin-bottom: 14px; }
.search-bottom { margin-top: 18px; margin-bottom: 0; }
.search input { flex: 1; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: var(--paper); color: var(--ink); }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-card { border-bottom: 1px solid var(--line); position: relative;
  display: flex; align-items: center; gap: 12px; padding: 14px 2px; }
.post-link { color: inherit; text-decoration: none;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-link::after { content: ''; position: absolute; inset: 0; }
.post-text { flex: 1; min-width: 0; }
/* 제목 줄: 칩·댓글배지는 고정, 제목 링크만 말줄임 → 긴 제목에도 댓글 수가 안 잘림 */
.post-title { font-size: 15px; font-weight: 700; margin: 0 0 3px;
  display: flex; align-items: center; min-width: 0; }
.post-title .board-cat { flex-shrink: 0; }
.comment-badge { color: var(--point); font-size: 13px; font-weight: 700; margin-left: 4px; flex-shrink: 0; }
.post-meta { font-size: 12px; color: var(--ink-soft); margin: 0; }
.post-thumb { width: 51px; height: 51px; object-fit: cover; border-radius: 10px;
  flex-shrink: 0; background: var(--surface); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 20px 0; }
.pager-info { font-size: 13px; color: var(--ink-soft); }
.pager-jump { display: flex; align-items: center; gap: 6px; }
.pager-input { width: 52px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; font-size: 13px; text-align: center; background: var(--paper); color: var(--ink);
  -moz-appearance: textfield; appearance: textfield; }
.pager-input::-webkit-outer-spin-button,
.pager-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* 상세 */
.detail-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 20px 0 6px;
  overflow-wrap: anywhere; }
/* 메타(닉네임·날짜·조회수) 좌측, 수정·삭제 등 액션 우측 한 줄 */
.detail-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 6px 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.detail-head .post-meta { margin: 0; }
.detail-actions { display: flex; align-items: center; gap: 5px; margin: 0; flex: 0 0 auto; }
.detail-actions form { display: inline-flex; }
.detail-actions .btn { display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 9px; font-size: 11px; }   /* 상세 액션 버튼: 작게 + 텍스트 정중앙 */
.detail-body { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; margin: 18px 0; }
/* 아주 긴 본문 접기/더보기 (긴 글에 댓글이 묻히지 않게) */
.detail-body.clamped { max-height: 640px; overflow: hidden; position: relative; }
.detail-body.clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 72px; background: linear-gradient(rgba(0,0,0,0), var(--paper)); pointer-events: none; }
.detail-body.expanded { max-height: none; }
.detail-body.expanded::after { display: none; }
.body-more { display: block; margin: 10px auto 0; padding: 7px 18px; font-size: 13px; font-weight: 600;
  color: var(--link); background: var(--paper); border: 1px solid var(--link); border-radius: 999px;
  cursor: pointer; }
.detail-img { display: block; width: 100%; height: auto; border-radius: 12px;
  margin: 12px 0; background: var(--surface); }
.video-embed { width: 100%; max-width: 560px; margin: 12px 0; aspect-ratio: 16 / 9;
  background: var(--surface); border-radius: 12px; overflow: hidden; }
.video-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
/* 인스타그램 임베드 카드 (세로형, 고정 높이) */
.ig-embed { width: 100%; max-width: 400px; margin: 12px 0; }
.ig-embed iframe { display: block; width: 100%; min-height: 540px; border: 0;
  background: var(--surface); border-radius: 12px; overflow: hidden; }
/* 본문 링크 카드 — 네이버 카페·위버스(iframe 차단 사이트는 브랜드 카드로 연결) */
.link-card { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  max-width: 560px; margin: 10px 0; padding: 12px 14px;
  border: 1px solid var(--line); border-left: 4px solid var(--brand-col, var(--link));
  border-radius: 12px; background: var(--surface); text-decoration: none; }
.link-card:hover { border-color: var(--brand-col, var(--link)); }
.link-card-brand { font-weight: 700; color: var(--brand-col, var(--link)); }
.link-card-open { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.link-card-ncafe   { --brand-col: var(--brand-naver); }
.link-card-weverse { --brand-col: var(--brand-weverse); }

/* 댓글 */
.comments { border-top: 1px solid var(--line); margin-top: 28px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment { border-bottom: 1px solid var(--line); padding: 12px 0; }
.comment-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); margin: 0 0 4px; }
.comment-meta form { margin-left: auto; display: inline-flex; align-items: center; }
.comment-body { margin: 0; white-space: pre-wrap; word-break: break-word; }
.comment-deleted { color: var(--ink-soft); font-style: italic; }
/* 댓글 액션(답글·삭제) 묶음 — 우측 정렬 */
.comment-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.comment-actions form { margin: 0; }
.link-reply, .link-danger { display: inline-flex; align-items: center; line-height: 1;
  background: none; border: none; font-size: 12px; cursor: pointer; padding: 0; }
.link-reply { color: var(--link); }
/* 대댓글: 들여쓰기 + 좌측 선 */
.reply-list { list-style: none; margin: 8px 0 0; padding: 0; border-left: 2px solid var(--line); margin-left: 8px; }
.comment-reply { border-bottom: none; padding: 8px 0 8px 14px; }
.comment-reply:not(:last-child) { border-bottom: 1px solid var(--line); }
.reply-arrow { color: var(--ink-soft); }
/* 답글 입력 폼 (대댓글 위치에 맞춰 들여쓰기) */
.reply-form { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; padding-left: 14px; }
.reply-form textarea { padding: 8px 10px; border: 1px solid var(--link); border-radius: 8px;
  font: inherit; resize: vertical; background: var(--paper); color: var(--ink); }
.reply-form textarea:focus-visible { outline-color: var(--link); }  /* 답글창은 히나색 강조 */
.reply-form .btn { align-self: flex-start; }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.comment-form textarea { padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; resize: vertical;
  background: var(--paper); color: var(--ink); }

/* 폼 */
.form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea { padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: var(--paper); color: var(--ink); }
.auth-box { max-width: 360px; margin: 28px auto; }
.auth-alt { font-size: 13px; color: var(--ink-soft); text-align: center; }
.profile-id { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }
.profile-section { margin-top: 32px; }
.profile-section .section-title { font-size: 16px; margin-bottom: 12px; }
.profile-section .field input, .profile-section .field textarea { border-color: var(--r-siyeon); }
.profile-section .field input:focus-visible, .profile-section .field textarea:focus-visible { outline-color: var(--r-siyeon); }
/* 회원 탈퇴: 페이지 맨 아래에 작고 눈에 띄지 않게 */
.profile-withdraw { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-withdraw summary { font-size: 12px; color: var(--ink-soft); cursor: pointer; width: fit-content; }
.profile-withdraw .withdraw-warn { font-size: 12px; color: var(--danger); margin: 12px 0; }
.profile-withdraw .form { gap: 10px; }
.auth-alt a { color: var(--accent); font-weight: 600; }
.auth-alt .link-hina { color: var(--link); }     /* 가입하기 = 히나 */
.auth-alt .link-siyeon { color: var(--point); }  /* 비밀번호 찾기 = 시연 */

/* 관리자 */
.admin-tabs { display: flex; gap: 4px; margin-top: 16px; border-bottom: 2px solid var(--line); }
.tab { padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--link); border-bottom-color: var(--link); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.stat { background: var(--surface); border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; border-top: 3px solid var(--line); }
/* 통계 카드 4장 = 멤버 4명 컬러 */
.stat:nth-child(1) { border-top-color: var(--chodan-on-bg); }
.stat:nth-child(2) { border-top-color: var(--w-magenta); }
.stat:nth-child(3) { border-top-color: var(--e-hina); }
.stat:nth-child(4) { border-top-color: var(--r-siyeon); }
.stat-num { font-size: 26px; font-weight: 800; color: var(--ink); }
.stat-label { font-size: 12px; color: var(--ink-soft); }
.admin-recent { list-style: none; margin: 0; padding: 0; }
.admin-recent li { border-bottom: 1px solid var(--line); padding: 10px 0; }
.admin-desc { font-size: 13px; color: var(--ink-soft); margin: 4px 0 16px; }
.log-filter { display: flex; gap: 6px; margin-bottom: 14px; }
.mod-link { position: relative; z-index: 1; color: var(--ink); text-decoration: underline dotted; font-weight: 600; }
.mod-link:hover { color: var(--accent); }
.mod-section { margin-top: 28px; }
.mod-subtitle { font-size: 14px; font-weight: 600; margin: 16px 0 8px; }
.mod-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.mod-input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: var(--paper); color: var(--ink); }
.mod-select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: var(--paper); color: var(--ink); }
.mod-status { font-size: 13px; color: var(--ink-soft); margin: 6px 0; }
.mod-status.suspended { color: var(--danger); font-weight: 600; }
.admin-actions { display: flex; gap: 6px; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 9px 8px; border-bottom: 1px solid var(--line);
  text-align: left; white-space: nowrap; }
.admin-table th { color: var(--ink-soft); font-weight: 600; }
.row-inactive td { color: var(--ink-soft); background: var(--surface); }

/* 에러/푸터 */
.error-page .error-code { font-size: 44px; font-weight: 800; color: var(--accent); margin: 0 0 6px; }
.footer { color: var(--ink-soft); font-size: 12px; text-align: center; padding: 28px 16px; }

@media (min-width: 640px) {
  body { font-size: 16px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .post-thumb { width: 67px; height: 67px; }
  .hero { padding: 36px 40px; min-height: 340px; }
  .hero-title { font-size: 34px; }
  /* 데스크톱: 햄버거·드로어 끄고 페이지 이동 링크를 인라인으로 (홈은 로고가 대신) */
  .nav-toggle, .drawer-head, .drawer-backdrop { display: none; }
  .nav-home { display: none; }
  .nav-menu { position: static; width: auto; max-width: none; z-index: auto;
    flex-direction: row; align-items: center; gap: 10px; margin-left: auto;
    background: none; box-shadow: none; transform: none; overflow: visible; }
  .nav-menu .nav-link { padding: 0; border-bottom: none; font-size: 13px; }
  .nav-bar { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── 메인 페이지 ── */
/* 히어로: 배경 이미지 + 어두운 스크림 위 텍스트 오버레이.
   이미지는 /static/img/hero.webp 에 두면 적용된다(없으면 surface 색으로 표시). */
.hero { position: relative; margin: 12px 0 4px; padding: 28px 24px;
  min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: 16px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(24,18,28,.22) 0%, rgba(24,18,28,.54) 100%),
    var(--surface) url("/static/img/hero.webp") center / cover no-repeat; }
.hero-title { font-size: 26px; font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.3; margin: 0 0 8px; color: var(--hero-ink);
  text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.hero-title em { font-style: normal; }
/* 히어로 큐떱이알 글자별 멤버 원색 (어두운 스크림 위라 흰색도 잘 보임) */
.hero-title .c-q { color: var(--q-chodan); }   /* 큐 = Q 쵸단(흰색) */
.hero-title .c-w { color: var(--w-magenta); }  /* 떱 = W 마젠타 */
.hero-title .c-e { color: var(--e-hina); }     /* 이 = E 히나 */
.hero-title .c-r { color: var(--r-siyeon); }   /* 알 = R 시연 */
.hero-sub { color: rgba(255,255,255,.88); margin: 0; font-size: 14px;
  text-shadow: 0 1px 10px rgba(0,0,0,.35); }

/* ── QWER 스케줄 달력 ── */
/* sticky 헤더(52px)에 가리지 않도록 #calendar 앵커 점프 시 여백 확보 */
.cal-section { margin: 18px 0 24px; scroll-margin-top: 64px; }
.cal-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 12px; }
.cal-nav { display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  color: var(--ink); font-size: 18px; text-decoration: none; }
.cal-title { font-size: 15px; font-weight: 800; color: var(--link); margin: 0; text-align: center; }
.cal-sub { font-size: 12px; font-weight: 600; color: var(--link); margin-left: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-soft); padding: 4px 0; }
.cal-cell { min-height: 58px; border: 1px solid var(--line); border-radius: 8px;
  padding: 3px; background: var(--paper); overflow: hidden; }
.cal-cell[data-date] { cursor: pointer; }
.cal-cell[data-date]:hover { border-color: var(--ink-soft); }
.cal-empty { background: var(--surface); border-style: dashed; }
.cal-today { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.cal-selected { background: var(--link-soft); border-color: var(--link);
  box-shadow: inset 0 0 0 2px var(--link); }
.cal-detail-head { font-size: 14px; font-weight: 700; color: var(--ink); margin: 16px 0 8px; }
.cal-date { font-size: 12px; font-weight: 700; color: var(--ink); }
.cal-sun { color: #d8584b; }
.cal-sat { color: #3b78c4; }
.cal-chip { display: inline-block; max-width: 100%; font-size: 10px; line-height: 1.5;
  padding: 0 4px; border-radius: 4px; border: 1px solid var(--chip, var(--ink-soft));
  color: var(--chip, var(--ink-soft)); background: transparent;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
/* 달력 셀 안에서는 두 줄까지 표시하되 말줄임(…)은 없이 그냥 컷. 목록의 칩은 기존대로 한 줄. */
.cal-cell .cal-chip { display: block; white-space: normal; overflow: hidden;
  text-overflow: clip; overflow-wrap: anywhere; line-height: 1.5;
  max-height: 3em; margin-top: 2px; }   /* 1.5 × 2줄 = 3em */
.cat-concert  { --chip: var(--concert); }
.cat-event    { --chip: var(--point); }
.cat-festival { --chip: var(--festival); }
.cat-univ     { --chip: var(--univ); }
.cat-music    { --chip: var(--accent); }
.cat-broadcast{ --chip: var(--broadcast); }
.cat-awards   { --chip: var(--link); }
.cat-release  { --chip: var(--danger); }
.cat-etc      { --chip: var(--ink-soft); }
/* 일정 추가 폼 */
.cal-add { margin: 14px 0 4px; }
.cal-add summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--link);
  list-style: none; padding: 6px 0; }
.cal-add summary::-webkit-details-marker { display: none; }
.cal-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px;
  padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cal-form-row { display: flex; gap: 10px; }
.cal-form-row label { flex: 1; }
.cal-form-row .loc-wide { flex: 2.5; }   /* 위치 입력칸을 국내/해외 선택보다 넓게 */
.cal-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px;
  font-weight: 600; color: var(--ink-soft); }
.cal-form input, .cal-form select, .cal-form textarea { padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 14px; background: var(--paper); color: var(--ink); }
.cal-form button { align-self: flex-start; }
/* 이번 달 일정 목록 */
.cal-list { list-style: none; margin: 14px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px; }
.cal-list-item { display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.cal-list-item[hidden] { display: none; }
.cal-list-date { font-weight: 700; color: var(--ink); white-space: nowrap; }
.cal-list-title { font-weight: 600; }
.cal-list-loc { color: var(--point); font-size: 12px; text-decoration: none; white-space: nowrap; }
.cal-list-loc:hover { text-decoration: underline; }
.cal-list-memo { color: var(--ink-soft); font-size: 12px; }
/* 일정 수정 — 메모 언어별 번역 수정 필드 */
.memo-trs { display: flex; flex-direction: column; gap: 10px; margin: 0;
  padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; }
.memo-trs legend { padding: 0 6px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.memo-trs-hint { margin: 0; font-size: 12px; color: var(--ink-soft); }
.cal-edit { margin-left: auto; font-size: 12px; color: var(--link); }
.cal-empty-msg { color: var(--ink-soft); font-size: 13px; text-align: center; padding: 16px 0; }
@media (min-width: 640px) {
  .cal-cell { min-height: 88px; padding: 5px; }
  .cal-chip { font-size: 11px; }
}

.notice-list { list-style: none; margin: 0 0 8px; padding: 0;
  display: flex; flex-direction: column; gap: 10px; }
.notice-card { background: var(--surface); border-radius: 14px;
  border-left: 4px solid var(--line); }
.notice-card.cat-notice { border-left-color: var(--chodan-on-bg); }
.notice-card.cat-fund { border-left-color: var(--w-magenta); }
.notice-card.cat-support { border-left-color: var(--e-hina); }
.notice-link { display: block; padding: 14px 16px; color: inherit; }
.notice-top { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px; }
.cat-badge { display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; background: var(--paper);
  border: 1px solid var(--line); color: var(--ink-soft); }
.cat-fund .cat-badge, .cat-badge-fund { color: var(--accent); border-color: var(--accent); }
.cat-support .cat-badge, .cat-badge-support { color: var(--link); border-color: var(--link); }
.notice-deadline { font-size: 12px; color: var(--ink-soft); }
.notice-title { font-size: 15px; font-weight: 700; margin: 0; }

/* 모금 진행률 바 */
.fund-progress { height: 8px; border-radius: 999px; background: var(--paper);
  border: 1px solid var(--line); overflow: hidden; margin-top: 10px; }
.fund-progress-lg { height: 12px; }
.fund-bar { height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--w-magenta), var(--e-hina), var(--r-siyeon)); }
.fund-meta { font-size: 13px; color: var(--ink-soft); margin: 6px 0 0; }
.fund-meta strong { color: var(--ink); }
.fund-pct { color: var(--point); font-weight: 700; margin-left: 4px; }
.fund-box { background: var(--surface); border-radius: 14px; padding: 14px 16px; margin: 14px 0; }
.fund-box .fund-progress { margin-top: 0; }

/* 공지 폼 */
.field select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: var(--paper); color: var(--ink); }
.fund-fields { display: flex; flex-direction: column; gap: 14px; }
.admin-actions { display: flex; gap: 6px; align-items: center; }
.admin-actions form { display: inline; margin: 0; }

/* 권한 배지 */
.role-badge { display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink-soft); background: var(--paper); }
.role-eraser { color: var(--point); border-color: var(--point); }
.role-scheduler { color: var(--link); border-color: var(--link); }
.role-admin { color: var(--accent); border-color: var(--accent); }
.help-text { font-size: 13px; color: var(--ink-soft); margin: -4px 0 12px; }

/* 가입 완료 보안코드 / 폼 에러 / 관리 내역 */
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface); border: 1px dashed var(--accent); border-radius: 12px;
  padding: 14px 16px; margin: 14px 0; }
.code-value { font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 18px; font-weight: 700; letter-spacing: 1px; color: var(--accent); }
/* 약관·개인정보처리방침 */
.policy-intro { font-size: 14px; color: var(--ink-soft); margin: 0 0 8px; }
.policy-box { max-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: var(--surface); color: var(--ink-soft);
  font-size: 13px; line-height: 1.7; margin: 8px 0 18px; }
.policy-box h3 { font-size: 14px; color: var(--ink); margin: 14px 0 4px; }
.policy-box h3:first-child { margin-top: 0; }
.policy-box ul { margin: 4px 0; padding-left: 18px; }
.policy-box p, .policy-box li { margin: 4px 0; }
.policy-foot { color: var(--ink); font-size: 12px; margin-top: 12px; }
/* 정책 열람 페이지(/policy): 좁은 auth-box·260px 스크롤 박스에서 벗어나 넓고 전체가 보이게 */
.auth-box.policy-view { max-width: none; }
.policy-view .policy-box { max-height: none; overflow: visible; border: none; background: none;
  padding: 0; color: var(--ink); font-size: 14.5px; margin: 8px 0 26px; }
.check { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0; font-size: 14px; }
.check input { margin-top: 3px; flex-shrink: 0; }
.footer a { color: var(--ink-soft); }

/* 이미지 첨부/수정 통합 리스트 (썸네일·순서 ▲▼·삭제 ✕) */
.file-attach { list-style: none; margin: 8px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.file-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px;
  flex-shrink: 0; background: var(--paper); }
.file-name { flex: 1; min-width: 0; font-size: 13px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-drag { flex-shrink: 0; cursor: grab; color: var(--ink-soft); font-size: 18px;
  padding: 4px 6px; touch-action: none; user-select: none; -webkit-user-select: none; }
.file-drag:active { cursor: grabbing; }
.file-item.dragging { opacity: 0.6; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); }
.file-move { flex-shrink: 0; border: 1px solid var(--danger); background: var(--paper);
  color: var(--danger); font-size: 14px; line-height: 1; padding: 6px 9px;
  border-radius: 7px; cursor: pointer; }
/* 목록 대표 이미지 선택(라디오형) */
.file-thumb-pick { flex-shrink: 0; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink-soft); font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 9px;
  border-radius: 7px; cursor: pointer; white-space: nowrap; }
.file-thumb-pick.is-thumb { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* 업로드 진행률 바 */
.upload-progress { margin: 10px 0 0; }
.upload-bar { height: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; }
.upload-bar-fill { height: 100%; width: 0; background: var(--link); transition: width 0.15s ease; }
.upload-pct { display: inline-block; margin-top: 5px; font-size: 12px; color: var(--ink-soft); }
/* 클라이언트 변환(업로드 전) 안내 */
.convert-note { margin: 8px 0 0; font-size: 12px; color: var(--link);
  animation: convert-pulse 1s ease-in-out infinite; }
@keyframes convert-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
/* 서버 변환 대기: 진행률을 알 수 없어 움직이는 불확정 바로 표시 */
.upload-bar.indeterminate .upload-bar-fill { width: 40%; transition: none;
  animation: upload-indet 1.1s ease-in-out infinite; }
@keyframes upload-indet { from { margin-left: -40%; } to { margin-left: 100%; } }

/* 사진 아카이브: 날짜별 일정 추천 칩 */
.suggest-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.suggest-label { font-size: 12px; color: var(--ink-soft); }
.suggest-chip { border: 1px solid var(--link); color: var(--link); background: var(--link-soft);
  font: inherit; font-size: 13px; font-weight: 600; padding: 4px 11px;
  border-radius: 999px; cursor: pointer; }
.suggest-chip:hover { background: var(--link); color: #fff; }
html[data-theme="dark"] .suggest-chip:hover { color: #08222b; }

.email-row { display: flex; gap: 8px; }
.email-row input { flex: 1; min-width: 0; }
.email-row .btn { white-space: nowrap; flex-shrink: 0; }
.field-error { color: var(--danger); font-size: 13px; margin: -6px 0 0; }
.field-status { font-size: 12px; margin: -4px 0 0; }
.field-status.ok { color: var(--e-hina); }
.field-status.ng { color: var(--danger); }
.field-status.checking { color: var(--ink-soft); }
.admin-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-tabs .tab { white-space: nowrap; }
.log-detail { white-space: normal; word-break: break-word; min-width: 200px; }

/* 번역 */
.translate-bar { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; }
.translate-bar select { padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 13px;
  background: var(--paper); color: var(--ink); }
.translate-result { background: var(--surface); border-left: 3px solid var(--link);
  border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
.translate-label { font-size: 12px; color: var(--link); font-weight: 700; margin: 0 0 6px; }
.translate-title { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }

/* 자유게시판 분류 탭 — 스크롤 없이 한 줄에 균등 배치 */
.board-tabs { display: flex; gap: 4px; margin: 4px 0 8px; border-bottom: 2px solid var(--line); }
.board-tabs .tab { flex: 1; min-width: 0; text-align: center; white-space: nowrap;
  padding: 8px 4px; font-size: 13px; }
.board-cat { display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 4px 7px 2px; border-radius: 999px; vertical-align: middle; margin-right: 5px;
  color: var(--cat, var(--ink-soft)); border: 1px solid currentColor; }   /* 위 패딩↑: 한글 글자 박스 중앙 보정 */
.detail-title .board-cat { font-size: 13px; vertical-align: 4px; }
.board-cat-general { --cat: var(--ink-soft); }
.board-cat-fanart  { --cat: var(--r-siyeon); }
.board-cat-review  { --cat: var(--link); }
.board-cat-verify  { --cat: var(--point); }
.board-cat-event   { --cat: var(--accent); }

/* 단어 필터(설정) */
.banword-list { list-style: none; margin: 14px 0 0; padding: 0; }
.banword-item { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.banword { font-weight: 600; word-break: break-all; }

/* 사진 아카이브 */
.gallery-intro { color: var(--ink-soft); font-size: 13px; margin: -4px 0 18px; }
.gallery-group { margin: 0 0 26px; }
.gallery-date { font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
  color: var(--ink); margin: 0 0 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--line); }
.gallery-grid { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery-item { margin: 0; }
.gallery-link { position: relative; display: block; border-radius: 12px;
  overflow: hidden; background: var(--surface); color: #fff; }
.gallery-thumb { display: block; width: 100%; aspect-ratio: 1 / 1;
  object-fit: cover; background: var(--surface); }
.gallery-noimg { display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 13px; }
.gallery-count { position: absolute; top: 8px; right: 8px;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; }
.gallery-caption { position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 1px; padding: 18px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72)); }
.gallery-name { font-size: 13px; font-weight: 700; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-by { font-size: 11px; opacity: 0.85; }
.gallery-detail-date { font-size: 13px; font-weight: 700; color: var(--link);
  margin: 20px 0 0; }
@media (min-width: 560px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── 영상 아카이브 ── */
.date-jump { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 6px 0 18px; font-size: 13px; color: var(--ink-soft); }
.date-jump label { font-weight: 700; }
.date-jump input[type="date"] { padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--paper); color: var(--ink); }
.video-group { margin-bottom: 22px; }
.video-list { list-style: none; margin: 8px 0 0; padding: 0; }
.video-row { border-bottom: 1px solid var(--line); }
.video-row-link { display: flex; gap: 12px; align-items: center; padding: 9px 4px;
  text-decoration: none; color: var(--ink); }
.video-row-link:hover { background: var(--surface); }
.video-thumb-wrap { position: relative; flex: 0 0 auto; width: 120px; aspect-ratio: 16 / 9;
  border-radius: 8px; overflow: hidden; background: #000; }
.video-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; text-shadow: 0 1px 4px rgba(0,0,0,.6); opacity: .9; }
.video-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.video-title { font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-sub { font-size: 12.5px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-channel { font-weight: 600; color: var(--link); }
/* 반응형 16:9 임베드 */
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 14px 0 4px;
  border-radius: 12px; overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-yt-link { font-size: 13px; margin: 8px 0 0; }
.video-link-row { display: flex; gap: 8px; }
.video-link-row input { flex: 1 1 auto; min-width: 0; }
.field-msg { font-size: 13px; color: var(--accent); margin: 6px 0 0; }
/* 불러온 뒤 입력 영역: .form과 동일한 세로 간격으로 통일 */
.video-fields { display: flex; flex-direction: column; gap: 14px; }
.video-fields[hidden] { display: none; }   /* display 지정 시 hidden이 무시되지 않게 */
.video-preview { display: flex; gap: 12px; align-items: center; margin: 2px 0; }
.video-preview[hidden] { display: none; }
.video-preview-thumb { width: 160px; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 10px; background: #000; flex: 0 0 auto; }
@media (max-width: 560px) {
  .video-thumb-wrap { width: 96px; }
  .video-preview-thumb { width: 120px; }
}

/* ── 웹 푸시 토글 ── */
.push-box { display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); }
.push-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.push-desc { font-size: 12.5px; color: var(--ink-soft); }
.push-msg { font-size: 12.5px; color: var(--link); }
.push-box button { flex: 0 0 auto; }

/* ── PWA 설치 안내 / 알림 프롬프트 ── */
.install-guide { margin: 16px 0; padding: 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface);
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.install-guide strong { font-size: 14px; }
.install-hint { font-size: 13px; color: var(--ink-soft); margin: 0; }
.app-prompt { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between;
  max-width: 656px; margin: 0 auto; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18); }
.app-prompt-text { font-size: 13.5px; font-weight: 600; flex: 1 1 180px; }
.app-prompt-actions { display: flex; gap: 8px; flex: 0 0 auto; }

/* ── 좋아요 / 인기 정렬 ── */
.board-sort { display: flex; gap: 6px; margin: 0 0 14px; }
.sort-link { font-size: 13px; font-weight: 700; color: var(--ink-soft);
  padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); }
.sort-link.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.like-count { color: var(--accent); font-weight: 700; }
.like-bar { text-align: center; margin: 22px 0 6px; }
.like-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 24px; transition: color .15s, border-color .15s, background .15s; }
.like-btn:hover { border-color: var(--accent); color: var(--accent); }
.like-btn .like-heart { font-size: 16px; color: var(--ink-soft); transition: color .15s, transform .15s; }
.like-btn:hover .like-heart { color: var(--accent); }
.like-btn.liked { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.like-btn.liked .like-heart { color: var(--accent); transform: scale(1.15); }

/* ── 프로필 아바타 ── */
.avatar { display: inline-block; border-radius: 50%; object-fit: cover;
  vertical-align: middle; background: var(--surface); flex: none; }
.avatar-fallback { color: #fff; text-align: center; font-weight: 800;
  overflow: hidden; box-sizing: border-box; }
/* 닉네임 옆 아바타: 메타 줄에서 텍스트와 세로 중앙 정렬 (vertical-align은 한글에서 위로 떠 보임) */
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0 5px; }
.gallery-by, .video-by,
.comment-meta > span { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.avatar-edit-forms { display: flex; flex-direction: column; gap: 8px; }
.avatar-edit-forms .form { margin: 0; }
.avatar-edit-forms input[type="file"] { font-size: 12px; max-width: 200px; }
.profile-hint { font-size: 12.5px; color: var(--ink-soft); margin: 4px 0 0; }

/* ── 아바타 크롭 ── */
.avatar-edit { flex-wrap: wrap; }
.avatar-cropper { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.cropper-stage { position: relative; width: 220px; height: 220px; border-radius: 12px;
  overflow: hidden; background: #000; }
.cropper-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.cropper-stage canvas:active { cursor: grabbing; }
.cropper-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45); border: 2px solid rgba(255, 255, 255, 0.85); }
.avatar-cropper input[type="range"] { width: 220px; accent-color: var(--accent); }

/* ── 게시글 작성기(위지윅·서식 툴바·임시저장) ── */
.fs-lg { font-size: 1.32em; }
.fs-sm { font-size: 0.82em; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ed-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 7px; padding: 4px 11px; font-size: 13px; cursor: pointer; line-height: 1.25; }
.ed-btn:hover { border-color: var(--accent); }
.ed-btn.active { font-weight: 700; }
.ed-btn[data-cmd].active { background: var(--link); color: #fff; border-color: var(--link); }    /* 볼드 = 히나색 */
html[data-theme="dark"] .ed-btn[data-cmd].active { color: #08222b; }
.ed-btn[data-size].active { background: var(--r-siyeon); color: #2b2231; border-color: var(--r-siyeon); }  /* 글자 크기 = 시연색 */
.ed-btn b { font-weight: 800; }
/* 작게/크게 라벨 span이 .field span(흐린 색·600)을 물려받지 않도록 보통 버튼과 통일 */
.editor-toolbar .ed-btn span { font: inherit; color: inherit; }
.wysiwyg { min-height: 200px; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; background: var(--paper); color: var(--ink); line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.wysiwyg:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.wysiwyg:empty::before { content: attr(data-placeholder); color: var(--ink-soft); pointer-events: none; }
/* 에디터 안 span이 .field span(라벨용 13px·600·흐린색)을 상속하지 않도록 + 크기 클래스 복원 */
.wysiwyg span { color: inherit; font-weight: inherit; font-size: inherit; }
.wysiwyg .fs-lg { font-size: 1.32em; }
.wysiwyg .fs-sm { font-size: 0.82em; }
.draft-restore { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.draft-restore .draft-actions { display: flex; gap: 6px; flex: none; }
.draft-discard { color: var(--danger); }

/* ── 본문 인라인 이미지 ── */
.post-inline-img { display: block; max-width: 100%; height: auto; border-radius: 12px;
  margin: 14px 0; background: var(--surface); }
.wysiwyg img { display: block; max-width: 100%; height: auto; border-radius: 10px;
  margin: 10px 0; cursor: move; }            /* 끌어서 위치 변경(데스크톱) */
.wysiwyg img::selection { background: var(--accent-soft); }
.wysiwyg [data-uploading] { color: var(--ink-soft); font-style: italic; margin: 8px 0; }
.ed-img-btn { font-weight: 600; }
.editor-hint { font-size: 12px; color: var(--ink-soft); margin: 6px 0 0; }

/* ── 이벤트 댓글 추첨 ── */
.draw-config { border: 1px dashed var(--point); border-radius: 10px; padding: 12px 14px; background: rgba(195, 215, 115, 0.12); }
.draw-config > span { font-weight: 700; color: var(--ink); }
.draw-config > span small { font-weight: 400; color: var(--ink-soft); }
.draw-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 2px; }
.draw-sub { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.draw-sub input { width: auto; }
.draw-box { margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface);
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.draw-status { margin: 0; font-weight: 700; color: var(--point); }
.draw-form { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0; }
.draw-form input[type="number"] { flex: none; width: 62px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--paper); color: var(--ink); text-align: center; }
.draw-form .btn { flex: none; background: var(--link); border-color: var(--link); color: #fff; white-space: nowrap; }
html[data-theme="dark"] .draw-form .btn { color: #08222b; }   /* 히나색 위 어두운 글자(다크) */

/* 추첨 당첨 댓글 문구 입력 */
.draw-config .draw-msg-field { margin-top: 8px; }
.draw-config .draw-msg-field input { width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--paper); color: var(--ink); }
.draw-msg-input { flex: 1 1 auto; min-width: 0; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--paper); color: var(--ink); }

/* ── 사진 아카이브 멤버 태그 칩 ── */
.member-tags, .member-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.member-tags { margin: 4px 0 12px; }
.member-filter { margin: -4px 0 14px; }
.member-tags form { display: inline; margin: 0; }
.member-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700;
  padding: 2px 11px; border-radius: 999px; border: 1.5px solid var(--mc, var(--ink-soft));
  color: var(--mc, var(--ink-soft)); background: transparent; cursor: pointer;
  text-decoration: none; line-height: 1.7; font-family: inherit; }
.member-chip.on { background: var(--mc, var(--ink-soft)); color: #2b2231; border-color: var(--mc, var(--ink-soft)); }
.member-chip.off { opacity: .4; border-style: dashed; }
button.member-chip.off:hover, .member-filter .member-chip.off:hover { opacity: .8; }
.mc-chodan { --mc: var(--chodan-on-bg); }
.mc-magenta { --mc: var(--w-magenta); }
.mc-hina { --mc: var(--e-hina); }
.mc-siyeon { --mc: var(--r-siyeon); }
.mc-auto { font-size: 9px; font-weight: 800; opacity: .75; letter-spacing: .5px; }
.gallery-members { display: inline-flex; align-items: center; gap: 3px; margin-left: 5px; vertical-align: 1px; }
.member-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--mc, var(--ink-soft)); border: 1px solid var(--line); }

/* 관리자: 멤버 얼굴 기준 사진 목록 */
.faceref-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.faceref-item { display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.faceref-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; }
.faceref-status { font-size: 12px; color: var(--point); font-weight: 700; }
