:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --panel-alt: #f9fafb;
  --hover: #f3f4f6;
  --line: #e5e7eb;
  --ink-strong: #111827;
  --ink: #1f2937;
  --muted: #6b7280;
  --link: #374151;
  --accent: #0b5a34;
  --accent-hover: #084728;
  --accent-soft: #ecfdf5;
  --accent-line: #bbf7d0;
  --badge: #9ca3af;
  --btn: #0b5a34;
  --btn-ink: #ffffff;
  --btn-bg: #f9fafb;
  --btn-border: #d1d5db;
  --btn-hover: #f3f4f6;
  --input-bg: #ffffff;
  --input-border: #d1d5db;
  --tag-bg: #f3f4f6;
  --tag-border: #e5e7eb;
  --tag-ink: #4b5563;
  --code-bg: #f1f5f9;
  --code-border: #e2e8f0;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .03);
  --shadow-pop: 0 12px 30px rgba(15, 23, 42, .12);
  --unread-bg: #fefce8;
  --pin-bg: #f8fcfa;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-ink: #92400e;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-ink: #b91c1c;
  --radius: 8px;
  --font-display: "Plus Jakarta Sans", "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html.theme-dark {
  color-scheme: dark;
  --bg: #0f1419;
  --panel: #161d24;
  --panel-alt: #1b242d;
  --hover: #1e2832;
  --line: #28333f;
  --ink-strong: #f1f5f9;
  --ink: #d1d8e0;
  --muted: #8b98a5;
  --link: #c7d2de;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --accent-soft: rgba(34, 197, 94, 0.14);
  --accent-line: rgba(34, 197, 94, 0.34);
  --badge: #64748b;
  --btn: #16a34a;
  --btn-ink: #ffffff;
  --btn-bg: #1e2730;
  --btn-border: #303d4b;
  --btn-hover: #26323e;
  --input-bg: #10161c;
  --input-border: #303d4b;
  --tag-bg: #1e2730;
  --tag-border: #2e3b48;
  --tag-ink: #b6c2cf;
  --code-bg: #1e2730;
  --code-border: #303d4b;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .28);
  --shadow-pop: 0 14px 32px rgba(0, 0, 0, .48);
  --unread-bg: rgba(234, 179, 8, 0.10);
  --pin-bg: rgba(34, 197, 94, 0.08);
  --warn-bg: rgba(245, 158, 11, 0.12);
  --warn-border: rgba(245, 158, 11, 0.38);
  --warn-ink: #fcd34d;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --danger-border: rgba(239, 68, 68, 0.38);
  --danger-ink: #fca5a5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

html.text-large body { font-size: 16px; line-height: 1.7; }
html.text-large .topic-title { font-size: 16.5px; }
html.text-large .md-prose { font-size: 16px; }
html.text-large .tw-bio { font-size: 15.5px; }

html.density-compact .cell { padding: 9px 14px; gap: 10px; }
html.density-compact .reply { padding: 10px 14px; }
html.density-compact .box .head { padding: 10px 14px; }
html.density-compact .box .body { padding: 11px 14px; }
html.density-compact .box { margin-bottom: 12px; }
html.density-compact .set-row { padding: 10px 14px; }

a { color: var(--link); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); text-decoration: underline; }

#loadbar { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .25s; }
#loadbar.on { opacity: 1; }
#loadbar i { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 0 3px 3px 0; animation: lbslide 1.1s ease-in-out infinite; }
@keyframes lbslide { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

.skl { display: block; background: linear-gradient(90deg, var(--tag-bg) 25%, var(--panel-alt) 50%, var(--tag-bg) 75%); background-size: 200% 100%; animation: sklsh 1.2s linear infinite; border-radius: 6px; }
.skl-line { height: 12px; margin: 6px 0; }
.skl-av { width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0; }
@keyframes sklsh { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== Top bar (3-zone minimalist navigation) ===== */
#topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
#topbar .inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-left { display: flex; align-items: center; gap: 20px; }
.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--ink-strong);
  text-decoration: none;
  line-height: 1;
}
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; color: var(--ink-strong); }

.top-nav { display: flex; align-items: center; gap: 16px; font-size: 13.5px; font-weight: 600; }
.top-nav a { color: var(--muted); padding: 4px 2px; }
.top-nav a:hover, .top-nav a.active { color: var(--accent); text-decoration: none; }

#topbar .spacer { flex: 1; }

.searchbox { display: flex; gap: 6px; align-items: center; }
.searchbox input {
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  width: 210px;
  margin-bottom: 0;
  background: var(--panel-alt);
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
.searchbox input:focus { outline: none; border-color: var(--accent); background: var(--input-bg); }
.searchbox .btn { padding: 6px 12px; }

.navuser { font-size: 13px; display: flex; gap: 10px; align-items: center; position: relative; }
#search-toggle {
  display: none;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  padding: 8px;
  color: var(--muted);
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
}

/* ===== Layout ===== */
#wrap {
  max-width: 1020px;
  margin: 20px auto;
  padding: 0 16px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
#main { flex: 1; min-width: 0; }
#side { width: 280px; flex-shrink: 0; }
#wrap.focus-mode #side { display: none; }
#wrap.focus-mode #main { width: 100%; max-width: 100%; }

/* ===== Cards & Cells ===== */
.box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.box .head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.box .head::after { content: ""; display: block; clear: both; }
.box .body { padding: 14px 16px; }

.head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.sort-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.sort-tab {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.sort-tab:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.sort-tab.cur { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.cell {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 13px;
  align-items: flex-start;
  transition: background .12s ease;
}
.cell:hover { background: var(--hover); }
.cell:last-child { border-bottom: none; }

.topic-title {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-strong);
  font-weight: 600;
  display: inline-block;
}
.topic-title:hover { color: var(--accent); }
.topic-h1 {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink-strong);
  margin-top: 8px;
}

.meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.num, .count, .coin-big, .tx-pos, .tx-neg {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.node-tag {
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tag-ink);
}
.node-tag:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); text-decoration: none; }

.count {
  background: var(--tag-bg);
  color: var(--tag-ink);
  border: 1px solid var(--tag-border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
  align-self: center;
  flex-shrink: 0;
}

/* Zero-pill clean tags */
.tag-list { margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; }
.tag-link { font-size: 12px; color: var(--muted); font-weight: 500; }
.tag-link:hover { color: var(--accent); text-decoration: underline; }

.pin { color: #d97706; font-size: 11.5px; font-weight: 700; margin-left: 4px; }
.lock { color: var(--muted); font-size: 11.5px; margin-left: 4px; }

/* ===== Buttons & Inputs ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--ink);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.3;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--btn-hover); text-decoration: none; color: var(--ink-strong); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.danger { color: var(--danger-ink); border-color: var(--danger-border); background: var(--danger-bg); }
.btn.danger:hover { filter: brightness(0.96); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 10px;
  background: var(--input-bg);
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
label { font-size: 13px; font-weight: 600; color: var(--link); display: block; margin-bottom: 5px; }
.muted { color: var(--muted); font-size: 12.5px; }
.fr { float: right; }

/* ===== Markdown Editor & Prose ===== */
.md-editor {
  border: 1px solid var(--input-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--input-bg);
  margin-bottom: 10px;
}
.md-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 10px;
  background: var(--panel-alt);
  border-bottom: 1px solid var(--line);
}
.md-tabs { display: flex; gap: 4px; }
.md-tab {
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.md-tab.cur { background: var(--panel); color: var(--accent); border-color: var(--btn-border); }
.md-tools { display: flex; gap: 3px; flex-wrap: wrap; }
.md-tool {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
  font-family: inherit;
}
.md-tool:hover { background: var(--hover); border-color: var(--btn-border); }
.md-editor textarea {
  border: none;
  border-radius: 0;
  margin-bottom: 0;
  box-shadow: none;
  min-height: 165px;
  padding: 12px;
}
.md-editor textarea:focus { box-shadow: none; }
.md-preview {
  min-height: 165px;
  padding: 12px 14px;
  background: var(--panel);
}

.md-prose { word-break: break-word; line-height: 1.7; font-size: 14.5px; }
.md-prose p { margin: 0 0 10px; }
.md-prose p:last-child { margin-bottom: 0; }
.md-prose h2 { font-family: var(--font-display); font-size: 18px; margin: 16px 0 8px; color: var(--ink-strong); }
.md-prose h3 { font-family: var(--font-display); font-size: 16px; margin: 14px 0 6px; color: var(--ink-strong); }
.md-prose h4 { font-family: var(--font-display); font-size: 14.5px; margin: 12px 0 4px; color: var(--ink-strong); }
.md-prose ul, .md-prose ol { margin: 6px 0 10px 20px; padding: 0; }
.md-prose li { margin: 3px 0; }
.md-prose blockquote {
  margin: 8px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--accent);
  background: var(--panel-alt);
  color: var(--muted);
  border-radius: 0 6px 6px 0;
}
.md-prose code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  padding: 1px 5px;
  border-radius: 4px;
}
.md-prose pre {
  background: #18181b;
  color: #f4f4f5;
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
}
.md-prose pre code { background: none; border: none; padding: 0; color: inherit; }
.md-prose a { color: var(--accent); font-weight: 500; }

/* ===== Quote Reply ===== */
.quote-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 12.5px;
}
.quote-banner b { color: var(--accent); }
.quote-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
}
.reply-quote {
  margin: 0 0 8px;
  padding: 7px 11px;
  border-left: 3px solid var(--btn-border);
  background: var(--panel-alt);
  border-radius: 0 6px 6px 0;
  font-size: 12.5px;
  color: var(--muted);
}
.reply-quote b { color: var(--ink); }

/* ===== Quick Reactions ===== */
.rx-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.rx-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--tag-ink);
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, border-color .12s;
}
.rx-btn:hover { background: var(--hover); border-color: var(--btn-border); }
.rx-btn.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); font-weight: 600; }
.rx-cnt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11.5px; }

/* ===== Avatars & User Menu ===== */
.avatar-btn { background: none; border: none; padding: 0; cursor: pointer; display: flex; border-radius: 6px; position: relative; }
.avatar-btn:hover { outline: 2px solid var(--accent-line); }
.nbadge {
  position: absolute; top: -5px; right: -5px; background: #dc2626; color: #fff;
  border-radius: 999px; font-size: 10px; line-height: 1; padding: 3px 5px; font-weight: 700;
}
a.mention { color: #3b82f6; font-weight: 600; text-decoration: none; }
a.mention:hover { text-decoration: underline; }
.notif-unread { background: var(--unread-bg); }

.avatar {
  width: 44px; height: 44px; border-radius: 8px; background: var(--tag-bg); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--tag-ink);
  font-size: 18px; overflow: hidden; position: relative;
}
.avatar.small { width: 26px; height: 26px; font-size: 12px; border-radius: 6px; }
.avatar.big { width: 76px; height: 76px; border-radius: 10px; }
.avatar.big.avt-wrap { width: 118px; height: 118px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 100%; height: 100%; display: block; }
.avt-wrap { background: #e9e2d4; }
.avt { position: absolute; display: block; aspect-ratio: 84 / 88; }
.avatar .avt { left: 50%; top: 3%; height: 94%; width: auto; transform: translateX(-50%); }
.avt-layer { position: absolute; max-width: none; pointer-events: none; image-rendering: pixelated; }
.avatar img.avt-model, .avt-stagebox .avt-model { width: 100%; height: 100%; object-fit: contain; display: block; }
.avatar img.avt-layer { width: auto; height: auto; object-fit: contain; }
.avt-layer-outfit { max-height: 45%; object-fit: contain; object-position: top center; }
.avt-layer-hand { max-width: 34%; object-fit: contain; object-position: top center; }
.avt-card { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; }
.avt-card .avt-frame { width: 100%; height: 100%; display: block; object-fit: fill; }
.avt-window { position: absolute; overflow: hidden; display: block; }
.avt-window .avt { left: -11%; top: -5%; width: 122%; height: auto; transform: none; aspect-ratio: 84 / 88; }
.avt-card-plain .avt-window .avt { left: 50%; top: 2%; height: 96%; width: auto; transform: translateX(-50%); }
.avt-card .avt-pet { position: absolute; width: 27%; height: auto; right: 2%; bottom: 1%; object-fit: contain; image-rendering: pixelated; }
.avt-card .avt-status { position: absolute; width: 16%; height: auto; left: 2.5%; top: 2.5%; object-fit: contain; image-rendering: pixelated; }

/* ===== Studio Rakit Avatar (2 Kolom) ===== */
.av-head-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.av-status-tag { font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 6px; padding: 3px 9px; }
.av-status-tag.dirty { color: var(--warn-ink); background: var(--warn-bg); border-color: var(--warn-border); }

.av-studio { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.av-studio-side { position: sticky; top: 68px; display: flex; flex-direction: column; gap: 10px; }
.av-studio-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }

.av-stage {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 12px; background: var(--panel-alt); border: 1px solid var(--line); border-radius: 10px;
}
.av-stage-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.av-stage-label { font-size: 11.5px; font-weight: 600; color: var(--link); }
.avt-stagebox { position: relative; display: block; width: 174px; height: 182px; margin: 0 auto; }
.avt-stagebox .avt { left: 0; top: 0; width: 100%; height: 100%; transform: none; }
.avt-cardbox { position: relative; display: block; width: 184px; height: 184px; margin: 0 auto; }
.av-classic-stage { width: 168px; height: 168px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.av-classic-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }

.av-sizes {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px;
}
.av-sizes-title { font-size: 11.5px; font-weight: 700; color: var(--link); margin-bottom: 8px; display: flex; justify-content: space-between; }
.av-sizes-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.av-size-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.av-size-item span { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

.av-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.av-actions .av-save-btn { grid-column: 1 / -1; }

.av-equipped {
  background: var(--panel-alt); border: 1px solid var(--line); border-radius: 8px; padding: 10px;
}
.av-equipped-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; font-size: 12px; font-weight: 700; color: var(--link); }
.av-eq-list { display: flex; flex-direction: column; gap: 4px; max-height: 230px; overflow-y: auto; }
.av-eq-row {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: 12px;
}
.av-eq-go {
  background: none; border: none; padding: 0; text-align: left; cursor: pointer; font-family: inherit;
  font-size: 12px; color: var(--ink); flex: 1; min-width: 0; display: flex; gap: 6px; align-items: center;
}
.av-eq-go:hover b { color: var(--accent); }
.av-eq-cat { color: var(--muted); font-size: 11px; min-width: 66px; flex-shrink: 0; }
.av-eq-val { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-eq-rm {
  background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); cursor: pointer;
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; flex-shrink: 0;
}
.av-eq-rm:hover { background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger-border); }

.av-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.av-tab {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--btn-bg); border: 1px solid var(--btn-border); border-radius: 6px; padding: 5px 10px;
  font-size: 12.5px; font-weight: 500; color: var(--ink); cursor: pointer; font-family: inherit;
}
.av-tab:hover { background: var(--hover); }
.av-tab.cur { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); font-weight: 600; }
.av-tab-cnt { font-family: var(--font-mono); font-size: 11px; opacity: 0.78; }

.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.av-opt {
  position: relative; background: var(--panel); border: 1px solid var(--btn-border); border-radius: 8px; padding: 7px 5px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; font-family: inherit;
  transition: border-color .12s, background .12s;
}
.av-opt:hover { border-color: var(--muted); background: var(--hover); }
.av-opt.sel { border-color: var(--accent); background: var(--accent-soft); outline: 2px solid var(--accent-line); }
.av-opt-name { font-size: 11.5px; color: var(--ink); text-align: center; line-height: 1.25; font-weight: 500; word-break: break-word; }
.av-price { font-size: 10px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 4px; padding: 1px 6px; font-weight: 700; }
.av-thumbwrap {
  width: 100%; height: 68px; display: flex; align-items: center; justify-content: center;
  background: var(--panel-alt); border-radius: 6px; padding: 5px; overflow: hidden;
}
.av-thumbwrap img { max-width: 100%; max-height: 58px; object-fit: contain; image-rendering: pixelated; }
.av-thumbwrap.classic img { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; image-rendering: auto; }
.av-none { font-size: 11.5px; color: var(--muted); line-height: 1.3; text-align: center; }

.usermenu {
  position: absolute; right: 0; top: calc(100% + 10px); background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow-pop); min-width: 210px; z-index: 60; padding: 6px 0; text-align: left;
}
.usermenu[hidden] { display: none; }
.um-head { display: flex; gap: 10px; align-items: center; padding: 8px 14px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.um-id { line-height: 1.35; font-size: 13px; }
.um-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px; color: var(--ink); font-size: 13.5px; white-space: nowrap;
}
.um-item:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.um-badge {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 11.5px; font-weight: 700; color: var(--accent);
}
.um-sep { height: 1px; background: var(--line); margin: 4px 0; }
.um-item-danger { color: var(--danger-ink); }
.um-item-danger:hover { background: var(--danger-bg); color: var(--danger-ink); }

/* ===== Paid Blocks, Stickers, Nodes, Media ===== */
.act-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.jual-lock {
  display: flex; align-items: center; gap: 10px; background: var(--warn-bg); border: 1px dashed var(--warn-border);
  border-radius: 8px; padding: 10px 12px; margin: 10px 0;
}
.jual-ic { color: var(--warn-ink); display: flex; }
.jual-ic svg { width: 22px; height: 22px; }
.jual-tx { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.jual-tx small { color: var(--warn-ink); }
.jual-open { display: block; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.jual-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.jual-head svg { width: 15px; height: 15px; }

.post-sticker { width: 112px; height: 112px; object-fit: contain; vertical-align: middle; }
.stik-panel { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-top: 8px; background: var(--panel-alt); max-width: 520px; }
.stik-pack { font-weight: 700; font-size: 12.5px; color: var(--tag-ink); margin: 4px 0 6px; }
.stik-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; }
.stik-item { background: none; border: 1px solid transparent; border-radius: 8px; padding: 4px; cursor: pointer; }
.stik-item:hover { border-color: var(--btn-border); background: var(--panel); }
.stik-item img { width: 100%; height: auto; display: block; }

.node-tile { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; color: #fff; font-weight: 800; font-size: 15px; flex-shrink: 0; letter-spacing: .5px; font-family: var(--font-display); }
.node-tile.big { width: 54px; height: 54px; font-size: 20px; border-radius: 10px; }
.node-tile.small { width: 26px; height: 26px; font-size: 11px; border-radius: 6px; }
.node-link { display: flex; gap: 9px; align-items: center; padding: 5px 0; color: var(--ink); font-weight: 500; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pos-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--panel); }
.color-sw { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--panel); outline: 1px solid var(--btn-border); cursor: pointer; padding: 0; }
.color-sw.sel { outline: 3px solid var(--ink-strong); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border: 1px solid var(--line); background: var(--panel); border-radius: 6px; color: var(--muted); cursor: pointer; padding: 0;
}
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--hover); color: var(--ink-strong); }
.icon-btn.danger { color: var(--danger-ink); }
.icon-btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.icon-btn.on svg { fill: currentColor; }

.role-badge { background: #1f2937; color: #fff; border-radius: 4px; padding: 2px 7px; font-size: 10.5px; font-weight: 700; vertical-align: 2px; }
.stat-row { display: flex; gap: 18px; margin-top: 10px; font-size: 13px; flex-wrap: wrap; align-items: center; }

/* ===== Profil Warga Gaya Twitter/X POSKO & Edit Profil ===== */
.tw-card { overflow: visible; }
.tw-topbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); background: var(--panel);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
.tw-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid transparent;
  background: transparent; color: var(--ink-strong); cursor: pointer; flex-shrink: 0;
  transition: background .15s;
}
.tw-back:hover { background: var(--hover); }
.tw-back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tw-topbar-meta { min-width: 0; }
.tw-topbar-name {
  font-family: var(--font-display); font-size: 16.5px; font-weight: 800; color: var(--ink-strong);
  display: flex; align-items: center; gap: 6px; line-height: 1.2;
}
.tw-topbar-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 1px; }

.tw-banner {
  position: relative; width: 100%; height: 186px; overflow: hidden;
  background: linear-gradient(135deg, #0b5a34 0%, #147a47 55%, #073d22 100%);
  border-bottom: 1px solid var(--line);
}
.tw-banner.tw-bg-emerald { background: linear-gradient(135deg, #073d22 0%, #0b5a34 52%, #198754 100%); }
.tw-banner.tw-bg-forest { background: linear-gradient(135deg, #132a1e 0%, #1f4d36 55%, #2f6f4e 100%); }
.tw-banner.tw-bg-mint { background: linear-gradient(135deg, #0b5a34 0%, #1d8a5b 50%, #7ad3a8 100%); }
.tw-banner.tw-bg-dusk { background: linear-gradient(135deg, #0b5a34 0%, #24476e 55%, #4e5d84 100%); }
.tw-banner.tw-bg-slate { background: linear-gradient(135deg, #1e293b 0%, #334155 58%, #475569 100%); }
.tw-banner.tw-bg-night { background: linear-gradient(135deg, #090d10 0%, #13261d 60%, #0b5a34 100%); }
.tw-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tw-head-body { padding: 0 18px 14px; }
.tw-avatar-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  min-height: 52px; margin-bottom: 10px;
}
.tw-avatar-slot {
  position: relative; margin-top: -48px; z-index: 2;
  display: inline-flex; padding: 4px; background: var(--panel); border-radius: 16px;
  border: 1px solid var(--line);
}
.tw-avatar-slot .avatar.big { width: 88px; height: 88px; border-radius: 12px; }
.tw-avatar-slot .avatar.big.avt-wrap { width: 96px; height: 100px; }
.tw-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; justify-content: flex-end;
  padding-top: 10px;
}
.tw-actions > .btn,
.tw-actions > .tw-follow-btn { white-space: nowrap; flex-shrink: 0; }
.tw-more-wrap { position: relative; flex-shrink: 0; }
.tw-more-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--btn-border); background: var(--panel); color: var(--ink-strong);
  cursor: pointer; padding: 0; transition: background .14s, border-color .14s, color .14s;
}
.tw-more-btn:hover,
.tw-more-btn[aria-expanded="true"] { background: var(--hover); border-color: var(--ink-strong); }
.tw-more-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tw-more-btn svg { width: 16px; height: 16px; fill: currentColor; }
.tw-more-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 45;
  min-width: 196px; padding: 6px 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow-pop); text-align: left;
}
.tw-more-menu[hidden] { display: none; }
.tw-more-item {
  display: flex; align-items: center; width: 100%;
  padding: 9px 14px; border: none; background: transparent;
  color: var(--ink); font-family: inherit; font-size: 13.5px; font-weight: 500;
  text-align: left; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, color .12s;
}
.tw-more-item:hover,
.tw-more-item:focus-visible {
  background: var(--accent-soft); color: var(--accent); text-decoration: none; outline: none;
}
.tw-more-item.danger { color: var(--danger-ink); }
.tw-more-item.danger:hover,
.tw-more-item.danger:focus-visible { background: var(--danger-bg); color: var(--danger-ink); }
.tw-more-sep { height: 1px; background: var(--line); margin: 4px 0; }
.tw-follow-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 104px;
  padding: 7px 16px; border-radius: 999px; font-family: inherit; font-size: 13.5px; font-weight: 700;
  cursor: pointer; border: 1px solid var(--btn); background: var(--btn); color: var(--btn-ink);
  transition: background .14s, color .14s, border-color .14s; white-space: nowrap;
}
.tw-follow-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.tw-follow-btn.following {
  background: var(--panel); color: var(--ink-strong); border-color: var(--btn-border);
}
.tw-follow-btn.following:hover {
  background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger-border);
}
.tw-follow-btn .lbl-unfollow { display: none; }
.tw-follow-btn.following:hover .lbl-following { display: none; }
.tw-follow-btn.following:hover .lbl-unfollow { display: inline; }

.tw-name-block { display: flex; flex-direction: column; gap: 2px; }
.tw-name-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tw-display-name { font-family: var(--font-display); font-size: 21px; font-weight: 800; color: var(--ink-strong); line-height: 1.25; }
.tw-verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff;
  flex-shrink: 0;
}
.tw-verified svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tw-handle-line {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--muted);
}
.tw-handle-mono { font-family: var(--font-mono); }
.tw-role-tag { font-size: 12px; font-weight: 600; color: var(--accent); }

.tw-headline { font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 8px; }
.tw-bio { margin-top: 6px; font-size: 14.5px; color: var(--ink-strong); line-height: 1.55; }
.tw-meta-grid {
  display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px;
  font-size: 13px; color: var(--muted); align-items: center;
}
.tw-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.tw-meta-item svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; flex-shrink: 0; }
.tw-meta-item a { color: var(--accent); font-weight: 500; }

.tw-follow-row {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  margin-top: 12px; font-size: 13.5px; color: var(--muted);
}
.tw-follow-stat {
  background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: baseline; gap: 4px;
}
.tw-follow-stat b { color: var(--ink-strong); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; }
.tw-follow-stat:hover b, .tw-follow-stat:hover span { text-decoration: underline; color: var(--accent); }
.tw-stat-static b { color: var(--ink-strong); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; }

.tw-tabs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.tw-tab {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 10px; font-family: var(--font-display); font-size: 13.5px; font-weight: 600;
  color: var(--muted); text-decoration: none; transition: background .12s, color .12s; white-space: nowrap;
}
.tw-tab:hover { background: var(--hover); color: var(--ink-strong); text-decoration: none; }
.tw-tab.cur { color: var(--ink-strong); font-weight: 800; }
.tw-tab.cur::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--accent);
}
.tw-tab-cnt { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.tw-pinned-wrap { background: var(--pin-bg); border-bottom: 1px solid var(--line); }
.tw-pin-label {
  display: flex; align-items: center; gap: 6px; padding: 9px 16px 0 58px;
  font-size: 12px; font-weight: 700; color: var(--accent);
}
.tw-pin-label svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.tw-pinned-wrap .cell { border-bottom: none; }

.tw-media-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px 16px;
}
.tw-media-card {
  position: relative; display: block; aspect-ratio: 1 / 1; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; background: var(--panel-alt); text-decoration: none;
}
.tw-media-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .18s ease; }
.tw-media-card.sticker img { object-fit: contain; padding: 12px; background: var(--panel-alt); }
.tw-media-card:hover img { transform: scale(1.03); }
.tw-media-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px;
  background: linear-gradient(to top, rgba(15, 20, 25, .78), transparent);
  color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tw-yt-badge {
  position: absolute; right: 8px; top: 8px; padding: 2px 7px; border-radius: 4px;
  background: rgba(15, 20, 25, .82); color: #fff; font-size: 10.5px; font-weight: 700;
}

.tw-follow-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.tw-follow-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink);
}
.tw-follow-item:hover { background: var(--accent-soft); border-color: var(--accent-line); text-decoration: none; }
.tw-follow-item-meta { min-width: 0; flex: 1; }
.tw-follow-item-name { font-weight: 700; font-size: 13.5px; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-follow-item-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-handle { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-weight: 500; }

.pf-skills { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.pf-skills b { color: var(--ink); font-weight: 600; }
.pf-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.pf-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border: 1px solid var(--btn-border); border-radius: 6px;
  background: var(--btn-bg); color: var(--ink); font-size: 12.5px; font-weight: 500;
  text-decoration: none; transition: background .12s, border-color .12s, color .12s;
}
.pf-link:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); text-decoration: none; }
.pf-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }

.pf-reply-topic { font-weight: 600; color: var(--ink-strong); font-size: 14px; display: inline-block; }
.pf-reply-snippet { margin-top: 4px; color: var(--link); font-size: 13.5px; line-height: 1.55; }

.pf-sec-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--ink-strong); margin: 0 0 10px; }
.pf-ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.pf-ach-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; background: var(--panel-alt);
  display: flex; flex-direction: column; gap: 3px;
}
.pf-ach-card.earned { background: var(--accent-soft); border-color: var(--accent-line); }
.pf-ach-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-strong); }
.pf-ach-state { font-size: 11px; font-weight: 600; color: var(--muted); }
.pf-ach-card.earned .pf-ach-state { color: var(--accent); }
.pf-ach-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }
.pf-ach-card.locked { opacity: 0.7; }

.pf-nodes-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-node-item {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font-size: 13px; font-weight: 600;
}
.pf-node-item:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); text-decoration: none; }

.pf-studio { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 18px; align-items: start; }
.pf-studio-form { min-width: 0; }
.pf-studio-preview { position: sticky; top: 68px; display: flex; flex-direction: column; gap: 10px; }
.pf-form-sec { padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.pf-form-sec:last-of-type { border-bottom: none; margin-bottom: 6px; }
.pf-sec-label { font-family: var(--font-display); font-size: 13.5px; font-weight: 700; color: var(--ink-strong); margin-bottom: 10px; }
.pf-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pf-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.pf-label-row label { margin-bottom: 0; }
.pf-char-cnt { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.pf-preview-card {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel);
}
.pf-preview-card .tw-banner { height: 92px; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.pf-preview-card .tw-head-body { padding: 0 12px 12px; }
.pf-preview-card .tw-avatar-row { min-height: 36px; margin-bottom: 6px; }
.pf-preview-card .tw-avatar-slot { margin-top: -32px; border-radius: 12px; padding: 3px; }
.pf-preview-card .tw-avatar-slot .avatar.big { width: 58px; height: 58px; border-radius: 9px; }
.pf-preview-card .tw-avatar-slot .avatar.big.avt-wrap { width: 64px; height: 67px; }
.pf-preview-card .tw-display-name { font-size: 16.5px; }

.tw-banner-swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.tw-swatch {
  height: 36px; border-radius: 8px; border: 2px solid var(--panel); outline: 1px solid var(--btn-border);
  cursor: pointer; padding: 0; transition: transform .12s, outline-color .12s;
}
.tw-swatch.sel { outline: 2.5px solid var(--accent); transform: translateY(-1px); }
.tw-swatch.tw-bg-emerald { background: linear-gradient(135deg, #073d22 0%, #0b5a34 52%, #198754 100%); }
.tw-swatch.tw-bg-forest { background: linear-gradient(135deg, #132a1e 0%, #1f4d36 55%, #2f6f4e 100%); }
.tw-swatch.tw-bg-mint { background: linear-gradient(135deg, #0b5a34 0%, #1d8a5b 50%, #7ad3a8 100%); }
.tw-swatch.tw-bg-dusk { background: linear-gradient(135deg, #0b5a34 0%, #24476e 55%, #4e5d84 100%); }
.tw-swatch.tw-bg-slate { background: linear-gradient(135deg, #1e293b 0%, #334155 58%, #475569 100%); }
.tw-swatch.tw-bg-night { background: linear-gradient(135deg, #090d10 0%, #13261d 60%, #0b5a34 100%); }

/* ===== Pengaturan Gaya Bluesky / X (2 Kolom) ===== */
.set-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 440px;
}
.set-nav {
  border-right: 1px solid var(--line);
  background: var(--panel-alt);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.set-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: background .12s, color .12s;
}
.set-nav-item svg {
  width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.set-nav-item:hover { background: var(--hover); color: var(--ink-strong); text-decoration: none; }
.set-nav-item.cur { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.set-panel { min-width: 0; padding: 16px 18px 20px; }
.set-sec-title {
  font-family: var(--font-display); font-size: 16.5px; font-weight: 800;
  color: var(--ink-strong); margin: 0 0 3px;
}
.set-sec-sub { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.set-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--panel);
}
.set-group-title {
  padding: 9px 14px;
  background: var(--panel-alt);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
.set-row:last-child { border-bottom: none; }
.set-row-info { min-width: 0; flex: 1; }
.set-row-title { font-size: 14px; font-weight: 600; color: var(--ink-strong); line-height: 1.35; }
.set-row-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.set-row-val { font-family: var(--font-mono); font-size: 13px; color: var(--ink); font-weight: 500; }
.set-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.set-seg {
  display: inline-flex;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}
.set-seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.set-seg-btn:hover { color: var(--ink-strong); }
.set-seg-btn.cur { background: var(--btn); color: var(--btn-ink); }
.set-seg-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.set-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  margin-bottom: 0;
}
.set-switch input {
  opacity: 0; width: 0; height: 0; position: absolute; margin: 0;
}
.set-switch-track {
  position: relative;
  width: 44px; height: 24px;
  background: var(--btn-border);
  border-radius: 999px;
  transition: background .16s ease;
}
.set-switch-track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .16s ease;
}
.set-switch input:checked + .set-switch-track { background: var(--btn); }
.set-switch input:checked + .set-switch-track::after { transform: translateX(20px); }
.set-switch input:focus-visible + .set-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.set-switch input:disabled + .set-switch-track { opacity: 0.55; cursor: not-allowed; }

.set-link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: background .12s;
}
.set-link-row:last-child { border-bottom: none; }
.set-link-row:hover { background: var(--hover); text-decoration: none; color: var(--accent); }
.set-link-row svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; color: var(--muted); flex-shrink: 0; }

.coin-chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--accent); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.coin-badge {
  width: 18px; height: 18px; border-radius: 50%; background: var(--btn); color: #fde68a; border: 1.5px solid #fde68a;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; line-height: 1; flex-shrink: 0;
}
.coin-big { font-size: 26px; font-weight: 800; color: var(--accent); }
.tx-pos { color: #15803d; font-weight: 700; }
.tx-neg { color: var(--danger-ink); font-weight: 700; }
html.theme-dark .tx-pos { color: #4ade80; }

.pg-wrap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); }
.pg-btn { display: inline-block; min-width: 32px; text-align: center; padding: 5px 10px; font-size: 13px; background: var(--btn-bg); border: 1px solid var(--btn-border); color: var(--ink); border-radius: 6px; font-family: var(--font-mono); }
.pg-btn:hover { background: var(--hover); text-decoration: none; }
.pg-btn.cur { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); font-weight: 700; }
.pg-btn.dis { background: var(--panel-alt); color: var(--muted); cursor: default; opacity: 0.7; }
.pg-gap { color: var(--muted); padding: 0 2px; }
.pg-info { margin-left: auto; color: var(--muted); font-size: 12px; }

.reply { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.reply:last-child { border-bottom: none; }
.reply .rhead { display: flex; gap: 10px; align-items: flex-start; }
.reply .rbody { margin-left: 36px; margin-top: 6px; word-break: break-word; }
.redit-form { margin: 10px 0 0 36px; }
.content { word-break: break-word; padding: 2px 0; }

.post-img { display: block; max-width: 100%; max-height: 520px; border-radius: 8px; margin: 8px 0; }
.yt-lite { position: relative; display: block; max-width: 560px; aspect-ratio: 16/9; background: #111; border-radius: 8px; overflow: hidden; margin: 8px 0; cursor: pointer; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-lite::before { content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 45px; transform: translate(-50%, -50%); background: rgba(230, 33, 23, .93); border-radius: 10px; z-index: 1; }
.yt-lite::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-42%, -50%); border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; z-index: 2; }
.yt-wrap { position: relative; display: block; max-width: 560px; aspect-ratio: 16/9; margin: 8px 0; }
.yt-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }

.uprow { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.uprow label.btn { cursor: pointer; margin: 0; }
.side-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--ink-strong); }
.node-list a:not(.node-link) { display: block; padding: 4px 0; font-weight: 500; }

.flash { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-ink); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; }
.error { background: var(--danger-bg); border: 1px solid var(--danger-border); color: var(--danger-ink); }

.doc-body { display: block; padding: 14px 16px; }
.doc-body h3 { font-family: var(--font-display); margin: 18px 0 6px; font-size: 15.5px; color: var(--ink-strong); }
.doc-body h3:first-child { margin-top: 2px; }
.doc-body p { margin: 6px 0; }
.doc-body ul { margin: 6px 0 8px 20px; padding: 0; }
.doc-body li { margin: 4px 0; }
.doc-body code { background: var(--code-bg); border: 1px solid var(--code-border); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; font-family: var(--font-mono); }
.doc-pre { background: #18181b; color: #f4f4f5; border-radius: 8px; padding: 12px 14px; font-size: 12.5px; line-height: 1.55; overflow-x: auto; white-space: pre-wrap; margin: 8px 0; font-family: var(--font-mono); }

.search-filters { display: grid; grid-template-columns: 1fr 160px 160px auto; gap: 8px; align-items: end; margin-bottom: 12px; }
.search-filters input, .search-filters select { margin-bottom: 0; }

/* ===== Accessible Inline Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .56); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-pop); overflow: hidden;
}
.modal-head { padding: 14px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: 15.5px; color: var(--ink-strong); }
.modal-body { padding: 14px 16px; font-size: 14px; }
.modal-foot { padding: 10px 16px; background: var(--panel-alt); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

.google-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--panel); color: var(--ink-strong); border: 1px solid var(--btn-border); border-radius: 8px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background .15s, box-shadow .15s;
}
.google-btn:hover { background: var(--hover); box-shadow: 0 2px 6px rgba(0, 0, 0, .07); }

footer { background: var(--panel); border-top: 1px solid var(--line); margin-top: 28px; color: var(--muted); font-size: 12.5px; }
footer .foot-in {
  max-width: 1020px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap;
}
.foot-base { display: flex; align-items: center; gap: 8px; line-height: 1.4; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.foot-links a { color: var(--muted); font-weight: 500; white-space: nowrap; transition: color .12s; }
.foot-links a:hover { color: var(--accent); text-decoration: none; }
.side-head-flex { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-coin-link { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.side-coin-link:hover { text-decoration: underline; }

/* ===== Interactive Modal Sizing ===== */
.modal-card.wide { max-width: 620px; }
.modal-body.scroll { max-height: 68vh; overflow-y: auto; }

/* ===== Topic Cues & Revisions ===== */
.topic-cues { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; vertical-align: middle; }
.cue-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; line-height: 1.2; padding: 1px 6px;
  border-radius: 4px; border: 1px solid var(--line); color: var(--muted); background: var(--panel-alt);
}
.cue-tag.qa { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.cue-tag.solved { color: #ffffff; background: var(--btn); border-color: var(--btn); }
.cue-tag.poll { color: var(--ink); border-color: var(--btn-border); }
.cue-tag.hidden-post { color: var(--danger-ink); border-color: var(--danger-border); background: var(--danger-bg); }

.rev-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: var(--panel-alt); }
.rev-item:last-child { margin-bottom: 0; }
.rev-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.rev-title { font-weight: 700; color: var(--ink-strong); font-size: 14px; margin-bottom: 4px; }
.rev-body { font-size: 13px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }

/* ===== Compact 2-Row Check-in & Top-3 Widget ===== */
.compact-hub { overflow: hidden; }
.compact-row1 {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; font-size: 13px;
}
.compact-meta { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); white-space: nowrap; }
.compact-coin {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-weight: 700; color: var(--accent); text-decoration: none;
}
.compact-coin:hover { text-decoration: underline; }
.compact-claim-btn { padding: 4px 10px; font-size: 12px; min-height: 28px; white-space: nowrap; flex-shrink: 0; }
.compact-claimed {
  font-size: 12px; font-weight: 600; color: var(--accent);
  white-space: nowrap; flex-shrink: 0;
}
.compact-row2 {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 14px; border-top: 1px solid var(--line); background: var(--panel-alt);
  font-size: 12.5px;
}
.compact-top-list {
  display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1;
  overflow: hidden; white-space: nowrap;
}
.compact-top-lbl { color: var(--muted); font-weight: 600; flex-shrink: 0; }
.compact-top-item {
  display: inline-flex; align-items: center; gap: 2px; min-width: 0;
  color: var(--ink-strong); font-weight: 600; white-space: nowrap;
}
.compact-top-item:hover { color: var(--accent); text-decoration: none; }
.compact-top-item .rk { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-weight: 700; }
.compact-top-item .nm { overflow: hidden; text-overflow: ellipsis; max-width: 74px; }
.compact-all { font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; flex-shrink: 0; }
.compact-all:hover { text-decoration: underline; }

/* ===== Draft Banner & Poll Composer ===== */
.draft-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; margin-bottom: 12px; border-radius: 8px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 13px; color: var(--ink);
}
.draft-status { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.check-row {
  display: flex; align-items: center; gap: 8px; margin: 10px 0; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--ink);
}
.check-row input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.poll-builder {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 10px 0 12px;
  background: var(--panel-alt);
}
.poll-opt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.poll-opt-row input { margin-bottom: 0; flex: 1; }

/* ===== Topic Poll Card ===== */
.poll-box {
  margin-top: 14px; border: 1px solid var(--line); border-radius: 8px;
  padding: 13px 14px; background: var(--panel-alt);
}
.poll-q { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; color: var(--ink-strong); margin-bottom: 10px; }
.poll-opts { display: flex; flex-direction: column; gap: 7px; }
.poll-opt-label {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; margin-bottom: 0;
  border: 1px solid var(--btn-border); border-radius: 7px; background: var(--panel);
  cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--ink-strong);
  transition: border-color .12s, background .12s;
}
.poll-opt-label:hover { border-color: var(--accent); background: var(--accent-soft); }
.poll-opt-label input { width: auto; margin: 0; accent-color: var(--accent); }
.poll-bar-item {
  border: 1px solid var(--line); border-radius: 7px; padding: 8px 11px; background: var(--panel);
}
.poll-bar-item.mine { border-color: var(--accent-line); background: var(--accent-soft); }
.poll-bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; margin-bottom: 5px; }
.poll-bar-text { font-weight: 600; color: var(--ink-strong); }
.poll-pct { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.poll-bar-track { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.poll-bar-fill { height: 100%; background: var(--muted); border-radius: 999px; transition: width .25s ease; }
.poll-bar-item.mine .poll-bar-fill { background: var(--accent); }
.poll-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; font-size: 12px; color: var(--muted); font-family: var(--font-mono);
}

/* ===== Q&A Best Answer & Nested Replies ===== */
.qa-solution-box {
  margin-top: 12px; border: 1px solid var(--accent-line); border-radius: 8px;
  overflow: hidden; background: var(--panel);
}
.qa-solution-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 13px; background: var(--accent-soft); border-bottom: 1px solid var(--accent-line);
  font-size: 12.5px; font-weight: 700; color: var(--accent);
}
.qa-solution-body { padding: 11px 13px; font-size: 13.5px; }
.reply.is-solution { background: var(--pin-bg); }
.reply-sol-label {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px;
  font-size: 11.5px; font-weight: 700; color: var(--accent);
}
.reply-children {
  margin-left: 20px; padding-left: 14px; border-left: 1px solid var(--line);
}
.reply-children.depth-cap { margin-left: 8px; padding-left: 10px; }
.reply-node { border-bottom: 1px solid var(--line); }
.reply-node:last-child { border-bottom: none; }
.reply-node .reply { border-bottom: none; }
.reply-collapse-btn {
  background: none; border: 1px solid var(--line); border-radius: 4px;
  padding: 0 5px; margin-left: 6px; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); line-height: 1.5;
}
.reply-collapse-btn:hover { color: var(--ink-strong); border-color: var(--btn-border); }
.reply-hidden-msg {
  padding: 6px 10px; border-radius: 6px; background: var(--panel-alt); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); font-style: italic;
}

/* ===== Direct Messages (#/messages) ===== */
.dm-shell {
  display: grid; grid-template-columns: 276px minmax(0, 1fr);
  min-height: 520px; height: calc(100vh - 220px); max-height: 660px;
}
.dm-sidebar {
  border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--panel-alt);
}
.dm-side-head {
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.dm-thread-list { flex: 1; overflow-y: auto; }
.dm-thread-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; width: 100%;
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  text-align: left; cursor: pointer; font-family: inherit; color: var(--ink);
  transition: background .12s;
}
.dm-thread-item:hover { background: var(--hover); }
.dm-thread-item.cur { background: var(--accent-soft); }
.dm-thread-meta { flex: 1; min-width: 0; }
.dm-thread-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dm-thread-name { font-weight: 700; font-size: 13.5px; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-thread-time { font-family: var(--font-mono); font-size: 11px; color: var(--muted); flex-shrink: 0; }
.dm-thread-last { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dm-unread-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dm-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel); }
.dm-pane-head {
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.dm-back-btn { display: none; }
.dm-messages {
  flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px;
}
.dm-msg-row { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.dm-msg-row.mine { align-self: flex-end; align-items: flex-end; }
.dm-bubble {
  padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; word-break: break-word; white-space: pre-wrap;
  background: var(--panel-alt); border: 1px solid var(--line); color: var(--ink-strong);
}
.dm-msg-row.mine .dm-bubble {
  background: var(--btn); border-color: var(--btn); color: var(--btn-ink);
}
.dm-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.dm-composer {
  padding: 10px 12px; border-top: 1px solid var(--line); background: var(--panel-alt);
  display: flex; gap: 8px; align-items: center;
}
.dm-composer input { margin-bottom: 0; flex: 1; }
.dm-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px; text-align: center; color: var(--muted); gap: 8px;
}

/* ===== Leaderboard & Community Stats (#/leaderboard) ===== */
.stat-grid-4 {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.stat-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; background: var(--panel-alt);
}
.stat-card-val {
  font-family: var(--font-mono); font-size: 20px; font-weight: 800; color: var(--ink-strong);
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.stat-card-lbl { font-size: 12px; color: var(--muted); margin-top: 3px; }
.lb-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}
.lb-row:last-child { border-bottom: none; }
.lb-rank {
  width: 28px; height: 28px; border-radius: 7px; background: var(--panel-alt); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 800; font-size: 13px; color: var(--muted); flex-shrink: 0;
}
.lb-rank.top1 { background: #fef3c7; border-color: #f59e0b; color: #b45309; }
.lb-rank.top2 { background: #f1f5f9; border-color: #94a3b8; color: #334155; }
.lb-rank.top3 { background: #ffedd5; border-color: #fb923c; color: #c2410c; }
html.theme-dark .lb-rank.top1 { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
html.theme-dark .lb-rank.top2 { background: rgba(148, 163, 184, 0.2); color: #e2e8f0; }
html.theme-dark .lb-rank.top3 { background: rgba(251, 146, 60, 0.2); color: #fdba74; }
.lb-user { flex: 1; min-width: 0; }
.lb-name { font-weight: 700; font-size: 14px; color: var(--ink-strong); }
.lb-sub { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.lb-metric { font-family: var(--font-mono); font-size: 14px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ===== Moderation Queue & User Blocks ===== */
.mod-card { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.mod-card:last-child { border-bottom: none; }
.mod-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mod-status {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--panel-alt); color: var(--muted); text-transform: uppercase;
}
.mod-status.open { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-ink); }
.mod-status.resolved { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.mod-snippet {
  margin: 8px 0; padding: 8px 11px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--panel-alt); font-size: 13px; color: var(--ink);
}
.blk-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.blk-row:last-child { border-bottom: none; }

/* ===== Mobile Bottom Nav (compact <= 56px, visible <= 760px) ===== */
#mobile-nav { display: none; }

@media (max-width: 760px) {
  body { padding-bottom: 62px; }
  #wrap { flex-direction: column; align-items: stretch; margin: 12px auto; gap: 14px; padding: 0 12px; }
  #main, #side { width: 100%; }
  #topbar .inner { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .top-nav { display: none; }
  #topbar .spacer { display: none; }
  #search-toggle { display: inline-flex; margin-left: auto; }
  .searchbox { display: none; }
  .searchbox.open { display: flex; order: 3; flex: 1 1 100%; }
  .searchbox input { flex: 1; width: auto; min-width: 0; }
  .navuser { gap: 8px; }
  .search-filters { grid-template-columns: 1fr; }
  .reply .rbody, .redit-form { margin-left: 0; }
  .reply-children { margin-left: 12px; padding-left: 10px; }
  .icon-btn { min-width: 38px; min-height: 38px; }
  .btn, .sort-tab, .av-tab { min-height: 38px; }
  .sort-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .sort-tab { flex-shrink: 0; }
  .stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-shell { grid-template-columns: 1fr; height: 72vh; min-height: 440px; }
  .dm-shell.has-active .dm-sidebar { display: none; }
  .dm-shell:not(.has-active) .dm-pane { display: none; }
  .dm-back-btn { display: inline-flex; }
  .av-studio { grid-template-columns: 1fr; gap: 12px; }
  .av-studio-side { position: static; }
  .av-sizes-row { justify-content: space-around; }
  .av-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .av-tab { flex-shrink: 0; }
  .av-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tw-banner { height: 128px; }
  .tw-head-body { padding: 0 14px 12px; }
  .tw-avatar-slot { margin-top: -38px; }
  .tw-avatar-slot .avatar.big { width: 72px; height: 72px; }
  .tw-avatar-slot .avatar.big.avt-wrap { width: 78px; height: 81px; }
  .tw-actions { gap: 6px; }
  .tw-follow-btn { min-width: 88px; padding: 7px 13px; min-height: 38px; }
  .tw-more-btn { width: 38px; height: 38px; }
  .tw-tab { font-size: 12.5px; padding: 11px 6px; }
  .tw-pin-label { padding-left: 16px; }
  .tw-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
  .tw-banner-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-studio { grid-template-columns: 1fr; }
  .pf-studio-preview { position: static; order: -1; }
  .pf-field-row { grid-template-columns: 1fr; }
  .set-shell { grid-template-columns: 1fr; min-height: 0; }
  .set-nav {
    flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line);
    padding: 8px 10px; gap: 6px; -webkit-overflow-scrolling: touch;
  }
  .set-nav-item { flex-shrink: 0; padding: 7px 11px; white-space: nowrap; }
  .set-panel { padding: 14px; }
  .set-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .set-row-actions, .set-seg { align-self: flex-start; }
  .set-switch { align-self: flex-start; }
  #mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 54px;
    background: var(--panel);
    border-top: 1px solid var(--line);
    z-index: 80;
  }
  #mobile-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none;
  }
  #mobile-nav a.cur { color: var(--accent); }
  #mobile-nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
  footer .foot-in { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
}

/* ===== Google Drive Attachments & File Manager ===== */
.drv-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-alt);
}
.drv-ext {
  min-width: 42px;
  height: 36px;
  padding: 0 7px;
  border-radius: 7px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.drv-info { flex: 1; min-width: 0; }
.drv-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drv-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.drv-vis {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid var(--line);
}
.drv-vis.pub {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}
.drv-vis.priv {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-ink);
}
.drv-acts, .drv-file-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.drv-conn-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-alt);
  margin-bottom: 12px;
  font-size: 12.5px;
}
.drv-conn-ok {
  color: #15803d;
  font-weight: 600;
  font-size: 12.5px;
}
html.theme-dark .drv-conn-ok { color: #4ade80; }
.drv-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.drv-tab {
  border: 1px solid var(--line);
  background: var(--panel-alt);
  color: var(--muted);
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.drv-tab.cur {
  background: var(--btn);
  border-color: var(--btn);
  color: var(--btn-ink);
}
.drv-drop {
  border: 1.5px dashed var(--line-strong, var(--btn-border));
  border-radius: 9px;
  padding: 18px 14px;
  text-align: center;
  background: var(--panel-alt);
}
.drv-drop-title { font-weight: 700; font-size: 13.5px; color: var(--ink-strong); }
.drv-drop-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.drv-vis-box { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.drv-vis-title { font-size: 12.5px; font-weight: 700; color: var(--ink-strong); }
.drv-vis-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  margin-bottom: 0;
}
.drv-vis-opt input { width: auto; margin: 3px 0 0; flex-shrink: 0; }
.drv-vis-opt b { display: block; font-size: 13px; color: var(--ink-strong); }
.drv-vis-opt small { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.drv-pick-list { display: flex; flex-direction: column; gap: 8px; max-height: 290px; overflow-y: auto; }
.drv-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}
.drv-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.drv-file-row:last-child { border-bottom: none; }

@media (max-width: 760px) {
  .drv-card, .drv-file-row { flex-direction: column; align-items: stretch; gap: 9px; }
  .drv-acts, .drv-file-acts { justify-content: flex-start; }
}
