/* ============================================================
   urHarmony "empty" theme — Variant A v3 (Misskey 1:1 临摹 + 减法收敛)
   design-spec-v3.md v3.1 §九 token 真值直搬；品牌替换 #86b300→#286052。
   Alias API (--primary/--bg-canvas/--uh-*) 保持稳定供测试锚定。
   证据: _light.json5 / _dark.json5 / style.scss / universal.vue / MkNote.vue
   ============================================================ */
:root {
  /* v3 尺寸真值（style.scss:10-22 / navbar.vue:203-216 / universal.vue:174 / MkNote.vue:553-581） */
  --uh-radius: 12px;            /* --MI-radius */
  --uh-radius-card: 12px;
  --uh-radius-pill: 9999px;
  --uh-nav-width: 250px;
  --uh-nav-icon-width: 80px;
  --uh-widgets-width: 350px;
  --uh-note-pad: 28px 32px;
  --uh-avatar: 58px;
  --uh-fab: 60px;
  --uh-header-h: 50px;
  --uh-margin: 16px;
  --uh-margin-half: 10px;

  /* v3 动效真值（MkStreamingNotesTimeline.vue:431-452 / MkModal.vue / style.scss:585-612） */
  --uh-ease-enter: cubic-bezier(0.23, 1, 0.32, 1); /* note 入场 0.7s */
  --uh-ease-out: cubic-bezier(0, 0.5, 0.5, 1);     /* 离场/涟漪/抽屉 */
  --uh-ease-modal: ease;                            /* 模态 0.2s scale(0.9) */
  --uh-ease-soft: ease;
  --uh-dur-fast: 100ms;
  --uh-dur-base: 200ms;
  --uh-dur-enter: 700ms;

  /* v3 字体栈（Misskey 圆体开头 =「软」观感根源） */
  --uh-font: "Hiragino Maru Gothic Pro", "BIZ UDGothic", "PingFang SC", "HarmonyOS Sans SC", "MiSans", -apple-system, sans-serif;

  /* Alias API（测试锚定名，映射到 v3 Misskey 真值） */
  --bg: var(--uh-bg);
  --card: var(--uh-panel);
  --bg-surface: var(--uh-panel);
  --card-bg: var(--bg-surface);
  --text: var(--uh-fg);
  --text-primary: var(--uh-fg);
  --muted: var(--uh-fg);
  --text-secondary: var(--uh-fg);
  --accent: var(--uh-accent);
  --primary: var(--accent);
  --border-color: transparent;
  --border-subtle: transparent;
  --uh-radius-sm: 8px;
  --uh-radius-md: 12px;
  --uh-radius-drawer: 12px;
  --uh-shadow-card: 0 0 0 rgba(0, 0, 0, 0);
  --uh-shadow-card-hover: 0 0 0 rgba(0, 0, 0, 0);
  --uh-shadow-toast: 0 8px 28px var(--uh-shadow);
  --uh-ease-spring: var(--uh-ease-enter);
  --uh-spring: var(--uh-ease-enter);
  --status-danger: var(--uh-love);
  --status-danger-bg: rgba(221, 46, 68, 0.12);
  --status-warning: #ECB637;
  --status-warning-bg: rgba(236, 182, 55, 0.14);
  --status-success: var(--uh-accent);
  --status-success-bg: var(--uh-accented-bg);
  --dev: #b45309;

  /* FEED-MIXED-CARD-SPECIFICATION alias tokens (v3 mapping) */
  --uh-fs-xl: 18px;
  --uh-fs-lg: 16px;
  --uh-fs-base: 15px;
  --uh-fs-md: 14px;
  --uh-fs-sm: 13px;
  --uh-fs-xs: 12px;
  --uh-text-primary: var(--uh-fg-highlight);
  --uh-text-secondary: var(--uh-fg);
  --uh-text-tertiary: var(--uh-fg);
  --uh-text-link: var(--uh-link);
  --uh-border-default: transparent;
  --uh-surface-default: var(--uh-panel);
  --uh-surface-input: var(--uh-button-bg);
  --uh-bg-subtle: var(--uh-panel-highlight);
  --uh-brand-primary: var(--uh-accent);
  --uh-brand-primary-subtle: var(--uh-accented-bg);
  --uh-status-danger: var(--uh-love);
  --uh-status-danger-bg: rgba(221, 46, 68, 0.12);
  --uh-avatar-grad: linear-gradient(135deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
}

/* ============================================================
   Light（_light.json5 直读，accent #86b300→大说墨绿 #286052）
   ============================================================ */
[data-mode="light"] {
  --uh-accent: #286052;
  --uh-accented-bg: rgba(40, 96, 82, 0.15);
  --uh-focus: rgba(40, 96, 82, 0.3);
  --uh-bg: #FAFAFA;
  --uh-panel: #FFFFFF;
  --uh-panel-highlight: #F8F8F8;
  --uh-fg: #5F5F5F;
  --uh-fg-highlight: #444444;
  --uh-divider: rgba(0, 0, 0, 0.1);
  --uh-header: rgba(255, 255, 255, 0.7);
  --uh-button-bg: #F0F0F0;
  --uh-button-hover: #E6E6E6;
  --uh-btn-grad-a: #286052;
  --uh-btn-grad-b: #17574A;
  --uh-link: #44A4C1;
  --uh-hashtag: #FF9156;
  --uh-renote: #229E82;
  --uh-love: #DD2E44;
  --uh-shadow: rgba(0, 0, 0, 0.1);
  --uh-modal-bg: rgba(0, 0, 0, 0.3);
  --uh-ripple: rgba(0, 0, 0, 0.1);

  /* AntiFlicker 锚定 alias（v3 值重锚：Misskey light 真值） */
  --primary: #286052;
  --bg-canvas: #FAFAFA;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F0F0F0;
  --bg-raised: #F0F0F0;
  --text-primary: #5F5F5F;
  --text-secondary: #5F5F5F;
  --text-muted: #5F5F5F;
  --text-tertiary: #5F5F5F;
  --border-strong: rgba(0, 0, 0, 0.1);
  --accent-50: rgba(40, 96, 82, 0.15);
  --accent-100: rgba(40, 96, 82, 0.2);
  --accent-200: rgba(40, 96, 82, 0.3);
  --accent-500: #286052;
  --accent-600: #17574A;
  --accent-700: #0F463B;
  --accent-glow: rgba(40, 96, 82, 0.25);
  --brand-surface: rgba(40, 96, 82, 0.15);
  --brand-border: rgba(40, 96, 82, 0.3);
  --card-shadow: 0 0 0 rgba(0, 0, 0, 0);
  --card-shadow-hover: 0 0 0 rgba(0, 0, 0, 0);
}

/* ============================================================
   Dark（_dark.json5 真值：bg 纯黑 #000，panel lighten 层次；accent 大说暗色翡翠 #3E8E7A）
   ============================================================ */
[data-mode="dark"] {
  --uh-accent: #3E8E7A;
  --uh-accented-bg: rgba(62, 142, 122, 0.18);
  --uh-focus: rgba(62, 142, 122, 0.35);
  --uh-bg: #000000;
  --uh-panel: #0E0E0E;
  --uh-panel-highlight: #171717;
  --uh-fg: #DADADA;
  --uh-fg-highlight: #F2F2F2;
  --uh-divider: rgba(255, 255, 255, 0.1);
  --uh-header: rgba(14, 14, 14, 0.7);
  --uh-button-bg: rgba(255, 255, 255, 0.05);
  --uh-button-hover: rgba(255, 255, 255, 0.1);
  --uh-btn-grad-a: #3E8E7A;
  --uh-btn-grad-b: #2E7A68;
  --uh-link: #44A4C1;
  --uh-hashtag: #FF9156;
  --uh-renote: #229E82;
  --uh-love: #DD2E44;
  --uh-shadow: rgba(0, 0, 0, 0.3);
  --uh-modal-bg: rgba(0, 0, 0, 0.5);
  --uh-ripple: rgba(255, 255, 255, 0.12);

  /* AntiFlicker 锚定 alias（v3 值重锚：Misskey dark 真值） */
  --primary: #3E8E7A;
  --bg-canvas: #000000;
  --bg-surface: #0E0E0E;
  --bg-subtle: rgba(255, 255, 255, 0.05);
  --bg-raised: rgba(255, 255, 255, 0.05);
  --text-primary: #DADADA;
  --text-secondary: #DADADA;
  --text-muted: #DADADA;
  --text-tertiary: #DADADA;
  --border-strong: rgba(255, 255, 255, 0.1);
  --accent-50: rgba(62, 142, 122, 0.18);
  --accent-100: rgba(62, 142, 122, 0.24);
  --accent-200: rgba(62, 142, 122, 0.36);
  --accent-500: #3E8E7A;
  --accent-600: #2E7A68;
  --accent-700: #256557;
  --accent-glow: rgba(62, 142, 122, 0.35);
  --brand-surface: rgba(62, 142, 122, 0.18);
  --brand-border: rgba(62, 142, 122, 0.36);
  --card-shadow: 0 0 0 rgba(0, 0, 0, 0);
  --card-shadow-hover: 0 0 0 rgba(0, 0, 0, 0);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --uh-accent: #3E8E7A;
    --uh-accented-bg: rgba(62, 142, 122, 0.18);
    --uh-focus: rgba(62, 142, 122, 0.35);
    --uh-bg: #000000;
    --uh-panel: #0E0E0E;
    --uh-panel-highlight: #171717;
    --uh-fg: #DADADA;
    --uh-fg-highlight: #F2F2F2;
    --uh-divider: rgba(255, 255, 255, 0.1);
    --uh-header: rgba(14, 14, 14, 0.7);
    --uh-button-bg: rgba(255, 255, 255, 0.05);
    --uh-button-hover: rgba(255, 255, 255, 0.1);
    --uh-btn-grad-a: #3E8E7A;
    --uh-btn-grad-b: #2E7A68;
    --uh-link: #44A4C1;
    --uh-hashtag: #FF9156;
    --uh-renote: #229E82;
    --uh-love: #DD2E44;
    --uh-shadow: rgba(0, 0, 0, 0.3);
    --uh-modal-bg: rgba(0, 0, 0, 0.5);
    --uh-ripple: rgba(255, 255, 255, 0.12);

    --primary: #3E8E7A;
    --bg-canvas: #000000;
    --bg-surface: #0E0E0E;
    --bg-subtle: rgba(255, 255, 255, 0.05);
    --bg-raised: rgba(255, 255, 255, 0.05);
    --text-primary: #DADADA;
    --text-secondary: #DADADA;
    --text-muted: #DADADA;
    --text-tertiary: #DADADA;
    --border-strong: rgba(255, 255, 255, 0.1);
    --accent-50: rgba(62, 142, 122, 0.18);
    --accent-100: rgba(62, 142, 122, 0.24);
    --accent-200: rgba(62, 142, 122, 0.36);
    --accent-500: #3E8E7A;
    --accent-600: #2E7A68;
    --accent-700: #256557;
    --accent-glow: rgba(62, 142, 122, 0.35);
    --brand-surface: rgba(62, 142, 122, 0.18);
    --brand-border: rgba(62, 142, 122, 0.36);
    --card-shadow: 0 0 0 rgba(0, 0, 0, 0);
    --card-shadow-hover: 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* ============================================================
   click-anime 弹跳（style.scss:585-612 源码真值 keyframes；
   v2 的按压缩放体系废弃——Misskey 按压反馈 =
   背景变化 0.1s ease + 涟漪 + click-anime 弹跳）
   ============================================================ */
@keyframes global-bounce {
  0% { transform: scale(0.90); }
  19% { transform: scale(1.10); }
  48% { transform: scale(0.95); }
  100% { transform: scale(1.00); }
}
.click-anime { animation: global-bounce 0.7s ease; }

/* 涟漪（MkButton.vue:307-316 真值：all 0.5s ease-out 从 scale(0) 扩散） */
.ripple-host { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 100%; pointer-events: none;
  background: var(--uh-ripple); transform: scale(0);
  transition: all 0.5s var(--uh-ease-out);
}

/* 反应飞浮（MkReactionEffect.vue 真值：1s 上浮 + rotateZ） */
.rx-effect {
  position: fixed; z-index: 200; pointer-events: none;
  font-size: 18px;
  transform: translateY(-30px); opacity: 1;
  transition: transform 1s cubic-bezier(0, 0.5, 0, 1), opacity 1s cubic-bezier(0.5, 0, 1, 0.5);
}
.rx-effect.up { transform: translateY(-70px) rotateZ(80deg); opacity: 0; }

/* note 入场（MkStreamingNotesTimeline.vue:431-452 真值曲线 0.7s） */
@keyframes noteIn {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}
.note-enter { animation: noteIn 0.7s var(--uh-ease-enter); }

/* 反应条目增减（MkReactionsViewer.vue:131-142 真值 scale(0.7)） */
@keyframes rxPop {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}
.rx-pop-in { animation: rxPop 0.2s var(--uh-ease-out); }

* { box-sizing: border-box; }
html {
  background-color: var(--uh-bg);
  color: var(--uh-fg);
}
body {
  margin: 0;
  font-family: var(--uh-font);
  background: var(--uh-bg);
  color: var(--uh-fg);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a, button { color: inherit; text-decoration: none; font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dev-banner {
  background: var(--status-warning-bg);
  color: var(--dev);
  text-align: center;
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-bottom: 2px solid #f59e0b;
}
/* ============================================================
   Shell chrome：毛玻璃顶栏 50px（header: alpha<0.7<panel 真值）
   + footer。基础规则保持 QA 锁定的 nowrap flex 形态。
   ============================================================ */
.shell-header, .shell-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.shell-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--uh-header);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--uh-divider);
  box-shadow: none;
  padding: 0 16px;
  height: 50px;
}
.shell-footer {
  background: var(--uh-panel);
  color: var(--uh-fg);
  font-size: 0.8125rem;
  padding: 1.25rem;
  border-top: 0.5px solid var(--uh-divider);
}
.shell-header a { color: inherit; text-decoration: none; }
.shell-nav a { margin-left: 1rem; color: var(--uh-fg); font-weight: 600; }
.shell-nav a:hover { color: var(--uh-accent); }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.brand-logo-mark {
  height: 38px;
  padding: 0 14px;
  background: linear-gradient(90deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
  color: #fff;
  border-radius: var(--uh-radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.brand-text-group {
  display: flex;
  flex-direction: column;
}
.brand a {
  /* WCAG 2.5.5: brand/site-name link hit area >= 44px tall; visual
     font size and header layout unchanged (transparent flex expansion). */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--uh-font);
  font-size: 16px;
  font-weight: 800;
  color: var(--uh-fg-highlight);
  letter-spacing: 0.5px;
  line-height: 1.15;
}
.brand-slogan {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--uh-fg);
  opacity: 0.7;
  background: var(--uh-button-bg);
  padding: 3px 10px;
  border-radius: var(--uh-radius-pill);
  line-height: 1.2;
  margin-top: 2px;
}
/* 窄屏 shell chrome wrap（QA 回归锁：仅存在于 560px 媒询内） */
@media (max-width: 560px) {
  .shell-header,
  .shell-footer {
    flex-wrap: wrap;
    row-gap: 0.25rem;
    justify-content: center;
    text-align: center;
  }
  .shell-header {
    /* wrapped rows (brand / nav / actions) must grow the sticky bar */
    height: auto;
    min-height: 56px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }
  .shell-header .shell-nav {
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
  }
  .shell-header .shell-nav a {
    margin-left: 0;
    padding: 0.55rem 0.5rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .shell-header .header-actions {
    /* actions row sits below the wrapped nav, centered */
    flex-basis: 100%;
    justify-content: center;
  }
  .shell-footer > span {
    /* keep 44px touch height on wrapped meta text rows */
    padding: 0.55rem 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  background: transparent;
  border: none;
  border-radius: var(--uh-radius-pill);
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  /* WCAG 2.5.5 touch target (UIUX P1-04) */
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: var(--uh-fg);
  /* MkButton.vue:150-162 真值：按压反馈=背景 0.1s ease，无 scale */
  transition: background 0.1s ease, color 0.1s ease;
}
.icon-btn:hover { background: var(--uh-button-hover); color: var(--uh-fg-highlight); }
.mobile-only { display: none; }
.header-login {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  box-sizing: border-box;
  text-decoration: none;
}
.header-user {
  display: none;
  align-items: center;
  gap: 0.5rem;
}
.header-user.is-ready { display: inline-flex; }
.header-user-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  text-decoration: none;
}
.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}
/* Realtime connection status chip (C6 §5) */
.conn-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--uh-fg);
  opacity: 0.8;
  border: 0.5px solid var(--uh-divider);
  border-radius: var(--uh-radius-pill);
  padding: 0 0.6rem;
  min-height: 28px;
}
.conn-chip .conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}
.conn-chip.is-connecting .conn-dot { background: #f59e0b; }
.conn-chip.is-polling .conn-dot { background: #f59e0b; }
.conn-chip.is-offline .conn-dot { background: #9ca3af; }
.conn-chip[hidden] { display: none; }
/* Notification bell + unread bubble (C6 §3) */
.badge-btn {
  position: relative;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: var(--uh-radius-pill);
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.1s ease;
}
.badge-btn:hover { background: var(--uh-button-hover); }
.badge-btn .badge-bubble {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--uh-radius-pill);
  background: var(--uh-love);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.badge-btn .badge-bubble[hidden] { display: none; }
/* DM unread mini chip */
.dm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 28px;
  padding: 0 0.6rem;
  font-size: 0.78rem;
  border-radius: var(--uh-radius-pill);
  background: var(--uh-accented-bg);
  color: var(--uh-accent);
}
.dm-chip[hidden] { display: none; }

/* ============================================================
   UNIVERSAL 三栏骨架（universal.vue 真值）
   nav 80px 折叠图标列 ｜ 中列 TL ｜ widgets 350px
   ============================================================ */
.shell-body {
  display: grid;
  grid-template-columns: var(--uh-nav-icon-width) minmax(0, 1fr) var(--uh-widgets-width);
  gap: 0;
  min-height: calc(100vh - 50px);
  max-width: none;
  margin: 0;
  padding: 0;
  align-items: start;
}
/* contents 圆角真值：border-radius 12px 0 0 0 */
.shell-main {
  background: var(--uh-panel);
  border-radius: var(--uh-radius) 0 0 0;
  padding: var(--uh-margin);
  overflow-x: hidden;
}
.shell-left {
  background: var(--uh-panel);
  border-right: 0.5px solid var(--uh-divider);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
  position: sticky;
  top: 50px;
  height: calc(100vh - 50px);
}
.shell-right {
  background: var(--uh-bg);
  border-left: 0.5px solid var(--uh-divider);
  padding: var(--uh-margin);
  display: flex;
  flex-direction: column;
  gap: var(--uh-margin);
  position: sticky;
  top: 50px;
  height: calc(100vh - 50px);
  overflow-y: auto;
}
/* 子页面（profile / follows）保持窄栏版心 */
.page-profile .shell-body, .page-follows .shell-body { grid-template-columns: 220px minmax(0, 1fr); }
.page-profile .shell-main, .page-follows .shell-main {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
/* nav 图标列 item（navbar.vue 真值 60×44 radius 10） */
.nav-item {
  width: 60px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--uh-fg);
  position: relative;
  transition: background 0.1s ease, color 0.1s ease;
}
.nav-item:hover { background: var(--uh-button-hover); color: var(--uh-fg-highlight); }
.nav-item.active { color: var(--uh-accent); background: var(--uh-accented-bg); }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 999px;
  background: var(--uh-accent);
}
.nav-item svg { width: 22px; height: 22px; }
.nav-spacer { flex: 1; }

/* ============================================================
   v3.1 整体 1:1 复刻（proto-v3-1 过审稿，Misskey 源码真值）
   断点四档：≥1280 nav 250 展开 / 1100–1279 nav 80+widgets /
   501–1099 nav 80+全宽 TL+widgets 弹层 / ≤500 移动。
   JS mirror navbar.vue:130 + universal.vue:66-67 设 html[data-nav]
   与 html[data-widgets]；以下媒询为 noscript 兜底（同阈值）。
   ============================================================ */
/* ---- 页头毛玻璃 tab 行（MkPageHeader --height:50px 真值） ---- */
.ph-header { justify-content: flex-start; gap: 0; padding: 0 8px; }
.ph-tabs { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ph-tabs::-webkit-scrollbar { display: none; }
.ph-tabs .tab svg { width: 18px; height: 18px; margin-right: 5px; opacity: 0.9; }
.ph-actions { display: flex; align-items: center; gap: 4px; flex: none; }

/* ---- nav 双态：展开 250 / 图标 80（navbar.vue:203-204 真值） ---- */
.shell-left { align-items: stretch; padding: 12px 10px; }
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 12px;
  min-height: 44px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--uh-fg-highlight);
  text-decoration: none;
  min-height: 44px;
}
.brand-link .brand-logo-mark { height: 30px; padding: 0 10px; font-size: 13px; }
.brand-name { font-size: 15px; letter-spacing: 0.5px; }
.nav-chevron { width: 32px; height: 32px; min-width: 32px; border-radius: 8px; }
.nav-chevron svg { width: 16px; height: 16px; }
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* 展开态 item：图标+文字（navbar.vue 250 展开形态） */
.shell-left .nav-item {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  justify-content: flex-start;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}
.shell-left .nav-item.active::before { left: -10px; }
.nav-sep { height: 0.5px; background: var(--uh-divider); margin: 6px 4px; flex: none; }
/* 展开态发帖键：全宽渐变胶囊（A 态置底真值） */
.shell-left .post-btn::before {
  width: 100%;
  height: 40px;
  border-radius: 999px;
}
.shell-left .post-btn { height: 40px; }
.shell-left .post-btn svg { position: static; width: 18px; height: 18px; }
.post-btn-label {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  margin-left: 4px;
}
/* 账号行（底本 A 态 @uiux 头像收尾） */
.nav-tail { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.nav-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--uh-fg-highlight);
  min-height: 44px;
  overflow: hidden;
}
.nav-account:hover { background: var(--uh-button-hover); }
.nav-account-avatar {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
}
.nav-account-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 图标态（data-nav=icon）：label 全隐藏、发帖圆钮 52、账号只头像 */
html[data-nav="icon"] .shell-left { align-items: center; padding: 12px 0; }
html[data-nav="icon"] .brand-row { justify-content: center; padding: 2px 0 12px; }
html[data-nav="icon"] .brand-name,
html[data-nav="icon"] .nav-chevron,
html[data-nav="icon"] .nav-item .nav-label,
html[data-nav="icon"] .post-btn-label,
html[data-nav="icon"] .nav-sep { display: none; }
html[data-nav="icon"] .nav-menu { align-items: center; }
html[data-nav="icon"] .shell-left .nav-item {
  width: 60px;
  padding: 0;
  justify-content: center;
  gap: 0;
}
html[data-nav="icon"] .shell-left .post-btn::before { width: 52px; height: 52px; border-radius: 100%; }
html[data-nav="icon"] .shell-left .post-btn { height: 52px; width: 60px; }
html[data-nav="icon"] .nav-tail { align-items: center; }
html[data-nav="icon"] .nav-account { padding: 0; justify-content: center; }
html[data-nav="icon"] .nav-account-name { display: none; }

/* ---- widgets 弹层（C 态 501–1099：入口=nav 底部小组件键） ---- */
.widgets-pop-btn { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
html[data-widgets="pop"] .shell-right { display: none; }
.shell-right.is-pop-open {
  display: flex;
  position: fixed;
  top: 58px;
  right: 12px;
  width: 350px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 70px);
  height: auto;
  background: var(--uh-panel);
  border: 0.5px solid var(--uh-divider);
  border-radius: var(--uh-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  z-index: 120;
}
.pop-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 110;
}

/* ---- composer MkPostForm 形态真值（avatar 28 / 工具行 42 格 / 渐变发布键） ---- */
.composer { align-items: flex-start; }
.composer-avatar { width: 28px; height: 28px; font-size: 12.5px; }
.composer-body {
  background: transparent;
  padding: 0.35rem 0;
  min-height: 90px;
  max-height: 500px;
  field-sizing: content;
  resize: none;
}
.composer-body:focus { background: transparent; box-shadow: none; }
.composer-tools {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  grid-auto-rows: 40px;
  margin-top: 4px;
}
.footer-button {
  border: none;
  background: none;
  color: var(--uh-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}
.footer-button svg { width: 18px; height: 18px; }
.footer-button:hover:not(:disabled) { background: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.05)); color: var(--uh-fg-highlight); }
.footer-button:disabled { opacity: 0.45; cursor: not-allowed; }
.composer-foot { margin-top: 6px; }
.composer-submit {
  margin: 4px 0 4px 6px;
  padding: 0;
  border: none;
  background: linear-gradient(90deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
  border-radius: 6px;
  min-width: 90px;
  cursor: pointer;
}
.composer-submit-inner {
  display: inline-block;
  padding: 0 12px;
  line-height: 34px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.composer-submit:hover { filter: brightness(1.08); }
.composer-submit:active { filter: brightness(0.95); }

/* ---- 日历 widget（WidgetCalendar.vue 真值：60/40 两栏 + 三色进度条） ---- */
.widget-calendar { background: var(--uh-panel); border-radius: var(--uh-radius); padding: 14px 16px; }
.widget { background: var(--uh-panel); border-radius: var(--uh-radius); padding: 14px 16px; }
.widget h3 { margin: 0 0 10px; font-size: 13px; color: var(--uh-fg-highlight); }
.cal-layout { display: flex; gap: 12px; }
.cal-main { width: 60%; }
.cal-info { width: 40%; padding: 0 0 0 0; display: flex; flex-direction: column; justify-content: center; }
.cal-month-year { font-size: 0.9em; line-height: 18px; color: var(--uh-fg); white-space: nowrap; }
.cal-week-day { font-size: 0.9em; line-height: 18px; color: var(--uh-fg); opacity: 0.8; }
.cal-day { font-size: 1.75em; line-height: 32px; margin: 10px 0; color: var(--uh-fg-highlight); font-weight: 700; }
.cal-day.is-holiday { color: #ef95a0; }
.cal-i18n { opacity: 0.85; }
.cal-info-section { margin-bottom: 8px; }
.cal-info-section:last-child { margin-bottom: 4px; }
.cal-meter {
  background: light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
  border-radius: 8px;
  overflow: hidden;
}
.cal-meter-val {
  height: 4px;
  border-radius: 0 8px 8px 0;
  transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.cal-info-section:nth-of-type(1) .cal-meter-val { background: #f7796c; }
.cal-info-section:nth-of-type(2) .cal-meter-val { background: #a1de41; }
.cal-info-section:nth-of-type(3) .cal-meter-val { background: #41ddde; }
.cal-info-text {
  display: flex;
  font-size: 0.75em;
  line-height: 18px;
  opacity: 0.8;
  color: var(--uh-fg);
  margin-top: 2px;
}
.cal-percentage { margin-left: auto; }
/* 通知 widget：圆底图标 + 双行紧凑列表 + max-height 滚动 */
.notif-widget-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}
.notif-item { display: flex; gap: 10px; align-items: flex-start; }
.notif-item-icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--uh-accented-bg);
  color: var(--uh-accent);
  display: grid;
  place-items: center;
  font-size: 14px;
}
.notif-item-body { min-width: 0; flex: 1; font-size: 12.5px; line-height: 1.4; }
.notif-item-head { color: var(--uh-fg-highlight); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-item-text { color: var(--uh-fg); opacity: 0.75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-item-time { flex: none; font-size: 11px; color: var(--uh-fg); opacity: 0.6; }
.notif-more { display: inline-block; margin-top: 8px; font-size: 12.5px; color: var(--uh-accent); text-decoration: none; }
.notif-more:hover { text-decoration: underline; }

/* ---- D 态移动底栏五键（mobile-footer-menu.vue 真值：圆钮 42px 不上浮） ---- */
.nf-post {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 100%;
  border: none;
  background: linear-gradient(90deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 6px;
  text-decoration: none;
}
.nf-post svg { width: 20px; height: 20px; }
.nf-post:active { filter: brightness(0.95); }
/* 移动菜单抽屉（D 态点菜单：240px 抽屉 + 遮罩，形态同 A 态展开 nav） */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 130;
}
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 240px;
  background: var(--uh-panel);
  border-right: 0.5px solid var(--uh-divider);
  z-index: 140;
  display: flex;
  flex-direction: column;
  padding: 12px;
  overflow-y: auto;
}
.mobile-menu-drawer[hidden] { display: none; }
.drawer-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 6px 12px;
  font-weight: 800;
  color: var(--uh-fg-highlight);
}
.drawer-header .icon-btn { margin-left: auto; }
.drawer-nav .nav-item { width: 100%; justify-content: flex-start; gap: 12px; padding: 0 14px; font-size: 14px; font-weight: 600; }

/* 发帖渐变正圆键（navbar.vue:689 折叠态真值 52×52） */
.post-btn {
  position: relative;
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  border-radius: 100%;
  background: linear-gradient(90deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
}
.post-btn:hover::before { filter: brightness(1.1); }
.post-btn svg { position: relative; width: 20px; height: 20px; color: #fff; z-index: 1; }
/* Desktop sidebars: real content (browse nav / featured strip). */
.aside-section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--uh-fg-highlight);
  padding: 0 4px 10px;
}
.aside-nav { display: none; }
.aside-featured { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.aside-featured li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--uh-radius);
  transition: background 0.1s ease;
}
.aside-featured li:hover { background: var(--uh-panel-highlight); }
.aside-featured-title {
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--uh-fg-highlight);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.aside-featured li:hover .aside-featured-title { color: var(--uh-accent); }
.aside-featured .muted { font-size: 11.5px; color: var(--uh-fg); opacity: 0.7; }
/* Prototype IA: featured strip lives in the RIGHT column only. The in-feed
   section stays in the DOM (region.feed.featured is a data contract + test
   lock) but collapses to sr-only on desktop so the TL stream stays clean. */
@media (min-width: 901px) {
  section[data-region="region.feed.featured"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
.install-main { max-width: 32rem; margin: 2rem auto; }
.muted { color: var(--uh-fg); opacity: 0.7; }
.author-link { color: inherit; text-decoration: none; }
.author-link:hover, .author-link:focus-visible { text-decoration: underline; color: var(--uh-accent); }
/* ============================================================
   TL 面板 + feed tabs（MkPageHeader.tabs 真值：3px accent 圆条 0.15s ease）
   ============================================================ */
.tl-panel {
  max-width: 770px;
  margin: 0 auto;
  background: var(--uh-panel);
  border-radius: var(--uh-radius);
  overflow: hidden;
}
.banner {
  max-width: 1240px;
  margin: 0.75rem auto 0;
  padding: 0.6rem 1rem;
  border-radius: var(--uh-radius);
  font-size: 0.92rem;
  border: none;
}
.banner-warn { background: var(--status-warning-bg); color: var(--status-warning); }
.banner-danger { background: var(--status-danger-bg); color: var(--status-danger); }
.schedule-failures ul { margin: 0.4rem 0 0 1.2rem; padding: 0; }
.flash { background: var(--status-danger-bg); color: var(--status-danger); padding: 0.75rem 1rem; border-radius: var(--uh-radius); margin-bottom: 1rem; }
.feed-tabs {
  display: flex;
  gap: 2px;
  height: 100%;
  padding: 0;
  margin-bottom: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.feed-tabs .tab {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0.5rem 0.9rem;
  color: var(--uh-fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-radius: 0;
  border-bottom: none;
  position: relative;
  /* WCAG 2.5.5: visual row stays 40px; the hit area extends transparently
     to >= 44px via the pseudo-element below (layout untouched). */
  transition: opacity 0.2s ease, color 0.15s ease;
}
.feed-tabs .tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  /* WCAG 2.5.5 round 2: extend upward ONLY. A bottom overhang (-3px) was
     covered by sibling tab boxes stacked later, capping the effective hit
     height at 43px; expanding top -6px keeps the whole hit area either on
     the element box or above it (no sibling contention): 40+6=46px >= 44. */
  top: -6px;
  bottom: 0;
}
.feed-tabs .tab:hover { color: var(--uh-fg-highlight); }
.feed-tabs .tab.active { color: var(--uh-accent); }
.feed-tabs .tab.active::after {
  /* MkPageHeader.tabs.vue:241-275 真值：3px accent 圆条 0.15s ease。
     保留向上扩展的热区属性（QA 锁），视觉只渲染底部圆条。 */
  content: '';
  left: 10px;
  right: 10px;
  bottom: 0;
  top: auto;
  height: 3px;
  background: var(--uh-accent);
  border-radius: 999px;
  pointer-events: none;
  transition: width 0.15s ease, left 0.15s ease;
}

/* ============================================================
   Composer（发帖框；MkPostForm 渐变提交键真值）
   ============================================================ */
.composer {
  display: flex;
  gap: 0.75rem;
  padding: 16px;
  background: var(--uh-panel);
  border: none;
  border-bottom: 0.5px solid var(--uh-divider);
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
}
/* v3.1 MkPostForm 真值：avatar 28×28、textarea 透明底 field-sizing 自动增高 */
.composer-avatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12.5px;
}
.composer-main { flex: 1; min-width: 0; }
.composer-body {
  width: 100%;
  border: none;
  border-radius: var(--uh-radius-sm);
  background: transparent;
  color: var(--uh-fg-highlight);
  font: inherit;
  padding: 0.35rem 0;
  min-height: 90px;
  max-height: 500px;
  field-sizing: content;
  resize: none;
  transition: background 0.1s ease, box-shadow var(--uh-dur-base) ease;
}
.composer-body:focus { outline: none; background: transparent; box-shadow: none; }
.composer-foot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.char-count { font-size: 0.85rem; color: var(--uh-fg); opacity: 0.7; }
.char-count.over { color: var(--status-danger); font-weight: 600; opacity: 1; }
.composer-target { font-size: 0.85rem; margin-right: auto; }
.composer-hint { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--status-warning); }
.composer-restored { margin: 0.35rem 0 0; font-size: 0.85rem; }
.composer-gate {
  border: 2px dashed var(--uh-divider);
  border-radius: var(--uh-radius);
  background: var(--uh-panel);
  padding: 0.9rem;
  margin-bottom: 0;
}
/* 主按钮（MkButton 真值：min-width 100 / radius 5 / 渐变 primary / 无 scale 按压） */
.btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
  color: #fff;
  border: 0;
  border-radius: 5px;
  padding: 0.55rem 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  /* Misskey 按压真值：只变背景（hover 提亮），无缩放 */
  transition: background 0.1s ease, filter 0.1s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { filter: brightness(0.95); }
.btn-secondary {
  background: var(--uh-button-bg);
  color: var(--uh-fg-highlight);
  box-shadow: none;
}
.btn-secondary:hover { background: var(--uh-button-hover); filter: none; }
.btn-sm { padding: 0.35rem 12px; }
.install-form label { display: block; margin-bottom: 0.85rem; font-weight: 600; }
.install-form input[type=text],
.install-form input[type=email],
.install-form input[type=password] {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.5rem 16px;
  border: none;
  border-radius: var(--uh-radius-sm);
  font: inherit;
  background: var(--uh-button-bg);
  color: var(--uh-fg-highlight);
  transition: box-shadow var(--uh-dur-base) ease;
}
.install-form input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--uh-focus);
}
.checkbox { font-weight: 500; }
.section-title { margin: 0 0 0.5rem; font-size: 1.05rem; }
.featured-list, .feed-list { list-style: none; margin: 0; padding: 0; }
.featured-pos { color: var(--uh-accent); font-weight: 700; margin-right: 0.4rem; }
.featured-title { font-weight: 600; }
.feed-title { font-weight: 600; }
.featured-item .muted, .feed-item .muted { display: block; margin: 0.25rem 0; font-size: 0.85rem; }
.feed-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto;
  min-height: 44px;
  min-width: 96px;
  padding: 0 1rem;
  box-sizing: border-box;
  border-radius: var(--uh-radius-sm);
  background: var(--uh-button-bg);
  color: var(--uh-accent);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.1s ease;
}
.feed-more:hover, .feed-more:focus-visible { background: var(--uh-button-hover); }

/* ============================================================
   NOTE 卡片（MkNote.vue 真值直搬）
   noGap 模式：panel 外层出圆角，note 间仅 0.5px divider；
   padding 28×32；根字号 1.05em；头像 58；hover 全卡 accentedBg。
   ============================================================ */
.feed-list .feed-item {
  border: none;
  padding: 0;
  margin-bottom: 0;
  background: transparent;
}
.feed-card {
  /* MkNote noGap 真值：容器自带 panel 圆角，卡片自身直贴。
     v2 的悬浮升起阴影体系废弃——Misskey hover = 全卡 accentedBg 平高亮。 */
  border-radius: 0;
  border: none;
  border-bottom: 0.5px solid var(--uh-divider);
  box-shadow: none;
  margin-bottom: 0;
  padding: 28px 32px;
  background: transparent;
  line-height: 1.55;
  box-sizing: border-box;
  font-size: 1.05em;
  color: var(--uh-fg);
  /* note hover accentedBg 全卡高亮（Misskey 招牌，QA 专测项） */
  transition: background-color 0.2s ease;
}
.feed-card:hover {
  background-color: var(--uh-accented-bg);
  transform: none;
  box-shadow: none;
}
.feed-card:last-child { border-bottom: none; }
.feed-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.feed-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feed-card-header:hover .feed-avatar { transform: none; }
.feed-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--uh-fg);
  flex: 1;
  min-width: 0;
}
.feed-author {
  font-size: 15px;
  font-weight: 700;
  color: var(--uh-fg-highlight);
}
.feed-author a {
  color: inherit;
  text-decoration: none;
}
.feed-author a:hover { text-decoration: underline; }
.feed-extra-meta { font-size: 0.85em; opacity: 0.7; }
/* 徽章（Misskey 无此元素——保留信息但弱化为 muted 文本胶囊） */
.badge-article,
.tag-pill {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 2px 9px;
  border-radius: var(--uh-radius-pill);
  margin-left: 4px;
  white-space: nowrap;
  background: var(--uh-button-bg);
  color: var(--uh-fg);
}
.tag-pill.tag-orange { color: var(--uh-hashtag); }

/* ---- 卡体三形态 ---- */
.card-short-headless .headless-body {
  font-size: 1em;
  line-height: 1.65;
  color: var(--uh-fg-highlight);
  margin-top: 2px;
  margin-bottom: 0;
  word-break: break-word;
}
.card-short-titled .short-title {
  font-size: 1.1em;
  font-weight: 800;
  line-height: 1.45;
  color: var(--uh-fg-highlight);
  margin-top: 4px;
  margin-bottom: 2px;
  word-break: break-word;
}
.card-short-titled .short-body {
  font-size: 1em;
  line-height: 1.6;
  color: var(--uh-fg-highlight);
  margin: 0;
  word-break: break-word;
}
.card-article .article-main {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 4px;
}
.card-article .article-content {
  flex: 1;
  min-width: 0;
}
.card-article .article-title {
  font-family: var(--uh-font);
  font-size: 1.2em;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0.2px;
  color: var(--uh-fg-highlight);
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  transition: color 0.15s ease;
}
/* note hover 标题升 accent（Misskey hover 体系） */
.feed-card:hover .article-title { color: var(--uh-accent); }
.card-article .article-excerpt {
  font-size: 1em;
  line-height: 1.7;
  color: var(--uh-fg);
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.card-article .article-reading-meta {
  font-size: 12.5px;
  color: var(--uh-fg);
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-article .article-cover {
  width: 140px;
  height: 93px;
  border-radius: var(--uh-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.feed-card:hover .article-cover { transform: none; }
/* No-cover tolerance (design-spec §四.1): title+excerpt expand full width */
.card-article.no-cover .article-cover { display: none; }
@media (max-width: 640px) {
  .card-article .article-cover {
    width: 84px;
    height: 56px;
  }
}
/* Fenced code block in card body */
.feed-body pre,
.feed-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.feed-body pre {
  background: var(--uh-panel-highlight);
  font-size: 13px;
  border-radius: var(--uh-radius-sm);
  padding: 10px 12px;
  overflow-x: auto;
  margin: 8px 0;
}
/* 500 Code Point Folding（§四）：折叠遮罩 64px 渐变（MkNote.vue:618-631 真值） */
.feed-body-container {
  position: relative;
  transition: max-height 200ms var(--uh-ease-out);
}
.feed-body-container.is-collapsed {
  max-height: 280px;
  overflow: hidden;
}
.feed-body-container.is-collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  pointer-events: none;
  background: linear-gradient(0deg, var(--uh-panel), transparent);
}
[data-mode="dark"] .feed-body-container.is-collapsed::after {
  background: linear-gradient(0deg, var(--uh-panel), transparent);
}
.btn-expand-fold {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--uh-accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 0 8px;
  margin-top: 4px;
}
.btn-expand-fold:hover {
  text-decoration: underline;
}

/* 9-Image Responsive Grid (§五) */
.image-grid {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  max-height: 320px;
  overflow: hidden;
  border-radius: var(--uh-radius-sm);
}
.image-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.image-grid[data-count="1"],
.image-grid.count-1 {
  display: block;
  max-width: 400px;
  max-height: 280px;
}
.image-grid[data-count="1"] img,
.image-grid.count-1 img {
  width: auto;
  max-width: 100%;
  max-height: 280px;
  border-radius: var(--uh-radius-sm);
  object-fit: cover;
}
.image-grid[data-count="2"],
.image-grid.count-2,
.image-grid[data-count="4"],
.image-grid.count-4 {
  grid-template-columns: repeat(2, 1fr);
}
.image-grid[data-count="2"] .grid-image-item,
.image-grid.count-2 .grid-image-item,
.image-grid[data-count="4"] .grid-image-item,
.image-grid.count-4 .grid-image-item {
  aspect-ratio: 1 / 1;
}
.image-grid[data-count="3"],
.image-grid.count-3,
.image-grid[data-count="5"],
.image-grid.count-5,
.image-grid[data-count="6"],
.image-grid.count-6,
.image-grid[data-count="7"],
.image-grid.count-7,
.image-grid[data-count="8"],
.image-grid.count-8,
.image-grid[data-count="9"],
.image-grid.count-9 {
  grid-template-columns: repeat(3, 1fr);
}
.image-grid[data-count="3"] .grid-image-item,
.image-grid.count-3 .grid-image-item,
.image-grid[data-count="5"] .grid-image-item,
.image-grid.count-5 .grid-image-item,
.image-grid[data-count="6"] .grid-image-item,
.image-grid.count-6 .grid-image-item,
.image-grid[data-count="7"] .grid-image-item,
.image-grid.count-7 .grid-image-item,
.image-grid[data-count="8"] .grid-image-item,
.image-grid.count-8 .grid-image-item,
.image-grid[data-count="9"] .grid-image-item,
.image-grid.count-9 .grid-image-item {
  aspect-ratio: 1 / 1;
}
.card-short-titled .image-grid {
  margin-top: 8px;
  max-height: 260px;
}

/* ============================================================
   Note footer 操作键（MkNote.vue:682-698 真值）
   padding 8px、margin-right 28px、footer margin-bottom -8px；
   键色 color-mix(panel 30%, fg 70%)，整卡 hover 升 fg。
   ============================================================ */
.feed-card-actions {
  display: flex;
  gap: 0;
  margin-top: 2px;
  margin-bottom: -8px;
  padding-top: 0;
  border-top: none;
  position: relative;
}
.feed-card-actions::before { content: none; }
.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 34px;
  height: 34px;
  padding: 8px;
  margin-right: 28px;
  background: transparent;
  border: none;
  border-radius: var(--uh-radius-sm);
  cursor: pointer;
  /* MkNote.vue:695 真值：panel+fg 70% 混合 */
  color: color-mix(in srgb, var(--uh-panel) 30%, var(--uh-fg) 70%);
  font-size: 13px;
  font-weight: 600;
  position: relative;
  transition: color 0.1s ease;
}
/* WCAG 2.5.5: extend the 34px visual key upward to a >=44px hit area. */
.btn-action::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -5px;
  bottom: 0;
}
/* MkNote.vue:413-415 真值：整卡 hover 时按钮升为 fg；按钮自身 hover fgHighlighted */
.feed-card:hover .btn-action { color: var(--uh-fg); }
.btn-action:hover { color: var(--uh-fg-highlight) !important; background: transparent; }
.btn-action.btn-action-like:hover:not(.is-liked) { color: var(--uh-love); }
.btn-action.btn-action-like.is-liked { color: var(--uh-love); background: transparent; }
/* 反应胶囊（MkReactionsViewer.reaction 真值 30px 胶囊） */
.reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rx {
  height: 30px;
  padding: 0 10px;
  border-radius: var(--uh-radius-sm);
  background: var(--uh-button-bg);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: var(--uh-fg);
  transition: transform 0.2s var(--uh-ease-out), background 0.1s ease, box-shadow 0.1s ease;
}
.rx:hover { background: var(--uh-button-hover); }
.rx.reacted { background: var(--uh-accented-bg); color: var(--uh-accent); box-shadow: inset 0 0 0 1px var(--uh-accent); }
.rx.reacted .like-icon { animation: global-bounce 0.7s ease; display: inline-block; }

/* Composer Title Interactions (§六) */
.composer-title-wrapper {
  margin-bottom: 8px;
}
.btn-toggle-title {
  background: none;
  border: none;
  color: var(--uh-accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.btn-toggle-title:hover {
  text-decoration: underline;
}
.composer-title-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 200ms var(--uh-ease-out);
}
.composer-title-input-box[hidden] {
  display: none;
}
.input-short-title {
  flex: 1;
  font-size: 14px;
  padding: 6px 14px;
  border: none;
  border-radius: var(--uh-radius-pill);
  background: var(--uh-button-bg);
  color: var(--uh-fg-highlight);
  transition: box-shadow var(--uh-dur-base) ease;
}
.input-short-title:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--uh-focus);
}
.btn-clear-title {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--uh-fg);
  opacity: 0.7;
  cursor: pointer;
  font-size: 14px;
  border-radius: var(--uh-radius-pill);
  transition: opacity 0.1s ease, background 0.1s ease;
}
.btn-clear-title:hover {
  opacity: 1;
  background: var(--uh-button-hover);
}
.input-article-title {
  width: 100%;
  font-size: 19px;
  font-weight: 800;
  padding: 8px 16px;
  border: none;
  border-radius: var(--uh-radius-sm);
  background: var(--uh-button-bg);
  color: var(--uh-fg-highlight);
  box-sizing: border-box;
  transition: box-shadow var(--uh-dur-base) ease;
}
.input-article-title:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--uh-focus);
}
.composer-title.input-error {
  box-shadow: 0 0 0 2px var(--uh-love) !important;
}
.composer-title-error {
  color: var(--uh-love);
  font-size: 12px;
  margin: 4px 0 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.composer-title-error::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--uh-love);
  color: #fff;
  font-size: 10px;
  font-weight: bold;
}
/* ============================================================
   状态/空态/Toast/Skeleton/Sheet（v3 减法：曲线全部换 Misskey 真值）
   ============================================================ */
.state {
  border: none;
  border-radius: var(--uh-radius);
  background: var(--uh-panel);
  box-shadow: none;
  padding: 48px 24px;
  text-align: center;
}
.state h2 { margin: 0 0 0.4rem; font-size: 17px; font-weight: 800; font-family: var(--uh-font); color: var(--uh-fg-highlight); }
.state p { color: var(--uh-fg); margin: 0 0 1rem; opacity: 0.8; }
.state .state-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--uh-accented-bg);
  color: var(--uh-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}
/* 空态 CTA（home_following_test 锁 class="btn btn-primary"） */

/* Toast（MkToast.vue:48-55 真值：translateY(-100%) 0.3s，顶部滑入） */
.toast-container {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--uh-panel);
  color: var(--uh-fg-highlight);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--uh-radius-sm);
  box-shadow: 0 8px 28px var(--uh-shadow);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast-pill.is-shown {
  opacity: 1;
  transform: translateY(0);
}
/* Skeleton（v2 呼吸 shimmer 保留为加载形态） */
.skeleton-box {
  border-radius: var(--uh-radius-sm);
  background: var(--uh-button-bg);
  background-image: linear-gradient(90deg, var(--uh-button-bg) 25%, var(--uh-button-hover) 50%, var(--uh-button-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: var(--uh-modal-bg);
  z-index: 40;
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--uh-panel);
  border-radius: var(--uh-radius) var(--uh-radius) 0 0;
  padding: 0.5rem 1rem 1.25rem;
  /* keep the submit action above the soft keyboard / home indicator */
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 50;
  /* 抽屉真值（MkModal.vue:434-460）：transform 0.2s cubic-bezier(0,.5,0,1) */
  transform: translateY(100%);
  transition: transform 0.2s var(--uh-ease-out);
}
.sheet.is-open { transform: translateY(0); }
.sheet[hidden], .sheet-backdrop[hidden] { display: none; }
.sheet-handle {
  width: 2.5rem;
  height: 0.3rem;
  border-radius: 999px;
  background: var(--uh-button-hover);
  margin: 0.25rem auto 0.6rem;
}
.sheet-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: transparent;
  border: 0;
  font: inherit;
  padding: 0.8rem 0.4rem;
  cursor: pointer;
  text-align: left;
}
#mobile-composer .composer-body { margin-bottom: 0.5rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 移动端 ≤500px（universal.vue MOBILE_THRESHOLD=500 真值）。
   v3.1: 桌面侧栏由 html[data-nav]/[data-widgets] 驱动（JS mirror +
   noscript 媒询兜底同阈值），此处仅保留子页面单列回退。 */
.mobile-bottom { display: none; }
@media (max-width: 900px) {
  .page-profile .shell-body, .page-follows .shell-body { grid-template-columns: minmax(0, 1fr); }
  .mobile-only { display: inline-block; }
}
/* data 属性驱动：移动形态（JS mirror 设 data-nav=mobile） */
html[data-nav="mobile"] .shell-body { grid-template-columns: minmax(0, 1fr); }
html[data-nav="mobile"] .shell-left,
html[data-nav="mobile"] .shell-right { display: none; }
html[data-nav="mobile"] .nav-footer { display: flex; }
/* noscript 兜底：≤500 无 JS 时按媒询强制移动形态 */
@media (max-width: 500px) {
  .shell-body { grid-template-columns: minmax(0, 1fr); }
  .shell-left, .shell-right { display: none; }
  .nav-footer { display: flex; }
  /* D 态页头（底本 D-480：图标 tab 行毛玻璃，无右侧键堆） */
  .ph-actions { display: none; }
  .ph-header { padding: 0 4px; }
  .feed-tabs .tab { padding: 0.5rem 0.45rem; }
  .feed-tabs .tab span { display: none; }
  .feed-tabs .tab svg { width: 20px; height: 20px; margin-right: 0; }
}
/* 底栏（52px 毛玻璃；D 态五键含 42px 发帖圆钮，旧 FAB 已删除） */
.nav-footer { display: none; }
@media (max-width: 500px) {
  .main-pad, .shell-main { padding: var(--uh-margin-half); }
  .feed-card {
    padding: 20px 22px;
    font-size: 0.9em;
  }
  .feed-avatar { width: 50px; height: 50px; font-size: 16px; }
  .btn-action { margin-right: 18px; }
  .fab {
    display: flex;
    position: fixed;
    bottom: 72px;
    right: 16px;
    width: 60px;
    height: 60px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
    border: none;
    color: #fff;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(40, 96, 82, 0.45);
    z-index: 80;
  }
  .fab svg { width: 24px; height: 24px; }
  .nav-footer {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(52px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--uh-header);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 0.5px solid var(--uh-divider);
    z-index: 80;
  }
  .nf-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--uh-fg);
    font-size: 10px;
    font-weight: 600;
    background: none;
    border: none;
    min-height: 44px;
  }
  .nf-item.active { color: var(--uh-accent); }
  .nf-item svg { width: 20px; height: 20px; }
  .mobile-bottom { display: none; }
}
/* data 属性驱动：B 态（1100–1279）与 C 态（501–1099）nav 80 图标列。
   widgets 列按 data-widgets：side 保留 / pop 隐藏（弹层键入口）。 */
html[data-nav="icon"] .shell-body { grid-template-columns: var(--uh-nav-icon-width) minmax(0, 1fr) var(--uh-widgets-width); }
html[data-nav="icon"][data-widgets="pop"] .shell-body { grid-template-columns: var(--uh-nav-icon-width) minmax(0, 1fr); }
html[data-nav="full"] .shell-body { grid-template-columns: var(--uh-nav-width) minmax(0, 1fr) var(--uh-widgets-width); }
/* noscript 兜底（JS mirror 未挂时与源码阈值一致） */
@media (min-width: 501px) and (max-width: 1099px) {
  .shell-body { grid-template-columns: var(--uh-nav-icon-width) minmax(0, 1fr); }
  .shell-right { display: none; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  .shell-body { grid-template-columns: var(--uh-nav-icon-width) minmax(0, 1fr) var(--uh-widgets-width); }
  .shell-left { align-items: center; padding: 12px 0; }
  .shell-left .brand-row { justify-content: center; padding: 2px 0 12px; }
  .shell-left .brand-name, .shell-left .nav-chevron,
  .shell-left .nav-item .nav-label, .shell-left .post-btn-label,
  .shell-left .nav-sep { display: none; }
  .shell-left .nav-menu { align-items: center; }
  .shell-left .nav-item { width: 60px; padding: 0; justify-content: center; gap: 0; }
  .shell-left .post-btn::before { width: 52px; height: 52px; border-radius: 100%; }
  .shell-left .post-btn { height: 52px; width: 60px; }
  .shell-left .post-btn svg { position: static; width: 18px; height: 18px; }
  .shell-left .nav-tail { align-items: center; }
  .shell-left .nav-account { padding: 0; justify-content: center; }
  .shell-left .nav-account-name { display: none; }
}

/* User profile & follow lists（v3：panel 卡化 + 0.5px divider） */
.profile-header-card {
  background: var(--uh-panel);
  border: none;
  border-radius: var(--uh-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--uh-btn-grad-a), var(--uh-btn-grad-b));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-identity {
  margin-top: 0.75rem;
}
.profile-identity h1 {
  margin: 0;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--uh-fg-highlight);
}
.profile-sub {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}
.profile-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 0.5px solid var(--uh-divider);
}
.stat-item {
  font-size: 0.95rem;
}
.stat-link {
  color: inherit;
  text-decoration: none;
}
.stat-link:hover, .stat-link:focus-visible {
  text-decoration: underline;
  color: var(--uh-accent);
}
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--uh-radius-sm);
  background: var(--uh-button-bg);
  color: var(--uh-fg-highlight);
}
.badge-own {
  background: var(--uh-accented-bg);
  color: var(--uh-accent);
}
.btn-follow, .btn-follow-gate, .btn-dm, .btn-dm-gate {
  min-height: 44px;
  min-width: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.profile-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.sheet-header h3 {
  margin: 0;
  font-size: 1.15rem;
}
.btn-close-sheet {
  min-width: 44px;
  min-height: 44px;
  font-size: 1.5rem;
  line-height: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--uh-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dm-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.dm-form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.dm-form-actions .btn {
  min-height: 44px;
  min-width: 80px;
}
.follows-page-header {
  margin-bottom: 1rem;
}
.follows-page-header h1 {
  font-size: 1.3rem;
  margin: 0;
  color: var(--uh-fg-highlight);
}
.follow-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--uh-panel);
  border: none;
  border-radius: var(--uh-radius);
}
.follow-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 0.5px solid var(--uh-divider);
}
.follow-item:last-child {
  border-bottom: none;
}
.follow-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--uh-button-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.follow-info {
  display: flex;
  flex-direction: column;
}
.follow-name {
  font-weight: 700;
  color: var(--uh-fg-highlight);
  text-decoration: none;
}
.follow-name:hover {
  text-decoration: underline;
  color: var(--uh-accent);
}
/* Follows management cards (D066) — v3 panel 化 */
.profile-manages-card {
  background: var(--uh-panel);
  border: none;
  border-radius: var(--uh-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.profile-manages-section {
  margin-bottom: 1.25rem;
}
.profile-manages-section:last-child {
  margin-bottom: 0;
}
.profile-manages-section h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: var(--uh-fg-highlight);
}
.manage-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: var(--uh-radius-sm);
  background: var(--uh-panel);
}
.manage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 0.5px solid var(--uh-divider);
  gap: 1rem;
}
.manage-item:last-child {
  border-bottom: none;
}
.manage-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: var(--uh-fg-highlight);
}
.circle-ref {
  font-size: 0.85rem;
}
.manage-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.btn-unfollow-board, .btn-unfollow-topic, .btn-follow-board, .btn-follow-topic {
  min-height: 44px;
  min-width: 80px;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.state-sm {
  padding: 1rem;
}
.state-sm p {
  margin: 0;
}
.badge-warn {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}
.badge-muted {
  background: var(--uh-button-bg);
  color: var(--uh-fg);
}
.manage-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.manage-header-row h2 {
  margin: 0;
}
.manage-add-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.manage-add-bar select {
  min-height: 44px;
  padding: 0 0.75rem;
  border: none;
  border-radius: var(--uh-radius-sm);
  background: var(--uh-button-bg);
  color: var(--uh-fg-highlight);
  font: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}
.manage-add-bar select:disabled {
  opacity: 0.6;
}
.manage-add-bar button {
  min-height: 44px;
  min-width: 80px;
  padding: 0 0.75rem;
  box-sizing: border-box;
}
.manage-tag-pool {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.25rem 0;
}
.pool-label {
  font-size: 0.85rem;
}
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.chips-empty {
  font-size: 0.85rem;
}
.chip-btn {
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: var(--uh-radius-pill);
  border: 0.5px solid var(--uh-divider);
  background: var(--uh-panel);
  color: var(--uh-fg-highlight);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: background 0.1s ease, color 0.1s ease;
}
.chip-btn:hover:not(:disabled) {
  color: var(--uh-accent);
  background: var(--uh-accented-bg);
}
.chip-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.chip-btn.is-followed {
  background: var(--uh-accented-bg);
  color: var(--uh-accent);
}
.manage-add-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.manage-add-form input {
  min-height: 44px;
  padding: 0 0.75rem;
  border: none;
  border-radius: var(--uh-radius-sm);
  background: var(--uh-button-bg);
  color: var(--uh-fg-highlight);
  font: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}
.manage-add-form button {
  min-height: 44px;
  min-width: 80px;
  padding: 0 0.75rem;
  box-sizing: border-box;
}
.manage-pagination {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}
.manage-more, .notif-more {
  min-height: 44px;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
}
.header-logout {
  min-height: 44px;
  min-width: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.state-error {
  padding: 2rem;
  text-align: center;
  background: var(--uh-panel);
  border-radius: var(--uh-radius);
}
.state-error h2 {
  margin-top: 0;
  color: var(--status-danger);
}
.follow-meta {
  font-size: 0.85rem;
}

/* ============================================================
   Own-profile notifications card（GET /api/v1/me/notifications）
   ============================================================ */
.notif-card {
  background: var(--uh-panel);
  border: none;
  border-radius: var(--uh-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.notif-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}
.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: var(--uh-radius-sm);
  background: var(--uh-panel);
}
.notif-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  border-bottom: 0.5px solid var(--uh-divider);
}
.notif-item:last-child { border-bottom: none; }
.notif-icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background: var(--uh-button-bg);
}
.notif-item.is-unread .notif-icon { background: var(--uh-accented-bg); }
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-size: 0.92rem; color: var(--uh-fg-highlight); }
.notif-item.is-unread .notif-title { font-weight: 700; }
.notif-time { font-size: 0.8rem; color: var(--uh-fg); opacity: 0.7; }
.notif-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--uh-accent);
  margin-top: 0.5rem;
}
.notif-dot[hidden] { display: none; }
.notif-error {
  padding: 1rem;
  text-align: center;
}
.notif-more {
  min-height: 44px;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
}

/* ============================================================
   Personal access token card (C4 POST /tokens, session-only)
   ============================================================ */
.token-card {
  background: var(--uh-panel);
  border: none;
  border-radius: var(--uh-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.token-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--uh-fg-highlight);
}
.token-card .muted {
  font-size: 0.85rem;
}
.token-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.token-form label {
  font-weight: 500;
  color: var(--uh-fg-highlight);
}
.token-form input[type="text"],
.token-form input[type="datetime-local"] {
  min-height: 44px;
  padding: 0 0.75rem;
  border: none;
  border-radius: var(--uh-radius-sm);
  background: var(--uh-button-bg);
  color: var(--uh-fg-highlight);
  font: inherit;
  box-sizing: border-box;
  width: 100%;
}
.token-scopes {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
.token-scope {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  font-size: 0.9rem;
}
.token-result {
  margin-top: 0.9rem;
  border: 1px solid #f59e0b;
  background: #fffbeb;
  border-radius: var(--uh-radius-sm);
  padding: 0.9rem 1rem;
}
.token-list-empty {
  padding: 0.5rem 0;
}
.token-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 0.5px solid var(--uh-divider);
  margin-top: 0.25rem;
}

/* ============================================================
   Auth pages (login / login_totp)
   ============================================================ */
.auth-page-main {
  max-width: 440px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--uh-panel);
  border-radius: var(--uh-radius);
}
.auth-page-main h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--uh-fg-highlight);
}
.auth-error-banner {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: var(--status-danger);
  background-color: var(--status-danger-bg);
  border-radius: var(--uh-radius-sm);
  font-size: 0.875rem;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.auth-form label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--uh-fg-highlight);
}
.auth-form .form-control {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--uh-radius-sm);
  background: var(--uh-button-bg);
  color: var(--uh-fg-highlight);
  font-size: 1rem;
  font: inherit;
  box-sizing: border-box;
}
.auth-form .form-control:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--uh-focus);
}
.auth-form .form-control.totp-code {
  letter-spacing: 0.1em;
  text-align: center;
}
.auth-form .form-actions { margin-top: 0.5rem; }
.auth-form .form-actions .btn { width: 100%; }
.auth-hint {
  font-size: 0.875rem;
  color: var(--uh-fg);
  opacity: 0.8;
  margin: 0 0 1.5rem;
  text-align: center;
}
.auth-form .form-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--uh-fg);
  opacity: 0.7;
  font-size: 0.875rem;
  margin: 0.5rem 0;
}
.auth-form .form-divider span {
  padding: 0 0.5rem;
}
.auth-form .form-divider::before,
.auth-form .form-divider::after {
  content: "";
  flex: 1;
  border-bottom: 0.5px solid var(--uh-divider);
}

/* ============================================================
   S5: Plugin Visible Fault UX (AC-V3-11)
   ============================================================ */
.plugin-fallback-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--uh-button-bg);
  border: 2px dashed var(--uh-divider);
  border-radius: var(--uh-radius-sm);
  margin: 0.5rem 0;
  color: var(--uh-fg);
  font-size: 0.875rem;
}
.plugin-fallback-card .fallback-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex: none;
}
.plugin-fallback-card .fallback-content {
  flex: 1;
  min-width: 0;
}
.plugin-fallback-card .fallback-title {
  font-weight: 600;
  color: var(--uh-fg-highlight);
  margin-bottom: 2px;
}
.plugin-fallback-card .fallback-desc {
  color: var(--uh-fg);
  opacity: 0.8;
  font-size: 0.8rem;
}
.plugin-fallback-card .fallback-admin-debug {
  display: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--uh-love);
  margin-top: 4px;
}
body.is-admin .plugin-fallback-card .fallback-admin-debug {
  display: block;
}

/* ============================================================
   S5: Theme Switch Component
   ============================================================ */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--uh-button-bg);
  padding: 3px;
  border-radius: var(--uh-radius-pill);
  border: none;
}
.btn-theme {
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.75rem;
  border-radius: var(--uh-radius-pill);
  border: none;
  background: transparent;
  color: var(--uh-fg);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s ease, color 0.1s ease;
  box-sizing: border-box;
}
.btn-theme:hover {
  color: var(--uh-fg-highlight);
}
.btn-theme.active {
  background: var(--uh-accented-bg);
  color: var(--uh-accent);
  font-weight: 700;
}

/* ============================================================
   S5: Settings Drawer (Sheet) · AC-V3-11
   ============================================================ */
.settings-sheet {
  max-width: 480px;
  margin: 0 auto;
}
.settings-drawer-body {
  padding: 1rem 0.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.settings-group-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--uh-fg);
}

/* ============================================================
   S8: Offline Banner (AC-V3-15)
   ============================================================ */
.offline-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--status-warning-bg);
  color: var(--status-warning);
  border-bottom: 2px solid #f59e0b;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
}
.offline-banner[hidden] {
  display: none;
}

/* ============================================================
   S8: i18n Language Switch Component (AC-V3-15)
   ============================================================ */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--uh-button-bg);
  padding: 3px;
  border-radius: var(--uh-radius-pill);
  border: none;
}
.btn-lang {
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.75rem;
  border-radius: var(--uh-radius-pill);
  border: none;
  background: transparent;
  color: var(--uh-fg);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s ease, color 0.1s ease;
  box-sizing: border-box;
}
.btn-lang:hover {
  color: var(--uh-fg-highlight);
}
.btn-lang.active {
  background: var(--uh-accented-bg);
  color: var(--uh-accent);
  font-weight: 700;
}

/* ============================================================
   S8: Standalone Offline Page (offline.html)
   ============================================================ */
.page-offline .offline-main {
  max-width: 500px;
  margin: 4rem auto;
  padding: 1.5rem;
  text-align: center;
}
.offline-card {
  background: var(--uh-panel);
  border: none;
  border-radius: var(--uh-radius);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.offline-icon {
  font-size: 3rem;
  line-height: 1;
}
.offline-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--uh-fg-highlight);
  margin: 0;
}
.offline-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  max-width: 380px;
}
.offline-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================================
   S8A: i18n Fluid Width & Touch Target Protection (AC-V3-15)
   Visible buttons, .btn, a.btn, and .icon-btn enforce elastic width
   (width: auto, min-width: 44px, min-height: 44px) to prevent English text overflow.
   ============================================================ */
button,
.btn,
.icon-btn,
a.btn,
a.icon-btn,
.btn-theme,
.btn-lang,
.tab-item,
.nav-link {
  width: auto;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
}
/* Misskey 减法版豁免：note 操作键/反应胶囊/nav item 视觉 34-52px，
   由各自 ::after 上扩热区（.btn-action::after/.feed-tabs .tab::after）
   或键位排布保证 ≥44px 命中，不参与本 44px 弹性宽度规则。 */
.btn-action,
.rx,
.nav-item,
.nf-item {
  min-width: 0;
  min-height: 0;
}

/* ============================================================
   prefers-reduced-motion（Misskey 源码降级形态 + QA 锁定的
   五选择器 0.01ms 逐条保留）
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .feed-body-container {
    transition-duration: 0.01ms !important;
  }
  .composer-title-input-box {
    transition-duration: 0.01ms !important;
  }
  .btn-action {
    transition-duration: 0.01ms !important;
  }
  .btn-action.btn-action-like.is-liked .like-icon {
    animation-duration: 0.01ms !important;
  }
  .feed-card {
    transition-duration: 0.01ms !important;
  }
  .feed-card:hover {
    transform: none;
  }
  .btn {
    transition-duration: 0.01ms !important;
  }
  .btn:hover, .btn:active {
    transform: none;
  }
  .feed-tabs .tab,
  .feed-more,
  .feed-avatar,
  .card-article .article-cover,
  .feed-card-header:hover .feed-avatar,
  .feed-card:hover .article-cover {
    transition-duration: 0.01ms !important;
    transform: none !important;
  }
  .btn-action.btn-action-like.is-liked .like-icon,
  .state .state-icon,
  .skeleton-box {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transform: none !important;
  }
  .toast-pill {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .rx-effect,
  .click-anime,
  .rx.reacted .like-icon,
  .sheet,
  body {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transform: none !important;
  }
  .sheet {
    transform: none !important;
  }
}

/* Profile page keeps a stable two-column grid (UIUX P2-03; test lock) */
.page-profile .shell-body { grid-template-columns: 220px minmax(0, 1fr); }
@media (max-width: 900px) {
  .page-profile .shell-body { grid-template-columns: 1fr; }
}
