.mv-page {
  padding: 8px 0 88px;
}

.mv-title {
  margin: 6px 0 8px;
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.3;
}

.mv-lead {
  color: var(--text-muted);
  margin: 0 0 18px;
  font-size: 1.02rem;
  line-height: 1.9;
}

.mv-lead a {
  color: var(--accent);
  font-weight: 700;
}

.mv-quota {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .9rem;
  color: var(--text-muted);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 18px;
}

.mv-quota.is-empty {
  border-color: #c24141;
  background: rgba(194, 65, 65, .12);
}

.mv-quota__login {
  margin-inline-start: auto;
  color: var(--accent);
  font-weight: 700;
}

.mv-gate {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  background: var(--bg-card);
}

.mv-gate h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.mv-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.mv-studio {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 28px);
  background: linear-gradient(145deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mv-group {
  margin-bottom: 18px;
}

.mv-group__label {
  display: block;
  margin-bottom: 10px;
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.mv-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.mv-demo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: inherit;
  transition: border-color .15s ease, transform .15s ease;
}

.mv-demo:hover {
  border-color: var(--accent);
}

.mv-demo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.mv-demo span {
  padding: 0 10px 10px;
  font-weight: 700;
  font-size: .85rem;
}

.mv-demo.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.mv-stage {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 18px;
}

.mv-compare {
  position: relative;
  min-height: 240px;
  height: min(62vh, 540px);
  background:
    repeating-conic-gradient(rgba(255, 255, 255, .045) 0 25%, transparent 0 50%)
    0 0 / 22px 22px;
}

.mv-compare__base,
.mv-compare__overlay,
.mv-compare__after img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.mv-compare__after {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--split, 100%);
  overflow: hidden;
  pointer-events: none;
  border-inline-end: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}

.mv-compare__after img {
  width: var(--stage-w, 100%);
  max-width: none;
  height: 100%;
}

.mv-compare__overlay {
  pointer-events: none;
  mix-blend-mode: normal;
  opacity: .88;
}

.mv-compare.has-result .mv-compare__overlay {
  display: none !important;
}

.mv-compare__labels {
  position: absolute;
  inset-inline: 12px;
  top: 10px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}

.mv-compare__labels span {
  background: rgba(10, 14, 23, .72);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.mv-compare__range {
  position: absolute;
  inset-inline: 12px;
  bottom: 10px;
  width: calc(100% - 24px);
  z-index: 3;
  accent-color: var(--accent);
  cursor: ew-resize;
}

.mv-busy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(10, 14, 23, .72);
  backdrop-filter: blur(3px);
  color: var(--text);
  font-size: .95rem;
  z-index: 4;
}

.mv-busy__spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: mv-spin .9s linear infinite;
}

@keyframes mv-spin {
  to { transform: rotate(360deg); }
}

.mv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mv-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  color: var(--text-muted);
}

.mv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.mv-chips:empty {
  display: none;
}

.mv-chip {
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: inherit;
  font: inherit;
  font-size: .85rem;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}

.mv-chip:hover {
  border-color: var(--accent);
}

.mv-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.mv-sliders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 22px;
}

.mv-slider {
  display: grid;
  grid-template-columns: 64px 1fr 40px;
  gap: 8px;
  align-items: center;
  font-size: .85rem;
  color: var(--text-muted);
}

.mv-slider input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.mv-slider span {
  color: var(--accent);
  font-weight: 700;
  text-align: end;
}

.mv-runbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 8px;
}

.mv-status {
  min-height: 1.5em;
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: .88rem;
}

.mv-status.is-error {
  color: #ef4444;
}

.mv-page .btn-primary.is-busy,
.mv-page .btn-secondary.is-busy {
  opacity: .6;
  pointer-events: none;
}

@media (max-width: 720px) {
  .mv-page {
    padding-bottom: 72px;
  }

  .mv-demo-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .mv-demo {
    flex: 0 0 42%;
    scroll-snap-align: start;
  }

  .mv-compare {
    height: min(52vh, 380px);
    min-height: 220px;
  }

  .mv-compare__range {
    bottom: 8px;
  }

  .mv-stage {
    margin-bottom: 14px;
  }

  .mv-sliders {
    grid-template-columns: 1fr;
  }

  .mv-runbar .btn-primary,
  .mv-runbar .btn-secondary {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
}
