/* V2.6.2 —— 新 UI 一律上下滚动，不再左右翻页；营造册格子不越界。 */

/* 细滚动条：一直看得见，提示「下面还有」 */
.gd29-g, .qt29-ls, .hb29-ls, .hb29-rows, .qt29-r > p, #panel .bg29 .grid.inv.main, .pbox.bk263.bk29 .bk-grid2 {
  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-g::-webkit-scrollbar, .qt29-ls::-webkit-scrollbar, .hb29-ls::-webkit-scrollbar, .hb29-rows::-webkit-scrollbar, .qt29-r > p::-webkit-scrollbar,
#panel .bg29 .grid.inv.main::-webkit-scrollbar, .pbox.bk263.bk29 .bk-grid2::-webkit-scrollbar { width: 4px; height: 0; }
.gd29-g::-webkit-scrollbar-thumb, .qt29-ls::-webkit-scrollbar-thumb, .hb29-ls::-webkit-scrollbar-thumb, .hb29-rows::-webkit-scrollbar-thumb, .qt29-r > p::-webkit-scrollbar-thumb,
#panel .bg29 .grid.inv.main::-webkit-scrollbar-thumb, .pbox.bk263.bk29 .bk-grid2::-webkit-scrollbar-thumb { background: rgba(58,46,30,.45); border-radius: 2px; }
.gd29-g::-webkit-scrollbar-track, .qt29-ls::-webkit-scrollbar-track, .hb29-ls::-webkit-scrollbar-track, .hb29-rows::-webkit-scrollbar-track,
#panel .bg29 .grid.inv.main::-webkit-scrollbar-track, .pbox.bk263.bk29 .bk-grid2::-webkit-scrollbar-track { background: rgba(58,46,30,.08); border-radius: 2px; }

/* —— 公共「格子 + 详情」：左边四列格子往下排，露出两排，其余上下滑 —— */
.gd29-g:not(.none) { grid-template-rows: none; grid-auto-rows: var(--c); align-content: start; box-sizing: content-box;
  width: calc(var(--c) * 4 + 18px); height: calc(var(--c) * 2 + 6px); padding: 4px 8px 2px 0; margin-top: -4px; }
/* 没有「整理 / 去存入」这类小按钮的册页：原先翻页那一行让给格子，第三排露出一截，一眼看出还能往下滑 */
.gd29-g.tall:not(.none) { height: calc(var(--c) * 2 + 6px + 37px); padding-bottom: 0; }
.gd29-g.tall.none { height: calc(var(--c) * 2 + 6px + 37px); }
.gd29-pg .gd29-n { font-style: normal; font-size: 12px; letter-spacing: 1px; color: var(--ink-2); background: rgba(239,231,212,.72); border-radius: 9px; padding: 0 10px; line-height: 18px; }

/* —— 委托册：左边清单、右边正文都上下滚 —— */
.qt29-ls:not(.none) { display: block; overflow-y: auto; padding-right: 6px; }
.qt29-ls > .qt29-it { display: flex; flex: none; width: 100%; height: 38px; max-height: none; margin: 0 0 3px; box-sizing: border-box; }
.qt29-r > p { max-height: none; flex: 1 1 0; min-height: 0; padding-right: 6px; }

/* —— 玩法百科：左边条目、右边说明都上下滚 —— */
.hb29-ls { display: block; padding-right: 6px; }
.hb29-ls > .hb29-it { display: flex; flex: none; width: 100%; height: 28px; max-height: none; margin: 0 0 3px; box-sizing: border-box; }
.hb29-rows { display: block; padding-right: 6px; }
.hb29-rows > .hb29-row { margin: 0 0 6px; }
.hb29-ls > .hb29-no { text-align: center; padding-top: 40px; }

/* —— 行囊：一排八格，扩容后往下排 —— */
#panel .bg29 .grid.inv.main { grid-template-columns: repeat(8, 44px) !important; grid-template-rows: none; grid-auto-rows: 44px; height: 140px; padding-right: 6px; box-sizing: content-box; }

/* —— 营造册：格子区两排四列铺满，格子跟着格子区走，不再越出底边 —— */
.pbox.bk263.bk29 .bk-left { overflow: hidden; display: block; }
.pbox.bk263.bk29 .bk-grid2, .pbox.bk263.bk29 .bk-grid2.g4x2 { display: grid !important; width: 100%; height: 100%; box-sizing: border-box; gap: 6px !important; padding: 4px 4px 2px !important;
  grid-template: none !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; grid-auto-rows: calc((100% - 6px) / 2) !important; align-content: start; }
.pbox.bk263.bk29 .bk-card2, .pbox.bk263.bk29 .bk29-empty { aspect-ratio: auto !important; width: auto !important; height: auto !important; min-height: 0 !important; }
.pbox.bk263.bk29 .bk-card2 { display: flex !important; flex-direction: column; align-items: center; justify-content: center !important; overflow: hidden; }
.pbox.bk263.bk29 .bk-card2 canvas { flex: 1 1 0 !important; min-height: 0; height: auto !important; width: 100% !important; }
.pbox.bk263.bk29 .bk-card2 b { flex: none; font-size: 13px; line-height: 16px; max-width: 100%; overflow: hidden; }
.pbox.bk263.bk29 .bk-card2.on { transform: none; }
/* 价签那条虚线：老内核里按内容收窄了，改成撑满格子 */
.gd29-cell em { display: block; box-sizing: border-box; width: calc(100% - 8px); margin: 0 auto; }
