body.opencut-editor-layout {
  margin: 0;
  background: var(--d-bg,#0b101b);
  color: var(--c-bg-subtle,#eef1f4);
  min-height: 100dvh;
}

.opencut-layout {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  min-height: calc(100dvh - 64px);
}

.opencut-work {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.opencut-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--d-border,#2c3446);
  background: var(--d-bg,#0b101b);
}

.opencut-bar h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.opencut-bar p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--d-text-3,#8492ad);
}

.opencut-bar a {
  color: #a99bff;
}

.opencut-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.opencut-credit {
  margin: 0 4px;
  font-size: 11px;
  line-height: 1.25;
  color: var(--d-text-3,#8492ad);
  text-align: left;
}

.opencut-normalize { display: grid; gap: 3px; min-width: 190px; }
.opencut-normalize small { color: var(--d-text-3,#8492ad); font-size: 10px; line-height: 1.35; }

.opencut-chip {
  border: 1px solid #3d4558;
  border-radius: 8px;
  background: var(--d-surface-2,#1d2230);
  color: var(--d-text,#e8edf7);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}

.opencut-chip.primary {
  border-color: var(--c-violet,#6a4cf0);
  background: linear-gradient(110deg, #714eff, var(--c-primary,#1b64da));
}

.opencut-frame-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--d-bg,#0b101b);
}

.opencut-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: calc(100dvh - 64px - 52px);
  border: 0;
  background: #000;
}

.opencut-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: var(--d-surface,#121725);
  color: var(--c-gray-300,#c5cbe0);
  font-size: 14px;
}

.opencut-fallback[hidden] {
  display: none;
}

.opencut-fallback-hint {
  font-size: 12px;
  color: var(--d-text-3,#8492ad);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.5;
}

.opencut-notice {
  border: 1px solid #3d4558;
  border-radius: 16px;
  background: var(--d-surface,#121725);
  color: var(--c-bg-subtle,#eef1f4);
  width: min(420px, calc(100vw - 32px));
  padding: 22px;
  box-shadow: 0 24px 80px #000c;
}

.opencut-notice::backdrop {
  background: #000a;
}

.opencut-notice h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.opencut-notice p {
  margin: 0 0 8px;
  color: var(--c-gray-300,#c5cbe0);
  font-size: 14px;
  line-height: 1.55;
}

.opencut-notice button {
  margin-top: 14px;
  float: right;
}

.opencut-open-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  clear: both;
}

.opencut-open-list a {
  display: block;
  padding: 10px 12px;
  border: 1px solid #3d4558;
  border-radius: 8px;
  color: var(--d-text,#e8edf7);
  text-decoration: none;
}

.opencut-open-list a small {
  display: block;
  color: var(--d-text-3,#8492ad);
  margin-top: 4px;
}

@media (max-width: 700px) {
  .opencut-layout {
    grid-template-columns: 1fr;
  }
  body.app-shell aside.side {
    display: none !important;
  }
  .opencut-frame {
    min-height: calc(100dvh - 64px - 88px);
  }
}
