.editor {
  background: #f5f7fa;
  color: #242830;
  --blue: #386aa9;
  --edge: #dce2e9;
}
.shell {
  width: min(1240px, calc(100% - 48px));
  margin: auto;
}
.editor .bar {
  height: 57px;
}
.back,
.note,
.segTime,
.trackFoot,
.marks,
.graphLegend,
.mini,
.song small {
  color: #596575;
}
.back,
.note,
.trackFoot {
  font-size: 13px;
}
.project,
.partHead,
.speedLine,
.trackFoot,
.deck,
.marks,
.graphHead,
.graphLegend,
.segTime,
.fades label span,
.ratios,
.clip,
.lyricPanel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project {
  gap: 16px;
  padding: 24px 0 20px;
}
.project h1 {
  font-size: clamp(28px, 3vw, 37px);
  letter-spacing: -0.06em;
  line-height: 1.18;
  margin: 5px 0 0;
}
.eyebrow,
.mini,
.segTime,
.segTag,
.marks,
.graphHead span:last-child,
.decktime,
.graphLegend,
.ruler {
  font-family: Consolas, monospace;
}
.eyebrow,
.mini {
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 650;
}
.eyebrow {
  color: var(--blue);
  margin: 0;
}
.eyebrow span {
  margin: 0 5px;
}
.project .actions {
  margin: 0;
  gap: 9px;
}
.editor button:not(.pick, .ratio, .clip, #playTrack, .linkbtn) {
  border: 1px solid var(--edge);
  border-radius: 9px;
  background: #fff;
  color: #283341;
  padding: 8px 13px;
  min-height: 37px;
  font-size: 13px;
}
.editor button.export {
  background: #242830 !important;
  color: #fff !important;
  padding-inline: 19px !important;
  border-radius: 23px !important;
}
.export span {
  margin-left: 12px;
}
.desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(325px, 0.48fr);
  gap: 18px;
  align-items: start;
}
.left,
.inspector {
  display: grid;
  gap: 15px;
  min-width: 0;
}
.editor .monitor {
  box-shadow: 0 7px 16px #1e2f4610;
  border-radius: 16px;
}
.editor .monitor-head {
  height: 34px;
}
.viewport {
  background: #0b101b;
  display: grid;
  place-items: center;
  aspect-ratio: 1.95;
  overflow: hidden;
}
.viewport canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-height: 0;
}
.deck {
  background: white;
  color: #242830;
  padding: 10px 15px;
  justify-content: flex-start;
  gap: 11px;
}
.deck button {
  width: 37px;
  height: 37px;
  border: 1px solid #d6dfe9;
  border-radius: 50%;
  background: #f2f5f9;
  color: #2d4e77;
}
.song {
  display: grid;
  min-width: 0;
}
.song strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.song small {
  font-size: 10px;
  letter-spacing: 0.04em;
}
.decktime {
  font-size: 12px;
  margin-left: auto;
  white-space: nowrap;
}
.decktime span {
  color: #73808e;
}
.timelineBox,
.designPanel,
.motionPanel,
.lyricPanel {
  background: white;
  border: 1px solid var(--edge);
  border-radius: 15px;
  padding: 19px 20px;
}
.partHead {
  gap: 12px;
}
.partHead h2,
.sourceGrid h2 {
  font-size: 20px;
  letter-spacing: -0.045em;
}
.timelineBox h2 {
  margin-top: 2px;
}
.editor h3,
.speedLine label,
.fades label {
  font-size: 13px;
  font-weight: 600;
}
.editor h3 {
  margin: 14px 0 7px;
}
.thumbs,
.ratios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.pick,
.ratio {
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: white;
  color: #364252;
}
.pick {
  padding: 3px;
  overflow: hidden;
  min-width: 0;
  text-align: left;
}
.pick canvas {
  display: block;
  width: 100%;
  height: 38px;
  border-radius: 5px;
}
.pick strong {
  display: block;
  padding: 4px 3px 2px;
  font-size: 12px;
}
.pick[aria-pressed='true'],
.ratio[aria-pressed='true'] {
  border-color: #4776af;
  background: #eef4fc;
  color: #254f86;
}
.ratio {
  font-size: 12px;
  padding: 7px 2px;
}
.ratio i {
  border: 1.5px solid currentColor;
  width: 13px;
  height: 8px;
  display: inline-block;
  border-radius: 2px;
  margin-right: 5px;
}
.ratio:nth-child(2) i {
  height: 12px;
  width: 7px;
  vertical-align: -1px;
}
.ratio:nth-child(3) i {
  width: 9px;
  height: 9px;
}
.segTag {
  color: #335f98;
  font-size: 11px;
  background: #edf3fa;
  padding: 2px 7px;
  border-radius: 5px;
}
.segTime {
  font-size: 11px;
  margin-top: 4px;
}
.speedLine {
  margin-top: 13px;
}
.speedLine output {
  font:
    600 26px/1.2 Consolas,
    monospace;
  color: #315f9c;
  letter-spacing: -1.1px;
}
.speed {
  accent-color: #3c6da8;
  width: 100%;
  height: 15px;
  margin: 7px 0 0;
}
.marks,
.graphLegend {
  font-size: 10px;
}
.envelope {
  margin-top: 10px;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  padding: 8px 10px 5px;
  background: #f5f8fc;
}
.graphHead {
  color: #4f6481;
  font-size: 11px;
  font-weight: 600;
}
.envelope canvas {
  width: 100%;
  height: 58px;
  display: block;
}
.fades {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.fades label span {
  border: 1px solid #a5b3c4;
  border-radius: 6px;
  padding: 3px 8px;
  font:
    12px Consolas,
    monospace;
  margin-top: 4px;
}
.fades input {
  width: 100%;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  font:
    14px Consolas,
    monospace;
}
.note {
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.55;
}
.trackArea {
  position: relative;
  margin-top: 14px;
}
.ruler {
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  color: #586578;
}
.wave {
  position: relative;
  background: #f1f4f8;
  border-radius: 5px;
  height: 40px;
  margin: 4px 0;
}
.wave canvas,
.wave input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}
.wave input {
  opacity: 0;
  cursor: crosshair;
}
.wave:focus-within {
  outline: 2px solid #386ba7;
}
#clips {
  display: flex;
  min-height: 36px;
  gap: 2px;
}
.clip {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  padding: 5px 8px;
  text-align: left;
  border-radius: 5px;
  background: #e9edf1;
  border: 1px solid #d8dee6;
  color: #425062;
  font:
    12px Consolas,
    monospace;
}
.clip[aria-pressed='true'] {
  background: #dce9fa;
  border-color: #597faf;
  color: #254f87;
}
.clip small {
  font-size: 10px;
}
.needle {
  position: absolute;
  top: 18px;
  bottom: 1px;
  width: 1px;
  background: #305c93;
  pointer-events: none;
}
.needle:before {
  content: '';
  position: absolute;
  left: -3px;
  width: 7px;
  height: 7px;
  background: #305c93;
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}
.trackFoot {
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
}
.linkbtn {
  border: 0;
  background: none;
  font-size: 12px;
  color: var(--blue);
  white-space: nowrap;
}
.lyricPanel {
  margin-top: 16px;
}
.lyricPanel summary {
  cursor: pointer;
  gap: 10px;
}
.lyricPanel summary strong:before {
  content: '＋';
  margin-right: 10px;
  color: var(--blue);
}
.lyricPanel[open] summary strong:before {
  content: '−';
}
.lyricPanel summary span {
  font-size: 12px;
  color: #596575;
}
.sourceGrid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
  border-top: 1px solid var(--edge);
  padding-top: 14px;
  margin-top: 12px;
}
.sourceGrid h2 {
  margin-bottom: 12px;
}
.source label {
  font-size: 13px;
  display: grid;
  gap: 4px;
  margin: 10px 0;
}
.source input,
.source select,
.editrow input {
  min-width: 0;
  width: 100%;
  border: 1px solid #9eadbf;
  background: white;
  border-radius: 6px;
  padding: 6px;
}
.source button,
.corrections button {
  margin: 4px 0;
}
.editor .job {
  margin-bottom: 20px;
  font-size: 13px;
}
.corrections .editrow {
  grid-template-columns: 70px 70px 1fr auto;
}
.editor fieldset:disabled {
  opacity: 0.88;
}
@media (min-width: 1500px) {
  .shell {
    width: 1280px;
  }
}
@media (max-width: 900px) {
  .desk {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 12px;
  }
  .designPanel,
  .motionPanel,
  .timelineBox {
    padding: 14px;
  }
  .thumbs {
    gap: 3px;
  }
  .clip small {
    display: none;
  }
}
@media (max-width: 720px) {
  .shell {
    width: calc(100% - 28px);
  }
  .editor .bar {
    height: 50px;
  }
  .project {
    padding: 16px 0;
    flex-wrap: wrap;
    gap: 9px;
  }
  .project h1 {
    font-size: 26px;
  }
  .project .actions {
    gap: 4px;
  }
  .editor .actions button {
    font-size: 12px !important;
    padding-inline: 9px !important;
  }
  .desk,
  .sourceGrid {
    grid-template-columns: 1fr;
  }
  .left,
  .inspector,
  .desk {
    gap: 10px;
  }
  .viewport {
    aspect-ratio: 16/9;
  }
  .timelineBox,
  .designPanel,
  .motionPanel,
  .lyricPanel {
    padding: 13px 14px;
  }
  .pick canvas {
    height: 43px;
  }
  .partHead h2 {
    font-size: 18px;
  }
  .trackArea {
    margin-top: 9px;
  }
  .decktime {
    font-size: 11px;
  }
  .thumbs {
    gap: 7px;
  }
  .inspector {
    display: flex;
    flex-direction: column;
  }
  .motionPanel {
    order: -1;
  }
  .editor .job {
    margin-bottom: 14px;
  }
  .corrections .editrow {
    grid-template-columns: 1fr 1fr auto;
  }
  .corrections input[type='text'] {
    grid-row: 2;
    grid-column: 1/4;
  }
  .trackFoot {
    font-size: 11px;
  }
  .clip {
    padding-inline: 5px;
  }
}

.editor.lyrics-mode #form {
  display: flex;
  flex-direction: column;
}
.lyrics-mode .project {
  order: 0;
}
.lyrics-mode .lyricPanel {
  order: 1;
  margin: 0 0 16px;
}
.lyrics-mode .desk {
  order: 2;
}
.lyrics-mode .inspector,
.lyrics-mode #render {
  display: none;
}
.lyrics-mode .desk {
  grid-template-columns: minmax(0, 1fr);
}
.lyrics-mode .monitor .viewport,
.lyrics-mode .monitor-head,
.lyrics-mode .timelineBox {
  display: none;
}
.lyrics-mode .monitor {
  max-width: 100%;
}
.editor .project .actions {
  flex-wrap: wrap;
}
.editor .clip {
  padding-inline: 4px;
}
.editor .trackFoot {
  flex-wrap: wrap;
}
.editor .segTime {
  overflow-wrap: anywhere;
}

#outSpec {
  float: right;
  color: #50647e;
  font:
    12px ui-monospace,
    monospace;
}
.editor .marks {
  position: relative;
  min-height: 24px;
}
.editor .marks #resetRate {
  position: absolute;
  left: 42.857%;
  transform: translateX(-50%);
  border: 0;
  color: #355f91;
  font:
    11px ui-monospace,
    monospace;
  padding: 3px 5px;
  min-height: 23px;
}
#cueTicks {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  pointer-events: none;
}
#cueTicks i {
  position: absolute;
  width: 2px;
  height: 6px;
  background: #5078aa;
}
.editor .job:has(#status:empty):has([hidden]#result):has([hidden]#cancel) {
  display: none;
}
.editor .job:has(#cancel:not([hidden])),
.editor .job:has(#result:not([hidden])) {
  position: sticky;
  bottom: 8px;
  z-index: 2;
  box-shadow: 0 3px 16px #20344824;
}
@media (max-width: 720px) {
  .editor.video-mode .desk {
    display: grid;
  }
  .editor.video-mode .left,
  .editor.video-mode .inspector {
    display: contents;
  }
  .editor.video-mode .monitor {
    order: 0;
  }
  .editor .designPanel {
    order: 1;
  }
  .editor .timelineBox {
    order: 2;
  }
  .editor .motionPanel {
    order: 3;
  }
  .clip small {
    display: block;
  }
  .editor .clip {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
  }
  .editor .ratio,
  .editor .pick,
  .editor .linkbtn {
    min-height: 40px;
  }
  .editor .marks #resetRate {
    min-height: 30px;
  }
}
