/* Page-specific additions retain the notebook shell and static-list behavior. */
.guide-section { overflow-wrap: anywhere; }
.guide-section h2 { margin-bottom: .75rem; }
.guide-section p { line-height: 1.8; }
.guide-toc ul { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding-left: 1.25rem; }
.guide-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin: 1rem 0; }
.guide-controls label { display: grid; gap: .3rem; font-weight: 600; font-size: .85rem; }
.guide-controls input, .guide-controls select { min-height: 44px; max-width: 100%; border: 1px solid var(--rule-line); border-radius: 6px; background: var(--paper-color); color: var(--text-main); padding: .5rem; font: inherit; }
.guide-controls input { width: 300px; }
.guide-controls button { min-height: 44px; padding: .5rem .8rem; border: 1px solid var(--rule-line); border-radius: 6px; background: transparent; color: var(--text-main); }
.guide-table { table-layout: fixed; width: 100%; }
.guide-table th, .guide-table td { width: auto !important; vertical-align: top; overflow-wrap: anywhere; }
.guide-table th:first-child { width: 28% !important; }
.guide-table th:nth-child(2) { width: 15% !important; }
#pilots .guide-table th:first-child { width: 21% !important; }
#pilots .guide-table th:nth-child(2) { width: 10% !important; }
#pilots .guide-table th:nth-child(3) { width: 15% !important; }
#pilots .guide-table th:nth-child(4) { width: 12% !important; }
#pilots .guide-table th:nth-child(5) { width: 42% !important; }
#recruitment .guide-table th:first-child { width: 18% !important; }
#recruitment .guide-table th:nth-child(2) { width: 10% !important; }
#recruitment .guide-table th:nth-child(3) { width: 14% !important; }
#recruitment .guide-table th:nth-child(4) { width: 58% !important; }
#hidden-items .guide-table th:first-child { width: 24% !important; }
#hidden-items .guide-table th:nth-child(2) { width: 10% !important; }
#hidden-items .guide-table th:nth-child(3) { width: 15% !important; }
#hidden-items .guide-table th:nth-child(4) { width: 51% !important; }
.guide-table th button { min-height: 44px; padding: 3px; font: inherit; font-weight: 600; color: inherit; background: transparent; border: 0; cursor: pointer; }
.guide-table td .field-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.guide-card-fields { display: flex; flex-wrap: wrap; gap: .3rem 1rem; padding: .5rem .7rem; border-top: 1px solid var(--rule-line); font-size: .85rem; line-height: 1.65; }
.guide-mobile-sort { margin: .5rem 0; }
.guide-mobile-sort button { min-height: 44px; margin: .25rem; padding: .4rem; background: transparent; color: var(--text-main); border: 1px solid var(--rule-line); border-radius: 4px; font: inherit; font-size: .8rem; }
.guide-dl { margin: .65rem 0; }
.guide-dl dt { font-weight: 700; color: var(--accent); margin-top: .8rem; }
.guide-dl dd { margin: .25rem 0 0; line-height: 1.85; }
.guide-section li { line-height: 1.85; margin-bottom: .75rem; }
.mission-entry { border-top: 1px solid var(--rule-line); margin-top: 1.3rem; padding-top: 1rem; scroll-margin-top: 1rem; }
.mission-entry h3 { font-size: 1.08rem; color: var(--accent); line-height: 1.5; }
.mission-number { display: inline-block; font-size: .8rem; background: var(--paper-color); border: 1px solid var(--rule-line); padding: .15rem .35rem; border-radius: 4px; margin-right: .35rem; }
@media(max-width:850px) {
 .guide-controls { display: grid; grid-template-columns: minmax(0,1fr); }
 .guide-controls input { width: 100%; box-sizing: border-box; }
 .guide-controls label { min-width: 0; }
 .guide-section .character-card-summary { grid-template-columns: minmax(0,1fr) minmax(55px,28%); }
 .guide-section .character-name-text { white-space: normal; overflow-wrap: anywhere; }
 .guide-section .character-card-value { font-size: .75rem; line-height: 1.5; }
 .guide-card-fields { display: grid; grid-template-columns: minmax(0,1fr); }
 .guide-section h2 { font-size: 1.12rem; }
 .guide-toc ul { display: block; }
 .guide-toc li { margin: .5rem 0; }
}

.guide-jump-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.guide-jump-links a { display: inline-block; border: 1px solid var(--rule-line); border-radius: 4px; padding: .5rem .75rem; line-height: 1.5; }
#skills .guide-table th:first-child { width: 23% !important; }
#skills .guide-table th:nth-child(2) { width: 10% !important; }
#skills .guide-table th:nth-child(3), #abilities .guide-table th:nth-child(3) { width: 45% !important; }
.guide-card-fields > span:empty { display: none; }
