/* 高手在民间 — 移动优先基础样式 */

:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1f232d;
  --border: #2a3140;
  --text: #e8ecf4;
  --muted: #9aa3b5;
  --accent: #f4a261;
  --accent-2: #2a9d8f;
  --danger: #e76f51;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  background: radial-gradient(120% 80% at 50% -20%, #1f2840 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(70px + var(--safe-bottom));
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.app {
  max-width: min(960px, 100%);
  margin: 0 auto;
  padding: 0 12px 24px;
  padding-bottom: calc(24px + var(--safe-bottom));
  box-sizing: border-box;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 0 8px;
  background: linear-gradient(180deg, rgba(15, 17, 21, 0.96) 70%, transparent);
  backdrop-filter: blur(8px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.brand-logo-slot {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}

.brand-logo-video,
.header-video {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  vertical-align: middle;
}

.brand-logo-fallback {
  font-size: 1.5rem;
  line-height: 1;
}

.brand-logo-fallback.hidden,
.brand-logo-video.hidden,
.header-video.hidden {
  display: none !important;
}

.header-titles {
  flex: 1;
  min-width: 0;
}

.site-title {
  margin: 0;
  font-size: clamp(1.15rem, 4vw, 1.4rem);
  letter-spacing: 0.04em;
}

.site-title--main {
  font-size: clamp(1.45rem, 5.2vw, 2.05rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.site-tagline {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.site-tagline--kai {
  margin: 4px 0 0;
  font-size: clamp(0.82rem, 2.6vw, 1.02rem);
  color: var(--muted);
  font-family: "STKaiti", "KaiTi", "FangSong", "华文行楷", "Microsoft YaHei", serif;
  letter-spacing: 0.12em;
}

.site-bottom-nav-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 12px 8px;
}

.main-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

/* 顶部与底部主导航视觉一致（背景、圆角、间距、阴影） */
.main-nav--primary,
.main-nav--footer {
  padding: 10px 4px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.main-nav--primary {
  margin: 0 0 10px;
}

.nav-link {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: clamp(0.78rem, 2.8vw, 0.9rem);
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-link:hover,
.nav-link:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.nav-link.is-active {
  background: linear-gradient(180deg, rgba(42, 157, 143, 0.35), var(--surface-2));
  border-color: var(--accent-2);
  color: #fff;
}

.nav-link--admin {
  color: var(--accent);
}

.nav-link--admin.is-active {
  color: #fff;
}

@media (min-width: 640px) {
  .main-nav {
    gap: 10px;
  }

  .nav-link {
    padding-inline: 12px;
    font-size: 0.9rem;
  }
}

.field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 50%;
  border: 1px solid var(--muted);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.pf-default-avatars {
  margin-top: 6px;
}

.pf-default-avatars__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.pf-av-emoji {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: border-color 0.15s, transform 0.12s;
}

.pf-av-emoji:hover,
.pf-av-emoji:focus-visible {
  border-color: var(--accent);
  outline: none;
  transform: scale(1.05);
}

.view-root {
  min-height: 48vh;
  padding-top: 8px;
}

.view {
  animation: fadeIn 0.25s ease;
}

/* 调研榜/榜单：避免 API 同步后二次全页 render 时重复淡入闪屏 */
.view.poll-page,
.view[data-view="ranking"] {
  animation: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.muted {
  color: var(--muted);
  font-size: 0.8rem;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

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

.pill--danger {
  border-color: var(--danger);
  color: var(--danger);
}

.pill--muted {
  opacity: 0.85;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.post-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.post-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.post-heat {
  font-weight: 600;
  color: #e76f51;
  white-space: nowrap;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pf-bind-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #e5e7eb);
}
.pf-bind-title {
  margin: 0 0 6px;
  font-size: 1rem;
}
.pf-bind-desc,
.pf-bind-note {
  margin: 0 0 10px;
  font-size: 0.85rem;
}
.pf-bind-status--ok {
  margin: 8px 0;
  font-size: 0.9rem;
  color: var(--success, #059669);
}
.pf-bind-form {
  margin-bottom: 12px;
}
.pf-bind-form label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.pf-bind-form input[type="tel"],
.pf-bind-form input[type="email"],
.pf-bind-form input[type="text"] {
  width: 100%;
  margin-bottom: 8px;
}
.pf-bind-code-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.pf-bind-code-row input {
  flex: 1;
  margin-bottom: 0 !important;
}
.pf-bind-hint {
  font-size: 0.8rem;
  margin: 4px 0 8px;
}
.modal--profile-edit {
  max-height: 90vh;
  overflow-y: auto;
}

.pf-avatar-preview {
  margin-top: 8px;
  min-height: 48px;
}

label {
  font-size: 0.8rem;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-2), #21867a);
  border-color: transparent;
  color: #fff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

th,
td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

.leader-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.leader-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.leader-item:last-child {
  border-bottom: none;
}

.leader-item__user {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.leader-item__user:hover,
.leader-item__user:focus-visible {
  outline: none;
  opacity: 0.92;
}

[data-go-user]:not(button) {
  cursor: pointer;
}

.post-meta__author {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.comment-row__headline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.fun-king-user {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 0;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.fun-king-user:hover,
.fun-king-user:focus-visible {
  outline: none;
  opacity: 0.92;
}

.inline-user-link {
  display: inline;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.timeline-card__head[data-go-user]:hover,
.timeline-card__head[data-go-user]:focus-visible {
  outline: none;
  opacity: 0.9;
}

.rank-num {
  font-weight: 800;
  color: var(--accent);
  min-width: 1.5rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  border: 1px solid var(--border);
}

.avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 0.95rem;
  display: inline-grid;
  vertical-align: middle;
  margin-right: 6px;
}

.avatar--sm .avatar-img {
  border-radius: 50%;
}

.site-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}

.json-hint {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.7rem;
  word-break: break-all;
  color: var(--muted);
  margin-top: 8px;
}

.hidden {
  display: none !important;
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 12px;
  margin-bottom: 10px;
}

.header-top .header-brand {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.header-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.header-nav-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.header-nav-btn {
  white-space: nowrap;
}

.header-auth-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

.auth-chip {
  font-size: 0.72rem;
  text-align: right;
  max-width: 220px;
  line-height: 1.3;
}

.form-row--password {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.form-row--password label {
  flex: 1 1 auto;
}

.auth-forgot-link {
  font-size: 0.8rem;
  color: var(--accent-2);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}

.auth-forgot-link:hover {
  color: var(--accent);
}

/* 登录 / 注册模态框 */
.modal--auth {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 18px;
}

.auth-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.auth-mode-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 16px;
  max-width: 280px;
}

.auth-mode-tab {
  flex: 1 1 0;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-mode-tab:hover:not(.is-active) {
  color: var(--text);
  background: var(--surface);
}

.auth-mode-tab.is-active {
  background: #ff6b6b;
  border-color: #ff6b6b;
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 107, 107, 0.35);
}

.auth-form-body {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.auth-form-panel {
  margin-bottom: 0;
}

.auth-channel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-channel-tab {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
}

.auth-channel-tab.is-active {
  border-color: var(--accent, #6366f1);
  color: var(--text);
  background: rgba(99, 102, 241, 0.12);
}

.auth-remember-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
}

.auth-remember-row input[type="checkbox"] {
  width: auto;
  min-width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
}

.title-crown--custom {
  font-weight: 600;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.06);
}

.admin-ct-results {
  margin: 12px 0;
}

.admin-ct-editor {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.admin-ct-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  cursor: pointer;
}

.admin-ct-check input {
  width: auto;
  min-width: 16px;
  height: 16px;
  padding: 0;
}

.admin-ct-grants-card {
  margin-top: 12px;
}

.admin-ct-style-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.admin-ct-color-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.admin-ct-color-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
}
.admin-ct-color-btn:hover {
  transform: scale(1.08);
}
.admin-ct-preview-label {
  margin: 8px 0 6px;
  font-size: 0.8rem;
}
#admin-ct-preview-badge {
  display: inline-block;
  margin-bottom: 10px;
}

.admin-ct-grants-table td,
.admin-ct-grants-table th {
  font-size: 0.78rem;
}

.auth-modal-footer {
  flex-shrink: 0;
  margin-top: 18px;
  text-align: center;
}

.auth-btn-submit {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: #ff6b6b;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.28);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.auth-btn-submit:hover {
  filter: brightness(1.05);
}

.auth-btn-submit:active {
  transform: translateY(1px);
}

.auth-guest-entry {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.auth-guest-entry:hover {
  color: var(--text);
  border-color: var(--muted);
  background: var(--surface-2);
}

.auth-admin-hint {
  margin: 12px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

.modal--guest-prov .guest-prov-hint {
  margin: 0 0 12px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.modal--guest-prov .guest-prov-hint strong {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 480px) {
  .modal--auth {
    padding: 26px 14px 14px;
  }

  .auth-mode-tabs {
    max-width: none;
    gap: 6px;
  }

  .auth-mode-tab {
    padding: 9px 12px;
    font-size: 0.86rem;
  }

  .auth-btn-submit {
    padding: 11px 14px;
    font-size: 0.92rem;
  }

  .auth-guest-entry {
    font-size: 0.8rem;
    padding: 9px 12px;
  }
}

.follow-us-qr {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 12px auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.follow-us-placeholder {
  text-align: center;
  padding: 24px 12px;
  color: var(--muted);
}

.follow-us-placeholder--icon {
  font-size: 2rem;
  line-height: 1;
  padding: 20px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
}

.follow-us-desc {
  font-size: 0.88rem;
  margin: 0 0 12px;
}

.follow-us-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  max-height: min(52vh, 420px);
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px;
}

.follow-us-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.follow-us-item--link:hover,
.follow-us-item--link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.follow-us-item__name {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  word-break: break-word;
}

.follow-us-item .follow-us-qr {
  margin: 0;
  max-width: 100%;
}

.modal--follow-us {
  max-width: min(520px, 96vw);
}

@media (max-width: 480px) {
  .follow-us-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding-bottom: 10px;
  }

  .follow-us-item {
    flex: 0 0 132px;
    scroll-snap-align: start;
  }
}

.admin-content-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.admin-content-form label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
}

.admin-content-form input,
.admin-content-form textarea {
  width: 100%;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: inherit;
  resize: vertical;
  min-height: 2.5rem;
}

.admin-content-form textarea {
  min-height: 6rem;
}

.admin-content-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.admin-content-form__actions--wrap {
  align-items: center;
}

.admin-heat-formula-preview {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(233, 196, 106, 0.4);
  background: rgba(233, 196, 106, 0.1);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text);
}

.admin-heat-formula-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

@media (max-width: 520px) {
  .admin-heat-formula-grid {
    grid-template-columns: 1fr;
  }
}

.admin-follow-us-list {
  display: grid;
  gap: 12px;
}

.admin-follow-us-item-card {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.admin-follow-us-qrcode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-follow-us-qrcode-row .admin-follow-us-qrcode {
  flex: 1 1 180px;
  min-width: 0;
}

.admin-follow-us-preview {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  flex-shrink: 0;
}

.admin-follow-us-file.hidden {
  display: none;
}

@media (max-width: 560px) {
  .admin-content-form__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-content-form__actions .btn {
    width: 100%;
  }
}

/* —— 平台说明 / 协议弹窗（独立于 #modal-host 内联模态） —— */
.platform-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1110;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.platform-modal-backdrop--doc {
  z-index: 1120;
}

@media (min-width: 520px) {
  .platform-modal-backdrop {
    align-items: center;
  }
}

.platform-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: min(88vh, 620px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
}

.platform-modal--doc {
  max-width: min(92vw, 520px);
  max-height: min(90vh, 680px);
}

.platform-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.platform-modal__close:hover,
.platform-modal__close:focus-visible {
  color: var(--text);
  border-color: var(--accent);
  outline: none;
}

.platform-modal__title {
  margin: 0 40px 10px 0;
  font-size: 1.1rem;
  padding-right: 4px;
}

.platform-modal__intro {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  overflow-y: auto;
  flex: 0 1 auto;
  max-height: min(36vh, 280px);
}

.platform-modal__intro p {
  margin: 0 0 10px;
}

.platform-modal__intro p:last-child {
  margin-bottom: 0;
}

.platform-modal__doc-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  flex-shrink: 0;
}

.platform-modal__title-system {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  min-height: 0;
}

.platform-modal__subhead {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.platform-modal__title-lead {
  margin: 0 0 10px;
  font-size: 0.78rem;
}

.platform-modal__title-system-scroll {
  max-height: min(40vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
}

.platform-modal__title-block {
  margin-bottom: 12px;
}

.platform-modal__title-block:last-child {
  margin-bottom: 0;
}

.platform-modal__title-block h4 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.platform-modal__title-block ul {
  margin: 0;
  padding-left: 1.15rem;
}

.platform-modal__title-block li {
  margin-bottom: 4px;
}

.platform-modal__title-block li:last-child {
  margin-bottom: 0;
}

.platform-modal__title-p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
}

.platform-modal__title-block code {
  font-size: 0.76em;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.platform-modal__agree-note {
  margin: 12px 0 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted);
}

.platform-modal__scroll-body {
  margin-top: 4px;
  padding: 10px 4px 10px 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 120px;
  max-height: min(62vh, 520px);
  white-space: pre-wrap;
  word-break: break-word;
}

.btn--sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

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

.btn--ghost:hover {
  border-color: var(--accent);
}

.btn--danger {
  border-color: var(--danger);
  color: var(--danger);
}

.profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-head-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.title-chips-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.title-chips-row .title-chips {
  flex: 1;
  min-width: 0;
}

.title-manage-entry {
  flex-shrink: 0;
}

.profile-stat-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.stat-tile__rank {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  font-weight: 600;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1.75rem;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

@media (min-width: 520px) {
  .stat-grid:not(.stat-grid--profile-8):not(.stat-grid--user-public) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-tile {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.stat-tile__label {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 4px;
}

.stat-tile__value {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-right: 22px;
}

/* 个人中心 / 用户主页 · 8 项数据：移动端 2 列，桌面端 4 列（严格 2×4） */
.stat-grid.stat-grid--profile-8,
.stat-grid.stat-grid--user-public {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-grid.stat-grid--profile-8 {
  margin-top: 12px;
}

.stat-grid.stat-grid--user-public {
  margin-top: 14px;
}

/* 平板三列、宽屏四列 */
@media (min-width: 768px) and (max-width: 1024px) {
  .stat-grid.stat-grid--profile-8,
  .stat-grid.stat-grid--user-public {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1025px) {
  .stat-grid.stat-grid--profile-8,
  .stat-grid.stat-grid--user-public {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-grid--profile-8 .stat-tile,
.stat-grid--user-public .stat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  min-height: 76px;
  height: 100%;
  padding: 12px 10px;
}

.stat-grid--profile-8 .stat-tile__label,
.stat-grid--user-public .stat-tile__label {
  font-size: 12px;
  line-height: 1.3;
  margin: 0 0 6px;
}

.stat-grid--profile-8 .stat-tile__value,
.stat-grid--user-public .stat-tile__value {
  font-size: 20px;
  line-height: 1.2;
  display: block;
}

.stat-grid--user-public .stat-tile__value {
  padding-right: 0;
}

.stat-grid--profile-8 .stat-tile__rank {
  margin-top: 4px;
  text-align: center;
  width: 100%;
}

.stat-tile__dplus {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent-2);
  border-radius: 6px;
  padding: 1px 5px;
  line-height: 1.25;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.profile-pm-btn {
  position: relative;
}

.badge-dot--sm {
  min-width: 16px;
  height: 16px;
  font-size: 0.58rem;
  top: -2px;
  right: -2px;
}

.nav-link--profile {
  position: relative;
}

.nav-link__dot {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(15, 17, 21, 0.95);
}

.nav-link__badge {
  position: absolute;
  top: 0;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(15, 17, 21, 0.95);
  pointer-events: none;
}

/* 通知中心页面 */
.notifications-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notifications-page-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.notifications-page-head__title {
  margin: 0;
  font-size: 1.1rem;
}

.notifications-page-head__hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.notify-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.notify-filter-tab {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
}

.notify-filter-tab.is-active {
  border-color: var(--accent);
  background: rgba(244, 162, 97, 0.14);
  color: var(--text);
  font-weight: 600;
}

.notify-list-card {
  padding: 0;
  overflow: hidden;
}

.notify-list {
  display: flex;
  flex-direction: column;
}

.notify-list__empty {
  padding: 24px 16px;
  text-align: center;
}

.notify-list-item {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.notify-list-item:last-child {
  border-bottom: none;
}

.notify-list-item.is-unread {
  background: rgba(244, 162, 97, 0.06);
}

.notify-list-item__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notify-list-item__avatar--icon {
  font-size: 1.35rem;
  background: var(--surface-2);
  border-radius: 50%;
}

.notify-list-item__body {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.notify-list-item__body:hover,
.notify-list-item__body:focus-visible {
  outline: none;
}

.notify-list-item__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.notify-list-item__type {
  font-size: 0.68rem;
}

.notify-list-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
}

.notify-list-item__content {
  margin: 0 0 4px;
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-word;
}

.notify-list-item__time {
  font-size: 0.72rem;
}

.notify-list-item__actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}

.notify-list-item__appeal-btn {
  white-space: nowrap;
}

.notify-list-item__read-btn {
  min-height: 36px;
  white-space: nowrap;
}

.notify-list-item__read-label {
  font-size: 0.72rem;
  white-space: nowrap;
}

.profile-notify-entry {
  position: relative;
}

.share-btn-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

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

.share-post-modal__subtitle {
  margin: 6px 0 0;
  font-size: 0.85rem;
  line-height: 1.35;
}

.share-post-modal__url {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.45;
  word-break: break-all;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.btn--block {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

.share-post-copy-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-post-modal__hint-label {
  margin: 14px 0 0;
  font-size: 0.72rem;
  text-align: center;
}

.share-app-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.share-app-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: inherit;
  transition: border-color 0.15s, transform 0.12s, background 0.15s;
}

.share-app-btn:hover,
.share-app-btn:focus-visible {
  border-color: var(--accent);
  outline: none;
  transform: translateY(-1px);
}

.share-app-btn__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
}

.share-app-svg {
  width: 40px;
  height: 40px;
  display: block;
}

.share-app-btn__txt {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.share-post-modal__hint {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: center;
}

.notify-section-title {
  font-size: 0.82rem;
  margin: 12px 0 6px;
  color: var(--muted);
  font-weight: 600;
}

.pm-thread-scroll {
  max-height: min(48vh, 380px);
  overflow: auto;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-bubble {
  align-self: flex-start;
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}

.pm-bubble--me {
  align-self: flex-end;
  border-color: rgba(42, 157, 143, 0.45);
  background: rgba(42, 157, 143, 0.12);
}

.pm-bubble__meta {
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.pm-peer-row {
  list-style: none;
  border-bottom: 1px solid var(--border);
}

.pm-peer-row:last-child {
  border-bottom: none;
}

.pm-peer-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  border: none;
  cursor: pointer;
}

.pm-peer-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

.profile-posts-wrap {
  margin-top: 8px;
}

.title-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-delete-account {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.profile-delete-account__btn {
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 0.78rem;
  color: rgba(140, 140, 150, 0.75);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.profile-delete-account__btn:hover {
  color: rgba(180, 100, 100, 0.9);
}

.modal--danger .delete-account-warn {
  margin: 12px 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
}

.auth-code-hint {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.45;
}

.auth-sms-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

.auth-sms-row__input {
  flex: 1 1 140px;
  min-width: 0;
}

.auth-sms-send {
  flex-shrink: 0;
  margin-bottom: 2px;
}

.cp-mode-switch {
  margin: 8px 0 0;
  text-align: left;
}

.cp-mode-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  color: var(--accent, #6c9eff);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cp-mode-link:hover {
  opacity: 0.85;
}

/* 个人中心 · 每日签到 */
.sign-in-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.14) 0%, rgba(255, 138, 101, 0.1) 100%);
  border: 1px solid rgba(255, 167, 38, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.sign-in-card__main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.sign-in-card__icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.sign-in-card__body {
  min-width: 0;
}

.sign-in-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.sign-in-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.sign-in-card__status {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 999px;
  line-height: 1.35;
}

.sign-in-card__status--done {
  background: rgba(42, 157, 143, 0.18);
  color: var(--accent-2);
  border: 1px solid rgba(42, 157, 143, 0.35);
}

.sign-in-card__status--pending {
  background: rgba(244, 162, 97, 0.15);
  color: var(--accent);
  border: 1px solid rgba(244, 162, 97, 0.4);
}

.sign-in-card__streak {
  margin: 0 0 4px;
  font-size: 0.85rem;
}

.sign-in-card__streak strong {
  color: var(--accent-2);
  font-size: 1.05rem;
}

.sign-in-card__hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.sign-in-card__btn {
  flex-shrink: 0;
  min-width: 96px;
  font-weight: 700;
}

.sign-in-card__btn--ready {
  box-shadow: 0 2px 10px rgba(244, 162, 97, 0.35);
}

.sign-in-card__btn--done {
  opacity: 0.72;
  cursor: not-allowed;
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--muted);
}

@media (max-width: 480px) {
  .sign-in-card {
    flex-direction: column;
    align-items: stretch;
  }

  .sign-in-card__btn {
    width: 100%;
  }
}

/* 个人中心 · 推荐关注 */
.recommend-follow {
  margin-top: 14px;
}

.recommend-follow__heading {
  margin: 0 0 4px;
  font-size: 1rem;
}

.recommend-follow__hint {
  margin: 0 0 12px;
  font-size: 0.8rem;
}

.recommend-follow__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.recommend-follow-card {
  flex: 0 0 min(78vw, 220px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 16px 12px;
  margin: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

.recommend-follow-card.card {
  border-radius: var(--radius);
}

.recommend-follow-card__avatar {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
}

.recommend-follow-card__avatar:hover,
.recommend-follow-card__avatar:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.recommend-follow-card__name {
  border: none;
  background: transparent;
  padding: 0;
  margin: 4px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommend-follow-card__name:hover,
.recommend-follow-card__name:focus-visible {
  color: var(--accent-2);
  text-decoration: underline;
}

.recommend-follow-card__fans {
  margin: 0;
  font-size: 0.78rem;
}

.recommend-follow-card__title {
  font-size: 0.72rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommend-follow-card__follow {
  margin-top: 6px;
  width: 100%;
  max-width: 120px;
}

@media (min-width: 720px) {
  .recommend-follow__track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    overflow-x: visible;
    scroll-snap-type: none;
    gap: 14px;
  }

  .recommend-follow-card {
    flex: unset;
  }
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.icon-btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.badge-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.post-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
  min-width: 0;
}

.post-toolbar__cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.post-toolbar__report-btn {
  margin-left: auto;
  flex-shrink: 0;
}

.post-toolbar .btn {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.post-toolbar .btn.is-active {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.btn-report {
  border-color: rgba(255, 152, 0, 0.45);
  color: #ffb74d;
}

.btn-report:hover,
.btn-report:focus-visible {
  border-color: #ff9800;
  color: #ffe0b2;
}

.report-modal-post-title {
  margin: 6px 0 12px;
  font-size: 0.9rem;
}

.report-reason-field {
  width: 100%;
}

.report-reason-field__label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.report-reason-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.report-reason-opt {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.88rem;
  line-height: 1.3;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: left;
}

.report-reason-opt:hover {
  border-color: rgba(255, 167, 38, 0.45);
}

.report-reason-opt:has(input:checked) {
  border-color: rgba(255, 167, 38, 0.65);
  background: rgba(255, 183, 77, 0.08);
}

.report-reason-opt input[type="radio"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-2);
  cursor: pointer;
}

.report-reason-opt__text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 360px) {
  .report-reason-opt__text {
    white-space: normal;
  }
}

.post-banned-notice {
  text-align: center;
  padding: 28px 20px;
}

.post-banned-notice h2 {
  margin: 0 0 10px;
  color: var(--danger);
}

.admin-reports-card h3 {
  margin-top: 0;
}

.admin-report-pending-hint {
  font-size: 0.82rem;
  align-self: center;
}

.admin-reports-table td {
  vertical-align: top;
  font-size: 0.85rem;
}

.admin-report-post-link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

.admin-report-post-link:hover {
  text-decoration: underline;
}

.admin-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: nowrap;
}

.comment-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-form textarea {
  min-height: 64px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

@media (min-width: 520px) {
  .modal-backdrop {
    align-items: center;
  }
}

.modal,
.modal-content {
  width: 100%;
  max-width: 420px;
  max-height: min(88vh, 640px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  box-sizing: border-box;
}

.modal--wide {
  max-width: 520px;
}

.modal--qr-zoom {
  max-width: 360px;
  text-align: center;
}

.qr-zoom-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 4px;
}

.qr-zoom-img {
  max-width: min(300px, 85vw);
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.modal h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  justify-content: flex-end;
}

.sheet {
  width: 100%;
  max-width: 480px;
  max-height: 78vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 16px;
  box-shadow: var(--shadow);
}

@media (min-width: 520px) {
  .sheet {
    border-radius: var(--radius);
    max-height: min(80vh, 560px);
  }
}

.notify-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.notify-item:last-child {
  border-bottom: none;
}

.notify-item.is-unread {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 360px);
}

.toast {
  pointer-events: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.subview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.subview-bar .btn {
  flex: 0 0 auto;
}

/* —— 首页时间线横向滑动 —— */
.home-toolbar__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.home-search-wrap {
  position: relative;
  z-index: 20;
}

.home-toolbar__search input,
.home-search-input {
  width: 100%;
}

/* 首页 · 搜索历史 / 热门搜索面板 */
.home-search-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: #ffffff;
  color: #1a1a2e;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  max-height: min(70vh, 420px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.home-search-panel.is-open {
  display: block;
}

.home-search-panel__section + .home-search-panel__section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.home-search-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.home-search-panel__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #333;
}

.home-search-panel__clear {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.72rem;
  color: #666 !important;
}

.home-search-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-search-panel__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-search-panel__item + .home-search-panel__item {
  margin-top: 4px;
}

.home-search-panel__pick {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #1a1a2e;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-search-panel__pick:hover,
.home-search-panel__pick:focus-visible {
  background: rgba(42, 157, 143, 0.1);
  outline: none;
}

.home-search-panel__pick--hot {
  font-weight: 500;
}

.home-search-panel__hot-rank {
  flex-shrink: 0;
  font-size: 0.85rem;
}

.home-search-panel__hot-count {
  margin-left: auto;
  font-size: 0.72rem;
  color: #888 !important;
}

.home-search-panel__remove {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #999;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.home-search-panel__remove:hover,
.home-search-panel__remove:focus-visible {
  background: rgba(231, 111, 81, 0.12);
  color: #c0392b;
  outline: none;
}

.home-search-panel__empty {
  padding: 8px 10px;
  font-size: 0.8rem;
  color: #888 !important;
}

.home-toolbar__sort {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 10px;
}

.home-toolbar__sort-label {
  font-size: 0.8rem;
}

.home-sort-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.home-sort-heat-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.home-sort-heat-wrap .home-sort-btn {
  flex: 1 1 auto;
  min-width: 0;
}

.home-sort-formula-help {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-sort-formula-help:hover,
.home-sort-formula-help:focus-visible {
  outline: none;
  border-color: var(--accent-2);
  color: var(--text);
}

.home-sort-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.home-sort-btn:hover,
.home-sort-btn:focus-visible {
  outline: none;
  border-color: var(--accent-2);
  color: var(--text);
}

.home-sort-btn.is-active {
  border-color: var(--accent-2);
  color: #fff;
  background: rgba(42, 157, 143, 0.45);
}

.home-toolbar__hint {
  margin: 10px 0 0;
  font-size: 0.75rem;
}

.home-spotlight-slot {
  margin-bottom: 4px;
}

.home-spotlight-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(233, 196, 106, 0.45);
  background: linear-gradient(135deg, rgba(233, 196, 106, 0.2) 0%, rgba(42, 157, 143, 0.12) 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
}

.home-spotlight-bar__tag {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #f4d58d;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.home-spotlight-bar__desc {
  flex: 1;
  min-width: 0;
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 420px) {
  .home-spotlight-bar {
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .home-spotlight-bar__desc {
    white-space: normal;
    font-size: 0.6rem;
  }
}

.timeline-card--spotlight {
  position: relative;
  overflow: hidden;
  border-color: rgba(233, 196, 106, 0.55);
  box-shadow:
    0 0 0 1px rgba(233, 196, 106, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.22);
}

.timeline-card--spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(233, 196, 106, 0.08) 0%, transparent 45%);
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.filter-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.75rem;
  color: var(--muted);
}

.filter-chip.is-active {
  border-color: var(--accent-2);
  color: #fff;
  background: rgba(42, 157, 143, 0.35);
}

.timeline-feed-wrap {
  margin: 0;
  padding: 0 0 12px;
}

.timeline-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-feed .timeline-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: none;
  scroll-snap-align: none;
}

.timeline-feed__empty {
  padding: 32px 16px;
  text-align: center;
}

/* 兼容旧类名（若仍有引用） */
.timeline-strip-wrap {
  margin: 0;
  padding: 0 0 12px;
  overflow: visible;
  overflow-x: visible;
  overflow-y: visible;
  scroll-snap-type: none;
}

.timeline-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-strip .timeline-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: none;
  scroll-snap-align: none;
}

.timeline-strip__empty {
  padding: 32px 16px;
  text-align: center;
}

.timeline-card {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 400px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: border-color 0.15s;
}

/* 横向条带滑动场景保留卡片最小宽度 */
.timeline-strip .timeline-card {
  min-width: min(92vw, 360px);
  max-width: 400px;
}

.timeline-card:hover,
.timeline-card:focus-visible {
  border-color: var(--accent-2);
  outline: none;
}

.timeline-card--compact {
  cursor: pointer;
}

/* 时间线帖子卡片：略紧凑布局（首页 / 用户主页 / 我的帖子共用） */
.timeline-card.card {
  padding: 10px 12px;
  margin-bottom: 8px;
}

.timeline-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.timeline-card__author {
  flex: 1;
  min-width: 0;
}

.timeline-card__title {
  margin: 0 0 4px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.timeline-card__excerpt {
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.timeline-card__cover {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.timeline-card__cover img,
.timeline-card__cover video {
  max-width: 100%;
  max-height: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  vertical-align: middle;
}

.timeline-card__stats,
.timeline-card__toolbar {
  margin-top: 0;
}

.timeline-card .stats-row {
  font-size: 0.78rem;
  gap: 8px;
}

.timeline-card .post-toolbar .btn {
  font-size: 0.75rem;
  padding: 5px 8px;
}

/* 帖子详情与轮播 */
.post-detail__body {
  margin: 12px 0;
  line-height: 1.6;
  word-break: break-word;
}

.carousel {
  position: relative;
  margin: 12px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0c10;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.carousel__scroller {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.carousel--single .carousel__scroller {
  overflow-x: hidden;
  scroll-snap-type: none;
}

.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  scroll-snap-align: start;
  min-height: min(52vh, 360px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 4px;
}

.carousel__slide img,
.carousel__slide video {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(52vh, 360px);
  object-fit: contain;
  display: block;
  background: var(--surface-2);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.carousel__btn--prev {
  left: 8px;
}

.carousel__btn--next {
  right: 8px;
}

.comment-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.reply-box {
  margin-top: 8px;
}

.reply-box textarea {
  min-height: 56px;
}

.comments-list {
  margin-top: 12px;
}

/* 发布预览与多图 */
.pub-media-preview-root {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 24px;
  margin-top: 12px;
  width: 100%;
  align-items: start;
}

@media (max-width: 520px) {
  .pub-media-preview-root {
    grid-template-columns: 1fr;
  }
}

.pub-preview-col--images {
  order: 1;
}

.pub-preview-col--video {
  order: 2;
}

.pub-preview-media-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.pub-preview-media-block {
  width: 100%;
}

.pub-preview-thumbs--images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.pub-preview-thumbs--video {
  margin-top: 6px;
}

.pub-preview-thumbs--video video {
  width: 100%;
  max-width: min(100%, 520px);
  max-height: 280px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0c10;
}

.pub-preview-col {
  flex: 1 1 140px;
  min-width: 0;
}

.pub-preview-col__label {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.pub-images-preview,
.pub-video-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  min-height: 40px;
}

.pub-video-preview__empty {
  margin: 0;
  font-size: 0.8rem;
}

.pub-images-preview {
  margin-top: 8px;
}

.pub-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.pub-thumb--video {
  width: 100%;
  max-width: 280px;
  height: auto;
  min-height: 120px;
  aspect-ratio: 16 / 9;
}

.pub-thumb img,
.pub-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: top;
}

.pub-thumb--video video {
  object-fit: contain;
  background: #0f0f12;
}

.upload-progress {
  display: block;
  width: 100%;
  max-width: 320px;
  height: 8px;
  margin-top: 6px;
  border-radius: 4px;
  overflow: hidden;
}

.upload-progress.hidden {
  display: none;
}

.pub-preview-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pub-preview-img--still {
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.pub-preview-img--video {
  max-width: 100%;
  max-height: 260px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.pub-thumb__remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.pub-thumb-video,
.comment-media__item {
  max-width: 100%;
  max-height: 280px;
  border-radius: 8px;
}

.upload-status {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--accent, #6c9eff);
}

.upload-status.hidden {
  display: none;
}

.comment-media-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.comment-media--multi {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  align-items: flex-start;
}

.comment-media__wrap {
  display: inline-block;
  max-width: 100%;
}

.comment-media-upload-btn {
  cursor: pointer;
  margin: 0;
}

.comment-media-preview {
  flex: 1 1 100%;
}

.comment-media-preview__item {
  position: relative;
  display: inline-block;
  max-width: 200px;
}

.comment-media-preview__media {
  max-width: 200px;
  max-height: 120px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.comment-media {
  margin-top: 6px;
}

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

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-2);
}

.title-crown {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #1a1a2e;
  background: linear-gradient(90deg, #e9c46a, #f4a261);
  vertical-align: middle;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-crown--former {
  color: #6b7280;
  background: #e5e7eb !important;
  border: 1px solid #d1d5db;
  font-weight: 600;
}

.pill--title-former,
.title-manage-row--former span,
.achievement-cfg-row-text--former,
.achievement-card__chip--former {
  color: #6b7280;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  font-weight: 600;
}

.rank-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
}

.rank-tab-row--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  margin-right: -4px;
}

.rank-tab-row--scroll .rank-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 44px;
}

.rank-tab__emoji {
  margin-right: 4px;
}

.rank-tab--cat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.rank-tab {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.8rem;
  color: var(--muted);
}

.rank-tab.is-active {
  border-color: var(--accent-2);
  color: #fff;
  background: rgba(42, 157, 143, 0.35);
}

.rank-tab--period.is-active {
  border-color: rgba(233, 196, 106, 0.65);
  background: rgba(233, 196, 106, 0.22);
  color: #fff;
}

.rank-tab--metric.is-active {
  border-color: rgba(244, 162, 97, 0.75);
  background: rgba(244, 162, 97, 0.28);
  color: #fff;
}

.rank-tab--cat.is-active {
  border-color: rgba(69, 123, 157, 0.85);
  background: rgba(69, 123, 157, 0.35);
  color: #fff;
}

.rank-tab--custom.is-active {
  border-color: rgba(124, 108, 240, 0.85);
  background: rgba(124, 108, 240, 0.28);
  color: #fff;
}

.rank-custom-range {
  display: none;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 8px 0 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.rank-custom-range.is-open {
  display: flex;
}

.rank-custom-range__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  flex: 1 1 140px;
}

.rank-custom-range__label {
  font-size: 0.72rem;
}

.rank-custom-range__input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
}

.rank-custom-range__sep {
  align-self: center;
  padding-bottom: 10px;
  font-size: 0.85rem;
}

.rank-custom-range__btn {
  min-height: 40px;
  flex-shrink: 0;
}

.post-rank-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.post-rank-table {
  min-width: 520px;
}

.challenge-rank-capture {
  position: relative;
}

.challenge-rank-capture__title {
  text-align: center;
}

.post-hot-board.challenge-rank-table {
  table-layout: fixed;
}

.challenge-rank-col--rank {
  width: 10%;
}

.challenge-rank-col--title {
  width: 30%;
}

.challenge-rank-col--author {
  width: 20%;
}

.challenge-rank-col--value {
  width: 15%;
}

.challenge-rank-col--cat {
  width: 15%;
}

.post-hot-board__author,
.post-hot-board__cat,
.post-hot-board__value {
  font-size: 0.875rem;
}

.post-hot-board__cat-emoji {
  font-size: 1em;
  line-height: 1;
  vertical-align: baseline;
}

.post-rank-cell-link {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--accent-2);
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-rank-cell-link:hover {
  color: #e9c46a;
}

.post-rank-shot-btn {
  margin-top: 12px;
}

.post-rank-capture {
  margin-top: 10px;
}

.expert-rank-capture {
  position: relative;
}

.expert-rank-capture .expert-rank-capture__title {
  text-align: center;
}

.expert-rank-watermark {
  margin: 14px 0 2px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.gst-brand-stamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

.gst-brand-stamp__icon-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gst-brand-stamp__icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.gst-brand-stamp__icon--glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(244, 162, 97, 0.2);
  border: 1px solid rgba(244, 162, 97, 0.35);
  font-size: 0.65rem;
  line-height: 1;
  color: var(--accent);
}

.gst-brand-stamp__icon--file {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
}

.gst-brand-stamp__emoji-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 4px;
  font-size: 0.85rem;
  line-height: 1;
}

.gst-brand-stamp__name {
  font-weight: 600;
}

.gst-brand-stamp__suffix {
  font-weight: 400;
}

.province-rank-card h2 {
  margin-top: 0;
}

.province-rank-capture {
  position: relative;
}

.province-rank-capture__title {
  text-align: center;
}

.province-rank-table-wrap {
  margin-top: 6px;
  max-width: 100%;
  max-height: min(70vh, 560px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.post-hot-board.province-rank-table {
  table-layout: fixed;
  min-width: 320px;
}

.province-rank-table th:nth-child(1),
.province-rank-table td:nth-child(1) {
  width: 12%;
}

.province-rank-table th:nth-child(3),
.province-rank-table td:nth-child(3) {
  width: 22%;
  text-align: right;
}

.province-rank-table th:nth-child(4),
.province-rank-table td:nth-child(4) {
  width: 18%;
  text-align: right;
}

.province-rank-filter-row {
  margin: 10px 0 4px;
}

.province-rank-filter-btn {
  max-width: 100%;
  text-align: left;
  white-space: normal;
}

.province-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr));
  gap: 8px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 2px 0;
}

.province-filter-grid__btn {
  min-height: 2.25rem;
}

.expert-rank-table-wrap {
  margin-top: 4px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.post-hot-board.expert-rank-table {
  min-width: 480px;
}

.expert-rank-row .post-rank-cell-link {
  text-align: left;
}

.post-hot-board-card h2 {
  margin-top: 0;
}

.post-hot-board-wrap {
  margin-top: 8px;
  max-width: 100%;
  max-height: min(70vh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.post-hot-board {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.post-hot-board th,
.post-hot-board td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.post-hot-board th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
}

.post-hot-board__row {
  cursor: pointer;
}

.post-hot-board__row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.post-hot-board__row:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: -2px;
}

.post-hot-board__rank {
  width: 3rem;
  font-weight: 800;
  color: var(--accent);
}

.post-hot-board__title {
  min-width: 0;
  max-width: 42vw;
  word-break: break-word;
}

.post-hot-board.challenge-rank-table thead th:nth-child(3),
.post-hot-board.challenge-rank-table thead th:nth-child(5) {
  font-size: 0.875rem;
}

.post-hot-board.challenge-rank-table .post-hot-board__title {
  max-width: none;
}

.post-hot-board__cat {
  text-align: left;
  font-size: 0.875rem;
  vertical-align: middle;
}

.rank-capture {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.rank-capture__title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  word-break: break-word;
  line-height: 1.35;
}

.rank-capture__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.chart-wrap {
  position: relative;
  height: 280px;
  margin-top: 12px;
}

.fun-kings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 12px;
}

@media (min-width: 720px) {
  .fun-kings-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.fun-col h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.fun-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fun-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.fun-list li:last-child {
  border-bottom: none;
}

.admin-dash-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-dash-row--charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.admin-dash-row--charts > .admin-dash-metric-card.card {
  min-height: 420px;
}

.admin-dash-row--ranks3 > .admin-dash-metric-card.card {
  min-height: 340px;
}

.admin-dash-row--ranks3 .admin-rank-table-scroll {
  min-height: 200px;
}

@media (max-width: 960px) {
  .admin-dash-row--charts {
    grid-template-columns: 1fr;
  }

  .admin-dash-row--ranks3 {
    grid-template-columns: 1fr;
  }
}

.admin-dash-row--rank-full {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* 管理员后台：八张统计卡与「所有挑战（帖子）」等区域一致的白底简洁卡片 */
.admin-dash-metric-card.card {
  background: #ffffff;
  color: #333333;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 16px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.admin-dash-metric-card .admin-dash-card__head {
  cursor: default;
  touch-action: auto;
}

.admin-dash-metric-card .admin-dash-card__head h4 {
  color: #111111;
}

.admin-dash-metric-card .muted {
  color: #5c6570;
}

.admin-dash-metric-card .admin-mini-table {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  background: #fafafa;
}

.admin-dash-metric-card .admin-mini-table td,
.admin-dash-metric-card .admin-mini-table th {
  color: #333333;
}

.admin-dash-metric-card .admin-mini-table thead th {
  background: rgba(0, 0, 0, 0.04);
  color: #222222;
  font-weight: 600;
}

.admin-dash-metric-card .admin-mini-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.admin-dash-metric-card .admin-mini-table tbody tr:nth-child(odd) {
  background: transparent;
}

.admin-dash-metric-card .admin-mini-table td strong {
  color: #111111;
}

.admin-chart-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.admin-dash-metric-card .admin-chart-tab {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #f4f6f8;
  color: #444444;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.admin-dash-metric-card .admin-chart-tab:hover,
.admin-dash-metric-card .admin-chart-tab:focus-visible {
  outline: none;
  border-color: #2a9d8f;
}

.admin-dash-metric-card .admin-chart-tab.is-active {
  border-color: #2a9d8f;
  background: rgba(42, 157, 143, 0.2);
  color: #0d3d36;
  font-weight: 600;
}

.admin-dash-metric-card .admin-rank-table-scroll {
  max-height: 280px;
  overflow: auto;
  flex: 1 1 auto;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafafa;
}

.admin-dash-metric-card .admin-chart-caption {
  color: #5c6570;
}

.admin-dash-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.admin-dash-card__head:active {
  cursor: grabbing;
}

.admin-dash-card.sortable-ghost {
  opacity: 0.55;
}

.admin-dash-card.sortable-drag-card {
  opacity: 0.95;
  box-shadow: var(--shadow);
}

.admin-dash-card__head h4 {
  margin: 0;
  font-size: 0.9rem;
}

.admin-dash-card__drag {
  cursor: grab;
  color: var(--muted);
  user-select: none;
  font-size: 0.85rem;
  letter-spacing: -2px;
}

.admin-mini-table table {
  width: 100%;
  font-size: 0.8rem;
}

.admin-chart-caption {
  margin: 8px 0 4px;
  font-size: 0.72rem;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.admin-toolbar--wrap {
  justify-content: flex-start;
}

.admin-select,
.admin-search {
  max-width: 220px;
  flex: 1 1 160px;
}

.admin-mgmt-card .table-wrap {
  max-height: 420px;
  overflow: auto;
}

.admin-post-manage-banner {
  border: 1px solid rgba(244, 162, 97, 0.35);
  background: rgba(244, 162, 97, 0.08);
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.admin-localdata-hint {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(42, 157, 143, 0.35);
  background: rgba(42, 157, 143, 0.1);
  font-size: 0.78rem;
  line-height: 1.45;
}

.admin-localdata-hint strong {
  color: #e9c46a;
}

/* 游客禁言：顶栏会话 ID 提示 */
.guest-id-hint {
  margin: 4px 0 0;
  padding: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--muted);
  word-break: break-all;
  max-width: min(100%, 320px);
}

.guest-id-hint--banned {
  color: var(--danger);
}

.header-top-right .guest-id-hint {
  text-align: right;
}

/* 游客禁言：管理员后台 */
.admin-guest-mgmt-card .admin-guest-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.admin-guest-mgmt-card .admin-guest-section:first-of-type {
  margin-top: 10px;
  padding-top: 0;
  border-top: none;
}

.admin-guest-section__title {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

.admin-guest-ban-row,
.admin-guest-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.admin-guest-status-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-guest-expiry {
  font-size: 0.78rem;
}

.admin-guest-session-hint {
  margin: 0 0 8px;
  font-size: 0.78rem;
}

.admin-guest-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 100px;
}

.admin-guest-field--wide {
  flex: 1 1 200px;
  min-width: 160px;
}

.admin-guest-field__label {
  font-size: 0.72rem;
  color: var(--muted);
}

.admin-guest-input {
  width: 100%;
  max-width: 280px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.85rem;
}

.admin-guest-id {
  font-size: 0.78rem;
  word-break: break-all;
}

.admin-guest-ban-table-wrap {
  max-height: 280px;
}

.admin-guest-ban-table {
  width: 100%;
  font-size: 0.8rem;
}

.admin-guest-ban-table th,
.admin-guest-ban-table td {
  padding: 8px 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.admin-guest-search-row {
  margin-bottom: 10px;
}

.admin-guest-list-table-wrap {
  margin-top: 8px;
}

.admin-guest-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.admin-guest-list-table th,
.admin-guest-list-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.admin-guest-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: normal;
}

.guest-ban-modal__options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 8px;
}

.guest-ban-modal__options .btn {
  flex: 1 1 100px;
  min-width: 88px;
}

.btn-guest-ban {
  margin-right: 4px;
}

.guest-reporter-tag,
.guest-comment-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.guest-reporter-tag {
  margin-left: 0;
  margin-right: 4px;
}

.admin-guest-ban-table code.admin-guest-id {
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.admin-dash-layout .admin-dash-metric-card.card {
  display: flex;
  flex-direction: column;
}

.admin-dash-layout .admin-dash-metric-card .admin-mini-table:first-of-type {
  flex: 0 0 auto;
}

.admin-dash-layout .admin-dash-metric-card .admin-rank-table-scroll .admin-mini-table {
  flex: 1 1 auto;
}

.admin-mini-table td {
  padding: 7px 9px;
  vertical-align: top;
  font-size: 0.8rem;
  line-height: 1.35;
}

.admin-mini-table td:first-child {
  width: 46%;
}

.admin-dash-metric-card .admin-chart-wrap {
  height: 152px;
  margin-top: 6px;
  background: #ffffff;
  border-radius: 8px;
}

.admin-user-broadcast-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.rank-cap-preview {
  max-height: min(56vh, 520px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 8px;
}

.rank-share-grid {
  margin-top: 12px;
}

.modal--achievement .achievement-card-preview-wrap,
.modal--achievement-cfg .achievement-card-preview-wrap {
  display: flex;
  justify-content: center;
  overflow: auto;
  max-height: min(52vh, 560px);
  margin-top: 4px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.achievement-card-root {
  position: relative;
  width: 600px;
  height: 800px;
  box-sizing: border-box;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  color: #e8ecf4;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.achievement-card__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, #1a2744 0%, #0f1115 42%, #1c2433 100%);
}

.achievement-card__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background: radial-gradient(circle at 18% 22%, rgba(244, 162, 97, 0.9) 0%, transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(42, 157, 143, 0.75) 0%, transparent 45%);
  pointer-events: none;
}

.achievement-card__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

.achievement-card__inner--cont {
  padding: 28px 28px 24px;
  justify-content: flex-start;
}

.achievement-card__inner--page1 {
  padding: 22px 24px 18px;
}

.achievement-card-root--page1 .achievement-card__title {
  margin-top: 4px;
  font-size: 1.35rem;
}

.achievement-card-root--page1 .achievement-card__avatar-wrap {
  margin-top: 10px;
}

.achievement-card-root--page1 .achievement-card__avatar-wrap .avatar {
  width: 72px;
  height: 72px;
  font-size: 2rem;
  border-width: 2px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.achievement-card-root--page1 .achievement-card__name {
  margin-top: 8px;
  font-size: 1.1rem;
}

.achievement-card-root--page1 .achievement-card__prov {
  margin-top: 2px;
  font-size: 0.78rem;
}

.achievement-card-root--page1 .achievement-card__chips {
  margin-top: 8px;
  gap: 4px;
}

.achievement-card-root--page1 .achievement-card__chip {
  padding: 2px 8px;
  font-size: 0.65rem;
}

.achievement-card-root--page1 .achievement-card__stats {
  margin-top: 8px;
  padding-top: 10px;
  gap: 4px;
}

.achievement-card-root--page1 .achievement-card__stat-n {
  font-size: 0.95rem;
}

.achievement-card-root--page1 .achievement-card__stat-l {
  font-size: 0.58rem;
}

.achievement-card-root--page1 .achievement-card__posts--page1 {
  margin-top: 8px;
}

.achievement-card-root--page1 .achievement-card__post-line {
  margin-bottom: 4px;
  padding-bottom: 4px;
}

.achievement-card-root--page1 .achievement-card__post-desc {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.62rem;
  margin-top: 2px;
}

.achievement-card-root--page1 .achievement-card__post-stats .achievement-card__stat-n {
  font-size: 0.82rem;
}

.achievement-card-root--page1 .achievement-card__foot-wm {
  margin-top: 8px;
}

.achievement-card-root--page1 .achievement-card__foot {
  margin-top: 4px;
}

.achievement-cfg-post-head-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.achievement-cfg-post-head-row .achievement-cfg-row--post-head {
  flex: 1 1 auto;
  min-width: 0;
}

.achievement-cfg-first-page-btn {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 2px;
  white-space: nowrap;
  font-size: 0.72rem;
  padding: 4px 8px;
}

.achievement-cfg-first-page-btn.is-active {
  border-color: var(--accent-2);
  color: #fff;
  background: rgba(42, 157, 143, 0.45);
}

.achievement-cfg-first-page-btn:disabled:not(.is-active) {
  opacity: 0.45;
  cursor: not-allowed;
}

.achievement-card__brand {
  margin: 0;
  font-size: 0.72rem;
  color: #9aa3b5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.achievement-card__brand .gst-brand-stamp__name {
  letter-spacing: 0.42em;
}

.achievement-card__title {
  margin: 10px 0 0;
  font-size: 1.65rem;
  font-weight: 800;
}

.achievement-card__avatar-wrap {
  margin-top: 28px;
}

.achievement-card__avatar-wrap .avatar {
  width: 120px;
  height: 120px;
  font-size: 3.25rem;
  border-radius: 50%;
  border: 3px solid rgba(244, 162, 97, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.achievement-card__avatar-wrap .avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.achievement-card__name {
  margin: 16px 0 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.achievement-card__prov {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: #9aa3b5;
}

.achievement-card__chips {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 100%;
}

.achievement-card__chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(42, 157, 143, 0.2);
  border: 1px solid rgba(42, 157, 143, 0.45);
  color: #cfece6;
}

.achievement-card__chip--muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: var(--muted);
}

.achievement-card__chip--former,
.achievement-cfg-row-text--former {
  color: #6b7280;
}

.achievement-card__stats {
  margin-top: 14px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.achievement-card__stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.achievement-card__stat-n {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f4a261;
}

.achievement-card__stat-l {
  font-size: 0.68rem;
  color: #9aa3b5;
}

.achievement-card__stat-r {
  font-size: 0.62rem;
  color: #b7becd;
  line-height: 1.2;
}

.achievement-card__posts {
  margin-top: 12px;
  width: 100%;
  text-align: left;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.achievement-card-root .achievement-card__posts,
.achievement-card__posts--fit {
  max-height: none;
  overflow: visible;
  flex: 1 1 auto;
  min-height: 0;
}

.achievement-card__sec-title {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #dfe6f5;
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.achievement-card__page-tag {
  font-size: 0.62rem;
  font-weight: 600;
  color: #9aa3b5;
}

.achievement-card__title--compact {
  margin-top: 6px;
  font-size: 1.25rem;
}

.achievement-card__name--compact {
  margin: 4px 0 10px;
  font-size: 0.95rem;
}

.achievement-card-root--cont .achievement-card__avatar-wrap {
  display: none;
}

.achievement-card-preview-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.achievement-cfg-page-hint {
  margin: 4px 0 8px;
  font-size: 0.72rem;
}

.achievement-card__post-line {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
}

.achievement-card__post-line:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.achievement-card__post-desc {
  margin-top: 4px;
  line-height: 1.35;
}

.achievement-card__post-title-text,
.achievement-card__post-desc {
  word-break: break-word;
  white-space: normal;
}

.achievement-card__foot {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: #7d8699;
}

.achievement-card__foot-wm {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: #9aa3b5;
}

.modal--achievement-cfg {
  width: min(95vw, 1120px);
  max-width: min(95vw, 1120px);
  max-height: min(92dvh, 920px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  box-sizing: border-box;
}

@media (min-width: 1025px) {
  .modal--achievement-cfg {
    width: min(92vw, 1080px);
    max-width: min(92vw, 1080px);
    min-width: min(800px, 92vw);
  }
}

.modal--achievement-cfg .achievement-cfg-intro {
  flex-shrink: 0;
  margin: 0 0 4px;
  font-size: 0.82rem;
}

.modal--achievement-cfg .achievement-cfg-body-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 6px;
  padding-right: 2px;
}

.modal--achievement-cfg .achievement-cfg-modal-actions {
  flex-shrink: 0;
  margin-top: 12px;
}

.modal--achievement-cfg .achievement-cfg-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.4fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 1024px) {
  .modal--achievement-cfg .achievement-cfg-layout {
    grid-template-columns: 1fr;
  }
}

.modal--achievement-cfg .achievement-cfg-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface-2);
  max-height: none;
  overflow: visible;
}

.modal--achievement-cfg .achievement-cfg-panel--right {
  min-width: 0;
}

.modal--achievement-cfg .achievement-cfg-right-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

@media (max-width: 767px) {
  .modal--achievement-cfg .achievement-cfg-right-split {
    grid-template-columns: 1fr;
  }
}

.modal--achievement-cfg .achievement-cfg-right-block {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.12);
}

.modal--achievement-cfg .achievement-cfg-preview-label {
  margin: 12px 0 6px;
  font-size: 0.78rem;
}

.modal--achievement-cfg .achievement-cfg-h {
  margin: 0 0 8px;
}

.modal--achievement-cfg .achievement-cfg-right-block .achievement-cfg-h {
  margin-top: 0;
}

.modal--achievement-cfg .achievement-cfg-panel--posts,
.modal--achievement-cfg .achievement-cfg-right-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.modal--achievement-cfg .achievement-cfg-scroll--posts {
  max-height: min(52vh, 480px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  padding-right: 4px;
  min-height: 0;
}

.modal--achievement-cfg .achievement-cfg-scroll--titles {
  max-height: min(28vh, 220px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  padding-right: 4px;
  min-height: 0;
}

.modal--achievement-cfg .achievement-cfg-scroll--stats {
  max-height: min(32vh, 280px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  padding-right: 4px;
  min-height: 0;
}

.modal--achievement-cfg .achievement-cfg-panel--posts > .achievement-cfg-scroll--posts,
.modal--achievement-cfg .achievement-cfg-right-block > .achievement-cfg-scroll--titles,
.modal--achievement-cfg .achievement-cfg-right-block > .achievement-cfg-scroll--stats {
  flex: 1 1 auto;
}

.modal--achievement-cfg .achievement-cfg-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  font-size: 0.8rem;
  cursor: pointer;
  box-sizing: border-box;
}

.modal--achievement-cfg .achievement-cfg-row--title {
  align-items: center;
}

.modal--achievement-cfg .achievement-cfg-check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}

.modal--achievement-cfg .achievement-cfg-row--title .achievement-cfg-check {
  margin-top: 0;
}

.modal--achievement-cfg .achievement-cfg-row-text {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
  white-space: normal;
}

.modal--achievement-cfg .achievement-cfg-stat-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  justify-content: space-between;
  width: 100%;
  font-size: 0.78rem;
  box-sizing: border-box;
}

.modal--achievement-cfg .achievement-cfg-stat-row__main {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
}

.modal--achievement-cfg .achievement-cfg-rank-lab {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex: 0 0 auto;
  margin-left: auto;
}

.modal--achievement-cfg .achievement-cfg-quick--module {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-top: 8px;
  box-sizing: border-box;
}

.modal--achievement-cfg .achievement-cfg-quick--preview {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex: 0 0 auto;
  margin-top: 10px;
  box-sizing: border-box;
}

.modal--achievement-cfg .achievement-cfg-post-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.modal--achievement-cfg .achievement-cfg-post-title,
.modal--achievement-cfg .achievement-cfg-post-desc {
  word-break: break-word;
  white-space: normal;
  display: block;
}

.modal--achievement-cfg .achievement-cfg-post-title {
  font-weight: 600;
  font-size: 0.82rem;
}

.modal--achievement-cfg .achievement-cfg-post-desc {
  font-size: 0.75rem;
  line-height: 1.35;
}

.modal--achievement-cfg .achievement-cfg-post-block {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal--achievement-cfg .achievement-cfg-post-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.modal--achievement-cfg .achievement-cfg-post-metrics {
  margin: 6px 0 0 26px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal--achievement-cfg .achievement-cfg-row--post-head {
  align-items: flex-start;
}

.modal--achievement-cfg .achievement-cfg-stat-row--post-metric {
  font-size: 0.72rem;
  gap: 6px;
}

.achievement-card__post-stats {
  margin-top: 8px;
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.65rem;
}

.achievement-card__post-stats > div {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.achievement-card__post-stats .achievement-card__stat-n {
  font-size: 0.95rem;
}

.achievement-card__post-stats .achievement-card__stat-l {
  font-size: 0.58rem;
  line-height: 1.2;
}

.achievement-card__post-stats .achievement-card__stat-r {
  font-size: 0.55rem;
}

.achievement-cfg-h {
  margin: 10px 0 6px;
  font-size: 0.85rem;
}

.achievement-cfg-h:first-child {
  margin-top: 0;
}

.achievement-cfg-scroll {
  max-height: 160px;
  overflow: auto;
  padding-right: 4px;
}

.achievement-cfg-hint {
  margin: 10px 0 0;
  font-size: 0.72rem;
}

.achievement-cfg-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.achievement-cfg-preview {
  min-width: 0;
}

.title-manage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 10px;
  max-height: min(50vh, 420px);
  overflow: auto;
}

.title-manage-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.title-manage-row input[type="checkbox"] {
  margin: 0;
  justify-self: start;
}

.title-manage-row--former span {
  color: #6b7280;
}

.admin-title-rule-group {
  margin-top: 16px;
}

.admin-title-rule-group h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.admin-title-rule-table td,
.admin-title-rule-table th {
  font-size: 0.82rem;
}

.admin-title-rule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-title-rule-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.admin-title-rule-form label {
  display: grid;
  gap: 4px;
  font-size: 0.84rem;
}

.admin-title-rule-form input,
.admin-title-rule-form select,
.admin-title-rule-form textarea {
  width: 100%;
}

.admin-title-rule-form__cond {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.admin-title-rule-form__check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.admin-title-rule-form__cond--parts {
  display: grid;
  gap: 10px;
}

.admin-cond-parts {
  display: grid;
  gap: 10px;
}

.admin-cond-part {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: grid;
  gap: 8px;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
}

.admin-cond-part--readonly {
  opacity: 0.92;
}

.admin-cond-part__head {
  font-size: 0.84rem;
  font-weight: 600;
}

.admin-cond-part__hint {
  margin: 0;
  font-size: 0.78rem;
}

.admin-cond-part label {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
}

.admin-cond-part input,
.admin-cond-part select {
  width: 100%;
}

@media (max-width: 560px) {
  .title-manage-list {
    grid-template-columns: 1fr;
  }
}

/* 移动端固定底栏（与 #modal-host 弹层错层：底栏 z-index 1000，弹层见上） */
@media (min-width: 769px) {
  .bottom-nav {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .toast-stack {
    bottom: calc(78px + var(--safe-bottom));
  }

  .main-nav--primary {
    display: none;
  }

  .site-bottom-nav-wrap {
    display: none;
  }

  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    padding: 8px 0;
    padding-bottom: calc(8px + var(--safe-bottom));
    box-sizing: border-box;
  }

  .bottom-nav__btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    margin: 0;
    border: none;
    background: transparent;
    color: #555;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav__btn:focus-visible {
    outline: 2px solid #ff6b6b;
    outline-offset: 2px;
  }

  .bottom-nav__icon {
    font-size: 24px;
    line-height: 1;
  }

  .bottom-nav__label {
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .bottom-nav__btn.is-active {
    color: #ff6b6b;
  }

  .bottom-nav__btn.is-active .bottom-nav__label {
    font-weight: 700;
  }

  #bottom-nav-profile {
    position: relative;
  }
}

/* —— 站内私信 #messages —— */
.user-public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-end;
}

.profile-dm-entry {
  position: relative;
}

.dm-page-head {
  margin-bottom: 10px;
}

.dm-layout {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 720px) {
  .dm-layout {
    grid-template-columns: 1fr;
  }

  .dm-layout--with-peer .dm-sidebar {
    display: none;
  }

  .dm-layout:not(.dm-layout--with-peer) .dm-thread {
    display: none;
  }
}

.dm-sidebar-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.dm-peer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(62vh, 480px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.dm-peer-empty {
  padding: 12px 8px;
}

.dm-peer-btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  margin: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border: 1px solid transparent;
  box-sizing: border-box;
}

.dm-peer-btn:hover,
.dm-peer-btn:focus-visible {
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.dm-peer-btn.is-active {
  border-color: var(--accent-2);
  background: rgba(42, 157, 143, 0.12);
}

.dm-peer-info {
  flex: 1;
  min-width: 0;
}

.dm-peer-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.dm-peer-name {
  font-size: 0.9rem;
}

.dm-peer-time {
  font-size: 0.68rem;
  flex-shrink: 0;
}

.dm-peer-preview {
  font-size: 0.78rem;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-peer-unread {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.dm-peer-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(15, 17, 21, 0.85);
}

.dm-peer-unread-num {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--danger);
  min-width: 1rem;
  text-align: center;
}

.dm-thread {
  display: flex;
  flex-direction: column;
  min-height: min(52vh, 420px);
}

.dm-thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.dm-thread-title {
  margin: 0;
  font-size: 1rem;
  flex: 1;
  min-width: 0;
}

.dm-thread-empty {
  padding: 24px 12px;
  text-align: center;
}

.dm-thread-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
}

.dm-thread-scroll--padded {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: min(52vh, 440px);
  overflow: auto;
  padding: 8px 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

.dm-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: min(92%, 420px);
}

.dm-bubble-row--me {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.dm-bubble-av {
  flex-shrink: 0;
}

.dm-bubble {
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

.dm-bubble--me {
  border-color: rgba(42, 157, 143, 0.45);
  background: rgba(42, 157, 143, 0.14);
}

.dm-bubble__meta {
  font-size: 0.68rem;
  margin-bottom: 4px;
}

.dm-bubble__txt {
  white-space: normal;
}

.dm-composer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.dm-composer textarea {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 52px;
}

.dm-composer--blocked {
  display: block;
}

.dm-composer-blocked {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(231, 111, 81, 0.12);
  border: 1px solid rgba(231, 111, 81, 0.35);
  font-size: 0.85rem;
}

/* —— 帖子话题标签 —— */
.post-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0 4px;
  align-items: center;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.25;
  border: none;
  background: rgba(154, 163, 181, 0.22);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  max-width: 100%;
  word-break: break-all;
  transition: background 0.15s, border-color 0.15s;
}

.post-tag:hover,
.post-tag:focus-visible {
  background: rgba(154, 163, 181, 0.35);
  outline: none;
}

.post-tag--static {
  cursor: default;
  pointer-events: none;
}

.post-tag--static:hover {
  background: rgba(154, 163, 181, 0.22);
}

.tag-page-head .tag-page-title {
  margin: 8px 0 4px;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.tag-page-meta {
  margin: 0;
  font-size: 0.88rem;
}

/* ========== 响应式：手机 ≤767px / 平板 768–1024px（纯 CSS） ========== */

@media (min-width: 768px) and (max-width: 1024px) {
  .rank-tab-row--scroll {
    flex-wrap: wrap;
    overflow-x: visible;
    margin-right: 0;
    padding-bottom: 0;
  }

  .rank-tab-row--scroll .rank-tab {
    flex: 0 1 auto;
    white-space: normal;
    min-height: 40px;
  }

  .post-rank-table {
    min-width: 0;
  }

  .post-hot-board.expert-rank-table,
  .post-hot-board.province-rank-table {
    min-width: 0;
  }

  .view[data-view="home"] > .timeline-feed-wrap > .timeline-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
  }

  .view[data-view="home"] > .timeline-feed-wrap > .timeline-feed .timeline-card {
    max-width: none;
  }
}

@media (max-width: 767px) {
  html {
    font-size: 15px;
  }

  .view-root {
    overflow-x: hidden;
  }

  .header-top {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .header-top-right,
  .header-top-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    width: 100%;
  }

  .header-top-right {
    align-items: stretch;
  }

  .header-auth-row {
    justify-content: flex-start;
  }

  .site-title--main {
    font-size: 20px;
    line-height: 1.25;
    word-break: break-word;
  }

  .site-tagline--kai {
    font-size: 12px;
    letter-spacing: 0.06em;
    line-height: 1.45;
    white-space: normal;
    word-break: break-word;
  }

  .view .card {
    min-width: 0;
  }

  .card {
    padding: 12px 12px;
  }

  .table-wrap {
    max-width: 100%;
  }

  .btn,
  .btn--sm,
  .btn--ghost,
  .btn--primary,
  .btn--danger,
  .header-nav-btn,
  .filter-chip,
  .rank-tab,
  .home-sort-btn,
  .platform-modal__doc-btns .btn,
  .header-auth-row .btn,
  .subview-bar .btn,
  .post-toolbar .btn,
  .post-toolbar__report-btn {
    min-height: 44px;
    padding: 8px 12px;
  }

  .stat-grid.stat-grid--profile-8,
  .stat-grid.stat-grid--user-public {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-grid--profile-8 .stat-tile,
  .stat-grid--user-public .stat-tile {
    min-height: 70px;
    padding: 8px 6px;
  }

  .stat-grid--profile-8 .stat-tile__label,
  .stat-grid--user-public .stat-tile__label {
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .stat-grid--profile-8 .stat-tile__value,
  .stat-grid--user-public .stat-tile__value {
    font-size: clamp(15px, 4.2vw, 18px);
    padding-right: 20px;
  }

  .stat-grid--profile-8 .stat-tile__rank {
    font-size: 0.6rem;
  }

  .timeline-card.card {
    padding: 8px 10px;
    margin-bottom: 6px;
  }

  .timeline-feed {
    gap: 6px;
  }

  .timeline-card__cover {
    height: 160px;
    max-height: 160px;
    margin-bottom: 4px;
  }

  .timeline-card__cover img,
  .timeline-card__cover video {
    width: 100%;
    height: 100%;
    max-height: 160px;
    object-fit: cover;
  }

  .timeline-card__title {
    font-size: 0.88rem;
  }

  .timeline-card__excerpt {
    font-size: 0.76rem;
    margin-bottom: 4px;
  }

  .home-sort-btns {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .home-sort-btn {
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
  }

  .home-sort-heat-wrap {
    flex: 0 0 auto;
    min-width: auto;
  }

  .home-sort-heat-wrap .home-sort-btn {
    flex: 0 0 auto;
  }

  .home-sort-formula-help {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }

  .filter-chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .filter-chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .rank-tab-row--scroll {
    margin-right: 0;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .rank-tab {
    min-height: 44px;
  }

  .post-toolbar .btn,
  .post-toolbar__report-btn {
    min-height: 44px;
  }

  .rank-custom-range {
    flex-direction: column;
    align-items: stretch;
  }

  .rank-custom-range__sep {
    align-self: center;
    padding-bottom: 0;
  }

  .modal-backdrop {
    padding: 10px;
    align-items: center;
  }

  .modal-content,
  .modal,
  .modal--wide {
    width: 95%;
    max-width: 95%;
    padding: 12px;
    box-sizing: border-box;
  }

  .platform-modal-backdrop {
    padding: 10px;
    padding-bottom: calc(10px + var(--safe-bottom));
    align-items: center;
  }

  .platform-modal,
  .platform-modal--doc {
    width: min(100%, 95vw);
    max-width: 95vw;
    box-sizing: border-box;
  }

  .platform-modal__title-system-scroll {
    max-height: min(52vh, 420px);
  }

  .bottom-nav {
    padding-top: 6px;
    padding-bottom: max(10px, calc(8px + var(--safe-bottom)));
  }

  .bottom-nav__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
  }

  .bottom-nav__btn {
    min-height: 48px;
    justify-content: center;
  }

  .bottom-nav__icon {
    font-size: 26px;
  }
}

/* —— 统一横向滚动容器、表格响应式、超窄屏标题（追加） —— */

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

@media (max-width: 767px) {
  .table-responsive > table {
    min-width: 600px;
  }
}

@media (max-width: 767px) {
  .scrollable-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    max-width: 100%;
    min-width: 0;
    scrollbar-width: thin;
  }

  .scrollable-buttons > .rank-tab,
  .scrollable-buttons > .home-sort-btn,
  .scrollable-buttons > .filter-chip,
  .scrollable-buttons > .home-sort-heat-wrap,
  .scrollable-buttons > .header-nav-btn {
    flex: 0 0 auto;
  }

  .header-nav-btns.scrollable-buttons {
    justify-content: flex-end;
    padding-bottom: 4px;
  }
}

@media (min-width: 768px) {
  .header-nav-btns.scrollable-buttons {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .scrollable-buttons:not(.header-nav-btns) {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

@media (max-width: 480px) {
  .header-nav-btn {
    font-size: 0.72rem;
  }

  .rank-capture .gst-brand-stamp,
  .rank-capture .gst-brand-stamp__suffix {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .rank-capture .gst-brand-stamp__suffix {
    display: inline;
    white-space: normal;
    word-break: break-all;
  }
}

/* —— 管理员：待审核 / 敏感词 / 信誉 —— */
.admin-pending-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.admin-pending-table td,
.admin-pending-table th,
.admin-reputation-table td,
.admin-reputation-table th {
  font-size: 0.82rem;
  vertical-align: middle;
}

.admin-banned-kw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-banned-kw-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.admin-banned-kw-item code {
  font-size: 0.85rem;
  word-break: break-all;
}

.admin-banned-kw-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.admin-banned-kw-add-row input {
  flex: 1 1 200px;
  min-width: 0;
}

.admin-rep-clear-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  margin-top: 4px;
}

/* 统一后台列表分页、待审阈值、敏感词折叠、信誉公式 */
.admin-list-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.admin-pager-goto-input {
  width: 4.5rem;
  min-height: 36px;
  padding: 6px 8px;
}

.admin-pending-threshold-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 10px 0 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.admin-pending-threshold-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.admin-pending-threshold-input {
  width: 5rem;
  min-height: 38px;
}

.admin-pending-threshold-hint {
  flex: 1 1 200px;
  font-size: 0.78rem;
  margin: 0;
}

.admin-banned-kw-expand-row {
  margin-top: 8px;
}

.admin-banned-kw-more-hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
}

.admin-rep-formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

@media (max-width: 480px) {
  .admin-rep-formula-grid {
    grid-template-columns: 1fr;
  }
}

/* 个人中心：申诉 / 反馈子页 */
.profile-sub-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 16px;
}

.profile-sub-card--btn {
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}

.profile-sub-card--btn:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.profile-sub-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.profile-sub-card__hint {
  margin: 6px 0 4px;
  font-size: 0.82rem;
  line-height: 1.4;
  word-break: break-word;
}

.profile-sub-card__time {
  font-size: 0.75rem;
}

.appeal-modal__hint,
.appeal-modal__target {
  margin: 4px 0 0;
  font-size: 0.86rem;
}

.feedback-readonly {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 0.86rem;
  line-height: 1.45;
  max-height: 160px;
  overflow: auto;
}

/* 申诉与反馈统一页 */
.ufa-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
}

.ufa-intro {
  margin-bottom: 0;
}

.ufa-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.ufa-panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.ufa-panel__summary::-webkit-details-marker {
  display: none;
}

.ufa-panel__summary::after {
  content: "▼";
  font-size: 0.72rem;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.ufa-panel:not([open]) .ufa-panel__summary::after {
  transform: rotate(-90deg);
}

.ufa-panel__body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
}

.ufa-form {
  padding-top: 14px;
  margin-bottom: 16px;
}

.ufa-form textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.ufa-list-title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 600;
}

.ufa-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ufa-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.ufa-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 8px;
}

.ufa-item__time {
  margin-left: auto;
  font-size: 0.75rem;
}

.ufa-item__content,
.ufa-item__reason,
.ufa-item__target {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}

.ufa-item__target {
  margin-bottom: 6px;
}

.ufa-item__reply,
.ufa-item__result {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 0.86rem;
  line-height: 1.45;
}

.ufa-item__reply-label {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .ufa-panel__summary {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .ufa-panel__body {
    padding: 0 12px 12px;
  }

  .ufa-item__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .ufa-item__time {
    margin-left: 0;
  }
}

/* 管理后台：申诉 / 反馈 */
.admin-subnav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-appeal-list,
.admin-feedback-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.admin-empty-hint {
  padding: 16px;
}

.admin-appeal-details,
.admin-feedback-details {
  padding: 0;
  overflow: hidden;
}

.admin-appeal-summary,
.admin-feedback-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.admin-appeal-summary::-webkit-details-marker,
.admin-feedback-summary::-webkit-details-marker {
  display: none;
}

.admin-appeal-summary__main,
.admin-feedback-summary__main {
  flex: 1 1 200px;
  min-width: 0;
}

.admin-appeal-summary__side,
.admin-feedback-summary__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.admin-appeal-inline-actions,
.admin-feedback-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.admin-appeal-body,
.admin-feedback-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
}

.admin-appeal-fulltext {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 8px;
}

.app-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 28, 0.45);
  backdrop-filter: blur(2px);
}

.app-loading.hidden {
  display: none;
}

.app-loading__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--card, #fff);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.app-loading__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent, #6366f1);
  border-radius: 50%;
  animation: app-loading-spin 0.8s linear infinite;
}

.app-loading__text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted, #666);
}

@keyframes app-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.home-load-more-wrap {
  padding: 12px 0 4px;
  text-align: center;
}

.pill--arena {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  color: #fff;
  font-size: 0.68rem;
  vertical-align: middle;
}

.pill--challenger {
  background: linear-gradient(135deg, #7c2d12, #b45309);
}

.publish-arena-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 8px 0;
}

.publish-arena-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
}

.poll-list-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.poll-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.poll-list-count {
  margin: 0 0 10px;
  font-size: 0.85rem;
}

.admin-poll-media-report {
  margin: 10px 0 0;
  padding: 10px;
  max-height: 200px;
  overflow: auto;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  background: var(--surface-2, rgba(0, 0, 0, 0.04));
  border-radius: 8px;
}

.admin-poll-opt-row__order {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recommend-poll {
  margin-top: 12px;
}

.recommend-poll__heading {
  margin: 0 0 4px;
  font-size: 1rem;
}

.recommend-poll__hint {
  margin: 0 0 10px;
  font-size: 0.8rem;
}

.recommend-poll-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border, #2d3340);
  background: var(--surface-2, #1a1d24);
}

.recommend-poll-card__body {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
}

.recommend-poll-card__title {
  margin: 0 0 6px;
  font-size: 1rem;
}

.recommend-poll-card__preview,
.recommend-poll-card__meta {
  margin: 0;
  font-size: 0.82rem;
}

.poll-list-wrap {
  background: var(--surface-2, #1a1d24);
  border-radius: var(--radius-sm, 10px);
  border: 1px solid var(--border, #2d3340);
  padding: 12px;
}

.poll-list-card {
  flex: 0 0 min(280px, 85vw);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border, #2d3340);
  background: var(--surface-2, #1a1d24);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  color: var(--text, #e8eaed);
}

.poll-list-card .muted {
  color: var(--text-muted, #9aa0a6);
}

.poll-detail-capture.rank-capture,
.poll-rank-capture {
  text-align: center;
  line-height: 1.65;
  padding: 20px 16px;
}

.poll-detail-capture .poll-opt-grid {
  justify-items: center;
  margin: 0 auto;
  max-width: 720px;
}

.poll-detail-capture .poll-opt-card {
  text-align: center;
  line-height: 1.55;
}

.poll-detail-capture .rank-capture__title {
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.5;
}

.publish-arena-mode-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 8px;
}

.publish-arena-mode-btn.is-active {
  background: var(--accent, #6366f1);
  color: #fff;
  border-color: transparent;
}

.publish-arena-config {
  margin: 10px 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2, rgba(0, 0, 0, 0.04));
}

.publish-arena-config__row input[type="range"] {
  width: 100%;
  margin-top: 6px;
}

.publish-arena-toggle-row {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 10px;
  max-width: 100%;
  white-space: nowrap;
}

.publish-arena-toggle-row__text {
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: var(--muted);
}

.publish-arena-toggle-row__hint {
  flex: 0 0 auto;
  font-size: 0.78rem;
}

.publish-arena-toggle-row input[type="checkbox"],
.publish-arena-toggle-row .publish-arena-toggle {
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0;
  flex: 0 0 auto;
  margin: 0;
}

.publish-preview-actions {
  justify-content: center !important;
  margin-top: 8px;
}

.timeline-card--arena {
  position: relative;
}

.timeline-card__corner-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.arena-corner-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.arena-corner-badge--host {
  background: #dc2626;
}

.arena-corner-badge--challenger {
  background: #ea580c;
}

.arena-badge--win {
  background: #16a34a !important;
}

.arena-badge--lose {
  background: #6b7280 !important;
}

.arena-card-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border, #e5e7eb);
  font-size: 0.78rem;
  line-height: 1.45;
}

.arena-card-footer__line--scroll {
  overflow-x: auto;
  white-space: nowrap;
}

.arena-nick-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent, #6366f1);
  cursor: pointer;
  font-size: inherit;
}

.post-detail--arena {
  position: relative;
}

.post-detail__corner-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.arena-detail-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.arena-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.arena-mini-card {
  cursor: pointer;
  padding: 10px;
}

.arena-mini-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

.timeline-card__cancel-arena {
  margin-top: 8px;
  width: 100%;
}

.achievement-card__arena-result {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  background: #fef3c7;
  color: #92400e;
}

.admin-poll-opt-media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.admin-poll-opt-media-preview img,
.admin-poll-opt-media-preview video {
  max-width: 64px;
  max-height: 64px;
  border-radius: 4px;
}

.poll-list-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.poll-detail-media-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
  justify-content: center;
}

.poll-detail-media {
  display: block;
  width: auto;
  max-width: min(100%, 420px);
  max-height: min(52vw, 280px);
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface-2, rgba(0, 0, 0, 0.15));
}

.poll-detail-media-wrap video.poll-detail-media {
  max-height: min(56vw, 300px);
}

.poll-opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.poll-opt-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.poll-opt-card__rank {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent, #6366f1);
}

.poll-opt-card__media {
  width: 100%;
  max-width: 120px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2, rgba(0, 0, 0, 0.12));
}

.poll-opt-card .poll-opt-thumb {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 8px;
}

.poll-opt-card h4 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
}

.poll-opt-hero-wrap {
  max-width: min(100%, 360px);
  margin: 12px auto;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2, rgba(0, 0, 0, 0.12));
}

.poll-opt-hero {
  display: block;
  width: 100%;
  max-height: min(70vw, 320px);
  object-fit: contain;
  margin: 0 auto;
}

.poll-opt-hero-wrap video.poll-opt-hero {
  max-height: min(75vw, 340px);
}

[data-view="poll-option"] .post-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

[data-view="poll-option"] #poll-opt-comment-input {
  width: 100%;
  margin: 10px 0;
  box-sizing: border-box;
  min-height: 72px;
}

.profile-fav-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.profile-fav-card__link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.profile-fav-card__link:hover .post-title {
  color: var(--accent, #6366f1);
}

.profile-fav-poll-thumb-wrap {
  flex: 0 0 72px;
  width: 72px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2, rgba(0, 0, 0, 0.12));
}

.profile-fav-poll-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-fav-card__body {
  flex: 1;
  min-width: 0;
}

.profile-fav-card--poll {
  margin-bottom: 10px;
}

.admin-poll-options-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.admin-poll-opt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border, #2d3340);
  border-radius: 10px;
  background: var(--surface-2, rgba(0, 0, 0, 0.15));
}

.admin-poll-opt-row__main {
  flex: 1 1 240px;
  min-width: min(100%, 220px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-poll-opt-row__name {
  display: block;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-poll-opt-row__name input {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 1rem;
  line-height: 1.35;
  box-sizing: border-box;
}

.admin-poll-opt-row__upload {
  align-self: flex-start;
  margin: 0;
}

.admin-poll-opt-row__preview {
  flex: 0 0 88px;
  width: 88px;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-3, rgba(0, 0, 0, 0.2));
  overflow: hidden;
}

.admin-poll-opt-row__preview-placeholder {
  font-size: 0.72rem;
  text-align: center;
  padding: 4px;
  line-height: 1.3;
}

.admin-poll-opt-row__preview img,
.admin-poll-opt-row__preview video,
.admin-poll-opt-thumb {
  display: block;
  width: 100%;
  max-width: 88px;
  max-height: 66px;
  object-fit: cover;
  border-radius: 6px;
}

.admin-poll-opt-row__remove {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-left: auto;
}

.admin-poll-editor label {
  display: block;
  margin: 8px 0;
}

.admin-poll-editor input,
.admin-poll-editor textarea {
  width: 100%;
  margin-top: 4px;
  box-sizing: border-box;
}

#admin-poll-editor-host.admin-poll-editor label {
  display: block;
  margin: 8px 0;
}

#admin-poll-editor-host.admin-poll-editor input[type="text"],
#admin-poll-editor-host.admin-poll-editor input[type="datetime-local"],
#admin-poll-editor-host.admin-poll-editor textarea {
  width: 100%;
  margin-top: 4px;
  box-sizing: border-box;
}
