#game-market-documents-view {
  width: 100%;
  max-width: 64rem;
  height: 100%;
  max-height: min(min(80dvh, 100lvh - 0.8rem), 78rem);

  &[shown] {
    transition: none;
  }

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


  > main {
    padding-block: 3.2rem;
    padding-inline: 1.6rem;
    display: grid;
    align-content: start;
    gap: 1.6rem;


    > h1 {
      display: none;
    }


    > h2 {
      position: sticky;
      top: -3.2rem;
      padding-block: 0.8rem;
      background: white;
      font-size: 1.8rem;
      font-weight: 600;
      line-height: 1.3;
      display: flex;
      align-items: center;
      gap: 0.8rem;


      > svg {
        aspect-ratio: 1 / 1;
        width: 3.2rem;
        height: auto;
        fill: currentColor;
        flex-shrink: 0;
      }
    }


    > p {
      line-height: 1.8;
      word-break: normal;
      overflow-wrap: break-word;
      hyphens: auto;

      &:first-of-type {
        margin-bottom: 0.8rem;
        font-size: 1.7rem;
      }

      &:not(:first-of-type) {
        padding-left: 4rem;
      }

      &:has(+ hr) {
        margin-bottom: 0.8rem;
      }
    }


    > ul {
      margin: 0;
      padding-left: 4rem;
      list-style: disc;
      display: grid;
      gap: 0.8rem;

      &:has(+ hr) {
        padding-bottom: 0.8rem;
      }


      > li {
        line-height: 1.8;
        word-break: normal;
        overflow-wrap: break-word;
        hyphens: auto;


        b {
          &:has(+ br) {
            line-height: 1.8
          }
        }
      }
    }


    > pre {
      width: 100%;
      white-space: pre-wrap;
      word-break: normal;
      overflow-wrap: break-word;
      hyphens: auto;
      font-family: ui-monospace, "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
      font-size: 1.3rem;
    }


    > hr {
      justify-self: center;
      border: none;
      border-radius: 100vmax;
      width: 100%;
      height: 0.4rem;
      background: var(--toolbar-background-color);
    }
  }
}
