/* Dialogue Splitter — page-specific styles on top of godubyourself.css.
   The working area is the game's Dub Stage media frame: dark screen, maroon letterpress edge.
   Progress is the game's segmented MIC meter. */

.ds-intro { padding: clamp(2.6rem, 6vw, 4rem) 0 0; }
.ds-intro .title { font-size: clamp(2.6rem, 7.5vw, 4.2rem); margin-bottom: 1rem; }
.ds-lede { max-width: 40rem; font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--ink-2); }

/* ---------- the stage ---------- */
.ds-stage {
  margin-top: clamp(1.8rem, 4vw, 2.6rem);
  background: var(--media);
  box-shadow: 0 0 0 3px var(--rule), var(--extrude-9), var(--ambient);
  min-height: clamp(300px, 42vw, 420px);
  display: grid;
}
.ds-stage { grid-template-columns: minmax(0, 1fr); }   /* never let big media widen the stage */
.ds-stage > * { grid-area: 1 / 1; min-width: 0; }
.ds-stage [hidden] { display: none !important; }   /* the screens set display:flex, which would beat [hidden] */

/* idle: the whole screen is the drop target */
.ds-drop {
  margin: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; cursor: pointer;
  border: 3px dashed rgb(245 230 200 / .28);
  transition: border-color .2s, background-color .2s;
}
.ds-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ds-drop:hover, .ds-drop.is-over { border-color: var(--pick); background: rgb(255 175 0 / .05); }
.ds-drop:focus-within { border-color: var(--band); }
.ds-drop__icon {
  width: 64px; height: 48px;
  background: var(--band);
  /* a film frame: the outline of the game's video panel */
  -webkit-mask: linear-gradient(#000 0 0) center / 100% 100% no-repeat, linear-gradient(#000 0 0) center / calc(100% - 12px) calc(100% - 12px) no-repeat;
  -webkit-mask-composite: xor; mask-composite: exclude;
  box-shadow: none;
  position: relative;
}
.ds-drop__big { font: 400 clamp(1.8rem, 4.6vw, 2.6rem)/1 var(--display); color: var(--band); padding-top: 4px; }
.ds-drop__btn { pointer-events: none; }
.ds-drop__small { font-size: .9rem; color: var(--ink-muted); }

/* working */
.ds-work, .ds-done, .ds-problem { padding: clamp(22px, 4vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.ds-file { font-weight: 700; color: var(--ink); margin-bottom: 1.4rem; overflow-wrap: anywhere; }
.ds-steps { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: 12px; }
.ds-steps li { display: flex; align-items: baseline; gap: 12px; color: var(--ink-muted); }
.ds-steps li::before {
  content: ""; flex: none; width: 14px; height: 14px; translate: 0 1px;
  border: 2px solid currentColor;
}
.ds-steps li.is-active { color: var(--ink); }
.ds-steps li.is-active::before { border-color: var(--pick); background: var(--pick); animation: ds-blink 1s steps(2) infinite; }
.ds-steps li.is-done { color: var(--ink-2); }
.ds-steps li.is-done::before { border-color: var(--good); background: var(--good); }
.ds-steps__name { font: 400 1.25rem/1.1 var(--display); padding-top: 3px; }
.ds-steps__note { font-size: .9rem; color: var(--ink-muted); }
@keyframes ds-blink { 50% { opacity: .35; } }

/* the MIC meter: 24 segments light up as the job goes */
.ds-meter {
  --ds-p: 0;
  height: 14px;
  background:
    linear-gradient(90deg, var(--pick) calc(var(--ds-p) * 1%), transparent 0),
    rgb(245 230 200 / .14);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(100% / 24 - 4px), transparent 0 calc(100% / 24));
          mask: repeating-linear-gradient(90deg, #000 0 calc(100% / 24 - 4px), transparent 0 calc(100% / 24));
  transition: --ds-p .4s;
}
.ds-hint { margin-top: 1rem; font-size: .9rem; color: var(--ink-muted); }

/* finished */
.ds-done__head { font: 400 clamp(1.8rem, 4.4vw, 2.4rem)/1.05 var(--display); color: var(--band); margin-bottom: 1.4rem; }
.ds-download { align-self: flex-start; font-size: 1.25rem; padding: 18px 26px 15px; }
.ds-download svg { width: 22px; height: 22px; }
.ds-previews { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 2rem; max-width: 720px; }
.ds-previews figure { margin: 0; display: grid; gap: 8px; min-width: 0; }
.ds-previews figcaption { font-size: .85rem; color: var(--ink-muted); }
.ds-previews video { display: block; width: 100%; max-width: 100%; max-height: 405px; aspect-ratio: 16 / 9; object-fit: contain; background: #000; box-shadow: 0 0 0 2px var(--rule); }
.ds-previews audio { width: 100%; }
.ds-again {
  align-self: flex-start; margin-top: 1.6rem; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--pick); text-underline-offset: 4px;
}
.ds-again:hover { color: var(--ink); }

/* problems */
.ds-problem__head { font: 400 clamp(1.5rem, 3.6vw, 2rem)/1.1 var(--display); color: var(--band); margin-bottom: .8rem; }
.ds-problem p { max-width: 38rem; color: var(--ink-2); }
.ds-problem .btn { align-self: flex-start; margin-top: 1.4rem; }

/* below the stage */
.ds-howto { margin: 0; padding: 0 0 0 1.4em; display: grid; gap: .6rem; max-width: 40rem; color: var(--ink-2); }
.ds-howto strong { color: var(--ink); }
.ds-howto li::marker { font-family: var(--display); color: var(--pick); }

@property --ds-p { syntax: "<number>"; inherits: true; initial-value: 0; }
@media (prefers-reduced-motion: reduce) { .ds-steps li.is-active::before { animation: none; } .ds-meter { transition: none; } }
