﻿/* 鍏ㄧ珯涓婚鍙橀噺锛氭繁鑹叉ā寮忛粯璁ゅ€硷紝椤甸潰棰滆壊銆侀棿璺濆拰渚ц竟鏍忓搴﹂兘浠庤繖閲屽彇銆?*/
:root {
  color-scheme: dark light;
  --header-height: 72px;
  --site-max-width: 1080px;
  --site-edge: max(16px, calc((100vw - var(--site-max-width)) / 2));
  --sidebar-width: clamp(128px, 16vw, 240px);
  --sidebar-gap: clamp(16px, 2vw, 32px);
  --bg: #070a12;
  --surface: #101a2b;
  --surface-strong: #1b2940;
  --panel: #0c1322;
  --text: #f2f4ee;
  --muted: #a3aebc;
  --line: #2b3b55;
  --accent: #8fc7ff;
  --accent-2: #62a8ff;
  --saki: #8fc7ff;
  --button-text: #07111f;
  --focus: #8fc7ff;
  --active-bg: rgba(143, 199, 255, .16);
  --active-text: #d7eaff;
  --glow: #62a8ff;
  --glow-soft: rgba(98, 168, 255, .2);
  --glass: rgba(10, 15, 19, .84);
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

/* 娴呰壊妯″紡鍙橀噺锛氬垏鎹富棰樻椂鍙浛鎹㈠彉閲忥紝缁勪欢鏍峰紡涓嶇敤閲嶅鍐欎袱濂椼€?*/
:root[data-theme="light"] {
  --bg: #f3f7f8;
  --surface: #ffffff;
  --surface-strong: #edf5f1;
  --panel: #ffffff;
  --text: #172823;
  --muted: #5d6e6a;
  --line: #dde7ea;
  --accent: #00b84a;
  --accent-2: #13c987;
  --saki: #176dff;
  --button-text: #ffffff;
  --focus: #18d5c6;
  --active-bg: rgba(0, 184, 74, .18);
  --active-text: #087a34;
  --glow: #00b84a;
  --glow-soft: rgba(0, 184, 74, .18);
  --glass: rgba(255, 255, 255, .9);
  --shadow: 0 1px 2px rgba(23, 58, 66, .05), 0 14px 34px rgba(23, 58, 66, .08);
}

* { 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:
    radial-gradient(circle at 68% 8%, rgba(98, 168, 255, .08), transparent 34vw),
    linear-gradient(180deg, #070a12 0%, #04070c 58%, #020304 100%);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at 72% 4%, rgba(23, 109, 255, .05), transparent 30vw),
    radial-gradient(circle at 16% 82%, rgba(0, 184, 74, .045), transparent 32vw),
    linear-gradient(180deg, #f6f9fa 0%, var(--bg) 100%);
}

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: .15;
  background: center / contain no-repeat url('/assets/white.png');
  filter: drop-shadow(0 22px 52px rgba(0, 0, 0, .3)) drop-shadow(0 0 28px rgba(98, 168, 255, .08));
}

body::after {
  background:
    radial-gradient(circle at 58% 28%, rgba(143, 199, 255, .12), transparent 24vw),
    radial-gradient(circle at 42% 74%, rgba(0, 184, 128, .055), transparent 28vw),
    linear-gradient(90deg, transparent 0%, rgba(98, 168, 255, .03) 52%, transparent 100%);
  opacity: .82;
}

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


/* 椤堕儴瀵艰埅鏍忥細璐熻矗鍝佺墝銆佺櫥褰曞叆鍙ｅ拰绉诲姩绔《閮ㄨ瑙夈€?*/
.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 rgba(255, 255, 255, .08);
  background: rgba(5, 8, 10, .94);
  backdrop-filter: blur(18px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .22);
}

:root[data-theme="light"] .site-header {
  border-bottom-color: rgba(0, 0, 0, .08);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .06);
}

/* 顶栏下沿的品牌渐变细线：睦色到祥色的过渡。 */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent-2) 65%, transparent) 32%, color-mix(in srgb, var(--accent) 65%, transparent) 68%, transparent);
  opacity: .55;
}

.site-header-inner,
.page-shell {
  width: calc(100% - 32px);
  max-width: var(--site-max-width);
  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), 0 0 24px color-mix(in srgb, var(--accent) 18%, transparent);
  transition: text-shadow .22s ease, transform .22s ease;
}

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

.brand-logo {
  width: 1.16em;
  height: 1.18em;
  display: inline-flex;
  flex: 0 0 auto;
  background: center / contain no-repeat url('/assets/white-logo.png');
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .5)) drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 20%, transparent));
}

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

.brand .brand-name {
  color: #fff;
  font-weight: 850;
  letter-spacing: 0;
  text-shadow: 0 0 1px rgba(255, 255, 255, .35), 0 0 16px color-mix(in srgb, var(--accent) 12%, transparent);
}

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

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

.site-tagline {
  min-width: 0;
  margin: 0 auto 0 18px;
  color: color-mix(in srgb, var(--muted) 86%, var(--text));
  font-size: .92rem;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .82;
  animation: taglineEnter .36s ease both;
}

@keyframes taglineEnter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: .82;
    transform: translateY(0);
  }
}

.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/white_default_avatar.svg');
  box-shadow: none;
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

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

.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/white_default_avatar.svg');
}

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

.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%, 620px);
  justify-self: start;
}

.register-shell {
  width: min(100%, 620px);
  padding: 18px 0 24px;
}

.auth-panel {
  animation: authPanelEnter .32s cubic-bezier(.2, .8, .2, 1) both;
}

.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 {
  gap: 8px;
  margin-bottom: 14px;
}

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

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

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

.register-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.register-code-row .ghost-button {
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.register-panel .hint {
  margin: -4px 0 0;
  font-size: 1.08rem;
  line-height: 1.45;
}

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

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

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

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

.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;
}

.settings-shell .settings-account {
  display: none;
}

.route-back-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-self: center;
  border: 0;
  border-radius: 0;
  background: transparent url('/assets/darkback.png') 0 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,
.detail-header {
  position: relative;
  display: flex;
  align-items: center;
  height: 42px;
  gap: 0px;
  min-width: 0;
  padding: 0 14px;
}

.panel-title-row {
  margin: -20px -20px 16px;
}

.detail-header {
  margin: -14px -14px 12px;
}

.panel-title-row::before,
.detail-header::before {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  content: "";
  border-top: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
}

.panel-title-row .section-title,
.detail-kicker {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 1.36rem;
  line-height: 1.12;
}

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

.settings-current-title {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  line-height: 1.18;
}

.settings-section[hidden] {
  display: none !important;
}

.logout-confirm-text,
.confirm-modal-text {
  margin: 4px 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.logout-confirm-actions,
.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.forum-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding-left: calc(var(--sidebar-width) + 12px);
  padding-right: 0;
}

.forum-layout > :is(.auth-route, .register-shell, .search-page, .settings-shell, .resource-page, .archive-page, .profile-shell) {
  margin-top: -10px;
}

.forum-layout > .register-shell {
  padding-top: 0;
}

.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) 68%, var(--accent) 10%);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 68%, transparent), color-mix(in srgb, var(--panel) 84%, transparent));
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  border-radius: 14px;
  box-shadow: var(--shadow), inset 0 1px 0 color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, .06));
}

:root[data-theme="light"] .panel,
:root[data-theme="light"] .post-card,
:root[data-theme="light"] .empty-state,
:root[data-theme="light"] .list-item {
  background: var(--surface);
}

:root[data-theme="light"] .post-page-state {
  background: transparent;
}

.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,
.hint.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;
}

.login-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.login-code-row .ghost-button {
  height: 42px;
  min-width: 104px;
  padding: 0 14px;
  white-space: nowrap;
}

.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 {
  min-width: 118px;
  height: 42px;
  padding: 0 14px;
  font-size: 1.18rem;
  white-space: nowrap;
}

.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) 70%, var(--accent-2)));
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18), 0 0 20px color-mix(in srgb, var(--accent) 18%, transparent);
}

.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-loading {
  display: flex;
  align-items: center;
  min-height: 32px;
}

.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: var(--site-edge);
  z-index: 3;
  width: var(--sidebar-width, 240px);
  max-height: calc(100vh - var(--header-height) - 48px);
  height: calc(100vh - var(--header-height) - 48px);
  overflow: visible;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 0 0 16px;
  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;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease, text-shadow .2s ease;
}

.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));
  color: var(--text);
  text-shadow: 0 0 8px color-mix(in srgb, var(--accent) 48%, transparent);
  box-shadow: inset 3px 0 0 var(--accent), inset 0 0 18px color-mix(in srgb, var(--accent-2) 18%, transparent);
  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);
  animation: modalBackdropEnter .18s ease both;
}

.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);
  transform-origin: center;
  animation: modalPanelEnter .22s cubic-bezier(.2, .8, .2, 1) both;
}

: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;
}

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

@keyframes modalPanelEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* 渚ц竟鏍忎富瀵艰埅锛氫繚鎸佹墍鏈夐〉闈娇鐢ㄥ悓涓€濂楀叆鍙ｅ拰楂樹寒閫昏緫銆?*/
.side-nav-group {
  display: grid;
  gap: 8px;
  margin-inline: -4px clamp(2px, .5vw, 8px);
  padding-inline: 0 clamp(8px, 1vw, 14px);
}

.side-nav-label {
  display: none;
  height: 0;
  margin: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.side-nav-item {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  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;
}

.side-nav-item > span:not(.side-nav-icon) {
  font-size: 1.08rem;
}

@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:not(.side-nav-icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-nav-item:hover,
.side-nav-item:focus-visible {
  color: var(--text);
  background: linear-gradient(90deg, color-mix(in srgb, var(--surface) 78%, var(--glow-soft)), color-mix(in srgb, var(--surface) 84%, var(--saki) 8%));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent);
  outline: 0;
  transform: translateX(2px);
}

.side-nav-item.is-active {
  color: var(--active-text);
  background: linear-gradient(90deg, color-mix(in srgb, var(--active-bg) 78%, var(--accent) 22%), color-mix(in srgb, var(--active-bg) 82%, var(--saki) 18%));
  font-weight: 700;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 36%, transparent), 0 4px 16px color-mix(in srgb, var(--accent) 15%, transparent);
}

.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: start;
  margin-top: -12px;
}

.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: 12px;
  border-top: 0;
}

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

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

.post-page-state {
  grid-column: 1 / -1;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 12px;
  font-size: .92rem;
  letter-spacing: .08em;
}

.forum-feed .post-card {
  --post-tilt-x: 0deg;
  --post-tilt-y: 0deg;
  --post-glare-x: 50%;
  --post-glare-y: 50%;
  width: 100%;
  display: grid;
  margin-bottom: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 58%, var(--accent) 12%);
  border-radius: 14px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, .14), inset 0 1px 0 color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, .04));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 78%, transparent), color-mix(in srgb, var(--panel) 86%, rgba(98, 168, 255, .06)));
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  padding: 12px;
  position: relative;
  cursor: pointer;
  transform: perspective(900px) rotateX(var(--post-tilt-x)) rotateY(var(--post-tilt-y)) translateY(0);
  transform-style: preserve-3d;
  transition: background-color .18s ease, box-shadow .18s ease, transform .28s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}

.forum-feed .post-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  background: radial-gradient(circle at var(--post-glare-x) var(--post-glare-y), rgba(255, 255, 255, .075), transparent 34%);
  pointer-events: none;
  transition: opacity .22s ease;
}

.forum-feed .post-card > * {
  position: relative;
  z-index: 1;
}

.forum-feed .post-card:hover {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 72%, transparent), color-mix(in srgb, var(--panel) 70%, var(--saki) 10%));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent), 0 0 16px color-mix(in srgb, var(--glow-soft) 62%, transparent);
  transform: perspective(900px) rotateX(var(--post-tilt-x)) rotateY(var(--post-tilt-y)) translateY(-1px);
}

.forum-feed .post-card:hover::after {
  opacity: .72;
}

.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:
    linear-gradient(135deg, rgba(255, 255, 255, .72), color-mix(in srgb, var(--panel) 84%, var(--accent-2) 6%));
}

:root[data-theme="light"] .forum-feed .post-card:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .86), color-mix(in srgb, var(--panel) 80%, var(--saki) 7%));
  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);
}

.level-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1.5px 6px;
  border: 0;
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent) 58%, var(--text));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  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,
.feed-share-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: #ff7a90;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

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

.feed-like-button.is-liked {
  color: #ff5c77;
}

.feed-like-button:disabled,
.feed-share-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/dark_like.png"); }
.stat-comment { background-image: url("/assets/dark_comments.png"); }
.stat-share { background-image: url("/assets/dark_share_button.png"); }
.stat-watch { background-image: url("/assets/dark_page_views.png"); }

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

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

.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: min(100%, 1018px);
  max-width: 1018px;
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(320px, 380px);
  gap: 18px;
  align-items: start;
  margin-top: -10px;
}

.detail-shell .post-detail {
  min-width: 0;
  width: min(100%, 620px);
}

.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-title {
  margin: 2px 0 10px;
  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;
}

.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/dark_like.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;
  min-width: 58px;
  height: 58px;
  padding: 0 22px 0 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--button-text);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .22), 0 0 28px var(--glow-soft);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.compose-fab-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

.compose-fab-text {
  white-space: nowrap;
}

.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);
  filter: saturate(1.06);
  outline: 0;
}

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

.empty-state.is-loading {
  min-height: 128px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.loader {
  width: 64px;
  height: 64px;
  display: inline-block;
  background: center / contain no-repeat url('/assets/loader-orbit.svg');
}

.loader.loader-sm {
  width: 24px;
  height: 24px;
}

.post-detail:has(> .empty-state.is-loading),
.search-rank-panel:has(.empty-state.is-loading),
.search-rank-panel:has(.search-rank-list:empty) {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.post-detail:has(> .empty-state.is-loading) {
  padding: 0;
}

.search-rank-panel:has(.empty-state.is-loading) .search-rank-head,
.search-rank-panel:has(.search-rank-list:empty) .search-rank-head {
  display: none;
}

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

@keyframes authPanelEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes backgroundDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-36px, 28px, 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;
  }
  .forum-feed .post-card,
  .forum-feed .post-card:hover {
    transform: none !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;
}

.forgot-password-row {
  margin-top: 10px;
}

.auth-text-button {
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.auth-text-button:hover,
.auth-text-button:focus-visible {
  color: var(--text);
  outline: 0;
  text-decoration: underline;
}

.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: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--accent-2));
  border-radius: 999px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 86%, var(--accent-2) 7%), color-mix(in srgb, var(--panel) 90%, var(--saki) 7%));
  box-shadow: var(--shadow);
}

.search-panel > .side-nav-icon-search {
  display: none;
}

.search-panel .toolbar-search {
  flex: 1 1 auto;
  height: 40px;
  min-height: 40px;
  padding-left: 44px;
  border-radius: 999px;
  background-color: color-mix(in srgb, var(--panel) 82%, transparent);
  background-image: url('/assets/dark_search.png');
  background-repeat: no-repeat;
  background-position: 16px center;
  background-size: 20px 20px;
}

[data-theme="light"] .search-panel .toolbar-search {
  background-image: url('/assets/light_search.png');
}

.search-panel .submit-button {
  height: 40px;
  min-height: 40px;
  width: auto;
  min-width: 82px;
  border-radius: 999px;
}

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

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

.search-rank-panel {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

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

.search-rank-head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.search-rank-head span {
  color: var(--muted);
  font-size: .84rem;
}

.search-rank-list {
  display: grid;
  gap: 8px;
}

.search-rank-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.search-rank-item:hover,
.search-rank-item:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--glow-soft) 70%, transparent);
  outline: 0;
}

.search-rank-index {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--button-text);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: .84rem;
  font-weight: 800;
}

.search-rank-main {
  min-width: 0;
}

.search-rank-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted);
  font-size: .82rem;
}

.search-rank-score {
  color: var(--active-text);
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

/* 棣栭〉鍔熻兘鍏ュ彛锛氳鍧涖€佹。妗堥銆佽祫婧愬尯鐨勫崱鐗囧紡鍏ュ彛銆?*/
.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(125deg, color-mix(in srgb, var(--surface) 72%, var(--accent-2) 9%) 0%, color-mix(in srgb, var(--panel) 82%, transparent) 54%, color-mix(in srgb, var(--panel) 80%, var(--saki) 12%) 100%);
  box-shadow: var(--shadow), inset 0 1px 0 color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, .06));
}

.home-kicker {
  margin: 0;
  color: color-mix(in srgb, var(--accent) 82%, var(--accent-2));
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0;
}

.home-hero h1 {
  margin: 0;
  color: color-mix(in srgb, var(--text) 86%, var(--accent));
  font-size: 3rem;
  line-height: 1;
  text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 18%, transparent);
}

.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) 72%, var(--accent) 12%);
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 68%, transparent), color-mix(in srgb, var(--panel) 82%, var(--accent-2) 4%));
  color: var(--text);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .12);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.home-entry:hover,
.home-entry:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 74%, var(--glow-soft)), color-mix(in srgb, var(--panel) 78%, var(--saki) 10%));
  box-shadow: 0 18px 46px rgba(0, 0, 0, .16), 0 0 0 3px 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.is-offline {
  filter: grayscale(1) saturate(.16);
}

.avatar.is-online {
  filter: none;
}

.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 {
  --badge-color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--badge-color) 32%, transparent);
  border-radius: 999px;
  color: color-mix(in srgb, var(--badge-color) 68%, var(--text));
  background: color-mix(in srgb, var(--badge-color) 13%, transparent);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  padding: 4px 7px;
}

/* 标签配色：跟随内容类型，深浅主题都从同一基色混出文字和底色。 */
.post-badge[data-badge="日常"] { --badge-color: #35bd80; }
.post-badge[data-badge="图片"] { --badge-color: #a78bfa; }
.post-badge[data-badge="提问"] { --badge-color: #5aa2ff; }
.post-badge[data-badge="公告"] { --badge-color: #ff8f5a; }
.post-badge[data-badge="精华"] { --badge-color: #eab84c; }
.post-badge[data-badge="置顶"] { --badge-color: #ff7a90; }

.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: 28px;
  min-width: 28px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  background: url("data:image/svg+xml,%3Csvg width='23' height='5' viewBox='0 0 23 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2.5' cy='2.5' r='2.5' fill='white'/%3E%3Ccircle cx='20.5' cy='2.5' r='2.5' fill='white'/%3E%3Ccircle cx='11.5' cy='2.5' r='2.5' fill='white'/%3E%3C/svg%3E") center / 23px 5px no-repeat;
}

:root[data-theme="light"] .post-settings-button {
  background-image: url("data:image/svg+xml,%3Csvg width='23' height='5' viewBox='0 0 23 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2.5' cy='2.5' r='2.5' fill='black'/%3E%3Ccircle cx='20.5' cy='2.5' r='2.5' fill='black'/%3E%3Ccircle cx='11.5' cy='2.5' r='2.5' fill='black'/%3E%3C/svg%3E");
}

.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);
}

.post-settings-menu .report-post-menu-button {
  min-height: 32px;
  color: var(--muted);
  text-align: left;
}

.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: start;
  margin-inline: 0;
  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-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: auto;
  height: 46px;
  min-height: 46px;
  max-width: min(240px, 32vw);
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 999px;
  padding: 0 16px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 4%, transparent);
  backdrop-filter: blur(16px);
}

.top-nav .user-menu-button .avatar-nav {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-color: color-mix(in srgb, var(--line) 90%, transparent);
}

.top-nav .user-menu-button:hover,
.top-nav .user-menu-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--glow-soft), 0 10px 24px rgba(0, 0, 0, .18);
  transform: translateY(-1px);
}

.user-menu-button-identity {
  min-width: 0;
  display: grid;
  gap: 1px;
  text-align: left;
  line-height: 1.05;
}

.user-menu-button-identity strong,
.user-menu-button-identity span {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-button-identity strong {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 800;
}

.user-menu-button-identity span {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 700;
}

.user-popover {
  width: min(360px, calc(100vw - 24px));
  min-height: 210px;
  border-radius: 10px;
  padding: 18px 18px 14px;
  gap: 12px;
  transform-origin: top right;
  will-change: opacity, transform, filter;
}

.user-popover.is-open {
  animation: userPopoverOpen .18s cubic-bezier(.2, .8, .2, 1) both;
}

.user-popover.is-closing {
  animation: userPopoverClose .13s ease both;
}

@keyframes userPopoverOpen {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(-6px) scale(.96);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes userPopoverClose {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-4px) scale(.98);
  }
}

.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.48rem, 2.8vw, 2rem);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-popover-identity span {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  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: 10px;
  align-items: start;
  padding: 14px;
}

.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.06rem;
  font-weight: 800;
  line-height: 1.28;
}

.forum-feed .post-excerpt {
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  font-size: .95rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.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-detail .post-image-grid,
.post-detail .post-image-grid.image-count-1,
.post-detail .post-image-grid.image-count-2,
.post-detail .post-image-grid.image-count-4 {
  width: 100%;
}

.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,
.post-row-images.image-count-1 .post-grid-image.is-portrait-image {
  aspect-ratio: 16 / 10;
  max-height: 240px;
  width: 100%;
  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: 999px;
  font-size: .64rem;
  padding: 2.5px 7px;
}

.post-row-footer .post-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  width: 100%;
  gap: 8px;
  font-size: .95rem;
}

.post-row-footer .post-stats > span,
.post-row-footer .post-stats > button {
  min-width: 0;
  justify-content: flex-start;
}

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

@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: 0;
    right: 0;
    z-index: 1;
    transform: none;
    text-align: center;
  }
  .brand strong {
    width: 100%;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    font-size: 1.7rem;
  }
  .brand-logo {
    grid-column: 1;
    justify-self: start;
  }
  .brand-name {
    grid-column: 2;
    justify-self: center;
  }
  .site-tagline {
    display: none;
  }
  .top-nav {
    margin-left: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
    z-index: 2;
  }
  .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;
    border: 0;
    border-radius: 50%;
    gap: 0;
    background: transparent;
    box-shadow: none;
  }
  .user-menu-button-identity {
    display: none;
  }
  #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-layout > :is(.auth-route, .register-shell, .search-page, .settings-shell, .resource-page, .archive-page, .profile-shell) {
    margin-top: 0;
  }
  .forum-feed .posts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .forum-feed:has(#posts) {
    max-width: none;
    margin-top: 0;
    transform: none;
  }
  .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-title {
    font-size: 1.42rem;
  }
  body:has(.forum-sidebar) {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
  body:has(#messages-shell.is-chat-open) {
    padding-bottom: 0;
  }
  body:has(#messages-shell.is-chat-open) .forum-sidebar {
    display: none;
  }
  .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));
    width: 58px;
    min-width: 58px;
    padding: 0;
    border-radius: 50%;
    gap: 0;
  }
  .compose-fab-text {
    display: none;
  }
  .forum-toolbar {
    min-height: 34px;
    margin-bottom: 6px;
  }
.detail-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .detail-shell .comment-panel {
    position: static;
  }
  .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;
    gap: 4px;
    padding: 6px 3px;
  }
  .register-progress b {
    width: 18px;
    height: 18px;
    font-size: .82rem;
  }
  .register-progress em {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }
  .register-panel .field {
    gap: 8px;
    margin-bottom: 12px;
  }
  .register-panel .field.register-gap-after {
    margin-bottom: 16px;
  }
  .register-panel .field label {
    font-size: 1.18rem;
  }
  .register-panel .field input {
    height: 40px;
    padding: 0 12px;
  }
  .register-code-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }
  .register-code-row .ghost-button {
    height: 40px;
    padding: 0 12px;
    font-size: 1.08rem;
  }
  .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)); }
}

@media (min-width: 1121px) {
  .detail-shell {
    width: 1018px;
    max-width: 1018px;
    grid-template-columns: 620px 380px;
    justify-content: start;
  }

  .detail-shell .post-detail {
    width: 620px;
    max-width: 620px;
    box-sizing: border-box;
  }
}

