/* ===========================================================
   宠物手账（2026-10-17 站长选定 B 版「手账拼贴」）
   -----------------------------------------------------------
   今日 / 崽签 / 日历 / 提醒 / 成长 / 档案 六页共用。
   米黄横格纸 + 楷体手写感 + 拍立得 + 胶带 + 右侧彩色索引贴。
   只作用于 body.pet-book，不影响站内其他页面。
   =========================================================== */
body.pet-book {
  --pb-paper: #f6efe1;
  --pb-sheet: #fffdf7;
  --pb-ink: #3b2f22;
  --pb-ink2: #6a5a46;
  --pb-ink3: #8a7a63;
  --pb-line: #d8c8aa;
  --pb-rule: rgba(120, 100, 70, .12);
  --pb-red: #c4513a;
  --pb-red-d: #8f3626;
  --pb-green: #5f8a5a;
  --pb-blue: #4f7a99;
  --pb-yellow: #e9b949;
  --pb-pink: #e39a96;
  --pb-tape: rgba(233, 185, 73, .55);
  --pb-hand: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "Songti SC", serif;
  background: var(--pb-paper) repeating-linear-gradient(transparent 0 31px, var(--pb-rule) 31px 32px);
  color: var(--pb-ink);
}
.pet-book .pb-hand { font-family: var(--pb-hand); }

/* ---------- 本子 + 右侧索引贴 ---------- */
.pb-book { max-width: 600px; margin: 0 auto; padding: 14px 52px 72px 16px; position: relative; min-height: 70vh; }
.pb-idx { position: fixed; z-index: 30; top: 128px; right: max(0px, calc(50vw - 300px)); display: flex; flex-direction: column; gap: 6px; }
.pb-idx a { display: block; width: 36px; padding: 12px 0; writing-mode: vertical-rl; text-align: center; letter-spacing: 4px;
  font-family: var(--pb-hand); font-size: 15px; color: #fff; text-decoration: none; border-radius: 9px 0 0 9px;
  opacity: .6; box-shadow: -2px 2px 0 rgba(0, 0, 0, .08); transition: transform .2s, opacity .2s, width .2s; }
.pb-idx a:hover { opacity: .85; }
.pb-idx a.is-on { opacity: 1; width: 44px; transform: translateX(-8px); }
.pb-idx .t-today { background: var(--pb-red); }
.pb-idx .t-calendar { background: var(--pb-yellow); }
.pb-idx .t-reminders { background: var(--pb-blue); }
.pb-idx .t-timeline { background: var(--pb-green); }
.pb-idx .t-profiles { background: var(--pb-pink); }

/* ---------- 顶部：拍立得头像 + 标题 + 换一只 ---------- */
.pb-top { display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; }
.pb-pol { background: #fff; padding: 5px 5px 15px; box-shadow: 0 3px 8px rgba(0, 0, 0, .15); transform: rotate(-4deg); flex: none; }
.pb-pol > span { width: 56px; height: 56px; display: grid; place-items: center; font-size: 30px;
  background: linear-gradient(135deg, #f3cf9e, #d99a5a); }
.pb-pol.is-dog > span { background: linear-gradient(135deg, #f1dcb5, #c8a06a); }
.pb-title { font-family: var(--pb-hand); font-size: 26px; line-height: 1.2; margin: 0; font-weight: 700; }
.pb-sub { font-size: 12.5px; color: var(--pb-ink3); margin-top: 3px; }
.pb-who { position: relative; min-width: 0; flex: 1; }
.pb-switch { display: inline-flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 2px; }
.pb-switch a { font-size: 13px; padding: 4px 11px; border-radius: 99px; background: var(--pb-sheet); color: var(--pb-ink2);
  text-decoration: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.pb-switch a.is-on, .pb-switch .pb-chip.is-on > a { background: var(--pb-ink); color: #fffdf7; }
.pb-switch a.is-add { background: transparent; box-shadow: none; border: 1.5px dashed var(--pb-ink3); }
/* 档案页：每个档案右上角一个 ×（2026-10-18） */
.pb-chip { position: relative; display: inline-flex; }
.pb-switch.is-del { gap: 10px 10px; padding-top: 4px; }
.pb-switch.is-del .pb-chip > a { padding-right: 14px; }
.pb-x { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; min-height: 0; padding: 0; border: 0; border-radius: 50%;
  background: var(--pb-red); color: #fff; font: 700 13px/20px system-ui, sans-serif; text-align: center; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.pb-x::before { content: ''; position: absolute; inset: -8px; }
.pb-x:hover { background: var(--pb-red-d); }
.pb-x:focus-visible { outline: 2px solid var(--pb-ink); outline-offset: 1px; }
.pp-name-go { font-size: 12px; margin-left: 6px; color: var(--pb-red); white-space: nowrap; }

/* ---------- 纸片 / 胶带 / 小节标题 ---------- */
.pb-paper { background: var(--pb-sheet); border-radius: 4px; padding: 16px; position: relative;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .09); margin: 18px 2px 8px; }
.pb-paper.is-tilt { transform: rotate(-.8deg); }
.pb-paper.is-tilt2 { transform: rotate(.8deg); }
.pb-tape::before { content: ""; position: absolute; width: 70px; height: 20px; background: var(--pb-tape);
  top: -9px; left: 50%; margin-left: -35px; transform: rotate(-3deg); }
.pb-sec { font-family: var(--pb-hand); font-size: 21px; margin: 24px 0 6px; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.pb-sec::after { content: ""; flex: 1; border-bottom: 2px dashed var(--pb-line); }
.pb-sec a, .pb-sec small { font-family: -apple-system, "PingFang SC", sans-serif; font-size: 13px; font-weight: 400; color: var(--pb-red); text-decoration: none; order: 2; }
.pb-sec small { color: var(--pb-ink3); }
.pb-hl { background: linear-gradient(transparent 55%, rgba(233, 185, 73, .55) 55%); }
.pb-muted { color: var(--pb-ink3); font-size: 13px; line-height: 1.75; }
.pb-text { font-size: 14.5px; line-height: 1.85; color: var(--pb-ink2); }

/* 印章 */
.pb-stamp { display: inline-grid; place-items: center; border: 2.5px solid var(--pb-red); color: var(--pb-red); border-radius: 50%;
  font-family: var(--pb-hand); font-weight: 700; transform: rotate(-12deg); text-align: center; line-height: 1.1;
  width: 56px; height: 56px; font-size: 13px; }

/* 贴纸 */
.pb-stickers { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pb-sticker { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 99px; padding: 6px 12px;
  font-size: 13px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); color: var(--pb-ink); text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
button.pb-sticker:active { transform: scale(.96); }

/* 按钮 */
.pb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--pb-ink); color: #fffdf7;
  border-radius: 7px; padding: 12px 18px; font-weight: 700; font-size: 15px; border: 2px solid var(--pb-ink);
  text-decoration: none; cursor: pointer; font-family: inherit; }
.pb-btn.is-o { background: transparent; color: var(--pb-ink); }
.pb-btn.is-red { background: var(--pb-red); border-color: var(--pb-red); }
.pb-btn.is-sm { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.pb-btn[disabled] { opacity: .5; cursor: default; }
.pb-btns { display: flex; gap: 10px; margin-top: 14px; }
.pb-btns > * { flex: 1; }

/* ＋ 悬浮钮 */
.pb-fab { position: fixed; z-index: 31; right: max(64px, calc(50vw - 236px)); bottom: 26px; width: 56px; height: 56px;
  border-radius: 50%; background: var(--pb-red); color: #fff; font-size: 30px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 5px 0 var(--pb-red-d); border: 0; cursor: pointer; }
.pb-fab:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--pb-red-d); }

/* ---------- 勾选清单 ---------- */
.pb-check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; font-size: 15.5px; border-bottom: 1px dashed transparent; }
.pb-check .pb-box { width: 22px; height: 22px; border: 2px solid var(--pb-ink); border-radius: 3px; flex: none; background: transparent;
  cursor: pointer; position: relative; margin-top: 1px; padding: 0; }
.pb-check .pb-box:hover { background: rgba(95, 138, 90, .12); }
.pb-check.is-done .pb-box { background: var(--pb-green); border-color: var(--pb-green); }
.pb-check.is-done .pb-box::after { content: "✓"; color: #fff; position: absolute; left: 3px; top: -3px; font-size: 16px; }
.pb-check.is-done .pb-ct { text-decoration: line-through; color: var(--pb-ink3); }
.pb-check .pb-cm { flex: 1; min-width: 0; }
.pb-check .pb-cs { display: block; font-size: 12px; color: var(--pb-ink3); margin-top: 1px; }
.pb-check .pb-cn { display: block; font-size: 12.5px; color: var(--pb-ink2); margin-top: 2px; }
.pb-check .pb-due { font-size: 12.5px; color: var(--pb-ink3); white-space: nowrap; margin-top: 2px; }
.pb-check .pb-due.is-hot { color: var(--pb-red); font-weight: 700; }
.pb-check .pb-more { border: 0; background: none; color: var(--pb-ink3); font-size: 18px; cursor: pointer; padding: 0 2px; line-height: 1; }

/* ---------- 拍立得照片 ---------- */
.pb-polo { background: #fff; padding: 8px 8px 30px; box-shadow: 0 4px 10px rgba(0, 0, 0, .15); position: relative; display: block;
  width: min(240px, 72%); margin: 22px 0 10px; text-decoration: none; color: inherit; }
.pb-polo .pb-img { aspect-ratio: 1/1; background: linear-gradient(135deg, #f0c08a, #c9803e); display: grid; place-items: center;
  font-size: 54px; overflow: hidden; }
.pb-polo .pb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-polo .pb-cap { position: absolute; bottom: 6px; left: 10px; right: 10px; font-family: var(--pb-hand); font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 底部弹出表单 ---------- */
.pb-sheet-mask { position: fixed; inset: 0; background: rgba(40, 30, 20, .4); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.pb-sheet { position: fixed; z-index: 81; left: 50%; bottom: 0; width: min(600px, 100%); max-height: 88vh; overflow: auto;
  transform: translate(-50%, 105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  background: var(--pb-sheet) repeating-linear-gradient(transparent 0 31px, var(--pb-rule) 31px 32px);
  border-radius: 16px 16px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
  visibility: hidden; transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s .28s; }
.pb-sheet.is-open { transform: translate(-50%, 0); visibility: visible; transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.pb-sheet-mask.is-open { opacity: 1; pointer-events: auto; }
.pb-sheet .pb-grab { width: 40px; height: 4px; background: var(--pb-line); border-radius: 2px; margin: 0 auto 8px; }
.pb-sheet h2 { font-family: var(--pb-hand); font-size: 23px; margin: 4px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.pb-sheet h2 button { border: 0; background: none; font-size: 26px; color: var(--pb-ink3); cursor: pointer; line-height: 1; }
body.pb-lock { overflow: hidden; }

/* 表单字段 */
.pb-field { margin: 12px 0; }
.pb-field > label, .pb-label { display: block; font-size: 13px; color: var(--pb-ink2); margin-bottom: 6px; font-weight: 600; }
.pb-field .pb-opt { font-weight: 400; color: var(--pb-ink3); margin-left: 4px; }
.pb-input { width: 100%; box-sizing: border-box; border: 0; border-bottom: 2px solid var(--pb-line); background: transparent; font: inherit;
  font-size: 16px; padding: 8px 2px; color: var(--pb-ink); border-radius: 0; }
.pb-input:focus { outline: none; border-color: var(--pb-red); }
select.pb-input { appearance: auto; }
textarea.pb-input { border: 2px solid var(--pb-line); border-radius: 6px; padding: 8px; background: #fff; }
.pb-inline { display: flex; align-items: center; gap: 8px; }
.pb-inline .pb-input { width: auto; flex: 1; }
.pb-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-seg label { cursor: pointer; }
.pb-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pb-seg span { display: inline-block; padding: 7px 13px; border-radius: 99px; background: #fff; font-size: 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.pb-seg input:checked + span { background: var(--pb-ink); color: #fffdf7; }
.pb-seg input:focus-visible + span { outline: 2px solid var(--pb-red); }
.pb-msg { font-size: 13.5px; min-height: 1.2em; margin: 8px 0 0; color: var(--pb-ink2); }
.pb-msg.is-bad { color: var(--pb-red); }
.pb-msg.is-good { color: var(--pb-green); }
.pb-danger { color: var(--pb-red); background: none; border: 0; font-size: 14px; cursor: pointer; padding: 10px 0; text-decoration: underline; }

/* 空态 / 未登录 */
.pb-empty { text-align: center; padding: 22px 10px; }
.pb-empty .pb-big { font-family: var(--pb-hand); font-size: 22px; margin-bottom: 8px; }
.pb-empty p { color: var(--pb-ink2); font-size: 14px; line-height: 1.8; }
.pb-empty .pb-btns { justify-content: center; }
.pb-empty .pb-btns > * { flex: 0 1 auto; }
.pb-foot { font-size: 12px; color: var(--pb-ink3); text-align: center; margin-top: 30px; line-height: 1.7; }

/* toast */
.pb-toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--pb-ink); color: #fffdf7;
  padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 90; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 86vw; }
.pb-toast.is-on { opacity: 1; }

@media (max-width: 420px) {
  .pb-book { padding-right: 44px; padding-left: 12px; }
  .pb-idx a { width: 32px; font-size: 14px; padding: 10px 0; }
  .pb-idx a.is-on { width: 38px; transform: translateX(-6px); }
  .pb-fab { right: 54px; }
  .pb-title { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .pb-sheet, .pb-sheet-mask, .pb-idx a { transition: none; }
}

/* ---------- 档案：宠物护照 ---------- */
.pp { background: #123d3a; color: #efe6cf; border-radius: 8px; padding: 16px 16px 18px; position: relative; box-shadow: 0 6px 0 #0a2624; margin: 18px 0 10px; }
.pp-h { font-family: var(--pb-hand); letter-spacing: 6px; font-size: 13px; opacity: .75; margin: 0; }
.pp-row { display: flex; gap: 14px; margin-top: 12px; }
.pp-ph { width: 84px; height: 104px; background: linear-gradient(135deg, #f3cf9e, #d99a5a); border: 3px solid #efe6cf; display: grid; place-items: center; font-size: 46px; flex: none; }
.pp dl { margin: 0; font-size: 13px; line-height: 1.95; min-width: 0; }
.pp dt { display: inline; opacity: .65; }
.pp dd { display: inline; margin: 0 0 0 6px; font-weight: 700; }
.pp dd::after { content: ""; display: block; }
.pp .pb-stamp { position: absolute; right: 12px; top: 10px; border-color: #e9b949; color: #e9b949; width: 62px; height: 62px; }
.pp-bz { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.pp-bz span { background: rgba(239, 230, 207, .1); border: 1px solid rgba(239, 230, 207, .25); border-radius: 4px; text-align: center; padding: 6px 0;
  font-family: var(--pb-hand); font-size: 20px; line-height: 1.2; }
.pp-bz small { display: block; font-family: -apple-system, sans-serif; font-size: 10px; opacity: .6; }
.pp-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 4px; }
.pp-acts a, .pp-acts button { flex-direction: column; justify-content: center; padding: 10px 0; border-radius: 12px; font-size: 13px; }
.pp-acts i { font-style: normal; font-size: 22px; display: block; margin-bottom: 2px; }
.pp-mini { display: flex; gap: 12px; align-items: center; background: var(--pb-sheet); padding: 10px 12px; border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .08); margin-top: 10px; text-decoration: none; color: inherit; }
.pp-mini .pb-pol { transform: rotate(3deg); padding: 3px 3px 9px; }
.pp-mini .pb-pol > span { width: 40px; height: 40px; font-size: 21px; }
.pp-mini b { font-family: var(--pb-hand); font-size: 19px; display: block; }
.pp-mini small { font-size: 12px; color: var(--pb-ink3); }
.pp-mini .pp-go { margin-left: auto; color: var(--pb-ink3); }
/* 勾选框：mobile.css 给按钮统一了 44px 最小高度，这里视觉上保持 22px 小方框，点按区域用外扩补上 */
.pet-book .pb-check .pb-box { min-height: 0; min-width: 0; height: 22px; width: 22px; }
.pet-book .pb-check .pb-box::before { content: ""; position: absolute; inset: -11px; }
.pet-book .pb-check .pb-more { min-height: 0; min-width: 0; padding: 4px 6px; }
.pp-mini-wrap { position: relative; margin-top: 10px; }
.pp-mini-wrap > .pp-mini { margin-top: 0; padding-right: 22px; }
.pp-mini-wrap > .pb-x { top: -5px; right: -5px; }
