.roda-presence{padding:10px 12px;border:1px solid #303235;border-radius:10px;margin:8px 0 12px;font-size:12px}
.roda-presence summary{display:flex;gap:7px;align-items:center;cursor:pointer;list-style:none}
.roda-presence summary::-webkit-details-marker{display:none}
.presence-dot{width:6px;height:6px;border-radius:50%;background:#777}
.is-connected .presence-dot{background:#72c69b}
.presence-people{list-style:none;padding:0;margin:12px 0 0;display:grid;gap:12px}
.presence-people li{display:flex;gap:8px;min-width:0}
.presence-avatar{flex-shrink:0;width:25px;height:25px;display:grid;place-items:center;background:#383b40;color:#fff;border-radius:50%;font-size:10px}
.presence-people strong,.presence-people small{display:block;overflow-wrap:anywhere}
.presence-people small{color:#aaa;font-size:11px;line-height:1.5;margin-top:3px}
.presence-conflict{margin:10px 0 0;padding-top:10px;border-top:1px solid #5d4f28;color:#f2cf80;line-height:1.5}
.navCollapsed .roda-presence{display:none}
.cast-review-actions{margin:0 0 14px}
.cast-review-dialog{width:min(680px,92vw);max-height:85vh;overflow:auto;background:#1b1b1b;color:#eee;border:1px solid #555;border-radius:12px;padding:24px}
.cast-review-dialog::backdrop{background:#000b}
.cast-review-dialog textarea{width:100%;margin:8px 0;box-sizing:border-box}
.cast-review-dialog h2{flex:1;margin:0}
.cast-review-dialog p{line-height:1.6}
.crew-characters{display:block;color:#aaa;font-size:11px;line-height:1.5;margin:5px 0 0;}
#crewCard .cardHeader{flex-wrap:wrap;gap:12px;}
#crewAreaFilter{width:auto;min-width:150px;}
#crewCard .cardHeader .row{flex-wrap:wrap;}
#crewTable{min-width:1260px;}
#crewTable td:nth-child(3),#crewTable td:nth-child(4){min-width:160px;}
#crewTable td:nth-child(3) .input,#crewTable td:nth-child(4) .input{min-width:140px;}
#crewTable thead th{background:#151515;z-index:8;box-shadow:0 1px 0 #303030;}
body:not(.roda-studio) .cast-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px;}
body:not(.roda-studio) .cast-title{display:flex;align-items:center;gap:12px;margin-bottom:16px;}
body:not(.roda-studio) .cast-title h2{font-size:16px;margin:0 0 4px;}
body:not(.roda-studio) .cast-avatar{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);border-radius:50%;}
body:not(.roda-studio) .cast-card label{display:grid;gap:6px;margin:12px 0;font-size:12px;}
body:not(.roda-studio) .overview-stats{display:flex;flex-wrap:wrap;gap:24px;margin:20px 0;}
body:not(.roda-studio) .overview-stats strong,body:not(.roda-studio) .overview-stats span{display:block;}
body:not(.roda-studio) .scene-link{margin:3px;padding:4px 8px;cursor:pointer;}

.crew-person-actions{white-space:nowrap;}
.crew-person-actions .btn+.btn{margin-left:6px;}
.crew-action-dialog{width:min(520px,92vw);max-height:85vh;overflow:auto;box-sizing:border-box;background:#1b1b1b;color:#eee;border:1px solid #444;border-radius:16px;padding:24px;box-shadow:0 24px 80px #0008;}
.crew-action-dialog::backdrop{background:#000a;}
.crew-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;}
.crew-dialog-heading h2{margin:0;font-size:20px;}
.crew-dialog-person{font-size:17px;font-weight:700;margin:20px 0 10px;}
.crew-dialog-copy,.crew-dialog-note{line-height:1.6;font-size:13px;color:#bcbcbc;}
.crew-dialog-note{padding:12px;border:1px solid #3e3e3e;border-radius:9px;}
.crew-dialog-field{display:grid;gap:8px;margin:18px 0;font-size:13px;}
.crew-dialog-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:22px;}
.crew-action-dialog .crew-dialog-primary{background:#f4f4f4;color:#111;border-color:#f4f4f4;}
.crew-dialog-error{color:#ffa3a3;font-size:13px;}
.crew-dialog-error:empty{display:none;}
.crew-merge-history{display:grid;gap:12px;margin-top:20px;}
.crew-merge-history-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #383838;padding-bottom:12px;}
.crew-merge-history-row small{display:block;color:#aaa;margin-top:5px;}

/* Compact character profiles: assignment stays visible while details are closed. */
#castDirectory.cast-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));align-items:start;gap:14px;}
#castDirectory .cast-card{min-width:0;align-self:start;overflow:hidden;border:1px solid #343434;border-left:3px solid #4c4c4c;}
#castDirectory .cast-card--assigned{border-color:#355c46;border-left-color:#72c69b;background:#19211d;}
#castDirectory .cast-summary{display:grid;grid-template-columns:32px minmax(0,1fr) auto 10px;align-items:center;gap:10px;padding:16px 13px;list-style:none;cursor:pointer;}
#castDirectory .cast-summary::-webkit-details-marker{display:none;}
#castDirectory .cast-summary::after{content:'⌄';color:#999;justify-self:end;font-size:16px;}
#castDirectory .cast-card[open]>.cast-summary::after{transform:rotate(180deg);}
#castDirectory .cast-summary:focus-visible{outline:2px solid #aaa;outline-offset:-3px;}
#castDirectory .cast-avatar{width:32px;height:32px;border:0;background:#303030;color:#bbb;font-size:11px;}
#castDirectory .cast-card--assigned .cast-avatar{background:#294735;color:#9ee1b8;}
#castDirectory .cast-summary-person{min-width:0;}
#castDirectory .cast-summary h2{font-size:14px;font-weight:650;line-height:1.35;margin:0 0 5px;overflow-wrap:anywhere;}
#castDirectory .cast-actor-name{display:block;font-size:13px;font-weight:650;line-height:1.4;color:#a6dfbd;overflow-wrap:anywhere;}
#castDirectory .cast-card--pending .cast-actor-name{color:#d4b47c;font-size:12px;font-weight:500;}
#castDirectory .cast-summary-counts{display:grid;gap:4px;font-size:10px;line-height:1.4;color:#aaa;white-space:nowrap;text-align:right;}
#castDirectory .cast-summary-counts strong{font-size:12px;font-weight:600;color:#eee;}
#castDirectory .cast-details{padding:0 13px 16px;border-top:1px solid #ffffff0c;}
#castDirectory .cast-details label{margin:14px 0 0;display:grid;gap:6px;}
#castDirectory .cast-card--assigned [data-cast-entry]{border-color:#436a51;color:#c6efd6;font-size:13px;font-weight:600;}

/* Area headers are disclosure buttons; member forms and day details fold together. */
#crewTable .groupRow > td{padding:0;}
#crewTable .crewGroupToggle{display:flex;align-items:center;gap:9px;width:100%;padding:11px 10px;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;font-weight:650;text-align:left;cursor:pointer;}
#crewTable .crewGroupToggle:hover{background:#ffffff08;}
#crewTable .crewGroupToggle:focus-visible{outline:2px solid #aaa;outline-offset:-3px;}
#crewTable .crewGroupCaret{width:13px;flex:none;color:#bbb;}
#crewTable .crewGroupCount{font-size:11px;font-weight:400;color:#aaa;margin-left:5px;}
#crewTable tr[data-crew-area][hidden]{display:none!important;}
