#editorialView { padding: 24px; }
.editorial-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin-bottom:24px; }
.editorial-toolbar h1 { margin-right:auto; }
.editorial-library { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:24px; }
.editorial-card { padding:24px;border:1px solid var(--weave-color-rule);border-radius:16px; }
.editorial-article { max-width:760px;margin:24px auto;line-height:1.75; }
.editorial-article h2 { margin-top:32px; }
.editorial-article nav { display:flex;flex-direction:column;align-items:start;gap:8px; }
.editorial-article textarea { display:block;width:100%;min-height:100px;margin:16px 0; }
.editorial-current { font-size:1.15em; }
.editorial-milestone { padding:16px 0;border-bottom:1px solid var(--weave-color-rule); }
.editorial-milestone summary { cursor:pointer; }
.editorial-message:empty { display:none; }
.editorial-quotation { margin:24px 0;padding:0 0 0 24px;border-left:2px solid var(--wine,#773747); }
.editorial-quotation blockquote { margin:0;font-size:1.12em;font-style:italic;white-space:pre-line; }
.editorial-quotation figcaption { margin-top:8px;font-size:.85em;opacity:.8; }
.editorial-recap-header { display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:center; }
.editorial-recap-opening::first-letter { float:left;font-size:3.2em;line-height:1;padding-right:8px;color:var(--wine,#773747); }
@media(max-width:640px) { .editorial-recap-header { grid-template-columns:1fr; } }
:where(#editorialView) :where(button,input,select,textarea) { font:inherit; }
:where(#editorialView) button { cursor:pointer; }
#editorialView button:disabled { cursor:default;opacity:.5; }

/* The DM reads the same story surface, with review controls outside its measured column. */
#editorialView.recap-review { max-width: 1440px; margin-inline: auto; }
.recap-review-toolbar { position: sticky; top: var(--shell-header-height); z-index: 5; background: var(--weave-color-canvas); padding-block: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 24px; }
.recap-status { padding: 4px 12px; border-radius: var(--weave-radius-full); background: var(--weave-color-selected); font-size: var(--weave-text-sm); }
.recap-review-reader { min-width: 0; display: block; }
.session-reference-body > dl:only-child { grid-column: 1 / -1; }
.session-cast-names > button { margin-left: 16px; white-space: nowrap; }
.recap-cast-person { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.recap-popover.recap-cast-editor { margin: 0; inset: auto; }
.recap-cast-current { margin-bottom: 16px; }
#editorialView.recap-review .recap-cast-person button { min-width: 32px; min-height: 32px; text-decoration: none; }
#editorialView.recap-review details { min-width: 0; margin: 0; padding: 0; border: 0; border-block: 1px solid var(--weave-color-rule); border-radius: 0; background: transparent; box-shadow: none; }
#editorialView.recap-review details > summary { box-sizing: border-box; width: auto; min-width: 0; margin: 0; padding: 12px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; cursor: pointer; color: inherit; overflow-wrap: anywhere; }
#editorialView.recap-review details > summary::after { content: none; }
.recap-review-toolbar .reading-location { margin: 0 auto 0 0; }
.recap-review-toolbar .btn-secondary { border-color: transparent; background: transparent; box-shadow: none; color: var(--weave-color-action); }
@media (max-width:640px) {
  .recap-review-toolbar .reading-location { flex-basis: 100%; }
  .recap-review-toolbar { gap: 8px 16px; }
}
#editorialView.recap-review .recap-processing { margin-bottom: 24px; }
#editorialView.recap-review .recap-quiet-control:not(.btn-secondary) { border: 0; background: transparent; padding: 0; color: var(--weave-color-action); text-decoration: underline; text-underline-offset: 4px; font-size: var(--weave-text-sm); }
.recap-version-history, .recap-character-looks { box-sizing: border-box; width: min(800px,calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 24px; border: 1px solid var(--weave-color-rule); background: var(--weave-color-paper); color: var(--text-primary); }
.recap-version-history::backdrop, .recap-character-looks::backdrop { background: var(--weave-color-scrim); }

#editorialView.recap-review .table-note { box-sizing: border-box; max-height: 70dvh; overflow-y: auto; }
#editorialView.recap-review .session-article-hero { overflow: visible; }
#editorialView.recap-review .recap-cover-controls p { color: var(--weave-color-secondary); }
#editorialView.recap-review .session-article-hero > .recap-cover-controls { z-index: 2; }
.recap-cover-controls { position: relative; min-width: 0; font: var(--weave-text-xs)/1.5 var(--weave-font-ui); }
.recap-image-box { position: relative; isolation: isolate; width: 100%; aspect-ratio: 3 / 2; background: var(--weave-color-paper); border-radius: var(--weave-radius-sm); box-shadow: 0 0 0 6px var(--weave-color-paper), 0 0 0 7px var(--weave-color-rule-strong); }
.recap-image-dither, .recap-image-art { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.recap-image-dither { color: var(--weave-color-rule-strong); background: radial-gradient(circle, currentColor 0.7px, transparent 1px) 0 0 / 6px 6px, repeating-linear-gradient(30deg, transparent 0 47px, var(--weave-color-rule) 48px, transparent 49px 96px), repeating-linear-gradient(150deg, transparent 0 47px, var(--weave-color-rule) 48px, transparent 49px 96px), var(--weave-color-paper); }
:is(#sessionWikiArticle,.recap-review-reader) .recap-image-art img { display: block; width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.recap-image-box.is-painting .recap-image-art, .recap-image-box.is-painting .recap-image-pill { visibility: hidden; }
.recap-cover-controls:has(.is-painting) .recap-image-caption { visibility: hidden; }
.recap-cover-controls .recap-image-caption { margin: var(--weave-space-3) 0 0; padding-right: var(--weave-space-7); color: var(--weave-color-secondary); }
.recap-image-caption:empty, .recap-image-notice:empty { display: none; }
.recap-image-pill { position: absolute; top: var(--weave-space-2); left: var(--weave-space-2); padding: var(--weave-space-1) var(--weave-space-2); border-radius: var(--weave-radius-full); color: var(--weave-color-secondary); background: var(--weave-color-paper); }
.recap-image-notice { position: absolute; bottom: var(--weave-space-2); left: var(--weave-space-2); max-width: calc(100% - var(--weave-space-8)); margin: 0; padding: var(--weave-space-1) var(--weave-space-2); background: var(--weave-color-paper); color: var(--weave-color-secondary); }
.recap-image-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#editorialView .recap-roll { position: absolute; right: 10px; bottom: 10px; width: 56px; height: 56px; padding: 0; border: 0; background: transparent; color: var(--weave-color-action); opacity: 1; cursor: pointer; }
.recap-roll svg { position: relative; z-index: 1; display: block; width: 100%; height: 100%; overflow: visible; font-family: var(--weave-font-ui); font-weight: var(--weave-weight-semibold); transition: transform .2s ease, filter .2s ease; }
.recap-roll-label { display: block; position: absolute; right: calc(100% + 4px); top: 50%; translate: 0 -50%; width: max-content; padding: 4px 8px; border-radius: var(--weave-radius-full); background: var(--weave-color-paper); color: var(--weave-color-ink); font: var(--weave-text-xs)/1.5 var(--weave-font-ui); }
.recap-roll:not(:disabled):not(.is-rolling):is(:hover,:focus-visible) svg { transform: translateY(-2px); filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--weave-color-ink) 25%, transparent)); }
#editorialView .recap-roll:disabled { cursor: default; opacity: 1; }
.recap-roll:focus-visible { outline: 2px solid var(--weave-color-action); outline-offset: 2px; }
.recap-image-box.is-painting .recap-image-dither { animation: recap-paint-shimmer 4s ease-in-out infinite; }
@keyframes recap-paint-shimmer { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (max-width: 640px) { #editorialView .recap-roll { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) {
  .recap-roll svg { transition: none; }
  .recap-image-box.is-painting .recap-image-dither { animation: none; }
  .recap-roll:not(:disabled):is(:hover,:focus-visible) svg { transform: none; }
}
.recap-image-choices { display: flex; flex-wrap: nowrap; overflow-x: auto; align-items: center; gap: 0 var(--weave-space-2); padding-top: var(--weave-space-2); }
.recap-image-choices > button { flex: 0 0 auto; white-space: nowrap; }
.recap-image-choices > button + button::before { content: '·'; display: inline-block; margin-right: var(--weave-space-2); color: var(--weave-color-secondary); }
#editorialView.recap-review .recap-image-choices button { font-size: var(--weave-text-xs); text-decoration: none; }
.recap-image-popover { position: absolute; z-index: 4; top: calc(100% + var(--weave-space-2)); left: 0; right: 0; box-sizing: border-box; padding: var(--weave-space-7) var(--weave-space-5) var(--weave-space-5); max-height: 60dvh; overflow-y: auto; background: var(--weave-color-paper); border: 1px solid var(--weave-color-rule); box-shadow: var(--weave-shadow-overlay); color: var(--weave-color-ink); }
.recap-image-popover[hidden] { display: none; }
.popover-close { position: absolute; top: 0; right: 0; min-width: 40px; min-height: 40px; padding: var(--weave-space-2); border: 0; background: transparent; color: var(--weave-color-secondary); font: inherit; cursor: pointer; }
.recap-image-menu { position: absolute; top: var(--weave-space-2); right: var(--weave-space-2); }
#editorialView.recap-review .recap-image-menu > button { min-width: 40px; padding-inline: var(--weave-space-2); border-radius: var(--weave-radius-full); color: var(--weave-color-ink); background: var(--weave-color-paper); text-decoration: none; }
.recap-image-menu .recap-image-popover { left: auto; width: max-content; max-width: 75vw; padding-top: var(--weave-space-6); }
.recap-image-actions { display: grid; gap: var(--weave-space-2); }
.recap-scene-option + .recap-scene-option { margin-top: var(--weave-space-4); padding-top: var(--weave-space-4); border-top: 1px solid var(--weave-color-rule); }
.recap-scene-option p { margin: var(--weave-space-1) 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--weave-color-secondary); }
.recap-own-scene textarea { display: block; box-sizing: border-box; width: 100%; margin-bottom: var(--weave-space-2); padding: var(--weave-space-2); color: inherit; background: var(--weave-color-paper); border: 1px solid var(--weave-color-rule); }
.recap-image-thumbnails { display: flex; gap: var(--weave-space-4); overflow-x: auto; padding-bottom: var(--weave-space-2); }
.recap-image-thumbnails figure { margin: 0; flex: 0 0 128px; min-width: 0; }
#editorialView.recap-review .recap-image-thumbnails img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; border: 0; border-radius: 0; box-shadow: none; }
.recap-image-thumbnails figcaption { display: grid; gap: var(--weave-space-2); margin-top: var(--weave-space-2); }
.recap-image-thumbnails button { justify-self: start; }

::highlight(recap-notes) { background: var(--weave-color-selected); }
.editorial-note-changed { background: var(--weave-color-selected); box-shadow: -4px 0 var(--weave-color-action); }
.editorial-notes-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--weave-color-rule); font-size: var(--weave-text-sm); }
.recap-block-actions { font: var(--weave-text-xs)/1.5 var(--weave-font-ui); display: flex; flex-wrap: wrap; gap: 8px 16px; }
#editorialView .recap-block-actions button { font-size: var(--weave-text-xs); min-height: 24px; text-align: left; }
.recap-review-reader [contenteditable] { outline: none; outline-offset: 4px; box-shadow: none; cursor: text; }
.recap-review-reader [contenteditable]:is(:hover,:focus) { outline: 1px dotted var(--weave-color-rule-strong); }
.recap-review-reader [contenteditable]:focus { background: var(--weave-color-tint); }
.recap-version-entry h3 { margin: 0 0 8px; font: var(--weave-weight-medium) var(--weave-text-md)/1.5 var(--weave-font-ui); }
.recap-version-read { margin-top: 24px; }
.recap-version-read .session-article-hero { display: block; padding-top: 0; }
@media (max-width: 759px), (hover: none), (pointer: coarse) {
  .recap-review-reader .recap-document .source-mark { display: none; }
}
.recap-change-dialog { box-sizing: border-box; width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 24px; border: 1px solid var(--weave-color-rule); background: var(--weave-color-paper); color: var(--weave-color-ink); }
.recap-change-dialog::backdrop { background: var(--weave-color-scrim); }
.recap-change-dialog label, .recap-change-dialog input { display: block; width: 100%; margin-block: 8px; }
.recap-quote-choice, .recap-version-entry { padding-block: 16px; border-block-end: 1px solid var(--weave-color-rule); }
.recap-quote-choice small { display: block; }
.recap-version-entry > button { margin-inline-end: 24px; }

.recap-review-reader { padding-bottom: 32px; }
.recap-popover, .recap-selection-toolbar { position: fixed; z-index: 30; box-sizing: border-box; border: 1px solid var(--weave-color-rule); background: var(--weave-color-paper); color: var(--weave-color-ink); box-shadow: 0 4px 24px var(--weave-color-scrim); font: var(--weave-text-sm)/1.5 var(--weave-font-ui); }
.recap-selection-toolbar { display: flex; align-items: center; gap: 16px; padding: 8px 16px; max-width: calc(100vw - 16px); }
.recap-popover { width: min(360px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow-y: auto; padding: 32px 24px 24px; }
#editorialView .recap-popover-close { position: absolute; top: 0; right: 0; min-width: 40px; min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--weave-color-action); font-size: var(--weave-text-xl); }
:is(.recap-link-library,.recap-cast-editor) input { box-sizing: border-box; width: 100%; margin-block: 8px; padding: 8px 12px; font: inherit; }
:is(.recap-link-library,.recap-cast-editor) input:focus { border-color: var(--weave-color-action); outline: none; box-shadow: none; }
.recap-link-results { max-height: min(360px, 50dvh); overflow-y: auto; }
.recap-link-results section { padding-block: 8px; }
.recap-link-results h3 { margin: 8px 0; color: var(--weave-color-secondary); font: var(--weave-weight-medium) var(--weave-text-xs)/1.5 var(--weave-font-ui); }
#editorialView .recap-link-option { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 8px; border: 0; background: transparent; color: var(--weave-color-action); text-align: left; }
#editorialView .recap-link-option:is(:hover,:focus) { background: var(--weave-color-selected); }
.recap-link-option small { color: var(--weave-color-secondary); }

@media (max-width: 720px) {
  .recap-image-choices { gap: 0 var(--weave-space-1); }
  #editorialView.recap-review .recap-image-choices button { font-size: var(--weave-text-2xs); }
  .recap-image-choices > button + button::before { margin-right: var(--weave-space-1); }
}
.recap-quote-dialog { position: fixed; }
.recap-quote-dialog h2 { margin: 0 32px 24px 0; }
.recap-quote-dialog h3 { font: var(--weave-weight-semibold) var(--weave-text-sm)/1.5 var(--weave-font-ui); }
.recap-quote-current { border-left: 2px solid var(--weave-color-action); padding-left: 16px; margin-bottom: 24px; }
.recap-quote-current blockquote { margin: 8px 0; padding: 0; border: 0; font: var(--weave-text-xl)/1.5 var(--weave-font-display); }
.recap-quote-choice blockquote { margin: 0 0 8px; padding: 0; border: 0; font: var(--weave-text-lg)/1.5 var(--weave-font-reading); }
.recap-quote-meta { color: var(--weave-color-secondary); font: var(--weave-text-xs)/1.5 var(--weave-font-ui); }
.recap-quote-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.recap-quote-featured { color: var(--weave-color-secondary); }

.recap-selection-toolbar[hidden], .recap-popover[hidden], .recap-track-baseline[hidden] { display: none; }
.recap-status { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
#editorialView .recap-status button { min-height: 24px; padding: 0; border: 0; background: transparent; color: var(--weave-color-action); font: inherit; text-decoration: underline; }
.recap-track-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--weave-color-secondary); font: var(--weave-text-sm)/1.5 var(--weave-font-ui); cursor: pointer; }
.recap-track-toggle input { appearance: none; width: 28px; height: 16px; margin: 0; border-radius: var(--weave-radius-full); background: var(--weave-color-rule-strong); cursor: pointer; }
.recap-track-toggle input::before { content: ''; display: block; width: 12px; height: 12px; margin: 2px; border-radius: 50%; background: var(--weave-color-paper); }
.recap-track-toggle input:checked { background: var(--weave-color-action); }
.recap-track-toggle input:checked::before { transform: translateX(12px); }
.recap-track-toggle input:focus-visible { outline: 2px solid var(--weave-color-action); outline-offset: 4px; }
.recap-track-baseline { margin-bottom: 16px; color: var(--weave-color-secondary); font: var(--weave-text-xs)/1.5 var(--weave-font-ui); }
.recap-diff-insert { text-decoration: underline; text-decoration-color: var(--weave-color-action); color: var(--weave-color-action); background: var(--weave-color-selected); }
.recap-diff-delete::before { content: attr(data-removed); color: var(--weave-color-secondary); text-decoration: line-through; }
.recap-change-marker { display: block; color: var(--weave-color-secondary); font: var(--weave-text-xs)/1.5 var(--weave-font-ui); }
#editorialView .primary-recap-section { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 40px; }
#editorialView .session-summary-full { min-width: 0; }
.recap-comment-column { min-width: 0; font: var(--weave-text-sm)/1.5 var(--weave-font-ui); }
.editorial-comments-list { position: relative; }
#editorialView .editorial-comments-action { padding: 0; min-height: 32px; margin-bottom: 16px; border: 0; background: transparent; color: var(--weave-color-action); text-align: left; }
.editorial-comment-card { position: absolute; left: 0; right: 0; box-sizing: border-box; padding: 16px; border: 1px solid var(--weave-color-rule); border-radius: var(--weave-radius-sm); background: var(--weave-color-paper); overflow-wrap: anywhere; }
.editorial-comment-card::before { content: ''; position: absolute; top: 16px; left: -40px; width: 40px; border-top: 1px solid var(--weave-color-rule); }
.editorial-comment-quote { margin: 0 0 8px; padding-left: 8px; border-left: 2px solid var(--weave-color-action); color: var(--weave-color-secondary); font: inherit; }
.editorial-comment-text { margin: 0 0 8px; }
.editorial-comment-card textarea { display: block; width: 100%; box-sizing: border-box; min-height: 96px; margin-bottom: 8px; padding: 8px; resize: vertical; color: inherit; background: var(--weave-color-paper); border: 1px solid var(--weave-color-rule); font: inherit; }
.editorial-comment-card button + button { margin-left: 16px; }
@media (min-width: 761px) {
  #editorialView .recap-review-reader > .session-reading-outline { max-width: 74ch; margin-bottom: 24px; }
}
@media (max-width: 760px) {
  #editorialView .primary-recap-section { display: flex; flex-direction: column; gap: 16px; }
  #editorialView .recap-comment-column { order: -1; width: 100%; }
  .editorial-comments-inline { display: grid; gap: 12px; margin-block: 16px; }
  .editorial-comment-card { position: relative; top: auto; width: 100%; font: var(--weave-text-sm)/1.5 var(--weave-font-ui); }
  .editorial-comment-card::before { display: none; }
  .recap-review-toolbar { column-gap: 12px; }
  #editorialView .recap-review-toolbar > .primary-btn { margin-left: auto; }
}
