.book-casts-page{max-width:100%;color:#342a23}.book-casts-intro,.book-casts-footnote{max-width:72rem;color:#6b5b4b;line-height:1.5}.book-casts-toolbar{display:flex;align-items:end;gap:.75rem;flex-wrap:wrap;margin:1.2rem 0}.book-casts-toolbar label{display:grid;gap:.3rem;min-width:12rem;font-size:.85rem}.book-casts-toolbar input,.book-casts-toolbar select{max-width:100%}.book-casts-month{display:flex;align-items:end;gap:.25rem}.book-casts-month label{min-width:9rem}.book-casts-month button{min-height:2.5rem}.book-casts-toolbar [aria-pressed=true]{background:#684633;color:#fff}.book-casts-sheet{background:#fffaf1;border:1px solid #d8c8ad;box-shadow:0 8px 22px #4e382214;border-radius:8px;overflow:hidden}.book-casts-sheet>header{display:flex;justify-content:space-between;gap:1rem;padding:1.2rem 1.4rem;background:#f3e8d4;border-bottom:2px solid #c9b591}.book-casts-sheet h2{font-family:Georgia,serif;font-size:1.65rem;margin:.25rem 0}.book-casts-sheet header p{margin:.2rem 0}.book-casts-kicker{color:#785b3e;font-size:.78rem;letter-spacing:.08em;text-transform:uppercase}.book-casts-scroll{width:100%;overflow:auto;max-height:min(68vh,850px)}.book-casts-scroll:focus{outline:2px solid #886947;outline-offset:-2px}.book-casts-scroll table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:.88rem}.book-casts-scroll th,.book-casts-scroll td{border-right:1px solid #e4d8c3;border-bottom:1px solid #e9dec9;padding:.6rem .75rem;text-align:left;vertical-align:top;min-width:8rem;line-height:1.45}.book-casts-scroll thead th{position:sticky;top:0;z-index:3;background:#eadbc0;border-bottom:2px solid #c5ad86;white-space:nowrap}.book-casts-scroll tbody tr:nth-child(even){background:#fcf6e9}.book-casts-scroll tbody tr:hover{background:#f6e9cf}.book-casts-scroll th:first-child{position:sticky;left:0;z-index:2;background:#f6ecd9;min-width:13rem;max-width:19rem}.book-casts-scroll thead th:first-child{z-index:5;background:#eadbc0}.book-casts-scroll th:nth-child(2),.book-casts-scroll td:nth-child(2){position:sticky;left:13rem;z-index:2;background:#fffaf1;min-width:17rem;max-width:24rem}.book-casts-scroll thead th:nth-child(2){z-index:5;background:#eadbc0}.book-casts-scroll tbody tr:nth-child(even) td:nth-child(2){background:#fcf6e9}.book-casts-scroll thead th button{display:grid;gap:.15rem;text-align:left;color:inherit;font-weight:700}.book-casts-scroll thead th small{display:block;font-weight:400;white-space:normal}.book-casts-role span{font-weight:700}.book-casts-role small{display:block;font-weight:400;color:#6e5b48;white-space:normal}.book-casts-role button{display:block;margin-top:.35rem;font-size:.72rem}.book-casts-performers button{padding:0;border:0;background:none;text-decoration:underline;text-align:left;color:#59422b}.book-casts-separator,.book-casts-muted,.book-casts-empty{color:#8b7c69}.book-casts-scroll td [data-event]{white-space:normal;text-align:left;font-size:.82rem;min-width:8rem}.book-casts-no-dates{padding:.75rem 1.25rem;margin:0;color:#735f48}.book-casts-queue{margin-top:1.4rem;padding:1rem;background:#fffaf1;border:1px solid #d8c8ad;border-radius:8px}.book-casts-queue-head{display:flex;align-items:baseline;gap:1rem;flex-wrap:wrap}.book-casts-queue-head h2{margin:0;font-family:Georgia,serif}.book-casts-queue .segmented{margin:.8rem 0}.book-casts-review{display:grid;gap:.2rem;width:100%;padding:.75rem;text-align:left;border-bottom:1px solid #e7dac3}.book-casts-review:hover{background:#f4ead7}.book-casts-review small{color:#766653}.book-casts-review-dialog textarea{width:100%;min-height:6rem}.book-casts-review-dialog form{display:grid;gap:.7rem}.book-casts-error{padding:.7rem;background:#fff1e8}
@media(max-width:700px){.book-casts-toolbar{display:grid;grid-template-columns:1fr 1fr}.book-casts-toolbar label{min-width:0}.book-casts-toolbar>label:first-child,.book-casts-toolbar>label:nth-child(2){grid-column:1/-1}.book-casts-sheet>header{display:block}.book-casts-scroll th:first-child{min-width:10rem;max-width:10rem}.book-casts-scroll th:nth-child(2),.book-casts-scroll td:nth-child(2){left:10rem;min-width:13rem;max-width:13rem}.book-casts-scroll th,.book-casts-scroll td{padding:.5rem}.book-casts-scroll{max-height:70vh}}
.book-casts-role .book-casts-role-link{display:inline;padding:0;margin:0;border:0;background:none;color:inherit;text-align:left;font:inherit;font-weight:700;text-decoration:underline;text-decoration-color:#af9476;text-underline-offset:3px}.book-casts-role details{margin-top:.25rem;font-weight:400}.book-casts-role summary{cursor:pointer;color:#78634a;font-size:.75rem}.book-casts-role [data-book-row-reviews]{color:#8a3d22;border-color:#d7ae9b;background:#fff2e8;font-weight:700}.book-casts-staff-heading th{position:static!important;background:#eadbc0!important;text-transform:uppercase;letter-spacing:.06em;font-size:.74rem}
.book-casts-role .book-casts-unlinked{display:inline-block;margin-top:.3rem;padding:.1rem .4rem;border:1px solid #d7ae9b;border-radius:3px;background:#fff2e8;color:#8a3d22;font-size:.7rem;font-weight:700}
.book-casts-source-only{margin-top:1rem;padding:.75rem 1rem;background:#fff8ed;border:1px solid #dac6a9;border-radius:8px}.book-casts-source-only summary{cursor:pointer;font-weight:700;color:#664b34}.book-casts-source-only>p{color:#6b5b4b;line-height:1.4;margin:.65rem 0}.book-casts-source-only-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,17rem),1fr));gap:.35rem .8rem}.book-casts-source-only-list>div{padding:.45rem .6rem;border-top:1px solid #e7d8be}.book-casts-source-only-list button{display:block;padding:0;text-align:left;border:0;background:none;color:#5b412b;text-decoration:underline;text-underline-offset:2px}.book-casts-source-only-list small{display:block;color:#786856;line-height:1.35;margin-top:.2rem}
.book-casts-scroll{--book-role-width:13rem}.book-casts-scroll th:first-child{width:var(--book-role-width);min-width:var(--book-role-width);max-width:var(--book-role-width)}.book-casts-scroll th:nth-child(2),.book-casts-scroll td:nth-child(2){left:var(--book-role-width)}.book-casts-scroll th:first-child,.book-casts-scroll th:nth-child(2),.book-casts-scroll td:nth-child(2){box-sizing:border-box}
@media(max-width:700px){.book-casts-scroll{--book-role-width:10rem}}
@media print{.book-casts-role .book-casts-role-link{display:inline!important;text-decoration:none}.book-casts-scroll th:first-child{width:auto;min-width:0;max-width:none}}
@media print{.book-casts-toolbar,.book-casts-queue,.book-casts-source-only,.book-casts-footnote,.book-casts-role button{display:none!important}.book-casts-sheet{box-shadow:none;border:0}.book-casts-scroll{overflow:visible;max-height:none}.book-casts-scroll table{width:100%;font-size:9pt}.book-casts-scroll th,.book-casts-scroll td{position:static!important;min-width:0!important;max-width:none!important}.book-casts-sheet>header{padding:.4rem}.book-casts-intro{font-size:9pt}}

.book-casts-visual{margin:1rem 0;padding:1rem;background:var(--surface,#fff);border:1px solid var(--border,#ddd);border-radius:12px}.book-casts-visual summary{cursor:pointer;font-weight:600}.book-casts-visual section+section{margin-top:1.5rem}.book-casts-visual small,.book-casts-supplement{display:block;font-size:.8rem;line-height:1.4;margin-top:.4rem;color:var(--muted,#626974)}
.book-casts-counters{padding:.85rem 1.4rem;background:#fff8e9;border-bottom:1px solid #d8c8ad}.book-casts-counters-head{display:flex;align-items:baseline;gap:.5rem 1.5rem;flex-wrap:wrap}.book-casts-counters h3{font:700 1.1rem Georgia,serif;margin:0}.book-casts-counters-head span{font-size:.85rem;font-weight:700;color:#674b30}.book-casts-counters p{margin:.35rem 0 .65rem;color:#695847;font-size:.8rem;line-height:1.4}.book-casts-counter-list{display:flex;gap:.4rem;flex-wrap:wrap}.book-casts-counter-entry{display:flex;align-items:baseline;gap:.45rem .8rem;flex-wrap:wrap;padding:.4rem .65rem;border:1px solid #d8c8ad;border-radius:4px;background:#fffdf6}.book-casts-counter-entry time{font-size:.82rem;color:#5f4b37}.book-casts-counter-pair strong,.book-casts-counter-raw,.book-casts-counter-empty{font-size:1rem;font-weight:700}.book-casts-counter-pair small,.book-casts-visual-counter small{display:block;color:#765c45;font-size:.72rem}.book-casts-counter-entry button{font-size:.75rem}.book-casts-visual-counter{display:block;margin-top:.4rem;padding-top:.35rem;border-top:1px solid #c9b591;white-space:normal}.book-casts-visual-counter strong,.book-casts-visual-counter .book-casts-counter-raw{display:block}.book-casts-visual-counter small{margin:.15rem 0}
@media(max-width:700px){.book-casts-counters{padding:.75rem}.book-casts-counter-entry{flex:1 1 10rem}.book-casts-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.book-casts-month{grid-column:1/-1;display:grid;grid-template-columns:2.5rem minmax(0,1fr) 2.5rem;align-items:end}.book-casts-month label{width:100%;min-width:0}.book-casts-month input{box-sizing:border-box;width:100%;min-width:0}}
@media print{.book-casts-counters{break-inside:avoid;padding:.4rem 0;background:#fff}.book-casts-counter-entry{break-inside:avoid}.book-casts-counter-entry button{display:none!important}.book-casts-visual[open] .book-casts-scroll{overflow:visible;max-height:none}}

/* Permanent roles are primary; dated paper evidence keeps its own archive. */
.book-casts-calculated{display:grid;grid-template-columns:minmax(15rem,2fr) minmax(8rem,.8fr) minmax(10rem,1fr);gap:0;min-width:0;padding:.9rem 1.1rem;border-bottom:1px solid #d8c8ad;background:#fffaf1;color:#493724}
.book-casts-calculated-title,.book-casts-calculated-month,.book-casts-calculated-total{padding:.15rem 1rem;border-right:1px solid #dfcfb2}
.book-casts-calculated-title{padding-left:.25rem}.book-casts-calculated h3{display:inline;font:700 1.25rem Georgia,serif;margin:0}.book-casts-calculated-title>span{display:inline-block;margin-left:.6rem;padding:.17rem .55rem;border-radius:2rem;background:#f4e5bc;color:#805812;font-size:.73rem;font-weight:700}.book-casts-calculated-title p{margin:.3rem 0 0;color:#705e4b;font-size:.76rem;line-height:1.35}
.book-casts-calculated-month,.book-casts-calculated-total{display:grid;gap:.1rem;align-content:start;min-width:0;font-size:.78rem;color:#705e4b}.book-casts-calculated-month input{box-sizing:border-box;width:100%;max-width:9.5rem;min-height:1.8rem;padding:.1rem .25rem;background:#fffdf8}.book-casts-calculated-month strong,.book-casts-calculated-total strong{font:700 1.55rem Georgia,serif;color:#493724}.book-casts-calculated-total{border-right:0}.book-casts-calculated-total small{line-height:1.3;overflow-wrap:anywhere}
.book-casts-calculated-total button{justify-self:start;margin-top:.2rem;padding:.2rem .35rem;font-size:.72rem}
.book-casts-calculated-period{grid-column:1/-1;margin:.65rem .25rem 0;color:#705e4b;font-size:.76rem}.book-casts-calculated-period summary{cursor:pointer;width:max-content;max-width:100%}.book-casts-calculated-period p{margin:.35rem 0 0;line-height:1.35}
@media(max-width:700px){.book-casts-calculated{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:.7rem}.book-casts-calculated-title{grid-column:1/-1;border-right:0;border-bottom:1px solid #dfcfb2;padding:.15rem .25rem .6rem}.book-casts-calculated-month,.book-casts-calculated-total{padding:.6rem .4rem 0}.book-casts-calculated-period{margin-top:.6rem}}
@media print{.book-casts-calculated{break-inside:avoid;background:#fff}.book-casts-calculated-period{display:none}.book-casts-calculated-month input{border:0}}
.book-casts-source-archive{margin-top:16px;border:1px solid #d8c8ad;border-radius:8px;padding:12px;background:#fffaf1;min-width:0}
.book-casts-calculated-forecast{grid-column:1/-1;margin:.45rem .25rem 0;color:#705e4b;font-size:.76rem}.book-casts-calculated-forecast summary{cursor:pointer;width:max-content;max-width:100%;font-weight:700}.book-casts-calculated-forecast p{margin:.35rem 0;line-height:1.4}.book-casts-calculated-forecast ol{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,13rem),1fr));gap:.35rem .6rem;max-height:13rem;overflow:auto;margin:.4rem 0 0;padding:0;list-style:none}.book-casts-calculated-forecast li{display:flex;align-items:baseline;gap:.35rem;flex-wrap:wrap;padding:.32rem .48rem;border:1px solid #e5d8bf;border-radius:4px;background:#fffdf7}.book-casts-calculated-forecast li strong{color:#493724}.book-casts-calculated-forecast li small{margin-left:auto;font-size:.7rem}
.book-casts-source-archive>summary{cursor:pointer;font-weight:600;min-height:36px}
.book-casts-source-archive>label{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0;font-size:13px}
.book-casts-source-archive input{max-width:100%;min-width:0}
.book-casts-sheet>.actions{padding:12px 16px;border-top:1px solid #d8c8ad}
@media(max-width:700px){.book-casts-source-archive{padding:10px}.book-casts-sheet>.actions button{white-space:normal;min-width:0;max-width:100%}.book-casts-calculated-forecast{margin-top:.65rem}.book-casts-calculated-forecast ol{grid-template-columns:1fr}}
@media print{.book-casts-calculated-forecast{display:none}}

/* Exact show navigation; keeps the dated card separate from admission rows. */
.book-casts-show-picker{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:0 0 16px;min-width:0}
.book-casts-show-picker label{display:grid;gap:6px;min-width:0;max-width:100%;flex:0 1 34rem;font-size:.85rem}
.book-casts-show-picker select{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:44px}
.book-casts-show-picker button{min-height:44px;max-width:100%}
@media(max-width:700px){.book-casts-show-picker{display:grid;grid-template-columns:minmax(0,1fr)}.book-casts-show-picker label{width:100%}.book-casts-show-picker button{justify-self:start}}
@media print{.book-casts-show-picker{display:none!important}}

/* Compact accounting summary; book evidence and dated selection remain separate. */
.book-casts-summary{grid-template-columns:minmax(5rem,.65fr) minmax(11rem,1.1fr) minmax(13rem,1.5fr);padding:.65rem 1rem;gap:.25rem 0}
.book-casts-summary .book-casts-calculated-total,.book-casts-summary .book-casts-calculated-month{padding:.15rem .8rem;border-right:1px solid #dfcfb2;align-content:start;gap:.25rem}
.book-casts-summary .book-casts-calculated-total{padding-left:0}
.book-casts-summary .book-casts-calculated-month{grid-template-columns:minmax(0,10rem) auto;align-items:center;justify-content:start;column-gap:.7rem}
.book-casts-summary .book-casts-calculated-month input{grid-column:1;grid-row:2;min-height:44px;max-width:10rem}
.book-casts-summary .book-casts-calculated-month strong{grid-column:2;grid-row:2}
.book-casts-summary-last{display:grid;align-content:start;gap:.4rem;min-width:0;padding:.15rem 0 .15rem .8rem;font-size:.78rem;color:#705e4b;overflow-wrap:anywhere}
.book-casts-summary-last time{font-size:1rem;font-weight:600;color:#493724}
.book-casts-summary-basis{grid-column:1/-1;min-width:0;font-size:.78rem;color:#705e4b}
.book-casts-summary-basis>summary,.book-casts-admission-details>summary{display:flex;align-items:center;gap:.4rem;min-height:44px;cursor:pointer;list-style:none}
.book-casts-summary-basis>summary::before,.book-casts-admission-details>summary::before{content:'›';font-size:1.2rem;line-height:1;transition:transform .15s}
.book-casts-summary-basis[open]>summary::before,.book-casts-admission-details[open]>summary::before{transform:rotate(90deg)}
.book-casts-summary-basis p{margin:.3rem 0;line-height:1.4;max-width:70rem}
.book-casts-summary-basis button{min-height:44px;margin-top:.35rem}
.book-casts-admission-details>summary{font-size:.78rem;color:#705e4b;white-space:normal}
.book-casts-admission-details>small{display:block;margin:.15rem 0;color:#705e4b}
.book-casts-summary-basis>summary:focus-visible,.book-casts-admission-details>summary:focus-visible{outline:2px solid #886947;outline-offset:2px;border-radius:3px}
@media(max-width:700px){.book-casts-summary{grid-template-columns:minmax(4rem,.6fr) minmax(0,1.6fr);padding:.6rem .7rem}.book-casts-summary .book-casts-calculated-month{border-right:0;padding-right:0}.book-casts-summary-last{grid-column:1/-1;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:baseline;padding:.55rem 0 .2rem;border-top:1px solid #dfcfb2;margin-top:.3rem;gap:.5rem}.book-casts-summary-last time{font-size:.9rem}.book-casts-summary .book-casts-calculated-month input{max-width:100%;width:100%}}
@media print{.book-casts-summary-basis{display:none}.book-casts-summary .book-casts-calculated-month input{min-height:0}}

/* Familiar book grid: role, admission, one separate column per exact show. */
.book-casts-period{display:flex;align-items:end;gap:6px;min-width:0}
.book-casts-period label{flex:1;min-width:0;max-width:12rem}
.book-casts-period input{box-sizing:border-box;width:100%;min-width:0;min-height:44px}
.book-casts-period button{min-width:44px;min-height:44px}
.book-casts-show-picker>[data-book-archive]{margin-right:auto}
.book-casts-matrix-note{padding:.6rem 1rem;margin:0;font-size:.8rem;color:#6b5b4b;border-bottom:1px solid #d8c8ad}
.book-casts-matrix{--book-role-width:12rem}
.book-casts-matrix th:nth-child(2),.book-casts-matrix td:nth-child(2){min-width:13rem;max-width:16rem}
.book-casts-matrix th:nth-child(n+3),.book-casts-matrix td:nth-child(n+3){min-width:10rem;max-width:14rem;white-space:normal;overflow-wrap:anywhere}
.book-casts-matrix th [data-book-matrix-event]{min-height:44px;width:100%;border:0;background:transparent;white-space:normal;cursor:pointer;padding:0;line-height:1.4}
.book-casts-matrix .book-casts-dated>span{display:block;margin-bottom:.4rem}
.book-casts-matrix .book-casts-dated small{display:block;font-size:.72rem;color:#766653}
.book-casts-accounting-month{font-weight:600;grid-column:1;grid-row:2;min-height:44px;display:flex;align-items:center}
@media(max-width:700px){
 .book-casts-show-picker{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
 .book-casts-show-picker>.book-casts-period,.book-casts-show-picker>label{grid-column:1/-1}
 .book-casts-show-picker button{justify-self:stretch;white-space:normal}
 .book-casts-period label{max-width:none}
 .book-casts-matrix{--book-role-width:7rem}
 .book-casts-matrix th:nth-child(2),.book-casts-matrix td:nth-child(2){position:static;min-width:10rem;max-width:12rem}
 .book-casts-matrix thead th:nth-child(2){position:sticky;top:0;left:auto;z-index:1}
 .book-casts-matrix th:first-child{overflow-wrap:anywhere}
}
@media print{.book-casts-matrix-note{font-size:8pt}.book-casts-matrix th:nth-child(n),.book-casts-matrix td:nth-child(n){min-width:0;max-width:none}.book-casts-accounting-month{min-height:0}}
.book-casts-page .book-casts-toolbar{margin:.65rem 0;gap:8px}
.book-casts-page .book-casts-sheet>header{padding:.7rem .9rem;align-items:center}
.book-casts-page .book-casts-sheet h2{font-size:1.35rem;line-height:1.25}
.book-casts-page .book-casts-sheet>header .actions{gap:6px}
.book-casts-page .book-casts-sheet>header .actions button{min-height:44px;font-size:.8rem}
@media(max-width:700px){
 .book-casts-show-picker>label{grid-column:1;align-self:start}
 .book-casts-show-picker>[data-book-open-event]{align-self:end;min-width:0}
 .book-casts-show-picker label[for="book-casts-show-date"]{font-size:.8rem}
 .book-casts-show-picker select{font-size:.8rem}
 .book-casts-show-picker{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);margin-bottom:8px}
 .book-casts-show-picker button{padding:8px;font-size:.8rem}
 .book-casts-page .book-casts-sheet>header{padding:.65rem}
 .book-casts-page .book-casts-sheet h2{font-size:1.2rem}
 .book-casts-page .book-casts-sheet>header .actions{margin-top:8px;display:flex;flex-wrap:wrap}
 .book-casts-page .book-casts-sheet>header .actions button{flex:1 1 8rem;white-space:normal}
 .book-casts-page .book-casts-sheet>.section{margin:0;padding:.25rem .65rem}
}

.book-casts-matrix thead th:first-child{white-space:normal;overflow-wrap:anywhere}

/* Clear, compact book actions: the task is visible before the data entry starts. */
#book-add-performer-form,#catalogue-role-form{display:grid;gap:.8rem;max-width:42rem}
.book-form-lead{margin:0;color:#705e4b;line-height:1.55}
.book-form-section{border:1px solid #e4d8c3;border-radius:9px;padding:14px 15px;margin:0;background:#fffdf8}
.book-form-section>legend{padding:0 6px 0 0;font-weight:700;color:#493724}
.book-form-section>label{display:grid;gap:7px;margin:0}
.book-form-section .small{margin:.4rem 0 0;line-height:1.5}
.book-role-kind-grid{display:grid;gap:8px;margin-top:14px}
.book-role-kind-label{font-size:.8rem;color:#705e4b}
.book-role-kind-option{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:9px;padding:10px 12px;border:1px solid #d8c8ad;border-radius:8px;background:#fffaf1;cursor:pointer}
.book-role-kind-option input{width:17px!important;min-width:17px;margin-top:3px;accent-color:#704d2c}
.book-role-kind-option span{display:grid;gap:3px}
.book-role-kind-option strong{font-size:.92rem;color:#493724}
.book-role-kind-option small{font-size:.78rem;line-height:1.45;color:#705e4b}
.book-role-kind-option:has(input:checked){border-color:#886947;background:#f7eedf;box-shadow:0 0 0 2px #88694722}
#book-add-performer-form .actions,#catalogue-role-form .actions{border-top:1px solid #e4d8c3;padding-top:14px;margin-top:.1rem}
@media(max-width:700px){#book-add-performer-form,#catalogue-role-form{max-width:none}.book-form-section{padding:12px}.book-role-kind-option{padding:10px}}

/* Catalogue and compact card; only established participant IDs supply portraits. */
.book-casts-catalogue-search{display:grid;gap:6px;max-width:32rem;margin:12px 0}
.book-casts-catalogue{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,17rem),1fr));gap:10px}
.book-casts-catalogue-card{display:grid;gap:6px;text-align:left;padding:16px;min-height:80px;white-space:normal;background:#fffaf1;border:1px solid #d8c8ad;border-radius:8px}
.book-casts-catalogue-card strong{font:600 1.15rem Georgia,serif}.book-casts-catalogue-card span{font-size:.8rem;color:#705e4b}
.book-casts-sheet>.book-casts-show-picker{padding:.6rem .9rem;margin:0;border-bottom:1px solid #d8c8ad}
.book-casts-person{display:inline-flex!important;align-items:center;gap:7px;text-align:left;white-space:normal;max-width:100%;border:0;background:transparent;padding:3px 0;font:inherit}
.book-casts-performer-chip{display:inline-flex;align-items:center;gap:.25rem;min-width:0;max-width:100%;vertical-align:middle}
.book-casts-performer-remove{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;min-width:24px;min-height:24px;margin-left:.45rem;padding:0;border:1px solid #c9a98a;border-radius:50%;background:#fff7ed;color:#8a3d22;cursor:pointer;transition:background-color .14s ease,border-color .14s ease,transform .14s ease}
.book-casts-performer-remove:hover,.book-casts-performer-remove:focus-visible{background:#f9dfd3;border-color:#a9513e;transform:scale(1.06)}
.book-casts-performer-remove .ui-icon{width:13px;height:13px;stroke-width:1.9}
.book-casts-performer-remove[data-tooltip]::after{content:attr(data-tooltip);position:absolute;left:50%;bottom:calc(100% + 7px);z-index:20;width:max-content;max-width:12rem;padding:.35rem .5rem;border:1px solid #d8c8ad;border-radius:5px;background:#fffaf1;color:#493724;font:400 .7rem/1.25 system-ui,sans-serif;white-space:normal;opacity:0;visibility:hidden;transform:translate(-50%,2px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease;pointer-events:none}
.book-casts-performer-remove[data-tooltip]:hover::after,.book-casts-performer-remove[data-tooltip]:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0)}
.book-casts-remove-warning{display:grid;grid-template-columns:32px minmax(0,1fr);gap:.65rem;align-items:start;margin:0 0 .8rem;padding:.7rem .75rem;border:1px solid #d7b48f;border-radius:8px;background:#fff3e5;color:#684633}
.book-casts-remove-warning-icon{display:grid;place-items:center;width:30px;height:30px;border:1px solid #c18b58;border-radius:50%;color:#9a5e2d}
.book-casts-remove-warning-icon .ui-icon{width:16px;height:16px}
.book-casts-remove-warning strong{display:block;font-size:.9rem;line-height:1.3}
.book-casts-remove-warning p{margin:.2rem 0 0;color:#705e4b;font-size:.78rem;line-height:1.4}
#book-performer-remove-form{display:grid;gap:.65rem;max-width:36rem}
#book-performer-remove-form .book-casts-remove-summary{margin:.05rem 0}
#book-performer-remove-form .actions{margin-top:.15rem}
.book-casts-remove-lead{margin:0 0 .8rem;color:#705e4b;line-height:1.45}
.book-casts-remove-summary{display:grid;gap:.45rem;margin:.8rem 0;padding:.7rem .8rem;border:1px solid #e4d8c3;border-radius:6px;background:#fffaf1}
.book-casts-remove-summary div{display:grid;grid-template-columns:7rem minmax(0,1fr);gap:.6rem;min-width:0}
.book-casts-remove-summary dt{color:#8b7c69;font-size:.76rem}
.book-casts-remove-summary dd{margin:0;min-width:0;overflow-wrap:anywhere;font-weight:600;color:#493724}
@media(prefers-reduced-motion:reduce){.book-casts-performer-remove,.book-casts-performer-remove[data-tooltip]::after{transition:none}}
.book-casts-role-order{display:grid;gap:.3rem;margin:.55rem 0 0;padding:.5rem 0 0;border-top:1px solid #e1d4bd;line-height:1.4}
.book-casts-role-order small{color:#705e4b}
.book-casts-role-order button{justify-self:start;min-height:36px}
.book-casts-order-list{display:grid;gap:.4rem;padding-left:1.7rem}
.book-casts-order-list li{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}
.book-casts-order-index{flex:0 0 1.35rem;color:#8b6c46;font-size:.82rem;text-align:center}
.book-casts-new-person{margin:.5rem 0}.book-casts-new-person>summary{cursor:pointer;color:#705e4b;font-size:.8rem;min-height:36px;display:flex;align-items:center}.book-casts-new-person[open]{display:grid;gap:.35rem}.book-casts-new-person .small{margin:0}
.book-casts-order-list li span{flex:1 1 12rem}
.book-casts-order-list button{min-width:40px;min-height:40px}
#book-role-form{display:grid;gap:.8rem;max-width:38rem}
#book-role-form label{display:grid;gap:.3rem}
#book-role-form .book-casts-admit{display:flex;align-items:start;gap:.5rem}
#book-role-form select,#book-role-form textarea{box-sizing:border-box;width:100%}
#book-role-form textarea{min-height:5rem}
.book-casts-person .actor-portrait{flex:0 0 30px;width:30px;height:36px;margin:0;border-radius:4px;overflow:hidden;position:relative;display:grid;place-items:center;background:#ede4d5}
.book-casts-person .actor-portrait img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.book-casts-person .actor-portrait>span{font-size:.65rem}
.book-casts-person .actor-portrait.is-portrait-fallback{gap:0}.book-casts-person .actor-portrait.is-portrait-fallback::after{display:none}
.book-casts-performers .book-casts-separator,.book-casts-dated .book-casts-separator{display:block;font-size:0;height:2px}
.book-casts-count-edit{display:inline-flex;align-items:center;justify-self:start;gap:6px;padding:2px 4px!important;min-height:32px;border:1px solid #d8c8ad;background:#fffdf8;color:inherit;grid-row:2;grid-column:1}
.book-casts-count-edit svg{width:14px;height:14px}.book-casts-count-edit strong{font:700 1.4rem Georgia,serif}
.book-casts-history{display:grid;gap:12px;min-width:0}.book-casts-history details{min-width:0}.book-casts-history details>div{padding:8px 0;border-top:1px solid #d8c8ad}.book-casts-history .book-casts-person{margin-left:10px}
.book-casts-card-actions{position:relative;flex:0 0 auto}.book-casts-card-actions>summary{cursor:pointer;padding:10px 12px;border:1px solid #bda47e;border-radius:6px;font-size:.85rem;list-style:none}
.book-casts-card-actions[open]>.actions{position:absolute;right:0;top:100%;z-index:5;width:min(24rem,70vw);display:grid!important;margin:4px 0 0!important;padding:8px;background:#fffaf1;border:1px solid #d8c8ad;border-radius:6px;box-shadow:0 4px 14px #49372420}
.book-casts-show-picker>.select-search-field{flex:1 1 18rem;min-width:0;max-width:24rem}.book-casts-show-picker>.select-search-field label{font-size:.8rem;margin-bottom:6px}
.book-casts-period label{max-width:10rem}
@media(max-width:700px){.book-casts-page .book-casts-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:6px}.book-casts-toolbar>label{grid-column:1/-1!important}.book-casts-toolbar>[data-book-catalogue]{grid-column:1}.book-casts-toolbar>[data-book-inquiries]{grid-column:2;grid-row:1}.book-casts-page .book-casts-sheet>header{display:flex;align-items:center;gap:8px}.book-casts-card-actions[open]>.actions{width:min(20rem,80vw)}.book-casts-card-actions>summary{padding:8px}.book-casts-show-picker>.select-search-field{grid-column:1;max-width:none}.book-casts-show-picker>.select-search-field label{font-size:.8rem}.book-casts-period label{max-width:none}}
@media(max-width:700px){.book-casts-catalogue{gap:8px}.book-casts-catalogue-card{padding:12px}.book-casts-sheet>.book-casts-show-picker{padding:8px}.book-casts-person{gap:5px}.book-casts-person .actor-portrait{flex-basis:26px;width:26px;height:32px}}
@media print{.book-casts-count-edit svg{display:none!important}.book-casts-count-edit{border:0;padding:0!important}.book-casts-person .actor-portrait{display:none}.book-casts-sheet>.book-casts-show-picker{display:none}}

/* R2: keep the required accounting summary above the dated matrix. */
.book-casts-summary{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.5fr);align-items:start;padding:.5rem .9rem;gap:0}
.book-casts-summary .book-casts-calculated-total,.book-casts-summary .book-casts-calculated-month,.book-casts-summary .book-casts-summary-last{display:grid;grid-template-rows:minmax(2.4em,auto) auto;align-content:start;align-items:baseline;gap:3px 8px;padding:.1rem .75rem;min-width:0}
.book-casts-summary .book-casts-calculated-total{padding-left:0}
.book-casts-summary .book-casts-calculated-total>span,.book-casts-summary-label,.book-casts-summary-last>span:first-child{grid-column:1/-1;grid-row:1;line-height:1.2}
.book-casts-summary .book-casts-calculated-total strong,.book-casts-summary .book-casts-calculated-month strong{grid-column:1;grid-row:2;font-size:1.4rem;line-height:1.2}
.book-casts-summary .book-casts-calculated-month{grid-template-columns:auto minmax(0,1fr)}
.book-casts-summary .book-casts-accounting-month{grid-column:2;grid-row:2;min-height:0;display:block;align-self:baseline;font-size:.78rem;overflow-wrap:anywhere}
.book-casts-summary .book-casts-summary-last{grid-template-columns:minmax(0,1fr);margin:0;border:0}
.book-casts-summary-last time,.book-casts-summary-last>span:last-child{grid-column:1;grid-row:2;line-height:1.5}
.book-casts-summary-basis{margin-top:2px}
@media(max-width:700px){
 .book-casts-summary{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:.4rem .65rem}
 .book-casts-summary .book-casts-calculated-month{padding-right:0}
 .book-casts-summary .book-casts-summary-last{grid-column:1/-1;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto;align-items:baseline;border-top:1px solid #dfcfb2;margin-top:6px;padding:6px 0 0}
 .book-casts-summary .book-casts-summary-last>span:first-child{grid-column:1;grid-row:1}
 .book-casts-summary .book-casts-summary-last time,.book-casts-summary .book-casts-summary-last>span:last-child{grid-column:2;grid-row:1}
}

@media print{
 .book-casts-knowledge-status{display:none!important}
 .book-casts-sheet>.book-casts-source-only{display:block!important;background:#fff;border:0;padding:.4rem 0;break-inside:avoid}
 .book-casts-sheet>.book-casts-source-only .book-casts-source-only-list button{display:inline!important;color:#000;text-decoration:none;border:0;background:none;padding:0;font:inherit}
 .book-casts-sheet>.section>button{display:none!important}
}

/* Filled book: keep uncertain admission separate from the recorded name. */
@media screen {
 body[data-viewer=staff] #main .book-casts-performers>small { display:block; margin-top:5px; font-size:13px; line-height:1.45; }
 body[data-viewer=staff] #main .book-casts-role-order small { font-size:13px; line-height:1.45; }
}
@media screen and (max-width:600px) {
 body[data-viewer=staff] #main .book-casts-sheet>header { flex-wrap:wrap; align-items:flex-start; }
 body[data-viewer=staff] #main .book-casts-sheet>header>div:first-child { flex:1 1 100%; min-width:0; }
 body[data-viewer=staff] #main .book-casts-sheet>header h2 { font-size:22px; line-height:1.3; }
}
.book-casts-staff{padding:1rem 1.3rem;border-top:2px solid #d8c8ad;background:#fffaf1}
.book-casts-staff h3{margin:0 0 .75rem;font-family:Georgia,serif}
.book-casts-staff-group{margin:.7rem 0}
.book-casts-staff-group h4{margin:0 0 .4rem;color:#684633}
.book-casts-staff-group ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));gap:.5rem}
.book-casts-staff-group li{padding:.6rem;border:1px solid #e4d8c3;border-radius:4px}
.book-casts-staff-sources{display:grid;gap:.15rem;margin-top:.25rem;color:#705e4b}
.book-casts-staff-sources a{color:#684633}

/* Catalogue first: actor links are an explicit secondary view, not a second catalogue. */
.book-casts-catalogue-toolbar{display:flex;align-items:end;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:.75rem 0 1rem}
.book-casts-catalogue-toolbar .book-casts-catalogue-search{margin:0;flex:1 1 18rem}
.book-casts-catalogue-summary{display:flex;align-items:baseline;gap:.4rem;color:#705e4b;font-size:.8rem;white-space:nowrap}
.book-casts-catalogue-summary strong{font:700 1.25rem Georgia,serif;color:#493724}
.book-casts-summary-divider{color:#b39a78;margin:0 .2rem}
.book-casts-catalogue-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.6rem}
.book-casts-catalogue-card-head strong{min-width:0}
.book-casts-source-chip{display:block;color:#705e4b;font-size:.76rem;line-height:1.35}
.book-casts-status{display:inline-flex;align-items:center;gap:.25rem;width:max-content;max-width:100%;padding:.2rem .5rem;border-radius:999px;font-size:.72rem;font-weight:700;line-height:1.2;white-space:normal}
.book-casts-status.is-ready{background:#e9f2e7;color:#315d39}
.book-casts-status.is-review{background:#fff0e6;color:#8a3d22}
.book-casts-directory-panel{margin:0 0 1rem;padding:.9rem 1rem;background:#fffaf1;border:1px solid #d8c8ad;border-radius:8px}
.book-casts-directory-panel[role=status]{display:flex;align-items:center;gap:.7rem}
.book-casts-directory-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.book-casts-directory-head h2{margin:.1rem 0;font:700 1.25rem Georgia,serif}
.book-casts-directory-head p{margin:.2rem 0;max-width:52rem}
.book-casts-directory-panel .book-casts-catalogue-search{margin:.7rem 0}
.book-casts-directory-panel .book-casts-staff{margin:0;padding:.75rem 0;border-top:1px solid #d8c8ad;background:transparent}
.book-casts-directory-panel .book-casts-staff:first-of-type{border-top:0}
.book-casts-directory-panel .book-casts-staff>summary{min-height:44px;display:flex;align-items:center}
.book-casts-person,.book-casts-source-only-list button,.book-casts-role-order button,.book-casts-card-actions>summary,.book-casts-review{min-height:44px}
.book-casts-review{box-sizing:border-box}
.book-casts-card-actions>summary{display:flex;align-items:center}
.book-casts-performers>.book-casts-status{display:flex;margin-top:.35rem}
.book-casts-unlinked{display:block;margin-top:.25rem;color:#8a3d22;font-size:.72rem}
.book-casts-tools{display:inline-block;position:relative}
.book-casts-tools>summary{cursor:pointer;display:inline-flex;align-items:center;min-height:44px;padding:.45rem .7rem;border:1px solid #bda47e;border-radius:6px;background:#fffaf1;font-size:.85rem}
.book-casts-tools[open]>.actions{position:absolute;right:0;top:100%;z-index:6;display:grid;gap:.3rem;width:min(20rem,80vw);margin:.25rem 0 0;padding:.5rem;background:#fffaf1;border:1px solid #d8c8ad;border-radius:6px;box-shadow:0 4px 14px #49372420}
.book-casts-tools .actions details{display:grid;gap:.25rem}
.book-casts-tools .actions details>summary{cursor:pointer;padding:.45rem .3rem}
.book-casts-tools .actions button{width:100%;text-align:left;white-space:normal}
@media(max-width:700px){
 .book-casts-catalogue-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem}
 .book-casts-catalogue-summary{justify-content:flex-start}
 .book-casts-directory-head{display:grid;gap:.4rem}
 .book-casts-directory-head button{justify-self:start}
 .book-casts-tools[open]>.actions{left:0;right:auto}
}
.book-casts-cast-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,19rem),1fr));gap:.55rem}
.book-casts-cast-person{padding:.65rem .75rem;border-top:1px solid #e4d8c3;background:#fffdf7}
.book-casts-cast-person-name{font-weight:700;margin-bottom:.35rem}
.book-casts-cast-person ul{display:grid;gap:.25rem;margin:0;padding:0;list-style:none}
.book-casts-cast-person li{display:flex;align-items:baseline;gap:.4rem;flex-wrap:wrap}
.book-casts-cast-person li button{padding:0;border:0;background:none;color:#5b412b;text-decoration:underline;text-underline-offset:2px;text-align:left}
.book-casts-cast-person li small{color:#705e4b}
@media(max-width:700px){.book-casts-cast-people{grid-template-columns:1fr}}

/* Keep long production titles and status badges inside compact catalogue cards. */
.book-casts-catalogue-card-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:.5rem;min-width:0}
.book-casts-catalogue-card-head strong{min-width:0;overflow-wrap:anywhere;font-size:1.05rem;line-height:1.18}
.book-casts-catalogue-card-head .book-casts-status{max-width:12rem;text-align:center;white-space:normal;overflow-wrap:anywhere}
.book-casts-catalogue-card{min-width:0}
@media(max-width:700px){.book-casts-catalogue-card-head{grid-template-columns:minmax(0,1fr);gap:.35rem}.book-casts-catalogue-card-head .book-casts-status{justify-self:start}}

/* Detail view: show the decision data first; keep source mechanics out of the row. */
.book-casts-role-order{gap:.35rem;margin:.45rem 0 0;padding:.45rem 0 0;border-top:1px solid #e1d4bd}
.book-casts-order-label{font-size:.74rem;font-weight:700;color:#705e4b}
.book-casts-role-order ol{display:grid;gap:.18rem;margin:0;padding:0;list-style:none}
.book-casts-role-order li{display:flex;align-items:baseline;gap:.4rem;min-width:0;font-size:.82rem}
.book-casts-role-order li b{flex:0 0 1.1rem;color:#8b6c46;font-size:.75rem;text-align:right}
.book-casts-role-order li span{min-width:0;overflow-wrap:anywhere}
.book-casts-role-order button{justify-self:start;min-height:36px;margin-top:.15rem}
.book-casts-history-intro{margin:0;color:#705e4b;line-height:1.4}
.book-casts-history-entry{display:grid;grid-template-columns:minmax(7rem,10rem) minmax(0,1fr);gap:.7rem;padding:.65rem 0;border-bottom:1px solid #e4d8c3}
.book-casts-history-entry time{color:#705e4b;font-size:.78rem}
.book-casts-history-entry strong{font-weight:600}
.book-casts-history-entry small{display:block;margin-top:.15rem;color:#705e4b}
.book-casts-performers>.book-casts-status{margin-top:.25rem}
.book-casts-page .book-casts-toolbar label{min-width:15rem}
@media(max-width:700px){.book-casts-page .book-casts-toolbar label{min-width:0}.book-casts-role-order li{font-size:.78rem}}

/* Cast detail grid: role, person, place in the cast, action. */
.book-casts-matrix th:nth-child(2),.book-casts-matrix td:nth-child(2){min-width:17rem;max-width:24rem}
.book-casts-matrix th:nth-child(3),.book-casts-matrix td:nth-child(3){min-width:5rem;max-width:7rem;text-align:center}
.book-casts-matrix th:nth-child(4),.book-casts-matrix td:nth-child(4){min-width:5.5rem;max-width:7rem;text-align:center}
.book-casts-matrix .book-casts-cast{vertical-align:middle}
.book-casts-cast-order{display:grid;justify-items:center;gap:.28rem;margin:0;padding:0;list-style:none}
.book-casts-cast-number,.book-casts-cast-badge{display:inline-flex;align-items:center;justify-content:center;width:1.7rem;height:1.7rem;min-height:1.7rem;max-height:1.7rem;aspect-ratio:1;border:1px solid #bda47e;border-radius:50%;background:#fffdf7;color:#684633;font-size:.78rem;font-weight:700;box-sizing:border-box}
.book-casts-cast-muted{display:inline-block;color:#8b7c69;font-size:.75rem;line-height:1.25;overflow-wrap:anywhere}
.book-casts-cast-badge.is-collective{width:auto;padding:0 .45rem;border-radius:999px;font-size:.7rem;white-space:nowrap}
.book-casts-cast-badge.is-empty{border-color:#d8c8ad;color:#8b7c69}
.book-casts-inline-action{position:relative;display:inline-flex!important;align-items:center;justify-content:center;width:26px;height:26px;min-width:26px;min-height:26px;padding:0!important;border:1px solid #bda47e!important;border-radius:50%;background:#fffdf7!important;color:#684633!important;text-decoration:none!important;line-height:1;transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease}
.book-casts-inline-action:hover,.book-casts-inline-action:focus-visible{background:#f3e8d4!important;border-color:#886947!important}
.book-casts-inline-action:hover,.book-casts-inline-action:focus-visible{transform:translateY(-1px) scale(1.05) rotate(2deg);box-shadow:0 3px 8px #49372425}
.book-casts-inline-action[data-tooltip]::after{content:attr(data-tooltip);position:absolute;left:50%;bottom:calc(100% + 7px);z-index:12;width:max-content;max-width:15rem;padding:.35rem .5rem;border:1px solid #d8c8ad;border-radius:5px;background:#fffaf1;color:#493724;font:400 .7rem/1.25 system-ui,sans-serif;white-space:normal;opacity:0;visibility:hidden;transform:translate(-50%,2px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease;pointer-events:none}
.book-casts-inline-action[data-tooltip]:hover::after,.book-casts-inline-action[data-tooltip]:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0)}
.book-casts-inline-action .ui-icon{width:12px;height:12px}
@media(prefers-reduced-motion:reduce){.book-casts-inline-action{transition:none}.book-casts-inline-action[data-tooltip]::after{transition:none}}
.book-casts-sheet>.book-casts-staff{border-top:1px solid #d8c8ad}
.book-casts-actors-heading{margin:1rem .9rem .45rem;font:700 1.1rem Georgia,serif;color:#493724}
.book-casts-staff> .book-casts-staff-group:first-child{margin-top:0}
.book-casts-production-meta{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin:.25rem 0 0;font-size:.8rem;color:#705e4b}
.book-casts-header-stats{display:inline-flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.book-casts-header-stats>span{display:inline-flex;align-items:baseline;gap:.25rem;padding:.15rem .45rem;border-left:1px solid #d8c8ad}
.book-casts-header-stats small{font-size:.68rem;color:#8b7c69}
.book-casts-header-stats strong,.book-casts-header-stats time{font-size:.78rem;font-weight:700;color:#493724}
.book-casts-counter-inline{display:inline-block;min-width:1.35rem;padding:0 .08rem;border:0;border-bottom:1px dashed transparent;background:transparent;color:#493724;font:700 .78rem/1.2 system-ui,sans-serif;text-align:center;font-variant-numeric:tabular-nums;cursor:text;caret-color:#684633}
.book-casts-counter-inline:hover,.book-casts-counter-inline:focus{border-bottom-color:#bda47e;outline:none}
.book-casts-counter-inline[aria-invalid="true"]{border-bottom-color:#b75d3f;color:#8a3d22}
.book-casts-header-stat-edit{display:inline-flex;align-items:center;gap:.2rem;min-height:28px;padding:.1rem .3rem;border:1px solid #bda47e;border-radius:4px;background:#fffdf7;color:#493724;font-weight:700}
.book-casts-header-stat-edit .ui-icon{width:12px;height:12px}
.book-casts-header-reviews{min-height:30px;padding:.2rem .55rem;border:1px solid #d7ae9b;border-radius:999px;background:#fff0e6;color:#8a3d22;font-size:.73rem;font-weight:700;cursor:pointer}
.book-casts-header-reviews:hover,.book-casts-header-reviews:focus-visible{background:#f9ddcf}
.book-casts-sheet{overflow:visible}
.book-casts-sheet>header{position:relative;z-index:20;overflow:visible}
.book-casts-card-actions{z-index:30}
.book-casts-card-actions[open]>.actions{z-index:40}
.book-casts-matrix thead th{display:table-cell;vertical-align:middle}
.book-casts-matrix thead th>span{display:inline-block;vertical-align:middle}
.book-casts-matrix thead th>.book-casts-inline-action{vertical-align:middle;margin-left:.35rem}
.book-casts-matrix thead th:nth-child(3){text-align:center}
.book-casts-summary{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.book-casts-summary .book-casts-calculated-total{border-right:1px solid #dfcfb2}
.book-casts-summary .book-casts-summary-last{padding-left:1rem}
.book-casts-matrix tbody tr:hover>th,.book-casts-matrix tbody tr:hover>td,.book-casts-matrix tbody tr:focus-within>th,.book-casts-matrix tbody tr:focus-within>td{background:#f6e9cf!important}
.book-casts-matrix th:nth-child(3),.book-casts-matrix td:nth-child(3){min-width:8rem;max-width:10rem}
.book-casts-role{display:table-cell!important;vertical-align:top}
.book-casts-role-content{display:block;min-width:0}
.book-casts-performers{display:table-cell!important;vertical-align:top}
.book-casts-performers-content{display:block;min-width:0}
.book-casts-performers-content>button:first-child{margin-top:0}
.book-casts-role-add-action{flex:0 0 auto}
.book-casts-matrix thead th>.book-casts-role-add-action,
.book-casts-matrix thead th>.book-casts-header-action{width:44px;height:44px;min-width:44px;min-height:44px;margin-left:.35rem;border:0!important;border-radius:8px;background:transparent!important;color:#684633!important;box-shadow:none!important;transform:none!important}
.book-casts-matrix thead th>.book-casts-role-add-action:hover,
.book-casts-matrix thead th>.book-casts-role-add-action:focus-visible,
.book-casts-matrix thead th>.book-casts-header-action:hover,
.book-casts-matrix thead th>.book-casts-header-action:focus-visible{color:#9a7135!important;background:transparent!important;transform:scale(1.12)!important}
.book-casts-matrix thead th>.book-casts-role-add-action .ui-icon,
.book-casts-matrix thead th>.book-casts-header-action .ui-icon{width:17px;height:17px;stroke-width:1.65}
.book-casts-plus-icon{width:18px;height:18px;display:block;overflow:visible}
.book-casts-plus-shadow,.book-casts-plus-core{fill:none;stroke-linecap:round;stroke-linejoin:round}
.book-casts-plus-shadow{stroke:#493724;stroke-width:5}
.book-casts-plus-core{stroke:#d9a849;stroke-width:2.5}
.book-casts-composition-action{position:absolute;right:.45rem;top:50%;margin:0;transform:translateY(-50%)}
.book-casts-composition-action:hover,.book-casts-composition-action:focus-visible{transform:translateY(-50%) scale(1.05) rotate(2deg)}
.book-casts-cast{position:relative;padding-right:2.55rem!important}
.book-casts-cast-number-button{cursor:pointer;border:1px solid #bda47e;background:#fffdf7;color:#684633;font:inherit;padding:0!important;width:1.7rem;height:1.7rem;min-width:1.7rem;min-height:1.7rem!important;max-height:1.7rem;aspect-ratio:1;line-height:1}
.book-casts-cast-number-button:hover,.book-casts-cast-number-button:focus-visible{background:#f3e8d4;border-color:#886947;transform:scale(1.05)}
.book-casts-duration-value{border:0;border-bottom:1px dashed #bda47e;padding:.12rem .2rem;background:transparent;color:#493724;font:inherit;font-weight:700;cursor:pointer}
.book-casts-duration-value:hover,.book-casts-duration-value:focus-visible{background:#f3e8d4;border-radius:3px}
.book-casts-duration-value.is-empty{font-weight:400;color:#8b7c69}
.book-casts-duration-editor{display:inline-flex;align-items:baseline;gap:.22rem;flex-wrap:wrap}
.book-casts-duration-editor .book-casts-duration-label{font-size:.8rem;color:#705e4b;font-weight:400}
.book-casts-duration-editor .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.book-casts-duration-editor>[contenteditable="true"]{display:inline-block;min-width:1.1rem;padding:0 .06rem;border-bottom:1px dashed transparent;color:#493724;font-weight:700;text-align:center;font-variant-numeric:tabular-nums;cursor:text;caret-color:#684633}
.book-casts-duration-editor>[contenteditable="true"]:hover,.book-casts-duration-editor>[contenteditable="true"]:focus{border-bottom-color:#bda47e;outline:none}
.book-casts-duration-editor>[contenteditable="true"][aria-invalid="true"]{border-bottom-color:#b75d3f;color:#8a3d22}
.book-casts-duration-editor .form-error:empty{display:none}
.book-casts-inline-save,.book-casts-inline-cancel{min-height:28px;padding:.2rem .45rem;border:1px solid #bda47e;border-radius:4px;background:#fffdf7;color:#684633;font-size:.72rem;cursor:pointer}
.book-casts-inline-save{background:#684633;color:#fffaf1}
.book-casts-inline-save:hover,.book-casts-inline-save:focus-visible{background:#543724}
.book-casts-inline-cancel:hover,.book-casts-inline-cancel:focus-visible{background:#f3e8d4}
.book-casts-page-flow{overflow:visible;max-height:none}
.book-casts-header-actions{display:flex;align-items:flex-start;gap:.45rem;position:relative;z-index:30}
.book-casts-header-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;padding:0;border:1px solid #bda47e;border-radius:50%;background:#fffdf7;color:#684633;cursor:pointer}
.book-casts-header-icon .ui-icon{width:14px;height:14px}
.book-casts-header-icon:hover,.book-casts-header-icon:focus-visible{background:#f3e8d4;border-color:#886947;transform:translateY(-1px)}
.book-casts-header-icon[data-tooltip]::after{content:attr(data-tooltip);position:absolute;right:0;top:calc(100% + 6px);z-index:45;width:max-content;max-width:12rem;padding:.35rem .5rem;border:1px solid #d8c8ad;border-radius:5px;background:#fffaf1;color:#493724;font:400 .7rem/1.25 system-ui,sans-serif;white-space:normal;opacity:0;visibility:hidden;transform:translateY(-2px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease;pointer-events:none}
.book-casts-header-icon[data-tooltip]:hover::after,.book-casts-header-icon[data-tooltip]:focus-visible::after{opacity:1;visibility:visible;transform:translateY(0)}
.book-casts-actors>summary,.book-casts-staff-group>summary{display:flex;align-items:center;justify-content:space-between;gap:.75rem;min-height:44px;padding:.55rem .9rem;cursor:pointer;list-style:none;border-bottom:1px solid #d8c8ad;background:#fffaf1}
.book-casts-actors>summary::-webkit-details-marker,.book-casts-staff-group>summary::-webkit-details-marker{display:none}
.book-casts-actors>summary::after,.book-casts-staff-group>summary::after{content:'⌄';color:#886947;font-size:1.05rem;transition:transform .12s ease}
.book-casts-actors[open]>summary::after,.book-casts-staff-group[open]>summary::after{transform:rotate(180deg)}
.book-casts-actors>summary strong{font:700 1.1rem Georgia,serif;color:#493724}
.book-casts-actors>summary span,.book-casts-staff-group>summary span{color:#705e4b;font-size:.78rem}
.book-casts-staff-group>summary{padding:.35rem 0;border-bottom:0;background:transparent}
.book-casts-staff-group>summary h4{margin:0;color:#684633}
.book-casts-staff-group>ul{margin-top:.15rem}
.book-casts-staff-person-row{display:inline-flex;align-items:center;gap:.25rem;min-width:0;max-width:100%}
.book-casts-staff-edit{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;min-width:24px;min-height:24px;padding:0;border:1px solid #bda47e;border-radius:50%;background:#fffdf7;color:#684633;cursor:pointer}
.book-casts-staff-edit:hover,.book-casts-staff-edit:focus-visible{background:#f3e8d4;border-color:#886947;transform:scale(1.06)}
.book-casts-staff-edit .ui-icon{width:12px;height:12px}
.book-casts-staff-edit[data-tooltip]::after{content:attr(data-tooltip);position:absolute;left:50%;bottom:calc(100% + 7px);z-index:20;width:max-content;max-width:14rem;padding:.35rem .5rem;border:1px solid #d8c8ad;border-radius:5px;background:#fffaf1;color:#493724;font:400 .7rem/1.25 system-ui,sans-serif;white-space:normal;opacity:0;visibility:hidden;transform:translate(-50%,2px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease;pointer-events:none}
.book-casts-staff-edit[data-tooltip]:hover::after,.book-casts-staff-edit[data-tooltip]:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0)}
.book-casts-drag-person{display:inline-flex;align-items:center;cursor:grab;border-radius:4px;user-select:none;touch-action:none;transition:background-color .12s ease,box-shadow .12s ease,opacity .12s ease}
.book-casts-drag-person:active{cursor:grabbing}
.book-casts-drag-person.is-dragging{opacity:.45}
.book-casts-drag-person.is-drag-over{background:#f3e8d4;box-shadow:0 0 0 2px #bda47e inset}
.book-casts-drag-person .book-casts-person{cursor:grab}
@media(max-width:700px){.book-casts-history-entry{grid-template-columns:1fr;gap:.15rem}.book-casts-matrix th:nth-child(3),.book-casts-matrix td:nth-child(3){min-width:4.5rem;max-width:5.5rem}.book-casts-matrix th:nth-child(4),.book-casts-matrix td:nth-child(4){min-width:4.5rem;max-width:5.5rem}.book-casts-remove-summary div{grid-template-columns:6rem minmax(0,1fr)}}

/* Detail view: keep the cast table primary and tuck provenance below it. */
.book-casts-secondary{border-top:1px solid #d8c8ad;padding:.1rem .9rem 0;background:#fffaf1}
.book-casts-secondary>summary{display:flex;align-items:center;justify-content:space-between;min-height:44px;cursor:pointer;color:#684633;font-weight:700}
.book-casts-secondary>summary::after{content:'⌄';font-size:1.1rem;transition:transform .12s ease}
.book-casts-secondary[open]>summary::after{transform:rotate(180deg)}
.book-casts-secondary>.book-casts-staff{padding:.85rem 0;border-top:1px solid #e4d8c3;background:transparent}
.book-casts-secondary>.book-casts-staff:first-of-type{border-top:0}
.book-casts-entry-source{margin-top:.3rem}
.book-casts-entry-source>summary{display:inline-flex;min-height:32px;align-items:center;cursor:pointer;color:#705e4b;font-size:.75rem}
.book-casts-entry-source[open]>summary{color:#684633}
.book-casts-queue{padding:.6rem .85rem}
.book-casts-queue>summary{display:flex;align-items:center;justify-content:space-between;gap:.75rem;min-height:42px;cursor:pointer;list-style:none}
.book-casts-queue>summary::-webkit-details-marker{display:none}
.book-casts-queue>summary::after{content:'⌄';font-size:1.1rem;transition:transform .12s ease}
.book-casts-queue[open]>summary::after{transform:rotate(180deg)}
.book-casts-queue>summary strong{font-family:Georgia,serif;font-size:1.05rem}
.book-casts-queue>summary span{color:#705e4b;font-size:.8rem}
.book-casts-queue-body{padding-top:.55rem}
@media(max-width:700px){.book-casts-secondary{padding-inline:.65rem}.book-casts-queue>summary{align-items:flex-start;flex-wrap:wrap}}

.book-casts-source-only-cast{display:block;margin-top:.3rem;color:#705e4b;font-size:.75rem}

/* Source refresh is an icon-only action; the policy stays visible beside it. */
.book-casts-knowledge-status{display:grid;gap:.55rem;margin:0 0 1rem;padding:.7rem .85rem;background:#fffaf1;border:1px solid #d8c8ad;border-radius:8px}
.book-casts-source-control{display:flex;align-items:center;justify-content:flex-end;gap:.8rem;min-width:0}
.book-casts-source-refresh{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:1px solid #bda47e;border-radius:50%;background:#fffdf7;color:#684633;cursor:pointer}
.book-casts-source-refresh::after{content:attr(data-tooltip);position:absolute;right:0;top:calc(100% + 8px);z-index:10;width:min(18rem,70vw);padding:.55rem .7rem;border:1px solid #d8c8ad;border-radius:6px;background:#fffaf1;box-shadow:0 5px 16px #49372425;color:#493724;font:400 .75rem/1.4 system-ui,sans-serif;text-align:left;white-space:normal;opacity:0;visibility:hidden;transform:translateY(-3px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease;pointer-events:none}
.book-casts-source-refresh:hover::after,.book-casts-source-refresh:focus-visible::after{opacity:1;visibility:visible;transform:translateY(0)}
.book-casts-source-refresh:hover,.book-casts-source-refresh:focus-visible{background:#f3e8d4;border-color:#886947}
.book-casts-source-refresh:disabled{opacity:.6;cursor:wait}
.book-casts-source-refresh .ui-icon{width:20px;height:20px}
@media(max-width:700px){.book-casts-source-refresh{flex-basis:42px;width:42px;height:42px;min-width:42px;min-height:42px}.book-casts-source-refresh::after{right:-.4rem;width:min(17rem,78vw)}}

.book-casts-history-button{padding:10px 12px;border:1px solid #bda47e;border-radius:6px;background:#fffaf1;color:#493724;font-size:.85rem;cursor:pointer}.book-casts-history-button:hover,.book-casts-history-button:focus-visible{background:#f3e8d4;border-color:#886947}.book-casts-empty-performer-action{margin-left:.45rem}
/* Inline actions keep a real touch target while the icon remains visually small. */
.book-casts-inline-action{box-sizing:border-box!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;margin-left:.25rem!important;padding:0!important;border-radius:8px!important}
.book-casts-inline-action .book-casts-plus-icon,.book-casts-inline-action .ui-icon{width:17px!important;height:17px!important}
.book-casts-staff-edit{box-sizing:border-box!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;margin-left:.25rem!important;padding:0!important;border-radius:50%!important}
.book-casts-staff-edit .ui-icon{width:13px!important;height:13px!important}.book-casts-staff-person-row{gap:0}
