/* ─── Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Square:wght@400;700;800&family=Noto+Sans+KR:wght@300;400;500;600&display=swap');

@font-face {
  font-family: 'Avenir';
  src: local('Avenir Next'), local('Avenir'), local('Century Gothic');
  font-weight: 300 700;
}

/* ─── Variables ─── */
:root {
  /* White theme */
  --bg:          #ffffff;
  --bg2:         #f8f9fa;
  --bg3:         #f1f3f5;
  --bg4:         #e9ecef;
  --border:      #e0e4e8;
  --border2:     #cdd1d6;
  --text:        #1a1a1a;
  --text-sub:    #6b7280;
  --text-dim:    #b0b8c1;
  --accent:      #71C0BB;
  --accent-light:#EEF7F6;
  --accent-hover:#5AABA6;
  --danger:      #e5452c;
  --success:     #5AABA6;
  --thread-line: #d8e8e7;
  --hover-bg:    rgba(238,247,246,0.6);

  /* category colours — light→dark: movie→travel */
  --cat-movie:        #C1D0C4;   /* grayish green  */
  --cat-game:         #D9E89A;   /* lemon green    */
  --cat-drama:        #90C67A;   /* 연두            */
  --cat-book:         #71C0BB;   /* teal           */
  --cat-travel:       #4E6888;   /* navy           */
  --cat-travel-text:  #ffffff;
  --feed-dot:         #71C0BB;

  /* Fonts */
  --font-en:     'Avenir Next', 'Avenir', 'Century Gothic', -apple-system, sans-serif;
  --font-ko-title: 'Nanum Square', sans-serif;
  --font-ko-body:  'Noto Sans KR', sans-serif;
  --font-mono:   'SF Mono', 'Fira Mono', monospace;

  --r:     10px;
  --r-sm:  6px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ko-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

/* English / UI elements — Avenir */
.en, nav, .page-title, .feed-sub, .cat-pill, .nav-item, .sub-item,
.review-cat-label, .rd-cat-badge, .review-date, .review-count,
.post-time, .post-author, .rd-time, .wd-meta, .w-date,
.btn, .admin-btn, .act-btn, .td-back, .cc, .sec-label,
.mob-nav-item, .mobile-sidebar-title {
  font-family: var(--font-en);
}

/* Korean titles */
.review-title, .writing-title, .rd-title, .wd-title, .post-author-name {
  font-family: var(--font-ko-title);
}

/* Korean body content */
.post-text, .rd-content, .wd-body, .writing-excerpt, .compose-ta,
.rc-thread-ta, .wc-ta, .rc-input, .wc-content {
  font-family: var(--font-ko-body);
}

/* ─── Layout ─── */
.layout {
  display: flex;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0;
  gap: 0;
  min-height: 100vh;
}

/* ─── Sidebar ─── */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 36px 16px 28px 28px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
.sidebar::-webkit-scrollbar { display: none; }

/* Profile — avatar removed, just name + bio */
.profile {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.profile-name {
  font-family: var(--font-ko-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  text-align: right;
}
.profile-bio {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.55;
  text-align: right;
}
.profile-stats {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  justify-content: flex-end;
}
.stat-num {
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
  font-family: var(--font-en);
}

/* Nav */
.nav { display: flex; flex-direction: column; gap: 1px; margin-bottom: 16px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--text-sub);
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.13s;
  text-align: left;
  width: 100%;
}
.nav-item:hover { background: var(--accent-light); color: var(--accent); }
.nav-item.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }

.nbadge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg3);
  border-radius: 10px;
  padding: 1px 7px;
  color: var(--text-dim);
}
.nav-item.active .nbadge { background: rgba(113,192,187,0.15); color: var(--accent); }

/* Sub nav */
.sub-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 2px 0 16px 12px;
}
.sub-nav.open { /* kept for JS compat, does nothing */ }

.sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: 10.5px;
  font-family: var(--font-en);
  letter-spacing: 0.2px;
  color: var(--text-sub);
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.12s;
  text-align: left;
  width: 100%;
}
.sub-item:hover { background: var(--bg3); color: var(--text); }
.sub-item.active { color: var(--accent); font-weight: 600; }
.sub-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.sec-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  padding: 0 12px;
  margin-bottom: 6px;
}

.sidebar-footer { margin-top: auto; }

.admin-btn {
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-sub);
  font-size: 11px;
  font-family: var(--font-en);
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.admin-btn:hover { border-color: var(--accent); color: var(--accent); }
.admin-btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ─── Main ─── */
.main {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  overflow-x: hidden;
}

.page { display: none; }
.page.active { display: block; }

/* ─── Page Header ─── */
.page-header {
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.page-title {
  font-family: var(--font-en);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--text);
}
.page-sub {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* ─── Feed ─── */
.feed-body { padding: 0 28px; }

/* Compose */
.compose { border-bottom: 1px solid var(--border); padding: 18px 0; display: none; }
.compose.show { display: block; }

.compose-ta {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  padding: 12px;
  resize: none;
  min-height: 88px;
  transition: border-color 0.15s;
}
.compose-ta:focus { outline: none; border-color: var(--accent); }
.compose-ta::placeholder { color: var(--text-dim); }

.compose-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.compose-left { display: flex; align-items: center; gap: 8px; }

.tag-sel {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-sub);
  font-size: 12px;
  font-family: var(--font-ko-body);
  padding: 4px 12px;
  cursor: pointer;
}
.tag-sel:focus { outline: none; border-color: var(--accent); }

.cc { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.cc.warn { color: var(--accent); }
.cc.over { color: var(--danger); }

.reply-banner {
  background: var(--accent-light);
  border: 1px solid rgba(44,123,229,0.2);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font-en);
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.reply-banner button { background: none; border: none; color: var(--text-dim); font-size: 13px; }

.edit-banner {
  background: #fff8e8;
  border: 1px solid #f0d080;
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font-en);
  color: #a07000;
  margin-bottom: 8px;
  display: none;
}
.edit-banner.show { display: block; }

/* Btns */
.btn {
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-en);
  letter-spacing: 0.3px;
  cursor: pointer;
  border: none;
  transition: all 0.13s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(113,192,187,0.3); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--text-sub); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-sub); color: var(--text); }

/* Post card */
.post-wrap { border-bottom: 1px solid var(--border); }
.post-card {
  padding: 16px 0;
  cursor: pointer;
  transition: background 0.1s;
  border-left: 3px solid transparent;
  padding-left: 2px;
}
.post-card:hover { background: var(--bg2); }
.post-card:hover .post-actions { opacity: 1; }
.post-card.has-thread {
  border-left-color: var(--border2);
  padding-bottom: 0;
}

.post-body { min-width: 0; }
.post-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.post-author {
  font-family: var(--font-ko-title);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.post-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.post-edited { font-size: 10px; color: var(--text-dim); font-style: italic; }
.post-text { font-size: 14px; line-height: 1.7; word-break: break-word; color: var(--text); }
.post-text a { color: var(--accent); }
.post-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.p-tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.13s;
}
.p-tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.post-actions {
  display: flex;
  gap: 2px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.15s;
}
.tw-thread:hover { background: var(--hover-bg); }
.tw-thread:hover .post-actions,
.tw-thread .post-actions:focus-within { opacity: 1; }
.act-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-en);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color 0.12s;
  opacity: 0.7;
}
.act-btn:hover { color: var(--accent); opacity: 1; background: none; }
.act-btn.del { color: var(--text-dim); }
.act-btn.del:hover { color: var(--danger); opacity: 1; background: none; }

/* Thread detail */
.thread-detail { display: none; }
.thread-detail.show { display: block; }

.td-back {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 28px 12px;
  color: var(--text-sub);
  font-size: 12px;
  font-family: var(--font-en);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  border-bottom: 1px solid var(--border);
  transition: color 0.13s;
  letter-spacing: 0.2px;
}
.td-back:hover { color: var(--accent); }

.td-body { padding: 24px 28px; }
.td-root {
  background: var(--bg2);
  border: 1px solid #dbeafe;
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 2px;
}
.td-content { font-size: 17px; line-height: 1.75; margin-bottom: 14px; color: var(--text); }
.td-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-sub);
  font-family: var(--font-mono);
  flex-wrap: wrap;
}
.td-actions { display: flex; gap: 8px; margin-top: 12px; }
.td-reply { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.comments-wrap { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.comments-title {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0.3px;
  margin-bottom: 18px;
}

/* ═══════════════════
   REVIEWS PAGE
═══════════════════ */
/* Category filter bar */
.cat-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.cat-bar::-webkit-scrollbar { display: none; }

.cat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-en);
  letter-spacing: 0.2px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-sub);
  white-space: nowrap;
  transition: all 0.14s;
  flex-shrink: 0;
}
.cat-pill:hover { border-color: var(--border2); color: var(--text); }
.cat-pill.active { color: #fff; border-color: transparent; }
.cat-pill .cd { width: 6px; height: 6px; border-radius: 50%; }

.cat-pill[data-cat="all"].active    { background: var(--accent); }
.cat-pill[data-cat="movie"].active  { background: var(--cat-movie); }
.cat-pill[data-cat="game"].active   { background: var(--cat-game); }
.cat-pill[data-cat="drama"].active  { background: var(--cat-drama); }
.cat-pill[data-cat="book"].active   { background: var(--cat-book); }
.cat-pill[data-cat="travel"].active { background: var(--cat-travel); }

/* Review list */
.review-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 28px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.review-row:hover { background: var(--hover-bg); }
.review-row:hover .review-title { color: var(--text); }
.review-row:hover .review-cat-label,
.review-row:hover .review-date,
.review-row:hover .review-count { color: var(--text-sub); }
.review-row:hover .review-title { color: var(--accent); }
.review-row:hover .review-arrow { transform: translateX(3px); color: var(--accent); }

.review-cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.review-info { flex: 1; min-width: 0; }
.review-title {
  font-family: var(--font-ko-title);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  transition: color 0.13s;
}
.review-meta { display: flex; align-items: center; gap: 10px; margin-top: 5px; flex-wrap: wrap; }
.review-cat-label {
  font-size: 10px;
  font-family: var(--font-en);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}
.review-date { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.review-count { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.review-arrow { color: var(--text-dim); font-size: 14px; flex-shrink: 0; transition: transform 0.15s, color 0.15s; }

.review-row-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s; }
.review-row:hover .review-row-actions { opacity: 1; }

/* Review detail */
.review-detail { display: none; }
.review-detail.show { display: block; }

.rd-header { padding: 24px 28px 20px; border-bottom: 1px solid var(--border); }
.rd-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-family: var(--font-en);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  background: var(--bg3);
}
.rd-title {
  font-family: var(--font-ko-title);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--text);
}
.rd-meta { font-size: 12px; color: var(--text-sub); font-family: var(--font-mono); }

.rd-threads { padding: 8px 28px 24px; }
.rd-thread-item { display: flex; gap: 14px; padding: 16px 0; position: relative; }
.rd-thread-connector { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 36px; }
.rd-tline { width: 2px; flex: 1; background: var(--rd-cat-color, var(--thread-line)); margin-top: 6px; min-height: 20px; opacity: 0.35; }

/* Avatar for review threads (no actual avatar, just a line indicator) */
.rd-thread-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rd-cat-color, var(--accent)); flex-shrink: 0; margin-top: 7px;
}

.rd-content { font-size: 15px; line-height: 1.8; flex: 1; word-break: break-word; color: var(--text); }
.rd-time { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); margin-top: 8px; }

/* Review compose */
.review-compose { display: none; padding: 24px 28px; border-bottom: 1px solid var(--border); background: var(--bg2); }
.review-compose.show { display: block; }

.rc-label {
  font-size: 10px;
  font-family: var(--font-en);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 7px;
  font-weight: 600;
}
.rc-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-ko-body);
  font-size: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}
.rc-input:focus { outline: none; border-color: var(--accent); }
.rc-input::placeholder { color: var(--text-dim); }

.rc-cat-sel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-sub);
  font-size: 12px;
  font-family: var(--font-en);
  padding: 5px 14px;
  margin-bottom: 14px;
}
.rc-cat-sel:focus { outline: none; border-color: var(--accent); }

.rc-threads { margin-bottom: 14px; }
.rc-thread-ta {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-ko-body);
  font-size: 14px;
  padding: 10px 12px;
  resize: none;
  min-height: 70px;
  transition: border-color 0.15s;
  margin-bottom: 8px;
  line-height: 1.7;
}
.rc-thread-ta:focus { outline: none; border-color: var(--accent); }
.rc-thread-ta::placeholder { color: var(--text-dim); }

.rc-add-thread {
  background: none;
  border: 1px dashed var(--border);
  color: var(--text-dim);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  font-size: 12px;
  font-family: var(--font-en);
  cursor: pointer;
  width: 100%;
  transition: all 0.15s;
}
.rc-add-thread:hover { border-color: var(--accent); color: var(--accent); }

.rc-thread-entry { position: relative; margin-bottom: 6px; }
.rc-del-thread {
  position: absolute;
  top: 6px; right: 6px;
  background: var(--bg3);
  border: none;
  color: var(--text-dim);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
}
.rc-del-thread:hover { color: var(--danger); }

/* ═══════════════════
   WRITINGS PAGE
═══════════════════ */
.writing-row {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.writing-row:hover { background: var(--hover-bg); }
.writing-row:hover .writing-title { color: var(--accent); }

.writing-title {
  font-family: var(--font-ko-title);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 7px;
  color: var(--text);
  transition: color 0.13s;
}
.writing-excerpt {
  font-family: var(--font-ko-body);
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.writing-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.w-tag {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}
.w-date { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); margin-left: auto; }

.writing-row-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s; margin-top: 10px; }
.writing-row:hover .writing-row-actions { opacity: 1; }

/* Writing detail */
.writing-detail { display: none; }
.writing-detail.show { display: block; }

.wd-header { padding: 24px 28px 20px; border-bottom: 1px solid var(--border); }
.wd-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.wd-title {
  font-family: var(--font-ko-title);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text);
}
.wd-meta { font-size: 12px; color: var(--text-sub); font-family: var(--font-mono); }
.wd-body {
  padding: 28px 28px;
  font-family: var(--font-ko-body);
  font-size: 14.2px;
  line-height: 1.95;
  color: var(--text);
  max-width: 640px;
}
.wd-body p { margin-bottom: 1.5em; }
.wd-actions { display: flex; gap: 4px; margin-top: 16px; }
.wd-actions .act-btn { font-size: 13px; padding: 5px 8px; opacity: 1; color: var(--text-sub); }
.wd-actions .act-btn:hover { color: var(--accent); }
.wd-actions .act-btn.del:hover { color: var(--danger); }

/* Writing compose */
.writing-compose { display: none; padding: 24px 28px; border-bottom: 1px solid var(--border); background: var(--bg2); }
.writing-compose.show { display: block; }

.wc-ta {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-ko-body);
  font-size: 14px;
  padding: 12px;
  resize: none;
  min-height: 220px;
  transition: border-color 0.15s;
  margin-bottom: 12px;
  line-height: 1.8;
}
.wc-ta:focus { outline: none; border-color: var(--accent); }
.wc-ta::placeholder { color: var(--text-dim); }

/* ─── Empty / Loading ─── */
.empty { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-icon { font-size: 28px; margin-bottom: 10px; }
.empty-msg { font-size: 13px; font-family: var(--font-en); }

.loading-state {
  padding: 40px 28px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 9px 20px;
  font-size: 12px;
  font-family: var(--font-en);
  letter-spacing: 0.2px;
  opacity: 0;
  transition: all 0.22s;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
  color: var(--text);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: var(--accent); color: var(--accent); }
.toast.err { border-color: var(--danger); color: var(--danger); }

/* ─── Modal ─── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}
.modal-bg.show { opacity: 1; pointer-events: all; }
.modal {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  transform: translateY(10px);
  transition: transform 0.2s;
}
.modal-bg.show .modal { transform: translateY(0); }
.modal-title {
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.modal-desc {
  font-size: 12px;
  font-family: var(--font-en);
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 18px;
}
.modal-desc a { color: var(--accent); }
.modal-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 12px;
  margin-bottom: 10px;
  transition: border-color 0.15s;
}
.modal-input:focus { outline: none; border-color: var(--accent); }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ─── FAB ─── */
.fab {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(113,192,187,0.35);
  transition: background 0.15s;
  z-index: 90;
}
.fab.show { display: flex; }
.fab:hover { background: var(--accent-hover); }

/* ─── Category color helpers ─── */
.c-movie   { color: var(--cat-movie); }
.c-game    { color: var(--cat-game); }
.c-drama   { color: var(--cat-drama); }
.c-book    { color: var(--cat-book); }
.c-travel  { color: var(--cat-travel); }
.bg-movie   { background: var(--cat-movie); }
.bg-game    { background: var(--cat-game); }
.bg-drama   { background: var(--cat-drama); }
.bg-book    { background: var(--cat-book); }
.bg-travel  { background: var(--cat-travel); }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ─── Responsive ─── */

.comments-wrap {
  padding: 20px 24px 32px;
}

/* Hide the horizontal line Giscus puts above the widget */
.comments-title { display: none !important; }

/* Giscus widget — smaller, contained */
.giscus, .giscus-frame {
  width: 100% !important;
}
.giscus { transform: scale(0.8); transform-origin: top left; width: 125% !important; }
.feed-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-family: var(--font-en);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.feed-card-title {
  font-family: var(--font-ko-title);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin: 5px 0 5px;
  color: var(--text);
}

.feed-card-review:hover .feed-card-title,
.feed-card-writing:hover .feed-card-title { color: var(--accent); }

.feed-thread-preview {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Post images ─── */
.post-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.post-img {
  max-width: 100%;
  max-height: 320px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  object-fit: cover;
  cursor: default;
  display: block;
}

.post-images:has(.post-img + .post-img) .post-img {
  max-width: calc(50% - 3px);
  max-height: 200px;
}

/* ─── Image upload in compose ─── */
.img-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: var(--bg3);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.14s;
  flex-shrink: 0;
}
.img-upload-btn:hover { border-color: var(--accent); background: var(--accent-light); }

.image-preview-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.image-preview-wrap:empty { display: none; }

.img-preview-item {
  position: relative;
  display: inline-block;
}

.img-preview-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  display: block;
}

.img-preview-item button {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}
.img-preview-item button:hover { background: var(--danger); }

/* ── Guestbook ─────────────────────────────────── */
.guestbook-wrap {
  padding: 24px;
  max-width: 560px;
}
.gb-form-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
  transform: scale(0.93);
  transform-origin: top center;
}
.gb-field {
  margin-bottom: 18px;
}
.gb-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 7px;
  font-family: var(--font-mono);
}
.gb-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-ko-body);
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
  transition: border-color .15s;
}
.gb-input:focus {
  outline: none;
  border-color: var(--accent);
}
.gb-ta {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-ko-body);
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
  resize: vertical;
  min-height: 110px;
  transition: border-color .15s;
}
.gb-ta:focus {
  outline: none;
  border-color: var(--accent);
}
.gb-charcount {
  text-align: right;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  font-family: var(--font-mono);
}
.gb-btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  margin-top: 4px;
}
.gb-success {
  text-align: center;
  padding: 32px;
  font-size: 16px;
  color: var(--accent);
  font-family: var(--font-ko-body);
}

/* ── Pics grid ──────────────────────────────── */
.pics-grid-wrap { padding: 16px 24px 32px; }
.pics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.pic-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: var(--bg3);
}
.pic-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .2s;
  display: block;
}
.pic-item:hover img { transform: scale(1.04); }

/* ── Hidden badge ───────────────────────────── */
.hidden-badge {
  position: absolute; top: 6px; left: 6px;
  background: rgba(0,0,0,.55);
  color: #fff; font-size: 10px;
  padding: 2px 7px; border-radius: 10px;
  font-family: var(--font-mono);
}
.post-card.is-hidden, .review-row.is-hidden, .writing-row.is-hidden {
  opacity: 0.5;
}

/* ── Lightbox ───────────────────────────────── */
.pics-lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.pics-lightbox.show { display: flex; }
.lb-inner {
  max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}
.lb-inner img {
  max-width: 100%; max-height: 72vh;
  object-fit: contain;
  border-radius: 8px;
}
.lb-caption { color: #fff; font-size: 14px; font-family: var(--font-ko-body); text-align: center; }
.lb-meta { color: rgba(255,255,255,.5); font-size: 12px; font-family: var(--font-mono); }
.lb-admin-bar { display: flex; gap: 8px; }
.lb-close {
  position: fixed; top: 20px; right: 24px;
  background: none; border: none; color: #fff;
  font-size: 28px; cursor: pointer; line-height: 1;
}
.lb-prev, .lb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: none; color: #fff;
  font-size: 36px; padding: 8px 14px; cursor: pointer;
  border-radius: 8px; line-height: 1;
  transition: background .15s;
}
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.2); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* ── Pagination ─────────────────────────────── */

.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }

/* ── Feed thread comments top spacing ──────── */
#feed-thread-view .comments-wrap {
  margin-top: 24px;
}

/* ── Feed thread view: back button spacing from nav ── */
#feed-thread-view {
  padding-top: 0;
}
#feed-thread-view .td-back {
  margin-top: 0;
  padding-top: 18px;
  padding-bottom: 14px;
}

/* ── Feed inline thread ─────────────────────── */
.ft-thread {
  cursor: pointer;
  border-radius: var(--r);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--bg);
  transition: box-shadow .15s;
  margin-bottom: 2px;
}
.ft-thread:hover { box-shadow: 0 2px 12px rgba(44,123,229,.07); }

.ft-root {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.ft-reply {
  display: flex;
  gap: 0;
  padding: 0;
}
.ft-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 38px;
  flex-shrink: 0;
  padding-top: 14px;
}
.ft-line {
  width: 2px;
  height: 14px;
  background: var(--thread-line);
  margin-bottom: 3px;
}
.ft-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}
.ft-reply .post-body {
  flex: 1;
  padding: 10px 18px 10px 0;
  border-bottom: 1px solid var(--border);
}
.ft-reply:last-of-type .post-body { border-bottom: none; }

.ft-more-wrap { border-top: 1px solid var(--border); }
.ft-more-btn {
  width: 100%;
  padding: 9px 18px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-family: var(--font-en);
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  letter-spacing: .02em;
}
.ft-more-btn:hover { background: var(--bg2); }
.ft-hidden-replies { border-top: 1px solid var(--border); }

/* post-wrap used inside thread — remove old border */
.ft-thread .post-wrap { margin: 0; }

/* ── Twitter-style feed ─────────────────────── */
.tw-thread {
  border-top: 1px solid var(--border);
  padding: 4px 0 0;
}
.tw-thread-first { border-top: none; }
.tw-thread:last-of-type { border-bottom: 1px solid var(--border); }

.tw-post {
  display: flex;
  gap: 14px;
  padding: 16px 24px 4px;
}
.tw-root  { padding-bottom: 0; }
.tw-reply { padding-top: 4px; padding-bottom: 4px; }
.tw-reply:last-child { padding-bottom: 16px; }

/* Left column: dot + line */
.tw-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 16px;
  padding-top: 4px;
}
.tw-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tw-root .tw-dot { width: 12px; height: 12px; }
.tw-vline {
  width: 2px;
  flex: 1;
  min-height: 14px;
  background: var(--thread-line);
  margin-top: 5px;
}

/* Right column */
.tw-right {
  flex: 1;
  min-width: 0;
  padding-bottom: 14px;
}
.tw-root .tw-right  { padding-bottom: 10px; }
.tw-reply .tw-right { padding-bottom: 10px; padding-top: 0; }

.tw-meta {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 5px;
}
.tw-author {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-en);
}
.tw-time {
  font-size: 12px;
  color: var(--text-sub);
  font-family: var(--font-mono);
}

/* Admin buttons — visible on thread hover */
.tw-thread:hover { background: var(--hover-bg); }
.tw-thread:hover .post-actions,
.tw-thread .post-actions:focus-within { opacity: 1; }

/* More / collapse */

/* Review thread dots — inherit category color via --rd-cat-color */
.rd-thread-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--rd-cat-color, var(--accent));
  flex-shrink: 0; margin-top: 7px;
}

/* Admin buttons always visible on touch devices */
@media (hover: none) {
  .tw-thread .post-actions { opacity: 1; }
}

/* ── "더 보기" color: feed dot color ─────────── */

/* ── Scroll top/bottom buttons ───────────────── */
.scroll-btns {
  position: fixed;
  right: 24px;
  bottom: 90px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 900;
}
.scroll-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-sub);
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: background .15s, color .15s, box-shadow .15s;
  display: flex; align-items: center; justify-content: center;
}
.scroll-btn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(44,123,229,.25);
}

/* ── Search page ─────────────────────────────── */
.search-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 4px;
}
.search-input-wrap {
  position: relative;
  margin-bottom: 20px;
}
.search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 40px 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  font-size: 15px;
  font-family: var(--font-ko-body);
  background: var(--bg2);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44,123,229,.1);
  background: var(--bg);
}
.search-clear {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-dim);
  font-size: 14px; cursor: pointer;
  padding: 4px;
}
.search-clear:hover { color: var(--text); }

.search-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 0;
  font-size: 14px;
}
.search-result-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
  border-radius: 8px;
  margin-bottom: 2px;
}
.search-result-item:hover { background: var(--bg2); }
.sr-type {
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.sr-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
  word-break: break-all;
}
.sr-sub {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 3px;
}
.sr-date {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ── Search inline header ────────────────────── */
.search-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.search-inline-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
}
.search-inline-input {
  flex: 1;
  border: none;
  border-bottom: 1.5px solid var(--border);
  background: transparent;
  font-size: 15px;
  font-family: var(--font-ko-body);
  color: var(--text);
  padding: 4px 28px 4px 2px;
  outline: none;
  transition: border-color .15s;
}
.search-inline-input:focus { border-bottom-color: var(--accent); }
.search-inline-input::placeholder { color: var(--text-dim); font-size: 13px; }

/* ── Search bar row (flat) ───────────────────── */
.search-bar-row {
  display: flex; align-items: center;
  gap: 10px;
  padding: 14px 28px 12px;
  border-bottom: 1px solid var(--border);
}
.search-icon-flat { color: var(--text-dim); flex-shrink: 0; }
.search-bar-divider {
  width: 1px; height: 16px;
  background: var(--border2);
  flex-shrink: 0;
}
.search-bar-input {
  flex: 1; border: none; background: transparent;
  font-size: 14px; font-family: var(--font-ko-body);
  color: var(--text); outline: none;
}
.search-bar-input::placeholder { color: var(--text-dim); font-size: 13px; }

/* Writing compose improvements */
.wc-footer-row {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 8px; margin-top: 6px;
}
.wc-wordcount {
  font-size: 11px; color: var(--text-dim);
  font-family: var(--font-mono);
}
.wc-content-wrap { position: relative; }

/* ── Writing compose improvements ───────────── */
.wc-syntax-guide {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  padding: 5px 2px 7px;
  letter-spacing: 0.2px;
}
.wc-editor-wrap {
  position: relative;
}
.wc-ta {
  min-height: 320px;
  resize: vertical;
}
.wc-char-count {
  position: absolute;
  bottom: 10px; right: 12px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  pointer-events: none;
}

/* ── Writing detail: heading, hr, blockquote, inline img ─── */
.wd-heading {
  font-family: var(--font-ko-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 2em 0 0.6em;
  letter-spacing: -0.2px;
  line-height: 1.35;
}
.wd-heading:first-child { margin-top: 0; }
.wd-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}
.wd-quote {
  border-left: 3px solid var(--accent);
  margin: 1.2em 0;
  padding: 6px 0 6px 16px;
  color: var(--text-sub);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.75;
}
.wd-inline-img {
  margin: 1.4em 0;
}
.wd-inline-img img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
}

.bulk-count { color: var(--accent); font-weight: 600; margin-right: auto; }
.bulk-selected { background: var(--accent-light) !important; }

/* ══════════════════════════════════════════
   THREAD CONNECTOR FIX
   ══════════════════════════════════════════ */

/* ══════════════════════════════════════════
   MOBILE SIDEBAR — ICON RAIL
   ══════════════════════════════════════════ */

/* ══════════════════════════════════════════════
   THREAD — flat layout, no indentation
   ══════════════════════════════════════════════ */

/* Left column aligns with other posts */

/* thread wrap relative for the line */

/* ══════════════════════════════════════════════
   PAGE BTN — text only, no border
   ══════════════════════════════════════════════ */

.feed-page-nav,

/* ══════════════════════════════════════════════
   MOBILE — TOGGLE + OVERLAY SIDEBAR
   ══════════════════════════════════════════════ */

/* Mobile toggle button — fixed top-left, only on mobile */

/* ══════════════════════════════════════════════════
   THREAD — flat Twitter-style
   ══════════════════════════════════════════════════ */

/* "더 보기" row: matches tw-post layout exactly */
.tw-more-item {
  display: flex;
  gap: 14px;
  padding: 0 24px;
  align-items: stretch;
}
/* Left col: just the vline, no dot */
.tw-more-item > .tw-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 16px;
  flex-shrink: 0;
}
.tw-vline-only {
  width: 2px;
  background: var(--thread-line);
  flex: 1;
  min-height: 28px;
}
/* Right col: button at same horizontal position as post content */
.tw-more-item > .tw-right {
  flex: 1;
  min-width: 0;
  padding: 2px 0 4px;
}
.tw-more-btn {
  background: none; border: none;
  color: var(--accent); font-size: 12px;
  font-family: var(--font-en);
  cursor: pointer; padding: 5px 0;
  font-weight: 500;
  display: block;
  text-align: left;
}
.tw-more-btn:hover { color: var(--accent-hover); }

/* ══════════════════════════════════════════════════
   PAGE BTN — text only, no border
   ══════════════════════════════════════════════════ */
.page-btn {
  background: none; border: none;
  color: var(--accent); font-size: 13px;
  font-family: var(--font-en);
  cursor: pointer; padding: 4px 6px;
  font-weight: 500;
  transition: color 0.12s;
}
.page-btn:hover { color: var(--accent-hover); }
.page-btn:disabled { color: var(--text-dim); cursor: default; }

.feed-page-nav,
.pagination {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 24px;
  font-size: 12px; font-family: var(--font-mono); color: var(--text-dim);
}
.page-info { font-size: 12px; font-family: var(--font-mono); color: var(--text-dim); }

#pics-page-nav {
  justify-content: center;
}

/* Bulk bar */
.bulk-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 24px;
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-family: var(--font-en);
}
.bulk-count { color: var(--accent); font-weight: 600; margin-right: auto; }
.bulk-selected { background: var(--accent-light) !important; }

/* ══════════════════════════════════════════════════
   MOBILE — OVERLAY SIDEBAR
   (toggle button is a fixed element outside .layout)
   ══════════════════════════════════════════════════ */

/* Hidden on desktop by default */
.mobile-toggle-btn { display: none; }

.mobile-nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 490;
}
.mobile-nav-overlay.open { display: block; }

.mobile-sidebar {
  position: fixed; top: 0; left: 0;
  width: 240px; height: 100vh;
  background: var(--bg);
  border-right: 1px solid var(--border);
  z-index: 500;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  overflow-y: auto;
}
.mobile-sidebar.open { transform: translateX(0); }

.mobile-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mobile-sidebar-title {
  font-size: 13px; font-weight: 700;
  font-family: var(--font-en); color: var(--text);
}
.mobile-sidebar-close {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; padding: 4px; line-height: 1;
}
.mobile-sidebar-nav {
  display: flex; flex-direction: column;
  padding: 6px 0; flex: 1;
}
.mob-nav-item {
  background: none; border: none;
  text-align: left; padding: 12px 18px;
  font-size: 14px; font-family: var(--font-ko);
  color: var(--text-sub); cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: background 0.1s, color 0.1s;
}
.mob-nav-item:hover { background: var(--hover-bg); color: var(--accent); }
.mob-nav-item svg { flex-shrink: 0; color: var(--text-dim); }
.mob-nav-divider {
  height: 1px; background: var(--border);
  margin: 6px 0;
}

@media (max-width: 760px) {

  /* Show mobile toggle */
  .mobile-toggle-btn {
    display: flex; align-items: center; justify-content: center;
    position: fixed; top: 10px; left: 10px;
    z-index: 300;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 8px; width: 38px; height: 38px;
    cursor: pointer; color: var(--text-sub);
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
  }

  /* Desktop sidebar: hidden on mobile */
  .sidebar { display: none !important; }

  /* Layout: single column */
  .layout { flex-direction: column; max-width: 100%; }

  /* Main: full width, top padding for toggle button */
  .main {
    padding-top: 54px;
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Prevent any horizontal overflow */
  .page, .feed-body, .page-header,
  .review-list, .writing-list, .search-wrap,
  .search-bar-row { max-width: 100%; overflow-x: hidden; box-sizing: border-box; }

  /* Padding */
  .feed-body     { padding: 0 14px; }
  .page-header   { padding: 14px 14px 10px; }
  .cat-bar       { padding: 10px 14px; }
  .review-row    { padding: 12px 14px; }
  .writing-row   { padding: 14px; }
  .rd-threads    { padding: 8px 14px 20px; }
  .td-body       { padding: 18px 14px; }
  .rd-header     { padding: 14px 14px 12px; }
  .wd-header     { padding: 14px 14px 12px; }
  .wd-body       { padding: 14px; }
  .review-compose, .writing-compose { padding: 14px; }
  .bulk-bar      { padding: 8px 14px; }
  .tw-post       { padding: 10px 14px 4px; gap: 10px; }
  .tw-more-item  { padding: 0 14px; gap: 10px; }
  .tw-left       { width: 12px; }
  .tw-dot        { width: 9px; height: 9px; }
  .feed-page-nav, .pagination { padding: 10px 14px; }
  .fab           { bottom: 16px; right: 16px; }
  .scroll-btns   { right: 12px; bottom: 72px; }

  /* Search */
  .search-bar-input { width: 100%; min-width: 0; }

  /* Pics grid: 2 columns on mobile */
  .pics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Cat bar: smaller padding, always scrollable */
  .cat-bar { padding: 8px 14px; gap: 5px; }
  .cat-pill { font-size: 12px; padding: 4px 10px; white-space: nowrap; }

  /* Writing rows: full width */
  .writing-row { padding: 14px; }
  .writing-row-actions { flex-shrink: 0; }

  /* Review rows */
  .review-row-actions { flex-shrink: 0; }

  /* Page headers */
  .page-title { font-size: 17px; }
  .page-sub { font-size: 12px; }

  /* Compose textarea: full width */
  .compose-ta { font-size: 14px; }
  .compose-bar { padding: 8px 0 0; }

  /* Scroll buttons: don't overlap sidebar toggle */
  .scroll-btns { right: 10px; bottom: 70px; }
  .scroll-btn { width: 32px; height: 32px; font-size: 13px; }

  /* FAB: above scroll buttons */
  .fab { bottom: 60px; right: 14px; width: 42px; height: 42px; }

  /* Lightbox nav buttons: bigger touch targets */
  .lb-prev, .lb-next { width: 44px; height: 44px; font-size: 22px; }

  /* Thread posts: tighter */
  .tw-root .tw-right { padding-bottom: 6px; }
  .tw-reply .tw-right { padding-bottom: 6px; }

}
