/* Story display only. Existing booking, save and send controls keep their behaviour. */
.storySection{min-width:0}.storySectionDisclosure>summary{font-size:16px;font-weight:600;min-height:32px;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer}.storySectionDisclosure>summary::after{content:'⌄';color:var(--muted,#706778);font-size:18px}.storySectionDisclosure[open]>summary::after{transform:rotate(180deg)}.storySectionDisclosure>.storySectionBody.panel{border:0;border-radius:0;box-shadow:none;padding:0;margin:14px 0 0;background:transparent}.storySectionBody>h2{display:none}.storySectionDisclosure>.storySectionBody .storySectionBody{padding:0}.storyGrid .storySectionDisclosure{margin-bottom:16px}.storySectionGrip,.storySectionMoveTools{display:none}.storyMobileStack[hidden]{display:none!important}.storyLayoutStatus.srOnly{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.storyDirections{padding:0;border:0;margin:0;min-width:0}.storyDirections>summary{list-style:none;display:grid;gap:3px;cursor:pointer;color:var(--brand-link,#7142ac);overflow-wrap:anywhere}.storyDirections>summary>small{display:block}.storyDirections>summary:hover{text-decoration:underline}.storyDirectionChoices{display:grid;gap:6px;margin-top:10px}.storyDirectionChoices>a{display:inline-flex;align-items:center;min-height:32px;color:var(--brand-link,#7142ac)}.storyDirectionChoices>p{margin:0;font-size:12px}.storyDocumentLink{border:0;padding:4px 0;background:transparent;color:var(--brand-link,#7142ac);text-decoration:underline;text-underline-offset:3px;text-align:left;line-height:1.5;font-size:14px}.storyDocumentLink:hover{background:transparent}.storyDocumentDialog{width:min(900px,calc(100% - 28px));max-height:90dvh;border:1px solid #d9d1e3;border-radius:12px;padding:0;color:inherit;background:white;overflow:auto}.storyDocumentDialog>header{padding:14px 20px;justify-content:space-between;gap:16px}.storyDocumentDialog>header h2{margin:0;font-size:18px}.storyDocumentDialog>.documentCard,.storyDocumentDialog>.bookingDocument{padding:20px}.storyDocumentDialog::backdrop{background:#20162b88}.storyDocumentDialog .documentCard .bookingDocument{box-shadow:none;border:0}
.storyGrid .storyPrice,.storyGrid .storyProfit{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:5px 10px}.storyGrid .storyPrice>strong,.storyGrid .storyProfit>strong{grid-column:2;grid-row:1;text-align:right;font-variant-numeric:tabular-nums}.storyGrid .storyPrice>small{grid-column:1;font-size:11px}.storyGrid .storyPrice>.fieldEdit{top:0;right:-8px}.storyGrid .storyPrice{padding-right:20px}.storyGrid .storyProfit{padding-right:20px}.storyGrid .storyCostRows dd{font-variant-numeric:tabular-nums;padding-right:20px}.storyGrid .storyProfit>span{min-width:0}.storyGrid .storyProfit>strong{white-space:nowrap}.storyPaymentBalance{border-top:1px solid #e5dfea;margin:16px 0;padding-top:14px;display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:4px 12px}.storyPaymentBalance strong{grid-column:2;grid-row:1 / span 2;text-align:right;font-size:21px;font-variant-numeric:tabular-nums}.storyPaymentBalance small{color:var(--muted,#706778)}
.storyAutomationPanel .storyAutoHeader{display:flex;align-items:center;justify-content:space-between;gap:10px}.storyAutomationPanel h2{margin:0;min-width:0;flex:1}.storyGrid .storyAutoDisclosure{border:0;background:transparent;color:inherit;padding:0;display:inline-flex;align-items:center;gap:8px;font-weight:600;font-size:16px;text-align:left}.storyGrid .storyAutoDisclosure::after{content:'⌄';font-size:18px}.storyGrid .storyAutoDisclosure[aria-expanded=true]::after{transform:rotate(180deg)}.storyAutomationPanel .automationSwitch{margin:0;flex-shrink:0}.storyTaskScroll{margin-top:14px;max-height:246px;overflow-y:auto;overscroll-behavior:contain}.storyTaskList{list-style:none;margin:0;padding:0;display:grid;gap:6px}.storyTaskList li{display:flex;align-items:flex-start;gap:9px;min-height:36px;font-size:12px;line-height:1.45}.storyTaskTick{color:#a99fb4;font-size:17px;line-height:1.25;min-width:18px}.storyTaskList .completed .storyTaskTick{color:#8d40ef;font-weight:700}.storyTaskList small{display:block;font-size:11px;color:var(--muted,#706778)}.storyAutoSummary{font-size:12px;color:var(--muted,#706778);margin:10px 0 0}.storyAutoScope{border-top:1px solid #e7e0ed;margin-top:12px;padding-top:9px;font-size:11px;color:var(--muted,#706778)}.storyChapterSubtitle{font-size:12px;font-style:italic;font-weight:400;color:var(--muted,#706778);margin-left:8px}.storyGrid .chapterDelivered{border:0;padding:4px 0;background:transparent;text-align:left;color:var(--brand-link,#7142ac);text-decoration:underline;text-underline-offset:3px}
.conversationHistory .messageCard>summary{list-style:none;display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:start;gap:5px 12px;cursor:pointer}.conversationHistory .messageCard>summary::after{content:'⌄';grid-column:2;grid-row:1 / span 3;color:var(--muted,#706778)}.conversationHistory .messageCard[open]>summary::after{transform:rotate(180deg)}.conversationHistory .messageCard>summary .messageHeading{grid-column:1;margin:0}.messageExcerpt{grid-column:1;color:var(--muted,#706778);font-size:12px;line-height:1.5;overflow:hidden;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.messageCard[open] .messageExcerpt{display:none}.messageExpandedBody{margin-top:12px}.messageSummaryWarning{grid-column:1;font-size:12px;color:#9e2424}.messageCard>summary::-webkit-details-marker{display:none}.storyEmails .conversationScroll{overscroll-behavior:auto}
@media(max-width:760px){
 .storyGrid.mobileStoryLayout{display:block;margin-top:18px}.storyGrid.mobileStoryLayout>.storySidebar[hidden],.storyGrid.mobileStoryLayout>.storyRecords[hidden]{display:none!important}.storyMobileStack{display:grid;gap:10px}.storyMobileStack .storySection{position:relative;padding-left:24px;min-width:0}.storyGrid .storyMobileStack .panel{margin:0;padding:13px;border-radius:12px;font-size:16px}.storyMobileStack .storySectionDisclosure>summary,.storyMobileStack .storyDetails>summary,.storyMobileStack .projectFiles>summary,.storyMobileStack .storyHistory>summary{min-height:44px;font-size:16px;line-height:1.4}.storyMobileStack .storySectionDisclosure>.storySectionBody.panel{padding:0;border:0;margin-top:14px}.storyMobileStack .storySectionGrip{display:flex;align-items:center;justify-content:center;position:absolute;left:-10px;top:12px;width:44px;min-width:44px;height:44px;padding:0;border:0;background:transparent;color:var(--muted,#706778);font-size:22px;touch-action:none;cursor:grab}.storyMobileStack .storySectionGrip:active{cursor:grabbing}.storyMobileStack .storySectionMoveTools:not([hidden]){display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}.storyMobileStack .storySectionMoveTools button{padding:8px;font-size:13px}.storySectionMoving>.panel{opacity:.55}.storyDropBefore>.panel{box-shadow:0 -3px 0 var(--brand-accent,#8d40ef)}.storyDropAfter>.panel{box-shadow:0 3px 0 var(--brand-accent,#8d40ef)}
 .storyGrid .storyMobileStack button,.storyGrid .storyMobileStack summary,.storyGrid .storyMobileStack a{min-height:44px}.storyGrid .storyMobileStack input,.storyGrid .storyMobileStack select,.storyGrid .storyMobileStack textarea{font-size:16px}.storyMobileStack .muted,.storyMobileStack .storyFacts dt,.storyMobileStack .storyPerson p{font-size:14px;line-height:1.5}.storyMobileStack .storyFacts dd{font-size:16px}.storyGrid .storyMobileStack h2{font-size:17px}.storyGrid .storyMobileStack h3{font-size:16px}.storyGrid .storyMobileStack .storyTaskList li{font-size:14px;min-height:40px}.storyGrid .storyMobileStack .storyTaskList small{font-size:12px}.storyMobileStack .storyDirections>summary{min-height:48px}.storyMobileStack .storyActions{display:grid;grid-template-columns:1fr;gap:8px}.storyMobileStack .storyActions button{margin:0;text-align:left}.storyMobileStack .storyEmails .storyInbox{height:auto;overflow:visible}.storyMobileStack .storyEmails .conversationPane,.storyMobileStack .storyEmails .conversationScroll{overflow:visible;max-height:none}.storyMobileStack .messageCard>summary .messageHeading{display:grid;gap:3px}.storyMobileStack .messageHeading time{margin:0;text-align:left;max-width:none;font-size:12px}.storyMobileStack .messageExpandedBody{font-size:16px}.storyMobileStack .storyAutoHeader h2{font-size:16px}.storyMobileStack .storyAutoDisclosure{min-height:44px}.storyMobileStack .storyPerson .fieldEdit{min-width:44px}.storyMobileStack .storyPrice>strong{font-size:26px}.storyMobileStack .storyProfit>strong{font-size:22px}.storyDocumentDialog>header{padding:12px}.storyDocumentDialog>.documentCard,.storyDocumentDialog>.bookingDocument{padding:12px}.storyDocumentDialog .invoiceLines{font-size:12px}.storyDocumentDialog button{min-height:44px}.storyMobileStack .storyMainSessions{min-height:0}.storyMobileStack .storyMainSessions .storyActions{margin-top:14px}.storyMobileStack .storyHistory{font-size:14px}.storyMobileStack .storyHistory .panel{margin-top:12px}
}
/* One edit entry point per Story section, retained in its disclosure header. */
.storyGrid .sectionEdit{opacity:1;position:static;flex:0 0 auto;min-width:40px;min-height:40px;margin:0 4px 0 auto;padding:8px;border:0;background:transparent;line-height:1;color:var(--purple,#7441a2)}
.storyGrid summary:has(> .sectionEdit){display:flex;align-items:center;gap:8px}
.storyGrid summary:has(> .sectionEdit)::after{flex:0 0 auto}
.storyGrid h2:has(> .sectionEdit){display:flex;align-items:center;gap:8px}
.storyGrid .storyProfitNote{margin:8px 0 0;font-size:.85rem;color:var(--muted,#827b89)}
.storyEditDialog .sectionEditorGroup{border:0;padding:0;margin:0 0 20px;min-width:0}
.storyEditDialog .sectionEditorGroup legend{font-weight:700;margin-bottom:8px}
.storyEditDialog input:read-only{background:#f5f3f7;color:#62576f}
/* Integrate into public/story-layout.css after the existing section-edit rules. */
.storyGrid .storySectionHeading{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px;min-width:0;flex:1}
.storyGrid .storySectionHeading>.sectionEdit{margin:0;align-self:center}
.storyGrid .storySectionDisclosure>summary::after,.storyGrid .storyDetails>summary::after{margin-left:auto;flex:0 0 auto}
.storyGrid .storySectionHeading>.storyChapterSubtitle{margin-left:4px}
.storyGrid .storyComplimentaryItems{list-style:disc;margin:0;padding-left:18px;display:grid;gap:5px}
.storyGrid .storyChapterActions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px}
.storyGrid .storyChapterActions>button{margin:0}
.storyGrid .storyChapterInclusion{margin:0;padding:9px 10px;background:#e9dcf5;color:#67379a;border-radius:6px;font-size:12px;line-height:1.35}
