:root {
  color-scheme: light;
  --ink: #231815;
  --muted: #69747d;
  --line: #dce2e6;
  --paper: #f7f8f8;
  --accent: #c8261b;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #e9edef;
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", "Hiragino Sans", sans-serif;
}

button,
select,
input {
  font: inherit;
}

.app {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 22px;
  overflow: clip;
}

.stage-shell {
  position: relative;
  overflow: hidden;
  contain: paint;
  clip-path: inset(0);
  border: 1px solid #d4dadd;
  background: #fff;
  box-shadow: 0 18px 55px rgb(30 42 50 / 10%);
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  contain: layout paint size;
  clip-path: inset(0);
  background: #fff;
  isolation: isolate;
}

.paper {
  position: absolute;
  inset: 0;
  background: #fff;
}

.screen-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform-origin: center;
  will-change: transform, opacity;
}

.logo-object {
  position: absolute;
  inset: -11.111%;
  width: 122.222%;
  height: 122.222%;
  transform-origin: center;
  will-change: opacity;
}

.poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  will-change: opacity;
}

.flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #fff;
  opacity: 0;
  mix-blend-mode: screen;
}

.timecode {
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: rgb(35 24 21 / 43%);
  font: 500 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  opacity: 0.72;
}

.controls {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0 8px;
  background: #e9edef;
}

button,
select {
  min-height: 38px;
  border: 1px solid #ccd4d8;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  cursor: pointer;
}

button:hover,
select:hover {
  border-color: #8e999f;
}

.primary-button {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  min-width: 76px;
}

.timeline-label,
.controls > label:not(.timeline-label) {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-label input {
  width: 100%;
  accent-color: var(--ink);
}

#status {
  min-width: 58px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.sequence {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 9px;
  color: #768188;
  font-size: 9px;
  letter-spacing: 0.14em;
  background: #e9edef;
}

.sequence i {
  height: 1px;
  background: #cbd3d7;
}

.is-embed,
.is-embed body {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.is-embed .app {
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 0;
}

.is-embed .stage-shell,
.is-embed .stage {
  width: 100%;
  height: 100%;
}

.is-embed .stage-shell {
  border: 0;
  box-shadow: none;
}

.is-embed .stage {
  aspect-ratio: auto;
}

.is-embed .controls,
.is-embed .sequence,
.is-embed .timecode {
  display: none;
}

@media (max-width: 760px) {
  .app {
    padding: 10px;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .timeline-label {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  #status {
    display: none;
  }

  .sequence {
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-object,
  .poster {
    will-change: auto;
  }
}
