From 3b6063466703050d5ff6193f019dce49d8732a6d Mon Sep 17 00:00:00 2001 From: Nick Beckley Date: Fri, 19 Jun 2026 14:22:02 +0100 Subject: [PATCH] Implemented Phase B guidance/discoverability work. --- .../Help/Articles/SceneInspector/Assets.md | 26 +++++++ .../Articles/SceneInspector/Attachments.md | 16 +++++ .../SceneInspector/CharacterAttributes.md | 25 +++++++ .../Articles/SceneInspector/Characters.md | 21 ++++++ .../Help/Articles/SceneInspector/Checklist.md | 16 +++++ .../Help/Articles/SceneInspector/Custody.md | 26 +++++++ .../Articles/SceneInspector/Dependencies.md | 16 +++++ .../Fields/RelationshipIntensity.md | 14 ++++ .../SceneInspector/Fields/ThreadEventType.md | 14 ++++ .../SceneInspector/Fields/ThreadMarkerType.md | 14 ++++ .../Help/Articles/SceneInspector/Knowledge.md | 44 ++++++++++++ .../Help/Articles/SceneInspector/Locations.md | 21 ++++++ .../Help/Articles/SceneInspector/Notes.md | 16 +++++ .../Help/Articles/SceneInspector/Overview.md | 30 ++++++++ .../Help/Articles/SceneInspector/Purpose.md | 21 ++++++ .../Articles/SceneInspector/Relationships.md | 35 +++++++++ .../Articles/SceneInspector/StoryState.md | 22 ++++++ .../Help/Articles/SceneInspector/Threads.md | 25 +++++++ PlotLine/Help/Articles/SceneInspector/Time.md | 21 ++++++ .../Help/Articles/SceneInspector/Warnings.md | 16 +++++ .../Help/Articles/SceneInspector/Writer.md | 16 +++++ .../Help/Articles/Timeline/AssetEvents.md | 40 +++++++++++ .../Articles/Timeline/CharacterAppearances.md | 32 +++++++++ .../Articles/Timeline/Fields/BookFilter.md | 14 ++++ .../Help/Articles/Timeline/Fields/FocusId.md | 14 ++++ .../Articles/Timeline/Fields/FocusType.md | 14 ++++ .../Articles/Timeline/Fields/MetricEdit.md | 14 ++++ .../Articles/Timeline/Fields/SavedViewName.md | 14 ++++ .../Help/Articles/Timeline/FiltersAndFocus.md | 40 +++++++++++ PlotLine/Help/Articles/Timeline/Metrics.md | 47 ++++++++++++ PlotLine/Help/Articles/Timeline/Overview.md | 60 ++++++++++++++++ .../Help/Articles/Timeline/PlotThreadLanes.md | 52 ++++++++++++++ PlotLine/Help/Articles/Timeline/SavedViews.md | 35 +++++++++ PlotLine/Help/Articles/Timeline/SceneCards.md | 38 ++++++++++ .../Help/Articles/Timeline/ThreadHealth.md | 36 ++++++++++ PlotLine/Views/Scenes/_SceneInspector.cshtml | 56 +++++++-------- PlotLine/Views/Timeline/Index.cshtml | 35 ++++++--- PlotLine/wwwroot/css/site.css | 16 +++++ PlotLine/wwwroot/css/site.min.css | 2 +- PlotLine/wwwroot/js/site.js | 71 +++++++++++++++++++ PlotLine/wwwroot/js/site.min.js | 2 +- 41 files changed, 1047 insertions(+), 40 deletions(-) create mode 100644 PlotLine/Help/Articles/SceneInspector/Assets.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Attachments.md create mode 100644 PlotLine/Help/Articles/SceneInspector/CharacterAttributes.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Characters.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Checklist.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Custody.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Dependencies.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Fields/RelationshipIntensity.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Fields/ThreadEventType.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Fields/ThreadMarkerType.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Knowledge.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Locations.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Notes.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Overview.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Purpose.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Relationships.md create mode 100644 PlotLine/Help/Articles/SceneInspector/StoryState.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Threads.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Time.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Warnings.md create mode 100644 PlotLine/Help/Articles/SceneInspector/Writer.md create mode 100644 PlotLine/Help/Articles/Timeline/AssetEvents.md create mode 100644 PlotLine/Help/Articles/Timeline/CharacterAppearances.md create mode 100644 PlotLine/Help/Articles/Timeline/Fields/BookFilter.md create mode 100644 PlotLine/Help/Articles/Timeline/Fields/FocusId.md create mode 100644 PlotLine/Help/Articles/Timeline/Fields/FocusType.md create mode 100644 PlotLine/Help/Articles/Timeline/Fields/MetricEdit.md create mode 100644 PlotLine/Help/Articles/Timeline/Fields/SavedViewName.md create mode 100644 PlotLine/Help/Articles/Timeline/FiltersAndFocus.md create mode 100644 PlotLine/Help/Articles/Timeline/Metrics.md create mode 100644 PlotLine/Help/Articles/Timeline/Overview.md create mode 100644 PlotLine/Help/Articles/Timeline/PlotThreadLanes.md create mode 100644 PlotLine/Help/Articles/Timeline/SavedViews.md create mode 100644 PlotLine/Help/Articles/Timeline/SceneCards.md create mode 100644 PlotLine/Help/Articles/Timeline/ThreadHealth.md diff --git a/PlotLine/Help/Articles/SceneInspector/Assets.md b/PlotLine/Help/Articles/SceneInspector/Assets.md new file mode 100644 index 0000000..9b604aa --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Assets.md @@ -0,0 +1,26 @@ +--- +title: Assets +category: Scene Inspector +tags: scene inspector, assets, objects, continuity +contextKey: sceneInspector.assets +micro: Record important object, evidence and clue changes in this scene. +quickTitle: Scene assets +quickSummary: Asset events track object states, dependencies, locations and continuity implications for important story items. +screenshot: +--- + +# Overview + +Assets are story objects that matter: letters, weapons, keys, documents, phones, vehicles, evidence, heirlooms, maps or anything whose state or location can affect the plot. + +Asset states record what condition or story status the object has. Dependencies record when one asset's usefulness depends on another state. Location tracking records where the object is. Custody records who has responsibility or possession. + +# Continuity Implications + +Assets create continuity obligations. If a letter is burned, it should not be read later unless another copy exists. If a weapon is with one character, another character needs a reason to use it. If evidence is hidden, discovery should happen in a recorded scene. + +# Related Guides + +- [Timeline Asset Events](/Help/Article/timeline.assetEvents) +- [Custody](/Help/Article/sceneInspector.custody) +- [Story Assets](/Help/Article/storyAssets.overview) diff --git a/PlotLine/Help/Articles/SceneInspector/Attachments.md b/PlotLine/Help/Articles/SceneInspector/Attachments.md new file mode 100644 index 0000000..9b5ee07 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Attachments.md @@ -0,0 +1,16 @@ +--- +title: Attachments and Research +category: Scene Inspector +tags: scene inspector, attachments, research, references +contextKey: sceneInspector.attachments +micro: Keep scene references and research close to the scene. +quickTitle: Attachments and research +quickSummary: Attachments store files, links and notes that support drafting or revising this scene. +screenshot: +--- + +# Overview + +Attachments are for supporting material: research links, images, maps, interview notes, historical references, sketches or source documents. + +Use notes to explain why the attachment matters. Future-you should not have to reopen every file to remember what it was for. diff --git a/PlotLine/Help/Articles/SceneInspector/CharacterAttributes.md b/PlotLine/Help/Articles/SceneInspector/CharacterAttributes.md new file mode 100644 index 0000000..845a525 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/CharacterAttributes.md @@ -0,0 +1,25 @@ +--- +title: Character Attributes +category: Scene Inspector +tags: scene inspector, character attributes, injuries, continuity +contextKey: sceneInspector.characterAttributes +micro: Track visible and internal character state changes from this scene forward. +quickTitle: Character attributes +quickSummary: Character attributes record appearance changes, injuries, emotional state and skills so future scenes can remain consistent. +screenshot: +--- + +# Overview + +Character attributes capture changes that may matter after this scene. They can include appearance changes, injuries, clothing, physical condition, emotional state, skills, knowledge notes or other state details. + +Use them when a scene changes how a character should be described or understood later. A cut lip, soaked clothes, concealed panic, a learned skill or a visible disguise can all create continuity obligations. + +# How Changes Persist + +Attribute changes become part of the character's story history. Future scenes can then be checked against what has already been established. If a character is injured in one scene and perfectly fine in the next without explanation, PlotDirector has evidence to help you notice. + +# Related Guides + +- [Characters](/Help/Article/sceneInspector.characters) +- [Continuity Warnings](/Help/Article/warnings.overview) diff --git a/PlotLine/Help/Articles/SceneInspector/Characters.md b/PlotLine/Help/Articles/SceneInspector/Characters.md new file mode 100644 index 0000000..f3c15dd --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Characters.md @@ -0,0 +1,21 @@ +--- +title: Characters +category: Scene Inspector +tags: scene inspector, characters, appearances, continuity +contextKey: sceneInspector.characters +micro: Record who appears in the scene and what role they play. +quickTitle: Scene characters +quickSummary: Character entries connect a scene to point of view, presence, location and character continuity. +screenshot: +--- + +# Overview + +The Characters section records who appears in the scene, how they participate and where they are. This supports Timeline appearance lanes, character-focused views and continuity checks. + +Role tells you whether a character is the point of view, a main participant, a supporting presence or only mentioned. Presence and location details help the story remember who was actually there. + +# Related Guides + +- [Character Appearances](/Help/Article/timeline.characterAppearances) +- [Character Attributes](/Help/Article/sceneInspector.characterAttributes) diff --git a/PlotLine/Help/Articles/SceneInspector/Checklist.md b/PlotLine/Help/Articles/SceneInspector/Checklist.md new file mode 100644 index 0000000..4443882 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Checklist.md @@ -0,0 +1,16 @@ +--- +title: Scene Checklist +category: Scene Inspector +tags: scene inspector, checklist, revision +contextKey: sceneInspector.checklist +micro: Keep scene-specific tasks visible. +quickTitle: Scene checklist +quickSummary: Checklist items hold small drafting or revision tasks that belong to this scene. +screenshot: +--- + +# Overview + +The checklist is for concrete scene tasks: add sensory detail, check the alibi, rewrite the argument, verify the date, add the missing clue, or trim the ending. + +Use it for actions you want to complete, not for permanent story facts. Story facts belong in the relevant scene, character, thread or asset fields. diff --git a/PlotLine/Help/Articles/SceneInspector/Custody.md b/PlotLine/Help/Articles/SceneInspector/Custody.md new file mode 100644 index 0000000..e59592c --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Custody.md @@ -0,0 +1,26 @@ +--- +title: Custody +category: Scene Inspector +tags: scene inspector, custody, assets, continuity +contextKey: sceneInspector.custody +micro: Track who has or controls important assets. +quickTitle: Asset custody +quickSummary: Custody records possession, transfer and responsibility for important story items. +screenshot: +--- + +# Overview + +Custody is about who has an asset, controls it, guards it or is responsible for it. It is especially useful for evidence, weapons, keys, letters, documents and valuables. + +Custody can differ from location. A car may be parked outside, but one character may hold the keys. A document may be in a safe, but another character may control access. + +# Continuity Benefits + +Custody helps PlotDirector spot impossible possession. If Beth gives the key to Arun in one scene, Beth should not use it later unless it returns to her or a duplicate exists. + +# Related Guides + +- [Assets](/Help/Article/sceneInspector.assets) +- [Timeline Asset Events](/Help/Article/timeline.assetEvents) +- [Continuity Warnings](/Help/Article/warnings.overview) diff --git a/PlotLine/Help/Articles/SceneInspector/Dependencies.md b/PlotLine/Help/Articles/SceneInspector/Dependencies.md new file mode 100644 index 0000000..cc0cbe0 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Dependencies.md @@ -0,0 +1,16 @@ +--- +title: Scene Dependencies +category: Scene Inspector +tags: scene inspector, dependencies, sequence, continuity +contextKey: sceneInspector.dependencies +micro: Record ordering relationships between scenes. +quickTitle: Scene dependencies +quickSummary: Dependencies explain when one scene must happen before another for logic, causality or continuity. +screenshot: +--- + +# Overview + +Scene dependencies record order requirements. Use them when one scene needs another moment to happen first, or when moving a scene would break cause and effect. + +A hard dependency means the order is essential. A soft dependency means the order is recommended but may be revisable. diff --git a/PlotLine/Help/Articles/SceneInspector/Fields/RelationshipIntensity.md b/PlotLine/Help/Articles/SceneInspector/Fields/RelationshipIntensity.md new file mode 100644 index 0000000..fdc4367 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Fields/RelationshipIntensity.md @@ -0,0 +1,14 @@ +--- +title: Relationship Intensity +category: Scene Inspector +tags: scene inspector, fields, relationships +contextKey: sceneInspector.fields.relationshipIntensity +micro: Record how strong the relationship state is in this scene. +quickTitle: Relationship intensity +quickSummary: Intensity captures the strength of the relationship change, from mild tension to life-altering bond or conflict. +screenshot: +--- + +# Overview + +Use lower values for subtle shifts and higher values for relationship moments that strongly affect choices, trust, attraction, loyalty or conflict. diff --git a/PlotLine/Help/Articles/SceneInspector/Fields/ThreadEventType.md b/PlotLine/Help/Articles/SceneInspector/Fields/ThreadEventType.md new file mode 100644 index 0000000..88bf036 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Fields/ThreadEventType.md @@ -0,0 +1,14 @@ +--- +title: Thread Event Type +category: Scene Inspector +tags: scene inspector, fields, threads +contextKey: sceneInspector.fields.threadEventType +micro: Choose what this scene does to the thread. +quickTitle: Thread event type +quickSummary: Pick the narrative function: start, progress, reveal, twist, branch, split, merge, resolve or abandon. +screenshot: +--- + +# Overview + +Choose the event type that explains the scene's narrative purpose for this thread. If the scene only mentions the thread, Progress is often better than Reveal or Resolve. diff --git a/PlotLine/Help/Articles/SceneInspector/Fields/ThreadMarkerType.md b/PlotLine/Help/Articles/SceneInspector/Fields/ThreadMarkerType.md new file mode 100644 index 0000000..81c8f61 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Fields/ThreadMarkerType.md @@ -0,0 +1,14 @@ +--- +title: Thread Marker Type +category: Scene Inspector +tags: scene inspector, fields, threads +contextKey: sceneInspector.fields.threadMarkerType +micro: Choose the marker used for Timeline display. +quickTitle: Thread marker type +quickSummary: Marker type controls how this thread event appears on Timeline lanes. +screenshot: +--- + +# Overview + +Use marker type to make the Timeline readable. It should match the story beat closely enough that you can scan the lane later and understand the thread's shape. diff --git a/PlotLine/Help/Articles/SceneInspector/Knowledge.md b/PlotLine/Help/Articles/SceneInspector/Knowledge.md new file mode 100644 index 0000000..f7ef3b6 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Knowledge.md @@ -0,0 +1,44 @@ +--- +title: Knowledge +category: Scene Inspector +tags: scene inspector, knowledge, secrets, reader knowledge, continuity +contextKey: sceneInspector.knowledge +micro: Track what characters and readers know, suspect or misunderstand. +quickTitle: Character knowledge +quickSummary: Knowledge records discoveries, secrets, mistaken beliefs and reader awareness so reveals and continuity stay coherent. +screenshot: +--- + +# Overview + +Knowledge tracks information as story state. It helps answer: What does this character know now? Are they guessing? Is the reader ahead of them? Did a reveal happen too early or too late? + +# Awareness States + +Unaware means the character has no meaningful knowledge of the fact. + +Suspects means the character has a hunch, clue or suspicion but no reliable proof. + +Partially Knows means the character has some truth but not the full picture. + +Knows means the character has enough information to act as if the fact is true. + +Progression does not always move neatly upward. A character can be misled, lose confidence, discover a partial truth or have a correct belief undermined. + +# Confidence + +Confidence records certainty. A character may know something confidently, suspect something weakly, or be very confident about a mistaken belief. This distinction is important for dramatic irony and continuity. + +# Reader Knows + +Reader knowledge is separate from character knowledge. If the reader knows the villain's identity but the protagonist does not, the story is using dramatic irony. If the protagonist knows something the reader does not, the story is withholding information. + +# Knowledge Progression + +Use knowledge events for reveals, discoveries, corrected assumptions, regressions and secrets changing hands. Continuity warnings can then help find scenes where a character acts on information they should not yet have, or fails to know something they already learned. + +# Related Guides + +- [Continuity Warnings](/Help/Article/warnings.overview) +- [Story State](/Help/Article/sceneInspector.storyState) +- [Continuity Explorer](/Help/Article/warnings.overview) diff --git a/PlotLine/Help/Articles/SceneInspector/Locations.md b/PlotLine/Help/Articles/SceneInspector/Locations.md new file mode 100644 index 0000000..4681a2b --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Locations.md @@ -0,0 +1,21 @@ +--- +title: Asset Locations +category: Scene Inspector +tags: scene inspector, locations, assets, continuity +contextKey: sceneInspector.locations +micro: Record where important assets are in this scene. +quickTitle: Asset locations +quickSummary: Asset locations help PlotDirector understand where objects are at this point in the story. +screenshot: +--- + +# Overview + +Asset locations record where an important object is during this scene. Use them when location matters even if custody does not. + +This is useful for hidden evidence, parked vehicles, locked rooms, documents left on a desk or objects that can be found later. + +# Related Guides + +- [Assets](/Help/Article/sceneInspector.assets) +- [Locations](/Help/Article/locations.overview) diff --git a/PlotLine/Help/Articles/SceneInspector/Notes.md b/PlotLine/Help/Articles/SceneInspector/Notes.md new file mode 100644 index 0000000..dc33ed7 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Notes.md @@ -0,0 +1,16 @@ +--- +title: Scene Notes +category: Scene Inspector +tags: scene inspector, notes, drafting, revision +contextKey: sceneInspector.notes +micro: Keep drafting thoughts, research reminders and revision questions with the scene. +quickTitle: Scene notes +quickSummary: Scene notes capture working thoughts that do not belong in story continuity but matter while drafting or revising. +screenshot: +--- + +# Overview + +Notes are for the writer's working memory. Use them for revision questions, research reminders, alternate ideas, emotional intent, line-level concerns or anything you do not want to lose while drafting. + +Pinned notes stay prominent. Resolved notes keep the history without continuing to demand attention. diff --git a/PlotLine/Help/Articles/SceneInspector/Overview.md b/PlotLine/Help/Articles/SceneInspector/Overview.md new file mode 100644 index 0000000..45e9ec0 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Overview.md @@ -0,0 +1,30 @@ +--- +title: Scene Inspector +category: Scene Inspector +tags: scene inspector, scenes, continuity, editing +contextKey: sceneInspector.overview +micro: Edit one scene's story purpose, continuity details and writing workflow. +quickTitle: Scene Inspector overview +quickSummary: The Scene Inspector is where a single scene's purpose, time, characters, threads, assets, metrics and continuity evidence are reviewed together. +screenshot: +--- + +# Overview + +The Scene Inspector is the close-up view for one scene. The Timeline shows how scenes relate across the book; the Scene Inspector records what is true inside a specific scene. + +Use it to capture story purpose, outcome, time, characters, knowledge, relationships, assets, custody, locations, metrics, warnings, notes and writing workflow. You do not need every section for every scene. The goal is to record the details that matter for the scene's role in the story and for future continuity. + +# How To Work With It + +Start with the scene's basic shape: title, summary, timing, location, purpose and outcome. Then add the people, objects, plot threads and continuity details that change because this scene exists. + +For example, if a character discovers a secret, record it in Knowledge. If a letter changes hands, record it in Assets or Custody. If a relationship turns colder, record a Relationship Event. If the scene pays off a mystery clue, record a Plot Thread Event. + +# Related Guides + +- [Timeline](/Help/Article/timeline.overview) +- [Knowledge](/Help/Article/sceneInspector.knowledge) +- [Relationships](/Help/Article/sceneInspector.relationships) +- [Threads](/Help/Article/sceneInspector.threads) +- [Assets](/Help/Article/sceneInspector.assets) diff --git a/PlotLine/Help/Articles/SceneInspector/Purpose.md b/PlotLine/Help/Articles/SceneInspector/Purpose.md new file mode 100644 index 0000000..36131c7 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Purpose.md @@ -0,0 +1,21 @@ +--- +title: Purpose and Outcome +category: Scene Inspector +tags: scene inspector, scene purpose, outcome, revision +contextKey: sceneInspector.purpose +micro: Clarify why the scene exists and what changes by the end. +quickTitle: Purpose and outcome +quickSummary: Scene purpose and outcome notes help you see what narrative job the scene performs and whether it changes the story. +screenshot: +--- + +# Overview + +Purpose explains the work a scene is doing: setup, reveal, payoff, relationship movement, action, transition, character development or another story function. + +Outcome records what is different by the end. The change can be external, emotional, informational or relational. If you cannot name the outcome, the scene may need sharper story movement. + +# Related Guides + +- [Scene Cards](/Help/Article/timeline.sceneCards) +- [Scenes](/Help/Article/scenes.overview) diff --git a/PlotLine/Help/Articles/SceneInspector/Relationships.md b/PlotLine/Help/Articles/SceneInspector/Relationships.md new file mode 100644 index 0000000..4bd5a52 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Relationships.md @@ -0,0 +1,35 @@ +--- +title: Relationships +category: Scene Inspector +tags: scene inspector, relationships, character arcs, continuity +contextKey: sceneInspector.relationships +micro: Track relationship changes as scene events. +quickTitle: Relationship events +quickSummary: Relationship events show how family, friendship, romance, rivalry, mentorship and professional bonds evolve through scenes. +screenshot: +--- + +# Overview + +Relationships change through scenes. A conversation may deepen trust, expose betrayal, begin attraction, damage a friendship or shift a professional alliance. Recording those changes helps character arcs stay visible. + +# Relationship Types + +Types describe the shape of the bond: family, friendship, romance, rivalry, mentorship, professional, alliance or another story-specific connection. + +# Reciprocity + +Relationships can be mutual or one-sided. One character may love, trust, resent or mentor another without the feeling being returned. That asymmetry is often the story. + +# Intensity + +Intensity records relationship strength. A low-intensity rivalry might be irritation. A high-intensity rivalry might drive major choices. A romance can be quiet but intense, or public but shallow. + +# Evolution + +Use events when the relationship state changes in this scene. This helps you see whether a breakup has setup, whether forgiveness arrives too quickly, or whether a character behaves as if a relationship has changed before the scene that actually changes it. + +# Related Guides + +- [Characters](/Help/Article/characters.overview) +- [Character Appearances](/Help/Article/timeline.characterAppearances) diff --git a/PlotLine/Help/Articles/SceneInspector/StoryState.md b/PlotLine/Help/Articles/SceneInspector/StoryState.md new file mode 100644 index 0000000..5a1625a --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/StoryState.md @@ -0,0 +1,22 @@ +--- +title: Story State +category: Scene Inspector +tags: scene inspector, story state, continuity, warnings +contextKey: sceneInspector.storyState +micro: Review the known character and asset state at this point in the story. +quickTitle: Story state +quickSummary: Story State summarises current character and asset continuity evidence around this scene. +screenshot: +--- + +# Overview + +Story State is a continuity snapshot. It helps you see what PlotDirector currently understands about characters and assets at this point in the sequence. + +Use it when a warning looks surprising or when you need to check whether the story has enough evidence for a character location, asset holder or important state. + +# Related Guides + +- [Knowledge](/Help/Article/sceneInspector.knowledge) +- [Assets](/Help/Article/sceneInspector.assets) +- [Continuity Warnings](/Help/Article/warnings.overview) diff --git a/PlotLine/Help/Articles/SceneInspector/Threads.md b/PlotLine/Help/Articles/SceneInspector/Threads.md new file mode 100644 index 0000000..e4332d3 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Threads.md @@ -0,0 +1,25 @@ +--- +title: Threads +category: Scene Inspector +tags: scene inspector, plot threads, timeline, thread health +contextKey: sceneInspector.threads +micro: Attach plot thread events to the scene. +quickTitle: Scene plot threads +quickSummary: Thread events describe what this scene does for a plot question, mystery, promise, arc or payoff. +screenshot: +--- + +# Overview + +Threads are specific unresolved story concerns. In the Scene Inspector, a thread event records how this scene affects that concern. On the Timeline, those events become lane markers. + +Use importance to show how central a thread is. Use lifecycle events to show whether the scene starts, progresses, reveals, twists, branches, splits, merges, resolves or abandons the thread. + +# Why It Matters + +Thread events prevent story promises from becoming invisible. If a clue is planted, mark it. If the reader receives a reveal, mark it. If a subplot is intentionally abandoned, mark that too so thread health knows the silence is deliberate. + +# Related Guides + +- [Plot Thread Lanes](/Help/Article/timeline.plotThreadLanes) +- [Thread Health](/Help/Article/timeline.threadHealth) diff --git a/PlotLine/Help/Articles/SceneInspector/Time.md b/PlotLine/Help/Articles/SceneInspector/Time.md new file mode 100644 index 0000000..9a22401 --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Time.md @@ -0,0 +1,21 @@ +--- +title: Time +category: Scene Inspector +tags: scene inspector, time, continuity, chronology +contextKey: sceneInspector.time +micro: Record when a scene happens and how certain that timing is. +quickTitle: Scene time +quickSummary: Scene time helps chronology, age checks, sequence logic and continuity warnings understand when the scene occurs. +screenshot: +--- + +# Overview + +Time fields tell PlotDirector when a scene happens. Use exact dates when chronology matters, relative time when the draft only needs "later that night" or "three weeks after the funeral", and confidence when the timing is still provisional. + +Accurate time helps continuity checks find impossible sequences, age issues, travel gaps and story events that happen in the wrong order. + +# Related Guides + +- [Continuity Warnings](/Help/Article/warnings.overview) +- [Scene Inspector](/Help/Article/sceneInspector.overview) diff --git a/PlotLine/Help/Articles/SceneInspector/Warnings.md b/PlotLine/Help/Articles/SceneInspector/Warnings.md new file mode 100644 index 0000000..922c8ed --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Warnings.md @@ -0,0 +1,16 @@ +--- +title: Continuity Warnings +category: Scene Inspector +tags: scene inspector, warnings, continuity +contextKey: sceneInspector.warnings +micro: Review continuity issues related to this scene. +quickTitle: Scene warnings +quickSummary: Continuity warnings highlight possible contradictions or missing evidence for this scene. +screenshot: +--- + +# Overview + +Warnings are prompts for review. They point to places where PlotDirector's recorded evidence suggests something may be missing, contradictory or worth checking. + +Dismiss a warning when it is no longer useful. Mark it intentional when the apparent contradiction is a deliberate author choice. diff --git a/PlotLine/Help/Articles/SceneInspector/Writer.md b/PlotLine/Help/Articles/SceneInspector/Writer.md new file mode 100644 index 0000000..75769ff --- /dev/null +++ b/PlotLine/Help/Articles/SceneInspector/Writer.md @@ -0,0 +1,16 @@ +--- +title: Writer Workspace +category: Scene Inspector +tags: scene inspector, writer, drafting, workflow +contextKey: sceneInspector.writer +micro: Track drafting progress for this scene. +quickTitle: Writer workspace +quickSummary: Writer Workspace fields connect this scene to drafting priority, word counts, blockers and chapter workflow. +screenshot: +--- + +# Overview + +Writer Workspace fields are practical drafting tools. They help you decide what to write next, estimate effort, record progress and mark blockers. + +These fields do not change story continuity. They support the working process around the scene. diff --git a/PlotLine/Help/Articles/Timeline/AssetEvents.md b/PlotLine/Help/Articles/Timeline/AssetEvents.md new file mode 100644 index 0000000..93a47bb --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/AssetEvents.md @@ -0,0 +1,40 @@ +--- +title: Asset Events +category: Timeline +tags: timeline, assets, custody, continuity, evidence +contextKey: timeline.assetEvents +micro: Track important objects, evidence and documents across scenes. +quickTitle: Asset events +quickSummary: Asset events show where important story objects change state, location or custody so continuity remains visible. +screenshot: +--- + +# Overview + +Asset events represent important changes to objects, evidence, documents, vehicles, weapons, keys, letters, phones, maps or other story items. If an object matters to the plot or continuity, it should have a visible trail. + +Tracking assets helps answer questions such as: Who has the letter? Where is the weapon? Has the key been found yet? Could this character know about the document? + +# Why It Matters + +Objects often create continuity problems because they move quietly. A scene may hand a clue to one character, hide it in a room, destroy it or change its meaning. Asset events make those changes explicit. + +Custody and location links help Continuity Explorer and warnings reason about whether the story state makes sense. + +# Examples + +A letter is discovered in chapter two, stolen in chapter four and read aloud in chapter eight. + +A weapon moves from a locked cabinet to a suspect's car. + +A key is copied, lost, found and finally used. + +A document is forged, signed, hidden and exposed. + +A vehicle changes hands and later becomes an alibi problem. + +# Related Guides + +- [Story Assets](/Help/Article/storyAssets.overview) +- [Asset Custody](/Help/Article/sceneInspector.custody) +- [Continuity Explorer](/Help/Article/warnings.overview) diff --git a/PlotLine/Help/Articles/Timeline/CharacterAppearances.md b/PlotLine/Help/Articles/Timeline/CharacterAppearances.md new file mode 100644 index 0000000..e60c1ce --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/CharacterAppearances.md @@ -0,0 +1,32 @@ +--- +title: Character Appearances +category: Timeline +tags: timeline, characters, appearances, point of view +contextKey: timeline.characterAppearances +micro: See where characters are present and active across the story. +quickTitle: Character appearances +quickSummary: Character appearance lanes show where characters appear, what role they play and how focused views can support character arc review. +screenshot: +--- + +# Overview + +Character appearance markers show where a character is present in the story. They help you see who is active, who disappears for long stretches, and whether a character's role matches the arc you intend. + +Presence can mean more than standing in the room. A character may be a point-of-view character, a main participant, a mentioned person or someone whose absence matters. + +# How Authors Use This + +Focus on one character to review their arc. + +Check whether a point-of-view character has enough page presence. + +Find long absences that may need a reminder, explanation or deliberate silence. + +Compare character activity against relationship, knowledge and attribute changes in the Scene Inspector. + +# Related Guides + +- [Characters](/Help/Article/characters.overview) +- [Character Attributes](/Help/Article/sceneInspector.characterAttributes) +- [Relationships](/Help/Article/sceneInspector.relationships) diff --git a/PlotLine/Help/Articles/Timeline/Fields/BookFilter.md b/PlotLine/Help/Articles/Timeline/Fields/BookFilter.md new file mode 100644 index 0000000..d53e76c --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/Fields/BookFilter.md @@ -0,0 +1,14 @@ +--- +title: Timeline Book Filter +category: Timeline +tags: timeline, fields, filters, books +contextKey: timeline.fields.bookFilter +micro: Choose whether the Timeline shows all books or one book. +quickTitle: Book filter +quickSummary: Use the book filter to focus timeline review on one volume without removing project-wide planning data. +screenshot: +--- + +# Overview + +Choose one book when you are revising a single volume. Choose all books when you need series-wide continuity, long-running threads or project pacing. diff --git a/PlotLine/Help/Articles/Timeline/Fields/FocusId.md b/PlotLine/Help/Articles/Timeline/Fields/FocusId.md new file mode 100644 index 0000000..e3698df --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/Fields/FocusId.md @@ -0,0 +1,14 @@ +--- +title: Timeline Focus ID +category: Timeline +tags: timeline, fields, focus +contextKey: timeline.fields.focusId +micro: Provide the ID of the story item to focus. +quickTitle: Focus ID +quickSummary: Focus ID is the specific character, asset, plot line, plot thread, location or scene identifier used by focus mode. +screenshot: +--- + +# Overview + +Focus ID is useful when a link or saved view already knows the exact item to highlight. Most day-to-day focusing is easier through filters, lane links or saved views. diff --git a/PlotLine/Help/Articles/Timeline/Fields/FocusType.md b/PlotLine/Help/Articles/Timeline/Fields/FocusType.md new file mode 100644 index 0000000..ff7c7cd --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/Fields/FocusType.md @@ -0,0 +1,14 @@ +--- +title: Timeline Focus Type +category: Timeline +tags: timeline, fields, focus +contextKey: timeline.fields.focusType +micro: Choose the kind of story item to highlight. +quickTitle: Focus type +quickSummary: Focus type tells the Timeline whether you want to highlight a character, asset, plot line, plot thread, location or scene. +screenshot: +--- + +# Overview + +Focus type controls what kind of story evidence the Timeline should emphasise. Use it when you know you want one lane, character, object or scene to stand out while the rest remains visible for context. diff --git a/PlotLine/Help/Articles/Timeline/Fields/MetricEdit.md b/PlotLine/Help/Articles/Timeline/Fields/MetricEdit.md new file mode 100644 index 0000000..1a1d7dc --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/Fields/MetricEdit.md @@ -0,0 +1,14 @@ +--- +title: Timeline Metric Editing +category: Timeline +tags: timeline, fields, metrics, pacing +contextKey: timeline.fields.metricEdit +micro: Edit metric shape when one metric line is selected. +quickTitle: Metric editing +quickSummary: Show a single metric line when you want to adjust its scene values directly from the Timeline. +screenshot: +--- + +# Overview + +Metric editing is for pacing passes. Show one metric line, then adjust scene values where the shape does not match your intention. Treat the numbers as a writing aid, not a score. diff --git a/PlotLine/Help/Articles/Timeline/Fields/SavedViewName.md b/PlotLine/Help/Articles/Timeline/Fields/SavedViewName.md new file mode 100644 index 0000000..e182dde --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/Fields/SavedViewName.md @@ -0,0 +1,14 @@ +--- +title: Saved View Name +category: Timeline +tags: timeline, fields, saved views +contextKey: timeline.fields.savedViewName +micro: Name a reusable Timeline lens. +quickTitle: Saved view name +quickSummary: Give saved views practical names based on the revision question they answer. +screenshot: +--- + +# Overview + +Use names like "Central mystery pass", "Beth relationship arc" or "Warnings review". A clear name makes the view useful when you return during revision. diff --git a/PlotLine/Help/Articles/Timeline/FiltersAndFocus.md b/PlotLine/Help/Articles/Timeline/FiltersAndFocus.md new file mode 100644 index 0000000..6e981d7 --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/FiltersAndFocus.md @@ -0,0 +1,40 @@ +--- +title: Filters and Focus +category: Timeline +tags: timeline, filters, focus, characters, assets, threads +contextKey: timeline.filters +micro: Narrow the Timeline to the story concern you are reviewing. +quickTitle: Filters and focus +quickSummary: Filters change which scenes and lanes are emphasised so you can review a book, character, asset, plot thread or warning pattern. +screenshot: +--- + +# Overview + +Filters help you review a specific part of the story without changing the story itself. They change what is visible or emphasised on the Timeline, so you can answer focused revision questions. + +Book, chapter and scene filters narrow the structural scope. Character, asset, plot line, plot thread, location, warning and purpose filters narrow by story evidence. Focus mode highlights the matching scenes and dims the rest. + +# Examples + +Filter to one book when revising a sequel but keep the project context intact. + +Filter to a character to find every scene where they appear, then check whether their emotional state or knowledge changes make sense. + +Filter to an asset such as a letter, weapon, key, document, vehicle or piece of evidence to see where it appears, moves or changes custody. + +Filter to a thread to trace a mystery question from setup to reveal. + +Show warnings only when you are doing a continuity pass and want to move quickly from problem scene to problem scene. + +# Things To Remember + +Filtering is a lens, not a delete action. Scenes that disappear or dim have not been removed. + +If a scene you expect is missing, check whether the scene has the character, asset, location, thread event or purpose attached. The Timeline can only filter by recorded planning evidence. + +# Related Guides + +- [Saved Views](/Help/Article/timeline.savedViews) +- [Character Appearances](/Help/Article/timeline.characterAppearances) +- [Asset Events](/Help/Article/timeline.assetEvents) diff --git a/PlotLine/Help/Articles/Timeline/Metrics.md b/PlotLine/Help/Articles/Timeline/Metrics.md new file mode 100644 index 0000000..0c9b0bc --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/Metrics.md @@ -0,0 +1,47 @@ +--- +title: Metrics +category: Timeline +tags: timeline, metrics, pacing, intensity, emotion +contextKey: timeline.metrics +micro: Use scene metrics to sketch pacing and emotional shape. +quickTitle: Timeline metrics +quickSummary: Metrics are author-defined pacing tools that help you see intensity, tension, emotion, action, mystery and other story qualities across scenes. +screenshot: +--- + +# Overview + +Metrics are author tools, not objective measurements. A value is your judgement about what the scene is doing. The Timeline turns those judgements into a pacing shape so you can see peaks, rests, repetition and contrast. + +# Common Metrics + +Overall Intensity represents the combined pressure of the scene. Raise it for climaxes, confrontations and major reversals. Lower it for recovery, setup or quiet reflection. + +Tension represents suspense, uncertainty and pressure. Raise it when danger, secrets or stakes tighten. Lower it when answers arrive or characters get breathing room. + +Emotional Weight represents how strongly the scene lands emotionally. Raise it for grief, confession, betrayal, intimacy or sacrifice. Lower it for lighter connective scenes. + +Action represents physical movement and external incident. Raise it for fights, chases, escapes and urgent activity. Lower it for dialogue, planning or introspection. + +Darkness represents grimness, threat, moral cost or bleakness. Raise it for cruelty, loss or dread. Lower it when the scene restores safety or warmth. + +Romance represents romantic development. Raise it for attraction, intimacy, longing, conflict or commitment. Lower it when romance is not the scene's main work. + +Sexual Charge represents sensual or erotic tension. Raise it when desire is deliberately present. Lower it when intimacy is emotional, practical or absent. + +Violence represents physical harm or threat. Raise it for combat, injury or brutality. Lower it for scenes without violent pressure. + +Hope / Lightness represents relief, optimism, tenderness or brightness. Raise it when the story gives readers air. Lower it when the scene closes down possibility. + +Comedy represents humour and comic release. Raise it for jokes, irony, banter or absurdity. Lower it when humour would undercut the intended tone. + +Mystery represents unanswered questions, clues and hidden information. Raise it for discoveries, suspicious details and reveals that create more questions. Lower it after answers land. + +# How Metrics Help Pacing + +Metrics help you compare intention against shape. If every scene is high intensity, readers may feel numb. If a mystery has a long flat stretch, the clue trail may need attention. If hope never rises, the book may feel darker than intended. + +# Related Guides + +- [Scene Metrics](/Help/Article/sceneMetrics.overview) +- [Story Health Scene Metric Shape](/Help/Article/storyHealth.sceneMetricShape) diff --git a/PlotLine/Help/Articles/Timeline/Overview.md b/PlotLine/Help/Articles/Timeline/Overview.md new file mode 100644 index 0000000..4c65734 --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/Overview.md @@ -0,0 +1,60 @@ +--- +title: Timeline +category: Timeline +tags: timeline, scenes, continuity, planning, pacing +contextKey: timeline.overview +micro: Understand the Timeline as the planning spine for scenes, continuity and story shape. +quickTitle: What is the Timeline? +quickSummary: The Timeline shows how books, chapters and scenes connect to plot threads, characters, assets, metrics and continuity checks. +screenshot: +--- + +# Overview + +The Timeline is the central planning view for a project. It lays out the story from project to book to chapter to scene, then adds the evidence that helps you see whether the story is developing cleanly: plot threads, character appearances, important assets, scene metrics, locations, warnings and story health signals. + +Use it when you want to step back from individual scene editing and ask, "What is happening across the whole story?" A mystery writer might follow the clue trail, a romance writer might watch emotional closeness build and break, and a series writer might check whether an object or secret has stayed consistent across books. + +# The Timeline Hierarchy + +The project is the full container for the story world. A project may hold one book or a series. + +A book is a major narrative unit within the project. Book filters let you focus on one volume without losing project-wide context. + +A chapter groups scenes into reading order. On the Timeline, chapters give the scene cards their structure. + +A scene is the basic unit of story movement. Scene cards are where PlotDirector brings together purpose, outcome, time, participants, assets, metrics and continuity evidence. + +# How Timeline Connects To Other Systems + +Plot Threads appear as thread event markers so you can see where questions start, develop, twist, branch and resolve. + +Metrics turn individual scene ratings into a visible pacing shape. They help you spot long flat stretches, repeated peaks or scenes that need a quieter beat. + +Characters appear in lanes and scene cards so you can follow presence, point of view, activity and continuity. + +Assets appear when important objects, clues, weapons, documents or evidence change state, location or custody. + +Continuity systems use scene data to produce warnings. The Timeline then makes those warnings visible in context. + +Continuity Explorer, Story Health and Analytics use the same planning evidence from scenes, threads, characters, assets and metrics to help you inspect the story from different angles. + +# Typical Author Workflows + +For a mystery, filter to the investigation thread and check whether clues, reveals and false turns are fairly spaced before the solution. + +For a romance, save a view that focuses on the central characters, relationship events and Romance or Emotional Weight metrics. This makes it easier to see whether closeness, conflict and reconciliation have a satisfying rhythm. + +For a character arc, focus on one character and follow their appearances, knowledge changes, injuries, emotional state and key relationship scenes. + +For continuity, use the Timeline with warnings visible, then open the Scene Inspector for the affected scene and fix the missing location, custody or knowledge detail. + +For pacing, compare intensity, tension, action, hope, comedy or mystery across the scene sequence. The numbers are author tools, not objective truth; they help you make your intended shape visible. + +# Related Guides + +- [Scene Cards](/Help/Article/timeline.sceneCards) +- [Filters and Focus](/Help/Article/timeline.filters) +- [Plot Thread Lanes](/Help/Article/timeline.plotThreadLanes) +- [Scene Inspector](/Help/Article/sceneInspector.overview) +- [Story Health](/Help/Article/storyHealth.overview) diff --git a/PlotLine/Help/Articles/Timeline/PlotThreadLanes.md b/PlotLine/Help/Articles/Timeline/PlotThreadLanes.md new file mode 100644 index 0000000..2f2b113 --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/PlotThreadLanes.md @@ -0,0 +1,52 @@ +--- +title: Plot Thread Lanes +category: Timeline +tags: timeline, plot threads, events, reveals, continuity +contextKey: timeline.plotThreadLanes +micro: Follow plot thread events across scenes. +quickTitle: Plot thread lanes +quickSummary: Plot thread lanes show where story questions begin, develop, twist, branch, merge, resolve or are intentionally abandoned. +screenshot: +--- + +# Overview + +Plot thread lanes turn scattered story promises into a visible path. A lane helps you see whether a mystery, relationship question, political scheme, secret, clue chain or emotional promise is being carried through the scenes. + +Each marker is a thread event attached to a scene. The marker is not just a button; it records what the scene does for the reader's expectation. + +# Thread Events + +Start begins a thread. Use it when the reader first receives a question or promise, such as "Who sent the letter?" + +Progress develops the thread without solving it. A suspect lies, a clue deepens the question, or a relationship takes a meaningful step. + +Reveal gives the reader or a character new truth. For example, the locked room was opened from inside. + +Twist changes the reader's interpretation. The friendly witness is connected to the victim. + +Branch creates a new related thread from an existing one. A missing key leads to a second question about who had access. + +Split divides one thread into multiple concerns. A conspiracy thread might split into motive, method and cover-up. + +Merge brings related threads together. Two apparently separate clues point to the same culprit. + +Resolve pays off the thread. The question is answered or the emotional promise is fulfilled. + +Abandon marks an intentional drop. Use it when a character gives up, a false trail is deliberately left unresolved, or the story chooses not to answer because that is the point. + +# Common Uses + +Track a mystery from clue to reveal. + +Track a romance from attraction to rupture to reconciliation. + +Track a character arc promise from wound to choice to change. + +Track a series question that should not vanish between books. + +# Related Guides + +- [Thread Health](/Help/Article/timeline.threadHealth) +- [Plot Threads](/Help/Article/sceneInspector.threads) +- [Plot Lines](/Help/Article/timeline.plotLines) diff --git a/PlotLine/Help/Articles/Timeline/SavedViews.md b/PlotLine/Help/Articles/Timeline/SavedViews.md new file mode 100644 index 0000000..3e3d50c --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/SavedViews.md @@ -0,0 +1,35 @@ +--- +title: Saved Views +category: Timeline +tags: timeline, saved views, revision, workflow +contextKey: timeline.savedViews +micro: Save useful Timeline filter and visibility combinations. +quickTitle: Saved views +quickSummary: Saved Views let you return to common revision lenses such as one character, one romance arc, one mystery thread or a warnings-only pass. +screenshot: +--- + +# Overview + +Saved Views preserve the current Timeline lens so you can reuse it later. They are useful when you repeatedly return to the same story question during drafting or revision. + +A view can capture the active filters and section visibility. For example, you might create a view for one protagonist, another for the romance arc, another for the central mystery, and another for continuity warnings. + +# Useful Saved Views + +A character-focused view shows one character's scenes, appearances and relevant story evidence. + +A romance view can combine the couple, relationship events, romance metrics and emotional weight. + +A mystery view can focus on the investigation plot line, thread events, asset evidence and Mystery metric. + +A revision view can show warnings, revision status, purpose and pacing while hiding lanes you do not need for that pass. + +# Writer Tip + +Name views for the question they answer: "Where is Beth's grief visible?" is often more useful than "Beth filter". + +# Related Guides + +- [Filters and Focus](/Help/Article/timeline.filters) +- [Metrics](/Help/Article/timeline.metrics) diff --git a/PlotLine/Help/Articles/Timeline/SceneCards.md b/PlotLine/Help/Articles/Timeline/SceneCards.md new file mode 100644 index 0000000..547ad3e --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/SceneCards.md @@ -0,0 +1,38 @@ +--- +title: Scene Cards +category: Timeline +tags: timeline, scenes, cards, continuity +contextKey: timeline.sceneCards +micro: Scene cards are the Timeline's building blocks. +quickTitle: Scene cards +quickSummary: Scene cards show the scenes in reading order and surface the planning details that matter most at timeline level. +screenshot: +--- + +# Overview + +Scene cards represent the story's actual sequence. Each card is one scene in its chapter and book, which makes the cards the foundation of the Timeline. + +A card can show the scene number, title, revision status, point of view, time label, location, warning count, dependency count, purpose chips, a short summary and metric highlights. It is intentionally compact: the card is for scanning, while the Scene Inspector is for editing the deeper detail. + +# Why They Matter + +Scene cards connect the broad outline to the continuity model. When a card shows a location, warning, metric or purpose, it is not just decoration; it is evidence that other systems can use. + +For example, if "Beth hides the key" is a scene card, the connected asset event can later explain why another character should not possess that key. If the card has high Mystery and low Action, the pacing shape can show that this scene is doing quiet clue work rather than physical escalation. + +# Common Workflows + +Open a card when you want to inspect or revise the scene. + +Use cards to scan chapter balance: action scene, aftermath scene, clue scene, relationship scene. + +Use warning badges to find scenes that need continuity attention. + +Use purpose chips and metric summaries to check whether scenes are earning their place in the story. + +# Related Guides + +- [Timeline](/Help/Article/timeline.overview) +- [Scene Inspector Overview](/Help/Article/sceneInspector.overview) +- [Metrics](/Help/Article/timeline.metrics) diff --git a/PlotLine/Help/Articles/Timeline/ThreadHealth.md b/PlotLine/Help/Articles/Timeline/ThreadHealth.md new file mode 100644 index 0000000..8cb8438 --- /dev/null +++ b/PlotLine/Help/Articles/Timeline/ThreadHealth.md @@ -0,0 +1,36 @@ +--- +title: Thread Health +category: Timeline +tags: timeline, plot threads, story health, warnings +contextKey: timeline.threadHealth +micro: Use thread health warnings to find storylines that may have been forgotten. +quickTitle: Thread health +quickSummary: Thread health helps you spot neglected, dangling, questionably resolved or abandoned plot threads before readers feel the gap. +screenshot: +--- + +# Overview + +Thread health is a revision aid. It looks for plot threads that may have gone quiet for too long, resolved too weakly, or been left dangling after the story promised the reader attention. + +A healthy thread has a clear start, meaningful development and an intentional outcome. It does not need constant activity, but its silence should feel deliberate. + +# Warning Types + +Neglected threads have not appeared for a while. This may be fine for a slow-burn mystery, but it may also mean the thread was forgotten. + +Dangling threads have no satisfying resolution yet. They are useful during drafting and risky near the end of a book. + +Questionable resolutions suggest the payoff may not have enough setup or may occur in an odd place. + +Abandoned threads are marked as intentionally dropped. This can be right for false leads, character failures or unresolved series questions, but the choice should be conscious. + +# How To Use It + +Use warnings as prompts, not verdicts. If the story intentionally withholds a thread for ten chapters, keep it. If you forgot the thread existed, add a progress, reveal or resolution event where the draft needs one. + +# Related Guides + +- [Plot Thread Lanes](/Help/Article/timeline.plotThreadLanes) +- [Story Health Plot Thread Health](/Help/Article/storyHealth.plotThreadHealth) +- [Continuity Warnings](/Help/Article/warnings.overview) diff --git a/PlotLine/Views/Scenes/_SceneInspector.cshtml b/PlotLine/Views/Scenes/_SceneInspector.cshtml index 8474f1d..7e65044 100644 --- a/PlotLine/Views/Scenes/_SceneInspector.cshtml +++ b/PlotLine/Views/Scenes/_SceneInspector.cshtml @@ -33,7 +33,7 @@

Working context

-

@(string.IsNullOrWhiteSpace(Model.SceneTitle) ? "Untitled scene" : Model.SceneTitle)

+

@(string.IsNullOrWhiteSpace(Model.SceneTitle) ? "Untitled scene" : Model.SceneTitle)

@if (Model.Chapter is not null) { @@ -109,7 +109,7 @@

-

Timing & Structure

+

Timing & Structure

@@ -152,11 +152,11 @@

Time

- +
- +
@@ -199,7 +199,7 @@
-

Purposes

+

Purposes

@foreach (var purpose in Model.ScenePurposeTypes) { @@ -227,7 +227,7 @@
-

Scene Metrics

+

Scene Metrics

@if (!Model.Metrics.Any()) {
@@ -283,7 +283,7 @@
-

Scene Notes

+

Scene Notes

@if (!Model.Notes.Any()) {

No working notes yet. Capture drafting thoughts, research reminders, or revision questions as they come up.

@@ -354,7 +354,7 @@
-

Characters

+

Characters

@if (!Model.SceneCharacters.Any()) {

No characters attached to this scene yet. Add the people who appear, are mentioned, or meaningfully affect the scene.

@@ -542,7 +542,7 @@
-

Character Attributes

+

Character Attributes

@if (Model.CharacterAttributeEvents.Any()) {
@@ -590,7 +590,7 @@
-

Character Knowledge

+

Character Knowledge

@if (Model.CharacterKnowledge.Any()) {
@@ -637,7 +637,7 @@
-

Relationship Events

+

Relationship Events

@if (Model.RelationshipEvents.Any()) {
@@ -685,7 +685,7 @@
- +
@@ -702,7 +702,7 @@
-

Plot Thread Events

+

Plot Thread Events

@if (!Model.ThreadEvents.Any()) {

No plot thread events attached to this scene yet. Add clues, reveals, promises, payoffs, or reversals when the scene touches a thread.

@@ -740,7 +740,7 @@ }
- +
- +
- +
- +
@@ -1014,7 +1014,7 @@
-

Story Assets

+

Story Assets

@if (!Model.AssetEvents.Any()) {

No asset events attached to this scene yet. Add one when an object, clue, secret, or important item changes here.

@@ -1068,7 +1068,7 @@
- +
@@ -1098,7 +1098,7 @@
-

Asset Locations

+

Asset Locations

@if (!Model.SceneAssetLocations.Any()) {

No assets have been placed in a location for this scene yet.

@@ -1154,7 +1154,7 @@
-

Asset Custody

+

Asset Custody

@if (!Model.AssetCustodyEvents.Any()) {

No custody entries attached to this scene yet.

@@ -1193,7 +1193,7 @@
- +
@@ -1219,7 +1219,7 @@
$"{x.CharacterName} {x.CurrentLocation} {x.State} {x.LastConfirmed}"))} {string.Join(' ', Model.StoryState.Assets.Select(x => $"{x.AssetName} {x.CurrentHolderOrLocation} {x.State} {x.LastConfirmed}"))}")"> -

Story State

+

Story State

Characters

@if (!Model.StoryState.Characters.Any()) @@ -1289,7 +1289,7 @@
-

Writer Workspace

+

Writer Workspace

Chapter workflow
@@ -1355,7 +1355,7 @@
-

Scene Checklist

+

Scene Checklist

@foreach (var item in Model.ChecklistItems) { @@ -1387,7 +1387,7 @@
-

Attachments / Research

+

Attachments / Research

@if (Model.StorageUsage is not null) {

Storage used: @Model.StorageUsage.DisplayLabel

@@ -1509,7 +1509,7 @@
-

Continuity Warnings

+

Continuity Warnings

@if (Model.SceneID > 0 && Model.ReturnProjectID.HasValue) { @@ -1571,7 +1571,7 @@
-

Scene Dependencies

+

Scene Dependencies

This scene depends on

diff --git a/PlotLine/Views/Timeline/Index.cshtml b/PlotLine/Views/Timeline/Index.cshtml index a56ccdb..3b85913 100644 --- a/PlotLine/Views/Timeline/Index.cshtml +++ b/PlotLine/Views/Timeline/Index.cshtml @@ -127,11 +127,11 @@

Story timeline

-

@Model.Project.ProjectName

+

@Model.Project.ProjectName

- @@ -161,10 +161,11 @@
Filters and focus +
- + @@ -194,19 +195,19 @@
- +
- +
- +
- +
@@ -234,7 +235,7 @@
- +
- +
@@ -348,6 +349,7 @@
Saved Views +
@@ -375,7 +377,8 @@ - + + @if (Model.ViewPresets.Any()) @@ -416,6 +419,11 @@
} + +
Drag Sources
@@ -597,6 +605,7 @@ else {
+ @Model.OrderedScenes.Count scene@(Model.OrderedScenes.Count == 1 ? "" : "s")
@@ -740,6 +749,7 @@ else
+ @Model.OrderedScenes.Count scene@(Model.OrderedScenes.Count == 1 ? "" : "s")
@@ -758,6 +768,7 @@ else
@Html.AntiForgeryToken() Show only one metric line to edit its curve. +
@@ -823,7 +834,9 @@ else
+ Thread event markers by scene +
@foreach (var group in Model.PlotLanes.GroupBy(x => x.PlotLine.PlotLineTypeName).OrderBy(x => x.Key)) @@ -899,6 +912,7 @@ else
+ Asset event markers by scene
@@ -966,6 +980,7 @@ else
+ All project characters, grouped by role and activity
diff --git a/PlotLine/wwwroot/css/site.css b/PlotLine/wwwroot/css/site.css index b463dbd..467a8f3 100644 --- a/PlotLine/wwwroot/css/site.css +++ b/PlotLine/wwwroot/css/site.css @@ -2437,6 +2437,22 @@ body.timeline-inspector-resizing { background: rgba(47, 111, 99, 0.08); } +.timeline-scroll-hint { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + border: 1px solid rgba(47, 111, 99, 0.22); + border-radius: 10px; + margin-bottom: 16px; + padding: 10px 12px; + background: rgba(47, 111, 99, 0.08); +} + +.timeline-scroll-hint[hidden] { + display: none; +} + .timeline-scene-card.filter-dim, .timeline-scene-card.focus-dim, .lane-dim { diff --git a/PlotLine/wwwroot/css/site.min.css b/PlotLine/wwwroot/css/site.min.css index 1884ccb..e63aedb 100644 --- a/PlotLine/wwwroot/css/site.min.css +++ b/PlotLine/wwwroot/css/site.min.css @@ -1 +1 @@ -html{font-size:15px;min-height:100%}@media(min-width:768px){html{font-size:16px}}:root{--plotline-ink:#1e252b;--plotline-muted:#66717b;--plotline-paper:#fbfaf7;--plotline-panel:#fff;--plotline-line:#d8ddd8;--plotline-accent:#2f6f63;--plotline-accent-dark:#22534a;--plotline-soft:#eef5f2;--timeline-label-width:180px;--timeline-scene-width:220px;--timeline-grid-gap:10px}body{min-height:100%;margin-bottom:0;color:var(--plotline-ink);background:var(--plotline-paper)}a{color:var(--plotline-accent-dark)}.btn-primary{--bs-btn-bg:var(--plotline-accent);--bs-btn-border-color:var(--plotline-accent);--bs-btn-hover-bg:var(--plotline-accent-dark);--bs-btn-hover-border-color:var(--plotline-accent-dark)}.btn-outline-primary{--bs-btn-color:var(--plotline-accent-dark);--bs-btn-border-color:var(--plotline-accent);--bs-btn-hover-bg:var(--plotline-accent);--bs-btn-hover-border-color:var(--plotline-accent)}.plotline-nav{background:rgba(255,255,255,.94);backdrop-filter:blur(8px)}.plotline-shell{max-width:1480px;padding-left:24px;padding-right:24px}.plotline-shell-wide{max-width:none;padding-left:clamp(18px,2vw,32px);padding-right:clamp(18px,2vw,32px)}.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin:18px 0 24px}.workspace-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:14px 0 18px}.workspace-heading h1{margin:0;font-size:clamp(1.8rem,3vw,2.7rem);line-height:1.05}.page-heading.compact{max-width:980px}.page-heading h1{margin:0;font-size:clamp(2rem,4vw,3.2rem);line-height:1.05;letter-spacing:0}.eyebrow{margin:0 0 6px;color:var(--plotline-accent-dark);font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.lead-text{max-width:760px;margin:10px 0 0;color:var(--plotline-muted);font-size:1.05rem}.button-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.button-row form,.compact-buttons form,.asset-card-footer form,td.text-end form,form[data-confirm-message]{display:inline-flex;align-items:center;margin:0}td.text-end{white-space:nowrap}.content-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}.plain-card,.empty-panel,.edit-panel,.list-section{background:var(--plotline-panel);border:1px solid var(--plotline-line);border-radius:8px;padding:20px;box-shadow:0 10px 24px rgba(30,37,43,.04)}.plain-card h2,.empty-panel h2,.list-section h2{margin-top:0;font-size:1.35rem}.plain-card p,.empty-panel p,.muted{color:var(--plotline-muted)}.edit-panel{max-width:980px}.location-page .page-heading.compact,.location-page .edit-panel,.location-page .empty-panel,.location-page .drag-drop-panel{max-width:none}.import-panel,.import-preview-section{max-width:none}.import-json-input{font-family:Consolas,"Liberation Mono",Menlo,monospace;font-size:.88rem;line-height:1.45;min-height:34rem;max-height:64vh;overflow:auto;resize:vertical;white-space:pre}.import-preview-heading,.import-counts{display:flex;align-items:flex-start;gap:12px}.import-preview-heading{justify-content:space-between;margin-bottom:16px}.import-counts{flex-wrap:wrap}.import-counts span{display:inline-flex;align-items:baseline;gap:5px;border:1px solid var(--plotline-line);border-radius:999px;padding:5px 11px;background:var(--plotline-soft);color:var(--plotline-muted);font-weight:700}.import-counts strong{color:var(--plotline-ink)}.import-tree{display:grid;gap:12px}.import-tree-book{border:1px solid var(--plotline-line);border-radius:8px;padding:14px;background:rgba(255,255,255,.54)}.import-tree-book>summary,.import-tree-chapter>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}.import-tree-book>summary span,.import-tree-chapter>summary span{color:var(--plotline-muted);font-size:.84rem;font-weight:700;white-space:nowrap}.import-tree-book h3{margin:0 0 10px;font-size:1.08rem}.import-tree-chapter{border-top:1px solid var(--plotline-line);padding:10px 0 0;margin-top:10px}.import-tree-chapter ul{margin:8px 0 0;color:var(--plotline-muted)}.import-scene-meta{display:block;margin-top:2px;color:var(--plotline-muted);font-size:.82rem}.import-mapping-summary{display:grid;gap:6px;border:1px solid rgba(184,118,43,.28);border-radius:8px;padding:10px 12px;margin-bottom:14px;background:rgba(251,236,211,.5);color:var(--plotline-muted);font-size:.9rem}.import-duplicate-confirm{border:1px solid rgba(184,118,43,.34);border-radius:8px;padding:12px 12px 12px 38px;background:rgba(251,236,211,.72)}.import-confirmation,.import-docs details{border:1px solid var(--plotline-line);border-radius:8px;padding:16px;background:rgba(255,255,255,.42)}.import-confirmation h3,.import-doc-grid h3{margin-top:0;font-size:1.05rem}.import-docs summary{cursor:pointer;font-weight:800}.import-doc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:14px}.import-message-list ul{max-height:16rem;overflow:auto}.scene-editor{max-width:1180px}.table{margin-bottom:0}.table th{color:var(--plotline-muted);font-size:.78rem;letter-spacing:.06em;text-transform:uppercase}.narrow{width:90px;white-space:nowrap}.status-pill{display:inline-flex;align-items:center;width:fit-content;border:1px solid #c8d8d2;border-radius:999px;padding:2px 8px;color:var(--plotline-accent-dark);background:var(--plotline-soft);font-size:.78rem;font-weight:700;white-space:nowrap}.dashboard-summary-card{border-color:var(--plotline-line)}.dashboard-summary-body{padding:10px 12px}.dashboard-summary-label{margin-bottom:4px;font-size:.7rem;line-height:1.15}.dashboard-summary-value{display:block;font-size:1.45rem;line-height:1}.dashboard-summary-calm{border-color:rgba(47,111,99,.28);background:rgba(238,245,242,.62)}.dashboard-summary-mild{border-color:rgba(197,139,43,.32);background:rgba(255,248,232,.68)}.dashboard-summary-attention{border-color:rgba(142,80,103,.32);background:rgba(252,241,246,.7)}.dashboard-progress-card{border-color:rgba(47,111,99,.18);background:linear-gradient(180deg,#fff 0%,rgba(238,245,242,.64) 100%)}.dashboard-progress-body{padding:12px 14px}.dashboard-progress-heading{margin-bottom:8px}.dashboard-progress-title{margin:0 0 2px;font-size:1.05rem;line-height:1.2}.dashboard-series-progress{height:7px;background:rgba(47,111,99,.1)}.dashboard-series-progress .progress-bar{background:linear-gradient(90deg,var(--plotline-accent),#6fa99b)}.dashboard-progress-source{border-color:rgba(47,111,99,.2);color:var(--plotline-accent-dark);background:rgba(238,245,242,.9)}.dashboard-book-title-block h3{line-height:1.16}.dashboard-book-title-block a{color:var(--plotline-ink);text-decoration-color:rgba(47,111,99,.35)}.dashboard-book-subtitle{color:var(--plotline-muted);font-size:.95rem;line-height:1.25}.dashboard-status-pill{border-color:var(--dashboard-status-border,#c8d8d2);color:var(--dashboard-status-ink,var(--plotline-accent-dark));background:var(--dashboard-status-bg,var(--plotline-soft))}.dashboard-status-published{--dashboard-status-border:rgba(47,111,99,.32);--dashboard-status-bg:#e7f2ed;--dashboard-status-ink:#22534a}.dashboard-status-drafting{--dashboard-status-border:rgba(184,118,43,.35);--dashboard-status-bg:#fff2dd;--dashboard-status-ink:#7b4b12}.dashboard-status-planning{--dashboard-status-border:rgba(51,117,155,.3);--dashboard-status-bg:#e9f3f8;--dashboard-status-ink:#245b78}.dashboard-status-research,.dashboard-status-outlining{--dashboard-status-border:rgba(103,80,164,.26);--dashboard-status-bg:#f0edf8;--dashboard-status-ink:#51417c}.dashboard-status-revising{--dashboard-status-border:rgba(123,82,148,.3);--dashboard-status-bg:#f4eefa;--dashboard-status-ink:#5f3e73}.dashboard-status-editing{--dashboard-status-border:rgba(68,75,130,.3);--dashboard-status-bg:#eceef8;--dashboard-status-ink:#343b72}.dashboard-status-proofreading{--dashboard-status-border:rgba(43,130,123,.3);--dashboard-status-bg:#e6f5f2;--dashboard-status-ink:#23625d}.dashboard-status-ready{--dashboard-status-border:rgba(185,142,30,.34);--dashboard-status-bg:#fff6d8;--dashboard-status-ink:#765a0f}.dashboard-status-paused{--dashboard-status-border:rgba(102,113,123,.28);--dashboard-status-bg:#f0f2f1;--dashboard-status-ink:#56616b}.dashboard-status-archived{--dashboard-status-border:rgba(139,80,86,.28);--dashboard-status-bg:#f3eded;--dashboard-status-ink:#76474d}.dashboard-attention-soft{border-color:rgba(102,113,123,.24);color:#56616b;background:#f3f4f2}.order-buttons{display:flex;gap:6px}.purpose-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;max-height:260px;overflow:auto;padding:10px;border:1px solid var(--plotline-line);border-radius:8px;background:#fcfcfb}.purpose-check{display:flex;align-items:center;gap:8px;font-size:.92rem}.timeline-filter{display:flex;align-items:center;gap:8px;min-width:min(420px,100%)}.workspace-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:0;align-items:start;--timeline-inspector-width:min(40vw,560px)}.workspace-layout.inspector-drawer-open{grid-template-columns:minmax(420px,1fr) 10px minmax(420px,var(--timeline-inspector-width));gap:12px}.timeline-workspace{min-width:0;max-width:100%}.timeline-inspector-resizer{position:sticky;top:76px;z-index:25;width:10px;height:calc(100vh - 96px);border-radius:999px;cursor:col-resize;background:linear-gradient(180deg,rgba(47,111,99,.16),rgba(47,111,99,.04))}.timeline-inspector-resizer::before{content:"";display:block;width:2px;height:48px;margin:18px auto;border-radius:999px;background:var(--plotline-accent);opacity:.55}.timeline-inspector-resizer:hover,.timeline-inspector-resizer:focus-visible{background:rgba(47,111,99,.16)}body.timeline-inspector-resizing{cursor:col-resize;user-select:none}.pacing-panel{margin-top:14px;margin-bottom:0;border:1px solid var(--plotline-line);border-radius:8px;padding:14px;background:#fff;box-shadow:0 10px 24px rgba(30,37,43,.04)}.pacing-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.pacing-heading h2{margin:0;font-size:1.1rem}.metric-graph-stack{display:grid;gap:10px;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;padding-bottom:4px}.metric-graph-row{display:grid;grid-template-columns:150px minmax(260px,1fr);gap:10px;align-items:center;min-width:max(100%,calc(150px + (var(--scene-count,1)*34px)))}.metric-graph-label{color:var(--plotline-muted);font-size:.84rem;font-weight:700}.metric-graph-points{display:grid;grid-template-columns:repeat(var(--scene-count),minmax(28px,1fr));gap:5px;align-items:end;min-height:52px;border-radius:8px;padding:6px;background:linear-gradient(180deg,#f6faf8 0%,#edf4f1 100%);min-width:calc(var(--scene-count)*34px)}.metric-point{display:flex;align-items:flex-end;justify-content:center;height:48px;min-width:28px;color:var(--plotline-accent-dark);text-decoration:none}.metric-point::before{content:"";display:block;width:100%;height:max(8px,var(--metric-height));border-radius:5px 5px 2px 2px;background:linear-gradient(180deg,#6fa99b,var(--plotline-accent-dark));box-shadow:inset 0 1px 0 rgba(255,255,255,.35)}.metric-point span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.timeline-shell{overflow-x:auto;padding:16px;border:1px solid var(--plotline-line);border-radius:8px;background:linear-gradient(180deg,#fff 0%,#f7faf8 100%)}.workspace-timeline{min-height:420px}.timeline-series-row{display:grid;grid-template-columns:var(--timeline-label-width) max-content;gap:var(--timeline-grid-gap);align-items:stretch;width:max-content;min-width:100%}.timeline-project-title{position:sticky;left:0;z-index:20;display:grid;align-content:start;gap:4px;width:var(--timeline-label-width);min-height:100%;border-radius:8px;padding:12px;color:#fff;background:var(--plotline-accent-dark);font-weight:700;box-shadow:8px 0 18px rgba(30,37,43,.08)}.timeline-project-title span,.timeline-book-title span{color:rgba(255,255,255,.78);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase}.timeline-project-title strong,.timeline-book-title strong{line-height:1.15}.timeline-books{display:flex;gap:var(--timeline-grid-gap);align-items:stretch}.timeline-book{flex:0 0 auto;width:calc((var(--book-scene-count)*var(--timeline-scene-width)) + ((var(--book-scene-count) - 1)*var(--timeline-grid-gap)));min-width:var(--timeline-scene-width)}.timeline-book-title{display:grid;gap:2px;margin-bottom:var(--timeline-grid-gap);border-radius:8px;padding:10px 12px;color:#fff;background:var(--plotline-accent-dark);font-weight:700}.timeline-chapters{display:flex;gap:var(--timeline-grid-gap);align-items:flex-start}.timeline-chapter{flex:0 0 auto;width:calc((var(--chapter-scene-count)*var(--timeline-scene-width)) + ((var(--chapter-scene-count) - 1)*var(--timeline-grid-gap)));min-width:var(--timeline-scene-width);box-sizing:border-box;border-radius:8px;background:rgba(238,245,242,.7);outline:1px solid #d4ded8;outline-offset:0;overflow:visible}.timeline-chapter-title{display:grid;gap:2px;border-bottom:1px solid #d4ded8;padding:10px 12px;color:var(--plotline-accent-dark);font-weight:700}.timeline-chapter-title span{color:var(--plotline-muted);font-size:.76rem;text-transform:uppercase}.timeline-scenes{display:grid;grid-template-columns:repeat(var(--chapter-scene-count),minmax(0,1fr));gap:var(--timeline-grid-gap);width:100%;box-sizing:border-box;min-height:190px;padding:0}.timeline-scene-card,.timeline-empty-scene{display:flex;flex-direction:column;gap:6px;width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--plotline-line);border-radius:8px;padding:12px;background:#fff;color:var(--plotline-ink);text-decoration:none;box-shadow:0 8px 18px rgba(30,37,43,.05)}.timeline-scene-card:hover{border-color:var(--plotline-accent);color:var(--plotline-ink)}.timeline-placeholder-scene,.timeline-placeholder-cell,.metric-point-placeholder{cursor:default;opacity:.72}.timeline-placeholder-scene{align-items:center;justify-content:center;border-style:dashed;color:var(--plotline-muted);background:rgba(255,255,255,.38);font-size:.86rem;font-weight:800;text-align:center}.timeline-placeholder-cell{border-style:dashed;background:repeating-linear-gradient(-45deg,rgba(216,221,216,.18) 0,rgba(216,221,216,.18) 7px,rgba(255,255,255,.18) 7px,rgba(255,255,255,.18) 14px)}.metric-point-placeholder::before{height:4px;background:rgba(102,113,123,.2);box-shadow:none}.timeline-scene-card.selected{border-color:var(--plotline-accent-dark);box-shadow:0 0 0 3px rgba(47,111,99,.16),0 10px 22px rgba(30,37,43,.08)}.scene-badge-row,.purpose-chip-row{display:flex;flex-wrap:wrap;gap:5px;align-items:center}.warning-placeholder{display:inline-flex;width:fit-content;border:1px dashed #d6b25e;border-radius:999px;padding:2px 8px;color:#755715;background:#fff8e8;font-size:.74rem;font-weight:700}.warning-placeholder.active{border-color:rgba(159,69,69,.36);color:#8a3434;background:rgba(255,232,232,.9)}.dependency-placeholder{display:inline-flex;width:fit-content;border:1px solid rgba(47,111,99,.2);border-radius:999px;padding:2px 8px;color:var(--plotline-accent-dark);background:rgba(47,111,99,.08);font-size:.74rem;font-weight:700}.purpose-chip{display:inline-flex;width:fit-content;border-radius:999px;padding:2px 7px;color:#38453e;background:#edf0eb;font-size:.72rem;font-weight:700}.future-lane-placeholder{border-top:1px dashed #cbd8d2;padding:8px 12px;color:var(--plotline-muted);font-size:.78rem;background:rgba(255,255,255,.45)}.metric-timeline-board{display:grid;gap:8px;width:max-content;min-width:100%;margin-top:14px;border-top:1px solid var(--plotline-line);padding-top:14px}.metric-shape-controls{position:sticky;left:0;z-index:6;display:grid;gap:8px;width:calc(var(--timeline-label-width) + (var(--scene-count)*var(--timeline-scene-width)) + (var(--scene-count)*var(--timeline-grid-gap)));min-width:100%;border-radius:8px;padding:10px;background:rgba(255,255,255,.88)}.metric-timeline-row{display:grid;grid-template-columns:var(--timeline-label-width) calc((var(--scene-count)*var(--timeline-scene-width)) + ((var(--scene-count) - 1)*var(--timeline-grid-gap)));gap:var(--timeline-grid-gap);align-items:stretch}.metric-lane-label{position:sticky;left:0;z-index:12;display:grid;align-content:start;gap:4px;min-height:320px;border:1px solid rgba(47,111,99,.18);border-radius:8px;padding:10px;color:var(--plotline-accent-dark);background:#fff;box-shadow:0 6px 14px rgba(30,37,43,.04)}.metric-lane-label span{color:var(--plotline-muted);font-size:.78rem;font-weight:600}.colour-swatch{display:inline-block;width:18px;height:18px;border:1px solid rgba(30,37,43,.18);border-radius:999px;vertical-align:middle}.plot-lane-board{position:relative;display:grid;gap:8px;width:max-content;min-width:100%;margin-top:14px;border-top:1px solid var(--plotline-line);padding-top:14px}.plot-lane-svg-overlay{position:absolute;inset:0 auto auto 0;z-index:4;pointer-events:none;overflow:visible}.plot-line-svg-path{fill:none;stroke-width:4;stroke-linecap:round;opacity:.72}.plot-line-svg-connector{fill:none;stroke-width:3;stroke-linecap:round;opacity:.58}.plot-line-svg-path.plotline-state-neglected{stroke-dasharray:9 8;opacity:.44}.plot-line-svg-path.plotline-state-resolved,.plot-line-svg-path.plotline-state-questionable{stroke:#8c9491;opacity:.42}.plot-line-svg-path.plotline-state-abandoned{stroke:#9b2f36;stroke-dasharray:5 7;opacity:.5}.plot-event-svg-node.plotline-state-resolved circle,.plot-event-svg-node.plotline-state-questionable circle{fill:#8c9491}.plot-event-svg-node.plotline-state-abandoned circle,.plot-event-svg-node.plotline-state-abandoned path{fill:#9b2f36;stroke:#fff}.plot-event-svg-node.plotline-state-abandoned line{stroke:#fff}.plotline-health-marker path,.plotline-health-marker circle{fill:#f4c430;stroke:#8a6712;stroke-width:1.5}.plotline-health-marker line,.plotline-health-marker text{stroke:#5e4710;fill:#5e4710;stroke-width:1.6;stroke-linecap:round}.plotline-health-marker text{font-size:11px;font-weight:800;stroke-width:0}.plotline-health-marker-dangling path,.plotline-health-marker-dangling circle{fill:#f8df8f}.plotline-health-marker-abandoned path,.plotline-health-marker-abandoned circle{fill:#d85c63;stroke:#8b1e2d}.plotline-health-marker-abandoned line{stroke:#fff}.plot-event-svg-node circle,.plot-event-svg-node path{stroke:#fff;stroke-width:2}.plot-event-svg-node line{stroke:#8b1e2d;stroke-width:4;stroke-linecap:round}.plot-event-svg-node-reveal circle{stroke-width:3}.plot-event-svg-node-resolve circle:last-child{stroke:currentColor;stroke-width:2}.lane-board-heading,.metric-lane-board-heading,.plot-lane-board-heading{position:sticky;left:0;z-index:6;display:flex;align-items:center;justify-content:space-between;gap:14px;width:calc(var(--timeline-label-width) + (var(--scene-count)*var(--timeline-scene-width)) + (var(--scene-count)*var(--timeline-grid-gap)));min-width:100%;margin-bottom:2px;border-radius:8px;padding:8px 10px;color:var(--plotline-accent-dark);background:rgba(255,255,255,.92);font-weight:700;box-shadow:0 8px 16px rgba(30,37,43,.05)}.lane-board-heading small,.metric-lane-board-heading small,.plot-lane-board-heading small{color:var(--plotline-muted);font-weight:500;white-space:nowrap}.plot-lane-row{display:grid;grid-template-columns:var(--timeline-label-width) repeat(var(--scene-count),var(--timeline-scene-width));gap:var(--timeline-grid-gap);align-items:stretch}.plot-lane-label{position:sticky;left:0;z-index:12;display:flex;align-items:center;gap:8px;min-height:46px;border:1px solid color-mix(in srgb,var(--plot-colour),#fff 55%);border-left:5px solid var(--plot-colour);border-radius:8px;padding:8px 10px;background:#fff;color:var(--plotline-ink);text-decoration:none;box-shadow:0 6px 14px rgba(30,37,43,.04)}.plot-lane-label:hover{color:var(--plotline-ink);border-color:var(--plot-colour)}.plot-lane-slots{display:contents}.plot-lane-slot{display:flex;flex-wrap:wrap;align-content:flex-start;gap:5px;min-height:46px;border:1px dashed #d8ddd8;border-radius:8px;padding:7px;background:rgba(255,255,255,.62)}.thread-marker{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;border:1px solid color-mix(in srgb,var(--plot-colour),#000 18%);border-radius:999px;padding:0 7px;color:var(--plotline-ink);background:color-mix(in srgb,var(--plot-colour),#fff 78%);font-size:.72rem;font-weight:800;text-decoration:none}.plot-lane-board [data-plot-event-node]{opacity:0}.thread-marker:hover{color:var(--plotline-ink);background:color-mix(in srgb,var(--plot-colour),#fff 58%)}.thread-marker.resolved{border-color:#5a8c60;background:#e6f4e7;color:#24512b}.thread-marker.contradicted{border-color:#b45c5c;background:#fff0f0;color:#7a2222}.thread-events-section{margin-top:16px}.thread-event-list{display:grid;gap:8px;margin-bottom:12px}.thread-event-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;border:1px solid color-mix(in srgb,var(--plot-colour),#fff 55%);border-left:4px solid var(--plot-colour);border-radius:8px;padding:8px;background:#fff}.thread-event-item>div{display:grid;gap:3px}.thread-event-marker{display:inline-flex;align-items:center;justify-content:center;width:fit-content;min-width:24px;height:22px;border-radius:999px;padding:0 7px;background:color-mix(in srgb,var(--plot-colour),#fff 72%);font-size:.72rem;font-weight:800}.thread-event-create{border-top:1px solid var(--plotline-line);padding-top:12px}.asset-lane-board{display:grid;gap:8px;width:max-content;min-width:100%;margin-top:14px;border-top:1px solid var(--plotline-line);padding-top:14px}.asset-lane-row{display:grid;grid-template-columns:var(--timeline-label-width) repeat(var(--scene-count),var(--timeline-scene-width));gap:var(--timeline-grid-gap);align-items:stretch}.asset-lane-label{position:sticky;left:0;z-index:12;display:grid;gap:2px;min-height:46px;border:1px solid #d4d7df;border-left:5px solid #6b5b95;border-radius:8px;padding:8px 10px;background:#fff;color:var(--plotline-ink);text-decoration:none;box-shadow:0 6px 14px rgba(30,37,43,.04)}.asset-lane-label span{color:var(--plotline-muted);font-size:.75rem}.asset-lane-slots{display:contents}.asset-lane-slot{display:flex;flex-wrap:wrap;align-content:flex-start;gap:5px;min-height:46px;border:1px dashed #d8ddd8;border-radius:8px;padding:7px;background:rgba(250,249,255,.72)}.asset-marker,.asset-event-marker{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;border:1px solid #7f70aa;border-radius:7px;padding:0 7px;color:#33284e;background:#eee9fb;font-size:.72rem;font-weight:800;text-decoration:none}.asset-marker:hover{color:#33284e;background:#dfd6f7}.asset-events-section{margin-top:16px}.asset-event-list,.asset-mini-list{display:grid;gap:8px;margin-bottom:12px}.asset-event-item,.asset-mini-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;border:1px solid #ded9ea;border-left:4px solid #6b5b95;border-radius:8px;padding:8px;background:#fff}.asset-event-item>div,.asset-mini-item>div{display:grid;gap:3px}.asset-create-form{border-top:1px solid var(--plotline-line);padding-top:12px}.asset-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}.asset-card{display:grid;gap:12px;border:1px solid var(--plotline-line);border-radius:8px;padding:14px;background:#fff;box-shadow:0 8px 18px rgba(30,37,43,.04)}.asset-card h2{margin:0;font-size:1.1rem}.asset-card-footer{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.asset-detail-grid{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(320px,1.2fr);gap:14px}.character-lane-board{display:grid;gap:8px;width:max-content;min-width:100%;margin-top:14px;border-top:1px solid var(--plotline-line);padding-top:14px}.character-lane-row{display:grid;grid-template-columns:var(--timeline-label-width) repeat(var(--scene-count),var(--timeline-scene-width));gap:var(--timeline-grid-gap);align-items:stretch}.character-lane-label{position:sticky;left:0;z-index:12;display:grid;gap:2px;min-height:46px;border:1px solid #d7d4ce;border-left:5px solid #8a6f3d;border-radius:8px;padding:8px 10px;background:#fff;color:var(--plotline-ink);text-decoration:none;box-shadow:0 6px 14px rgba(30,37,43,.04)}.character-lane-label span{color:var(--plotline-muted);font-size:.75rem}.character-lane-slots{display:contents}.character-lane-slot{display:flex;flex-wrap:wrap;align-content:flex-start;gap:5px;min-height:46px;border:1px dashed #d8ddd8;border-radius:8px;padding:7px;background:rgba(255,252,246,.72)}.character-marker{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;border:1px solid #9a7a3f;border-radius:999px;padding:0 7px;color:#4f3810;background:#fff2d7;font-size:.72rem;font-weight:800;text-decoration:none}.character-card{border-left:4px solid #8a6f3d}.character-section{margin-top:16px}.character-item{border-left-color:#8a6f3d}.character-appearance-card{display:grid;gap:8px;border:1px solid #d7d4ce;border-left:4px solid #8a6f3d;border-radius:8px;padding:10px;background:#fff}.character-appearance-summary{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.character-appearance-summary>div:first-child{display:grid;gap:3px}.character-appearance-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.character-appearance-edit .asset-create-form{margin-top:8px;border-top:1px solid var(--plotline-line)}.form-helper-message{margin:0 0 8px;font-size:.86rem;font-weight:700}.scene-number,.time-label{color:var(--plotline-muted);font-size:.82rem}.location-pill,.location-badge{display:inline-flex;align-items:center;width:fit-content;border:1px solid rgba(47,111,99,.18);border-radius:999px;padding:2px 7px;color:var(--plotline-accent-dark);background:rgba(47,111,99,.08);font-size:.74rem;font-weight:700}.scene-summary{display:-webkit-box;overflow:hidden;color:var(--plotline-muted);font-size:.88rem;-webkit-box-orient:vertical;-webkit-line-clamp:4}.timeline-empty-scene{justify-content:center;color:var(--plotline-muted);background:rgba(255,255,255,.58)}.form-control:focus,.form-select:focus,.form-check-input:focus{border-color:var(--plotline-accent);box-shadow:0 0 0 .2rem rgba(47,111,99,.16)}.scene-inspector-panel{position:sticky;top:76px;display:flex;flex-direction:column;max-height:calc(100vh - 96px);min-width:0;overflow:hidden;border:1px solid var(--plotline-line);border-radius:8px;background:#fff;box-shadow:0 14px 32px rgba(30,37,43,.08)}.inspector-header{position:sticky;top:0;z-index:5;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid var(--plotline-line);padding:16px;background:#fff}.scene-inspector-body{flex:1 1 auto;min-height:0;overflow:auto;padding:16px}.inspector-header h2{margin:0;font-size:1.25rem}.scene-inspector-form{display:grid;gap:14px}.inspector-section{border-top:1px solid var(--plotline-line);padding-top:12px}.inspector-section:first-of-type{border-top:0;padding-top:0}.inspector-section h3{margin:0 0 10px;font-size:.95rem;color:var(--plotline-accent-dark)}.location-helper{border:1px solid rgba(138,111,61,.22);border-radius:8px;padding:10px;background:rgba(255,248,232,.74)}.location-warning-list{margin:0;padding-left:18px;color:#6f5526;font-size:.86rem}.location-tree{display:grid;gap:8px}.location-tree-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--plotline-line);padding:10px 0 10px calc(var(--location-depth,0)*22px)}.location-tree-row:last-child{border-bottom:0}.location-tree-row>div:first-child{display:grid;gap:3px}.compact-buttons{flex-wrap:nowrap}.location-chip-list{display:flex;flex-wrap:wrap;gap:8px}.location-chip{border:1px solid var(--plotline-line);border-radius:8px;padding:7px 10px;background:#fff;text-decoration:none}.location-relationship-list{display:grid;gap:8px}.location-relationship-card{display:flex;justify-content:space-between;gap:12px;border:1px solid var(--plotline-line);border-radius:8px;padding:10px;background:#fff}.location-flags{display:flex;flex-wrap:wrap;gap:10px 16px;color:var(--plotline-muted);font-size:.86rem}.validation-summary,.warning-filter-panel{border:1px solid var(--plotline-line);border-radius:8px;margin-bottom:16px;padding:12px;background:#fff}.validation-summary{display:flex;flex-wrap:wrap;gap:12px;color:var(--plotline-muted)}.warning-dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:18px}.warning-count-row,.warning-card-title,.inspector-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.warning-list,.warning-mini-list{display:grid;gap:10px}.warning-card,.warning-mini-card{border:1px solid var(--plotline-line);border-radius:8px;padding:12px;background:#fff}.warning-card{display:grid;grid-template-columns:1fr auto;gap:12px}.warning-card p,.warning-mini-card p{margin:6px 0}.warning-actions{display:flex;align-items:flex-start;flex-wrap:wrap;gap:6px}.severity-pill{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font-size:.74rem;font-weight:800}.severity-pill.info{color:#365f7c;background:rgba(107,153,184,.14)}.severity-pill.warning{color:#7a5527;background:rgba(205,154,72,.17)}.severity-pill.error{color:#8a3434;background:rgba(190,83,83,.15)}.warning-mini-card{background:rgba(255,255,255,.76)}.dependency-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dependency-card{display:grid;gap:3px;border:1px solid var(--plotline-line);border-radius:8px;margin-bottom:8px;padding:9px;background:rgba(255,255,255,.78)}.move-preview-panel{max-width:900px}.focused-validation-summary{display:flex;flex-wrap:wrap;gap:10px;border:1px solid rgba(47,111,99,.16);border-radius:8px;margin-top:12px;padding:10px;color:var(--plotline-muted);background:rgba(47,111,99,.05)}.inspector-purpose-list{grid-template-columns:1fr;max-height:210px}.metric-slider-stack{display:grid;gap:12px}.metric-slider{display:grid;gap:4px}.metric-slider-label{display:flex;justify-content:space-between;gap:10px;color:var(--plotline-muted);font-size:.86rem;font-weight:700}.metric-slider-label output{color:var(--plotline-accent-dark)}.metric-slider .form-range{accent-color:var(--plotline-accent)}.asset-importance-slider{border:1px solid var(--plotline-line);border-radius:8px;padding:10px 12px;background:rgba(47,111,99,.05)}.story-asset-checkbox-field{margin-top:1.95rem}.story-asset-event-item{justify-content:flex-start;gap:8px}.story-asset-event-item .asset-event-marker{flex:0 0 auto;min-width:1.55rem;width:auto}.story-asset-event-details{min-width:0}.scene-inspector-root{display:grid;gap:12px}.scene-overview-card{display:grid;gap:10px;border:1px solid rgba(47,111,99,.18);border-radius:10px;padding:12px;background:linear-gradient(180deg,rgba(47,111,99,.08),rgba(255,255,255,.88))}.scene-overview-card h3{margin:0;font-size:1.05rem}.scene-overview-card .muted{display:flex;flex-wrap:wrap;gap:7px;margin:0}.overview-chip-grid,.context-nav,.breadcrumb-trail,.inspector-nav-links{display:flex;flex-wrap:wrap;gap:7px}.overview-chip,.context-nav a,.breadcrumb-trail a,.breadcrumb-trail span{display:inline-flex;align-items:center;border:1px solid var(--plotline-line);border-radius:999px;padding:4px 9px;color:var(--plotline-muted);font-size:.78rem;font-weight:800;text-decoration:none;background:rgba(255,255,255,.72)}.overview-chip.attention{color:#7a5527;border-color:rgba(205,154,72,.35);background:rgba(205,154,72,.14)}.overview-outcome{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;margin:0;color:var(--plotline-muted)}.inspector-quick-nav{position:sticky;top:0;z-index:5;display:grid;gap:8px;border:1px solid var(--plotline-line);border-radius:10px;padding:10px;background:rgba(255,255,255,.94);box-shadow:0 10px 24px rgba(55,48,39,.08);backdrop-filter:blur(8px)}.inspector-nav-links a{border:1px solid var(--plotline-line);border-radius:999px;padding:4px 8px;color:var(--plotline-muted);font-size:.76rem;font-weight:800;text-decoration:none}.inspector-nav-links a:hover,.inspector-nav-links a.active{color:var(--plotline-accent-dark);border-color:rgba(47,111,99,.35);background:rgba(47,111,99,.08)}.inspector-accordion-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;padding:0;color:var(--plotline-ink);font-size:.95rem;font-weight:900;text-align:left;background:transparent}.inspector-accordion-toggle::before{content:"+";display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:999px;margin-right:7px;color:var(--plotline-accent-dark);background:rgba(47,111,99,.09)}.inspector-section.is-open>.inspector-accordion-toggle::before{content:"-"}.inspector-accordion-toggle span:first-child{margin-right:auto}.accordion-count{color:var(--plotline-muted);font-size:.75rem}.inspector-subheading{margin:14px 0 8px;color:var(--plotline-muted);font-size:.88rem;font-weight:900}.inspector-accordion-body{display:none;margin-top:12px}.inspector-section.is-open>.inspector-accordion-body{display:block}.inspector-section.is-filtered-out{display:none}.breadcrumb-trail{margin-bottom:12px}.breadcrumb-trail a:hover,.context-nav a:hover{color:var(--plotline-accent-dark);border-color:rgba(47,111,99,.35);background:rgba(47,111,99,.08)}.context-header,.working-context-banner{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--plotline-line);border-radius:10px;margin-bottom:16px;padding:10px 12px;background:rgba(255,255,255,.84);box-shadow:0 10px 24px rgba(55,48,39,.05)}.context-title{display:grid;gap:2px}.context-title strong{color:var(--plotline-ink)}.health-kpi-grid,.analytics-grid-two,.analytics-grid-three{display:grid;gap:14px;margin:18px 0}.health-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.health-kpi-grid .plain-card{display:grid;gap:4px}.health-kpi-grid strong{color:var(--plotline-ink);font-size:2rem;line-height:1}.analytics-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}.analytics-grid-three{grid-template-columns:repeat(3,minmax(0,1fr))}.analytics-section{border:1px solid var(--plotline-line);border-radius:10px;margin:18px 0;padding:16px;background:rgba(255,255,255,.84);box-shadow:0 14px 34px rgba(55,48,39,.07)}.analytics-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:14px}.analytics-section-heading h2,.plain-card h3{margin:0}.analytics-metric-stack{display:grid;gap:12px;overflow-x:auto;padding-bottom:4px}.metric-shape-chart{display:grid;gap:12px}.metric-shape-intro{max-width:760px;margin:0;color:var(--plotline-muted)}.metric-toggle-row{display:flex;flex-wrap:wrap;gap:8px}.metric-toggle-pill{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(82,75,65,.16);border-radius:999px;padding:5px 9px;color:var(--plotline-muted);font-size:.78rem;font-weight:800;background:rgba(255,255,255,.78);cursor:pointer}.metric-toggle-pill::before{content:"";width:10px;height:10px;border-radius:999px;background:var(--metric-colour)}.metric-toggle-pill input{margin:0;accent-color:var(--metric-colour)}.timeline-metric-edit-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:end}.timeline-metric-edit-select{display:grid;gap:3px;min-width:180px;color:var(--plotline-muted);font-size:.78rem;font-weight:800}.timeline-metric-edit-status{align-self:center;border:1px solid rgba(47,111,99,.18);border-radius:999px;padding:5px 9px;color:var(--plotline-muted);font-size:.78rem;font-weight:800;background:rgba(255,255,255,.72)}.timeline-metric-edit-hint{font-size:.82rem}.metric-chart-frame canvas.metric-curve-editing{cursor:ns-resize}.metric-chart-frame{position:relative;min-height:320px;border:1px solid var(--plotline-line);border-radius:10px;padding:14px 12px 32px;background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(247,245,240,.76))}.metric-timeline-frame{width:calc((var(--scene-count)*var(--timeline-scene-width)) + ((var(--scene-count) - 1)*var(--timeline-grid-gap)))}.metric-chart-frame canvas{width:100%;height:300px}.metric-timeline-board .metric-graph-stack{width:max-content;min-width:100%}.metric-timeline-board .metric-graph-row{grid-template-columns:var(--timeline-label-width) repeat(var(--scene-count),var(--timeline-scene-width));gap:var(--timeline-grid-gap);min-width:100%}.metric-timeline-board .metric-graph-points{display:contents}.metric-timeline-board .metric-point{border:1px solid rgba(47,111,99,.12);border-radius:8px;background:rgba(255,255,255,.62)}.metric-raw-details{border-top:1px solid var(--plotline-line);padding-top:8px}.metric-raw-details summary{color:var(--plotline-muted);font-size:.82rem;font-weight:800;cursor:pointer}.timeline-control-panel{display:grid;gap:12px;border:1px solid var(--plotline-line);border-radius:10px;margin-bottom:16px;padding:12px;background:rgba(255,255,255,.84);box-shadow:0 10px 24px rgba(55,48,39,.05)}.timeline-filter-drawer summary{color:var(--plotline-ink);font-weight:900;cursor:pointer}.timeline-filter-grid{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:10px;margin-top:12px}.timeline-filter-checks,.timeline-filter-actions,.timeline-visibility-panel,.timeline-preset-panel,.preset-chip-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.timeline-filter-checks{grid-column:span 3;color:var(--plotline-muted);font-size:.82rem;font-weight:700}.timeline-filter-actions{grid-column:span 3;justify-content:flex-end}.timeline-visibility-panel label,.preset-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--plotline-line);border-radius:999px;padding:4px 8px;color:var(--plotline-muted);font-size:.78rem;font-weight:800;background:rgba(255,255,255,.76)}.timeline-preset-panel form{display:inline-flex;align-items:center;gap:6px}.preset-chip a{color:var(--plotline-accent-dark);text-decoration:none}.preset-chip button{border:0;color:var(--plotline-muted);background:transparent;font-weight:900}.timeline-focus-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(47,111,99,.22);border-radius:10px;margin-bottom:16px;padding:10px 12px;background:rgba(47,111,99,.08)}.timeline-scene-card.filter-dim,.timeline-scene-card.focus-dim,.lane-dim{opacity:.35}.timeline-scene-card.focus-match,.timeline-scene-card.filter-match.focus-match{outline:3px solid rgba(47,111,99,.32);box-shadow:0 12px 26px rgba(47,111,99,.16)}.timeline-section-hidden{display:none!important}.hide-scene-cards .timeline-scene-card{display:none}.timeline-control-panel{position:sticky;top:56px;z-index:18}.timeline-control-select{padding-right:6px}.timeline-control-select .form-select{width:auto;min-width:132px;border:0;padding-top:2px;padding-bottom:2px;background-color:transparent;color:var(--plotline-accent-dark);font-weight:800}.timeline-jump-panel{display:grid;grid-template-columns:auto minmax(180px,1.2fr) minmax(180px,1fr) minmax(170px,.9fr) minmax(180px,1fr) auto;gap:8px;align-items:center;width:100%}.timeline-shortcut-hint{color:var(--plotline-muted);font-size:.76rem;font-weight:700;white-space:nowrap}.timeline-minimap{display:flex;align-items:stretch;gap:4px;margin:0 0 12px;padding:8px;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-gutter:stable;border:1px solid rgba(47,111,99,.18);border-radius:8px;background:rgba(255,255,255,.72)}.timeline-minimap button{position:relative;flex:0 0 max(42px,calc(var(--chapter-scenes)*18px));min-width:42px;min-height:34px;border:1px solid rgba(47,111,99,.18);border-radius:7px;color:var(--plotline-accent-dark);background:linear-gradient(180deg,#f8fbf9 0%,#edf4f1 100%);font-size:.72rem;font-weight:800}.timeline-minimap button.is-active{border-color:var(--plotline-accent);color:#fff;background:linear-gradient(180deg,var(--plotline-accent) 0%,var(--plotline-accent-dark) 100%);box-shadow:0 0 0 2px rgba(47,111,99,.14)}.timeline-minimap button::after{content:"";position:absolute;right:5px;bottom:5px;width:calc(var(--chapter-warnings)*4px);max-width:28px;height:4px;border-radius:999px;background:#b45c5c;opacity:.75}.timeline-drag-palette,.drag-drop-panel{border:1px solid rgba(47,111,99,.18);border-radius:10px;margin-bottom:12px;padding:12px;background:rgba(255,255,255,.84);box-shadow:0 10px 24px rgba(55,48,39,.05)}.timeline-drag-palette{display:grid;grid-template-columns:minmax(220px,.35fr) minmax(0,1fr);gap:12px;align-items:center}.drag-chip-group{display:flex;flex-wrap:wrap;gap:6px;max-height:104px;overflow:auto;padding-right:4px}.drag-chip{display:inline-flex;align-items:center;border:1px solid var(--plotline-line);border-radius:999px;padding:4px 9px;background:#fff;color:var(--plotline-ink);font-size:.78rem;font-weight:800;cursor:grab}.drag-chip.character{border-color:#dacb9e;background:#fff8e8}.drag-chip.asset{border-color:#ded9ea;background:#f4f0ff}.drag-chip.location{border-color:rgba(47,111,99,.18);background:#eef8f4}.is-dragging{opacity:.55}.drop-target-active{outline:3px solid rgba(47,111,99,.28);outline-offset:2px}.timeline-chapter.chapter-drop-active,.timeline-scenes.drop-chapter-end{background:rgba(47,111,99,.06)}.timeline-scenes.drop-chapter-end::after{content:"Drop scene at end of chapter";display:flex;align-items:center;justify-content:center;min-width:var(--timeline-scene-width);min-height:74px;border:2px dashed rgba(197,139,43,.48);border-radius:12px;color:#7a5527;background:rgba(255,248,232,.82);font-size:.8rem;font-weight:900}.timeline-scene-card.drop-before{box-shadow:inset 5px 0 0 #c58b2b,0 12px 26px rgba(197,139,43,.16)}.timeline-scene-card.drop-after{box-shadow:inset -5px 0 0 #c58b2b,0 12px 26px rgba(197,139,43,.16)}.drag-drop-panel{position:sticky;top:132px;z-index:19}.drag-drop-panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.drag-drop-panel h2{margin:0;font-size:1.08rem}.drag-drop-form{border-top:1px solid var(--plotline-line);margin-top:10px;padding-top:10px}.scene-move-modal-content{border:1px solid rgba(47,111,99,.18);border-radius:14px;background:var(--plotline-surface);color:var(--plotline-ink);box-shadow:0 24px 70px rgba(55,48,39,.22)}.scene-move-modal-content .modal-header,.scene-move-modal-content .modal-footer{border-color:var(--plotline-line)}.scene-move-modal-content .modal-title{margin:0;color:var(--plotline-ink);font-size:1.2rem;font-weight:900}.scene-move-summary{margin:0 0 12px;color:var(--plotline-ink);font-size:1rem;font-weight:800}[data-theme="dark"] .scene-move-modal-content{background:#201f22;color:#f4eadc;border-color:rgba(244,234,220,.16);box-shadow:0 24px 70px rgba(0,0,0,.55)}[data-theme="dark"] .scene-move-modal-content .modal-title,[data-theme="dark"] .scene-move-summary{color:#f4eadc}[data-theme="dark"] .scene-move-modal-content .modal-header,[data-theme="dark"] .scene-move-modal-content .modal-footer{border-color:rgba(244,234,220,.14)}[data-theme="dark"] .scene-move-modal-content .btn-close{filter:invert(1) grayscale(100%)}.plain-preview{border:1px solid rgba(197,139,43,.28);border-radius:8px;margin:10px 0 0;padding:8px 10px;color:#5e4518;background:#fff8e8;font-size:.86rem;font-weight:800}.drag-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;color:var(--plotline-muted);font-size:.82rem;font-weight:700}.timeline-section-header,.lane-board-heading,.pacing-heading{position:sticky;left:0;z-index:6}.timeline-section-header{display:flex;align-items:center;justify-content:space-between;gap:10px;width:calc(var(--timeline-label-width) + (var(--scene-count)*var(--timeline-scene-width)) + (var(--scene-count)*var(--timeline-grid-gap)));min-width:100%;margin-bottom:10px;border-radius:8px;padding:8px 10px;background:rgba(255,255,255,.92);box-shadow:0 8px 16px rgba(30,37,43,.05)}.timeline-section-header button,.lane-board-heading button,.plot-lane-board-heading button,.pacing-heading button,.lane-group-heading{border:0;padding:0;color:var(--plotline-accent-dark);background:transparent;font:inherit;font-weight:900;text-align:left}.timeline-section-header button::before,.lane-board-heading button::before,.plot-lane-board-heading button::before,.pacing-heading button::before,.lane-group-heading::before{content:"v";display:inline-block;margin-right:6px;color:var(--plotline-muted);font-size:.72rem}.timeline-section-header button.is-collapsed::before,.lane-board-heading button.is-collapsed::before,.plot-lane-board-heading button.is-collapsed::before,.pacing-heading button.is-collapsed::before,.lane-group-heading.is-collapsed::before{content:">"}.lane-group{display:grid;gap:7px}.character-lane-group-body{display:grid;gap:7px}.lane-group-heading{position:sticky;left:0;z-index:6;width:var(--timeline-label-width);border-top:1px solid rgba(47,111,99,.12);padding:7px 8px 2px;color:var(--plotline-muted);background:rgba(247,250,248,.96);font-size:.78rem;text-transform:uppercase}.timeline-section-collapsed{display:none!important}.timeline-chapter-title{position:sticky;top:0;z-index:5;background:rgba(238,245,242,.96);backdrop-filter:blur(6px)}.scene-pov-label,.metric-mini-summary{display:inline-flex;width:fit-content;border-radius:999px;padding:2px 7px;font-size:.72rem;font-weight:800}.scene-pov-label{color:#514018;background:#fff3d3}.metric-mini-summary{color:var(--plotline-accent-dark);background:rgba(47,111,99,.08)}.timeline-scene-card.search-hit,.timeline-scene-card.keyboard-focus{outline:3px solid rgba(197,139,43,.34);box-shadow:0 12px 26px rgba(197,139,43,.16)}.timeline-scene-card.search-dim{opacity:.28}.thread-marker,.asset-marker,.character-marker{transition:transform .12s ease,box-shadow .12s ease}.thread-marker:hover,.asset-marker:hover,.character-marker:hover{transform:translateY(-1px);box-shadow:0 6px 12px rgba(30,37,43,.12)}.timeline-filtered-root.density-compact{--timeline-scene-width:170px;--timeline-grid-gap:6px}.timeline-filtered-root.density-expanded{--timeline-scene-width:280px;--timeline-grid-gap:14px}.timeline-filtered-root.density-compact .timeline-scene-card,.timeline-filtered-root.zoom-book .timeline-scene-card{gap:4px;padding:9px}.timeline-filtered-root.density-compact .scene-summary,.timeline-filtered-root.density-compact .purpose-chip-row,.timeline-filtered-root.density-compact .metric-mini-summary,.timeline-filtered-root.zoom-book .scene-summary,.timeline-filtered-root.zoom-book .purpose-chip-row,.timeline-filtered-root.zoom-book .metric-mini-summary,.timeline-filtered-root.zoom-book .location-pill,.timeline-filtered-root.zoom-book .scene-pov-label{display:none}.timeline-filtered-root.zoom-book{--timeline-scene-width:150px;--timeline-grid-gap:6px}.timeline-filtered-root.zoom-scene-detail{--timeline-scene-width:300px}.timeline-filtered-root.zoom-scene-detail .scene-summary{-webkit-line-clamp:7}.timeline-filtered-root.density-expanded .timeline-scenes{min-height:230px}.timeline-control-panel{position:relative;top:auto;z-index:4;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px;padding:8px;box-shadow:none}.timeline-filter-drawer,.timeline-control-group{border:1px solid var(--plotline-line);border-radius:999px;background:rgba(255,255,255,.82)}.timeline-filter-drawer[open],.timeline-control-group[open]{border-radius:10px;flex-basis:100%}.timeline-filter-drawer summary,.timeline-control-group summary{min-width:max-content;padding:5px 10px;color:var(--plotline-accent-dark);font-size:.82rem;font-weight:900;cursor:pointer;list-style:none}.timeline-filter-drawer summary::-webkit-details-marker,.timeline-control-group summary::-webkit-details-marker,.timeline-drag-palette summary::-webkit-details-marker{display:none}.timeline-filter-drawer summary::after,.timeline-control-group summary::after,.timeline-drag-palette summary::after{content:" v";color:var(--plotline-muted);font-size:.72rem}.timeline-filter-drawer[open] summary::after,.timeline-control-group[open] summary::after,.timeline-drag-palette[open] summary::after{content:" ^"}.timeline-filter-grid{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px;max-height:min(48vh,430px);overflow:auto;padding:0 10px 10px}.timeline-filter-grid .form-label{margin-bottom:2px;font-size:.72rem;font-weight:800}.timeline-filter-checks,.timeline-filter-actions{grid-column:1/-1}.timeline-visibility-panel,.timeline-jump-panel,.timeline-preset-panel{padding:0 10px 10px}.timeline-jump-panel{grid-template-columns:minmax(180px,1.5fr) repeat(3,minmax(150px,1fr))}.timeline-shortcut-hint{grid-column:1/-1}.timeline-preset-panel form{flex-wrap:nowrap}.timeline-preset-panel .form-control{width:150px}.timeline-preset-panel .btn,.timeline-filter-actions .btn{white-space:nowrap}.timeline-drag-palette{display:block;margin-bottom:8px;padding:7px 9px;box-shadow:none}.timeline-drag-palette summary{color:var(--plotline-accent-dark);font-size:.82rem;font-weight:900;cursor:pointer}.timeline-drag-palette .drag-chip-group{margin-top:8px}.drag-drop-panel{position:relative;top:auto;z-index:9;box-shadow:0 12px 28px rgba(30,37,43,.08)}.timeline-filtered-root,.timeline-filtered-root.density-compact,.timeline-filtered-root.zoom-book{--timeline-scene-width:220px;--timeline-grid-gap:10px}.timeline-filtered-root.density-expanded,.timeline-filtered-root.zoom-scene-detail{--timeline-scene-width:290px}.timeline-filtered-root.density-compact.zoom-book{--timeline-scene-width:200px}.timeline-chapter,.timeline-scene-card,.timeline-empty-scene{overflow-wrap:normal;word-break:normal}.timeline-scene-card strong,.timeline-chapter-title strong,.plot-lane-label strong,.asset-lane-label strong,.character-lane-label strong{min-width:0;white-space:normal;word-break:normal;overflow-wrap:break-word}.timeline-scene-card{cursor:grab}.timeline-scene-card:active,.drag-chip:active,[draggable="true"]:active{cursor:grabbing}body.drag-active .timeline-scene-card,body.dragging-asset [data-asset-drop-target],body.dragging-location [data-drag-type="location"]{transition:outline-color .12s ease,box-shadow .12s ease,opacity .12s ease}body.dragging-character .timeline-scene-card,body.dragging-asset .timeline-scene-card,body.dragging-scene .timeline-scene-card,body.dragging-scene .timeline-scenes[data-chapter-drop-target],body.dragging-asset [data-asset-drop-target],body.dragging-location [data-drag-type="location"]{outline:1px dashed rgba(47,111,99,.22);outline-offset:2px}.is-dragging{opacity:.42;transform:scale(.98)}.drop-target-active{outline:3px solid rgba(47,111,99,.42)!important;outline-offset:3px}.analytics-metric-row{display:grid;grid-template-columns:170px minmax(560px,1fr);gap:12px;align-items:stretch}.analytics-metric-label{display:flex;align-items:center;border-right:1px solid var(--plotline-line);color:var(--plotline-muted);font-weight:800}.analytics-sparkline{display:grid;grid-template-columns:repeat(var(--point-count),minmax(28px,1fr));align-items:end;gap:5px;min-height:88px;border-bottom:1px solid rgba(47,111,99,.25);padding-top:10px}.analytics-bar{position:relative;display:flex;align-items:end;justify-content:center;min-height:12px;height:max(12px,var(--bar-height));border-radius:6px 6px 2px 2px;color:var(--plotline-accent-dark);text-decoration:none;background:linear-gradient(180deg,rgba(47,111,99,.58),rgba(47,111,99,.18))}.analytics-bar:hover{background:linear-gradient(180deg,rgba(47,111,99,.82),rgba(47,111,99,.28))}.analytics-bar span{position:absolute;bottom:calc(100% + 3px);color:var(--plotline-muted);font-size:.68rem;font-weight:800}.analytics-list-item,.analytics-link-row,.analytics-count-row,.purpose-stat-row{border-top:1px solid var(--plotline-line);padding:9px 0}.analytics-list-item{display:grid;gap:3px}.analytics-list-item p{margin:0}.analytics-link-row,.analytics-count-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.analytics-link-row{color:inherit;text-decoration:none}.analytics-link-row:hover{color:var(--plotline-accent-dark)}.analytics-link-row span,.analytics-link-row strong{min-width:0}.purpose-stat-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(90px,1.5fr) 42px;align-items:center;gap:10px}.purpose-stat-bar{overflow:hidden;height:8px;border-radius:999px;background:rgba(47,111,99,.08)}.purpose-stat-bar span{display:block;height:100%;border-radius:inherit;background:var(--plotline-accent)}.inspector-actions{position:sticky;bottom:-16px;display:flex;gap:8px;border-top:1px solid var(--plotline-line);margin:2px -16px -16px;padding:12px 16px;background:rgba(255,255,255,.95);backdrop-filter:blur(8px)}.story-bible-heading{align-items:end}.story-bible-search{display:flex;gap:8px;min-width:min(100%,420px)}.story-bible-search .form-control{min-width:0}.story-bible-nav{position:sticky;top:72px;z-index:4;display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding:10px;border:1px solid var(--plotline-line);border-radius:12px;background:rgba(250,249,246,.92);backdrop-filter:blur(10px)}.story-bible-nav a,.story-bible-actions a{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;background:rgba(47,111,99,.08);color:var(--plotline-ink);font-size:.86rem;font-weight:650;text-decoration:none}.story-bible-nav a:hover,.story-bible-actions a:hover{background:rgba(47,111,99,.16)}.story-bible-section{margin:0 0 28px}.story-bible-section-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:12px}.story-bible-section-heading h2{margin:0}.soft-count{color:var(--plotline-muted);font-size:.9rem;font-weight:650;white-space:nowrap}.story-bible-grid,.story-bible-search-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}.story-bible-grid-compact{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.story-bible-card{border:1px solid var(--plotline-line);border-radius:14px;padding:14px;background:rgba(255,255,255,.86);box-shadow:0 14px 34px rgba(36,32,26,.06)}.story-bible-card h3{margin:0 0 8px;font-size:1.05rem}.story-bible-card h4{margin:14px 0 8px;font-size:.96rem}.story-bible-card p{color:var(--plotline-muted)}.story-bible-card-title{display:flex;align-items:start;justify-content:space-between;gap:10px}.story-bible-card-title span{border:1px solid var(--plotline-line);border-radius:999px;padding:3px 8px;background:rgba(250,249,246,.9);color:var(--plotline-muted);font-size:.78rem;font-weight:700;white-space:nowrap}.story-bible-meta{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.story-bible-meta span{border-radius:999px;padding:4px 8px;background:rgba(36,32,26,.05);color:var(--plotline-muted);font-size:.78rem;font-weight:650}.story-bible-facts{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:6px 10px;margin:12px 0}.story-bible-facts dt{color:var(--plotline-muted);font-size:.78rem;font-weight:800;text-transform:uppercase}.story-bible-facts dd{margin:0;min-width:0;overflow-wrap:anywhere}.story-bible-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.story-bible-link-list{display:grid;gap:8px;margin:0;padding:0;list-style:none}.story-bible-link-list li{display:grid;gap:2px;padding:8px 0;border-bottom:1px solid rgba(36,32,26,.08)}.story-bible-link-list li:last-child{border-bottom:0}.story-bible-link-list span{color:var(--plotline-muted);font-size:.88rem}.story-bible-timeline-summary{display:grid;gap:14px}.story-bible-wide-card{max-width:none}.story-bible-chapter-summary{border-top:1px solid var(--plotline-line);padding-top:8px}.story-bible-scene-summary{display:grid;grid-template-columns:minmax(220px,1.5fr) repeat(3,minmax(120px,.8fr));gap:8px;padding:9px 0;border-top:1px solid rgba(36,32,26,.08)}.story-bible-scene-summary p{grid-column:1/-1;margin:0}.story-bible-scene-summary span{color:var(--plotline-muted);font-size:.88rem}.attention-list{display:grid;gap:10px}.attention-list article{display:grid;grid-template-columns:max-content minmax(0,1fr) auto;align-items:center;gap:10px;border:1px solid var(--plotline-line);border-radius:12px;padding:10px 12px;background:rgba(255,255,255,.82)}.attention-list p{grid-column:2/-1;margin:0;color:var(--plotline-muted)}.writer-workspace-form,.writer-add-form,.writer-edit-form,.chapter-goal-form{display:grid;gap:10px}.writer-checkbox-grid{display:flex;flex-wrap:wrap;gap:8px 14px}.writer-checkbox-grid label{display:inline-flex;align-items:center;gap:6px;color:var(--plotline-muted);font-size:.86rem;font-weight:650}.writer-priority-control{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:12px}.writer-priority-control .form-range{min-width:0}.writer-note-list,.writer-queue-list{display:grid;gap:10px}.writer-mini-card{border:1px solid var(--plotline-line);border-radius:12px;padding:10px;background:rgba(255,255,255,.72)}.writer-mini-card summary{display:flex;align-items:center;gap:8px;cursor:pointer}.writer-mini-card summary strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-card-list{display:grid;gap:10px}.attachment-summary{align-items:center}.attachment-kind{border-radius:999px;padding:3px 8px;background:rgba(47,111,99,.1);color:var(--plotline-accent);font-size:.76rem;font-weight:800;text-transform:uppercase}.attachment-card-body{display:grid;gap:6px;margin-top:10px}.attachment-card-body p{margin:0}.attachment-add-card{margin-top:10px}.writer-checklist{display:grid;gap:6px}.writer-checklist-row,.writer-add-inline{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px}.writer-remove-inline{display:flex;justify-content:end;margin:-2px 0 4px}.writer-dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:26px}.writer-dashboard-panel{border:1px solid var(--plotline-line);border-radius:14px;padding:14px;background:rgba(255,255,255,.7);box-shadow:0 14px 34px rgba(36,32,26,.05)}.writer-queue-card{border:1px solid var(--plotline-line);border-radius:12px;padding:12px;background:rgba(255,255,255,.9)}.writer-queue-card h3{margin:0;font-size:1rem}.writer-queue-card p{margin:8px 0 0;color:var(--plotline-muted)}.writer-queue-title{display:flex;align-items:start;justify-content:space-between;gap:12px}.writer-kpi{display:block;color:var(--plotline-accent);font-size:2.2rem;line-height:1}.export-action-row{margin:-8px 0 18px}.dynamics-timeline{position:relative;min-height:128px;border:1px solid var(--plotline-line);border-radius:14px;background:linear-gradient(180deg,rgba(47,111,99,.07),rgba(255,255,255,.84));overflow:hidden}.dynamics-timeline::before{content:"";position:absolute;left:12px;right:12px;top:64px;height:1px;background:rgba(36,32,26,.18)}.dynamics-marker{position:absolute;bottom:18px;width:12px;height:86px;transform:translateX(-50%);display:flex;align-items:end;justify-content:center}.dynamics-marker span{display:block;width:8px;min-height:12px;max-height:82px;border-radius:999px;background:var(--plotline-accent);box-shadow:0 8px 20px rgba(47,111,99,.22)}.dynamics-marker.pov span{background:#8a4b2f}.dynamics-timeline.relationship .dynamics-marker span{background:#7c5fb0}.scenario-banner{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;border:1px solid rgba(103,80,164,.22);border-radius:12px;padding:16px;margin-bottom:16px;background:linear-gradient(135deg,rgba(103,80,164,.1),rgba(255,255,255,.86));box-shadow:0 12px 28px rgba(36,32,26,.08)}.scenario-banner h1{margin:0 0 4px}.scenario-banner p{margin:0;color:var(--plotline-muted)}.scenario-card{border-color:rgba(103,80,164,.18)}.scenario-warning-strip{display:flex;gap:10px;align-items:center;border:1px solid var(--plotline-line);border-radius:10px;padding:10px 12px;margin-bottom:14px;background:rgba(255,255,255,.76);color:var(--plotline-muted)}.scenario-warning-strip strong{color:var(--plotline-ink)}.scenario-board{border:1px solid var(--plotline-line);border-radius:12px;padding:12px;background:rgba(247,245,240,.74);overflow:hidden;margin-bottom:18px}.scenario-scroll{display:flex;gap:14px;overflow-x:auto;padding-bottom:8px}.scenario-chapter{min-width:360px;max-width:520px;border:1px solid rgba(82,75,65,.14);border-radius:10px;background:rgba(255,255,255,.86)}.scenario-chapter header{display:grid;gap:2px;border-bottom:1px solid var(--plotline-line);padding:10px 12px}.scenario-chapter header span{color:var(--plotline-muted);font-size:.78rem;font-weight:800;text-transform:uppercase}.scenario-scene-row{display:grid;gap:10px;padding:10px}.scenario-scene-card{display:grid;gap:8px;border:1px solid rgba(82,75,65,.12);border-radius:9px;padding:10px;background:#fff}.scenario-scene-title{display:grid;gap:2px}.scenario-scene-title span,.scenario-mini-data{color:var(--plotline-muted);font-size:.78rem}.scenario-mini-data{display:grid;gap:2px}.scenario-move-actions,.scenario-chapter-form,.scenario-compare-list article{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.scenario-chapter-form select{min-width:160px;width:auto}.scenario-compare-list{display:grid;gap:10px}.scenario-compare-list article{justify-content:space-between;border:1px solid var(--plotline-line);border-radius:9px;padding:10px;background:rgba(255,255,255,.82)}.danger-zone{border-color:rgba(163,61,61,.24)}.archive-filter-form{align-items:end}.archive-item-list{display:grid;gap:10px}.archive-item-card{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid var(--plotline-line);border-radius:10px;padding:12px;background:rgba(255,255,255,.82)}.archive-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-items:end}.delete-forever-form{display:inline-flex;margin:0}.archive-item-card h3{margin:4px 0}.archived-badge{display:inline-flex;border:1px solid rgba(82,75,65,.16);border-radius:999px;padding:2px 8px;color:var(--plotline-muted);font-size:.72rem;font-weight:800;text-transform:uppercase;background:rgba(247,245,240,.86)}.restore-button{white-space:nowrap}.archive-button-form{display:inline-flex;align-items:center;margin:0}.acceptance-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:12px;margin-bottom:16px}.acceptance-summary{display:grid;gap:4px;padding:16px}.acceptance-summary strong{font-size:2rem;line-height:1}.acceptance-summary.pass{border-left:5px solid #4d7654}.acceptance-summary.review{border-left:5px solid #b8762b}.acceptance-summary.blocked{border-left:5px solid #963f36}.acceptance-check-list{display:grid;gap:14px}.acceptance-area{border:1px solid var(--plotline-line);border-radius:10px;padding:12px;background:rgba(255,255,255,.62)}.acceptance-area h3{margin:0 0 10px;font-size:1.05rem}.acceptance-check-items{display:grid;gap:8px}.acceptance-check-item{display:grid;grid-template-columns:92px minmax(0,1fr);gap:10px;align-items:start;border:1px solid rgba(82,75,65,.12);border-radius:8px;padding:10px;background:rgba(255,255,255,.74)}.acceptance-check-item p{margin:2px 0 0;color:var(--plotline-muted)}.acceptance-status{display:inline-flex;justify-content:center;width:fit-content;min-width:74px;border-radius:999px;padding:3px 9px;font-size:.72rem;font-weight:900;text-transform:uppercase}.acceptance-check-item.pass .acceptance-status{color:#24512b;background:#e6f4e7}.acceptance-check-item.review .acceptance-status{color:#7b4b13;background:#fbecd3}.acceptance-check-item.blocked .acceptance-status{color:#7a2222;background:#fff0f0}.plotline-confirm-modal .modal-title{color:var(--plotline-ink)}.plotline-confirm-modal .modal-body p{white-space:pre-line}.delete-confirm-field{border:1px solid rgba(163,61,61,.22);border-radius:8px;padding:12px;background:rgba(255,247,244,.7)}@media print{header,.breadcrumb-trail,.context-header,.button-row,.story-bible-nav,.inspector-quick-nav{display:none!important}.plotline-shell{max-width:none;padding:0}}@media(max-width:760px){.plotline-shell{padding-left:14px;padding-right:14px}.page-heading{display:block}.page-heading .button-row,.timeline-filter{margin-top:14px}.timeline-filter{align-items:stretch;flex-direction:column}.story-bible-search,.story-bible-section-heading{align-items:stretch;flex-direction:column}.story-bible-scene-summary,.attention-list article{grid-template-columns:1fr}.writer-dashboard-grid{grid-template-columns:1fr}.writer-checklist-row,.writer-add-inline{grid-template-columns:1fr}.attention-list p{grid-column:auto}}@media(max-width:900px){.workspace-layout,.workspace-layout.inspector-drawer-open{grid-template-columns:1fr;gap:14px}.timeline-inspector-resizer{display:none}.scene-inspector-panel{position:static;max-height:none;overflow:visible}.scene-inspector-body{max-height:none;overflow:visible}}@media(max-width:1100px){.metric-graph-row{grid-template-columns:1fr}.health-kpi-grid,.analytics-grid-two,.analytics-grid-three{grid-template-columns:1fr}.analytics-metric-row{grid-template-columns:1fr}.analytics-metric-label{border-right:0}}.trial-status-panel,.trial-dashboard-banner{border:1px solid var(--plotline-line);border-radius:8px;padding:18px 20px;background:var(--plotline-panel)}.trial-status-panel{display:grid;gap:12px;margin-bottom:18px}.trial-status-panel--signup{grid-template-columns:minmax(0,1fr) auto;align-items:center;max-width:980px}.trial-status-panel h2,.trial-status-panel h3,.trial-dashboard-banner h2{margin:0}.trial-status-panel p,.trial-dashboard-banner p{margin-bottom:0}.trial-status-panel__heading,.trial-dashboard-banner{display:flex;gap:16px;align-items:center;justify-content:space-between}.trial-dashboard-banner{margin-bottom:18px}.trial-dashboard-banner__body{min-width:0}.trial-dashboard-banner__actions{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:8px}.trial-progress{height:10px;overflow:hidden;border-radius:999px;background:rgba(84,68,48,.12)}.trial-progress__bar{height:100%;border-radius:inherit}.trial-status-panel[hidden],.trial-dashboard-banner[hidden]{display:none}@media (max-width:760px){.trial-status-panel--signup,.trial-status-panel__heading,.trial-dashboard-banner{align-items:stretch;flex-direction:column}.trial-dashboard-banner__actions,.trial-dashboard-banner__actions .btn,.trial-status-panel--signup .btn{width:100%}} \ No newline at end of file +html{font-size:15px;min-height:100%}@media(min-width:768px){html{font-size:16px}}:root{--plotline-ink:#1e252b;--plotline-muted:#66717b;--plotline-paper:#fbfaf7;--plotline-panel:#fff;--plotline-line:#d8ddd8;--plotline-accent:#2f6f63;--plotline-accent-dark:#22534a;--plotline-soft:#eef5f2;--timeline-label-width:180px;--timeline-scene-width:220px;--timeline-grid-gap:10px}body{min-height:100%;margin-bottom:0;color:var(--plotline-ink);background:var(--plotline-paper)}a{color:var(--plotline-accent-dark)}.btn-primary{--bs-btn-bg:var(--plotline-accent);--bs-btn-border-color:var(--plotline-accent);--bs-btn-hover-bg:var(--plotline-accent-dark);--bs-btn-hover-border-color:var(--plotline-accent-dark)}.btn-outline-primary{--bs-btn-color:var(--plotline-accent-dark);--bs-btn-border-color:var(--plotline-accent);--bs-btn-hover-bg:var(--plotline-accent);--bs-btn-hover-border-color:var(--plotline-accent)}.plotline-nav{background:rgba(255,255,255,.94);backdrop-filter:blur(8px)}.plotline-shell{max-width:1480px;padding-left:24px;padding-right:24px}.plotline-shell-wide{max-width:none;padding-left:clamp(18px,2vw,32px);padding-right:clamp(18px,2vw,32px)}.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin:18px 0 24px}.workspace-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:14px 0 18px}.workspace-heading h1{margin:0;font-size:clamp(1.8rem,3vw,2.7rem);line-height:1.05}.page-heading.compact{max-width:980px}.page-heading h1{margin:0;font-size:clamp(2rem,4vw,3.2rem);line-height:1.05;letter-spacing:0}.eyebrow{margin:0 0 6px;color:var(--plotline-accent-dark);font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.lead-text{max-width:760px;margin:10px 0 0;color:var(--plotline-muted);font-size:1.05rem}.button-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.button-row form,.compact-buttons form,.asset-card-footer form,td.text-end form,form[data-confirm-message]{display:inline-flex;align-items:center;margin:0}td.text-end{white-space:nowrap}.content-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}.plain-card,.empty-panel,.edit-panel,.list-section{background:var(--plotline-panel);border:1px solid var(--plotline-line);border-radius:8px;padding:20px;box-shadow:0 10px 24px rgba(30,37,43,.04)}.plain-card h2,.empty-panel h2,.list-section h2{margin-top:0;font-size:1.35rem}.plain-card p,.empty-panel p,.muted{color:var(--plotline-muted)}.edit-panel{max-width:980px}.trial-status-panel,.trial-dashboard-banner{border:1px solid var(--plotline-line);border-radius:8px;padding:18px 20px;background:var(--plotline-panel)}.trial-status-panel{display:grid;gap:12px;margin-bottom:18px}.trial-status-panel--signup{grid-template-columns:minmax(0,1fr) auto;align-items:center;max-width:980px}.trial-status-panel h2,.trial-status-panel h3,.trial-dashboard-banner h2{margin:0}.trial-status-panel p,.trial-dashboard-banner p{margin-bottom:0}.trial-status-panel__heading,.trial-dashboard-banner{display:flex;gap:16px;align-items:center;justify-content:space-between}.trial-dashboard-banner{margin-bottom:18px}.trial-dashboard-banner__body{min-width:0}.trial-dashboard-banner__actions{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:8px}.trial-progress{height:10px;overflow:hidden;border-radius:999px;background:rgba(84,68,48,.12)}.trial-progress__bar{height:100%;border-radius:inherit}.trial-status-panel[hidden],.trial-dashboard-banner[hidden]{display:none}.location-page .page-heading.compact,.location-page .edit-panel,.location-page .empty-panel,.location-page .drag-drop-panel{max-width:none}.import-panel,.import-preview-section{max-width:none}.import-json-input{font-family:Consolas,"Liberation Mono",Menlo,monospace;font-size:.88rem;line-height:1.45;min-height:34rem;max-height:64vh;overflow:auto;resize:vertical;white-space:pre}.import-preview-heading,.import-counts{display:flex;align-items:flex-start;gap:12px}.import-preview-heading{justify-content:space-between;margin-bottom:16px}.import-counts{flex-wrap:wrap}.import-counts span{display:inline-flex;align-items:baseline;gap:5px;border:1px solid var(--plotline-line);border-radius:999px;padding:5px 11px;background:var(--plotline-soft);color:var(--plotline-muted);font-weight:700}.import-counts strong{color:var(--plotline-ink)}.import-tree{display:grid;gap:12px}.import-tree-book{border:1px solid var(--plotline-line);border-radius:8px;padding:14px;background:rgba(255,255,255,.54)}.import-tree-book>summary,.import-tree-chapter>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}.import-tree-book>summary span,.import-tree-chapter>summary span{color:var(--plotline-muted);font-size:.84rem;font-weight:700;white-space:nowrap}.import-tree-book h3{margin:0 0 10px;font-size:1.08rem}.import-tree-chapter{border-top:1px solid var(--plotline-line);padding:10px 0 0;margin-top:10px}.import-tree-chapter ul{margin:8px 0 0;color:var(--plotline-muted)}.import-scene-meta{display:block;margin-top:2px;color:var(--plotline-muted);font-size:.82rem}.import-mapping-summary{display:grid;gap:6px;border:1px solid rgba(184,118,43,.28);border-radius:8px;padding:10px 12px;margin-bottom:14px;background:rgba(251,236,211,.5);color:var(--plotline-muted);font-size:.9rem}.import-duplicate-confirm{border:1px solid rgba(184,118,43,.34);border-radius:8px;padding:12px 12px 12px 38px;background:rgba(251,236,211,.72)}.import-confirmation,.import-docs details{border:1px solid var(--plotline-line);border-radius:8px;padding:16px;background:rgba(255,255,255,.42)}.import-confirmation h3,.import-doc-grid h3{margin-top:0;font-size:1.05rem}.import-docs summary{cursor:pointer;font-weight:800}.import-doc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:14px}.import-message-list ul{max-height:16rem;overflow:auto}.scene-editor{max-width:1180px}.table{margin-bottom:0}.table th{color:var(--plotline-muted);font-size:.78rem;letter-spacing:.06em;text-transform:uppercase}.narrow{width:90px;white-space:nowrap}.status-pill{display:inline-flex;align-items:center;width:fit-content;border:1px solid #c8d8d2;border-radius:999px;padding:2px 8px;color:var(--plotline-accent-dark);background:var(--plotline-soft);font-size:.78rem;font-weight:700;white-space:nowrap}.dashboard-summary-card{border-color:var(--plotline-line)}.dashboard-summary-body{padding:10px 12px}.dashboard-summary-label{margin-bottom:4px;font-size:.7rem;line-height:1.15}.dashboard-summary-value{display:block;font-size:1.45rem;line-height:1}.dashboard-summary-calm{border-color:rgba(47,111,99,.28);background:rgba(238,245,242,.62)}.dashboard-summary-mild{border-color:rgba(197,139,43,.32);background:rgba(255,248,232,.68)}.dashboard-summary-attention{border-color:rgba(142,80,103,.32);background:rgba(252,241,246,.7)}.dashboard-progress-card{border-color:rgba(47,111,99,.18);background:linear-gradient(180deg,#fff 0%,rgba(238,245,242,.64) 100%)}.dashboard-progress-body{padding:12px 14px}.dashboard-progress-heading{margin-bottom:8px}.dashboard-progress-title{margin:0 0 2px;font-size:1.05rem;line-height:1.2}.dashboard-series-progress{height:7px;background:rgba(47,111,99,.1)}.dashboard-series-progress .progress-bar{background:linear-gradient(90deg,var(--plotline-accent),#6fa99b)}.dashboard-progress-source{border-color:rgba(47,111,99,.2);color:var(--plotline-accent-dark);background:rgba(238,245,242,.9)}.dashboard-book-title-block h3{line-height:1.16}.dashboard-book-title-block a{color:var(--plotline-ink);text-decoration-color:rgba(47,111,99,.35)}.dashboard-book-subtitle{color:var(--plotline-muted);font-size:.95rem;line-height:1.25}.dashboard-status-pill{border-color:var(--dashboard-status-border,#c8d8d2);color:var(--dashboard-status-ink,var(--plotline-accent-dark));background:var(--dashboard-status-bg,var(--plotline-soft))}.dashboard-status-published{--dashboard-status-border:rgba(47,111,99,.32);--dashboard-status-bg:#e7f2ed;--dashboard-status-ink:#22534a}.dashboard-status-drafting{--dashboard-status-border:rgba(184,118,43,.35);--dashboard-status-bg:#fff2dd;--dashboard-status-ink:#7b4b12}.dashboard-status-planning{--dashboard-status-border:rgba(51,117,155,.3);--dashboard-status-bg:#e9f3f8;--dashboard-status-ink:#245b78}.dashboard-status-research,.dashboard-status-outlining{--dashboard-status-border:rgba(103,80,164,.26);--dashboard-status-bg:#f0edf8;--dashboard-status-ink:#51417c}.dashboard-status-revising{--dashboard-status-border:rgba(123,82,148,.3);--dashboard-status-bg:#f4eefa;--dashboard-status-ink:#5f3e73}.dashboard-status-editing{--dashboard-status-border:rgba(68,75,130,.3);--dashboard-status-bg:#eceef8;--dashboard-status-ink:#343b72}.dashboard-status-proofreading{--dashboard-status-border:rgba(43,130,123,.3);--dashboard-status-bg:#e6f5f2;--dashboard-status-ink:#23625d}.dashboard-status-ready{--dashboard-status-border:rgba(185,142,30,.34);--dashboard-status-bg:#fff6d8;--dashboard-status-ink:#765a0f}.dashboard-status-paused{--dashboard-status-border:rgba(102,113,123,.28);--dashboard-status-bg:#f0f2f1;--dashboard-status-ink:#56616b}.dashboard-status-archived{--dashboard-status-border:rgba(139,80,86,.28);--dashboard-status-bg:#f3eded;--dashboard-status-ink:#76474d}.dashboard-attention-soft{border-color:rgba(102,113,123,.24);color:#56616b;background:#f3f4f2}.order-buttons{display:flex;gap:6px}.purpose-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;max-height:260px;overflow:auto;padding:10px;border:1px solid var(--plotline-line);border-radius:8px;background:#fcfcfb}.purpose-check{display:flex;align-items:center;gap:8px;font-size:.92rem}.timeline-filter{display:flex;align-items:center;gap:8px;min-width:min(420px,100%)}.workspace-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:0;align-items:start;--timeline-inspector-width:min(40vw,560px)}.workspace-layout.inspector-drawer-open{grid-template-columns:minmax(420px,1fr) 10px minmax(420px,var(--timeline-inspector-width));gap:12px}.timeline-workspace{min-width:0;max-width:100%}.timeline-inspector-resizer{position:sticky;top:76px;z-index:25;width:10px;height:calc(100vh - 96px);border-radius:999px;cursor:col-resize;background:linear-gradient(180deg,rgba(47,111,99,.16),rgba(47,111,99,.04))}.timeline-inspector-resizer::before{content:"";display:block;width:2px;height:48px;margin:18px auto;border-radius:999px;background:var(--plotline-accent);opacity:.55}.timeline-inspector-resizer:hover,.timeline-inspector-resizer:focus-visible{background:rgba(47,111,99,.16)}body.timeline-inspector-resizing{cursor:col-resize;user-select:none}.pacing-panel{margin-top:14px;margin-bottom:0;border:1px solid var(--plotline-line);border-radius:8px;padding:14px;background:#fff;box-shadow:0 10px 24px rgba(30,37,43,.04)}.pacing-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.pacing-heading h2{margin:0;font-size:1.1rem}.metric-graph-stack{display:grid;gap:10px;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;padding-bottom:4px}.metric-graph-row{display:grid;grid-template-columns:150px minmax(260px,1fr);gap:10px;align-items:center;min-width:max(100%,calc(150px + (var(--scene-count,1)*34px)))}.metric-graph-label{color:var(--plotline-muted);font-size:.84rem;font-weight:700}.metric-graph-points{display:grid;grid-template-columns:repeat(var(--scene-count),minmax(28px,1fr));gap:5px;align-items:end;min-height:52px;border-radius:8px;padding:6px;background:linear-gradient(180deg,#f6faf8 0%,#edf4f1 100%);min-width:calc(var(--scene-count)*34px)}.metric-point{display:flex;align-items:flex-end;justify-content:center;height:48px;min-width:28px;color:var(--plotline-accent-dark);text-decoration:none}.metric-point::before{content:"";display:block;width:100%;height:max(8px,var(--metric-height));border-radius:5px 5px 2px 2px;background:linear-gradient(180deg,#6fa99b,var(--plotline-accent-dark));box-shadow:inset 0 1px 0 rgba(255,255,255,.35)}.metric-point span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.timeline-shell{overflow-x:auto;padding:16px;border:1px solid var(--plotline-line);border-radius:8px;background:linear-gradient(180deg,#fff 0%,#f7faf8 100%)}.workspace-timeline{min-height:420px}.timeline-series-row{display:grid;grid-template-columns:var(--timeline-label-width) max-content;gap:var(--timeline-grid-gap);align-items:stretch;width:max-content;min-width:100%}.timeline-project-title{position:sticky;left:0;z-index:20;display:grid;align-content:start;gap:4px;width:var(--timeline-label-width);min-height:100%;border-radius:8px;padding:12px;color:#fff;background:var(--plotline-accent-dark);font-weight:700;box-shadow:8px 0 18px rgba(30,37,43,.08)}.timeline-project-title span,.timeline-book-title span{color:rgba(255,255,255,.78);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase}.timeline-project-title strong,.timeline-book-title strong{line-height:1.15}.timeline-books{display:flex;gap:var(--timeline-grid-gap);align-items:stretch}.timeline-book{flex:0 0 auto;width:calc((var(--book-scene-count)*var(--timeline-scene-width)) + ((var(--book-scene-count) - 1)*var(--timeline-grid-gap)));min-width:var(--timeline-scene-width)}.timeline-book-title{display:grid;gap:2px;margin-bottom:var(--timeline-grid-gap);border-radius:8px;padding:10px 12px;color:#fff;background:var(--plotline-accent-dark);font-weight:700}.timeline-chapters{display:flex;gap:var(--timeline-grid-gap);align-items:flex-start}.timeline-chapter{flex:0 0 auto;width:calc((var(--chapter-scene-count)*var(--timeline-scene-width)) + ((var(--chapter-scene-count) - 1)*var(--timeline-grid-gap)));min-width:var(--timeline-scene-width);box-sizing:border-box;border-radius:8px;background:rgba(238,245,242,.7);outline:1px solid #d4ded8;outline-offset:0;overflow:visible}.timeline-chapter-title{display:grid;gap:2px;border-bottom:1px solid #d4ded8;padding:10px 12px;color:var(--plotline-accent-dark);font-weight:700}.timeline-chapter-title span{color:var(--plotline-muted);font-size:.76rem;text-transform:uppercase}.timeline-scenes{display:grid;grid-template-columns:repeat(var(--chapter-scene-count),minmax(0,1fr));gap:var(--timeline-grid-gap);width:100%;box-sizing:border-box;min-height:190px;padding:0}.timeline-scene-card,.timeline-empty-scene{display:flex;flex-direction:column;gap:6px;width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--plotline-line);border-radius:8px;padding:12px;background:#fff;color:var(--plotline-ink);text-decoration:none;box-shadow:0 8px 18px rgba(30,37,43,.05)}.timeline-scene-card:hover{border-color:var(--plotline-accent);color:var(--plotline-ink)}.timeline-placeholder-scene,.timeline-placeholder-cell,.metric-point-placeholder{cursor:default;opacity:.72}.timeline-placeholder-scene{align-items:center;justify-content:center;border-style:dashed;color:var(--plotline-muted);background:rgba(255,255,255,.38);font-size:.86rem;font-weight:800;text-align:center}.timeline-placeholder-cell{border-style:dashed;background:repeating-linear-gradient(-45deg,rgba(216,221,216,.18) 0,rgba(216,221,216,.18) 7px,rgba(255,255,255,.18) 7px,rgba(255,255,255,.18) 14px)}.metric-point-placeholder::before{height:4px;background:rgba(102,113,123,.2);box-shadow:none}.timeline-scene-card.selected{border-color:var(--plotline-accent-dark);box-shadow:0 0 0 3px rgba(47,111,99,.16),0 10px 22px rgba(30,37,43,.08)}.scene-badge-row,.purpose-chip-row{display:flex;flex-wrap:wrap;gap:5px;align-items:center}.warning-placeholder{display:inline-flex;width:fit-content;border:1px dashed #d6b25e;border-radius:999px;padding:2px 8px;color:#755715;background:#fff8e8;font-size:.74rem;font-weight:700}.warning-placeholder.active{border-color:rgba(159,69,69,.36);color:#8a3434;background:rgba(255,232,232,.9)}.dependency-placeholder{display:inline-flex;width:fit-content;border:1px solid rgba(47,111,99,.2);border-radius:999px;padding:2px 8px;color:var(--plotline-accent-dark);background:rgba(47,111,99,.08);font-size:.74rem;font-weight:700}.purpose-chip{display:inline-flex;width:fit-content;border-radius:999px;padding:2px 7px;color:#38453e;background:#edf0eb;font-size:.72rem;font-weight:700}.future-lane-placeholder{border-top:1px dashed #cbd8d2;padding:8px 12px;color:var(--plotline-muted);font-size:.78rem;background:rgba(255,255,255,.45)}.metric-timeline-board{display:grid;gap:8px;width:max-content;min-width:100%;margin-top:14px;border-top:1px solid var(--plotline-line);padding-top:14px}.metric-shape-controls{position:sticky;left:0;z-index:6;display:grid;gap:8px;width:calc(var(--timeline-label-width) + (var(--scene-count)*var(--timeline-scene-width)) + (var(--scene-count)*var(--timeline-grid-gap)));min-width:100%;border-radius:8px;padding:10px;background:rgba(255,255,255,.88)}.metric-timeline-row{display:grid;grid-template-columns:var(--timeline-label-width) calc((var(--scene-count)*var(--timeline-scene-width)) + ((var(--scene-count) - 1)*var(--timeline-grid-gap)));gap:var(--timeline-grid-gap);align-items:stretch}.metric-lane-label{position:sticky;left:0;z-index:12;display:grid;align-content:start;gap:4px;min-height:320px;border:1px solid rgba(47,111,99,.18);border-radius:8px;padding:10px;color:var(--plotline-accent-dark);background:#fff;box-shadow:0 6px 14px rgba(30,37,43,.04)}.metric-lane-label span{color:var(--plotline-muted);font-size:.78rem;font-weight:600}.colour-swatch{display:inline-block;width:18px;height:18px;border:1px solid rgba(30,37,43,.18);border-radius:999px;vertical-align:middle}.plot-lane-board{position:relative;display:grid;gap:8px;width:max-content;min-width:100%;margin-top:14px;border-top:1px solid var(--plotline-line);padding-top:14px}.plot-lane-svg-overlay{position:absolute;inset:0 auto auto 0;z-index:4;pointer-events:none;overflow:visible}.plot-line-svg-path{fill:none;stroke-width:4;stroke-linecap:round;opacity:.72}.plot-line-svg-connector{fill:none;stroke-width:3;stroke-linecap:round;opacity:.58}.plot-line-svg-path.plotline-state-neglected{stroke-dasharray:9 8;opacity:.44}.plot-line-svg-path.plotline-state-resolved,.plot-line-svg-path.plotline-state-questionable{stroke:#8c9491;opacity:.42}.plot-line-svg-path.plotline-state-abandoned{stroke:#9b2f36;stroke-dasharray:5 7;opacity:.5}.plot-event-svg-node.plotline-state-resolved circle,.plot-event-svg-node.plotline-state-questionable circle{fill:#8c9491}.plot-event-svg-node.plotline-state-abandoned circle,.plot-event-svg-node.plotline-state-abandoned path{fill:#9b2f36;stroke:#fff}.plot-event-svg-node.plotline-state-abandoned line{stroke:#fff}.plotline-health-marker path,.plotline-health-marker circle{fill:#f4c430;stroke:#8a6712;stroke-width:1.5}.plotline-health-marker line,.plotline-health-marker text{stroke:#5e4710;fill:#5e4710;stroke-width:1.6;stroke-linecap:round}.plotline-health-marker text{font-size:11px;font-weight:800;stroke-width:0}.plotline-health-marker-dangling path,.plotline-health-marker-dangling circle{fill:#f8df8f}.plotline-health-marker-abandoned path,.plotline-health-marker-abandoned circle{fill:#d85c63;stroke:#8b1e2d}.plotline-health-marker-abandoned line{stroke:#fff}.plot-event-svg-node circle,.plot-event-svg-node path{stroke:#fff;stroke-width:2}.plot-event-svg-node line{stroke:#8b1e2d;stroke-width:4;stroke-linecap:round}.plot-event-svg-node-reveal circle{stroke-width:3}.plot-event-svg-node-resolve circle:last-child{stroke:currentColor;stroke-width:2}.lane-board-heading,.metric-lane-board-heading,.plot-lane-board-heading{position:sticky;left:0;z-index:6;display:flex;align-items:center;justify-content:space-between;gap:14px;width:calc(var(--timeline-label-width) + (var(--scene-count)*var(--timeline-scene-width)) + (var(--scene-count)*var(--timeline-grid-gap)));min-width:100%;margin-bottom:2px;border-radius:8px;padding:8px 10px;color:var(--plotline-accent-dark);background:rgba(255,255,255,.92);font-weight:700;box-shadow:0 8px 16px rgba(30,37,43,.05)}.lane-board-heading small,.metric-lane-board-heading small,.plot-lane-board-heading small{color:var(--plotline-muted);font-weight:500;white-space:nowrap}.plot-lane-row{display:grid;grid-template-columns:var(--timeline-label-width) repeat(var(--scene-count),var(--timeline-scene-width));gap:var(--timeline-grid-gap);align-items:stretch}.plot-lane-label{position:sticky;left:0;z-index:12;display:flex;align-items:center;gap:8px;min-height:46px;border:1px solid color-mix(in srgb,var(--plot-colour),#fff 55%);border-left:5px solid var(--plot-colour);border-radius:8px;padding:8px 10px;background:#fff;color:var(--plotline-ink);text-decoration:none;box-shadow:0 6px 14px rgba(30,37,43,.04)}.plot-lane-label:hover{color:var(--plotline-ink);border-color:var(--plot-colour)}.plot-lane-slots{display:contents}.plot-lane-slot{display:flex;flex-wrap:wrap;align-content:flex-start;gap:5px;min-height:46px;border:1px dashed #d8ddd8;border-radius:8px;padding:7px;background:rgba(255,255,255,.62)}.thread-marker{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;border:1px solid color-mix(in srgb,var(--plot-colour),#000 18%);border-radius:999px;padding:0 7px;color:var(--plotline-ink);background:color-mix(in srgb,var(--plot-colour),#fff 78%);font-size:.72rem;font-weight:800;text-decoration:none}.plot-lane-board [data-plot-event-node]{opacity:0}.thread-marker:hover{color:var(--plotline-ink);background:color-mix(in srgb,var(--plot-colour),#fff 58%)}.thread-marker.resolved{border-color:#5a8c60;background:#e6f4e7;color:#24512b}.thread-marker.contradicted{border-color:#b45c5c;background:#fff0f0;color:#7a2222}.thread-events-section{margin-top:16px}.thread-event-list{display:grid;gap:8px;margin-bottom:12px}.thread-event-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;border:1px solid color-mix(in srgb,var(--plot-colour),#fff 55%);border-left:4px solid var(--plot-colour);border-radius:8px;padding:8px;background:#fff}.thread-event-item>div{display:grid;gap:3px}.thread-event-marker{display:inline-flex;align-items:center;justify-content:center;width:fit-content;min-width:24px;height:22px;border-radius:999px;padding:0 7px;background:color-mix(in srgb,var(--plot-colour),#fff 72%);font-size:.72rem;font-weight:800}.thread-event-create{border-top:1px solid var(--plotline-line);padding-top:12px}.asset-lane-board{display:grid;gap:8px;width:max-content;min-width:100%;margin-top:14px;border-top:1px solid var(--plotline-line);padding-top:14px}.asset-lane-row{display:grid;grid-template-columns:var(--timeline-label-width) repeat(var(--scene-count),var(--timeline-scene-width));gap:var(--timeline-grid-gap);align-items:stretch}.asset-lane-label{position:sticky;left:0;z-index:12;display:grid;gap:2px;min-height:46px;border:1px solid #d4d7df;border-left:5px solid #6b5b95;border-radius:8px;padding:8px 10px;background:#fff;color:var(--plotline-ink);text-decoration:none;box-shadow:0 6px 14px rgba(30,37,43,.04)}.asset-lane-label span{color:var(--plotline-muted);font-size:.75rem}.asset-lane-slots{display:contents}.asset-lane-slot{display:flex;flex-wrap:wrap;align-content:flex-start;gap:5px;min-height:46px;border:1px dashed #d8ddd8;border-radius:8px;padding:7px;background:rgba(250,249,255,.72)}.asset-marker,.asset-event-marker{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;border:1px solid #7f70aa;border-radius:7px;padding:0 7px;color:#33284e;background:#eee9fb;font-size:.72rem;font-weight:800;text-decoration:none}.asset-marker:hover{color:#33284e;background:#dfd6f7}.asset-events-section{margin-top:16px}.asset-event-list,.asset-mini-list{display:grid;gap:8px;margin-bottom:12px}.asset-event-item,.asset-mini-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;border:1px solid #ded9ea;border-left:4px solid #6b5b95;border-radius:8px;padding:8px;background:#fff}.asset-event-item>div,.asset-mini-item>div{display:grid;gap:3px}.asset-create-form{border-top:1px solid var(--plotline-line);padding-top:12px}.asset-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}.asset-card{display:grid;gap:12px;border:1px solid var(--plotline-line);border-radius:8px;padding:14px;background:#fff;box-shadow:0 8px 18px rgba(30,37,43,.04)}.asset-card h2{margin:0;font-size:1.1rem}.asset-card-footer{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.asset-detail-grid{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(320px,1.2fr);gap:14px}.character-lane-board{display:grid;gap:8px;width:max-content;min-width:100%;margin-top:14px;border-top:1px solid var(--plotline-line);padding-top:14px}.character-lane-row{display:grid;grid-template-columns:var(--timeline-label-width) repeat(var(--scene-count),var(--timeline-scene-width));gap:var(--timeline-grid-gap);align-items:stretch}.character-lane-label{position:sticky;left:0;z-index:12;display:grid;gap:2px;min-height:46px;border:1px solid #d7d4ce;border-left:5px solid #8a6f3d;border-radius:8px;padding:8px 10px;background:#fff;color:var(--plotline-ink);text-decoration:none;box-shadow:0 6px 14px rgba(30,37,43,.04)}.character-lane-label span{color:var(--plotline-muted);font-size:.75rem}.character-lane-slots{display:contents}.character-lane-slot{display:flex;flex-wrap:wrap;align-content:flex-start;gap:5px;min-height:46px;border:1px dashed #d8ddd8;border-radius:8px;padding:7px;background:rgba(255,252,246,.72)}.character-marker{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;border:1px solid #9a7a3f;border-radius:999px;padding:0 7px;color:#4f3810;background:#fff2d7;font-size:.72rem;font-weight:800;text-decoration:none}.character-card{border-left:4px solid #8a6f3d}.character-section{margin-top:16px}.character-item{border-left-color:#8a6f3d}.character-appearance-card{display:grid;gap:8px;border:1px solid #d7d4ce;border-left:4px solid #8a6f3d;border-radius:8px;padding:10px;background:#fff}.character-appearance-summary{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.character-appearance-summary>div:first-child{display:grid;gap:3px}.character-appearance-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.character-appearance-edit .asset-create-form{margin-top:8px;border-top:1px solid var(--plotline-line)}.form-helper-message{margin:0 0 8px;font-size:.86rem;font-weight:700}.scene-number,.time-label{color:var(--plotline-muted);font-size:.82rem}.location-pill,.location-badge{display:inline-flex;align-items:center;width:fit-content;border:1px solid rgba(47,111,99,.18);border-radius:999px;padding:2px 7px;color:var(--plotline-accent-dark);background:rgba(47,111,99,.08);font-size:.74rem;font-weight:700}.scene-summary{display:-webkit-box;overflow:hidden;color:var(--plotline-muted);font-size:.88rem;-webkit-box-orient:vertical;-webkit-line-clamp:4}.timeline-empty-scene{justify-content:center;color:var(--plotline-muted);background:rgba(255,255,255,.58)}.form-control:focus,.form-select:focus,.form-check-input:focus{border-color:var(--plotline-accent);box-shadow:0 0 0 .2rem rgba(47,111,99,.16)}.scene-inspector-panel{position:sticky;top:76px;display:flex;flex-direction:column;max-height:calc(100vh - 96px);min-width:0;overflow:hidden;border:1px solid var(--plotline-line);border-radius:8px;background:#fff;box-shadow:0 14px 32px rgba(30,37,43,.08)}.inspector-header{position:sticky;top:0;z-index:5;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid var(--plotline-line);padding:16px;background:#fff}.scene-inspector-body{flex:1 1 auto;min-height:0;overflow:auto;padding:16px}.inspector-header h2{margin:0;font-size:1.25rem}.scene-inspector-form{display:grid;gap:14px}.inspector-section{border-top:1px solid var(--plotline-line);padding-top:12px}.inspector-section:first-of-type{border-top:0;padding-top:0}.inspector-section h3{margin:0 0 10px;font-size:.95rem;color:var(--plotline-accent-dark)}.location-helper{border:1px solid rgba(138,111,61,.22);border-radius:8px;padding:10px;background:rgba(255,248,232,.74)}.location-warning-list{margin:0;padding-left:18px;color:#6f5526;font-size:.86rem}.location-tree{display:grid;gap:8px}.location-tree-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--plotline-line);padding:10px 0 10px calc(var(--location-depth,0)*22px)}.location-tree-row:last-child{border-bottom:0}.location-tree-row>div:first-child{display:grid;gap:3px}.compact-buttons{flex-wrap:nowrap}.location-chip-list{display:flex;flex-wrap:wrap;gap:8px}.location-chip{border:1px solid var(--plotline-line);border-radius:8px;padding:7px 10px;background:#fff;text-decoration:none}.location-relationship-list{display:grid;gap:8px}.location-relationship-card{display:flex;justify-content:space-between;gap:12px;border:1px solid var(--plotline-line);border-radius:8px;padding:10px;background:#fff}.location-flags{display:flex;flex-wrap:wrap;gap:10px 16px;color:var(--plotline-muted);font-size:.86rem}.validation-summary,.warning-filter-panel{border:1px solid var(--plotline-line);border-radius:8px;margin-bottom:16px;padding:12px;background:#fff}.validation-summary{display:flex;flex-wrap:wrap;gap:12px;color:var(--plotline-muted)}.warning-dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:18px}.warning-count-row,.warning-card-title,.inspector-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.warning-list,.warning-mini-list{display:grid;gap:10px}.warning-card,.warning-mini-card{border:1px solid var(--plotline-line);border-radius:8px;padding:12px;background:#fff}.warning-card{display:grid;grid-template-columns:1fr auto;gap:12px}.warning-card p,.warning-mini-card p{margin:6px 0}.warning-actions{display:flex;align-items:flex-start;flex-wrap:wrap;gap:6px}.severity-pill{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font-size:.74rem;font-weight:800}.severity-pill.info{color:#365f7c;background:rgba(107,153,184,.14)}.severity-pill.warning{color:#7a5527;background:rgba(205,154,72,.17)}.severity-pill.error{color:#8a3434;background:rgba(190,83,83,.15)}.warning-mini-card{background:rgba(255,255,255,.76)}.dependency-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dependency-card{display:grid;gap:3px;border:1px solid var(--plotline-line);border-radius:8px;margin-bottom:8px;padding:9px;background:rgba(255,255,255,.78)}.move-preview-panel{max-width:900px}.focused-validation-summary{display:flex;flex-wrap:wrap;gap:10px;border:1px solid rgba(47,111,99,.16);border-radius:8px;margin-top:12px;padding:10px;color:var(--plotline-muted);background:rgba(47,111,99,.05)}.inspector-purpose-list{grid-template-columns:1fr;max-height:210px}.metric-slider-stack{display:grid;gap:12px}.metric-slider{display:grid;gap:4px}.metric-slider-label{display:flex;justify-content:space-between;gap:10px;color:var(--plotline-muted);font-size:.86rem;font-weight:700}.metric-slider-label output{color:var(--plotline-accent-dark)}.metric-slider .form-range{accent-color:var(--plotline-accent)}.asset-importance-slider{border:1px solid var(--plotline-line);border-radius:8px;padding:10px 12px;background:rgba(47,111,99,.05)}.story-asset-checkbox-field{margin-top:1.95rem}.story-asset-event-item{justify-content:flex-start;gap:8px}.story-asset-event-item .asset-event-marker{flex:0 0 auto;min-width:1.55rem;width:auto}.story-asset-event-details{min-width:0}.scene-inspector-root{display:grid;gap:12px}.scene-overview-card{display:grid;gap:10px;border:1px solid rgba(47,111,99,.18);border-radius:10px;padding:12px;background:linear-gradient(180deg,rgba(47,111,99,.08),rgba(255,255,255,.88))}.scene-overview-card h3{margin:0;font-size:1.05rem}.scene-overview-card .muted{display:flex;flex-wrap:wrap;gap:7px;margin:0}.overview-chip-grid,.context-nav,.breadcrumb-trail,.inspector-nav-links{display:flex;flex-wrap:wrap;gap:7px}.overview-chip,.context-nav a,.breadcrumb-trail a,.breadcrumb-trail span{display:inline-flex;align-items:center;border:1px solid var(--plotline-line);border-radius:999px;padding:4px 9px;color:var(--plotline-muted);font-size:.78rem;font-weight:800;text-decoration:none;background:rgba(255,255,255,.72)}.overview-chip.attention{color:#7a5527;border-color:rgba(205,154,72,.35);background:rgba(205,154,72,.14)}.overview-outcome{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;margin:0;color:var(--plotline-muted)}.inspector-quick-nav{position:sticky;top:0;z-index:5;display:grid;gap:8px;border:1px solid var(--plotline-line);border-radius:10px;padding:10px;background:rgba(255,255,255,.94);box-shadow:0 10px 24px rgba(55,48,39,.08);backdrop-filter:blur(8px)}.inspector-nav-links a{border:1px solid var(--plotline-line);border-radius:999px;padding:4px 8px;color:var(--plotline-muted);font-size:.76rem;font-weight:800;text-decoration:none}.inspector-nav-links a:hover,.inspector-nav-links a.active{color:var(--plotline-accent-dark);border-color:rgba(47,111,99,.35);background:rgba(47,111,99,.08)}.inspector-accordion-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;padding:0;color:var(--plotline-ink);font-size:.95rem;font-weight:900;text-align:left;background:transparent}.inspector-accordion-toggle::before{content:"+";display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:999px;margin-right:7px;color:var(--plotline-accent-dark);background:rgba(47,111,99,.09)}.inspector-section.is-open>.inspector-accordion-toggle::before{content:"-"}.inspector-accordion-toggle span:first-child{margin-right:auto}.accordion-count{color:var(--plotline-muted);font-size:.75rem}.inspector-subheading{margin:14px 0 8px;color:var(--plotline-muted);font-size:.88rem;font-weight:900}.inspector-accordion-body{display:none;margin-top:12px}.inspector-section.is-open>.inspector-accordion-body{display:block}.inspector-section.is-filtered-out{display:none}.breadcrumb-trail{margin-bottom:12px}.breadcrumb-trail a:hover,.context-nav a:hover{color:var(--plotline-accent-dark);border-color:rgba(47,111,99,.35);background:rgba(47,111,99,.08)}.context-header,.working-context-banner{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--plotline-line);border-radius:10px;margin-bottom:16px;padding:10px 12px;background:rgba(255,255,255,.84);box-shadow:0 10px 24px rgba(55,48,39,.05)}.context-title{display:grid;gap:2px}.context-title strong{color:var(--plotline-ink)}.health-kpi-grid,.analytics-grid-two,.analytics-grid-three{display:grid;gap:14px;margin:18px 0}.health-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.health-kpi-grid .plain-card{display:grid;gap:4px}.health-kpi-grid strong{color:var(--plotline-ink);font-size:2rem;line-height:1}.analytics-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}.analytics-grid-three{grid-template-columns:repeat(3,minmax(0,1fr))}.analytics-section{border:1px solid var(--plotline-line);border-radius:10px;margin:18px 0;padding:16px;background:rgba(255,255,255,.84);box-shadow:0 14px 34px rgba(55,48,39,.07)}.analytics-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:14px}.analytics-section-heading h2,.plain-card h3{margin:0}.analytics-metric-stack{display:grid;gap:12px;overflow-x:auto;padding-bottom:4px}.metric-shape-chart{display:grid;gap:12px}.metric-shape-intro{max-width:760px;margin:0;color:var(--plotline-muted)}.metric-toggle-row{display:flex;flex-wrap:wrap;gap:8px}.metric-toggle-pill{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(82,75,65,.16);border-radius:999px;padding:5px 9px;color:var(--plotline-muted);font-size:.78rem;font-weight:800;background:rgba(255,255,255,.78);cursor:pointer}.metric-toggle-pill::before{content:"";width:10px;height:10px;border-radius:999px;background:var(--metric-colour)}.metric-toggle-pill input{margin:0;accent-color:var(--metric-colour)}.timeline-metric-edit-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:end}.timeline-metric-edit-select{display:grid;gap:3px;min-width:180px;color:var(--plotline-muted);font-size:.78rem;font-weight:800}.timeline-metric-edit-status{align-self:center;border:1px solid rgba(47,111,99,.18);border-radius:999px;padding:5px 9px;color:var(--plotline-muted);font-size:.78rem;font-weight:800;background:rgba(255,255,255,.72)}.timeline-metric-edit-hint{font-size:.82rem}.metric-chart-frame canvas.metric-curve-editing{cursor:ns-resize}.metric-chart-frame{position:relative;min-height:320px;border:1px solid var(--plotline-line);border-radius:10px;padding:14px 12px 32px;background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(247,245,240,.76))}.metric-timeline-frame{width:calc((var(--scene-count)*var(--timeline-scene-width)) + ((var(--scene-count) - 1)*var(--timeline-grid-gap)))}.metric-chart-frame canvas{width:100%;height:300px}.metric-timeline-board .metric-graph-stack{width:max-content;min-width:100%}.metric-timeline-board .metric-graph-row{grid-template-columns:var(--timeline-label-width) repeat(var(--scene-count),var(--timeline-scene-width));gap:var(--timeline-grid-gap);min-width:100%}.metric-timeline-board .metric-graph-points{display:contents}.metric-timeline-board .metric-point{border:1px solid rgba(47,111,99,.12);border-radius:8px;background:rgba(255,255,255,.62)}.metric-raw-details{border-top:1px solid var(--plotline-line);padding-top:8px}.metric-raw-details summary{color:var(--plotline-muted);font-size:.82rem;font-weight:800;cursor:pointer}.timeline-control-panel{display:grid;gap:12px;border:1px solid var(--plotline-line);border-radius:10px;margin-bottom:16px;padding:12px;background:rgba(255,255,255,.84);box-shadow:0 10px 24px rgba(55,48,39,.05)}.timeline-filter-drawer summary{color:var(--plotline-ink);font-weight:900;cursor:pointer}.timeline-filter-grid{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:10px;margin-top:12px}.timeline-filter-checks,.timeline-filter-actions,.timeline-visibility-panel,.timeline-preset-panel,.preset-chip-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.timeline-filter-checks{grid-column:span 3;color:var(--plotline-muted);font-size:.82rem;font-weight:700}.timeline-filter-actions{grid-column:span 3;justify-content:flex-end}.timeline-visibility-panel label,.preset-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--plotline-line);border-radius:999px;padding:4px 8px;color:var(--plotline-muted);font-size:.78rem;font-weight:800;background:rgba(255,255,255,.76)}.timeline-preset-panel form{display:inline-flex;align-items:center;gap:6px}.preset-chip a{color:var(--plotline-accent-dark);text-decoration:none}.preset-chip button{border:0;color:var(--plotline-muted);background:transparent;font-weight:900}.timeline-focus-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(47,111,99,.22);border-radius:10px;margin-bottom:16px;padding:10px 12px;background:rgba(47,111,99,.08)}.timeline-scroll-hint{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(47,111,99,.22);border-radius:10px;margin-bottom:16px;padding:10px 12px;background:rgba(47,111,99,.08)}.timeline-scroll-hint[hidden]{display:none}.timeline-scene-card.filter-dim,.timeline-scene-card.focus-dim,.lane-dim{opacity:.35}.timeline-scene-card.focus-match,.timeline-scene-card.filter-match.focus-match{outline:3px solid rgba(47,111,99,.32);box-shadow:0 12px 26px rgba(47,111,99,.16)}.timeline-section-hidden{display:none!important}.hide-scene-cards .timeline-scene-card{display:none}.timeline-control-panel{position:sticky;top:56px;z-index:18}.timeline-control-select{padding-right:6px}.timeline-control-select .form-select{width:auto;min-width:132px;border:0;padding-top:2px;padding-bottom:2px;background-color:transparent;color:var(--plotline-accent-dark);font-weight:800}.timeline-jump-panel{display:grid;grid-template-columns:auto minmax(180px,1.2fr) minmax(180px,1fr) minmax(170px,.9fr) minmax(180px,1fr) auto;gap:8px;align-items:center;width:100%}.timeline-shortcut-hint{color:var(--plotline-muted);font-size:.76rem;font-weight:700;white-space:nowrap}.timeline-minimap{display:flex;align-items:stretch;gap:4px;margin:0 0 12px;padding:8px;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-gutter:stable;border:1px solid rgba(47,111,99,.18);border-radius:8px;background:rgba(255,255,255,.72)}.timeline-minimap button{position:relative;flex:0 0 max(42px,calc(var(--chapter-scenes)*18px));min-width:42px;min-height:34px;border:1px solid rgba(47,111,99,.18);border-radius:7px;color:var(--plotline-accent-dark);background:linear-gradient(180deg,#f8fbf9 0%,#edf4f1 100%);font-size:.72rem;font-weight:800}.timeline-minimap button.is-active{border-color:var(--plotline-accent);color:#fff;background:linear-gradient(180deg,var(--plotline-accent) 0%,var(--plotline-accent-dark) 100%);box-shadow:0 0 0 2px rgba(47,111,99,.14)}.timeline-minimap button::after{content:"";position:absolute;right:5px;bottom:5px;width:calc(var(--chapter-warnings)*4px);max-width:28px;height:4px;border-radius:999px;background:#b45c5c;opacity:.75}.timeline-drag-palette,.drag-drop-panel{border:1px solid rgba(47,111,99,.18);border-radius:10px;margin-bottom:12px;padding:12px;background:rgba(255,255,255,.84);box-shadow:0 10px 24px rgba(55,48,39,.05)}.timeline-drag-palette{display:grid;grid-template-columns:minmax(220px,.35fr) minmax(0,1fr);gap:12px;align-items:center}.drag-chip-group{display:flex;flex-wrap:wrap;gap:6px;max-height:104px;overflow:auto;padding-right:4px}.drag-chip{display:inline-flex;align-items:center;border:1px solid var(--plotline-line);border-radius:999px;padding:4px 9px;background:#fff;color:var(--plotline-ink);font-size:.78rem;font-weight:800;cursor:grab}.drag-chip.character{border-color:#dacb9e;background:#fff8e8}.drag-chip.asset{border-color:#ded9ea;background:#f4f0ff}.drag-chip.location{border-color:rgba(47,111,99,.18);background:#eef8f4}.is-dragging{opacity:.55}.drop-target-active{outline:3px solid rgba(47,111,99,.28);outline-offset:2px}.timeline-chapter.chapter-drop-active,.timeline-scenes.drop-chapter-end{background:rgba(47,111,99,.06)}.timeline-scenes.drop-chapter-end::after{content:"Drop scene at end of chapter";display:flex;align-items:center;justify-content:center;min-width:var(--timeline-scene-width);min-height:74px;border:2px dashed rgba(197,139,43,.48);border-radius:12px;color:#7a5527;background:rgba(255,248,232,.82);font-size:.8rem;font-weight:900}.timeline-scene-card.drop-before{box-shadow:inset 5px 0 0 #c58b2b,0 12px 26px rgba(197,139,43,.16)}.timeline-scene-card.drop-after{box-shadow:inset -5px 0 0 #c58b2b,0 12px 26px rgba(197,139,43,.16)}.drag-drop-panel{position:sticky;top:132px;z-index:19}.drag-drop-panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.drag-drop-panel h2{margin:0;font-size:1.08rem}.drag-drop-form{border-top:1px solid var(--plotline-line);margin-top:10px;padding-top:10px}.scene-move-modal-content{border:1px solid rgba(47,111,99,.18);border-radius:14px;background:var(--plotline-surface);color:var(--plotline-ink);box-shadow:0 24px 70px rgba(55,48,39,.22)}.scene-move-modal-content .modal-header,.scene-move-modal-content .modal-footer{border-color:var(--plotline-line)}.scene-move-modal-content .modal-title{margin:0;color:var(--plotline-ink);font-size:1.2rem;font-weight:900}.scene-move-summary{margin:0 0 12px;color:var(--plotline-ink);font-size:1rem;font-weight:800}[data-theme="dark"] .scene-move-modal-content{background:#201f22;color:#f4eadc;border-color:rgba(244,234,220,.16);box-shadow:0 24px 70px rgba(0,0,0,.55)}[data-theme="dark"] .scene-move-modal-content .modal-title,[data-theme="dark"] .scene-move-summary{color:#f4eadc}[data-theme="dark"] .scene-move-modal-content .modal-header,[data-theme="dark"] .scene-move-modal-content .modal-footer{border-color:rgba(244,234,220,.14)}[data-theme="dark"] .scene-move-modal-content .btn-close{filter:invert(1) grayscale(100%)}.plain-preview{border:1px solid rgba(197,139,43,.28);border-radius:8px;margin:10px 0 0;padding:8px 10px;color:#5e4518;background:#fff8e8;font-size:.86rem;font-weight:800}.drag-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;color:var(--plotline-muted);font-size:.82rem;font-weight:700}.timeline-section-header,.lane-board-heading,.pacing-heading{position:sticky;left:0;z-index:6}.timeline-section-header{display:flex;align-items:center;justify-content:space-between;gap:10px;width:calc(var(--timeline-label-width) + (var(--scene-count)*var(--timeline-scene-width)) + (var(--scene-count)*var(--timeline-grid-gap)));min-width:100%;margin-bottom:10px;border-radius:8px;padding:8px 10px;background:rgba(255,255,255,.92);box-shadow:0 8px 16px rgba(30,37,43,.05)}.timeline-section-header button,.lane-board-heading button,.plot-lane-board-heading button,.pacing-heading button,.lane-group-heading{border:0;padding:0;color:var(--plotline-accent-dark);background:transparent;font:inherit;font-weight:900;text-align:left}.timeline-section-header button::before,.lane-board-heading button::before,.plot-lane-board-heading button::before,.pacing-heading button::before,.lane-group-heading::before{content:"v";display:inline-block;margin-right:6px;color:var(--plotline-muted);font-size:.72rem}.timeline-section-header button.is-collapsed::before,.lane-board-heading button.is-collapsed::before,.plot-lane-board-heading button.is-collapsed::before,.pacing-heading button.is-collapsed::before,.lane-group-heading.is-collapsed::before{content:">"}.lane-group{display:grid;gap:7px}.character-lane-group-body{display:grid;gap:7px}.lane-group-heading{position:sticky;left:0;z-index:6;width:var(--timeline-label-width);border-top:1px solid rgba(47,111,99,.12);padding:7px 8px 2px;color:var(--plotline-muted);background:rgba(247,250,248,.96);font-size:.78rem;text-transform:uppercase}.timeline-section-collapsed{display:none!important}.timeline-chapter-title{position:sticky;top:0;z-index:5;background:rgba(238,245,242,.96);backdrop-filter:blur(6px)}.scene-pov-label,.metric-mini-summary{display:inline-flex;width:fit-content;border-radius:999px;padding:2px 7px;font-size:.72rem;font-weight:800}.scene-pov-label{color:#514018;background:#fff3d3}.metric-mini-summary{color:var(--plotline-accent-dark);background:rgba(47,111,99,.08)}.timeline-scene-card.search-hit,.timeline-scene-card.keyboard-focus{outline:3px solid rgba(197,139,43,.34);box-shadow:0 12px 26px rgba(197,139,43,.16)}.timeline-scene-card.search-dim{opacity:.28}.thread-marker,.asset-marker,.character-marker{transition:transform .12s ease,box-shadow .12s ease}.thread-marker:hover,.asset-marker:hover,.character-marker:hover{transform:translateY(-1px);box-shadow:0 6px 12px rgba(30,37,43,.12)}.timeline-filtered-root.density-compact{--timeline-scene-width:170px;--timeline-grid-gap:6px}.timeline-filtered-root.density-expanded{--timeline-scene-width:280px;--timeline-grid-gap:14px}.timeline-filtered-root.density-compact .timeline-scene-card,.timeline-filtered-root.zoom-book .timeline-scene-card{gap:4px;padding:9px}.timeline-filtered-root.density-compact .scene-summary,.timeline-filtered-root.density-compact .purpose-chip-row,.timeline-filtered-root.density-compact .metric-mini-summary,.timeline-filtered-root.zoom-book .scene-summary,.timeline-filtered-root.zoom-book .purpose-chip-row,.timeline-filtered-root.zoom-book .metric-mini-summary,.timeline-filtered-root.zoom-book .location-pill,.timeline-filtered-root.zoom-book .scene-pov-label{display:none}.timeline-filtered-root.zoom-book{--timeline-scene-width:150px;--timeline-grid-gap:6px}.timeline-filtered-root.zoom-scene-detail{--timeline-scene-width:300px}.timeline-filtered-root.zoom-scene-detail .scene-summary{-webkit-line-clamp:7}.timeline-filtered-root.density-expanded .timeline-scenes{min-height:230px}.timeline-control-panel{position:relative;top:auto;z-index:4;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px;padding:8px;box-shadow:none}.timeline-filter-drawer,.timeline-control-group{border:1px solid var(--plotline-line);border-radius:999px;background:rgba(255,255,255,.82)}.timeline-filter-drawer[open],.timeline-control-group[open]{border-radius:10px;flex-basis:100%}.timeline-filter-drawer summary,.timeline-control-group summary{min-width:max-content;padding:5px 10px;color:var(--plotline-accent-dark);font-size:.82rem;font-weight:900;cursor:pointer;list-style:none}.timeline-filter-drawer summary::-webkit-details-marker,.timeline-control-group summary::-webkit-details-marker,.timeline-drag-palette summary::-webkit-details-marker{display:none}.timeline-filter-drawer summary::after,.timeline-control-group summary::after,.timeline-drag-palette summary::after{content:" v";color:var(--plotline-muted);font-size:.72rem}.timeline-filter-drawer[open] summary::after,.timeline-control-group[open] summary::after,.timeline-drag-palette[open] summary::after{content:" ^"}.timeline-filter-grid{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px;max-height:min(48vh,430px);overflow:auto;padding:0 10px 10px}.timeline-filter-grid .form-label{margin-bottom:2px;font-size:.72rem;font-weight:800}.timeline-filter-checks,.timeline-filter-actions{grid-column:1/-1}.timeline-visibility-panel,.timeline-jump-panel,.timeline-preset-panel{padding:0 10px 10px}.timeline-jump-panel{grid-template-columns:minmax(180px,1.5fr) repeat(3,minmax(150px,1fr))}.timeline-shortcut-hint{grid-column:1/-1}.timeline-preset-panel form{flex-wrap:nowrap}.timeline-preset-panel .form-control{width:150px}.timeline-preset-panel .btn,.timeline-filter-actions .btn{white-space:nowrap}.timeline-drag-palette{display:block;margin-bottom:8px;padding:7px 9px;box-shadow:none}.timeline-drag-palette summary{color:var(--plotline-accent-dark);font-size:.82rem;font-weight:900;cursor:pointer}.timeline-drag-palette .drag-chip-group{margin-top:8px}.drag-drop-panel{position:relative;top:auto;z-index:9;box-shadow:0 12px 28px rgba(30,37,43,.08)}.timeline-filtered-root,.timeline-filtered-root.density-compact,.timeline-filtered-root.zoom-book{--timeline-scene-width:220px;--timeline-grid-gap:10px}.timeline-filtered-root.density-expanded,.timeline-filtered-root.zoom-scene-detail{--timeline-scene-width:290px}.timeline-filtered-root.density-compact.zoom-book{--timeline-scene-width:200px}.timeline-chapter,.timeline-scene-card,.timeline-empty-scene{overflow-wrap:normal;word-break:normal}.timeline-scene-card strong,.timeline-chapter-title strong,.plot-lane-label strong,.asset-lane-label strong,.character-lane-label strong{min-width:0;white-space:normal;word-break:normal;overflow-wrap:break-word}.timeline-scene-card{cursor:grab}.timeline-scene-card:active,.drag-chip:active,[draggable="true"]:active{cursor:grabbing}body.drag-active .timeline-scene-card,body.dragging-asset [data-asset-drop-target],body.dragging-location [data-drag-type="location"]{transition:outline-color .12s ease,box-shadow .12s ease,opacity .12s ease}body.dragging-character .timeline-scene-card,body.dragging-asset .timeline-scene-card,body.dragging-scene .timeline-scene-card,body.dragging-scene .timeline-scenes[data-chapter-drop-target],body.dragging-asset [data-asset-drop-target],body.dragging-location [data-drag-type="location"]{outline:1px dashed rgba(47,111,99,.22);outline-offset:2px}.is-dragging{opacity:.42;transform:scale(.98)}.drop-target-active{outline:3px solid rgba(47,111,99,.42)!important;outline-offset:3px}.analytics-metric-row{display:grid;grid-template-columns:170px minmax(560px,1fr);gap:12px;align-items:stretch}.analytics-metric-label{display:flex;align-items:center;border-right:1px solid var(--plotline-line);color:var(--plotline-muted);font-weight:800}.analytics-sparkline{display:grid;grid-template-columns:repeat(var(--point-count),minmax(28px,1fr));align-items:end;gap:5px;min-height:88px;border-bottom:1px solid rgba(47,111,99,.25);padding-top:10px}.analytics-bar{position:relative;display:flex;align-items:end;justify-content:center;min-height:12px;height:max(12px,var(--bar-height));border-radius:6px 6px 2px 2px;color:var(--plotline-accent-dark);text-decoration:none;background:linear-gradient(180deg,rgba(47,111,99,.58),rgba(47,111,99,.18))}.analytics-bar:hover{background:linear-gradient(180deg,rgba(47,111,99,.82),rgba(47,111,99,.28))}.analytics-bar span{position:absolute;bottom:calc(100% + 3px);color:var(--plotline-muted);font-size:.68rem;font-weight:800}.analytics-list-item,.analytics-link-row,.analytics-count-row,.purpose-stat-row{border-top:1px solid var(--plotline-line);padding:9px 0}.analytics-list-item{display:grid;gap:3px}.analytics-list-item p{margin:0}.analytics-link-row,.analytics-count-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.analytics-link-row{color:inherit;text-decoration:none}.analytics-link-row:hover{color:var(--plotline-accent-dark)}.analytics-link-row span,.analytics-link-row strong{min-width:0}.purpose-stat-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(90px,1.5fr) 42px;align-items:center;gap:10px}.purpose-stat-bar{overflow:hidden;height:8px;border-radius:999px;background:rgba(47,111,99,.08)}.purpose-stat-bar span{display:block;height:100%;border-radius:inherit;background:var(--plotline-accent)}.inspector-actions{position:sticky;bottom:-16px;display:flex;gap:8px;border-top:1px solid var(--plotline-line);margin:2px -16px -16px;padding:12px 16px;background:rgba(255,255,255,.95);backdrop-filter:blur(8px)}.story-bible-heading{align-items:end}.story-bible-search{display:flex;gap:8px;min-width:min(100%,420px)}.story-bible-search .form-control{min-width:0}.story-bible-nav{position:sticky;top:72px;z-index:4;display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding:10px;border:1px solid var(--plotline-line);border-radius:12px;background:rgba(250,249,246,.92);backdrop-filter:blur(10px)}.story-bible-nav a,.story-bible-actions a{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;background:rgba(47,111,99,.08);color:var(--plotline-ink);font-size:.86rem;font-weight:650;text-decoration:none}.story-bible-nav a:hover,.story-bible-actions a:hover{background:rgba(47,111,99,.16)}.story-bible-section{margin:0 0 28px}.story-bible-section-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:12px}.story-bible-section-heading h2{margin:0}.soft-count{color:var(--plotline-muted);font-size:.9rem;font-weight:650;white-space:nowrap}.story-bible-grid,.story-bible-search-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}.story-bible-grid-compact{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.story-bible-card{border:1px solid var(--plotline-line);border-radius:14px;padding:14px;background:rgba(255,255,255,.86);box-shadow:0 14px 34px rgba(36,32,26,.06)}.story-bible-card h3{margin:0 0 8px;font-size:1.05rem}.story-bible-card h4{margin:14px 0 8px;font-size:.96rem}.story-bible-card p{color:var(--plotline-muted)}.story-bible-card-title{display:flex;align-items:start;justify-content:space-between;gap:10px}.story-bible-card-title span{border:1px solid var(--plotline-line);border-radius:999px;padding:3px 8px;background:rgba(250,249,246,.9);color:var(--plotline-muted);font-size:.78rem;font-weight:700;white-space:nowrap}.story-bible-meta{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.story-bible-meta span{border-radius:999px;padding:4px 8px;background:rgba(36,32,26,.05);color:var(--plotline-muted);font-size:.78rem;font-weight:650}.story-bible-facts{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:6px 10px;margin:12px 0}.story-bible-facts dt{color:var(--plotline-muted);font-size:.78rem;font-weight:800;text-transform:uppercase}.story-bible-facts dd{margin:0;min-width:0;overflow-wrap:anywhere}.story-bible-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.story-bible-link-list{display:grid;gap:8px;margin:0;padding:0;list-style:none}.story-bible-link-list li{display:grid;gap:2px;padding:8px 0;border-bottom:1px solid rgba(36,32,26,.08)}.story-bible-link-list li:last-child{border-bottom:0}.story-bible-link-list span{color:var(--plotline-muted);font-size:.88rem}.story-bible-timeline-summary{display:grid;gap:14px}.story-bible-wide-card{max-width:none}.story-bible-chapter-summary{border-top:1px solid var(--plotline-line);padding-top:8px}.story-bible-scene-summary{display:grid;grid-template-columns:minmax(220px,1.5fr) repeat(3,minmax(120px,.8fr));gap:8px;padding:9px 0;border-top:1px solid rgba(36,32,26,.08)}.story-bible-scene-summary p{grid-column:1/-1;margin:0}.story-bible-scene-summary span{color:var(--plotline-muted);font-size:.88rem}.attention-list{display:grid;gap:10px}.attention-list article{display:grid;grid-template-columns:max-content minmax(0,1fr) auto;align-items:center;gap:10px;border:1px solid var(--plotline-line);border-radius:12px;padding:10px 12px;background:rgba(255,255,255,.82)}.attention-list p{grid-column:2/-1;margin:0;color:var(--plotline-muted)}.writer-workspace-form,.writer-add-form,.writer-edit-form,.chapter-goal-form{display:grid;gap:10px}.writer-checkbox-grid{display:flex;flex-wrap:wrap;gap:8px 14px}.writer-checkbox-grid label{display:inline-flex;align-items:center;gap:6px;color:var(--plotline-muted);font-size:.86rem;font-weight:650}.writer-priority-control{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:12px}.writer-priority-control .form-range{min-width:0}.writer-note-list,.writer-queue-list{display:grid;gap:10px}.writer-mini-card{border:1px solid var(--plotline-line);border-radius:12px;padding:10px;background:rgba(255,255,255,.72)}.writer-mini-card summary{display:flex;align-items:center;gap:8px;cursor:pointer}.writer-mini-card summary strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-card-list{display:grid;gap:10px}.attachment-summary{align-items:center}.attachment-kind{border-radius:999px;padding:3px 8px;background:rgba(47,111,99,.1);color:var(--plotline-accent);font-size:.76rem;font-weight:800;text-transform:uppercase}.attachment-card-body{display:grid;gap:6px;margin-top:10px}.attachment-card-body p{margin:0}.attachment-add-card{margin-top:10px}.writer-checklist{display:grid;gap:6px}.writer-checklist-row,.writer-add-inline{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px}.writer-remove-inline{display:flex;justify-content:end;margin:-2px 0 4px}.writer-dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:26px}.writer-dashboard-panel{border:1px solid var(--plotline-line);border-radius:14px;padding:14px;background:rgba(255,255,255,.7);box-shadow:0 14px 34px rgba(36,32,26,.05)}.writer-queue-card{border:1px solid var(--plotline-line);border-radius:12px;padding:12px;background:rgba(255,255,255,.9)}.writer-queue-card h3{margin:0;font-size:1rem}.writer-queue-card p{margin:8px 0 0;color:var(--plotline-muted)}.writer-queue-title{display:flex;align-items:start;justify-content:space-between;gap:12px}.writer-kpi{display:block;color:var(--plotline-accent);font-size:2.2rem;line-height:1}.export-action-row{margin:-8px 0 18px}.dynamics-timeline{position:relative;min-height:128px;border:1px solid var(--plotline-line);border-radius:14px;background:linear-gradient(180deg,rgba(47,111,99,.07),rgba(255,255,255,.84));overflow:hidden}.dynamics-timeline::before{content:"";position:absolute;left:12px;right:12px;top:64px;height:1px;background:rgba(36,32,26,.18)}.dynamics-marker{position:absolute;bottom:18px;width:12px;height:86px;transform:translateX(-50%);display:flex;align-items:end;justify-content:center}.dynamics-marker span{display:block;width:8px;min-height:12px;max-height:82px;border-radius:999px;background:var(--plotline-accent);box-shadow:0 8px 20px rgba(47,111,99,.22)}.dynamics-marker.pov span{background:#8a4b2f}.dynamics-timeline.relationship .dynamics-marker span{background:#7c5fb0}.scenario-banner{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;border:1px solid rgba(103,80,164,.22);border-radius:12px;padding:16px;margin-bottom:16px;background:linear-gradient(135deg,rgba(103,80,164,.1),rgba(255,255,255,.86));box-shadow:0 12px 28px rgba(36,32,26,.08)}.scenario-banner h1{margin:0 0 4px}.scenario-banner p{margin:0;color:var(--plotline-muted)}.scenario-card{border-color:rgba(103,80,164,.18)}.scenario-warning-strip{display:flex;gap:10px;align-items:center;border:1px solid var(--plotline-line);border-radius:10px;padding:10px 12px;margin-bottom:14px;background:rgba(255,255,255,.76);color:var(--plotline-muted)}.scenario-warning-strip strong{color:var(--plotline-ink)}.scenario-board{border:1px solid var(--plotline-line);border-radius:12px;padding:12px;background:rgba(247,245,240,.74);overflow:hidden;margin-bottom:18px}.scenario-scroll{display:flex;gap:14px;overflow-x:auto;padding-bottom:8px}.scenario-chapter{min-width:360px;max-width:520px;border:1px solid rgba(82,75,65,.14);border-radius:10px;background:rgba(255,255,255,.86)}.scenario-chapter header{display:grid;gap:2px;border-bottom:1px solid var(--plotline-line);padding:10px 12px}.scenario-chapter header span{color:var(--plotline-muted);font-size:.78rem;font-weight:800;text-transform:uppercase}.scenario-scene-row{display:grid;gap:10px;padding:10px}.scenario-scene-card{display:grid;gap:8px;border:1px solid rgba(82,75,65,.12);border-radius:9px;padding:10px;background:#fff}.scenario-scene-title{display:grid;gap:2px}.scenario-scene-title span,.scenario-mini-data{color:var(--plotline-muted);font-size:.78rem}.scenario-mini-data{display:grid;gap:2px}.scenario-move-actions,.scenario-chapter-form,.scenario-compare-list article{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.scenario-chapter-form select{min-width:160px;width:auto}.scenario-compare-list{display:grid;gap:10px}.scenario-compare-list article{justify-content:space-between;border:1px solid var(--plotline-line);border-radius:9px;padding:10px;background:rgba(255,255,255,.82)}.danger-zone{border-color:rgba(163,61,61,.24)}.archive-filter-form{align-items:end}.archive-item-list{display:grid;gap:10px}.archive-item-card{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid var(--plotline-line);border-radius:10px;padding:12px;background:rgba(255,255,255,.82)}.archive-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-items:end}.delete-forever-form{display:inline-flex;margin:0}.archive-item-card h3{margin:4px 0}.archived-badge{display:inline-flex;border:1px solid rgba(82,75,65,.16);border-radius:999px;padding:2px 8px;color:var(--plotline-muted);font-size:.72rem;font-weight:800;text-transform:uppercase;background:rgba(247,245,240,.86)}.restore-button{white-space:nowrap}.archive-button-form{display:inline-flex;align-items:center;margin:0}.acceptance-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:12px;margin-bottom:16px}.acceptance-summary{display:grid;gap:4px;padding:16px}.acceptance-summary strong{font-size:2rem;line-height:1}.acceptance-summary.pass{border-left:5px solid #4d7654}.acceptance-summary.review{border-left:5px solid #b8762b}.acceptance-summary.blocked{border-left:5px solid #963f36}.acceptance-check-list{display:grid;gap:14px}.acceptance-area{border:1px solid var(--plotline-line);border-radius:10px;padding:12px;background:rgba(255,255,255,.62)}.acceptance-area h3{margin:0 0 10px;font-size:1.05rem}.acceptance-check-items{display:grid;gap:8px}.acceptance-check-item{display:grid;grid-template-columns:92px minmax(0,1fr);gap:10px;align-items:start;border:1px solid rgba(82,75,65,.12);border-radius:8px;padding:10px;background:rgba(255,255,255,.74)}.acceptance-check-item p{margin:2px 0 0;color:var(--plotline-muted)}.acceptance-status{display:inline-flex;justify-content:center;width:fit-content;min-width:74px;border-radius:999px;padding:3px 9px;font-size:.72rem;font-weight:900;text-transform:uppercase}.acceptance-check-item.pass .acceptance-status{color:#24512b;background:#e6f4e7}.acceptance-check-item.review .acceptance-status{color:#7b4b13;background:#fbecd3}.acceptance-check-item.blocked .acceptance-status{color:#7a2222;background:#fff0f0}.plotline-confirm-modal .modal-title{color:var(--plotline-ink)}.plotline-confirm-modal .modal-body p{white-space:pre-line}.delete-confirm-field{border:1px solid rgba(163,61,61,.22);border-radius:8px;padding:12px;background:rgba(255,247,244,.7)}@media print{header,.breadcrumb-trail,.context-header,.button-row,.story-bible-nav,.inspector-quick-nav{display:none!important}.plotline-shell{max-width:none;padding:0}}@media(max-width:760px){.plotline-shell{padding-left:14px;padding-right:14px}.page-heading{display:block}.page-heading .button-row,.timeline-filter{margin-top:14px}.timeline-filter{align-items:stretch;flex-direction:column}.story-bible-search,.story-bible-section-heading{align-items:stretch;flex-direction:column}.story-bible-scene-summary,.attention-list article{grid-template-columns:1fr}.writer-dashboard-grid{grid-template-columns:1fr}.writer-checklist-row,.writer-add-inline{grid-template-columns:1fr}.trial-status-panel--signup,.trial-status-panel__heading,.trial-dashboard-banner{align-items:stretch;flex-direction:column}.trial-dashboard-banner__actions,.trial-dashboard-banner__actions .btn,.trial-status-panel--signup .btn{width:100%}.attention-list p{grid-column:auto}}@media(max-width:900px){.workspace-layout,.workspace-layout.inspector-drawer-open{grid-template-columns:1fr;gap:14px}.timeline-inspector-resizer{display:none}.scene-inspector-panel{position:static;max-height:none;overflow:visible}.scene-inspector-body{max-height:none;overflow:visible}}@media(max-width:1100px){.metric-graph-row{grid-template-columns:1fr}.health-kpi-grid,.analytics-grid-two,.analytics-grid-three{grid-template-columns:1fr}.analytics-metric-row{grid-template-columns:1fr}.analytics-metric-label{border-right:0}} \ No newline at end of file diff --git a/PlotLine/wwwroot/js/site.js b/PlotLine/wwwroot/js/site.js index 3a3bcb3..0384924 100644 --- a/PlotLine/wwwroot/js/site.js +++ b/PlotLine/wwwroot/js/site.js @@ -1205,6 +1205,7 @@ const densityKey = "plotline.timeline.density"; const zoomKey = "plotline.timeline.zoom"; const scrollKey = "plotline.timeline.pending-scroll"; + const horizontalHintKey = "plotline.timeline.horizontalScrollHint.seen"; const drawerWidthKey = "plotline.timeline.inspectorWidth"; const scrollContainerSelector = [ ".timeline-shell", @@ -1233,6 +1234,74 @@ const getScrollContainers = () => [...root.querySelectorAll(scrollContainerSelector)]; + const setupHorizontalScrollHint = () => { + const hint = document.querySelector("[data-timeline-scroll-hint]"); + if (!hint) { + return; + } + + const dismissButton = hint.querySelector("[data-timeline-scroll-hint-dismiss]"); + const readSeen = () => { + try { + return localStorage.getItem(horizontalHintKey) === "true"; + } catch { + return false; + } + }; + const markSeen = () => { + hint.hidden = true; + try { + localStorage.setItem(horizontalHintKey, "true"); + } catch { + // The hint can still disappear for this page view if storage is unavailable. + } + }; + + if (readSeen()) { + hint.hidden = true; + return; + } + + hint.hidden = false; + dismissButton?.addEventListener("click", markSeen); + + let isArmed = false; + window.setTimeout(() => { + isArmed = true; + containers.forEach(rememberPosition); + }, 800); + + const knownLeft = new WeakMap(); + const rememberPosition = (container) => knownLeft.set(container, container.scrollLeft); + const detectHorizontalScroll = (container) => { + if (!isArmed) { + rememberPosition(container); + return; + } + + const previous = knownLeft.get(container) ?? container.scrollLeft; + if (Math.abs(container.scrollLeft - previous) > 4) { + markSeen(); + return; + } + + rememberPosition(container); + }; + + const containers = [workspace, ...getScrollContainers()]; + containers.forEach((container) => { + rememberPosition(container); + container.addEventListener("wheel", (event) => { + if (event.shiftKey && Math.abs(event.deltaY) > Math.abs(event.deltaX)) { + event.preventDefault(); + container.scrollLeft += event.deltaY; + markSeen(); + } + }, { passive: false }); + container.addEventListener("scroll", () => detectHorizontalScroll(container), { passive: true }); + }); + }; + const drawerWidthBounds = () => { const availableWidth = root.getBoundingClientRect().width || window.innerWidth; const minimum = Math.min(420, Math.max(320, availableWidth - 360)); @@ -1255,6 +1324,8 @@ window.addEventListener("resize", () => applyDrawerWidth(localStorage.getItem(drawerWidthKey))); } + setupHorizontalScrollHint(); + inspectorResizer?.addEventListener("pointerdown", (event) => { event.preventDefault(); document.body.classList.add("timeline-inspector-resizing"); diff --git a/PlotLine/wwwroot/js/site.min.js b/PlotLine/wwwroot/js/site.min.js index 03b087d..1c0083c 100644 --- a/PlotLine/wwwroot/js/site.min.js +++ b/PlotLine/wwwroot/js/site.min.js @@ -1 +1 @@ -(()=>{const n="plotline.theme",t=document.querySelectorAll("[data-theme-choice]"),r=()=>{try{return localStorage.getItem(n)}catch{return null}},u=t=>{try{localStorage.setItem(n,t)}catch{}},i=n=>{const i=n==="dark"?"dark":"light";document.documentElement.dataset.theme=i;document.documentElement.dataset.bsTheme=i;u(i);t.forEach(n=>{const t=n.dataset.themeChoice===i;n.classList.toggle("active",t);n.setAttribute("aria-pressed",String(t))})};t.forEach(n=>{n.addEventListener("click",()=>i(n.dataset.themeChoice))});i(r()||"light")})();(()=>{const n=document.querySelector("[data-trial-banner]");if(n){const t=`plotline.trialBanner.dismissed.${n.dataset.trialBannerKey||"current"}`;try{if(localStorage.getItem(t)==="true"){n.hidden=!0;return}}catch{}n.querySelector("[data-trial-banner-dismiss]")?.addEventListener("click",()=>{n.hidden=!0;try{localStorage.setItem(t,"true")}catch{}})}})();(()=>{const n=document.querySelectorAll(".scene-inspector-root");if(n.length){const t=()=>`${window.location.pathname}${window.location.search}${window.location.hash}`;n.forEach(n=>{n.addEventListener("submit",n=>{const r=n.target;if(r instanceof HTMLFormElement){let i=r.querySelector("input[name='ReturnUrl']");i||(i=document.createElement("input"),i.type="hidden",i.name="ReturnUrl",r.appendChild(i));i.value=t()}},!0)})}})();(()=>{const t=document.getElementById("plotlineConfirmModal"),f=t&&window.bootstrap?new bootstrap.Modal(t):null,e=t?.querySelector("#plotlineConfirmModalTitle"),o=t?.querySelector("#plotlineConfirmModalMessage"),i=t?.querySelector("[data-confirm-submit]"),s=t?.querySelector("[data-delete-confirm-field]"),r=t?.querySelector("[data-delete-confirm-input]");let n=null,u=null;const h=n=>{const t=n.split(/\n\s*\n/);return{title:t.shift()?.trim()||"Confirm action",body:t.join("\n\n").trim()}},c=()=>{n=null,u=null,r&&(r.value=""),s?.classList.add("d-none"),i?.removeAttribute("disabled")};t?.addEventListener("hidden.bs.modal",c);r?.addEventListener("input",()=>{n?.dataset.requireDeleteText==="true"&&i&&(i.disabled=r.value.trim()!=="DELETE")});i?.addEventListener("click",()=>{if(n){if(n.dataset.requireDeleteText==="true"){const t=n.querySelector("[data-delete-confirm-target], [name='confirmationText']");t&&(t.value=r?.value.trim()||"")}n.dataset.confirmed="true";f?.hide();n.requestSubmit&&u?n.requestSubmit(u):n.requestSubmit?n.requestSubmit():n.submit()}});document.addEventListener("submit",c=>{const l=c.target;if(l instanceof HTMLFormElement&&l.dataset.confirmed!=="true"&&l.dataset.confirmSkip!=="true"&&l.dataset.noDeleteConfirm!=="true"){const b=l.dataset.confirmMessage,k=c.submitter instanceof HTMLElement?c.submitter:l.querySelector("button[type='submit']"),a=k?.textContent||"",p=l.getAttribute("action")||"",y=/restore/i.test(a)||/\/restore\b/i.test(p),v=/delete forever/i.test(a)||/\/deleteforever\b/i.test(p),d=!y&&!v&&(/archive/i.test(a)||/\/archive\b/i.test(p)),nt=!v&&/(delete|remove)/i.test(a);if(b||d||y||nt||v){const tt=b||(d?"Archive this item?\n\nThis will hide it from active lists and timelines, but the data will be kept and can be restored later.":y?"Restore this item?\n\nThis will return it to active lists and timelines where applicable.":v?"Permanently delete this item?\n\nThis cannot be undone. Any linked planning data may also be removed or become unavailable. Only continue if you are certain.":"Remove this item?\n\nThis removes the link or supporting record. Major story items are archived instead of permanently deleted.");if(f&&t&&e&&o&&i){c.preventDefault();const g=h(tt);n=l;u=k;e.textContent=l.dataset.confirmTitle||g.title;o.textContent=l.dataset.confirmBody||g.body;i.textContent=l.dataset.confirmButtonText||a.trim()||"Confirm";i.className=`btn ${l.dataset.confirmButtonClass||(y?"btn-primary":"btn-danger")}`;const w=l.dataset.requireDeleteText==="true"||v;s?.classList.toggle("d-none",!w);w&&i&&(i.disabled=!0,r?.focus());f.show();w&&window.setTimeout(()=>r?.focus(),200)}}}})})();(()=>{const r=document.querySelectorAll("[data-help-icon]");if(r.length&&window.bootstrap){const u=new Map;let n=null;const f=n=>n.querySelector("[data-help-tooltip]")||n,i=n=>bootstrap.Tooltip.getInstance(f(n))?.hide(),t=(t=null)=>{n&&n!==t&&bootstrap.Popover.getInstance(n)?.hide()},e=()=>r.forEach(n=>i(n));r.forEach(r=>{const o=f(r),s=o.dataset.helpMicro||"Help article not found.",h=r.dataset.helpTitle||"Help unavailable",c=r.dataset.helpSummary||"Help content has not yet been written for this feature.";bootstrap.Tooltip.getOrCreateInstance(o,{title:s,trigger:"hover focus",placement:"top",container:"body"});const l=bootstrap.Popover.getOrCreateInstance(r,{title:h,trigger:"click",placement:"auto",container:"body",html:!0,customClass:"plotline-help-popover",content(){const u=document.createElement("div"),i=document.createElement("p");i.className="mb-2";i.textContent=c;const n=document.createElement("a");return n.href="#",n.textContent="More...",n.className="plotline-help-more",n.addEventListener("click",n=>{n.preventDefault(),t(),e(),r.dispatchEvent(new CustomEvent("plotline:help-more",{bubbles:!0,detail:{key:r.dataset.helpKey||""}}))}),u.append(i,n),u}});u.set(r,l);r.addEventListener("click",n=>{window.PlotLineHelpDrawer?.isActive?.()&&(n.preventDefault(),n.stopPropagation(),t(),i(r),window.PlotLineHelpPopovers?.hideAll(),window.PlotLineHelpDrawer.open(r.dataset.helpKey||""))});r.addEventListener("show.bs.popover",n=>{if(window.PlotLineHelpDrawer?.isActive?.()){n.preventDefault();return}t(r);i(r)});r.addEventListener("shown.bs.popover",()=>{n=r,i(r)});r.addEventListener("hidden.bs.popover",()=>{n===r&&(n=null)})});document.addEventListener("click",i=>{const r=i.target instanceof Element?i.target:null;if(r&&n&&!r.closest("[data-help-icon]")){const u=document.querySelector(`#${n.getAttribute("aria-describedby")}`);u?.contains(r)||t()}});document.addEventListener("keydown",n=>{n.key==="Escape"&&t()});window.PlotLineHelpPopovers={hideAll(){u.forEach(n=>n.hide());e();n=null}}}})();(()=>{const n=document.querySelector("[data-help-layout]"),p=document.querySelector("[data-help-drawer]"),i=document.querySelector("[data-help-content]"),l=document.querySelector("[data-help-splitter]"),w=document.querySelector("[data-help-close]"),h=document.querySelector("[data-help-collapse]"),a=document.querySelector("[data-help-expand]"),u=document.querySelector("[data-help-pin]"),f=document.querySelector("[data-help-drawer-heading]");if(n&&p&&i){const t={width:"plotline.helpDrawer.width",pinned:"plotline.helpDrawer.pinned",key:"plotline.helpDrawer.key",collapsed:"plotline.helpDrawer.collapsed"},b=(n,t,i)=>Math.min(i,Math.max(t,n)),e=n=>{try{return localStorage.getItem(n)==="true"}catch{return!1}},o=(n,t)=>{try{localStorage.setItem(n,t)}catch{}},v=i=>{const r=`${b(Number.parseFloat(i)||25,20,50)}%`;n.style.setProperty("--help-drawer-width",r);o(t.width,r)},c=n=>{o(t.pinned,String(n)),u?.setAttribute("aria-pressed",String(n)),u&&(u.textContent=n?"Unpin":"Pin")},r=i=>{n.classList.toggle("help-collapsed",i),o(t.collapsed,String(i)),h&&(h.textContent=i?"Expand":"Collapse")},s=async(u,e={})=>{const s=u||"";n.classList.add("help-open");e.keepCollapsed||r(!1);o(t.key,s);f&&(f.textContent=s||"Help");i.innerHTML='

Loading help...<\/p>';try{const n=await fetch(`/HelpDrawer/Article?key=${encodeURIComponent(s)}`,{headers:{"X-Requested-With":"XMLHttpRequest"}});i.innerHTML=n.ok?await n.text():'

Help for this feature has not yet been written.<\/p>';const t=i.querySelector(".help-drawer-article h2")?.textContent?.trim();f&&t&&(f.textContent=t)}catch{i.innerHTML='

Help for this feature has not yet been written.<\/p>'}},k=()=>{n.classList.remove("help-open","help-collapsed"),c(!1)};window.PlotLineHelpDrawer={isActive(){return n.classList.contains("help-open")},open(n){return s(n)}};v(localStorage.getItem(t.width)||"25%");c(e(t.pinned));r(e(t.collapsed));document.addEventListener("plotline:help-more",n=>{const t=n.detail?.key||n.target?.dataset?.helpKey||"";window.PlotLineHelpPopovers?.hideAll();s(t)});document.addEventListener("click",n=>{const t=n.target instanceof Element?n.target.closest("[data-help-open]"):null;t&&(n.preventDefault(),window.PlotLineHelpPopovers?.hideAll(),s(t.dataset.helpOpen||""))});w?.addEventListener("click",k);h?.addEventListener("click",()=>r(!n.classList.contains("help-collapsed")));a?.addEventListener("click",()=>r(!1));a?.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),r(!1))});u?.addEventListener("click",()=>c(!e(t.pinned)));l?.addEventListener("pointerdown",t=>{if(n.classList.contains("help-open")&&!n.classList.contains("help-collapsed")){t.preventDefault();document.body.classList.add("help-resizing");l.setPointerCapture?.(t.pointerId);const i=t=>{const i=n.getBoundingClientRect(),r=(i.right-t.clientX)/i.width*100;v(r)},r=()=>{document.body.classList.remove("help-resizing"),document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",r)};document.addEventListener("pointermove",i);document.addEventListener("pointerup",r)}});const y=(()=>{try{return localStorage.getItem(t.key)||""}catch{return""}})();e(t.pinned)&&y&&s(y,{keepCollapsed:!0})}})();(()=>{const n=document.querySelectorAll(".scene-inspector-root");if(n.length){const t=n=>n.toLowerCase().replace(/&/g,"and").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");n.forEach(n=>{const o=n.dataset.sceneId||n.querySelector(".scene-inspector-form [name='SceneID']")?.value||"new",f=`plotline.inspector.${o}.`,s=new Set(["overview","timing","characters"]),u=[...n.querySelectorAll(".inspector-section")],r=n.querySelector(".scene-inspector-form"),i=n.querySelector("[data-scene-time-editor]");if(r&&i&&i.dataset.enhanced!=="true"){i.dataset.enhanced="true";const n=r.querySelector("[name='TimeModeID']"),e=i.dataset.exactDatetimeModeId||"",o=i.dataset.exactDateModeId||"",s=[...i.querySelectorAll("[data-time-part-field]")],h={StartDateTime:i.querySelector("[data-date-part-for='StartDateTime']"),EndDateTime:i.querySelector("[data-date-part-for='EndDateTime']")},c={StartDateTime:i.querySelector("[data-time-part-for='StartDateTime']"),EndDateTime:i.querySelector("[data-time-part-for='EndDateTime']")},l={StartDateTime:r.querySelector("input[type='hidden'][name='StartDateTime']"),EndDateTime:r.querySelector("input[type='hidden'][name='EndDateTime']")},t=()=>n?.value===e,a=()=>n?.value===o,u=()=>{const n=t();s.forEach(t=>{t.hidden=!n,t.classList.toggle("d-none",!n)})},f=n=>{const i=l[n],r=h[n]?.value||"",f=c[n]?.value||"";if(i){if(!r){i.value="";return}if(t()){i.value=`${r}T${f||"00:00"}`;return}if(a()){i.value=r;return}const u=i.value.match(/^\\d{4}-\\d{2}-\\d{2}T(\\d{2}:\\d{2})/)?.[1];i.value=u?`${r}T${u}`:r}},v=()=>{f("StartDateTime"),f("EndDateTime")};n?.addEventListener("change",u);r.addEventListener("submit",v);u()}u.forEach(n=>{if(n.dataset.enhanced!=="true"){const l=n.querySelector("h3, h2"),u=n.dataset.sectionTitle||l?.textContent?.trim()||"Overview",a=t(u),o=n.dataset.sectionId||`inspector-${a}`,e=o.replace(/^inspector-/,"");n.id=o;n.dataset.searchText=`${u} ${n.textContent}`.toLowerCase();n.dataset.enhanced="true";const r=document.createElement("div");for(r.className="inspector-accordion-body";n.firstChild;)r.appendChild(n.firstChild);const i=document.createElement("button");i.type="button";i.className="inspector-accordion-toggle";i.setAttribute("aria-expanded","false");n.append(i,r);const v=r.querySelectorAll(".asset-event-item, .thread-event-item, .warning-mini-card, .dependency-card, .metric-slider").length;i.innerHTML=`${u}${v||""}`;const h=localStorage.getItem(`${f}${e}`),c=h===null?s.has(e):h==="open";n.classList.toggle("is-open",c);i.setAttribute("aria-expanded",String(c));i.addEventListener("click",()=>{const t=!n.classList.contains("is-open");n.classList.toggle("is-open",t);i.setAttribute("aria-expanded",String(t));localStorage.setItem(`${f}${e}`,t?"open":"closed")})}});n.querySelectorAll(".inspector-nav-links a").forEach(t=>{t.addEventListener("click",i=>{const r=n.querySelector(t.getAttribute("href"));r&&(i.preventDefault(),r.classList.add("is-open"),r.querySelector(".inspector-accordion-toggle")?.setAttribute("aria-expanded","true"),r.scrollIntoView({behavior:"smooth",block:"start"}))})});const e=n.querySelector("[data-inspector-search]");if(e?.addEventListener("input",()=>{const n=e.value.trim().toLowerCase();u.forEach(t=>{const i=!n||t.dataset.searchText.includes(n);t.classList.toggle("is-filtered-out",!i);i&&n&&(t.classList.add("is-open"),t.querySelector(".inspector-accordion-toggle")?.setAttribute("aria-expanded","true"))})}),"IntersectionObserver"in window){const t=[...n.querySelectorAll(".inspector-nav-links a")],i=new IntersectionObserver(n=>{n.forEach(n=>{n.isIntersecting&&t.forEach(t=>{t.classList.toggle("active",t.getAttribute("href")===`#${n.target.id}`)})})},{root:n.closest(".scene-inspector-panel")||null,rootMargin:"-10% 0px -70% 0px"});u.forEach(n=>i.observe(n))}})}})();(()=>{const n=document.querySelectorAll("[data-metric-shape-chart]");if(n.length){const t=["#2f6f63","#b35f3b","#6750a4","#c58b2b","#7d3f52","#33759b","#9c4d8f","#a33d3d","#6f8f3d","#d08a2f","#444b57"],u=new Set(["Overall Intensity","Tension","Emotional Weight","Action"]),i=[],r=()=>{window.requestAnimationFrame(()=>{i.forEach(n=>n.resize())})};window.PlotLineMetricCharts={resizeAll:r};window.addEventListener("plotline:timeline-layout-changed",r);const f={id:"plotlineChapterGuides",afterDraw(n){const u=n.config.options.plugins.plotlineScenes||[],{ctx:t,chartArea:r,scales:f}=n;if(u.length&&f.x){t.save();t.strokeStyle="rgba(47, 111, 99, 0.16)";t.fillStyle="rgba(82, 75, 65, 0.58)";t.lineWidth=1;t.font="700 10px system-ui, -apple-system, Segoe UI, sans-serif";const e=[];u.forEach((n,t)=>{t&&n.chapterLabel===u[t-1].chapterLabel||e.push({scene:n,index:t})});const i=e.filter(n=>!n.scene.isPlaceholder),o=i.length>40?5:i.length>24?4:i.length>14?2:1;i.forEach((n,u)=>{const{scene:s,index:c}=n,e=f.x.getPixelForValue(c+.5);t.beginPath();t.moveTo(e,r.top);t.lineTo(e,r.bottom);t.stroke();const h=Number.parseInt(String(s.chapterLabel).replace(/[^0-9]/g,""),10),l=u===0||u===i.length-1||o===1||Number.isFinite(h)&&h%o==0;l&&t.fillText(s.chapterLabel,Math.min(e+4,r.right-70),r.bottom+22)});t.restore()}}};window.Chart&&Chart.register(f);n.forEach(n=>{const p=n.querySelector("script[type='application/json']"),o=n.querySelector("canvas"),w=n.querySelector("[data-metric-toggles]"),b=n.querySelector("[data-chart-fallback]"),k=n.querySelector("[data-timeline-metric-edit-toolbar]"),c=n.querySelector("[data-edit-metric-status]"),v=n.hasAttribute("data-timeline-metric-editor")&&k&&c;if(p&&o){let f;try{f=JSON.parse(p.textContent||"{}")}catch{b?.classList.remove("d-none");return}if(!window.Chart||!f.scenes?.length||!f.metrics?.length){b?.classList.remove("d-none");return}const tt=new Set(f.defaultMetrics?.length?f.defaultMetrics:u),s=f.scenes.length,it=s>80?10:s>40?5:s>24?4:s>14?2:1,l=f.metrics.map((n,i)=>{const u=new Map(n.points.map(n=>[n.sceneId,n.value])),r=t[i%t.length];return{label:n.metricName,metricTypeId:n.metricTypeId,minValue:Number.isFinite(n.minValue)?n.minValue:1,maxValue:Number.isFinite(n.maxValue)?n.maxValue:10,data:f.scenes.map((n,t)=>{const i=u.get(n.sceneId);return i==null?{x:t+.5,y:null,sceneId:n.sceneId}:{x:t+.5,y:i,sceneId:n.sceneId}}),borderColor:r,backgroundColor:r,pointBackgroundColor:r,pointBorderColor:"#fff",pointBorderWidth:1.5,pointRadius:3,pointHoverRadius:5,borderWidth:2,tension:.35,spanGaps:!0,hidden:!tt.has(n.metricName)}});let e=null,a=!1;const h=n=>{c&&(c.textContent=n)},d=()=>l.map((n,t)=>t).filter(n=>r?.isDatasetVisible(n)),g=()=>{const n=d();return n.length===1?n[0]:-1},nt=()=>{if(v){const n=g();l.forEach((t,i)=>{t.pointRadius=i===n?5:3,t.pointHoverRadius=i===n?7:5,t.borderWidth=i===n?3:2});const t=d(),i=n>=0;o.classList.toggle("metric-curve-editing",i);c.classList.toggle("d-none",t.length===0);t.length===0?h(""):i?h("Drag points up or down to edit this metric."):h("Show only one metric line to edit its curve.");r?.update()}};w.innerHTML="";l.forEach((n,t)=>{const u=`metric-toggle-${Math.random().toString(36).slice(2)}-${t}`,i=document.createElement("label");i.className="metric-toggle-pill";i.style.setProperty("--metric-colour",n.borderColor);i.innerHTML=`${n.label}`;w.appendChild(i);i.querySelector("input").addEventListener("change",n=>{r.setDatasetVisibility(t,n.target.checked),nt(),r.update()})});const r=new Chart(o,{type:"line",data:{datasets:l},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"nearest",intersect:!1},scales:{y:{min:1,max:10,ticks:{stepSize:1},grid:{color:"rgba(82, 75, 65, 0.10)"}},x:{type:"linear",min:0,max:s,bounds:"ticks",ticks:{maxRotation:0,autoSkip:!1,maxTicksLimit:16,callback(n){const t=Math.floor(Number(n));if(t<0||t>=s)return"";const i=f.scenes[t];return t!==0&&t!==s-1&&t%it!=0?"":i?.isPlaceholder?"":i?.axisLabel||""}},afterBuildTicks(n){n.ticks=f.scenes.map((n,t)=>({value:t+.5}))},grid:{display:!1}}},plugins:{legend:{display:!1},plotlineScenes:f.scenes,tooltip:{callbacks:{title(n){const i=Math.floor(n[0].parsed.x),t=f.scenes[i];return t.isPlaceholder?t.sceneTitle||"No scene":`${t.chapterLabel}, Scene ${t.sceneNumber}: ${t.sceneTitle}`},label(n){return`${n.dataset.label}: ${n.formattedValue}`},afterBody(n){const r=Math.floor(n[0].parsed.x),t=f.scenes[r],i=[];return t.characterPresence?i.push(t.characterPresence):t.characterAppears!==undefined&&i.push(t.characterAppears?"Character appears":"Character does not appear"),t.bookTitle&&i.push(t.bookTitle),i}}}}}}),rt=n=>{if(!v)return null;const u=g();if(u<0)return null;const f=r.getElementsAtEventForMode(n,"nearest",{intersect:!0},!0),t=f.find(n=>n.datasetIndex===u);if(!t)return null;const e=r.data.datasets[t.datasetIndex],i=e?.data?.[t.index];return!i?.sceneId||i.y==null?null:{datasetIndex:t.datasetIndex,pointIndex:t.index,previousValue:i.y}},ut=(n,t)=>{const i=r.scales.y.getValueForPixel(n.offsetY),u=Math.round(i);return Math.max(t.minValue,Math.min(t.maxValue,u))},ft=async t=>{const u=r.data.datasets[t.datasetIndex],i=u?.data?.[t.pointIndex];if(u&&i?.sceneId){const f=k?.querySelector("input[name='__RequestVerificationToken']")?.value||"";h("Saving...");try{const e=await fetch(n.dataset.updateUrl||"/SceneMetrics/UpdateSceneMetricValue",{method:"POST",headers:{"Content-Type":"application/json",RequestVerificationToken:f},body:JSON.stringify({sceneId:Number(i.sceneId),metricId:Number(u.metricTypeId),value:Number(i.y)})}),t=await e.json().catch(()=>({}));if(!e.ok||!t.success)throw new Error(t.message||"Save failed");i.y=t.value;h("Saved");r.update()}catch{i.y=t.previousValue;h("Save failed");r.update()}}};v&&(nt(),o.addEventListener("pointerdown",n=>{(e=rt(n),e)&&(n.preventDefault(),o.setPointerCapture?.(n.pointerId),a=!0)}),o.addEventListener("pointermove",n=>{if(e){const t=r.data.datasets[e.datasetIndex],i=t?.data?.[e.pointIndex];t&&i&&(i.y=ut(n,t),r.update("none"))}}),o.addEventListener("pointerup",async n=>{if(e){const t=e;e=null;o.releasePointerCapture?.(n.pointerId);await ft(t);window.setTimeout(()=>{a=!1},0)}}),o.addEventListener("pointercancel",n=>{if(e){const i=r.data.datasets[e.datasetIndex],t=i?.data?.[e.pointIndex];t&&(t.y=e.previousValue);e=null;o.releasePointerCapture?.(n.pointerId);a=!1;r.update()}}));o.addEventListener("click",n=>{if(a){n.preventDefault();return}const t=r.getElementsAtEventForMode(n,"nearest",{intersect:!0},!0);if(t.length){const i=r.data.datasets[t[0].datasetIndex]?.data?.[t[0].index],e=i?Math.floor(i.x):t[0].index,u=f.scenes[e];u?.timelineUrl&&(window.PlotLineTimelineScroll?.save(),window.location.href=u.timelineUrl)}});i.push(r);const y=window.ResizeObserver?new ResizeObserver(()=>r.resize()):null;y&&(y.observe(n),y.observe(n.querySelector(".metric-chart-frame")||n))}})}})();(()=>{const i=document.querySelector("[data-timeline-root]"),t=document.querySelector("[data-timeline-controls]");if(i&&t){const r="plotline.timeline.visibility",u={"scene-cards":!0,"plot-lines":!0,assets:!0,characters:!0,locations:!0,warnings:!0,metrics:!0},e=()=>{try{return{...u,...JSON.parse(localStorage.getItem(r)||"{}")}}catch{return{...u}}},f=n=>{Object.entries(n).forEach(([n,t])=>{i.classList.toggle(`hide-${n}`,!t),document.querySelectorAll(`[data-timeline-section='${n}']`).forEach(n=>{n.classList.toggle("timeline-section-hidden",!t)})}),document.querySelectorAll("[data-location-marker]").forEach(t=>{t.classList.toggle("timeline-section-hidden",!n.locations)}),document.querySelectorAll("[data-warning-marker]").forEach(t=>{t.classList.toggle("timeline-section-hidden",!n.warnings)}),document.querySelector("[data-visibility-json]")?.setAttribute("value",JSON.stringify(n))},n=e();t.querySelectorAll("[data-timeline-toggle]").forEach(t=>{const i=t.dataset.timelineToggle;t.checked=n[i]??!0;t.addEventListener("change",()=>{n[i]=t.checked,localStorage.setItem(r,JSON.stringify(n)),f(n)})});t.querySelector("[data-timeline-preset-form]")?.addEventListener("submit",()=>{document.querySelector("[data-visibility-json]")?.setAttribute("value",JSON.stringify(n))});f(n)}})();(()=>{const n=document.querySelector("[data-timeline-root]");if(n){const f=n.querySelector(".timeline-workspace")||n,h=document.querySelector("[data-timeline-density]"),e=document.querySelector("[data-timeline-zoom]"),t=document.querySelector("[data-timeline-search]"),c=n.querySelector("[data-timeline-minimap]"),ft=document.querySelectorAll("[data-timeline-jump], [data-timeline-warning-jump], [data-timeline-entity-jump]"),et=[...n.querySelectorAll(".timeline-scene-card[data-scene-id]")],l="plotline.timeline.collapsed",d="plotline.timeline.density",g="plotline.timeline.zoom",o="plotline.timeline.pending-scroll",a="plotline.timeline.inspectorWidth",ot=".timeline-shell,.plot-lane-board,.asset-lane-board,.character-lane-board,.metric-graph-stack,[data-timeline-minimap]",nt=["compact","comfortable","expanded"],s=["book","chapter","scene-detail"],v=n.querySelector("[data-inspector-drawer]"),i=n.querySelector("[data-inspector-resizer]"),st=n.querySelector("[data-inspector-close]"),ht=n=>{try{return new Set(JSON.parse(localStorage.getItem(n)||"[]"))}catch{return new Set}},ct=localStorage.getItem(l)!==null,r=ht(l),tt=()=>[...n.querySelectorAll(ot)],lt=()=>{const t=n.getBoundingClientRect().width||window.innerWidth,i=Math.min(420,Math.max(320,t-360)),r=Math.max(i,Math.min(t*.65,t-420));return{minimum:i,maximum:r,defaultWidth:Math.max(i,Math.min(r,t*.4))}},y=t=>{if(v){const{minimum:i,maximum:r,defaultWidth:u}=lt(),f=Math.max(i,Math.min(r,Number(t)||u));n.style.setProperty("--timeline-inspector-width",`${Math.round(f)}px`)}};v&&(y(localStorage.getItem(a)),window.addEventListener("resize",()=>y(localStorage.getItem(a))));i?.addEventListener("pointerdown",t=>{t.preventDefault();document.body.classList.add("timeline-inspector-resizing");i.setPointerCapture(t.pointerId);const u=t=>{const i=n.getBoundingClientRect().right,r=i-t.clientX;y(r)},r=()=>{document.body.classList.remove("timeline-inspector-resizing");const n=Math.round(v?.getBoundingClientRect().width||0);n>0&&localStorage.setItem(a,String(n));window.dispatchEvent(new Event("plotline:timeline-layout-changed"));i.removeEventListener("pointermove",u);i.removeEventListener("pointerup",r);i.removeEventListener("pointercancel",r)};i.addEventListener("pointermove",u);i.addEventListener("pointerup",r);i.addEventListener("pointercancel",r)});st?.addEventListener("click",n=>{n.preventDefault();const t=new URL(window.location.href),i=t.searchParams.get("FocusType")||t.searchParams.get("focusType");t.searchParams.delete("SelectedSceneID");t.searchParams.delete("selectedSceneId");t.searchParams.delete("selectedsceneid");i&&i.toLowerCase()!=="scene"||(t.searchParams.delete("FocusType"),t.searchParams.delete("focusType"),t.searchParams.delete("FocusID"),t.searchParams.delete("focusId"));p();window.location.href=t.toString()});const p=()=>{try{sessionStorage.setItem(o,JSON.stringify({path:window.location.pathname,top:window.scrollY,left:window.scrollX,workspaceLeft:f.scrollLeft,workspaceTop:f.scrollTop,containers:tt().map((n,t)=>({index:t,left:n.scrollLeft,top:n.scrollTop}))}))}catch{}},at=()=>{let n=null;try{n=JSON.parse(sessionStorage.getItem(o)||"null");sessionStorage.removeItem(o)}catch{try{sessionStorage.removeItem(o)}catch{}return}n&&n.path===window.location.pathname&&window.requestAnimationFrame(()=>{f.scrollLeft=Number(n.workspaceLeft)||0;f.scrollTop=Number(n.workspaceTop)||0;const t=tt();(n.containers||[]).forEach(n=>{const i=t[n.index];i&&(i.scrollLeft=Number(n.left)||0,i.scrollTop=Number(n.top)||0)});window.scrollTo(Number(n.left)||0,Number(n.top)||0)})};window.PlotLineTimelineScroll={save:p};const it=(t,i,r)=>{r.forEach(i=>n.classList.remove(`${t}-${i}`)),n.classList.add(`${t}-${i}`)},rt=n=>{const t=nt.includes(n)?n:"comfortable";it("density",t,nt);h&&(h.value=t);localStorage.setItem(d,t);window.requestAnimationFrame(u)},w=n=>{const t=s.includes(n)?n:"chapter";it("zoom",t,s);e&&(e.value=t);localStorage.setItem(g,t);window.requestAnimationFrame(u)},vt=t=>n.querySelector(`[data-scene-id='${CSS.escape(String(t))}']`),b=(n,t=true)=>{const i=vt(n);i&&(i.classList.add("keyboard-focus"),i.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}),t&&i.focus({preventScroll:!0}),window.setTimeout(()=>i.classList.remove("keyboard-focus"),1800))},yt=(n="auto")=>{const r=c?.querySelector("[data-active-chapter='true']");if(c&&r){const t=c.getBoundingClientRect(),i=r.getBoundingClientRect(),u=i.left+i.width/2,f=t.left+t.width/2;(i.leftt.right)&&c.scrollBy({left:u-f,behavior:n})}},pt=()=>localStorage.setItem(l,JSON.stringify([...r])),u=()=>{n.querySelectorAll("[data-plot-line-svg-board]").forEach(n=>{const i=n.querySelector("[data-plot-line-svg]");if(i){i.replaceChildren();const u=n.getBoundingClientRect(),o=Math.max(n.scrollWidth,u.width),s=Math.max(n.scrollHeight,u.height);i.setAttribute("viewBox",`0 0 ${o} ${s}`);i.setAttribute("width",String(o));i.setAttribute("height",String(s));const t=(n,t={})=>{const i=document.createElementNS("http://www.w3.org/2000/svg",n);return Object.entries(t).forEach(([n,t])=>i.setAttribute(n,String(t))),i},h=n=>{const t=n.getBoundingClientRect();return t.top-u.top+t.height/2},y=(n,t)=>{const i=t.closest("[data-plot-line-slot]");if(!i)return null;const r=i.getBoundingClientRect();return{x:r.left-u.left+r.width/2,y:h(n),sceneIndex:0,type:(t.dataset.plotEventType||"Progress").toLowerCase(),targetPlotLineId:t.dataset.targetPlotLineId||"",targetPlotLineIds:(t.dataset.targetPlotLineIds||"").split(",").map(n=>n.trim()).filter(Boolean)}},c=[...new Set([...n.querySelectorAll("[data-plot-line-slot]")].map(n=>{const t=n.getBoundingClientRect();return Math.round(t.left-u.left+t.width/2)}))].sort((n,t)=>n-t),l=Math.max(c.length-1,0),f=new Map;n.querySelectorAll("[data-plot-line-row]").forEach(n=>{n.dataset.plotLineId&&f.set(n.dataset.plotLineId,n)});const r=[...f.values()].map(n=>({row:n,plotLineId:n.dataset.plotLineId,colour:n.dataset.plotColour||"#2f6f63",points:[...n.querySelectorAll("[data-plot-event-node]")].map(t=>y(n,t)).filter(Boolean).map(n=>({...n,sceneIndex:Math.max(0,c.findIndex(t=>t===Math.round(n.x)))})).sort((n,t)=>n.x-t.x),incomingStartXs:[]})),a=new Map(r.map(n=>[n.plotLineId,n])),p=n=>{const t=n.some(n=>n.type==="resolve"),i=n.some(n=>n.type==="abandon"),u=n.find(n=>n.type==="resolve"),c=n.find(n=>n.type==="abandon"),f=n.some(n=>n.type==="merge"&&n.targetPlotLineId),e=n.some(n=>n.type==="split"&&n.targetPlotLineIds.length>=2),a=Boolean(u)&&n.some(n=>n.type==="branch"&&n.targetPlotLineId&&n.sceneIndex>=u.sceneIndex),o=n.reduce((n,t)=>Math.max(n,t.sceneIndex),0),s=!t&&!i&&l-o>=10,v=!t&&!i&&!f&&!e&&l>=o,h=t&&!f&&!e&&!a;let r="active";return i?r="abandoned":t?r=h?"questionable":"resolved":s&&(r="neglected"),{state:r,isNeglected:s,isDangling:v,isQuestionable:h,isAbandoned:i,resolvePoint:u,abandonPoint:c}},w=(n,r,u)=>{const f=t("g",{"class":`plot-event-svg-node plot-event-svg-node-${n.type} plotline-state-${u}`}),e=n.type==="branch"||n.type==="split"||n.type==="merge";n.type==="twist"?f.append(t("path",{d:`M ${n.x} ${n.y-9} L ${n.x+9} ${n.y} L ${n.x} ${n.y+9} L ${n.x-9} ${n.y} Z`,fill:r})):n.type==="abandon"?(f.append(t("circle",{cx:n.x,cy:n.y,r:9,fill:"#fff5f5"})),f.append(t("line",{x1:n.x-7,y1:n.y-7,x2:n.x+7,y2:n.y+7})),f.append(t("line",{x1:n.x+7,y1:n.y-7,x2:n.x-7,y2:n.y+7}))):n.type==="reveal"?f.append(t("path",{d:`M ${n.x} ${n.y-10} L ${n.x+3} ${n.y-3} L ${n.x+10} ${n.y-3} L ${n.x+4} ${n.y+2} L ${n.x+6} ${n.y+10} L ${n.x} ${n.y+5} L ${n.x-6} ${n.y+10} L ${n.x-4} ${n.y+2} L ${n.x-10} ${n.y-3} L ${n.x-3} ${n.y-3} Z`,fill:r})):(f.append(t("circle",{cx:n.x,cy:n.y,r:e?9:7.5,fill:r})),n.type==="resolve"&&f.append(t("circle",{cx:n.x,cy:n.y,r:12,fill:"none",stroke:r})),e&&f.append(t("circle",{cx:n.x,cy:n.y,r:13,fill:"none",stroke:r})));i.append(f)},e=(n,r,u,f=0)=>{const e=13+f*15,o=t("g",{"class":`plotline-health-marker plotline-health-marker-${r}`}),s=t("title");if(s.textContent=u,o.append(s),r==="questionable"){o.append(t("circle",{cx:n.x+e,cy:n.y-10,r:7}));const i=t("text",{x:n.x+e,y:n.y-6,"text-anchor":"middle"});i.textContent="?";o.append(i)}else o.append(t("path",{d:`M ${n.x+e} ${n.y-18} L ${n.x+e+8} ${n.y-3} L ${n.x+e-8} ${n.y-3} Z`})),o.append(t("line",{x1:n.x+e,y1:n.y-13,x2:n.x+e,y2:n.y-8})),o.append(t("circle",{cx:n.x+e,cy:n.y-5.6,r:1.3}));i.append(o)},v=(n,r,u,f)=>{if(!r){window.console?.warn&&window.console.warn(`Plot line ${f} connector skipped because target plot line data is missing.`);return}const e={x:n.x,y:h(r)},o=Math.max(28,Math.min(46,Math.abs(e.y-n.y)*.28)),c=n.x+o,s=n.x+o/2;i.append(t("path",{"class":`plot-line-svg-connector plot-line-svg-connector-${f}`,d:`M ${n.x} ${n.y} C ${s} ${n.y}, ${s} ${e.y}, ${c} ${e.y}`,stroke:u}))};r.forEach(n=>{n.points.forEach(n=>{n.type==="branch"&&n.targetPlotLineId&&a.get(n.targetPlotLineId)?.incomingStartXs.push(n.x),n.type==="split"&&n.targetPlotLineIds.forEach(t=>{a.get(t)?.incomingStartXs.push(n.x)})})});r.forEach(n=>{n.health=p(n.points),n.state=n.health.state});r.forEach(n=>{const{colour:f,points:r,incomingStartXs:u,state:e}=n;if(r.length>0){const c=r.find(n=>n.type==="start"),s=u.length?Math.min(...u):null,l=r.find(n=>n.type==="split"||n.type==="merge"),o=r[0],v=r[r.length-1],a=s!==null&&!(c&&c.xa&&i.append(t("path",{"class":`plot-line-svg-path plotline-state-${e}`,d:`M ${a} ${o.y} L ${h} ${o.y}`,stroke:f}))}});r.forEach(({points:t,colour:n})=>{t.forEach(t=>{(t.type==="branch"||t.type==="merge")&&v(t,f.get(t.targetPlotLineId),n,t.type),t.type==="split"&&t.targetPlotLineIds.length>=2?t.targetPlotLineIds.forEach(i=>{v(t,f.get(i),n,t.type)}):t.type==="split"&&t.targetPlotLineIds.length>0&&window.console?.warn&&window.console.warn("Plot line split connector skipped because fewer than two targets are available.")})});r.forEach(({points:t,colour:n,state:i})=>{t.forEach(t=>{w(t,n,i)})});r.forEach(n=>{const t=n.lineEndPoint||n.points[n.points.length-1];let i=0;n.health?.isNeglected&&t&&e(t,"neglected","No plot event for 10+ scenes. This thread may have been forgotten.",i++);n.health?.isDangling&&t&&e(t,"dangling","This plot line is still unresolved at the end of the current timeline.",i++);n.health?.isQuestionable&&n.health.resolvePoint&&e(n.health.resolvePoint,"questionable","Resolved without merge, split, or branch. Verify this thread has sufficient payoff.");n.health?.isAbandoned&&n.health.abandonPoint&&e(n.health.abandonPoint,"abandoned","This plot line was abandoned. Check this is intentional.")})}})},ut=(n,t)=>{document.querySelectorAll(`[data-collapse-body='${CSS.escape(n)}']`).forEach(n=>{n.classList.toggle("timeline-section-collapsed",t)}),document.querySelectorAll(`[data-collapse-toggle='${CSS.escape(n)}']`).forEach(n=>{n.classList.toggle("is-collapsed",t),n.setAttribute("aria-expanded",String(!t))})};document.querySelectorAll("[data-collapse-toggle]").forEach(n=>{const t=n.dataset.collapseToggle;ct||n.dataset.collapseDefault!=="collapsed"||r.add(t);const i=r.has(t);ut(t,i);n.addEventListener("click",()=>{const n=!r.has(t);n?r.add(t):r.delete(t);ut(t,n);pt();u();window.dispatchEvent(new Event("plotline:timeline-layout-changed"))})});h?.addEventListener("change",()=>rt(h.value));e?.addEventListener("change",()=>w(e.value));rt(localStorage.getItem(d)||"comfortable");w(localStorage.getItem(g)||"chapter");const wt=(()=>{try{return sessionStorage.getItem(o)!==null}catch{return!1}})();window.requestAnimationFrame(()=>{u(),yt("auto"),wt&&at()});window.addEventListener("resize",u);window.addEventListener("plotline:timeline-layout-changed",u);const bt=t=>{if(t.button===0&&!t.metaKey&&!t.ctrlKey&&!t.shiftKey&&!t.altKey){const r=t.target instanceof Element?t.target:null,i=r?.closest("a[href]");if(i&&n.contains(i)){const u=new URL(i.href,window.location.href);[...u.searchParams.keys()].some(n=>n.toLowerCase()==="selectedsceneid")&&p()}}};n.addEventListener("click",bt,{capture:!0});const k=()=>{const n=t?.value.trim().toLowerCase()||"";let i=null;return et.forEach(t=>{const r=!n||(t.dataset.timelineSearchText||"").toLowerCase().includes(n);t.classList.toggle("search-hit",Boolean(n&&r));t.classList.toggle("search-dim",Boolean(n&&!r));!i&&n&&r&&(i=t)}),i};t?.addEventListener("input",k);t?.addEventListener("keydown",n=>{if(n.key==="Enter"){const t=k();t&&(n.preventDefault(),b(t.dataset.sceneId))}});ft.forEach(n=>{n.addEventListener("change",()=>{n.value&&b(n.value)})});document.querySelectorAll("[data-jump-scene]").forEach(n=>{n.addEventListener("click",()=>{n.dataset.jumpScene&&b(n.dataset.jumpScene)})});document.addEventListener("keydown",n=>{const i=document.activeElement?.tagName?.toLowerCase(),r=["input","select","textarea"].includes(i)||document.activeElement?.isContentEditable;if((n.ctrlKey||n.metaKey)&&n.key.toLowerCase()==="f"&&t){n.preventDefault();t.focus();t.select();return}if(n.key==="Escape"){const n=new URL(window.location.href),i=n.searchParams.has("FocusType")||n.searchParams.has("FocusID");n.searchParams.delete("FocusType");n.searchParams.delete("FocusID");i?window.location.href=n.toString():t?.value&&(t.value="",k());return}if(!r){if(n.key==="ArrowLeft"||n.key==="ArrowRight"){n.preventDefault();f.scrollBy({left:n.key==="ArrowLeft"?-260:260,behavior:"smooth"});return}if(n.key==="+"||n.key==="="||n.key==="-"){const t=s.indexOf(e?.value||"chapter"),i=n.key==="-"?-1:1,r=Math.min(s.length-1,Math.max(0,t+i));w(s[r])}}})}})();(()=>{const e=document.querySelector("[data-timeline-root]"),t=document.querySelector("[data-drag-drop-panel]");if(t){const i=new Map([...document.querySelectorAll("[data-drag-form]")].map(n=>[n.dataset.dragForm,n])),g=t.querySelector("[data-drag-panel-title]"),nt=t.querySelector("[data-drag-panel-kicker]"),tt=t.querySelector("[data-drag-panel-summary]"),o=document.querySelector("[data-scene-move-modal]"),v=o&&window.bootstrap?.Modal?window.bootstrap.Modal.getOrCreateInstance(o):null,y=o?.querySelector("[data-scene-move-title]"),p=o?.querySelector("[data-scene-move-summary]"),w=o?.querySelector("[data-scene-move-submit]"),s="plotline.timeline.scroll";let h=null,c=0;const n=(n,t,i)=>{const r=n?.querySelector(`[name='${CSS.escape(t)}']`);r&&(r.value=i??"")},l=n=>n?.selectedOptions?.[0]?.textContent?.trim()||"",a=n=>`“${n||"this scene"}”`,b=(n,t,i,r,u)=>t&&i&&t===i?`Move ${a(n.label)} to this new position within ${i}?`:t&&i?`Move ${a(n.label)} from ${t} to ${i}?`:`Move ${a(n.label)} ${r.toLowerCase()} ${u}?`,r=(n,r,u,f)=>{if(n==="scene"){t.classList.add("d-none");t.querySelectorAll("[data-drag-form]").forEach(n=>n.classList.add("d-none"));i.get("scene")?.classList.remove("d-none");y&&(y.textContent=r);p&&(p.textContent=u);w&&w.classList.toggle("d-none",r.toLowerCase().startsWith("cannot")||r.toLowerCase().startsWith("scene already"));v?v.show():t.classList.remove("d-none");return}i.forEach((t,i)=>t.classList.toggle("d-none",i!==n));t.classList.remove("d-none");g.textContent=r;nt.textContent=f;tt.textContent=u;t.scrollIntoView({behavior:"smooth",block:"center"})},it=()=>{t.classList.add("d-none"),i.forEach(n=>n.classList.add("d-none"))},k=()=>{document.querySelectorAll(".drop-target-active, .drop-before, .drop-after, .chapter-drop-active, .drop-chapter-end").forEach(n=>n.classList.remove("drop-target-active","drop-before","drop-after","chapter-drop-active","drop-chapter-end"))},rt=()=>{const n=e?.querySelector(".timeline-shell");try{sessionStorage.setItem(s,JSON.stringify({left:n?.scrollLeft||0,top:window.scrollY||0}))}catch{}};try{const n=JSON.parse(sessionStorage.getItem(s)||"null");n&&(sessionStorage.removeItem(s),requestAnimationFrame(()=>{const t=e?.querySelector(".timeline-shell");t&&(t.scrollLeft=n.left||0);window.scrollTo({top:n.top||0})}))}catch{sessionStorage.removeItem(s)}const f=n=>{try{const t=JSON.parse(n.dataTransfer.getData("application/json")||"{}");return t.type?t:h||{}}catch{return h||{}}},ut=(n,t)=>{const i={type:t.dataset.dragType,id:t.dataset.dragId,label:t.dataset.dragLabel||t.textContent.trim()};n.dataTransfer.effectAllowed="copyMove";n.dataTransfer.setData("application/json",JSON.stringify(i));n.dataTransfer.setData("text/plain",`${i.type}:${i.id}`);h=i;document.body.classList.add("drag-active",`dragging-${i.type}`);t.classList.add("is-dragging")};document.querySelectorAll("[data-drag-type][draggable='true']").forEach(n=>{n.addEventListener("dragstart",t=>ut(t,n)),n.addEventListener("dragend",()=>{n.classList.remove("is-dragging"),document.body.classList.remove("drag-active","dragging-scene","dragging-character","dragging-asset","dragging-location"),h=null,k()})});t.querySelectorAll("[data-drag-cancel]").forEach(n=>n.addEventListener("click",it));i.get("scene")?.addEventListener("submit",rt);e?.querySelectorAll(".timeline-scene-card[data-scene-id]").forEach(t=>{t.addEventListener("click",n=>{Date.now(){const i=f(n);["scene","character","asset"].includes(i.type)&&(n.preventDefault(),n.stopPropagation(),n.dataTransfer.dropEffect=i.type==="scene"?"move":"copy",t.classList.add("drop-target-active"),t.classList.toggle("drop-before",i.type==="scene"&&n.offsetX=t.clientWidth/2))}),t.addEventListener("dragleave",()=>t.classList.remove("drop-target-active","drop-before","drop-after")),t.addEventListener("drop",u=>{const o=f(u);if(["scene","character","asset"].includes(o.type)){u.preventDefault();u.stopPropagation();c=Date.now()+800;t.classList.remove("drop-target-active","drop-before","drop-after");const s=t.dataset.sceneId;if(o.type==="scene"){if(o.id===s){r("scene","Cannot move scene","Drop a scene before or after a different scene.","Scene move");return}const f=i.get("scene"),h=u.offsetX{const u=t.closest("[data-chapter-drop-target]"),o=t.dataset.chapterId||u?.dataset.chapterId,s=t.dataset.chapterLabel||u?.dataset.chapterLabel||"this chapter";t.addEventListener("dragover",n=>{const i=f(n);i.type==="scene"&&o&&(n.target.closest(".timeline-scene-card[data-scene-id]")||(n.preventDefault(),n.dataTransfer.dropEffect="move",t.classList.add("drop-target-active","drop-chapter-end"),u?.classList.add("chapter-drop-active")))});t.addEventListener("dragleave",n=>{t.contains(n.relatedTarget)||(t.classList.remove("drop-target-active","drop-chapter-end"),u?.classList.remove("chapter-drop-active"))});t.addEventListener("drop",u=>{const h=f(u);if(h.type==="scene"&&o&&!u.target.closest(".timeline-scene-card[data-scene-id]")){u.preventDefault();u.stopPropagation();c=Date.now()+800;k();const a=e.querySelector(`.timeline-scene-card[data-scene-id='${CSS.escape(h.id)}']`);if(a?.dataset.chapterId===o&&t.lastElementChild?.dataset?.sceneId===h.id){r("scene","Scene already here",`${h.label} is already at the end of ${s}.`,"Scene move");return}const l=i.get("scene");n(l,"SceneID",h.id);n(l,"AnchorSceneID","");n(l,"TargetChapterID",o);n(l,"Position","End");r("scene","Move Scene?",b(h,a?.dataset.chapterLabel||"",s,"After",s),"Scene move")}})});const u=i.get("asset-dependency"),d=()=>{const n=u?.dataset.sourceLabel||"Source asset",i=u?.dataset.targetLabel||"Target asset",f=l(u?.querySelector("[name='AssetDependencyTypeID']"))||"Requires",e=l(u?.querySelector("[name='SourceRequiredStateID']"))||"the required state",o=l(u?.querySelector("[name='TargetBlockedStateID']"))||"the blocked state",r=t.querySelector("[data-asset-dependency-preview]");r&&(r.textContent=`${n} ${f.toLowerCase()} ${i}. ${n} should be ${e} before ${i} can be ${o}.`)};u?.querySelectorAll("select").forEach(n=>n.addEventListener("change",d));document.querySelectorAll("[data-asset-drop-target], .drag-chip.asset").forEach(t=>{t.addEventListener("dragover",n=>{const i=f(n);i.type==="asset"&&(n.preventDefault(),n.dataTransfer.dropEffect="copy",t.classList.add("drop-target-active"))}),t.addEventListener("dragleave",()=>t.classList.remove("drop-target-active")),t.addEventListener("drop",i=>{const e=f(i),o=t.dataset.assetId||t.dataset.dragId,s=t.dataset.assetLabel||t.dataset.dragLabel||t.textContent.trim();if(e.type==="asset"&&o){if(i.preventDefault(),t.classList.remove("drop-target-active"),e.id===o){r("asset-dependency","Cannot create dependency","Drop one asset onto a different asset.","Asset dependency");return}n(u,"SourceAssetID",e.id);n(u,"TargetAssetID",o);u.dataset.sourceLabel=e.label;u.dataset.targetLabel=s;d();r("asset-dependency","Create asset dependency",`${e.label} -> ${s}`,"Asset dependency")}})});document.querySelectorAll("[data-drag-type='location']").forEach(t=>{t.addEventListener("dragover",n=>{const i=f(n);i.type==="location"&&(n.preventDefault(),n.dataTransfer.dropEffect="copy",t.classList.add("drop-target-active"))}),t.addEventListener("dragleave",()=>t.classList.remove("drop-target-active")),t.addEventListener("drop",u=>{const e=f(u),o=t.dataset.dragId,h=t.dataset.dragLabel||t.textContent.trim();if(e.type==="location"){if(u.preventDefault(),t.classList.remove("drop-target-active"),e.id===o){r("location-relationship","Cannot create relationship","Drop one location onto a different location.","Location relationship");return}const s=i.get("location-relationship");n(s,"FromLocationID",e.id);n(s,"ToLocationID",o);r("location-relationship","Create location relationship",`${e.label} -> ${h}`,"Location drop")}})})}})(); \ No newline at end of file +(()=>{const n="plotline.theme",t=document.querySelectorAll("[data-theme-choice]"),r=()=>{try{return localStorage.getItem(n)}catch{return null}},u=t=>{try{localStorage.setItem(n,t)}catch{}},i=n=>{const i=n==="dark"?"dark":"light";document.documentElement.dataset.theme=i;document.documentElement.dataset.bsTheme=i;u(i);t.forEach(n=>{const t=n.dataset.themeChoice===i;n.classList.toggle("active",t);n.setAttribute("aria-pressed",String(t))})};t.forEach(n=>{n.addEventListener("click",()=>i(n.dataset.themeChoice))});i(r()||"light")})();(()=>{const n=document.querySelector("[data-trial-banner]");if(n){const t=`plotline.trialBanner.dismissed.${n.dataset.trialBannerKey||"current"}`;try{if(localStorage.getItem(t)==="true"){n.hidden=!0;return}}catch{}n.querySelector("[data-trial-banner-dismiss]")?.addEventListener("click",()=>{n.hidden=!0;try{localStorage.setItem(t,"true")}catch{}})}})();(()=>{const n=document.querySelectorAll(".scene-inspector-root");if(n.length){const t=()=>`${window.location.pathname}${window.location.search}${window.location.hash}`;n.forEach(n=>{n.addEventListener("submit",n=>{const r=n.target;if(r instanceof HTMLFormElement){let i=r.querySelector("input[name='ReturnUrl']");i||(i=document.createElement("input"),i.type="hidden",i.name="ReturnUrl",r.appendChild(i));i.value=t()}},!0)})}})();(()=>{const t=document.getElementById("plotlineConfirmModal"),f=t&&window.bootstrap?new bootstrap.Modal(t):null,e=t?.querySelector("#plotlineConfirmModalTitle"),o=t?.querySelector("#plotlineConfirmModalMessage"),i=t?.querySelector("[data-confirm-submit]"),s=t?.querySelector("[data-delete-confirm-field]"),r=t?.querySelector("[data-delete-confirm-input]");let n=null,u=null;const h=n=>{const t=n.split(/\n\s*\n/);return{title:t.shift()?.trim()||"Confirm action",body:t.join("\n\n").trim()}},c=()=>{n=null,u=null,r&&(r.value=""),s?.classList.add("d-none"),i?.removeAttribute("disabled")};t?.addEventListener("hidden.bs.modal",c);r?.addEventListener("input",()=>{n?.dataset.requireDeleteText==="true"&&i&&(i.disabled=r.value.trim()!=="DELETE")});i?.addEventListener("click",()=>{if(n){if(n.dataset.requireDeleteText==="true"){const t=n.querySelector("[data-delete-confirm-target], [name='confirmationText']");t&&(t.value=r?.value.trim()||"")}n.dataset.confirmed="true";f?.hide();n.requestSubmit&&u?n.requestSubmit(u):n.requestSubmit?n.requestSubmit():n.submit()}});document.addEventListener("submit",c=>{const l=c.target;if(l instanceof HTMLFormElement&&l.dataset.confirmed!=="true"&&l.dataset.confirmSkip!=="true"&&l.dataset.noDeleteConfirm!=="true"){const b=l.dataset.confirmMessage,k=c.submitter instanceof HTMLElement?c.submitter:l.querySelector("button[type='submit']"),a=k?.textContent||"",p=l.getAttribute("action")||"",y=/restore/i.test(a)||/\/restore\b/i.test(p),v=/delete forever/i.test(a)||/\/deleteforever\b/i.test(p),d=!y&&!v&&(/archive/i.test(a)||/\/archive\b/i.test(p)),nt=!v&&/(delete|remove)/i.test(a);if(b||d||y||nt||v){const tt=b||(d?"Archive this item?\n\nThis will hide it from active lists and timelines, but the data will be kept and can be restored later.":y?"Restore this item?\n\nThis will return it to active lists and timelines where applicable.":v?"Permanently delete this item?\n\nThis cannot be undone. Any linked planning data may also be removed or become unavailable. Only continue if you are certain.":"Remove this item?\n\nThis removes the link or supporting record. Major story items are archived instead of permanently deleted.");if(f&&t&&e&&o&&i){c.preventDefault();const g=h(tt);n=l;u=k;e.textContent=l.dataset.confirmTitle||g.title;o.textContent=l.dataset.confirmBody||g.body;i.textContent=l.dataset.confirmButtonText||a.trim()||"Confirm";i.className=`btn ${l.dataset.confirmButtonClass||(y?"btn-primary":"btn-danger")}`;const w=l.dataset.requireDeleteText==="true"||v;s?.classList.toggle("d-none",!w);w&&i&&(i.disabled=!0,r?.focus());f.show();w&&window.setTimeout(()=>r?.focus(),200)}}}})})();(()=>{const r=document.querySelectorAll("[data-help-icon]");if(r.length&&window.bootstrap){const u=new Map;let n=null;const f=n=>n.querySelector("[data-help-tooltip]")||n,i=n=>bootstrap.Tooltip.getInstance(f(n))?.hide(),t=(t=null)=>{n&&n!==t&&bootstrap.Popover.getInstance(n)?.hide()},e=()=>r.forEach(n=>i(n));r.forEach(r=>{const o=f(r),s=o.dataset.helpMicro||"Help article not found.",h=r.dataset.helpTitle||"Help unavailable",c=r.dataset.helpSummary||"Help content has not yet been written for this feature.";bootstrap.Tooltip.getOrCreateInstance(o,{title:s,trigger:"hover focus",placement:"top",container:"body"});const l=bootstrap.Popover.getOrCreateInstance(r,{title:h,trigger:"click",placement:"auto",container:"body",html:!0,customClass:"plotline-help-popover",content(){const u=document.createElement("div"),i=document.createElement("p");i.className="mb-2";i.textContent=c;const n=document.createElement("a");return n.href="#",n.textContent="More...",n.className="plotline-help-more",n.addEventListener("click",n=>{n.preventDefault(),t(),e(),r.dispatchEvent(new CustomEvent("plotline:help-more",{bubbles:!0,detail:{key:r.dataset.helpKey||""}}))}),u.append(i,n),u}});u.set(r,l);r.addEventListener("click",n=>{window.PlotLineHelpDrawer?.isActive?.()&&(n.preventDefault(),n.stopPropagation(),t(),i(r),window.PlotLineHelpPopovers?.hideAll(),window.PlotLineHelpDrawer.open(r.dataset.helpKey||""))});r.addEventListener("show.bs.popover",n=>{if(window.PlotLineHelpDrawer?.isActive?.()){n.preventDefault();return}t(r);i(r)});r.addEventListener("shown.bs.popover",()=>{n=r,i(r)});r.addEventListener("hidden.bs.popover",()=>{n===r&&(n=null)})});document.addEventListener("click",i=>{const r=i.target instanceof Element?i.target:null;if(r&&n&&!r.closest("[data-help-icon]")){const u=document.querySelector(`#${n.getAttribute("aria-describedby")}`);u?.contains(r)||t()}});document.addEventListener("keydown",n=>{n.key==="Escape"&&t()});window.PlotLineHelpPopovers={hideAll(){u.forEach(n=>n.hide());e();n=null}}}})();(()=>{const n=document.querySelector("[data-help-layout]"),p=document.querySelector("[data-help-drawer]"),i=document.querySelector("[data-help-content]"),l=document.querySelector("[data-help-splitter]"),w=document.querySelector("[data-help-close]"),h=document.querySelector("[data-help-collapse]"),a=document.querySelector("[data-help-expand]"),u=document.querySelector("[data-help-pin]"),f=document.querySelector("[data-help-drawer-heading]");if(n&&p&&i){const t={width:"plotline.helpDrawer.width",pinned:"plotline.helpDrawer.pinned",key:"plotline.helpDrawer.key",collapsed:"plotline.helpDrawer.collapsed"},b=(n,t,i)=>Math.min(i,Math.max(t,n)),e=n=>{try{return localStorage.getItem(n)==="true"}catch{return!1}},o=(n,t)=>{try{localStorage.setItem(n,t)}catch{}},v=i=>{const r=`${b(Number.parseFloat(i)||25,20,50)}%`;n.style.setProperty("--help-drawer-width",r);o(t.width,r)},c=n=>{o(t.pinned,String(n)),u?.setAttribute("aria-pressed",String(n)),u&&(u.textContent=n?"Unpin":"Pin")},r=i=>{n.classList.toggle("help-collapsed",i),o(t.collapsed,String(i)),h&&(h.textContent=i?"Expand":"Collapse")},s=async(u,e={})=>{const s=u||"";n.classList.add("help-open");e.keepCollapsed||r(!1);o(t.key,s);f&&(f.textContent=s||"Help");i.innerHTML='

Loading help...<\/p>';try{const n=await fetch(`/HelpDrawer/Article?key=${encodeURIComponent(s)}`,{headers:{"X-Requested-With":"XMLHttpRequest"}});i.innerHTML=n.ok?await n.text():'

Help for this feature has not yet been written.<\/p>';const t=i.querySelector(".help-drawer-article h2")?.textContent?.trim();f&&t&&(f.textContent=t)}catch{i.innerHTML='

Help for this feature has not yet been written.<\/p>'}},k=()=>{n.classList.remove("help-open","help-collapsed"),c(!1)};window.PlotLineHelpDrawer={isActive(){return n.classList.contains("help-open")},open(n){return s(n)}};v(localStorage.getItem(t.width)||"25%");c(e(t.pinned));r(e(t.collapsed));document.addEventListener("plotline:help-more",n=>{const t=n.detail?.key||n.target?.dataset?.helpKey||"";window.PlotLineHelpPopovers?.hideAll();s(t)});document.addEventListener("click",n=>{const t=n.target instanceof Element?n.target.closest("[data-help-open]"):null;t&&(n.preventDefault(),window.PlotLineHelpPopovers?.hideAll(),s(t.dataset.helpOpen||""))});w?.addEventListener("click",k);h?.addEventListener("click",()=>r(!n.classList.contains("help-collapsed")));a?.addEventListener("click",()=>r(!1));a?.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),r(!1))});u?.addEventListener("click",()=>c(!e(t.pinned)));l?.addEventListener("pointerdown",t=>{if(n.classList.contains("help-open")&&!n.classList.contains("help-collapsed")){t.preventDefault();document.body.classList.add("help-resizing");l.setPointerCapture?.(t.pointerId);const i=t=>{const i=n.getBoundingClientRect(),r=(i.right-t.clientX)/i.width*100;v(r)},r=()=>{document.body.classList.remove("help-resizing"),document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",r)};document.addEventListener("pointermove",i);document.addEventListener("pointerup",r)}});const y=(()=>{try{return localStorage.getItem(t.key)||""}catch{return""}})();e(t.pinned)&&y&&s(y,{keepCollapsed:!0})}})();(()=>{const n=document.querySelectorAll(".scene-inspector-root");if(n.length){const t=n=>n.toLowerCase().replace(/&/g,"and").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");n.forEach(n=>{const o=n.dataset.sceneId||n.querySelector(".scene-inspector-form [name='SceneID']")?.value||"new",f=`plotline.inspector.${o}.`,s=new Set(["overview","timing","characters"]),u=[...n.querySelectorAll(".inspector-section")],r=n.querySelector(".scene-inspector-form"),i=n.querySelector("[data-scene-time-editor]");if(r&&i&&i.dataset.enhanced!=="true"){i.dataset.enhanced="true";const n=r.querySelector("[name='TimeModeID']"),e=i.dataset.exactDatetimeModeId||"",o=i.dataset.exactDateModeId||"",s=[...i.querySelectorAll("[data-time-part-field]")],h={StartDateTime:i.querySelector("[data-date-part-for='StartDateTime']"),EndDateTime:i.querySelector("[data-date-part-for='EndDateTime']")},c={StartDateTime:i.querySelector("[data-time-part-for='StartDateTime']"),EndDateTime:i.querySelector("[data-time-part-for='EndDateTime']")},l={StartDateTime:r.querySelector("input[type='hidden'][name='StartDateTime']"),EndDateTime:r.querySelector("input[type='hidden'][name='EndDateTime']")},t=()=>n?.value===e,a=()=>n?.value===o,u=()=>{const n=t();s.forEach(t=>{t.hidden=!n,t.classList.toggle("d-none",!n)})},f=n=>{const i=l[n],r=h[n]?.value||"",f=c[n]?.value||"";if(i){if(!r){i.value="";return}if(t()){i.value=`${r}T${f||"00:00"}`;return}if(a()){i.value=r;return}const u=i.value.match(/^\\d{4}-\\d{2}-\\d{2}T(\\d{2}:\\d{2})/)?.[1];i.value=u?`${r}T${u}`:r}},v=()=>{f("StartDateTime"),f("EndDateTime")};n?.addEventListener("change",u);r.addEventListener("submit",v);u()}u.forEach(n=>{if(n.dataset.enhanced!=="true"){const l=n.querySelector("h3, h2"),u=n.dataset.sectionTitle||l?.textContent?.trim()||"Overview",a=t(u),o=n.dataset.sectionId||`inspector-${a}`,e=o.replace(/^inspector-/,"");n.id=o;n.dataset.searchText=`${u} ${n.textContent}`.toLowerCase();n.dataset.enhanced="true";const r=document.createElement("div");for(r.className="inspector-accordion-body";n.firstChild;)r.appendChild(n.firstChild);const i=document.createElement("button");i.type="button";i.className="inspector-accordion-toggle";i.setAttribute("aria-expanded","false");n.append(i,r);const v=r.querySelectorAll(".asset-event-item, .thread-event-item, .warning-mini-card, .dependency-card, .metric-slider").length;i.innerHTML=`${u}${v||""}`;const h=localStorage.getItem(`${f}${e}`),c=h===null?s.has(e):h==="open";n.classList.toggle("is-open",c);i.setAttribute("aria-expanded",String(c));i.addEventListener("click",()=>{const t=!n.classList.contains("is-open");n.classList.toggle("is-open",t);i.setAttribute("aria-expanded",String(t));localStorage.setItem(`${f}${e}`,t?"open":"closed")})}});n.querySelectorAll(".inspector-nav-links a").forEach(t=>{t.addEventListener("click",i=>{const r=n.querySelector(t.getAttribute("href"));r&&(i.preventDefault(),r.classList.add("is-open"),r.querySelector(".inspector-accordion-toggle")?.setAttribute("aria-expanded","true"),r.scrollIntoView({behavior:"smooth",block:"start"}))})});const e=n.querySelector("[data-inspector-search]");if(e?.addEventListener("input",()=>{const n=e.value.trim().toLowerCase();u.forEach(t=>{const i=!n||t.dataset.searchText.includes(n);t.classList.toggle("is-filtered-out",!i);i&&n&&(t.classList.add("is-open"),t.querySelector(".inspector-accordion-toggle")?.setAttribute("aria-expanded","true"))})}),"IntersectionObserver"in window){const t=[...n.querySelectorAll(".inspector-nav-links a")],i=new IntersectionObserver(n=>{n.forEach(n=>{n.isIntersecting&&t.forEach(t=>{t.classList.toggle("active",t.getAttribute("href")===`#${n.target.id}`)})})},{root:n.closest(".scene-inspector-panel")||null,rootMargin:"-10% 0px -70% 0px"});u.forEach(n=>i.observe(n))}})}})();(()=>{const n=document.querySelectorAll("[data-metric-shape-chart]");if(n.length){const t=["#2f6f63","#b35f3b","#6750a4","#c58b2b","#7d3f52","#33759b","#9c4d8f","#a33d3d","#6f8f3d","#d08a2f","#444b57"],u=new Set(["Overall Intensity","Tension","Emotional Weight","Action"]),i=[],r=()=>{window.requestAnimationFrame(()=>{i.forEach(n=>n.resize())})};window.PlotLineMetricCharts={resizeAll:r};window.addEventListener("plotline:timeline-layout-changed",r);const f={id:"plotlineChapterGuides",afterDraw(n){const u=n.config.options.plugins.plotlineScenes||[],{ctx:t,chartArea:r,scales:f}=n;if(u.length&&f.x){t.save();t.strokeStyle="rgba(47, 111, 99, 0.16)";t.fillStyle="rgba(82, 75, 65, 0.58)";t.lineWidth=1;t.font="700 10px system-ui, -apple-system, Segoe UI, sans-serif";const e=[];u.forEach((n,t)=>{t&&n.chapterLabel===u[t-1].chapterLabel||e.push({scene:n,index:t})});const i=e.filter(n=>!n.scene.isPlaceholder),o=i.length>40?5:i.length>24?4:i.length>14?2:1;i.forEach((n,u)=>{const{scene:s,index:c}=n,e=f.x.getPixelForValue(c+.5);t.beginPath();t.moveTo(e,r.top);t.lineTo(e,r.bottom);t.stroke();const h=Number.parseInt(String(s.chapterLabel).replace(/[^0-9]/g,""),10),l=u===0||u===i.length-1||o===1||Number.isFinite(h)&&h%o==0;l&&t.fillText(s.chapterLabel,Math.min(e+4,r.right-70),r.bottom+22)});t.restore()}}};window.Chart&&Chart.register(f);n.forEach(n=>{const p=n.querySelector("script[type='application/json']"),o=n.querySelector("canvas"),w=n.querySelector("[data-metric-toggles]"),b=n.querySelector("[data-chart-fallback]"),k=n.querySelector("[data-timeline-metric-edit-toolbar]"),c=n.querySelector("[data-edit-metric-status]"),v=n.hasAttribute("data-timeline-metric-editor")&&k&&c;if(p&&o){let f;try{f=JSON.parse(p.textContent||"{}")}catch{b?.classList.remove("d-none");return}if(!window.Chart||!f.scenes?.length||!f.metrics?.length){b?.classList.remove("d-none");return}const tt=new Set(f.defaultMetrics?.length?f.defaultMetrics:u),s=f.scenes.length,it=s>80?10:s>40?5:s>24?4:s>14?2:1,l=f.metrics.map((n,i)=>{const u=new Map(n.points.map(n=>[n.sceneId,n.value])),r=t[i%t.length];return{label:n.metricName,metricTypeId:n.metricTypeId,minValue:Number.isFinite(n.minValue)?n.minValue:1,maxValue:Number.isFinite(n.maxValue)?n.maxValue:10,data:f.scenes.map((n,t)=>{const i=u.get(n.sceneId);return i==null?{x:t+.5,y:null,sceneId:n.sceneId}:{x:t+.5,y:i,sceneId:n.sceneId}}),borderColor:r,backgroundColor:r,pointBackgroundColor:r,pointBorderColor:"#fff",pointBorderWidth:1.5,pointRadius:3,pointHoverRadius:5,borderWidth:2,tension:.35,spanGaps:!0,hidden:!tt.has(n.metricName)}});let e=null,a=!1;const h=n=>{c&&(c.textContent=n)},d=()=>l.map((n,t)=>t).filter(n=>r?.isDatasetVisible(n)),g=()=>{const n=d();return n.length===1?n[0]:-1},nt=()=>{if(v){const n=g();l.forEach((t,i)=>{t.pointRadius=i===n?5:3,t.pointHoverRadius=i===n?7:5,t.borderWidth=i===n?3:2});const t=d(),i=n>=0;o.classList.toggle("metric-curve-editing",i);c.classList.toggle("d-none",t.length===0);t.length===0?h(""):i?h("Drag points up or down to edit this metric."):h("Show only one metric line to edit its curve.");r?.update()}};w.innerHTML="";l.forEach((n,t)=>{const u=`metric-toggle-${Math.random().toString(36).slice(2)}-${t}`,i=document.createElement("label");i.className="metric-toggle-pill";i.style.setProperty("--metric-colour",n.borderColor);i.innerHTML=`${n.label}`;w.appendChild(i);i.querySelector("input").addEventListener("change",n=>{r.setDatasetVisibility(t,n.target.checked),nt(),r.update()})});const r=new Chart(o,{type:"line",data:{datasets:l},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"nearest",intersect:!1},scales:{y:{min:1,max:10,ticks:{stepSize:1},grid:{color:"rgba(82, 75, 65, 0.10)"}},x:{type:"linear",min:0,max:s,bounds:"ticks",ticks:{maxRotation:0,autoSkip:!1,maxTicksLimit:16,callback(n){const t=Math.floor(Number(n));if(t<0||t>=s)return"";const i=f.scenes[t];return t!==0&&t!==s-1&&t%it!=0?"":i?.isPlaceholder?"":i?.axisLabel||""}},afterBuildTicks(n){n.ticks=f.scenes.map((n,t)=>({value:t+.5}))},grid:{display:!1}}},plugins:{legend:{display:!1},plotlineScenes:f.scenes,tooltip:{callbacks:{title(n){const i=Math.floor(n[0].parsed.x),t=f.scenes[i];return t.isPlaceholder?t.sceneTitle||"No scene":`${t.chapterLabel}, Scene ${t.sceneNumber}: ${t.sceneTitle}`},label(n){return`${n.dataset.label}: ${n.formattedValue}`},afterBody(n){const r=Math.floor(n[0].parsed.x),t=f.scenes[r],i=[];return t.characterPresence?i.push(t.characterPresence):t.characterAppears!==undefined&&i.push(t.characterAppears?"Character appears":"Character does not appear"),t.bookTitle&&i.push(t.bookTitle),i}}}}}}),rt=n=>{if(!v)return null;const u=g();if(u<0)return null;const f=r.getElementsAtEventForMode(n,"nearest",{intersect:!0},!0),t=f.find(n=>n.datasetIndex===u);if(!t)return null;const e=r.data.datasets[t.datasetIndex],i=e?.data?.[t.index];return!i?.sceneId||i.y==null?null:{datasetIndex:t.datasetIndex,pointIndex:t.index,previousValue:i.y}},ut=(n,t)=>{const i=r.scales.y.getValueForPixel(n.offsetY),u=Math.round(i);return Math.max(t.minValue,Math.min(t.maxValue,u))},ft=async t=>{const u=r.data.datasets[t.datasetIndex],i=u?.data?.[t.pointIndex];if(u&&i?.sceneId){const f=k?.querySelector("input[name='__RequestVerificationToken']")?.value||"";h("Saving...");try{const e=await fetch(n.dataset.updateUrl||"/SceneMetrics/UpdateSceneMetricValue",{method:"POST",headers:{"Content-Type":"application/json",RequestVerificationToken:f},body:JSON.stringify({sceneId:Number(i.sceneId),metricId:Number(u.metricTypeId),value:Number(i.y)})}),t=await e.json().catch(()=>({}));if(!e.ok||!t.success)throw new Error(t.message||"Save failed");i.y=t.value;h("Saved");r.update()}catch{i.y=t.previousValue;h("Save failed");r.update()}}};v&&(nt(),o.addEventListener("pointerdown",n=>{(e=rt(n),e)&&(n.preventDefault(),o.setPointerCapture?.(n.pointerId),a=!0)}),o.addEventListener("pointermove",n=>{if(e){const t=r.data.datasets[e.datasetIndex],i=t?.data?.[e.pointIndex];t&&i&&(i.y=ut(n,t),r.update("none"))}}),o.addEventListener("pointerup",async n=>{if(e){const t=e;e=null;o.releasePointerCapture?.(n.pointerId);await ft(t);window.setTimeout(()=>{a=!1},0)}}),o.addEventListener("pointercancel",n=>{if(e){const i=r.data.datasets[e.datasetIndex],t=i?.data?.[e.pointIndex];t&&(t.y=e.previousValue);e=null;o.releasePointerCapture?.(n.pointerId);a=!1;r.update()}}));o.addEventListener("click",n=>{if(a){n.preventDefault();return}const t=r.getElementsAtEventForMode(n,"nearest",{intersect:!0},!0);if(t.length){const i=r.data.datasets[t[0].datasetIndex]?.data?.[t[0].index],e=i?Math.floor(i.x):t[0].index,u=f.scenes[e];u?.timelineUrl&&(window.PlotLineTimelineScroll?.save(),window.location.href=u.timelineUrl)}});i.push(r);const y=window.ResizeObserver?new ResizeObserver(()=>r.resize()):null;y&&(y.observe(n),y.observe(n.querySelector(".metric-chart-frame")||n))}})}})();(()=>{const i=document.querySelector("[data-timeline-root]"),t=document.querySelector("[data-timeline-controls]");if(i&&t){const r="plotline.timeline.visibility",u={"scene-cards":!0,"plot-lines":!0,assets:!0,characters:!0,locations:!0,warnings:!0,metrics:!0},e=()=>{try{return{...u,...JSON.parse(localStorage.getItem(r)||"{}")}}catch{return{...u}}},f=n=>{Object.entries(n).forEach(([n,t])=>{i.classList.toggle(`hide-${n}`,!t),document.querySelectorAll(`[data-timeline-section='${n}']`).forEach(n=>{n.classList.toggle("timeline-section-hidden",!t)})}),document.querySelectorAll("[data-location-marker]").forEach(t=>{t.classList.toggle("timeline-section-hidden",!n.locations)}),document.querySelectorAll("[data-warning-marker]").forEach(t=>{t.classList.toggle("timeline-section-hidden",!n.warnings)}),document.querySelector("[data-visibility-json]")?.setAttribute("value",JSON.stringify(n))},n=e();t.querySelectorAll("[data-timeline-toggle]").forEach(t=>{const i=t.dataset.timelineToggle;t.checked=n[i]??!0;t.addEventListener("change",()=>{n[i]=t.checked,localStorage.setItem(r,JSON.stringify(n)),f(n)})});t.querySelector("[data-timeline-preset-form]")?.addEventListener("submit",()=>{document.querySelector("[data-visibility-json]")?.setAttribute("value",JSON.stringify(n))});f(n)}})();(()=>{const n=document.querySelector("[data-timeline-root]");if(n){const r=n.querySelector(".timeline-workspace")||n,h=document.querySelector("[data-timeline-density]"),e=document.querySelector("[data-timeline-zoom]"),t=document.querySelector("[data-timeline-search]"),c=n.querySelector("[data-timeline-minimap]"),et=document.querySelectorAll("[data-timeline-jump], [data-timeline-warning-jump], [data-timeline-entity-jump]"),ot=[...n.querySelectorAll(".timeline-scene-card[data-scene-id]")],l="plotline.timeline.collapsed",g="plotline.timeline.density",nt="plotline.timeline.zoom",o="plotline.timeline.pending-scroll",tt="plotline.timeline.horizontalScrollHint.seen",a="plotline.timeline.inspectorWidth",st=".timeline-shell,.plot-lane-board,.asset-lane-board,.character-lane-board,.metric-graph-stack,[data-timeline-minimap]",it=["compact","comfortable","expanded"],s=["book","chapter","scene-detail"],v=n.querySelector("[data-inspector-drawer]"),i=n.querySelector("[data-inspector-resizer]"),ht=n.querySelector("[data-inspector-close]"),ct=n=>{try{return new Set(JSON.parse(localStorage.getItem(n)||"[]"))}catch{return new Set}},lt=localStorage.getItem(l)!==null,u=ct(l),y=()=>[...n.querySelectorAll(st)],at=()=>{const n=document.querySelector("[data-timeline-scroll-hint]");if(n){const o=n.querySelector("[data-timeline-scroll-hint-dismiss]"),s=()=>{try{return localStorage.getItem(tt)==="true"}catch{return!1}},i=()=>{n.hidden=!0;try{localStorage.setItem(tt,"true")}catch{}};if(s()){n.hidden=!0;return}n.hidden=!1;o?.addEventListener("click",i);let u=!1;window.setTimeout(()=>{u=!0,e.forEach(t)},800);const f=new WeakMap,t=n=>f.set(n,n.scrollLeft),h=n=>{if(!u){t(n);return}const r=f.get(n)??n.scrollLeft;if(Math.abs(n.scrollLeft-r)>4){i();return}t(n)},e=[r,...y()];e.forEach(n=>{t(n),n.addEventListener("wheel",t=>{t.shiftKey&&Math.abs(t.deltaY)>Math.abs(t.deltaX)&&(t.preventDefault(),n.scrollLeft+=t.deltaY,i())},{passive:!1}),n.addEventListener("scroll",()=>h(n),{passive:!0})})}},vt=()=>{const t=n.getBoundingClientRect().width||window.innerWidth,i=Math.min(420,Math.max(320,t-360)),r=Math.max(i,Math.min(t*.65,t-420));return{minimum:i,maximum:r,defaultWidth:Math.max(i,Math.min(r,t*.4))}},p=t=>{if(v){const{minimum:i,maximum:r,defaultWidth:u}=vt(),f=Math.max(i,Math.min(r,Number(t)||u));n.style.setProperty("--timeline-inspector-width",`${Math.round(f)}px`)}};v&&(p(localStorage.getItem(a)),window.addEventListener("resize",()=>p(localStorage.getItem(a))));at();i?.addEventListener("pointerdown",t=>{t.preventDefault();document.body.classList.add("timeline-inspector-resizing");i.setPointerCapture(t.pointerId);const u=t=>{const i=n.getBoundingClientRect().right,r=i-t.clientX;p(r)},r=()=>{document.body.classList.remove("timeline-inspector-resizing");const n=Math.round(v?.getBoundingClientRect().width||0);n>0&&localStorage.setItem(a,String(n));window.dispatchEvent(new Event("plotline:timeline-layout-changed"));i.removeEventListener("pointermove",u);i.removeEventListener("pointerup",r);i.removeEventListener("pointercancel",r)};i.addEventListener("pointermove",u);i.addEventListener("pointerup",r);i.addEventListener("pointercancel",r)});ht?.addEventListener("click",n=>{n.preventDefault();const t=new URL(window.location.href),i=t.searchParams.get("FocusType")||t.searchParams.get("focusType");t.searchParams.delete("SelectedSceneID");t.searchParams.delete("selectedSceneId");t.searchParams.delete("selectedsceneid");i&&i.toLowerCase()!=="scene"||(t.searchParams.delete("FocusType"),t.searchParams.delete("focusType"),t.searchParams.delete("FocusID"),t.searchParams.delete("focusId"));w();window.location.href=t.toString()});const w=()=>{try{sessionStorage.setItem(o,JSON.stringify({path:window.location.pathname,top:window.scrollY,left:window.scrollX,workspaceLeft:r.scrollLeft,workspaceTop:r.scrollTop,containers:y().map((n,t)=>({index:t,left:n.scrollLeft,top:n.scrollTop}))}))}catch{}},yt=()=>{let n=null;try{n=JSON.parse(sessionStorage.getItem(o)||"null");sessionStorage.removeItem(o)}catch{try{sessionStorage.removeItem(o)}catch{}return}n&&n.path===window.location.pathname&&window.requestAnimationFrame(()=>{r.scrollLeft=Number(n.workspaceLeft)||0;r.scrollTop=Number(n.workspaceTop)||0;const t=y();(n.containers||[]).forEach(n=>{const i=t[n.index];i&&(i.scrollLeft=Number(n.left)||0,i.scrollTop=Number(n.top)||0)});window.scrollTo(Number(n.left)||0,Number(n.top)||0)})};window.PlotLineTimelineScroll={save:w};const rt=(t,i,r)=>{r.forEach(i=>n.classList.remove(`${t}-${i}`)),n.classList.add(`${t}-${i}`)},ut=n=>{const t=it.includes(n)?n:"comfortable";rt("density",t,it);h&&(h.value=t);localStorage.setItem(g,t);window.requestAnimationFrame(f)},b=n=>{const t=s.includes(n)?n:"chapter";rt("zoom",t,s);e&&(e.value=t);localStorage.setItem(nt,t);window.requestAnimationFrame(f)},pt=t=>n.querySelector(`[data-scene-id='${CSS.escape(String(t))}']`),k=(n,t=true)=>{const i=pt(n);i&&(i.classList.add("keyboard-focus"),i.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}),t&&i.focus({preventScroll:!0}),window.setTimeout(()=>i.classList.remove("keyboard-focus"),1800))},wt=(n="auto")=>{const r=c?.querySelector("[data-active-chapter='true']");if(c&&r){const t=c.getBoundingClientRect(),i=r.getBoundingClientRect(),u=i.left+i.width/2,f=t.left+t.width/2;(i.leftt.right)&&c.scrollBy({left:u-f,behavior:n})}},bt=()=>localStorage.setItem(l,JSON.stringify([...u])),f=()=>{n.querySelectorAll("[data-plot-line-svg-board]").forEach(n=>{const i=n.querySelector("[data-plot-line-svg]");if(i){i.replaceChildren();const u=n.getBoundingClientRect(),o=Math.max(n.scrollWidth,u.width),s=Math.max(n.scrollHeight,u.height);i.setAttribute("viewBox",`0 0 ${o} ${s}`);i.setAttribute("width",String(o));i.setAttribute("height",String(s));const t=(n,t={})=>{const i=document.createElementNS("http://www.w3.org/2000/svg",n);return Object.entries(t).forEach(([n,t])=>i.setAttribute(n,String(t))),i},h=n=>{const t=n.getBoundingClientRect();return t.top-u.top+t.height/2},y=(n,t)=>{const i=t.closest("[data-plot-line-slot]");if(!i)return null;const r=i.getBoundingClientRect();return{x:r.left-u.left+r.width/2,y:h(n),sceneIndex:0,type:(t.dataset.plotEventType||"Progress").toLowerCase(),targetPlotLineId:t.dataset.targetPlotLineId||"",targetPlotLineIds:(t.dataset.targetPlotLineIds||"").split(",").map(n=>n.trim()).filter(Boolean)}},c=[...new Set([...n.querySelectorAll("[data-plot-line-slot]")].map(n=>{const t=n.getBoundingClientRect();return Math.round(t.left-u.left+t.width/2)}))].sort((n,t)=>n-t),l=Math.max(c.length-1,0),f=new Map;n.querySelectorAll("[data-plot-line-row]").forEach(n=>{n.dataset.plotLineId&&f.set(n.dataset.plotLineId,n)});const r=[...f.values()].map(n=>({row:n,plotLineId:n.dataset.plotLineId,colour:n.dataset.plotColour||"#2f6f63",points:[...n.querySelectorAll("[data-plot-event-node]")].map(t=>y(n,t)).filter(Boolean).map(n=>({...n,sceneIndex:Math.max(0,c.findIndex(t=>t===Math.round(n.x)))})).sort((n,t)=>n.x-t.x),incomingStartXs:[]})),a=new Map(r.map(n=>[n.plotLineId,n])),p=n=>{const t=n.some(n=>n.type==="resolve"),i=n.some(n=>n.type==="abandon"),u=n.find(n=>n.type==="resolve"),c=n.find(n=>n.type==="abandon"),f=n.some(n=>n.type==="merge"&&n.targetPlotLineId),e=n.some(n=>n.type==="split"&&n.targetPlotLineIds.length>=2),a=Boolean(u)&&n.some(n=>n.type==="branch"&&n.targetPlotLineId&&n.sceneIndex>=u.sceneIndex),o=n.reduce((n,t)=>Math.max(n,t.sceneIndex),0),s=!t&&!i&&l-o>=10,v=!t&&!i&&!f&&!e&&l>=o,h=t&&!f&&!e&&!a;let r="active";return i?r="abandoned":t?r=h?"questionable":"resolved":s&&(r="neglected"),{state:r,isNeglected:s,isDangling:v,isQuestionable:h,isAbandoned:i,resolvePoint:u,abandonPoint:c}},w=(n,r,u)=>{const f=t("g",{"class":`plot-event-svg-node plot-event-svg-node-${n.type} plotline-state-${u}`}),e=n.type==="branch"||n.type==="split"||n.type==="merge";n.type==="twist"?f.append(t("path",{d:`M ${n.x} ${n.y-9} L ${n.x+9} ${n.y} L ${n.x} ${n.y+9} L ${n.x-9} ${n.y} Z`,fill:r})):n.type==="abandon"?(f.append(t("circle",{cx:n.x,cy:n.y,r:9,fill:"#fff5f5"})),f.append(t("line",{x1:n.x-7,y1:n.y-7,x2:n.x+7,y2:n.y+7})),f.append(t("line",{x1:n.x+7,y1:n.y-7,x2:n.x-7,y2:n.y+7}))):n.type==="reveal"?f.append(t("path",{d:`M ${n.x} ${n.y-10} L ${n.x+3} ${n.y-3} L ${n.x+10} ${n.y-3} L ${n.x+4} ${n.y+2} L ${n.x+6} ${n.y+10} L ${n.x} ${n.y+5} L ${n.x-6} ${n.y+10} L ${n.x-4} ${n.y+2} L ${n.x-10} ${n.y-3} L ${n.x-3} ${n.y-3} Z`,fill:r})):(f.append(t("circle",{cx:n.x,cy:n.y,r:e?9:7.5,fill:r})),n.type==="resolve"&&f.append(t("circle",{cx:n.x,cy:n.y,r:12,fill:"none",stroke:r})),e&&f.append(t("circle",{cx:n.x,cy:n.y,r:13,fill:"none",stroke:r})));i.append(f)},e=(n,r,u,f=0)=>{const e=13+f*15,o=t("g",{"class":`plotline-health-marker plotline-health-marker-${r}`}),s=t("title");if(s.textContent=u,o.append(s),r==="questionable"){o.append(t("circle",{cx:n.x+e,cy:n.y-10,r:7}));const i=t("text",{x:n.x+e,y:n.y-6,"text-anchor":"middle"});i.textContent="?";o.append(i)}else o.append(t("path",{d:`M ${n.x+e} ${n.y-18} L ${n.x+e+8} ${n.y-3} L ${n.x+e-8} ${n.y-3} Z`})),o.append(t("line",{x1:n.x+e,y1:n.y-13,x2:n.x+e,y2:n.y-8})),o.append(t("circle",{cx:n.x+e,cy:n.y-5.6,r:1.3}));i.append(o)},v=(n,r,u,f)=>{if(!r){window.console?.warn&&window.console.warn(`Plot line ${f} connector skipped because target plot line data is missing.`);return}const e={x:n.x,y:h(r)},o=Math.max(28,Math.min(46,Math.abs(e.y-n.y)*.28)),c=n.x+o,s=n.x+o/2;i.append(t("path",{"class":`plot-line-svg-connector plot-line-svg-connector-${f}`,d:`M ${n.x} ${n.y} C ${s} ${n.y}, ${s} ${e.y}, ${c} ${e.y}`,stroke:u}))};r.forEach(n=>{n.points.forEach(n=>{n.type==="branch"&&n.targetPlotLineId&&a.get(n.targetPlotLineId)?.incomingStartXs.push(n.x),n.type==="split"&&n.targetPlotLineIds.forEach(t=>{a.get(t)?.incomingStartXs.push(n.x)})})});r.forEach(n=>{n.health=p(n.points),n.state=n.health.state});r.forEach(n=>{const{colour:f,points:r,incomingStartXs:u,state:e}=n;if(r.length>0){const c=r.find(n=>n.type==="start"),s=u.length?Math.min(...u):null,l=r.find(n=>n.type==="split"||n.type==="merge"),o=r[0],v=r[r.length-1],a=s!==null&&!(c&&c.xa&&i.append(t("path",{"class":`plot-line-svg-path plotline-state-${e}`,d:`M ${a} ${o.y} L ${h} ${o.y}`,stroke:f}))}});r.forEach(({points:t,colour:n})=>{t.forEach(t=>{(t.type==="branch"||t.type==="merge")&&v(t,f.get(t.targetPlotLineId),n,t.type),t.type==="split"&&t.targetPlotLineIds.length>=2?t.targetPlotLineIds.forEach(i=>{v(t,f.get(i),n,t.type)}):t.type==="split"&&t.targetPlotLineIds.length>0&&window.console?.warn&&window.console.warn("Plot line split connector skipped because fewer than two targets are available.")})});r.forEach(({points:t,colour:n,state:i})=>{t.forEach(t=>{w(t,n,i)})});r.forEach(n=>{const t=n.lineEndPoint||n.points[n.points.length-1];let i=0;n.health?.isNeglected&&t&&e(t,"neglected","No plot event for 10+ scenes. This thread may have been forgotten.",i++);n.health?.isDangling&&t&&e(t,"dangling","This plot line is still unresolved at the end of the current timeline.",i++);n.health?.isQuestionable&&n.health.resolvePoint&&e(n.health.resolvePoint,"questionable","Resolved without merge, split, or branch. Verify this thread has sufficient payoff.");n.health?.isAbandoned&&n.health.abandonPoint&&e(n.health.abandonPoint,"abandoned","This plot line was abandoned. Check this is intentional.")})}})},ft=(n,t)=>{document.querySelectorAll(`[data-collapse-body='${CSS.escape(n)}']`).forEach(n=>{n.classList.toggle("timeline-section-collapsed",t)}),document.querySelectorAll(`[data-collapse-toggle='${CSS.escape(n)}']`).forEach(n=>{n.classList.toggle("is-collapsed",t),n.setAttribute("aria-expanded",String(!t))})};document.querySelectorAll("[data-collapse-toggle]").forEach(n=>{const t=n.dataset.collapseToggle;lt||n.dataset.collapseDefault!=="collapsed"||u.add(t);const i=u.has(t);ft(t,i);n.addEventListener("click",()=>{const n=!u.has(t);n?u.add(t):u.delete(t);ft(t,n);bt();f();window.dispatchEvent(new Event("plotline:timeline-layout-changed"))})});h?.addEventListener("change",()=>ut(h.value));e?.addEventListener("change",()=>b(e.value));ut(localStorage.getItem(g)||"comfortable");b(localStorage.getItem(nt)||"chapter");const kt=(()=>{try{return sessionStorage.getItem(o)!==null}catch{return!1}})();window.requestAnimationFrame(()=>{f(),wt("auto"),kt&&yt()});window.addEventListener("resize",f);window.addEventListener("plotline:timeline-layout-changed",f);const dt=t=>{if(t.button===0&&!t.metaKey&&!t.ctrlKey&&!t.shiftKey&&!t.altKey){const r=t.target instanceof Element?t.target:null,i=r?.closest("a[href]");if(i&&n.contains(i)){const u=new URL(i.href,window.location.href);[...u.searchParams.keys()].some(n=>n.toLowerCase()==="selectedsceneid")&&w()}}};n.addEventListener("click",dt,{capture:!0});const d=()=>{const n=t?.value.trim().toLowerCase()||"";let i=null;return ot.forEach(t=>{const r=!n||(t.dataset.timelineSearchText||"").toLowerCase().includes(n);t.classList.toggle("search-hit",Boolean(n&&r));t.classList.toggle("search-dim",Boolean(n&&!r));!i&&n&&r&&(i=t)}),i};t?.addEventListener("input",d);t?.addEventListener("keydown",n=>{if(n.key==="Enter"){const t=d();t&&(n.preventDefault(),k(t.dataset.sceneId))}});et.forEach(n=>{n.addEventListener("change",()=>{n.value&&k(n.value)})});document.querySelectorAll("[data-jump-scene]").forEach(n=>{n.addEventListener("click",()=>{n.dataset.jumpScene&&k(n.dataset.jumpScene)})});document.addEventListener("keydown",n=>{const i=document.activeElement?.tagName?.toLowerCase(),u=["input","select","textarea"].includes(i)||document.activeElement?.isContentEditable;if((n.ctrlKey||n.metaKey)&&n.key.toLowerCase()==="f"&&t){n.preventDefault();t.focus();t.select();return}if(n.key==="Escape"){const n=new URL(window.location.href),i=n.searchParams.has("FocusType")||n.searchParams.has("FocusID");n.searchParams.delete("FocusType");n.searchParams.delete("FocusID");i?window.location.href=n.toString():t?.value&&(t.value="",d());return}if(!u){if(n.key==="ArrowLeft"||n.key==="ArrowRight"){n.preventDefault();r.scrollBy({left:n.key==="ArrowLeft"?-260:260,behavior:"smooth"});return}if(n.key==="+"||n.key==="="||n.key==="-"){const t=s.indexOf(e?.value||"chapter"),i=n.key==="-"?-1:1,r=Math.min(s.length-1,Math.max(0,t+i));b(s[r])}}})}})();(()=>{const e=document.querySelector("[data-timeline-root]"),t=document.querySelector("[data-drag-drop-panel]");if(t){const i=new Map([...document.querySelectorAll("[data-drag-form]")].map(n=>[n.dataset.dragForm,n])),g=t.querySelector("[data-drag-panel-title]"),nt=t.querySelector("[data-drag-panel-kicker]"),tt=t.querySelector("[data-drag-panel-summary]"),o=document.querySelector("[data-scene-move-modal]"),v=o&&window.bootstrap?.Modal?window.bootstrap.Modal.getOrCreateInstance(o):null,y=o?.querySelector("[data-scene-move-title]"),p=o?.querySelector("[data-scene-move-summary]"),w=o?.querySelector("[data-scene-move-submit]"),s="plotline.timeline.scroll";let h=null,c=0;const n=(n,t,i)=>{const r=n?.querySelector(`[name='${CSS.escape(t)}']`);r&&(r.value=i??"")},l=n=>n?.selectedOptions?.[0]?.textContent?.trim()||"",a=n=>`“${n||"this scene"}”`,b=(n,t,i,r,u)=>t&&i&&t===i?`Move ${a(n.label)} to this new position within ${i}?`:t&&i?`Move ${a(n.label)} from ${t} to ${i}?`:`Move ${a(n.label)} ${r.toLowerCase()} ${u}?`,r=(n,r,u,f)=>{if(n==="scene"){t.classList.add("d-none");t.querySelectorAll("[data-drag-form]").forEach(n=>n.classList.add("d-none"));i.get("scene")?.classList.remove("d-none");y&&(y.textContent=r);p&&(p.textContent=u);w&&w.classList.toggle("d-none",r.toLowerCase().startsWith("cannot")||r.toLowerCase().startsWith("scene already"));v?v.show():t.classList.remove("d-none");return}i.forEach((t,i)=>t.classList.toggle("d-none",i!==n));t.classList.remove("d-none");g.textContent=r;nt.textContent=f;tt.textContent=u;t.scrollIntoView({behavior:"smooth",block:"center"})},it=()=>{t.classList.add("d-none"),i.forEach(n=>n.classList.add("d-none"))},k=()=>{document.querySelectorAll(".drop-target-active, .drop-before, .drop-after, .chapter-drop-active, .drop-chapter-end").forEach(n=>n.classList.remove("drop-target-active","drop-before","drop-after","chapter-drop-active","drop-chapter-end"))},rt=()=>{const n=e?.querySelector(".timeline-shell");try{sessionStorage.setItem(s,JSON.stringify({left:n?.scrollLeft||0,top:window.scrollY||0}))}catch{}};try{const n=JSON.parse(sessionStorage.getItem(s)||"null");n&&(sessionStorage.removeItem(s),requestAnimationFrame(()=>{const t=e?.querySelector(".timeline-shell");t&&(t.scrollLeft=n.left||0);window.scrollTo({top:n.top||0})}))}catch{sessionStorage.removeItem(s)}const f=n=>{try{const t=JSON.parse(n.dataTransfer.getData("application/json")||"{}");return t.type?t:h||{}}catch{return h||{}}},ut=(n,t)=>{const i={type:t.dataset.dragType,id:t.dataset.dragId,label:t.dataset.dragLabel||t.textContent.trim()};n.dataTransfer.effectAllowed="copyMove";n.dataTransfer.setData("application/json",JSON.stringify(i));n.dataTransfer.setData("text/plain",`${i.type}:${i.id}`);h=i;document.body.classList.add("drag-active",`dragging-${i.type}`);t.classList.add("is-dragging")};document.querySelectorAll("[data-drag-type][draggable='true']").forEach(n=>{n.addEventListener("dragstart",t=>ut(t,n)),n.addEventListener("dragend",()=>{n.classList.remove("is-dragging"),document.body.classList.remove("drag-active","dragging-scene","dragging-character","dragging-asset","dragging-location"),h=null,k()})});t.querySelectorAll("[data-drag-cancel]").forEach(n=>n.addEventListener("click",it));i.get("scene")?.addEventListener("submit",rt);e?.querySelectorAll(".timeline-scene-card[data-scene-id]").forEach(t=>{t.addEventListener("click",n=>{Date.now(){const i=f(n);["scene","character","asset"].includes(i.type)&&(n.preventDefault(),n.stopPropagation(),n.dataTransfer.dropEffect=i.type==="scene"?"move":"copy",t.classList.add("drop-target-active"),t.classList.toggle("drop-before",i.type==="scene"&&n.offsetX=t.clientWidth/2))}),t.addEventListener("dragleave",()=>t.classList.remove("drop-target-active","drop-before","drop-after")),t.addEventListener("drop",u=>{const o=f(u);if(["scene","character","asset"].includes(o.type)){u.preventDefault();u.stopPropagation();c=Date.now()+800;t.classList.remove("drop-target-active","drop-before","drop-after");const s=t.dataset.sceneId;if(o.type==="scene"){if(o.id===s){r("scene","Cannot move scene","Drop a scene before or after a different scene.","Scene move");return}const f=i.get("scene"),h=u.offsetX{const u=t.closest("[data-chapter-drop-target]"),o=t.dataset.chapterId||u?.dataset.chapterId,s=t.dataset.chapterLabel||u?.dataset.chapterLabel||"this chapter";t.addEventListener("dragover",n=>{const i=f(n);i.type==="scene"&&o&&(n.target.closest(".timeline-scene-card[data-scene-id]")||(n.preventDefault(),n.dataTransfer.dropEffect="move",t.classList.add("drop-target-active","drop-chapter-end"),u?.classList.add("chapter-drop-active")))});t.addEventListener("dragleave",n=>{t.contains(n.relatedTarget)||(t.classList.remove("drop-target-active","drop-chapter-end"),u?.classList.remove("chapter-drop-active"))});t.addEventListener("drop",u=>{const h=f(u);if(h.type==="scene"&&o&&!u.target.closest(".timeline-scene-card[data-scene-id]")){u.preventDefault();u.stopPropagation();c=Date.now()+800;k();const a=e.querySelector(`.timeline-scene-card[data-scene-id='${CSS.escape(h.id)}']`);if(a?.dataset.chapterId===o&&t.lastElementChild?.dataset?.sceneId===h.id){r("scene","Scene already here",`${h.label} is already at the end of ${s}.`,"Scene move");return}const l=i.get("scene");n(l,"SceneID",h.id);n(l,"AnchorSceneID","");n(l,"TargetChapterID",o);n(l,"Position","End");r("scene","Move Scene?",b(h,a?.dataset.chapterLabel||"",s,"After",s),"Scene move")}})});const u=i.get("asset-dependency"),d=()=>{const n=u?.dataset.sourceLabel||"Source asset",i=u?.dataset.targetLabel||"Target asset",f=l(u?.querySelector("[name='AssetDependencyTypeID']"))||"Requires",e=l(u?.querySelector("[name='SourceRequiredStateID']"))||"the required state",o=l(u?.querySelector("[name='TargetBlockedStateID']"))||"the blocked state",r=t.querySelector("[data-asset-dependency-preview]");r&&(r.textContent=`${n} ${f.toLowerCase()} ${i}. ${n} should be ${e} before ${i} can be ${o}.`)};u?.querySelectorAll("select").forEach(n=>n.addEventListener("change",d));document.querySelectorAll("[data-asset-drop-target], .drag-chip.asset").forEach(t=>{t.addEventListener("dragover",n=>{const i=f(n);i.type==="asset"&&(n.preventDefault(),n.dataTransfer.dropEffect="copy",t.classList.add("drop-target-active"))}),t.addEventListener("dragleave",()=>t.classList.remove("drop-target-active")),t.addEventListener("drop",i=>{const e=f(i),o=t.dataset.assetId||t.dataset.dragId,s=t.dataset.assetLabel||t.dataset.dragLabel||t.textContent.trim();if(e.type==="asset"&&o){if(i.preventDefault(),t.classList.remove("drop-target-active"),e.id===o){r("asset-dependency","Cannot create dependency","Drop one asset onto a different asset.","Asset dependency");return}n(u,"SourceAssetID",e.id);n(u,"TargetAssetID",o);u.dataset.sourceLabel=e.label;u.dataset.targetLabel=s;d();r("asset-dependency","Create asset dependency",`${e.label} -> ${s}`,"Asset dependency")}})});document.querySelectorAll("[data-drag-type='location']").forEach(t=>{t.addEventListener("dragover",n=>{const i=f(n);i.type==="location"&&(n.preventDefault(),n.dataTransfer.dropEffect="copy",t.classList.add("drop-target-active"))}),t.addEventListener("dragleave",()=>t.classList.remove("drop-target-active")),t.addEventListener("drop",u=>{const e=f(u),o=t.dataset.dragId,h=t.dataset.dragLabel||t.textContent.trim();if(e.type==="location"){if(u.preventDefault(),t.classList.remove("drop-target-active"),e.id===o){r("location-relationship","Cannot create relationship","Drop one location onto a different location.","Location relationship");return}const s=i.get("location-relationship");n(s,"FromLocationID",e.id);n(s,"ToLocationID",o);r("location-relationship","Create location relationship",`${e.label} -> ${h}`,"Location drop")}})})}})(); \ No newline at end of file