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

:root {
  --primary: #4B5320;
  --primary-dark: #363C18;
  --bg: #D5D8C6;
  --bg-hover: #E4E7D8;
  --text: #1C1E14;
  --text-muted: #7A7D6A;
  --border: #C2C6B0;
  --sidebar-w: 240px;
  --header-h: 48px;
  --upvote: #4B5320;
  --downvote: #6B7A9E;
  --danger: #8B3A2A;
  --warning: #8B7A2A;
  --success: #3A5E28;
  --admin: #5A3A6B;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* HEADER */
#header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h); background: white;
  border-bottom: 1px solid var(--border); z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.header-inner {
  display: flex; align-items: center; height: 100%;
  padding: 0 16px; gap: 12px; max-width: 1280px; margin: 0 auto;
}
.header-left { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.menu-btn {
  background: none; border: none; font-size: 20px; cursor: pointer;
  padding: 4px 8px; border-radius: 4px; color: var(--text); line-height: 1;
}
.menu-btn:hover { background: var(--bg); }

.logo {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; color: var(--text); font-weight: 700; font-size: 17px;
  letter-spacing: 1px;
}
.logo-icon { color: var(--primary); font-size: 20px; }

.header-search {
  flex: 1; max-width: 600px; display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; transition: border-color 0.2s;
}
.header-search:focus-within { border-color: var(--primary); background: white; }
.search-input {
  flex: 1; border: none; background: none;
  padding: 8px 12px; font-size: 14px; outline: none; font-family: inherit;
}
.search-btn { background: none; border: none; padding: 8px 12px; cursor: pointer; font-size: 14px; }

#userSection { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

/* BUTTONS */
.btn-primary {
  background: var(--primary); color: white; border: none;
  padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background 0.2s; white-space: nowrap;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: none; color: var(--primary); border: 1px solid var(--primary);
  padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn-outline:hover { background: rgba(255,69,0,0.08); }

.btn-danger {
  background: var(--danger); color: white; border: none;
  padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: opacity 0.2s;
}
.btn-danger:hover { opacity: 0.85; }

.btn-warning {
  background: var(--warning); color: white; border: none;
  padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: opacity 0.2s;
}
.btn-warning:hover { opacity: 0.85; }

.btn-success {
  background: var(--success); color: white; border: none;
  padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: opacity 0.2s;
}
.btn-success:hover { opacity: 0.85; }

.btn-ghost {
  background: none; border: none; color: var(--text-muted);
  padding: 6px 10px; font-size: 13px; cursor: pointer; font-family: inherit;
  border-radius: 4px; transition: background 0.15s;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* SIDEBAR */
.sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w); background: white; border-right: 1px solid var(--border);
  overflow-y: auto; z-index: 90; transition: transform 0.3s ease;
  transform: translateX(-100%);
}
.sidebar.open { transform: translateX(0); }
.sidebar-inner { padding: 16px 0; }
.sidebar-title {
  padding: 8px 16px; font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.sidebar-board-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; text-decoration: none; color: var(--text);
  font-size: 14px; font-weight: 500; transition: background 0.15s; cursor: pointer;
}
.sidebar-board-item:hover { background: var(--bg-hover); }
.sidebar-board-item.active { background: rgba(255,69,0,0.1); color: var(--primary); }
.sidebar-board-item.admin-link { color: var(--admin); }
.sidebar-board-item.admin-link:hover { background: rgba(123,47,190,0.08); }
.sidebar-board-item.admin-link.active { background: rgba(123,47,190,0.12); color: var(--admin); }
.board-icon { font-size: 16px; width: 22px; text-align: center; }
.sidebar-divider { border-top: 1px solid var(--border); margin: 10px 0; }

/* OVERLAY */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 80; }
.overlay.active { display: block; }

/* MAIN */
#main {
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  padding: 20px;
}

/* HOME LAYOUT */
.home-layout {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 300px; gap: 24px;
}

/* BOARD HEADER */
.board-header {
  background: white; border-radius: 8px; padding: 20px;
  margin-bottom: 14px; border: 1px solid var(--border);
}
.board-header h1 {
  font-size: 22px; font-weight: 700;
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.board-header p { color: var(--text-muted); font-size: 14px; }

/* SORT BAR */
.sort-bar {
  background: white; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; display: flex; align-items: center; gap: 4px; margin-bottom: 10px;
}
.sort-label { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-right: 6px; }
.sort-btn {
  background: none; border: none; padding: 5px 12px; border-radius: 20px;
  font-size: 13px; font-weight: 700; cursor: pointer; color: var(--text-muted);
  font-family: inherit; transition: background 0.15s, color 0.15s;
}
.sort-btn:hover { background: var(--bg); color: var(--text); }
.sort-btn.active { background: var(--bg); color: var(--primary); }

/* POST CARD */
.post-card {
  background: white; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 8px; display: flex; transition: border-color 0.15s; cursor: pointer; overflow: hidden;
}
.post-card:hover { border-color: #898989; }

.vote-section {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 6px; background: var(--bg-hover); min-width: 42px; gap: 2px;
}
.vote-btn {
  background: none; border: none; cursor: pointer; padding: 4px 6px;
  border-radius: 2px; font-size: 14px; color: var(--text-muted); line-height: 1; transition: color 0.15s;
}
.vote-btn:hover { color: var(--upvote); }
.vote-btn.down:hover { color: var(--downvote); }
.vote-btn.voted-up { color: var(--upvote); }
.vote-btn.voted-down { color: var(--downvote); }
.vote-count { font-size: 12px; font-weight: 700; color: var(--text); }
.vote-count.pos { color: var(--upvote); }
.vote-count.neg { color: var(--downvote); }

.post-content-area { flex: 1; padding: 10px 12px; min-width: 0; }
.post-meta {
  font-size: 12px; color: var(--text-muted); margin-bottom: 6px;
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.board-tag {
  background: var(--primary); color: white; padding: 1px 7px;
  border-radius: 10px; font-size: 11px; font-weight: 700; text-decoration: none;
}
.post-title { font-size: 17px; font-weight: 500; margin-bottom: 6px; line-height: 1.4; }
.post-title a { text-decoration: none; color: var(--text); }
.post-title a:hover { color: var(--primary); }
.post-preview {
  font-size: 13px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-actions { display: flex; align-items: center; gap: 2px; }
.post-action-btn {
  background: none; border: none; cursor: pointer; padding: 5px 8px;
  border-radius: 4px; font-size: 12px; font-weight: 700; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px; font-family: inherit; transition: background 0.15s;
}
.post-action-btn:hover { background: var(--bg); color: var(--text); }
.post-action-btn.danger:hover { color: var(--danger); }

/* SIDEBAR WIDGETS */
.widget { background: white; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.widget-header { background: var(--primary); color: white; padding: 12px 16px; font-size: 14px; font-weight: 700; }
.widget-body { padding: 4px 12px 12px; }
.widget-board-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 4px;
  font-size: 14px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--border); cursor: pointer; transition: color 0.15s;
}
.widget-board-item:last-child { border-bottom: none; }
.widget-board-item:hover { color: var(--primary); }
.widget-board-rank { font-size: 12px; color: var(--text-muted); font-weight: 700; width: 18px; }
.hot-post-item { padding: 9px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.hot-post-item:last-child { border-bottom: none; }
.hot-post-item:hover .hot-post-title { color: var(--primary); }
.hot-post-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; line-height: 1.3; transition: color 0.15s; }
.hot-post-meta { font-size: 12px; color: var(--text-muted); }

/* POST DETAIL */
.post-detail { max-width: 800px; margin: 0 auto; }
.post-detail-card { background: white; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.post-detail-header { padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
.post-detail-title { font-size: 22px; font-weight: 700; margin: 8px 0 4px; line-height: 1.3; }
.post-detail-body { padding: 20px; font-size: 15px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; min-height: 80px; }
.post-detail-footer {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.vote-bar { display: flex; align-items: center; gap: 8px; }
.vote-bar-btn {
  background: none; border: 1px solid var(--border); cursor: pointer;
  padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 700;
  color: var(--text-muted); display: flex; align-items: center; gap: 5px;
  font-family: inherit; transition: all 0.15s;
}
.vote-bar-btn:hover { border-color: var(--upvote); color: var(--upvote); }
.vote-bar-btn.down:hover { border-color: var(--downvote); color: var(--downvote); }
.vote-bar-btn.voted { background: var(--upvote); border-color: var(--upvote); color: white; }
.vote-bar-btn.down.voted { background: var(--downvote); border-color: var(--downvote); color: white; }

/* COMMENTS */
.comments-section { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
.comments-header { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.comment-form { margin-bottom: 24px; }
.comment-login-notice {
  background: var(--bg); border: 1px dashed var(--border); border-radius: 6px;
  padding: 16px; text-align: center; margin-bottom: 24px; font-size: 14px; color: var(--text-muted);
}
.comment-login-notice button { margin-left: 8px; }
.comment-textarea {
  width: 100%; min-height: 80px; border: 1px solid var(--border);
  border-radius: 4px; padding: 10px 12px; font-size: 14px;
  font-family: inherit; resize: vertical; outline: none; transition: border-color 0.2s;
}
.comment-textarea:focus { border-color: var(--primary); }
.comment-form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.comment-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.comment-item:last-child { border-bottom: none; }
.comment-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.comment-author { font-weight: 700; color: var(--text); }
.comment-body { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.comment-actions { margin-top: 8px; display: flex; gap: 4px; }

/* WRITE PAGE */
.write-page { max-width: 800px; margin: 0 auto; }
.write-card { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 24px; }
.write-card h1 { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--text-muted); }
.form-hint { font-size: 11px; font-weight: 400; color: var(--text-muted); margin-left: 4px; }
.form-select, .form-input, .form-textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 4px;
  padding: 10px 12px; font-size: 15px; font-family: inherit; outline: none;
  transition: border-color 0.2s; background: white;
}
.form-select:focus, .form-input:focus, .form-textarea:focus { border-color: var(--primary); }
.form-textarea { min-height: 300px; resize: vertical; line-height: 1.7; }
.write-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* BREADCRUMB */
.breadcrumb { margin-bottom: 12px; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 20px; background: white; border: 1px solid var(--border); border-radius: 8px; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 16px; flex-wrap: wrap; }
.page-btn {
  background: white; border: 1px solid var(--border); padding: 6px 12px;
  border-radius: 4px; font-size: 14px; cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* MODAL */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background: white; border-radius: 8px; padding: 28px 28px 24px; width: 400px; max-width: 94vw; position: relative; }
.modal-content h2 { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  font-size: 16px; cursor: pointer; color: var(--text-muted); padding: 4px 6px; border-radius: 4px;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.auth-modal .form-input { margin-bottom: 0; }
.auth-submit { width: 100%; margin-top: 4px; border-radius: 6px; padding: 10px; font-size: 15px; }
.auth-error { font-size: 13px; color: var(--danger); min-height: 20px; margin-bottom: 8px; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 13px; color: var(--text-muted); }
.link-btn { background: none; border: none; color: var(--primary); font-weight: 700; cursor: pointer; font-size: 13px; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }

/* TOAST */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #333; color: white; padding: 10px 22px;
  border-radius: 6px; font-size: 14px; z-index: 300; transition: transform 0.25s ease;
  white-space: nowrap; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* USER BADGE */
.user-badge { font-size: 13px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 4px; }
.badge-admin { color: var(--admin); }

/* BADGE */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 700; vertical-align: middle;
}
.badge-admin-pill { background: var(--admin); color: white; }
.badge-member-pill { background: var(--success); color: white; }
.badge-banned-pill { background: var(--danger); color: white; }

/* SEARCH HEADER */
.search-header { padding: 16px 20px; background: white; border: 1px solid var(--border); border-radius: 8px; font-size: 16px; margin-bottom: 14px; }

/* LOGIN GATE */
.login-gate {
  max-width: 500px; margin: 60px auto; text-align: center;
  background: white; border: 1px solid var(--border); border-radius: 8px; padding: 48px 32px;
}
.login-gate .gate-icon { font-size: 48px; margin-bottom: 16px; }
.login-gate h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.login-gate p { color: var(--text-muted); margin-bottom: 24px; font-size: 15px; }
.gate-btns { display: flex; gap: 12px; justify-content: center; }

/* ADMIN PANEL */
.admin-panel { max-width: 1000px; margin: 0 auto; }
.admin-panel h1 { font-size: 24px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: white; border: 1px solid var(--border); border-radius: 8px;
  padding: 20px; text-align: center;
}
.stat-card .stat-num { font-size: 32px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.stat-card .stat-label { font-size: 14px; color: var(--text-muted); }

.admin-section { background: white; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.admin-section-header { padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 700;
  color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--bg-hover);
}
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-hover); }
.admin-table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.import-box { padding: 20px; background: var(--bg-hover); border-radius: 8px; margin: 16px; }

.admin-username { font-weight: 700; color: var(--text); }
.admin-you { font-size: 11px; color: var(--primary); margin-left: 4px; }

/* MEDIA BADGE */
.media-badge {
  background: var(--bg); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 10px; font-size: 11px; color: var(--text-muted);
}

/* POST CARD THUMBNAIL */
.post-card-thumb {
  width: 100%; max-height: 200px; object-fit: cover;
  border-radius: 4px; margin-bottom: 8px; display: block;
}

/* MEDIA UPLOAD BOX */
.media-box {
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: white;
}
.media-tabs {
  display: flex; border-bottom: 1px solid var(--border); background: var(--bg-hover);
}
.mtab {
  flex: 1; background: none; border: none; padding: 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; color: var(--text-muted); font-family: inherit; transition: background 0.15s;
  border-bottom: 2px solid transparent;
}
.mtab:hover { background: var(--bg); }
.mtab.active { color: var(--primary); border-bottom-color: var(--primary); background: white; }
.media-panel { padding: 16px; }

.img-drop-zone {
  border: 2px dashed var(--border); border-radius: 6px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s; background: var(--bg-hover);
}
.img-drop-zone:hover, .img-drop-zone.drag-over { border-color: var(--primary); background: rgba(75,83,32,0.05); }
.img-drop-inner { padding: 32px; text-align: center; font-size: 14px; color: var(--text-muted); pointer-events: none; }

.img-preview-grid {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px;
}
.img-preview-item {
  position: relative; width: 110px; height: 110px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border);
}
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-remove-btn {
  position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.6); color: white;
  border: none; border-radius: 50%; width: 22px; height: 22px; cursor: pointer;
  font-size: 12px; display: flex; align-items: center; justify-content: center; line-height: 1;
}
.img-remove-btn:hover { background: rgba(0,0,0,0.85); }

/* POST MEDIA DISPLAY */
.post-img-gallery {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 20px 20px;
}
.post-img-thumb {
  width: calc(33.333% - 6px); max-width: 260px; aspect-ratio: 4/3;
  object-fit: cover; border-radius: 6px; cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  border: 1px solid var(--border);
}
.post-img-thumb:hover { opacity: 0.9; transform: scale(1.01); }
.post-img-gallery:has(.post-img-thumb:only-child) .post-img-thumb { width: 100%; max-width: 100%; aspect-ratio: auto; max-height: 480px; }

.post-video-wrap {
  padding: 0 20px 20px;
}
.post-video-wrap iframe, .post-video-wrap video {
  width: 100%; aspect-ratio: 16/9; border-radius: 6px;
  border: 1px solid var(--border); display: block;
}

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 500;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-inner {
  position: relative; max-width: 90vw; max-height: 90vh; display: flex; align-items: center;
}
.lightbox-inner img {
  max-width: 90vw; max-height: 88vh; object-fit: contain; border-radius: 4px; display: block;
}
.lb-close {
  position: fixed; top: 16px; right: 20px; background: rgba(255,255,255,0.15); color: white;
  border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lb-close:hover { background: rgba(255,255,255,0.3); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); color: white; border: none;
  width: 44px; height: 44px; border-radius: 50%; font-size: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.lb-nav:hover { background: rgba(255,255,255,0.3); }
.lb-prev { left: -56px; }
.lb-next { right: -56px; }
.lb-counter {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.8); font-size: 14px; background: rgba(0,0,0,0.5);
  padding: 4px 14px; border-radius: 20px;
}

/* MOBILE */
@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-sidebar { display: none; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
@media (max-width: 700px) {
  #main { padding: 12px; }
  .header-search { max-width: 160px; }
  .post-detail, .write-page, .admin-panel { max-width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-table { font-size: 12px; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
}
