/* ============================================================
   MML 공유 게시판 — theme + components
   Dark-first, with [data-theme="light"] overrides.
   ============================================================ */

:root {
  --accent: #ef9a4a;
  --accent-strong: #e6883a;
  --accent-soft: rgba(239, 154, 74, 0.14);
  --accent-border: rgba(239, 154, 74, 0.42);
  --accent-ink: #1c1206;

  --green: #5fb878;
  --green-soft: rgba(95, 184, 120, 0.14);
  --blue: #5b93da;
  --blue-soft: rgba(91, 147, 218, 0.14);

  --row-pad: 18px;
  --gap: 16px;
}

/* ---------- DARK (default) ---------- */
:root,
[data-theme="dark"] {
  --bg: #0a0d13;
  --bg-grad-1: #0c1018;
  --bg-grad-2: #090b10;
  --surface: #141925;
  --surface-2: #1a2030;
  --surface-3: #20283a;
  --hover: #1d2434;
  --border: #2a3245;
  --border-soft: #222a3a;
  --border-strong: #3a455d;

  --text: #eef1f6;
  --text-2: #aab4c5;
  --text-3: #76819a;
  --text-faint: #515c72;

  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.75);
  --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, 0.7);

  --thumb-1: #1b2233;
  --thumb-2: #232c41;
}

/* ---------- LIGHT ---------- */
[data-theme="light"] {
  --bg: #e2e5ea;
  --bg-grad-1: #e8ebf0;
  --bg-grad-2: #dde0e6;
  --surface: #f2f3f6;
  --surface-2: #eaecf0;
  --surface-3: #e2e5eb;
  --hover: #e6e8ed;
  --border: #cdd1da;
  --border-soft: #d8dbe2;
  --border-strong: #b8bfcc;

  --text: #1a2230;
  --text-2: #4d586b;
  --text-3: #76819a;
  --text-faint: #9aa3b5;

  --accent-ink: #2a1804;
  --accent-soft: rgba(230, 136, 58, 0.14);
  --accent-border: rgba(230, 136, 58, 0.5);

  --shadow: 0 18px 40px -24px rgba(30, 41, 70, 0.28);
  --shadow-sm: 0 6px 16px -10px rgba(30, 41, 70, 0.22);

  --thumb-1: #eceff4;
  --thumb-2: #dde3ec;
}

/* ============================================================
   base
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--bg-grad-1), transparent 60%),
    linear-gradient(180deg, var(--bg-grad-1), var(--bg-grad-2));
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  word-break: keep-all;
  overflow-wrap: anywhere;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code",
    Menlo, Consolas, monospace;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent-soft); }

*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   layout shell
   ============================================================ */
.shell { min-height: 100vh; display: flex; flex-direction: column; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- header ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--border-soft);
}
.hdr-inner {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand .logo {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
  color: var(--accent-ink);
  box-shadow: 0 4px 12px -4px var(--accent-border);
}
.brand .arrow { color: var(--accent); margin: 0 2px; }
.brand .ver {
  font-size: 10px; font-weight: 700;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  margin-left: 2px;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 14px; font-weight: 600;
  color: var(--text-2);
  padding: 7px 13px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { color: var(--text); background: var(--hover); }
.nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

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

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  transition: all 0.15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }

.lang-btn {
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 9px;
  padding: 8px 12px;
  transition: all 0.15s;
}
.lang-btn:hover { color: var(--text); border-color: var(--border-strong); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 800;
  white-space: nowrap;
  color: var(--accent-ink);
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  box-shadow: 0 8px 20px -10px var(--accent-border);
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 10px 26px -10px var(--accent-border); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 15px;
  transition: all 0.15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }

.btn-danger {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  color: #ff6b6b;
  background: rgba(255,107,107,0.1);
  border: 1px solid rgba(255,107,107,0.3);
  border-radius: 10px;
  padding: 9px 15px;
  transition: all 0.15s;
}
.btn-danger:hover { background: rgba(255,107,107,0.18); border-color: rgba(255,107,107,0.5); }

/* ============================================================
   page heading
   ============================================================ */
.page-head {
  padding: 34px 0 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-head .sub {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 14.5px;
}
.page-head .count { color: var(--accent); font-weight: 700; }

/* ============================================================
   filter / sort toolbar
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 0;
  position: sticky;
  top: 60px;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

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

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 220px;
  transition: border-color 0.15s;
}
.search:focus-within { border-color: var(--accent-border); }
.search svg { color: var(--text-3); flex: none; }
.search input {
  border: none; background: none; outline: none;
  color: var(--text); font-size: 13.5px;
  width: 100%;
}
.search input::placeholder { color: var(--text-faint); }

.seg {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  font-size: 13px; font-weight: 600;
  color: var(--text-3);
  background: none; border: none;
  padding: 6px 12px;
  border-radius: 7px;
  transition: all 0.14s;
  white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.active {
  color: var(--text);
  background: var(--surface-3);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   post list (row layout)
   ============================================================ */
.list { padding: 8px 0 20px; }

.row {
  display: flex;
  gap: var(--gap);
  align-items: center;
  padding: var(--row-pad);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 10px;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  cursor: pointer;
}
.row:hover {
  border-color: var(--accent-border);
  background: var(--surface-2);
}

.row-body { flex: 1; min-width: 0; }
.row-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }

.badge {
  font-size: 11.5px; font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  white-space: nowrap;
}
.badge.muted { background: var(--surface-3); color: var(--text-2); border-color: var(--border); }

.row-title {
  font-size: 16.5px; font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.row:hover .row-title { color: var(--accent); }
.row-meta {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--text-3);
  white-space: nowrap;
  flex-wrap: wrap;
}
.row-meta .author { color: var(--text-2); font-weight: 600; }
.row-meta .sep { opacity: 0.4; }

.row-preview {
  flex: none;
  max-width: 200px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.4;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ============================================================
   pagination
   ============================================================ */
.pager {
  display: flex; justify-content: center; align-items: center; gap: 6px;
  padding: 14px 0 50px;
}
.pager button {
  min-width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13.5px; font-weight: 600;
  padding: 0 10px;
  transition: all 0.14s;
}
.pager button:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text); }
.pager button.active {
  background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border);
}
.pager button:disabled { opacity: 0.4; cursor: default; }

/* ============================================================
   detail view
   ============================================================ */
.detail { padding: 26px 0 60px; }
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600;
  white-space: nowrap;
  color: var(--text-2);
  margin-bottom: 20px;
  cursor: pointer;
  transition: color 0.14s;
}
.back-link:hover { color: var(--accent); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 26px;
  align-items: start;
}
@media (max-width: 920px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.detail-main { min-width: 0; }
.detail-head .row-top { margin-bottom: 12px; }
.detail-title {
  font-size: 27px; font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 14px; line-height: 1.3;
}
.detail-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 18px; margin-bottom: 22px;
  border-bottom: 1px solid var(--border-soft);
}
.avatar {
  width: 38px; height: 38px; border-radius: 99px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
  color: var(--accent-ink);
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
  flex: none;
}
.detail-meta .who { font-weight: 700; font-size: 14px; }
.detail-meta .when { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }

/* MML code block */
.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-3);
  white-space: nowrap;
  display: flex; align-items: center; justify-content: space-between;
  margin: 26px 0 10px;
}
.code-block {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}
.code-head .ctitle { font-size: 12px; font-weight: 700; color: var(--text-2); }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  color: var(--text-2);
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: 7px; padding: 5px 10px;
  transition: all 0.14s;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent-border); }
.copy-btn.copied { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.code-body {
  padding: 14px 16px;
  font-size: 13px; line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap; word-break: break-all;
  max-height: 360px; overflow: auto;
}
.code-body .ctok { color: var(--accent); }

/* file downloads */
.files { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  transition: border-color 0.14s, background 0.14s;
}
.file-row:hover { border-color: var(--accent-border); background: var(--surface-2); }
.file-ic {
  width: 38px; height: 38px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; letter-spacing: 0.02em;
}
.file-ic.mxl { background: var(--blue-soft); color: var(--blue); }
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 13.5px; font-weight: 700; }
.file-size { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.file-dl {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); transition: all 0.14s;
  text-decoration: none;
}
.file-dl:hover { color: var(--accent); border-color: var(--accent-border); }

/* ---------- sidebar (detail) ---------- */
.side-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 18px;
  margin-bottom: 16px;
}
.side-card h3 {
  margin: 0 0 14px; font-size: 14px; font-weight: 800; letter-spacing: -0.01em;
}
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--border-soft); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-3); white-space: nowrap; }
.kv .v { color: var(--text); font-weight: 600; white-space: nowrap; text-align: right; }

/* ============================================================
   toast
   ============================================================ */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 90;
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 11px; padding: 12px 20px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 9px;
  animation: toastIn 0.2s ease;
}
.toast .t-ic { color: var(--green); }
@keyframes toastIn { from { transform: translateX(-50%) translateY(10px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

/* empty state */
.empty {
  text-align: center; padding: 70px 20px; color: var(--text-3);
}
.empty .e-ic { color: var(--text-faint); margin-bottom: 14px; }
.empty .e-main { font-size: 15px; font-weight: 700; color: var(--text-2); }
.empty .e-sub { font-size: 13px; margin-top: 6px; }

/* footer */
.foot {
  margin-top: auto;
  border-top: 1px solid var(--border-soft);
  padding: 24px 0 40px;
  color: var(--text-faint);
  font-size: 12.5px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.foot a:hover { color: var(--text-2); }

/* ---- Comments ---- */
.comment-form { margin-bottom: 20px; }
.comment-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: 14px; font-family: inherit;
  resize: vertical; min-height: 60px; outline: none; transition: border-color .2s;
}
.comment-form textarea:focus { border-color: var(--accent); }
.comment-form .btn-primary { margin-top: 8px; float: right; }
.comment-form::after { content: ""; display: block; clear: both; }
.comment-item {
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px;
}
.comment-author { font-weight: 600; color: var(--text); }
.comment-time { color: var(--text-3); }
.comment-del {
  margin-left: auto; background: none; border: none; color: var(--text-3);
  cursor: pointer; font-size: 12px; padding: 2px 6px; border-radius: 4px;
}
.comment-del:hover { color: var(--accent-red, #ef4444); background: rgba(239,68,68,.1); }
.comment-body { font-size: 14px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }

/* ---- Theme toggle icon visibility ---- */
[data-theme="dark"] .ico-moon { display: none; }
[data-theme="light"] .ico-sun { display: none; }

/* ---- Write button ---- */
.btn-write {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-write:hover { filter: brightness(1.05); }
.btn-back {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
}
.btn-back:hover { border-color: var(--border-strong); color: var(--text); }
.btn-cancel {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-size: 14px;
}

/* ---- Create View ---- */
.project-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.project-item {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s;
}
.project-item:hover { border-color: var(--accent-border); }
.project-item.selected { border-color: var(--accent); background: var(--accent-soft); }
.project-item.disabled { opacity: 0.4; pointer-events: none; }
.proj-title { font-weight: 600; color: var(--text); }
.proj-tag { margin-left: 8px; font-size: 12px; color: var(--text-3); font-weight: 400; }
.proj-date { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.form-group input[type="text"] {
  width: 100%; padding: 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 14px;
}
.form-group textarea {
  width: 100%; height: 100px; padding: 8px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-2); font-size: 12px; font-family: monospace; resize: none;
}
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }
.form-status { margin-top: 8px; font-size: 13px; color: #e94560; }
.loading { text-align: center; padding: 40px; color: var(--text-3); }

/* ---- Responsive ---- */

@media (max-width: 768px) {
  /* Header: position override for 60px header */
  .mobile-nav { top: 60px; }

  /* 교정 도구: 모바일 메뉴에서 숨김 */
  .mobile-nav .nav a[href="/corrector"] { display: none; }

  /* Wrap */
  .wrap { padding: 0 16px; }

  /* Toolbar: stack */
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .toolbar-right { margin-left: 0; }
  .search { min-width: 0; width: 100%; }

  /* Page head */
  .page-head { padding: 20px 0 14px; }
  .page-head h1 { font-size: 26px; }

  /* Touch targets */
  .icon-btn { width: 44px; height: 44px; }
  .btn-primary { min-height: 44px; }
  .pager button { min-width: 44px; height: 44px; }

  /* Segment controls: horizontal scroll */
  .seg { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 640px) {
  .row { flex-direction: column; align-items: stretch; }
  .row-preview { max-width: none; }
  .hdr-inner { gap: 12px; }
  .nav { gap: 2px; }
  .nav a { font-size: 13px; padding: 6px 10px; }
  .page-head h1 { font-size: 24px; }
  .detail-title { font-size: 22px; }
  .detail-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
  .code-body { font-size: 12px; max-height: 260px; }
  .modal-box { margin: 16px; padding: 20px; }
  .row { padding: 14px; }
  .row-title { font-size: 15px; }
  .admin-table { font-size: 13px; }
  .admin-table th, .admin-table td { padding: 8px 6px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 12px; }
  .page-head h1 { font-size: 20px; }
  .detail-title { font-size: 20px; }
  .badge { font-size: 10.5px; padding: 2px 7px; }
  .row-meta { font-size: 11.5px; }
  .kv { font-size: 12px; flex-direction: column; gap: 2px; }
  .kv .v { text-align: left; }
  .file-row { padding: 10px 12px; }
  .foot { padding: 20px 0 30px; flex-direction: column; text-align: center; }
}

/* ---------- ADMIN DASHBOARD ---------- */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.admin-tabs button {
  padding: 8px 18px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 14px;
  transition: all .15s;
}
.admin-tabs button.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.admin-tabs button:hover:not(.active) { background: var(--hover); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; color: var(--text-3); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); color: var(--text); }
.admin-table tr:hover td { background: var(--hover); }

.btn-ban { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; font-size: 12px; }
.btn-ban.banned { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.btn-ban:not(.banned) { background: rgba(239,68,68,.12); color: #ef4444; border-color: #ef4444; }

.report-filters { display: flex; gap: 4px; margin-bottom: 16px; }
.report-filters button {
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 13px;
}
.report-filters button.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); }

.report-card {
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: 10px;
  padding: 16px; margin-bottom: 10px;
}
.report-card.resolved { opacity: .55; }
.report-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--text-2); }
.report-card-head .reason { background: rgba(239,68,68,.12); color: #ef4444; padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 12px; }
.report-card-target { font-size: 14px; color: var(--text); margin-bottom: 6px; }
.report-card-target .deleted-tag { color: var(--text-3); font-style: italic; }
.report-card-detail { font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
.report-card-actions { display: flex; gap: 6px; }
.report-card-actions button {
  padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; font-size: 12px;
  background: var(--surface-2); color: var(--text-2); transition: all .15s;
}
.report-card-actions button:hover { background: var(--hover); color: var(--text); }
.report-card-actions .btn-danger { color: #ef4444; border-color: rgba(239,68,68,.3); }
.report-card-actions .btn-danger:hover { background: rgba(239,68,68,.12); }

/* ---------- ADMIN FUNNEL DASHBOARD ---------- */
.funnel-wrap { display: flex; flex-direction: column; gap: 10px; }
.funnel-row { display: flex; align-items: center; gap: 12px; }
.funnel-label { width: 100px; flex-shrink: 0; font-size: 13px; color: var(--text-2); }
.funnel-bar-track { flex: 1; height: 24px; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
.funnel-bar { height: 100%; background: var(--accent); border-radius: 6px; transition: width .3s; min-width: 2px; }
.funnel-val { width: 150px; flex-shrink: 0; font-size: 13px; color: var(--text); text-align: right; }
.funnel-drop { color: #ef4444; }

/* ---------- ADMIN FEEDBACK TRIAGE ---------- */
.feedback-controls { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.feedback-ctrl-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.feedback-ctrl-label { font-size: 12px; color: var(--text-3); width: 48px; flex-shrink: 0; }
.feedback-ctrl-row button {
  padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; font-size: 12px;
  background: var(--surface-2); color: var(--text-2); transition: all .15s;
}
.feedback-ctrl-row button:hover { background: var(--hover); color: var(--text); }
.feedback-ctrl-row button.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); font-weight: 600; }
.feedback-note {
  flex: 1; min-width: 140px; padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 13px;
}

.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 9px; margin-left: 4px; vertical-align: middle;
}

/* ---------- REPORT MODAL ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9000;
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 28px; width: 100%; max-width: 420px; box-shadow: var(--shadow);
}
.modal-box h3 { margin: 0 0 16px; font-size: 17px; color: var(--text); }
.modal-box label { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; color: var(--text); cursor: pointer; }
.modal-box textarea {
  width: 100%; margin-top: 12px; padding: 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text); font-size: 13px;
  resize: vertical; min-height: 60px; font-family: inherit;
}
.modal-box .modal-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.modal-box .modal-btns button {
  padding: 8px 18px; border-radius: 8px; border: 1px solid var(--border);
  cursor: pointer; font-size: 14px; font-weight: 600;
}
.modal-box .modal-btns .btn-cancel { background: var(--surface-2); color: var(--text-2); }
.modal-box .modal-btns .btn-submit { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- Notice card (게시판 상단 고정 공지, 2026-07-04) ---------- */
.notice-card {
  position: relative; margin-top: 14px; padding: 16px 44px 14px 18px;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  border-radius: 12px;
}
.notice-card .notice-title { font-weight: 700; color: var(--text); font-size: 15px; margin-bottom: 6px; }
.notice-card .notice-body { color: var(--text-2); font-size: 13.5px; line-height: 1.65; }
.notice-card .notice-links { margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.notice-card .notice-links a {
  color: var(--accent-strong); font-weight: 700; font-size: 13.5px; text-decoration: none;
}
.notice-card .notice-links a:hover { text-decoration: underline; }
.notice-card .notice-contact { color: var(--text-3); font-size: 12.5px; }
.notice-card .notice-close {
  position: absolute; top: 10px; right: 12px; background: none; border: none;
  color: var(--text-3); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px;
}
.notice-card .notice-close:hover { color: var(--text); }
