/* 历史存档（存档保险箱）：固定 760×366 册页。上：现在的进度 + 立即备份；中：筛选；下：按日期分组的时间线，每行一个「恢复」。纸墨描边。 */
#panel .pbox.v31box { overflow: hidden; }
.v31 { height: 100%; box-sizing: border-box; padding: 6px 10px 4px; border: 8px solid transparent; border-image: url(../../assets/v29/ui/ui_well.png) 12 fill stretch; overflow: hidden; display: flex; flex-direction: column; gap: 5px; font-family: "Noto Sans SC", sans-serif; color: var(--ink-1, #2a2620); }

.v31-now { flex: none; display: flex; align-items: center; gap: 12px; padding: 2px 4px 2px 10px; border: 8px solid transparent; border-image: url(../../assets/v29/ui/ui_card_raise.png) 12 fill stretch; }
.v31-nowl { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: baseline; }
.v31-nowl small { grid-row: 1 / 3; align-self: center; padding: 3px 6px; font: 400 13px/1 "猫田楷", serif; color: #f6ecd4; background: #a8392b; border-radius: 3px; transform: rotate(-3deg); }
.v31-nowl b { font: 400 16px/1.3 "猫田楷", serif; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v31-nowl em { font-style: normal; font-size: 11px; color: var(--ink-3, #7a6c52); }
.v31-snap { flex: none; height: 40px; min-height: 0; padding: 0 14px; display: flex; flex-direction: column; justify-content: center; line-height: 1.1; }
.v31-snap > span { font-size: 14px; top: 0; }
.v31-snap small { font-size: 10px; }
.v31-snap:disabled { opacity: .5; cursor: default; }

.v31-bar { flex: none; display: flex; align-items: center; gap: 6px; }
.v31-chip { height: 24px; padding: 0 12px; border: 1px solid var(--paper-edge, #c4b48a); border-radius: 12px; background: rgba(255, 250, 235, .55); font: 500 12.5px/22px "Noto Sans SC", sans-serif; color: var(--ink-2, #4a4032); cursor: pointer; }
.v31-chip em { font-style: normal; margin-left: 4px; font-size: 11px; color: var(--ink-3, #7a6c52); }
.v31-chip.on { background: #3a3436; border-color: #3a3436; color: #f4ecd8; }
.v31-chip.on em { color: #c9bea4; }
.v31-auto { margin-left: auto; font-size: 11px; color: var(--ink-3, #7a6c52); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.v31-list { flex: 1; min-height: 0; margin: 0; padding: 0 4px 0 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.v31-day { position: sticky; top: 0; z-index: 1; padding: 3px 2px 2px; font: 400 13px/1.2 "猫田楷", serif; letter-spacing: 2px; color: #a8392b; background: linear-gradient(#efe5c9 75%, rgba(239, 229, 201, 0)); }
.v31-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 60px; align-items: center; gap: 10px; min-height: 34px; padding: 0 2px 0 6px; border-bottom: 1px dashed rgba(122, 108, 82, .35); }
.v31-hm { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2, #4a4032); }
.v31-sum { font: 400 14px/1.3 "猫田楷", serif; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v31-src { display: flex; gap: 4px; }
.v31-src i { font-style: normal; font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 2px; white-space: nowrap; }
.v31-src .loc { color: #f4ecd8; background: #6b5a3c; }
.v31-src .cld { color: #f4ecd8; background: #3f5248; }
.v31-src .tag { color: #a8392b; border: 1px solid #a8392b; line-height: 14px; }
.v31-go { height: 26px; min-height: 0; padding: 0; font-size: 13px; }
.v31-tip { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 4px; padding: 4px 6px 4px 10px; font-size: 12px; color: var(--ink-2, #4a4032); background: rgba(63, 82, 72, .08); border-left: 3px solid #3f5248; }
.v31-tip .k29-btn { height: 24px; min-height: 0; padding: 0 12px; font-size: 12px; }
.v31-empty { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12.5px; line-height: 20px; color: var(--ink-3, #7a6c52); }
.v31-note { flex: none; margin: 0; padding-top: 3px; border-top: 1px dashed var(--paper-edge, #c4b48a); font-size: 11px; line-height: 15px; color: var(--ink-3, #7a6c52); text-align: center; }

/* 标题页存档位：底部「载入」旁边并排一个「历史」 */
.tt29-sl.v31-c { gap: 1px; }
.tt29-sl .v31-foot { margin-top: auto; align-self: stretch; flex: none; height: 30px; display: flex; gap: 6px; }
.tt29-sl .v31-foot .tt29-go { flex: 1; margin-top: 0; }
.tt29-sl .v31-hist { flex: none; box-sizing: border-box; width: 60px; min-height: 0; padding: 0; display: grid; place-items: center; font-size: 13px; line-height: 1; pointer-events: auto; cursor: pointer; }
.tt29-sl .v31-hist > span { top: 0; }
.tt29-sl.v31-dis { cursor: default; }
.tt29-sl.v31-dis > :not(.v31-foot), .tt29-sl.v31-dis .tt29-go { opacity: .6; }

/* 云存档面板里的「历史存档」按钮 */
#cloud200 .cloud-actions .v31-open { font-weight: 700; }

/* 设置 ·「存档」页：两列，左：历史存档 + 自动备份；右：备份文件在哪 */
#panel .st29 .set-pane.v31-pane:not([hidden]) { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px; }
.v31-pane .v31-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#panel .st29 .v31-pane .scard { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; margin: 0; box-sizing: border-box; }
.v31-pane .v31-p { margin: 0; font-size: 11.5px; line-height: 16px; color: var(--ink-2, #4a4032); }
.v31-pane .v31-row2 { display: flex; flex-wrap: wrap; gap: 6px; }
.v31-pane .v31-row2 button { height: 26px; padding: 0 10px; font-size: 12.5px; }
.v31-pane .v31-line { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: 12px; line-height: 18px; }
.v31-pane .v31-line b { font: 400 14px/1 "猫田楷", serif; }
.v31-pane .v31-line span { color: var(--ink-2, #4a4032); }
.v31-pane .v31-on { font-style: normal; font-size: 11.5px; color: #3f5248; font-weight: 700; }
.v31-pane .v31-sw { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.v31-pane .v31-sw input { width: 16px; height: 16px; margin: 0; accent-color: #a8392b; }
.v31-pane .v31-path { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 4px; padding: 5px 8px; background: rgba(255, 250, 235, .8); border: 1px solid var(--paper-edge, #c4b48a); border-radius: 3px; font: 600 13px/1.35 "Noto Sans SC", sans-serif; color: var(--ink-1, #2a2620); }
.v31-pane .v31-path i { font-style: normal; color: #a8392b; }
.v31-pane .v31-msg { min-height: 16px; color: #3f5248; }
.tt29-sl .v31-foot > .tt29-go, .tt29-sl .v31-foot > .v31-hist { height: 100%; box-sizing: border-box; }

/* 历史存档：筛选条右侧的存档位切换 */
.v31-bar .v31-gap { margin-left: auto; }
.v31-bar > small { font-size: 11px; color: var(--ink-3, #7a6c52); letter-spacing: 1px; }
.v31-chip.v31-sl { width: 28px; padding: 0; text-align: center; font-family: "猫田楷", serif; font-size: 13px; }

/* 标题页选档：底部「已有存档？」找回条 */
.v31-find { flex: none; display: flex; align-items: center; gap: 8px; padding-top: 4px; border-top: 1px dashed var(--paper-edge, #c4b48a); }
.v31-find .v31-fl { flex: 1; min-width: 0; font-size: 12px; line-height: 16px; color: var(--ink-2, #4a4032); }
.v31-find .k29-btn { flex: none; height: 28px; min-height: 0; padding: 0 14px; font-size: 13px; }
.t-btn.v31-soft { opacity: .7; filter: grayscale(.4); cursor: pointer; }

/* 选一个存档位放进来 */
.v31-pks { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.v31-pk { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 10px; border: 8px solid transparent; border-image: url(../../assets/v29/ui/ui_card_raise.png) 12 fill stretch; background: none; font-family: "Noto Sans SC", sans-serif; color: var(--ink-1, #2a2620); cursor: pointer; }
.v31-pk > i { position: absolute; left: 2px; top: 2px; width: 24px; height: 24px; display: grid; place-items: center; font: normal 400 14px/1 "猫田楷", serif; color: #f6ecd4; background: #a8392b; border-radius: 3px; transform: rotate(-4deg); }
.v31-pk > b { font: 400 15px/1.4 "猫田楷", serif; text-align: center; }
.v31-pk .k29-btn { pointer-events: none; height: 28px; min-height: 0; padding: 0 12px; font-size: 13px; }

.v31 { position: relative; }
.v31-list { scrollbar-width: none; }
.v31-list::-webkit-scrollbar { display: none; }
.v31-bar2 { position: absolute; right: 4px; width: 5px; display: none; border-radius: 3px; background: rgba(122, 108, 82, .2); pointer-events: none; z-index: 2; }
.v31-bar2 b { display: block; width: 100%; border-radius: 3px; background: #8a7a58; }
