/* =========================================================================
 *  posts-wall.css —— 碎碎念「手作物理便利贴墙 · Tactile Studio Pinboard」
 * -------------------------------------------------------------------------
 *  保留便利贴墙核心理念，升级：
 *    · 3 种工作室墙面材质（暖木软木板 / 暗房毛毡板 / 极简洞洞板）
 *    · 5 款低饱和自然纸色 + 纤维纹理 + 真实卷曲折角
 *    · 3 种手作固定物（3D 大头图钉 / 半透明和纸胶带 / 黄铜回形针）
 *    · 惯性摆动拖拽 + 落墙弹性按压 + 3D 微倾光影
 *    · SVG 悬垂红线实时串联 + 散落 / 整齐双排布平滑过渡
 *    · 手拿精读卡（印章互动 / 翻页） + 访客本地试贴便利贴
 * ========================================================================= */

/* ---------------------------------------------------------- 整屏与墙面主题 */
.frame--posts {
  position: relative;
  padding: clamp(92px, 11vh, 138px) var(--edge) clamp(86px, 10vh, 126px);
  background: #eee6d7;
  transition: background .55s var(--ease), color .45s var(--ease);
}

/* 主题 1：暖木软木板（默认） */
.frame--posts[data-wall-theme="cork"] {
  background:
    radial-gradient(ellipse 72% 45% at 15% 0%, rgba(255, 249, 234, .65), transparent 62%),
    #ede4d4;
  --pw-ink: #1d1b16;
  --pw-muted: rgba(29, 27, 22, .54);
  --pw-hair: rgba(29, 27, 22, .18);
  --pw-chip-bg: rgba(255, 251, 242, .68);
  --pw-chip-brd: rgba(29, 27, 22, .16);
}

/* 主题 2：暗房毛毡板（呼应首屏与暗房展厅） */
.frame--posts[data-wall-theme="felt"] {
  background:
    radial-gradient(ellipse 68% 48% at 50% 0%, rgba(56, 62, 54, .34), transparent 68%),
    #141715;
  color: #f5efe2;
  --pw-ink: #f5efe2;
  --pw-muted: rgba(245, 239, 226, .56);
  --pw-hair: rgba(245, 239, 226, .16);
  --pw-chip-bg: rgba(255, 255, 255, .06);
  --pw-chip-brd: rgba(255, 255, 255, .15);
}

/* 主题 3：极简洞洞板 */
.frame--posts[data-wall-theme="peg"] {
  background:
    radial-gradient(ellipse 70% 44% at 85% 0%, rgba(255, 255, 255, .7), transparent 60%),
    #eae6de;
  --pw-ink: #1d1b16;
  --pw-muted: rgba(29, 27, 22, .52);
  --pw-hair: rgba(29, 27, 22, .16);
  --pw-chip-bg: rgba(255, 255, 255, .72);
  --pw-chip-brd: rgba(29, 27, 22, .14);
}

.posts__inner {
  position: relative;
  inset: auto;
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: 0;
}

/* ---------------------------------------------------------- 头部：标题 + 时间轴 + 轻检索 */
.posts__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 28px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--pw-hair, rgba(29, 27, 22, .2));
  margin: 0 0 24px;
  flex-wrap: wrap;
}

.posts__head .label {
  color: var(--pw-muted, rgba(29, 27, 22, .52));
}

.frame--posts[data-wall-theme="felt"] .posts__head .label--2 {
  color: var(--butter);
}

/* 当页面处于暗房毛毡碎碎念屏时，顶部导航同步适配深色通透质感 */
body[data-posts-dark="1"]:not(.is-cover) .topbar {
  background: linear-gradient(180deg, rgba(18, 22, 19, .86) 0%, rgba(18, 22, 19, 0) 100%);
}
body[data-posts-dark="1"]:not(.is-cover) .topbar__brand {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0;
}
body[data-posts-dark="1"]:not(.is-cover) .topbar__brand .label--fg {
  color: #f5efe2;
}
body[data-posts-dark="1"]:not(.is-cover) .topbar__brand > .label:last-child {
  color: rgba(245, 239, 226, .58);
  border-left-color: rgba(245, 239, 226, .26);
}
body[data-posts-dark="1"]:not(.is-cover) .nav a,
body[data-posts-dark="1"]:not(.is-cover) .nav a:nth-child(2n),
body[data-posts-dark="1"]:not(.is-cover) .nav a:nth-child(3n) {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .76);
  box-shadow: none;
}
body[data-posts-dark="1"]:not(.is-cover) .nav a.is-on {
  background: var(--butter);
  border-color: var(--butter);
  color: #161510;
}
body[data-posts-dark="1"]:not(.is-cover) .slides button {
  border-color: rgba(255, 255, 255, .28);
  color: rgba(255, 255, 255, .68);
}
body[data-posts-dark="1"]:not(.is-cover) .slides button.is-on {
  background: var(--tomato);
  border-color: var(--tomato);
  color: var(--cream);
}

.posts__head .frame__title {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.012em;
  color: var(--pw-ink, var(--ink));
}

.posts__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  margin-left: auto;
}

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

/* 年份芯片升级 */
.postyears {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.postyears__chip {
  position: relative;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--pw-muted, rgba(29, 27, 22, .48));
  padding: 5px 12px 5px;
  transition: color .2s var(--ease), background .22s var(--ease), border-color .22s var(--ease), transform .28s var(--spring);
  -webkit-tap-highlight-color: transparent;
}

.postyears__chip::after { display: none; }

.postyears__chip .n {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 500;
  margin-left: 5px;
  vertical-align: baseline;
  opacity: .7;
  color: inherit;
}

.postyears__chip:hover {
  color: var(--pw-ink, var(--ink));
  background: var(--pw-chip-bg);
  border-color: var(--pw-chip-brd);
}

.postyears__chip.is-on {
  color: var(--cream);
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -8px rgba(29, 27, 22, .55);
}

.frame--posts[data-wall-theme="felt"] .postyears__chip.is-on {
  background: var(--butter);
  border-color: var(--butter);
  color: #161510;
}

.postyears__chip.is-on .n {
  color: var(--butter);
  opacity: 1;
}

.frame--posts[data-wall-theme="felt"] .postyears__chip.is-on .n {
  color: rgba(22, 21, 16, .68);
}

/* 搜索框 & 仅看带图胶囊 */
.posts__search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.posts__search-icon {
  position: absolute;
  left: 11px;
  width: 13px;
  height: 13px;
  color: var(--pw-muted);
  pointer-events: none;
}

.posts__search {
  width: 168px;
  height: 31px;
  padding: 0 26px 0 30px;
  border-radius: 999px;
  border: 1px solid var(--pw-chip-brd);
  background: var(--pw-chip-bg);
  color: var(--pw-ink);
  font-family: var(--sans);
  font-size: 12px;
  outline: none;
  transition: width .28s var(--ease-expo), border-color .22s var(--ease), background .22s var(--ease), box-shadow .22s var(--ease);
}

.posts__search::placeholder {
  color: var(--pw-muted);
}

.posts__search:focus {
  width: 214px;
  border-color: var(--tomato);
  box-shadow: 0 0 0 3px rgba(197, 69, 48, .14);
}

.posts__search-clear {
  position: absolute;
  right: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  color: var(--pw-muted);
  transition: background .18s, color .18s;
}

.posts__search-clear:hover {
  background: rgba(197, 69, 48, .15);
  color: var(--tomato);
}

.posts__media-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 31px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--pw-chip-brd);
  background: var(--pw-chip-bg);
  color: var(--pw-muted);
  font-size: 12px;
  font-weight: 500;
  transition: all .22s var(--ease);
}

.posts__media-toggle svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}

.posts__media-toggle:hover {
  color: var(--pw-ink);
  border-color: rgba(197, 69, 48, .4);
}

.posts__media-toggle.is-on {
  background: var(--tomato);
  border-color: var(--tomato);
  color: var(--cream);
  box-shadow: 0 6px 14px -8px rgba(197, 69, 48, .7);
}

.posts__match-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--tomato);
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(197, 69, 48, .11);
}

/* ---------------------------------------------------------- 墙面外框与 3 种材质 */
.wall-frame {
  position: relative;
  border-radius: 16px;
  padding: 11px;
  background:
    linear-gradient(150deg, #865d3b 0%, #68462a 48%, #4d321c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 200, .28),
    inset 0 -2px 3px rgba(25, 14, 6, .42),
    0 28px 60px -28px rgba(45, 28, 12, .62),
    0 8px 20px -10px rgba(45, 28, 12, .38);
  transition: background .5s var(--ease), box-shadow .5s var(--ease);
}

.frame--posts[data-wall-theme="felt"] .wall-frame {
  background:
    linear-gradient(155deg, #2d312c 0%, #1d201d 55%, #121513 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .1),
    inset 0 -2px 4px rgba(0, 0, 0, .65),
    0 34px 72px -26px rgba(0, 0, 0, .86);
}

.frame--posts[data-wall-theme="peg"] .wall-frame {
  background:
    linear-gradient(145deg, #dfdad0 0%, #cfc8bb 55%, #bdb5a6 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .7),
    inset 0 -1px 2px rgba(40, 34, 24, .16),
    0 24px 52px -28px rgba(40, 34, 24, .34);
}

/* 四角复古黄铜角钉 */
.wall-frame__bolt {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f5dfa0 0%, #c19449 55%, #735320 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .45);
  z-index: 4;
  pointer-events: none;
}
.wall-frame__bolt--tl { top: 4px; left: 4px; }
.wall-frame__bolt--tr { top: 4px; right: 4px; }
.wall-frame__bolt--bl { bottom: 4px; left: 4px; }
.wall-frame__bolt--br { bottom: 4px; right: 4px; }

.frame--posts[data-wall-theme="peg"] .wall-frame__bolt {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #c8c4bc 60%, #8d887e 100%);
}

/* 墙内主体 */
.wall {
  position: relative;
  isolation: isolate;
  border-radius: 8px;
  padding: 0 0 clamp(22px, 2.2vw, 30px);
  overflow: hidden;
  --lx: 50%;
  --ly: 30%;
  background:
    radial-gradient(ellipse 62% 52% at 16% 12%, rgba(235, 194, 138, .48), transparent 60%),
    radial-gradient(ellipse 56% 48% at 84% 80%, rgba(132, 87, 44, .36), transparent 64%),
    linear-gradient(142deg, #cda87a 0%, #bf9466 48%, #ac7f53 100%);
  box-shadow:
    inset 0 2px 10px rgba(48, 28, 10, .38),
    inset 0 0 0 1px rgba(64, 38, 16, .3);
  transition: background .5s var(--ease), box-shadow .5s var(--ease);
}

/* 软木板颗粒质感 */
.wall::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(82, 52, 24, .34) 1px, transparent 1.5px),
    radial-gradient(rgba(255, 236, 206, .34) 1px, transparent 1.5px),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.52'/></svg>");
  background-size: 14px 14px, 19px 19px, 140px 140px;
  background-position: 0 0, 7px 10px, 0 0;
  opacity: .48;
  mix-blend-mode: multiply;
  transition: opacity .45s var(--ease);
}

/* 内阴影与自然光晕 */
.wall::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(520px circle at var(--lx) var(--ly), rgba(255, 248, 226, .16), transparent 62%);
  box-shadow:
    inset 0 12px 28px -16px rgba(45, 25, 10, .48),
    inset 0 -10px 24px -16px rgba(45, 25, 10, .35);
  z-index: 2;
}

/* 暗房毛毡墙面 */
.frame--posts[data-wall-theme="felt"] .wall {
  background:
    radial-gradient(ellipse 68% 58% at 50% 24%, rgba(62, 72, 63, .38), transparent 68%),
    linear-gradient(155deg, #272d29 0%, #1e2320 55%, #171b18 100%);
  box-shadow:
    inset 0 3px 16px rgba(0, 0, 0, .62),
    inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.frame--posts[data-wall-theme="felt"] .wall::before {
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 4px),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/></svg>");
  background-size: 6px 6px, 6px 6px, 120px 120px;
  opacity: .72;
  mix-blend-mode: overlay;
}

/* 暗房毛毡台灯跟随聚光 */
.frame--posts[data-wall-theme="felt"] .wall::after {
  background:
    radial-gradient(440px circle at var(--lx) var(--ly), rgba(246, 214, 146, .16), rgba(246, 214, 146, .04) 42%, transparent 70%);
  box-shadow:
    inset 0 16px 36px -14px rgba(0, 0, 0, .75),
    inset 0 -14px 30px -16px rgba(0, 0, 0, .6);
}

/* 极简洞洞板墙面 */
.frame--posts[data-wall-theme="peg"] .wall {
  background: linear-gradient(155deg, #f8f5ee 0%, #f1ece2 60%, #eae3d5 100%);
  box-shadow:
    inset 0 2px 10px rgba(45, 38, 26, .12),
    inset 0 0 0 1px rgba(45, 38, 26, .08);
}

.frame--posts[data-wall-theme="peg"] .wall::before {
  background-image:
    radial-gradient(circle at center, rgba(64, 56, 44, .22) 2.2px, rgba(255, 255, 255, .65) 2.6px, transparent 3.4px);
  background-size: 26px 26px;
  background-position: 13px 13px;
  opacity: .75;
  mix-blend-mode: normal;
}

.frame--posts[data-wall-theme="peg"] .wall::after {
  background: radial-gradient(480px circle at var(--lx) var(--ly), rgba(255, 255, 255, .36), transparent 62%);
  box-shadow: inset 0 8px 20px -14px rgba(45, 38, 26, .18);
}

/* ---------------------------------------------------------- 墙内顶部铭牌工具条 */
.wallbar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 11px clamp(14px, 1.8vw, 22px);
  margin: 0 0 clamp(14px, 1.8vw, 22px);
  background: linear-gradient(180deg, rgba(44, 30, 16, .42) 0%, rgba(36, 24, 13, .34) 100%);
  border-bottom: 1px solid rgba(255, 242, 218, .18);
  color: rgba(255, 250, 240, .92);
}

.frame--posts[data-wall-theme="felt"] .wallbar {
  background: linear-gradient(180deg, rgba(12, 16, 13, .62) 0%, rgba(10, 13, 11, .5) 100%);
  border-bottom-color: rgba(255, 255, 255, .09);
  color: rgba(245, 239, 226, .88);
}

.frame--posts[data-wall-theme="peg"] .wallbar {
  background: linear-gradient(180deg, rgba(255, 253, 248, .88) 0%, rgba(249, 245, 237, .82) 100%);
  border-bottom-color: rgba(29, 27, 22, .1);
  color: rgba(29, 27, 22, .84);
}

.wallbar__group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

/* 分段排布开关 */
.wallbar__seg {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .2);
  border: 1px solid rgba(255, 255, 255, .14);
}

.frame--posts[data-wall-theme="peg"] .wallbar__seg {
  background: rgba(29, 27, 22, .06);
  border-color: rgba(29, 27, 22, .1);
}

.wbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .1);
  color: inherit;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .24s var(--spring);
}

.wbtn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  flex: none;
}

.wbtn:hover {
  background: rgba(255, 255, 255, .2);
  transform: translateY(-1px);
}

.wbtn:active {
  transform: translateY(0) scale(.97);
}

.wallbar__seg .wbtn {
  height: 24px;
  border-color: transparent;
  background: transparent;
  opacity: .76;
}

.wallbar__seg .wbtn:hover {
  opacity: 1;
  transform: none;
}

.wallbar__seg .wbtn.is-on {
  opacity: 1;
  background: #fbf7ee;
  color: #1d1b16;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
}

.frame--posts[data-wall-theme="peg"] .wbtn {
  border-color: rgba(29, 27, 22, .14);
  background: rgba(255, 255, 255, .75);
  color: #2c2820;
}

.frame--posts[data-wall-theme="peg"] .wbtn:hover {
  background: #fff;
  border-color: rgba(29, 27, 22, .28);
}

.frame--posts[data-wall-theme="peg"] .wallbar__seg .wbtn {
  background: transparent;
  border-color: transparent;
}

.frame--posts[data-wall-theme="peg"] .wallbar__seg .wbtn.is-on {
  background: #1d1b16;
  color: #fbf7ee;
}

/* 红线激活态 */
.wbtn--thread.is-on {
  background: #c54530 !important;
  border-color: #c54530 !important;
  color: #fbf7ee !important;
  box-shadow: 0 4px 12px -4px rgba(197, 69, 48, .75);
}

/* 抽签高光按钮 */
.wbtn--draw {
  background: rgba(232, 197, 106, .24);
  border-color: rgba(232, 197, 106, .48);
}

.frame--posts[data-wall-theme="peg"] .wbtn--draw {
  background: rgba(232, 197, 106, .34);
  border-color: rgba(176, 134, 34, .34);
  color: #3b2d0d;
}

.wbtn--add {
  background: rgba(255, 251, 240, .18);
  border-style: dashed;
}

/* 墙面材质 3 色切换圆点 */
.wallbar__themes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .14);
}

.frame--posts[data-wall-theme="peg"] .wallbar__themes {
  background: rgba(29, 27, 22, .06);
  border-color: rgba(29, 27, 22, .12);
}

.wtheme {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .24s var(--spring), border-color .2s, box-shadow .2s;
}

.wtheme[data-theme="cork"] { background: linear-gradient(135deg, #d7b281, #9e7044); }
.wtheme[data-theme="felt"] { background: linear-gradient(135deg, #353e37, #161b18); }
.wtheme[data-theme="peg"]  { background: linear-gradient(135deg, #faf7f0, #ddd5c5); border-color: rgba(29, 27, 22, .3); }

.wtheme:hover { transform: scale(1.16); }
.wtheme.is-on {
  transform: scale(1.18);
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--tomato), 0 2px 6px rgba(0, 0, 0, .35);
}

.wallbar__hint {
  font-size: 10.5px;
  color: inherit;
  opacity: .74;
  letter-spacing: .04em;
  padding: 0 4px;
}

/* ---------------------------------------------------------- 墙面舞台与 SVG 红线层 */
.wall__stage {
  position: relative;
  z-index: 3;
  isolation: isolate;
  padding: 0 clamp(14px, 1.8vw, 24px);
}

.wall__strings {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: visible;
  opacity: 0;
  transition: opacity .26s var(--ease);
}

.wall.has-strings .wall__strings {
  opacity: 1;
}

.wall__string-shadow {
  fill: none;
  stroke: rgba(34, 16, 6, .16);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wall__string-shadow.is-active {
  stroke: rgba(34, 16, 6, .24);
  stroke-width: 3.6;
}

.wall__string-line {
  fill: none;
  stroke: #c63b29;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .84;
}

.wall__string-line.is-faint {
  stroke: #c63b29;
  stroke-width: 1.45;
  opacity: .34;
}

.wall__string-line.is-active {
  stroke: #e24630;
  stroke-width: 2.25;
  opacity: 1;
}

.wall__string-knot {
  fill: #a92818;
  stroke: rgba(255, 240, 228, .42);
  stroke-width: .65;
}

.wall__string-knot.is-tape {
  fill: rgba(188, 52, 34, .34);
  stroke: none;
}

.wall__string-knot.is-active {
  fill: #dc3a24;
  stroke: rgba(255, 244, 234, .65);
  stroke-width: .75;
}

.frame--posts[data-wall-theme="felt"] .wall__string-shadow {
  stroke: rgba(0, 0, 0, .34);
}

.frame--posts[data-wall-theme="felt"] .wall__string-shadow.is-active {
  stroke: rgba(0, 0, 0, .48);
}

.frame--posts[data-wall-theme="felt"] .wall__string-line {
  stroke: #e25d49;
  opacity: .86;
}

.frame--posts[data-wall-theme="felt"] .wall__string-line.is-faint {
  stroke: #e25d49;
  opacity: .34;
}

.frame--posts[data-wall-theme="felt"] .wall__string-line.is-active {
  stroke: #ff7b64;
  opacity: 1;
}

.frame--posts[data-wall-theme="felt"] .wall__string-knot {
  fill: #df4d39;
  stroke: rgba(255, 232, 220, .52);
}

.frame--posts[data-wall-theme="felt"] .wall__string-knot.is-active {
  fill: #ff745c;
  stroke: rgba(255, 244, 236, .85);
}

.frame--posts[data-wall-theme="peg"] .wall__string-shadow {
  stroke: rgba(34, 24, 14, .12);
}

/* ---------------------------------------------------------- 便利贴卡片重构 */
.postcards {
  position: relative;
  z-index: 1;
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  transition: height .48s var(--ease-expo);
}

.postcards.is-wall-dragging {
  transition: none;
}

.postcards.no-anim,
.postcards.no-anim .postcard {
  transition: none !important;
}

.postcard {
  position: absolute;
  box-sizing: border-box;
  padding: 25px 20px 18px;
  border: 0;
  border-radius: 2px 2px 3px 2px;
  color: #241d10;
  background-color: var(--note-bg, #fcf0ba);
  /* 轻量纯 CSS 纸张质感（零 SVG 滤镜开销，高刷屏与移动端更顺滑） */
  background-image:
    linear-gradient(180deg, rgba(80, 56, 20, .065) 0%, rgba(80, 56, 20, .012) 22px, transparent 34px),
    linear-gradient(135deg, rgba(255, 255, 255, .24) 0%, transparent 45%, rgba(80, 56, 20, .035) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .52),
    0 2px 4px rgba(42, 26, 10, .14),
    0 12px 24px -10px rgba(42, 26, 10, .34);
  transform:
    perspective(800px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    rotate(calc(var(--tilt, -0.6deg) + var(--drag-tilt, 0deg)));
  transform-origin: 50% 8%;
  translate: 0 0;
  scale: 1;
  rotate: 0deg;
  opacity: 1;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  z-index: var(--z, 1);
  transition:
    left .54s var(--ease-expo),
    top .54s var(--ease-expo),
    width .46s var(--ease-expo),
    opacity .32s var(--ease),
    transform .28s var(--ease-expo),
    box-shadow .28s var(--ease),
    translate .52s var(--ease-expo),
    scale .52s var(--ease-expo),
    rotate .52s var(--ease-expo);
}

/* 5 种低饱和自然纸色（覆盖旧 nth-child） */
.postcard:nth-child(4n + 1),
.postcard:nth-child(4n + 2),
.postcard:nth-child(4n + 3),
.postcard:nth-child(4n) {
  background-color: var(--note-bg, #fcf0ba);
}
.postcard[data-tone="butter"] { --note-bg: #fbf0bd; --note-fold: #e2d18d; }
.postcard[data-tone="blush"]  { --note-bg: #f8ddd9; --note-fold: #dfb9b3; }
.postcard[data-tone="sky"]    { --note-bg: #dcebf6; --note-fold: #b8cde0; }
.postcard[data-tone="sage"]   { --note-bg: #dfecd6; --note-fold: #bccfaf; }
.postcard[data-tone="kraft"]  { --note-bg: #f3e4cc; --note-fold: #d5be9c; }

/* 暗房毛毡下加深纸张浮空阴影 */
.frame--posts[data-wall-theme="felt"] .postcard {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .56),
    0 2px 4px rgba(0, 0, 0, .34),
    0 14px 28px -10px rgba(0, 0, 0, .62),
    0 26px 46px -22px rgba(0, 0, 0, .72);
}

/* 真实卷曲折角 */
.postcard::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  pointer-events: none;
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, .36) 0%,
      var(--note-fold, rgba(120, 90, 40, .2)) 48%,
      rgba(45, 28, 12, .16) 50%,
      rgba(45, 28, 12, .05) 100%);
  border-top-left-radius: 3px;
  transition: width .26s var(--ease-expo), height .26s var(--ease-expo);
}

.postcard:hover::after,
.postcard.is-front::after {
  width: 27px;
  height: 27px;
}

/* ---------------------------------------------------------- 3 种手作固定物 */
/* 1) 大头图钉（默认） */
.postcard::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  width: 17px;
  height: 17px;
  margin-left: -8.5px;
  border-radius: 50%;
  z-index: 4;
  background: radial-gradient(circle at 34% 28%, var(--pin-hi, #ffada0) 0%, var(--pin-mid, #d84333) 48%, var(--pin-lo, #8f1d14) 100%);
  box-shadow:
    0 4px 6px -1px rgba(32, 16, 6, .52),
    0 1px 2px rgba(32, 16, 6, .36),
    inset 0 -1.5px 2px rgba(60, 10, 0, .42),
    inset 0 1px 1px rgba(255, 255, 255, .42);
  transition: transform .26s var(--spring), opacity .22s var(--ease), box-shadow .26s var(--ease);
}

.postcard[data-pin-color="red"]   { --pin-hi: #ffa99c; --pin-mid: #d64030; --pin-lo: #8a1d13; }
.postcard[data-pin-color="gold"]  { --pin-hi: #fff0b3; --pin-mid: #d6a234; --pin-lo: #825d12; }
.postcard[data-pin-color="blue"]  { --pin-hi: #a9ceff; --pin-mid: #3a6db8; --pin-lo: #1d3c70; }
.postcard[data-pin-color="green"] { --pin-hi: #b5e6ba; --pin-mid: #3d7d52; --pin-lo: #1f4b2f; }

.postcard > .postcard__pin-shadow {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 22px;
  height: 9px;
  margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 35% 50%, rgba(40, 22, 8, .32), transparent 72%);
  z-index: 3;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .24s var(--ease);
}

/* 2) 半透明和纸胶带 */
.postcard[data-pin="tape"]::before,
.postcard.is-taped::before {
  top: -10px;
  left: 50%;
  margin-left: -38px;
  width: 76px;
  height: 21px;
  border-radius: 1px;
  background:
    repeating-linear-gradient(
      -55deg,
      rgba(255, 255, 255, .24) 0 4px,
      rgba(255, 250, 238, .08) 4px 8px
    ),
    rgba(255, 251, 240, .54);
  box-shadow:
    0 1px 2px rgba(45, 28, 12, .16),
    inset 0 0 0 1px rgba(255, 255, 255, .34);
  transform: rotate(var(--tape-tilt, -2.5deg));
  clip-path: polygon(2% 0, 98% 0, 100% 18%, 97% 38%, 100% 62%, 98% 85%, 100% 100%, 0 100%, 2% 76%, 0 48%, 3% 24%);
}

.postcard[data-pin="tape"] > .postcard__pin-shadow,
.postcard.is-taped > .postcard__pin-shadow {
  display: none;
}

/* 3) 复古黄铜回形针 */
.postcard[data-pin="clip"]::before {
  top: -12px;
  left: 26px;
  margin-left: 0;
  width: 15px;
  height: 30px;
  border-radius: 9px;
  background: transparent;
  border: 2.2px solid #b58d46;
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 194, .45),
    1px 2px 3px rgba(32, 18, 6, .28);
  transform: rotate(-8deg);
}

.postcard[data-pin="clip"] > .postcard__pin-shadow {
  top: 2px;
  left: 26px;
  margin-left: 0;
  width: 16px;
  height: 18px;
  border-radius: 8px;
  border: 1.5px solid rgba(40, 22, 8, .18);
  background: none;
  transform: rotate(-6deg) translate(2px, 2px);
}

/* ---------------------------------------------------------- 卡片悬停、置顶、拖拽、落贴动效 */
/* 显式覆写 site.css 旧版 .postcard:hover / .is-front / .is-dragging 的 z-index 与 translateY，
   确保层叠顺序唯一受持久 --z 控制，不因悬停或残留焦点篡改层级导致红线闪烁穿模 */
.postcard:hover,
.postcard:focus-within {
  z-index: var(--z, 1);
  transform:
    perspective(800px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    rotate(calc(var(--tilt, -0.6deg) + var(--drag-tilt, 0deg)));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .64),
    0 4px 8px rgba(42, 26, 10, .18),
    0 24px 36px -12px rgba(42, 26, 10, .42),
    0 46px 70px -32px rgba(42, 26, 10, .48);
}

.postcard.is-front {
  z-index: var(--z, 1);
  transform:
    perspective(800px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    rotate(calc(var(--tilt, -0.6deg) + var(--drag-tilt, 0deg)));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .62),
    0 4px 6px rgba(42, 26, 10, .16),
    0 22px 36px -12px rgba(42, 26, 10, .44),
    0 44px 68px -30px rgba(42, 26, 10, .46);
}

/* 移动端长按蓄力微压反馈 */
.postcard.is-arming {
  scale: .985;
  transition: scale .18s var(--ease);
}

/* 拖拽抬起：纯 GPU 合成位移（不改 left/top），图钉拔出、纸张离墙浮起 + 惯性摆动 */
.postcard.is-dragging {
  cursor: grabbing;
  touch-action: none;
  z-index: 9998 !important;
  transform: rotate(calc(var(--tilt, -0.6deg) + var(--drag-tilt, 0deg)));
  will-change: transform, translate;
  transition: box-shadow .16s var(--ease), scale .16s var(--ease);
  scale: 1.045;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .65),
    0 12px 20px rgba(36, 20, 6, .22),
    0 32px 54px -14px rgba(36, 20, 6, .52);
}

.postcard.is-dragging::before {
  transform: translateY(-10px) scale(.86);
  opacity: .22;
}

.postcard.is-dragging[data-pin="clip"]::before {
  transform: rotate(-8deg) translateY(-3px) scale(.94);
  opacity: .58;
}

.postcard.is-dragging[data-pin="tape"]::before,
.postcard.is-dragging.is-taped::before {
  transform: rotate(var(--tape-tilt, -2.5deg)) translateY(-3px) scale(.96);
  opacity: .38;
}

.postcard.is-dragging > .postcard__pin-shadow {
  opacity: 0;
}

/* 松手落贴瞬间微弹 */
.postcard.is-landing {
  animation: note-land .38s var(--spring) both;
}

@keyframes note-land {
  0%   { scale: 1.045; }
  45%  { scale: .982; }
  100% { scale: 1; }
}

/* 搜索高亮 / 柔退、抽签聚光 */
.postcard.is-dim {
  opacity: .24;
  filter: saturate(.45);
}

.postcard.is-match {
  box-shadow:
    0 0 0 2.5px var(--tomato),
    0 16px 32px -10px rgba(197, 69, 48, .48);
  z-index: 9960;
}

.postcard.is-drawing {
  scale: 1.06;
  z-index: 9995 !important;
  box-shadow:
    0 0 0 3px var(--butter),
    0 0 28px rgba(232, 197, 106, .65),
    0 24px 44px -14px rgba(36, 20, 6, .55);
}

.postcard.is-target {
  outline: 3px solid var(--tomato);
  outline-offset: 6px;
  z-index: 9975;
}

/* 访客本地便利贴 */
.postcard--guest {
  border: 1px dashed rgba(60, 40, 20, .24);
}

.postcard__guest-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 3px;
  background: rgba(197, 69, 48, .12);
  color: #a93320;
  font-size: 9px;
  letter-spacing: .04em;
  vertical-align: middle;
}

/* ---------------------------------------------------------- 卡片右上快捷操作 & 印章 */
.postcard__actions {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .2s var(--ease), transform .22s var(--ease);
}

.postcard:hover .postcard__actions,
.postcard:focus-within .postcard__actions,
.postcard.is-front .postcard__actions {
  opacity: 1;
  transform: translateY(0);
}

.postcard__act {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(29, 27, 22, .08);
  color: rgba(44, 32, 16, .74);
  transition: background .18s, color .18s, transform .2s var(--spring);
}

.postcard__act svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.postcard__act:hover {
  background: rgba(29, 27, 22, .85);
  color: #fbf7ee;
  transform: scale(1.06);
}

.postcard__act--del:hover {
  background: #c54530;
  color: #fff;
}

.postcard__act--reset[hidden] { display: none; }

/* 卡片底部手账印章标记 */
.postcard__stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.postcard__stamps:empty { display: none; }

.note-stamp-mini {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border: 1.2px solid rgba(182, 50, 32, .52);
  border-radius: 3px;
  color: rgba(176, 44, 26, .84);
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  transform: rotate(-3.5deg);
  background: rgba(197, 69, 48, .05);
  pointer-events: none;
}

.note-stamp-mini:nth-child(2n) {
  transform: rotate(2.6deg);
  border-color: rgba(42, 102, 74, .52);
  color: rgba(34, 94, 66, .84);
  background: rgba(42, 102, 74, .05);
}

/* 卡片内容排版精修 */
.postcard__meta {
  display: block;
  margin: 0 0 11px;
  padding: 0 28px 9px 0;
  background: transparent;
  border-bottom: 1px dashed rgba(60, 40, 20, .24);
  color: rgba(54, 38, 18, .66);
  font-size: 10px;
  letter-spacing: .06em;
  line-height: 1.65;
}

.postcard__meta a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.postcard__meta a:hover {
  color: #b23a26;
}

.postcard__text {
  margin: 0 0 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--hand);
  font-size: clamp(16px, 1.12vw, 18.5px);
  line-height: 1.76;
  color: #241d10;
}

.postcard__text:last-child { margin-bottom: 0; }

/* 照片：拍立得小相片贴纸 */
.postcard__media {
  display: grid;
  grid-template-columns: repeat(var(--pcols, 1), minmax(0, 1fr));
  gap: 8px;
  align-items: start;
  margin: 6px 0 0;
}

.postcard__ph {
  position: relative;
  display: block;
  padding: 5px 5px 12px;
  border: 0;
  background: #fffdf8;
  line-height: 0;
  cursor: zoom-in;
  overflow: visible;
  border-radius: 1px;
  box-shadow:
    0 2px 5px -1px rgba(48, 28, 10, .28),
    0 8px 16px -10px rgba(48, 28, 10, .38);
  transform: rotate(-.7deg);
  transition: box-shadow .28s var(--ease), transform .32s var(--spring);
}

.postcard__ph:nth-child(2n) {
  transform: rotate(.9deg);
}

.postcard__ph::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 28px;
  height: 10px;
  margin-left: -14px;
  background: rgba(255, 250, 232, .68);
  box-shadow: 0 1px 1px rgba(48, 28, 10, .14);
  transform: rotate(-3deg);
  pointer-events: none;
}

.postcard__ph img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--ar, 4/3);
  object-fit: cover;
  border-radius: 1px;
}

.postcard__ph:hover {
  transform: translateY(-3px) rotate(0deg) scale(1.02);
  box-shadow:
    0 6px 14px -3px rgba(48, 28, 10, .38),
    0 18px 28px -14px rgba(48, 28, 10, .46);
}

/* 空筛选状态 */
.wall__empty {
  padding: 54px 20px;
  text-align: center;
  color: rgba(255, 248, 234, .86);
  font-family: var(--hand);
  font-size: 18px;
}

.frame--posts[data-wall-theme="peg"] .wall__empty {
  color: rgba(45, 38, 26, .66);
}

.wall__empty button {
  margin-top: 12px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--tomato);
  color: #fbf7ee;
  font-family: var(--sans);
  font-size: 12px;
}

/* ---------------------------------------------------------- 手拿精读卡 Overlay */
.note-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 36px);
  background: rgba(14, 12, 9, .62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s var(--ease);
}

.note-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.note-modal__sheet {
  position: relative;
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  padding: 32px clamp(22px, 3.4vw, 34px) 22px;
  border-radius: 4px;
  background-color: var(--modal-bg, #fbf0bd);
  background-image:
    linear-gradient(180deg, rgba(80, 56, 20, .06) 0%, transparent 32px),
    linear-gradient(135deg, rgba(255, 255, 255, .24) 0%, transparent 50%, rgba(80, 56, 20, .04) 100%);
  color: #241d10;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .6),
    0 34px 80px -20px rgba(0, 0, 0, .68),
    0 10px 24px -10px rgba(0, 0, 0, .42);
  transform: translateY(18px) scale(.94) rotate(-1.6deg);
  transition: transform .36s var(--spring), background-color .28s var(--ease);
}

.note-modal.is-open .note-modal__sheet {
  transform: translateY(0) scale(1) rotate(-.4deg);
}

.note-modal__sheet[data-tone="butter"] { --modal-bg: #fbf0bd; }
.note-modal__sheet[data-tone="blush"]  { --modal-bg: #f8ddd9; }
.note-modal__sheet[data-tone="sky"]    { --modal-bg: #dcebf6; }
.note-modal__sheet[data-tone="sage"]   { --modal-bg: #dfecd6; }
.note-modal__sheet[data-tone="kraft"]  { --modal-bg: #f3e4cc; }

/* 顶部装饰大胶带 */
.note-modal__tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 108px;
  height: 26px;
  margin-left: -54px;
  background: rgba(255, 251, 240, .62);
  box-shadow: 0 2px 5px rgba(40, 24, 10, .18), inset 0 0 0 1px rgba(255, 255, 255, .4);
  transform: rotate(-1.8deg);
  pointer-events: none;
}

.note-modal__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(60, 40, 20, .28);
  margin-bottom: 16px;
}

.note-modal__meta {
  font-size: 11px;
  letter-spacing: .07em;
  color: rgba(54, 38, 18, .7);
  line-height: 1.7;
}

.note-modal__close {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(29, 27, 22, .08);
  color: #2c2214;
  font-size: 17px;
  transition: background .18s, transform .2s var(--spring);
}

.note-modal__close:hover {
  background: #1d1b16;
  color: #fbf7ee;
  transform: rotate(90deg);
}

.note-modal__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.note-modal__text {
  font-family: var(--hand);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.82;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #211a0e;
  margin-bottom: 16px;
}

.note-modal__media {
  display: grid;
  grid-template-columns: repeat(var(--mcols, 1), minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.note-modal__media:empty { display: none; }

.note-modal__ph {
  display: block;
  padding: 7px 7px 14px;
  background: #fffdf8;
  box-shadow: 0 4px 12px -4px rgba(48, 28, 10, .34);
  cursor: zoom-in;
  transition: transform .26s var(--spring);
}

.note-modal__ph:hover { transform: translateY(-2px) scale(1.015); }

.note-modal__ph img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  display: block;
}

/* 印章互动行 */
.note-modal__stamps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0 14px;
  border-top: 1px dashed rgba(60, 40, 20, .2);
  margin-top: 6px;
}

.note-modal__stamps-label {
  font-size: 11px;
  color: rgba(54, 38, 18, .58);
  margin-right: 2px;
}

.stamp-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1.2px dashed rgba(60, 40, 20, .28);
  background: rgba(255, 255, 255, .32);
  color: rgba(44, 32, 16, .78);
  font-size: 11.5px;
  font-weight: 600;
  transition: all .22s var(--spring);
}

.stamp-btn:hover {
  border-style: solid;
  border-color: var(--tomato);
  color: var(--tomato);
  transform: translateY(-1px);
}

.stamp-btn.is-stamped {
  border-style: solid;
  border-color: #b83320;
  background: rgba(197, 69, 48, .12);
  color: #a62b19;
  transform: rotate(-2deg) scale(1.03);
  box-shadow: 0 3px 8px -4px rgba(184, 51, 32, .45);
}

.note-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(60, 40, 20, .14);
  flex-wrap: wrap;
}

.note-modal__nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.note-modal__nbtn {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(29, 27, 22, .2);
  background: rgba(255, 255, 255, .45);
  color: #241d10;
  font-size: 12px;
  font-weight: 500;
  transition: background .18s, color .18s, transform .2s var(--spring);
}

.note-modal__nbtn:hover:not(:disabled) {
  background: #1d1b16;
  color: #fbf7ee;
}

.note-modal__nbtn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.note-modal__idx {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: rgba(54, 38, 18, .62);
  padding: 0 4px;
}

.note-modal__links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: rgba(54, 38, 18, .72);
}

.note-modal__links button,
.note-modal__links a {
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .18s, color .18s;
}

.note-modal__links button:hover,
.note-modal__links a:hover {
  background: rgba(29, 27, 22, .08);
  color: #b23a26;
}

/* ---------------------------------------------------------- 访客试贴便签弹窗 */
.compose-sheet {
  width: min(420px, 100%);
}

.compose__textarea {
  width: 100%;
  min-height: 124px;
  resize: vertical;
  border: 1px dashed rgba(60, 40, 20, .3);
  border-radius: 4px;
  background: rgba(255, 255, 255, .36);
  padding: 12px 14px;
  font-family: var(--hand);
  font-size: 19px;
  line-height: 1.72;
  color: #211a0e;
  outline: none;
  margin-bottom: 14px;
  transition: border-color .2s, background .2s;
}

.compose__textarea:focus {
  border-style: solid;
  border-color: var(--tomato);
  background: rgba(255, 255, 255, .56);
}

.compose__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.compose__tones {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ctone {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 2px solid rgba(40, 28, 14, .18);
  box-shadow: 0 2px 4px rgba(40, 28, 14, .14);
  transition: transform .2s var(--spring), border-color .2s;
}

.ctone[data-tone="butter"] { background: #fbf0bd; }
.ctone[data-tone="blush"]  { background: #f8ddd9; }
.ctone[data-tone="sky"]    { background: #dcebf6; }
.ctone[data-tone="sage"]   { background: #dfecd6; }
.ctone[data-tone="kraft"]  { background: #f3e4cc; }

.ctone.is-on {
  transform: scale(1.16) rotate(-4deg);
  border-color: var(--tomato);
}

.compose__pins {
  display: inline-flex;
  gap: 5px;
}

.cpin {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(40, 28, 14, .2);
  background: rgba(255, 255, 255, .42);
  font-size: 11px;
  color: #3a2d1b;
}

.cpin.is-on {
  background: #1d1b16;
  border-color: #1d1b16;
  color: #fbf7ee;
}

.compose__submit {
  height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--tomato);
  color: #fbf7ee;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 8px 18px -8px rgba(197, 69, 48, .8);
  transition: transform .2s var(--spring), filter .2s;
}

.compose__submit:hover { transform: translateY(-1px); filter: brightness(1.05); }
.compose__submit:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.compose__note {
  font-size: 11px;
  color: rgba(54, 38, 18, .62);
}

/* ---------------------------------------------------------- 触屏设备通用减负 */
@media (hover: none), (pointer: coarse) {
  /* 触屏无需鼠标 3D 倾斜与光晕重绘，切纯 2D GPU 合成 */
  .wall::after {
    background: none;
  }
  .postcard {
    transform: rotate(calc(var(--tilt, -0.6deg) + var(--drag-tilt, 0deg)));
    touch-action: pan-y;
  }
  .postcard:hover,
  .postcard:focus-within {
    transform: rotate(calc(var(--tilt, -0.6deg) + var(--drag-tilt, 0deg)));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .52),
      0 2px 4px rgba(42, 26, 10, .14),
      0 10px 20px -10px rgba(42, 26, 10, .3);
    z-index: var(--z, 1);
  }
  .postcard.is-front {
    z-index: var(--z, 1);
    transform: rotate(calc(var(--tilt, -0.6deg) + var(--drag-tilt, 0deg)));
  }
  .postcard__actions {
    opacity: .92;
    transform: none;
  }
}

/* ---------------------------------------------------------- 移动端专项适配 */
@media (max-width: 720px) {
  .frame--posts {
    padding: calc(98px + env(safe-area-inset-top, 0px)) 8px 68px;
  }
  .posts__head {
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
  .posts__head .frame__title {
    font-size: clamp(26px, 7.6vw, 34px);
    line-height: 1.08;
  }
  .posts__aside {
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin-left: 0;
  }
  /* 年份条单行横滑，不换行挤占首屏 */
  .postyears {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .postyears::-webkit-scrollbar { display: none; }
  .postyears__chip {
    flex: none;
    font-size: 12.5px;
    padding: 4px 10px;
  }
  /* 搜索框与“仅看带图”齐平占满一行 */
  .posts__filter-row {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 7px;
    width: 100%;
  }
  .posts__search-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }
  .posts__search,
  .posts__search:focus {
    width: 100%;
    height: 32px;
    font-size: 13px;
  }
  .posts__media-toggle {
    flex: none;
    height: 32px;
    padding: 0 11px;
    font-size: 12px;
  }
  .posts__match-badge {
    display: none;
  }
  /* 精致细木框，把横向空间全部留给便利贴 */
  .wall-frame {
    padding: 5px;
    border-radius: 12px;
    box-shadow:
      inset 0 1px 0 rgba(255, 232, 200, .24),
      0 14px 30px -18px rgba(45, 28, 12, .5);
  }
  .wall-frame__bolt {
    width: 5px;
    height: 5px;
  }
  .wall {
    border-radius: 8px;
    padding-bottom: 18px;
  }
  /* 工具条压缩为单行横向滑动胶囊条（145px → 43px，释放超 100px 视口！） */
  .wallbar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 22px 8px 10px;
    margin-bottom: 10px;
    gap: 7px;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
  }
  .wallbar::-webkit-scrollbar { display: none; }
  .wallbar__group {
    flex: none;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .wallbar__hint {
    display: none;
  }
  .wbtn {
    height: 28px;
    padding: 0 10px;
    font-size: 11.5px;
  }
  .wallbar__seg .wbtn {
    height: 24px;
    padding: 0 9px;
  }
  /* 移动端去掉软木/毛毡上的 SVG feTurbulence 噪点滤镜与跟随光晕，纯 CSS 轻纹理保 60fps */
  .wall::before {
    background-image:
      radial-gradient(rgba(82, 52, 24, .28) 1px, transparent 1.5px),
      radial-gradient(rgba(255, 236, 206, .26) 1px, transparent 1.5px);
    background-size: 14px 14px, 19px 19px;
    mix-blend-mode: normal;
    opacity: .42;
  }
  .frame--posts[data-wall-theme="felt"] .wall::before {
    background-image:
      repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px),
      repeating-linear-gradient(-45deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 4px);
    background-size: 6px 6px, 6px 6px;
    mix-blend-mode: normal;
  }
  .wall::after {
    background: none;
    box-shadow: inset 0 8px 18px -12px rgba(45, 25, 10, .38);
  }
  .wall__stage {
    padding: 0 6px;
  }
  /* 移动端宽便利贴：纯 2D 变换 + 轻盈单层阴影 + 舒展字号 */
  .postcard {
    padding: 24px 15px 15px;
    transform: rotate(calc(var(--tilt, -0.6deg) + var(--drag-tilt, 0deg)));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .5),
      0 6px 16px -6px rgba(42, 26, 10, .28);
  }
  .frame--posts[data-wall-theme="felt"] .postcard {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .52),
      0 10px 22px -8px rgba(0, 0, 0, .58);
  }
  .postcard:hover,
  .postcard:focus-within {
    transform: rotate(calc(var(--tilt, -0.6deg) + var(--drag-tilt, 0deg)));
  }
  .postcard.is-front {
    transform: rotate(calc(var(--tilt, -0.6deg) + var(--drag-tilt, 0deg)));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .58),
      0 12px 26px -8px rgba(42, 26, 10, .4);
  }
  .postcard.is-dragging {
    scale: 1.035;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .6),
      0 18px 34px -10px rgba(36, 20, 6, .48);
  }
  .postcard__actions {
    top: 5px;
    right: 6px;
    gap: 4px;
    opacity: .92;
    transform: none;
  }
  .postcard__act {
    width: 26px;
    height: 24px;
    border-radius: 6px;
  }
  .postcard__act svg {
    width: 12.5px;
    height: 12.5px;
  }
  .postcard__meta {
    font-size: 10px;
    line-height: 1.55;
    margin-bottom: 9px;
    padding: 0 34px 8px 0;
  }
  .postcard:has(.postcard__act--reset:not([hidden])) .postcard__meta,
  .postcard--guest .postcard__meta {
    padding-right: 62px;
  }
  .postcard__text {
    font-size: 16.5px;
    line-height: 1.72;
  }
  .postcard__ph {
    padding: 5px 5px 10px;
    box-shadow: 0 4px 10px -4px rgba(48, 28, 10, .3);
  }
  /* 移动端精读卡：去 backdrop-filter 降 GPU 负载，优化留白与底栏触控 */
  .note-modal {
    padding: 14px 12px;
    background: rgba(14, 12, 9, .76);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .note-modal__sheet {
    max-height: 88dvh;
    padding: 24px 18px 16px;
    box-shadow: 0 22px 50px -16px rgba(0, 0, 0, .62);
  }
  .note-modal__text {
    font-size: 20px;
    line-height: 1.76;
  }
  .note-modal__close {
    width: 34px;
    height: 34px;
  }
  .note-modal__nbtn {
    height: 34px;
    padding: 0 13px;
    font-size: 12.5px;
  }
  .stamp-btn {
    padding: 6px 11px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .postcard,
  .postcard::before,
  .postcard::after,
  .postcard__ph,
  .postcards,
  .note-modal,
  .note-modal__sheet {
    transition: none !important;
    animation: none !important;
  }
}
