/* ===== Theme ===== */
:root {
  --bg:      #ffffff;
  --bg2:     #f5f5f5;
  --text:    #111111;
  --text2:   #555555;
  --text3:   #999999;
  --line:    #e0e0e0;
  --line2:   #cccccc;
  --inv-bg:  #111111;
  --inv-text:#ffffff;
}
[data-theme="dark"] {
  --bg:      #111111;
  --bg2:     #1c1c1c;
  --text:    #eeeeee;
  --text2:   #aaaaaa;
  --text3:   #666666;
  --line:    #2a2a2a;
  --line2:   #444444;
  --inv-bg:  #eeeeee;
  --inv-text:#111111;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { transition: background .15s, color .15s; }

body {
  font-family: -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', '맑은 고딕', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.blog-logo {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  flex-shrink: 0;
}
.blog-logo:hover { text-decoration: none; }
.blog-logo.logo-dimmed { color: var(--text3); }
.blog-logo-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  flex-shrink: 0;
  text-decoration: none;
  transition: color 0.15s;
  padding: 2px 7px;
  border-radius: 4px;
}
.blog-logo-link:hover { color: var(--text); text-decoration: none; }
.blog-logo-link.active { color: #03C75A; }

.header-nav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  flex-shrink: 0;
}
.header-nav-link:hover { color: var(--text); text-decoration: none; }
.header-nav-link.active { color: var(--text); font-weight: 700; }

.header-spacer { flex: 1; }

/* 검색 */
.search-form { display: flex; align-items: center; gap: 0; }
.search-input {
  width: 130px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 3px 0 0 3px;
  font-size: 11px;
  color: var(--text);
  background: var(--bg);
  outline: none;
}
.search-input::placeholder { color: var(--text3); }
.search-input:focus { border-color: var(--line2); }
.search-btn {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-left: none;
  border-radius: 0 3px 3px 0;
  background: var(--bg2);
  color: var(--text2);
  cursor: pointer;
  font-size: 11px;
}

/* Header links */
.header-links { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.header-links a { color: var(--text2); }
.header-links a:hover { color: var(--text); text-decoration: none; }
.header-links .sep { color: var(--line2); }

/* ===== User Dropdown ===== */
.user-menu { position: relative; }
.user-menu-btn {
  background: none; border: none; cursor: pointer;
  font-size: 11px; color: var(--text2); font-family: inherit;
  padding: 0;
}
.user-menu-btn:hover { color: var(--text); }
.user-menu-drop {
  display: none;
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 3px; min-width: 140px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  z-index: 200;
}
[data-theme="dark"] .user-menu-drop { box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.user-menu-drop.open { display: block; }
.user-menu-drop a {
  display: block; padding: 8px 14px;
  font-size: 12px; color: var(--text2);
}
.user-menu-drop a:hover { background: var(--bg2); color: var(--text); text-decoration: none; }
.menu-sep { border-top: 1px solid var(--line); margin: 4px 0; }

/* ===== Category Nav ===== */
.cat-nav {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.cat-nav-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-link {
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.cat-link:hover { color: var(--text); text-decoration: none; }
.cat-link.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.cat-link-action { color: var(--text2); }
.cat-nav-spacer { flex: 1; }
.cat-nav-search { display: flex; align-items: center; gap: 0; flex-shrink: 0; }

/* ===== Layout ===== */
.site-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* ===== Page Header ===== */
.page-header { margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.page-header h2 { font-size: 13px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; }
.total-count { font-weight: 400; color: var(--text3); margin-left: 5px; }

/* ===== Post List ===== */
.post-list { display: flex; flex-direction: column; }

.post-card {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.post-card:first-child { border-top: 1px solid var(--line); }

.post-card-body { flex: 1; min-width: 0; }

.post-meta { font-size: 11px; color: var(--text3); margin-bottom: 5px; }
.post-category { color: var(--text2); font-weight: 600; margin-right: 6px; }
.post-category:hover { text-decoration: underline; }

.post-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.4; margin-bottom: 5px; }
.post-title a:hover { text-decoration: underline; }

.post-summary { font-size: 12px; color: var(--text2); line-height: 1.55; margin-bottom: 8px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.post-footer { font-size: 11px; color: var(--text3); display: flex; gap: 10px; }
.post-author { color: var(--text3); }

.post-thumbnail {
  flex: 0 0 100px; height: 70px;
  border-radius: 2px; overflow: hidden;
  background: var(--bg2);
}
.post-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Post Full ===== */
.post-full { max-width: 720px; }

.post-full-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.post-full-category { font-size: 11px; color: var(--text2); font-weight: 600; display: block; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
.post-full-title { font-size: 22px; font-weight: 700; line-height: 1.35; margin-bottom: 10px; }
.post-full-meta { font-size: 11px; color: var(--text3); display: flex; gap: 10px; flex-wrap: wrap; }

.post-actions { display: flex; gap: 6px; margin: 10px 0; }

/* ===== Post Content ===== */
.post-content { font-size: 14px; line-height: 1.85; color: var(--text); }
.post-content h2 { font-size: 17px; font-weight: 700; margin: 24px 0 10px; }
.post-content h3 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; }
.post-content p  { margin-bottom: 14px; }
.post-content blockquote {
  border-left: 2px solid var(--line2);
  padding: 6px 14px; margin: 14px 0;
  color: var(--text2);
}
.post-content pre {
  background: var(--bg2); border: 1px solid var(--line);
  padding: 14px; border-radius: 3px; overflow-x: auto;
  margin: 14px 0;
  font-family: 'Consolas', 'D2Coding', monospace;
  font-size: 12px; color: var(--text);
}
.post-content code {
  font-family: 'Consolas', 'D2Coding', monospace;
  font-size: 12px; background: var(--bg2);
  padding: 1px 4px; border-radius: 2px;
}
.post-content pre code { background: none; padding: 0; }
.post-content img { max-width: 100%; margin: 12px 0; }
.post-content a { text-decoration: underline; }
.post-content ul, .post-content ol { padding-left: 20px; margin-bottom: 12px; }
.post-content hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }

/* ===== Comments ===== */
.comments-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.comments-title { font-size: 12px; font-weight: 700; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text2); }

.comment-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-author { font-weight: 600; font-size: 12px; }
.comment-date   { font-size: 11px; color: var(--text3); }
.comment-content { font-size: 13px; color: var(--text2); line-height: 1.55; }
.btn-comment-delete {
  margin-left: auto; background: none; border: none;
  color: var(--text3); cursor: pointer; font-size: 11px;
}
.btn-comment-delete:hover { color: var(--text); }

.comment-form { margin-top: 16px; }
.comment-form h4 { font-size: 12px; font-weight: 700; margin-bottom: 8px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; }
.comment-textarea { min-height: 72px; resize: vertical; }

/* ===== Forms ===== */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 11px; color: var(--text3); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.form-input {
  width: 100%; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 3px;
  font-size: 13px; font-family: inherit;
  color: var(--text); background: var(--bg);
  outline: none; transition: border-color .1s;
}
.form-input:focus { border-color: var(--line2); }
textarea.form-input { resize: vertical; }
select.form-input { cursor: pointer; }
.form-row { display: flex; gap: 12px; }
.form-group-half { flex: 1; }

.alert { padding: 9px 12px; border-radius: 3px; margin-bottom: 12px; font-size: 12px; border-left: 3px solid; }
.alert-error   { background: var(--bg2); color: var(--text); border-left-color: var(--text); }
.alert-success { background: var(--bg2); color: var(--text); border-left-color: var(--text3); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line2);
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  background: var(--bg);
  color: var(--text2);
  transition: all .1s;
}
.btn:hover { background: var(--bg2); color: var(--text); text-decoration: none; }
.btn-primary {
  background: var(--inv-bg); border-color: var(--inv-bg);
  color: var(--inv-text); font-weight: 600;
}
.btn-primary:hover { opacity: .85; background: var(--inv-bg); color: var(--inv-text); }
.btn-cancel  { color: var(--text3); border-color: var(--line); }
.btn-draft   { color: var(--text2); border-color: var(--line2); }
.btn-draft:hover { border-color: var(--text3); color: var(--text); }
.btn-edit    { }
.btn-delete  { color: var(--text3); border-color: var(--line); }
.btn-delete:hover { border-color: var(--line2); color: var(--text); }
.btn-full    { width: 100%; text-align: center; display: block; padding: 8px; }
.btn-sm      { padding: 2px 8px; font-size: 11px; }

/* ===== Auth ===== */
.auth-container { max-width: 340px; margin: 60px auto; padding: 0 16px; }
.auth-title { font-size: 16px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.auth-link { text-align: center; margin-top: 14px; font-size: 12px; color: var(--text3); }
.auth-link a { text-decoration: underline; }

/* ===== Editor ===== */
.editor-wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; }
.editor-wrap > h2 { font-size: 13px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }

.editor-title {
  width: 100%; font-size: 20px; font-weight: 700;
  border: none; border-bottom: 1px solid var(--line);
  padding: 6px 0; outline: none; margin-bottom: 12px;
  font-family: inherit; color: var(--text); background: transparent;
}
.editor-title::placeholder { color: var(--text3); }
.editor-title:focus { border-bottom-color: var(--line2); }

.editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 2px;
  padding: 5px; background: var(--bg2);
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 3px 3px 0 0;
}
.editor-toolbar button {
  padding: 3px 8px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer; font-size: 11px; font-family: inherit;
  color: var(--text2);
}
.editor-toolbar button:hover { background: var(--bg2); color: var(--text); }
.toolbar-sep { color: var(--line); padding: 0 2px; align-self: center; }
.toolbar-color-wrap { position: relative; display: inline-flex; align-items: center; }
.color-btn {
  display: flex; align-items: center; gap: 2px;
  padding: 3px 6px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer; font-size: 11px; font-family: inherit; color: var(--text2);
}
.color-btn:hover { background: var(--bg2); color: var(--text); }
#colorUnderbar {
  display: block; width: 12px; height: 3px;
  background: #e00000; border-radius: 1px;
  position: absolute; bottom: 3px; left: 6px;
}
.color-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 200;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  padding: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.15);
  width: 192px;
}
.color-swatches { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 8px; }
.color-swatch {
  width: 20px; height: 20px; border-radius: 2px;
  border: 1px solid rgba(0,0,0,.15); cursor: pointer; flex-shrink: 0;
}
.color-swatch:hover { transform: scale(1.2); outline: 2px solid var(--line2); }
.color-custom-row { display: flex; gap: 4px; align-items: center; }
.color-custom-row input[type=color] { width: 32px; height: 26px; border: 1px solid var(--line); border-radius: 2px; cursor: pointer; padding: 1px; }
.color-custom-row button {
  flex: 1; padding: 3px 6px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer; font-size: 11px; color: var(--text2);
}
.color-custom-row button:hover { background: var(--line2); color: #fff; }
.fontsize-btn { display: inline-flex; align-items: center; padding: 3px 7px; }
.fontsize-btn .fs-big  { font-size: 16px; font-weight: bold; line-height: 1; }
.fontsize-btn .fs-tiny { font-size: 8px;  font-weight: bold; line-height: 1; }

.editor-area {
  min-height: 400px; border: 1px solid var(--line);
  border-radius: 0 0 3px 3px; padding: 14px; outline: none;
  font-size: 14px; line-height: 1.8;
  color: var(--text); background: var(--bg);
}
.editor-area:focus { border-color: var(--line2); }

/* ── Attachment panel ──────────────────────────────────────────────── */
.attach-panel {
  border: 1px solid var(--line); border-radius: 3px;
  margin-bottom: 10px; overflow: hidden;
}
.attach-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--bg2);
  border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text2);
}
.attach-panel-header span { flex: 1; font-weight: 600; }
.attach-zone {
  min-height: 48px; padding: 8px;
  transition: background 0.15s;
}
.attach-zone.dragover { background: var(--bg2); }
.attach-zone-hint {
  color: var(--text3); font-size: 12px; text-align: center;
  padding: 10px 0;
}
.attach-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}

/* Card base */
.attach-card {
  border: 1px solid var(--line); border-radius: 3px;
  font-size: 11px; overflow: hidden;
  display: flex; flex-direction: column;
}
.attach-card-img {
  width: 120px;
}
.attach-card-file {
  width: 160px;
}
.attach-card-loading {
  width: 120px; align-items: center; justify-content: center;
  padding: 14px 8px; gap: 6px; color: var(--text3);
}

/* Image card */
.attach-thumb {
  width: 100%; height: 80px; object-fit: cover;
  display: block; cursor: pointer;
}
.attach-thumb:hover { opacity: 0.85; }

/* File card icon */
.attach-file-icon {
  text-align: center; padding: 12px 0; font-size: 22px; background: var(--bg2);
}

/* Shared */
.attach-name {
  padding: 3px 6px; color: var(--text2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-top: 1px solid var(--line);
}
.attach-actions {
  display: flex; gap: 3px; flex-wrap: wrap;
  padding: 4px 5px; border-top: 1px solid var(--line);
  background: var(--bg2);
}
.attach-actions .btn { font-size: 10px; padding: 2px 5px; }

/* Thumb active state */
.btn-thumb-active {
  background: var(--inv-bg) !important;
  color: var(--inv-text) !important;
  border-color: var(--inv-bg) !important;
}

/* Loading spinner */
.attach-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--text2);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Legacy upload styles (kept for compatibility) */
.file-upload-section {
  border: 1px solid var(--line); border-radius: 3px;
  margin-top: 10px; overflow: hidden;
}
.file-upload-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--bg2);
  border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text2);
}
.file-upload-header span { flex: 1; font-weight: 600; }
.file-list { padding: 6px 8px; min-height: 32px; }
.file-list-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 4px; border-bottom: 1px solid var(--line); font-size: 12px;
}
.file-list-item:last-child { border-bottom: none; }
.file-list-name { flex: 1; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.upload-area {
  border: 1px dashed var(--line); border-radius: 3px;
  padding: 14px; text-align: center; cursor: pointer;
  color: var(--text3); font-size: 12px; margin-top: 8px;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--line2); color: var(--text2); }
.upload-area input { display: none; }

.upload-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.upload-preview-item {
  position: relative; width: 72px; height: 72px;
  border-radius: 3px; overflow: hidden; border: 1px solid var(--line);
}
.upload-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview-item button {
  position: absolute; top: 2px; right: 2px;
  background: rgba(0,0,0,.55); color: #fff; border: none;
  border-radius: 50%; width: 16px; height: 16px;
  font-size: 9px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.editor-footer {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.editor-footer-right { display: flex; gap: 6px; margin-left: auto; }

/* ===== Search Results ===== */
.search-page-form { display: flex; gap: 6px; margin-bottom: 16px; }
.search-page-input { flex: 1; max-width: 320px; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 3px; margin-top: 28px; flex-wrap: wrap; }
.page-btn {
  padding: 4px 9px; border: 1px solid var(--line);
  border-radius: 3px; font-size: 12px; color: var(--text2); background: var(--bg);
}
.page-btn:hover { border-color: var(--line2); color: var(--text); text-decoration: none; }
.page-btn.active { background: var(--inv-bg); border-color: var(--inv-bg); color: var(--inv-text); }

/* ===== Admin ===== */
.admin-wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 60px; }
.admin-header { margin-bottom: 16px; }
.admin-header h2 { font-size: 13px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.admin-nav { display: flex; gap: 3px; flex-wrap: wrap; }
.admin-nav a {
  padding: 4px 12px; border-radius: 3px; font-size: 12px;
  color: var(--text2); border: 1px solid var(--line); background: var(--bg);
}
.admin-nav a:hover { color: var(--text); text-decoration: none; }
.admin-nav a.active { background: var(--inv-bg); border-color: var(--inv-bg); color: var(--inv-text); }

.stats-grid { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 90px;
  border: 1px solid var(--line); border-radius: 3px;
  padding: 14px; text-align: center; background: var(--bg2);
}
.stat-number { font-size: 22px; font-weight: 700; }
.stat-label  { font-size: 11px; color: var(--text3); margin-top: 2px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th {
  padding: 6px 8px; text-align: left;
  font-size: 10px; font-weight: 700; color: var(--text3);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.admin-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg2); }

.admin-split { display: flex; gap: 20px; }
.admin-split > div { flex: 1; }
.select-inline {
  padding: 2px 6px; border: 1px solid var(--line);
  border-radius: 3px; font-size: 11px;
  background: var(--bg); color: var(--text);
}

/* ===== Settings ===== */
.settings-wrap {
  max-width: 920px; margin: 0 auto;
  padding: 24px 16px 60px;
  display: flex; gap: 24px;
}
.settings-nav {
  width: 140px; flex-shrink: 0;
}
.settings-nav nav {
  display: flex; flex-direction: column; gap: 2px;
}
.settings-nav a {
  display: block; padding: 6px 10px;
  font-size: 13px; color: var(--text2);
  border-radius: 3px; text-decoration: none;
}
.settings-nav a:hover { background: var(--bg2); color: var(--text); }
.settings-nav a.active { background: var(--inv-bg); color: var(--inv-text); }
.settings-body { flex: 1; min-width: 0; }
.settings-title {
  font-size: 15px; font-weight: 700;
  margin-bottom: 18px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.settings-section-title {
  font-size: 12px; font-weight: 700;
  color: var(--text2); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 10px;
}
.settings-form { max-width: 400px; }
@media (max-width: 560px) {
  .settings-wrap { flex-direction: column; }
  .settings-nav { width: 100%; }
  .settings-nav nav { flex-direction: row; flex-wrap: wrap; }
}

/* ===== Badges ===== */
.badge {
  display: inline-block; padding: 1px 6px;
  border-radius: 2px; font-size: 10px; font-weight: 600;
  border: 1px solid var(--line); color: var(--text2); background: var(--bg2);
}
.badge-active    { border-color: var(--line2); }
.badge-inactive  { color: var(--text3); }
.badge-admin     { font-weight: 700; color: var(--text); border-color: var(--line2); }
.badge-btn {
  cursor: pointer; background: var(--bg2);
  font-family: inherit; transition: opacity .15s;
}
.badge-btn:hover { opacity: .7; }
.btn-danger { color: #c00; border-color: #c00; }
.btn-danger:hover { background: #c00; color: #fff; }

/* ===== Profile ===== */
.profile-view { margin-bottom: 18px; }
.profile-view h2 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.text-muted { color: var(--text3); font-size: 12px; }
.profile-view p { font-size: 12px; color: var(--text2); margin-bottom: 5px; }

/* ===== Error ===== */
.error-page { text-align: center; padding: 80px 20px; }
.error-code { font-size: 60px; font-weight: 700; color: var(--line); margin-bottom: 10px; }
.error-message { font-size: 14px; color: var(--text3); margin-bottom: 20px; }

/* ===== Empty ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty-state p { margin-bottom: 14px; }

/* ===== Photo Album ===== */
.pa-placeholder {
  display: block;
  margin: 8px 0;
  padding: 8px 18px;
  background: #e8f0fe;
  border: 2px dashed #4a90d9;
  border-radius: 6px;
  font-family: monospace;
  font-weight: 700;
  font-size: 13px;
  color: #1a56db;
  cursor: default;
  user-select: none;
  text-align: center;
  letter-spacing: .05em;
}
[data-theme="dark"] .pa-placeholder {
  background: #1a2744;
  border-color: #4a90d9;
  color: #7eb8f7;
}
.pa-album { margin: 16px 0; }
.pa-page { display: block; }
.pa-page.pa-hidden { display: none; }
.pa-grid { display: grid; gap: 3px; }
.pa-item { display: block; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.pa-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; pointer-events: none; }
.pa-item:hover img { transform: scale(1.06); }
.pa-empty { padding: 20px; text-align: center; color: var(--text3); font-size: 13px; }
.pa-index {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 7px 0; font-size: 13px; color: var(--text2);
  border-top: 1px solid var(--line); margin-top: 3px;
}
.pa-btn {
  cursor: pointer; background: var(--bg2); border: 1px solid var(--line2);
  color: var(--text); padding: 3px 11px; border-radius: 4px;
  font-size: 12px; line-height: 1.5; font-family: inherit;
}
.pa-btn:hover { background: var(--line); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text3);
}

/* ===== Responsive ===== */
@media (max-width: 560px) {
  .post-thumbnail { flex: 0 0 80px; height: 60px; }
  .search-input { width: 90px; }
  .post-full-title { font-size: 18px; }
  .form-row { flex-direction: column; }
  .admin-split { flex-direction: column; }
}
@media (max-width: 400px) {
  .header-inner { gap: 6px; padding: 0 8px; }
  .search-input { width: 60px; padding: 3px 5px; }
  .search-btn { padding: 3px 5px; }
}
