:root {
  --ec-edge-accent: #ff641a;
  --ec-edge-panel: rgba(12, 13, 16, .96);
}

html.ec-edge-open,
html.ec-edge-open body {
  overflow: hidden !important;
}

.ec-edge-handle {
  position: fixed;
  z-index: 420;
  top: 50%;
  right: 0;
  display: grid;
  place-items: center;
  width: 19px;
  height: 60px;
  padding: 0;
  color: rgba(255, 255, 255, .74);
  background: rgba(14, 15, 18, .76);
  border: 1px solid rgba(255, 255, 255, .16);
  border-right: 0;
  border-radius: 13px 0 0 13px;
  box-shadow: -7px 10px 24px rgba(0, 0, 0, .2);
  backdrop-filter: blur(14px);
  cursor: pointer;
  touch-action: manipulation;
  transform: translateY(-50%);
  transition: opacity .2s ease, transform .3s ease, background .2s ease;
}

.ec-edge-handle:hover {
  color: #fff;
  background: rgba(20, 21, 25, .94);
}

.ec-edge-handle[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
  transform: translate(16px, -50%);
}

.ec-edge-grip,
.ec-edge-grip::before,
.ec-edge-grip::after {
  display: block;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.ec-edge-grip {
  position: relative;
}

.ec-edge-grip::before {
  position: absolute;
  top: -10px;
}

.ec-edge-grip::after {
  position: absolute;
  top: 10px;
}

.ec-edge-backdrop {
  position: fixed;
  z-index: 400;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(4, 5, 7, .46);
  backdrop-filter: blur(7px);
  transition: opacity .28s ease;
}

.ec-edge-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ec-edge-wheel {
  position: fixed;
  z-index: 410;
  top: 50%;
  right: 0;
  width: min(320px, calc(100vw - 12px));
  height: min(460px, calc(100svh - 20px));
  color: #fff;
  background:
    radial-gradient(circle at 100% 50%, rgba(255, 100, 26, .17), transparent 34%),
    linear-gradient(100deg, rgba(20, 21, 25, .94), var(--ec-edge-panel));
  border: 1px solid rgba(255, 255, 255, .12);
  border-right: 0;
  border-radius: 255px 0 0 255px;
  box-shadow: -24px 0 72px rgba(0, 0, 0, .36);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  touch-action: none;
  transform: translate(108%, -50%);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
}

.ec-edge-wheel::before,
.ec-edge-wheel::after {
  position: absolute;
  top: 50%;
  right: -52px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: translateY(-50%);
}

.ec-edge-wheel::before {
  width: 320px;
  height: 320px;
  box-shadow: 0 0 0 30px rgba(255, 100, 26, .018);
}

.ec-edge-wheel::after {
  width: 202px;
  height: 202px;
  border-color: rgba(255, 100, 26, .2);
}

.ec-edge-wheel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.ec-edge-center {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 24px;
  width: 132px;
  transform: translateY(-50%);
  pointer-events: none;
}

.ec-edge-center small {
  display: block;
  margin-bottom: 7px;
  color: var(--ec-edge-accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ec-edge-center strong {
  display: block;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 20px;
  letter-spacing: -.055em;
  line-height: 1.05;
}

.ec-edge-center p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, .46);
  font-size: 11px;
  line-height: 1.45;
}

.ec-edge-center span {
  display: block;
  width: 32px;
  height: 2px;
  margin-top: 16px;
  background: var(--ec-edge-accent);
  border-radius: 2px;
}

.ec-edge-items {
  position: absolute;
  z-index: 4;
  inset: 0;
}

.ec-edge-item {
  position: absolute;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: rgba(255, 255, 255, .58);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .15);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    width .18s ease,
    height .18s ease,
    color .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}

.ec-edge-item b {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.ec-edge-item.is-selected {
  width: 50px;
  height: 50px;
  color: #17100d;
  background: var(--ec-edge-accent);
  border-color: var(--ec-edge-accent);
  box-shadow: 0 12px 34px rgba(255, 100, 26, .3);
}

.ec-edge-item.is-current::after {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 8px;
  height: 8px;
  background: #6dd59a;
  border: 2px solid #121316;
  border-radius: 50%;
  content: "";
}

.ec-edge-item:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.ec-edge-close {
  position: absolute;
  z-index: 6;
  top: 18px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 50%;
  cursor: pointer;
}

.ec-edge-close::before,
.ec-edge-close::after {
  position: absolute;
  width: 13px;
  height: 1px;
  background: currentColor;
  content: "";
}

.ec-edge-close::before { transform: rotate(45deg); }
.ec-edge-close::after { transform: rotate(-45deg); }

.ec-edge-tip {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 20px;
  color: rgba(255, 255, 255, .3);
  font-size: 9px;
  letter-spacing: .05em;
  pointer-events: none;
}

@media (max-width: 600px) {
  .ec-edge-handle {
    width: 18px;
    height: 58px;
  }

  .ec-edge-wheel {
    width: min(286px, calc(100vw - 24px));
    height: min(420px, calc(100svh - 20px));
    border-radius: 225px 0 0 225px;
  }

  .ec-edge-wheel::before {
    right: -58px;
    width: 284px;
    height: 284px;
  }

  .ec-edge-wheel::after {
    right: -48px;
    width: 184px;
    height: 184px;
  }

  .ec-edge-center {
    left: 18px;
    width: 108px;
  }

  .ec-edge-center strong {
    font-size: 17px;
  }

  .ec-edge-center p {
    display: none;
  }

  .ec-edge-item {
    width: 36px;
    height: 36px;
  }

  .ec-edge-item.is-selected {
    width: 45px;
    height: 45px;
  }

  .ec-edge-tip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ec-edge-wheel,
  .ec-edge-backdrop,
  .ec-edge-handle,
  .ec-edge-item {
    transition: none !important;
  }
}
