/* NedStory airy theme: presentation only; existing canvas and print geometry retained. */
:root{--ink:#203f53;--muted:#657079;--line:#dce0dc;--paper:#f3eddf;--surface:#fff;--note-tint:#faf8f2;--note-tint-strong:#f3eddf;--shadow:0 15px 35px #203f5314;font-family:'Lexend Deca',sans-serif}
h1,h2,h3{font-family:Fraunces,Georgia,serif;font-weight:600;line-height:1.2}
button,input,textarea,select{font-family:'Lexend Deca',sans-serif}
@media screen{
body,.workspace,.canvas-wrap{background:#fff}
.app-bar{background:#fff;color:var(--ink);border-bottom:1px solid #e9e7e1;box-shadow:none}
.app-bar .eyebrow,.app-bar .brand-name,.app-bar .brand-copy{color:var(--muted)}
.workspace-tabs,.fidelity-switch{background:#f7f8f6;border-color:#dce0dc}
.workspace-tab{color:var(--muted);font-weight:500}.workspace-tab.active{background:#203f53;color:#fff}
.button{font-weight:500;border:1px solid transparent}.button-quiet{background:#fff;color:var(--ink);border-color:#d4d9d9}.button-quiet:hover{background:#edf1f1}
.button-primary{background:#203f53;color:#fff}.button-primary:hover{background:#31576d}
.page-rail{background:#fafbf9;border-right:1px solid #e9e7e1}.icon-button{background:#e9eeeb;color:var(--ink)}
.canvas-wrap{padding-top:30px}.canvas-topline{margin-bottom:20px}h1{font-size:28px}
.storyboard-page{position:relative;border-radius:28px;background:#f3eddf;box-shadow:var(--shadow);padding:34px 38px 38px}
.storyboard-page::before{content:'';position:absolute;inset:13px;border:1.5px dashed #bac0b9;border-radius:18px;pointer-events:none}
.page-header{border-bottom:1px dashed #bac0b9;padding-bottom:18px;margin-bottom:22px}.field-title input{font-family:Fraunces,Georgia,serif;font-weight:600}
.story-panel{border-color:#d4d6d0;box-shadow:0 3px 10px #203f5309}.field span,.panel-fields label>span{color:var(--muted);font-weight:500}
.ai-dock{background:#fff;border-top:1px solid #e9e7e1}.character-library,.reference-library,.story-context{background:#fafbf9;border-color:#dce0dc;border-radius:14px}
.recent-overlay{background:#fff;backdrop-filter:none}.recent-dialog{background:#f3eddf;border:1.5px dashed #bac0b9;outline:12px solid #f3eddf;border-radius:24px;box-shadow:var(--shadow)}
.recent-hero{background:#fff;border-bottom:1px dashed #bac0b9;padding:26px 28px}.recent-hero h1{font-size:30px}.recent-sidebar{background:#f3eddf;border-right:1px dashed #bac0b9}.recent-list{background:#f3eddf}.recent-card{background:#fff;border-color:#dce0dc;box-shadow:none}.recent-card strong{font-family:Fraunces,Georgia,serif;font-size:18px;font-weight:600}.recent-card:hover,.recent-card:focus-visible{border-color:#203f53;box-shadow:0 5px 18px #203f5310}.recent-meta{line-height:1.6}.recent-list::after{background:none}
.script-workspace{background:#fff}.script-draft-card textarea{font-family:'Lexend Deca',sans-serif}
}
@media screen{.brand-nedstory .brand-logo{content:url('/scripts/ned-brand.png')}}
/* Library layout mirrors the Scripts project browser. */
@media screen{
.recent-overlay{display:block;padding:48px max(28px,calc((100vw - 1040px)/2));overflow:auto}
.recent-dialog{width:100%;height:auto;min-height:0;display:block;overflow:visible;background:white;border:0;outline:0;box-shadow:none;border-radius:0}
.recent-hero{display:flex;flex-direction:column;gap:28px;padding:0 0 28px;border:0;background:white}
.brand-nedstory .recent-logo{width:320px;max-width:100%;height:54px}.recent-hero h1{font-size:clamp(38px,5vw,60px);margin:12px 0 18px}.recent-hero p{font-size:16px;line-height:1.7;color:var(--muted)}
.recent-body{display:block;background:#f3eddf;border:1.5px dashed #bac0b9;border-radius:24px;padding:28px}
.recent-sidebar{padding:0 0 24px;display:flex;flex-direction:row;flex-wrap:wrap;border:0;background:transparent;align-items:center;gap:12px}.recent-sidebar .button{width:auto;padding:10px 16px;min-height:40px}.recent-sidebar p{width:100%;margin:4px 0 0;font-size:12px}
.recent-list{padding:0;overflow:visible;gap:16px;background:transparent}.recent-card{padding:20px;border:0;border-radius:14px}.recent-card strong{font-size:23px}.recent-card-preview{border:0;background:#f7f6f1;box-shadow:none}.recent-card-preview span,.recent-card-preview span.filled{border:0;background:#dce5e3}.recent-meta{gap:10px;margin-top:6px}
.page-rail{border:0;background:#fff}.page-thumb{border:0;padding:10px;border-radius:14px;color:var(--muted)}.page-thumb.active{background:#f3eddf;box-shadow:none;color:var(--ink)}.thumb-sheet{border-radius:7px;background:#faf9f5;box-shadow:none;gap:4px;padding:7px}.thumb-sheet span,.thumb-sheet span.filled{border:0;border-radius:2px;background:#e2e9e6}.page-thumb.active .thumb-sheet span.filled{background:#bccfc8}
.page-header{border:0;padding-bottom:8px}.field input{border-bottom-color:transparent}.field input:hover{border-bottom-color:#bac0b9}.story-panel{border:0;box-shadow:none}.panel-image{border:0}.panel-fields,.panel-fields label,.panel-fields label+label{background:#fff}.panel-fields label{padding:12px}.panel-fields label+label,.panel-continuity-controls,.panel-fields .panel-prompt-field{border:0}.panel-grid{gap:24px}.story-panel.selected{box-shadow:0 0 0 2px #e4a13b}
}
.story-panel.prompts-collapsed .panel-continuity-controls{display:none}
.ned-wordmark{display:inline-flex;align-items:baseline;white-space:nowrap;text-decoration:none;color:#203f53;font:600 23px/1.7 'Lexend Deca',sans-serif}.ned-name>span{font-weight:300}.ned-fish{width:55px;height:42px;flex-shrink:0;align-self:center;margin:0 12px;background:url('/scripts/ned-brand.png') no-repeat -119px -3px;background-size:294px 48px}.ned-product{font-size:17px;line-height:1;font-weight:600;letter-spacing:2px;color:#657079}
@media screen{.app-bar .brand{display:flex;flex-direction:column;align-items:flex-start;gap:0}.app-bar{height:auto;min-height:82px;grid-template-columns:minmax(375px,1fr) auto auto minmax(210px,1fr);gap:12px;padding-block:10px}.app-bar .brand-copy{display:flex;align-items:baseline;gap:7px}.app-bar .save-status-label{font-size:8px}.app-bar #saveStatus{font-size:9px}.recent-hero>.ned-wordmark{margin-bottom:4px}@media(max-width:1150px){.app-bar{grid-template-columns:1fr auto auto}.app-bar .brand{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between}}}
@media screen{
#storyboardPageStack{display:flex;flex-direction:column;gap:38px}.storyboard-page{scroll-margin-top:110px}.page-preview .print-copy{white-space:pre-wrap;font-size:13px;line-height:1.6;min-height:48px}.page-preview .print-value{font-size:12px;line-height:1.5}.page-preview .field-title .print-value{font:600 17px Fraunces,Georgia,serif}.page-edit-button{display:block;margin:0 0 18px auto}.ai-dock{display:block;margin:0 24px 28px;padding:0;border:1px solid #e0e4df;border-radius:16px;background:#fff;align-self:start}.assistant-toggle{cursor:pointer;padding:20px 24px;font:600 20px Fraunces,Georgia,serif;color:#203f53}.assistant-toggle span{float:right;font:400 12px 'Lexend Deca',sans-serif;color:#657079}.assistant-content{padding:20px 24px;display:grid;gap:20px}.ai-dock:not([open])>.assistant-content{display:none}.ai-dock[open] .assistant-toggle span{display:none}
}
@media print{#storyboardPageStack{display:none!important}}
.library-selector{display:inline-flex;gap:4px;padding:5px;border:1px solid #d9dfdc;border-radius:14px;background:#f7f9f7;align-self:flex-start;white-space:nowrap}.library-selector a{display:block;padding:12px 20px;border-radius:10px;color:#657079;text-decoration:none;font:600 15px/1.4 'Lexend Deca',sans-serif}.library-selector a[aria-current=page]{background:#203f53;color:#fff}.library-selector a:hover:not([aria-current]){background:#e9eeeb}.library-selector a:focus-visible{outline:3px solid #e4a13b;outline-offset:2px}.library-brand-row{display:flex;align-items:center;justify-content:space-between;gap:24px;width:100%;flex-wrap:wrap}
@media screen{.recent-hero>div{width:100%}.recent-hero p{max-width:none;width:100%}}
/* Persistent navigation; only the thumbnail list scrolls within the rail. */
@media screen {
  :root { --story-header-height: 102px; }
  .app-bar { position: sticky; top: 0; z-index: 20; }
  .page-rail {
    position: sticky;
    top: var(--story-header-height);
    align-self: start;
    box-sizing: border-box;
    height: calc(100dvh - var(--story-header-height));
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .page-rail > :not(.page-list) { flex-shrink: 0; }
  .page-list { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
  .page-thumb { flex-shrink: 0; }
  .canvas-wrap { overflow: visible; min-width: 0; }
  .storyboard-page { scroll-margin-top: calc(var(--story-header-height) + 18px); }
}
