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

  :focus-visible {
    outline-offset: 3px;
  }

  html {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
  }

  html {
    line-height: 1.5;
  }

  html {
    scrollbar-gutter: stable;
  }

  h1 {
    font-size: 2em;
    margin-block: .67em;
  }

  abbr[title] {
    cursor: help;
    text-decoration-line: underline;
    text-decoration-style: dotted;
  }

  @media (forced-colors: active) {
    mark {
      color: highlighttext;
      background-color: highlight;
    }
  }

  audio, iframe, img, svg, video {
    max-block-size: 100%;
    max-inline-size: 100%;
  }

  fieldset {
    min-inline-size: 0;
  }

  label:has( + :where(input:not([type="radio"], [type="checkbox"]), select, textarea)) {
    display: block;
  }

  textarea:not([rows]) {
    min-block-size: 6em;
  }

  button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
  }

  [type="search"] {
    -webkit-appearance: textfield;
  }

  @supports (-webkit-touch-callout: none) {
    [type="search"] {
      border: 1px solid -apple-system-secondary-label;
      background-color: canvas;
    }
  }

  input:where([type="tel"], [type="url"], [type="email"], [type="number"]):not(:placeholder-shown) {
    direction: ltr;
  }

  table {
    border-collapse: collapse;
    border: 1px solid;
  }

  th, td {
    border: 1px solid;
    padding: .25em .5em;
    vertical-align: top;
  }

  dialog::backdrop {
    background: oklch(0% 0 0 / .3);
  }

  dialog, [popover], dialog::backdrop {
    opacity: 0;
    transition: opacity .15s ease-out, display .15s allow-discrete,
            overlay .15s allow-discrete;
  }

  dialog[open], :popover-open, dialog[open]::backdrop {
    opacity: 1;
  }

  @starting-style {
    dialog[open], :popover-open, dialog[open]::backdrop {
      opacity: 0;
    }
  }

  [hidden]:not([hidden="until-found"]) {
    display: none !important;
  }

  img {
    display: block;
  }

  summary {
    cursor: default;
  }

  iframe {
    border: none;
  }

  @supports (position-area: end) {
    [popover] {
      margin: 0;
      position-area: end span-end;
      position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    }
  }
}

@layer {
  :root {
    --bg_dim: #1e2326;
    --bg0: #272e33;
    --bg1: #2e383c;
    --bg2: #374145;
    --bg3: #414b50;
    --bg4: #495156;
    --bg5: #4f5b58;
    --bg_visual: #4c3743;
    --bg_red: #493b40;
    --bg_green: #3c4841;
    --bg_blue: #384b55;
    --bg_yellow: #45443c;
    --fg: #d3c6aa;
    --red: #e67e80;
    --orange: #e69875;
    --yellow: #dbbc7f;
    --green: #a7c080;
    --aqua: #83c092;
    --blue: #7fbbb3;
    --purple: #d699b6;
    --grey0: #7a8478;
    --grey1: #859289;
    --grey2: #9da9a0;
    --statusline1: #a7c080;
    --statusline2: #d3c6aa;
    --statusline3: #e67e80;
  }

  body {
    background-color: var(--bg0);
    color: var(--fg);
  }

  hr {
    border: 0;
    border-bottom: 1px solid var(--fg);
  }

  a {
    color: var(--blue);
  }

  a:visited {
    color: var(--purple);
  }
}

body {
  max-width: 28rem;
  margin: 0 auto;
}

asset-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 8em);
  gap: 1em;

  & article {
    display: grid;
    border: 1px solid var(--fg);
    border-radius: 8px;
    text-align: center;
    overflow: clip;
    color: var(--fg);

    & a {
      color: var(--fg);
      text-decoration: none;
    }

    & picture {
      display: block;
      aspect-ratio: 1;

      & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-bottom: 1px solid var(--fg);
      }
    }
  }
}

.tag-list {
  display: inline-flex;
  gap: .5em;
  margin: 0;
  padding: 0;

  & .tag {
    display: block;
    border: 1px solid var(--fg);
    border-radius: 4px;
    padding: 0 .2em;
  }
}

article.full-art {
  & img {
    border: 1px solid var(--fg);
    margin: 1em 0;
  }

  margin: 1em;
}

.alt-media {
  display: flex;
  flex-direction: column;
}

img.aliased {
  image-rendering: pixelated;
}
