/* V2.6.2 —— 复用素材统一
   凹槽：边框 10、内距 6 / 7 / 4          信息卡：边框 10
   格子：边框 6、格距 6；大格 84、小格 42   空位：2px 虚线、圆角 8
   图标框：边框 8                           主按钮：高 38、字 15
*/
:root { --u-gap: 6px; --u-dash: 2px dashed rgba(58,46,30,.30); --u-r: 8px; }

/* ---------- 空位：所有册页同一种虚线框 ---------- */
.gd29-cell.empty, #panel .bg29 .grid.inv .islot.empty, #panel .bg29 .islot.empty, .bg29-ph, .gd29-g.none, .qt29-it.empty {
  border: var(--u-dash) !important; border-image: none !important; border-radius: var(--u-r) !important; background: none !important; }

/* ---------- 行囊：小格 42、格距 6，与大格同一套间距 ---------- */
#panel .bg29 .inv-wrap { grid-template-columns: 386px minmax(0, 1fr); gap: 10px; }
#panel .bg29 .grid.inv, #panel .bg29 .grid.inv.main { grid-template-columns: repeat(8, 42px) !important; grid-auto-rows: 42px; gap: var(--u-gap) !important; }
#panel .bg29 .grid.inv.main { height: 138px; padding-right: 8px; width: 386px; box-sizing: border-box; }
#panel .bg29 .grid.inv .islot, #panel .bg29 .islot, .bg29-ph { width: 42px !important; height: 42px !important; }
#panel .bg29 .grid.inv .islot .ico, #panel .bg29 .islot .ico { --s: 28px !important; }
.bg29-ic { width: 28px; height: 28px; }

/* ---------- 营造册：整页用杂货铺那套骨架，这里只管格子里的小图和信息卡里它独有的两行 ---------- */
.bk26 .bk26-g .gd29-cell { justify-content: flex-start; }
.bk26 .bk26-g .gd29-cell .gd29-ic { width: 100%; height: calc(var(--ib) + var(--pz)); margin-top: 1px; }
.bk26 .gd29-ic canvas { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.bk26 .bk-tab.k29-tab { display: flex; align-items: center; justify-content: center; gap: 6px; }
.bk26box .k29-tab > i { flex: none; width: 18px; height: 18px; background: center / contain no-repeat; image-rendering: pixelated; }
.bk26 .d29 { height: 100%; display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow: hidden; }
.bk26 .gd29-top { height: 42px; }
.bk26 .gd29-big .gd29-ic { width: 26px; height: 26px; }
.bk26 .gd29-sub em { font-style: normal; } .bk26 .gd29-sub em.bad { color: var(--cinnabar); } .bk26 .gd29-sub em.ok { color: var(--jade); }
.bk26 .d29-pre { flex: none; border: 0; padding: 0; }
.bk26 .bk29-pre { height: 22px; margin: 0; font-size: 12px; border-radius: 4px; }
.bk26 .bk26-nomat { flex: none; font-size: 12px; color: var(--ink-3); } .bk26 .bk26-nomat p { margin: 0; }
.bk26 .bk26-act { margin-top: auto; justify-content: center; border: 0; padding: 0; }
.bk26 .bk26-act .gd29-go { flex: 0 0 141px; }
.bk26 .gd29-nm { flex: 1 1 auto; } .bk26 .gd29-top::after { flex: 0 0 34px; }

/* ---------- 材料小条：名字那行原先被裁掉上半截，行高统一成 26（名 12 + 数 12） ---------- */
.gd29-r.mk .gd29-mats { grid-template-rows: repeat(2, 26px); }
.gd29-mat > span, .gd29-r.mk .gd29-mat > span { line-height: 12px; }
.gd29-mat > span small, .gd29-r.mk .gd29-mat > span small { font-size: 10px; line-height: 12px; }
.gd29-mat > span b, .gd29-r.mk .gd29-mat > span b { font-size: 11.5px; line-height: 12px; }

/* ---------- 凹槽（每张册页最外面那一圈）：边框 10、内距 6 / 7 / 4 ---------- */
.tt29, .cr29, #panel .st29, .qt29, #panel .cl29, .cx29, .hb29, .mb29, .hl29, .pf29, .ms29, #panel .pz29, #panel .pz29-cloud, #panel .pbox.bg29box .bg29, .gd29 {
  border-width: 10px !important; padding: 6px 7px 4px !important; }

/* ---------- 信息卡：边框 10；文字卡内距 6 / 10，小卡 4 / 6 ---------- */
.gd29-r, #panel .pz29-l, .qt29-r, .hb29-r, .cx29-dt, .cr29-r, .cr29-l, .mb29-pl, .hl29-c, .tt29-sl, .cx29-bk, #panel .bg29 .inv-card, #panel .bg29 .inv-empty,
.pf29 .pf-metrics > div, .pf29 .pf-award, .ms29 .t6-row, .ms29 .row, .k29box:not(.L) .k29-rows { border-width: 10px !important; }
.qt29-r, .hb29-r, .cx29-dt, .cr29-r, .mb29-pl { padding: 6px 10px !important; }
.hl29-c, .tt29-sl { padding: 4px 6px !important; }
.cx29-bk { padding: 2px 0 3px !important; }
#panel .bg29 .inv-card, #panel .bg29 .inv-empty { padding: 0 2px !important; }
.pf29 .pf-metrics > div, .pf29 .pf-award { padding: 5px 10px !important; }

/* ---------- 格子：边框一律 6 ---------- */
.tt29-pic, .cr29-s, .hl29-cell, .gd29-cell:not(.empty), .qt29-it-ic:not(.lg) { border-width: 6px !important; }

/* ---------- 图标框：边框 8 ---------- */
.gd29-big, .gd29-r.mk .gd29-big, #panel .bg29 .ic-big, .pf29 .cat-stage { border-width: 8px !important; }
#panel .bg29 .ic-top { height: 42px; } #panel .bg29 .ic-big { width: 42px; height: 42px; }
#panel .bg29 .ic-big .ico, #panel .bg29 .ic-big .gd29-cv { --s: 26px; width: 26px; height: 26px; }
.qt29-it-ic.lg { width: 46px; height: 46px; border-width: 8px !important; border-image-source: url(../../assets/v29/ui/ui_well.png) !important; }
.qt29-it-ic.lg .gd29-ic { width: 30px; height: 30px; }

/* 节气历侧栏：凹槽内距统一后少了 2px，从侧栏自己的上下留白里让出来 */
#panel .cl29 .c4-side { padding-top: 0; padding-bottom: 0; gap: 1px; }
#panel .cl29 .c4-head { margin-top: 2px; }
/* 设置页同理：每张小卡的标题行收 2px */
#panel .st29 .scard > h4 { height: 16px; line-height: 16px; }
.bk26 .gd29-desc p { line-height: 17px; font-size: 12px; }

/* ---------- 说明文字：不再截成两三行加省略号，放不下就在原地上下滑 ---------- */
.gd29-desc p, .gd29-r.mk .gd29-desc p, .gd29-r.cx .gd29-desc p, #panel .bg29 .ic-desc, .bk26 .gd29-desc p {
  display: block !important; -webkit-line-clamp: unset !important; -webkit-box-orient: initial; text-overflow: clip; max-height: 100%; align-self: stretch;
  overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: rgba(58,46,30,.45) transparent; }
.gd29-desc p::-webkit-scrollbar, #panel .bg29 .ic-desc::-webkit-scrollbar { width: 4px; } .gd29-desc p::-webkit-scrollbar-thumb, #panel .bg29 .ic-desc::-webkit-scrollbar-thumb { background: rgba(58,46,30,.45); border-radius: 2px; }
.gd29-desc, #panel .bg29 .bg29-desc { align-items: stretch; }
.gd29-desc p, #panel .bg29 .ic-desc { margin: auto 0; }

/* ---------- 行囊物品详情：属性全部列出（每排三格，多了就再起一排），参考价不再被丢掉 ---------- */
#panel .bg29 .bg29-chips { grid-template-rows: none !important; grid-auto-rows: 32px; height: auto !important; flex: none; }
#panel .bg29 .bg29-chip:nth-child(3n+1) { border-left: 0; }
#panel .bg29 .bg29-chip:nth-child(n+4) { border-top: 1px solid var(--paper-edge); }

/* ================= V2.6.2 第二轮 ================= */
/* ---------- 反馈交流群：之前卡片是透的，叠在标题画上看不清；改成实心旧纸 + 墨框，群号加深 ---------- */
.fb29-m { background: rgba(14,12,8,.62); }
.fb29-c { border: 14px solid transparent !important; border-image: url(../../assets/ui/ink/frame.webp) 30 / 14px / 0 stretch !important; padding: 12px 16px 8px !important;
  background: url(../../assets/ui/ink/paper.webp) repeat, url(../../assets/ui/ink/oldpaper.jpg) center / cover, #efe7d4 !important; background-clip: border-box !important; box-shadow: 0 8px 22px rgba(0,0,0,.45); color: #2a2018; }
.fb29-c h3 { color: #2a2018; } .fb29-c p { color: #4a3f2e; font-size: 13px; }
.fb29-no { background: rgba(255,250,236,.72) !important; border: 1.5px solid rgba(44,37,30,.7) !important; box-shadow: none !important; }
.fb29-no small { color: #5a4c36; } .fb29-no b { color: #1f1a14; font-size: 30px; }
.fb29-x { color: #2a2018; }

/* ---------- 行囊：按已有格子摆（最多三排完整显示，格子 46px）；不足三排时底下写「没有更多格子了」 ---------- */
#panel .bg29 .inv-wrap { grid-template-columns: 468px minmax(0, 1fr); gap: 10px; }
#panel .bg29 .grid.inv, #panel .bg29 .grid.inv.main { grid-template-columns: repeat(8, 46px) !important; grid-auto-rows: 46px; gap: 4px 12px !important; }
#panel .bg29 .grid.inv.main { height: 146px; width: 468px !important; padding-right: 8px; box-sizing: border-box; align-content: start; }
#panel .bg29 .grid.inv.hot { width: 460px !important; }
#panel .bg29 .grid.inv .islot, #panel .bg29 .islot, .bg29-ph { width: 46px !important; height: 46px !important; }
#panel .bg29 .grid.inv .islot .ico, #panel .bg29 .islot .ico { --s: 40px !important; }
.bg29-ic { width: 32px; height: 32px; }
.bg26-end { grid-column: 1 / -1; height: 22px; line-height: 22px; text-align: center; font-size: 11.5px; letter-spacing: 3px; color: var(--ink-3); pointer-events: none; }
.bg26-end::before, .bg26-end::after { content: "——"; margin: 0 8px; opacity: .45; letter-spacing: 0; }

/* ---------- 问笺：和人说话后的选项 ---------- */
#choice.ch26 { border: 0 !important; border-image: none !important; background: none !important; box-shadow: none !important; padding: 0 !important; min-width: 0 !important; display: none; }
#choice.ch26.on { display: block; }
.ch26-in { display: flex; align-items: flex-end; }
.ch26-who { flex: none; width: 104px; margin-right: -10px; position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.ch26-pic { display: block; width: 104px; height: 118px; overflow: hidden; }
.ch26-pic img { display: block; width: 100%; height: auto; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(20,16,10,.35)); }
.ch26-nm { display: block; margin-top: -6px; padding: 0 12px; height: 24px; line-height: 24px; font: 400 15px/24px "猫田楷", serif; letter-spacing: 4px; text-indent: 4px; color: #f6ecd4; background: #a8392b; box-shadow: 0 2px 0 rgba(60,20,14,.5); transform: rotate(-2deg); white-space: nowrap; }
.ch26-sheet { position: relative; box-sizing: border-box; width: 400px; max-width: 76vw; padding: 6px 14px 8px; border: 16px solid transparent; border-image: url(../../assets/ui/ink/frame.webp) 30 / 16px / 0 stretch;
  background: url(../../assets/ui/ink/paper.webp) repeat, url(../../assets/ui/ink/oldpaper.jpg) center / cover, #efe7d4; background-clip: border-box; box-shadow: 0 8px 20px rgba(0,0,0,.38); color: #2a2018; }
#choice.ch26.has-who .ch26-sheet { padding-left: 22px; }
.ch26-sheet::after { content: ""; position: absolute; right: 2px; bottom: 0; width: 120px; height: 70px; background: url(../../assets/ui/ink/ink_hills.webp) right bottom / contain no-repeat; opacity: .22; pointer-events: none; }
.ch26-q { position: relative; display: flex; align-items: center; min-height: 34px; padding: 0 0 8px; margin: 0 0 4px; }
.ch26-q::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: url(../../assets/ui/ink/ink_stroke_1.webp) center / 100% 100% no-repeat; opacity: .7; }
.ch26-seal { flex: none; display: block; width: 26px; height: 26px; margin-right: 10px; font: normal 400 16px/26px "猫田楷", serif; text-align: center; color: #f6ecd4; background: #a8392b; border-radius: 3px; transform: rotate(-4deg); box-shadow: 0 1px 0 rgba(60,20,14,.5); }
.ch26-q span { font: 400 20px/1.25 "猫田楷", serif; letter-spacing: 3px; color: #1f1a14; }
.ch26-list { position: relative; z-index: 1; max-height: 196px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#choice.ch26 button.ch26-opt { position: relative; display: flex !important; align-items: center; width: 100%; box-sizing: border-box; min-height: 38px; margin: 0; padding: 0 10px 0 4px !important; text-align: left;
  font: 400 17px/1.25 "猫田楷", serif !important; letter-spacing: 2px; color: #2a2018 !important; background: none !important; border: 0 !important; border-bottom: 1px dashed rgba(58,46,30,.32) !important; border-radius: 0 !important; box-shadow: none !important; }
#choice.ch26 .ch26-list button.ch26-opt:last-child { border-bottom: 0 !important; }
#choice.ch26 button.ch26-opt .ch26-n { flex: none; display: block !important; width: 24px !important; height: 24px; margin-right: 12px; font: 400 15px/22px "猫田楷", serif; text-align: center; color: #a8392b !important; background: rgba(168,57,43,.06) !important; border: 1.5px solid #a8392b; border-radius: 3px; box-sizing: border-box; letter-spacing: 0; }
#choice.ch26 button.ch26-opt:active, #choice.ch26 button.ch26-opt:focus-visible { color: #f6efdc !important; background: url(../../assets/ui/ink/stroke.webp) center / 100% 100% no-repeat !important; border-bottom-color: transparent !important; }
#choice.ch26 button.ch26-opt:hover { background: rgba(70,52,26,.10) !important; }
#choice.ch26 button.ch26-opt:active { background: url(../../assets/ui/ink/stroke.webp) center / 100% 100% no-repeat !important; }
#choice.ch26 button.ch26-opt:active .ch26-n { color: #f6efdc !important; border-color: #f6efdc; background: none !important; }
.ch26-bye { position: relative; z-index: 1; display: flex; justify-content: flex-end; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(58,46,30,.4); }
#choice.ch26 .ch26-bye button.ch26-opt { width: auto; min-height: 30px; padding: 0 6px 0 2px !important; font-size: 14.5px !important; color: #6b5a42 !important; border-bottom: 0 !important; }
#choice.ch26 .ch26-bye button.ch26-opt .ch26-n { width: 20px !important; height: 20px; line-height: 18px; font-size: 12.5px; margin-right: 8px; color: #6b5a42 !important; border-color: rgba(107,90,66,.7); background: none !important; }

/* 节气历侧栏：当天事项多时不再裁掉最后一行，放不下就上下滑 */
#panel .cl29 .c4-side { overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: thin; }
#panel .cl29 .c4-side::-webkit-scrollbar { width: 4px; } #panel .cl29 .c4-side::-webkit-scrollbar-thumb { background: rgba(58,46,30,.45); border-radius: 2px; }
#panel .cl29 .c4-side > * { flex: none; }
#panel .bg29 .ic-tag { display: block; max-width: 150px; font-size: 11px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- 启动加载页 ---- */
#loading .lb{position:relative;overflow:hidden;width:240px}
#loading .lb i{position:relative}
#loading .lb::after{content:"";position:absolute;top:0;bottom:0;left:0;width:36%;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0));-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-animation:ld26 1.1s linear infinite;animation:ld26 1.1s linear infinite}
@-webkit-keyframes ld26{to{-webkit-transform:translateX(280%);transform:translateX(280%)}}
@keyframes ld26{to{-webkit-transform:translateX(280%);transform:translateX(280%)}}
#loading .ld26-tip{margin-top:16px;font-size:13px;letter-spacing:3px;opacity:.7;min-height:18px;text-align:center}

/* 问笺：选项并列 */
.ch26-bye:empty{display:none}
.ch26-sheet{width:440px}
.ch26-q{align-items:flex-start}
.ch26-q .ch26-seal{margin-top:1px}
.ch26-q span{font-size:18px;letter-spacing:2px;line-height:1.35}
/* 行囊详情：属性值放不下时不再省略成「…」，缩一点字号换行 */
#panel .bg29 .bg29-chip b { overflow: visible !important; text-overflow: clip !important; white-space: nowrap; letter-spacing: 0; }
#panel .bg29 .bg29-chip b.lg26 { font-size: 12px !important; }
#panel .bg29 .bg29-chip { min-width: 0; padding-left: 2px; padding-right: 2px; }

/* 最后一排补位的占位框不是真格子，不画出来 */
#panel .bg29 .bg29-ph { visibility: hidden !important; }
