/* A clip-first editing desk. Grid children must shrink independently of the film strip. */
#editroom { width: 100%; height: 100dvh; min-height: 640px; grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px; padding: 20px 28px; overflow: hidden; }
#editroom > *, .er-main > *, .er-monitor > *, .er-timeline > * { min-width: 0; }
.er-top { min-height: 46px; }
.er-title { min-width: 0; }
.er-title b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.er-budget { position: relative; white-space: nowrap; font-variant-numeric: tabular-nums; }
.er-budget > span { display: inline-flex; align-items: center; gap: 4px; }
.er-budget-value { display: inline-flex; justify-content: flex-end; min-width: 6ch; line-height: 1.3; }
.er-budget-digit { display: inline-block; position: relative; width: 1ch; height: 1.3em; overflow: hidden; }
.er-budget-reel { position: absolute; inset: 0; }
.er-budget-reel > span { display: block; height: 100%; }
.er-budget.is-charging { color: var(--tung); text-shadow: 0 0 12px #ff8a2b55; }
.er-budget.is-charging .er-budget-reel { will-change: transform; }
.er-budget-change { position: absolute; right: 0; top: 100%; pointer-events: none; visibility: hidden;
  font: 11px var(--mono); color: var(--tung); text-shadow: 0 1px 5px #000; }
.er-budget.is-charging .er-budget-change { visibility: visible; animation: er-budget-debit 1.1s ease-out both; }
@keyframes er-budget-debit { from { opacity: 0; transform: translateY(-4px); } 20%, 65% { opacity: 1; } to { opacity: 0; transform: translateY(12px); } }
.er-main { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.er-monitor { gap: 12px; }
.er-monitor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; }
.er-monitor-head > div { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.er-monitor-head small, .er-panel-head small { font: 600 10px var(--display); letter-spacing: .2em; color: var(--dim); }
.er-monitor-head small { flex: none; }
.er-current { font-family: var(--serif-zh); font-size: 17px; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.er-mode { border: 1px solid var(--line2); padding: 4px 9px; border-radius: 2px; color: #c8b8a5; font-size: 11px; white-space: nowrap; }
.er-monitor-head .er-preview-actions { flex: none; align-items: center; gap: 9px; }
.er-seedance { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid #b28d4b88; border-radius: 2px;
  background: #e8c36a0d; color: #e8c36a; font: 500 11px var(--sans-zh); white-space: nowrap; cursor: pointer; }
.er-seedance i { font-style: normal; }
.er-seedance:hover { background: #e8c36a22; border-color: #e8c36a; }
.er-seedance:disabled { opacity: .4; cursor: default; }
.er-seedance-progress { width: 180px; height: 3px; overflow: hidden; background: #e8c36a22; border-radius: 3px; }
.er-seedance-progress i { display: block; height: 100%; background: #e8c36a; transition: width .5s ease; }
.er-seedance-progress.is-waiting i { width: 20% !important; animation: sd-wait 2.4s ease-in-out infinite; }
.er-screen { width: 100%; flex: 1 1 0; min-height: 180px; max-height: none; overflow: hidden;
  background: #030303; box-shadow: 0 0 0 1px var(--line2), 0 0 70px rgba(255,200,140,.035); }
.er-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.er-video-message { position: absolute; inset: 0; display: grid; place-content: center; padding: 24px;
  color: #c9b39a; font-size: 13px; text-align: center; background: rgba(11,10,9,.7); }
.er-reshoot-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(11,10,9,.6), rgba(11,10,9,.18)); }
.er-reshoot-overlay > div { display: grid; justify-items: center; gap: 12px; padding: 22px 30px;
  border: 1px solid rgba(255,138,43,.3); border-radius: 3px; background: rgba(22,17,12,.86); box-shadow: 0 8px 36px #0006; }
.er-reshoot-overlay b { color: var(--tung); font: 600 24px var(--serif-zh); letter-spacing: .2em; animation: er-reshoot-pulse 1.6s ease-in-out infinite; }
.er-reshoot-overlay small { color: #c8af93; font-size: 11px; }
@keyframes er-reshoot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.er-scrub { flex: none; margin: 0; padding: 0 7px; }
.er-scrub-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px;
  padding: 0 0 12px; font: 10px var(--mono); color: #9f9181; }
.er-scrub-caption:last-child { padding: 12px 0 0; font: 11px var(--sans-zh); color: var(--dim); }
.er-kept-range { color: #dca268; }
.er-scrub-bar { height: 30px; }
.er-scrub-bar:focus-visible { outline: 1px solid var(--paper); outline-offset: 6px; }
.er-keep { background: rgba(255,138,43,.18); }
.er-h { display: grid; place-items: center; padding: 0; border: 0; width: 18px; color: #301604;
  font: 700 10px var(--sans-zh); touch-action: none; }
.er-h::after { display: none; }
.er-h[data-h="in"], .er-h[data-h="out"] { margin-left: -9px; }
.er-h:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.er-transport { flex: none; margin: 0; gap: 8px; padding-top: 2px; }
.er-transport > button.er-nav { width: 34px; height: 34px; flex: none; }
.er-transport > button.er-play { display: inline-flex; justify-content: center; align-items: center; gap: 10px;
  width: auto; height: 42px; min-width: 124px; padding: 0 17px; border-radius: 3px; font-size: 13px; font-weight: 700; }
.er-play-icon { font-size: 12px; }
.er-transport > button:disabled { opacity: .3; cursor: default; }
.er-transport .er-chip { border-radius: 3px; padding: 7px 10px; font-size: 12px; }
.er-clock { font-size: 11px; margin-left: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.er-inspector { min-width: 0; min-height: 0; width: 100%; padding: 0; gap: 0; overflow: hidden;
  background: linear-gradient(160deg, #201a15, #14120f); border-radius: 3px; }
.er-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--line); flex: none; }
.er-panel-head b { font-size: 13px; letter-spacing: .08em; }
.er-panel-head small { font-size: 9px; color: var(--tung); }
.er-panel-body { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 19px; }
.er-panel-footer { flex: none; padding: 12px 18px; border-top: 1px solid var(--line); background: #18140f; }
.er-panel-footer .er-moves { padding: 0; border: 0; }
.er-loading { color: var(--dim); font-size: 13px; }
.er-insp-head { gap: 5px; }
.er-insp-head b { font-size: 25px; line-height: 1.4; overflow-wrap: anywhere; }
.er-insp-head span { font-size: 11px; }
.er-storyboard-open { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 12px;
  background: rgba(255,200,140,.04); border: 1px solid var(--line2); border-radius: 2px; color: #dcc2a6; font-size: 12px; text-align: left; }
.er-storyboard-open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.er-storyboard-open i { margin-left: auto; color: var(--dim); font-style: normal; }
.er-storyboard-open:hover { border-color: var(--tung); color: var(--tung); background: var(--tung-soft); }
.er-duration { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; }
.er-duration > span { font-size: 12px; color: #beae9a; }
.er-duration > b { grid-column: 2; grid-row: 1 / 3; font: 600 30px var(--mono); color: #f0cfad; }
.er-duration > b small { margin-left: 5px; font: 11px var(--sans-zh); color: var(--dim); }
.er-duration > small { font: 10px var(--mono); color: var(--dim); }
.er-block { display: grid; gap: 11px; padding: 17px 0 0; margin: 0; border-top: 1px solid var(--line); border-radius: 0; }
.er-block h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; }
.er-block h3 small { color: var(--dim); font-size: 11px; font-weight: 400; }
.er-take-row { gap: 7px; }
.er-take-row button { width: 78px; border-radius: 2px; }
.er-take-row button.er-take-pending { opacity: 1; border: 1px dashed var(--tung); cursor: progress; overflow: hidden; }
.er-take-pending::before { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(120deg, #21180ed9 0 7px, #382619dd 7px 14px); }
.er-take-pending small { color: #ffd1a1; animation: er-reshoot-pulse 1.6s ease-in-out infinite; }
.er-take-preview { display: block; margin-top: 8px; color: #c8af93; font-size: 11px; line-height: 1.6; }
.er-reshoot { border-radius: 2px; font-size: 12px; padding: 10px; }
.er-moves { display: flex; flex-wrap: wrap; gap: 7px; }
.er-moves button { padding: 7px 9px; font-size: 11px; }
.er-moves .er-del { margin-left: auto; }
.er-timeline { width: 100%; min-width: 0; padding: 14px 16px; gap: 12px; }
.er-tl-head { gap: 16px; letter-spacing: .08em; }
.er-tl-head > div:first-child { display: grid; gap: 5px; }
.er-tl-info { font-size: 10px; }
.er-tl-hint { color: var(--dim); font: 10px var(--sans-zh); letter-spacing: 0; }
.er-tl-actions { gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.er-sequence { padding: 7px 10px; border: 1px solid var(--line2); border-radius: 2px; background: transparent;
  color: #c9b7a2; font-size: 11px; white-space: nowrap; }
.er-sequence:hover, .er-sequence[aria-pressed="true"] { color: var(--tung); border-color: var(--tung); background: var(--tung-soft); }
.er-state { font-size: 10px; }
.er-compose { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 126px;
  padding: 9px 16px; font-size: 12px; border: 1px solid var(--line2); border-radius: 2px;
  background: transparent; color: #9d8a73; transition: background .18s, border-color .18s, color .18s; }
.er-compose:disabled { background: transparent; border-color: #514332; color: #8d7b65; cursor: not-allowed; }
.er-compose[data-state="ready"] { background: var(--tung); border-color: var(--tung); color: #1a0c02; }
.er-compose[data-state="ready"]:hover { background: #ffa153; border-color: #ffa153; }
.er-compose[data-state="rendering"] { background: var(--tung-soft); border-color: #966336; color: var(--tung); cursor: progress; }
.er-compose[data-state="rendering"]::before { content: ""; width: 12px; height: 12px; flex: none;
  border: 1.5px solid #966336; border-top-color: var(--tung); border-radius: 50%; animation: er-compose-spin .8s linear infinite; }
@keyframes er-compose-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .er-compose[data-state="rendering"]::before { animation: none; } }
@media (prefers-reduced-motion: reduce) {
  .er-reshoot-overlay b, .er-take-pending small, #editroom .er-busy { animation: none; }
}
.er-track { width: 100%; min-width: 0; max-width: 100%; height: 100px; overflow-x: auto; overflow-y: hidden; padding: 3px 2px 8px; scroll-padding: 4px; }
.er-clip { min-width: 112px; flex-shrink: 0; border-radius: 2px; }
.er-clip b { right: 50px; font: 600 12px/1.5 var(--sans-zh); letter-spacing: 0; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.er-clip small { right: 5px; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.er-clip:focus-visible { outline: 2px solid var(--paper); }
.er-bin { font-size: 11px; }
.er-bin button { font-size: 11px; padding: 5px 9px; }
.er-play:focus-visible, .er-chip:focus-visible, .er-sequence:focus-visible, .er-take-row button:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.er-storyboard-dialog { width: min(1180px, calc(100vw - 64px)); height: min(860px, 88dvh); max-width: none; max-height: none;
  margin: auto; padding: 0; overflow: hidden; border: 1px solid #6c4a2e; border-radius: 4px; color: var(--paper);
  background: linear-gradient(145deg, #241c15, #15120f); box-shadow: 0 24px 100px #000a; }
.er-storyboard-dialog[open] { display: flex; flex-direction: column; }
.er-storyboard-dialog::backdrop { background: rgba(5,4,3,.8); backdrop-filter: blur(5px); }
.er-storyboard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.er-storyboard-head > div { min-width: 0; }
.er-storyboard-head small { color: var(--tung); font: 600 10px var(--display); letter-spacing: .2em; }
.er-storyboard-head h2 { margin: 8px 0 5px; font: 700 26px var(--serif-zh); letter-spacing: .08em; }
.er-storyboard-head p { margin: 0; font-size: 12px; color: #bba48b; overflow-wrap: anywhere; }
.er-storyboard-close { flex: none; border: 1px solid var(--line2); border-radius: 2px; width: 30px; height: 30px;
  padding: 0; background: transparent; color: #bda88e; font-size: 21px; }
.er-storyboard-body { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 12px; padding: 18px 26px; }
.er-storyboard-note { margin: 0; font-size: 12px; color: #c4b09a; line-height: 1.8; }
.er-storyboard-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; }
.er-storyboard-count { color: var(--dim); font: 10px var(--mono); }
.er-storyboard-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 16px; flex: 1; min-height: 140px; }
.er-asset-editor { position: relative; min-width: 0; min-height: 0; }
.er-storyboard-input { height: 100%; min-height: 140px; width: 100%; overflow: auto; margin: 0; padding: 18px;
  border: 1px solid var(--line2); border-radius: 2px; outline: none; background: #100e0b; color: #e1cfb9;
  font: 12px/2.1 var(--mono), var(--sans-zh); tab-size: 2; white-space: pre-wrap; overflow-wrap: anywhere; }
.er-storyboard-input:focus { border-color: #a67549; box-shadow: 0 0 0 1px #a6754920; }
.er-storyboard-input[data-loading="true"]:empty::before { content: "正在读取本段分镜…"; color: var(--dim); }
.er-asset-mention { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; padding: 1px 6px 1px 2px; margin: 1px 2px;
  border: 1px solid #6e5033; border-radius: 4px; background: #332618; color: #f0d0a6; white-space: nowrap; user-select: all;
  font: 600 11px/1.8 var(--sans-zh); max-width: 100%; }
.er-asset-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none;
  overflow: hidden; border-radius: 2px; color: #bfa17d; background: #28221a; }
.er-asset-icon img { width: 100%; height: 100%; object-fit: cover; }
.er-asset-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.er-asset-mention > span:not(.er-asset-icon) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.er-asset-mention > small { font-size: 9px; color: #bba07d; overflow: hidden; text-overflow: ellipsis; }
.er-asset-rail { display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; padding: 2px 0; }
.er-asset-rail > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.er-asset-rail > header b { font-size: 12px; font-weight: 600; }
.er-asset-rail > header small { color: var(--dim); font-size: 10px; }
.er-asset-cards { display: flex; flex-direction: column; gap: 9px; min-height: 0; overflow: auto; }
.er-asset-card { display: flex; align-items: center; gap: 10px; padding: 7px; border: 1px solid var(--line2); border-radius: 2px; background: #19140f; text-align: left; color: #d7bfa2; }
.er-asset-card > .er-asset-icon { width: 52px; height: 54px; }
.er-asset-card > span:last-child { display: grid; gap: 5px; min-width: 0; }
.er-asset-card b { font-size: 12px; font-weight: 600; }
.er-asset-card small { color: #a78f73; font-size: 10px; line-height: 1.6; }
.er-asset-card:hover:not(:disabled) { border-color: #a67549; background: #2e2116; }
.er-storyboard-dialog .er-asset-card:disabled { opacity: 1; }
.er-asset-help, .er-asset-cards > p { margin: 0; font-size: 10px; color: var(--dim); line-height: 1.8; }
.er-asset-menu { position: absolute; z-index: 2; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #8d6039; border-radius: 3px; background: #251c14; color: #e5c9a7; box-shadow: 0 10px 35px #000b; white-space: normal; }
.er-asset-menu-head { flex: none; padding: 10px 12px 8px; font-size: 11px; color: #cba67a; border-bottom: 1px solid var(--line); }
.er-asset-tabs { display: flex; flex: none; gap: 4px; padding: 6px 8px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.er-asset-tabs button { flex: none; border: 0; border-radius: 2px; padding: 5px 9px; background: transparent; color: #aa9277; font-size: 11px; white-space: nowrap; }
.er-asset-tabs button:hover { background: #38281b; color: #edc69b; }
.er-asset-tabs button[aria-selected="true"] { background: #51371e; color: #ffd19b; box-shadow: inset 0 -1px var(--tung); }
.er-asset-options { min-height: 0; overflow: auto; padding: 4px; }
.er-asset-options button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; border-radius: 2px; padding: 7px 8px; background: transparent; color: #e2c6a4; text-align: left; }
.er-asset-options button > span:last-child { display: grid; gap: 3px; min-width: 0; }
.er-asset-options button b { font-size: 12px; font-weight: 600; }
.er-asset-options button small { color: #ac9374; font-size: 10px; }
.er-asset-options button:hover, .er-asset-options button[aria-selected="true"] { background: #51371e; }
.er-asset-options .er-asset-icon { width: 32px; height: 32px; }
.er-asset-options > p { margin: 8px; color: #bba182; font-size: 11px; line-height: 1.7; }
.er-asset-menu-hint { flex: none; padding: 8px 12px; color: var(--dim); font-size: 9px; border-top: 1px solid var(--line); }
.er-storyboard-body > small { font-size: 10px; color: var(--dim); line-height: 1.7; }
.er-storyboard-error { margin: 0; font-size: 12px; color: #ffad94; line-height: 1.7; max-height: 90px; overflow: auto; }
.er-storyboard-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 26px; border-top: 1px solid var(--line); background: #18130f; }
.er-storyboard-status { color: #b49c81; font-size: 11px; }
.er-storyboard-footer > div { display: flex; gap: 9px; flex: none; }
.er-storyboard-footer button, .er-storyboard-discard button { padding: 9px 13px; border: 1px solid var(--line2); border-radius: 2px; background: transparent; color: #d3bca2; font-size: 12px; }
.er-storyboard-footer button.er-storyboard-save { border-color: var(--tung); background: var(--tung); color: #251307; font-weight: 700; }
.er-storyboard-dialog button:disabled { opacity: .35; cursor: default; }
.er-storyboard-discard { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 26px; background: #312319; border-top: 1px solid #755136; font-size: 12px; }
.er-storyboard-discard span { margin-right: auto; color: #e0b68c; }
.er-storyboard-dialog button:focus-visible, .er-storyboard-open:focus-visible { outline: 2px solid var(--tung); outline-offset: 3px; }
@media (max-width: 1100px) {
  #editroom { padding: 16px 18px; gap: 14px; }
  .er-main { grid-template-columns: minmax(0, 1fr) 286px; gap: 16px; }
  .er-panel-body { padding: 15px; }
  .er-monitor-head small { display: none; }
  .er-tl-actions { gap: 10px; }
  .er-budget { font-size: 10px; }
}
@media (max-width: 760px) {
  #editroom { height: auto; min-height: 100dvh; overflow: visible; padding: 14px 12px 24px; gap: 16px; }
  .er-top { gap: 12px; flex-wrap: wrap; }
  .er-back { font-size: 11px; }
  .er-title small { font-size: 9px; letter-spacing: .15em; }
  .er-title b { font-size: 18px; }
  .er-right { gap: 8px; }
  .er-budget { display: none; }
  .er-main { display: flex; flex-direction: column; gap: 20px; }
  .er-monitor-head { padding-top: 2px; }
  .er-current { font-size: 15px; }
  .er-screen { flex: none; min-height: 0; height: auto; aspect-ratio: 16 / 9; }
  .er-transport { row-gap: 10px; }
  .er-transport > button.er-play { min-width: 112px; padding: 0 12px; }
  .er-transport > button.er-nav { width: 30px; height: 30px; }
  .er-transport [data-play="restart"] { font-size: 11px; padding: 6px; }
  .er-clock { margin-left: 0; font-size: 11px; }
  .er-tx-sp { display: none; }
  .er-transport [data-loop] { margin-left: auto; }
  .er-inspector { max-height: none; }
  .er-panel-body { padding: 16px; gap: 16px; overflow: visible; }
  .er-panel-head { padding: 13px 16px; }
  .er-tl-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .er-tl-actions { justify-content: space-between; gap: 8px; }
  .er-state { flex: 1; text-align: center; }
  .er-timeline { padding: 12px; }
  .er-storyboard-dialog { width: 100%; height: 100dvh; margin: 0; border-radius: 0; }
  .er-storyboard-head { padding: 18px; }
  .er-storyboard-head h2 { font-size: 23px; }
  .er-storyboard-body { padding: 14px 16px; gap: 10px; }
  .er-storyboard-workspace { display: flex; flex-direction: column-reverse; gap: 12px; }
  .er-asset-editor { flex: 1; }
  .er-storyboard-input { font-size: 16px; padding: 12px; }
  .er-asset-mention { font-size: 12px; }
  .er-asset-rail { gap: 7px; flex: none; }
  .er-asset-cards { flex-direction: row; gap: 7px; max-height: 73px; }
  .er-asset-card { min-width: 142px; max-width: 185px; flex: none; gap: 7px; padding: 5px; }
  .er-asset-card > .er-asset-icon { width: 36px; height: 42px; }
  .er-asset-card b { font-size: 11px; }
  .er-asset-card small { font-size: 9px; }
  .er-asset-help { display: none; }
  .er-storyboard-note { font-size: 11px; }
  .er-storyboard-footer { padding: 14px 16px; flex-wrap: wrap; }
  .er-storyboard-footer > div { width: 100%; justify-content: flex-end; gap: 8px; }
  .er-storyboard-footer button { padding: 9px 11px; }
  .er-storyboard-discard { padding: 14px 16px; }
}

/* fullscreen: monitor corner button, a per-clip button on each timeline tile */
.er-full { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; padding: 0;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; background: rgba(11, 10, 9, .55); color: #fff; cursor: pointer;
  opacity: .55; backdrop-filter: blur(6px); transition: opacity .2s, background .2s, transform .2s; }
.er-screen:hover .er-full, .er-full:focus-visible { opacity: 1; }
.er-full:hover { background: rgba(255, 138, 43, .85); color: #0b0a09; transform: scale(1.06); }
.er-full svg, .er-fs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.er-screen.is-full { max-height: none; background: #000; }
.er-screen.is-full video { cursor: pointer; }
.er-screen.is-full .er-full svg path { d: path("M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5"); }
.er-fs { position: absolute; right: 30px; top: 4px; z-index: 2; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0;
  border-radius: 50%; background: rgba(11, 10, 9, .7); color: #fff; opacity: 0; cursor: pointer; }
.er-fs svg { width: 13px; height: 13px; }
.er-clip:hover .er-fs, .er-clip.sel .er-fs, .er-fs:focus-visible { opacity: 1; }
.er-fs:hover { background: var(--tung); color: #0b0a09; }

/* reshoot: in-place confirmation after the assistant director's first explanation */
.er-reshoot-confirm { display: grid; grid-template-columns: 1fr auto; gap: 6px; animation: er-arm .25s ease-out; }
.er-reshoot-confirm small { grid-column: 1 / -1; font-size: 11px; color: var(--dim); }
.er-reshoot.armed { background: var(--tung); color: #0b0a09; border-color: var(--tung); font-weight: 700; box-shadow: 0 0 0 4px rgba(255, 138, 43, .18); }
.er-reshoot-cancel { padding: 0 14px; border: 1px solid var(--line2); border-radius: 4px; background: none; color: var(--dim); cursor: pointer; }
.er-reshoot-cancel:hover { color: var(--paper); border-color: var(--paper); }
@keyframes er-arm { from { opacity: .4; transform: translateY(2px); } }

/* predecessor pictures of the selected clip, left of 循环本段 */
.er-preds { display: flex; align-items: center; gap: 6px; margin-right: 8px; }
.er-preds small { font: 10px var(--mono); letter-spacing: .12em; color: var(--dim); }
.er-pred { position: relative; width: 56px; height: 32px; padding: 0; border: 1px solid var(--line2); border-radius: 3px;
  overflow: hidden; background: #000; cursor: zoom-in; }
.er-pred img { width: 100%; height: 100%; object-fit: cover; display: block; }
.er-pred i { position: absolute; right: 2px; bottom: 1px; font: 600 9px var(--mono); font-style: normal; color: #fff;
  text-shadow: 0 0 3px #000; }
.er-pred:hover, .er-pred:focus-visible { border-color: var(--tung); }
.er-pred-lb { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(0, 0, 0, .82); }
.er-pred-lb figure { margin: 0; max-width: 90vw; }
.er-pred-lb img { max-width: 90vw; max-height: 78vh; display: block; border-radius: 4px; }
.er-pred-lb figcaption { margin-top: 8px; font-size: 13px; color: #eee; line-height: 1.6; }
.er-pred-lb figcaption small { color: #aaa; }
.er-pred-lb > button { position: absolute; top: 16px; right: 20px; border: 0; background: none; color: #fff; font-size: 28px; cursor: pointer; }

/* storyboard editor (粗稿直拍): save and reshoot from the same place */
.er-storyboard-reshoot { margin-left: 6px; border-color: var(--tung) !important; color: var(--tung) !important; background: none; }
.er-storyboard-reshoot.armed { background: var(--tung) !important; color: #0b0a09 !important; font-weight: 700; box-shadow: 0 0 0 3px rgba(255, 138, 43, .2); }
.er-storyboard-reshoot:disabled { opacity: .45; }

/* storyboard asset rail: picture enlarges, ＋ inserts */
.er-asset-item { display: flex; align-items: stretch; gap: 4px; }
.er-asset-item .er-asset-card { flex: 1; min-width: 0; cursor: zoom-in; }
.er-asset-insert { flex: none; width: 26px; padding: 0; border: 1px solid var(--line2); border-radius: 4px; background: none;
  color: var(--dim); font-size: 14px; cursor: pointer; }
.er-asset-insert:hover, .er-asset-insert:focus-visible { color: var(--tung); border-color: var(--tung); }
.er-asset-lb { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; align-content: center; gap: 8px;
  background: rgba(0, 0, 0, .85); }
.er-asset-lb img { max-width: 90vw; max-height: 80vh; border-radius: 4px; }
.er-asset-lb p { margin: 0; color: #eee; font-size: 13px; }
.er-asset-lb button { position: absolute; top: 14px; right: 18px; border: 0; background: none; color: #fff; font-size: 28px; cursor: pointer; }
