/* MaxSmooth — two persistent corner controls, using the site's theme. */

/* React owns theme state; the visible control forwards to this toggle. */
.msv2-native-toggle {
  opacity: 0 !important;
  pointer-events: none !important;
}

.msv2-control {
  appearance: none;
  position: fixed;
  left: max(0.25rem, env(safe-area-inset-left));
  z-index: 60;
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: hsl(var(--foreground));
  font-family: inherit;
  cursor: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.3s;
}

.msv2-randomize {
  top: max(0.25rem, env(safe-area-inset-top));
}

.msv2-theme {
  bottom: max(0.25rem, env(safe-area-inset-bottom));
}

/* The empty space inside each arc belongs to its button. Anchoring the
   hit areas to the viewport keeps the icons at their safe-area offsets. */
.msv2-control::before {
  content: "";
  position: fixed;
  left: 0;
  width: max(5rem, 23vw);
}

.msv2-randomize::before {
  top: 0;
  height: 28dvh;
  clip-path: ellipse(100% 100% at left top);
}

.msv2-theme::before {
  bottom: 0;
  height: 40dvh;
  clip-path: ellipse(100% 100% at left bottom);
}

.msv2-control:focus-visible {
  outline: 2px solid hsl(var(--foreground) / 0.5);
  outline-offset: 2px;
}

.msv2-control svg {
  width: 1.2rem;
  height: 1.2rem;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.msv2-control:hover svg,
.msv2-control:focus-visible svg {
  transform: scale(1.35);
}

.msv2-control:active svg { transform: scale(0.95); }

@media (prefers-reduced-motion: reduce) {
  .msv2-control, .msv2-control svg {
    transition: none !important;
  }
}
