.text-list-form { display: grid; gap: 1.25rem; min-width: 0; }
.list-entry-editor { display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--border, #314047); border-radius: .75rem; min-width: 0; }
.list-detail-stack { display: grid; gap: .65rem; margin-block: .75rem; }
.list-detail-row { display: grid; grid-template-columns: minmax(12rem, 2fr) repeat(2, minmax(6rem, .7fr)) minmax(8rem, 1fr); gap: .75rem; align-items: end; }
.list-detail-row > * { min-width: 0; }
.list-entry-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.list-form-details > summary { cursor: pointer; padding-block: .65rem; font-weight: 600; }
.list-model-group { display: grid; gap: .7rem; padding: 1rem; margin-block: .8rem; border-inline-start: 2px solid var(--accent, #bf9970); background: rgb(255 255 255 / 2%); min-width: 0; }
.list-attachment-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding-block: .8rem; border-bottom: 1px solid var(--border, #314047); }
.list-original-source { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 30rem; overflow: auto; }
.list-detail-row input, .list-detail-row textarea, .list-attachment-editor input, .list-attachment-editor select { width: 100%; }
.text-list-source { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: .9rem; }
.army-sheet { display: grid; gap: 1.8rem; padding: clamp(1rem, 3vw, 2.5rem); border: 1px solid var(--border, #314047); border-radius: 1rem; background: rgb(10 17 23 / 75%); min-width: 0; overflow-wrap: anywhere; }
.army-sheet-heading { border-bottom: 1px solid var(--border, #314047); padding-bottom: 1.5rem; }
.army-sheet-heading h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); margin-block: .3rem .8rem; }
.army-sheet-player { font-size: 1.15rem; }
.army-sheet-budget { margin-block: 1rem; font-size: 1.2rem; }
.army-sheet-detachments { padding-left: 1.2rem; }
.army-sheet-section > h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .8rem; color: var(--accent, #cfaf82); }
.army-sheet-entry { border-block-start: 1px solid var(--border, #314047); padding-block: .9rem; }
.army-sheet-entry summary { cursor: pointer; display: flex; justify-content: space-between; align-items: start; gap: 1rem; list-style: none; }
.army-sheet-entry summary::before { content: '+'; color: var(--accent, #cfaf82); }
.army-sheet-entry[open] summary::before { content: '−'; }
.army-sheet-entry-name { flex: 1; font-size: 1.1rem; font-weight: 650; }
.army-sheet-entry-name small { display: block; margin-top: .25rem; font-size: .8rem; color: var(--accent, #cfaf82); }
.army-sheet-entry-content { padding-top: .6rem; }
.army-sheet-group { padding: .25rem .8rem; margin-block: .65rem; border-inline-start: 2px solid var(--border, #314047); }
.army-sheet-group h4, .army-sheet-equipment h5 { margin-block: .6rem .3rem; }
.army-sheet-group h4 small { font-size: .8rem; font-weight: 400; }
.army-sheet-equipment ul { padding-left: 1.2rem; margin-block: .25rem .8rem; }
.army-sheet-equipment li { margin-block: .2rem; }
.army-sheet-note { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: .5rem; }
.army-sheet-uncertain { color: #edbd78; font-size: .9rem; }
.army-sheet-unresolved { border-top: 1px solid var(--border, #314047); padding-top: 1rem; }
.army-sheet-attachment a { text-decoration: underline; text-underline-offset: .2em; }
.list-reading-page { max-width: 60rem; padding: 1rem; margin: 1rem auto 4rem; }
.list-reading-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; margin-block: 1rem; }
.pdf-list-viewer { min-width: 0; max-width: 100%; }
.pdf-list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-block: 1rem; }
.pdf-list-toolbar input { width: 4.5rem; }
.pdf-list-toolbar label { display: flex; align-items: center; gap: .4rem; }
.pdf-list-toolbar input, .pdf-list-toolbar select { min-height: 44px; padding: .35rem; }
.pdf-list-stage { overflow: auto; max-width: 100%; max-height: 85vh; background: #32363b; border: 1px solid #59616b; }
.pdf-list-stage canvas { display: block; background: white; }
.pdf-print-frame { position: fixed; width: 1px; height: 1px; opacity: 0; border: 0; }
.pdf-print-help { font-size: .85rem; }
.list-public-link { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; padding-block: 1rem; border-top: 1px solid var(--border, #314047); }
.list-public-link > strong { width: 100%; }
.list-public-link > label { flex: 1 1 20rem; min-width: 0; }
.list-public-link input { width: 100%; min-height: 44px; }
.list-preview-url { overflow-wrap: anywhere; }
@media print {
    @page { margin: 15mm; }
    :root { color-scheme: light; }
    body { background: white !important; color: #111 !important; }
    .no-print, .app-rail, .app-topbar, .mobile-topbar, .mobile-nav, .mobile-menu, .mobile-account-sheet, .skip-link, .page-heading:not(.list-version-heading), .back-link, .shared-roster-copy,
    .pdf-list-toolbar, .pdf-list-stage, .pdf-print-frame, .pdf-list-viewer > [role=status] { display: none !important; }
    .app-shell, .app-stage, .app-content, .list-reading-page { display: block !important; padding: 0 !important; margin: 0 !important; width: 100% !important; max-width: none !important; }
    .army-sheet { display: block; background: white; color: #111; border: 0; border-radius: 0; padding: 0; }
    .army-sheet *, .list-version-heading * { color: #111 !important; text-shadow: none !important; }
    .army-sheet-section { margin-block: 1.5rem; }
    .army-sheet-section h3, .army-sheet-uncertain, .army-sheet-entry-name small { color: #333; }
    .army-sheet-entry { break-inside: avoid; border-color: #bbb; }
    .army-sheet-heading, .army-sheet-group, .army-sheet-equipment { break-inside: avoid; }
    .army-sheet h2, .army-sheet h3, .army-sheet h4 { break-after: avoid; }
    .army-sheet-entry-content { display: block !important; }
    .army-sheet-entry summary::before { display: none; }
    .army-sheet a { color: inherit; text-decoration: none; }
    .army-sheet a::after { content: none; }
    .text-list-source { max-height: none; overflow: visible; }
}
@media (max-width: 760px) {
    .list-detail-row, .list-attachment-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .list-detail-row > :first-child { grid-column: 1 / -1; }
    .list-model-group { padding: .65rem; }
}
@media (max-width: 420px) {
    .list-detail-row, .list-attachment-editor { grid-template-columns: minmax(0, 1fr); }
    .list-entry-editor { padding: .7rem; }
}
