:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface2: #e8f6f5;
  --border: #dde3e0;
  --border2: #c3d6d3;
  --text: #16233a;
  --muted: #75847f;
  --accent: #3b5bdb;
  --accent2: #3b5bdb;
  --danger: #d64545;
  --success: #2f9e6e;
  --radius: 8px;
  --font-serif: 'Black Han Sans', 'Noto Serif KR', serif;
  --font-sans: 'Noto Sans KR', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* 스크롤바를 시각적으로 숨김(스크롤 동작은 그대로 유지) — 페이지마다 스크롤 유무로 레이아웃이 밀리지 않음 */
html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* 구형 Edge */
}
html::-webkit-scrollbar { display: none; } /* Chrome/Edge/Safari */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  min-height: 100vh;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: #ffde00;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  font-weight: 700;
}
.nav-menu {
  display: flex; align-items: center; gap: 2px;
  visibility: hidden;
}
.nav-menu.visible { visibility: visible; }
.nav-item {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  color: var(--muted);
  padding: 6px 12px; border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-item:hover { color: var(--text); background: #e9b20b; }
.nav-item.active { color: var(--accent); font-weight: 700; }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-user-wrap {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.nav-user-icon {
  width: 22px; height: 22px; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--border2);
  background: #ffffff;
}
.nav-user { font-size: 13px; color: var(--muted); }

/* ── 모바일 햄버거 메뉴 (데스크톱에서는 숨김, 640px 이하에서만 표시) ── */
.nav-hamburger {
  display: none; background: none; border: none; color: var(--text);
  cursor: pointer; padding: 6px; flex-shrink: 0;
  align-items: center; justify-content: center;
}
.mobile-menu-backdrop {
  display: none; position: fixed; top: 56px; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.3); z-index: 150;
}
.mobile-menu-backdrop.show { display: block; }
.mobile-menu {
  display: none; position: fixed; top: 56px; right: 0; left: 0; z-index: 151;
  background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  padding: 1.2rem 1.2rem 1.5rem;
  max-height: calc(100vh - 56px); overflow-y: auto;
}
.mobile-menu.show { display: block; }
.mobile-menu-user-row {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  cursor: pointer; margin-bottom: 1rem;
}
.mobile-menu-user-icon {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--border2);
}
.mobile-menu-user-name { font-size: 14px; color: var(--text); font-weight: 500; }
.mobile-menu-actions { display: flex; gap: 8px; margin-bottom: 1.2rem; }
.mobile-menu-actions .btn { flex: 1; }
#mobile-btn-login { display: block; width: 100%; margin-bottom: 1.2rem; }
.mobile-menu-list { display: flex; flex-direction: column; gap: 2px; }
.mobile-menu-item {
  background: none; border: none; text-align: left; cursor: pointer;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  color: var(--muted); padding: 12px 10px; border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.mobile-menu-item:hover { color: var(--text); background: var(--surface2); }
.mobile-menu-item.active { color: var(--accent); font-weight: 700; background: var(--surface2); }

/* ── 이미지 원본 크기 모달 ── */
.img-modal {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.85);
  align-items: center; justify-content: center;
  cursor: zoom-out; padding: 2rem;
}
.img-modal.show { display: flex; }
.img-modal img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ── BUTTONS ── */
.btn {
  padding: 8px 18px; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: all 0.18s ease;
}
.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-primary:hover { background: #2c46b0; }
.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--border2);
}
.btn-ghost:hover { background: var(--surface2); }
.btn-danger {
  background: transparent; color: var(--danger); border-color: var(--danger);
  font-size: 12px; padding: 5px 12px;
}
.btn-danger:hover { background: rgba(192,57,43,0.08); }
.btn-sm {
  font-size: 12px; padding: 5px 12px;
}

/* ── LAYOUT ── */
.container { max-width: 860px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── SECTIONS ── */
.section { display: none; }
.section.active { display: block; }

/* ── AUTH CARD ── */
.auth-wrap {
  min-height: calc(100vh - 56px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.5rem;
  width: 100%; max-width: 400px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}
.auth-title {
  font-family: var(--font-serif);
  font-size: 1.4rem; font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.auth-sub { font-size: 13px; color: var(--muted); margin-bottom: 2rem; }

.form-group { margin-bottom: 1.2rem; }
.form-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: block; letter-spacing: 0.05em; text-transform: uppercase; }
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-sans); font-size: 14px;
  transition: border-color 0.15s;
  outline: none;
}
.form-input:focus { border-color: var(--accent); }
textarea.form-input { resize: vertical; min-height: 120px; }

.auth-footer { margin-top: 1.5rem; text-align: center; font-size: 13px; color: var(--muted); }
.auth-footer a { color: var(--accent); cursor: pointer; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 12px 20px;
  font-size: 13px; color: var(--text);
  opacity: 0; transform: translateY(8px);
  transition: all 0.25s ease; pointer-events: none;
  max-width: 300px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.success { border-color: var(--success); color: var(--success); }
#toast.error { border-color: var(--danger); color: var(--danger); }

/* ── BOARD ── */
.board-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.8rem;
}
.board-title {
  font-family: var(--font-serif);
  font-size: 1.6rem; color: var(--accent);
}
.board-header-actions { display: flex; align-items: center; gap: 8px; }

/* ── 게시판 공지 ── */
.board-notice {
  background: #fff7e0; border: 1px solid var(--accent2);
  border-radius: var(--radius); padding: 0.9rem 1.2rem;
  max-width: 450px; margin: 0 auto 1.2rem;
  font-size: 14px; line-height: 1.6;
  color: var(--text); white-space: pre-wrap; text-align: center;
}
.notice-edit-form { margin-bottom: 1.2rem; }
.notice-edit-form textarea { width: 100%; margin-bottom: 8px; }

/* ── POST LIST ── */
.post-list { display: flex; flex-direction: column; gap: 1px; }
.post-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.post-item:hover { border-color: var(--accent2); background: var(--surface2); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.post-item-left { flex: 1; min-width: 0; }
.post-item-title {
  font-size: 15px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.post-item-meta { font-size: 12px; color: var(--muted); }
.post-item-meta span { margin-right: 10px; }

.no-posts {
  text-align: center; padding: 4rem 0;
  color: var(--muted); font-size: 14px;
}

/* ── POST DETAIL ── */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; cursor: pointer;
  margin-bottom: 1.5rem;
  background: none; border: none; padding: 0;
  transition: color 0.15s;
}
.back-btn:hover { color: var(--accent); }

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.detail-title {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.5rem;
  line-height: 1.4;
}
.detail-meta { font-size: 12px; color: var(--muted); margin-bottom: 1.5rem; }
.detail-meta span { margin-right: 12px; }
.detail-body {
  font-size: 15px; line-height: 1.85;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  white-space: pre-wrap;
}
.detail-actions {
  display: flex; gap: 8px;
  margin-top: 1.5rem; padding-top: 1rem;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

/* ── IMAGE UPLOAD ── */
.img-upload-area {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
  min-height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.img-upload-area:hover { border-color: var(--accent); background: var(--surface2); }
.img-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; padding: 2rem;
  pointer-events: none;
}
.img-upload-icon { font-size: 1.8rem; line-height: 1; color: var(--border2); }
.img-upload-hint { font-size: 11px; color: var(--border2); }
#img-preview {
  width: 100%; max-height: 360px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}
.btn-remove-img {
  margin-top: 8px;
  background: none; border: none;
  color: var(--danger); font-size: 12px;
  cursor: pointer; padding: 2px 0;
}
.btn-remove-img:hover { text-decoration: underline; }

/* ── POST ITEM THUMBNAIL ── */
.post-item-thumb {
  width: 56px; height: 56px; flex-shrink: 0;
  margin-left: 1rem; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border);
}
.post-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-badge { color: var(--accent2); }

/* ── LOAD FEED (이미지 + 본문 + 댓글) ── */
.feed-list { display: flex; flex-direction: column; gap: 20px; }
.feed-post {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.2rem;
}
.feed-post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.feed-post-author { font-size: 13px; font-weight: 500; color: var(--text); }
.feed-post-date { font-size: 12px; color: var(--muted); margin-left: auto; }
.btn-icon {
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 4px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon:hover { color: var(--text); }
.icon-svg { width: 15px; height: 15px; display: block; }
.feed-post-menu { position: relative; }
.feed-post-menu summary { list-style: none; }
.feed-post-menu summary::-webkit-details-marker { display: none; }
.feed-post-menu-actions {
  position: absolute; right: 0; top: 100%; margin-top: 4px; z-index: 10;
  background: var(--surface2); border: 1px solid var(--border2); border-radius: 6px;
  padding: 6px; display: flex; gap: 6px; white-space: nowrap;
}
.feed-post-menu-actions .btn { white-space: nowrap; flex-shrink: 0; }
.feed-post-image {
  display: block; max-width: 100%; height: auto; max-height: 480px;
  object-fit: contain; cursor: zoom-in;
  background: var(--surface2); border-radius: 6px;
  margin: 0 auto 10px;
}
.feed-post-image-wrap { position: relative; cursor: pointer; }
.feed-post-image-wrap.spoiler-hidden .feed-post-image {
  visibility: hidden;
}
.feed-post-image-wrap.spoiler-hidden::before {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 10px; left: 0;
  background: var(--muted);
  border-radius: 8px;
}
.spoiler-label {
  display: none;
}
.feed-post-image-wrap.spoiler-hidden .spoiler-label {
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: 0; right: 0; bottom: 10px; left: 0;
  color: #fff; font-size: 13px; font-weight: 600;
  border-radius: 8px;
  pointer-events: none;
}
.feed-replies {
  border-top: 1px solid var(--border); padding-top: 10px;
  display: flex; flex-direction: column; gap: 18px;
}
.feed-reply { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 13px; }
.feed-reply-author { font-size: 14.5px; font-weight: 500; color: var(--text); }
.feed-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 6px;
}
.feed-reply-date { font-size: 11px; color: var(--muted); }
.feed-reply-dice { font-size: 20px; letter-spacing: -1px; margin-left: 2px; position: relative; top: 3px; }
.dice-face-1 { color: var(--danger); }
.dice-face-6 { color: #2563eb; }
.feed-reply-body { flex-basis: 100%; font-size: 13px; color: var(--text); white-space: pre-wrap; margin-left: 15px; }
.feed-reply-secret { color: var(--muted); font-style: italic; }
.feed-reply-secret-tag { font-size: 11px; }
.feed-reply-to { color: var(--accent2); font-weight: 500; }
.feed-reply-actions { display: flex; gap: 2px; margin-left: auto; align-self: center; }
.feed-reply-actions .btn-icon { padding: 3px; }
.feed-reply-actions .icon-svg { width: 12px; height: 12px; }
.feed-reply-actions .btn-icon-danger { color: var(--danger); }
.feed-reply-actions .btn-icon-danger:hover { color: #a83232; }
.feed-reply-children {
  flex-basis: 100%; margin-left: 20px; padding-left: 12px;
  border-left: 2px solid var(--border);
  display: flex; flex-direction: column; gap: 18px;
}
.feed-post-actions { display: flex; gap: 10px; justify-content: flex-end; }
.feed-reply-composer-wrap { margin-left: 15px; }
.feed-reply-nested-composer { flex-basis: 100%; margin-left: 15px; }
.feed-reply-edit-composer { flex-basis: 100%; margin-left: 15px; margin-top: 4px; }
.feed-reply-composer { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.feed-reply-composer-row { display: flex; gap: 8px; align-items: flex-end; }
.feed-reply-input, .feed-reply-name-input, .feed-reply-pw-input {
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 8px 12px; color: var(--text);
  font-family: var(--font-sans); font-size: 13px; outline: none;
  transition: border-color 0.15s;
}
.feed-reply-input { flex: 1; min-width: 0; resize: none; }
textarea.feed-reply-input { font-family: var(--font-sans); line-height: 1.4; max-height: 160px; overflow-y: auto; }
.feed-reply-name-input { width: 90px; flex-shrink: 0; }
.feed-reply-pw-input { width: 110px; flex-shrink: 0; }
.feed-reply-input:focus, .feed-reply-name-input:focus, .feed-reply-pw-input:focus { border-color: var(--accent); }
.feed-reply-composer-options { display: flex; gap: 14px; }
.feed-reply-secret-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 15px; color: var(--muted); cursor: pointer;
}

/* ── DETAIL IMAGE ── */
.detail-image {
  width: 100%; max-height: 520px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

/* ── 이모티콘 ── */
.emoticon {
  vertical-align: middle;
  display: inline-block; margin: 1px;
}
.emoticon-add-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.emoticon-add-row .form-input { flex: 1; min-width: 0; }
#emoticon-file-preview {
  width: 36px; height: 36px; object-fit: contain; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 6px;
}
.emoticon-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.emoticon-admin-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px;
}
.emoticon-admin-item img { height: 40px; width: auto; object-fit: contain; }
.emoticon-admin-item span { font-size: 11px; color: var(--muted); word-break: break-all; }

/* ── 회원관리 ── */
.member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 6px; font-size: 13px; background: var(--surface);
}
.member-row-email { color: var(--muted); flex: 1; }

/* 이모티콘 선택 팝오버 — 배경은 클릭 감지용 투명 오버레이, 실제 패널은 버튼 근처에
   JS가 top/left를 지정하는 작은 카드(emoticon-modal-content)로 뜬다 */
.emoticon-modal {
  display: none; position: fixed; inset: 0; z-index: 300;
}
.emoticon-modal.show { display: block; }
.emoticon-modal-content {
  position: fixed; top: 0; left: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.8rem;
  width: 260px; max-height: 300px; overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.emoticon-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 0.6rem; font-size: 11px; color: var(--muted);
}
.emoticon-picker-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.emoticon-picker-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 4px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.emoticon-picker-item:hover { border-color: var(--accent); background: var(--bg); }
.emoticon-picker-item img { height: 32px; width: auto; object-fit: contain; }
.emoticon-picker-item span { font-size: 10px; color: var(--muted); word-break: break-all; text-align: center; }

/* ── WRITE FORM ── */
.write-title {
  font-family: var(--font-serif);
  font-size: 1.4rem; margin-bottom: 1.8rem; color: var(--text);
}
.write-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 1rem; }

/* ── LOADING ── */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid var(--border2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── CONFIG BANNER ── */
.config-banner {
  background: #fdf6e3; border: 1px solid var(--accent2);
  border-radius: var(--radius); padding: 1rem 1.5rem;
  margin-bottom: 1.5rem; font-size: 13px;
  color: var(--text);
}
.config-banner code {
  font-size: 12px; background: rgba(59,91,219,0.12);
  padding: 1px 6px; border-radius: 4px;
}

/* ── APP LOADING OVERLAY ── */
#app-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.2s ease;
}
#app-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── MY BANNER ── */
.my-banner-section {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.my-banner-label {
  font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase;
}
.my-banner-img {
  max-width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: 4px;
}
.my-banner-clickable {
  cursor: pointer;
  transition: opacity 0.15s;
}
.my-banner-clickable:hover { opacity: 0.85; }
.my-banner-code-wrap { width: 100%; max-width: 480px; }
.my-banner-code-label {
  font-size: 11px; color: var(--muted); margin-bottom: 6px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.code-block {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 12px; font-family: monospace; color: var(--accent2);
  cursor: pointer; word-break: break-all; line-height: 1.6;
  transition: border-color 0.15s;
}
.code-block:hover { border-color: var(--accent2); }
.code-block-hint {
  font-size: 11px; color: var(--muted); margin-top: 5px; text-align: center;
}

/* ── LINK GRID ── */
.link-grid {
  display: flex; flex-wrap: wrap; gap: 18px;
}
.link-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer;
}
.link-banner-img {
  max-width: 185px; width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: 4px;
  display: block;
  transition: opacity 0.15s;
}
.link-banner-img:hover { opacity: 0.85; }
.link-banner-empty {
  width: 185px; height: 60px;
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--border2);
}
.link-item-actions {
  display: flex; gap: 6px;
}
.form-hint {
  font-size: 11px; color: var(--muted); margin-top: 5px;
}

/* ── MOCKUP PLACEHOLDER ── */
.mockup-placeholder {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px;
  padding: 6rem 0; color: var(--muted); text-align: center;
}
.mockup-icon { font-size: 3rem; opacity: 0.4; }
.mockup-label { font-family: var(--font-serif); font-size: 1.1rem; color: var(--muted); }
.mockup-desc { font-size: 13px; color: var(--border2); }

/* ── HOME 관리자 프로필 ── */
.home-profile {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 1.2rem;
  padding: 4rem 1rem 3rem;
}
.home-nickname {
  font-family: var(--font-serif);
  font-size: 2.6rem; color: var(--accent);
  letter-spacing: 0.03em;
}
.home-photo {
  width: 140px; height: 140px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--surface);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.home-bio {
  max-width: 480px; font-size: 14px; line-height: 1.8;
  color: var(--text); white-space: pre-wrap;
}
.home-sns-row { display: flex; gap: 14px; }
.home-sns-icon {
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); transition: opacity 0.15s;
  text-decoration: none; cursor: pointer; background: none; border: none;
}
.home-sns-icon .icon-svg { width: 30px; height: 30px; }
.home-sns-icon:hover { opacity: 0.7; }
/* 이미지 기반 아이콘(포스타입 등): 픽시브처럼 강조색 둥근 박스 안에 흰색 로고 마스크 */
.sns-icon-box {
  display: inline-flex; align-items: center; justify-content: center;
  background: currentColor; border-radius: 8px; padding: 0px;
}
.icon-mask {
  display: inline-block; width: 100%; height: 100%;
  background-color: var(--surface);
  mask-mode: luminance; /* 흰색=보임/검정=투명 기준으로 강제 (기본값이 브라우저마다 달라서 명시) */
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}

/* ── 마이페이지 탭 ── */
.mypage-layout { display: flex; gap: 2rem; align-items: flex-start; }
.mypage-tabs {
  display: flex; flex-direction: column; gap: 4px;
  flex-shrink: 0; width: 140px;
}
.mypage-tab {
  background: none; border: none; text-align: left; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  color: var(--muted); padding: 10px 12px; border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.mypage-tab:hover { color: var(--text); background: var(--surface2); }
.mypage-tab.active { color: #fff; background: var(--accent); font-weight: 700; }
.mypage-panels { flex: 1; min-width: 0; }
.mypage-panel { display: none; }
.mypage-panel.active { display: block; }

.sns-input-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sns-input-label { width: 80px; flex-shrink: 0; font-size: 12px; color: var(--muted); }
.sns-input-row .form-input { flex: 1; min-width: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  /* NAV — 메뉴/유저 영역은 숨기고 오른쪽 끝 햄버거 버튼 하나로 대체 */
  nav { padding: 0 0.8rem; gap: 8px; }
  .nav-logo { flex-shrink: 0; font-size: 1rem; }
  .nav-menu, .nav-actions { display: none; }
  .nav-hamburger { display: flex; }

  .container { padding: 1.2rem 0.9rem; }
  .auth-wrap { padding: 1rem; }
  .auth-card { padding: 1.8rem 1.2rem; }

  /* 게시판 헤더 — 제목/버튼이 좁은 화면에서 겹치지 않게 */
  .board-header { flex-wrap: wrap; row-gap: 8px; margin-bottom: 1.2rem; }
  .board-title { font-size: 1.3rem; }
  .board-header-actions { gap: 4px; }
  .board-header-actions .btn { padding: 6px 12px; font-size: 12px; }

  /* LOAD/FREE 피드 */
  .feed-list { gap: 14px; }
  .feed-post { padding: 0.8rem 0.9rem; }
  .feed-avatar { width: 38px; height: 38px; margin-right: 4px; }
  .feed-reply-body, .feed-post-actions, .feed-reply-composer-wrap,
  .feed-reply-nested-composer, .feed-reply-edit-composer { margin-left: 8px; }
  .feed-reply-children { margin-left: 10px; padding-left: 8px; }
  .feed-reply-name-input { width: 72px; }
  .feed-reply-pw-input { width: 88px; }

  /* HOME 프로필 */
  .home-profile { padding: 2.5rem 1rem 2rem; gap: 0.9rem; }
  .home-nickname { font-size: 2rem; }
  .home-photo { width: 110px; height: 110px; }
  .home-bio { font-size: 13px; }
  .home-sns-row { gap: 10px; flex-wrap: wrap; justify-content: center; }
  .home-sns-icon .icon-svg { width: 26px; height: 26px; }

  /* 마이페이지 */
  .mypage-layout { flex-direction: column; }
  .mypage-tabs { flex-direction: row; width: 100%; overflow-x: auto; gap: 2px; }
  .mypage-tab { white-space: nowrap; flex-shrink: 0; }

  /* 회원관리 목록 — 이메일이 길어도 줄바꿈 */
  .member-row { flex-wrap: wrap; }
  .member-row-email { flex-basis: 100%; word-break: break-all; }

  /* 모달 — 좁은 화면에서 여백 줄여 콘텐츠 영역 확보 */
  .img-modal { padding: 1rem; }

  .write-actions, .detail-actions { flex-wrap: wrap; }

  /* MEMO 게시글 목록 */
  .post-item { padding: 0.9rem 1rem; }
  .post-item-thumb { width: 46px; height: 46px; margin-left: 0.7rem; }

  /* LINK 배너 그리드 */
  .link-banner-img, .link-banner-empty { width: 140px; max-width: 140px; }
}
