/* 自動產生（tools/make-guide-route-css.js），不要手改 */
:root {
  --k-paper: #d6bb8c;                       /* 牛皮紙底色（介於深牛皮與米白之間） */
  --k-light: #f3e6c8;                       /* 淺色紙（卡片、輸入框） */
  --k-ink: #2b1d10;                         /* 主要文字 */
  --k-ink2: #5b4129;                        /* 次要文字（在牛皮紙上對比 ≥ 4.5） */
  --k-red: #7e2418;                         /* 名字標籤、印章、重點 */
  --k-line: rgba(74, 48, 22, .42);          /* 細框線 */
  --k-chip: rgba(255, 246, 226, .38);       /* 紙上的小方塊（按鈕、格子） */
  --k-chip-h: rgba(255, 246, 226, .66);
  --k-dark: #3b2a1a;                        /* 深色按鈕（主要動作） */
  --k-strip: rgba(118, 82, 40, .86);        /* 半透明紙條（選項、首頁按鈕） */
  --k-strip-h: rgba(158, 112, 58, .92);
  --k-cream: #fbf1dc;
  --k-tex: url(../assets/ui/kraft.webp);
  --k-torn: url(../assets/ui/paper.webp);
  --k-mask: url(../assets/ui/strip_mask.webp);
}
:root {
  --k-card: url(../assets/ui/card_light.webp);
  --k-card-tan: url(../assets/ui/card_tan.webp);
  --k-card-dark: url(../assets/ui/card_dark.webp);
  --k-chipmask: url(../assets/ui/chip_mask.webp);
}
:root {
  --serif: 'Cactus Classical Serif', 'Noto Serif TC', 'PT Serif', serif;
  --head: 'Noto Serif TC', 'PT Serif', serif;
}
:root { --title: 'Nanxi Chuxia Song', 'Noto Serif TC', serif; }
:root {
  --cur: url(../assets/ui/cur_nib.svg) 2 2, default;
  --cur-pointer: url(../assets/ui/cur_nib_red.svg) 2 2, pointer;
  --cur-no: url(../assets/ui/cur_nib_off.svg) 2 2, not-allowed;
  --cur-grab: url(../assets/ui/cur_hand_open.svg) 13 16, grab;
  --cur-grabbing: url(../assets/ui/cur_hand_grab.svg) 15 18, grabbing;
}
.rt-map { display: flex; gap: 14px; overflow-x: auto; padding: 10px 2px 16px; margin-top: 12px; overscroll-behavior-x: contain; }
.rt-col { flex: 0 0 auto; width: 210px; display: flex; flex-direction: column; gap: 0; position: relative; }
.rt-ch { font-size: 15px; letter-spacing: .25em; color: var(--bronze); padding: 0 0 10px; border-bottom: 1px solid rgba(144,117,75,.4); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.rt-ch span { font-size: 12px; letter-spacing: .05em; color: #8d877c; }
.rt-row { position: relative; display: flex; gap: 6px; padding: 0 0 14px; }
.rt-row:not(:last-child)::after { content: ''; position: absolute; left: 50%; bottom: 2px; height: 10px; border-left: 1px solid rgba(144,117,75,.45); }
.rt-branch { padding-top: 6px; border-top: 1px dashed rgba(144,117,75,.35); }
.rt-node { flex: 1 1 0; min-width: 0; padding: 8px 8px; font-size: 13px; line-height: 1.45; text-align: center; color: #5f5a52; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 3px; word-break: break-all; }
.rt-node.on { color: #1e1a14; background: #e6dcc6; border-color: #d9b878; box-shadow: 0 0 10px rgba(217,184,120,.35); }
.rt-node.on.bad { color: #f0e6e6; background: #5a2a2a; border-color: #a85a5a; box-shadow: 0 0 10px rgba(168,90,90,.3); }
.panel-box:has(.rt-map) { width: min(1240px, calc(96 * var(--vw))); }
.panel-box:has(.rt-wrap) { width: min(1240px, calc(96 * var(--vw))); }
.rt-wrap { overflow-x: auto; overflow-y: hidden; margin-top: 12px; padding-bottom: 8px; overscroll-behavior-x: contain; cursor: var(--cur-grab); }
.rt-wrap.drag { cursor: var(--cur-grabbing); user-select: none; }
.rt-graph { position: relative; }
.rt-band { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(144,117,75,.25); background: rgba(255,255,255,.012); }
.rt-band.alt { background: rgba(255,255,255,.035); }
.rt-band span { position: absolute; top: 10px; left: 12px; font-size: 14px; letter-spacing: .25em; color: var(--bronze); }
.rt-band em { position: absolute; top: 12px; right: 12px; font-style: normal; font-size: 12px; color: #8d877c; }
.rt-svg { position: absolute; inset: 0; pointer-events: none; }
.rt-e { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1.5; }
.rt-e.on { stroke: #d9b878; stroke-width: 2; }
.rt-e.bad.on { stroke: #a85a5a; }
.rt-e.dash { stroke-dasharray: 5 6; stroke: rgba(255,255,255,.08); }
.rt-e.dash.on { stroke: rgba(122,154,214,.85); stroke-width: 1.6; }
.rt-n { position: absolute; display: flex; align-items: center; justify-content: center; padding: 4px 6px; font-size: 13px; line-height: 1.3; text-align: center; color: #5f5a52; background: #0d0f14; border: 1px solid rgba(255,255,255,.1); border-radius: 4px; }
.rt-n.on { color: #1e1a14; background: #e6dcc6; border-color: #d9b878; }
.rt-n.end { border-radius: 14px; }
.rt-n.on.bad { color: #f0e6e6; background: #5a2a2a; border-color: #a85a5a; }
.rt-n.cross { border-style: dashed; letter-spacing: .1em; }
.rt-n { color: #8d877c; background: #12151c; border-color: rgba(255,255,255,.16); }
.rt-n.cross { justify-content: flex-start; padding-left: 18px; }
.rt-band span { top: 8px; }
.rt-band em { top: 10px; }
.rt-k { position: absolute; top: -9px; left: -7px; min-width: 20px; height: 20px; padding: 0 3px; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; line-height: 1; color: #1e1a14; background: #d9b878; border: 1px solid #0d0f14; border-radius: 10px; }
.rt-k.k-find { background: #9ab7d9; }
.rt-k.k-result { background: #c9b0d9; }
.rt-k.k-bad { background: #a85a5a; color: #f0e6e6; }
.rt-k.k-end { background: #f0d890; }
.rt-n:not(.on) .rt-k { opacity: .8; }
.rt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: #a59d8f; }
.rt-legend span { display: flex; align-items: center; gap: 6px; }
.rt-legend .rt-k { position: static; }
.rt-legend span:nth-child(1) .rt-k { background: #d9b878; }
.rt-legend span:nth-child(2) .rt-k { background: #9ab7d9; }
.rt-legend span:nth-child(3) .rt-k { background: #c9b0d9; }
.rt-legend span:nth-child(4) .rt-k { background: #a85a5a; color: #f0e6e6; }
.rt-legend span:nth-child(5) .rt-k { background: #f0d890; }
.rt-line.dash { display: inline-block; width: 26px; border-top: 2px dashed rgba(122,154,214,.85); }
.rt-n.bad:not(.on) { border-color: rgba(168,90,90,.55); }
.panel-box:has(.rt-wrap) { height: calc(92 * var(--vh)); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
.panel-box:has(.rt-wrap) .panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rt-head h2 { margin-bottom: 2px; }
.rt-head .panel-sub { margin: 0; }
.rt-legend { flex: none; }
.rt-wrap { flex: 1; min-height: 0; }
.rt-sizer { position: relative; }
.rt-graph { transform-origin: 0 0; position: absolute; left: 0; top: 0; }
.rt-wrap { overflow-y: auto; }
.rt-legend small { font-size: inherit; }
.rt-band { border-left-color: var(--k-line) !important; background: transparent !important; }
.rt-band.alt { background: rgba(74, 48, 22, .06) !important; }
.rt-band span { color: var(--k-red) !important; }
.rt-band em, .rt-legend, .rt-head .panel-sub { color: var(--k-ink2) !important; }
.rt-n { color: rgba(91, 65, 41, .7) !important; background: rgba(255, 246, 226, .22) !important; border: 1px dashed var(--k-line) !important; }
.rt-n.on { color: var(--k-ink) !important; background: var(--k-light) !important; border: 1px solid #7e5a2c !important; }
.rt-n.on.bad { color: var(--k-cream) !important; background: var(--k-red) !important; border-color: #5a170e !important; }
.rt-n.bad:not(.on) { border-color: rgba(126, 36, 24, .55) !important; }
.rt-e { stroke: rgba(74, 48, 22, .28) !important; }
.rt-e.on { stroke: #7e5a2c !important; }
.rt-e.bad.on { stroke: var(--k-red) !important; }
.rt-e.dash { stroke: rgba(74, 48, 22, .16) !important; }
.rt-e.dash.on { stroke: #2f4470 !important; }
.rt-line.dash { border-top-color: #2f4470 !important; }
.panel-box, .search-box, .book-box, .book-grid, .book-detail, .log-list, .rt-wrap, .cake-tray { scrollbar-color: rgba(91, 65, 41, .6) rgba(74, 48, 22, .08); }
#title h1, #chapter .c2, .end-title, .panel-box h2, .panel-box h3, .search-title, .book-title, .bd-title,
#dialog .name, .title-start, .title-sub-btn, .search-done, .bm-btns button, .book-present button, .naming-ok, .cake-done,
.search-grid button .l, .card .cn, .slot-b b, .slot-h, .rt-band span, .hub-grid .spot.fresh::before,
.paper.news .mast, .paper.news .hl, .end-btns button, .toast b {
  font-family: var(--head) !important;
}
:root:root .rt-node-old { border: none !important; border-radius: 0 !important; box-shadow: none !important; background: rgba(120, 84, 42, .14) !important;
  -webkit-mask: var(--k-chipmask) center / 100% 100% no-repeat; mask: var(--k-chipmask) center / 100% 100% no-repeat; }
:root:root .rt-node-old.on { background: #efe4cb var(--k-tex) center / 256px !important; background-blend-mode: multiply !important; color: var(--k-ink) !important; }
:root:root .rt-node-old.on.bad { background: #c9a59a var(--k-tex) center / 256px !important; background-blend-mode: multiply !important; color: #3a1410 !important; }
.rt-band.alt { background: rgba(74, 48, 22, .04) !important; }
.rt-k .ink-ic { width: 13px; height: 13px; stroke-width: 2.2; }
:root:root .rt-k { background: #f3e8cf !important; border: 1px solid rgba(42, 38, 32, .55); color: #2a2620; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
:root:root .rt-k.k-find { background: #f3e8cf !important; color: #2f4470 !important; }
:root:root .rt-k.k-result { background: #f3e8cf !important; color: #5a3a7a !important; }
:root:root .rt-k.k-bad { background: #f3e8cf !important; color: #7e2418 !important; }
:root:root .rt-k.k-end { background: #f3e8cf !important; color: #8a5a14 !important; }
.rt-legend span:nth-child(2) .rt-k { color: #2f4470 !important; }
.rt-legend span:nth-child(3) .rt-k { color: #5a3a7a !important; }
.rt-legend span:nth-child(4) .rt-k { color: #7e2418 !important; }
.rt-legend span:nth-child(5) .rt-k { color: #8a5a14 !important; }
:root:root .rt-n { box-sizing: border-box; border: 5px solid transparent !important; border-radius: 0 !important; border-image: var(--k-card) 16 fill round !important; background: transparent !important;
  color: rgba(74, 58, 40, .6) !important; filter: saturate(.4) opacity(.55); }
:root:root .rt-n.on { color: var(--k-ink) !important; filter: drop-shadow(0 2px 2px rgba(60, 35, 10, .25)); }
:root:root .rt-n.bad { border-image-source: var(--k-card-tan) !important; }
:root:root .rt-n.on.bad { border-image-source: var(--k-card-dark) !important; color: var(--k-cream) !important; }
:root:root .rt-n.cross { border-image-source: var(--k-card-tan) !important; }
.cert-ru { font-family: 'Marck Script', cursive; font-size: 20px; color: #8a6a44; }
.cert-who { font-size: 17px; line-height: 1.8; margin: 0 0 14px; }
.cert-who b { font-size: 21px; color: var(--k-red); letter-spacing: .08em; }
.cert-list { list-style: none; display: inline-grid; grid-template-columns: auto auto; gap: 6px 26px; margin: 0 auto 14px; padding: 0; text-align: left; font-size: 16px; }
.cert-list li { display: contents; }
.cert-list span { color: #7a6548; letter-spacing: .15em; }
.cert-day { margin: 0 0 18px; font-size: 14px; color: #6b5a44; letter-spacing: .1em; }
.cert-stamp { position: absolute; right: 5%; top: 2%; width: 104px; height: 104px; border-radius: 50%; border: 4px double var(--k-red); color: var(--k-red);
  display: flex; align-items: center; justify-content: center; transform: rotate(-14deg); opacity: .82; filter: url(#inkA); pointer-events: none; }
.cert-stamp span { font-size: 22px; font-weight: 700; letter-spacing: .12em; }
.cert-reward { display: inline-block; margin: 4px 0 6px; padding: 8px 18px; font-size: 17px; letter-spacing: .12em; color: var(--k-cream); background: var(--k-red);
  -webkit-mask: var(--k-mask) center / 100% 100% no-repeat; mask: var(--k-mask) center / 100% 100% no-repeat; }
.cert-why { max-width: 30em; margin: 0 auto 12px; font-size: 14px; line-height: 1.7; color: #4a3d2e; }
.cert-code { margin: -8px 0 14px; font-size: 14px; letter-spacing: .1em; color: #6b5a44; }
.cert-code b { font-family: 'PT Mono', monospace; font-size: 18px; letter-spacing: .12em; color: var(--k-ink); }
.rt-wrap.drag * { cursor: var(--cur-grabbing) !important; }
