body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 88rem;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
  line-height: 1.45;
  background: #f4f6f9;
  color: #1a2332;
}

.rm-hidden {
  display: none !important;
}

.rm-nav {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.rm-nav a {
  color: #0a5cad;
  font-weight: 600;
}

.rm-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.rm-lead {
  color: #5a6578;
  margin: 0 0 1rem;
  max-width: 58rem;
}

.rm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rm-toolbar--secondary {
  margin-bottom: 0.5rem;
  position: sticky;
  top: 0.75rem;
  z-index: 40;
  background: rgba(244, 246, 249, 0.9);
  backdrop-filter: blur(3px);
}

.rm-toolbar--edit {
  margin-bottom: 0.75rem;
}

.rm-transport-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border: 1px solid #c5d0de;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(26, 35, 50, 0.08);
}

.rm-transport-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}

.rm-transport-row--primary {
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.rm-transport-row--secondary {
  margin-top: 0.35rem;
}

.rm-transport-btn {
  min-height: 2.75rem;
  font-size: 1rem;
}

#btnEnableMedia {
  display: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

#btnEnableMedia.rm-enable-media-visible {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #0f766e !important;
  border: 2px solid #0a5f58 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700;
}

#btnEnableMedia.rm-enable-media-visible.rm-btn--enabled {
  background: #ecfdf5 !important;
  border: 2px solid #0f766e !important;
  color: #134e4a !important;
  -webkit-text-fill-color: #134e4a !important;
}

#btnContinueMediaRow {
  display: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

#btnContinueMediaRow.rm-continue-media-visible {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #c2410c !important;
  border: 2px solid #9a3412 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.25);
}

#btnTestFullReel {
  width: 100%;
}

.rm-btn--enable-media.rm-enable-media-visible {
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.35);
}

.rm-media-debug {
  font-size: 0.75rem;
  color: #5a6578;
  margin: 0 0 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (min-width: 640px) {
  .rm-transport-row--primary {
    flex-direction: row;
  }

  #btnTestFullReel,
  #btnEnableMedia.rm-enable-media-visible {
    width: auto;
    flex: 1 1 auto;
  }
}

.rm-select-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #5a6578;
}

.rm-select {
  min-width: 16rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid #98a2b3;
}

.rm-stat-bar {
  font-size: 0.85rem;
  font-weight: 600;
  color: #344054;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d8dee8;
  margin: 0 0 0.75rem;
}

.rm-card {
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.rm-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.rm-card--library {
  border-style: dashed;
  background: #fafbfc;
}

.rm-dl {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}

.rm-dl dt {
  font-weight: 600;
  color: #5a6578;
}

.rm-dl dd {
  margin: 0;
}

.rm-meta {
  font-size: 0.85rem;
  color: #5a6578;
  margin: 0 0 0.5rem;
}

.rm-library-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rm-progress {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0a5cad;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: #eef6ff;
  border: 1px solid #b8d4f0;
  margin: 0 0 0.5rem;
}

.rm-test-status {
  font-size: 0.85rem;
  color: #0a5cad;
  min-height: 1.2rem;
  margin: 0 0 0.5rem;
}

.rm-test-status--err {
  color: #b42318;
  white-space: pre-wrap;
}

.rm-media-unlock-status {
  font-size: 0.85rem;
  color: #0a5cad;
  margin: 0 0 0.35rem;
  min-height: 1.2rem;
}

.rm-media-unlock-status--err {
  color: #b42318;
}

.rm-btn--accent {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
  font-weight: 600;
}

.rm-transport-status {
  font-size: 0.85rem;
  color: #333;
  margin: 0 0 0.35rem;
  min-height: 1.2rem;
}

.rm-timing-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.rm-timing-label {
  font-size: 0.85rem;
  color: #444;
}

.rm-input--timing {
  width: auto;
  min-width: 7rem;
}

.rm-timing-status {
  font-size: 0.85rem;
  color: #0a5cad;
  margin: 0;
  line-height: 1.45;
}

.rm-editor-grid {
  display: grid;
  grid-template-columns: minmax(19rem, 30rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.rm-editor-workspace {
  position: sticky;
  top: 0.75rem;
  height: calc(100vh - 1.5rem);
  min-height: 28rem;
  overflow: hidden;
}

.rm-editor-left {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding-right: 0.25rem;
}

.rm-editor-right {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.rm-timeline-scroll {
  max-height: none;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.rm-timeline-scroll .rm-table-wrap {
  /* Prevent vertical scroll from being handled by the inner horizontal scroller. */
  overflow-x: auto;
  overflow-y: hidden;
}

#rmTimelineSection {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
}

#rmTimelineSection .rm-timeline-scroll {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
}

.rm-row--selected td {
  background: #eef6ff;
}

.rm-row--selected.rm-row--active td {
  background: #dceeff;
}

#rmApp.rm-reel-loaded .rm-nonessential {
  display: none !important;
}

@media (max-width: 900px) {
  .rm-editor-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .rm-editor-workspace {
    position: static;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .rm-preview-pane {
    position: sticky;
    top: 0.5rem;
    z-index: 20;
    background: #f4f6f9;
    border-radius: 10px;
    padding: 0 0.25rem 0.25rem;
  }

  .rm-timeline-scroll {
    max-height: calc(100vh - 22rem);
  }
}

.rm-media-preview,
.rm-image-preview {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  text-align: center;
}

.rm-preview-image,
.rm-preview-video,
.rm-image-preview img {
  max-width: 100%;
  max-height: 280px;
  border-radius: 6px;
}

.rm-preview-video {
  width: 100%;
  background: #000;
}

.rm-layered-preview {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.9rem;
}

.rm-layered-preview a {
  color: #0f766e;
  font-weight: 600;
}

.rm-import-warning {
  font-size: 0.85rem;
  color: #b54708;
  background: #fffaeb;
  border: 1px solid #fedf89;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  margin: 0 0 0.75rem;
}

.rm-media-cell {
  min-width: 11rem;
}

.rm-media-kind {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #0a5cad;
  background: #eef6ff;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  margin-bottom: 0.2rem;
}

.rm-media-select {
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  padding: 0.2rem;
  border-radius: 4px;
  border: 1px solid #c5cdd8;
}

.rm-dialog {
  border: 1px solid #d8dee8;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  max-width: 28rem;
  width: calc(100% - 2rem);
}

.rm-dialog::backdrop {
  background: rgba(26, 35, 50, 0.45);
}

.rm-dialog h3 {
  margin: 0 0 0.5rem;
}

.rm-dialog-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.75rem 0 0.25rem;
}

.rm-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.rm-folder-preview-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.8rem;
  color: #475467;
  max-height: 8rem;
  overflow-y: auto;
}

.rm-scene-stage {
  position: relative;
  width: 100%;
  min-height: 200px;
  max-height: 320px;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
}

.rm-scene-visuals {
  position: relative;
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rm-scene-visuals img,
.rm-scene-visuals video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.rm-scene-overlays {
  position: absolute;
  margin: 0;
  padding: 0.45rem 0.85rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  border-radius: 6px;
  pointer-events: none;
  z-index: 2;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
  max-width: 88%;
  max-height: 4.2em;
  overflow: hidden;
  text-align: center;
  box-sizing: border-box;
}

.rm-caption--top {
  top: 0.75rem;
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.rm-caption--bottom {
  bottom: 0.75rem;
  top: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.rm-caption--bottom-left {
  bottom: 0.75rem;
  top: auto;
  left: 0.75rem;
  right: auto;
  transform: none;
  text-align: left;
}

.rm-caption--bottom-right {
  bottom: 0.75rem;
  top: auto;
  right: 0.75rem;
  left: auto;
  transform: none;
  text-align: right;
}

.rm-caption--center {
  top: 50%;
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
}

.rm-caption--hidden {
  display: none;
}

.rm-preview-image--missing {
  opacity: 0.35;
  min-width: 4rem;
  min-height: 4rem;
}

.rm-layer-pos--bottom {
  bottom: 0;
}

.rm-transition--fade {
  animation: rmFadeIn 0.6s ease;
}

.rm-transition--crossfade {
  animation: rmFadeIn 0.9s ease;
}

@keyframes rmFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.rm-motion--zoomIn {
  animation: rmZoomIn 8s ease forwards;
}

.rm-motion--zoomOut {
  animation: rmZoomOut 8s ease forwards;
}

.rm-motion--panLeft {
  animation: rmPanLeft 8s ease forwards;
}

.rm-motion--panRight {
  animation: rmPanRight 8s ease forwards;
}

.rm-motion--panUp {
  animation: rmPanUp 8s ease forwards;
}

.rm-motion--panDown {
  animation: rmPanDown 8s ease forwards;
}

.rm-motion--kenBurns {
  animation: rmKenBurns 10s ease forwards;
}

@keyframes rmZoomIn {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.15);
  }
}

@keyframes rmZoomOut {
  from {
    transform: scale(1.15);
  }
  to {
    transform: scale(1);
  }
}

@keyframes rmPanLeft {
  from {
    transform: scale(1.08) translateX(4%);
  }
  to {
    transform: scale(1.08) translateX(-4%);
  }
}

@keyframes rmPanRight {
  from {
    transform: scale(1.08) translateX(-4%);
  }
  to {
    transform: scale(1.08) translateX(4%);
  }
}

@keyframes rmPanUp {
  from {
    transform: scale(1.08) translateY(4%);
  }
  to {
    transform: scale(1.08) translateY(-4%);
  }
}

@keyframes rmPanDown {
  from {
    transform: scale(1.08) translateY(-4%);
  }
  to {
    transform: scale(1.08) translateY(4%);
  }
}

@keyframes rmKenBurns {
  from {
    transform: scale(1) translate(0, 0);
  }
  to {
    transform: scale(1.18) translate(-3%, -2%);
  }
}

.rm-row-detail td {
  background: #f8fafc;
  padding: 0.5rem 0.65rem;
}

.rm-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.35rem 0.5rem;
  align-items: end;
}

.rm-detail-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #475467;
  margin-bottom: 0.15rem;
}

.rm-detail-field--wide {
  grid-column: span 2;
}

.rm-ovr-flag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #b54708;
}

.rm-ovr-flag--no {
  color: #98a2b3;
  font-weight: 500;
}

.rm-folder-batch-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.rm-card--folder-batch {
  border-color: #b8d4f0;
  background: #f8fbff;
}

code {
  font-size: 0.85em;
}

.rm-table-wrap {
  overflow-x: auto;
}

.rm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.rm-table th,
.rm-table td {
  border: 1px solid #d8dee8;
  padding: 0.35rem 0.45rem;
  text-align: left;
  vertical-align: top;
}

.rm-table th {
  background: #e8f0fa;
  white-space: nowrap;
}

.rm-table--edit td {
  min-width: 4rem;
}

.rm-table tr.rm-row--skipped {
  opacity: 0.5;
  background: #f0f2f5;
}

.rm-table tr.rm-row--active {
  outline: 2px solid #0a5cad;
  outline-offset: -2px;
  background: #eef6ff;
  opacity: 1;
}

.rm-table tr.rm-row--skipped.rm-row--active {
  opacity: 0.72;
}

.rm-input,
.rm-textarea {
  width: 100%;
  min-width: 5rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.78rem;
  border: 1px solid #c5cdd8;
  border-radius: 4px;
  font-family: inherit;
  box-sizing: border-box;
}

.rm-input--narrow {
  min-width: 3rem;
  width: 3.5rem;
}

.rm-input--media {
  min-width: 8rem;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
}

.rm-textarea {
  min-height: 2.4rem;
  resize: vertical;
}

.rm-type-label {
  font-size: 0.72rem;
  color: #475467;
  white-space: nowrap;
}

.rm-row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 3.2rem;
}

.rm-row-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.rm-btn {
  border: 1px solid #98a2b3;
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.rm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rm-btn--primary {
  background: #0a5cad;
  border-color: #0a5cad;
  color: #fff;
  font-weight: 600;
}

.rm-btn--warn {
  border-color: #b42318;
  color: #b42318;
}

.rm-btn--xs {
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
  border-radius: 6px;
}

.rm-btn--icon {
  padding: 0.15rem 0.35rem;
  min-width: 1.6rem;
  line-height: 1.2;
}

.rm-status {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: #e8f0fa;
}

.rm-status--ok {
  background: #d1fadf;
  color: #067647;
}

.rm-status--err {
  background: #fee4e2;
  color: #b42318;
}

.rm-blocked {
  max-width: 36rem;
  margin: 3rem auto;
  padding: 1.5rem;
  background: #fff;
  border-radius: 10px;
}

.rm-bundle-deploy {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
}

.rm-bundle-deploy--yes {
  background: #d1fadf;
  color: #067647;
  border: 1px solid #abefc6;
}

.rm-bundle-deploy--no {
  background: #fee4e2;
  color: #b42318;
  border: 1px solid #fecdca;
}

.rm-bundle-deploy--partial {
  background: #fffaeb;
  color: #b54708;
  border: 1px solid #fedf89;
}

.rm-bundle-needs {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.8rem;
  color: #475467;
  max-height: 10rem;
  overflow-y: auto;
}

.rm-dl--bundle dd code {
  font-size: 0.75rem;
  word-break: break-all;
}
