html {
  --primary: oklch(0.8774 0.1459 94.91);
  --secondary: oklch(0.8774 0.1459 335.6);
  --tertiary: oklch(0.8774 0.1459 187.78);
  --background: #222;
  --foreground: #eee;
  --placeholder: #aaa;
  margin: 0;
  padding: 8px;
  background: var(--background);
  color: var(--foreground);
  font-family: sans-serif;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  align-items: center;

  @media only screen and (min-width: 700px) {
    padding: 16px;
  }
}

body {
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 16px;
  width: 100%;
  max-width: 1200px;

  .title {
    align-self: start;
    display: flex;

    img {
      cursor: pointer;
      max-width: 100%;
    }
  }

  .subtitle {
    margin: 0;
    font-weight: 200;
    align-self: start;
    font-size: 20px;
    letter-spacing: 0.1px;

    @media only screen and (min-width: 700px) {
      font-size: 24px;
      letter-spacing: 0.2px;
    }
  }
}

*::selection {
  background-color: var(--tertiary);
  color: var(--background);
}

x-search {
  form {
    display: flex;
    flex-direction: row;
    gap: 8px;

    div {
      flex: 1;
      display: flex;
      flex-direction: row;
      border: 2px solid var(--foreground);
      background: var(--background);
      gap: 8px;
      padding: 0 8px;
      align-items: center;

      &:focus-within {
        outline: 1px solid var(--tertiary);
        outline-offset: 0;
      }

      input {
        font-family: sans-serif;
        padding: 8px 0;
        flex: 1;
        border-radius: 0;
        background: none;
        border: none;
        font-size: 16px;
        color: var(--foreground);
      }

      input:focus {
        outline: none;
      }

      svg {
        color: var(--placeholder);
      }
    }

    button {
      text-transform: uppercase;
      border-radius: 0;
      border: 2px solid var(--foreground);
      background: var(--background);
      color: var(--foreground);
      font-size: 16px;
      padding: 8px;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
    }

    button:focus {
      outline: 1px solid var(--tertiary);
      outline-offset: 0;
    }

    button:active {
      background-color: var(--foreground);
    }
  }
}

x-mosaic {
  display: flex;
  flex-direction: row;
  gap: 8px;

  div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  a {
    width: 100%;
    /* display: block on a and the child img prevents weird padding */
    display: block;
  }

  img {
    /* display: block on a and the child img prevents weird padding */
    display: block;
    width: 100%;
    /* Need height: auto so element has correct size before resource has loaded */
    height: auto;
    cursor: pointer;
  }
}
