.hrr-lock {
  --hrr-surface: #fff;
  --hrr-surface-soft: #f7f8fa;
  --hrr-surface-elevated: #fff;
  --hrr-border: #e5e7eb;
  --hrr-text: #17191c;
  --hrr-muted: #747980;
  --hrr-placeholder: #a8adb4;
  --hrr-skeleton: #e8eaed;
  --hrr-primary: #1677ff;
  --hrr-primary-hover: #0b65dd;
  --hrr-danger: #dc2626;
  position: relative;
  width: 100%;
  min-height: clamp(22rem, 46vw, 29rem);
  margin: 2rem 0;
  border: 1px solid var(--hrr-border);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 50% 48%, rgb(255 255 255 / 96%) 0 21%, rgb(255 255 255 / 72%) 45%, transparent 72%),
    linear-gradient(180deg, rgb(255 255 255 / 54%), var(--hrr-surface) 90%);
  box-shadow: 0 14px 42px rgb(15 23 42 / 6%);
  color: var(--hrr-text);
  font-family: inherit;
  line-height: 1.5;
}

.hrr-lock *,
.hrr-lock *::before,
.hrr-lock *::after {
  box-sizing: border-box;
}

.hrr-lock__skeleton {
  position: absolute;
  inset: 0;
  overflow: hidden;
  overflow: clip;
  padding: clamp(1.25rem, 4vw, 3rem);
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
}

.hrr-lock__skeleton::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--hrr-surface) 0, transparent 14% 86%, var(--hrr-surface) 100%),
    radial-gradient(ellipse at center, var(--hrr-surface) 0 22%, color-mix(in srgb, var(--hrr-surface) 88%, transparent) 42%, transparent 75%);
  content: "";
}

.hrr-lock__skeleton span {
  display: block;
  width: var(--hrr-width, 70%);
  height: .8rem;
  margin: 0 0 1.35rem;
  border-radius: 999px;
  background: var(--hrr-skeleton);
  background: linear-gradient(
    100deg,
    var(--hrr-skeleton) 20%,
    color-mix(in srgb, var(--hrr-skeleton) 52%, var(--hrr-surface)) 42%,
    var(--hrr-skeleton) 64%
  );
  background-size: 220% 100%;
  filter: blur(.2px);
  opacity: .86;
  animation: hrr-skeleton-shimmer 2.6s ease-in-out infinite;
}

.hrr-lock__skeleton span:nth-child(2),
.hrr-lock__skeleton span:nth-child(5) {
  margin-left: 7%;
}

.hrr-lock__skeleton span:nth-child(4),
.hrr-lock__skeleton span:nth-child(7) {
  margin-left: auto;
}

.hrr-lock__gate {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: clamp(22rem, 46vw, 29rem);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 4rem);
  text-align: center;
}

.hrr-lock__gate::before {
  position: absolute;
  z-index: -1;
  width: min(35rem, 94%);
  height: min(17rem, 72%);
  border-radius: 50%;
  background: var(--hrr-surface);
  box-shadow: 0 0 4rem 3rem var(--hrr-surface);
  content: "";
  opacity: .86;
}

.hrr-lock__title {
  max-width: 42rem;
  margin: 0;
  color: var(--hrr-text);
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 680;
  letter-spacing: -.015em;
  line-height: 1.45;
}

.hrr-lock__description {
  max-width: 34rem;
  margin: .85rem auto 1.5rem;
  color: var(--hrr-muted);
  font-size: .925rem;
  line-height: 1.7;
}

.hrr-lock__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .85rem;
}

.hrr-lock__button,
.hrr-lock__recheck {
  appearance: none;
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.35rem;
  border: 0;
  border-radius: .5rem;
  cursor: pointer;
  font: inherit;
  font-size: .925rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease;
}

.hrr-lock__button {
  min-width: 7.5rem;
  background: var(--hrr-primary);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--hrr-primary) 24%, transparent);
  color: #fff;
}

.hrr-lock__button:hover:not([disabled]) {
  background: var(--hrr-primary-hover);
  box-shadow: 0 9px 22px color-mix(in srgb, var(--hrr-primary) 31%, transparent);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.hrr-lock__button:active:not([disabled]) {
  box-shadow: 0 4px 10px color-mix(in srgb, var(--hrr-primary) 24%, transparent);
  transform: translateY(0);
}

.hrr-lock__button[disabled],
.hrr-lock__recheck[disabled] {
  cursor: wait;
  opacity: .62;
}

.hrr-lock__button[aria-busy="true"]::before,
.hrr-lock__recheck[aria-busy="true"]::before {
  width: .9rem;
  height: .9rem;
  margin-right: .45rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: hrr-spin .7s linear infinite;
}

.hrr-lock__recheck {
  min-height: auto;
  padding: .35rem .2rem;
  background: transparent;
  color: var(--hrr-muted);
  font-size: .85rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--hrr-muted) 45%, transparent);
  text-underline-offset: .2em;
}

.hrr-lock__recheck:hover:not([disabled]) {
  color: var(--hrr-primary);
}

.hrr-lock__button:focus-visible,
.hrr-lock__recheck:focus-visible,
.hrr-dialog__close:focus-visible,
.hrr-lock__input:focus-visible {
  outline: 3px solid var(--hrr-primary);
  outline: 3px solid color-mix(in srgb, var(--hrr-primary) 28%, transparent);
  outline-offset: 3px;
}

.hrr-dialog[hidden] {
  display: none !important;
}

.hrr-dialog {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 1.25rem;
}

.hrr-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 56%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  cursor: default;
  animation: hrr-backdrop-in 160ms ease-out both;
}

.hrr-dialog__panel {
  position: relative;
  width: min(27rem, 100%);
  overflow: hidden;
  border: 1px solid var(--hrr-border);
  border-radius: .875rem;
  background: var(--hrr-surface-elevated);
  box-shadow:
    0 28px 65px rgb(15 23 42 / 24%),
    0 8px 24px rgb(15 23 42 / 10%);
  color: var(--hrr-text);
  text-align: left;
  animation: hrr-dialog-in 180ms cubic-bezier(.2, .8, .2, 1) both;
}

.hrr-dialog__header {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem .9rem 1.35rem;
  border-bottom: 1px solid var(--hrr-border);
}

.hrr-dialog__header h2 {
  margin: 0;
  color: var(--hrr-text);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.4;
}

.hrr-dialog__close {
  appearance: none;
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: .45rem;
  background: transparent;
  color: var(--hrr-muted);
  cursor: pointer;
  font: inherit;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
}

.hrr-dialog__close:hover {
  background: var(--hrr-surface-soft);
  color: var(--hrr-text);
}

.hrr-dialog__body {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  padding: 1.35rem;
}

.hrr-dialog__field {
  display: flex;
  height: 2.85rem;
  align-items: center;
  border: 1px solid var(--hrr-border);
  border-radius: .5rem;
  background: var(--hrr-surface);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.hrr-dialog__field:focus-within {
  border-color: var(--hrr-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hrr-primary) 14%, transparent);
}

.hrr-dialog__field-icon {
  display: inline-grid;
  width: 2.8rem;
  flex: 0 0 auto;
  place-items: center;
  color: var(--hrr-placeholder);
  font-size: 1.2rem;
}

.hrr-lock__input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 .85rem 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: var(--hrr-text);
  font: inherit;
  font-size: .95rem;
}

.hrr-lock__input::placeholder {
  color: var(--hrr-placeholder);
  opacity: 1;
}

.hrr-lock__message {
  min-height: 1.35rem;
  margin: .55rem 0 .45rem;
  color: var(--hrr-danger);
  font-size: .825rem;
  line-height: 1.5;
}

.hrr-lock__message--inline {
  width: 100%;
  flex-basis: 100%;
  margin: 0;
  text-align: center;
}

.hrr-dialog__submit {
  width: 100%;
  margin-top: .1rem;
}

html.hrr-dialog-open,
html.hrr-dialog-open body {
  overflow: hidden;
}

@keyframes hrr-skeleton-shimmer {
  0%,
  100% {
    background-position: 110% 0;
  }

  50% {
    background-position: -110% 0;
  }
}

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

@keyframes hrr-backdrop-in {
  from {
    opacity: 0;
  }
}

@keyframes hrr-dialog-in {
  from {
    opacity: 0;
    transform: translateY(.5rem) scale(.985);
  }
}

@media (max-width: 560px) {
  .hrr-lock,
  .hrr-lock__gate {
    min-height: 20rem;
  }

  .hrr-lock {
    margin: 1.5rem 0;
    border-radius: .8rem;
  }

  .hrr-lock__skeleton {
    padding: 1.25rem;
  }

  .hrr-lock__skeleton span {
    margin-bottom: 1.1rem;
  }

  .hrr-lock__gate {
    padding: 2.75rem 1rem;
  }

  .hrr-lock__description {
    margin-bottom: 1.25rem;
    font-size: .875rem;
  }

  .hrr-lock__actions {
    width: min(100%, 18rem);
    flex-direction: column;
  }

  .hrr-lock__actions > .hrr-lock__button {
    width: 100%;
  }

  .hrr-dialog {
    align-items: end;
    padding: 0;
  }

  .hrr-dialog__panel {
    width: 100%;
    max-height: min(88vh, 34rem);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 1rem 1rem 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .hrr-dialog__header {
    min-height: 3.75rem;
  }

  .hrr-dialog__body {
    padding: 1.2rem;
  }
}

@media (prefers-color-scheme: dark) {
  .hrr-lock {
    --hrr-surface: #17191d;
    --hrr-surface-soft: #24272d;
    --hrr-surface-elevated: #1d2025;
    --hrr-border: #353941;
    --hrr-text: #f4f5f7;
    --hrr-muted: #a6abb3;
    --hrr-placeholder: #777d87;
    --hrr-skeleton: #2b2f36;
    --hrr-primary: #4b9cff;
    --hrr-primary-hover: #69acff;
    --hrr-danger: #ff7b7b;
    background:
      radial-gradient(circle at 50% 48%, rgb(23 25 29 / 97%) 0 21%, rgb(23 25 29 / 78%) 45%, transparent 72%),
      linear-gradient(180deg, rgb(23 25 29 / 48%), var(--hrr-surface) 90%);
    box-shadow: 0 16px 44px rgb(0 0 0 / 24%);
    color-scheme: dark;
  }

}

:is(html.dark, body.dark, html[data-color-scheme="dark"]) .hrr-lock {
  --hrr-surface: #17191d;
  --hrr-surface-soft: #24272d;
  --hrr-surface-elevated: #1d2025;
  --hrr-border: #353941;
  --hrr-text: #f4f5f7;
  --hrr-muted: #a6abb3;
  --hrr-placeholder: #777d87;
  --hrr-skeleton: #2b2f36;
  --hrr-primary: #4b9cff;
  --hrr-primary-hover: #69acff;
  --hrr-danger: #ff7b7b;
  background:
    radial-gradient(circle at 50% 48%, rgb(23 25 29 / 97%) 0 21%, rgb(23 25 29 / 78%) 45%, transparent 72%),
    linear-gradient(180deg, rgb(23 25 29 / 48%), var(--hrr-surface) 90%);
  box-shadow: 0 16px 44px rgb(0 0 0 / 24%);
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  .hrr-lock *,
  .hrr-lock *::before,
  .hrr-lock *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  .hrr-lock,
  .hrr-dialog__panel,
  .hrr-dialog__field,
  .hrr-lock__button {
    border: 1px solid CanvasText;
  }

  .hrr-lock__button {
    background: ButtonFace;
    box-shadow: none;
    color: ButtonText;
  }
}
