.avedit {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  line-height: 0;
  flex: none;
}
.avcam {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--surface);
  border: 2px solid var(--bg);
}
.avcam svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}
.avspin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: none;
  background: rgba(0, 0, 0, .35);
}
.avspin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  margin: -12px;
  border: 3px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: avspin .8s linear infinite;
}
.avedit.busy .avspin {
  display: block;
}
@keyframes avspin {
  to {
    transform: rotate(360deg);
  }
}
.avsheet {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(0, 0, 0, .35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: avfade .2s ease-out;
}
.avsbox {
  width: min(480px, 100%);
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 8px;
  animation: avup .26s cubic-bezier(.2, .8, .2, 1);
}
.avsb {
  display: block;
  width: 100%;
  padding: 16px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
.avsb.warn {
  color: var(--brand);
}
.avsb.cancel {
  margin-top: 4px;
}
.avsheet.out,
.avcrop.out {
  opacity: 0;
  transition: opacity .2s;
}
@keyframes avfade {
  from {
    opacity: 0;
  }
}
@keyframes avup {
  from {
    transform: translateY(100%);
  }
}
.avcrop {
  position: fixed;
  inset: 0;
  z-index: 960;
  background: #000;
  color: #fff;
  display: grid;
  grid-template-rows: auto 1fr;
  animation: avfade .2s ease-out;
}
.avchead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
}
.avcb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  justify-self: start;
}
.avcb.ok {
  justify-self: end;
  color: var(--hi,#fc0);
}
.avcb svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.avcstage {
  position: relative;
  align-self: center;
  width: min(100vw, 480px);
  aspect-ratio: 1;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.avcstage img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  transform-origin: center;
  pointer-events: none;
}
.avchole {
  position: absolute;
  left: 7%;
  top: 7%;
  width: 86%;
  height: 86%;
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .6);
  outline: 2px solid rgba(255, 255, 255, .9);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .avsheet,
  .avsbox,
  .avcrop {
    animation: none;
  }
  .avspin::after {
    animation-duration: 2s;
  }
}
