/* css/editor.css: the editor, its Look sliders, Scenes.
   Part 4 of 10 of the app's stylesheet (app.css until Phase 3). Every page loads all the parts, in the
   order of CSS in lib/views/parts.js, so a later part still wins a tie, as further down the one file did. */
/* editor (F4 / 5) */
.back {
  font: 700 15px var(--body);
}
.editgrid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
}
.previewcol {
  flex: 0 1 380px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin: 0 auto;
  position: sticky;
  top: 16px;
}
.canvaswrap {
  width: min(360px, 86vw);
  aspect-ratio: 9 / 16;
  border: 3px solid var(--edge);
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  box-shadow: 8px 8px 0 var(--edge);
}
.canvaswrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.previewcol .pctl {
  width: min(360px, 86vw);
}
.progress.thin {
  height: 10px;
  flex: 1;
  cursor: pointer;
}
.controls {
  flex: 999 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel {
  background: #fff;
  border: 3px solid var(--edge);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.ph {
  font: 900 15px var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.words {
  font: 500 17px/1.9 var(--body);
  max-height: 260px;
  overflow-y: auto;
  padding-right: 6px;
}
.words .w {
  border: 0;
  background: none;
  font: inherit;
  color: var(--fg);
  padding: 1px 3px;
  margin: 0 1px;
  border-radius: 6px;
  cursor: pointer;
}
.words .w.out {
  color: #a39789;
}
.words .w.hook {
  box-shadow: inset 0 -3px 0 var(--tomato);
}
.words .w.sel {
  background: var(--mustard);
}
.words .w.first {
  border-left: 4px solid var(--pickle);
}
.words .w.last {
  border-right: 4px solid var(--tomato);
}
.words .w.fixed {
  text-decoration: underline dotted;
}
.wordbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.wordbar .fix {
  flex: 0 1 220px;
}
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 14px;
  border: 2px solid var(--edge);
  border-radius: 10px;
  font: 800 14px var(--body);
  background: #fff;
  color: var(--fg);
  cursor: pointer;
}
.opt[aria-pressed="true"],
.opt[aria-selected="true"] {
  background: var(--edge);
  color: var(--bg);
}
.opt[disabled] {
  opacity: 0.45;
  cursor: default;
}
#hookToggle[aria-pressed="true"] {
  background: var(--pickle);
  color: #fff;
  border-color: var(--edge);
}
/* the editor's Look sliders (caption size, height, outline or box, hook size): the value sits beside the name */
.sliders {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}
.slab {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.slab output {
  font: 500 13px var(--mono);
  color: var(--muted);
}
/* Scenes (Layout, Advanced): one row per scene, the one the play head is in highlighted; × takes a mark out */
.scenes {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 2px dashed var(--edge);
}
.scenes .sh {
  font: 900 13px var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.scenelist {
  list-style: none;
  margin: 10px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scenelist li {
  display: flex;
  gap: 6px;
}
.scenelist .scn {
  flex: 1;
  text-align: left;
  min-height: 40px;
  background: #fff;
  border: 2px solid var(--edge);
  border-radius: 10px;
  padding: 6px 10px;
  font: 600 14px var(--body);
  color: var(--fg);
  cursor: pointer;
}
.scenelist .scn:hover,
.scenelist .scn[aria-current="true"] {
  background: #fff6d6;
}
.scenelist .scx {
  min-width: 40px;
  min-height: 40px;
  background: #fff;
  border: 2px solid var(--edge);
  border-radius: 10px;
  font: 700 18px var(--body);
  color: var(--fg);
  cursor: pointer;
}
.scenelist .scx:hover {
  background: var(--tomato, #e4412b);
  color: #fff;
}
.scenetune {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fff6d6;
  border: 2px solid var(--edge);
  border-radius: 10px;
}
.scenetune .tunehead {
  margin: 0 0 6px;
  font: 600 14px var(--body);
}
.scenetune .tunehead strong {
  font-size: 16px;
  margin-left: 4px;
}
.tunerow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tunerow input[type="range"] {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  accent-color: var(--edge);
}
.tunerow .opt.sm {
  min-width: 40px;
  font-size: 20px;
  line-height: 1;
}
.tunerow .opt.sm:disabled {
  opacity: 0.4;
  cursor: default;
}
.tuneends {
  display: flex;
  justify-content: space-between;
  padding: 0 48px;
  font-size: 12px;
  color: var(--muted);
}
.scenetune .hint {
  margin: 6px 0 0;
  font-size: 13px;
}
.field input[type="range"] {
  accent-color: var(--edge);
}
.field.slide input[type="range"] {
  min-height: 36px;
  padding: 4px 10px;
}
.field.slide input[type="range"]:disabled {
  opacity: 0.45;
}
.twocol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.posttext {
  width: 100%;
  min-height: 110px;
  border: 2px solid var(--edge);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--card);
  font: 500 15px/1.5 var(--body);
  resize: vertical;
}
.dlrow {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.dlrow .progress {
  flex: 1 1 200px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--edge);
  color: var(--bg);
  border-radius: 12px;
  padding: 12px 18px;
  font: 700 15px var(--body);
  z-index: 10;
  max-width: 90vw;
}
.toast a {
  color: var(--mustard);
}
