html {
  color-scheme: light;
  background: light-dark(#fbf8f3, #1a1518);
  scroll-behavior: smooth;
}
html[data-gate-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
}

#gate-site-backgrounds .skip-link {
  position: fixed;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  padding: .7rem 1rem;
  transform: translateY(-250%);
  background: var(--gate-paper);
  color: var(--gate-ink);
}

#gate-site-backgrounds .skip-link:focus {
  transform: translateY(0);
}

#gate-site-backgrounds {
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  --gate-paper: light-dark(#fbf8f3, #1a1518);
  --gate-ink: light-dark(#221d1b, #faf1e9);
  --gate-quiet: light-dark(#6b5b55, #c6b6ad);
  --gate-line: light-dark(#dfd7cf, #463b39);
  --gate-accent: light-dark(#b52d22, #ff916f);
  --gate-tint: light-dark(#f4e5de, #422723);
  --gate-journal: light-dark(#eee7df, #262021);
  background: var(--gate-paper);
  color: var(--gate-ink);
  font: 500 15px/1.5 system-ui, sans-serif;
}
#gate-site-backgrounds::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: '';
}
#gate-site-backgrounds:has(#gate-play)::before {
  background: radial-gradient(ellipse at 94% 78%, #a7383029, transparent 64%),
              repeating-linear-gradient(110deg, transparent 0 69px, #ff987a15 70px 71px, transparent 72px 140px);
}
#gate-site-backgrounds:has(#gate-work)::before {
  --gate-grid: #92643f16;
  background: radial-gradient(ellipse at 100% 12%, #f5b68b5c, transparent 62%),
              repeating-linear-gradient(0deg, transparent 0 31px, var(--gate-grid) 31px 32px),
              repeating-linear-gradient(90deg, transparent 0 31px, var(--gate-grid) 31px 32px);
  mask-image: linear-gradient(105deg, transparent 16%, black 72%);
}

#gate-site-backgrounds *, #gate-site-backgrounds *::before, #gate-site-backgrounds *::after {
  box-sizing: border-box;
}
#gate-site-backgrounds [hidden] {
  display: none !important;
}
#gate-site-backgrounds :where(.gate-bar, #gate-play, #gate-work, .gate-end) :is(h1, h2, p, ul) {
  margin: 0;
}
#gate-site-backgrounds :where(.gate-bar, #gate-play, #gate-work, .gate-end) a {
  color: inherit;
  text-decoration: none;
}
#gate-site-backgrounds a:focus-visible {
  outline: 2px solid var(--gate-accent);
  outline-offset: 4px;
}
#gate-site-backgrounds .gate-shell {
  width: min(90%, 1110px);
  margin-inline: auto;
}

#gate-site-backgrounds .gate-bar {
  display: flex;
  min-height: 132px;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
#gate-site-backgrounds .gate-brand {
  display: block;
  width: min(336px, 100%);
}
#gate-site-backgrounds .gate-brand img {
  display: block;
  width: 100%;
  height: auto;
}
#gate-site-backgrounds .gate-bar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px clamp(17px, 3.5cqi, 38px);
}
#gate-site-backgrounds .gate-bar nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-block: 2px solid transparent;
  white-space: nowrap;
  color: var(--gate-quiet);
  font-size: 14px;
  font-weight: 800;
}
#gate-site-backgrounds .gate-bar nav a[aria-current="page"] {
  border-bottom-color: var(--gate-accent);
  color: var(--gate-ink);
}
#gate-site-backgrounds .gate-bar nav a:hover, #gate-site-backgrounds .gate-entry:hover {
  color: var(--gate-accent);
}

#gate-site-backgrounds :is(#gate-play, #gate-work) {
  position: relative;
  isolation: isolate;
  overflow: clip;
  color: var(--gate-ink);
}
#gate-site-backgrounds :is(#gate-play, #gate-work)::after {
  position: absolute;
  pointer-events: none;
  content: '';
  z-index: -1;
  aspect-ratio: 920 / 700;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

#gate-site-backgrounds #gate-play {
  --gate-ink: #fff8f2;
  --gate-quiet: #d9c7c3;
  --gate-line: #fff8f233;
  --gate-accent: #ff916f;
}
#gate-site-backgrounds #gate-play::after {
  inset-inline-end: -7%;
  bottom: -94px;
  width: min(560px, 59cqi);
  background: linear-gradient(108deg, #ff224e, #f66008);
  opacity: .17;
  mask-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjQ1IDE1MCA5MjAgNzAwIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0MC44NyAxMTAuNDgpIHNjYWxlKDEuMDgpIj4KICAgIDxwYXRoIGZpbGw9IndoaXRlIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE5IDApIiBkPSJNNTAyLjcwMSAxNjYuNDkxIEE0MyA0MyAwIDAgMSA1MzMuNDMgMTMxLjE0MSBMNzUxLjE4NyA2OC43MDEgQTUwIDUwIDAgMCAxIDgxMS45NTQgMTMzLjg2NSBMNjM4LjIzOSA2MTEuMTQyIEE2NiA2NiAwIDAgMSA1NTguMDI3IDY1Mi4wMTIgTDQ2MC45NzggNjI0LjE4MyBBMjYgMjYgMCAwIDEgNDQyLjM5OCA1OTUuNTcyIFoiIC8+CiAgICA8cGF0aCBmaWxsPSJ3aGl0ZSIgZmlsbC1ydWxlPSJldmVub2RkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTkgMCkiIGQ9Ik0xNTMuNDY3IDI3OS4yMzQgQTExNSAxMTUgMCAwIDEgMjI5LjgzNCAyMDguMDIxIEw0NTIuMTA0IDE0NC4yODYgQTE1IDE1IDAgMCAxIDQ2OS45NDIgMTY0LjgwNiBMMjgzLjA1IDU4NC41NzEgQTM1IDM1IDAgMCAxIDI2MC43MjMgNjAzLjk4IEw5MC4xMjEgNjUyLjg5OSBBNDMgNDMgMCAwIDEgMzcuODYxIDU5Ni44NTggWiIgLz4KICA8L2c+Cjwvc3ZnPg==');
}

#gate-site-backgrounds #gate-work {
  --gate-journal: light-dark(#eee6df72, #29212283);
}
#gate-site-backgrounds #gate-work::after {
  inset-inline-end: -8%;
  top: 34%;
  width: min(640px, 67cqi);
  background: light-dark(#ad593833, #fcb09537);
  mask-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjQ1IDE1MCA5MjAgNzAwIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0MC44NyAxMTAuNDgpIHNjYWxlKDEuMDgpIj4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTkgMCkiIGQ9Ik01MDIuNzAxIDE2Ni40OTEgQTQzIDQzIDAgMCAxIDUzMy40MyAxMzEuMTQxIEw3NTEuMTg3IDY4LjcwMSBBNTAgNTAgMCAwIDEgODExLjk1NCAxMzMuODY1IEw2MzguMjM5IDYxMS4xNDIgQTY2IDY2IDAgMCAxIDU1OC4wMjcgNjUyLjAxMiBMNDYwLjk3OCA2MjQuMTgzIEEyNiAyNiAwIDAgMSA0NDIuMzk4IDU5NS41NzIgWiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSI1LjUiIC8+CiAgICA8cGF0aCBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOSAwKSIgZD0iTTE1My40NjcgMjc5LjIzNCBBMTE1IDExNSAwIDAgMSAyMjkuODM0IDIwOC4wMjEgTDQ1Mi4xMDQgMTQ0LjI4NiBBMTUgMTUgMCAwIDEgNDY5Ljk0MiAxNjQuODA2IEwyODMuMDUgNTg0LjU3MSBBMzUgMzUgMCAwIDEgMjYwLjcyMyA2MDMuOTggTDkwLjEyMSA2NTIuODk5IEE0MyA0MyAwIDAgMSAzNy44NjEgNTk2Ljg1OCBaIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjUuNSIgLz4KICA8L2c+Cjwvc3ZnPg==');
}

#gate-site-backgrounds .gate-play-cover {
  position: relative;
  isolation: isolate;
}
#gate-site-backgrounds .gate-hero {
  display: flex;
  min-height: clamp(312px, 37cqi, 445px);
  align-items: center;
  padding-block: clamp(30px, 5cqi, 58px);
}
#gate-site-backgrounds .gate-intro {
  width: min(100%, 46cqi, 460px);
}
#gate-site-backgrounds :is(#gate-play, #gate-work) h1 {
  font-size: clamp(38px, 6.5cqi, 76px);
  font-weight: 800;
  line-height: .99;
  letter-spacing: -.075em;
}
#gate-site-backgrounds .gate-intro h1 > span:first-child {
  display: block;
}
#gate-site-backgrounds .gate-period {
  color: var(--gate-accent);
}
#gate-site-backgrounds .gate-intro p, #gate-site-backgrounds .gate-work-intro p {
  max-width: 33ch;
  margin-top: 17px;
  color: var(--gate-quiet);
  font-size: clamp(15px, 1.9cqi, 19px);
}
#gate-site-backgrounds .gate-server-link, #gate-site-backgrounds .gate-entry {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  width: fit-content;
  font-size: 14px;
  font-weight: 800;
}
#gate-site-backgrounds .gate-server-link {
  margin-top: 15px;
  color: var(--gate-accent);
  text-decoration: underline;
  text-underline-offset: .26em;
}
#gate-site-backgrounds .gate-play-photo {
  --gate-photo-vertical: linear-gradient(to bottom, transparent 2%, #0009 13%, black 24% 42%, #0009 66%, #0003 83%, transparent 98%);
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  display: block;
  width: 71%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 53%;
  mask-image: var(--gate-photo-vertical);
}
@supports (mask-composite: intersect) {
  #gate-site-backgrounds .gate-play-photo {
    mask-image: var(--gate-photo-vertical),
                linear-gradient(to right, transparent 16%, #0002 31%, #0009 57%, black 82%);
    mask-composite: intersect;
  }
}
@supports not (mask-composite: intersect) {
  #gate-site-backgrounds .gate-play-cover::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(to right, #1a1518 42%, transparent 83%);
    pointer-events: none;
    content: '';
  }
}

#gate-site-backgrounds :is(#gate-play, #gate-work) h2 {
  font-size: clamp(27px, 4cqi, 42px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.055em;
}
#gate-site-backgrounds .gate-game-index {
  padding-block: clamp(34px, 5cqi, 62px);
}
#gate-site-backgrounds .gate-server-table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  text-align: left;
}
#gate-site-backgrounds .gate-server-table th, #gate-site-backgrounds .gate-server-table td {
  border-block: 1px solid var(--gate-line);
  padding: 12px 8px 12px 0;
}
#gate-site-backgrounds .gate-server-table th {
  font-size: 13px;
  font-weight: 800;
}
#gate-site-backgrounds .gate-server-table td {
  color: var(--gate-quiet);
}

#gate-site-backgrounds .gate-work-cover {
  border-block-end: 1px solid var(--gate-line);
}
#gate-site-backgrounds .gate-work-intro {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(18px, 5cqi, 54px);
  padding-block: clamp(28px, 4.6cqi, 58px);
}
#gate-site-backgrounds .gate-work-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.61;
  object-fit: cover;
  object-position: center 56%;
  border: 1px solid var(--gate-line);
  border-radius: 4px;
  box-shadow: 0 12px 28px #34251a18;
}
#gate-site-backgrounds .gate-work-intro p {
  max-width: 47ch;
}
#gate-site-backgrounds .gate-entry {
  margin-top: 10px;
  color: var(--gate-accent);
}
#gate-site-backgrounds .gate-work-directory {
  padding-block: clamp(25px, 4cqi, 44px) clamp(38px, 6.2cqi, 70px);
}
#gate-site-backgrounds .gate-directory, #gate-site-backgrounds .gate-articles {
  list-style: none;
  padding: 0;
}
#gate-site-backgrounds .gate-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(16px, 4cqi, 50px);
}
#gate-site-backgrounds .gate-directory li, #gate-site-backgrounds .gate-articles li {
  border-top: 1px solid var(--gate-line);
}
#gate-site-backgrounds .gate-directory li:nth-last-child(-n+2), #gate-site-backgrounds .gate-articles li:last-child {
  border-bottom: 1px solid var(--gate-line);
}
#gate-site-backgrounds .gate-service {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 4px 12px 0;
}
#gate-site-backgrounds .gate-service:hover, #gate-site-backgrounds .gate-articles a:hover {
  color: var(--gate-accent);
}
#gate-site-backgrounds .gate-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: var(--gate-tint);
  color: var(--gate-accent);
  border-radius: 4px;
}
#gate-site-backgrounds .gate-service strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
}
#gate-site-backgrounds .gate-service small {
  display: block;
  margin-top: 2px;
  color: var(--gate-quiet);
  font-size: 13px;
  line-height: 1.35;
}
#gate-site-backgrounds .gate-service > svg, #gate-site-backgrounds .gate-articles a > svg {
  color: var(--gate-accent);
}
#gate-site-backgrounds .gate-journal {
  background: var(--gate-journal);
}
#gate-site-backgrounds .gate-journal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
  gap: 24px 36px;
  padding-block: clamp(32px, 5.5cqi, 62px);
}
#gate-site-backgrounds .gate-articles a {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 4px 9px 0;
  gap: 12px;
  font-weight: 750;
}
#gate-site-backgrounds .gate-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px;
  border-top: 1px solid var(--gate-line);
  color: var(--gate-quiet);
  font-size: 13px;
  font-weight: 750;
}
#gate-site-backgrounds .gate-footer a:hover {
  text-decoration: underline;
}
#gate-site-backgrounds .gate-end {
  background: light-dark(#f7f1ea, #211b1e);
}
#gate-site-backgrounds:has(#gate-play) .gate-end {
  --gate-line: #fff8f233;
  --gate-quiet: #d9c7c3;
  background: #1a1518;
}
#gate-site-backgrounds [data-lucide], #gate-site-backgrounds .lucide {
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
}
#gate-site-backgrounds .gate-icon .lucide {
  width: 18px;
  height: 18px;
}

@container (max-width: 660px) {
  #gate-site-backgrounds .gate-bar {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    padding-block: 17px 9px;
  }
  #gate-site-backgrounds .gate-brand {
    width: min(228px, 100%);
  }
  #gate-site-backgrounds .gate-play-cover {
    --gate-mobile-art: clamp(209px, 48cqi, 290px);
  }
  #gate-site-backgrounds .gate-hero {
    min-height: 0;
    padding-block: 26px calc(var(--gate-mobile-art) - 24px);
  }
  #gate-site-backgrounds .gate-intro {
    width: min(100%, 460px);
  }
  #gate-site-backgrounds .gate-play-photo {
    inset: auto 0 0;
    width: 100%;
    height: var(--gate-mobile-art);
    object-position: 53% 63%;
    mask-image: linear-gradient(to bottom, transparent 13%, #0009 33%, black 47% 65%, #0007 85%, transparent 98%);
    mask-composite: add;
  }
  #gate-site-backgrounds .gate-play-cover::before {
    content: none;
  }
  #gate-site-backgrounds #gate-play::after {
    bottom: -63px;
    width: 84cqi;
  }
  #gate-site-backgrounds #gate-work::after {
    top: 55%;
    width: 88cqi;
  }
  #gate-site-backgrounds .gate-work-intro {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 16px;
  }
  #gate-site-backgrounds .gate-work-photo {
    aspect-ratio: 1.69;
  }
  #gate-site-backgrounds :is(#gate-play, #gate-work) h1 {
    font-size: clamp(34px, 8.4cqi, 56px);
  }
  #gate-site-backgrounds .gate-intro p, #gate-site-backgrounds .gate-work-intro p {
    margin-top: 13px;
  }
}
@container (max-width: 490px) {
  #gate-site-backgrounds .gate-bar nav {
    gap: 0 13px;
  }
  #gate-site-backgrounds .gate-bar nav a {
    font-size: 13px;
  }
  #gate-site-backgrounds .gate-directory, #gate-site-backgrounds .gate-journal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  #gate-site-backgrounds .gate-directory li:nth-last-child(2) {
    border-bottom: 0;
  }
  #gate-site-backgrounds .gate-service {
    min-height: 64px;
  }
}

/* Bludit articles and utility pages. */
#gate-site-backgrounds .container {
  width: min(76rem, 100% - 5rem);
  margin-inline: auto;
}

#gate-site-backgrounds .reading,
#gate-site-backgrounds .not-found {
  font: 1rem/1.6 system-ui, sans-serif;
}

#gate-site-backgrounds .reading-width {
  max-width: 47rem;
}

#gate-site-backgrounds :is(.article-header, .not-found) h1 {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(2.6rem, 5.1vw, 5.2rem);
  font-weight: 670;
  line-height: 1.015;
  letter-spacing: -.064em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

#gate-site-backgrounds .article-header {
  padding-block: clamp(2.75rem, 7vw, 5rem);
  color: #fff8f2;
  background: #191417;
}

#gate-site-backgrounds .eyebrow {
  margin: 0 0 .85rem;
  color: var(--gate-accent);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .09em;
  text-transform: uppercase;
}

#gate-site-backgrounds .article-header .eyebrow,
#gate-site-backgrounds .article-header .back-link {
  color: #ff916f;
}

#gate-site-backgrounds .article-header a:focus-visible {
  outline-color: #ff916f;
}

#gate-site-backgrounds .article-deck {
  max-width: 32rem;
  margin: 1.3rem 0 0;
  color: #dccdcf;
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
}

#gate-site-backgrounds .back-link {
  display: inline-flex;
  gap: .55rem;
  margin-bottom: 1.65rem;
  color: var(--gate-accent);
  text-underline-offset: .22em;
}

#gate-site-backgrounds :is(.article-content, .not-found) {
  padding-block: clamp(2.5rem, 5vw, 5rem);
}

#gate-site-backgrounds .article-content {
  max-width: 43rem;
  font-size: 1.12rem;
  overflow-wrap: break-word;
}

#gate-site-backgrounds .article-content > :first-child {
  margin-top: 0;
}

#gate-site-backgrounds .article-content :is(h2, h3) {
  margin: 1.6em 0 .55em;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 670;
  line-height: 1.22;
  letter-spacing: -.03em;
}

#gate-site-backgrounds .article-content h2 {
  font-size: 1.7rem;
}

#gate-site-backgrounds .article-content :is(img, video) {
  display: block;
  max-width: 100%;
  height: auto;
}

#gate-site-backgrounds .article-content pre {
  overflow: auto;
  padding: 1rem;
  border-radius: .35rem;
  background: var(--gate-tint);
}

#gate-site-backgrounds .article-content blockquote {
  margin-inline: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--gate-accent);
  color: var(--gate-quiet);
}

#gate-site-backgrounds .article-content a {
  color: var(--gate-accent);
  text-underline-offset: .22em;
}

#gate-site-backgrounds .not-found .back-link {
  margin-top: 1.5rem;
}

#gate-site-backgrounds .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.5rem;
  margin-top: 1.5rem;
}

#gate-site-backgrounds .pagination a,
#gate-site-backgrounds .empty {
  color: var(--gate-quiet);
}

#gate-site-backgrounds .pagination a:hover {
  color: var(--gate-accent);
  text-decoration: underline;
}

@media (max-width: 45rem) {
  #gate-site-backgrounds .container {
    width: calc(100% - 2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
