/* v2026.09.09.2 / 在清晰纸面上恢复像素材质；不影响正文与规则。 */
#app .main, #branch-app {
    position: relative;
    border: 4px solid #735638;
    border-top-color: #ad8c58;
    background-color: #f3ead7;
    background-image: linear-gradient(90deg, #dfcba8 0 4px, transparent 4px calc(100% - 4px), #e2d0af calc(100% - 4px));
    box-shadow: inset 0 3px 0 #fff5df, inset 0 -4px 0 #cfb88e,
        0 4px 0 #c5ac7f, 4px 8px 0 #65472e, 8px 12px 0 #231b16;
}
#app .main::after, #branch-app::after {
    content: '';
    display: block;
    height: 10px;
    margin: 0 16px 8px;
    border-top: 2px dotted #c3aa7c;
    pointer-events: none;
}
html #app .tabs .tab {
    position: relative;
    border: 3px solid #735638;
    border-bottom: 0;
    border-top-color: #a68553;
    background: repeating-linear-gradient(0deg, #3b2c20 0 3px, #403023 3px 6px);
    box-shadow: inset 2px 2px 0 #705032, inset -2px 0 0 #241c16;
}
html #app .tabs .tab.active {
    border-color: #9d773e;
    background: #ecd9ad;
    box-shadow: inset 0 4px 0 #dda64a, inset 3px 0 0 #fff0c8, inset -3px 0 0 #c5a46c;
}
#app .tabs .tab::before {
    content: '';
    display: inline-block;
    width: 9px;
    height: 11px;
    margin-right: 10px;
    vertical-align: -1px;
    border: 2px solid currentColor;
    box-shadow: inset 2px 0 0 #9c7a46;
}
#app #nav-adventure::before { transform: rotate(45deg); width: 8px; height: 8px; }
#app #nav-logs::before { border-top-width: 4px; }
#app .page-mark {
    border: 0;
    background: #e7d4ac;
    padding: 6px 18px 6px 10px;
    color: #725331;
    box-shadow: inset 3px 0 0 #a77e40, inset 0 2px 0 #f9eccf, 0 2px 0 #c5ad83;
    clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 50%, 100% 100%, 0 100%);
}
#app .panel h2, :is(#branch-app, #branch-tree-content) #b-title {
    color: #3a2a1c;
    text-shadow: 1px 1px 0 #fffae9;
}
/* 边角与分隔承担质感，正文区域不铺高对比纹理。 */
#app .panel-ornament {
    display: block;
    top: 14px;
    right: 18px;
    left: auto;
    width: 22px;
    height: 22px;
    border: 0;
    border-top: 3px solid #c4a66d;
    border-right: 3px solid #c4a66d;
    box-shadow: 3px -3px 0 -1px #fdf1d5;
    pointer-events: none;
}
#app .section-label::before, :is(#branch-app, #branch-tree-content) .settle-label::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    margin: 0 9px 2px 2px;
    background: #a77b39;
    box-shadow: 2px 2px 0 #d8bf91;
}
#app .button-group button, #app .actions button, #app .import-label,
#app button.primary, #app #create-character-form button[type='submit'],
:is(#branch-app, #branch-tree-content) .btn-main,
:is(#branch-app, #branch-tree-content) .btn-sub {
    border: 2px solid #8e6c3d;
    border-image: none;
    box-shadow: inset 2px 2px 0 #fff0c9, inset -2px -2px 0 #c2a473, 0 3px 0 #6e5030;
}
#app button.primary, #app #create-character-form button[type='submit'],
#app .button-group button.active, :is(#branch-app, #branch-tree-content) .btn-main {
    background: #e8b75e;
    box-shadow: inset 2px 2px 0 #ffe0a0, inset -2px -2px 0 #bd8430, 0 3px 0 #735026;
}
#app .button-group button:active, #app .actions button:active,
:is(#branch-app, #branch-tree-content) .btn-main:active,
:is(#branch-app, #branch-tree-content) .btn-sub:active { box-shadow: inset 2px 2px 0 #b69a6c; }
html #app .choice-btn, :is(#branch-app, #branch-tree-content) .branch-choice {
    border: 2px solid #b89a67;
    border-left: 4px solid #a17b40;
    box-shadow: inset 0 2px 0 #fff9eb, 0 3px 0 #d9c5a0;
}
:is(#branch-app, #branch-tree-content) .choice-key {
    background: #e9d5a8;
    padding: 0 5px;
    min-width: 25px;
    text-align: center;
    border: 1px solid #ad8a51;
    box-shadow: 2px 2px 0 #d1b786;
    align-self: flex-start;
}
#app .log-item { border-left: 3px dotted #b49a70; }
:is(#branch-app, #branch-tree-content) .journal-card {
    border: 2px solid #c1a87b;
    background: #f8efdc;
    box-shadow: inset 0 2px 0 #fff9e9, 3px 3px 0 #dcc6a0;
}
:is(#branch-app, #branch-tree-content) .journal-card.locked {
    border-style: dashed;
    background: #ebdfc8;
    box-shadow: none;
}
#app .scene-map { border: 4px solid #715337; box-shadow: 3px 3px 0 #c4ab7e; }
@media (max-width: 600px) {
    #app .tabs .tab::before { margin-right: 6px; width: 7px; height: 9px; }
    #app #nav-adventure::before { width: 6px; height: 6px; }
    #app .panel { padding-left: 16px; padding-right: 16px; }
    #app .main, #branch-app { border-width: 3px; }
    #app .panel-ornament { right: 12px; width: 16px; height: 16px; }
}
