@layer reset, base;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html,
  body {
    margin: 0;
    padding: 0;
    height: 100%;
    -webkit-text-size-adjust: 100%;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  ul,
  ol,
  figure,
  blockquote {
    margin: 0;
  }

  ul,
  ol {
    padding: 0;
    list-style: none;
  }

  button,
  input {
    font: inherit;
    color: inherit;
  }

  button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  img,
  video {
    display: block;
    max-width: 100%;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

@layer base {
  body {
    font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: 100dvh;
  }

  @media (min-width: 431px) {
    body {
      background-color: #eef0f3;
    }

    #app-shell {
      box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
    }
  }

  #app-shell {
    position: relative;
    width: 100%;
    max-width: 390px;
    height: 100dvh;
    margin-inline: auto;
    background-color: #ffffff;
    overflow: hidden;
  }

  .view {
    position: absolute;
    inset: 0;
    display: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .view::-webkit-scrollbar,
  .no-scrollbar::-webkit-scrollbar {
    display: none;
  }

  .no-scrollbar {
    scrollbar-width: none;
  }

  .view.active {
    display: block;
  }

  dialog:modal {
    overscroll-behavior: contain;
  }

  dialog::backdrop {
    overflow: hidden;
    overscroll-behavior: contain;
  }
}
