:root {
  color-scheme: light;
  --bg: #f2f5ed;
  --surface: #fffefa;
  --ink: #182a20;
  --muted: #54645a;
  --faint: #657469;
  --border: #dde5d8;
  --border-strong: #cbd9c7;
  --accent: #116b38;
  --accent-strong: #0a4f28;
  --accent-soft: #e8f4ec;
  --red: #c72e2a;
  --red-strong: #9d211e;
  --red-soft: #fdeceb;
  --gold: #e9ad16;
  --success: #087a3d;
  --success-soft: #eaf8ef;
  --danger: #b42318;
  --danger-strong: #8f1b13;
  --danger-soft: #fff4f2;
  --warning: #9a5b08;
  --warning-soft: #fffaeb;
  --shadow: 0 16px 40px -30px rgba(28, 49, 35, 0.24);
  --radius-lg: 20px;
  --radius-md: 15px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(920px 440px at 88% -180px, rgba(17, 107, 56, 0.12) 0%, rgba(17, 107, 56, 0) 66%),
    radial-gradient(760px 420px at 4% -210px, rgba(199, 46, 42, 0.09) 0%, rgba(199, 46, 42, 0) 62%),
    linear-gradient(135deg, rgba(199, 46, 42, 0.025) 0 22%, transparent 22% 78%, rgba(17, 107, 56, 0.03) 78%),
    var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button[aria-busy="true"] {
  pointer-events: none;
}

input {
  margin: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

svg {
  display: block;
  flex: none;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--ink);
  background: #d9ecd9;
}

:where(button, input, a, textarea):focus-visible {
  outline: 3px solid rgba(17, 107, 56, 0.28);
  outline-offset: 2px;
}

.icon {
  width: 17px;
  height: 17px;
}

.icon-sm {
  width: 14px;
  height: 14px;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 9px 13px;
  border-radius: 9px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  width: min(calc(100% - 28px), 760px);
  margin: 0 auto;
  padding: clamp(12px, 3vw, 28px) 0 max(24px, env(safe-area-inset-bottom));
}

.no-script {
  padding-top: 16px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* 顶部品牌与运动风装饰 */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(16px, 3.2vw, 26px);
  background:
    linear-gradient(150deg, #fffef9 0%, #ffffff 52%, #f5faf3 100%);
  border-color: #dbe5d7;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--red) 0 24%,
    var(--gold) 24% 30%,
    var(--accent) 30% 100%
  );
}

.hero::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -76px;
  width: 224px;
  height: 224px;
  border: 1px solid rgba(17, 107, 56, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(17, 107, 56, 0.025);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand:focus-visible {
  border-radius: 8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: #fffefa;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 3px 0 var(--red);
  font-size: 14px;
  font-style: italic;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand-school {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 760;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-sub {
  margin-top: 2px;
  color: var(--red-strong);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.075em;
  white-space: nowrap;
}

.hero-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 3px;
  margin-left: auto;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #f1f5ee;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.live-pill[data-state="ok"] {
  color: var(--success);
  background: var(--success-soft);
}

.live-pill[data-state="error"] {
  color: var(--danger-strong);
  background: var(--danger-soft);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.top-link,
.admin-entry,
.feedback-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: none;
  min-height: 30px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease,
    border-color 0.15s ease;
}

.top-link {
  color: var(--muted);
}

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

.hero-admin-stack {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 3px;
}

.creator-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 7px;
  border: 1px solid #dfb4d9;
  border-radius: 8px;
  color: #8d1e82;
  background: #fdf2fb;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.creator-entry:hover,
.creator-entry.is-active {
  color: #fff;
  border-color: #8d1e82;
  background: #8d1e82;
}

.creator-entry.is-active {
  box-shadow: 0 0 0 3px rgba(141, 30, 130, 0.12);
}

.creator-entry.is-maintenance,
.creator-entry.is-maintenance:hover {
  color: #6b7280;
  border-color: #d1d5db;
  background: #f3f4f6;
  box-shadow: none;
}

.creator-entry.is-maintenance {
  padding: 0 6px;
  font-size: 9.5px;
  cursor: pointer;
}

.admin-entry {
  color: var(--accent-strong);
  border: 1px solid #cddfcd;
  background: #f7fbf3;
}

.admin-entry:hover {
  color: var(--accent-strong);
  border-color: #b6d0b7;
  background: var(--accent-soft);
}

.feedback-entry {
  color: var(--red-strong);
  border: 1px solid #edcbc8;
  background: var(--red-soft);
  font-family: inherit;
}

.feedback-entry:hover {
  color: var(--red-strong);
  border-color: #dfa9a4;
  background: #fce3e1;
}

.top-link:active,
.admin-entry:active,
.feedback-entry:active {
  transform: translateY(1px);
}

.sport-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 11px 0 0;
  color: var(--red-strong);
  font-size: 8.5px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0.14em;
}

.sport-number {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 17px;
  padding: 0 4px;
  border-radius: 4px;
  color: #fff;
  background: var(--red);
  font-size: 9px;
  letter-spacing: 0.02em;
  transform: skewX(-8deg);
}

.poll-title {
  max-width: 20em;
  margin: 6px 0 6px;
  font-size: clamp(22px, 5.2vw, 32px);
  font-weight: 760;
  line-height: 1.26;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.poll-description {
  max-width: 46em;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: clamp(12.5px, 2.6vw, 14px);
  line-height: 1.65;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #e0e9db;
  border-radius: 13px;
  background: linear-gradient(180deg, #f8fbf5, #f4f8f0);
}

.stat {
  min-width: 0;
  padding: 10px 12px;
}

.stat + .stat {
  border-left: 1px solid #e0e9db;
}

.stat-value {
  display: block;
  color: var(--ink);
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 730;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
  white-space: nowrap;
}

/* 连接错误 */
.connection-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #f2c7bd;
  border-radius: 13px;
  color: #8e352b;
  background: var(--danger-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

.connection-banner button {
  flex: none;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: #8e352b;
  background: #fff;
  border: 1px solid #edb8af;
  font-size: 12px;
  font-weight: 650;
}

.connection-banner button:hover {
  background: #fffaf9;
}

/* 添加选项 */
.add-card {
  margin-top: 10px;
  padding: 15px;
}

.add-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.add-heading h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.add-tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--red-strong);
  background: var(--red-soft);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.6;
  white-space: nowrap;
}

.add-row {
  display: flex;
  align-items: stretch;
  gap: 9px;
}

.option-input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--ink);
  background: #fbfdf9;
  font-size: 16px;
  line-height: 1;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.option-input::placeholder {
  color: var(--faint);
}

.option-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17, 107, 56, 0.13);
}

.option-input.is-invalid {
  border-color: #e48278;
  background: #fffdfc;
}

.option-input.is-invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(199, 57, 47, 0.1);
}

.option-input:disabled {
  color: var(--muted);
  background: #f4f7f1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.08s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.995);
}

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

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

.add-btn {
  flex: none;
  min-width: 112px;
  height: 44px;
  border-radius: 10px;
}

.review-hint {
  margin: 6px 1px 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.55;
}

.form-message {
  min-height: 18px;
  margin: 4px 1px 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.form-message.is-success {
  color: var(--success);
}

/* 加载与榜单 */
.results {
  margin-top: 20px;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 3px;
}

.results-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.results-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.results-count {
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sort-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  padding: 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  text-align: center;
}

.loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: loading-pulse 1.2s ease-in-out infinite;
}

@keyframes loading-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.option-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.option-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.option-card.is-voted {
  border-color: #bedcc6;
  background: #fcfdf9;
}

.option-card.just-added {
  border-color: #81b594;
  background: #f7fbf7;
}

.rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--muted);
  background: #f1f5ee;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.option-card:first-child .rank {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.option-main {
  min-width: 0;
}

.option-heading {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  margin-bottom: 8px;
}

.option-text {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 620;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.voted-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-top: 1px;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}

.meter-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.vote-count strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.percent {
  color: var(--faint);
  white-space: nowrap;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eee3;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.28s ease;
}

.progress-fill.has-votes {
  min-width: 4px;
}

.option-card.is-voted .progress-fill {
  background: var(--accent-strong);
}

.vote-btn {
  align-self: center;
  min-width: 62px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.08s ease;
}

.vote-btn:hover:not(:disabled) {
  background: var(--accent-strong);
}

.vote-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

.vote-btn.is-voted {
  color: #425446;
  border-color: var(--border-strong);
  background: #fff;
}

.vote-btn.is-voted:hover:not(:disabled) {
  color: var(--danger-strong);
  border-color: #f2b8b2;
  background: var(--danger-soft);
}

.empty-state {
  padding: 34px 20px 32px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.empty-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 13px;
  border-radius: 14px;
  color: var(--accent);
  background: var(--accent-soft);
}

.empty-symbol .icon {
  width: 21px;
  height: 21px;
}

.empty-state h3 {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 650;
}

.empty-state p {
  max-width: 25em;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* 工具区 */
.tools-card {
  margin-top: 16px;
  padding: 14px;
}

.tool-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

body.is-admin .tool-actions {
  grid-template-columns: 1fr 1fr;
}

.tool-btn {
  min-height: 44px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
}

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

.copy-btn:hover:not(:disabled) {
  background: var(--accent-strong);
}

.reset-btn {
  color: #425446;
  border: 1px solid var(--border-strong);
  background: #fff;
}

.reset-btn:hover:not(:disabled) {
  color: var(--danger-strong);
  border-color: #f0b4ad;
  background: var(--danger-soft);
}

.tool-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.995);
}

.local-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.6;
  text-align: center;
}

.local-note .icon {
  width: 13px;
  height: 13px;
  margin-top: 2px;
}

/* 页脚 */
.disclaimer {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #ecd7ac;
  border-radius: var(--radius-md);
  background: #fffaf0;
}

.disclaimer h2 {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 4px;
  color: #7c560b;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.disclaimer h2::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 1px;
  background: var(--gold);
  transform: skewX(-12deg);
}

.disclaimer p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
  text-wrap: pretty;
}

.page-footer {
  padding: 22px 6px 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  text-align: center;
  text-wrap: pretty;
}

.page-footer p {
  max-width: 620px;
  margin: 0 auto;
}

.page-footer strong {
  color: #425446;
  font-weight: 650;
}

.footnote-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px !important;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.footer-link {
  padding: 2px 1px;
  color: var(--muted);
  font-size: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.footer-link:hover:not(:disabled) {
  color: var(--ink);
}

/* 弹窗 */
.dialog {
  width: min(calc(100vw - 28px), 480px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.26);
}

.dialog::backdrop {
  background: rgba(17, 24, 39, 0.42);
}

.dialog-body {
  padding: 21px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 730;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.dialog-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  margin: -6px -6px 0 0;
  border-radius: 9px;
  color: var(--muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.dialog-close:hover {
  color: var(--ink);
  background: #f1f5ee;
}

.dialog-desc {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.field {
  display: block;
  margin-bottom: 13px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: #2f4135;
  font-size: 12px;
  font-weight: 650;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  color: var(--ink);
  background: #fbfdf9;
  font-size: 16px;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.field input::placeholder {
  color: var(--faint);
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17, 107, 56, 0.13);
}

.field input[aria-invalid="true"] {
  border-color: #e48278;
}

.dialog .form-message {
  margin-bottom: 5px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 6px;
}

.dialog-actions .btn {
  min-height: 44px;
  font-size: 13.5px;
}

.btn-quiet {
  color: #425446;
  background: #f1f5ee;
}

.btn-quiet:hover {
  background: #e9edf3;
}

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

.btn-danger:hover:not(:disabled) {
  background: var(--danger-strong);
}

.reset-summary {
  margin: -4px 0 13px;
  padding: 11px 12px;
  border: 1px solid #f2d4d0;
  border-radius: 10px;
  color: #8f3a32;
  background: var(--danger-soft);
  font-size: 12px;
  line-height: 1.65;
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}

.check-field input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

/* 轻提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  max-width: min(92vw, 430px);
  padding: 10px 15px;
  border-radius: 11px;
  color: #fff;
  background: #172033;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.22);
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.toast.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 小屏优化 */
@media (max-width: 520px) {
  .page {
    width: min(calc(100% - 24px), 760px);
  }

  .hero,
  .wall-hero,
  .add-card {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero {
    border-radius: 18px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: 12.5px;
  }

  .brand-school {
    font-size: 11.5px;
  }

  .brand-sub {
    font-size: 8px;
    letter-spacing: 0.05em;
  }

  .hero-top {
    gap: 6px 8px;
  }

  .hero-tools {
    gap: 2px;
  }

  .top-link,
  .admin-entry,
  .feedback-entry {
    min-height: 28px;
    padding: 0 6px;
    font-size: 10px;
  }

  .top-link .icon-sm,
  .admin-entry .icon-sm,
  .feedback-entry .icon-sm {
    display: none;
  }

  .sport-eyebrow {
    margin-top: 9px;
    font-size: 8px;
  }

  .stat {
    padding: 8px 9px;
  }

  .stat-value {
    font-size: 17px;
  }

  .stat-label {
    font-size: 9.5px;
  }

  .add-row {
    flex-direction: column;
  }

  .add-btn {
    width: 100%;
    min-width: 0;
  }

  .option-card {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    column-gap: 10px;
    padding: 11px 12px;
  }

  .rank {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: 11px;
  }

  .option-heading {
    margin-bottom: 6px;
  }

  .option-text {
    font-size: 13.8px;
  }

  .vote-btn {
    min-width: 56px;
    min-height: 36px;
    padding: 0 9px;
    font-size: 12px;
  }

  .empty-state {
    padding: 26px 16px 24px;
  }

  .dialog-body {
    padding: 19px;
  }

  .dialog-actions {
    gap: 8px;
  }

  .admin-topbar .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 11px;
  }

  .admin-topbar .brand-school {
    font-size: 11px;
  }

  .admin-login-mark {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    font-size: 18px;
  }
}

@media (max-width: 380px) {
  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 11.5px;
  }

  .brand-school {
    font-size: 11px;
  }

  .brand-sub {
    font-size: 7.5px;
  }

  .top-link,
  .admin-entry,
  .feedback-entry {
    font-size: 9.5px;
    padding: 0 4px;
  }

  .option-card {
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 9px;
    row-gap: 9px;
  }

  .rank {
    width: 26px;
    height: 26px;
  }

  .vote-btn {
    grid-column: 2;
    justify-self: stretch;
    width: 100%;
    min-height: 36px;
  }

  .admin-topbar {
    flex-wrap: wrap;
  }

  .admin-toplinks {
    width: 100%;
    justify-content: flex-end;
  }
}

/* 校园墙 */
.wall-hero {
  padding: clamp(15px, 3vw, 24px);
}

.wall-title {
  position: relative;
  display: inline-block;
  margin: 2px 0 4px;
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 780;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.wall-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 7px;
  border-radius: 2px;
  background: var(--red);
  transform: skewX(-22deg);
}

.wall-subtitle {
  max-width: 42em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(12.5px, 2.6vw, 14px);
  line-height: 1.6;
  text-wrap: pretty;
}

.wall-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}

.wall-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--red-strong);
  background: var(--red-soft);
  font-size: 10.5px;
  font-weight: 650;
}

.wall-meta-separator {
  width: 1px;
  height: 13px;
  background: var(--border-strong);
}

.wall-meta-line .live-pill {
  min-height: 23px;
  padding: 0 7px;
  font-size: 9.5px;
}

.wall-sync-copy {
  font-size: 10px;
  color: var(--faint);
}

.wall-compose {
  margin-top: 10px;
  padding: 15px;
}

.wall-compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.wall-compose-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.wall-compose-head p {
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}

.wall-form {
  display: grid;
  gap: 7px;
}

.composer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wall-nickname {
  width: min(260px, 100%);
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--ink);
  background: #fbfdf9;
  font-size: 14px;
}

.wall-textarea {
  width: 100%;
  min-height: 82px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  color: var(--ink);
  background: #fbfdf9;
  font-size: 14.5px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.wall-nickname::placeholder,
.wall-textarea::placeholder {
  color: var(--faint);
}

.wall-nickname:focus,
.wall-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17, 107, 56, 0.13);
}

.wall-nickname.is-invalid,
.wall-textarea.is-invalid {
  border-color: #d98b80;
  background: #fffdfc;
}

.composer-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid #e7d9b7;
  border-radius: 8px;
  background: #fffbf0;
}

.composer-identity-label {
  flex: none;
  color: #7c560b;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.composer-identity-select {
  min-width: 0;
  flex: 1;
  height: 31px;
  padding: 0 24px 0 8px;
  border: 1px solid #e2d3ab;
  border-radius: 6px;
  color: var(--ink);
  background: #fffefa;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
}

.composer-identity-select:focus {
  outline: 3px solid rgba(17, 107, 56, 0.14);
  outline-offset: 1px;
}

.reply-identity {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 5px 7px;
  border: 1px solid #e7d9b7;
  border-radius: 7px;
  background: #fffbf0;
}

.reply-identity-label {
  flex: none;
  color: #7c560b;
  font-size: 9.5px;
  font-weight: 650;
}

.reply-identity-select {
  min-width: 0;
  flex: 1;
  height: 28px;
  padding: 0 22px 0 7px;
  border: 1px solid #e2d3ab;
  border-radius: 6px;
  color: var(--ink);
  background: #fffefa;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
}

.reply-identity-select:focus {
  outline: 3px solid rgba(17, 107, 56, 0.14);
  outline-offset: 1px;
}

.composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 18px;
}

.composer-hint {
  margin: 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}

.wall-char-count {
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wall-char-count.is-near {
  color: var(--warning);
}

.wall-form-message {
  min-height: 16px;
  margin: -1px 1px 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

.wall-submit-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.wall-submit-btn {
  min-width: 112px;
  min-height: 40px;
  border-radius: 10px;
  font-size: 13px;
}

.wall-feed {
  margin-top: 20px;
}

.wall-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 3px;
}

.wall-feed-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 16px;
  font-weight: 730;
  letter-spacing: -0.02em;
}

.wall-feed-head h2::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 1px;
  background: var(--red);
  transform: skewX(-16deg);
}

.wall-feed-note {
  color: var(--faint);
  font-size: 10.5px;
}

.message-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.message-card {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 49, 35, 0.025);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.message-card.just-added {
  border-color: #81b594;
  background: #f7fbf7;
}

.message-card.is-pinned {
  border-color: #e6d3a5;
}

.message-pin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 5px;
  border-radius: 4px;
  color: #7c560b;
  background: #fdf3d9;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.message-card.is-creator .message-author {
  color: var(--red-strong);
  font-weight: 700;
}

.message-avatar.is-friend-action,
.message-author.is-friend-action {
  cursor: pointer;
}

.message-author.is-friend-action {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.message-add-friend-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid #a9c9aa;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-family: inherit;
  font-size: 8.5px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.message-add-friend-btn:hover {
  border-color: var(--accent);
  background: #dfefd9;
}

.message-add-friend-btn:focus-visible {
  outline: 3px solid rgba(17, 107, 56, 0.16);
  outline-offset: 2px;
}

.message-withdraw-btn,
.message-reply-withdraw,
.friend-chat-withdraw {
  flex: none;
  padding: 1px 3px;
  border: 0;
  color: var(--faint);
  background: transparent;
  font-family: inherit;
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

.message-withdraw-btn:hover,
.message-reply-withdraw:hover,
.friend-chat-withdraw:hover {
  color: var(--red-strong);
  text-decoration: underline;
}

.message-reply-withdraw {
  margin-left: auto;
}

.message-withdraw-btn {
  margin-left: 2px;
}

.friend-chat-withdraw {
  margin-top: 0;
}

.friend-chat-message.is-retracted .friend-chat-bubble {
  color: var(--faint);
  background: #f0f3ee;
  font-style: italic;
}

.message-avatar.is-friend-action:hover {
  border-color: #9fc4a0;
  box-shadow: 0 0 0 2px rgba(143, 185, 139, 0.18);
}

.message-avatar.is-friend-action:focus-visible,
.message-author.is-friend-action:focus-visible {
  outline: 3px solid rgba(17, 107, 56, 0.16);
  outline-offset: 2px;
}

.message-card.is-creator .message-avatar {
  color: var(--red-strong);
  background: var(--red-soft);
}

.message-reply-item.is-creator .message-reply-author {
  color: var(--red-strong);
  font-weight: 700;
}

.message-reply-item.is-creator .message-reply-avatar {
  color: var(--red-strong);
  background: var(--red-soft);
}

.message-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.message-card.is-wall-creator,
.message-card.is-personalized {
  border-color: #dfb4d9;
  background:
    linear-gradient(135deg, rgba(255, 247, 254, 0.96), #fff 62%);
  box-shadow: 0 0 0 1px rgba(190, 115, 183, 0.08),
    0 8px 24px rgba(141, 30, 130, 0.07);
}

.message-card.is-wall-creator .message-author,
.message-card.is-personalized .message-author {
  color: #9b1b8e;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(196, 72, 181, 0.18);
}

.message-card.is-wall-creator .message-body,
.message-card.is-personalized .message-body {
  color: var(--creator-text-color, #9b1b8e);
}

.message-reply-item.is-wall-creator .message-reply-body,
.message-reply-item.is-personalized .message-reply-body {
  color: var(--creator-text-color, #9b1b8e);
}

.message-card.is-personalized.has-personal-background .message-body {
  padding: 10px 12px;
  border-radius: 9px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.76)),
    var(--personal-background-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.message-card.is-wall-creator .message-avatar,
.message-card.is-personalized .message-avatar {
  border: 1px solid #d79bcf;
  color: #9b1b8e;
  background-color: #fbebf8;
  box-shadow: 0 0 0 3px rgba(190, 115, 183, 0.1);
}

.message-avatar.has-custom-avatar,
.message-reply-avatar.has-custom-avatar {
  color: transparent !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.creator-particles {
  position: absolute;
  top: -4px;
  left: -3px;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 2;
}

.creator-particles i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #d344bd;
  box-shadow: 0 0 6px rgba(211, 68, 189, 0.75);
  animation: creatorParticleFloat 2.3s ease-in-out infinite;
}

.creator-particles i:nth-child(1) {
  top: 3px;
  left: 1px;
  animation-delay: 0s;
}

.creator-particles i:nth-child(2) {
  top: 0;
  left: 19px;
  animation-delay: 0.35s;
  background: #a0208a;
}

.creator-particles i:nth-child(3) {
  top: 17px;
  left: -2px;
  animation-delay: 0.7s;
  width: 3px;
  height: 3px;
}

.creator-particles i:nth-child(4) {
  top: 24px;
  left: 18px;
  animation-delay: 1.05s;
  background: #f08de0;
}

.creator-particles i:nth-child(5) {
  top: 8px;
  left: 26px;
  animation-delay: 1.4s;
  width: 3px;
  height: 3px;
}

.creator-particles i:nth-child(6) {
  top: 25px;
  left: 7px;
  animation-delay: 1.75s;
  background: #a0208a;
}

@keyframes creatorParticleFloat {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(1px) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translateY(-4px) scale(1.15);
  }
}

.message-reply-item.is-wall-creator .message-reply-author,
.message-reply-item.is-personalized .message-reply-author {
  color: #9b1b8e;
  font-weight: 750;
}

.message-reply-item.is-wall-creator .message-reply-avatar,
.message-reply-item.is-personalized .message-reply-avatar {
  border: 1px solid #d79bcf;
  color: #9b1b8e;
  background-color: #fbebf8;
}

.message-meta-line {
  flex: 1;
}

.message-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 9.5px;
  font-weight: 750;
}

.message-meta-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1px 7px;
  min-width: 0;
}

.message-author {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.message-time {
  margin: 0;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.3;
}

.message-time::before {
  content: "·";
  margin-right: 5px;
  color: var(--border-strong);
}

.message-body {
  margin: 0;
  color: #2f4135;
  font-size: 12.8px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-body.is-collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.message-expand-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 21px;
  margin: 2px auto 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-strong);
  background: #f8fbf5;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.message-expand-btn:hover {
  border-color: #b8d2bb;
  background: var(--accent-soft);
}

.message-expand-arrow {
  transition: transform 0.18s ease;
}

.message-card.is-expanded .message-expand-arrow {
  transform: rotate(180deg);
}

.message-footer {
  display: flex;
  align-items: center;
  flex: none;
  justify-content: flex-end;
  min-height: 0;
  margin-top: 0;
}

.message-replies-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 23px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  color: var(--accent-strong);
  background: #f2f7ef;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1;
}

.message-replies-toggle:hover {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.message-replies-toggle .icon-sm {
  width: 12px;
  height: 12px;
}

.message-reply-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: #fffefa;
  font-size: 8.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.message-replies-arrow {
  color: var(--faint);
  transition: transform 0.18s ease;
}

.message-card.replies-open .message-replies-arrow {
  transform: rotate(180deg);
}

.message-replies-panel {
  margin-top: 4px;
  padding: 9px 10px 10px;
  border: 1px solid #e4ecdf;
  border-radius: 10px;
  background: #f8fbf5;
}

.message-reply-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.message-reply-item {
  padding-bottom: 7px;
  border-bottom: 1px solid #e8efe4;
}

.message-reply-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.message-reply-item.is-target {
  border-radius: 7px;
  background: #eef8ea;
  box-shadow: 0 0 0 2px #b9d8b7;
  animation: replyTargetPulse 1.4s ease-in-out 2;
}

@keyframes replyTargetPulse {
  0%,
  100% {
    box-shadow: 0 0 0 2px #b9d8b7;
  }
  50% {
    box-shadow: 0 0 0 5px rgba(143, 185, 139, 0.28);
  }
}

.message-reply-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  margin-bottom: 2px;
}

.message-reply-avatar {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 700;
}

.message-reply-author {
  margin: 0;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.4;
}

.message-reply-time {
  margin: 0;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.4;
}

.message-reply-time::before {
  content: "·";
  margin-right: 4px;
  color: var(--border-strong);
}

.message-reply-body {
  margin: 0;
  color: #3c4f41;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-replies-empty {
  margin: 0 0 7px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}

.message-reply-form {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #dce7d7;
}

.message-reply-list:empty + .message-replies-empty {
  margin-top: 0;
}

.message-reply-input {
  width: 100%;
  min-height: 57px;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fffefa;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

.message-reply-input::placeholder {
  color: var(--faint);
}

.message-reply-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17, 107, 56, 0.1);
}

.message-reply-input.is-invalid {
  border-color: #d98b80;
}

.message-reply-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 5px;
}

.message-reply-char {
  margin-right: auto;
  color: var(--faint);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.message-reply-submit {
  min-height: 31px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 11px;
}

.message-reply-error {
  min-height: 0;
  margin: 4px 1px 0;
  color: var(--danger);
  font-size: 10.5px;
  line-height: 1.5;
}

.message-reply-error:empty {
  display: none;
}

.wall-more {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
}

/* 意见箱 */
.feedback-dialog .dialog-desc {
  margin-bottom: 14px;
}

.feedback-content-field {
  margin-bottom: 4px;
}

.feedback-textarea {
  min-height: 112px;
}

.feedback-counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 17px;
  margin: 6px 1px 0;
}

.feedback-hint {
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}

.feedback-char-count {
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.feedback-char-count.is-near {
  color: var(--warning);
}

.feedback-success {
  padding: 8px 4px 4px;
  text-align: center;
}

.feedback-success-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 22px;
  font-weight: 750;
}

.feedback-success h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 730;
}

.feedback-success p {
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.feedback-done {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
}

/* 管理后台 */
.admin-page {
  width: min(calc(100% - 28px), 900px);
}

.admin-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  padding: 14px 16px;
}

.admin-topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--red) 0 24%,
    var(--gold) 24% 30%,
    var(--accent) 30% 100%
  );
}

.admin-topbar .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 2px 0 var(--red);
  font-size: 12px;
}

.admin-toplinks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-login-view {
  padding: clamp(22px, 4.5vw, 38px);
}

.admin-login-inner {
  max-width: 430px;
  margin: 0 auto;
}

.admin-login-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  border-radius: 17px;
  color: #fffefa;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 4px 0 var(--red);
  font-size: 21px;
  font-style: italic;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

.admin-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red-strong);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.07em;
}

.admin-login-view h1,
.admin-dashboard h1 {
  margin: 9px 0 6px;
  font-size: clamp(23px, 4.8vw, 30px);
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.admin-desc {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.admin-login-view .field {
  margin-bottom: 8px;
}

.admin-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 3px;
}

.admin-hint {
  margin: 13px 0 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.6;
}

.admin-loading {
  margin-top: 14px;
}

.admin-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 22px 3px 16px;
}

.admin-dashboard-head h1 {
  margin: 4px 0 4px;
}

.admin-dashboard-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.admin-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.admin-stat {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
}

.admin-stat strong {
  display: block;
  color: var(--ink);
  font-size: 23px;
  font-weight: 730;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.admin-stat span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.admin-card {
  margin-top: 12px;
  padding: 17px;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.admin-count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--red-strong);
  background: var(--red-soft);
  font-size: 10px;
  font-weight: 650;
}

.admin-count-badge.is-green {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.feedback-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feedback-item {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: #fbfdf9;
}

.feedback-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin-bottom: 4px;
}

.feedback-item-author {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.feedback-item-time {
  color: var(--faint);
  font-size: 9.5px;
}

.feedback-item-content {
  margin: 0;
  color: #2f4135;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pending-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdf9;
}

.pending-main {
  min-width: 0;
}

.pending-text {
  margin: 0;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.pending-meta {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 10.5px;
}

.pending-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 6px;
}

.small-btn {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 650;
}

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

.approve-btn:hover:not(:disabled) {
  background: var(--accent-strong);
}

.reject-btn {
  color: var(--danger-strong);
  border: 1px solid #f0c5c0;
  background: #fff;
}

.reject-btn:hover:not(:disabled) {
  background: var(--danger-soft);
}

.admin-empty {
  margin: 0;
  padding: 21px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.admin-note {
  margin: 9px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
}

.admin-form {
  display: grid;
  gap: 2px;
}

.admin-form .field input {
  font-size: 15px;
}

.admin-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 3px;
}

.admin-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-danger-zone {
  padding: 17px;
  border: 1px solid #f0d6d2;
  border-radius: var(--radius-lg);
  background: #fffdfc;
}

.admin-danger-zone h2 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #7a2e27;
}

.admin-danger-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.admin-footer {
  padding-top: 22px;
}

.admin-hidden {
  display: none !important;
}

@media (max-width: 700px) {
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard-head {
    align-items: flex-start;
  }

  .pending-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .pending-actions {
    width: 100%;
  }

  .pending-actions .small-btn {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .wall-hero,
  .wall-compose {
    padding-left: 16px;
    padding-right: 16px;
  }

  .composer-top {
    align-items: stretch;
    flex-direction: column;
  }

  .wall-nickname {
    width: 100%;
  }

  .composer-bar {
    align-items: flex-start;
  }

  .wall-submit-btn {
    flex: 1;
  }

  .wall-submit-row {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .admin-page {
    width: min(calc(100% - 24px), 900px);
  }

  .admin-card,
  .admin-danger-zone {
    padding: 15px;
  }

  .admin-topbar {
    padding: 12px 13px;
  }

  .admin-topbar .brand {
    font-size: 11px;
  }

  .admin-head-actions {
    width: 100%;
  }

  .admin-head-actions .btn {
    flex: 1;
  }
}

@media (max-width: 380px) {
  .hero-tools {
    gap: 2px;
  }

  .top-link,
  .admin-entry {
    font-size: 10.5px;
    padding: 0 5px;
  }

  .brand {
    font-size: 11px;
  }

  .admin-link-label {
    display: none;
  }
}

/* 发布者榜单 */
.poll-hero {
  overflow: hidden;
}

.poll-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
}

.poll-create-btn {
  min-height: 42px;
  padding: 0 16px;
  font-size: 13px;
}

.poll-hero-hint {
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}

.poll-hero .stats {
  margin-top: 12px;
}

.poll-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: -2px 0 5px -3px;
  padding: 3px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

.poll-back-btn:hover {
  color: var(--accent-strong);
}

.poll-detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 1px;
}

.poll-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.poll-meta-chip.is-version {
  color: var(--red-strong);
  background: var(--red-soft);
}

.poll-meta-text {
  color: var(--faint);
  font-size: 10px;
}

.poll-notice {
  margin-top: 10px;
  padding: 9px 11px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  color: var(--muted);
  background: #f5f9f2;
  font-size: 11px;
  line-height: 1.55;
}

.poll-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 10px;
}

.poll-detail-actions .btn {
  min-height: 38px;
  font-size: 12px;
}

.poll-status-banner {
  color: #6f4d09;
  border-color: #ead4a5;
  background: #fff9e9;
}

.poll-status-banner.is-rejected {
  color: #8e352b;
  border-color: #f2c7bd;
  background: var(--danger-soft);
}

.poll-section-note {
  color: var(--faint);
  font-size: 10.5px;
  white-space: nowrap;
}

.poll-vote-rule {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--red-strong);
  background: var(--red-soft);
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

.poll-mine-section {
  margin-bottom: 21px;
}

.poll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.poll-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 13px 14px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 49, 35, 0.025);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    transform 0.1s ease;
}

.poll-card:hover {
  border-color: #abc9ad;
  background: #fcfff9;
}

.poll-card:active {
  transform: translateY(1px);
}

.poll-card:focus-visible {
  border-color: var(--accent);
}

.poll-card.is-pending {
  border-color: #e8d5a6;
}

.poll-card.is-rejected {
  border-color: #edcbc7;
}

.poll-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 21px;
}

.poll-card-version {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.poll-card-status {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

.poll-card-status.is-pending {
  color: #7c560b;
  background: #fdf3d9;
}

.poll-card-status.is-rejected {
  color: var(--red-strong);
  background: var(--red-soft);
}

.poll-card-status.is-published {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.poll-card-title {
  margin: 7px 0 4px;
  font-size: 16px;
  font-weight: 730;
  line-height: 1.35;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.poll-card-desc {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 0 0 9px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.poll-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 9px;
  margin-top: auto;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}

.poll-card-meta span + span::before {
  content: "·";
  margin-right: 6px;
  color: var(--border-strong);
}

.poll-card-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #edf2e9;
  color: var(--accent-strong);
  font-size: 10.5px;
  font-weight: 650;
}

/* 发布者编辑器 */
.poll-editor-dialog {
  width: min(calc(100vw - 28px), 560px);
}

.poll-editor-dialog .dialog-heading {
  align-items: flex-start;
}

.poll-editor-dialog .dialog-heading h2 {
  margin-top: 2px;
  font-size: 20px;
}

.poll-editor-dialog .admin-kicker {
  margin-bottom: 2px;
}

.poll-options-editor {
  margin: 3px 0 12px;
  padding: 10px;
  border: 1px solid #e1eadc;
  border-radius: 12px;
  background: #f9fcf7;
}

.poll-options-editor-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.poll-options-editor-head .field-label {
  margin: 0;
}

.poll-options-help {
  color: var(--faint);
  font-size: 9.5px;
}

.poll-option-rows {
  display: grid;
  gap: 6px;
}

.poll-option-row {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
}

.poll-option-number {
  color: var(--faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.poll-option-input {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fffefa;
  font-size: 13px;
  line-height: 1.4;
}

.poll-option-input::placeholder {
  color: var(--faint);
}

.poll-option-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 107, 56, 0.12);
}

.poll-option-remove {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #ead7d4;
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 17px;
  line-height: 1;
}

.poll-option-remove:hover:not(:disabled) {
  color: var(--red-strong);
  background: var(--red-soft);
}

.poll-option-remove:disabled {
  opacity: 0.35;
}

.poll-add-option-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-height: 35px;
  margin-top: 7px;
  border: 1px dashed #bcd3bd;
  border-radius: 8px;
  color: var(--accent-strong);
  background: transparent;
  font-size: 11.5px;
  font-weight: 650;
}

.poll-add-option-btn:hover:not(:disabled) {
  background: var(--accent-soft);
}

.poll-add-option-btn:disabled {
  opacity: 0.45;
}

.option-card.is-preview {
  border-style: dashed;
  background: #fcfdf9;
}

.option-card.is-preview .option-heading {
  margin-bottom: 0;
}

.option-card.is-preview .meter-meta,
.option-card.is-preview .progress-track {
  display: none;
}

@media (max-width: 520px) {
  .poll-hero-actions {
    align-items: stretch;
  }

  .poll-create-btn {
    flex: 1;
    min-width: 160px;
  }

  .poll-hero-hint {
    align-self: center;
  }

  .poll-detail-actions {
    align-items: stretch;
  }

  .poll-detail-actions .btn {
    flex: 1;
    min-width: 140px;
  }

  .poll-grid {
    grid-template-columns: 1fr;
  }

  .poll-section-note {
    display: none;
  }

  .poll-card {
    padding: 12px 13px;
  }

  .poll-card-title {
    font-size: 15px;
  }

  .poll-options-editor {
    padding: 9px;
  }

  .poll-editor-dialog .dialog-body {
    padding: 17px;
  }

  .poll-option-input {
    height: 40px;
  }

  .poll-option-remove {
    width: 32px;
    height: 32px;
  }

  .poll-option-row {
    grid-template-columns: 19px minmax(0, 1fr) 32px;
    gap: 5px;
  }
}

/* 管理员审核发布版本 */
.review-version-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-version-item {
  padding: 12px 13px;
  border: 1px solid #e4d9ba;
  border-left: 3px solid var(--gold);
  border-radius: 11px;
  background: #fffdf7;
}

.review-version-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 10px;
}

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

.review-version-label {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 5px;
  color: var(--red-strong);
  background: var(--red-soft);
  font-size: 9.5px;
  font-weight: 750;
  white-space: nowrap;
}

.review-version-title {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.review-version-kind {
  flex: none;
  color: #7c560b;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.5;
}

.review-version-meta {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}

.review-version-desc {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.review-option-list {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.5;
}

.review-option-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  color: #3f5144;
  background: #f2f6ee;
  font-size: 10.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.review-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.review-delete-link {
  margin-right: auto;
  padding: 3px 0;
  border: 0;
  color: var(--red-strong);
  background: transparent;
  font-size: 10px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.review-delete-link:hover {
  color: var(--danger-strong);
}

.review-actions .small-btn {
  min-height: 34px;
}

.admin-message-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-message-item {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fbfdf9;
}

.admin-message-main {
  min-width: 0;
}

.admin-message-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 8px;
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}

.admin-message-replies {
  color: var(--accent-strong);
}

.admin-message-content {
  margin: 0;
  color: #2f4135;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-message-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 5px;
}

.admin-reply-list {
  display: grid;
  flex: 1 0 100%;
  gap: 5px;
  min-width: 0;
  margin: 1px 0 0;
  padding: 7px 0 0;
  border-top: 1px dashed #dce7d7;
  list-style: none;
}

.admin-reply-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid #e4ecdf;
  border-radius: 8px;
  background: #fff;
}

.admin-reply-main {
  flex: 1;
  min-width: 0;
}

.admin-reply-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 7px;
  margin: 0;
}

.admin-reply-author {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.admin-reply-item.is-creator .admin-reply-author {
  color: var(--red-strong);
}

.admin-reply-time {
  color: var(--faint);
  font-size: 9px;
}

.admin-reply-content {
  margin: 2px 0 0;
  color: #3d5042;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-reply-delete {
  flex: none;
  min-height: 27px;
  padding: 0 7px;
  font-size: 9.5px;
}

.admin-message-delete,
.admin-message-pin {
  flex: none;
  min-height: 32px;
  padding: 0 9px;
  font-size: 10.5px;
}

.admin-poll-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-poll-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fbfdf9;
}

.admin-poll-main {
  min-width: 0;
}

.admin-poll-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
}

.admin-poll-title {
  margin: 0;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.admin-poll-version {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 0 6px;
  border-radius: 5px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 700;
}

.admin-poll-pending {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  color: #7c560b;
  background: #fdf3d9;
  font-size: 9px;
  font-weight: 650;
}

.admin-poll-meta {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-poll-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 6px;
}

.admin-poll-actions .small-btn {
  min-height: 32px;
  padding: 0 9px;
  font-size: 10.5px;
}

.admin-poll-edit:disabled {
  opacity: 0.45;
}

.admin-loading {
  min-height: 60px;
}

@media (max-width: 700px) {
  .admin-poll-item {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .admin-poll-actions {
    width: 100%;
  }

  .admin-poll-actions .small-btn {
    flex: 1;
  }

  .admin-message-item {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .admin-message-actions {
    align-self: flex-end;
  }
}

@media (max-width: 520px) {
  .review-version-item {
    padding: 11px;
  }

  .review-version-kind {
    font-size: 9.5px;
  }

  .review-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .review-actions .small-btn {
    min-height: 36px;
  }

  .review-delete-link {
    grid-column: 1 / -1;
    justify-self: start;
    margin-right: 0;
  }

  .feedback-item {
    padding: 10px 11px;
  }
}

/* 校园墙分区：公告、寻物招领 */
.section-tabs {
  display: flex;
  gap: 3px;
  margin: 0 0 10px;
  padding: 4px;
  border: 1px solid #dfe8da;
  border-radius: 999px;
  background: #eaf0e4;
}

.section-tab {
  flex: 1;
  min-height: 35px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1;
  transition: color 0.15s ease, background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.section-tab:hover {
  color: var(--accent-strong);
}

.section-tab.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(28, 49, 35, 0.1);
}

.community-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 3px 10px;
}

.community-section-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 730;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.community-section-head p {
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.55;
}

.section-refresh-btn {
  flex: none;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 650;
}

.section-refresh-btn:hover {
  color: var(--accent-strong);
  border-color: #bdd3bd;
}

.announcement-list {
  display: grid;
  gap: 10px;
}

.announcement-card {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, #fffef9 0%, #fff 100%);
  box-shadow: 0 1px 2px rgba(28, 49, 35, 0.025);
}

.announcement-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-bottom: 5px;
}

.announcement-badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 5px;
  color: var(--red-strong);
  background: var(--red-soft);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.announcement-pin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 0 6px;
  border-radius: 4px;
  color: #7c560b;
  background: #fdf3d9;
  font-size: 9px;
  font-weight: 700;
}

.announcement-author {
  color: var(--red-strong);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.4;
}

.announcement-time {
  margin-left: auto;
  color: var(--faint);
  font-size: 9.5px;
}

.announcement-card.is-pinned {
  border-color: #e6d3a5;
}

.announcement-title {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.announcement-content {
  margin: 0;
  color: #2f4135;
  font-size: 12.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.announcement-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.announcement-image-link {
  display: block;
  height: 190px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f4f8f1;
}

.announcement-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.announcement-video {
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  max-height: 360px;
  border-radius: 9px;
  background: #111;
}

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

.announcement-replies-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  color: var(--accent-strong);
  background: #f2f7ef;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
}

.announcement-replies-toggle:hover {
  background: var(--accent-soft);
}

.announcement-replies-toggle .icon-sm {
  width: 13px;
  height: 13px;
}

.announcement-reply-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: #fffefa;
  font-size: 9px;
  font-weight: 700;
}

.announcement-replies-arrow {
  color: var(--faint);
  transition: transform 0.18s ease;
}

.announcement-card.replies-open .announcement-replies-arrow {
  transform: rotate(180deg);
}

.announcement-replies-panel {
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid #e4ecdf;
  border-radius: 10px;
  background: #f8fbf5;
}

.announcement-replies-empty {
  margin: 0 0 7px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}

.announcement-reply-form {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #dce7d7;
}

.announcement-reply-char {
  margin-right: auto;
  color: var(--faint);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.announcement-reply-submit {
  min-height: 31px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 11px;
}

.lost-found-form {
  padding: 13px 14px;
  margin-bottom: 10px;
}

.lost-kind-row {
  display: flex;
  gap: 6px;
  margin-bottom: 9px;
}

.lost-kind-option {
  position: relative;
  flex: 1;
  cursor: pointer;
}

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

.lost-kind-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--muted);
  background: #fbfdf9;
  font-size: 11.5px;
  font-weight: 650;
}

.lost-kind-option input:checked + span {
  color: var(--accent-strong);
  border-color: #b6d0b7;
  background: var(--accent-soft);
}

.lost-kind-option input:focus-visible + span {
  outline: 3px solid rgba(17, 107, 56, 0.14);
  outline-offset: 1px;
}

.lost-found-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 8px;
}

.lost-found-form .field {
  margin-bottom: 8px;
}

.lost-found-description {
  min-height: 72px;
}

.lost-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lost-form-actions > span {
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.lost-form-actions .btn {
  flex: none;
  min-height: 38px;
  font-size: 12px;
}

.lost-form-actions .form-message {
  min-height: 18px;
}

.lost-filters {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 3px 8px;
}

.lost-filter {
  min-height: 27px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: #eef4ea;
  font-size: 10px;
  font-weight: 650;
}

.lost-filter.is-active {
  color: #fff;
  background: var(--accent);
}

.lost-found-count {
  margin-left: auto;
  color: var(--faint);
  font-size: 9.5px;
}

.lost-found-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lost-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.lost-kind-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 750;
}

.lost-kind-badge.is-lost {
  color: var(--red-strong);
  background: var(--red-soft);
}

.lost-kind-badge.is-found {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.lost-card-main {
  min-width: 0;
  flex: 1;
}

.lost-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 8px;
}

.lost-item-name {
  margin: 0;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 720;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.lost-time {
  color: var(--faint);
  font-size: 9px;
  flex: none;
}

.lost-description {
  margin: 3px 0 0;
  color: #3d5042;
  font-size: 11.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lost-location {
  margin: 3px 0 0;
  color: var(--accent-strong);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .section-tab {
    min-height: 33px;
    font-size: 10.5px;
  }

  .community-section-head {
    margin-bottom: 9px;
  }

  .community-section-head h2 {
    font-size: 16px;
  }

  .announcement-card {
    padding: 11px 12px;
  }

  .announcement-title {
    font-size: 16px;
  }

  .announcement-content {
    font-size: 12px;
  }

  .announcement-media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .announcement-image-link {
    height: 150px;
  }

  .lost-found-form {
    padding: 11px 12px;
  }

  .lost-found-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .lost-card {
    padding: 9px 10px;
  }
}

/* 底部导航与我的消息 */
body.has-bottom-nav {
  padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  border-top: 1px solid rgba(221, 232, 217, 0.95);
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 -8px 24px rgba(34, 56, 41, 0.06);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-width: 760px;
  min-height: 58px;
  margin: 0 auto;
}

.bottom-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.15s ease;
}

.bottom-nav-item:hover,
.bottom-nav-item.is-active {
  color: var(--accent);
}

.bottom-nav-item:active {
  color: var(--accent-strong);
}

.bottom-nav-icon {
  width: 22px;
  height: 22px;
}

.bottom-nav-item.is-active .bottom-nav-icon {
  stroke-width: 2.2;
}

.bottom-nav-badge {
  position: absolute;
  top: 5px;
  left: calc(50% + 5px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border: 2px solid #fffefa;
  border-radius: 999px;
  color: #fff;
  background: #d94841;
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.friend-request-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
  padding: 9px 11px;
  border: 1px solid #edcbc8;
  border-radius: 10px;
  color: var(--red-strong);
  background: #fff6f4;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.friend-request-notice strong {
  font-weight: 800;
}

.friend-request-notice span:last-child {
  flex: none;
  font-size: 10px;
  font-weight: 650;
}

body.has-bottom-nav .toast {
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

.messages-privacy {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.55;
}

.messages-main {
  display: grid;
  gap: 10px;
}

.messages-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.messages-stat {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 49, 35, 0.025);
}

.messages-stat strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
  font-weight: 760;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.messages-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.messages-stat.is-received strong {
  color: var(--red-strong);
}

.messages-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  margin: 0 2px;
}

.messages-updated {
  margin: 0;
  color: var(--faint);
  font-size: 9.5px;
}

.messages-toolbar .section-refresh-btn {
  min-height: 27px;
}

.messages-error {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #edcbc8;
  border-radius: 8px;
  color: var(--red-strong);
  background: #fff7f5;
  font-size: 10.5px;
  line-height: 1.5;
}

.messages-section {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.messages-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px;
}

.messages-section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 730;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.messages-section-head p {
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}

.received-list {
  display: grid;
  gap: 7px;
}

.received-card {
  display: block;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    transform 0.15s ease;
}

.received-card:hover {
  border-color: #bdd3bd;
  background: #fcfef9;
}

.received-card:active {
  transform: translateY(1px);
}

.received-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 7px;
}

.received-chip {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  color: var(--red-strong);
  background: var(--red-soft);
  font-size: 8.5px;
  font-weight: 700;
}

.received-author {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.received-card.is-creator .received-author {
  color: var(--red-strong);
}

.received-time {
  margin-left: auto;
  color: var(--faint);
  font-size: 9px;
}

.received-content {
  margin: 5px 0 0;
  color: #2f4135;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.received-context {
  display: -webkit-box;
  margin: 6px 0 0;
  padding-top: 5px;
  overflow: hidden;
  border-top: 1px dashed #e1eadc;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.received-jump {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  color: var(--accent-strong);
  font-size: 9.5px;
  font-weight: 650;
}

.received-jump .icon-sm {
  width: 12px;
  height: 12px;
}

.my-message-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.my-message-card {
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.my-message-card.is-pinned {
  border-color: #e6d3a5;
}

.my-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.my-message-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.my-message-label {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 8.5px;
  font-weight: 700;
}

.my-message-pin {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  color: #7c560b;
  background: #fdf3d9;
  font-size: 8.5px;
  font-weight: 700;
}

.my-message-time {
  color: var(--faint);
  font-size: 9px;
  flex: none;
}

.my-message-content {
  margin: 5px 0 0;
  color: #2f4135;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.my-message-meta {
  margin: 5px 0 0;
  color: var(--faint);
  font-size: 9.5px;
}

.my-message-meta span {
  color: var(--muted);
}

.messages-empty {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  min-height: 150px;
  padding: 18px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.messages-empty-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}

.messages-empty-mark .icon {
  width: 19px;
  height: 19px;
}

.messages-empty h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.messages-empty p {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.55;
}

.messages-empty-action {
  margin-top: 10px;
  min-height: 34px;
  padding: 0 13px;
  font-size: 11px;
}

.messages-note {
  margin: 2px 2px 0;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.55;
}

.messages-footer {
  margin-top: 8px;
}

@media (min-width: 761px) {
  .bottom-nav {
    border-right: 1px solid rgba(221, 232, 217, 0.95);
    border-left: 1px solid rgba(221, 232, 217, 0.95);
  }
}

@media print {
  .bottom-nav {
    display: none;
  }

  body.has-bottom-nav {
    padding-bottom: 0;
  }
}

/* 在线人数、好友与私信 */
.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 23px;
  padding: 0 7px;
  border: 1px solid #d9e8d4;
  border-radius: 999px;
  color: var(--accent-strong);
  background: #f3f9ef;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.online-pill strong {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3da35d;
  box-shadow: 0 0 0 3px rgba(61, 163, 93, 0.12);
}

.friends-online-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.friends-privacy {
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.friends-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.friends-stat {
  min-width: 0;
  padding: 12px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.friends-stat strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  font-weight: 760;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.friends-stat span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

.friends-stat.is-unread strong {
  color: var(--red-strong);
}

.friends-stat.is-online strong {
  color: var(--accent-strong);
}

.friend-request-count {
  flex: none;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--red-strong);
  background: var(--red-soft);
  font-size: 9px;
  font-weight: 700;
}

.friend-request-list,
.outgoing-request-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.friend-request-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #ecd7b4;
  border-radius: 11px;
  background: #fffdf6;
}

.friend-request-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.friend-request-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-request-time {
  color: var(--faint);
  font-size: 8.5px;
}

.friend-request-actions {
  display: flex;
  flex: none;
  gap: 4px;
}

.friend-request-actions .small-btn {
  min-height: 29px;
  padding: 0 8px;
  font-size: 9.5px;
}

.outgoing-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  background: #fbfdf9;
}

.outgoing-request-name {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outgoing-request-status {
  flex: none;
  color: #8a6a2a;
  font-size: 9px;
  font-weight: 650;
}

.friend-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.friend-list-item {
  min-width: 0;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  background: var(--surface);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.friend-card:hover {
  border-color: #bdd3bd;
  background: #fcfef9;
}

.friend-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
}

.friend-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.friend-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.friend-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  color: #fff;
  background: var(--red-strong);
  font-size: 8.5px;
  font-weight: 750;
}

.friend-time {
  flex: none;
  margin-left: auto;
  color: var(--faint);
  font-size: 8.5px;
}

.friend-last {
  display: block;
  overflow: hidden;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-chat-hint {
  flex: none;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 650;
}

.friend-chat-dialog {
  width: min(92vw, 560px);
  max-height: 88vh;
  padding: 0;
}

.friend-chat-body {
  display: flex;
  flex-direction: column;
  max-height: 84vh;
  padding: 14px;
}

.friend-chat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.friend-chat-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 700;
}

.friend-chat-head-copy {
  flex: 1;
  min-width: 0;
}

.friend-chat-head h2 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 730;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-chat-head p {
  margin: 1px 0 0;
  color: var(--faint);
  font-size: 9.5px;
}

.friend-chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 150px;
  margin: 10px 0;
  padding: 4px 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.friend-chat-message {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  max-width: 84%;
}

.friend-chat-message.is-mine {
  align-self: flex-end;
  align-items: flex-end;
}

.friend-chat-bubble {
  padding: 8px 10px;
  border-radius: 10px;
  color: #2f4135;
  background: #f0f5ec;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.friend-chat-message.is-mine .friend-chat-bubble {
  color: #fff;
  background: var(--accent);
}

.friend-chat-time {
  color: var(--faint);
  font-size: 8.5px;
}

.friend-chat-empty {
  padding: 18px 10px;
  color: var(--faint);
  font-size: 10.5px;
  text-align: center;
}

.friend-chat-form {
  flex: none;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}

.friend-chat-input {
  min-height: 58px;
  font-size: 12px;
}

.friend-chat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}

.friend-chat-char {
  color: var(--faint);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.friend-chat-submit {
  min-height: 34px;
  padding: 0 13px;
  font-size: 11px;
}

@media (max-width: 520px) {
  .friends-stat {
    padding: 10px 9px;
  }

  .friends-stat strong {
    font-size: 20px;
  }

  .friends-stat span {
    font-size: 9px;
  }

  .friend-chat-body {
    padding: 12px;
  }

  .friend-chat-dialog {
    width: 94vw;
  }
}

/* 校园制作者入口 */
.creator-dialog-kicker {
  margin: 0 0 2px;
  color: #9b1b8e;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.creator-active-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.creator-active-actions .btn {
  min-height: 38px;
  font-size: 11.5px;
}

.creator-avatar-card {
  order: -1;
  border-color: #e5c4df;
  background: linear-gradient(180deg, #fffafd 0%, #fff 100%);
}

.creator-avatar-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 12px;
}

.creator-avatar-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 1px dashed #d79bcf;
  border-radius: 50%;
  color: #9b1b8e;
  background-color: #fbebf8;
  background-size: cover;
  background-position: center;
  font-size: 24px;
  font-weight: 750;
}

.creator-avatar-preview.has-custom-avatar {
  border-style: solid;
  color: transparent;
}

.creator-avatar-card .me-form .field input[type="file"] {
  height: auto;
  padding: 7px;
  font-size: 10.5px;
}

.creator-background-card {
  order: -1;
  border-color: #e5c4df;
  background: linear-gradient(180deg, #fffafd 0%, #fff 100%);
}

.creator-settings-divider {
  margin: 13px 0;
  border-top: 1px dashed #e6cce1;
}

.creator-background-preview-wrap {
  margin: 4px 0 10px;
}

.creator-background-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 118px;
  border: 1px dashed #d79bcf;
  border-radius: 10px;
  color: #a17d9b;
  background-color: #fbf3f9;
  background-size: cover;
  background-position: center;
  font-size: 10px;
}

.creator-background-preview.has-custom-background {
  border-style: solid;
  color: transparent;
}

.creator-style-select {
  width: 100%;
  height: 40px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
  font-size: 11.5px;
}

.creator-color-field {
  margin-top: 8px;
}

.creator-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 5px;
}

.creator-color-swatch {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--swatch-color);
  box-shadow: 0 0 0 1px #dfe7d9;
  cursor: pointer;
}

.creator-color-swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2px #8d1e82, 0 0 0 5px rgba(141, 30, 130, 0.12);
}

.creator-color-swatch:focus-visible {
  outline: 3px solid rgba(141, 30, 130, 0.2);
  outline-offset: 2px;
}

/* 可安装 App */
.pwa-install-pill {
  position: fixed;
  right: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  z-index: 130;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 4px 4px 5px;
  border: 1px solid #cbdcc8;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.97);
  box-shadow: 0 8px 24px rgba(35, 51, 38, 0.16);
  backdrop-filter: blur(8px);
}

.pwa-install-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px 0 5px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #0b5f39;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.pwa-install-action:hover {
  background: #084a2d;
}

.pwa-install-action:disabled {
  cursor: wait;
  opacity: 0.65;
}

.pwa-install-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #0b5f39;
  background: #f7f3e8;
  font: 800 11px/1 Arial, sans-serif;
}

.pwa-install-dismiss {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #849083;
  background: transparent;
  font: 400 18px/1 Arial, sans-serif;
  cursor: pointer;
}

.pwa-install-dismiss:hover {
  color: #18231a;
  background: #edf3ea;
}

.pwa-dialog {
  width: min(calc(100vw - 28px), 390px);
}

.pwa-steps {
  margin: 14px 0 2px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.pwa-steps li + li {
  margin-top: 6px;
}

.pwa-download-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent-strong);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 720px) {
  .pwa-install-pill {
    right: 18px;
    bottom: 18px;
  }
}

/* 10 种名字粒子样式 */
.creator-particles.particle-style-1 i {
  background: #d9a400;
  border-radius: 1px;
  box-shadow: 0 0 7px rgba(217, 164, 0, 0.8);
  transform: rotate(45deg);
}

.creator-particles.particle-style-2 i {
  background: #20c7c7;
  width: 5px;
  height: 5px;
  box-shadow: 0 0 9px rgba(32, 199, 199, 0.85);
}

.creator-particles.particle-style-3 i {
  background: #f08bbd;
  border-radius: 50% 0 50% 0;
  width: 5px;
  height: 5px;
  box-shadow: 0 0 6px rgba(240, 139, 189, 0.7);
}

.creator-particles.particle-style-4 i {
  width: 2px;
  height: 7px;
  border-radius: 3px;
  background: #4c83ee;
  animation-name: creatorParticleRain;
  box-shadow: 0 0 5px rgba(76, 131, 238, 0.65);
}

.creator-particles.particle-style-5 i:nth-child(1),
.creator-particles.particle-style-5 i:nth-child(4) {
  background: #ef476f;
}

.creator-particles.particle-style-5 i:nth-child(2),
.creator-particles.particle-style-5 i:nth-child(5) {
  background: #ffd166;
}

.creator-particles.particle-style-5 i:nth-child(3),
.creator-particles.particle-style-5 i:nth-child(6) {
  background: #06d6a0;
}

.creator-particles.particle-style-6 i {
  width: 6px;
  height: 6px;
  background: #e0442c;
  box-shadow: 0 0 10px rgba(255, 120, 50, 0.85);
  animation-name: creatorParticleFlame;
}

.creator-particles.particle-style-7 i {
  background: #59c56b;
  box-shadow: 0 0 11px rgba(89, 197, 107, 0.95);
  animation-name: creatorParticleFirefly;
}

.creator-particles.particle-style-8 i {
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.95);
  animation-name: creatorParticleSnow;
}

.creator-particles.particle-style-9 i:nth-child(odd) {
  background: #8d1e82;
}

.creator-particles.particle-style-9 i:nth-child(even) {
  background: #4d7ff2;
}

.creator-particles.particle-style-9 i {
  animation-name: creatorParticleOrbit;
  box-shadow: 0 0 8px rgba(120, 82, 220, 0.65);
}

@keyframes creatorParticleRain {
  0% {
    opacity: 0.2;
    transform: translateY(-5px);
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes creatorParticleFlame {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(1px) scale(0.7);
  }
  50% {
    opacity: 1;
    transform: translateY(-6px) scale(1.2);
  }
}

@keyframes creatorParticleFirefly {
  0%,
  100% {
    opacity: 0.2;
    transform: translate(0, 0) scale(0.7);
  }
  50% {
    opacity: 1;
    transform: translate(3px, -4px) scale(1.1);
  }
}

@keyframes creatorParticleSnow {
  0% {
    opacity: 0.2;
    transform: translateY(-4px) scale(0.65);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(9px) scale(1);
  }
}

@keyframes creatorParticleOrbit {
  0% {
    opacity: 0.3;
    transform: rotate(0deg) translateX(6px) scale(0.7);
  }
  50% {
    opacity: 1;
    transform: rotate(180deg) translateX(6px) scale(1.1);
  }
  100% {
    opacity: 0.3;
    transform: rotate(360deg) translateX(6px) scale(0.7);
  }
}

/* 撤回 */
.message-footer .message-withdraw-btn {
  white-space: nowrap;
}

/* 我的显示 ID */
.me-main {
  display: grid;
  gap: 8px;
}

.me-card {
  margin-top: 2px;
}

.me-current {
  margin: 0 0 10px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}

.me-current strong {
  color: var(--red-strong);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.me-form .field {
  margin-bottom: 6px;
}

.me-hint {
  margin: 0 0 4px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.55;
}

.me-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 5px;
}

.me-actions .btn {
  min-height: 36px;
  font-size: 11px;
}

/* 管理员意见箱（顶部可展开） */
.admin-feedback-card {
  border-color: #e7d9b7;
  background: linear-gradient(180deg, #fffdf4 0%, #fff 100%);
}

.admin-feedback-head {
  align-items: center;
  flex-wrap: wrap;
}

.admin-feedback-head-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-feedback-head-main h2 {
  margin: 0;
}

.admin-feedback-toggle {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 5px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10.5px;
}

.admin-feedback-arrow {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.admin-feedback-toggle[aria-expanded="true"] .admin-feedback-arrow {
  transform: rotate(180deg);
}

.admin-feedback-hint {
  margin: 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.55;
}

#adminFeedbackBody {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed #e2e9de;
}

/* 管理员公告与寻物 */
.announcement-admin-form {
  margin-bottom: 12px;
  padding: 11px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: #f9fcf7;
}

.announcement-admin-form .field {
  margin-bottom: 8px;
}

.announcement-content-input {
  min-height: 92px;
}

.announcement-file-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 2px 0 7px;
}

.announcement-file-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.announcement-file-field .field-label {
  margin: 0;
}

.announcement-file-field input[type="file"] {
  width: 100%;
  min-width: 0;
  color: var(--muted);
  font-size: 10.5px;
}

.announcement-file-field input[type="file"]::file-selector-button {
  margin-right: 6px;
  padding: 4px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.announcement-upload-note {
  margin: 0 0 2px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.55;
}

.announcement-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.announcement-form-actions .btn {
  min-height: 36px;
  font-size: 11.5px;
}

.admin-announcement-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-announcement-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdf9;
}

.admin-announcement-main {
  min-width: 0;
}

.admin-announcement-title {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.admin-announcement-meta {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.admin-announcement-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 5px;
}

.admin-announcement-actions .small-btn {
  min-height: 30px;
  padding: 0 8px;
  font-size: 10px;
}

.admin-lost-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-lost-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdf9;
}

.admin-lost-main {
  flex: 1;
  min-width: 0;
}

.admin-lost-title {
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.admin-lost-description {
  display: -webkit-box;
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-lost-meta {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.5;
}

.admin-lost-delete {
  flex: none;
  min-height: 30px;
  padding: 0 8px;
  font-size: 10px;
}

@media (max-width: 520px) {
  .announcement-file-grid {
    grid-template-columns: 1fr;
  }

  .admin-announcement-item {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .admin-announcement-actions {
    width: 100%;
  }

  .admin-announcement-actions .small-btn {
    flex: 1;
  }
}

/* 免责声明确认 */
html.disclaimer-open {
  overflow: hidden;
}

.disclaimer-gate {
  width: min(calc(100vw - 28px), 530px);
  max-height: calc(100dvh - 30px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background:
    linear-gradient(
        90deg,
        var(--red) 0 24%,
        var(--gold) 24% 30%,
        var(--accent) 30% 100%
      )
      top / 100% 5px no-repeat,
    var(--surface);
  box-shadow: 0 24px 80px rgba(10, 24, 16, 0.34);
}

.disclaimer-gate::backdrop {
  background: rgba(10, 24, 16, 0.64);
  backdrop-filter: blur(4px);
}

.disclaimer-gate-body {
  padding: 26px 22px 20px;
}

.disclaimer-gate-top {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.disclaimer-gate-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  box-shadow: 0 0 0 5px var(--red-soft);
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
}

.disclaimer-gate-kicker {
  color: var(--red-strong);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.disclaimer-gate h2 {
  margin: 7px 0 8px;
  font-size: 26px;
  font-weight: 780;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.disclaimer-gate-text {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
  text-wrap: pretty;
}

.disclaimer-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #f8fbf5;
  cursor: pointer;
}

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

.disclaimer-consent-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid #b8cbb7;
  border-radius: 6px;
  color: #fff;
  background: #fff;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.disclaimer-consent-box svg {
  width: 15px;
  height: 15px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.disclaimer-consent-input:checked + .disclaimer-consent-box {
  border-color: var(--accent);
  background: var(--accent);
}

.disclaimer-consent-input:checked + .disclaimer-consent-box svg {
  opacity: 1;
  transform: scale(1);
}

.disclaimer-consent-input:focus-visible + .disclaimer-consent-box {
  outline: 3px solid rgba(17, 107, 56, 0.18);
  outline-offset: 1px;
}

.disclaimer-consent-text {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
}

.disclaimer-enter {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  font-size: 13.5px;
}

.disclaimer-window {
  margin: 9px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

/* 醒目的校园投票入口 */
.top-link.poll-cta {
  min-height: 32px;
  padding: 0 10px;
  color: #fff;
  border: 1px solid var(--accent-strong);
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  box-shadow: 0 2px 0 var(--red);
  font-size: 10.5px;
  font-weight: 750;
}

.top-link.poll-cta:hover {
  color: #fff;
  background: var(--accent-strong);
}

.poll-entry-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 11px 13px;
  overflow: hidden;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(
    112deg,
    var(--red-strong) 0%,
    var(--red) 22%,
    var(--accent) 64%,
    var(--accent-strong) 100%
  );
  box-shadow: 0 3px 0 rgba(10, 79, 40, 0.2);
  text-decoration: none;
}

.poll-entry-banner::after {
  content: "";
  position: absolute;
  top: -36px;
  right: 18%;
  width: 108px;
  height: 108px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.poll-entry-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
}

.poll-entry-icon .icon {
  width: 18px;
  height: 18px;
}

.poll-entry-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.poll-entry-copy strong {
  font-size: 13.5px;
  font-weight: 780;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.poll-entry-copy span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  line-height: 1.4;
}

.poll-entry-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  margin-left: auto;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--accent-strong);
  background: #fffdf6;
  box-shadow: 0 1px 0 rgba(10, 24, 16, 0.1);
  font-size: 10.5px;
  font-weight: 750;
  white-space: nowrap;
}

.poll-entry-go .icon-sm {
  width: 12px;
  height: 12px;
}

.poll-entry-banner:hover .poll-entry-go {
  background: #fff;
}

@media (max-width: 520px) {
  .disclaimer-gate {
    width: min(calc(100vw - 22px), 530px);
    max-height: calc(100dvh - 22px);
  }

  .disclaimer-gate-body {
    padding: 23px 17px 17px;
  }

  .disclaimer-gate h2 {
    font-size: 23px;
  }

  .disclaimer-gate-text {
    font-size: 12px;
    line-height: 1.75;
  }

  .top-link.poll-cta {
    min-height: 30px;
    padding: 0 8px;
    font-size: 10px;
  }

  .poll-entry-banner {
    gap: 8px;
    padding: 10px;
  }

  .poll-entry-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .poll-entry-copy strong {
    font-size: 12.5px;
  }

  .poll-entry-copy span {
    font-size: 9.5px;
  }

  .poll-entry-go {
    padding: 5px 7px;
    font-size: 9.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Community additions: five persistent tabs and wall-message likes. */
.bottom-nav-inner {
  grid-template-columns: repeat(5, 1fr);
}

.message-like-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 23px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: #f2f6ee;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.message-like-btn:hover {
  color: var(--red-strong);
  background: var(--red-soft);
}

.message-like-btn.is-liked {
  color: var(--red-strong);
  background: var(--red-soft);
}

.message-like-btn.is-liked .icon-sm {
  fill: currentColor;
}

.message-like-btn[aria-busy="true"] {
  opacity: 0.55;
}

.message-like-count {
  min-width: 8px;
  font-variant-numeric: tabular-nums;
}

/* Public profile avatar on the Me page. */
.me-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.me-avatar-preview {
  display: grid;
  place-items: center;
  flex: none;
  width: 74px;
  height: 74px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  background-position: center;
  background-size: cover;
  font-size: 20px;
  font-weight: 750;
}

.me-avatar-copy {
  min-width: 0;
}

.me-avatar-copy p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.me-avatar-picker {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--accent);
  background: transparent;
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
}

.me-avatar-picker:hover {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

@media (max-width: 480px) {
  .me-avatar-preview {
    width: 64px;
    height: 64px;
    font-size: 18px;
  }
}

/* Wall messages can include compressed images. */
.wall-media-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.wall-image-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--accent);
  background: transparent;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.wall-image-label:hover {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.wall-image-hint {
  color: var(--faint);
  font-size: 9px;
}

.wall-image-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 7px;
}

.wall-image-preview[hidden] {
  display: none !important;
}

.wall-image-preview img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 7px;
  object-fit: cover;
  background: var(--surface-2);
}

.wall-passcode-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid #e7d9b7;
  border-radius: 8px;
  background: #fffbf0;
}

.wall-passcode-row[hidden] {
  display: none !important;
}

.wall-passcode-row label {
  flex: none;
  color: #7c560b;
  font-size: 9.5px;
  font-weight: 650;
}

.wall-passcode-row input {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid #e7d9b7;
  border-radius: 6px;
  color: var(--ink);
  background: #fffefa;
  font-size: 11px;
}

.wall-passcode-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.message-media {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 9px;
}

.message-media[hidden] {
  display: none !important;
}

.message-media.count-1 {
  grid-template-columns: minmax(0, 1fr);
}

.message-media img {
  display: block;
  width: 100%;
  max-height: 300px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-2);
}

.message-media.count-1 img {
  aspect-ratio: auto;
  max-height: 380px;
}

.message-card.has-message-images .message-body {
  grid-row: 2;
}

.message-card.has-message-images .message-media {
  grid-row: 3;
}

.message-card.has-message-images .message-expand-btn {
  grid-row: 4;
}

.message-card.has-message-images .message-footer {
  grid-row: 5;
}

.message-card.has-message-images .message-replies-panel {
  grid-row: 6;
}

.wall-media-note {
  margin: 3px 0 -2px;
  color: var(--red-strong);
  font-size: 9px;
  line-height: 1.5;
}


.wall-unlock-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.wall-unlock-row input {
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--ink);
  background: #fffefa;
  font-size: 11px;
}

.wall-unlock-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.wall-unlock-btn {
  flex: none;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.wall-unlock-btn:disabled {
  opacity: 0.55;
}

.wall-unlock-message {
  min-height: 0;
  margin: 5px 1px 0;
  color: var(--red-strong);
  font-size: 9px;
  line-height: 1.5;
}

.wall-unlock-message:empty {
  display: none;
}

.wall-media-tools {
  margin-top: 6px;
}

.wall-media-tools[hidden] {
  display: none !important;
}

.wall-media-row {
  margin-top: 0;
}

.wall-unlock-row[hidden] {
  display: none !important;
}

.wall-media-note.is-unlocked {
  color: var(--accent);
}

/* Download shortcut at the top of the wall. */
.download-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: none;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--accent-strong);
  border-radius: 7px;
  color: #fffdf6;
  background: var(--accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(10, 79, 40, 0.18);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.download-entry:hover {
  color: #fffdf6;
  background: var(--accent-strong);
}

.download-entry:active {
  transform: translateY(1px);
}

@media (max-width: 820px) {
  .download-entry {
    min-height: 29px;
    padding: 0 6px;
    font-size: 9px;
  }

  .download-entry .icon-sm {
    width: 13px;
    height: 13px;
  }
}

@media (max-width: 820px) {
  .hero-tools .creator-entry {
    display: none;
  }
}
