/* 3-2 留言板。class 一律 nb- 开头；日历底部的汇总卡 .nb-card；弹窗借心愿单的蕾丝框 .ws-pop */
.nb { position: relative; min-height: 100%; padding-bottom: calc(30px + var(--safe-b)); }
.nb .lace-edge { top: 0; }
.nb .cl-top { padding-bottom: 4px; }
.nb-sub { margin: 2px 22px 0; text-align: center; font-size: 12px; color: var(--ink-2); }
.nb-sub b { font-weight: 500; color: var(--mauve-deep); }
.nb-f { display: flex; justify-content: center; gap: 6px; margin: 12px 22px 0; }
.nb-f button { height: 28px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--lace); background: var(--card); font: inherit; font-size: 12px; color: var(--ink-2); }
.nb-f button[aria-pressed="true"] { background: var(--mauve-btn); border-color: var(--mauve-btn); color: #FBF8F4; }
.nb-body { padding: 0 20px; }
.nb-h2 { margin: 22px 2px 10px; display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: 3px; color: var(--ink); }
.nb-h2 i { font-family: var(--font-script); font-style: normal; font-weight: 400; font-size: 18px; letter-spacing: 0; color: var(--mauve-deep); }
.nb-h2 small { margin-left: auto; font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--ink-2); }

/* 一张纸条：信纸颜色 + 横线 + 里面一道细框，不歪 */
.nb-slip { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; height: 132px; padding: 16px 12px 9px; border: 0; border-radius: 2px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background-color: var(--tc); background-image: repeating-linear-gradient(transparent 0 21px, rgba(169, 154, 170, .2) 21px 22px); background-position: 0 14px;
  box-shadow: inset 0 0 0 3px var(--tc), inset 0 0 0 3.6px rgba(169, 154, 170, .35), 0 2px 5px rgba(60, 45, 55, .16), 0 8px 16px rgba(60, 45, 55, .08); }
.nb-slip .tx { flex: 1; min-height: 0; font-size: 13px; line-height: 22px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.nb-slip .ft { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--ink-2); min-width: 0; }
.nb-slip .ft .dy-av { width: 18px; height: 18px; font-size: 9px; flex: none; }
.nb-slip .ft .nm { white-space: nowrap; }
.nb-slip .ft time { font-family: var(--font-serif); white-space: nowrap; }
.nb-slip .bd { margin-left: auto; display: flex; gap: 6px; color: var(--mauve-deep); }
.nb-slip .bd i { font-style: normal; display: inline-flex; align-items: center; gap: 2px; }
/* 塞在缎带下面：左上角斜压一截缎带，再钉一颗珍珠 */
.nb-slip .tuck { position: absolute; left: -8px; top: 9px; width: 46px; height: 9px; transform: rotate(-38deg); pointer-events: none;
  background: linear-gradient(180deg, #B7A3B8, #C9B8C9 45%, #A8939F); box-shadow: 0 1px 2px rgba(60, 45, 55, .3); }
.nb-slip .pin { position: absolute; left: 7px; top: 4px; width: 10px; height: 10px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff, #EFE7EC 45%, #C9BAC6); box-shadow: 0 1px 2px rgba(60, 45, 55, .45); }
.nb-slip.ai .pin { background: radial-gradient(circle at 35% 30%, #fff, #E4ECEC 45%, #A9B8B9); }
.nb-slip .nw { position: absolute; right: 8px; top: 6px; font-style: normal; font-size: 10px; padding: 0 6px; border-radius: 7px; background: var(--mauve-btn); color: #FBF8F4; letter-spacing: 1px; }
.nb-slip.done .tx { color: var(--ink-2); }
.nb-slip .ok { position: absolute; right: 8px; bottom: 26px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 14px; color: #8A6D45;
  border: 1.5px solid rgba(171, 148, 115, .7); transform: rotate(-12deg); background: rgba(232, 214, 180, .25); }

/* 钉住的：大一点，顶上一只蝴蝶结 */
.nb-pins { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 8px; }
.nb-slip.big { height: 148px; padding-top: 22px; }
.nb-slip.big .bw { position: absolute; left: 50%; top: -14px; width: 44px; margin-left: -22px; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(70, 50, 70, .25)); }

/* 板子：亚麻布底 + 斜着交叉的缎带（交叉处钉珍珠扣）+ 一圈木框，左右翻页 */
.nb-board { position: relative; padding: 10px; border-radius: 6px;
  background: #8C7466 linear-gradient(135deg, #9A8274, #7E6759); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 10px 24px rgba(81, 60, 55, .22); }
.nb-pages { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 3px;
  background-color: #EAE1DA;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><defs><radialGradient id='p' cx='.35' cy='.3' r='.7'><stop offset='0' stop-color='%23fff'/><stop offset='.5' stop-color='%23EFE6EC'/><stop offset='1' stop-color='%23BFAFBC'/></radialGradient></defs><g stroke-linecap='square'><path d='M-10 -10 L130 130 M-10 110 L10 130 M110 -10 L130 10' stroke='%23A99AAA' stroke-width='9' stroke-opacity='.75'/><path d='M130 -10 L-10 130 M-10 10 L10 -10 M110 130 L130 110' stroke='%23A99AAA' stroke-width='9' stroke-opacity='.75'/><path d='M-10 -10 L130 130 M130 -10 L-10 130' stroke='%23D9CCD8' stroke-width='2' stroke-opacity='.8'/></g><g fill='url(%23p)'><circle cx='60' cy='60' r='5.5'/><circle cx='0' cy='0' r='5.5'/><circle cx='120' cy='0' r='5.5'/><circle cx='0' cy='120' r='5.5'/><circle cx='120' cy='120' r='5.5'/></g></svg>"),
    repeating-linear-gradient(0deg, rgba(120, 100, 90, .05) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(120, 100, 90, .05) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 2px 8px rgba(60, 45, 40, .25); }
.nb-pages::-webkit-scrollbar { display: none; }
.nb-page { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; padding: 18px 14px; box-sizing: border-box; align-content: start; min-height: 498px; }
.nb-page.empty { display: flex; align-items: center; justify-content: center; }
.nb-page.empty p { padding: 10px 16px; background: rgba(251, 248, 243, .9); border-radius: 4px; font-size: 12.5px; color: var(--ink-2); }
.nb-dots { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.nb-dots .dots { display: flex; align-items: center; gap: 6px; }
.nb-dots .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--lace); transition: width .2s; }
.nb-dots .dots i.on { width: 16px; border-radius: 3px; background: var(--mauve-btn); }
.nb-dots em { font-style: normal; font-family: var(--font-serif); font-size: 12.5px; color: var(--ink-2); }

/* 日历底部的汇总卡（和账本卡同一个质感） */
.nb-card { position: relative; display: block; margin: 8px 0 18px; padding: 16px 16px 14px; border-radius: 4px; color: var(--ink);
  background-color: var(--card); background-image: radial-gradient(rgba(169, 154, 170, .14) .6px, transparent .7px); background-size: 5px 5px;
  box-shadow: 0 0 0 1px var(--lace), 0 0 0 4px var(--paper), 0 0 0 5px var(--lace), 0 10px 24px rgba(81, 75, 74, .1); }
.nb-card .cn { position: absolute; width: 40px; pointer-events: none; }
.nb-card .c1 { left: -6px; top: -6px; } .nb-card .c2 { right: -6px; top: -6px; transform: scaleX(-1); }
.nb-card .hd { margin: 0 0 10px; display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: 2px; }
.nb-card .hd i { font-family: var(--font-script); font-style: normal; font-weight: 400; font-size: 18px; color: var(--mauve-deep); letter-spacing: 0; }
.nb-card .hd em { margin-left: auto; font-style: normal; font-weight: 400; font-size: 11.5px; letter-spacing: 0; color: var(--mauve-deep); display: inline-flex; align-items: center; gap: 4px; }
.nb-card .st { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 6px; }
.nb-card .st span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nb-card .st span + span { padding-left: 10px; border-left: 1px dashed var(--lace); }
.nb-card .st small { font-size: 11px; color: var(--ink-2); letter-spacing: 1px; white-space: nowrap; }
.nb-card .st b { font-family: var(--font-serif); font-weight: 500; font-size: 22px; color: var(--ink); }
.nb-card .st b u { text-decoration: none; font-size: 11px; margin-left: 2px; color: var(--ink-2); }
.nb-card .st b.hot { color: var(--mauve-deep); }
.nb-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; padding: 12px 10px; border-radius: 3px; background-color: #EAE1DA;
  box-shadow: inset 0 0 0 4px #8C7466, inset 0 2px 10px rgba(60, 45, 40, .3); }
.nb-mini { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90'><path d='M-10 -10 L100 100 M100 -10 L-10 100' stroke='%23A99AAA' stroke-width='7' stroke-opacity='.7'/><circle cx='45' cy='45' r='4' fill='%23F3ECF0'/><circle cx='0' cy='0' r='4' fill='%23F3ECF0'/><circle cx='90' cy='0' r='4' fill='%23F3ECF0'/><circle cx='0' cy='90' r='4' fill='%23F3ECF0'/><circle cx='90' cy='90' r='4' fill='%23F3ECF0'/></svg>"); padding: 14px 12px; }
.nb-slip.mini { height: 96px; padding: 14px 10px 7px; gap: 4px; pointer-events: none; }
.nb-slip.mini .tx { font-size: 12px; line-height: 20px; -webkit-line-clamp: 2; }

/* 弹窗里 */
.nb-pop .nb-paper { margin: 12px 0 0; align-self: stretch; padding: 16px 16px 14px; text-align: left; border-radius: 2px;
  background-color: var(--tc); background-image: repeating-linear-gradient(transparent 0 25px, rgba(169, 154, 170, .22) 25px 26px); background-position: 0 14px;
  box-shadow: inset 0 0 0 3px var(--tc), inset 0 0 0 3.6px rgba(169, 154, 170, .35), 0 3px 8px rgba(60, 45, 55, .12); }
.nb-pop .nb-paper p { margin: 0; font-size: 15px; line-height: 26px; letter-spacing: .5px; color: var(--ink); white-space: pre-wrap; }
.nb-pop .due { display: inline-flex; align-items: center; gap: 2px; }
.nb-acts { display: flex; gap: 8px; margin-top: 12px; }
.nb-acts button { height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--lace); background: var(--card); font: inherit; font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.nb-acts .ck { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--mauve); box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
.nb-acts [data-act="done"][aria-pressed="true"] { border-color: #C9B392; background: rgba(232, 214, 180, .3); color: #8A6D45; }
.nb-acts [data-act="done"][aria-pressed="true"] .ck { border-color: #AB9473; background: #AB9473; box-shadow: inset 0 0 0 2px #FBF6EA; }
.nb-acts [data-act="pin"][aria-pressed="true"] { border-color: var(--mauve-btn); background: var(--mauve-btn); color: #FBF8F4; }

/* 写留言时挑信纸颜色（日历和留言板的「留个言」共用） */
.dl-add .tint { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.dl-add .tint button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--lace); background: var(--tc); padding: 0; }
.dl-add .tint button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--mauve-btn); }
.dl-board { margin: 20px 22px 0; }
.dl-board .nb-card { margin: 0; }
.dl-board + .dl-sum { margin-top: 18px; }
.nb-slip.mini .tx { flex: none; max-height: 40px; }
.nb-slip.mini .ft { margin-top: auto; }
