html[data-surface="white-oath"] .wo-profile-crop-host:empty {
  display: none;
}

html[data-surface="white-oath"] .wo-profile-crop-host {
  position: absolute;
  z-index: 20;
  inset: 0;
}

html[data-surface="white-oath"] .wo-avatar-editor {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--wo-night);
  color: var(--wo-text-on-night);
  animation: wo-avatar-editor-arrive 420ms var(--wo-ease-freeze) both;
}

@keyframes wo-avatar-editor-arrive {
  from { opacity: 0; transform: translate3d(1.5rem, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

html[data-surface="white-oath"] .wo-avatar-editor__head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--wo-space-4);
  align-items: start;
  padding: var(--wo-space-4) var(--wo-space-6);
  border-bottom: var(--wo-hairline) solid var(--wo-paper-18);
}

html[data-surface="white-oath"] .wo-avatar-editor__head::after {
  position: absolute;
  right: 31%;
  bottom: -1px;
  left: 0;
  height: var(--wo-rule);
  background: linear-gradient(90deg, var(--wo-crimson), var(--wo-indigo), var(--wo-cyan));
  content: "";
}

html[data-surface="white-oath"] .wo-avatar-editor__head span {
  color: var(--wo-cyan);
  font-family: var(--wo-font-data);
  font-size: var(--wo-text-2xs);
  font-weight: 700;
  letter-spacing: 0.15em;
}

html[data-surface="white-oath"] .wo-avatar-editor__head h3 {
  margin: 0.2rem 0 0;
  font-family: var(--wo-font-display);
  font-size: var(--wo-text-xl);
  font-weight: 520;
}

html[data-surface="white-oath"] .wo-avatar-editor__head p {
  margin: 0.2rem 0 0;
  color: var(--wo-text-muted-night);
  font-size: var(--wo-text-xs);
}

html[data-surface="white-oath"] .wo-avatar-editor__head button {
  display: grid;
  width: var(--wo-touch);
  height: var(--wo-touch);
  place-items: center;
  border: var(--wo-hairline) solid var(--wo-paper-18);
  border-radius: 50%;
  background: transparent;
  color: var(--wo-light);
  font-size: 1.25rem;
}

html[data-surface="white-oath"] .wo-avatar-editor__body {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(22rem, 1.35fr) minmax(15rem, 0.65fr);
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1rem, 2.2vw, 2.5rem) var(--wo-space-6);
  overflow: auto;
}

html[data-surface="white-oath"] .wo-avatar-editor__workspace {
  display: grid;
  min-height: 0;
  align-content: center;
  justify-items: center;
}

html[data-surface="white-oath"] .wo-avatar-crop-stage {
  position: relative;
  width: min(100%, 33rem, 52vh);
  aspect-ratio: 1;
  overflow: hidden;
  border: var(--wo-hairline) solid var(--wo-paper-18);
  background:
    linear-gradient(45deg, var(--wo-night-soft) 25%, transparent 25% 75%, var(--wo-night-soft) 75%),
    linear-gradient(45deg, var(--wo-night-soft) 25%, var(--wo-night-deep) 25% 75%, var(--wo-night-soft) 75%);
  background-position: 0 0, 0.75rem 0.75rem;
  background-size: 1.5rem 1.5rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

html[data-surface="white-oath"] .wo-avatar-crop-stage.is-dragging {
  cursor: grabbing;
}

html[data-surface="white-oath"] .wo-avatar-crop-stage canvas {
  width: 100%;
  height: 100%;
}

html[data-surface="white-oath"] .wo-avatar-crop-stage__mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 0.32rem var(--wo-light-12);
}

html[data-surface="white-oath"] .wo-avatar-crop-stage__mask::before,
html[data-surface="white-oath"] .wo-avatar-crop-stage__mask::after,
html[data-surface="white-oath"] .wo-avatar-crop-stage__mask i,
html[data-surface="white-oath"] .wo-avatar-crop-stage__mask b {
  position: absolute;
  content: "";
  background: var(--wo-paper-18);
}

html[data-surface="white-oath"] .wo-avatar-crop-stage__mask::before,
html[data-surface="white-oath"] .wo-avatar-crop-stage__mask::after {
  top: 0;
  bottom: 0;
  width: var(--wo-hairline);
}

html[data-surface="white-oath"] .wo-avatar-crop-stage__mask::before { left: 33.333%; }
html[data-surface="white-oath"] .wo-avatar-crop-stage__mask::after { right: 33.333%; }

html[data-surface="white-oath"] .wo-avatar-crop-stage__mask i {
  right: 0;
  left: 0;
  height: var(--wo-hairline);
}

html[data-surface="white-oath"] .wo-avatar-crop-stage__mask i:first-child { top: 33.333%; }
html[data-surface="white-oath"] .wo-avatar-crop-stage__mask i:nth-child(2) { bottom: 33.333%; }

html[data-surface="white-oath"] .wo-avatar-crop-stage__mask b {
  inset: 9%;
  border: var(--wo-hairline) solid rgba(248, 245, 236, 0.76);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 100vmax rgba(12, 13, 20, 0.26);
}

html[data-surface="white-oath"] .wo-avatar-crop-stage > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--wo-night-78);
  color: var(--wo-text-muted-night);
  font-size: var(--wo-text-xs);
  pointer-events: none;
}

html[data-surface="white-oath"] .wo-avatar-editor[data-phase="editing"] .wo-avatar-crop-stage > span,
html[data-surface="white-oath"] .wo-avatar-editor[data-phase="encoding"] .wo-avatar-crop-stage > span,
html[data-surface="white-oath"] .wo-avatar-editor[data-phase="uploading"] .wo-avatar-crop-stage > span {
  display: none;
}

html[data-surface="white-oath"] .wo-avatar-crop-controls {
  width: min(100%, 33rem, 52vh);
  margin-top: var(--wo-space-3);
}

html[data-surface="white-oath"] .wo-avatar-crop-controls label {
  display: grid;
  grid-template-columns: auto minmax(8rem, 1fr) 3.2rem;
  gap: var(--wo-space-3);
  align-items: center;
  font-size: var(--wo-text-xs);
}

html[data-surface="white-oath"] .wo-avatar-crop-controls input[type="range"] {
  --wo-range-progress: 0%;
  width: 100%;
  height: var(--wo-touch);
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  outline: 0;
  background:
    linear-gradient(
      90deg,
      var(--wo-cyan) 0,
      var(--wo-indigo) calc(var(--wo-range-progress) * 0.72),
      var(--wo-crimson) var(--wo-range-progress),
      var(--wo-paper-18) var(--wo-range-progress),
      var(--wo-paper-18) 100%
    ) center / 100% var(--wo-rule) no-repeat;
  cursor: pointer;
}

html[data-surface="white-oath"] .wo-avatar-crop-controls input[type="range"]::-webkit-slider-runnable-track {
  height: var(--wo-rule);
  border: 0;
  background: transparent;
}

html[data-surface="white-oath"] .wo-avatar-crop-controls input[type="range"]::-webkit-slider-thumb {
  width: 1rem;
  height: 1rem;
  margin-top: calc((var(--wo-rule) - 1rem) / 2);
  appearance: none;
  border: 0.2rem solid var(--wo-night);
  border-radius: 0;
  background: var(--wo-light);
  box-shadow: 0 0 0 var(--wo-hairline) var(--wo-cyan), 0.28rem 0.28rem 0 var(--wo-crimson-42);
  transform: rotate(45deg);
}

html[data-surface="white-oath"] .wo-avatar-crop-controls input[type="range"]::-moz-range-track {
  height: var(--wo-rule);
  border: 0;
  background: transparent;
}

html[data-surface="white-oath"] .wo-avatar-crop-controls input[type="range"]::-moz-range-progress {
  height: var(--wo-rule);
  background: linear-gradient(90deg, var(--wo-cyan), var(--wo-indigo) 72%, var(--wo-crimson));
}

html[data-surface="white-oath"] .wo-avatar-crop-controls input[type="range"]::-moz-range-thumb {
  width: 0.72rem;
  height: 0.72rem;
  border: 0.2rem solid var(--wo-night);
  border-radius: 0;
  background: var(--wo-light);
  box-shadow: 0 0 0 var(--wo-hairline) var(--wo-cyan), 0.28rem 0.28rem 0 var(--wo-crimson-42);
  transform: rotate(45deg);
}

html[data-surface="white-oath"] .wo-avatar-crop-controls input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 0.12rem var(--wo-night), 0 0 0 0.28rem var(--wo-cyan), 0.28rem 0.28rem 0 var(--wo-crimson-42);
}

html[data-surface="white-oath"] .wo-avatar-crop-controls input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 0.12rem var(--wo-night), 0 0 0 0.28rem var(--wo-cyan), 0.28rem 0.28rem 0 var(--wo-crimson-42);
}

html[data-surface="white-oath"] .wo-avatar-crop-controls input[type="range"]:disabled {
  cursor: default;
  opacity: 0.4;
}

@media (forced-colors: active) {
  html[data-surface="white-oath"] .wo-avatar-crop-controls input[type="range"] {
    appearance: auto;
    background: transparent;
    forced-color-adjust: auto;
  }
}

html[data-surface="white-oath"] .wo-avatar-crop-controls b {
  color: var(--wo-cyan);
  font-family: var(--wo-font-data);
  font-size: var(--wo-text-xs);
  text-align: right;
}

html[data-surface="white-oath"] .wo-avatar-crop-controls p {
  margin: 0;
  color: var(--wo-text-muted-night);
  font-size: var(--wo-text-2xs);
  text-align: center;
}

html[data-surface="white-oath"] .wo-avatar-preview {
  align-self: center;
  padding: var(--wo-space-4);
  border-top: var(--wo-rule) solid var(--wo-crimson);
  background: var(--wo-light);
  box-shadow: 0.65rem 0.65rem 0 var(--wo-indigo-38);
  color: var(--wo-night);
}

html[data-surface="white-oath"] .wo-avatar-preview > span {
  color: var(--wo-crimson);
  font-family: var(--wo-font-data);
  font-size: var(--wo-text-2xs);
  font-weight: 700;
  letter-spacing: 0.14em;
}

html[data-surface="white-oath"] .wo-avatar-preview > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--wo-space-3);
  margin-block: var(--wo-space-4);
}

html[data-surface="white-oath"] .wo-avatar-preview figure {
  display: grid;
  place-items: center;
  margin: 0;
}

html[data-surface="white-oath"] .wo-avatar-preview canvas {
  width: min(100%, 7rem);
  aspect-ratio: 1;
  background: var(--wo-night-07);
}

html[data-surface="white-oath"] .wo-avatar-preview [data-wo-crop-preview-round] {
  border-radius: 50%;
}

html[data-surface="white-oath"] .wo-avatar-preview figcaption {
  margin-top: 0.45rem;
  color: var(--wo-text-muted-paper);
  font-size: var(--wo-text-2xs);
}

html[data-surface="white-oath"] .wo-avatar-preview dl {
  margin: 0;
}

html[data-surface="white-oath"] .wo-avatar-preview dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: var(--wo-hairline) solid var(--wo-night-12);
}

html[data-surface="white-oath"] .wo-avatar-preview dt,
html[data-surface="white-oath"] .wo-avatar-preview dd {
  margin: 0;
  font-size: var(--wo-text-xs);
}

html[data-surface="white-oath"] .wo-avatar-preview dt { color: var(--wo-text-muted-paper); }
html[data-surface="white-oath"] .wo-avatar-preview dd { font-family: var(--wo-font-data); }

html[data-surface="white-oath"] .wo-avatar-preview > p {
  min-height: 2.8rem;
  margin: var(--wo-space-3) 0 0;
  color: var(--wo-crimson);
  font-size: var(--wo-text-xs);
}

html[data-surface="white-oath"] .wo-avatar-editor__actions {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: var(--wo-space-2);
  align-items: center;
  padding: var(--wo-space-3) var(--wo-space-6) max(var(--wo-space-3), env(safe-area-inset-bottom));
  border-top: var(--wo-hairline) solid var(--wo-paper-18);
}

html[data-surface="white-oath"] .wo-avatar-editor__actions > button:not(.wo-action) {
  min-height: var(--wo-touch);
  padding: 0.65rem 0.85rem;
  border-bottom: var(--wo-hairline) solid var(--wo-paper-18);
  background: transparent;
  color: var(--wo-text-muted-night);
  font-size: var(--wo-text-xs);
}

html[data-surface="white-oath"] .wo-avatar-editor__actions > button:hover:not(:disabled) {
  border-color: var(--wo-cyan);
  color: var(--wo-light);
}

html[data-surface="white-oath"] .wo-avatar-editor__actions > button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

@media (max-width: 62rem) {
  html[data-surface="white-oath"] .wo-avatar-editor__body {
    grid-template-columns: minmax(19rem, 1fr) minmax(13rem, 0.55fr);
    padding-inline: var(--wo-space-4);
  }

  html[data-surface="white-oath"] .wo-avatar-editor__head,
  html[data-surface="white-oath"] .wo-avatar-editor__actions {
    padding-inline: var(--wo-space-4);
  }
}

@media (max-width: 46rem) {
  html[data-surface="white-oath"] .wo-avatar-editor__head {
    padding: var(--wo-space-3) max(1rem, env(safe-area-inset-right)) var(--wo-space-3) max(1rem, env(safe-area-inset-left));
  }

  html[data-surface="white-oath"] .wo-avatar-editor__body {
    display: block;
    padding: var(--wo-space-3) max(1rem, env(safe-area-inset-right)) var(--wo-space-5) max(1rem, env(safe-area-inset-left));
  }

  html[data-surface="white-oath"] .wo-avatar-crop-stage,
  html[data-surface="white-oath"] .wo-avatar-crop-controls {
    width: min(100%, 28rem, 48vh);
  }

  html[data-surface="white-oath"] .wo-avatar-preview {
    width: min(100%, 28rem);
    margin: var(--wo-space-5) auto 0;
  }

  html[data-surface="white-oath"] .wo-avatar-editor__actions {
    display: flex;
    gap: 0.35rem;
    padding: var(--wo-space-2) max(0.65rem, env(safe-area-inset-right)) max(var(--wo-space-2), env(safe-area-inset-bottom)) max(0.65rem, env(safe-area-inset-left));
    overflow-x: auto;
  }

  html[data-surface="white-oath"] .wo-avatar-editor__actions > span {
    flex: 1;
  }

  html[data-surface="white-oath"] .wo-avatar-editor__actions > button {
    flex: 0 0 auto;
  }
}

@media (max-width: 23rem) {
  html[data-surface="white-oath"] .wo-avatar-editor__head h3 {
    font-size: 1.25rem;
  }

  html[data-surface="white-oath"] .wo-avatar-editor__head p {
    display: none;
  }

  html[data-surface="white-oath"] .wo-avatar-crop-controls label {
    grid-template-columns: auto 1fr;
  }

  html[data-surface="white-oath"] .wo-avatar-crop-controls b {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-surface="white-oath"] .wo-avatar-editor {
    animation: none;
  }
}
