/* ============================================================
   示例校园墙 · 一面贴满便贴的墙
   ============================================================ */

:root {
  color-scheme: light dark;

  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --font-hand: "HanziPen SC", "Hannotate SC", "Xingkai SC", "Kaiti SC", "STKaiti",
    "KaiTi", "楷体", "Segoe UI", cursive;

  --ink: #362f23;
  --ink-soft: #6a5f4d;
  --muted: #857a67;
  --note-ink: #3a3223;
  --note-meta: rgba(58, 50, 35, 0.62);

  --accent: #d9553f;
  --accent-2: #ef8a4a;
  --accent-soft: rgba(217, 85, 63, 0.12);

  --panel: #fdf8ee;
  --panel-soft: rgba(255, 253, 246, 0.72);
  --line: rgba(92, 64, 32, 0.14);
  --line-strong: rgba(92, 64, 32, 0.24);

  --wood-1: #9c6a3a;
  --wood-2: #6d4422;
  --wood-3: #8a5a2e;
  --cork-1: #c2925f;
  --cork-2: #ac7f4e;

  --note-shadow: 0 2px 3px rgba(76, 45, 14, 0.16), 0 14px 22px -14px rgba(76, 45, 14, 0.6);
  --radius: 18px;
  --max-width: 1180px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #efe6d7;
    --ink-soft: #c2b7a4;
    --muted: #a99d89;

    --panel: #241f18;
    --panel-soft: rgba(46, 39, 30, 0.7);
    --line: rgba(255, 234, 196, 0.13);
    --line-strong: rgba(255, 234, 196, 0.24);

    --wood-1: #4c3119;
    --wood-2: #2b1b0d;
    --wood-3: #3e2712;
    --cork-1: #5c4329;
    --cork-2: #49341e;

    --note-shadow: 0 2px 3px rgba(0, 0, 0, 0.5), 0 16px 26px -14px rgba(0, 0, 0, 0.85);
  }
}

/* 便贴纸颜色（浅色 / 深色下各一套） */
.note-yellow { --paper-1: #fff3ab; --paper-2: #ffe27a; }
.note-pink { --paper-1: #ffd9e6; --paper-2: #ffbfd3; }
.note-blue { --paper-1: #d5e9ff; --paper-2: #b6d8ff; }
.note-green { --paper-1: #ddf4c7; --paper-2: #c4e8a7; }
.note-purple { --paper-1: #e7dfff; --paper-2: #d2c5ff; }
.note-orange { --paper-1: #ffe5c8; --paper-2: #ffd0a0; }

@media (prefers-color-scheme: dark) {
  .note-yellow { --paper-1: #e6d489; --paper-2: #d8c471; }
  .note-pink { --paper-1: #e9c2d1; --paper-2: #ddafc2; }
  .note-blue { --paper-1: #c1d8ec; --paper-2: #aec8e0; }
  .note-green { --paper-1: #c9dfb4; --paper-2: #b6cfa0; }
  .note-purple { --paper-1: #d5cbea; --paper-2: #c5b8de; }
  .note-orange { --paper-1: #ead0b6; --paper-2: #dfc2a4; }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: #efe4d3;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

body.is-locked {
  overflow: hidden;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

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

.room {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58rem 38rem at 50% -12%, rgba(255, 251, 240, 0.95), transparent 64%),
    radial-gradient(40rem 30rem at 6% 104%, rgba(218, 199, 172, 0.65), transparent 62%),
    radial-gradient(38rem 28rem at 96% 96%, rgba(222, 205, 180, 0.6), transparent 60%),
    linear-gradient(180deg, #f4ecdf 0%, #e9dfcd 100%);
}

@media (prefers-color-scheme: dark) {
  body {
    background: #14100c;
  }
  .room {
    background:
      radial-gradient(58rem 38rem at 50% -12%, rgba(74, 54, 34, 0.55), transparent 66%),
      radial-gradient(40rem 30rem at 4% 104%, rgba(52, 37, 22, 0.55), transparent 62%),
      radial-gradient(38rem 28rem at 98% 98%, rgba(48, 34, 20, 0.5), transparent 60%),
      linear-gradient(180deg, #1a1510 0%, #0f0c09 100%);
  }
}

/* ---------------------------------------------------------- 顶栏 */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 22px 2px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  border-radius: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.32), transparent 46%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 10px 20px -10px rgba(190, 70, 40, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transform: rotate(-4deg);
}

.brand-text h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.brand-text p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.refresh-btn svg {
  width: 16px;
  height: 16px;
}

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

.refresh-btn:disabled {
  cursor: default;
  opacity: 0.6;
}

.refresh-btn.is-spinning svg {
  animation: spin 0.8s linear infinite;
}

.note-count {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.post-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.22), transparent 46%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 24px -12px rgba(190, 70, 40, 0.9);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.post-btn svg {
  width: 17px;
  height: 17px;
}

.post-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -12px rgba(190, 70, 40, 0.95);
}

.post-btn:active {
  transform: scale(0.97);
}

.wall-intro {
  max-width: var(--max-width);
  margin: 4px auto 0;
  padding: 0 24px;
  color: var(--muted);
  font-family: var(--font-hand);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ---------------------------------------------------------- 墙 */

.wall-stage {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 18px 0;
}

.wall-frame {
  position: relative;
  padding: 11px;
  border-radius: 22px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(115deg, var(--wood-1) 0%, var(--wood-2) 42%, var(--wood-3) 66%, var(--wood-2) 100%);
  box-shadow:
    0 36px 70px -34px rgba(74, 44, 16, 0.75),
    0 4px 10px rgba(74, 44, 16, 0.28),
    inset 0 2px 0 rgba(255, 245, 225, 0.28),
    inset 0 -3px 6px rgba(30, 15, 4, 0.45);
}

.wall-frame::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(40, 20, 6, 0.35), inset 0 0 24px rgba(40, 20, 6, 0.25);
  pointer-events: none;
  z-index: 2;
}

.wall-board {
  position: relative;
  min-height: 380px;
  padding: 20px 18px 24px;
  border-radius: 8px;
  background-color: var(--cork-1);
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255, 244, 222, 0.22), transparent 34%),
    radial-gradient(circle at 82% 10%, rgba(255, 244, 222, 0.14), transparent 28%),
    radial-gradient(circle at 62% 78%, rgba(86, 50, 18, 0.2), transparent 42%),
    radial-gradient(circle at 32% 62%, rgba(255, 240, 214, 0.1), transparent 32%),
    radial-gradient(rgba(96, 58, 22, 0.16) 1px, transparent 1.4px),
    radial-gradient(rgba(255, 242, 220, 0.1) 1px, transparent 1.4px),
    repeating-linear-gradient(62deg, rgba(120, 74, 34, 0.07) 0 2px, transparent 2px 8px),
    repeating-linear-gradient(-26deg, rgba(255, 240, 214, 0.04) 0 2px, transparent 2px 10px);
  background-size:
    auto,
    auto,
    auto,
    auto,
    5px 5px,
    7px 7px,
    auto,
    auto;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 3px 3px, 0 0, 0 0;
  background-blend-mode: normal, normal, multiply, screen, normal, normal, normal, normal;
  box-shadow: inset 0 0 70px rgba(74, 42, 14, 0.35);
}

@media (prefers-color-scheme: dark) {
  .wall-board {
    background-image:
      radial-gradient(circle at 18% 24%, rgba(255, 230, 190, 0.12), transparent 34%),
      radial-gradient(circle at 82% 10%, rgba(255, 230, 190, 0.08), transparent 28%),
      radial-gradient(circle at 62% 78%, rgba(0, 0, 0, 0.35), transparent 42%),
      radial-gradient(circle at 32% 62%, rgba(255, 230, 190, 0.05), transparent 32%),
      radial-gradient(rgba(0, 0, 0, 0.28) 1px, transparent 1.4px),
      radial-gradient(rgba(255, 225, 180, 0.05) 1px, transparent 1.4px),
      repeating-linear-gradient(62deg, rgba(0, 0, 0, 0.12) 0 2px, transparent 2px 8px),
      repeating-linear-gradient(-26deg, rgba(255, 225, 180, 0.03) 0 2px, transparent 2px 10px);
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.55);
  }
}

/* 墙上的纸标签 */

.board-tag {
  position: relative;
  z-index: 3;
  display: block;
  width: max-content;
  margin: 0 auto 16px;
  padding: 5px 16px 6px;
  background: linear-gradient(180deg, #fffdf4, #f2e8d0);
  color: #6b4f28;
  font-family: var(--font-hand);
  font-size: 16px;
  letter-spacing: 0.08em;
  transform: rotate(-1.6deg);
  box-shadow: 0 6px 12px -6px rgba(58, 32, 8, 0.55);
}

.board-tag::before,
.board-tag::after {
  content: "";
  position: absolute;
  top: -7px;
  width: 34px;
  height: 15px;
  background: rgba(255, 252, 240, 0.55);
  box-shadow: 0 2px 4px rgba(58, 32, 8, 0.12);
}

.board-tag::before {
  left: 8px;
  transform: rotate(-8deg);
}

.board-tag::after {
  right: 8px;
  transform: rotate(6deg);
}

/* 便贴流：瀑布式分列 */

.wall {
  display: block;
  column-count: 5;
  column-gap: 16px;
}

@media (max-width: 1080px) {
  .wall {
    column-count: 4;
    column-gap: 16px;
  }
}

@media (max-width: 860px) {
  .wall {
    column-count: 3;
    column-gap: 14px;
  }
}

@media (max-width: 640px) {
  .wall {
    column-count: 2;
    column-gap: 12px;
  }
}

.note {
  position: relative;
  display: inline-block;
  width: 100%;
  cursor: pointer;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.22s ease, filter 0.22s ease;
  animation: note-in 0.5s cubic-bezier(0.22, 0.68, 0.36, 1) backwards;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}

@keyframes note-in {
  from {
    opacity: 0;
    transform: translateY(-14px) rotate(var(--rot, 0deg));
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(var(--rot, 0deg));
  }
}

.note:hover,
.note:focus-visible {
  transform: rotate(0deg) scale(1.035);
  filter: drop-shadow(0 20px 24px rgba(58, 32, 8, 0.4));
  z-index: 6;
}

.note:focus-visible {
  outline: 2px dashed rgba(255, 248, 230, 0.9);
  outline-offset: 4px;
}

.note-paper {
  position: relative;
  padding: 14px 12px 9px;
  border-radius: 3px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, var(--paper-1), var(--paper-2));
  box-shadow: var(--note-shadow);
  color: var(--note-ink);
}

.note-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 -16px 20px -18px rgba(96, 62, 24, 0.35);
  pointer-events: none;
}

.note-paper.size-s {
  min-height: 74px;
}

.note-paper.size-m {
  min-height: 98px;
}

.note-paper.size-l {
  min-height: 128px;
}

.note-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-family: var(--font-hand);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  white-space: pre-wrap;
  word-break: break-word;
}

.size-s .note-text {
  font-size: 15.5px;
  -webkit-line-clamp: 3;
}

.size-m .note-text {
  -webkit-line-clamp: 4;
}

.size-l .note-text {
  font-size: 14.5px;
  -webkit-line-clamp: 6;
}

.note-photo {
  position: relative;
  margin-top: 9px;
  padding: 4px 4px 12px;
  background: linear-gradient(180deg, #fffdf8, #f4eee0);
  box-shadow: 0 4px 10px -4px rgba(58, 32, 8, 0.4);
  transform: rotate(0.9deg);
}

.note-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e6ddcc;
}

.note-photo-count {
  position: absolute;
  right: 6px;
  bottom: 1px;
  color: #8a775c;
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(58, 50, 35, 0.18);
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 10.5px;
}

.note-author {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-like {
  flex: none;
  color: var(--note-meta);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.note-like.is-liked {
  color: #cf3b52;
}

/* 图钉 / 胶带 */

.pin {
  position: absolute;
  top: -7px;
  left: 50%;
  z-index: 4;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #ff9c8f 0%, #e0564a 42%, #a82d25 100%);
  box-shadow:
    0 3px 5px rgba(70, 30, 10, 0.45),
    inset -1px -2px 4px rgba(80, 20, 10, 0.5),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.pin-red {
  background:
    radial-gradient(circle at 34% 30%, #ff9c8f 0%, #e0564a 42%, #a82d25 100%);
}

.pin-blue {
  background:
    radial-gradient(circle at 34% 30%, #a8d4ff 0%, #4d8fd8 42%, #235a9c 100%);
}

.pin-green {
  background:
    radial-gradient(circle at 34% 30%, #b7e8a8 0%, #5fa84e 42%, #2f6b26 100%);
}

.pin-yellow {
  background:
    radial-gradient(circle at 34% 30%, #ffe9a3 0%, #e0ae35 42%, #9c7113 100%);
}

.tape {
  position: absolute;
  top: -9px;
  left: 50%;
  z-index: 4;
  width: 56px;
  height: 19px;
  margin-left: -28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(246, 240, 224, 0.5));
  box-shadow: 0 2px 5px rgba(58, 32, 8, 0.16);
  transform: rotate(-2.5deg);
}

.tape::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(140, 110, 70, 0.08) 0 1px, transparent 1px 4px);
}

/* 空墙 */

.empty-state {
  display: flex;
  justify-content: center;
  padding: 30px 0 44px;
}

.empty-note {
  position: relative;
  width: min(320px, 84%);
  padding: 34px 24px 26px;
  border: 2px dashed rgba(80, 50, 18, 0.35);
  border-radius: 4px;
  background: rgba(255, 250, 238, 0.32);
  color: #fff6e4;
  text-align: center;
  transform: rotate(-1.2deg);
}

.empty-note p {
  margin: 0 0 18px;
  font-family: var(--font-hand);
  font-size: 19px;
  line-height: 1.6;
  color: #fff3d9;
  text-shadow: 0 1px 2px rgba(60, 32, 8, 0.35);
}

.empty-note .pin {
  top: -8px;
}

.empty-btn {
  padding: 9px 20px;
  border-radius: 999px;
  background: #fff8ea;
  color: #7c4a22;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 8px 16px -8px rgba(58, 32, 8, 0.6);
}

/* 骨架 */

.skeleton-note {
  display: inline-block;
  width: 100%;
  margin-bottom: 22px;
  padding: 20px 16px 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 247, 220, 0.55), rgba(255, 238, 190, 0.4));
  box-shadow: var(--note-shadow);
  break-inside: avoid;
  transform: rotate(-0.8deg);
}

.skeleton-note .sk {
  height: 12px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.35) 20%, rgba(160, 120, 60, 0.22) 42%, rgba(255, 255, 255, 0.35) 64%);
  background-size: 260% 100%;
  animation: shimmer 1.3s ease infinite;
}

.skeleton-note .sk.short {
  width: 58%;
}

.skeleton-note .sk.tiny {
  width: 34%;
  height: 9px;
  margin-top: 16px;
}

@keyframes shimmer {
  from {
    background-position: 160% 0;
  }
  to {
    background-position: -60% 0;
  }
}

/* 加载更多 */

.wall-more {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 6px 0 4px;
}

.load-more {
  padding: 10px 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 246, 226, 0.45);
  background: rgba(255, 246, 226, 0.16);
  color: #fff5e2;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background 0.16s ease, color 0.16s ease;
}

.load-more:hover {
  background: rgba(255, 246, 226, 0.9);
  color: #7a4a20;
}

.load-more.is-loading {
  pointer-events: none;
  opacity: 0.65;
}

.sentinel {
  height: 1px;
}

/* 页脚 / 悬浮按钮 */

.site-footer {
  padding: 30px 8px calc(46px + var(--safe-bottom));
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
  text-align: center;
}

.site-footer p {
  margin: 2px 0;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dashed var(--line-strong);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-credit {
  margin-top: 12px !important;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  opacity: 0.75;
}

.site-count {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.fab {
  position: fixed;
  right: max(20px, calc(50vw - var(--max-width) / 2 + 22px));
  bottom: calc(24px + var(--safe-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.28), transparent 46%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
  box-shadow: 0 18px 34px -12px rgba(180, 65, 35, 0.9);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.fab svg {
  width: 24px;
  height: 24px;
}

.fab:hover {
  transform: translateY(-2px);
}

.fab:active {
  transform: scale(0.94);
}

@media (min-width: 720px) {
  .fab {
    display: none;
  }
}

/* ---------------------------------------------------------- 便贴详情 */

.detail-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 19, 10, 0.66);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade-in 0.2s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.detail-paper {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(540px, 100%);
  max-height: calc(100vh - 52px);
  max-height: calc(100dvh - 52px);
  padding: 30px 26px 18px;
  border-radius: 4px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, var(--paper-1), var(--paper-2));
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.85), 0 2px 4px rgba(40, 20, 6, 0.25);
  color: var(--note-ink);
  transform: rotate(-0.6deg);
  animation: paper-pop 0.28s cubic-bezier(0.22, 0.68, 0.36, 1) both;
}

@keyframes paper-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97) rotate(-0.6deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.detail-paper > .pin {
  top: -8px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
}

.detail-paper > .pin.tape {
  top: -10px;
  width: 62px;
  height: 20px;
  margin-left: -31px;
}

.detail-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 34px;
}

.detail-author {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
}

.badge-anon {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(58, 50, 35, 0.1);
  color: rgba(58, 50, 35, 0.72);
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.detail-time {
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 11.5px;
}

.detail-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(58, 50, 35, 0.09);
  color: rgba(58, 50, 35, 0.7);
  transition: background 0.15s ease;
}

.detail-x:hover {
  background: rgba(58, 50, 35, 0.18);
}

.detail-x svg {
  width: 15px;
  height: 15px;
}

.detail-text {
  margin: 18px 0 0;
  font-family: var(--font-hand);
  font-size: 19px;
  line-height: 1.68;
  letter-spacing: 0.01em;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-text a {
  color: #1f5da8;
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 93, 168, 0.4);
}

.detail-text:empty {
  display: none;
}

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

.detail-photos.many {
  grid-template-columns: repeat(3, 1fr);
}

.detail-photos.single {
  grid-template-columns: 1fr;
}

.detail-photo {
  padding: 5px 5px 16px;
  background: linear-gradient(180deg, #fffdf8, #f4eee0);
  box-shadow: 0 6px 14px -6px rgba(58, 32, 8, 0.45);
  transform: rotate(-0.8deg);
  transition: transform 0.18s ease;
}

.detail-photo:nth-child(even) {
  transform: rotate(1.1deg);
}

.detail-photo:hover {
  transform: rotate(0deg) scale(1.02);
}

.detail-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e6ddcc;
}

.detail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px dashed rgba(58, 50, 35, 0.2);
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(58, 50, 35, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  color: #6b5a3f;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.like-btn svg {
  width: 18px;
  height: 18px;
}

.like-btn:hover {
  background: rgba(255, 255, 255, 0.75);
  color: #c23a4c;
}

.like-btn.is-liked {
  color: #cf3b52;
  background: rgba(255, 255, 255, 0.7);
}

.like-btn.is-liked svg {
  fill: currentColor;
  stroke: currentColor;
}

.like-btn:active {
  transform: scale(0.95);
}

.detail-dept {
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 11.5px;
}

/* ---------------------------------------------------------- 写便贴面板 */

.sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 19, 10, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.sheet-layer.is-open .sheet-backdrop {
  opacity: 1;
}

.sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 46px);
  max-height: calc(100dvh - 46px);
  border-radius: 24px 24px 0 0;
  background: var(--panel);
  box-shadow: 0 -24px 70px -24px rgba(40, 22, 6, 0.6);
  transform: translateY(26px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.22, 0.68, 0.36, 1), opacity 0.2s ease;
}

.sheet-layer.is-open .sheet {
  transform: none;
  opacity: 1;
}

.sheet-handle {
  flex: none;
  width: 40px;
  height: 4px;
  margin: 9px auto 2px;
  border-radius: 99px;
  background: var(--line-strong);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 8px 20px 10px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sheet-x {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(92, 64, 32, 0.08);
  color: var(--ink-soft);
}

.sheet-x:hover {
  background: rgba(92, 64, 32, 0.16);
}

.sheet-x svg {
  width: 17px;
  height: 17px;
}

.sheet-body {
  flex: 1;
  min-height: 0;
  padding: 2px 20px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* 颜色选择 */

.color-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 14px;
}

.color-label {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}

.color-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

.color-dot {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: inset 0 -3px 5px rgba(90, 60, 20, 0.18), 0 2px 4px rgba(80, 50, 18, 0.2);
  transition: transform 0.15s ease;
}

.color-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.color-dot.is-active::after {
  border-color: var(--accent);
}

.color-dot:hover {
  transform: scale(1.1);
}

/* 便贴编辑器 */

.note-editor {
  position: relative;
  padding: 16px 14px 8px;
  border-radius: 3px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, var(--paper-1), var(--paper-2));
  box-shadow: 0 16px 28px -18px rgba(58, 32, 8, 0.6), 0 2px 4px rgba(58, 32, 8, 0.16);
  color: var(--note-ink);
  transform: rotate(-0.35deg);
  transition: background 0.25s ease;
}

#postText {
  display: block;
  width: 100%;
  min-height: 132px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  resize: none;
  color: var(--note-ink);
  font-family: var(--font-hand);
  font-size: 17.5px;
  line-height: 1.6;
}

#postText::placeholder {
  color: rgba(58, 50, 35, 0.38);
}

.editor-tray {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
}

.editor-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.editor-photo {
  position: relative;
  width: 66px;
  height: 72px;
  padding: 3px 3px 11px;
  background: linear-gradient(180deg, #fffdf8, #f4eee0);
  box-shadow: 0 4px 8px -4px rgba(58, 32, 8, 0.5);
  transform: rotate(-1.2deg);
}

.editor-photo:nth-child(even) {
  transform: rotate(1.4deg);
}

.editor-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #e6ddcc;
}

.editor-photo.is-compressing img {
  opacity: 0.35;
}

.editor-photo.is-error {
  outline: 1px solid rgba(200, 40, 50, 0.7);
}

.editor-photo-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(32, 22, 12, 0.78);
  color: #fff;
}

.editor-photo-remove svg {
  width: 9px;
  height: 9px;
}

.editor-photo-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #a52a35;
  font-family: var(--font-ui);
  font-size: 9px;
}

.editor-photo .spinner {
  width: 18px;
  height: 18px;
  border-width: 2px;
  border-color: rgba(58, 50, 35, 0.22);
  border-top-color: #8a5a22;
}

.editor-add {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 66px;
  height: 72px;
  border: 1px dashed rgba(58, 50, 35, 0.35);
  border-radius: 3px;
  background: rgba(255, 253, 246, 0.32);
  color: rgba(58, 50, 35, 0.62);
  font-size: 10.5px;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
}

.editor-add svg {
  width: 18px;
  height: 18px;
}

.editor-add:hover {
  background: rgba(255, 253, 246, 0.6);
  color: #7a4a20;
}

.editor-add[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 7px;
  border-top: 1px dashed rgba(58, 50, 35, 0.18);
  color: rgba(58, 50, 35, 0.52);
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.char-count.is-warning {
  color: #b06a12;
}

.char-count.is-limit {
  color: #b52a3d;
}

.compose-hint-row {
  min-height: 18px;
  padding: 8px 2px 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

/* 匿名 / 实名 */

.identity {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

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

.identity-copy strong {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
}

.identity-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 27px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(92, 64, 32, 0.28);
  transition: background 0.2s ease;
}

.slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fffdf6;
  box-shadow: 0 2px 6px rgba(40, 22, 6, 0.3);
  transition: transform 0.22s cubic-bezier(0.22, 0.68, 0.36, 1);
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.switch input:checked + .slider::before {
  transform: translateX(19px);
}

.switch input:focus-visible + .slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.identity-fields {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  animation: note-in 0.2s ease both;
}

.identity-fields input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.identity-fields input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.identity-fields input.is-invalid {
  border-color: #c23a4c;
  box-shadow: 0 0 0 3px rgba(194, 58, 76, 0.14);
}

.field-tip {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.compress-hint {
  min-height: 0;
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 12px 20px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.safety-note {
  color: var(--muted);
  font-size: 11px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 108px;
  padding: 11px 22px;
  border-radius: 999px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.22), transparent 46%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 14px 26px -12px rgba(190, 70, 40, 0.95);
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn:hover:not([disabled]) {
  transform: translateY(-1px);
}

.primary-btn:active:not([disabled]) {
  transform: scale(0.97);
}

.primary-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.primary-btn .spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 720px) {
  .sheet-layer {
    align-items: center;
    padding: 24px;
  }

  .sheet {
    max-width: 560px;
    max-height: min(88vh, 780px);
    border-radius: 24px;
    transform: translateY(18px) scale(0.98);
  }

  .sheet-layer.is-open .sheet {
    transform: none;
  }

  .sheet-handle {
    display: none;
  }

  .sheet-head {
    padding-top: 18px;
  }
}

/* ---------------------------------------------------------- 大图查看 */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 7, 4, 0.94);
  animation: fade-in 0.2s ease both;
}

.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}

.lb-figure img {
  display: block;
  max-width: min(100%, 1080px);
  max-height: 82vh;
  max-height: 82dvh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}

.lb-figure figcaption {
  color: rgba(255, 248, 235, 0.72);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.lb-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.lb-close svg {
  width: 19px;
  height: 19px;
}

.lb-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transition: background 0.15s ease;
}

.lb-nav:hover,
.lb-close:hover {
  background: rgba(255, 255, 255, 0.26);
}

.lb-nav svg {
  width: 20px;
  height: 20px;
}

.lb-prev {
  left: 14px;
}

.lb-next {
  right: 14px;
}

.lb-nav[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------- Toast */

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 420px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(40, 30, 18, 0.94);
  color: #fff8ec;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  animation: toast-in 0.26s cubic-bezier(0.22, 0.68, 0.36, 1) both;
}

.toast.is-out {
  animation: toast-out 0.22s ease both;
}

.toast.is-error {
  background: rgba(160, 34, 44, 0.96);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
}

/* ---------------------------------------------------------- 响应式细节 */

@media (max-width: 760px) {
  .site-head {
    padding: 14px 16px 2px;
  }

  .wall-intro {
    padding: 0 16px;
    font-size: 13.5px;
  }

  .wall-stage {
    padding: 9px 10px 0;
  }

  .wall-frame {
    padding: 9px;
    border-radius: 18px;
  }

  .wall-frame::after {
    inset: 9px;
  }

  .wall-board {
    min-height: 340px;
    padding: 16px 11px 20px;
  }

  .board-tag {
    margin-bottom: 14px;
    font-size: 15px;
    padding: 4px 14px 5px;
  }

  .note {
    margin-bottom: 12px;
  }

  .note-paper {
    padding: 12px 10px 8px;
  }

  .note-text {
    font-size: 14px;
  }

  .size-s .note-text {
    font-size: 14.5px;
  }

  .size-l .note-text {
    font-size: 13.5px;
  }

  .detail-paper {
    padding: 27px 18px 16px;
  }

  .detail-text {
    font-size: 17.5px;
  }

  .detail-photos {
    gap: 8px;
  }

  .head-right {
    gap: 8px;
  }

  .note-count {
    display: none;
  }

  .refresh-btn {
    padding: 9px 11px;
  }

  .refresh-label {
    display: none;
  }

  .post-btn {
    padding: 9px 14px;
    font-size: 13px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }

  .brand-text h1 {
    font-size: 16.5px;
  }

  .brand-text p {
    font-size: 10.5px;
  }
}

@media (max-width: 380px) {
  .wall {
    column-gap: 10px;
  }

  .note {
    margin-bottom: 10px;
  }

  .note-paper {
    padding: 11px 9px 7px;
  }

  .note-text {
    font-size: 13px;
  }
}

/* 减少动效 */

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

/* ============================================================
   三栏分类 + 搜索
   ============================================================ */

.wall-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  max-width: var(--max-width);
  margin: 0 auto 6px;
  padding: 0 6px;
}

.channel-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.channel-tabs::-webkit-scrollbar {
  display: none;
}

.channel-tab {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

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

.channel-tab.is-active {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.22), transparent 46%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
  box-shadow: 0 8px 16px -10px rgba(190, 70, 40, 0.8);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 320px;
  min-width: 220px;
  padding: 4px 4px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--muted);
}

#searchInput {
  flex: 1;
  min-width: 0;
  padding: 7px 2px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

#searchInput::placeholder {
  color: var(--faint);
}

#searchInput::-webkit-search-cancel-button {
  display: none;
}

.search-btn {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.22), transparent 46%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.search-btn:active {
  transform: scale(0.96);
}

.search-clear {
  flex: none;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.search-clear:hover {
  color: var(--accent);
}

.wall-status {
  max-width: var(--max-width);
  margin: -2px auto 10px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* 便贴上的分类小标 */
.note-cat {
  flex: none;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(58, 50, 35, 0.1);
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.note-cat.cat-chat {
  background: rgba(92, 150, 70, 0.18);
  color: #47692f;
}

.note-cat.cat-lost {
  background: rgba(204, 124, 40, 0.2);
  color: #82531c;
}

.note-cat.cat-confession {
  background: rgba(214, 70, 120, 0.16);
  color: #9c3155;
}

.note-meta .note-author {
  flex: 1;
  min-width: 0;
}

/* 详情里的分类标 */
.badge-cat {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(58, 50, 35, 0.1);
  color: rgba(58, 50, 35, 0.72);
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-cat.cat-chat {
  background: rgba(92, 150, 70, 0.18);
  color: #47692f;
}

.badge-cat.cat-lost {
  background: rgba(204, 124, 40, 0.2);
  color: #82531c;
}

.badge-cat.cat-confession {
  background: rgba(214, 70, 120, 0.16);
  color: #9c3155;
}

/* 投稿时选栏目 */
.channel-pick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 13px;
}

.channel-pick-label {
  margin-right: 2px;
  color: var(--muted);
  font-size: 12px;
}

.channel-pick-btn {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

.channel-pick-btn.is-active {
  border-color: transparent;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.22), transparent 46%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
}

@media (max-width: 760px) {
  .wall-tools {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 0;
  }

  .channel-tabs {
    width: 100%;
  }

  .channel-tab {
    flex: none;
    padding: 7px 11px;
    font-size: 12px;
  }

  .search-form {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  .search-btn {
    padding: 7px 12px;
  }

  .wall-status {
    margin-top: -2px;
    padding: 0 4px;
    font-size: 12px;
  }
}

/* ============================================================
   联系通道
   ============================================================ */

.contact-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  max-width: var(--max-width);
  margin: 16px auto 0;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.contact-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.contact-icon svg {
  width: 23px;
  height: 23px;
}

.contact-text {
  flex: 1;
  min-width: 200px;
}

.contact-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.contact-text p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.wechat-link {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(217, 85, 63, 0.09);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.wechat-link:hover {
  background: rgba(217, 85, 63, 0.18);
}

.contact-copy {
  flex: none;
  padding: 9px 17px;
  border-radius: 999px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.22), transparent 46%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 16px -10px rgba(190, 70, 40, 0.85);
  transition: transform 0.15s ease;
}

.contact-copy:active {
  transform: scale(0.96);
}

@media (max-width: 640px) {
  .contact-card {
    margin-top: 14px;
    padding: 14px;
    gap: 10px;
  }

  .contact-text {
    min-width: 0;
  }

  .contact-copy {
    width: 100%;
    padding: 10px;
  }
}

/* ============================================================
   便贴墙改用 JS 分列布局（避免某些浏览器多栏布局下便贴重叠/消失）
   ============================================================ */

.wall {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  column-count: auto;
  column-gap: normal;
}

.wall-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wall-col .note,
.wall-col .skeleton-note {
  display: block;
  width: 100%;
  margin: 0;
}

.wall-col .skeleton-note {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .wall {
    gap: 12px;
  }

  .wall-col {
    gap: 12px;
  }
}

/* 自己的便贴标记 / 删除按钮 */
.note-own {
  flex: none;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(64, 142, 86, 0.16);
  color: #3d7449;
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.note.is-fresh {
  z-index: 3;
}

.detail-delete {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px dashed rgba(178, 58, 58, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.32);
  color: #a63737;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.detail-delete:hover {
  background: rgba(255, 255, 255, 0.6);
}

.detail-delete.is-confirm {
  border-color: #bf3f3f;
  background: #bf3f3f;
  color: #fff8f2;
}

.detail-delete:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ============================================================
   页脚最下面的隐蔽管理入口（方便手机端登录，不打扰同学）
   ============================================================ */

.site-admin-link {
  margin: 10px 0 0;
  text-align: right;
}

.site-admin-link a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 4px 5px 12px;
  color: rgba(74, 61, 43, 0.26);
  font-family: var(--font-ui);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-decoration: none;
  user-select: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-admin-link a:hover,
.site-admin-link a:focus-visible {
  color: var(--muted);
}

.site-admin-link svg {
  width: 11px;
  height: 11px;
}

@media (max-width: 640px) {
  .site-admin-link {
    text-align: center;
  }

  .site-admin-link a {
    color: rgba(74, 61, 43, 0.4);
    padding: 10px 12px 4px;
  }
}

/* ============================================================
   便贴回复
   ============================================================ */

.note-reply {
  flex: none;
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.replies {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px dashed rgba(58, 50, 35, 0.2);
}

.replies-title {
  margin: 0 0 8px;
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.replies-title span {
  opacity: 0.72;
}

.reply-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.reply-empty {
  margin: 2px 0 6px;
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 12px;
  opacity: 0.65;
}

.reply-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
}

.reply-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.reply-author {
  color: var(--note-ink);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
}

.reply-dept,
.reply-time {
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 10px;
  opacity: 0.7;
}

.reply-time {
  margin-left: auto;
}

.reply-text {
  margin: 4px 0 0;
  color: var(--note-ink);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reply-form {
  margin-top: 10px;
}

.reply-form textarea {
  display: block;
  width: 100%;
  min-height: 54px;
  max-height: 140px;
  padding: 9px 10px;
  border: 1px dashed rgba(58, 50, 35, 0.3);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.34);
  color: var(--note-ink);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}

.reply-form textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.56);
}

.reply-form textarea::placeholder {
  color: var(--note-meta);
  opacity: 0.6;
}

.reply-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
}

.reply-anon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
}

.reply-anon input {
  accent-color: var(--accent);
}

.reply-identity {
  display: flex;
  flex: 1;
  gap: 5px;
  min-width: 150px;
}

.reply-identity[hidden] {
  display: none;
}

.reply-identity input {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(58, 50, 35, 0.2);
  border-radius: 7px;
  outline: none;
  background: rgba(255, 255, 255, 0.4);
  color: var(--note-ink);
  font-family: var(--font-ui);
  font-size: 11.5px;
}

.reply-identity input:focus {
  border-color: var(--accent);
}

.reply-identity input.is-invalid {
  border-color: #c24a4a;
  background: rgba(194, 74, 74, 0.08);
}

.reply-submit {
  flex: none;
  margin-left: auto;
  padding: 7px 16px;
  border-radius: 999px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.22), transparent 46%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
  font-size: 12px;
  font-weight: 700;
}

.reply-submit:disabled {
  opacity: 0.6;
}

@media (max-width: 640px) {
  .reply-identity {
    order: 3;
    flex-basis: 100%;
  }

  .reply-submit {
    margin-left: auto;
  }
}

/* ============================================================
   举报
   ============================================================ */

.detail-report {
  flex: none;
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 10.5px;
  opacity: 0.62;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.detail-report:hover {
  opacity: 1;
  background: rgba(194, 58, 76, 0.08);
  color: #a53a44;
}

.report-panel {
  margin-top: 13px;
  padding: 11px;
  border: 1px solid rgba(194, 58, 76, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.38);
}

.report-panel[hidden] {
  display: none;
}

.report-label {
  display: block;
  margin-bottom: 6px;
  color: #8f333b;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
}

.report-panel textarea {
  display: block;
  width: 100%;
  min-height: 68px;
  padding: 8px 9px;
  border: 1px solid rgba(58, 50, 35, 0.22);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.55);
  color: var(--note-ink);
  font-family: var(--font-ui);
  font-size: 12.5px;
  line-height: 1.5;
  resize: vertical;
}

.report-panel textarea:focus {
  border-color: #b7464f;
}

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

.report-cancel,
.report-submit {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.report-cancel {
  color: var(--note-meta);
  background: rgba(58, 50, 35, 0.07);
}

.report-submit {
  background: #b7464f;
  color: #fff8f2;
}

.report-submit:disabled {
  opacity: 0.6;
}

.report-hint {
  margin: 7px 0 0;
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 10.5px;
  opacity: 0.62;
}

@media (max-width: 640px) {
  .detail-report {
    padding: 5px 7px;
    font-size: 10px;
  }
}

/* 回复的举报 / 删除 */
.reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}

.reply-action {
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--note-meta);
  font-family: var(--font-ui);
  font-size: 10.5px;
  opacity: 0.62;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.reply-action:hover {
  opacity: 1;
  background: rgba(58, 50, 35, 0.08);
}

.reply-action.is-del {
  color: #a33b42;
}

.reply-action.is-submit {
  background: #b7464f;
  color: #fff8f2;
  opacity: 1;
}

.reply-action:disabled {
  opacity: 0.5;
}

.reply-report-inline {
  margin-top: 6px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
}

.reply-report-inline textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 7px 8px;
  border: 1px solid rgba(58, 50, 35, 0.22);
  border-radius: 7px;
  outline: none;
  background: rgba(255, 255, 255, 0.55);
  color: var(--note-ink);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

.reply-report-inline textarea:focus {
  border-color: #b7464f;
}

.reply-report-bar {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
}

/* 置顶便贴 */
.note.is-pinned .note-paper {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 16px 28px -16px rgba(54, 30, 8, 0.55),
    0 0 0 2px rgba(217, 85, 63, 0.28);
}

.note-pin-badge {
  flex: none;
  padding: 1px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-pin {
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* 管理员官方标识（服务端标记，普通同学无法伪造） */
.note-admin-badge {
  flex: none;
  padding: 1px 6px;
  border-radius: 999px;
  background: #2f6b4f;
  color: #f4fff8;
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-official {
  padding: 2px 7px;
  border-radius: 999px;
  background: #2f6b4f;
  color: #f4fff8;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* 发布免责说明：低对比度、不打断填写 */
.disclaimer {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
  opacity: 0.6;
}

@media (max-width: 640px) {
  .disclaimer {
    font-size: 10px;
    line-height: 1.5;
  }
}

/* ============================================================
   首次访问公告
   ============================================================ */

.notice-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.notice-layer[hidden] {
  display: none;
}

.notice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 19, 10, 0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.notice-card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 25px 24px 18px;
  border: 1px solid rgba(110, 78, 40, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #fffdf6, #f7efe0);
  box-shadow: 0 40px 80px -36px rgba(30, 16, 4, 0.8);
  transform: rotate(-0.35deg);
  animation: paper-pop 0.32s cubic-bezier(0.22, 0.68, 0.36, 1) both;
}

.notice-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 76px;
  height: 20px;
  background: rgba(226, 211, 179, 0.8);
  box-shadow: 0 2px 5px rgba(40, 22, 6, 0.18);
  transform: translateX(-50%) rotate(1.6deg);
}

.notice-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.notice-card h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.notice-content p {
  margin: 0 0 9px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.notice-content strong {
  color: var(--ink);
  font-weight: 700;
}

.notice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 11px;
}

.notice-chips span {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(217, 85, 63, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.notice-disclaimer {
  margin-top: 12px !important;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(92, 64, 32, 0.06);
  color: var(--muted) !important;
  font-size: 11px !important;
  line-height: 1.6 !important;
}

.notice-btn {
  display: block;
  width: 100%;
  margin-top: 15px;
  padding: 11px 16px;
  border-radius: 999px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.22), transparent 46%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff8ec;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 14px 26px -14px rgba(190, 70, 40, 0.9);
}

.notice-foot {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  opacity: 0.65;
}

@media (max-width: 640px) {
  .notice-layer {
    padding: 14px;
  }

  .notice-card {
    padding: 22px 18px 16px;
    border-radius: 16px;
  }

  .notice-card h2 {
    font-size: 22px;
  }

  .notice-content p {
    font-size: 12.5px;
    line-height: 1.65;
  }
}

/* 顶部每日/每次轮换的小句子 */
.wall-intro {
  min-height: 23px;
  animation: tagline-fade 0.35s ease both;
}

@keyframes tagline-fade {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   校园墙满意度 / 留言
   ============================================================ */

.feedback-strip {
  max-width: 780px;
  margin: 14px auto 0;
  padding: 16px 20px 14px;
  border: 1px solid rgba(188, 86, 48, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(26rem 10rem at 12% 0%, rgba(255, 255, 255, 0.72), transparent 70%),
    linear-gradient(135deg, #fff0d8 0%, #ffe5c8 52%, #fff7e9 100%);
  box-shadow: 0 18px 38px -30px rgba(138, 63, 25, 0.65);
  text-align: center;
}

.feedback-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.feedback-title {
  flex: none;
  color: #a9432a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.feedback-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.feedback-scores button {
  padding: 6px 12px;
  border: 1px solid rgba(177, 80, 43, 0.24);
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.9);
  color: #8a5434;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(137, 64, 27, 0.06);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.feedback-scores button:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.feedback-scores button.is-selected {
  border-color: transparent;
  background: linear-gradient(135deg, #e27045, #c9452f);
  color: #fff8ec;
  box-shadow: 0 5px 12px -6px rgba(180, 62, 35, 0.75);
}

.feedback-scores button:disabled {
  cursor: default;
  opacity: 0.9;
}

.feedback-scores button:disabled:not(.is-selected) {
  opacity: 0.5;
}

.feedback-comment-toggle {
  flex: none;
  padding: 6px 12px;
  border: 1px solid rgba(177, 80, 43, 0.22);
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.7);
  color: #a9432a;
  font-size: 12px;
  font-weight: 600;
}

.feedback-note {
  margin: 7px 1px 0;
  color: #966044;
  font-size: 10.5px;
  line-height: 1.5;
}

.feedback-tally {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px auto 0;
}

.feedback-tally-item {
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.feedback-tally-item.score-5 {
  border-color: rgba(63, 122, 88, 0.24);
  background: rgba(111, 157, 116, 0.16);
  color: #2f6b4f;
}

.feedback-tally-item.score-4 {
  border-color: rgba(101, 138, 74, 0.22);
  background: rgba(156, 174, 108, 0.16);
  color: #4f6f38;
}

.feedback-tally-item.score-3 {
  border-color: rgba(191, 147, 69, 0.24);
  background: rgba(213, 182, 111, 0.18);
  color: #8a6528;
}

.feedback-tally-item.score-2 {
  border-color: rgba(197, 111, 78, 0.24);
  background: rgba(217, 155, 117, 0.17);
  color: #9c4f30;
}

.feedback-tally-item.score-1 {
  border-color: rgba(183, 70, 79, 0.24);
  background: rgba(207, 125, 125, 0.16);
  color: #9e2636;
}

@media (max-width: 640px) {
  .feedback-tally {
    gap: 4px;
  }

  .feedback-tally-item {
    padding: 3px 7px;
    font-size: 10px;
  }
}

.feedback-comment-form {
  max-width: 620px;
  margin: 10px auto 0;
  padding-top: 10px;
  border-top: 1px dashed rgba(177, 80, 43, 0.24);
  text-align: left;
}

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

.feedback-comment-form textarea {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(177, 80, 43, 0.24);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 253, 247, 0.85);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 12.5px;
  line-height: 1.55;
  resize: vertical;
}

.feedback-comment-form textarea:focus {
  border-color: var(--accent);
}

.feedback-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 6px;
}

.feedback-cancel,
.feedback-submit {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.feedback-cancel {
  color: #8a5434;
  background: rgba(177, 80, 43, 0.08);
}

.feedback-submit {
  background: linear-gradient(135deg, #e27045, #c9452f);
  color: #fff8ec;
}

.feedback-public {
  max-width: 680px;
  margin: 14px auto 0;
  padding-top: 12px;
  border-top: 1px solid rgba(177, 80, 43, 0.18);
  text-align: left;
}

.feedback-public-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.feedback-public-title {
  color: #a9432a;
  font-size: 13px;
  font-weight: 800;
}

.feedback-public-count {
  color: #966044;
  font-size: 10.5px;
}

.feedback-public-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.feedback-public-item {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(177, 80, 43, 0.13);
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.62);
}

.feedback-public-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feedback-public-time {
  margin: 5px 0 0;
  color: #a98268;
  font-size: 9.5px;
}

.feedback-public-empty {
  margin: 8px 0 0;
  padding: 12px;
  border: 1px dashed rgba(177, 80, 43, 0.22);
  border-radius: 10px;
  color: #966044;
  font-size: 11px;
  text-align: center;
}

.feedback-public-more {
  display: block;
  margin: 9px auto 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(177, 80, 43, 0.09);
  color: #a9432a;
  font-size: 10.5px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .feedback-strip {
    margin: 10px 10px 0;
    padding: 13px 12px 12px;
    border-radius: 16px;
  }

  .feedback-row {
    gap: 7px;
  }

  .feedback-title {
    font-size: 14px;
  }

  .feedback-scores {
    order: 3;
    width: 100%;
    gap: 4px;
  }

  .feedback-scores button {
    padding: 5px 9px;
    font-size: 11px;
  }

  .feedback-comment-toggle {
    padding: 5px 10px;
    font-size: 11px;
  }

  .feedback-note {
    margin-top: 6px;
    font-size: 10px;
  }

  .feedback-public-list {
    grid-template-columns: 1fr;
  }

  .feedback-public-title {
    font-size: 12.5px;
  }
}

/* 背景音乐小按钮 */
.music-toggle {
  position: fixed;
  left: 15px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(58, 50, 35, 0.18);
  border-radius: 50%;
  background: rgba(255, 249, 238, 0.76);
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 8px 18px -12px rgba(60, 35, 15, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.music-toggle:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.music-toggle.is-muted {
  opacity: 0.55;
  text-decoration: line-through;
}

.music-toggle.is-playing {
  color: var(--accent);
}

@media (max-width: 640px) {
  .music-toggle {
    left: 12px;
    bottom: 16px;
    width: 31px;
    height: 31px;
    font-size: 15px;
  }
}
/* ===== 手机深色模式强制修复 ===== */
@media (prefers-color-scheme: dark) {
    /* 1. 强行让整个网页不进行滤镜反转 */
    html, body {
        filter: none !important;
        -webkit-filter: none !important;
    }

    /* 2. 针对公告弹窗，强制恢复浅色背景和深色文字 */
    .notice-card {
        background-color: #fffaf0 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    }
    
    .notice-card h2,
    .notice-card p,
    .notice-card strong {
        color: #333333 !important;
    }
    
    .notice-kicker {
        color: #d9553f !important; /* 顶部的红色小字 */
    }
    
    /* 修复公告里的 3 个标签（日常聊天等） */
    .notice-chips span {
        background-color: #ffefe5 !important;
        color: #d9553f !important;
    }
    
    /* 修复公告底部的免责声明 */
    .notice-disclaimer {
        background-color: #f0f0f0 !important;
        color: #666666 !important;
    }

    /* 3. 修复“大家的声音”留言区域 */
    .feedback-public-text, 
    .feedback-public-time, 
    .feedback-public-empty {
        color: #555555 !important;
    }
}

#musicToggle { display: none !important; }