/* 游戏设置（V3.0 改版）：八个页签，每页只放一两张卡，字够大、一眼看得清。
   版式沿用别的册页的固定设计尺寸 760×366（矮屏上不会缩小）；册页外框、纸纹、墨线、标题沿用 gd29 那一套，这里只改里面的排版。
   选项一律是古墨水风：选中 = 浓墨底 + 纸色字 + 朱砂小角标；没选 = 纸底墨字；开关也是这样的方块，不用绿色。页内放不下才上下滑，滑条常驻，不横向溢出。 */
#panel .pbox.k29box.gd29box.st300box { height: 384px !important; }
#panel .st300box .k29-tabs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
#panel .st300box .k29-tab { height: 30px; padding: 0 0 4px; font-size: 16px; letter-spacing: 2px; text-indent: 2px; white-space: nowrap; }
#panel .st300box .st29 { padding: 4px 5px; }
#panel .st300box .st29 > .pbody { height: 100%; overflow: hidden; }
#panel .st300box .sx-pane { height: 100%; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 13px 10px 6px 8px; scrollbar-width: none; }
#panel .st300box .sx-pane::-webkit-scrollbar { display: none; }
#panel .st300box .sx-pane[hidden] { display: none !important; }
#panel .st300box .sx-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
#panel .st300box .sx-pane > .sx-col:only-child { grid-column: 1 / -1; }
#panel .st300box .sx-bar { position: absolute; right: 2px; top: 8px; bottom: 8px; width: 6px; z-index: 3; display: none; border-radius: 3px; background: rgba(122, 108, 82, .25); pointer-events: none; }
#panel .st300box .sx-bar b { display: block; width: 100%; border-radius: 3px; background: #6b5a42; }

/* 卡片：淡纸底、墨线细框；标题是朱砂毛笔签，压在卡片左上角 */
#panel .st300box .sx-card { position: relative; overflow: visible; margin: 0; padding: 15px 12px 6px; border: 1.5px solid rgba(107, 90, 66, .55); border-radius: 3px; background: rgba(255, 250, 233, .5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); box-sizing: border-box; }
#panel .st300box .sx-card::before, #panel .st300box .sx-card::after { display: none; }
#panel .st300box .sx-card > h4 { position: absolute; left: -8px; top: -13px; margin: 0; padding: 0 24px 0 12px; height: 26px; display: block; font: 400 17px/26px "猫田楷", var(--serif, serif); letter-spacing: 3px; color: #f6e9d6; background: #a8392b; white-space: nowrap; clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 28%, 100% 52%, calc(100% - 5px) 78%, 100% 100%, 0 100%, 3px 62%, 0 38%); }
#panel .st300box .sx-card > h4::before, #panel .st300box .sx-card > h4::after { display: none; }

/* 行：名字 + 小字说明 ｜ 控件 */
#panel .st300box .sx-card .srow { display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0; padding: 2px 0; border-bottom: 1px dashed rgba(107, 90, 66, .35); }
#panel .st300box .sx-card .srow:last-child { border-bottom: 0; }
#panel .st300box .sx-card .srow .sl { flex: 0 1 50%; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
#panel .st300box .sx-card .srow.rng .sl { flex: 0 0 6.1em; white-space: nowrap; }
#panel .st300box .sx-card .srow .sl b { font: 400 18px/1.25 "猫田楷", var(--serif, serif); letter-spacing: 1px; color: #231f18; overflow-wrap: anywhere; }
#panel .st300box .sx-card .srow .sl small { font-size: 13px; line-height: 1.3; color: #5f5646; overflow-wrap: anywhere; }
#panel .st300box .sx-card .srow.tog .sl { flex: 1 1 auto; }
#panel .st300box .sx-card .srow .sv, #panel .st300box .sx-card .srow > .dim, #panel .st300box .sx-move #stk182 > label .dim { flex: 0 0 auto; min-width: 54px; box-sizing: border-box; padding: 3px 6px; text-align: center; font-size: 16px; color: #231f18; background: rgba(255, 252, 240, .8); border: 1.5px solid rgba(60, 50, 34, .75); border-radius: 3px; font-variant-numeric: tabular-nums; }
#panel .st300box .sx-card .srow select { flex: 1 1 auto; min-width: 0; max-width: 64%; min-height: 34px; font-size: 15px; text-overflow: ellipsis; }
#panel .st300box .sx-card .srow.sel .sl { flex: 0 0 4.8em; white-space: nowrap; }
#panel .st300box .sx-card .srow > button { flex: 0 0 auto; min-height: 34px; padding: 3px 14px; font-size: 16px; }

/* 滑杆：墨色细槽 + 朱砂方块把手（沿用原来的），把手放大好点 */
#panel .st300box .sx-card input[type=range] { -webkit-appearance: none; appearance: none; flex: 1 1 auto; min-width: 0; height: 28px; background: transparent; margin: 0; }
#panel .st300box .sx-card input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; border: 1.5px solid #3a3226; background: rgba(255, 252, 240, .85); }
#panel .st300box .sx-card input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 24px; margin-top: -10px; border-radius: 2px; border: 1.5px solid #3a2a18; background: #a8392b; }
#panel .st300box .sx-card input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; border: 1.5px solid #3a3226; background: rgba(255, 252, 240, .85); }
#panel .st300box .sx-card input[type=range]::-moz-range-thumb { width: 18px; height: 22px; border-radius: 2px; border: 1.5px solid #3a2a18; background: #a8392b; }

/* 开关：墨色方块。关 = 纸底墨字「关」；开 = 浓墨底纸字「开」+ 朱砂小角标 */
#panel .st300box .sx-card .srow input[type=checkbox], #panel .st300box .sx-card .opt-sw { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 62px; height: 34px; margin: 0; padding: 0; border: 1.5px solid #2b2a22; border-radius: 3px; background: rgba(255, 250, 233, .85); color: #231f18; cursor: pointer; box-sizing: border-box; font: 400 18px/31px "猫田楷", var(--serif, serif); letter-spacing: 3px; text-indent: 3px; text-align: center; }
#panel .st300box .sx-card .srow input[type=checkbox]::before { content: "关"; position: absolute; inset: 0; text-align: center; line-height: 31px; font-size: 18px; color: #231f18; }
#panel .st300box .sx-card .srow input[type=checkbox]::after { display: none; }
#panel .st300box .sx-card .srow input[type=checkbox]:checked, #panel .st300box .sx-card .opt-sw.on { background: #2b2a22; border-color: #1d1f1b; color: #f5efdc; }
#panel .st300box .sx-card .srow input[type=checkbox]:checked::before { content: "开"; color: #f5efdc; }
#panel .st300box .sx-card .srow input[type=checkbox]:checked::after, #panel .st300box .sx-card .opt-sw.on::after { content: ""; display: block; position: absolute; right: 3px; top: 3px; width: 8px; height: 8px; border-radius: 1px; background: #a8392b; left: auto; transform: none; border: 0; }
#panel .st300box .sx-card .opt-sw { text-indent: 0; }
#panel .st300box .sx-card .opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; min-height: 52px; border-bottom: 1px dashed rgba(107, 90, 66, .35); }
#panel .st300box .sx-card .opt-row:last-child { border-bottom: 0; }
#panel .st300box .sx-card .opt-row > div { min-width: 0; flex: 1; }
#panel .st300box .sx-card .opt-row b { font: 400 18px/1.3 "猫田楷", var(--serif, serif); color: #231f18; }
#panel .st300box .sx-card .opt-row p { margin: 1px 0 0; font-size: 13px; line-height: 1.4; color: #5f5646; overflow-wrap: anywhere; }
#panel .st300box .sx-card .setgrp > b { display: none; }
#panel .st300box .sx-card p.dim, #panel .st300box .sx-card .shint { margin: 5px 0 2px; font-size: 13px; line-height: 1.45; color: #5f5646; overflow-wrap: anywhere; }
#panel .st300box .sx-card .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
#panel .st300box .sx-card .row button { flex: 1 1 auto; min-height: 36px; padding: 3px 12px; font-size: 16px; }
#panel .st300box .sx-card button { max-width: 100%; }

/* 摇杆页：一张宽卡，左边「自由跟手 / 固定位置」两张示意卡 + 说明，右边大小、透明度、位置按钮 */
#panel .st300box .sx-move { display: grid; grid-template-columns: 1.1fr 1fr; grid-auto-rows: min-content; column-gap: 16px; align-content: start; }
#panel .st300box .sx-move #stk182 { display: contents; }
#panel .st300box .sx-move .stk-seg { grid-column: 1; grid-row: 1 / span 3; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 0; align-self: start; }
#panel .st300box .sx-move .stk-seg button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; min-height: 108px; padding: 3px 4px 5px; font: 400 17px/1.2 "猫田楷", var(--serif, serif); letter-spacing: 3px; color: #231f18; background: rgba(255, 250, 233, .7); border: 1.5px solid rgba(60, 50, 34, .75); border-radius: 3px; }
#panel .st300box .sx-move .stk-seg button::before { content: ""; width: 100%; flex: 1; min-height: 70px; background: var(--sx-art-free) center / contain no-repeat; }
#panel .st300box .sx-move .stk-seg button[data-m=fixed]::before { background-image: var(--sx-art-fixed); }
#panel .st300box .sx-move .stk-seg button.on { color: #f5efdc; background: #2b2a22; border-color: #1d1f1b; }
#panel .st300box .sx-move .stk-seg button.on::before { background-color: rgba(246, 239, 220, .92); border-radius: 2px; }
#panel .st300box .sx-move .stk-seg button.on::after { content: ""; position: absolute; right: 4px; top: 4px; width: 9px; height: 9px; border-radius: 1px; background: #a8392b; }
#panel .st300box .sx-move #stk182 > p.dim { grid-column: 1; grid-row: 4; }
#panel .st300box .sx-move > .srow:first-of-type { grid-column: 2; grid-row: 1; }
#panel .st300box .sx-move #stk182 > label { grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0; padding: 2px 0; white-space: nowrap; border-bottom: 1px dashed rgba(107, 90, 66, .35); font: 400 18px/1.25 "猫田楷", var(--serif, serif); color: #231f18; }
#panel .st300box .sx-move #stk182 > label input[type=range] { flex: 1 1 auto; min-width: 0; }
#panel .st300box .sx-move #stk182 > .row { grid-column: 2; grid-row: 3; flex-wrap: nowrap; margin-top: 8px; }
#panel .st300box .sx-move #stk182 > .row button { padding: 3px 6px; font-size: 15px; letter-spacing: 0; white-space: nowrap; }

/* 自由摆放：预览小图 + 说明 + 两个按钮 */
#panel .st300box .sx-lay-card { display: grid; grid-template-columns: 1.25fr 1fr; column-gap: 16px; align-items: start; }
#panel .st300box .sx-lay-card > .sx-lay { grid-column: 1; grid-row: 1 / span 3; }
#panel .st300box .sx-lay-card > p.dim { grid-column: 2; grid-row: 1; margin-top: 2px; font-size: 14px; }
#panel .st300box .sx-lay-card > .row { grid-column: 2; grid-row: 2; flex-direction: column; margin-top: 8px; }
#panel .st300box .sx-lay { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 2px 0 4px; overflow: hidden; border: 1.5px solid rgba(60, 50, 34, .7); border-radius: 3px; background: #9bb084; }
#panel .st300box .sx-lay-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: .85; image-rendering: pixelated; }
#panel .st300box .sx-spot { position: absolute; box-sizing: border-box; border: 1.5px dashed #fbf6e6; background: rgba(40, 34, 22, .18); border-radius: 3px; }
#panel .st300box .sx-spot u { position: absolute; left: 0; right: 0; top: -1px; text-decoration: none; text-align: center; font-size: 10px; line-height: 13px; color: #fbf6e6; background: rgba(40, 34, 22, .6); white-space: nowrap; overflow: hidden; }

/* 手动模式说明条 */
#panel .st300box .sx-manual { margin-top: 8px; padding: 6px 10px 8px; border: 1.5px dashed rgba(107, 90, 66, .6); border-radius: 3px; background: rgba(255, 250, 233, .4); }
#panel .st300box .sx-man-t { font: 400 16px/1.35 "猫田楷", var(--serif, serif); letter-spacing: 1px; color: #6e3a12; }
#panel .st300box .sx-man-b { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; }
#panel .st300box .sx-man-cat { flex: 1; height: 44px; border-radius: 3px; border: 1px solid rgba(107, 90, 66, .45); background: rgba(155, 176, 132, .5); overflow: hidden; }
#panel .st300box .sx-man-cat canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
#panel .st300box .sx-man-btns { display: flex; gap: 10px; }
#panel .st300box .sx-rb { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-style: normal; background: radial-gradient(circle at 40% 35%, #5a5548, #2b2a22); border: 2px solid #1d1f1b; }
#panel .st300box .sx-rb b { font: 400 15px/1 "猫田楷", var(--serif, serif); color: #f5efdc; }

/* 文字大小预览 / 其他页的小块 */
#panel .st300box .sx-card .s191-sample { margin: 6px 0 2px; padding: 6px 10px; font-size: 17px; text-align: center; color: #231f18; background: rgba(255, 252, 240, .8); border: 1.5px solid rgba(60, 50, 34, .5); border-radius: 3px; }
#panel .st300box .sx-card .keys { font-size: 14px; line-height: 1.55; color: #3f382c; overflow-wrap: anywhere; }
#panel .st300box .sx-card .keys b { display: none; }
#panel .st300box .sx-card .gf31-row, #panel .st300box .sx-card .v31-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 15px; }
#panel .st300box .sx-card .gf31-row > span { min-width: 0; flex: 1 1 8em; }
#panel .st300box .sx-card .gf31-row b { font: 400 17px/1.3 "猫田楷", var(--serif, serif); }
#panel .st300box .sx-card .gf31-row small { display: block; font-size: 13px; color: #5f5646; }
#panel .st300box .sx-card .v31-path { overflow-wrap: anywhere; word-break: break-all; font-size: 13px; }
#panel .st300box .sx-card .v31-row2 { display: flex; flex-wrap: wrap; gap: 6px; }
#panel .st300box .sx-card .v31-row2 button, #panel .st300box .sx-card .gf31-row button, #panel .st300box .sx-card .row button { min-height: 34px; font-size: 15px; }
#panel .st300box .sx-card .v31-p { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#panel .st300box .sx-card .v31-line b { font: 400 16px/1.3 "猫田楷", var(--serif, serif); }
#panel .st300box .sx-card .v31-sw input { width: 20px; height: 20px; }
#panel .scard.muted29 .srow.rng { opacity: .4; pointer-events: none; }

/* 去掉老样式在卡片里留的多余边距 / 底框（操作说明、地图标记、田里提示） */
#panel .st300box .sx-card .setgrp, #panel .st300box .sx-card .s191-flat { padding: 0; margin: 0; border: 0; background: none; }
#panel .st300box .sx-card .opt-row:first-of-type, #panel .st300box .sx-card .opt-row:first-child { border-top: 0; }
#panel .st300box .sx-card .keys { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; min-height: 0; }
#panel .st300box .sx-card .keys::before, #panel .st300box .sx-card .keys::after { display: none; }
#panel .st300box .sx-card .opt-row { min-height: 0; }

/* 存档页：每行「名 · 说明 · 状态」排成一行；云端自动备份的小框也改成墨色「开 / 关」方块 */
#panel .st300box .sx-card .v31-line { display: grid; grid-template-columns: 3em minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed rgba(107, 90, 66, .35); }
#panel .st300box .sx-card .v31-line:last-child { border-bottom: 0; }
#panel .st300box .sx-card .v31-line span { font-size: 13px; line-height: 1.35; color: #5f5646; }
#panel .st300box .sx-card .v31-line em { font: 400 15px/1 "猫田楷", var(--serif, serif); font-style: normal; color: #f5efdc; background: #2b2a22; padding: 5px 9px; border-radius: 3px; white-space: nowrap; }
#panel .st300box .sx-card .v31-sw { position: relative; display: inline-block; margin: 0; cursor: pointer; font-size: 0; }
#panel .st300box .sx-card .v31-sw input { -webkit-appearance: none; appearance: none; position: relative; width: 62px; height: 34px; margin: 0; border: 1.5px solid #2b2a22; border-radius: 3px; background: rgba(255, 250, 233, .85); cursor: pointer; }
#panel .st300box .sx-card .v31-sw input::before { content: "关"; position: absolute; inset: 0; text-align: center; font: 400 18px/31px "猫田楷", var(--serif, serif); color: #231f18; }
#panel .st300box .sx-card .v31-sw input:checked { background: #2b2a22; }
#panel .st300box .sx-card .v31-sw input:checked::before { content: "开"; color: #f5efdc; }
#panel .st300box .sx-card .v31-sw input:checked::after { content: ""; position: absolute; right: 3px; top: 3px; width: 8px; height: 8px; border-radius: 1px; background: #a8392b; }
#panel .st300box .sx-card .v31-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px 0; font-size: 15px; }
#panel .st300box .sx-card .v31-path i { font-style: normal; color: #a8392b; }
#panel .st300box .sx-card .v31-row2 { display: flex; flex-wrap: wrap; gap: 8px; }
