/* 全站主题变量：深色模式默认值，页面颜色、间距和侧边栏宽度都从这里取。 */
:root {
  color-scheme: dark light;
  --header-height: 72px;
  --sidebar-width: clamp(128px, 16vw, 240px);
  --sidebar-gap: clamp(16px, 2vw, 32px);
  --bg: #0e1116;
  --surface: #171b22;
  --surface-strong: #202630;
  --text: #edeff3;
  --muted: #9aa4b2;
  --line: #2d3540;
  --accent: #d7b56d;
  --button-text: #101318;
  --focus: #7dd3c7;
  --active-bg: rgba(215, 181, 109, .16);
  --active-text: #f3d58b;
  --glow: #7dd3c7;
  --glow-soft: rgba(125, 211, 199, .18);
  --glass: rgba(14, 17, 22, .82);
  --character-image: url("/assets/img_mutsumi_2.png");
  --character-opacity: .43;
}

/* 浅色模式变量：切换主题时只替换变量，组件样式不用重复写两套。 */
:root[data-theme="light"] {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-strong: #eef1f4;
  --text: #20242a;
  --muted: #6b7280;
  --line: #d8dde3;
  --accent: #8d6f2e;
  --button-text: #ffffff;
  --focus: #2f9c91;
  --active-bg: rgba(141, 111, 46, .12);
  --active-text: #6f551f;
  --glow: #2f9c91;
  --glow-soft: rgba(47, 156, 145, .14);
  --glass: rgba(246, 247, 248, .82);
  --character-image: url("/assets/img_mutsumi_1.png");
  --character-opacity: .38;
}

* { box-sizing: border-box; }

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

[hidden] {
  display: none !important;
}

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

/* 页面基础布局：顶部栏固定后，body 预留 header 高度。 */
body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--header-height);
  overflow-x: hidden;
  font-family: "Noto Serif SC", "Noto Serif JP", "Microsoft YaHei", serif;
  color: var(--text);
  transition: color .48s ease, background-color .48s ease;
  background: var(--bg);
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
}

body::before {
  inset: auto clamp(-42px, 4vw, 44px) clamp(28px, 8vh, 96px) auto;
  z-index: 0;
  width: min(48vw, 430px);
  aspect-ratio: 494 / 650;
  opacity: .06;
  background: center / contain no-repeat url('/assets/white.png');
  filter: drop-shadow(0 22px 52px rgba(0, 0, 0, .3));
}

body::after {
  display: none;
}

:root[data-theme="light"] body::before {
  background-image: url('/assets/black.png');
  opacity: .045;
  filter: none;
}

.character-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.character-backdrop-image {
  position: absolute;
  left: clamp(6px, 1.6vw, 24px);
  bottom: -118px;
  width: min(24vw, 330px);
  aspect-ratio: 760 / 1032;
  opacity: var(--character-opacity);
  background-image: var(--character-image);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: contain;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .34));
  transition: opacity .42s ease, filter .42s ease;
}

.character-live2d {
  position: absolute;
  left: clamp(0px, 1vw, 20px);
  bottom: -128px;
  width: min(26vw, 360px);
  aspect-ratio: 760 / 1032;
  opacity: 0;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .34));
  transition: opacity .42s ease, filter .42s ease;
}

.character-live2d-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.character-backdrop[data-live2d="ready"] .character-backdrop-image {
  opacity: 0;
}

.character-backdrop[data-live2d="ready"] .character-live2d,
.character-backdrop[data-live2d="switching"] .character-live2d {
  opacity: 1;
}

.character-backdrop[data-live2d="switching"] .character-backdrop-image {
  opacity: 0;
}

.character-backdrop[data-live2d="failed"] .character-backdrop-image,
.character-backdrop[data-live2d="loading"] .character-backdrop-image {
  opacity: var(--character-opacity);
}

.character-backdrop[data-live2d="disabled"] {
  display: none;
}

.character-backdrop-image.is-entering-dark {
  animation: characterEnterUp 1.05s cubic-bezier(.16, 1, .3, 1) both;
}

.character-backdrop-image.is-entering-light {
  animation: characterEnterRight 1.05s cubic-bezier(.16, 1, .3, 1) both;
}

.character-backdrop[data-live2d="ready"] .character-live2d.is-entering-dark {
  animation: live2dEnterUp 1.05s cubic-bezier(.16, 1, .3, 1) both;
}

.character-backdrop[data-live2d="ready"] .character-live2d.is-entering-light {
  animation: live2dEnterRight 1.05s cubic-bezier(.16, 1, .3, 1) both;
}

/* 顶部导航栏：负责品牌、登录入口和移动端顶部视觉。 */
.site-header,
.page-shell,
.compose-fab {
  position: relative;
}

.page-shell {
  z-index: 1;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.site-header {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: var(--glass);
  backdrop-filter: blur(18px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  box-shadow: 0 12px 42px rgba(0, 0, 0, .12);
}

.site-header-inner,
.page-shell {
  width: calc(100% - 32px);
  max-width: 1080px;
  margin: 0 auto;
}

.site-header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.brand strong {
  font-size: 2rem;
  white-space: nowrap;
  text-shadow: 0 0 18px var(--glow-soft);
  transition: text-shadow .22s ease, transform .22s ease;
}

.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: .02em;
}

.brand-mu {
  width: .98em;
  height: .98em;
  display: inline-block;
  margin: 0 .02em;
  background: center / contain no-repeat url('/assets/white-logo.png');
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .7));
}

:root[data-theme="light"] .brand-mu {
  background-image: url('/assets/black-logo.png');
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .14));
}

.brand .brand-domain {
  color: #fff;
  font-weight: 800;
  text-shadow: 0 0 1px rgba(255, 255, 255, .5);
}

:root[data-theme="light"] .brand .brand-domain {
  color: #111;
  text-shadow: none;
}

.brand:hover strong {
  text-shadow: 0 0 24px color-mix(in srgb, var(--glow) 34%, transparent);
  transform: translateY(-1px);
}

.app-boot-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--glow) 12%, transparent), transparent 34%),
    var(--bg);
  color: var(--text);
  transition: opacity .32s ease, visibility .32s ease;
}

.app-boot-screen.is-hiding {
  opacity: 0;
  visibility: hidden;
}

.app-boot-mark {
  display: grid;
  justify-items: center;
  gap: 18px;
  transform: translateY(-8px);
}

.app-boot-logo {
  width: min(42vw, 240px);
  height: min(42vw, 240px);
  background: center / contain no-repeat url('/assets/white.png');
  filter: drop-shadow(0 18px 42px rgba(0, 0, 0, .34));
  display: grid;
  place-items: center;
  animation: bootPulse 1.5s ease-in-out infinite;
}

:root[data-theme="light"] .app-boot-logo {
  background-image: url('/assets/black.png');
}

.app-boot-line {
  width: 108px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 72%, transparent);
}

.app-boot-line::before {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--glow));
  content: "";
  animation: bootLine 1.15s cubic-bezier(.65, 0, .35, 1) infinite;
}

@keyframes bootPulse {
  0%, 100% { transform: scale(1); opacity: .84; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes bootLine {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}

.brand span,
.hint,
.count,
.status {
  color: var(--muted);
}

.hint,
.status {
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.top-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.top-nav a,
.ghost-button,
.submit-button,
.icon-button,
.theme-toggle {
  min-height: 40px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color .18s ease, color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.top-nav a,
.ghost-button {
  border: 1px solid var(--line);
  padding: 0 14px;
  color: var(--text);
  background: transparent;
}

#login-link {
  width: 46px;
  height: 46px;
  min-height: 46px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: center / contain no-repeat url('/assets/dark_mine.png');
  box-shadow: none;
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

:root[data-theme="light"] #login-link {
  background-image: url('/assets/light_mine.png');
}

.user-menu {
  position: relative;
}

.guest-menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-nav .guest-avatar-link {
  width: 46px;
  height: 46px;
  min-height: 46px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
}

.guest-avatar-icon {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 50%;
  background: center / contain no-repeat url('/assets/dark_mine.png');
}

:root[data-theme="light"] .guest-avatar-icon {
  background-image: url('/assets/light_mine.png');
}

.top-nav .guest-avatar-link:hover,
.top-nav .guest-avatar-link:focus-visible {
  box-shadow: 0 0 0 3px var(--glow-soft);
  outline: 0;
}

.user-menu-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.user-menu-button:hover,
.user-menu-button:focus-visible {
  border-color: var(--glow);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow-soft);
  transform: translateY(-1px);
  outline: 0;
}

.user-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 8;
  width: min(240px, calc(100vw - 32px));
  border: 1px solid color-mix(in srgb, var(--line) 72%, var(--glow));
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .28), 0 0 28px var(--glow-soft);
}

.user-popover-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.user-popover-icon {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.user-popover-icon:hover,
.user-popover-icon:focus-visible {
  color: var(--accent);
  background: var(--glow-soft);
  outline: 0;
}

.user-popover[hidden] {
  display: none;
}

.user-popover strong,
.user-popover span {
  overflow-wrap: anywhere;
}

.user-popover span {
  color: var(--muted);
  font-size: 1.3rem;
}

.logout-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.logout-button:hover,
.logout-button:focus-visible {
  border-color: var(--glow);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow-soft);
  outline: 0;
}

.icon-button,
.theme-toggle {
  width: 40px;
  min-width: 40px;
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  font-size: 24px;
  line-height: 1;
}

.theme-toggle[data-theme-toggle] {
  font-size: 0;
}

.theme-toggle[data-theme-toggle]::before {
  content: "";
  width: 28px;
  height: 28px;
  display: block;
  background: url("/assets/darkmode.png") center / contain no-repeat;
}

:root[data-theme="light"] .theme-toggle[data-theme-toggle]::before {
  background-image: url("/assets/lightmode.png");
}

.icon-button:hover,
.icon-button:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible,
.top-nav a:hover,
.top-nav a:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: var(--glow);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow-soft);
  transform: translateY(-1px);
  outline: 0;
}

.page-shell {
  padding: 34px 0 56px;
  display: grid;
  gap: 24px;
  align-items: start;
  animation: pageEnter .42s ease both;
}

.two-column { grid-template-columns: minmax(0, 390px) minmax(0, 1fr); }
.single-column { max-width: 560px; }

.auth-route {
  width: min(100%, 560px);
  justify-self: center;
}

.register-shell {
  padding: 18px 0 24px;
}

.register-panel {
  padding: 16px;
}

.register-panel .section-title {
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.register-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 70%, var(--bg));
}

.register-progress span {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 1.05rem;
  line-height: 1.2;
  text-align: center;
  padding: 7px 4px;
}

.register-progress span:last-child {
  border-right: 0;
}

.register-progress b {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: .9rem;
  line-height: 1;
  font-weight: 700;
}

.register-progress em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.register-progress span.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.register-progress span.is-complete {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.register-progress span.is-complete b,
.register-progress span.is-active b {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--button-text);
}

.register-step[hidden] {
  display: none !important;
}

.register-panel .field {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 9px;
}

.register-panel .field.register-gap-after {
  margin-bottom: 14px;
}

.register-panel .field label {
  font-size: 1.18rem;
}

.register-panel .field input {
  height: 36px;
  padding: 0 10px;
}

.register-code-row {
  display: grid;
  grid-template-columns: minmax(86px, 110px) minmax(86px, 110px);
  gap: 8px;
  min-width: 0;
}

.register-code-row .ghost-button {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  white-space: nowrap;
}

.register-panel .hint {
  grid-column: 2;
  margin: -2px 0 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.register-panel .turnstile-field {
  margin: 8px 0 10px;
  min-height: 60px;
}

.register-panel .form-footer {
  gap: 8px;
  margin-top: 8px;
}

.register-step-actions {
  justify-content: flex-end;
}

.register-panel .ghost-button,
.register-panel .submit-button {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
}

.register-panel .status {
  min-height: 18px;
  margin-top: 8px;
  font-size: 1.15rem;
  line-height: 1.4;
}

/* 设置页布局：左侧为设置二级导航，右侧为具体设置面板。 */
.settings-shell {
  position: relative;
  max-width: 920px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.forum-layout > .settings-shell {
  width: min(100%, 920px);
  justify-self: center;
}

.settings-tabs {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
  padding-top: 66px;
}

.settings-tab {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 1.3rem;
}

.settings-tab:hover,
.settings-tab:focus-visible,
.settings-tab.is-active {
  color: var(--text);
  border-color: var(--glow);
  background: var(--glow-soft);
  outline: 0;
}

.settings-panel {
  min-width: 0;
}

.route-back-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 0;
  background: transparent url('/assets/darkback.png') center / 22px 22px no-repeat;
  cursor: pointer;
  transition: transform .16s ease, opacity .16s ease;
}

:root[data-theme="light"] .route-back-button {
  background-image: url('/assets/lightback.png');
}

.route-back-button:hover,
.route-back-button:focus-visible {
  opacity: .78;
  transform: translateX(-2px) scale(1.06);
  outline: 0;
}

.auth-route {
  position: relative;
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 12px;
}

.panel-title-row .section-title {
  min-width: 0;
  margin: 0;
}

.panel-title-row .route-back-button {
  margin-left: -4px;
}

.settings-section[hidden] {
  display: none !important;
}
.feed-column { max-width: 840px; }
.forum-layout {
  width: calc(100% - 48px);
  max-width: 1560px;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding-left: calc(var(--sidebar-width) + var(--sidebar-gap));
  padding-right: clamp(0px, calc(100vw - 1180px), calc(var(--sidebar-width) + var(--sidebar-gap)));
}

.home-layout {
  max-width: 1120px;
  padding-left: 0;
  padding-right: 0;
}

.home-layout .forum-sidebar {
  display: none;
}


.admin-check {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.admin-check input {
  width: 16px;
  height: 16px;
}

.panel,
/* 帖子卡片基础样式：首页、搜索、个人主页都会复用这一套卡片。 */
.post-card,
.empty-state,
.list-item {
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.panel { padding: 20px; }

.section-title {
  margin: 0 0 16px;
  font-size: 2rem;
  line-height: 1.3;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field.is-hidden,
.login-only-email.is-hidden {
  display: none !important;
}

.turnstile-field {
  margin: 12px 0 14px;
  min-height: 65px;
}

.turnstile-field.is-hidden {
  display: none !important;
}

.field label {
  color: var(--muted);
  font-size: 1.3rem;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--bg);
  outline: 0;
}

.field input {
  height: 42px;
  padding: 0 12px;
}

.field textarea {
  min-height: 170px;
  resize: vertical;
  padding: 12px;
  line-height: 1.75;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--glow);
  box-shadow: 0 0 0 3px var(--glow-soft), 0 0 20px color-mix(in srgb, var(--glow) 12%, transparent);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.login-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.login-mode-toggle {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 20px;
}

.submit-button {
  min-width: 112px;
  border: 1px solid var(--accent);
  color: var(--button-text);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 72%, var(--glow)));
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.submit-button:disabled,
.ghost-button:disabled,
.icon-button:disabled,
.theme-toggle:disabled {
  opacity: .58;
  cursor: not-allowed;
}

.status {
  min-height: 22px;
  margin-top: 14px;
  font-size: 1.3rem;
}

.status.is-error { color: #ffb7b7; }

:root[data-theme="light"] .status.is-error { color: #9b1c1c; }

.site-update-screen {
  z-index: 120;
}

.site-update-text {
  color: var(--muted);
  font-size: .95rem;
  letter-spacing: 0;
}

.site-update-screen button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: none;
  font-size: .92rem;
  white-space: nowrap;
}

.site-update-screen button:hover,
.site-update-screen button:focus-visible {
  border-color: var(--accent);
  outline: 0;
}

.notification-toast {
  position: fixed;
  right: 18px;
  bottom: 82px;
  z-index: 88;
  width: min(340px, calc(100vw - 28px));
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 94%, var(--bg));
  box-shadow: 0 16px 36px rgba(0, 0, 0, .24);
  text-align: left;
  transform: translateY(12px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.notification-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.notification-toast strong {
  color: var(--accent);
  font-size: .9rem;
}

.notification-toast span {
  color: var(--text);
  font-size: .95rem;
  line-height: 1.35;
}

.notification-toast:hover,
.notification-toast:focus-visible {
  border-color: var(--accent);
  outline: 0;
}

.posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.posts-header h1 {
  margin: 0;
  font-size: 2.4rem;
}

.forum-sidebar {
  position: fixed;
  top: calc(var(--header-height) + 24px);
  left: max(24px, calc((100vw - 1560px) / 2));
  z-index: 3;
  width: var(--sidebar-width, 240px);
  max-height: calc(100vh - var(--header-height) - 48px);
  height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 16px 0;
  border-right: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
}

/* 侧边栏底部：更多菜单、版权信息和运营方链接。 */
.side-nav-footer {
  margin: auto 0 0;
  padding: 0 clamp(10px, 1vw, 14px) 0 14px;
  display: grid;
  gap: 8px;
  position: relative;
}

.side-nav-more {
  position: relative;
  width: fit-content;
}

.side-nav-more summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.4;
  user-select: none;
}

.side-nav-more summary::-webkit-details-marker {
  display: none;
}

.side-nav-more summary:hover,
.side-nav-more summary:focus-visible {
  color: var(--text);
  outline: 0;
}

.side-nav-more-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 4;
  min-width: 136px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 90%, rgba(255, 255, 255, .12));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, #05070a);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
}

:root[data-theme="light"] .side-nav-more-menu {
  border-color: color-mix(in srgb, var(--line) 78%, #ffffff);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 44px rgba(31, 41, 55, .20), inset 0 1px 0 rgba(255, 255, 255, .85);
}

.side-nav-more-menu a,
.side-nav-more-menu button {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: .88rem;
  text-align: left;
  cursor: pointer;
}

.side-nav-more-menu a:hover,
.side-nav-more-menu a:focus-visible,
.side-nav-more-menu button:hover,
.side-nav-more-menu button:focus-visible {
  background: color-mix(in srgb, var(--surface) 72%, var(--glow-soft));
  outline: 0;
}

.side-nav-copyright {
  margin: 0;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  font-size: .74rem;
  line-height: 1.4;
}

.side-nav-credit {
  margin: -4px 0 0;
  color: color-mix(in srgb, var(--muted) 66%, transparent);
  font-size: .68rem;
  line-height: 1.4;
}

.side-nav-credit a {
  color: inherit;
  text-decoration: none;
}

.side-nav-credit a:hover,
.side-nav-credit a:focus-visible {
  color: var(--text);
  outline: 0;
}

.site-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .42);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.site-modal-panel {
  width: min(420px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--line) 88%, rgba(255, 255, 255, .12));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, #05070a);
  box-shadow: 0 24px 72px rgba(0, 0, 0, .44);
}

:root[data-theme="light"] .site-modal-panel {
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 24px 72px rgba(31, 41, 55, .20);
}

.site-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px 10px;
}

.site-modal-header h2 {
  margin: 0;
  font-size: 1.12rem;
}

.site-modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  cursor: pointer;
}

.site-modal-close:hover,
.site-modal-close:focus-visible {
  color: var(--text);
  background: var(--surface-strong);
  outline: 0;
}

.site-modal-body {
  padding: 0 16px 16px;
}

.live2d-picker {
  display: grid;
  gap: 16px;
}

.live2d-picker-section h3 {
  margin: 0 0 10px;
  font-size: .98rem;
}

.live2d-outfit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.live2d-outfit-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--text);
  cursor: pointer;
}

.live2d-outfit-button:hover,
.live2d-outfit-button:focus-visible,
.live2d-outfit-button.is-active {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  background: var(--active-bg);
  color: var(--active-text);
  outline: 0;
}

/*
.donate-code {
  display: block;
  width: min(280px, 100%);
  margin: 4px auto 12px;
  border-radius: 8px;
}

.donate-hint {
  text-align: center;
}
*/

.live2d-page {
  width: min(100%, 1080px);
}

.live2d-page-head {
  margin-bottom: 14px;
}

.live2d-showcase {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(220px, 280px);
  gap: 18px;
  min-height: min(680px, calc(100vh - var(--header-height) - 96px));
  padding: 16px;
}

.live2d-stage {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 78%, color-mix(in srgb, var(--glow-soft) 74%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface-strong) 58%, transparent);
}

.live2d-stage-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
}

.live2d-stage-status {
  position: absolute;
  inset: auto 16px 16px;
  margin: 0;
  text-align: center;
}

.live2d-controls {
  display: grid;
  align-content: start;
  gap: 16px;
}

.live2d-source-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.live2d-source-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.live2d-source-tab.is-active,
.live2d-source-tab:hover,
.live2d-source-tab:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  background: var(--active-bg);
  color: var(--active-text);
  outline: 0;
}

.live2d-r2-loader {
  display: grid;
  gap: 8px;
}

.live2d-r2-loader label,
.live2d-inspector-section h3 {
  color: var(--text);
  font-size: .92rem;
  font-weight: 800;
}

.live2d-r2-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.live2d-r2-row input,
.live2d-control-row select,
.live2d-param-row input[type="number"] {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.live2d-r2-row input {
  padding: 0 10px;
}

.live2d-model-list,
.live2d-inspector {
  display: grid;
  gap: 16px;
}

.live2d-inspector-section {
  display: grid;
  gap: 8px;
}

.live2d-inspector-section h3 {
  margin: 0;
}

.live2d-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.live2d-control-row select {
  padding: 0 10px;
}

.live2d-parameter-panel {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.live2d-param-row {
  display: grid;
  grid-template-columns: auto minmax(96px, 1fr) minmax(120px, 1.4fr) 64px;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: .82rem;
}

.live2d-param-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live2d-param-row input[type="range"] {
  width: 100%;
}

.live2d-param-row input[type="number"] {
  height: 30px;
  padding: 0 6px;
}

/* 侧边栏主导航：保持所有页面使用同一套入口和高亮逻辑。 */
.side-nav-group {
  display: grid;
  gap: 8px;
  padding-right: clamp(8px, 1vw, 14px);
}

.side-nav-label {
  margin: 0 0 2px;
  padding: 0 14px;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: 0;
}

.side-nav-item {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(10px, 1vw, 14px);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  position: relative;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

@media (min-width: 781px) {
  .forum-sidebar .side-nav-item {
    animation: sideNavItemEnter .42s cubic-bezier(.2, .8, .2, 1) both;
    animation-delay: calc(var(--side-nav-enter-index, 0) * 42ms);
  }
}

@keyframes sideNavItemEnter {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .forum-sidebar .side-nav-item {
    animation: none !important;
  }
}

.side-nav-item span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-nav-item:hover,
.side-nav-item:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 74%, var(--glow-soft));
  outline: 0;
  transform: translateX(2px);
}

.side-nav-item.is-active {
  color: var(--active-text);
  background: linear-gradient(90deg, var(--active-bg), color-mix(in srgb, var(--active-bg) 80%, var(--glow)));
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--glow), 0 0 22px var(--glow-soft);
}

.side-subnav {
  display: grid;
  gap: 6px;
  padding-left: 28px;
}

.side-nav-subitem {
  min-height: 32px;
  padding: 0 12px;
  font-size: .92rem;
}

/* 侧边栏图标：图标由 CSS 背景图控制，深浅模式只切换图片资源。 */
.side-nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  justify-content: center;
  color: currentColor;
  font-size: 14px;
  flex: 0 0 20px;
  background: center / contain no-repeat;
}

.side-nav-icon-all { background-image: url('/assets/dark_all.png'); }
.side-nav-icon-mine { background-image: url('/assets/dark_mine.png'); }
.side-nav-icon-notifications { background-image: url('/assets/dark_notifications.png'); }
.side-nav-icon-resources { background-image: url('/assets/dark_resources.png'); }
.side-nav-icon-star { background-image: url('/assets/dark_star.png'); }
.side-nav-icon-messages { background-image: url('/assets/dark_chat.png'); }
.side-nav-icon-search { background-image: url('/assets/dark_search.png'); }
.side-nav-icon-settings { background-image: url('/assets/darkmodesettings.png'); }

[data-theme="light"] .side-nav-icon-all { background-image: url('/assets/light_all.png'); }
[data-theme="light"] .side-nav-icon-mine { background-image: url('/assets/light_mine.png'); }
[data-theme="light"] .side-nav-icon-notifications { background-image: url('/assets/light_notifications.png'); }
[data-theme="light"] .side-nav-icon-resources { background-image: url('/assets/light_resources.png'); }
[data-theme="light"] .side-nav-icon-star { background-image: url('/assets/light_star.png'); }
[data-theme="light"] .side-nav-icon-messages { background-image: url('/assets/light_chat.png'); }
[data-theme="light"] .side-nav-icon-search { background-image: url('/assets/light_search.png'); }
[data-theme="light"] .side-nav-icon-settings { background-image: url('/assets/lightmodesettings.png'); }

.forum-feed {
  min-width: 0;
}

.forum-feed:has(#posts) {
  width: 100%;
  max-width: 780px;
  justify-self: center;
}

.post-card {
  contain: layout paint;
}

.post-card,
.comment-item,
.list-item {
  content-visibility: auto;
  contain-intrinsic-size: auto 140px;
}



.forum-toolbar {
  min-height: 42px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 10px;
}

.posts,
.list {
  display: grid;
  gap: 14px;
}

.post-card,
.empty-state,
.list-item {
  padding: 18px;
}

.forum-feed .posts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
  border-top: 0;
}

.forum-feed .posts.is-notification-list {
  grid-template-columns: minmax(0, 1fr);
}

.feed-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.post-page-state {
  grid-column: 1 / -1;
}

.forum-feed .post-card {
  width: 100%;
  display: grid;
  margin-bottom: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 18%, transparent);
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .035);
  background: color-mix(in srgb, var(--surface) 50%, transparent);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  padding: 12px;
  position: relative;
  cursor: pointer;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.forum-feed .post-card:hover {
  background: color-mix(in srgb, var(--surface-strong) 60%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow) 36%, transparent), 0 0 24px var(--glow-soft);
  transform: translateY(-1px);
}

.post-skeleton {
  min-height: 132px;
  cursor: default;
  pointer-events: none;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
}

.skeleton-avatar,
.skeleton-main i,
.skeleton-main b,
.skeleton-main span,
.skeleton-main em {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--surface-strong) 54%, transparent),
    color-mix(in srgb, var(--surface-strong) 78%, white 8%),
    color-mix(in srgb, var(--surface-strong) 54%, transparent));
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-main {
  display: grid;
  gap: 9px;
  align-content: start;
}

.skeleton-main i {
  width: 34%;
  height: 13px;
}

.skeleton-main b {
  width: 52%;
  height: 18px;
}

.skeleton-main span {
  width: 86%;
  height: 34px;
}

.skeleton-main em {
  width: 28%;
  height: 14px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@keyframes postTextEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

:root[data-theme="light"] .forum-feed .post-card {
  border-color: color-mix(in srgb, var(--line) 62%, transparent);
  background: rgba(255, 255, 255, .58);
}

:root[data-theme="light"] .forum-feed .post-card:hover {
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow) 26%, transparent), 0 12px 30px rgba(0, 0, 0, .08);
}

.post-row {
  display: grid;
  gap: 0;
}

.comment-row {
  display: grid;
  gap: 6px;
}

.comment-post-link {
  color: var(--accent);
  font-weight: 700;
}

.comment-row-actions {
  display: flex;
  justify-content: flex-end;
}

.delete-comment-button {
  color: #ffb7b7;
}

.post-meta {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.3rem;
}

.post-author {
  color: var(--accent);
  font-size: 1.18rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.account-id-text {
  margin-left: 6px;
  color: var(--muted);
  font-size: .9em;
  font-weight: 500;
}

.is-vip .username-text {
  color: #f6c453;
  text-shadow: 0 0 10px rgba(246, 196, 83, .18);
}

.is-admin-name .username-text {
  color: #ff4d4d;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: .68em;
  font-weight: 700;
  line-height: 1.15;
  vertical-align: middle;
}

.post-stats {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 1rem;
  white-space: nowrap;
}

.post-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.feed-like-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}

.feed-like-button:hover,
.feed-like-button:focus-visible {
  color: var(--text);
  background: transparent;
  box-shadow: none;
  outline: 0;
}

.feed-like-button:disabled {
  cursor: wait;
  opacity: .65;
}

.feed-like-button.is-liked .stat-like {
  background-image: url("/assets/liked.png");
}

.stat-label {
  color: var(--muted);
  font-size: .92em;
  font-weight: 500;
}

.stat-icon {
  position: relative;
  width: 12px;
  height: 12px;
  display: inline-block;
  color: currentColor;
  flex: 0 0 12px;
  background: center / contain no-repeat;
}

.stat-icon::before,
.stat-icon::after {
  content: none !important;
}

.stat-like { background-image: url("/assets/darklike.png"); }
.stat-comment { background-image: url("/assets/darkcomments.png"); }
.stat-watch { background-image: none; }

:root[data-theme="light"] .stat-like { background-image: url("/assets/lightlike.png"); }
:root[data-theme="light"] .stat-comment { background-image: url("/assets/lightcomments.png"); }
:root[data-theme="light"] .stat-watch { background-image: none; }

.feed-like-button.is-liked .stat-like,
:root[data-theme="light"] .feed-like-button.is-liked .stat-like {
  background-image: url("/assets/liked.png");
}

.stat-watch::before {
  content: "" !important;
  position: absolute;
  left: 1px;
  top: 3px;
  width: 14px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 999px / 70%;
}

.stat-watch::after {
  content: "" !important;
  position: absolute;
  left: 6px;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.stat-like::before {
  content: "♡";
  position: absolute;
  inset: -2px 0 0;
  font-size: 13px;
  line-height: 12px;
}

.stat-comment::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 10px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.stat-comment::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: skew(-25deg);
}

.stat-icon::before,
.stat-icon::after {
  content: none !important;
}

.stat-watch::before {
  content: "" !important;
  position: absolute;
  left: 1px;
  top: 3px;
  width: 14px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 999px / 70%;
}

.stat-watch::after {
  content: "" !important;
  position: absolute;
  left: 6px;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.post-title {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  transition: color .18s ease, transform .18s ease;
}

.post-card:hover .post-title {
  color: color-mix(in srgb, var(--text) 82%, var(--glow));
  transform: translateY(-1px);
}

.post-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.post-content {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1.35rem;
}

.forum-feed .post-content {
  color: var(--text);
}

.detail-shell {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 18px;
  align-items: start;
}

.detail-shell .post-detail {
  min-width: 0;
}

.detail-shell .comment-panel {
  position: sticky;
  top: 94px;
  min-width: 0;
}

.post-detail,
.comment-item {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--line) 86%, var(--glow));
  background: color-mix(in srgb, var(--surface) 54%, transparent);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .16), 0 0 24px color-mix(in srgb, var(--glow-soft) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, .04);
  padding: 14px;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 38px;
  margin: -2px 92px 10px 0;
}

.detail-back-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 0;
  background: transparent url('/assets/darkback.png') center / 22px 22px no-repeat;
  cursor: pointer;
  transition: transform .16s ease, opacity .16s ease;
}

:root[data-theme="light"] .detail-back-button {
  background-image: url('/assets/lightback.png');
}

.detail-back-button:hover,
.detail-back-button:focus-visible {
  opacity: .78;
  transform: translateX(-2px) scale(1.06);
  outline: 0;
}

.detail-title {
  margin: 0;
  color: var(--text);
  font-size: 1.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-author-meta {
  align-items: flex-start;
  gap: 10px;
  margin-top: -2px;
  cursor: pointer;
}

.detail-author-link {
  min-width: 0;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.detail-author-link * {
  cursor: pointer;
}

.detail-author-link:hover .post-author,
.detail-author-link:focus-visible .post-author {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-author-link:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
  border-radius: 8px;
}

.detail-author-identity {
  display: grid;
  gap: 3px;
  padding-top: 1px;
}

.detail-author-identity .post-stats {
  font-size: .95rem;
}

.detail-tools {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  position: absolute;
  top: 10px;
  right: 10px;
}

.back-link,
.delete-post-button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.delete-post-button {
  padding: 0 12px;
  color: #ffb7b7;
}

.report-post-button {
  border: 0;
  min-width: 42px;
  padding: 0;
  color: var(--muted);
}

.back-link:hover,
.back-link:focus-visible,
.delete-post-button:hover,
.delete-post-button:focus-visible {
  border-color: var(--accent);
  outline: 0;
}

.detail-content {
  margin-top: 10px;
}

.published-time {
  color: var(--muted);
  font-size: 1.12rem;
}

.detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.detail-footer .like-button {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.like-button[hidden] {
  display: none;
}

.like-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}

.like-button:hover,
.like-button:focus-visible {
  background: transparent;
  border-color: transparent;
  outline: 0;
}

.like-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.like-button-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  background: center / contain no-repeat url("/assets/darklike.png");
}

:root[data-theme="light"] .like-button-icon {
  background-image: url("/assets/lightlike.png");
}

.like-button.is-liked .like-button-icon {
  background-image: url("/assets/liked.png");
}

.like-button-count {
  min-width: 1ch;
  font-size: 1.05rem;
  color: var(--text);
}

.comment-panel {
  display: grid;
  gap: 10px;
}

.comment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.comment-toolbar .section-title {
  margin: 0;
}

.comment-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.comments {
  display: grid;
  gap: 8px;
}

.comment-item {
  box-shadow: none;
  padding: 10px;
}

.comment-item .post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-item.is-reply {
  margin-left: 28px;
  border-left-width: 3px;
}

.reply-button {
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 1.25rem;
}

.comment-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
}

.comment-time {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.25;
}

.comment-item-actions .delete-comment-button {
  margin-left: auto;
}

.reply-button:hover,
.reply-button:focus-visible {
  color: var(--accent);
  outline: 0;
}

.reply-target {
  margin: 4px 0 6px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 1.25rem;
}

.comment-form {
  display: grid;
  gap: 0;
}

.comment-form[hidden] {
  display: none;
}

.post-image,
.preview img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
  background: var(--surface-strong);
}

.compose-image-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.compose-image-preview[hidden] {
  display: none;
}

.compose-image-preview img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: none;
  object-fit: cover;
  margin-top: 0;
}

.compose-image-card {
  position: relative;
  min-width: 0;
  cursor: grab;
  user-select: none;
}

.compose-image-card:active {
  cursor: grabbing;
}

.compose-image-card.is-dragging {
  opacity: .45;
}

.compose-image-card.is-drag-over {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.compose-image-card img {
  display: block;
  pointer-events: none;
}

.compose-image-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, .68);
  box-shadow: none;
  font-size: 1.15rem;
  line-height: 1;
}

.compose-image-remove:hover,
.compose-image-remove:focus-visible {
  background: rgba(0, 0, 0, .86);
  outline: 0;
}

.image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.image-picker {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  background: var(--bg);
  cursor: pointer;
  overflow-wrap: anywhere;
}

.image-picker:hover,
.image-picker:focus-within {
  border-color: var(--accent);
  color: var(--text);
}

.clear-image-button {
  justify-self: start;
  margin-top: 10px;
}

.clear-image-button[hidden] {
  display: none;
}

.compose-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  width: 58px;
  height: 58px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--button-text);
  background: var(--accent);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .22), 0 0 28px var(--glow-soft);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.compose-fab:hover,
.compose-fab:focus-visible {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .28), 0 0 34px color-mix(in srgb, var(--glow) 34%, transparent);
  outline: 0;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

@keyframes pageEnter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes backgroundDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-36px, 28px, 0); }
}

@keyframes characterEnterUp {
  from {
    opacity: 0;
    transform: translate3d(0, 72px, 0);
    filter: drop-shadow(0 30px 58px rgba(0, 0, 0, .4)) blur(1px);
  }
  to {
    opacity: var(--character-opacity);
    transform: translate3d(0, 0, 0);
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .34)) blur(0);
  }
}

@keyframes characterEnterRight {
  from {
    opacity: 0;
    transform: translate3d(-72px, 0, 0);
    filter: drop-shadow(0 30px 58px rgba(0, 0, 0, .32)) blur(1px);
  }
  to {
    opacity: var(--character-opacity);
    transform: translate3d(0, 0, 0);
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .34)) blur(0);
  }
}

@keyframes live2dEnterUp {
  from {
    opacity: 0;
    transform: translate3d(0, 72px, 0);
    filter: drop-shadow(0 30px 58px rgba(0, 0, 0, .4)) blur(1px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .34)) blur(0);
  }
}

@keyframes live2dEnterRight {
  from {
    opacity: 0;
    transform: translate3d(-72px, 0, 0);
    filter: drop-shadow(0 30px 58px rgba(0, 0, 0, .32)) blur(1px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .34)) blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

.list-item {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.list-item strong { color: var(--accent); }

.inline-edit {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-edit input,
.inline-edit select {
  flex: 1 1 180px;
}



.auth-extra {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.toolbar-search,
.toolbar-select,
.field select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--text);
  padding: 0 10px;
}

.toolbar-search {
  flex: 1 1 180px;
  min-width: 0;
}

.search-page {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: min(620px, calc(100vh - var(--header-height) - 32px));
}

.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.search-panel .toolbar-search {
  flex: 1 1 auto;
}

.search-panel .submit-button {
  width: auto;
  min-width: 82px;
}

.search-results {
  grid-template-columns: minmax(0, 1fr);
}

.search-results[hidden] {
  display: none;
}

/* 首页功能入口：论坛、档案馆、资源区的卡片式入口。 */
.home-page,
.archive-page {
  width: 100%;
  display: grid;
  gap: 18px;
  align-content: start;
}

.home-hero,
.archive-head {
  min-height: 210px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, var(--glow));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 72%, transparent), color-mix(in srgb, var(--panel) 76%, transparent)),
    var(--character-image) right -38px bottom -130px / auto 300px no-repeat;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.home-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0;
}

.home-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: 3rem;
  line-height: 1;
}

.home-copy {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.7;
}

.home-entry-grid,
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-entry {
  min-height: 148px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, var(--glow));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  color: var(--text);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}

.home-entry:hover,
.home-entry:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 72%, var(--glow-soft));
  outline: 0;
}

.home-entry-icon {
  width: 30px;
  height: 30px;
}

.home-entry strong,
.archive-card h2,
.archive-profile h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.35rem;
}

.home-entry em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.archive-card,
.archive-profile {
  padding: 20px;
}

.archive-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.archive-profile {
  grid-column: span 3;
}

.archive-profile p,
.archive-profile dd {
  color: var(--muted);
  line-height: 1.7;
}

.archive-profile dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 16px;
  margin: 14px 0 0;
}

.archive-profile dt {
  color: var(--accent);
  font-weight: 700;
}

.archive-profile dd {
  margin: 0;
}

.legal-page {
  width: min(100%, 860px);
  display: grid;
  gap: 16px;
  align-content: start;
  max-width: 860px;
  justify-self: center;
}

.legal-panel {
  padding: 22px;
}

.legal-panel p {
  margin: 0 0 14px;
  color: var(--text);
  line-height: 1.75;
}

.legal-panel p:last-child {
  margin-bottom: 0;
}

.toolbar-select {
  flex: 0 0 92px;
}

.avatar {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--panel) 70%, var(--accent));
  color: var(--accent);
  font-weight: 700;
}

.avatar img,
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  width: 24px;
  height: 24px;
  font-size: 1.1rem;
}

.avatar-nav {
  width: 46px;
  height: 46px;
  font-size: 1.4rem;
}



.avatar-post {
  width: 58px;
  height: 58px;
  font-size: 1.6rem;
}

.avatar-popover {
  width: 88px;
  height: 88px;
  font-size: 2.4rem;
}

.avatar-profile {
  width: 112px;
  height: 112px;
  border: 4px solid color-mix(in srgb, var(--panel) 94%, #000);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
  font-size: 2.6rem;
}

.post-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0;
}

.post-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 4px 7px;
}

.nav-badge {
  min-width: 18px;
  min-height: 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  margin-left: auto;
}

.notification-row {
  padding: 10px 0;
}

.notification-row.is-unread {
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

.notification-more-button {
  justify-self: center;
  margin: 6px auto 0;
}

/* 个人资料编辑：头像、背景图和个人信息设置区域。 */
.profile-settings {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.profile-cover-settings {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.profile-cover-preview {
  min-height: 150px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 68%, var(--bg)), color-mix(in srgb, var(--panel) 80%, var(--bg)));
  background-position: center;
  background-size: cover;
  cursor: pointer;
  font-weight: 700;
}

.profile-cover-preview:hover,
.profile-cover-preview:focus-visible {
  border-color: var(--glow);
  box-shadow: 0 0 0 3px var(--glow-soft);
  outline: 0;
}

.avatar-preview {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 700;
}

.avatar-picker-preview {
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.avatar-picker-preview:hover,
.avatar-picker-preview:focus-visible {
  border-color: var(--glow);
  box-shadow: 0 0 0 3px var(--glow-soft);
  transform: translateY(-1px);
  outline: 0;
}

.avatar-detail-author {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
}

.avatar-comment {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.post-settings-wrap {
  position: relative;
}

.post-settings-button {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  background: url("/assets/darkmodesettings.png") center / 24px 24px no-repeat;
}

:root[data-theme="light"] .post-settings-button {
  background-image: url("/assets/lightmodesettings.png");
}

.post-settings-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 132px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.comment-form-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.comment-form-inline textarea {
  min-height: 38px;
  height: 38px;
  resize: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  padding: 10px 12px;
  outline: 0;
  transition: height .18s ease, min-height .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.comment-form-inline.is-expanded textarea {
  min-height: 240px;
  height: min(42vh, 330px);
  resize: vertical;
  overflow: auto;
}

.comment-form-inline textarea:focus {
  border-color: var(--glow);
  box-shadow: 0 0 0 3px var(--glow-soft);
}

.comment-form-inline .form-footer {
  display: none;
}

.comment-form-inline .count,
.comment-form-inline .submit-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity .18s ease, transform .18s ease;
}

.comment-form-inline.is-expanded .form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.comment-form-inline.is-expanded .count,
.comment-form-inline.is-expanded .submit-button {
  display: inline-flex;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* 个人主页：资料卡片、返回按钮、用户帖子/评论列表。 */
.profile-shell {
  position: relative;
  width: 100%;
  max-width: 620px;
  justify-self: center;
  margin-inline: auto;
  display: grid;
  gap: 8px;
}

.profile-shell > .route-back-button {
  position: absolute;
  top: 4px;
  left: 10px;
  z-index: 5;
  background-color: color-mix(in srgb, var(--panel) 86%, transparent);
}

.profile-page {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 308px;
  padding: 198px 20px 18px;
  border-top: 1px solid color-mix(in srgb, var(--line) 92%, var(--text));
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.profile-page::before {
  position: absolute;
  inset: 42px 0 auto;
  z-index: 0;
  content: "";
  height: 150px;
  border-top: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--surface-strong) 72%, var(--bg)) 0%, color-mix(in srgb, var(--surface) 84%, var(--panel)) 100%);
  background-position: center;
  background-size: cover;
  pointer-events: none;
}

.profile-page.has-profile-cover::before {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .02)),
    var(--profile-cover-image);
  background-position: center;
  background-size: cover;
}

.profile-page::after {
  display: none;
  content: none;
}

.profile-page.has-profile-cover::after {
  display: none;
}

.profile-skeleton {
  min-height: 308px;
  padding: 0;
}

.profile-skeleton::before,
.profile-skeleton::after {
  display: none;
}

.profile-skeleton-cover,
.profile-skeleton-avatar,
.profile-skeleton-body i,
.profile-skeleton-body b,
.profile-skeleton-body span {
  background: linear-gradient(90deg, color-mix(in srgb, var(--surface) 70%, transparent), color-mix(in srgb, var(--surface-strong) 86%, transparent), color-mix(in srgb, var(--surface) 70%, transparent));
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.35s ease-in-out infinite;
}

.profile-skeleton-cover {
  height: 150px;
  margin-top: 42px;
}

.profile-skeleton-avatar {
  width: 116px;
  height: 116px;
  margin: -58px 0 0 20px;
  border: 4px solid color-mix(in srgb, var(--panel) 86%, transparent);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.profile-skeleton-body {
  display: grid;
  gap: 10px;
  padding: 18px 20px 22px;
}

.profile-skeleton-body i,
.profile-skeleton-body b,
.profile-skeleton-body span {
  display: block;
  border-radius: 999px;
}

.profile-skeleton-body i {
  width: 160px;
  height: 24px;
}

.profile-skeleton-body b {
  width: 92px;
  height: 16px;
}

.profile-skeleton-body span {
  width: 240px;
  max-width: 70%;
  height: 16px;
}

.profile-head {
  position: relative;
  z-index: 2;
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.profile-avatar-stack {
  position: relative;
  width: max-content;
  margin-top: -50px;
  display: grid;
  justify-items: center;
  align-self: start;
}

.profile-avatar-stack .level-badge {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  margin-top: 0;
  min-width: 46px;
  justify-content: center;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
}

.profile-info {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-self: start;
  padding: 0 128px 0 0;
}

.profile-name {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.profile-id-line,
.profile-joined-line,
.profile-bio {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.profile-joined-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .92rem;
}

.profile-edit-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, var(--text));
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  font-weight: 800;
  text-decoration: none;
  opacity: 1;
}

.profile-edit-link:hover,
.profile-edit-link:focus-visible {
  background: color-mix(in srgb, var(--surface-strong) 74%, transparent);
  outline: 0;
}

:root[data-theme="light"] .profile-edit-link {
  background: color-mix(in srgb, #fff 82%, transparent);
}

.profile-actions {
  position: absolute;
  top: 2px;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

.profile-chat-link {
  min-height: 36px;
  min-width: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, var(--text));
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  font-weight: 800;
  text-decoration: none;
}

.profile-chat-link:hover,
.profile-chat-link:focus-visible {
  background: color-mix(in srgb, var(--surface-strong) 74%, transparent);
  outline: 0;
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 0;
  overflow: visible;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.profile-tab {
  min-height: 46px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  position: relative;
}

.profile-tab:last-child {
  border-right: 0;
}

.profile-tab:hover,
.profile-tab:focus-visible,
.profile-tab.is-active {
  color: var(--text);
  background: transparent;
  outline: 0;
}

.profile-tab.is-active::after {
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: -1px;
  height: 4px;
  border-radius: 999px;
  content: "";
  background: var(--glow);
}

@media (max-width: 560px) {
  .profile-page {
    min-height: 286px;
    padding: 176px 16px 16px;
  }

  .profile-shell > .route-back-button {
    top: 5px;
    left: 10px;
  }

  .profile-page::before {
    height: 132px;
  }

  .profile-skeleton {
    min-height: 292px;
    padding: 0;
  }

  .profile-skeleton-cover {
    height: 116px;
    margin: 42px 16px 0;
    border-radius: 0;
  }

  .profile-skeleton-avatar {
    width: 86px;
    height: 86px;
    margin: -43px 0 0 32px;
  }

  .profile-skeleton-body {
    gap: 8px;
    padding: 14px 28px 18px;
  }

  .profile-skeleton-body i {
    width: 148px;
    height: 20px;
  }

  .profile-skeleton-body b,
  .profile-skeleton-body span {
    height: 14px;
  }

  .profile-page::after {
    right: 4px;
    width: 132px;
    height: 132px;
    background-size: auto 178px;
  }

  .profile-avatar-stack {
    margin-top: -44px;
  }

  .avatar-profile {
    width: 96px;
    height: 96px;
  }

  .profile-info {
    padding-right: 0;
  }

  .profile-actions {
    top: 0;
  }

  .profile-edit-link,
  .profile-chat-link {
    min-height: 32px;
    padding: 0 12px;
    font-size: .88rem;
  }
}

.profile-comment-card {
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.profile-comment-title {
  color: var(--text);
  overflow-wrap: anywhere;
}



.top-nav .user-menu-button {
  width: 46px;
  height: 46px;
  min-height: 46px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
}

.top-nav .user-menu-button:hover,
.top-nav .user-menu-button:focus-visible {
  box-shadow: 0 0 0 3px var(--glow-soft);
}

.user-popover {
  width: min(360px, calc(100vw - 24px));
  min-height: 210px;
  border-radius: 10px;
  padding: 18px 18px 14px;
  gap: 12px;
}

.user-popover-profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding-right: 32px;
  border-radius: 8px;
  cursor: default;
}

.user-popover-identity {
  display: grid;
  gap: 4px;
}

.user-popover-identity strong {
  color: var(--text);
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-popover-identity span {
  color: var(--text);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  letter-spacing: 0;
  white-space: nowrap;
}

.user-popover-actions {
  position: static;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 2px;
}

.user-popover-action {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  min-height: 34px;
}

.popover-action-icon {
  color: var(--text);
  width: 28px;
  height: 28px;
  display: inline-block;
  position: relative;
  line-height: 1;
  flex: 0 0 28px;
}

.popover-action-label {
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1;
  white-space: nowrap;
}

.icon-home::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  width: 18px;
  height: 14px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}

.icon-home::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  border-radius: 2px 0 0;
}

.icon-theme::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: url("/assets/darkmode.png") center / contain no-repeat;
}

.icon-theme::after {
  content: none;
}

:root[data-theme="light"] .icon-theme::before {
  background-image: url("/assets/lightmode.png");
}

.icon-settings::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: url("/assets/darkmodesettings.png") center / contain no-repeat;
}

.icon-settings::after {
  content: none;
}

:root[data-theme="light"] .icon-settings::before {
  background-image: url("/assets/lightmodesettings.png");
}

.user-popover-action span:last-child {
  color: var(--text);
  font-size: 1.45rem;
}

.logout-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  min-height: 34px;
  border: 0;
  font-size: 2.25rem;
  line-height: 1;
}

.forum-feed .post-row {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 12px;
}

.post-row-avatar {
  display: grid;
  place-items: start center;
  align-content: start;
  gap: 6px;
  position: relative;
}

.forum-feed .avatar-post {
  width: 42px;
  height: 42px;
  font-size: 1.15rem;
}

.profile-posts .post-row {
  grid-template-columns: minmax(0, 1fr);
  padding-left: 14px;
}

.profile-posts .post-author {
  font-size: .98rem;
  line-height: 1.05;
}

.profile-posts .level-badge {
  font-size: .72rem;
  padding: 1px 4px;
}

.profile-posts .post-row-avatar {
  display: none;
}

.post-row-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.forum-feed .post-meta {
  display: flex;
  align-items: baseline;
  flex-direction: row;
  gap: 6px;
  margin: 0;
  min-width: 0;
  white-space: nowrap;
}

.forum-feed .post-author {
  color: var(--text);
  font-size: .92rem;
  line-height: 1.05;
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-relative-time {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1;
  white-space: nowrap;
}

.post-ip-location {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1;
  white-space: nowrap;
}

.forum-feed .post-relative-time::before {
  content: "·";
  margin-right: 6px;
}

.forum-feed .post-ip-location::before {
  content: "·";
  margin-right: 6px;
}

.detail-footer .post-ip-location {
  font-size: 1rem;
}

.post-time-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1;
  white-space: nowrap;
}

.post-view-count {
  color: var(--muted);
}

.forum-feed .post-title {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.22;
}

.forum-feed .post-excerpt {
  color: var(--text);
  font-size: .95rem;
  line-height: 1.45;
}

.forum-feed .post-row:not(.post-skeleton) .post-meta,
.forum-feed .post-row:not(.post-skeleton) .post-title,
.forum-feed .post-row:not(.post-skeleton) .post-excerpt,
.forum-feed .post-row:not(.post-skeleton) .post-row-footer {
  animation: postTextEnter .34s cubic-bezier(.2, .8, .2, 1) both;
}

.forum-feed .post-row:not(.post-skeleton) .post-title {
  animation-delay: .035s;
}

.forum-feed .post-row:not(.post-skeleton) .post-excerpt {
  animation-delay: .07s;
}

.forum-feed .post-row:not(.post-skeleton) .post-row-footer {
  animation-delay: .105s;
}

.post-row-images,
.post-image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 456px);
}

.post-row-images.image-count-1,
.post-image-grid.image-count-1 {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 320px);
}

.post-row-images.image-count-2,
.post-image-grid.image-count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 304px);
}

.post-row-images.image-count-4,
.post-image-grid.image-count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 304px);
}

.post-grid-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-strong) 82%, var(--bg));
}

.image-count-1 .post-grid-image {
  aspect-ratio: auto;
  max-height: 360px;
  object-fit: contain;
}

.post-row-images.image-count-1 .post-grid-image.is-portrait-image {
  aspect-ratio: 1 / 1;
  max-height: none;
  object-fit: cover;
}

.post-grid-image.is-previewable {
  cursor: zoom-in;
}

.post-grid-image.is-previewable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 48px;
  background: rgba(0, 0, 0, .86);
}

.image-viewer-image {
  max-width: min(96vw, 1280px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .45);
}

.image-viewer-close,
.image-viewer-nav {
  position: fixed;
  border: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, .38);
  box-shadow: none;
}

.image-viewer-close {
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 6px;
  font-size: 2rem;
  line-height: 1;
}

.image-viewer-nav {
  top: 50%;
  width: 44px;
  height: 72px;
  min-height: 72px;
  padding: 0;
  border-radius: 6px;
  transform: translateY(-50%);
  font-size: 3rem;
  line-height: 1;
}

.image-viewer-prev {
  left: 18px;
}

.image-viewer-next {
  right: 18px;
}

.image-viewer-close:hover,
.image-viewer-close:focus-visible,
.image-viewer-nav:hover,
.image-viewer-nav:focus-visible {
  background: rgba(0, 0, 0, .68);
  outline: 0;
}

.image-viewer-counter {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .42);
  font-size: .9rem;
}

.post-row-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 6px;
  grid-column: 1 / -1;
  min-width: 0;
}

.post-row-avatar .post-badges {
  justify-content: center;
  gap: 4px;
  margin: 0;
  max-width: 52px;
}

.post-row-avatar .post-badge {
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 4px;
  font-size: .64rem;
  padding: 2px 4px;
}

.post-row-footer .post-stats {
  align-items: center;
  justify-content: flex-start;
  width: auto;
  gap: 8px;
  font-size: .95rem;
}

.post-row-footer .stat-icon {
  width: 22px;
  height: 18px;
  flex-basis: 22px;
}

.post-row-footer .stat-like::before {
  font-size: 22px;
  line-height: 18px;
}

.post-row-footer .stat-comment::before {
  width: 18px;
  height: 14px;
}

.post-row-footer .stat-comment::after {
  left: 7px;
  top: 14px;
}

@media (min-width: 781px) and (max-width: 1120px) {
  .detail-shell {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
  }

  .detail-shell .comment-panel {
    position: static;
    top: auto;
  }
}

/* 移动端布局：隐藏桌面侧边栏，改用底部栏和单列内容。 */
@media (max-width: 780px) {
  :root {
    --header-height: 54px;
  }

  .site-header-inner,
  .page-shell {
    width: calc(100% - 24px);
  }

  .site-header-inner {
    min-height: 54px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 6px 0;
    gap: 10px;
  }

  .brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
  }
  .brand strong { font-size: 1.7rem; }
  .brand > span { display: none; }
  .top-nav {
    margin-left: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
  }
  .top-nav a,
  .user-menu-button {
    min-height: 34px;
    padding: 0 10px;
  }
  .top-nav .user-menu-button {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }
  #login-link {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }
  .avatar-nav {
    width: 38px;
    height: 38px;
  }
  .top-nav .guest-avatar-link {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }
  .guest-avatar-icon {
    width: 34px;
    height: 34px;
  }
  .theme-toggle { min-height: 34px; width: 34px; min-width: 34px; }
  .two-column { grid-template-columns: 1fr; }
  .comment-form-inline.is-expanded textarea {
    min-height: 300px;
    height: 44vh;
  }
  .settings-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .settings-tabs {
    position: static;
    grid-template-columns: 1fr 1fr;
    padding-top: 0;
  }
  .settings-tab {
    text-align: center;
  }
  .forum-layout {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 18px;
    padding-left: 0;
    padding-right: 0;
  }
  .forum-feed .posts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .forum-feed:has(#posts) {
    max-width: none;
    transform: none;
  }
  .feed-column {
    display: grid;
    gap: 10px;
  }
  .forum-feed .post-card {
    display: grid;
    margin-bottom: 0;
  }
  .home-hero,
  .archive-head {
    min-height: 190px;
    padding: 20px;
    background-position: right -92px bottom -132px;
  }
  .home-hero h1 {
    font-size: 2.4rem;
  }
  .home-entry-grid,
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .home-entry {
    min-height: 124px;
    padding: 14px;
    gap: 8px;
  }
  .home-entry-icon {
    width: 26px;
    height: 26px;
  }
  .home-entry strong {
    font-size: 1.08rem;
  }
  .home-entry em {
    font-size: .86rem;
    line-height: 1.45;
  }
  .archive-profile {
    grid-column: auto;
  }
  .archive-profile dl {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail-header {
    gap: 10px;
    margin-right: 48px;
  }
  .detail-title {
    font-size: 1.42rem;
  }
  body:has(.forum-sidebar) {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
  .forum-sidebar {
    --mobile-nav-active-left: 8px;
    --mobile-nav-active-width: 0px;
    position: fixed;
    top: auto;
    left: 50%;
    right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 13;
    width: min(92vw, 420px);
    height: auto;
    max-height: none;
    overflow: visible;
    display: flex;
    justify-content: center;
    gap: 2px;
    padding: 6px 8px;
    transform: translateX(-50%);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015)),
      rgba(33, 33, 33, .16);
    backdrop-filter: blur(34px) saturate(1.5);
    -webkit-backdrop-filter: blur(34px) saturate(1.5);
    border-right: 0;
    border-bottom: 0;
    border-top: 0;
    border: 1px solid rgba(255, 255, 255, .095);
    border-radius: 999px;
    box-shadow:
      0 16px 46px rgba(0, 0, 0, .16),
      inset 0 1px 0 rgba(255, 255, 255, .14),
      inset 0 -1px 0 rgba(255, 255, 255, .025);
    -webkit-tap-highlight-color: transparent;
  }
  .forum-sidebar::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: var(--mobile-nav-active-left);
    z-index: 0;
    width: var(--mobile-nav-active-width);
    border-radius: 999px;
    background: rgba(0, 0, 0, .30);
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, .28),
      inset 0 1px 0 rgba(255, 255, 255, .12);
    transition: background-color .18s ease, box-shadow .18s ease;
    pointer-events: none;
  }
  :root[data-theme="light"] .forum-sidebar {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .035)),
      rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .34);
    box-shadow:
      0 16px 46px rgba(0, 0, 0, .10),
      inset 0 1px 0 rgba(255, 255, 255, .38),
      inset 0 -1px 0 rgba(255, 255, 255, .08);
  }
  :root[data-theme="light"] .forum-sidebar::before {
    background: rgba(0, 0, 0, .10);
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, .12),
      inset 0 1px 0 rgba(255, 255, 255, .36);
  }
  .side-nav-group {
    display: contents;
  }
  .side-subnav {
    display: none !important;
  }
  .side-nav-label {
    display: none;
  }
  .side-nav-footer {
    display: none;
  }
  .side-nav-search {
    display: none;
  }
  .side-nav-item {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    max-width: 120px;
    flex-direction: column;
    justify-content: center;
    min-height: 44px;
    gap: 2px;
    padding: 3px 2px;
    border-radius: 999px;
    color: #fff;
    font-size: .78rem;
    line-height: 1.1;
    outline: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  :root[data-theme="light"] .side-nav-item {
    color: var(--text);
  }
  .side-nav-item:hover,
  .side-nav-item:focus-visible {
    transform: none;
  }
  .side-nav-item:focus:not(:focus-visible) {
    outline: 0;
  }
  .side-nav-item.is-active {
    color: #fff;
    background: transparent;
    box-shadow: none;
  }
  :root[data-theme="light"] .side-nav-item.is-active {
    color: var(--text);
  }
  .side-nav-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }
  .side-nav-post { order: 1; }
  .side-nav-resources { order: 2; }
  .side-nav-messages { order: 3; }
  .side-nav-mine { order: 4; }
  .side-nav-settings { display: none; }
  .side-nav-archive { display: none; }
  .side-nav-external { display: none; }
  .compose-fab {
    right: 18px;
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
  .character-backdrop {
    display: none;
  }
  .forum-toolbar {
    min-height: 34px;
    margin-bottom: 6px;
  }
  .character-backdrop-image {
    left: -34px;
    bottom: -68px;
    width: min(52vw, 260px);
    opacity: .23;
  }
  .character-live2d {
    left: -42px;
    bottom: -78px;
    width: min(58vw, 290px);
    opacity: 0;
  }
  .live2d-showcase {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 12px;
  }
  .live2d-stage,
  .live2d-stage-canvas {
    min-height: min(62vh, 520px);
  }
  .live2d-outfit-list {
    grid-template-columns: 1fr;
  }
.detail-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .detail-shell .comment-panel {
    position: static;
  }
  .feed-column { max-width: 100%; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .register-shell {
    padding: 4px 0;
    gap: 0;
  }
  .register-panel {
    padding: 12px;
  }
  .register-panel .section-title {
    margin-bottom: 8px;
    font-size: 1.55rem;
    line-height: 1.15;
  }
  .register-progress {
    margin-bottom: 12px;
  }
  .register-progress span {
    font-size: .9rem;
    padding: 6px 2px;
  }
  .register-progress b {
    width: 18px;
    height: 18px;
    font-size: .82rem;
  }
  .register-progress em {
    max-width: 54px;
  }
  .register-panel .field {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 3px 8px;
    margin-bottom: 6px;
  }
  .register-panel .field.register-gap-after {
    margin-bottom: 11px;
  }
  .register-panel .field label {
    font-size: 1.05rem;
  }
  .register-panel .field input {
    height: 32px;
    padding: 0 9px;
  }
  .register-code-row {
    grid-template-columns: minmax(74px, 88px) minmax(74px, 88px);
    gap: 6px;
  }
  .register-code-row .ghost-button {
    height: 32px;
    padding: 0 7px;
    font-size: 1.05rem;
  }
  .register-panel .hint {
    font-size: .92rem;
    line-height: 1.25;
  }
  .register-panel .turnstile-field {
    margin: 6px 0 7px;
    min-height: 56px;
  }
  .register-panel .form-footer {
    align-items: stretch;
    flex-direction: row;
    gap: 8px;
    margin-top: 6px;
  }
  .register-panel .ghost-button,
  .register-panel .submit-button {
    width: auto;
    min-height: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 1.15rem;
  }
  .register-panel .status {
    min-height: 16px;
    margin-top: 6px;
    font-size: 1.02rem;
    line-height: 1.3;
  }
  .login-actions-left { align-items: stretch; }
  .login-actions-left .ghost-button:not(.login-mode-toggle) { flex: 1; }
  .submit-button { width: 100%; }
  .post-meta { display: grid; gap: 6px; }
  .forum-feed .post-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }
  .forum-feed .avatar-post {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  .post-row-images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .post-row-footer {
    gap: 8px;
    flex-wrap: wrap;
  }
  .post-row-footer .post-stats {
    gap: 7px;
    font-size: .95rem;
  }
  .image-viewer {
    padding: 38px 10px;
  }
  .image-viewer-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    min-height: 36px;
  }
  .image-viewer-nav {
    width: 34px;
    height: 58px;
    min-height: 58px;
    font-size: 2.4rem;
  }
  .image-viewer-prev {
    left: 8px;
  }
  .image-viewer-next {
    right: 8px;
  }
  .image-viewer-counter {
    bottom: 10px;
  }
  .user-popover {
    right: -6px;
    width: min(330px, calc(100vw - 24px));
    min-height: 190px;
    padding: 18px 16px 14px;
  }
  .user-popover-profile {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
  }
  .avatar-popover {
    width: 72px;
    height: 72px;
  }
  .comment-toolbar {
    align-items: stretch;
  }
  .comment-actions {
    justify-content: flex-start;
  }
  .compose-fab { right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); }
}
