#ticket-shop-registration-view {
  border-top-left-radius: var(--sheet-border-radius);
  border-top-right-radius: var(--sheet-border-radius);
  width: 100%;
  max-width: 48rem;
  max-height: calc(100lvh - 0.8rem);
  overflow: clip;

  @media (width >= 680px) and (height >= 620px) {
    &:not([hidden]) {
      border-radius: var(--sheet-border-radius);
      translate: 0% calc((100vh - 100%) / -2);
    }
  }

  > header {
    > .continue:not(:disabled) {
      color: var(--color-blue);
    }
  }

  > .progress-container {
    position: absolute;
    z-index: calc(infinity);
    top: calc(var(--viewkit-toolbar-height) + var(--viewkit-toolbar-border-width));
    left: 0;
    padding-inline: 1.6rem;
    width: 100%;
    height: 7.6rem;
    display: flex;
    align-items: center;
    pointer-events: none;

    > .progress {
      --progress: 20%;

      position: relative;
      margin-inline: auto;
      border: var(--toolbar-border);
      border-radius: 100vmax;
      width: 100%;
      max-width: 46rem;
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      background: white;
      isolation: isolate;
      overflow: clip;
      list-style: none;

      &[data-finished] {
        opacity: 0.5;
      }

      &::before,
      &::after {
        content: "";
        position: absolute;
        inset-block: 2px;
        left: 2px;
        border-radius: 100vmax;
      }

      &::before {
        right: 2px;
        background: white;
      }

      &::after {
        width: min(calc(var(--progress) - 2px), calc(100% - 4px));
        background: var(--toolbar-background-color);
        transition: width var(--viewkit-transition-duration) ease-in-out;
      }

      > li {
        position: relative;
        z-index: 1;
        min-width: 0;
        color: oklch(from var(--color-gray) l c h / 0.5);
        font-size: 1rem;
        line-height: 1.2;
        transition: color var(--viewkit-transition-duration) ease-in-out;

        &[data-status="complete"],
        &[data-status="current"] {
          color: black;
        }

        > button {
          appearance: none;
          border: none;
          padding: 0.4rem 0.4rem 0.6rem;
          width: 100%;
          display: flex;
          flex-direction: column;
          align-items: center;
          gap: 0.2rem;
          color: inherit;
          font: inherit;
          background: transparent;

          &:not(:disabled) {
            pointer-events: auto;
          }

          > strong {
            width: 2rem;
            height: 2rem;
            display: grid;
            place-items: center;
            font-size: 1.4rem;
            line-height: 1;
            translate: 0 0.2rem;
          }

          > small {
            max-width: 100%;
            font-size: inherit;
            text-align: center;
            translate: 0 -0.1rem;
            white-space: nowrap;
          }
        }
      }
    }
  }

  > form {
    position: relative;
    z-index: 0;
    padding: 0;
    isolation: isolate;
    overflow: hidden;

    > .page {
      padding: 10rem 1.6rem max(2.4rem, env(safe-area-inset-bottom));
      min-height: 0;
      display: grid;
      align-content: start;
      gap: 1.6rem;
      background: white;
      overflow-x: hidden;
      overflow-y: auto;

      > .introduction {
        margin-bottom: 0.4rem;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 1.2rem;

        > svg {
          width: 4.8rem;
          height: 4.8rem;
          fill: var(--color-blue);
        }

        h2 {
          font-size: 2rem;
          line-height: 1.2;
        }

        p {
          margin-top: 0.4rem;
          color: var(--color-gray);
          font-size: 1.4rem;
          line-height: 1.35;
        }
      }

      label:not(.legal-consent, .code-field) {
        min-width: 0;
        display: grid;
        gap: 0.6rem;

        > span {
          padding-inline: 0.8rem;
          font-weight: 600;
        }

        > input {
          border: var(--toolbar-border);
          border-radius: 100vmax;
          padding-inline: 1.6rem;
          width: 100%;
          max-width: 100%;
          min-width: 0;
          height: 4.4rem;
          font-size: 1.6rem;
          background: white;

          @supports (-webkit-touch-callout: none) {
            &[type="date"] {
              padding-inline: 0;
              width: auto;
              justify-self: stretch;

              &::-webkit-date-and-time-value {
                padding-inline: 1.6rem;
              }
            }
          }
        }

        > small {
          padding-inline: 0.8rem;
          min-height: 1.3em;
          color: var(--color-gray);
          font-size: 1.3rem;
          line-height: 1.3;
        }
      }

      > .paired-fields {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem;
      }

      .phone-status[data-error],
      .password-status {
        color: var(--color-red);
      }

      > .legal-consent {
        border: var(--toolbar-border);
        border-radius: 2.1rem;
        padding: 1.2rem;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 1.2rem;
        background: var(--toolbar-background-color);

        > input {
          appearance: none;
          border: 0.15rem solid var(--toolbar-border-color);
          border-radius: 0.6rem;
          width: 2.4rem;
          height: 2.4rem;
          display: grid;
          place-items: center;
          background: white;

          &:checked {
            border-color: var(--color-blue);
            background: var(--color-blue);

            &::after {
              content: "";
              border-left: 0.2rem solid white;
              border-bottom: 0.2rem solid white;
              width: 1.1rem;
              height: 0.6rem;
              rotate: -45deg;
              translate: 0 -0.1rem;
            }
          }
        }

        > span {
          font-size: 1.4rem;
          line-height: 1.45;
          overflow-wrap: break-word;
        }
      }

      &.verification {
        text-align: center;
        align-content: start;
        justify-items: center;
        gap: 1.2rem;

        > .verification-heading {
          display: grid;
          justify-items: center;
          gap: 0.6rem;

          > svg {
            width: 6.4rem;
            height: 6.4rem;
            fill: var(--color-blue);
          }

          > h2 {
            font-size: 2rem;
          }

          > p {
            max-width: 36rem;
            color: var(--color-gray);
            text-wrap: balance;

            > strong {
              color: black;
              font-weight: 500;
              overflow-wrap: anywhere;
            }
          }
        }

        > .code-field {
          width: 100%;
          display: grid;
          justify-items: center;

          > input {
            border: 0.2rem solid var(--toolbar-border-color);
            border-radius: 1.2rem;
            padding-inline: 1.9rem;
            width: min(100%, 24rem);
            height: 5.6rem;
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 2.4rem;
            font-weight: 700;
            letter-spacing: 0.3em;
            text-align: center;
            text-transform: uppercase;

            &:focus {
              border-color: var(--color-blue);
            }
          }
        }

        > .countdown {
          color: var(--color-gray);
          font-size: 1.4rem;

          &[data-expired] {
            color: var(--color-red);
          }
        }

        > .verification-status {
          color: var(--color-red);
          font-size: 1.4rem;

          &:empty {
            display: none;
          }

          &[data-success] {
            color: var(--color-green);
          }
        }

        > .resend {
          margin-top: 0.4rem;

          &:not(:disabled) {
            color: var(--color-blue);
          }
        }
      }

      &.success {
        padding-top: 2.4rem;
        text-align: center;
        align-content: safe center;
        justify-items: center;

        > svg {
          width: 9.6rem;
          height: 9.6rem;
          fill: var(--color-green);
        }

        > h2 {
          font-size: 2.2rem;
        }

        > p {
          color: var(--color-gray);
          text-wrap: balance;
        }

        > button {
          margin-top: 0.8rem;
        }
      }
    }
  }

  > [purpose="overlay"] {
    z-index: 1;
  }

  > .\@error {
    padding-top: calc(3.2rem + 7.6rem);
    padding-bottom: 1.6rem;
  }

  @media (width <= 379px) {
    > .progress-container {
      padding-inline: 1.2rem;

      > .progress > li {
        font-size: 0.9rem;

        > button {
          padding-inline: 0.1rem;
        }
      }
    }

    > form {
      > .page {
        padding-inline: 1.2rem;

        > .paired-fields.name-fields {
          grid-template-columns: 1fr;
        }
      }
    }
  }
}
