:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#252621;background:#f4f2eb;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:#426763}[hidden]{display:none!important}
.comment-mark.draft-mark{background:#f8e176;border-bottom-color:#a97812;box-shadow:inset 0 -1px 0 #a97812}.editor-actions .destructive{color:#9b3d31;border-color:#cf9a8e}
.topbar{height:78px;padding:12px 26px;display:flex;align-items:center;justify-content:space-between;background:#172b2b;color:#fff;box-shadow:0 2px 12px #0d272022}.brand{display:flex;align-items:center;gap:13px}.brand small,.comment-panel small{font-size:10px;letter-spacing:.18em;color:#a2c0b5}.brand h1{margin:3px 0 0;font-family:serif;font-size:23px;font-weight:500}.seal{display:grid;place-items:center;width:40px;height:40px;border-radius:9px;background:#b5593b;font-family:serif;font-size:24px}.primary{border:0;background:#c66e49;color:#fff;border-radius:7px;padding:10px 16px}
.layout{height:calc(100vh - 78px);display:grid;grid-template-columns:300px minmax(0,1fr)}.sidebar{display:flex;flex-direction:column;overflow-y:auto;border-right:1px solid #e2ded2;background:#f9f8f3;min-height:0}.eyebrow{color:#a4573f;letter-spacing:.16em;font-size:11px;font-weight:700}.sidebar-foot{font-size:12px;line-height:1.6;color:#77776e}.sidebar nav{padding:10px 14px}.workspace-button{display:block;width:100%;border:0;border-radius:7px;padding:7px 10px;text-align:left;background:none;color:#353d36;font-size:12px}.workspace-button:hover:not(:disabled),.workspace-button.active{background:#e7e6da}.workspace-button.active{font-weight:700}.source-button{display:block;width:100%;text-align:left;border:1px solid transparent;background:transparent;padding:12px;border-radius:9px;margin-bottom:7px;color:#292d29}.source-button:hover{background:#f0ede4}.source-button.active{background:#fff;box-shadow:0 3px 14px #2221;border-color:#ded7c7}.source-button small{display:block;color:#ad6247;font-size:11px;margin-bottom:5px}.source-button strong{font-family:serif;font-size:15px;font-weight:600}.source-button .sub{display:block;font-size:11px;color:#85847b;margin-top:6px}.sidebar-foot{padding:14px 23px;border-top:1px solid #e5e0d5;margin-top:auto}
#reader{overflow:auto;scroll-behavior:smooth}.document{max-width:920px;padding:44px 58px 100px;margin:auto}.document .overline{letter-spacing:.18em;font-size:11px;color:#a85a41}.document h2{font-family:serif;font-size:38px;font-weight:500;line-height:1.3;margin:12px 0}.type-pill{display:inline-block;border:1px solid #d3b69d;border-radius:20px;padding:4px 9px;color:#9a5a3b;font-size:11px}.source-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:26px 0;padding:19px 21px;background:#ece9de;border-radius:9px;font-size:12px;color:#5e615b}.source-meta b{display:block;color:#878980;font-size:10px;letter-spacing:.12em;margin-bottom:5px}.source-meta a{word-break:break-all}.intro{font-size:14px;line-height:1.85;color:#5d615b;border-left:3px solid #c66e49;padding-left:15px;margin:25px 0 31px}.section-title{font-family:serif;font-size:21px;font-weight:500;border-bottom:1px solid #ddd8cb;padding-bottom:12px}.source-text{font-family:"Songti SC","Noto Serif CJK SC",serif;font-size:19px;line-height:2.05;letter-spacing:.018em}.source-text p{margin:0 0 22px;position:relative;white-space:pre-wrap}.comment-mark{background:#f3d2b1;border-bottom:2px solid #c66e49;border-radius:2px;cursor:pointer}.comment-mark.closed{background:#ece6dc;border-bottom-color:#b3aaa0}.comment-mark.selected{background:#f8b673}.image-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.image-grid figure{margin:0;background:white;border:1px solid #e4e0d4;border-radius:10px;overflow:hidden}.image-grid img{display:block;width:100%;background:#fbf8f0;max-height:350px;object-fit:contain}.image-grid figcaption{padding:14px;font-size:12px;line-height:1.7;color:#666}
.comment-panel{position:fixed;z-index:5;right:0;top:78px;bottom:0;width:min(430px,100vw);background:#fffefb;box-shadow:-8px 0 28px #172b2b2e;overflow:auto}.comment-panel>header{display:flex;justify-content:space-between;align-items:center;padding:22px;border-bottom:1px solid #e8e4d9}.comment-panel h2{font-family:serif;font-size:24px;margin:4px 0 0;font-weight:500}.comment-panel h2 span{font:12px sans-serif;color:#8e9188}.comment-panel>header button{border:0;background:none;font-size:26px;color:#777}.comment-panel #comment-body{padding:20px}.comment-help{font-size:12px;color:#777;line-height:1.6;margin:0 0 20px}.comment-editor{background:#f8f5ed;border:1px solid #e7ddcb;padding:16px;border-radius:9px;margin-bottom:20px}.comment-editor q,.comment-card q{display:block;color:#6f6b60;font-family:serif;font-size:14px;line-height:1.65;padding-left:10px;border-left:2px solid #bb8d69;margin:10px 0}.comment-editor label{display:block;font-size:12px;font-weight:600;margin:12px 0 6px}.comment-editor textarea{width:100%;height:105px;resize:vertical;border:1px solid #d8d2c5;border-radius:6px;padding:10px;font-size:13px;background:white}.editor-actions,.card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.editor-actions button,.card-actions button,.secondary{border:1px solid #d7d0c0;border-radius:6px;background:white;padding:7px 10px;font-size:12px;color:#5e615a}.editor-actions .primary{background:#b35d40;border-color:#b35d40;color:white}.comment-card{border:1px solid #e6e0d6;border-radius:9px;padding:15px;margin:0 0 11px}.comment-card.selected{border-color:#bd6d4f;box-shadow:0 0 0 2px #bd6d4f24}.comment-card small{color:#a15f45;letter-spacing:normal}.comment-card p{font-size:13px;line-height:1.7;margin:10px 0}.history-head{display:flex;justify-content:space-between;align-items:center;margin:22px 0 10px}.history-head h3{font-size:14px;margin:0}.history-head button{border:0;background:none;color:#8e573c}.empty{color:#8a8a80;font-size:13px;line-height:1.6}#selection-action{position:fixed;z-index:8;background:#172b2b;color:white;border:0;padding:9px 14px;border-radius:7px;box-shadow:0 4px 13px #0003;font-size:12px}#toast{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:20;background:#223b36;color:#fff;border-radius:7px;padding:10px 16px;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s}#toast.show{opacity:1}
#source-view[hidden],#configuration-view[hidden],#approach-view[hidden],#source-section[hidden]{display:none}
.sidebar{overflow-y:auto}.sidebar #workspace-nav{flex:none;overflow:visible;padding:10px 14px}.workspace-button{display:block;width:100%;border:0;border-radius:7px;padding:7px 10px;text-align:left;background:none;color:#353d36;font-size:12px}.workspace-button.active{background:#e7e6da;font-weight:700}.workspace-button:disabled{font-size:11px}.sidebar #source-list{overflow:visible;padding-top:8px}.config-section{border-top:1px solid #ded8c9;margin-top:25px;padding-top:4px}.config-version{font-size:12px;color:#777}.config-field{display:block;margin:14px 0;font-size:13px;color:#555}.config-field span{display:block;margin-bottom:6px;font-weight:600}.config-field input,.config-field textarea,.config-field select{display:block;width:100%;padding:9px;border:1px solid #d2cbbc;border-radius:6px;background:#fff;font:inherit;color:#222}.config-field small{display:block;color:#777;margin-top:4px}
@media(max-width:760px){.topbar{height:70px;padding:10px 13px}.brand h1{font-size:17px}.layout{height:calc(100vh - 70px);grid-template-columns:145px minmax(0,1fr)}.sidebar-foot{display:none}.sidebar nav{padding:7px}.source-button{padding:9px}.source-button strong{font-size:12px}.source-button .sub{display:none}.document{padding:26px 19px 80px}.document h2{font-size:27px}.source-meta{grid-template-columns:1fr}.source-text{font-size:17px}.comment-panel{top:70px}}

.suggestion{background:#fff;border:1px solid #d9cbb9;border-radius:7px;margin-top:12px;padding:12px}
.suggestion p{font-size:13px;line-height:1.65;color:#555}
.context-preview{margin-top:12px;padding:12px;border:1px solid #d9cbb9;border-radius:7px;background:#fff;max-height:270px;overflow:auto}
.context-preview summary{cursor:pointer;font-weight:600;color:#785136;font-size:12px}
.context-preview p{font-size:11px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;color:#555}
.context-preview small{display:block;overflow-wrap:anywhere;letter-spacing:0;color:#888}

:root {
  --desk-ink: #20221d;
  --desk-paper: #eee9dd;
  --desk-reader: #f4efe4;
  --desk-line: #d4cbb9;
  --desk-red: #9f382e;
  --desk-gold: #deb083;
  --desk-muted: #77786f;
  color: #282a25;
  background: var(--desk-paper);
}
body { overflow: auto; background: var(--desk-paper); }
button { border-radius: 0; }
.layout { height: auto; min-height: 100dvh; display: grid; grid-template-columns: 272px minmax(0,1fr); }
.sidebar {
  position: sticky; top: 0; align-self: start; height: 100dvh; min-height: 0; min-width: 0; padding: 24px 18px 18px;
  display: flex; flex-direction: column; overflow-y: auto; color: #f8f4e9;
  border: 0; background: radial-gradient(circle at 0 0,rgba(159,56,46,.42),transparent 15rem),var(--desk-ink);
  box-shadow: 18px 0 50px rgba(23,25,21,.08);
}
.sidebar-brand {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 0 4px 22px;
  color: inherit; text-align: left; border: 0; border-bottom: 1px solid rgba(255,255,255,.14); background: transparent;
}
.sidebar-brand .seal { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 0; background: var(--desk-red); font-size: 19px; }
.sidebar-brand b,.sidebar-brand small { display: block; }
.sidebar-brand b { font-size: 14px; letter-spacing: .04em; }
.sidebar-brand small { margin-top: 5px; color: #85877f; font: 600 10px/1.2 Arial,sans-serif; letter-spacing: .16em; }
.sidebar #workspace-nav { padding: 0; margin-top: 18px; display: grid; flex: none; gap: 3px; }
.workspace-button {
  width: 100%; min-height: 64px; display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px;
  align-items: start; padding: 12px 10px; color: #b8b7ae; text-align: left; border: 1px solid transparent;
  background: transparent; transition: color .18s,background .18s,border-color .18s;
}
.workspace-button:hover:not(:disabled) { color: #f8f4e9; background: rgba(255,255,255,.055); }
.workspace-button.active { color: #f8f4e9; border-color: rgba(222,176,131,.48); background: rgba(222,176,131,.1); }
.workspace-button:disabled { opacity: .65; font-size: inherit; }
.workspace-button .nav-index { padding-top: 2px; color: #db7165; font: 700 10px/1 Arial,sans-serif; }
.workspace-button b,.workspace-button small { display: block; }
.workspace-button b { font-size: 13px; }
.workspace-button small { margin-top: 5px; color: #7f817a; font-size: 10px; line-height: 1.4; }
.workspace-button.active small { color: #a9aaa2; }
.workspace-button.planned { opacity: .78; }
.sidebar-foot { display: flex; gap: 10px; align-items: center; margin-top: auto; padding: 16px 4px 0; border: 0; }
.sidebar-foot i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #6d9877; box-shadow: 0 0 0 4px rgba(109,152,119,.12); }
.sidebar-foot b,.sidebar-foot span { display: block; font-size: 10px; line-height: 1.45; }
.sidebar-foot b { color: #b5b5ad; }.sidebar-foot span { color: #7f817a; }
.workspace-main { min-height: 100dvh; min-width: 0; overflow: visible; scroll-behavior: auto; }
#reader { overflow: visible; scroll-behavior: auto; }
.workspace-topbar {
  position: sticky; top: 0; z-index: 4; min-height: 70px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; padding: 12px max(32px,calc((100% - 1320px)/2));
  border-bottom: 1px solid var(--desk-line); background: rgba(238,233,221,.94); backdrop-filter: blur(16px);
}
.view-context { display: flex; align-items: center; gap: 12px; }
.view-context > span { width: 31px; height: 31px; display: grid; place-items: center; background: var(--desk-red); color: #f8f4e9; font: 700 10px/1 Arial,sans-serif; }
.view-context small,.view-context b { display: block; }.view-context small { color: var(--desk-muted); font-size: 10px; }.view-context b { margin-top: 3px; font-size: 13px; }



.workspace-content { width: min(1320px,calc(100% - 64px)); margin: 0 auto; }
.workspace-view { min-height: calc(100dvh - 70px); padding: 48px 0 30px; }
.story-workspace-heading { padding-bottom: 18px; border-bottom: 1px solid var(--desk-ink); }
#story-workspace-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.story-mode-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: min(100%,675px); border: 1px solid var(--desk-line); }
.story-mode-tabs button { min-height: 38px; padding: 0 8px; border: 0; border-right: 1px solid var(--desk-line); background: rgba(248,244,233,.45); color: var(--desk-muted); font-size: 11px; white-space: nowrap; }
.story-mode-tabs button:last-child { border-right: 0; }.story-mode-tabs button.active { background: var(--desk-ink); color: #f8f4e9; }.story-mode-tabs button:disabled { opacity: .6; }
.text-reader { display: grid; grid-template-columns: 276px minmax(0,1fr); border: 1px solid var(--desk-line); background: rgba(248,244,233,.78); box-shadow: 0 22px 55px rgba(42,35,27,.08); }
.text-reader-index { display: flex; flex-direction: column; color: #d9d5ca; background: var(--desk-ink); }
.text-reader-index > header { padding: 22px 19px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.text-reader-index > header small { color: #df766a; font: 700 10px/1 Arial,sans-serif; letter-spacing: .15em; }
.text-reader-index > header h2 { margin: 8px 0 0; font-size: 19px; font-weight: 600; }.text-reader-index > header p { margin: 8px 0 0; color: #92938b; font-size: 11px; line-height: 1.55; }
.text-reader-index #source-list { display: block; flex: 1 1 auto; padding: 10px; background: rgba(255,255,255,.055); }
.source-button { width: 100%; min-height: 48px; display: block; padding: 13px 14px; margin: 0 0 8px; border: 1px solid rgba(255,255,255,.09); border-radius: 0; background: #292b25; box-shadow: none; color: #d9d5ca; }
.source-button:hover { border-color: rgba(222,118,106,.55); background: #30322b; }.source-button.active { border-color: var(--desk-gold); background: var(--desk-gold); box-shadow: none; color: #261b18; }
.source-button strong { display: block; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; }
.source-group { margin: 14px 0; border: 1px solid rgba(255,255,255,.16); }
.source-group-toggle { width: 100%; min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 0; color: #f4e9d7; background: #34362e; text-align: left; font-size: 13px; cursor: pointer; }
.source-group-toggle:hover { background: #414237; }.source-group-toggle small { flex: none; color: #d7ad84; font-size: 11px; }
.source-group-items { padding: 9px 8px 1px 14px; border-left: 2px solid var(--desk-gold); }.source-group-items .source-button { min-height: 48px; padding: 10px; }
.source-button.source-version-toggle { display: flex; align-items: flex-start; gap: 7px; }
.source-version-toggle strong { flex: 1; min-width: 0; }.source-version-arrow { flex: none; font-size: 12px; line-height: 1.65; }
.source-chapters { margin: -2px 0 12px 8px; padding: 0 0 2px 6px; border-left: 1px solid #cdbb9f; }
.source-chapters[hidden] { display: none; }
.source-chapter-button { display: block; width: 100%; min-height: 36px; padding: 8px 9px; margin: 2px 0; border: 0; border-left: 2px solid transparent; border-radius: 0; background: transparent; color: #535348; text-align: left; font: inherit; font-size: 12px; line-height: 1.5; cursor: pointer; }
.source-chapter-button:hover { background: #efe6d6; color: #282a25; }
.source-chapter-button.active { border-left-color: var(--desk-red); background: #eadbc2; color: #6b352a; font-weight: 600; }
.source-chapter-button:focus-visible,.source-version-toggle:focus-visible { outline: 2px solid var(--desk-red); outline-offset: 2px; }
.source-media audio,.source-media video { display: block; width: 100%; max-height: 520px; margin: 10px 0; }
.text-reader-index footer { padding: 15px 17px; border-top: 1px solid rgba(255,255,255,.1); color: #8f9188; font-size: 11px; line-height: 1.5; }
.source-reader-main { min-width: 0; }
.text-reader-head { min-height: 104px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 24px; color: #f8f4e9; background: var(--desk-ink); }
.text-reader-head small { color: #df766a; font: 700 10px/1.3 Arial,sans-serif; letter-spacing: .1em; }.text-reader-head h2 { margin: 7px 0 0; font-size: 21px; font-weight: 600; line-height: 1.25; }.text-reader-head p { margin: 7px 0 0; color: #97988f; font-size: 11px; line-height: 1.45; }
.text-reader-head button { flex: 0 0 auto; min-height: 32px; padding: 0 10px; border: 1px solid rgba(255,255,255,.23); background: rgba(255,255,255,.04); color: #e5ddd0; font-size: 11px; }.text-reader-head button:hover { border-color: #df766a; }
.text-reader-scroll { background: var(--desk-reader); }
.text-reader-scroll .document { width: min(100%,920px); max-width: none; margin: 0 auto; padding: 34px clamp(24px,5vw,68px) 75px; }
.text-reader-scroll .document .overline,.text-reader-scroll .document > h2,.text-reader-scroll .document > .type-pill { display: none; }
.source-meta { margin: 0 0 25px; padding: 18px; border: 1px solid var(--desk-line); border-radius: 0; background: #ede6d8; }
#story-workspace .text-reader-head > div,#story-workspace .source-meta > div { min-width: 0; overflow-wrap: anywhere; }
.intro { margin: 20px 0 28px; }.source-text { font-size: 17px; line-height: 1.95; }.source-text p { margin-bottom: 20px; }
.image-grid figure,.comment-card,.comment-editor { border-radius: 0; }
.comment-panel { top: 0; width: min(440px,100vw); background: #f8f4e9; box-shadow: -16px 0 48px #1719144d; }.comment-panel > header { background: var(--desk-ink); border-color: #34362f; }.comment-panel > header h2,.comment-panel > header button { color: #f8f4e9; }
.config-page,.workspace-view > .document { max-width: 1120px; }
@media(max-width:900px) { .layout { grid-template-columns: 220px minmax(0,1fr); }.sidebar { padding-inline: 12px; }.workspace-content { width: calc(100% - 40px); }.text-reader { grid-template-columns: 220px minmax(0,1fr); } }
@media(max-width:700px) { body { overflow: auto; }.layout { display: block; height: auto; }.sidebar { position: sticky; top: 0; z-index: 9; width: 100%; height: 64px; display: flex; flex-direction: row; align-items: center; padding: 8px 12px; overflow: visible; }.sidebar-brand { width: auto; min-width: 165px; padding: 0; border: 0; }.sidebar-brand small,.sidebar-foot { display: none; }.sidebar #workspace-nav { display: flex; min-width: 0; overflow-x: auto; margin: 0 0 0 10px; }.workspace-button { flex: 0 0 80px; width: 80px; white-space: nowrap; min-height: 45px; display: block; padding: 5px; text-align: center; }.workspace-button .nav-index,.workspace-button small { display: none; }.workspace-main { height: auto; overflow: visible; }.workspace-topbar { top: 64px; min-height: 58px; padding: 8px 14px; }.workspace-content { width: calc(100% - 24px); }.workspace-view { padding: 24px 0; }.text-reader { height: auto; min-height: 670px; grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }.text-reader-index { max-height: 220px; }.text-reader-index > header { padding: 12px; }.text-reader-index #source-list { display: flex; overflow-x: auto; }.source-button { min-width: 180px; }.text-reader-index footer { display: none; }.source-reader-main { min-height: 540px; }.text-reader-head { padding: 14px; }.text-reader-head h2 { font-size: 16px; }.text-reader-scroll .document { padding: 24px 18px 60px; }.source-text { font-size: 16px; }.comment-panel { top: 64px; } }

/* The original desk uses a paper grid around, not inside, the reading sheet. */
.workspace-main { background-color: var(--desk-paper); background-image: linear-gradient(rgba(85,81,70,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(85,81,70,.045) 1px,transparent 1px); background-size: 34px 34px; }
.workspace-content { width: min(1600px,calc(100% - 64px)); }
.workspace-topbar { padding-inline: max(32px,calc((100% - 1600px)/2)); }
.story-reader-guide { margin: 18px 0 24px; padding: 14px 18px; border-left: 3px solid #45645a; background: rgba(248,244,233,.8); font-size: 13px; line-height: 1.6; }
.text-reader-index { color: #282a25; background: #f8f4e9; }
.text-reader-index > header { border-bottom: 0; }.text-reader-index > header small { color: var(--desk-red); }
.text-reader-index > header p { color: var(--desk-muted); }
.text-reader-index #source-list { background: transparent; }
.text-reader-index footer { border-color: var(--desk-line); color: var(--desk-muted); }
.source-no-results { margin: 12px; color: var(--desk-muted); font-size: 12px; }
.source-media,.source-references { margin: 0 0 24px; padding: 16px 18px; border-left: 3px solid #45645a; background: #eae4d7; }
.source-media strong,.source-references strong { display: block; margin-bottom: 9px; font-size: 12px; }
.source-media a { display: inline-block; padding: 8px 12px; border: 1px solid #45645a; color: #2c5143; font-size: 13px; }
.source-media p,.source-references p { margin: 9px 0 0; color: var(--desk-muted); font-size: 12px; line-height: 1.6; }
.config-choice-field { grid-column: 1/-1; min-width: 0; margin: 0; padding: 0; border: 0; }
.config-choice-field legend { margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.config-choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.config-choice { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.config-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.config-choice span { display: block; padding: 9px 12px; border: 1px solid var(--desk-line); background: #fffdfa; color: #484a43; font-size: 12px; }
.config-choice input:checked + span { border-color: var(--desk-red); background: var(--desk-ink); color: #fff7ed; }
.config-choice input:focus-visible + span { outline: 2px solid var(--desk-red); outline-offset: 2px; }
#comments-toggle { position: fixed; right: 26px; bottom: 26px; z-index: 5; padding: 10px 14px; border: 1px solid #72372f; border-radius: 24px; background: #71382f; color: #fff7ed; box-shadow: 0 5px 16px #0002; font-size: 12px; }
#comments-toggle:hover { color: #fff; border-color: #71382f; background: #8f473b; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 30px 0 45px; border-top: 1px solid var(--desk-ink); color: #66685e; font-size: 11px; }
.workspace-footer > div { display: flex; align-items: center; gap: 12px; }.workspace-footer b,.workspace-footer small { display: block; }.workspace-footer b { color: #262822; }.workspace-footer small { margin-top: 3px; }.workspace-footer p { margin: 0; text-align: right; }
.footer-mark { width: 35px; height: 35px; display: grid; place-items: center; background: var(--desk-red); color: #f8f4e9; font-family: serif; font-size: 20px; }
.management-heading { padding: 0 0 20px; border-bottom: 1px solid var(--desk-ink); }.management-heading h1 { margin: 0; font-size: 26px; }.management-heading p { margin: 7px 0 0; color: var(--desk-muted); font-size: 12px; }
.configuration-layout { display: grid; grid-template-columns: 195px minmax(0,1fr); gap: 20px; }
.configuration-sections { align-self: start; display: grid; padding: 0; border: 1px solid var(--desk-line); background: #f8f4e9; }.configuration-sections button { min-height: 44px; padding: 9px 13px; border: 0; border-bottom: 1px solid var(--desk-line); background: transparent; text-align: left; color: #34362f; font-size: 13px; }.configuration-sections button:last-child { border-bottom: 0; }.configuration-sections button.active { background: var(--desk-ink); color: #f8f4e9; }
.config-page { min-width: 0; padding: 20px; border: 1px solid var(--desk-line); background: #f8f4e9; }
.config-page .config-section { margin: 0; padding: 0; border: 0; }.config-page .section-title { margin: 0; padding: 0 0 9px; border-color: var(--desk-line); font-family: inherit; font-size: 21px; font-weight: 600; }
.config-explanation { margin: 12px 0; color: var(--desk-muted); font-size: 12px; }.config-version { margin: 12px 0; }
.config-page form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px 16px; }.config-page .config-field { min-width: 0; }.config-page .config-field:has(textarea) { grid-column: 1/-1; }.config-page form > button { grid-column: 1/-1; justify-self: start; }
.config-page .config-field input,.config-page .config-field textarea,.config-page .config-field select { border-radius: 0; background: #fffdfa; }
.placeholder-heading { padding-bottom: 24px; border-bottom: 1px solid var(--desk-ink); }.placeholder-heading p { margin: 0 0 12px; color: var(--desk-red); font-size: 11px; font-weight: 700; letter-spacing: .16em; }.placeholder-heading h1 { margin: 0; font-size: clamp(32px,4vw,54px); }
.placeholder-card { max-width: 900px; margin-top: 28px; padding: 30px; border: 1px solid var(--desk-line); background: #f8f4e9; }.placeholder-card small { color: var(--desk-red); font-size: 11px; letter-spacing: .12em; }.placeholder-card h2 { margin: 16px 0 10px; font-size: 24px; }.placeholder-card p { color: var(--desk-muted); font-size: 13px; line-height: 1.8; }.placeholder-card .primary { margin-top: 14px; }
@media(max-width:700px) { .workspace-content { width: calc(100% - 24px); }.workspace-topbar { padding-inline: 14px; }#comments-toggle { right: 12px; bottom: 12px; }.workspace-footer { display: block; }.workspace-footer p { margin-top: 12px; text-align: left; }.configuration-layout { grid-template-columns: 1fr; }.configuration-sections { display: flex; overflow-x: auto; }.configuration-sections button { white-space: nowrap; border-bottom: 0; border-right: 1px solid var(--desk-line); }.config-page form { grid-template-columns: 1fr; }.config-page .config-field:has(textarea) { grid-column: auto; } }
@media(max-width:700px) { .text-reader { min-height: 0; grid-template-rows: auto auto; }.text-reader-index { max-height: none; }.source-reader-main { min-height: 0; }.config-choice-field { grid-column: auto; } }

/* Keep the compilation desk in the viewport after the page reaches the top bar.
   Its index and manuscript scroll independently; switching a source never moves the page. */
@media(min-width:701px) {
  #story-workspace { padding-bottom: 0; }
  .workspace-main:has(#story-creation-shell:not([hidden])) .workspace-footer { display: none; }
  #story-workspace .text-reader { position: sticky; top: 70px; height: calc(100dvh - 70px); min-height: 0; overflow: hidden; }
  #story-workspace .text-reader-index { min-height: 0; overflow: hidden; }
  #story-workspace .text-reader-index #source-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  #story-workspace .source-reader-main { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  #story-workspace .text-reader-head { flex: 0 0 auto; }
  #story-workspace .text-reader-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
}

@media(max-width:700px) {
  #story-workspace .text-reader-index { max-height: min(44dvh, 360px); min-height: 0; overflow: hidden; }
  #story-workspace .text-reader-index #source-list { display: block; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  #story-workspace .source-button { min-width: 0; width: 100%; }
}

/* Titles keep their width; counts sit on a secondary line with the same vocabulary. */
.source-labels { display: block; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.source-button .revision-comment-count { display: block; margin: 5px 0 0; color: #d7ad84; font-size: 11px; line-height: 1.5; font-weight: 400; }
.source-button.active .revision-comment-count { color: #594333; }
.source-group-totals { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; }
.source-group-totals small { margin: 0; font-weight: 400; }

#structure-workspace{color:#292b25}.structure-empty button,.structure-versions button,.structure-visual-actions button,.structure-review-tail button{padding:9px 13px;border:1px solid #bdb8aa;background:#faf7ee;color:#433d34;cursor:pointer}.structure-empty button:hover,.structure-versions button:hover,.structure-visual-actions button:hover,.structure-review-tail button:hover{border-color:#9a4639;color:#9a4639}.structure-alert{margin:14px 0;padding:12px 16px;border-left:4px solid #b05b39;background:#fff1dd;color:#7b3d26;font-size:13px}.structure-versions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:17px 0}.structure-versions span{font-size:12px;color:#777}.structure-versions button.active{background:#292b25;color:#fff}.structure-layout{display:grid;grid-template-columns:205px minmax(0,1fr);align-items:start;gap:26px;margin:20px 0 0}.structure-layout nav{position:sticky;top:90px;display:grid;padding:12px;background:#292b25}.structure-layout nav button{padding:12px;border:0;border-bottom:1px solid #4a4d44;background:transparent;color:#efece4;text-align:left;font-size:13px;cursor:pointer}.structure-layout nav button:hover{color:#e0aa80}.structure-layout nav button.active{background:#e0b183;color:#24221b;font-weight:700}.structure-layout article{min-width:0;padding:40px clamp(22px,5vw,75px) 80px;border:1px solid #d3ccbc;background:#f8f4e9;box-shadow:0 18px 50px #2a231b16}.structure-document-head{padding:0 0 36px;border-bottom:1px solid #aaa398}.structure-document-head small,.structure-section>small{color:#a35042;font-size:11px;font-weight:700;letter-spacing:.15em}.structure-document-head h2{margin:15px 0;font-family:Georgia,"Songti SC",serif;font-size:clamp(34px,4vw,56px);font-weight:500}.structure-document-head p{color:#77776e;font-size:12px}.structure-section{padding:50px 0 26px;border-bottom:1px solid #d4cab8;scroll-margin-top:var(--structure-scroll-offset,90px)}.structure-section h2{margin:12px 0 25px;font-family:Georgia,"Songti SC",serif;font-size:clamp(27px,3vw,37px);font-weight:500}.structure-section p{max-width:850px;font-size:17px;line-height:2.05;margin:0 0 22px}.structure-figure{max-width:950px;margin:32px 0;padding:16px;border:1px solid #c6bdab;background:#eee8da}.structure-figure-head{display:flex;justify-content:space-between;gap:12px;margin:0 0 12px;font-size:13px}.structure-figure-head span{color:#8c7362}.structure-visual-viewport{overflow-x:auto;max-width:100%;background:#e4dac9}.structure-visual-stage{position:relative;width:100%;line-height:0}.structure-visual-stage img{display:block;width:100%;height:auto}.structure-visual-stage.drawing{cursor:crosshair;touch-action:none}.structure-overlay{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.structure-visual-stage.drawing .structure-overlay{pointer-events:auto;touch-action:none}.review-region{fill:#cc6a3844;stroke:#b14d2d;stroke-width:.4;vector-effect:non-scaling-stroke;pointer-events:auto;cursor:pointer}.review-region.closed{fill:#86867833;stroke:#777}.review-region.drawing{fill:#cc6a3822;stroke-dasharray:1 1;pointer-events:none}.structure-figure figcaption{margin:12px 0;color:#66685d;font-size:12px;line-height:1.6}.structure-visual-actions{display:flex;gap:8px}.structure-visual-actions button{font-size:12px}.structure-review-tail{padding:42px 0}.structure-review-tail h2{font-size:23px}.structure-review-tail p{font-size:13px;line-height:1.7}.structure-review-tail p span{display:block}.structure-review-tail button{margin:8px 8px 0 0}.structure-empty{margin:20px 0;padding:24px;background:#f8f4e9;border:1px solid #d3ccbc}.structure-empty h2{margin-top:0}.structure-empty p{font-size:13px;color:#777}.structure-empty button{margin:4px}.structure-confirm-dialog{width:min(520px,calc(100% - 24px));border:1px solid #bdb8aa;background:#f8f4e9;box-shadow:0 20px 70px #0005}.structure-confirm-dialog::backdrop{background:#191b19aa}.structure-confirm-dialog h2{margin-top:0}.structure-confirm-dialog p{font-size:13px;line-height:1.7}.structure-confirm-dialog>input,.structure-confirm-dialog textarea{display:block;width:100%;margin:12px 0;padding:10px;border:1px solid #bdb8aa}.structure-confirm-dialog>div{display:flex;justify-content:end;gap:8px;margin-top:18px}.comment-flash{outline:3px solid #bb5e3f;outline-offset:5px}@media(max-width:800px){.structure-layout{grid-template-columns:1fr;gap:10px}.structure-layout nav{position:sticky;top:122px;display:flex;overflow-x:auto;z-index:3}.structure-layout nav button{white-space:nowrap}.structure-layout article{padding:25px 18px 60px}.structure-section p{font-size:16px}}
.review-region.draft{fill:#f8e17666;stroke:#a97812;stroke-width:.6;stroke-dasharray:1 1;pointer-events:none}.structure-visual-stage.draft-visual{outline:3px solid #d1a51e;outline-offset:3px}.structure-visual-stage.draft-visual img{opacity:.82}
@media(max-width:700px){.sidebar #workspace-nav{min-width:0;flex:1 1 auto}.sidebar-brand{flex:0 0 auto}.structure-visual-viewport{max-width:100%;overflow-x:auto}}
.structure-layout[hidden]{display:none}

/* Story compilation and structure share one stable page frame. */
#structure-workspace{padding-top:22px}



.structure-start{margin:22px 0 0;padding:clamp(20px,3vw,42px);border:1px solid #d3ccbc;background:#f8f4e9;box-shadow:0 18px 50px #2a231b10}
.structure-start>small,.structure-direction-card>small{color:#9a4639;font-size:11px;font-weight:700;letter-spacing:.08em}
.structure-start h3{margin:9px 0 8px;font-size:clamp(24px,2.5vw,32px);font-weight:600}
.structure-start>p{max-width:800px;margin:0;color:#62655c;font-size:13px;line-height:1.75}
.structure-direction-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:26px}
.structure-direction-card{display:flex;flex-direction:column;min-width:0;min-height:236px;padding:20px;border:1px solid #cfc6b5;background:#fffdf7}
.structure-direction-card h4{margin:12px 0 8px;font-size:19px;line-height:1.35}
.structure-direction-card p{flex:1;margin:0;color:#686b62;font-size:12px;line-height:1.7}
.structure-direction-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.structure-direction-actions button{padding:9px 12px;border:1px solid #bdb8aa;background:#faf7ee;color:#433d34;cursor:pointer;font-size:12px}
.structure-direction-actions button.primary{border-color:#763c32;background:#763c32;color:#fff}
.structure-direction-actions button:hover{border-color:#9a4639}
@media(max-width:1200px){.structure-direction-grid{grid-template-columns:1fr}.structure-direction-card{min-height:0}}
@media(max-width:700px){#structure-workspace{padding-top:18px}.structure-start{padding:18px}.structure-direction-grid{gap:10px;margin-top:18px}.structure-direction-card{padding:16px}}
.workspace-main:has(#story-creation-shell:not([hidden])) .workspace-footer{display:none}

/* Keep every structure visual complete; open the original asset in a modal. */
#structure-reader .structure-visual-stage img{max-width:100%;max-height:none;height:auto;object-fit:contain}
.structure-image-trigger{cursor:zoom-in}
.structure-image-trigger:focus-visible{outline:3px solid #9a4639;outline-offset:3px}
.structure-visual-stage.drawing .structure-image-trigger{cursor:crosshair}
body.structure-image-open{overflow:hidden}
.structure-image-dialog{width:calc(100vw - 32px);height:calc(100vh - 32px);height:calc(100dvh - 32px);max-width:none;max-height:none;margin:auto;padding:0;border:1px solid #4a4d44;background:#191d19;color:#f8f4e9;box-shadow:0 20px 80px #0008;overflow:hidden}
.structure-image-dialog[open]{display:flex;flex-direction:column}
.structure-image-dialog::backdrop{background:#111d}





.structure-image-canvas{flex:1;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;padding:0 16px 16px}
.structure-image-canvas img{display:block;width:100%;height:100%;object-fit:contain}
.structure-image-size{flex:0 0 auto;align-self:center;white-space:nowrap}
.structure-image-dialog .review-dialog-close{order:1}
.structure-image-canvas.original-size{display:block;overflow:auto}
.structure-image-canvas.original-size img{width:auto;height:auto;max-width:none;max-height:none}
@media(max-width:700px){.structure-image-dialog{width:calc(100vw - 16px);height:calc(100vh - 16px);height:calc(100dvh - 16px)}.structure-image-canvas{padding:0 8px 8px}}

.structure-versions button { display: grid; gap: 4px; text-align: left; }
.structure-versions button strong { font-weight: 500; }
.structure-versions .revision-comment-count { font-size: 11px; color: #746657; }
.structure-versions button.active .revision-comment-count { color: #e3d2ba; }
.revision-count-help { margin: 8px 0; font-size: 12px; color: #67695f; }

/* Match the compilation reader: paper directory, ink headings and gold selection. */
#structure-workspace{min-width:0;padding-bottom:0}
#story-creation-shell:has(>#structure-workspace:not([hidden])){padding-bottom:0}
#structure-workspace:has(.structure-layout:not([hidden])){display:flex;flex-direction:column;gap:0;height:calc(100dvh - 70px);min-height:460px;padding-top:0;margin-top:22px;position:sticky;top:70px;overflow:hidden}
#structure-status{position:sticky;top:0;z-index:3;flex:0 0 auto;min-width:0;background:var(--desk-paper)}
#structure-status .structure-versions{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;overscroll-behavior-inline:contain;margin:0;padding:12px 0;scrollbar-gutter:stable}
#structure-status .structure-versions .source-button{flex:none;width:auto;min-width:90px;min-height:48px;margin:0;padding:10px 14px;border:1px solid rgba(255,255,255,.09);background:#292b25;color:#d9d5ca}
#structure-status .structure-versions .source-button.active{border-color:var(--desk-gold);background:var(--desk-gold);color:#261b18}
#structure-status .structure-versions .source-button:hover{border-color:var(--desk-gold)}
#structure-status .structure-versions strong{font-size:13px;font-weight:600}
#structure-status .structure-versions .revision-comment-count{font-size:11px;color:#d7ad84}
#structure-status .structure-versions .active .revision-comment-count{color:#594333}
#structure-status .structure-alert{margin:0 0 8px}
.structure-layout{flex:1 1 auto;min-height:0;grid-template-rows:minmax(0,1fr);align-items:stretch;grid-template-columns:276px minmax(0,1fr);gap:0;margin:0;border:1px solid var(--desk-line);background:var(--desk-reader);box-shadow:0 22px 55px #2a231b14;overflow:hidden}
.structure-layout #structure-index{position:static;z-index:auto;display:flex;flex-direction:column;min-height:0;padding:0;overflow:hidden;background:#f8f4e9;color:#282a25}
.structure-layout #structure-index>header{flex:none;padding:22px 19px 18px}
.structure-chapters{flex:1 1 auto;min-height:0;padding:10px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.structure-layout #structure-index .source-button{display:block;width:100%;min-height:48px;margin:0 0 8px;padding:13px 14px;border:1px solid rgba(255,255,255,.09);background:#292b25;color:#d9d5ca;text-align:left;white-space:normal;font-size:14px;font-weight:600;line-height:1.4}
.structure-layout #structure-index .source-button:hover{border-color:rgba(222,118,106,.55);background:#30322b}
.structure-layout #structure-index .source-button.active{border-color:var(--desk-gold);background:var(--desk-gold);color:#261b18}
.structure-layout #structure-reader{min-width:0;min-height:0;margin:0;padding:0 0 65px;border:0;box-shadow:none;background:var(--desk-reader);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#structure-reader .structure-document-head{position:sticky;top:0;z-index:2;min-height:104px;margin:0;padding:20px 24px;border:0;background:var(--desk-ink);color:#f8f4e9}
#structure-reader .structure-document-head>div{min-width:0;overflow-wrap:anywhere}
#structure-reader .structure-document-head small{color:#df766a;font:700 10px/1.3 Arial,sans-serif;letter-spacing:.1em}
#structure-reader .structure-document-head h2{margin:7px 0 0;font-family:inherit;font-size:21px;font-weight:600;line-height:1.25}
#structure-reader .structure-document-head p{margin:7px 0 0;color:#97988f;font-size:11px;line-height:1.45}
#structure-reader .structure-section,#structure-reader .structure-review-tail{margin:0 clamp(24px,5vw,68px);padding:34px 0 26px}
#structure-reader .structure-section h2{font-size:27px}
#structure-reader .structure-section p{font-family:"Songti SC","Noto Serif CJK SC",serif;font-size:19px;line-height:2.05;letter-spacing:.018em}
#structure-reader .structure-review-tail{font-size:13px}
@media(max-width:900px) and (min-width:701px){.structure-layout{grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:700px){
  #structure-workspace:has(.structure-layout:not([hidden])){position:static;display:block;height:auto;min-height:0;margin-top:18px;overflow:visible}
  #structure-status{position:sticky;top:122px;z-index:3}
  #structure-status .structure-versions{padding:8px 0}
  .structure-layout{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto;gap:0;overflow:visible}
  .structure-layout #structure-index{max-height:min(36dvh,280px)}
  .structure-layout #structure-index>header{padding:12px}
  .structure-layout #structure-index>header p{display:none}
  .structure-chapters{padding:6px 10px}
  .structure-layout #structure-reader{height:calc(100dvh - 202px);min-height:360px;padding-bottom:40px}
  #structure-reader .structure-document-head{padding:14px;min-height:90px}
  #structure-reader .structure-document-head h2{font-size:16px}
  #structure-reader .structure-section,#structure-reader .structure-review-tail{margin-inline:18px;padding-top:24px}
  #structure-reader .structure-section p{font-size:16px}
}

#approach-view { max-width: 1360px; margin-inline: auto; }
.approach-heading { margin-bottom: 24px; }
.approach-heading small { color: var(--desk-red); letter-spacing: .12em; }
.approach-heading h1 { margin: 10px 0; font-size: clamp(30px, 4vw, 46px); }
.approach-heading p { max-width: 52em; color: var(--desk-muted); line-height: 1.8; }
.approach-tabs { display: flex; gap: 8px; margin: 22px 0; border-bottom: 1px solid var(--desk-line); }
.approach-tabs button { padding: 12px 24px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--desk-muted); font: inherit; }
.approach-tabs button.active { color: var(--desk-ink); border-bottom-color: var(--desk-red); font-weight: 700; }
.approach-tabs button:focus-visible,.approach-index a:focus-visible { outline: 2px solid var(--desk-red); outline-offset: 3px; }
.approach-layout { display: grid; grid-template-columns: 244px minmax(0,1fr); align-items: start; border: 1px solid var(--desk-line); background: #f8f4e9; box-shadow: 0 22px 55px #2a231b14; }
.approach-layout:has(.approach-sidebar[hidden]) { grid-template-columns: minmax(0,1fr); }
.approach-sidebar { position: sticky; top: 90px; min-width: 0; max-height: calc(100dvh - 110px); }
.approach-sidebar[hidden] { display: none; }
.approach-index { min-height: 0; padding: 0 12px 16px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.approach-index a { padding: 12px 10px; font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.approach-body { min-width: 0; padding: clamp(18px, 3vw, 40px); background: var(--desk-reader); border-left: 1px solid var(--desk-line); font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.approach-body h2 { margin: 0 0 14px; font-size: 27px; line-height: 1.5; }
.approach-lead { color: #4a5146; }
.approach-body a { color: #754337; text-underline-offset: 4px; }
.approach-section { margin-top: 36px; scroll-margin-top: var(--approach-scroll-offset,90px); }
.approach-anchor { scroll-margin-top: var(--approach-scroll-offset,90px); }
.approach-section h3 { font-size: 22px; margin: 0 0 16px; line-height: 1.5; }
.approach-section p { margin: 12px 0; }
.approach-section h4 { margin: 26px 0 10px; font-size: 19px; line-height: 1.6; }
.approach-section h5 { margin: 22px 0 8px; font-size: 17px; line-height: 1.6; }
.approach-list { padding-left: 1.6em; }
.approach-list li { margin: 8px 0; }
.approach-body code { font-size: .9em; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.approach-prompt { margin: 18px 0; padding: 18px; border: 1px solid var(--desk-line); background: #f3eddf; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.approach-prompt code { white-space: inherit; }
.approach-note { padding: 15px 18px; border-left: 3px solid #496752; background: #eee9dc; }
.approach-flow { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; list-style: none; counter-reset: step; padding: 0; }
.approach-flow li { counter-increment: step; padding: 16px; border: 1px solid var(--desk-line); background: #f3ecdf; }
.approach-flow li::before { content: counter(step,decimal-leading-zero) " →"; display: block; color: var(--desk-red); font-size: 13px; }
.approach-flow b,.approach-flow span { display: block; }
.approach-flow span { margin-top: 6px; font-size: 14px; }
.approach-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; line-height: 1.8; }
.approach-table th,.approach-table td { padding: 14px 12px; text-align: left; vertical-align: top; border: 1px solid var(--desk-line); }
.approach-table thead { background: #eae2d2; }
.approach-table tbody th { min-width: 6em; font-weight: 600; background: #f3eddf; }
.approach-links { padding-left: 22px; }
.approach-links li { margin: 8px 0; }
.approach-media { margin: 24px 0; }
.approach-media img,.approach-media video,.approach-media audio { display: block; width: 100%; max-width: 100%; height: auto; }
.approach-media video { background: #17211e; }
.approach-media img { cursor: zoom-in; }
.approach-media [hidden] { display: none; }
.approach-media img:focus-visible { outline: 2px solid var(--desk-red); outline-offset: 3px; }
.approach-media figcaption { margin-top: 8px; color: var(--desk-muted); font-size: 14px; line-height: 1.6; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 900px) { .approach-flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1000px) {
  .approach-layout { grid-template-columns: minmax(0,1fr); }
  .approach-sidebar { top: 70px; z-index: 3; max-height: none; border-bottom: 1px solid var(--desk-line); }
  .approach-sidebar > header { display: none; }
  .approach-index { display: flex; padding: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-gutter: auto; }
  .approach-index a { flex: 0 0 auto; width: auto; margin: 0; white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; }
  .approach-index a.active { border-bottom-color: var(--desk-red); }
  .approach-body { border-left: 0; }
}
@media (max-width: 700px) {
  .approach-sidebar { top: 122px; }
  .approach-body { font-size: 16px; }
  .approach-body h2 { font-size: 24px; }
  .approach-tabs button { flex: 1; padding-inline: 10px; }
  .approach-flow { grid-template-columns: 1fr; }
  .approach-table,.approach-table tbody,.approach-table tr,.approach-table td,.approach-table tbody th { display: block; width: 100%; box-sizing: border-box; }
  .approach-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .approach-table tr { margin: 12px 0; border: 1px solid var(--desk-line); }
  .approach-table td,.approach-table tbody th { border: 0; border-bottom: 1px solid var(--desk-line); }
  .approach-table td::before { content: attr(data-label); display: block; color: var(--desk-muted); font-size: 12px; font-weight: 600; }
  .approach-table tr > :last-child { border-bottom: 0; }
}

/* A cycle pairs each wireframe node with its own directly readable prose. */
.approach-cycle { border-left: 0; }
.approach-cycle > .approach-lead { max-width: 64em; margin-bottom: 30px; }
.approach-cycle-rows { position: relative; padding-left: 58px; }
.approach-cycle .approach-section { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(0, 1.6fr); gap: 36px; align-items: center; position: relative; margin: 0; padding: 0 0 34px; }
.approach-cycle .approach-section:last-child { padding-bottom: 0; }
.approach-cycle-node { position: relative; border: 1px solid #66716a; padding: 20px 16px; text-align: center; background: var(--desk-reader); }
.approach-cycle-node h3 { margin: 0; font-size: 18px; }
.approach-cycle .approach-section:not(:last-child) .approach-cycle-node::after { content: "↓"; position: absolute; top: 100%; left: 50%; height: 34px; line-height: 34px; transform: translateX(-50%); color: #66716a; }
.approach-cycle-prose p { margin: 0; }
.approach-cycle-return { position: absolute; top: 30px; bottom: 30px; left: 28px; width: 30px; border: 1px solid #66716a; border-right: 0; }
.approach-cycle-return::before { content: "→"; position: absolute; right: -2px; top: -16px; color: #66716a; }
.approach-cycle-return span { position: absolute; top: 50%; left: -26px; transform: translateY(-50%); writing-mode: vertical-rl; font-size: 13px; letter-spacing: .1em; background: var(--desk-reader); padding-block: 10px; }
@media (max-width: 700px) {
  .approach-cycle-rows { padding-left: 40px; }
  .approach-cycle .approach-section { grid-template-columns: minmax(0,1fr); gap: 12px; padding-bottom: 42px; }
  .approach-cycle-node { padding: 14px 12px; }
  .approach-cycle .approach-section:not(:last-child) .approach-cycle-node::after { display: none; }
  .approach-cycle .approach-section:not(:last-child)::after { content: "↓"; position: absolute; bottom: 3px; left: 50%; color: #66716a; }
  .approach-cycle-return { left: 20px; width: 20px; top: 25px; bottom: 25px; }
  .approach-cycle-return span { left: -23px; }
}

/* Internal relationships share the row width, rather than shrinking the prose. */
.approach-collaboration { grid-column: 1 / -1; border: 1px solid #66716a; padding: 20px; min-width: 0; }
.approach-collaboration-roles { display: flex; align-items: center; gap: 12px; }
.approach-collaboration-role { flex: 1; min-width: 0; border: 1px solid #66716a; padding: 12px; text-align: center; }
.approach-collaboration-role b,.approach-collaboration-role span { display: block; }
.approach-collaboration-role b { font-size: 18px; }
.approach-collaboration-exchange { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; font-size: 14px; }
.approach-collaboration-arrow { font-size: 26px; line-height: 1.2; }
.approach-collaboration-constraint { text-align: center; border-bottom: 1px solid #66716a; margin: 18px 0 0; padding-bottom: 16px; }
.approach-collaboration-label { text-align: center; margin: 16px 0 10px; }
.approach-collaboration-workflow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 0; list-style: none; padding: 0; margin: 0; }
.approach-collaboration-workflow li { display: flex; align-items: center; }
.approach-collaboration-workflow li:not(:last-child)::after { content: "→"; margin: 0 12px; color: #66716a; }
@media (max-width: 700px) {
  .approach-collaboration { padding: 16px; }
  .approach-collaboration-roles { flex-direction: column; gap: 8px; }
  .approach-collaboration-role { width: 100%; box-sizing: border-box; }
  .approach-collaboration-exchange { flex-direction: row; gap: 10px; }
  .approach-collaboration-arrow { transform: rotate(90deg); }
  .approach-collaboration-workflow { flex-direction: column; align-items: center; gap: 0; }
  .approach-collaboration-workflow li { flex-direction: column; }
  .approach-collaboration-workflow li:not(:last-child)::after { content: "↓"; margin: 5px 0; }
}

@media (min-width: 701px) {
  .approach-cycle .approach-section-expanded .approach-cycle-node::after { display: none; }
  .approach-cycle .approach-section-expanded:not(:last-child)::after { content: "↓"; position: absolute; bottom: 0; left: 16.7%; height: 34px; line-height: 34px; color: #66716a; }
}

.approach-collaboration-supported { border: 0; padding: 0; }
.approach-collaboration-platform { border: 1px solid #66716a; padding: 22px; }
.approach-collaboration-support-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 8px 18px; margin: 0 0 22px; }
.approach-collaboration-support-title b { font-size: 18px; }
.approach-collaboration-support-text { text-align: center; margin: 18px 0 0; }
.approach-collaboration-supported > .approach-collaboration-label { margin-top: 22px; }
@media (max-width: 700px) {
  .approach-collaboration-platform { padding: 16px; }
  .approach-collaboration-support-title { flex-direction: column; align-items: center; gap: 4px; }
}

.approach-diagram { border-left: 0; }
.approach-diagram .approach-section { margin: 0; padding: 0; }

/* A shared foundation supports the whole collaboration, never one pillar per
   participant. Keep type readable on narrow screens instead of shrinking art. */
.approach-layout:has(.approach-foundation) { border-color: #dcded2; border-radius: 12px; box-shadow: none; overflow: hidden; }
.approach-body:has(.approach-foundation) { padding: clamp(24px, 4vw, 56px); container: approach-figure / inline-size; }
.approach-foundation {
  --foundation-ink: #496752;
  --foundation-line: #91a68a;
  --collaboration-human: #ac826d;
  --collaboration-ai: #799990;
  max-width: 840px; margin: 10px auto 12px; color: var(--desk-ink); line-height: 1.5;
}
.approach-foundation-collaboration { display: grid; grid-template-columns: 100px minmax(30px,1fr) 112px minmax(30px,1fr) 100px; align-items: start; gap: 16px; padding: 16px 32px 0; }
.approach-foundation-role,.approach-foundation-outcome { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 17px; white-space: nowrap; }
.approach-foundation-role svg { width: 64px; height: 64px; }
.approach-foundation-role.is-human svg { color: var(--collaboration-human); }
.approach-foundation-role.is-ai svg { color: var(--collaboration-ai); }
.approach-foundation-outcome svg { width: 76px; height: 64px; color: #7d8b7a; }
.approach-foundation-outcome span { font-weight: 500; }
.approach-foundation-exchange { position: relative; height: 64px; }
.approach-foundation-exchange i { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px solid; }
.approach-foundation-forward { top: 21px; color: var(--collaboration-human); }
.approach-foundation-return { top: 47px; color: var(--collaboration-ai); }
.approach-foundation-exchange i::after { content: ''; position: absolute; width: 6px; height: 6px; top: -4px; border-top: 1.5px solid; border-right: 1.5px solid; }
.approach-foundation-forward::after { right: 0; transform: rotate(45deg); }
.approach-foundation-return::after { left: 0; transform: rotate(-135deg); }
.approach-foundation-exchange > svg { position: absolute; left: calc(50% - 12px); top: 35px; width: 24px; height: 24px; color: var(--collaboration-ai); background: var(--desk-reader); }
.approach-foundation-support { position: relative; height: 92px; margin: 24px 80px 0; color: var(--foundation-ink); }
.approach-foundation-support::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 18px; border: 1.5px solid var(--foundation-line); border-top: 0; border-radius: 0 0 12px 12px; }
.approach-foundation-lift { position: absolute; left: 50%; top: 18px; bottom: 0; border-left: 1.5px solid var(--foundation-line); }
.approach-foundation-lift::before { content: ''; position: absolute; left: -5px; top: 2px; width: 7px; height: 7px; border-top: 1.5px solid var(--foundation-line); border-left: 1.5px solid var(--foundation-line); transform: rotate(45deg); }
.approach-foundation-support-label { position: absolute; top: 40px; left: calc(50% + 14px); font-size: 14px; white-space: nowrap; }
.approach-foundation-base { position: relative; border: 1px solid #b9cbb2; border-radius: 14px; background: var(--desk-selected, #e4eddf); padding: 26px 28px 30px; color: var(--foundation-ink); }
.approach-foundation-title { display: block; text-align: center; font-size: 28px; font-weight: 600; letter-spacing: .06em; }
.approach-foundation-pillars { display: flex; justify-content: center; align-items: center; gap: clamp(32px, 8vw, 100px); margin-top: 22px; }
.approach-foundation-pillar { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 500; white-space: nowrap; }
.approach-foundation-pillar svg { width: 40px; height: 40px; flex: none; }
@media (max-width: 1000px) {
  .approach-body:has(.approach-foundation) { padding: 24px 16px; }
}
@container approach-figure (max-width: 600px) {
  .approach-foundation { margin: 8px auto; }
  .approach-foundation-collaboration { grid-template-columns: 46px minmax(16px,1fr) 68px minmax(16px,1fr) 46px; gap: 8px; padding: 8px 0 0; }
  .approach-foundation-role,.approach-foundation-outcome { font-size: 14px; gap: 6px; }
  .approach-foundation-role svg { width: 46px; height: 50px; }
  .approach-foundation-outcome svg { width: 60px; height: 50px; }
  .approach-foundation-exchange { height: 50px; }
  .approach-foundation-forward { top: 17px; }
  .approach-foundation-return { top: 37px; }
  .approach-foundation-exchange > svg { top: 27px; left: calc(50% - 10px); width: 20px; height: 20px; }
  .approach-foundation-support { margin: 22px 22px 0; height: 80px; }
  .approach-foundation-support-label { font-size: 13px; top: 34px; left: calc(50% + 10px); }
  .approach-foundation-base { padding: 22px 12px 24px; border-radius: 12px; }
  .approach-foundation-title { font-size: 25px; }
  .approach-foundation-pillars { gap: 26px; margin-top: 18px; }
  .approach-foundation-pillar { font-size: 16px; gap: 6px; }
  .approach-foundation-pillar svg { width: 30px; height: 30px; }
}

/* Passive work graphs use native text and reroute arrows after container reflow. */
.approach-layout:has(.approach-workflow) { border-color: #dcded2; border-radius: 12px; box-shadow: none; }
.approach-body:has(.approach-workflow) { container: approach-work / inline-size; }
.approach-workflow { --workflow-line: #8c9d86; margin: 8px auto; max-width: 1160px; line-height: 1.5; }
.approach-workflow-graph { position: relative; display: grid; grid-template-columns: repeat(var(--workflow-groups), minmax(0,1fr)); gap: 72px; padding: 8px 0; }
.approach-workflow-group { display: flex; flex-direction: column; gap: 48px; min-width: 0; }
.approach-workflow-group-title { font-size: 15px; color: #496752; text-align: center; margin-bottom: -24px; }
.approach-workflow-row { display: grid; grid-template-columns: repeat(var(--workflow-columns),minmax(0,1fr)); gap: 16px; align-items: stretch; }
.approach-workflow-node { position: relative; z-index: 1; border: 1px solid #c5cfbf; border-radius: 8px; padding: 20px 18px; min-width: 0; background: #f4f5ec; }
.approach-workflow-node-title { display: flex; align-items: center; gap: 12px; }
.approach-workflow-node-title svg { flex: 0 0 30px; width: 30px; height: 30px; color: #6f8b71; }
.approach-workflow-node-title strong,.approach-workflow-node-title a { font-size: 19px; font-weight: 650; color: var(--desk-ink); }
.approach-workflow-node-title a { text-decoration-color: #8a9d80; }
.approach-workflow-node p { font-size: 16px; margin: 10px 0 0; color: #56604f; }
.approach-workflow-node.is-paper { border-radius: 3px 20px 3px 3px; background: #fffdf6; box-shadow: 4px 4px 0 #e5e9db; }
.approach-workflow-node.is-snapshot { background: #fffdf6; border-radius: 3px; padding: 16px 12px; }
.approach-workflow-node.is-snapshot .approach-workflow-node-title { flex-direction: column; align-items: start; gap: 6px; }
.approach-workflow-node.is-snapshot .approach-workflow-node-title strong { font-size: 17px; }
.approach-workflow-items { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin: 12px 0 0; font-size: 15px; color: #496752; }
.approach-workflow-items li { padding: 2px 7px; border: 1px solid #d5dccb; border-radius: 4px; }
.approach-workflow-cycle { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 15px; color: #496752; margin-top: 16px; padding: 10px 6px 18px; border: 1px solid #c5cfbf; border-radius: 20px; justify-content: center; }
.approach-workflow-cycle-back { position: absolute; bottom: -8px; left: 45%; padding-inline: 5px; background: #f4f5ec; font-size: 24px; line-height: 1; }
.approach-workflow-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.approach-workflow-lines path { fill: none; stroke: var(--workflow-line); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.approach-workflow-edge-label { position: absolute; transform: translate(-50%,-50%); z-index: 2; background: var(--desk-reader); color: #496752; padding: 4px 7px; white-space: nowrap; font-size: 14px; line-height: 1.4; }
.approach-workflow-feedback { border: 1px dashed #a8b89d; border-radius: 8px; padding: 16px 20px; margin-top: 36px; background: #edf1e5; }
.approach-workflow-feedback-steps,.approach-workflow-feedback-targets { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
.approach-workflow-feedback-steps strong { font-size: 16px; font-weight: 600; }
.approach-workflow-feedback-targets { margin-top: 10px; font-size: 15px; color: #496752; }
.approach-workflow-feedback-targets a { color: #496752; }
.approach-workflow-note { text-align: center; color: #56604f; font-size: 15px; }
.approach-workflow-methods { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; font-size: 15px; }
.approach-workflow a:focus-visible { outline: 2px solid #496752; outline-offset: 4px; }
@container approach-work (max-width: 800px) {
  .approach-workflow-graph { grid-template-columns: minmax(0,1fr); gap: 48px; max-width: 540px; margin-inline: auto; }
  .approach-workflow-group { gap: 48px; }
  .approach-workflow-group-title { text-align: left; }
  .approach-workflow-node { padding: 18px; }
  .approach-workflow-feedback { padding: 16px 12px; }
}
.approach-workflow-graph.is-long-flow { gap: 34px; }
.approach-workflow-graph.is-long-flow .approach-workflow-node { padding: 18px 14px; }
.approach-workflow-graph.is-long-flow .approach-workflow-node-title { gap: 8px; }
.approach-workflow-graph.is-long-flow .approach-workflow-node-title svg { flex-basis: 26px; width: 26px; height: 26px; }
@container approach-work (max-width: 800px) {
  .approach-workflow-graph.is-long-flow { grid-template-columns: minmax(0,1fr); gap: 48px; max-width: 540px; }
}
.approach-workflow { position: relative; }
.approach-workflow-graph { padding-inline: 14px; }
.approach-workflow-feedback { position: relative; z-index: 1; }
.approach-workflow-return-lines path { stroke-dasharray: 4 5; stroke-width: 1.2; opacity: .8; }

#screenplay-workspace{min-width:0;padding-top:22px}
.screenplay-page-heading{padding:21px 24px;background:var(--desk-ink,#282a25);color:#f8f4e9}
.screenplay-page-heading p{margin:0 0 7px;color:#df766a;font-size:10px;font-weight:700;letter-spacing:.16em}
.screenplay-page-heading h2{margin:0;font-size:clamp(22px,2.3vw,30px);line-height:1.25}
.screenplay-page-heading span{display:block;margin-top:7px;color:#cec9bb;font-size:12px;line-height:1.5}
.screenplay-board{min-width:0;padding:8px 0 22px;background:rgba(248,244,233,.7)}
.screenplay-versions,.screenplay-episodes{display:flex;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-gutter:stable}
.screenplay-versions{gap:8px;padding:12px 4px 14px;border-bottom:1px solid var(--desk-line,#d4cbb9)}
.screenplay-version{flex:none;padding:8px 15px;border:1px solid var(--desk-line,#d4cbb9);background:#f9f5eb;color:#373930;text-align:left;font-size:12px;font-weight:600;line-height:1.4;cursor:pointer;white-space:nowrap}
.screenplay-version.active{border-color:var(--desk-red,#9a4639);background:var(--desk-ink,#282a25);color:#fff9ed}
.screenplay-episodes{gap:0;margin:9px 0 12px;border:1px solid var(--desk-line,#d4cbb9);background:#eee9dd}
.screenplay-episode{flex:0 0 142px;min-width:0;min-height:88px;padding:10px 11px;border:0;border-right:1px solid var(--desk-line,#d4cbb9);border-bottom:3px solid transparent;background:transparent;color:#35372f;text-align:left;cursor:pointer}
.screenplay-episode:hover,.screenplay-episode:focus-visible{background:#f7f1e5}
.screenplay-episode.active{border-bottom-color:var(--desk-red,#9a4639);background:#742d25;color:#fff7ec}
.screenplay-episode-meta{display:flex;justify-content:space-between;gap:5px;margin-bottom:9px;font-size:10px;white-space:nowrap}
.screenplay-episode strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.35}
.screenplay-episode-count{display:block;margin-top:7px;font-size:10px;color:#716b61}
.screenplay-episode.active .screenplay-episode-count{color:#f2ded4}
.screenplay-overview{min-width:0;min-height:95px;padding:15px 18px;margin-bottom:12px;border:1px solid var(--desk-line,#d4cbb9);background:#e8e1d3}
.screenplay-overview-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 18px;font-size:12px}
.screenplay-overview-heading strong{font-size:14px}
.screenplay-overview-heading span{color:#616156}
.screenplay-summary{max-width:96ch;margin:11px 0 0;font-size:13px;line-height:1.65}
.screenplay-stage{display:grid;grid-template-columns:clamp(230px,25%,320px) minmax(0,1fr);gap:12px;min-width:0;height:min(73dvh,840px);min-height:550px}
.screenplay-scene-side,.screenplay-reading{min-width:0;border:1px solid var(--desk-line,#d4cbb9);background:#f4f0e6}
.screenplay-scene-side{display:flex;flex-direction:column;overflow:hidden}
.screenplay-scene-side header{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:12px 13px;border-bottom:1px solid var(--desk-line,#d4cbb9);font-size:11px}
.screenplay-scene-side h3{margin:0;font-size:13px}
.screenplay-scene-side header span{color:#716d61}
#screenplay-scene-index{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.screenplay-scene-button{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:start;gap:5px 7px;width:100%;min-height:68px;padding:10px 11px;border:0;border-bottom:1px solid var(--desk-line,#d4cbb9);background:transparent;color:#2d302b;text-align:left;cursor:pointer}
.screenplay-scene-button:hover,.screenplay-scene-button:focus-visible{background:#eee5d5}
.screenplay-scene-button.active{background:#fff9ec;box-shadow:inset 3px 0 var(--desk-red,#9a4639)}
.screenplay-scene-code{font-size:10px;color:#8a5549}
.screenplay-scene-button strong{min-width:0;font-size:12px;line-height:1.45;font-weight:600;overflow-wrap:anywhere}
.screenplay-scene-button small{font-size:10px;color:#6d6b62;white-space:nowrap}
.screenplay-scene-count{grid-column:2 / -1;color:#756b61;font-size:10px}
.screenplay-reading{display:flex;flex-direction:column;overflow:hidden;background:#fbf8ef}
.screenplay-reading-head{display:flex;align-items:start;justify-content:space-between;gap:16px;padding:17px 20px;border-bottom:1px solid var(--desk-line,#d4cbb9)}
.screenplay-reading-head small{display:block;margin-bottom:4px;color:var(--desk-red,#9a4639);font-size:10px;font-weight:700;letter-spacing:.12em}
.screenplay-reading-head h2{margin:0;font-size:18px;line-height:1.4}
.screenplay-reading-head p{margin:5px 0 0;color:#696a61;font-size:12px;line-height:1.5}
#screenplay-comments{flex:none;padding:7px 11px;border:1px solid #ad9e89;background:transparent;color:#574839;font-size:11px;cursor:pointer}
#screenplay-comments:hover{border-color:var(--desk-red,#9a4639);color:var(--desk-red,#9a4639)}
#screenplay-reader{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:22px clamp(18px,3vw,48px) 45px}
#screenplay-reader .source-text{max-width:82ch;font-size:17px;line-height:1.9}
#screenplay-reader .source-text p{margin-bottom:18px}
.screenplay-scene-empty{margin:28px 0;color:#79756b;font-size:13px}
.screenplay-comment-scope{display:block;margin:5px 0;color:#755948!important;letter-spacing:normal!important}
.screenplay-comment-end{margin-bottom:8px;border:0;background:transparent;padding:0;color:var(--desk-red,#9f382e);font-size:12px;text-decoration:underline}
@media(max-width:700px){
  #screenplay-workspace{padding-top:18px}
  .screenplay-page-heading{padding:16px}
  .screenplay-board{padding-top:2px}
  .screenplay-versions{padding-inline:0}
  .screenplay-episode{flex-basis:125px}
  .screenplay-overview{padding:12px;margin-bottom:10px}
  .screenplay-stage{display:block;height:auto;min-height:0}
  .screenplay-scene-side{max-height:230px;margin-bottom:10px}
  .screenplay-reading{min-height:420px;overflow:visible}
  #screenplay-reader{overflow:visible;padding:19px 16px 35px}
  #screenplay-reader .source-text{font-size:16px}
  .screenplay-reading-head{padding:14px;gap:8px}
  .screenplay-reading-head h2{font-size:16px}
}

/* Preserve version / episode / scene navigation in the compilation visual language. */
#story-creation-shell:has(>#screenplay-workspace:not([hidden])){padding-bottom:0}
.screenplay-page-heading{padding:0 0 18px;background:transparent;color:#282a25}
.screenplay-page-heading p{color:var(--desk-red)}
.screenplay-page-heading h2{font-size:19px;font-weight:600}
.screenplay-page-heading span{color:var(--desk-muted);font-size:11px;line-height:1.55}
.screenplay-board{padding-bottom:0;background:transparent}
.screenplay-versions{padding:12px 0;gap:8px}
.screenplay-versions .source-button{width:auto;min-height:40px;margin:0;padding:10px 15px;background:#292b25;border:1px solid rgba(255,255,255,.09);color:#d9d5ca;font-size:13px}
.screenplay-versions .source-button.active{background:var(--desk-gold);border-color:var(--desk-gold);color:#261b18}
.screenplay-episodes{gap:8px;margin:12px 0;border:0;background:transparent;padding-bottom:4px}
.screenplay-episodes .source-button{flex-basis:150px;width:auto;min-width:0;min-height:96px;margin:0;padding:12px 14px;border:1px solid rgba(255,255,255,.09);background:#292b25;color:#d9d5ca}
.screenplay-episodes .source-button.active{background:var(--desk-gold);border-color:var(--desk-gold);color:#261b18}
.screenplay-episodes .source-button strong{font-size:14px}
.screenplay-episode-count{color:#d7ad84}
.screenplay-episode.active .screenplay-episode-count{color:#594333}
.screenplay-overview{min-height:0;padding:16px 19px;background:rgba(248,244,233,.8)}
.screenplay-stage{grid-template-rows:minmax(0,1fr);align-items:stretch;grid-template-columns:276px minmax(0,1fr);gap:0;height:calc(100dvh - 70px);min-height:460px;border:1px solid var(--desk-line);box-shadow:0 22px 55px #2a231b14}
.screenplay-scene-side,.screenplay-reading{min-height:0;border:0}
.screenplay-scene-side{background:#f8f4e9}
.screenplay-scene-side>header{padding:22px 19px 18px;border:0}
.screenplay-scene-side h3{font-size:19px;font-weight:600}
#screenplay-scene-index{padding:10px}
.screenplay-scene-button.source-button{display:grid;min-height:74px;margin:0 0 8px;padding:13px 14px;border:1px solid rgba(255,255,255,.09);background:#292b25;color:#d9d5ca}
.screenplay-scene-button.source-button:hover{border-color:rgba(222,118,106,.55);background:#30322b}
.screenplay-scene-button.source-button.active{background:var(--desk-gold);border-color:var(--desk-gold);color:#261b18;box-shadow:none}
.screenplay-scene-button.source-button strong{font-size:14px}
.screenplay-scene-button .screenplay-scene-code,.screenplay-scene-button small,.screenplay-scene-count{color:#d7ad84}
.screenplay-scene-button.active .screenplay-scene-code,.screenplay-scene-button.active small,.screenplay-scene-button.active .screenplay-scene-count{color:#594333}
.screenplay-reading{background:var(--desk-reader)}
.screenplay-reading-head.text-reader-head{flex:none;min-height:104px;padding:20px 24px;border:0;background:var(--desk-ink);color:#f8f4e9}
.screenplay-reading-head.text-reader-head>div{min-width:0;overflow-wrap:anywhere}
.screenplay-reading-head.text-reader-head small{margin:0;color:#df766a;font:700 10px/1.3 Arial,sans-serif;letter-spacing:.1em}
.screenplay-reading-head.text-reader-head h2{margin:7px 0 0;font-size:21px;font-weight:600;line-height:1.25}
.screenplay-reading-head.text-reader-head p{margin:7px 0 0;color:#97988f;font-size:11px;line-height:1.45}
#screenplay-comments{border-color:rgba(255,255,255,.23);color:#e5ddd0}
#screenplay-reader{padding:34px clamp(24px,5vw,68px) 75px;background:var(--desk-reader)}
#screenplay-reader .source-text,.novel-workspace #source-view .source-text{font-size:19px;line-height:2.05}
#screenplay-reader .source-text p,.novel-workspace #source-view .source-text p{margin-bottom:22px}
@media(max-width:900px) and (min-width:701px){.screenplay-stage{grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:700px){
  .screenplay-page-heading{padding:0 0 14px}
  .screenplay-episodes .source-button{flex-basis:140px}
  .screenplay-stage{display:block;height:auto;min-height:0}
  .screenplay-scene-side{max-height:min(36dvh,280px);margin:0}
  .screenplay-scene-side>header{padding:12px}
  #screenplay-scene-index{padding:6px 10px}
  .screenplay-reading{height:calc(100dvh - 122px);min-height:400px;overflow:hidden}
  .screenplay-reading-head.text-reader-head{padding:14px;min-height:90px}
  .screenplay-reading-head.text-reader-head h2{font-size:16px}
  #screenplay-reader{overflow-y:auto;padding:24px 18px 60px}
  #screenplay-reader .source-text,.novel-workspace #source-view .source-text{font-size:16px}
}

.production-heading{display:flex;gap:24px;justify-content:space-between;align-items:start;margin-bottom:24px}.production-heading h1{margin:6px 0 12px}.production-heading p{color:#65756a;max-width:64em;line-height:1.7}.production-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.production-toolbar input[type=search]{min-width:260px}.production-board{display:grid;grid-template-columns:260px minmax(0,1fr);gap:24px;margin:20px 0}.production-index{max-height:78vh;position:sticky;top:90px;overflow:auto;background:#f4f4ed;border:1px solid #dde2d7;border-radius:12px;padding:12px;align-self:start}.production-index h3{font-size:13px;margin:18px 6px 8px;color:#647566}.production-index button{display:block;width:100%;text-align:left;padding:10px;border:0;border-radius:6px;background:transparent;line-height:1.5}.production-index button.active{background:#dceadf;color:#174b34}.production-index small{display:block;color:#79847c;font-size:11px}.production-reader{min-width:0;background:white;border:1px solid #e1e6df;border-radius:12px;padding:26px}.production-reader h2{margin:4px 0 14px}.production-reader h3{margin-top:24px;border-bottom:1px solid #e5e9e2;padding-bottom:9px}.production-reader p{line-height:1.85;white-space:pre-wrap}.production-meta{color:#748279;font-size:12px;overflow-wrap:anywhere}.production-reader button,.production-heading button,.production-toolbar button{border:1px solid #ccd7ca;background:#f5f8f3;border-radius:6px;padding:7px 11px;cursor:pointer}.production-reader label{display:block;margin:12px 0 6px;font-size:13px}.production-reader input,.production-reader select,.production-reader textarea,.production-toolbar input,.production-toolbar select{max-width:100%;padding:8px;border:1px solid #ccd7ca;border-radius:5px;background:white}.production-reader textarea{display:block;width:100%;box-sizing:border-box;min-height:100px;line-height:1.6}.production-reader audio,.production-reader video{width:100%;max-height:65vh;margin:12px 0}.production-reader .structure-figure{margin:16px 0}.production-reader .structure-visual-stage img{max-height:70vh;object-fit:contain}.production-reader .structure-visual-stage{max-width:100%;width:fit-content;margin:auto}.production-compare{display:grid;grid-template-columns:1fr 1fr;gap:20px}.production-compare img{width:100%;height:auto;max-height:60vh;object-fit:contain}.production-pill{display:inline-block;padding:3px 9px;border-radius:20px;background:#e6efe5;color:#365940;font-size:12px;margin:2px 6px 2px 0}.production-issue{background:#fbecda;color:#8b5121}.production-fields{display:grid;grid-template-columns:110px 1fr;gap:10px 16px;margin:18px 0}.production-fields dt{font-size:13px;color:#6b7b6f}.production-fields dd{margin:0;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.production-ref{display:inline-block;margin:3px 6px 3px 0;color:#365e46;font-size:13px}.production-need{border:1px solid #dce4d8;border-radius:8px;padding:15px;margin:12px 0}.production-need .production-toolbar{margin-top:10px}.production-editor{border:1px solid #cbd8c9;padding:16px;background:#f7faf5;margin:18px 0}.production-reader pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f6f7f3;padding:15px;font-size:12px}
@media(max-width:1050px){.production-board{grid-template-columns:200px minmax(0,1fr)}.production-reader{padding:18px}.production-heading{display:block}}
@media(max-width:750px){.production-board{grid-template-columns:1fr}.production-index{position:static;max-height:220px}.production-fields{grid-template-columns:1fr;gap:4px}.production-fields dd{margin-bottom:12px}.production-compare{grid-template-columns:1fr}.production-reader{padding:14px}}

.production-filters{padding:18px 20px;border:1px solid #d4d9ce;border-radius:10px;background:#f5f5ef}
.production-filters .production-toolbar{justify-content:space-between;gap:12px}
.production-filter-search{display:flex;align-items:center;gap:16px;flex:1;max-width:620px;font-size:13px;font-weight:600}
.production-filter-search input[type=search]{flex:1;min-width:0;width:100%;font-weight:400}

.production-filter-group{display:grid;grid-template-columns:90px minmax(0,1fr);align-items:start;gap:10px;margin-top:12px}
.production-filter-label{padding-top:10px;font-size:13px;color:#5d6b60}
.production-filter-options{display:flex;flex-wrap:wrap;gap:8px}
.production-filter-chip{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;min-height:38px;border:1px solid #ccd3c7;border-radius:5px;background:#fafaf5;color:#354239;font:inherit;font-size:13px;line-height:1.5;cursor:pointer}
.production-filter-count{padding:0 5px;min-width:22px;box-sizing:border-box;border-radius:3px;background:#e6e9df;color:#546251;text-align:center;font-size:12px;font-variant-numeric:tabular-nums}
.production-filter-chip:hover{border-color:#80957e;background:#eff3e9}
.production-filter-chip:focus-visible{outline:2px solid #8f3930;outline-offset:3px}
.production-filter-chip.is-zero{color:#7d857b;border-color:#d7dccf}
.production-filter-chip.is-zero .production-filter-count{background:#ebeee6;color:#7d857b}
.production-filter-chip.is-active{border-color:#903d34;background:#f7ece5;color:#81382f}
.production-filter-chip.is-active .production-filter-count{background:#903d34;color:white}
.production-filter-summary{margin:16px 0 0;padding-top:12px;border-top:1px solid #dde1d6;font-size:13px;line-height:1.6;color:#52634f}
.production-filters button:disabled{opacity:.5;cursor:default}
@media(max-width:750px){.production-filters{padding:14px}.production-filter-search{flex-basis:100%;max-width:none;gap:10px}.production-filter-search>span{white-space:nowrap}.production-filter-group{grid-template-columns:1fr;gap:7px}.production-filter-label{padding-top:0}.production-filter-chip{gap:8px;padding:7px 10px}}

.production-index .production-state-count{display:inline-block;margin-left:8px;font-size:11px;color:#65776a;white-space:nowrap}
.production-entity-basics{padding-bottom:22px;border-bottom:1px solid #d8e1d5}.production-entity-basics h2{margin:8px 0 14px}.production-entity-basics h3{font-size:15px;margin:16px 0 6px}.production-entity-basics ul{margin:6px 0;padding-left:22px}.production-entity-review,.production-entity-references{margin:14px 0;color:#536957}.production-entity-review summary,.production-entity-references summary{cursor:pointer;font-size:13px}.production-entity-context{margin:22px 0;padding:0 0 20px;border-bottom:1px solid #d8e1d5}
.production-entity-context .production-entity-title{margin:0 0 12px;font-weight:600;color:#365940}
.production-entity-group{display:flex;align-items:start;gap:16px;margin-top:14px}
.production-entity-label{flex:0 0 90px;font-size:12px;color:#647566;padding-top:8px}
.production-entity-options{display:flex;flex-wrap:wrap;gap:8px}
.production-entity-context button{font-size:13px;text-align:left;line-height:1.5}
.production-entity-context button[aria-pressed=true]{background:#dceadf;border-color:#779681;color:#174b34}
.production-common-settings{margin:18px 0;padding:14px;border:1px solid #dce4d8;border-radius:8px;background:#f8faf6}.production-common-settings h3{margin:0 0 8px;font-size:14px}
@media(max-width:750px){.production-entity-group{display:block}.production-entity-label{display:block;padding:0;margin-bottom:8px}}

.entity-review-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex-wrap:wrap}.entity-review-header h2{margin:9px 0}.entity-review-header .production-toolbar{margin-top:8px;gap:7px}.production-reader .entity-review-accept{background:#315740;color:white;border-color:#315740}.production-reader button:disabled{opacity:.55;cursor:default}.entity-review-basics{padding:0 0 20px;border-bottom:1px solid #d8e1d5}.entity-review-basics h3{margin:0 0 8px}.entity-review-basics p{margin:7px 0}.entity-review-notes h4{font-size:13px;color:#647566;margin:15px 0 5px}.entity-review-notes p{font-size:14px;margin:5px 0}.production-entity-options button small{display:block;font-size:11px;color:#68776a;margin-top:4px}.entity-review-description p{margin:6px 0 10px;font-size:14px;line-height:1.85}.entity-review-text [data-block-id]{white-space:pre-wrap}.entity-review-secondary{margin:22px 0;padding-top:16px;border-top:1px solid #e2e6dd;color:#536851}.entity-review-secondary summary{font-size:13px;cursor:pointer;line-height:1.8}.entity-review-secondary h4{margin:16px 0 7px}.entity-review-secondary p{font-size:13px}.entity-review-secondary button{margin:10px 8px 0 0}.entity-review-description .entity-review-secondary{margin:16px 0}.entity-review-media{min-width:0}.entity-review-media-pane .structure-figure{margin:0 0 10px}.entity-review-media-pane .structure-visual-stage img{max-height:460px}.entity-review-media-pane .structure-figure-head{display:none}.entity-review-media-pane>a{font-size:12px}.entity-review-media-pane input[type=number]{width:100px}.entity-review-media-pane .production-toolbar{font-size:12px}.entity-review-comment-group{margin:20px 0 10px;font-size:13px;color:#49634f}.entity-review-crop{fill:#31574018;stroke:#315740;stroke-width:.6;stroke-dasharray:2 1;pointer-events:none}
@media(max-width:1200px){.entity-review-media-pane .structure-visual-stage img{max-height:440px}}
@media(max-width:1100px){.entity-review-board{grid-template-columns:1fr}.entity-review-board .production-index{position:static;max-height:180px}}
@media(max-width:750px){.entity-review-header .production-toolbar{width:100%}}

/* Entity symbols are UI illustrations, never production assets or references. */
[data-entity-type=character]{--entity-ink:#8a5141;--entity-tint:#f3e9e1}
[data-entity-type=space]{--entity-ink:#527365;--entity-tint:#e9f0e9}
[data-entity-type=prop]{--entity-ink:#8a713d;--entity-tint:#f3eedf}
[data-entity-type=song]{--entity-ink:#576e8b;--entity-tint:#e9edf3}
.production-entity-icon{display:block;width:20px;height:20px;flex:0 0 auto;color:var(--entity-ink,currentColor)}
.production-entity-badge{display:inline-flex;align-items:center;gap:6px;background:var(--entity-tint);color:var(--entity-ink)}
.production-entity-badge .production-entity-icon{width:15px;height:15px}
.production-filter-chip .production-entity-icon{width:17px;height:17px}
.entity-review-board .production-index button[data-entity-type]{position:relative;padding-left:52px;min-height:60px}
.production-entity-avatar{position:absolute;left:9px;top:12px;display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--entity-tint)}
.production-entity-avatar .production-entity-icon{width:21px;height:21px}
.entity-review-notes.entity-review-unknowns{margin-top:18px;padding:12px 16px;border-left:3px solid #bba579;background:#faf7ee;border-radius:0 6px 6px 0}
.entity-review-unknowns h4{margin:0 0 4px;color:#79633e}







.entity-review-media{--entity-preview-height:min(460px,70vw)}
.entity-review-media-pane .structure-visual-viewport{height:var(--entity-preview-height);display:flex;align-items:center}
.entity-review-media-pane .structure-visual-stage img{max-height:var(--entity-preview-height);object-fit:contain}

.entity-review-media-pane>audio{display:block;width:100%;margin:10px 0}
.entity-review-media-pane>video{display:block;width:100%;max-height:var(--entity-preview-height)}

/* The breakdown has independent shot and context scroll regions. */
.breakdown-tabs{display:flex;gap:8px;margin:12px 0 20px;flex-wrap:wrap}.breakdown-tabs button.active{background:var(--accent,#72533b);color:white}
.breakdown-layout{display:grid;grid-template-columns:170px minmax(330px,1fr) minmax(330px,440px);gap:18px;height:calc(100vh - 230px);min-height:460px}
.breakdown-episodes,.breakdown-body,.breakdown-context{overflow:auto;min-width:0;overscroll-behavior:contain}.breakdown-episodes{display:flex;flex-direction:column;gap:8px}.breakdown-episodes button{text-align:left;flex-shrink:0}.breakdown-episodes .active{background:#eee5d9}
.breakdown-body{padding:0 10px 40px 0}.breakdown-context{border-left:1px solid #ddd3c5;padding:0 12px 32px 18px}.breakdown-context h2{font-size:18px}.breakdown-context .material-card{display:block}.breakdown-context .material-card>*{min-width:0}.breakdown-context .material-card-columns{display:block}
.breakdown-scene-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:20px 0 12px}.breakdown-scene-title{font-weight:700;text-align:left}.breakdown-shot{border:1px solid #dfd8ce;border-radius:10px;padding:16px;margin:10px 0;cursor:pointer;background:#fffdfa}.breakdown-shot.selected{border-color:#8c6b44;box-shadow:0 0 0 1px #8c6b44}.breakdown-shot header{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.breakdown-shot h3{font-size:17px;margin:0 0 12px}.breakdown-shot p{line-height:1.75;margin:8px 0}.breakdown-shot p b{color:#746b5e;font-weight:500}
.breakdown-entities{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:13px}.breakdown-entities p{margin:3px 0;color:#6f665c}.breakdown-needs{display:flex;flex-wrap:wrap;gap:6px;margin:16px 0}.breakdown-needs button{text-align:left;font-size:12px}.breakdown-shared{display:flex;gap:8px}
.breakdown-materials{display:grid;grid-template-columns:minmax(200px,280px) minmax(0,1fr);gap:24px}.breakdown-material-index{display:flex;flex-direction:column;gap:7px;max-height:70vh;overflow:auto}.breakdown-material-index button{text-align:left}.breakdown-material-index small{display:block;color:#736a60;margin-top:4px}
@media(max-width:1100px){.breakdown-layout{grid-template-columns:120px minmax(280px,1fr) minmax(270px,1fr);gap:10px}.breakdown-context{padding-left:10px}.breakdown-entities{grid-template-columns:1fr}}
@media(max-width:760px){.breakdown-layout{display:flex;flex-direction:column;height:auto;min-height:0}.breakdown-episodes{flex-direction:row;max-width:100%;overflow-x:auto}.breakdown-episodes button{min-width:150px}.breakdown-body{max-height:65vh;padding:0}.breakdown-context{max-height:70vh;border-left:0;border-top:1px solid #ddd3c5;padding:16px 0}.breakdown-materials{grid-template-columns:1fr}.breakdown-material-index{max-height:26vh}.breakdown-entities{grid-template-columns:1fr 1fr}.breakdown-shot{padding:12px}}

.breakdown-tabs button,.breakdown-layout button,.breakdown-material-index button{font:inherit;color:#4b4135;background:#faf7f1;border:1px solid #d9d0c3;border-radius:7px;padding:8px 11px;cursor:pointer;line-height:1.5}.breakdown-layout button:hover,.breakdown-material-index button:hover{background:#eee8de}.breakdown-layout button:focus-visible,.breakdown-tabs button:focus-visible{outline:2px solid #9a7850;outline-offset:2px}.breakdown-context .production-reader{padding:0;border:0;background:transparent}.breakdown-context pre{white-space:pre-wrap;overflow-wrap:anywhere}.breakdown-context .material-card{padding:12px}.breakdown-context .production-toolbar{flex-wrap:wrap}.breakdown-shot header span{white-space:nowrap}.breakdown-materials .production-reader{min-width:0}.breakdown-tabs button[aria-current=page]{background:#72533b;color:white}.breakdown-needs button{font-size:12px}.breakdown-episodes button.active{border-color:#9a7850;background:#ede5d8}@media(max-width:760px){.breakdown-tabs button{padding:8px}.breakdown-context{min-height:360px}.breakdown-shot h3{font-size:16px}.production-toolbar select,.production-toolbar input{max-width:100%}}

.audiovisual-edition{padding:1rem;margin-bottom:1rem;border:1px solid var(--border,#d9d9d9);border-radius:12px}.audiovisual-edition summary{cursor:pointer;font-weight:600}.shot-demands>select{max-width:100%;margin:1rem 0}.material-relations{margin:1rem 0}.material-relations section{padding:.7rem;border-top:1px solid var(--border,#ddd)}.material-compare-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.2rem}.material-compare-grid img,.material-compare-grid video{width:100%;max-height:55vh;object-fit:contain}.material-compare-grid audio,.material-compare-grid select{width:100%}.production-acceptance{display:inline-flex;margin:.3rem}
@media(max-width:700px){.material-compare-grid{grid-template-columns:1fr}.audiovisual-edition{padding:.6rem}}
.material-route-controls{display:grid;gap:.7rem;margin:.7rem 0}.material-route-controls label{display:grid;gap:.3rem}.material-route-controls select{width:100%;max-width:100%}

.review-surface{position:relative;border:1px solid #d8e1d6;border-left:3px solid #aac1ae;border-radius:8px;background:#fdfefb;padding:18px 18px 14px;transition:border-color .15s}
.review-surface:hover,.review-surface:focus-within{border-color:#6b9276;outline:none}
.review-cue{display:flex;width:18px;height:18px;position:absolute;right:7px;top:6px;color:#5c7e68;pointer-events:none}
.review-cue svg,.review-time-comments svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
.review-surface[data-review-kind=text]{margin:8px 0 18px;padding-top:22px}
.review-surface [data-block-id],.review-surface [data-structure-block]{white-space:pre-wrap}
.review-surface .review-surface{background:white}
.review-media-player{padding:24px 16px 14px;margin:10px 0 18px;min-width:0}
.review-media-player video{width:100%;max-height:460px}
.review-audio-controls{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.review-audio-clock{font:13px ui-monospace,monospace;font-variant-numeric:tabular-nums;flex:1;color:#48604d}
.review-timeline{position:relative;height:88px;cursor:crosshair;touch-action:none;background:#edf2ee;border:1px solid #d4dfd6;border-radius:5px;user-select:none}
.review-timeline:focus-visible{outline:2px solid #3c7950;outline-offset:3px}
.review-timeline>svg{position:absolute;width:100%;height:72px;top:8px;pointer-events:none;stroke:#678c73;stroke-width:1}
.review-wave-status{position:absolute;left:10px;top:35px;font-size:12px;color:#637769;pointer-events:none}
.review-time-selection{position:absolute;top:0;bottom:0;background:#4f8a7140;pointer-events:none}
.review-playhead{position:absolute;width:2px;top:0;bottom:0;background:#963e23;pointer-events:none}
.review-range-handle{position:absolute;top:0;height:100%;width:12px;min-width:0;padding:0;border:2px solid #427b58;background:#ffffffb0;transform:translateX(-50%);cursor:ew-resize;border-radius:4px;z-index:2}
.review-time-axis{display:flex;justify-content:space-between;font:12px ui-monospace,monospace;color:#68776a;margin:7px 0}
.review-range-tools{display:flex;gap:8px;align-items:end;flex-wrap:wrap;padding-top:10px;border-top:1px solid #d9e1d6}
.review-range-tools[hidden]{display:none}
.review-range-tools label{display:flex;flex-direction:column;font-size:11px;gap:4px;color:#47644d}
.review-range-tools input{width:110px;max-width:100%;box-sizing:border-box}
.review-time-comments{position:absolute;inset:0;pointer-events:none}
.review-time-comments button{pointer-events:auto;position:absolute;top:-11px;width:24px;height:24px;min-width:0;padding:4px;transform:translateX(-50%);border:1px solid #688f74;background:#fff;color:#43714f;z-index:3}
.review-time-comments button.active{background:#f9e1ac}
.entity-review-local-heading{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:14px 0 8px}
.entity-review-local-heading h3,.entity-review-local-heading h4{flex:1;margin:0}
.entity-review-version{max-width:180px;font-size:12px}
.entity-review-sources{display:flex;flex-wrap:wrap;gap:7px 14px;font-size:12px;margin:8px 0 14px}
.entity-review-sources a{color:#617461}








.entity-review-materials{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}

.entity-review-missing-image{display:grid;place-content:center;text-align:center;gap:12px;background:#eef1e9;border:1px dashed #bac8b6;border-radius:8px;max-height:400px;margin:12px 0;padding:20px;box-sizing:border-box}
.entity-review-missing-image svg{width:48px;height:48px;justify-self:center;color:#81967c}
.entity-review-missing-image small{color:#687661}
.entity-review-missing-audio{display:flex;gap:12px;align-items:center;background:#eff3f1;border:1px dashed #b5c6bd;border-radius:8px;padding:20px;margin:12px 0}
.entity-review-missing-audio svg{width:24px;height:24px}.entity-review-missing-audio span{flex:1}.entity-review-missing-audio small{color:#687661}
.entity-review-generation-issues{color:#915224;padding:10px 14px;background:#fbf5eb;border-radius:6px;font-size:13px}
.entity-review-generation-issues p{margin:4px 0}

.entity-review-description{margin-top:16px}
@media(max-width:600px){.review-surface{padding:23px 12px 12px}.review-audio-controls{gap:7px}.review-range-tools input{width:95px}.entity-review-missing-image{max-height:300px}}
.entity-review-sources summary{cursor:pointer;list-style:none;color:#5e7665}
.entity-review-sources summary::after{content:" ▾"}
.entity-review-sources details[open]{padding:8px;border:1px solid #dde4d7;border-radius:6px;flex-basis:100%}
.entity-review-sources details[open] summary{margin-bottom:8px}
.entity-review-sources details button{font-size:12px;margin:3px}
.entity-review-missing-image{max-height:none;width:100%}
.entity-review-missing-audio small{flex:1}
#production-reader{container-type:inline-size}
.material-card{min-width:0;padding:16px;border:1px solid #d7dfd2;border-radius:10px;background:#fff}
.material-card>section+section{border-top:1px solid #dce3d8;margin-top:18px;padding-top:14px}
.material-card pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.8 ui-monospace,monospace}
.material-card .entity-review-text{min-width:0;overflow-wrap:anywhere}
.material-card .structure-visual-stage{margin-inline:auto}
.material-card .structure-visual-stage img{max-height:none;height:auto}
.material-card .structure-visual{margin:12px 0}
.material-card .review-audio-controls{gap:6px}
.material-card h3{font-size:16px}.material-card h4{font-size:14px}
.material-plan,.material-actual-inputs{min-width:0}
.entity-relations{margin:20px 0 26px;min-width:0}
.relation-graph-viewport{border:1px solid #d7dfd2;border-radius:8px;background:#fafcf8;overflow:auto;max-height:540px}
.relation-graph{display:block;width:100%;min-width:1000px}
.relation-edge{stroke:#bdcbbd;stroke-width:1;fill:none}.relation-edge.primary{stroke:#68866b;stroke-width:2}
.relation-node-box{fill:white;stroke:#a6baa5;stroke-width:1.3}.relation-node-box.central{fill:#e4efdf;stroke:#517b5e;stroke-width:2}
.relation-node-name{font-size:14px;fill:#233e2c}.relation-group-title{font-size:13px;fill:#5e765e;font-weight:600}
.relation-text{background:#fafcf8;padding:8px!important;font-size:14px;min-height:50px}
.relation-caption{display:inline-block;user-select:text;max-width:100%}.relation-text p{margin:0 0 4px;line-height:1.45}.relation-text button,.relation-text select{font-size:11px;padding:2px 5px;max-width:100%}
.relation-text button,.relation-text select{display:block;margin-top:4px}
@container (max-width:719px){.entity-review-materials{grid-template-columns:minmax(0,1fr)}.material-card{padding:12px}}

.material-reference-dialog{width:min(900px,90vw);max-height:88vh;overflow:auto;border:1px solid #a5b9a4;border-radius:10px;padding:24px;color:var(--text,#26332b)}
.material-reference-dialog::backdrop{background:#15251a88}.material-reference-dialog .entity-review-local-heading{justify-content:space-between}
.material-reference-dialog img,.material-reference-dialog video{display:block;max-width:100%;max-height:65vh;margin:16px auto;object-fit:contain}
.material-reference-dialog audio{display:block;width:100%;margin:20px 0}.material-reference-dialog pre,.reference-text{white-space:pre-wrap;overflow-wrap:anywhere}
.reference-omission{color:var(--muted,#666);text-align:center;font-size:.9rem;margin:18px 0;border-block:1px dashed #ddd;padding:6px}
.material-reference{margin:4px 6px 4px 0;text-align:left;text-decoration:underline;text-underline-offset:3px}

.reference-crop-frame{position:relative;width:fit-content;max-width:100%;margin:auto}.reference-crop-frame img{margin:0}.reference-crop{position:absolute;box-sizing:border-box;border:2px solid #b27047;pointer-events:none}

.review-surface>.review-cue{display:flex;align-items:center;justify-content:center;pointer-events:auto;cursor:pointer;box-sizing:border-box;min-width:26px;width:26px;height:26px;padding:4px;border:1px solid transparent;background:transparent;border-radius:4px;color:#5c7e68}
.review-cue>svg{width:16px;height:16px;flex:none}
.review-surface>.review-cue:hover{background:#edf3e9;border-color:#9eb6a2}.review-surface>.review-cue:focus-visible{outline:2px solid #497757;outline-offset:2px}
.entity-review-media-pane .structure-visual-viewport.material-image-frame{height:300px;width:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#eef1e9}
.material-image-frame .structure-visual-stage{flex:none;margin:0}.material-image-frame .structure-visual-stage img{width:100%;height:100%;object-fit:contain}
.material-reference-dialog button,.material-reference-dialog select,.material-card button,.material-card select{font:inherit;color:inherit;background:#f5f7f2;border:1px solid #c8d6c6;border-radius:5px;padding:7px 10px;cursor:pointer}
.material-reference-dialog button:hover,.material-card button:hover{border-color:#65896d;background:#eaf1e6}
.material-reference-dialog button:focus-visible,.material-reference-dialog select:focus-visible,.material-card button:focus-visible,.material-card select:focus-visible{outline:2px solid #497757;outline-offset:2px}
.material-reference-dialog button:disabled,.material-card button:disabled{opacity:.5;cursor:default}
.material-reference-dialog{box-sizing:border-box;background:var(--paper,#fdfefb)}
.material-input{margin:8px 0}.material-input small{display:block}.comment-intent{display:flex;align-items:center;gap:6px;margin:12px 0}.comment-intent input{width:auto}

.material-reference-dialog [role=button]:focus-visible{outline:2px solid #497757;outline-offset:3px}
.material-card select:hover:enabled,.material-reference-dialog select:hover:enabled{border-color:#65896d}

/* Common modal presentation for exact source and nested reference readers. */
.review-dialog{font:inherit;color:inherit;background:#fff;width:min(900px,calc(100vw - 32px));max-height:88vh;border:1px solid #d8e1d6;border-radius:12px;padding:0;box-shadow:0 16px 60px #15251a30}
.review-dialog::backdrop{background:#15251a88}
.review-dialog-header{position:sticky;top:0;z-index:2;display:flex;align-items:start;justify-content:space-between;gap:20px;padding:20px 24px 16px;background:#fff;border-bottom:1px solid #e5e9e2}
.review-dialog-header h2{font-size:20px;line-height:1.5;margin:0;overflow-wrap:anywhere}
.review-dialog button{font:inherit;border:1px solid #ccd7ca;background:#f5f8f3;border-radius:6px;padding:7px 11px;color:inherit}
.review-dialog button:hover:enabled{border-color:#65896d;background:#eaf1e6}
.review-dialog .review-dialog-close{flex:none;line-height:1;font-size:22px;padding:7px 10px}
.review-dialog button:focus-visible{outline:2px solid #426763;outline-offset:3px}
.review-dialog-body{padding:20px 24px 24px;line-height:1.85}
.review-dialog-body h3{font-size:17px;margin:0 0 16px}.review-dialog-body p{margin:0 0 16px;white-space:pre-wrap;overflow-wrap:anywhere}
.review-dialog-body pre{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:600px){.review-dialog-header{padding:16px;gap:12px}.review-dialog-header h2{font-size:18px}.review-dialog-body{padding:16px}}
.review-dialog.structure-image-dialog{width:calc(100vw - 32px);height:calc(100dvh - 32px);max-width:none;max-height:none}
.review-dialog.structure-image-dialog .review-dialog-body{flex:1;min-height:0;background:#191d19;padding:16px}
@media(max-width:700px){.review-dialog.structure-image-dialog{width:calc(100vw - 16px);height:calc(100dvh - 16px)}}
/* Keep SOURCE region coordinates on the painted image, without contain padding. */
#source-view .structure-visual-stage{width:fit-content;max-width:100%;margin-inline:auto}
#source-view .structure-visual-stage img{width:auto;max-width:100%;height:auto;max-height:350px}

.review-surface>.review-cue{width:auto;min-width:28px;height:26px;padding:3px 5px;gap:4px;align-items:center;pointer-events:auto}
.review-cue svg{width:18px;height:18px;flex:none}
.review-comment-count{font-size:12px;font-variant-numeric:tabular-nums;line-height:1}
.material-reference-dialog .comment-panel{position:relative;inset:auto;width:auto;max-width:none;max-height:65vh;box-shadow:none;margin:12px 24px 24px;border:1px solid #d8e1d6}

/* No file exists yet: keep the status beside the reviewable plan. */
.entity-review-missing-image{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-height:0;height:auto;max-height:none;padding:12px;aspect-ratio:auto}
.entity-review-missing-image svg{width:22px;height:22px;flex:none}
.material-use-row{padding:10px 0;border-top:1px solid var(--desk-line);overflow-wrap:anywhere}
.material-use-row>.material-reference{white-space:normal;text-align:left;max-width:100%}
.material-use-row>p{margin:6px 0}.material-use-details{margin:8px 0}.material-use-details>summary{cursor:pointer}
.material-use-group>h4{margin-top:16px}.material-use-details .review-surface{margin-top:8px}

/* Shared presentation uses the existing compilation palette and comment surfaces. */
.production-tabs{display:flex;width:min(675px,100%);margin:0 0 24px;border:1px solid var(--desk-line);padding:0;background:transparent}
.production-tabs button{flex:1;min-height:38px;border:0;border-right:1px solid var(--desk-line);border-radius:0;background:transparent;color:var(--desk-muted);font-size:12px}
.production-tabs button:last-child{border-right:0}.production-tabs button[aria-selected=true]{background:var(--desk-ink);color:#f8f4e9;font-weight:700}
.production-heading{display:none}.production-filters{background:#f8f4e9;border:1px solid var(--desk-line);border-radius:0}
.production-filter-chip[aria-pressed=true]{border-color:#8f3930;background:#f7ece5;color:#81382f}.production-filter-chip[aria-pressed=true] .production-filter-count{background:#903d34;color:white}
.production-board.entity-review-board,.production-board.unified-management{grid-template-columns:240px minmax(0,1fr);gap:18px;align-items:start}
.production-reader.unified-card-host{padding:0;border:1px solid var(--desk-line);border-radius:0;background:#f8f4e9;min-width:0}
.unified-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));min-width:0;align-items:start}
.unified-card-context,.unified-card-material{min-width:0;padding:20px;overflow-wrap:anywhere}
.unified-card-context{border-right:1px solid var(--desk-line)}
.unified-card-material{background:#fcfaf4;position:sticky;top:80px;max-height:calc(100dvh - 100px);overflow:auto;overscroll-behavior:contain}
.material-reader-status{position:sticky;top:0;height:0;z-index:2}
.material-reader-status>p{margin:0;background:#fcfaf4;border:1px solid var(--desk-line);border-radius:6px;padding:8px 12px;box-shadow:0 2px 8px #0000000a}
.material-reader-status>button{position:relative;background:#fcfaf4}
.unified-card h2{font-size:21px}.unified-card h3{font-size:16px}.unified-card h4{font-size:14px}.unified-card pre{white-space:pre-wrap;overflow-wrap:anywhere}
.unified-card .material-card{border:0;padding:0;box-shadow:none;background:transparent}.unified-card .entity-review-materials{display:block}
.unified-card .entity-review-media-pane{margin:12px 0}.unified-card .entity-review-relationships{overflow:auto}
.unified-card .production-entity-options{display:grid;grid-template-columns:1fr;width:100%}.unified-card .production-entity-options button{min-width:0}
.material-small-list,.entity-small-list{display:grid;grid-template-columns:1fr;gap:8px;margin:12px 0}
.material-small-card{display:flex;align-items:center;gap:10px;width:100%;min-width:0;padding:10px!important;border:1px solid #d4d2c8!important;border-radius:3px!important;background:#fffdf7!important;color:#282a25;text-align:left;line-height:1.45}
.material-small-card:hover,.material-small-card[aria-pressed=true]{border-color:#9d6850!important;background:#f4e8d6!important}
.material-small-preview{flex:0 0 62px;width:62px;height:54px;display:flex;align-items:center;justify-content:center;background:#eae8df;overflow:hidden}
.material-small-preview img{width:100%;height:100%;object-fit:contain}.material-small-preview svg{width:27px;height:27px}
.material-small-copy{display:block;min-width:0}.material-small-copy strong{font-size:13px;font-weight:600;display:block}.material-small-copy small{display:block;font-size:11px;color:#65695e;margin-top:4px}
.entity-small-card{min-width:0;margin:0!important;white-space:normal}.entity-small-card small{display:block}.entity-material-counts{font-variant-numeric:tabular-nums}
.unified-card-dialog{width:min(1420px,96vw);max-width:96vw;height:88dvh;max-height:88dvh;padding:0;overflow:hidden}
.unified-card-dialog[open]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
.unified-card-dialog>.review-dialog-header{grid-column:1/-1;grid-row:1}
.unified-card-dialog>.review-dialog-body{grid-column:1;grid-row:2;min-width:0;min-height:0;padding:0;max-height:none;overflow:auto}
.unified-card-loading{min-height:100%}
.unified-card-load-message{min-height:52px}
.unified-card-placeholder{display:grid;gap:18px;padding-top:18px}
.unified-card-placeholder>div{background:#eef0e9;border-radius:5px;height:16px;max-width:100%}
.unified-card-placeholder-heading{width:55%;height:24px!important;margin-bottom:20px}
.unified-card-placeholder-text:nth-child(even){width:88%}
.unified-card-placeholder-tabs{width:38%;height:36px!important;margin-bottom:24px}
.unified-card-placeholder-cards{height:150px!important;margin-top:32px}
.unified-card-dialog .unified-card-material{top:0;max-height:80dvh}
.unified-card-dialog>.comment-panel{position:relative;inset:auto;grid-column:1;grid-row:2;justify-self:end;align-self:stretch;margin:12px 18px 18px;z-index:3;width:min(360px,calc(100% - 36px));min-width:0;min-height:0;max-height:none;box-shadow:0 14px 48px #17241f33}
@media(max-width:1800px){.unified-card-dialog .unified-card-material .entity-review-local-heading>h3{flex-basis:100%}}
.breakdown-episode-tabs{margin:16px 0}.breakdown-episode-tabs .source-button:not(.screenplay-episode){flex:0 0 155px;min-height:64px;margin:0;white-space:normal}
.breakdown-scene-layout{display:grid;grid-template-columns:245px minmax(0,1fr);gap:0;border:1px solid var(--desk-line);height:calc(100dvh - 90px);min-height:400px;position:sticky;top:70px}
.breakdown-scenes{min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--desk-line)}.breakdown-scenes>header{padding:20px}.breakdown-scenes h2{font-size:19px;margin:0}
.breakdown-scene-list{overflow:auto;min-height:0;padding:10px;overscroll-behavior:contain}.breakdown-scene-list .source-button{width:100%;margin:0 0 8px;min-width:0}
.breakdown-body{min-height:0;min-width:0;overflow:auto;padding:0;overscroll-behavior:contain;background:#f5f1e7}
.breakdown-scene{border:3px solid transparent;padding:0 12px 18px;margin:0;border-radius:0;min-width:0;background:#f8f4e9}.breakdown-scene.selected{border-color:#a67a4b;background:#f8f4e9}
.breakdown-scene>.text-reader-head{margin:0 -12px 16px;padding:20px;background:#252820;color:#f8f4e9;display:flex;align-items:center;justify-content:space-between;gap:12px}.breakdown-scene>.text-reader-head h2{margin:0;font-size:21px}
.breakdown-row{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(250px,.85fr);gap:20px;padding:20px 14px;margin:12px 0;border:1px solid #d4d2c8;border-radius:0;min-width:0;align-items:start;background:#fffdf7}
.breakdown-row.selected{outline:2px solid #a67a4b;background:#fffbf2}.breakdown-shot-copy,.breakdown-shot-materials,.breakdown-shared-materials{min-width:0}
.breakdown-shot-copy>header{display:flex;gap:15px;justify-content:space-between;align-items:start}.breakdown-shot-copy h3{font-size:17px;margin:0 0 16px}.breakdown-shot-copy p{line-height:1.8;font-size:14px}
.breakdown-shot-materials>h4,.breakdown-shared-group>h3{margin:0 0 10px;font-size:14px;color:#5d6655}
.breakdown-shot-materials .material-small-card,.breakdown-shared-group .material-small-card{margin:8px 0}
.breakdown-levels{border:0;padding:0 0 12px;display:flex;gap:14px;flex-wrap:wrap;position:sticky;top:0;background:#fffdf7;z-index:1}.breakdown-levels legend{font-size:13px;font-weight:600;margin-bottom:8px}.breakdown-levels label{display:flex;align-items:center;gap:4px;font-size:13px}
.breakdown-shared-group{margin:12px 0 20px}.shot-generation-prompt{font-family:inherit;font-size:14px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}.prompt-reference{color:#8f3930;text-decoration:underline;cursor:pointer}
@media(min-width:1850px){.production-board.entity-review-board,.production-board.unified-management{grid-template-columns:350px minmax(0,1fr)}.entity-small-list,.material-index>.material-small-list{grid-template-columns:1fr}.entity-small-card .production-entity-avatar{width:30px;height:30px}}
@media(max-width:1250px){.unified-card{grid-template-columns:repeat(2,minmax(0,1fr))}.unified-card-context,.unified-card-material{padding:14px}.production-board.entity-review-board,.production-board.unified-management{grid-template-columns:190px minmax(0,1fr);gap:10px}.breakdown-scene-layout{grid-template-columns:195px minmax(0,1fr)}.breakdown-row{gap:12px;grid-template-columns:minmax(0,1fr) minmax(200px,.8fr);padding:14px 10px}}
@media(max-width:1050px){.unified-card{grid-template-columns:1fr}.unified-card-context{border-right:0;border-bottom:1px solid var(--desk-line)}.unified-card-material{position:static;max-height:none;overflow:visible}.production-board.entity-review-board .production-index{position:sticky;top:80px;max-height:75dvh}.breakdown-row{grid-template-columns:1fr}.breakdown-shot-materials{border-top:1px solid var(--desk-line);padding-top:15px}}
@media(max-width:700px){.production-tabs{margin-bottom:16px}.production-board.entity-review-board,.production-board.unified-management{display:block}.production-index,.production-board.entity-review-board .production-index{position:static;max-height:260px;overflow:auto;margin-bottom:14px}.production-toolbar input[type=search]{min-width:0;width:100%}.production-filter-group{display:block}.production-filter-options{gap:6px}.unified-card-dialog{width:98vw;max-width:98vw}.unified-card-dialog .unified-card-material{max-height:none}.unified-card-context,.unified-card-material{padding:12px}.unified-card{display:block}.breakdown-scene-layout{display:block;height:auto;min-height:0;position:static}.breakdown-scene-list{max-height:210px}.breakdown-scenes>header{padding:12px}.breakdown-body{overflow:visible;max-height:none}.breakdown-scene{padding-inline:7px}.breakdown-scene>.text-reader-head{margin-inline:-7px;padding:14px}.breakdown-row{display:block;padding:12px 8px}.breakdown-shot-materials{margin-top:18px}.breakdown-levels{position:static}.breakdown-episode-tabs .source-button:not(.screenplay-episode){flex-basis:145px}.material-small-preview{flex-basis:50px;width:50px;height:45px}}

.breakdown-scene>.text-reader-head{position:sticky;top:0;z-index:2}

@media(max-width:700px){.breakdown-scene>.text-reader-head{top:122px}}
/* On narrow screens the source directory stays above a bounded reading pane. */
@media(max-width:700px){
  #story-workspace .source-reader-main{display:flex;flex-direction:column;position:sticky;top:122px;height:calc(100dvh - 124px);min-height:0;overflow:hidden}
  #story-workspace .text-reader-head{flex:0 0 auto}
  #story-workspace .text-reader-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
}
@media(max-width:700px){#story-creation-shell:has(>#story-workspace:not([hidden])){padding-bottom:0}}

/* Shared compact cards and clearly separated reading regions. */
.material-small-card{padding:7px 9px!important;gap:9px;min-height:56px;border-radius:0!important}
.material-small-preview{flex-basis:44px;width:44px;height:42px}
.material-small-copy{flex:1}.material-small-copy strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.material-small-copy small{margin-top:2px}
.unified-card-context>.entity-review-basics,.unified-card-context>.entity-relations,.unified-card-context>.production-entity-context,.entity-review-selected-state{border:1px solid var(--desk-line);padding:14px;margin:16px 0;background:#fffcf5}
.entity-review-selected-state>.entity-review-local-heading{margin-top:0}.entity-state-materials{border-top:1px solid var(--desk-line);margin-top:16px;padding-top:10px}
.unified-card .production-entity-options{max-height:230px;overflow:auto;gap:4px}.unified-card .production-entity-options button{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 9px;min-height:32px;text-align:left;margin:0}.production-entity-options button small{white-space:nowrap;margin:0}
.unified-card .relation-graph-viewport{max-height:none;border:0;border-radius:0;background:transparent;overflow:auto}.unified-card .relation-graph{min-width:0;width:100%;display:block}.relation-text{box-sizing:border-box;background:#fffcf5}.relation-node[role=button]{cursor:pointer}.relation-node[role=button]:hover .relation-node-box,.relation-node[role=button]:focus .relation-node-box{stroke:#903d34;stroke-width:2}
.entity-review-version,.material-card select,.relation-text select,.shot-generation-content select{font:inherit;font-size:12px;color:var(--desk-ink);background:#fffdf7;border:1px solid var(--desk-line);border-radius:0;padding:6px 26px 6px 8px;max-width:100%;min-height:32px}
.breakdown-scene{border:0;padding:0 16px 18px}.breakdown-scene>.breakdown-scene-head{display:block;margin:0 -16px 20px;padding:16px 20px;background:#f8f4e9;color:var(--desk-ink);border-bottom:1px solid var(--desk-line)}
.breakdown-scene-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.breakdown-scene-head .production-meta{margin:6px 0}.breakdown-scene-head .entity-review-text{font-size:13px;line-height:1.6}.breakdown-scene-head .entity-review-text p{margin:6px 0}
.breakdown-levels{position:static;padding:8px 0 0;margin:0;background:transparent;align-items:center;gap:10px}.breakdown-levels .production-filter-label{min-width:0}.breakdown-levels .production-filter-chip{margin:0}
.breakdown-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:0;padding:0;background:#fffdf7;border:1px solid var(--desk-line);scroll-margin-top:240px}.breakdown-shot-copy{padding:20px}.breakdown-shot-materials{padding:20px;background:#efece2;border-left:1px solid var(--desk-line);height:100%;box-sizing:border-box}
@media(max-width:1050px){.breakdown-row{grid-template-columns:1fr}.breakdown-shot-materials{border-left:0;border-top:1px solid var(--desk-line)}.unified-card-context>.entity-review-basics,.unified-card-context>.entity-relations,.unified-card-context>.production-entity-context,.entity-review-selected-state{padding:12px}}
@media(max-width:700px){.breakdown-scene>.breakdown-scene-head{top:var(--workspace-topbar-height,70px);margin-inline:-8px;padding:12px}.breakdown-scene{padding-inline:8px}.breakdown-row{padding:0}.breakdown-shot-copy,.breakdown-shot-materials{padding:14px}.breakdown-shot-materials{margin:0}.unified-card .relation-graph{min-width:0;width:100%;display:block}}

.production-reader .review-reference-button,.review-dialog .review-reference-button,.breakdown-body .review-reference-button{font:inherit;font-size:12px;line-height:1.4;padding:6px 10px;color:var(--desk-ink);background:#fffdf7;border:1px solid var(--desk-line);border-radius:0;text-decoration:none;cursor:pointer;white-space:normal}
.review-reference-button:hover{border-color:#903d34!important}.review-reference-button:focus-visible{outline:2px solid #903d34;outline-offset:2px}
.breakdown-episode-tabs{position:sticky;top:70px;z-index:4;background:#ebe7dc;margin:0;padding:12px 0}.breakdown-scene-layout{top:158px;height:calc(100dvh - 175px)}
@media(max-width:700px){.breakdown-episode-tabs{top:122px;padding:8px 0}.breakdown-episode-tabs .source-button:not(.screenplay-episode){min-height:44px}.breakdown-scene>.breakdown-scene-head{top:184px}.breakdown-scene-layout{height:auto;position:static}.breakdown-scene-head .entity-review-text{max-height:100px;overflow:auto}}
.production-index .material-small-card{display:flex;align-items:center;gap:9px}.production-index .material-small-card .material-small-preview{margin:0;flex:0 0 44px}.production-index .material-small-card .material-small-copy{min-width:0;text-align:left}.production-index .material-small-card small{white-space:normal}
/* Keep the desktop scene pane inside the viewport. A separate page footer
   must not push its sticky scene header underneath the episode strip. */
@media(min-width:701px){
  #production-view:has(.breakdown-scene-layout){display:flex;flex-direction:column;height:calc(100dvh - 70px);min-height:0;padding:0 0 16px;box-sizing:border-box}
  #production-view:has(.breakdown-scene-layout) .breakdown-episode-tabs{position:static;flex:0 0 auto}
  #production-view:has(.breakdown-scene-layout) .breakdown-scene-layout{position:relative;top:0;flex:1 1 auto;height:auto;min-height:0}
  .workspace-main:has(#production-view:not([hidden]) .breakdown-scene-layout) .workspace-footer{display:none}
}
@media(max-width:700px){.breakdown-episode-tabs .source-button:not(.screenplay-episode){height:44px;min-height:44px;padding:8px 10px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

/* Version and candidate choices occupy independent, bounded rows. */
.review-choice-buttons{display:flex;flex-wrap:nowrap;gap:6px;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior:contain;padding:3px 0;scrollbar-width:thin}
.review-choice-buttons button{flex:0 0 auto;white-space:nowrap;margin:0}
.review-choice-buttons button[aria-pressed=true]{background:#e3ebdf;border-color:#789376;box-shadow:inset 0 -2px #789376}
.entity-review-local-heading>.review-choice-buttons{max-width:100%;flex:0 1 auto}
.material-card>.entity-review-local-heading{display:block}.material-card>.entity-review-local-heading h3{margin-bottom:8px}
.entity-card-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.entity-card-title .production-entity-badge{font-size:12px;font-weight:400}
.entity-review-sources{display:block}.entity-review-sources .entity-evidence-frame{width:100%;box-sizing:border-box;border:1px solid #dde4d7;border-radius:6px;padding:9px;margin:6px 0;background:#fffdf6}
.entity-review-sources details.entity-evidence-frame[open]{padding:9px}.entity-evidence-tabs{display:flex;gap:5px;align-items:center}.entity-evidence-tabs button{margin:0;min-width:0}
.entity-evidence-tabs [role=tab]{flex:1}.entity-evidence-tabs [aria-selected=true]{background:#e3ebdf;border-color:#789376}.entity-evidence-content{padding-top:8px}
.production-entity-options button[aria-pressed=true]{border-left:4px solid #789376;background:#e3ebdf}
@media(max-width:700px){.entity-review-local-heading>.review-choice-buttons{flex-basis:100%}}

.unified-card .relation-graph-viewport,.relation-graph-viewport{position:relative;aspect-ratio:1;width:100%;height:auto;max-height:none;overflow:auto;border:1px solid #d7dfd2;border-radius:5px;background:#fafcf8;overscroll-behavior:contain;touch-action:pan-x pan-y}
.unified-card .relation-graph,.relation-graph{max-width:none;min-width:0;display:block}
.relation-text{padding:5px;font-size:17px;line-height:1.35;text-align:center}.relation-text .relation-caption{font-size:18px}.relation-text .production-meta{font-size:15px}.relation-text .review-block-comment{width:20px;height:20px}
.relation-sources{font-size:16px}.relation-sources summary{cursor:pointer}.relation-sources button{font-size:16px;padding:4px;margin:2px}
.relation-node-name{font-size:18px}

.relation-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.relation-heading h3{margin:0;flex:0 0 auto}.relation-controls{display:flex;gap:4px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.relation-controls button{font-size:12px;padding:5px 7px;margin:0}.relation-scale{font-size:11px;color:var(--desk-muted);white-space:nowrap}
.relation-graph-canvas{position:relative;min-width:100%;min-height:100%}.relation-graph-canvas>.relation-graph{position:absolute}.relation-edge{stroke-width:2}.relation-edge-hit{fill:none;stroke:transparent;stroke-width:16;cursor:pointer}.relation-edge-hit:focus{outline:none;stroke:#c9834980}.relation-edge.selected{stroke:#a34c21;stroke-width:4}.relation-node.selected .relation-node-box{stroke:#a34c21;stroke-width:3;fill:#fff0dd}.relation-text.selected{background:#fff0dd;box-shadow:inset 0 0 0 3px #a34c21}.relation-text:focus{outline:2px solid #a34c21;outline-offset:-2px}.relation-text{box-sizing:border-box}.relation-graph-canvas .relation-node-name{overflow-wrap:anywhere}

.business-code{display:block;color:#64705f;font-size:12px;margin:5px 0}.business-code-table{width:100%;border-collapse:collapse;font-size:14px}.business-code-table th,.business-code-table td{padding:9px;text-align:left;border:1px solid var(--desk-line)}

.relation-node-code{font-size:17px;fill:#65756a}.relation-node-name{font-size:20px}
.relation-text .relation-caption{font-size:20px}.relation-text .business-code{font-size:17px}.relation-sources{font-size:18px}.relation-sources button{font-size:18px}
/* The same card in grids, side lists and the left side of a large card. */
.material-small-card{min-height:84px;box-sizing:border-box}.small-card-code{display:block;font-size:11px;color:var(--desk-muted);font-variant-numeric:tabular-nums}.material-small-copy strong{line-height:1.4}.small-card-metrics{display:flex;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--desk-muted);margin-top:3px}
.material-small-copy{min-width:0;max-width:100%}.small-card-title{display:flex;align-items:center;gap:6px;min-width:0;width:100%}.small-card-title .production-entity-icon{flex:0 0 20px;width:20px;height:20px}.small-card-title strong{flex:1;min-width:0;display:block}.small-card-title .small-card-code{flex:0 0 auto;white-space:nowrap;display:inline;margin:0}.material-small-copy .small-card-metrics{display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.6}.material-small-card{min-height:72px}
.management-card-list{min-width:0}.management-card-group{margin:20px 0 24px;min-width:0}.management-card-group>h3{font-size:16px;margin:0 0 12px}.management-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.management-card-grid .material-small-card{margin:0!important;min-width:0}.review-pagination{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:24px 0}.review-pagination label{display:flex;align-items:center;gap:6px}.review-pagination select{font:inherit;padding:6px;background:#fffdf7}.pagination-basis{color:var(--desk-muted);font-size:11px}
.material-management-list .management-card-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1050px){.material-management-list .management-card-grid,.management-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.material-management-list .management-card-grid,.management-card-grid{grid-template-columns:1fr}.review-pagination{gap:6px}.review-pagination button{padding:7px}.management-card-group{margin:18px 0}.management-card-grid .material-small-preview{flex-basis:44px;width:44px;height:42px}}

/* Shared episode cards, two-level exact directory and a bounded material column. */
.breakdown-episode-tabs .screenplay-episode{height:auto;white-space:normal;overflow:visible;text-overflow:clip}
.breakdown-directory-heading{display:flex;align-items:stretch;gap:3px;min-width:0}
.breakdown-directory-heading>.source-button{flex:1;min-width:0}
.breakdown-directory-toggle{flex:0 0 22px;border:0;background:transparent;padding:0;font:inherit;cursor:pointer}
.breakdown-directory-shots{padding-left:24px}.breakdown-directory-shots .source-button{font-size:12px;padding:7px 8px;white-space:normal;overflow-wrap:anywhere}
.breakdown-directory-scene{margin-bottom:12px}.breakdown-scene-list [aria-current=location]{background:#e3ebdf;border-color:#789376;box-shadow:inset 3px 0 #789376}
.breakdown-shot-heading{display:flex;gap:8px 12px;align-items:baseline;flex-wrap:wrap;min-width:0}
.breakdown-shot-copy h3{margin:0}.breakdown-shot-copy>header{margin-bottom:16px;flex-wrap:wrap}
.breakdown-shot-copy>header>small{flex:0 0 auto}
.breakdown-row{grid-template-columns:minmax(0,1fr) 300px;scroll-margin-top:calc(var(--breakdown-header-height,62px) + 12px)}
.shot-reference-slot{margin:10px 0;min-width:0}.shot-reference-slot .material-small-card{width:100%;max-width:100%}.shot-reference-slot>small{display:block;margin:4px 0}
.shot-reference-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}
.shot-reference-list .shot-reference-slot,.shot-reference-list .material-small-card{margin:0;height:auto}
.shot-reference-list .small-card-title strong{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.shot-generation-content{container-type:inline-size}
.prompt-entity-reference::before{content:"@"}
.breakdown-loading{position:fixed;right:22px;bottom:22px;z-index:4;margin:0;padding:8px 14px;background:var(--desk-paper,#fffdf7);border:1px solid var(--desk-line);box-shadow:0 2px 8px #0001}
@container(max-width:460px){.shot-reference-list{grid-template-columns:minmax(0,1fr)}}
.breakdown-directory-heading{background:#e9efe9;border-left:3px solid #728a77}
.breakdown-directory-heading>.source-button{font-weight:700;color:#30493a;margin-bottom:0}
.breakdown-directory-shots{margin:4px 0 0 13px;padding-left:16px;border-left:1px solid #bac9bc}
.breakdown-directory-shots .source-button{background:transparent;color:#555c54;border-left:2px solid transparent}
.breakdown-scene-list [aria-current=location]{font-weight:700;border-left:3px solid #44644c;box-shadow:inset 0 -2px #789376}
.breakdown-directory-shots [aria-current=location]{background:#e3ebdf;color:#203d2a}
.breakdown-directory-scene:has([aria-current=location])>.breakdown-directory-heading{border-left-color:#304f39}
.breakdown-shot-materials{padding:14px}.breakdown-material-group h5{font-size:12px;color:var(--desk-muted);margin:16px 0 6px;font-weight:600}
.reference-highlight{background:#fff0b9;border-left:3px solid #b98823;padding:8px 12px;scroll-margin-block:30px}
@media(max-width:1050px){.breakdown-row{grid-template-columns:1fr}}
@media(max-width:700px){.breakdown-episode-tabs{position:static}.breakdown-scene>.breakdown-scene-head{position:static;top:auto;scroll-margin-top:calc(var(--workspace-topbar-height,122px) + 12px)}.breakdown-row{scroll-margin-top:calc(var(--workspace-topbar-height,122px) + 12px)}}

.breakdown-scene-head .breakdown-scene-heading{margin:0}.breakdown-scene-heading .review-reference-button{margin:0}

/* Entity card v2: choices preserve their DOM/keyboard order. */
.entity-review-identity{display:flex;align-items:center;gap:18px;flex:1;min-width:0;flex-wrap:wrap}
.entity-review-identity .entity-card-title{flex:0 1 auto;min-width:0}
.entity-review-identity .review-choice-buttons{flex:1 1 160px;max-width:100%}
.entity-review-header>.production-toolbar{flex:0 0 auto;padding-left:18px;border-left:1px solid var(--desk-line);width:auto}
.material-card .review-choice-buttons{width:100%;box-sizing:border-box}
.material-card .review-choice-buttons>button:first-child{margin-left:auto}
.entity-evidence-tabs{justify-content:flex-start;flex-wrap:wrap}
.entity-evidence-tabs [role=tab]{flex:0 0 auto}
.entity-evidence-tabs [role=tab]::after{content:'▼';display:inline-block;font-size:12px;margin-left:7px}
.entity-evidence-tabs [aria-selected=true]::after{content:'▲'}
.entity-evidence-frame>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px}
.entity-evidence-frame>summary::-webkit-details-marker{display:none}
.entity-evidence-frame>summary::after{content:'▼';font-size:13px}
.entity-evidence-frame[open]>summary::after{content:'▲'}
@media(max-width:700px){.entity-review-identity{flex-basis:100%}.entity-review-header>.production-toolbar{margin-left:auto}.entity-review-identity .review-choice-buttons{flex-basis:100%}}

.relation-node-content{box-sizing:border-box;display:flex;align-items:center;gap:10px;padding:12px;font-size:15px;line-height:1.5;min-height:80px;overflow-wrap:anywhere}
.relation-node-content>svg{flex:0 0 22px;width:22px;height:22px}
.relation-node-content>div{min-width:0}.relation-node-content small,.relation-node-content span{display:block}
.relation-node-content .relation-node-name{font-size:17px;color:#233e2c}
.relation-node-content .relation-node-code{font-size:13px;color:#65756a}
.relation-text{padding:10px!important;font-size:15px!important;line-height:1.6;overflow-wrap:anywhere;border:1px solid #a6baa5;border-radius:4px}
.relation-text .relation-caption{display:block;font-size:15px!important;white-space:pre-wrap;line-height:1.6}
.relation-text .business-code{font-size:13px!important}.relation-sources{font-size:14px!important}
.relation-sources button{display:inline-block;font-size:13px!important;padding:4px 6px!important;margin:3px!important}
.relation-sources>.production-meta{display:block;font-size:13px!important}

/* The selected plan already presents its direct input cards. Exact state and
   other material trace stays together on demand, including offscreen state. */
.breakdown-row.shot-with-state-trace{display:block}
.shot-with-state-trace>.breakdown-shot-copy{max-width:1050px;box-sizing:border-box;margin:auto}
.shot-with-state-trace .breakdown-shot-materials{border:0;height:auto;margin-top:12px}
.shot-with-state-trace .breakdown-material-group{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));gap:8px}
.shot-with-state-trace .breakdown-material-group h5{grid-column:1/-1}
.shot-state-changes{margin:12px 0;padding:10px 12px;border-left:3px solid #789376;background:#f3f6ef}
.shot-state-changes h4,.shot-state-changes p{margin:5px 0}
.unified-position-card { display:block; }
.unified-position-card > .unified-card-context { overflow:visible; }
.management-material-uses { margin:6px 0 16px; }
.management-material-uses summary { cursor:pointer; }

/* Reading a scene is continuous; preparing its media follows the complete scene. */
.breakdown-row{display:block;border:0;border-top:1px solid var(--desk-line);border-radius:0;margin:28px auto;background:transparent;cursor:auto;max-width:880px}
.breakdown-shot-copy{padding:24px 0}
.breakdown-shot-copy .entity-review-text{border:0;background:transparent;padding:0;box-shadow:none}
.shot-action-reading p{font-size:16px;line-height:1.95;margin:18px 0}
.breakdown-shot-design{margin-top:18px;font-size:14px;color:var(--desk-muted)}
.breakdown-shot-design h4{font-size:13px;color:var(--desk-ink);margin-bottom:6px}
.breakdown-conditions{margin:24px auto;padding:18px 24px;background:#edf2eb;max-width:832px}
.breakdown-conditions .entity-review-text{background:transparent;border:0;padding:0;margin:0;box-shadow:none}
.breakdown-scene>.entity-review-text{max-width:880px;margin:20px auto}
.scene-reference-reading{border-top:2px solid var(--desk-line);margin:28px auto;max-width:1040px;padding:24px 0}
.shot-references{border-top:1px solid var(--desk-line);margin:24px 0;padding:20px 0}
.shot-material-links{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px;margin-top:16px}
.review-decision{padding:12px 0;border-top:1px solid var(--desk-line)}
.review-decision h4{margin:0 0 8px}.review-decision p{margin:8px 0;line-height:1.7}
.review-decision-history{margin:12px 0}.review-decision-history select{max-width:100%}
.decision-scope{font-size:12px;line-height:1.65;max-width:760px}.decision-scope p{margin:5px 0}
.material-use-details .entity-review-text{border:0;background:transparent;padding:0;box-shadow:none}
.entity-relationships-reading article{padding:8px 0;border-bottom:1px solid var(--desk-line)}
.entity-relationships-reading .entity-review-text{padding:0;border:0;background:transparent;box-shadow:none}
.entity-review-sources{display:flex;flex-wrap:wrap;gap:4px;margin:10px 0}
.entity-review-decisions{border-top:1px solid var(--desk-line);margin-top:24px;padding-top:18px}
.entity-review-decisions .production-toolbar{display:block}
.material-use-row:has(.entity-review-media-pane){padding:16px 0;margin:0}
.material-original-comparisons .entity-review-media-pane .structure-visual-viewport.material-image-frame{height:440px;max-height:55vh}
.audiovisual-edition{padding:14px 0;border-bottom:1px solid var(--desk-line)}
.av-three-part{display:block;cursor:default;max-width:none}.av-three-part .breakdown-shot-copy{max-width:1000px;padding:24px;margin:auto}.av-three-part .breakdown-shot-copy>section{margin:24px 0}.av-three-part h4{font-size:16px;margin:0 0 12px}.av-three-part .av-shot-purpose p{font-size:16px;color:var(--desk-ink)}.av-key-state{padding:12px 0;border-bottom:1px solid var(--desk-line)}.av-state-demands{display:flex;flex-wrap:wrap;gap:8px}.av-product-tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--desk-line);padding-bottom:10px}.av-product-tabs button[aria-selected=true]{background:#e4ecdd;border-color:#81987a;box-shadow:inset 3px 0 #81987a;font-weight:600}.av-product-panel{padding-top:12px}.av-plan-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.av-three-part .shot-generation-prompt{font:inherit;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}.av-working-note{pointer-events:none;position:fixed;z-index:1000;width:min(416px,calc(100vw - 16px));max-height:220px;overflow:auto;background:#fffdf7;color:var(--desk-ink);border:1px solid var(--desk-line);box-shadow:0 4px 18px #0002;border-radius:8px;padding:16px;box-sizing:border-box;white-space:pre-wrap;font-size:14px;line-height:1.75}.av-working-note[hidden]{display:none}.av-working-note p{margin:0}@media(max-width:700px){.av-three-part .breakdown-shot-copy{padding:16px 10px}.av-plan-controls{flex-wrap:wrap}.av-three-part .shot-reference-list{grid-template-columns:1fr}}
@media(max-width:700px){.breakdown-shot-copy{padding:20px 8px}.breakdown-conditions{padding:16px}.shot-action-reading p{font-size:15px}.scene-reference-reading{padding:20px 8px}}
/* One ownership selector; standards remain available beside review actions. */
.entity-material-tabs{display:flex;gap:8px;margin:18px 0 8px;border-bottom:1px solid var(--desk-line);padding-bottom:8px}
.entity-material-tabs [aria-selected=true]{background:#e5ecdf;border-color:#65775c;box-shadow:inset 3px 0 #65775c}
.review-help{position:relative;display:inline-flex;vertical-align:middle;margin-left:8px}
.review-help>button{border-radius:50%;width:28px;height:28px;min-height:28px;padding:0;font-weight:600}
.review-help-content{display:none;position:absolute;right:0;bottom:100%;width:min(380px,75vw);max-height:50vh;overflow:auto;background:#fffdf7;border:1px solid var(--desk-line);padding:14px;box-shadow:0 6px 24px #0002;z-index:10;font-size:13px;line-height:1.7}
.review-help:hover>.review-help-content,.review-help:focus-within>.review-help-content,.review-help[data-pinned=true]>.review-help-content{display:block}
.review-help-content .entity-review-text{margin:0}
.material-plan pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.7}

.av-product-tabs button{font:inherit;font-size:14px;line-height:1.5;border:1px solid transparent;border-radius:4px 4px 0 0;background:transparent;color:var(--desk-ink);padding:8px 16px;cursor:pointer}.av-product-tabs button:hover{background:#eef0e5}.av-product-tabs button[aria-selected=true]{background:#e4ecdd;border-color:#81987a;box-shadow:inset 0 -2px #81987a}.av-product-tabs button:focus-visible,.av-three-part .review-reference-button:focus-visible{outline:2px solid #81987a;outline-offset:2px}.av-three-part .shot-reference-slot{padding:6px 0}.av-three-part .shot-reference-slot .production-meta{display:block;margin-top:4px}

.relation-summary-caption{border:0!important;border-radius:0!important;box-shadow:none!important;padding:5px 9px!important;background:var(--desk-paper,#fffef9)}
.relation-summary-caption p{margin:3px 0;font-size:14px;line-height:1.55}
.relation-summary-popover{position:fixed;z-index:10020;max-width:min(380px,calc(100vw - 24px));max-height:70vh;overflow:auto;padding:13px 16px;background:var(--desk-paper,#fffef9);color:var(--desk-text,#30352e);border:1px solid #aaba9d;border-radius:7px;box-shadow:0 7px 24px #22301821;line-height:1.65}
.relation-summary-popover p{margin:5px 0 9px;font-size:14px}.relation-summary-popover .business-code{overflow-wrap:anywhere}.relation-summary-popover button{margin-right:8px}

/* Entity pages and shots use connected page tabs over the material list. */
.entity-material-tabs { display:flex; gap:0; border-bottom:1px solid var(--line,#d5d3c4); margin:1rem 0 0; padding:0 8px; }
.entity-material-tabs [role=tab] { border:1px solid transparent; border-radius:7px 7px 0 0; background:transparent; margin-bottom:-1px; padding:10px 16px; }
.entity-material-tabs [role=tab][aria-selected=true] { background:var(--paper,#fffdf7); border-color:var(--line,#d5d3c4); border-bottom-color:var(--paper,#fffdf7); color:#244b39; font-weight:650; }
.entity-material-tabpanel,.entity-material-tabs ~ .production-entity-context,.entity-material-tabs ~ .entity-review-selected-state,.entity-material-tabs ~ .entity-state-materials { border-inline:1px solid var(--line,#d5d3c4); padding:14px; margin-top:0; }
.entity-review-sources { display:flex; flex-wrap:wrap; gap:6px 10px; }
.entity-review-lyrics p { white-space:pre-line; }
.material-source-group{margin:20px 0;border-top:1px solid var(--desk-line);padding-top:12px}
.material-source-heading{display:flex;align-items:center;gap:8px}.material-source-heading h4{margin:0;min-width:0;overflow-wrap:anywhere}
.material-source-heading .material-source-question{display:inline-flex;align-items:center;justify-content:center;flex:none;width:24px;height:24px;min-height:24px;padding:0;border:0;border-radius:var(--desk-radius);background:transparent;color:var(--desk-muted);cursor:help}
.material-source-heading .material-source-question:hover:enabled{background:var(--desk-hover);color:var(--desk-ink)}
.material-source-question .production-entity-icon{width:17px;height:17px}
.material-source-group .material-small-list{grid-template-columns:repeat(2,minmax(0,1fr))}
.material-source-group .material-small-copy strong{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.material-source-group .small-card-title{flex-wrap:wrap}
.material-source-explanation{position:fixed;z-index:40;max-height:min(60dvh,600px);overflow:auto;box-sizing:border-box;background:var(--desk-surface);color:var(--desk-ink);border:1px solid var(--desk-line);border-radius:var(--desk-radius);padding:12px 14px;box-shadow:0 4px 18px #17241f1a;font-size:13px;line-height:1.7}
.material-source-text p{margin:0 0 8px;white-space:pre-wrap;overflow-wrap:anywhere}
.material-source-text p:last-child{margin-bottom:0}
.material-source-list{container-type:inline-size}
@container (max-width:330px){.material-source-group .material-small-list{grid-template-columns:minmax(0,1fr)}}
.shot-entity-workspace { margin:18px 0 30px; border:1px solid var(--line,#d5d3c4); border-radius:8px; padding:18px; }
.management-graph-viewport { height:72vh; min-height:420px; background:#f7f8f0; }
.management-graph-node .entity-small-card { width:230px; min-height:110px; height:auto; }
.management-graph-node .small-card-title { white-space:normal; }
.management-graph-node .small-card-title strong { white-space:normal; overflow:visible; display:block; }
.management-graph-node .material-small-preview { max-width:60px; }
.management-edge-caption { width:100%; height:100%; padding:4px 8px; font-size:13px;line-height:1.35; white-space:normal; overflow:auto; border:1px solid #d6dfd2; background:#fffdf4; border-radius:5px; }
.management-relation-graph [data-entity-id].related-highlight .entity-small-card { outline:3px solid #a34c21; outline-offset:-3px; }
.management-relation-graph .relation-edge { stroke:#7f9580; stroke-width:2; fill:none; }
.management-relation-graph .relation-edge.selected { stroke:#a34c21; stroke-width:3; }
dialog #toast { position:fixed; z-index:50; }

.material-content-navigation{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:10px 0 18px}
.material-candidate-navigation{display:flex;align-items:center;gap:8px;border-left:1px solid #bac3b1;padding-left:12px;flex:1 1 160px;min-width:0}
.material-candidate-navigation>span{flex:0 0 auto}
.material-card .material-candidate-navigation>.review-choice-buttons{flex:1;flex-wrap:wrap;overflow:visible;padding:0;width:auto}
.material-content-navigation button,.material-content-navigation .review-choice-buttons>button:first-child{margin:0;min-height:38px;font-size:14px;padding:7px 12px}
.material-content-navigation button[aria-pressed=true]{background:#e2ecd9;border-color:#799570}
.material-reference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 20px}
.material-reference-grid .material-input{margin:0;min-width:0;display:flex;flex-direction:column}
.material-reference-grid .material-small-card{width:100%;height:auto;flex:1}
.material-reference-grid .small-card-metrics{display:none}
.material-small-card.reference-picker-card{cursor:default}
.reference-picker-card .reference-material-name{display:flex;margin:0!important;padding:0!important;min-height:20px!important;border:0!important;background:transparent!important;font:inherit;color:inherit;text-align:left;width:100%;cursor:pointer}
.reference-material-name:focus-visible{outline:2px solid #517b55;outline-offset:2px}
.reference-candidate-picker{min-width:0;height:26px;margin-top:2px}
.reference-candidate-choices{display:flex;align-items:center;gap:4px;flex-wrap:nowrap;height:26px;max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;touch-action:pan-x pan-y;overscroll-behavior-x:contain}
.reference-candidate-choices::-webkit-scrollbar{display:none}
.reference-candidate-choices>button{flex:0 0 auto;margin:0!important;white-space:nowrap}
.reference-candidate-choice,.reference-candidate-choices>button{box-sizing:border-box;font-size:11px!important;line-height:16px!important;padding:1px 5px!important;min-height:22px!important;height:22px;border:1px solid #c9d1c3;border-radius:3px;background:#fffdf8;cursor:pointer}
.reference-candidate-choice.selected{border-color:#6d916b;background:#e3eddd;color:#244e2b}
.reference-candidate-choice:not(:disabled):is(:hover,.previewing){border-color:#5b8154;background:#f0f4e9;box-shadow:inset 0 0 0 1px #95ae88}
.reference-candidate-choice.selected:not(:disabled):is(:hover,.previewing){border-color:#4e7046;background:#d5e6cc}
.reference-candidate-choice:focus-visible{outline:2px solid #517b55;outline-offset:-2px}
.material-small-copy .reference-picker-status{flex:0 0 auto;margin:0;white-space:nowrap;font-size:11px;line-height:22px}
.reference-picker-status[hidden]{display:none}
.reference-originals{display:flex;flex-wrap:wrap;gap:4px;margin:6px 0}
.reference-candidate-preview{position:fixed;inset:auto;margin:0;z-index:50;max-height:min(680px,calc(100dvh - 24px));overflow:auto;box-sizing:border-box;background:#fffdf8;border:1px solid #8da88b;border-radius:6px;box-shadow:0 4px 18px #0003;padding:10px;pointer-events:auto}
.reference-preview-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.reference-candidate-preview button{min-height:26px;margin:0;font-size:11px;padding:3px 6px;cursor:pointer}
.reference-candidate-preview img{display:block;width:100%;height:min(480px,var(--reference-preview-media-height,480px));object-fit:contain;margin-top:6px}
.reference-candidate-preview audio,.reference-candidate-preview video{display:block;width:100%;max-height:min(480px,var(--reference-preview-media-height,480px));margin-top:6px}
.prompt-reference-preview>.reference-candidate-choices{margin-top:6px}
.prompt-reference-preview .reference-picker-status{flex:0 0 auto;white-space:nowrap;font-size:11px;line-height:22px}
.prompt-reference-preview .reference-originals:empty{display:none}
.reference-preview-placeholder{display:flex;align-items:center;justify-content:center;width:100%;height:min(480px,var(--reference-preview-media-height,480px));margin-top:6px;background:#eae8df;color:var(--desk-muted)}
.reference-preview-placeholder .production-entity-icon{width:64px;height:64px}
@container (max-width:480px){.material-reference-grid{grid-template-columns:1fr}}
.unified-card-material{container-type:inline-size}
@media(max-width:700px){.material-reference-grid{grid-template-columns:1fr}}

.management-edge-caption.relation-text{min-height:0;padding:4px 8px!important;font-size:13px!important;line-height:1.4;overflow:visible}
.management-relation-graph{overflow:visible}
.management-edge-caption:focus-visible{outline:3px solid #a34c21}

.management-relation-graph .graph-muted{opacity:.28}
.management-relation-graph .graph-center .entity-small-card{outline:3px solid #a34c21;outline-offset:-3px;background:#f6e8d8;box-shadow:0 0 0 2px #a34c2128}
.management-relation-graph .entity-small-card:focus-visible{outline:3px solid #345d4a;outline-offset:-3px}
.management-relation-graph .management-edge-caption.selected{border-color:#a34c21;background:#f6e8d8}

/* One fixed subpage bar; the title and tabs stay on the same row at every width. */
.workspace-topbar { justify-content: flex-start; flex-wrap: nowrap; gap: 28px; }
.workspace-topbar .view-context { flex: 0 0 auto; }
.workspace-subnav { display: flex; align-items: stretch; flex: 1 1 auto; min-width: 0; gap: 5px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.workspace-subnav .workspace-subtab { flex: 0 0 auto; min-height: 38px; padding: 7px 15px; border: 1px solid transparent; border-bottom: 2px solid transparent; background: transparent; color: var(--desk-muted); font: inherit; font-size: 13px; white-space: nowrap; }
.workspace-subnav .workspace-subtab:hover { color: var(--desk-ink); background: rgba(255,255,255,.45); }
.workspace-subnav .workspace-subtab.active { color: var(--desk-ink); border-bottom-color: var(--desk-red); font-weight: 700; }
.workspace-subnav .workspace-subtab:focus-visible { outline: 2px solid var(--desk-red); outline-offset: -2px; }
.configuration-layout-unified { grid-template-columns: minmax(0,1fr); }
@media(max-width:700px) {
  .workspace-topbar { gap: 12px; }
  .workspace-topbar .view-context { gap: 7px; }
  .workspace-subnav { gap: 2px; }
  .workspace-subnav .workspace-subtab { min-height: 36px; padding: 7px 11px; font-size: 12px; }
}

/* Shared paper, sage selection and control states. Media and manuscript colors
   retain their own rendering contracts. This sheet is loaded after view styles. */
:root {
  --desk-surface: #fffdf7;
  --desk-soft: #f2efe5;
  --desk-hover: #eeeee2;
  --desk-selected: #e4eddf;
  --desk-selection-line: #7b9775;
  --desk-muted: #656b60;
  --desk-radius: 6px;
}
.workspace-content { padding-top: 24px; }
.workspace-view { padding-top: 0; min-height: 0; }
.page-heading { margin: 0 0 22px; padding: 0 0 18px; border-bottom: 1px solid var(--desk-line); overflow-wrap: anywhere; }
.page-heading small { display: block; color: var(--desk-red); font-size: 10px; font-weight: 700; line-height: 1.5; letter-spacing: .14em; }
.page-heading h1 { margin: 6px 0; font-size: clamp(22px,2.1vw,28px); font-weight: 650; line-height: 1.4; }
.page-heading p { margin: 0; max-width: 72em; color: var(--desk-muted); font-size: 13px; line-height: 1.7; }
#screenplay-workspace { padding-top: 0; }
#structure-workspace:has(.structure-layout:not([hidden])) { margin-top: 0; }
.sidebar { color: var(--desk-ink); background: #f8f4e9; border-right: 1px solid var(--desk-line); box-shadow: none; }
.sidebar-brand { border-bottom-color: var(--desk-line); }
.sidebar .sidebar-brand small,.sidebar .sidebar-foot :is(b,span) { color: var(--desk-muted); }
.sidebar .workspace-button { color: var(--desk-ink); border: 1px solid transparent; border-radius: var(--desk-radius); }
.sidebar .workspace-button small,.sidebar .workspace-button .nav-index { color: var(--desk-muted); }
.sidebar .workspace-button:hover { background: var(--desk-hover); color: var(--desk-ink); }
.sidebar .workspace-button.active { background: var(--desk-selected); border-color: var(--desk-selection-line); color: var(--desk-ink); box-shadow: inset 3px 0 var(--desk-selection-line); }
.sidebar .workspace-button.active small { color: var(--desk-muted); }
:where(button,input,textarea,select) { font-family: inherit; line-height: 1.5; }
button { border-radius: var(--desk-radius); }
:where(.workspace-content,.review-dialog,.comment-panel) :is(input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=hidden]),textarea,select) {
  max-width: 100%; min-width: 0; padding: 9px 12px; border: 1px solid var(--desk-line); border-radius: var(--desk-radius); color: var(--desk-ink); background: var(--desk-surface); font-size: 13px; line-height: 1.5;
}
:where(.workspace-content,.review-dialog,.comment-panel) :is(button.secondary,.production-toolbar button,.review-reference-button,.review-choice-buttons button,.card-actions button,.editor-actions button,.management-pagination button,.review-pagination button) {
  padding: 8px 12px; border: 1px solid var(--desk-line); border-radius: var(--desk-radius); background: var(--desk-surface); color: var(--desk-ink); font: inherit; font-size: 13px; line-height: 1.5;
}
.workspace-content :is(#source-list,#structure-status,#structure-index,.screenplay-versions,#screenplay-episodes,#screenplay-scene-index,.breakdown-episode-tabs,.breakdown-scene-list) .source-button,
#source-list .source-group-toggle {
  border: 1px solid var(--desk-line); border-radius: var(--desk-radius); background: var(--desk-surface); color: var(--desk-ink); box-shadow: none; line-height: 1.5;
}
#source-list .source-group { border: 0; }
#source-list .source-group-toggle { display: block; text-align: left; padding: 12px; }
#source-list .source-group-items { border-left-color: var(--desk-line); }
.workspace-content :is(#source-list,#structure-status,#structure-index,.screenplay-versions,#screenplay-episodes,#screenplay-scene-index,.breakdown-episode-tabs,.breakdown-scene-list) .source-button:hover,
#source-list .source-group-toggle:hover { background: var(--desk-hover); border-color: var(--desk-selection-line); }
.workspace-content :is(#source-list,#structure-status,#structure-index,.screenplay-versions,#screenplay-episodes,#screenplay-scene-index,.breakdown-episode-tabs,.breakdown-scene-list) .source-button.active,
:where(.workspace-content,.review-dialog) .review-choice-buttons button[aria-pressed=true] {
  background: var(--desk-selected); border-color: var(--desk-selection-line); color: var(--desk-ink); box-shadow: inset 3px 0 var(--desk-selection-line); font-weight: 650;
}
.workspace-content :is(#source-list,#structure-status,#screenplay-episodes,#screenplay-scene-index,.breakdown-episode-tabs) :is(.revision-comment-count,.screenplay-episode-count,.screenplay-scene-count,.screenplay-scene-code,.source-group-toggle small,.source-button small) { color: var(--desk-muted); }
.source-chapter-button.active,.approach-index a.active { background: var(--desk-selected); border-color: var(--desk-selection-line); color: #355339; }
.text-reader-head,#structure-reader .structure-document-head,.screenplay-reading-head.text-reader-head,.breakdown-scene>.text-reader-head {
  background: var(--desk-soft); color: var(--desk-ink); border-bottom: 1px solid var(--desk-line);
}
.text-reader-head small,#structure-reader .structure-document-head small,.screenplay-reading-head.text-reader-head small { color: var(--desk-red); }
.text-reader-head p,#structure-reader .structure-document-head p,.screenplay-reading-head.text-reader-head p { color: var(--desk-muted); }
#screenplay-comments { background: var(--desk-surface); border-color: var(--desk-line); color: var(--desk-ink); border-radius: var(--desk-radius); }
.screenplay-episode strong { white-space: normal; overflow-wrap: anywhere; overflow: visible; }
.breakdown-episode-tabs { background: var(--desk-paper); }
/* Keep long scene/shot labels available at narrow widths; episode cards retain
   their shared 150 × 96 minimum size and horizontally accessible row. */
@media(max-width:700px) {
  .breakdown-episode-tabs .source-button:not(.screenplay-episode) { height: auto; white-space: normal; overflow: visible; }
  .workspace-content { padding-top: 18px; }
  .page-heading { margin-bottom: 18px; padding-bottom: 14px; }
  #structure-workspace:has(.structure-layout:not([hidden])) { margin-top: 0; }
}
.config-page { max-width: 1120px; border-radius: var(--desk-radius); padding: 24px; }
.config-page form { gap: 24px 18px; }
.config-page .config-section[data-config-section=SYSTEM] form { grid-template-columns: minmax(0,1fr); }
.config-feature { min-width: 0; padding-bottom: 24px; border-bottom: 1px solid var(--desk-line); }
.config-feature h2 { margin: 0; font-size: 19px; line-height: 1.5; }
.config-feature .config-explanation { margin: 6px 0 18px; line-height: 1.7; }
.config-feature-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 18px; }
.config-feature:first-of-type .config-feature-fields { grid-template-columns: minmax(0,1fr); }
.config-page .config-field { margin: 0; font-size: 13px; }
.config-page .config-field :is(input,select,textarea) { border-radius: var(--desk-radius); }
.config-field small { color: var(--desk-muted); line-height: 1.65; margin-top: 7px; }
.config-field-error { color: #963a30 !important; font-weight: 500; }
.config-choice-field legend { font-size: 13px; }
.config-choice span { padding: 8px 12px; border-radius: var(--desk-radius); font-size: 13px; line-height: 1.5; }
.config-choice:hover span { background: var(--desk-hover); border-color: var(--desk-selection-line); }
.config-choice input:checked + span { color: #355339; background: var(--desk-selected); border-color: var(--desk-selection-line); box-shadow: inset 0 -2px var(--desk-selection-line); font-weight: 650; }
.config-choice input:checked + span::before { content: '✓ '; }
.config-choice input:focus-visible + span { outline: 2px solid #496752; outline-offset: 3px; }
.favicon-previews { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 12px; }
.favicon-preview { display: flex; align-items: center; gap: 12px; min-width: 160px; }
.favicon-preview img { flex: none; box-sizing: content-box; object-fit: contain; padding: 12px; border: 1px solid var(--desk-line); border-radius: 10px; background: var(--desk-surface); }
.favicon-preview span { margin: 0; color: var(--desk-muted); font-weight: 500; }
.favicon-select-label { display: block; max-width: 620px; margin: 18px 0; }
.favicon-select-label span,.favicon-upload span { display: block; margin-bottom: 6px; font-weight: 600; }
.favicon-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 18px; }
.favicon-upload { display: block; flex: 1 1 300px; max-width: 620px; }
.favicon-upload input { width: 100%; }
input[type=file]::file-selector-button { border: 0; border-right: 1px solid var(--desk-line); padding: 3px 12px 3px 0; margin-right: 12px; color: #355339; background: transparent; font: inherit; cursor: pointer; }
.favicon-status,.config-save-status { margin: 12px 0 0; color: #355339; font-size: 13px; line-height: 1.7; }
.config-page .primary,.editor-actions .primary { background: #496752; border: 1px solid #496752; color: white; padding: 9px 16px; border-radius: var(--desk-radius); font-size: 13px; line-height: 1.5; }
.config-page .primary:hover,.editor-actions .primary:hover { background: #355339; }
.config-save-status { grid-column: 1/-1; }
.comment-panel>header { background: var(--desk-soft); border-color: var(--desk-line); }
.comment-panel>header :is(h2,button) { color: var(--desk-ink); }
.comment-panel>header small { color: var(--desk-muted); }
/* A visible outline and shape/weight changes supplement color in every state. */
:is(.workspace-content,.workspace-topbar,.sidebar,.review-dialog,.comment-panel) :is(button,a,input,select,textarea,summary,[role=button]):focus-visible { outline: 2px solid #496752; outline-offset: 3px; }
:is(input,textarea,select)[aria-invalid=true] { border-color: #963a30 !important; box-shadow: 0 0 0 1px #963a30; }
button:disabled,input:disabled,select:disabled { opacity: .55; cursor: not-allowed; filter: grayscale(.5); }
@media(max-width:700px) { .config-page { padding: 18px; }.config-feature-fields { grid-template-columns: minmax(0,1fr); }.favicon-actions { align-items: start; } }
.business-code-table { background: var(--desk-surface); }
.business-code-table th { background: var(--desk-soft); }
:where(.workspace-content,.review-dialog) .material-small-card { border-radius: var(--desk-radius) !important; }
:where(.workspace-content,.review-dialog) .material-small-card:hover { background: var(--desk-hover) !important; border-color: var(--desk-selection-line) !important; }
:where(.workspace-content,.review-dialog) .material-small-card[aria-pressed=true] { background: var(--desk-selected) !important; border-color: var(--desk-selection-line) !important; box-shadow: inset 3px 0 var(--desk-selection-line); }
.review-pagination :is(button,select) { font-family: inherit; color: var(--desk-ink); background: var(--desk-surface); border: 1px solid var(--desk-line); border-radius: var(--desk-radius); font-size: 13px; line-height: 1.5; padding: 8px 12px; }
.production-filter-chip { border-radius: var(--desk-radius); }
.production-filter-chip:hover { background: var(--desk-hover); border-color: var(--desk-selection-line); }
.production-filter-chip[aria-pressed=true] { background: var(--desk-selected); border-color: var(--desk-selection-line); color: var(--desk-ink); box-shadow: inset 0 -2px var(--desk-selection-line); font-weight: 650; }
.production-filter-chip[aria-pressed=true] .production-filter-count { background: #496752; color: white; }

.review-pagination button:not(:disabled):hover { background: var(--desk-hover); border-color: var(--desk-selection-line); }
.review-pagination :is(button,select):focus-visible { outline: 2px solid var(--desk-selection-line); outline-offset: 2px; }
.review-pagination button:disabled { color: var(--desk-muted); background: var(--desk-soft); opacity: .55; cursor: default; }

/* Keep each method resource and its condition together across form columns. */
.methods-page .method-tabs { display:flex; gap:0; margin:0 0 22px; border-bottom:1px solid var(--desk-line); }
.methods-page .method-tabs button[role=tab] { border:0; border-bottom:3px solid transparent; border-radius:0; padding:10px 20px; background:transparent; color:var(--desk-muted); }
.methods-page .method-tabs button[aria-selected=true] { border-bottom-color:var(--desk-selection-line); background:var(--desk-selected); color:#355339; }
.methods-page button:focus-visible { outline:2px solid #507658; outline-offset:3px; }
.method-tab-panel { min-width:0; }
.method-choices { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.methods-page .method-choices button.active,.method-catalog button.active { background:var(--desk-selected); border-color:var(--desk-selection-line); color:#355339; }
.method-browse-layout { display:grid; grid-template-columns:minmax(175px,230px) minmax(0,1fr); gap:28px; margin-top:24px; }
.method-catalog { display:flex; flex-direction:column; align-self:start; position:sticky; top:110px; max-height:72vh; overflow:auto; gap:6px; }
.method-catalog button { text-align:left; }
.method-catalog small { display:block; color:var(--desk-muted); font-size:12px; line-height:1.6; margin-top:5px; }
.method-content { min-width:0; }
.method-content h2 { margin-top:0; }
.method-content .method-choices button { font-size:13px; }
.method-rule-choice { flex:1 1 100%; min-width:0; }
.method-binding-rule { padding:12px 0; border-bottom:1px solid var(--desk-line); }
.method-binding-rule p { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; }
.methods-page .method-tabs button,.methods-page .method-files button,.methods-page .method-rules button { border: 1px solid var(--desk-line); border-radius: var(--desk-radius); background: #fffdfa; padding: 7px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.methods-page .method-tabs button.active { background: var(--desk-selected); border-color: var(--desk-selection-line); color: #355339; }
.methods-page > select { margin-bottom: 24px; max-width: 100%; }
.methods-page .method-files,.methods-page .method-resources,.methods-page .method-rules,.methods-page .config-explanation { grid-column: 1/-1; min-width: 0; }
.methods-page .method-files .config-field { margin-bottom: 14px; }
.methods-page .method-files input { max-width: 65%; margin-right: 8px; }
.methods-page .method-resources h3 { margin: 0 0 14px; font-size: 16px; }
.methods-page .method-resource-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 8px 16px; margin: 10px 0; }
.methods-page .method-resource-row > input { width: 100%; min-width: 0; }
.methods-page .method-resource-row > input:disabled { opacity: .5; }
.methods-page .method-resource-row > label:not(.config-choice) { grid-column: 1/-1; font-size: 13px; }
.methods-page .method-rules .config-field { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.methods-page .method-rules input,.methods-page .method-rules select { flex: 1 1 240px; }
@media(max-width:700px) { .methods-page .method-resource-row { grid-template-columns: minmax(0,1fr); margin-bottom: 18px; } }
.method-reading-layout { display:flex; flex-direction:column; gap:24px; margin-top:24px; }
.method-directory { display:flex; flex-wrap:wrap; gap:6px; }
.method-directory > .method-choices { flex:1 1 100%; }
.methods-page button { font:inherit; border:1px solid var(--desk-line); background:#fffdfa; border-radius:4px; padding:7px 10px; cursor:pointer; }
.method-directory button { text-align:left; overflow-wrap:anywhere; }
.method-directory > button { flex:0 1 auto; max-width:100%; font-size:13px; }
.method-directory small { display:block; color:var(--desk-muted); font-size:11px; }
.method-directory button.active { background:var(--desk-selected); }
.method-prose { min-width:0; line-height:1.85; overflow-wrap:anywhere; }
.method-prose h2,.method-prose h3,.method-prose h4 { margin:24px 0 12px; scroll-margin-top:120px; }
.method-prose p { margin:0 0 18px; white-space:pre-wrap; }
.method-prose pre { overflow:auto; font-size:13px; white-space:pre-wrap; }
.method-prose img { max-width:100%; }
.method-list-item { padding-left:20px; position:relative; }
.method-list-item::before { content:'•'; position:absolute; left:2px; }
.method-tools { display:flex; gap:8px; flex-wrap:wrap; margin:18px 0; }
.method-shared { display:flex; flex-direction:column; gap:8px; margin-top:30px; }
.method-shared button { text-align:left; }
.method-shared small { display:block; color:var(--desk-muted); }
.method-source,.method-use { font-size:13px; color:var(--desk-muted); }
.method-body-editor { width:100%; min-height:55vh; font:14px/1.8 monospace; }
.method-apply-scopes { margin-top:20px; }
.method-apply-scopes label { display:block; margin:10px; }
@media(max-width:900px) { .method-browse-layout { grid-template-columns:1fr; gap:24px; } .method-catalog { position:static; max-height:none; display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); } .method-catalog small { display:none; } .method-reading-layout { gap:16px; } }
@media(max-width:500px) { .methods-page .method-tabs button[role=tab] { flex:1; padding:10px 8px; } .method-catalog { grid-template-columns:1fr; } }

/* SKILL reading: complete vertical flow, file tree, independent file history. */
.config-page.skill-admin { max-width:none; padding:22px; container-type:inline-size; }
.skill-admin-layout { display:grid; grid-template-columns:260px minmax(0,1fr); gap:28px; align-items:start; min-height:calc(100vh + 100px); }
.skill-flow { position:sticky; top:112px; max-height:calc(100vh - 132px); overflow:auto; padding:0 16px 12px 0; scrollbar-width:thin; }
.skill-flow h2 { font-size:17px; margin:0 0 18px; }
.novel-workspace #novel-index { margin-bottom:16px; }
.novel-workspace .source-chapter-button { display:block; }
.novel-workspace .source-chapter-button strong { display:block; }
.novel-workspace .source-chapter-button small { display:block; margin-top:8px; }
.novel-workspace #source-view .source-text { max-width:82ch; }
.skill-flow-main,.skill-flow-branches { list-style:none; margin:0; padding:0; }
.skill-flow-stage { position:relative; text-align:center; padding:0 0 27px; }
.skill-flow-main .skill-flow-stage:not(:last-child)::after { content:'↓'; position:absolute; bottom:3px; left:calc(50% - 5px); color:#94a291; font-size:17px; }
.skill-flow-stage > button,.skill-flow-label { width:100%; display:block; padding:10px 8px; border:1px solid #d4d8ca; border-radius:7px; background:#f5f2e9; color:#56614e; font:inherit; font-size:14px; line-height:1.5; }
.skill-flow-label { box-sizing:border-box; background:transparent; border-color:transparent; }
.skill-flow button:hover { border-color:#7c967d; }
.skill-flow button.active { background:#dfe9d8; border-color:#6e886f; color:#294c34; font-weight:600; }
.skill-flow-parallel { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; padding:8px; border:1px solid #e2e0d8; border-radius:8px; background:transparent; }
.skill-flow-parallel button { padding:8px 4px; font:inherit; font-size:13px; border:1px solid #d4d8ca; background:#f5f2e9; border-radius:5px; }
.skill-flow-family { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; border:1px solid #d4d9ce; border-radius:7px; padding:6px; }
.skill-flow-family > .skill-flow-label,.skill-flow-family > button:only-child { grid-column:1 / -1; }
.skill-flow-family > .skill-flow-label { padding:3px; text-align:left; font-size:12px; }
.material-category-filter > .production-filter-options { align-items:center; }
.material-category-filter .production-filter-chip { white-space:nowrap; }
.material-category-family { display:flex; max-width:100%; box-sizing:border-box; padding:4px; gap:8px; border:1px solid #d4d9ce; border-radius:var(--desk-radius); }
.material-category-parent { display:flex; align-items:flex-start; padding-right:8px; border-right:1px solid #d4d9ce; }
.material-category-children { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
.material-category-filter .production-entity-icon { flex-shrink:0; }
@media(max-width:750px) { .material-category-family,.material-category-children { gap:6px; } .material-category-parent { padding-right:6px; } }
.skill-flow-repeat { margin:7px 4px 0; padding-left:8px; border-left:1px dashed #c6ccbf; text-align:left; }
.skill-flow-repeat button { padding:5px 8px; border:1px solid #cbd3c2; border-radius:5px; background:#eef2e6; color:#52674c; font:inherit; font-size:12px; }
.skill-flow button:focus-visible,.skill-file-tree button:focus-visible { outline:2px solid #567d59; outline-offset:2px; }
.skill-flow-repeat small { display:block; padding:3px 6px; color:#71756b; font-size:11px; line-height:1.65; }
.skill-flow-return { display:block; font-size:12px; line-height:1.6; color:#647661; border-left:1px dashed #9ba994; text-align:left; margin:6px 0 0 4px; padding-left:10px; }
.skill-flow-output { white-space:pre-line; display:block; margin:6px 6px 0; color:#71756b; font-size:12px; font-weight:400; line-height:1.65; text-align:left; }
.skill-flow-branches { margin-top:6px; padding-top:18px; }
.skill-flow-branches .skill-flow-stage { padding-bottom:18px; }
.skill-flow-support { display:block; margin:8px 0 0; font-size:12px; line-height:1.6; color:#687562; text-align:left; }
.skill-content,.skill-reader { min-width:0; scroll-margin-top:120px; }
.skill-content { min-height:inherit; }
.skill-reader { position:sticky; top:112px; height:calc(100vh - 132px); overflow:auto; scrollbar-width:thin; padding-right:8px; overflow-anchor:none; }
.method-reference-condition { display:block; padding:0 7px 8px; font-size:12px; color:#687562; line-height:1.6; }
.skill-heading { font-size:21px; margin:0 0 22px; }
.skill-reading-grid { display:grid; grid-template-columns:minmax(160px,210px) minmax(0,1fr); gap:24px; align-items:start; min-height:calc(100vh + 50px); }
.skill-file-tree { position:sticky; top:112px; max-height:calc(100vh - 135px); overflow:auto; padding-right:10px; scrollbar-width:thin; }
.skill-file-group { margin:0 0 22px; }
.skill-file-group h3 { margin:0 0 8px; font-size:13px; font-weight:600; color:#64705e; }
.skill-folder { margin:10px 0 3px; font:12px/1.5 ui-monospace,monospace; color:#7a8071; overflow-wrap:anywhere; }
.skill-file-group button { display:block; width:100%; text-align:left; font:13px/1.6 ui-monospace,monospace; padding:6px 7px; border:1px solid transparent; background:transparent; border-radius:5px; overflow-wrap:anywhere; }
.skill-file-group button.active { background:#e3eada; border-color:#acb9a4; color:#294c34; }
.skill-file-group button:hover { background:#e9eddf; }
.skill-file-heading h3 { margin:0; font:15px/1.6 ui-monospace,monospace; overflow-wrap:anywhere; }
.skill-file-tools { display:grid; grid-template-columns:max-content minmax(0,1fr); align-items:start; gap:12px; margin:10px 0 18px; }
.skill-file-tools > button { padding:7px 10px; border:1px solid #c1cbbb; border-radius:5px; background:transparent; font:inherit; font-size:13px; }
.skill-file-tools > button:disabled { opacity:.42; cursor:default; }
.skill-file-tools .method-choices { border-left:1px solid #ccd2c2; padding-left:14px; margin:0; justify-content:flex-end; }
.method-choices button { padding:5px 8px; border:1px solid #d8dacd; border-radius:5px; background:#fbf8ef; font-family:inherit; font-size:13px; line-height:1.6; }
.method-choices button.active { background:#e0e8d6; border-color:#92a587; color:#355339; }
.skill-reader > button { border:0; background:transparent; color:#526f50; padding:3px 0 15px; font:inherit; font-size:13px; }
.method-prose { font-size:16px; }
.method-prose pre { font:13px/1.65 ui-monospace,monospace; white-space:pre-wrap; }
.method-comparison { width:min(1100px,calc(100vw - 32px)); max-width:calc(100vw - 20px); }
.method-compare-selectors,.method-compare-originals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.method-compare-selectors { position:sticky; top:0; padding:0 0 12px; background:var(--desk-surface,#f8f4e9); z-index:1; }
.method-compare-selectors h3,.method-compare-originals h3 { font-size:14px; margin:0 0 6px; }
.method-compare-originals img,.method-compare-originals video { width:100%; object-fit:contain; }
.method-compare-originals audio { width:100%; }
.method-diff-equal { padding:24px; text-align:center; color:#526b4e; }
.method-diff-legend { color:#6f7866; font-size:13px; }
.method-diff-line { display:grid; grid-template-columns:36px 22px minmax(0,1fr); padding:2px 8px; border-left:3px solid transparent; }
.method-diff-line pre { white-space:pre-wrap; overflow-wrap:anywhere; margin:0; font:14px/1.75 ui-monospace,monospace; }
.method-diff-number,.method-diff-sign { font:12px/2 ui-monospace,monospace; color:#888b7c; user-select:none; }
.method-diff-line.removed { background:#f9e5de; border-color:#b86d57; }
.method-diff-line.added { background:#e2eedc; border-color:#6a8b60; }
@container(max-width:1050px) { .skill-reading-grid { grid-template-columns:minmax(0,1fr); }.skill-file-tree { position:static; max-height:260px; padding:12px; border:1px solid #d9dccf; }.skill-file-group { margin:0 0 16px; }.skill-file-group:last-child { margin-bottom:0; } }
@container(max-width:690px) { .skill-admin-layout { grid-template-columns:minmax(0,1fr); }.skill-flow { position:static; max-height:none; padding:0; }.skill-flow-main { max-width:400px; margin:auto; }.skill-flow-branches { max-width:390px; margin:10px auto 0; }.skill-file-tree { max-height:300px; }.skill-content { border-top:1px solid #d3d8c9; padding-top:24px; } }
@media(max-width:500px) { .config-page.skill-admin { padding:14px; }.method-compare-selectors,.method-compare-originals { grid-template-columns:minmax(0,1fr); gap:16px; }.method-compare-selectors { position:static; }.method-diff-line { grid-template-columns:26px 18px minmax(0,1fr); padding:2px 2px; }.method-diff-line pre { font-size:13px; }.method-prose { font-size:15px; }.skill-file-tools { justify-content:flex-start; } }

/* Business model stays native text at every reading width. */
.data-model{container-type:inline-size;margin-top:3rem;padding-top:2rem;border-top:1px solid var(--line,#d9d8cd)}
.model-lead{max-width:65rem;line-height:1.8}.model-diagram{margin:2rem 0;background:#f5f4e9;border:1px solid #d8ddcd;border-radius:12px;padding:24px}
.model-diagram figcaption{font-size:1.3rem;font-weight:650;margin-bottom:24px;color:#3e513d}.model-graph{position:relative;display:grid;gap:60px}
.model-group{position:relative;min-width:0;z-index:1}.model-group-title{font-size:.9rem;color:#63765b;margin:0 0 14px}.model-row{display:grid;grid-template-columns:repeat(var(--model-columns),minmax(0,1fr));gap:84px;align-items:stretch}.model-row+.model-row{margin-top:60px}
.model-node{background:#edf0df;border:1px solid #bec9ad;border-radius:8px;padding:20px;position:relative;min-width:0}.model-node h4{margin:0 0 9px;color:#354c36;font-size:1.05rem}.model-node p{margin:0;line-height:1.8;color:#4c5549}.model-node p,.model-edge-label{overflow-wrap:anywhere}
.model-lines{position:absolute;width:100%;height:100%;inset:0;overflow:visible;pointer-events:none}.model-lines>path{fill:none;stroke:#849579;stroke-width:1.3}.model-lines marker path{fill:none;stroke:#849579;stroke-width:1.4}
.model-edge-label{position:absolute;z-index:2;background:#f5f4e9;transform:translate(-50%,-50%);font-size:.8rem;padding:3px 5px;text-align:center;max-width:78px;color:#596d4e;line-height:1.5}
.model-mobile-links{display:none}.model-note{margin:22px 0 0;color:#68715f;line-height:1.8}.model-examples{display:grid;grid-template-columns:1fr 1fr;gap:24px}.model-examples p{margin:0;line-height:1.8}
.model-node{scroll-margin-top:140px}.model-node:target,.model-node:focus{outline:2px solid #708565;outline-offset:4px}.model-properties{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 12px;margin:14px 0 0;padding-top:12px;border-top:1px solid #d2d9c5;font-size:.86rem;line-height:1.6;color:#4f604a}.model-properties dt{color:#72796b}.model-properties dd{margin:0}.model-related{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:6px;font-size:.85rem;line-height:1.6;color:#65705e}.model-related a{color:#476b45;text-underline-offset:3px}
@container(max-width:800px){.model-diagram{padding:18px}.model-graph{gap:28px}.model-row{grid-template-columns:1fr;gap:26px}.model-lines,.model-edge-label{display:none}.model-mobile-links{display:grid;gap:8px;padding:14px 0 0;margin:14px 0 0;border-top:1px dashed #b8c1ab;list-style:none;font-size:.88rem;color:#536b47}.model-node{padding:18px}.model-examples{grid-template-columns:1fr}}

/* Work and its outputs form one stage; outputs are passive paper shapes. */
.skill-flow-frame { border:1px solid #d5dacd; border-radius:9px; padding:9px; background:#f7f6ed; }
.skill-flow-action > button { width:100%; padding:9px 7px; border:1px solid #cbd3c2; border-radius:7px; background:#eef2e6; font:inherit; font-size:14px; line-height:1.5; }
.skill-flow-frame .skill-flow-label { padding:6px 3px; }
.skill-flow-frame .skill-flow-parallel { border:0; padding:4px 0; }
.skill-flow-produce { display:block; padding:3px 0; color:#71836a; font-size:12px; line-height:1.5; }
.skill-flow-frame .skill-flow-output { position:relative; margin:0; padding:10px 14px 10px 9px; border:1px solid #d5d8cb; border-radius:2px 12px 2px 2px; background:#fffdf5; font-size:13px; line-height:1.65; color:#525c4e; }
.skill-flow-frame .skill-flow-output::after { content:''; position:absolute; top:0; right:0; width:10px; height:10px; border-left:1px solid #d5d8cb; border-bottom:1px solid #d5d8cb; border-radius:0 9px 0 2px; background:#edf0e4; }

.skill-flow-produce { position:relative; margin:0; height:28px; padding:0 0 0 34px; line-height:28px; text-align:center; }
.skill-flow-produce::before { content:''; position:absolute; left:50%; top:2px; bottom:4px; border-left:1px solid #8da081; }
.skill-flow-produce::after { content:''; position:absolute; left:calc(50% - 3px); bottom:4px; width:5px; height:5px; border-right:1px solid #8da081; border-bottom:1px solid #8da081; transform:rotate(45deg); }
.skill-flow-frame .skill-flow-repeat { margin:4px 0; }
.method-prose [data-section] { scroll-margin-top:120px; }

#approach-view:has(.approach-methods) { max-width:none; }
.approach-layout:has(.approach-methods) { border:0; box-shadow:none; background:transparent; }
.approach-body.approach-methods { padding:0; border:0; background:transparent; }
.approach-methods .skill-flow h2 { font-size:17px; }
.approach-methods .skill-heading { font-size:21px; }
.method-prose > video {display:block;width:100%;max-width:100%;height:auto}
.method-prose > audio {display:block;max-width:100%}

/* Public source links stay below workspace navigation, including on narrow screens. */
.sidebar .repository-links { display: grid; gap: 6px; flex: 0 0 auto; margin-top: auto; padding: 24px 4px 0; }
.repository-links a { display: block; min-width: 0; padding: 5px 6px; color: var(--desk-ink); text-decoration: none; border-radius: var(--desk-radius); overflow-wrap: anywhere; }
.repository-links a[hidden] { display: none; }
.repository-links a:hover { background: var(--desk-hover); }
.repository-links small { display: block; color: var(--desk-muted); font-size: 10px; line-height: 1.5; }
.repository-links span { display: block; font-size: 12px; line-height: 1.6; }
.sidebar .sidebar-foot { margin-top: 0; }
@media(max-width:700px) {
  .sidebar { flex-wrap: wrap; height: auto; min-height: 64px; }
  .sidebar .repository-links { flex: 0 0 100%; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 8px; padding: 0; border-top: 1px solid var(--desk-line); }
  .repository-links a { padding-block: 4px; }
  .repository-links small { font-size: 9px; }
  .repository-links span { font-size: 11px; }
  .workspace-topbar { top: var(--review-sidebar-height,64px); }
  .comment-panel { top: var(--review-sidebar-height,64px); }
}

.cross-version-comments{margin-bottom:20px;border-bottom:1px solid #d8d2c5;padding-bottom:16px}.cross-version-comments summary{cursor:pointer;font-weight:600}.cross-version-row{border-top:1px solid #d8d2c5;padding:14px 0}.cross-version-row p{max-height:5.5em;overflow:auto;line-height:1.7}.cross-version-row button,.comment-review-dialog button{padding:8px 12px;border:1px solid #c9c7b9;border-radius:6px;background:#fff;color:#303d32}.comment-review-dialog{width:min(1100px,96vw);max-height:92vh;padding:0;border:1px solid #ccc6b8;border-radius:10px;background:#faf8f1;color:#252621;overflow:auto}.comment-review-dialog::backdrop{background:#18251b88}.comment-review-dialog>header{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#faf8f1;padding:15px 24px;border-bottom:1px solid #d8d2c5}.comment-review-dialog h2{margin:0;font-size:22px}.comment-review-dialog>p,.comment-review-navigation,.comment-review-body,.comment-review-decision{margin:0;padding:14px 24px}.comment-review-navigation{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid #d8d2c5}.comment-review-navigation button[aria-pressed=true]{background:#e2ebdc;border-color:#6a8462}.comment-review-body{min-height:160px}.comment-review-exact p,.comment-review-full p{white-space:pre-wrap;font-size:18px;line-height:1.9;overflow-wrap:anywhere}.comment-review-exact mark{background:#f5dfa3}.comment-review-full summary{cursor:pointer}.comment-review-image{position:relative;line-height:0}.comment-review-image img{width:100%;height:auto}.comment-review-image.original-selection{outline:3px solid #a75f3e}.comment-review-image svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.comment-review-image polygon{fill:#b3563630;stroke:#a75031;stroke-width:.004}.comment-review-body figure{margin:18px 0}.comment-review-body code{overflow-wrap:anywhere}.comment-review-decision{border-top:1px solid #d8d2c5;background:#f0eee4}.comment-review-decision q{display:block;white-space:pre-wrap;line-height:1.7}.comment-review-decision p{white-space:pre-wrap;line-height:1.7}.comment-review-dialog .card-actions{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:700px){.comment-review-dialog>header,.comment-review-dialog>p,.comment-review-navigation,.comment-review-body,.comment-review-decision{padding:12px}.comment-review-dialog{max-height:96vh}.comment-review-exact p{font-size:17px}}

/* Layout only; selection, paper colors and controls use the shared desk theme. */
.episode-editing { margin:0; min-width:0; color:var(--desk-ink); }
.edit-filters { margin-bottom:22px; }
.edit-filters .production-filter-group:first-child { margin-top:0; }
.edit-toolbar { display:flex; align-items:end; flex-wrap:wrap; gap:10px; margin:14px 0; }
.edit-toolbar input { width:110px; }
.edit-timeline-tools { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:16px 22px; margin-top:22px; }
.edit-zoom-group { min-width:0; }
.edit-zoom-group .production-filter-group { display:flex; align-items:center; gap:12px; margin:0; }
.edit-zoom-group .production-filter-label { padding-top:0; }
.edit-play-position { display:flex; align-items:center; gap:7px; white-space:nowrap; padding:0 22px 0 0; border-right:2px solid var(--desk-line); color:var(--desk-muted); font-size:13px; }
.edit-play-position output { min-width:74px; color:var(--desk-ink); font-size:16px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.edit-range-controls { order:-1; flex:1 1 auto; margin:0; padding:0; gap:8px; }

.edit-main { min-width:0; }
.edit-player { max-width:960px; margin:0 auto; background:#171e19; border-radius:var(--desk-radius); overflow:hidden; }
.edit-player video { display:block; width:100%; max-height:60vh; aspect-ratio:16/9; }
.edit-notice { border-left:3px solid var(--desk-selection-line); background:var(--desk-soft); padding:10px 14px; line-height:1.7; font-size:13px; }
.edit-timeline-scroll { overflow:auto; max-width:100%; margin-top:14px; border:1px solid var(--desk-line); border-radius:var(--desk-radius); background:var(--desk-surface); }
.edit-timeline { position:relative; min-width:0; cursor:crosshair; user-select:none; }
.edit-timeline button { cursor:pointer; }
.edit-timeline.selecting,.edit-timeline.selecting button { cursor:crosshair; touch-action:none; }
.edit-timeline-content { position:relative; }
.edit-frame-grid .edit-track,.edit-frame-grid .edit-ruler { background-position:112px 0; background-image:repeating-linear-gradient(to right,var(--desk-line) 0 1px,transparent 1px var(--edit-frame-width)); }
.edit-ruler { height:32px; border-bottom:1px solid var(--desk-line); position:relative; background:var(--desk-soft); }
.edit-ruler > button { position:absolute; top:0; font:inherit; font-size:11px; background:none; border:0; color:var(--desk-muted); padding:5px; }
.edit-track { height:60px; position:relative; border-bottom:1px solid var(--desk-line); }
.edit-track-name { display:flex; align-items:center; position:sticky; left:0; height:100%; box-sizing:border-box; width:112px; padding:8px; z-index:5; font-size:12px; border-right:1px solid var(--desk-line); background:var(--desk-surface); color:var(--desk-muted); }
.edit-clip { position:absolute; top:10px; height:40px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border:1px solid var(--desk-selection-line); border-radius:var(--desk-radius); background:var(--desk-selected); font:inherit; font-size:11px; text-align:left; padding:5px; color:var(--desk-ink); }
.edit-clip.audio { background:var(--desk-soft); border-color:var(--desk-line); }
.subtitles .edit-clip { background:var(--desk-surface); border-color:var(--desk-line); }
.edit-clip:hover { background:var(--desk-hover); }
.edit-playhead { position:absolute; top:0; bottom:0; width:14px; margin-left:-6px; cursor:ew-resize; touch-action:none; pointer-events:none; z-index:3; }
.edit-playhead::before { content:''; position:absolute; left:6px; top:0; bottom:0; width:2px; background:var(--desk-red); }
.edit-playhead::after { content:''; position:absolute; left:2px; top:0; width:10px; height:10px; background:var(--desk-red); pointer-events:auto; clip-path:polygon(0 0,100% 0,100% 55%,50% 100%,0 55%); }
.edit-playhead:focus-visible,.edit-playhead.dragging { outline:1px solid var(--desk-red); outline-offset:-1px; }

.episode-editing .edit-toolbar button[aria-pressed=true] { background:var(--desk-selected); border-color:var(--desk-selection-line); color:var(--desk-ink); }
@media(max-width:760px) {
  .edit-player video { max-height:50vh; }
  .edit-toolbar { gap:8px; }
}

.edit-range-shade { position:absolute; top:0; bottom:0; background:var(--desk-selected); opacity:.6; pointer-events:none; }
.edit-clip.range-selected,.edit-clip[aria-pressed=true] { outline:2px solid var(--desk-selection-line); outline-offset:-2px; }
.edit-range-feedback { margin:10px 0 0; font-size:13px; color:var(--desk-red); }
.edit-range-feedback[hidden] { display:none; }
.edit-range-controls input:disabled,.edit-range-controls button:disabled { opacity:.5; cursor:default; background:var(--desk-soft); }
.edit-selection-corner { position:sticky; left:0; width:112px; height:100%; box-sizing:border-box; z-index:6; display:flex; align-items:center; justify-content:center; border-right:1px solid var(--desk-line); background:var(--desk-surface); }
.edit-selection-corner button { display:flex; flex-direction:row-reverse; align-items:center; gap:6px; padding:4px 10px; font:inherit; font-size:12px; cursor:pointer; }
.edit-selection-corner button[aria-pressed=true] { background:var(--desk-selected); border-color:var(--desk-selection-line); }
.edit-selection-icon { font-size:16px; line-height:1; border:1px dashed currentColor; }
.edit-track-name[role=button] { cursor:pointer; }
.edit-track-name.selected { color:var(--desk-ink); background:var(--desk-selected); box-shadow:inset 4px 0 var(--desk-selection-line); font-weight:600; }
.edit-track-name[role=button]:focus-visible { outline:2px solid var(--desk-selection-line); outline-offset:-3px; }
.edit-range-shade.historical { background:transparent; border:1px dashed var(--desk-selection-line); box-sizing:border-box; }
.edit-context { margin:0; padding:10px 22px; border-bottom:1px solid var(--desk-line); }
.edit-context p { flex:1 1 100%; margin:0; }
.material-text-entry { padding:12px; border-bottom:1px solid var(--desk-line); }
.material-text-entry p { white-space:pre-wrap; }
.material-text-entry.selected { background:var(--desk-selected); outline:1px solid var(--desk-selection-line); }
@media(max-width:760px) { .edit-zoom-group .production-filter-group { flex-wrap:wrap; gap:8px; } .edit-play-position { margin-right:auto; } }
