/* 自动生成，不要手改：由 _preview_tools/build-ui-archive.py 从 ui-archive.template.css 生成；
   改样式请改模板后重新生成，加 --check 只校验同步。
   v2026.09.30.2 / 保持 --na- 令牌、选择器与触控尺寸兼容。 */
/* 夜班档案：牛皮纸档案夹、稿纸、票根、档案标签与红印章。
   最后加载；新令牌一律用 --na- 前缀，不改旧变量。纹理与图标取自定稿原型，不另画。 */
@font-face {
    /* 独立入口不加载 style.css，像素字体在这里备一个后备名 */
    font-family: 'NA Pixel';
    src: url('assets/字体/FusionPixel-12px-zh-subset.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: 'NA Press';
    src: url('assets/字体/PressStart2P.woff2') format('woff2');
    font-display: swap;
}

:root {
    --na-desk: #17110d;
    --na-desk-2: #241a13;
    --na-lamp: #f2c27a;
    --na-paper: #f3e8cf;
    --na-paper-2: #e9d9b4;
    --na-paper-3: #dcc79a;
    --na-kraft: #c29a62;
    --na-kraft-dark: #8e6a3c;
    --na-ink: #2a2019;
    --na-ink-soft: #5e4c3b;
    --na-red: #b3372b;
    --na-red-dark: #7d231a;
    --na-carbon: #2e4a7d;
    --na-carbon-soft: #7890b8;
    --na-rule: rgba(46, 74, 125, 0.16);
    --na-photo: #fbf6ea;

    --na-px: 'Fusion Pixel', 'NA Pixel', monospace;
    --na-en: 'Press Start 2P', 'NA Press', monospace;
    /* 档案夹露出的牛皮纸边宽度 */
    --na-jacket: 10px;

    --na-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .16  0 0 0 0 .12  0 0 0 0 .08  0 0 0 .26 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    --na-ink-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -3 0 0 0 2.5'/></filter><rect width='100%25' height='100%25' filter='url(%23m)'/></svg>");
    --na-speck: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='s'><feTurbulence type='fractalNoise' baseFrequency='.5' numOctaves='2' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .16  0 0 0 0 .12  0 0 0 0 .08  9 0 0 0 -6.15'/></filter><rect width='100%25' height='100%25' filter='url(%23s)'/></svg>");
    --na-fiber: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='120'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.01 .5' numOctaves='2' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .33  0 0 0 0 .23  0 0 0 0 .12  1.6 0 0 0 -.62'/></filter><rect width='100%25' height='100%25' filter='url(%23f)'/></svg>");
    --na-ink-voids: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='v'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .953  0 0 0 0 .91  0 0 0 0 .812  9 0 0 0 -5.6'/></filter><rect width='100%25' height='100%25' filter='url(%23v)'/></svg>");
    --na-ink-blotch: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='.03' numOctaves='2' seed='11' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -1.6 0 0 0 1.75'/></filter><rect width='100%25' height='100%25' filter='url(%23b)'/></svg>");
    --na-hatch: repeating-linear-gradient(135deg, rgba(94, 76, 59, 0.13) 0 1px, transparent 1px 4px);
    /* 票根纸面：纸屑 + 细噪 + 四边做旧；底色另给，悬停只换底色，纹理不动 */
    --na-ticket-tex: var(--na-speck), var(--na-grain),
        radial-gradient(ellipse 75% 90% at 50% 50%, transparent 62%, rgba(142, 106, 60, 0.24));
    --na-margin-line: linear-gradient(90deg, transparent 26px, rgba(179, 55, 43, 0.4) 26px 28px,
        transparent 28px);

    --na-icon-book: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='2' y='1' width='12' height='1' fill='%232a2019'/><rect x='1' y='2' width='1' height='1' fill='%232a2019'/><rect x='2' y='2' width='1' height='1' fill='%237d231a'/><rect x='3' y='2' width='11' height='1' fill='%23b3372b'/><rect x='14' y='2' width='1' height='1' fill='%232a2019'/><rect x='1' y='3' width='1' height='1' fill='%232a2019'/><rect x='2' y='3' width='1' height='1' fill='%237d231a'/><rect x='3' y='3' width='11' height='1' fill='%23b3372b'/><rect x='14' y='3' width='1' height='1' fill='%232a2019'/><rect x='1' y='4' width='1' height='1' fill='%232a2019'/><rect x='2' y='4' width='1' height='1' fill='%237d231a'/><rect x='3' y='4' width='2' height='1' fill='%23b3372b'/><rect x='5' y='4' width='7' height='1' fill='%23f3e8cf'/><rect x='12' y='4' width='2' height='1' fill='%23b3372b'/><rect x='14' y='4' width='1' height='1' fill='%232a2019'/><rect x='1' y='5' width='1' height='1' fill='%232a2019'/><rect x='2' y='5' width='1' height='1' fill='%237d231a'/><rect x='3' y='5' width='2' height='1' fill='%23b3372b'/><rect x='5' y='5' width='1' height='1' fill='%23f3e8cf'/><rect x='6' y='5' width='5' height='1' fill='%232a2019'/><rect x='11' y='5' width='1' height='1' fill='%23f3e8cf'/><rect x='12' y='5' width='2' height='1' fill='%23b3372b'/><rect x='14' y='5' width='1' height='1' fill='%232a2019'/><rect x='1' y='6' width='1' height='1' fill='%232a2019'/><rect x='2' y='6' width='1' height='1' fill='%237d231a'/><rect x='3' y='6' width='2' height='1' fill='%23b3372b'/><rect x='5' y='6' width='7' height='1' fill='%23f3e8cf'/><rect x='12' y='6' width='2' height='1' fill='%23b3372b'/><rect x='14' y='6' width='1' height='1' fill='%232a2019'/><rect x='1' y='7' width='1' height='1' fill='%232a2019'/><rect x='2' y='7' width='1' height='1' fill='%237d231a'/><rect x='3' y='7' width='11' height='1' fill='%23b3372b'/><rect x='14' y='7' width='1' height='1' fill='%232a2019'/><rect x='1' y='8' width='1' height='1' fill='%232a2019'/><rect x='2' y='8' width='1' height='1' fill='%237d231a'/><rect x='3' y='8' width='11' height='1' fill='%23b3372b'/><rect x='14' y='8' width='1' height='1' fill='%232a2019'/><rect x='1' y='9' width='1' height='1' fill='%232a2019'/><rect x='2' y='9' width='1' height='1' fill='%237d231a'/><rect x='3' y='9' width='11' height='1' fill='%23b3372b'/><rect x='14' y='9' width='1' height='1' fill='%232a2019'/><rect x='1' y='10' width='1' height='1' fill='%232a2019'/><rect x='2' y='10' width='1' height='1' fill='%237d231a'/><rect x='3' y='10' width='11' height='1' fill='%23b3372b'/><rect x='14' y='10' width='1' height='1' fill='%232a2019'/><rect x='1' y='11' width='1' height='1' fill='%232a2019'/><rect x='2' y='11' width='1' height='1' fill='%237d231a'/><rect x='3' y='11' width='12' height='1' fill='%232a2019'/><rect x='1' y='12' width='1' height='1' fill='%232a2019'/><rect x='2' y='12' width='1' height='1' fill='%237d231a'/><rect x='3' y='12' width='1' height='1' fill='%23dcc79a'/><rect x='4' y='12' width='1' height='1' fill='%23f3e8cf'/><rect x='5' y='12' width='1' height='1' fill='%23dcc79a'/><rect x='6' y='12' width='1' height='1' fill='%23f3e8cf'/><rect x='7' y='12' width='1' height='1' fill='%23dcc79a'/><rect x='8' y='12' width='1' height='1' fill='%23f3e8cf'/><rect x='9' y='12' width='1' height='1' fill='%23dcc79a'/><rect x='10' y='12' width='1' height='1' fill='%23f3e8cf'/><rect x='11' y='12' width='1' height='1' fill='%23dcc79a'/><rect x='12' y='12' width='1' height='1' fill='%23f3e8cf'/><rect x='13' y='12' width='1' height='1' fill='%23dcc79a'/><rect x='14' y='12' width='1' height='1' fill='%232a2019'/><rect x='2' y='13' width='13' height='1' fill='%232a2019'/><rect x='10' y='14' width='1' height='1' fill='%23b3372b'/><rect x='11' y='14' width='1' height='1' fill='%237d231a'/><rect x='10' y='15' width='1' height='1' fill='%23b3372b'/></svg>");
    --na-icon-journal: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='6' y='1' width='1' height='1' fill='%232a2019'/><rect x='9' y='1' width='1' height='1' fill='%232a2019'/><rect x='12' y='1' width='1' height='1' fill='%232a2019'/><rect x='2' y='2' width='13' height='1' fill='%232a2019'/><rect x='2' y='3' width='1' height='1' fill='%232a2019'/><rect x='3' y='3' width='1' height='1' fill='%23f3e8cf'/><rect x='4' y='3' width='1' height='1' fill='%23b3372b'/><rect x='5' y='3' width='1' height='1' fill='%23f3e8cf'/><rect x='6' y='3' width='1' height='1' fill='%238e6a3c'/><rect x='7' y='3' width='2' height='1' fill='%23f3e8cf'/><rect x='9' y='3' width='1' height='1' fill='%238e6a3c'/><rect x='10' y='3' width='2' height='1' fill='%23f3e8cf'/><rect x='12' y='3' width='1' height='1' fill='%238e6a3c'/><rect x='13' y='3' width='1' height='1' fill='%23f3e8cf'/><rect x='14' y='3' width='2' height='1' fill='%232a2019'/><rect x='2' y='4' width='1' height='1' fill='%232a2019'/><rect x='3' y='4' width='1' height='1' fill='%23f3e8cf'/><rect x='4' y='4' width='1' height='1' fill='%23b3372b'/><rect x='5' y='4' width='9' height='1' fill='%23f3e8cf'/><rect x='14' y='4' width='2' height='1' fill='%232a2019'/><rect x='2' y='5' width='1' height='1' fill='%232a2019'/><rect x='3' y='5' width='1' height='1' fill='%23f3e8cf'/><rect x='4' y='5' width='1' height='1' fill='%23b3372b'/><rect x='5' y='5' width='1' height='1' fill='%23f3e8cf'/><rect x='6' y='5' width='7' height='1' fill='%232e4a7d'/><rect x='13' y='5' width='1' height='1' fill='%23f3e8cf'/><rect x='14' y='5' width='2' height='1' fill='%232a2019'/><rect x='2' y='6' width='1' height='1' fill='%232a2019'/><rect x='3' y='6' width='1' height='1' fill='%23f3e8cf'/><rect x='4' y='6' width='1' height='1' fill='%23b3372b'/><rect x='5' y='6' width='9' height='1' fill='%23f3e8cf'/><rect x='14' y='6' width='2' height='1' fill='%232a2019'/><rect x='2' y='7' width='1' height='1' fill='%232a2019'/><rect x='3' y='7' width='1' height='1' fill='%23f3e8cf'/><rect x='4' y='7' width='1' height='1' fill='%23b3372b'/><rect x='5' y='7' width='1' height='1' fill='%23f3e8cf'/><rect x='6' y='7' width='7' height='1' fill='%232e4a7d'/><rect x='13' y='7' width='1' height='1' fill='%23f3e8cf'/><rect x='14' y='7' width='2' height='1' fill='%232a2019'/><rect x='2' y='8' width='1' height='1' fill='%232a2019'/><rect x='3' y='8' width='1' height='1' fill='%23f3e8cf'/><rect x='4' y='8' width='1' height='1' fill='%23b3372b'/><rect x='5' y='8' width='9' height='1' fill='%23f3e8cf'/><rect x='14' y='8' width='2' height='1' fill='%232a2019'/><rect x='2' y='9' width='1' height='1' fill='%232a2019'/><rect x='3' y='9' width='1' height='1' fill='%23f3e8cf'/><rect x='4' y='9' width='1' height='1' fill='%23b3372b'/><rect x='5' y='9' width='1' height='1' fill='%23f3e8cf'/><rect x='6' y='9' width='5' height='1' fill='%232e4a7d'/><rect x='11' y='9' width='3' height='1' fill='%23f3e8cf'/><rect x='14' y='9' width='2' height='1' fill='%232a2019'/><rect x='2' y='10' width='1' height='1' fill='%232a2019'/><rect x='3' y='10' width='1' height='1' fill='%23f3e8cf'/><rect x='4' y='10' width='1' height='1' fill='%23b3372b'/><rect x='5' y='10' width='9' height='1' fill='%23f3e8cf'/><rect x='14' y='10' width='2' height='1' fill='%232a2019'/><rect x='2' y='11' width='1' height='1' fill='%232a2019'/><rect x='3' y='11' width='1' height='1' fill='%23f3e8cf'/><rect x='4' y='11' width='1' height='1' fill='%23b3372b'/><rect x='5' y='11' width='9' height='1' fill='%23f3e8cf'/><rect x='14' y='11' width='2' height='1' fill='%232a2019'/><rect x='2' y='12' width='1' height='1' fill='%232a2019'/><rect x='3' y='12' width='1' height='1' fill='%23f3e8cf'/><rect x='4' y='12' width='1' height='1' fill='%23b3372b'/><rect x='5' y='12' width='9' height='1' fill='%23f3e8cf'/><rect x='14' y='12' width='2' height='1' fill='%232a2019'/><rect x='2' y='13' width='14' height='1' fill='%232a2019'/><rect x='3' y='14' width='13' height='1' fill='%232a2019'/></svg>");
    --na-icon-seal: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='6' y='1' width='4' height='1' fill='%232a2019'/><rect x='5' y='2' width='1' height='1' fill='%232a2019'/><rect x='6' y='2' width='1' height='1' fill='%238e6a3c'/><rect x='7' y='2' width='1' height='1' fill='%23dcc79a'/><rect x='8' y='2' width='2' height='1' fill='%238e6a3c'/><rect x='10' y='2' width='1' height='1' fill='%232a2019'/><rect x='5' y='3' width='1' height='1' fill='%232a2019'/><rect x='6' y='3' width='4' height='1' fill='%238e6a3c'/><rect x='10' y='3' width='1' height='1' fill='%232a2019'/><rect x='6' y='4' width='4' height='1' fill='%232a2019'/><rect x='6' y='5' width='1' height='1' fill='%232a2019'/><rect x='7' y='5' width='2' height='1' fill='%238e6a3c'/><rect x='9' y='5' width='1' height='1' fill='%232a2019'/><rect x='6' y='6' width='1' height='1' fill='%232a2019'/><rect x='7' y='6' width='2' height='1' fill='%238e6a3c'/><rect x='9' y='6' width='1' height='1' fill='%232a2019'/><rect x='3' y='7' width='10' height='1' fill='%232a2019'/><rect x='3' y='8' width='1' height='1' fill='%232a2019'/><rect x='4' y='8' width='1' height='1' fill='%238e6a3c'/><rect x='5' y='8' width='1' height='1' fill='%23dcc79a'/><rect x='6' y='8' width='6' height='1' fill='%238e6a3c'/><rect x='12' y='8' width='1' height='1' fill='%232a2019'/><rect x='3' y='9' width='1' height='1' fill='%232a2019'/><rect x='4' y='9' width='8' height='1' fill='%238e6a3c'/><rect x='12' y='9' width='1' height='1' fill='%232a2019'/><rect x='3' y='10' width='10' height='1' fill='%232a2019'/><rect x='3' y='11' width='1' height='1' fill='%232a2019'/><rect x='4' y='11' width='8' height='1' fill='%237d231a'/><rect x='12' y='11' width='1' height='1' fill='%232a2019'/><rect x='3' y='12' width='10' height='1' fill='%232a2019'/><rect x='2' y='14' width='2' height='1' fill='%23b3372b'/><rect x='5' y='14' width='4' height='1' fill='%23b3372b'/><rect x='10' y='14' width='3' height='1' fill='%23b3372b'/></svg>");
    --na-icon-ribbon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='5' y='1' width='6' height='1' fill='%232a2019'/><rect x='5' y='2' width='1' height='1' fill='%232a2019'/><rect x='6' y='2' width='1' height='1' fill='%23f3e8cf'/><rect x='7' y='2' width='2' height='1' fill='%23b3372b'/><rect x='9' y='2' width='1' height='1' fill='%237d231a'/><rect x='10' y='2' width='1' height='1' fill='%232a2019'/><rect x='5' y='3' width='1' height='1' fill='%232a2019'/><rect x='6' y='3' width='3' height='1' fill='%23b3372b'/><rect x='9' y='3' width='1' height='1' fill='%237d231a'/><rect x='10' y='3' width='1' height='1' fill='%232a2019'/><rect x='5' y='4' width='1' height='1' fill='%232a2019'/><rect x='6' y='4' width='3' height='1' fill='%23b3372b'/><rect x='9' y='4' width='1' height='1' fill='%237d231a'/><rect x='10' y='4' width='1' height='1' fill='%232a2019'/><rect x='5' y='5' width='1' height='1' fill='%232a2019'/><rect x='6' y='5' width='3' height='1' fill='%23b3372b'/><rect x='9' y='5' width='1' height='1' fill='%237d231a'/><rect x='10' y='5' width='1' height='1' fill='%232a2019'/><rect x='5' y='6' width='1' height='1' fill='%232a2019'/><rect x='6' y='6' width='3' height='1' fill='%23b3372b'/><rect x='9' y='6' width='1' height='1' fill='%237d231a'/><rect x='10' y='6' width='1' height='1' fill='%232a2019'/><rect x='5' y='7' width='1' height='1' fill='%232a2019'/><rect x='6' y='7' width='3' height='1' fill='%23b3372b'/><rect x='9' y='7' width='1' height='1' fill='%237d231a'/><rect x='10' y='7' width='1' height='1' fill='%232a2019'/><rect x='5' y='8' width='1' height='1' fill='%232a2019'/><rect x='6' y='8' width='3' height='1' fill='%23b3372b'/><rect x='9' y='8' width='1' height='1' fill='%237d231a'/><rect x='10' y='8' width='1' height='1' fill='%232a2019'/><rect x='5' y='9' width='1' height='1' fill='%232a2019'/><rect x='6' y='9' width='3' height='1' fill='%23b3372b'/><rect x='9' y='9' width='1' height='1' fill='%237d231a'/><rect x='10' y='9' width='1' height='1' fill='%232a2019'/><rect x='5' y='10' width='1' height='1' fill='%232a2019'/><rect x='6' y='10' width='3' height='1' fill='%23b3372b'/><rect x='9' y='10' width='1' height='1' fill='%237d231a'/><rect x='10' y='10' width='1' height='1' fill='%232a2019'/><rect x='5' y='11' width='1' height='1' fill='%232a2019'/><rect x='6' y='11' width='3' height='1' fill='%23b3372b'/><rect x='9' y='11' width='1' height='1' fill='%237d231a'/><rect x='10' y='11' width='1' height='1' fill='%232a2019'/><rect x='5' y='12' width='1' height='1' fill='%232a2019'/><rect x='6' y='12' width='1' height='1' fill='%23b3372b'/><rect x='7' y='12' width='2' height='1' fill='%232a2019'/><rect x='9' y='12' width='1' height='1' fill='%237d231a'/><rect x='10' y='12' width='1' height='1' fill='%232a2019'/><rect x='5' y='13' width='2' height='1' fill='%232a2019'/><rect x='9' y='13' width='2' height='1' fill='%232a2019'/></svg>");
}

/* ============ 书桌与档案夹 ============ */
html:has(#app:not(.hidden)), html:has(#branch-app) { background: var(--na-desk); }
html body:has(#app:not(.hidden)),
html body:has(> #branch-app) {
    background:
        radial-gradient(ellipse 70% 55% at 50% 0, rgba(242, 194, 122, 0.2), transparent 70%),
        radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.5)),
        repeating-linear-gradient(92deg, var(--na-desk) 0 38px, var(--na-desk-2) 38px 41px,
            var(--na-desk) 41px 90px),
        var(--na-desk);
}
/* 稿纸夹在牛皮纸档案夹里：边框透明，外圈露出牛皮纸与纤维 */
html #app .main,
html #app .main:has(#view-adventure.active),
html body #branch-app {
    border: var(--na-jacket) solid transparent;
    background:
        var(--na-grain) padding-box,
        var(--na-margin-line) padding-box,
        linear-gradient(var(--na-paper), var(--na-paper)) padding-box,
        var(--na-fiber) border-box,
        var(--na-grain) border-box,
        linear-gradient(var(--na-kraft), var(--na-kraft)) border-box;
    box-shadow: 0 0 0 2px var(--na-kraft-dark), 0 18px 40px rgba(0, 0, 0, 0.55);
    color: var(--na-ink);
}

/* ============ 顶部书签 ============ */
html body #app .tabs {
    position: relative;
    z-index: 1;
    align-items: flex-end;
    gap: 6px;
    padding: 0 12px;
}
html body #app .tabs .tab {
    flex: 1;
    min-width: 0;
    min-height: 50px;
    padding: 12px 12px 10px;
    border: 0;
    border-image: none;
    background: var(--na-grain), var(--na-paper-3);
    color: var(--na-ink-soft);
    font: 12px/1.5 var(--na-px);
    font-weight: 400;
    font-synthesis: none;
    letter-spacing: 2px;
    text-shadow: none;
    box-shadow: none;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
    transition: transform 0.15s, background-color 0.15s;
}
html body #app .tabs .tab:hover { transform: translateY(-2px); color: var(--na-ink); }
/* 当前页用牛皮纸色并加高 3px，和档案夹连成一体 */
html body #app .tabs .tab.active,
html body #app .tabs #nav-adventure.active {
    min-height: 53px;
    border: 0;
    background: var(--na-fiber), var(--na-grain), var(--na-kraft);
    color: var(--na-ink);
    box-shadow: inset 0 2px 0 rgba(243, 232, 207, 0.3);
    transform: none;
}
html body #app .tabs .tab:focus-visible { outline: 3px solid var(--na-carbon); outline-offset: -5px; }
html body #app .tabs .nav-chapter { color: var(--na-red-dark); }
html body #app .tabs .tab.active .nav-chapter { color: var(--na-ink); }
html body #app .tabs .tab::before,
html body #app .tabs #nav-character::before,
html body #app .tabs #nav-adventure::before,
html body #app .tabs #nav-logs::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 0 8px 0 0;
    vertical-align: -3px;
    border: 0;
    box-shadow: none;
    transform: none;
    background: var(--na-tab-icon, var(--na-icon-journal)) center / 16px 16px no-repeat;
    image-rendering: pixelated;
}
html body #app .tabs #nav-character { --na-tab-icon: var(--na-icon-seal); }
html body #app .tabs #nav-adventure { --na-tab-icon: var(--na-icon-book); }
html body #app .tabs #nav-logs { --na-tab-icon: var(--na-icon-journal); }

/* ============ 页内标记与标题 ============ */
html #app .page-mark,
html #app #view-adventure .page-mark {
    display: block;
    width: fit-content;
    margin: 0 0 16px;
    padding: 4px 24px 4px 10px;
    border: 0;
    background: var(--na-fiber), var(--na-grain), var(--na-kraft);
    color: var(--na-ink);
    font: 12px/1.6 var(--na-px);
    letter-spacing: 2px;
    box-shadow: inset 0 -2px 0 rgba(42, 32, 25, 0.16);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}
html #app .panel h2,
html #app #view-adventure .prep-panel > h2 { color: var(--na-ink); text-shadow: none; }
html #app #view-adventure .prep-panel > h2 { border-bottom: 2px solid var(--na-ink); padding-bottom: 14px; }
html #app .section-label,
html :is(#branch-app, #branch-tree-content) .settle-label {
    font: 12px/1.6 var(--na-px);
    letter-spacing: 2px;
    color: var(--na-ink-soft);
}
html :is(#branch-app, #branch-tree-content) .settle-label { border-bottom: 2px dashed var(--na-paper-3); }
html #app .section-label::before,
html :is(#branch-app, #branch-tree-content) .settle-label::before {
    background: var(--na-red-dark);
    box-shadow: 2px 2px 0 var(--na-paper-3);
}
html #app .danger-zone .section-label { color: var(--na-red-dark); }

/* 冒险页档案头：地点用复写纸蓝，节点类型盖成小红章 */
html :is(#branch-app, #branch-tree-content) .branch-head {
    background: none;
    border: 0;
    border-bottom: 2px solid var(--na-ink);
    box-shadow: none;
    padding: 0 0 14px;
    margin-bottom: 24px;
}
html :is(#branch-app, #branch-tree-content) .branch-head h1 { color: var(--na-ink); text-shadow: none; }
html :is(#branch-app, #branch-tree-content) .branch-head .sub {
    color: var(--na-ink-soft);
    font: 12px/1.6 var(--na-px);
    letter-spacing: 2px;
}
html :is(#branch-app, #branch-tree-content) .game-meta {
    align-items: center;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0 0 8px;
    margin: 0;
    color: var(--na-ink-soft);
    font: 12px/1.6 var(--na-px);
    letter-spacing: 1px;
}
html :is(#branch-app, #branch-tree-content) #b-location { color: var(--na-carbon); }
html :is(#branch-app, #branch-tree-content) #b-nodetype {
    margin-left: auto;
    padding: 2px 8px;
    border: 2px solid var(--na-red);
    color: var(--na-red);
    transform: rotate(2deg);
}
html :is(#branch-app, #branch-tree-content) #b-nodetype:empty { display: none; }
html :is(#branch-app, #branch-tree-content) #b-title {
    background: none;
    color: var(--na-ink);
    border: 0;
    border-bottom: 2px solid var(--na-ink);
    box-shadow: none;
    text-shadow: none;
    padding: 6px 0 14px;
    margin: 0 0 28px;
}
html :is(#branch-app, #branch-tree-content) #b-title::after { display: none; }
html :is(#branch-app, #branch-tree-content) .b-para strong { color: var(--na-red-dark); }
html :is(#branch-app, #branch-tree-content) #b-choices { border-top: 2px dashed var(--na-paper-3); }

/* ============ 状态区：打孔卡 ============ */
html :is(#branch-app, #branch-tree-content) #b-stats {
    gap: 10px 18px;
    padding: 12px 14px;
    margin: 26px 0;
    background: var(--na-grain), var(--na-paper-2);
    border: 2px solid var(--na-ink);
    box-shadow: 3px 3px 0 var(--na-ink);
    color: var(--na-ink);
}
html :is(#branch-app, #branch-tree-content) #b-stats span { color: var(--na-ink); }
html :is(#branch-app, #branch-tree-content) #b-stats .s-label {
    margin-right: 6px;
    color: var(--na-ink-soft);
    font: 12px/1.6 var(--na-px);
    letter-spacing: 1px;
}
html :is(#branch-app, #branch-tree-content) #b-stats .s-val {
    color: var(--na-carbon);
    border-bottom: 2px solid var(--na-ink);
    padding: 0 2px;
}
html :is(#branch-app, #branch-tree-content) .energy-track-mini {
    height: 10px;
    background: var(--na-paper);
    border: 2px solid var(--na-ink);
}
html :is(#branch-app, #branch-tree-content) .energy-track-mini .energy-fill { background: var(--na-ink); }
/* 人物卡属性：十格打孔 */
html #app .stat-bar {
    gap: 3px;
    height: 14px;
    background: transparent;
    border: 0;
    box-shadow: none;
}
html #app .stat-bar .seg,
html #app .stat-bar .seg:first-child {
    border: 2px solid var(--na-ink-soft);
    background: var(--na-paper);
}
html #app .stat-bar .seg.on {
    border-color: var(--na-ink);
    background: var(--na-ink);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.12);
}
html #app .stat-value { color: var(--na-carbon); }

/* ============ 场景地图：白边相纸 + 胶带 ============ */
html #app #view-adventure .scene-map {
    border-color: var(--na-ink);
    box-shadow: 0 0 0 8px var(--na-photo), 0 0 0 9px rgba(42, 32, 25, 0.3),
        2px 12px 18px rgba(0, 0, 0, 0.18);
}
html #app #view-adventure .field:has(> #scene-map) { position: relative; }
html #app #view-adventure .field:has(> #scene-map)::before,
html #app #view-adventure .field:has(> #scene-map)::after {
    content: '';
    position: absolute;
    z-index: 2;
    bottom: -8px;
    width: 74px;
    height: 22px;
    background: rgba(233, 217, 180, 0.72);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}
html #app #view-adventure .field:has(> #scene-map)::before { left: -18px; transform: rotate(28deg); }
html #app #view-adventure .field:has(> #scene-map)::after { right: -18px; transform: rotate(-32deg); }

/* ============ 票根：推进剧情的主选项 ============ */
html :is(#branch-app, #branch-tree-content) .branch-choice,
html body #app #event-choices .choice-btn {
    --na-notch: var(--na-paper);
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    min-height: 56px;
    padding: 0;
    border: 2px solid var(--na-ink);
    border-image: none;
    border-radius: 0;
    background: var(--na-ticket-tex), var(--na-paper-2);
    color: var(--na-ink);
    text-align: left;
    text-shadow: none;
    box-shadow: 4px 4px 0 var(--na-ink);
    opacity: 1;
    overflow: hidden;
    transition: transform 0.12s, box-shadow 0.12s, background-color 0.12s;
}
/* 两侧半圆缺口 */
html :is(#branch-app, #branch-tree-content) .branch-choice::before,
html body #app #event-choices .choice-btn::before,
html :is(#branch-app, #branch-tree-content) .branch-choice::after,
html body #app #event-choices .choice-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 2px solid var(--na-ink);
    border-radius: 50%;
    background: var(--na-notch);
    pointer-events: none;
}
html :is(#branch-app, #branch-tree-content) .branch-choice::before,
html body #app #event-choices .choice-btn::before { left: -11px; }
html :is(#branch-app, #branch-tree-content) .branch-choice::after,
html body #app #event-choices .choice-btn::after { right: -11px; }
/* 存根区：斜线印刷底纹、比正文区深一档，虚线撕口 */
html body #app #event-choices .choice-btn .choice-key,
html :is(#branch-app, #branch-tree-content) .branch-choice .choice-key,
html :is(#branch-app, #branch-tree-content) .branch-choice:disabled .choice-key,
html :is(#branch-app, #branch-tree-content) .branch-choice.locked .choice-key {
    flex: 0 0 56px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: auto;
    min-width: 0;
    margin: 0;
    padding: 10px 4px 10px 10px;
    border: 0;
    border-right: 2px dashed var(--na-ink-soft);
    background: var(--na-hatch), rgba(142, 106, 60, 0.1);
    box-shadow: none;
    color: var(--na-red-dark);
    font: 10px/1 var(--na-en);
    text-align: center;
}
html body #app #event-choices .choice-btn .choice-key::before,
html :is(#branch-app, #branch-tree-content) .branch-choice .choice-key::before {
    content: 'NO.';
    color: var(--na-ink-soft);
    font: 8px/1 var(--na-en);
}
/* 正文区：内侧一道印刷细线框 */
html body #app #event-choices .choice-btn .choice-text,
html :is(#branch-app, #branch-tree-content) .branch-choice .choice-body {
    position: relative;
    flex: 1;
    min-width: 0;
    padding: 14px 28px 14px 18px;
}
html body #app #event-choices .choice-btn .choice-text::after,
html :is(#branch-app, #branch-tree-content) .branch-choice .choice-body::after {
    content: '';
    position: absolute;
    inset: 5px 14px 5px 5px;
    border: 1px solid rgba(94, 76, 59, 0.32);
    pointer-events: none;
}
html :is(#branch-app, #branch-tree-content) .branch-choice:not(:disabled):not(.locked):hover,
html body #app #event-choices .choice-btn:not(:disabled):not(.locked):hover {
    border-color: var(--na-ink);
    background: var(--na-ticket-tex), var(--na-paper);
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 var(--na-ink);
}
html :is(#branch-app, #branch-tree-content) .branch-choice:not(:disabled):not(.locked):active,
html body #app #event-choices .choice-btn:not(:disabled):not(.locked):active {
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 var(--na-ink);
}
html :is(#branch-app, #branch-tree-content) .branch-choice:focus-visible,
html body #app #event-choices .choice-btn:focus-visible { outline: 3px solid var(--na-carbon); outline-offset: 3px; }
/* 条件不足：票根作废，底色压暗、正文划红线；只读时只压暗，不划线 */
html :is(#branch-app, #branch-tree-content) .branch-choice:disabled,
html body #app #event-choices .choice-btn:disabled,
html :is(#branch-app, #branch-tree-content) .branch-choice:disabled:hover,
html body #app #event-choices .choice-btn:disabled:hover,
html :is(#branch-app, #branch-tree-content) .branch-choice.locked,
html body #app #event-choices .choice-btn.locked,
html :is(#branch-app, #branch-tree-content) .branch-choice.locked:hover,
html body #app #event-choices .choice-btn.locked:hover {
    cursor: not-allowed;
    border-color: var(--na-ink);
    background: var(--na-ticket-tex), var(--na-paper-3);
    color: var(--na-ink-soft);
    box-shadow: 2px 2px 0 var(--na-ink-soft);
    transform: none;
    opacity: 1;
}
html :is(#branch-app, #branch-tree-content) .branch-choice.locked .choice-text {
    text-decoration: line-through;
    text-decoration-color: var(--na-red);
    text-decoration-thickness: 2px;
}
html :is(#branch-app, #branch-tree-content) .choice-meta { color: var(--na-ink-soft); }
html :is(#branch-app, #branch-tree-content) .choice-meta :is(.cost, .restore) {
    display: inline-block;
    padding: 0 6px;
    border: 1px solid currentColor;
    font: 12px/1.6 var(--na-px);
}
html :is(#branch-app, #branch-tree-content) .choice-meta .cost { color: var(--na-red-dark); }
html :is(#branch-app, #branch-tree-content) .choice-meta .restore { color: var(--na-carbon); }
html :is(#branch-app, #branch-tree-content) .choice-lock { color: var(--na-ink-soft); }
html :is(#branch-app, #branch-tree-content) .lock-req { color: var(--na-red-dark); }
/* 入场动画结束后不再锁住 transform，否则悬停上浮与按下位移失效 */
html :is(#branch-app, #branch-tree-content) #branch-game.bt-enter #b-choices > .branch-choice {
    animation-fill-mode: backwards;
}

/* 单行主按钮：同一票根纸面，左侧窄存根代替编号 */
html body #app #generate-event-button,
html body #app button.primary,
html body #app #create-character-form button[type='submit'],
html :is(#branch-app, #branch-tree-content) .btn-main {
    position: relative;
    min-height: 52px;
    padding: 12px 28px 12px 38px;
    border: 2px solid var(--na-ink);
    border-image: none;
    border-radius: 0;
    background: var(--na-ticket-tex), var(--na-paper-2);
    color: var(--na-ink);
    text-shadow: none;
    font: 700 17px/1.5 var(--reading-font);
    letter-spacing: 3px;
    box-shadow: 4px 4px 0 var(--na-ink);
    filter: none;
    opacity: 1;
    overflow: hidden;
    transition: transform 0.12s, box-shadow 0.12s, background-color 0.12s;
}
html body #app #generate-event-button::before,
html body #app button.primary::before,
html body #app #create-character-form button[type='submit']::before,
html :is(#branch-app, #branch-tree-content) .btn-main::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 20px;
    border-right: 2px dashed var(--na-ink-soft);
    background: var(--na-hatch), rgba(142, 106, 60, 0.1);
    pointer-events: none;
}
html body #app #generate-event-button:not(:disabled):hover,
html body #app button.primary:not(:disabled):hover,
html body #app #create-character-form button[type='submit']:not(:disabled):hover,
html :is(#branch-app, #branch-tree-content) .btn-main:not(:disabled):hover {
    background: var(--na-ticket-tex), var(--na-paper);
    filter: none;
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 var(--na-ink);
}
html body #app #generate-event-button:not(:disabled):active,
html body #app button.primary:not(:disabled):active,
html body #app #create-character-form button[type='submit']:not(:disabled):active,
html :is(#branch-app, #branch-tree-content) .btn-main:not(:disabled):active {
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 var(--na-ink);
}
html body #app #generate-event-button:focus-visible,
html body #app button.primary:focus-visible,
html body #app #create-character-form button[type='submit']:focus-visible,
html :is(#branch-app, #branch-tree-content) .btn-main:focus-visible { outline: 3px solid var(--na-carbon); outline-offset: 3px; }
html body #app #generate-event-button:disabled,
html body #app button.primary:disabled,
html body #app #create-character-form button[type='submit']:disabled,
html :is(#branch-app, #branch-tree-content) .btn-main:disabled {
    cursor: not-allowed;
    background: var(--na-ticket-tex), var(--na-paper-3);
    color: var(--na-ink-soft);
    box-shadow: 2px 2px 0 var(--na-ink-soft);
    transform: none;
    opacity: 1;
}
html body #app #generate-event-button::after { color: var(--na-red-dark); }

/* ============ 档案标签：导航与次要操作 ============ */
html body #app #close-book-button,
html body #app .button-group button:not(.primary),
html body #app .actions button,
html body #app .actions .import-label,
html body #app .event-actions button,
html :is(#branch-app, #branch-tree-content) .btn-sub,
html :is(#branch-app, #branch-tree-content) .journal-tab,
html body .log-pagination button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 26px 8px 14px;
    border: 2px solid var(--na-ink);
    border-image: none;
    border-radius: 0;
    background: var(--na-fiber), var(--na-grain), var(--na-kraft);
    /* 上沿折痕高光、下沿压暗，像翻旧的档案标签 */
    box-shadow: inset 0 2px 0 rgba(243, 232, 207, 0.3), inset 0 -2px 0 rgba(42, 32, 25, 0.16);
    color: var(--na-ink);
    text-shadow: none;
    font: 12px/1.5 var(--na-px);
    font-weight: 400;
    font-synthesis: none;
    letter-spacing: 2px;
    filter: none;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    transition: transform 0.12s, background-color 0.12s;
}
/* 16 格像素图标按 1 倍显示，保持锐利 */
html body #app #close-book-button::before,
html body #app .button-group button:not(.primary)::before,
html body #app .actions button::before,
html body #app .actions .import-label::before,
html body #app .event-actions button::before,
html :is(#branch-app, #branch-tree-content) .btn-sub::before,
html :is(#branch-app, #branch-tree-content) .journal-tab::before,
html body .log-pagination button::before {
    content: '';
    flex: none;
    width: 16px;
    height: 16px;
    background: var(--na-tag-icon, var(--na-icon-journal)) center / 16px 16px no-repeat;
    image-rendering: pixelated;
}
html body #app #close-book-button:not(:disabled):hover,
html body #app .button-group button:not(.primary):not(:disabled):hover,
html body #app .actions button:not(:disabled):hover,
html body #app .actions .import-label:not(:disabled):hover,
html body #app .event-actions button:not(:disabled):hover,
html :is(#branch-app, #branch-tree-content) .btn-sub:not(:disabled):hover,
html :is(#branch-app, #branch-tree-content) .journal-tab:not(:disabled):hover,
html body .log-pagination button:not(:disabled):hover { background-color: var(--na-lamp); filter: none; }
html body #app #close-book-button:not(:disabled):active,
html body #app .button-group button:not(.primary):not(:disabled):active,
html body #app .actions button:not(:disabled):active,
html body #app .actions .import-label:not(:disabled):active,
html body #app .event-actions button:not(:disabled):active,
html :is(#branch-app, #branch-tree-content) .btn-sub:not(:disabled):active,
html :is(#branch-app, #branch-tree-content) .journal-tab:not(:disabled):active,
html body .log-pagination button:not(:disabled):active {
    transform: translateY(2px);
    box-shadow: inset 0 2px 0 rgba(243, 232, 207, 0.3), inset 0 -2px 0 rgba(42, 32, 25, 0.16);
}
html body #app #close-book-button:focus-visible,
html body #app .button-group button:not(.primary):focus-visible,
html body #app .actions button:focus-visible,
html body #app .actions .import-label:focus-visible,
html body #app .event-actions button:focus-visible,
html :is(#branch-app, #branch-tree-content) .btn-sub:focus-visible,
html :is(#branch-app, #branch-tree-content) .journal-tab:focus-visible,
html body .log-pagination button:focus-visible { outline: 3px solid var(--na-carbon); outline-offset: -6px; }
html body #app #close-book-button,
html body #app #event-close-book-button,
html :is(#branch-app, #branch-tree-content) #btn-home { --na-tag-icon: var(--na-icon-book); }
html body #app #export-save-button { --na-tag-icon: var(--na-icon-seal); }
html :is(#branch-app, #branch-tree-content) .journal-tab:nth-child(1) { --na-tag-icon: var(--na-icon-ribbon); }
html :is(#branch-app, #branch-tree-content) .journal-tab:nth-child(3) { --na-tag-icon: var(--na-icon-book); }
/* 行为与状态是选择项：不放图标，选中改成复写纸蓝 */
html body #app .button-group button:not(.primary)::before { display: none; }
html body #app .button-group button:not(.primary) { letter-spacing: 1px; padding-left: 12px; padding-right: 22px; }
html body #app .button-group button:not(.primary).active,
html body #app .button-group button:not(.primary).active:not(:disabled):hover,
html :is(#branch-app, #branch-tree-content) .journal-tab.active,
html :is(#branch-app, #branch-tree-content) .journal-tab.active:not(:disabled):hover {
    background: var(--na-fiber), var(--na-grain), var(--na-carbon);
    color: var(--na-paper);
    box-shadow: inset 0 2px 0 rgba(243, 232, 207, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.25);
    opacity: 1;
}

/* ============ 红印章：清空、覆盖等不可逆操作 ============ */
html body #app #clear-save-button,
html body #app button.danger,
html body #intro-settings #settings-clear {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 48px;
    padding: 10px 22px;
    border: 3px solid var(--na-red);
    border-image: none;
    border-radius: 0;
    background: transparent;
    color: var(--na-red);
    text-shadow: none;
    font: 700 16px/1.4 var(--reading-font);
    letter-spacing: 2px;
    box-shadow: none;
    filter: none;
    opacity: 1;
    cursor: pointer;
    transform: rotate(-1.2deg);
    transition: transform 0.12s, background-color 0.12s, color 0.12s;
}
/* 内缩一圈细框 */
html body #app #clear-save-button::before,
html body #app button.danger::before,
html body #intro-settings #settings-clear::before {
    content: '';
    position: absolute;
    inset: 5px;
    margin: 0;
    border: 1px solid currentColor;
    opacity: 1;
    pointer-events: none;
}
/* 印泥没吃满的纸色小点，盖在边框和字上；按下变红底时成为红底白点 */
html body #app #clear-save-button::after,
html body #app button.danger::after,
html body #intro-settings #settings-clear::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: var(--na-ink-voids);
    pointer-events: none;
}
html body #app #clear-save-button:hover,
html body #app button.danger:hover,
html body #intro-settings #settings-clear:hover {
    background: rgba(179, 55, 43, 0.08);
    color: var(--na-red);
    opacity: 1;
    transform: rotate(0deg);
}
html body #app #clear-save-button:active,
html body #app button.danger:active,
html body #intro-settings #settings-clear:active {
    background: var(--na-red);
    color: var(--na-paper);
    transform: scale(0.97);
}
html body #app #clear-save-button:focus-visible,
html body #app button.danger:focus-visible,
html body #intro-settings #settings-clear:focus-visible,
html body #app #clear-save-button:focus-within,
html body #app button.danger:focus-within,
html body #intro-settings #settings-clear:focus-within { outline: 3px solid var(--na-carbon); outline-offset: 3px; }
/* 设置窗是深色底：印章自带一张稿纸，红字只落在 paper 上 */
html body #intro-settings #settings-clear {
    display: flex;
    width: fit-content;
    margin: 18px auto 8px;
    background: var(--na-paper);
}
html body #intro-settings #settings-clear:hover {
    background: linear-gradient(rgba(179, 55, 43, 0.08), rgba(179, 55, 43, 0.08)), var(--na-paper);
}
html body #intro-settings #settings-clear:active { background: var(--na-red); }

/* ============ 日志、收藏与结算 ============ */
html #app .log-item { border-left: 3px solid var(--na-kraft-dark); }
html #app .log-item:hover { background: var(--na-paper-2); }
html :is(#branch-app, #branch-tree-content) .journal-card {
    position: relative;
    isolation: isolate;
    border: 2px solid var(--na-ink);
    background: var(--na-grain), var(--na-photo);
    box-shadow: 3px 3px 0 var(--na-ink);
}
html :is(#branch-app, #branch-tree-content) .journal-card-from { color: var(--na-ink-soft); }
html :is(#branch-app, #branch-tree-content) .journal-card-progress { color: var(--na-carbon); }
/* 未解锁：火漆封口信封 */
html :is(#branch-app, #branch-tree-content) .journal-card.locked {
    padding-right: 72px;
    border-style: solid;
    background: var(--na-grain), var(--na-paper-2);
    color: var(--na-ink-soft);
}
html :is(#branch-app, #branch-tree-content) .journal-card.locked::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    height: 60%;
    background:
        linear-gradient(to bottom right, transparent 49.3%, var(--na-ink) 49.3% 50.7%, transparent 50.7%)
            left / 50% 100% no-repeat,
        linear-gradient(to bottom left, transparent 49.3%, var(--na-ink) 49.3% 50.7%, transparent 50.7%)
            right / 50% 100% no-repeat;
    opacity: 0.18;
    pointer-events: none;
}
html :is(#branch-app, #branch-tree-content) .journal-card.locked::after {
    content: '封';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #d65a4b, var(--na-red) 55%, var(--na-red-dark));
    box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.35);
    color: rgba(243, 232, 207, 0.85);
    font: 12px/1 var(--na-px);
}
html :is(#branch-app, #branch-tree-content) .settle-endtext { border-left-color: var(--na-red-dark); }
html :is(#branch-app, #branch-tree-content) .settle-story { color: var(--na-carbon); }
html :is(#branch-app, #branch-tree-content) .settle-levelup { color: var(--na-red); }

/* ============ 窄屏 ============ */
@media (max-width: 600px) {
    :root {
        --na-jacket: 6px;
        --na-margin-line: linear-gradient(transparent, transparent);
    }
    html body #app .tabs { gap: 3px; padding: 0 4px; }
    html body #app .tabs .tab { padding: 12px 8px 10px; letter-spacing: 1px; }
    html body #app .tabs .tab::before,
    html body #app .tabs #nav-character::before,
    html body #app .tabs #nav-adventure::before,
    html body #app .tabs #nav-logs::before { margin-right: 4px; }
    html body #app #event-choices .choice-btn .choice-key,
    html :is(#branch-app, #branch-tree-content) .branch-choice .choice-key,
    html :is(#branch-app, #branch-tree-content) .branch-choice:disabled .choice-key,
    html :is(#branch-app, #branch-tree-content) .branch-choice.locked .choice-key {
        flex-basis: 44px;
        padding-left: 8px;
    }
    html body #app #event-choices .choice-btn .choice-text,
    html :is(#branch-app, #branch-tree-content) .branch-choice .choice-body {
        padding: 12px 22px 12px 14px;
    }
    html #app #view-adventure .field:has(> #scene-map)::before { left: -10px; }
    html #app #view-adventure .field:has(> #scene-map)::after { right: -10px; }
}
@media (max-width: 360px) {
    html body #app .tabs .tab::before,
    html body #app .tabs #nav-character::before,
    html body #app .tabs #nav-adventure::before,
    html body #app .tabs #nav-logs::before { display: none; }
}

/* 减少动效：关掉过渡与位移，只留最终状态 */
@media (prefers-reduced-motion: reduce) {
    html body #app .tabs .tab,
    html :is(#branch-app, #branch-tree-content) .branch-choice,
html body #app #event-choices .choice-btn,
    html body #app #generate-event-button,
html body #app button.primary,
html body #app #create-character-form button[type='submit'],
html :is(#branch-app, #branch-tree-content) .btn-main,
    html body #app #close-book-button,
html body #app .button-group button:not(.primary),
html body #app .actions button,
html body #app .actions .import-label,
html body #app .event-actions button,
html :is(#branch-app, #branch-tree-content) .btn-sub,
html :is(#branch-app, #branch-tree-content) .journal-tab,
html body .log-pagination button,
    html body #app #clear-save-button,
html body #app button.danger,
html body #intro-settings #settings-clear { transition: none; }
    html body #app .tabs .tab:hover,
    html :is(#branch-app, #branch-tree-content) .branch-choice:not(:disabled):not(.locked):hover,
html body #app #event-choices .choice-btn:not(:disabled):not(.locked):hover,
    html body #app #generate-event-button:not(:disabled):hover,
html body #app button.primary:not(:disabled):hover,
html body #app #create-character-form button[type='submit']:not(:disabled):hover,
html :is(#branch-app, #branch-tree-content) .btn-main:not(:disabled):hover,
    html body #app #clear-save-button:hover,
html body #app button.danger:hover,
html body #intro-settings #settings-clear:hover { transform: none; }
}
