:root {
  --bg: #f6f9fc;
  --bg-elevated: #ffffff;
  --bg-subtle: #eef3f9;
  --bg-hover: #e4edf7;
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #7b8ba1;
  --border: #e3eaf3;
  --border-strong: #cdd8e6;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --badge-thought-bg: #eff6ff;
  --badge-thought-fg: #1d4ed8;
  --badge-article-bg: #ecfdf5;
  --badge-article-fg: #047857;
  --badge-note-bg: #fffbeb;
  --badge-note-fg: #b45309;
  --badge-game-bg: #f3e8ff;
  --badge-game-fg: #7e22ce;
  --hm-0: #e9eff7;
  --hm-1: #bfdbfe;
  --hm-2: #60a5fa;
  --hm-3: #2563eb;
  --code-bg: #f1f5f9;
  --shadow-sm: 0 2px 8px rgba(30, 41, 59, 0.04);
  --shadow-md: 0 10px 30px rgba(30, 41, 59, 0.09);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-sans: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-display: "STKaiti", "KaiTi", "STZhongsong", "FangSong", "Songti SC", "Georgia", serif;
  --font-brand: "STXingkai", "FZShuTi", "STKaiti", "KaiTi", "Georgia", cursive, serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
  --title-gradient: linear-gradient(120deg, #1d4ed8 0%, #2563eb 52%, #0284c7 100%);
}

[data-font="calligraphy"] {
  --font-display: "STXingkai", "STKaiti", "KaiTi", "FZShuTi", "Georgia", serif;
  --font-brand: "STXingkai", "LiSu", "STKaiti", "KaiTi", cursive, serif;
}

[data-font="modern"] {
  --font-display: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
  --font-brand: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
}

/* 明丽蓝调深色模式 */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f2547;
  --bg-elevated: #17345e;
  --bg-subtle: #1f4375;
  --bg-hover: #28538f;
  --text: #f2f8ff;
  --text-secondary: #c8e0fc;
  --text-muted: #8eb5e8;
  --border: #2c548a;
  --border-strong: #3d6eb0;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-soft: rgba(56, 189, 248, 0.2);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.16);
  --badge-thought-bg: rgba(56, 189, 248, 0.22);
  --badge-thought-fg: #bae6fd;
  --badge-article-bg: rgba(52, 211, 153, 0.2);
  --badge-article-fg: #6ee7b7;
  --badge-note-bg: rgba(251, 191, 36, 0.2);
  --badge-note-fg: #fde68a;
  --badge-game-bg: rgba(192, 132, 252, 0.24);
  --badge-game-fg: #e9d5ff;
  --hm-0: #1e3f6e;
  --hm-1: #1d6fb8;
  --hm-2: #38bdf8;
  --hm-3: #bae6fd;
  --code-bg: #122b4f;
  --shadow-sm: 0 4px 14px rgba(6, 18, 38, 0.24);
  --shadow-md: 0 14px 36px rgba(6, 18, 38, 0.42);
  --title-gradient: linear-gradient(120deg, #bae6fd 0%, #7dd3fc 52%, #38bdf8 100%);
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 18% 0%, rgba(56, 189, 248, 0.2), transparent 46%),
    radial-gradient(circle at 86% 14%, rgba(96, 165, 250, 0.16), transparent 42%),
    var(--bg);
  background-attachment: fixed;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--bg-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
}

.btn-danger-ghost:hover {
  background: var(--danger-soft);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 13px;
}

.btn-xs {
  padding: 4px 9px;
  font-size: 12px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.text-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.text-btn:hover {
  text-decoration: underline;
}

.form-input,
.form-select {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--accent);
}

/* 整体布局 */
.app-shell {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  min-height: 100vh;
}

/* 左侧边栏 */
/* 全局细巧主题滚动条（避免深色模式下出现刺眼白色滚动条） */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* 左侧边栏（完全隐藏滚动条，仍可滚轮滚动） */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 16px 14px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 20;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand);
  font-size: 23px;
  font-weight: 700;
  font-style: italic;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.site-title {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  background: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 14px;
}

.nav-group {
  display: flex;
  flex-direction: column;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-row .nav-item {
  flex: 1;
  min-width: 0;
}

.nav-add-sub {
  width: 24px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.14s, background 0.14s, color 0.14s;
}

.nav-row:hover .nav-add-sub,
.nav-row:focus-within .nav-add-sub,
.nav-group.has-active .nav-add-sub {
  opacity: 1;
}

.nav-add-sub:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.subnav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 4px 16px;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}

.subnav-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.subnav-item {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  text-align: left;
}

.subnav-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subnav-item:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.subnav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.subnav-count {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.subnav-item.active .subnav-count {
  color: var(--accent);
}

.subnav-actions {
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.12s;
}

.subnav-row:hover .subnav-actions,
.subnav-row:focus-within .subnav-actions {
  opacity: 1;
}

.subnav-act-btn {
  width: 20px;
  height: 22px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.subnav-act-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.subnav-act-btn.danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-trash {
  margin-top: 4px;
  border-top: 1px dashed var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding-top: 10px;
}

.nav-count {
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.nav-item.active .nav-count {
  background: var(--accent);
  color: #fff;
}

.sidebar-section {
  margin-top: 18px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

/* 写作热力图与归档 */
.heatmap-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 10px 9px;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 3px;
}

.hm-cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  border: none;
  padding: 0;
  outline: none;
  cursor: pointer;
  transition: filter 0.12s, box-shadow 0.12s;
}

.hm-cell:hover:not(:disabled) {
  filter: brightness(1.16);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.hm-cell:focus {
  outline: none;
}

.hm-cell:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.hm-cell.selected {
  box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 3px var(--bg-elevated);
}

[data-theme="dark"] .hm-cell.selected {
  box-shadow: inset 0 0 0 2px #ffffff, inset 0 0 0 3px #0f2547;
}

.hm-lv-0 { background: var(--hm-0); }
.hm-lv-1 { background: var(--hm-1); }
.hm-lv-2 { background: var(--hm-2); }
.hm-lv-3 { background: var(--hm-3); }

.heatmap-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 11px;
  color: var(--text-muted);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 3px;
}

.heatmap-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.archive-select {
  width: 100%;
  margin-top: 8px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  font-size: 12.5px;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
}

.archive-select:focus {
  border-color: var(--accent);
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.tag-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.muted-text {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* 侧边栏底部 & 迷你音乐播放器 */
.sidebar-bottom {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.music-widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 11px;
  margin-bottom: 12px;
}

.music-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.music-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.music-disc {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.music-disc.playing {
  background: var(--accent);
  color: #fff;
  animation: pulseGlow 1.8s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.09); }
}

.music-track-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-progress-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

.music-time {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
}

.music-range,
.music-vol-range {
  accent-color: var(--accent);
  cursor: pointer;
  height: 4px;
}

.music-range {
  flex: 1;
  min-width: 0;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.music-ctrl-btn {
  border: none;
  background: transparent;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.music-ctrl-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.music-play-btn {
  border: none;
  background: var(--accent);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.music-play-btn:hover {
  background: var(--accent-hover);
}

.music-volume-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

.music-vol-icon {
  font-size: 12px;
}

.music-vol-range {
  width: 54px;
}

.stats-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.sidebar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  display: inline-block;
}

/* 主内容区 */
.main-area {
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 28px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.view-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.active-filter-chip {
  font-size: 12.5px;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
  min-width: 240px;
}

.search-box {
  flex: 1;
  max-width: 320px;
}

.search-box input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  outline: none;
  font-size: 13.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.sort-select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  font-size: 13px;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
}

/* 提示横幅 */
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: 13.5px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.banner-warn {
  background: var(--badge-note-bg);
  border-color: #f59e0b;
}

.banner-actions {
  display: flex;
  gap: 6px;
}

/* 快速记录想法框 */
.quick-thought {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px 12px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}

.quick-thought:focus-within {
  border-color: var(--accent);
}

.quick-thought textarea {
  width: 100%;
  border: none;
  background: transparent;
  resize: vertical;
  min-height: 54px;
  outline: none;
  font-size: 14.5px;
  line-height: 1.6;
}

.quick-thought-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  gap: 10px;
}

.quick-tip {
  font-size: 12px;
  color: var(--text-muted);
}

.quick-tip code {
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* 内容卡片列表 */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.post-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.06);
}

.post-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.post-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.badge-thought {
  background: var(--badge-thought-bg);
  color: var(--badge-thought-fg);
}

.badge-article {
  background: var(--badge-article-bg);
  color: var(--badge-article-fg);
}

.badge-note {
  background: var(--badge-note-bg);
  color: var(--badge-note-fg);
}

.badge-game {
  background: var(--badge-game-bg);
  color: var(--badge-game-fg);
}

.subcat-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.subcat-badge.clickable {
  cursor: pointer;
}

.subcat-badge.clickable:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 主区小分类筛选栏 */
.subcategory-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.subcategory-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.subcat-pill {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.14s;
}

.subcat-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.subcat-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

[data-theme="dark"] .subcat-pill.active {
  color: #08203e;
  font-weight: 600;
}

.pin-badge {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

.post-date {
  font-size: 12.5px;
  color: var(--text-muted);
}

.post-card-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--text);
}

/* 游戏分享专题顶部筛选栏与游戏卡片 */
.game-topic-bar {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.game-topic-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
  flex-wrap: wrap;
}

.game-topic-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-topic-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--badge-game-bg);
  color: var(--badge-game-fg);
}

.game-topic-stats {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.game-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.game-filter-pill {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s;
}

.game-filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.game-filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

[data-theme="dark"] .game-filter-pill.active {
  color: #0b1c36;
  font-weight: 600;
}

.post-card-game-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.game-cover-thumb {
  width: 126px;
  height: 82px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.game-card-content {
  min-width: 0;
  flex: 1;
}

.game-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.game-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 500;
}

.game-pill-rating {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
}

[data-theme="dark"] .game-pill-rating {
  background: rgba(251, 191, 36, 0.22);
  color: #fde68a;
}

.game-pill-status {
  background: var(--accent-soft);
  color: var(--accent);
}

/* 阅读器游戏专题信息卡 */
.reader-game-card {
  display: flex;
  gap: 18px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 22px;
}

.reader-game-cover {
  width: 170px;
  height: 108px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.reader-game-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13.5px;
}

.reader-game-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reader-game-stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.reader-game-stat-val {
  font-weight: 700;
  color: var(--text);
}

/* 编辑器游戏专属字段 */
.editor-game-fields {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr 0.8fr auto;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.editor-game-cover-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.post-card-excerpt {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-thought-body {
  margin: 2px 0 0;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.7;
}

.post-card-thought-body p:first-child { margin-top: 0; }
.post-card-thought-body p:last-child { margin-bottom: 0; }

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-tag {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 99px;
}

.post-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.card-action-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 12.5px;
}

.card-action-btn:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.card-action-btn.restore {
  color: var(--accent);
  font-weight: 500;
}

.card-action-btn.danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.empty-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.empty-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* 弹窗通用 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-height: 90vh;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}

.modal-reader {
  max-width: 980px;
  height: 88vh;
  transition: max-width 0.2s, height 0.2s, border-radius 0.2s;
}

.modal-reader.focus-mode {
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  border: none;
}

.modal-editor {
  max-width: 1120px;
  height: 88vh;
}

.modal-sm {
  max-width: 540px;
}

.modal-xs {
  max-width: 400px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

/* 阅读器 + 目录 TOC + 双向链接 */
.reader-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reader-dates {
  font-size: 12.5px;
  color: var(--text-muted);
}

.reader-scroll-area {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding: 28px 36px 48px;
  max-width: 960px;
  margin: 0 auto;
}

.reader-layout.has-toc {
  grid-template-columns: minmax(0, 1fr) 210px;
}

.modal-reader.focus-mode .reader-layout {
  max-width: 1040px;
  padding: 36px 44px 72px;
}

.reader-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 29px;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.reader-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}

.reader-toc {
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(76vh - 40px);
  overflow-y: auto;
  padding-left: 16px;
  border-left: 2px solid var(--border);
}

.toc-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc-link {
  display: block;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.toc-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.toc-link.lv-2 { padding-left: 10px; }
.toc-link.lv-3 { padding-left: 20px; font-size: 12.5px; }
.toc-link.lv-4 { padding-left: 30px; font-size: 12px; color: var(--text-muted); }

/* 双向链接与相关笔记面板 */
.reader-relations {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.relations-group h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.relations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.relation-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.relation-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* 编辑器 */
.editor-mode-tabs {
  display: inline-flex;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.mode-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 4px 12px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
}

.mode-tab.active {
  background: var(--bg-elevated);
  color: var(--text);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.editor-meta-bar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.editor-title-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 20px;
  font-weight: 700;
  outline: none;
  color: var(--text);
}

.editor-meta-row {
  display: grid;
  grid-template-columns: 120px 180px 1fr auto;
  gap: 10px;
  align-items: center;
}

.editor-sub-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.editor-sub-wrap .form-select {
  flex: 1;
  min-width: 0;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.editor-toolbar button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12.5px;
  cursor: pointer;
}

.editor-toolbar button:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.editor-word-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

.editor-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.editor-workspace.mode-write { grid-template-columns: 1fr; }
.editor-workspace.mode-write .editor-preview { display: none; }
.editor-workspace.mode-preview { grid-template-columns: 1fr; }
.editor-workspace.mode-preview .editor-textarea { display: none; }

.editor-textarea {
  width: 100%;
  height: 100%;
  padding: 18px 20px;
  border: none;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
  resize: none;
  outline: none;
}

.editor-textarea.drag-over {
  background: var(--accent-soft);
}

.editor-preview {
  padding: 18px 24px;
  overflow-y: auto;
  background: var(--bg);
}

/* Markdown 渲染样式 */
.markdown-body {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text);
  word-break: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 1.4em 0 0.6em;
  font-family: var(--font-display);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.02em;
  scroll-margin-top: 20px;
}

.markdown-body h1 {
  font-size: 1.65em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border);
}

.markdown-body h2 {
  font-size: 1.38em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--border);
}

.markdown-body h3 { font-size: 1.15em; }

.markdown-body p { margin: 0.85em 0; }

.markdown-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.markdown-body a.wiki-link {
  text-decoration: none;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 7px;
  border-radius: 5px;
  font-weight: 500;
}

.markdown-body a.wiki-link:hover {
  background: var(--accent);
  color: #fff;
}

.markdown-body blockquote {
  margin: 1em 0;
  padding: 0.5em 1em;
  border-left: 3.5px solid var(--accent);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.markdown-body blockquote p { margin: 0.35em 0; }

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.6em;
  margin: 0.7em 0;
}

.markdown-body li { margin: 0.35em 0; }

.markdown-body li.task-item {
  list-style: none;
  margin-left: -1.35em;
}

.markdown-body .task-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.markdown-body li.task-item input[type="checkbox"] {
  margin-top: 5px;
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.markdown-body li.task-item.task-done > .task-label > span {
  text-decoration: line-through;
  color: var(--text-muted);
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.markdown-body pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 1em 0;
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.6;
}

.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.6em 0;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 14px;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.markdown-body th {
  background: var(--bg-subtle);
  font-weight: 600;
}

.markdown-body img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 8px 0;
  box-shadow: var(--shadow-sm);
}

/* 音乐管理弹窗 */
.music-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.music-upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg);
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.music-upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.music-upload-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.music-upload-title {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 14.5px;
}

.music-list-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.music-track-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.music-track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.music-track-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.music-track-info {
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.music-track-title {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-track-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.music-track-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.music-repo-details {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.music-repo-details summary {
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 6px;
}

.music-path-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 同步与设置弹窗 */
.sync-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sync-status-box {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: 13.5px;
  color: var(--text-secondary);
}

.sync-status-box.dirty {
  background: var(--badge-note-bg);
  color: var(--badge-note-fg);
}

.sync-group h4 {
  margin: 0 0 6px;
  font-size: 14.5px;
}

.help-text {
  margin: 4px 0 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.help-text code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  padding: 1px 4px;
  border-radius: 3px;
}

.warn-text { color: var(--badge-note-fg); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* 隐私锁屏 */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lock-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.lock-icon { font-size: 32px; margin-bottom: 10px; }
.lock-card h2 { margin: 0 0 6px; font-size: 20px; }
.lock-desc { margin: 0 0 20px; font-size: 13.5px; color: var(--text-secondary); }
.lock-form { display: flex; flex-direction: column; gap: 10px; }

.lock-form input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  outline: none;
  text-align: center;
}

.lock-form input:focus { border-color: var(--accent); }
.lock-error { margin: 12px 0 0; font-size: 13px; color: var(--danger); }

.pin-input {
  font-size: 22px !important;
  letter-spacing: 0.45em;
  font-weight: 700;
  padding: 11px 14px !important;
}

.btn-bio {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  margin-bottom: 12px;
  padding: 10px 14px;
  font-weight: 600;
}

.btn-bio:hover {
  background: var(--accent);
  color: #fff;
}

[data-theme="dark"] .btn-bio:hover {
  color: #08203e;
}

.lock-switch-row {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.device-pin-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.device-pin-row .form-input {
  flex: 1;
}

.device-bio-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.device-bio-head {
  margin-bottom: 8px;
}

.device-bio-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* Toast 提示 */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13.5px;
  box-shadow: var(--shadow-md);
  z-index: 300;
}

[data-theme="dark"] .toast {
  background: #e0f2fe;
  color: #0c2242;
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] .nav-item.active .nav-count,
[data-theme="dark"] .tag-chip.active,
[data-theme="dark"] .music-play-btn,
[data-theme="dark"] .music-disc.playing {
  color: #08203e;
  font-weight: 600;
}

.mobile-only { display: none; }

/* 响应式适配 */
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .mobile-only { display: inline-flex; }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 288px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 15;
  }

  .main-area { padding: 16px 16px 48px; }
  .editor-meta-row { grid-template-columns: 1fr; }
  .editor-game-fields { grid-template-columns: 1fr; }
  .post-card-game-body,
  .reader-game-card { flex-direction: column; align-items: stretch; }
  .game-cover-thumb,
  .reader-game-cover { width: 100%; height: 150px; }
  .editor-workspace { grid-template-columns: 1fr; }
  .editor-workspace.mode-split .editor-preview { display: none; }

  .reader-layout,
  .reader-layout.has-toc {
    grid-template-columns: 1fr;
    padding: 18px 18px 32px;
  }

  .reader-toc {
    display: none;
  }
}
