/* CyberDjinn */

/* 1. Design tokens */

:root {
  color-scheme: dark;

  --cd-black: #000000;
  --cd-primary: #82b1ad;
  --cd-light: #d7eeee;
  --cd-status: #b9d8d4;
  --cd-muted: #6f9894;
  --cd-gold: #d8c983;
  --cd-panel: #050909;

  /* rgb channels for alpha variants */
  --cd-rgb: 130 177 173;
  --cd-gold-rgb: 190 172 95;
  --cd-light-rgb: 215 238 238;

  --cd-line: rgb(var(--cd-rgb) / .42);
  --cd-grid-line: rgb(var(--cd-rgb) / .026);
  --cd-grid:
    linear-gradient(var(--cd-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--cd-grid-line) 1px, transparent 1px);

  --cd-font: Verdana, Arial, sans-serif;
  --cd-font-retro: "Sixtyfour", Verdana, Arial, sans-serif;
  --cd-content: 1120px;
  --cd-gutter: 10px;

  /* outer frame */
  --cd-frame:
    inset 0 0 0 1px rgb(var(--cd-rgb) / .07),
    0 0 0 2px var(--cd-black),
    0 0 0 3px rgb(var(--cd-rgb) / .11);
  --cd-frame-wide:
    0 0 0 1px rgb(var(--cd-rgb) / .14),
    0 0 0 3px var(--cd-black),
    0 0 0 4px rgb(var(--cd-rgb) / .13),
    inset 0 0 0 1px rgb(var(--cd-rgb) / .08),
    inset 0 0 22px rgb(var(--cd-rgb) / .045);

  /* raised surface */
  --cd-chip-bg: linear-gradient(to bottom, rgb(var(--cd-rgb) / .13), rgb(10 18 18 / .96)), var(--cd-panel);
  --cd-chip-shadow: inset 0 1px 0 rgb(255 255 255 / .08), inset 0 -1px 0 rgb(0 0 0 / .85), 0 0 0 1px var(--cd-black);

  /* button surface */
  --cd-button-bg: linear-gradient(to bottom, rgb(var(--cd-rgb) / .18), rgb(23 42 41 / .96)), #102020;
  --cd-button-bg-hover: linear-gradient(to bottom, rgb(var(--cd-rgb) / .26), rgb(28 55 53 / .96)), #132929;
  --cd-button-shadow:
    inset 0 1px 0 rgb(255 255 255 / .10),
    inset 0 -1px 0 rgb(0 0 0 / .85),
    0 0 0 2px var(--cd-black),
    0 0 0 3px rgb(var(--cd-rgb) / .16);
  --cd-button-shadow-hover:
    inset 0 1px 0 rgb(255 255 255 / .14),
    inset 0 -1px 0 rgb(0 0 0 / .85),
    0 0 0 2px var(--cd-black),
    0 0 0 3px rgb(var(--cd-rgb) / .30),
    0 0 12px rgb(var(--cd-rgb) / .18);

  /* game preview defaults */
  --preview-brightness: 1;
  --preview-contrast: 1.04;
  --preview-saturation: .9;
  --preview-position-x: 50%;
  --preview-position-y: 50%;
}

@media (min-width: 768px) {
  :root {
    --cd-gutter: 16px;
  }
}

/* 2. Reset and base */

/* Sixtyfour, SIL OFL 1.1, see assets/fonts/OFL.txt */
@font-face {
  font-family: "Sixtyfour";
  src: url("/assets/fonts/sixtyfour-caps.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--cd-black);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  background: var(--cd-black);
  color: var(--cd-primary);
  font-family: var(--cd-font);
  font-size: 14px;
  line-height: 1.7;
}

img,
picture {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

a {
  color: inherit;
}

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--cd-light);
  outline-offset: 3px;
}

::selection {
  background: rgb(var(--cd-rgb) / .35);
  color: #ffffff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -200px;
  left: 10px;
  z-index: 100;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--cd-light);
  text-decoration: none;
  background: var(--cd-panel);
  border: 1px solid var(--cd-line);
}

.skip-link:focus {
  top: 10px;
}

.wrap {
  width: min(var(--cd-content), 100% - 2 * var(--cd-gutter));
  margin-inline: auto;
}

/* header and footer rule */
.site-header::after,
.site-footer::before {
  content: "";
  display: block;
  width: min(var(--cd-content), 100% - 2 * var(--cd-gutter));
  height: 1px;
  margin-inline: auto;
  background: var(--cd-line);
  box-shadow: 0 0 8px rgb(var(--cd-rgb) / .12);
}

/* 3. Header */

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 28px;
  padding-block: 12px 2px;
}

.site-brand {
  display: inline-block;
  line-height: 0;
}

.site-brand img {
  width: 180px;
}

.site-nav-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 22px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cd-primary);
  text-shadow: 1px 1px 0 var(--cd-black);
  transition: color .16s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--cd-light);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

@media (min-width: 600px) {
  .site-brand img {
    width: 225px;
  }
}

@media (min-width: 768px) {
  .site-header-inner {
    padding-block: 14px;
  }
}

@media (min-width: 922px) {
  .site-brand img {
    width: 280px;
  }
}

/* 4. Page layout */

.site-main {
  padding-top: 30px;
}

/* retro titles */
.retro-title {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding-left: .08em; /* offset for the trailing letter-spacing */
  font-family: var(--cd-font-retro);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
  color: var(--cd-primary);
  text-shadow: 0 0 2px rgb(var(--cd-rgb) / .16), 0 0 6px rgb(var(--cd-rgb) / .08);
}

/* page claim */
.page-claim {
  margin-block: 24px 26px;
  font-size: clamp(12px, calc((100vw - 40px) / 25), 26px);
  color: var(--cd-light);
  text-shadow: 0 0 3px rgb(var(--cd-rgb) / .35), 0 0 10px rgb(var(--cd-rgb) / .16);
}

.section-title {
  margin-bottom: 22px;
  font-size: clamp(12px, 1.1vw, 22px);
}

/* glitch copies */
.retro-title::before,
.retro-title::after {
  content: attr(data-text) / "";
  position: absolute;
  inset: 0;
  padding-left: inherit;
  opacity: 0;
  pointer-events: none;
}

.retro-title::before {
  color: rgb(160 205 201 / .35);
  clip-path: inset(0 0 55% 0);
}

.retro-title::after {
  color: rgb(96 145 141 / .28);
  clip-path: inset(60% 0 0 0);
}

/* desktop only */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .retro-title {
    animation: title-burst 9.2s steps(1, end) infinite;
  }

  .retro-title::before {
    animation: title-slice-a 9.2s steps(1, end) infinite;
  }

  .retro-title::after {
    animation: title-slice-b 9.2s steps(1, end) infinite;
  }

  .page-claim,
  .page-claim::before,
  .page-claim::after {
    animation-duration: 10.6s;
  }

  .about .retro-title,
  .about .retro-title::before,
  .about .retro-title::after {
    animation-duration: 11.8s;
  }
}

@keyframes title-burst {
  0%, 71.6%, 100% { transform: none; }
  70% { transform: translateX(2px); }
  70.5% { transform: translateX(-2px); }
  71% { transform: translateX(1px); }
}

@keyframes title-slice-a {
  0%, 71.6%, 100% { opacity: 0; transform: translate(2px, 0); }
  70% { opacity: 1; transform: translate(3px, -1px); }
  70.8% { opacity: 1; transform: translate(1px, 1px); }
}

@keyframes title-slice-b {
  0%, 71.6%, 100% { opacity: 0; transform: translate(-2px, 0); }
  70% { opacity: 1; transform: translate(-3px, 1px); }
  70.8% { opacity: 1; transform: translate(-1px, -1px); }
}

@media (min-width: 768px) {
  .site-main {
    padding-top: 56px;
  }

  .page-claim {
    margin-block: 30px 32px;
  }

  .section-title {
    margin-bottom: 26px;
  }
}

/* Error page */
.error-page {
  display: flex;
  flex-direction: column;
}

.error-page .site-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding-block: 30px 60px;
}

.error-message {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.error-message .index-text {
  flex: 1 1 240px;
}

/* 5. Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 56 / 13;
  margin-bottom: 24px;
  background: var(--cd-black);
  border: 1px solid rgb(var(--cd-rgb) / .34);
  box-shadow: var(--cd-frame);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: contrast(1.05) brightness(1.12) saturate(.98);
  transform: scale(1.012);
}

.hero-vignette,
.hero-noise,
.hero-scanlines,
.hero-scanbeam,
.hero-glitch {
  position: absolute;
  pointer-events: none;
}

.hero-vignette {
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(circle at center, rgb(0 0 0 / 0) 52%, rgb(0 0 0 / .16) 100%),
    linear-gradient(to bottom, rgb(0 0 0 / .03), rgb(0 0 0 / 0) 38%, rgb(0 0 0 / .18) 100%),
    linear-gradient(to right, rgb(0 0 0 / .08), rgb(0 0 0 / 0) 18%, rgb(0 0 0 / 0) 82%, rgb(0 0 0 / .08));
  box-shadow:
    inset 0 0 0 1px rgb(215 238 238 / .022),
    inset 0 14px 34px rgb(0 0 0 / .10),
    inset 0 -22px 44px rgb(0 0 0 / .18),
    inset 24px 0 42px rgb(0 0 0 / .08),
    inset -24px 0 42px rgb(0 0 0 / .08);
}

.hero-noise {
  inset: -4px;
  z-index: 4;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.04' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.82'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

.hero-scanlines {
  inset: 0;
  z-index: 5;
  opacity: .12;
  background: repeating-linear-gradient(to bottom, rgb(var(--cd-rgb) / .042) 0 1px, rgb(0 0 0 / 0) 1px 4px);
}

.hero-scanbeam {
  top: -16%;
  right: 0;
  left: 0;
  z-index: 6;
  height: 9%;
  opacity: 0;
  background: linear-gradient(to bottom, transparent, rgb(var(--cd-rgb) / .10), rgb(215 238 238 / .08), transparent);
  filter: blur(.45px);
}

.hero-glitch {
  z-index: 7;
  height: 2px;
  opacity: 0;
  background: linear-gradient(to right, transparent 0%, rgb(var(--cd-rgb) / 0) 8%, rgb(var(--cd-rgb) / .18) 26%, rgb(215 238 238 / .24) 48%, rgb(var(--cd-rgb) / .16) 72%, transparent 100%);
  box-shadow: 0 0 6px rgb(var(--cd-rgb) / .18), 0 0 12px rgb(var(--cd-rgb) / .10);
  filter: blur(.12px);
}

.hero-glitch-1 {
  top: 37%;
  left: 11%;
  width: 54%;
}

.hero-glitch-2 {
  top: 66%;
  left: 46%;
  width: 42%;
}

/* mobile: no motion */
.hero-scanbeam,
.hero-glitch {
  display: none;
}

@media (min-width: 768px) {
  .hero {
    margin-bottom: 34px;
    border-color: var(--cd-line);
    box-shadow: var(--cd-frame-wide);
  }

  .hero-image {
    filter: contrast(1.05) brightness(1.03) saturate(.98);
    transform: scale(1.025);
    transition: filter .6s ease;
  }

  .hero:hover .hero-image {
    filter: contrast(1.07) brightness(1.06) saturate(1);
  }

  .hero-vignette {
    background:
      radial-gradient(circle at center, rgb(0 0 0 / 0) 45%, rgb(0 0 0 / .24) 100%),
      linear-gradient(to bottom, rgb(0 0 0 / .08), rgb(0 0 0 / 0) 36%, rgb(0 0 0 / .30) 100%),
      linear-gradient(to right, rgb(0 0 0 / .26), rgb(0 0 0 / 0) 18%, rgb(0 0 0 / 0) 82%, rgb(0 0 0 / .26));
    box-shadow:
      inset 0 0 0 1px rgb(215 238 238 / .03),
      inset 0 24px 54px rgb(0 0 0 / .18),
      inset 0 -38px 64px rgb(0 0 0 / .32),
      inset 54px 0 72px rgb(0 0 0 / .16),
      inset -54px 0 72px rgb(0 0 0 / .16);
  }

  .hero-noise {
    opacity: .06;
  }

  .hero-scanlines {
    opacity: .20;
  }

  .hero-scanbeam,
  .hero-glitch {
    display: block;
  }

  .hero-glitch-1 {
    height: 3px;
  }
}

@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .hero-image {
    animation: hero-drift 24s ease-in-out infinite;
  }

  .hero-noise {
    animation: hero-noise .7s steps(2, end) infinite;
  }

  .hero-scanbeam {
    animation: hero-scanbeam 8.8s ease-in-out infinite;
  }

  .hero-glitch-1 {
    animation: hero-glitch-1 9.4s steps(1, end) infinite;
  }

  .hero-glitch-2 {
    animation: hero-glitch-2 11.6s steps(1, end) infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image {
    transform: scale(1.02);
  }

  .hero-scanbeam,
  .hero-glitch {
    display: none;
  }
}

@keyframes hero-drift {
  0%, 100% { transform: scale(1.025) translate3d(0, 0, 0); }
  32% { transform: scale(1.04) translate3d(-7px, -3px, 0); }
  66% { transform: scale(1.035) translate3d(7px, 3px, 0); }
}

@keyframes hero-noise {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-2px, 1px, 0); }
  50% { transform: translate3d(2px, -1px, 0); }
  75% { transform: translate3d(-1px, -2px, 0); }
  100% { transform: translate3d(1px, 2px, 0); }
}

@keyframes hero-scanbeam {
  0%, 42%, 100% { opacity: 0; transform: translateY(0); }
  45% { opacity: .22; }
  52% { opacity: .12; }
  61% { opacity: 0; transform: translateY(1320%); }
}

@keyframes hero-glitch-1 {
  0%, 16%, 18.4%, 100% { opacity: 0; transform: translate3d(0, 0, 0) scaleX(1); }
  16.3% { opacity: .36; transform: translate3d(-7px, 0, 0) scaleX(1.08); }
  16.9% { opacity: .16; transform: translate3d(5px, 1px, 0) scaleX(.96); }
  17.6% { opacity: .28; transform: translate3d(-4px, -1px, 0) scaleX(1.04); }
}

@keyframes hero-glitch-2 {
  0%, 68%, 70.5%, 100% { opacity: 0; transform: translate3d(0, 0, 0) scaleX(1); }
  68.4% { opacity: .30; transform: translate3d(6px, 0, 0) scaleX(1.08); }
  69.1% { opacity: .14; transform: translate3d(-5px, 1px, 0) scaleX(.95); }
  69.8% { opacity: .24; transform: translate3d(4px, -1px, 0) scaleX(1.04); }
}

/* 6. Site updates / game index box */

.index-box {
  container-type: inline-size;
  position: relative;
  margin-bottom: 30px;
  padding: 11px 12px;
  overflow: hidden;
  background: var(--cd-grid), var(--cd-black);
  background-size: 6px 6px, 6px 6px, auto;
  border: 1px solid rgb(var(--cd-rgb) / .38);
  box-shadow:
    0 0 0 1px rgb(var(--cd-rgb) / .12),
    0 0 0 3px var(--cd-black),
    0 0 0 4px rgb(var(--cd-rgb) / .10),
    inset 0 0 0 1px rgb(var(--cd-rgb) / .07),
    inset 0 0 18px rgb(var(--cd-rgb) / .035);
}

.index-row + .index-row,
.index-rows + .index-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgb(var(--cd-rgb) / .16);
}

.index-label {
  display: flex;
  margin-bottom: 8px;
}

.index-label-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cd-light);
  text-shadow: 1px 1px 0 var(--cd-black);
  background: var(--cd-chip-bg);
  border: 1px solid rgb(var(--cd-rgb) / .40);
  box-shadow: var(--cd-chip-shadow);
}

.index-content {
  min-width: 0;
}

.index-text {
  font-size: 12px;
  line-height: 1.5;
}

/* game index */
.index-nav {
  display: none;
  margin-top: 10px;
}

.index-list {
  columns: 2;
  column-gap: 28px;
}

.index-entry {
  break-inside: avoid;
}

.index-entry a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-block: 3px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--cd-primary);
  text-decoration: none;
  transition: color .16s ease;
}

/* status square */
.index-entry a::before {
  content: "";
  flex: 0 0 auto;
  align-self: center;
  width: 5px;
  height: 5px;
  background: var(--cd-primary);
  box-shadow: 0 0 4px rgb(var(--cd-rgb) / .75);
}

.index-entry[data-status="relaunch"] a::before {
  background: var(--cd-gold);
  box-shadow: 0 0 4px rgb(var(--cd-gold-rgb) / .6);
}

.index-entry[data-status="technical-update"] a::before {
  background: transparent;
  border: 1px solid var(--cd-primary);
  box-shadow: none;
}

.index-entry[data-status="in-development"] a::before {
  background: var(--cd-light);
  box-shadow: 0 0 4px rgb(var(--cd-light-rgb) / .55);
}

/* dotted leader */
.index-entry a::after {
  content: "";
  order: 2;
  flex: 1 1 auto;
  min-width: 12px;
  border-bottom: 1px dotted rgb(var(--cd-rgb) / .32);
}

.index-name,
.index-progress {
  order: 1;
}

.index-progress {
  font-size: 11px;
  font-weight: 700;
  color: var(--cd-gold);
}

.index-entry[data-status="in-development"] .index-progress {
  color: var(--cd-light);
}

.index-year {
  order: 3;
  font-size: 11px;
  color: var(--cd-muted);
}

.index-entry a:hover {
  color: var(--cd-light);
}

.index-entry a:hover .index-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (min-width: 768px) {
  .index-nav {
    display: block;
  }
}

/* touch screens */
@media (pointer: coarse) {
  .index-entry a {
    align-items: center;
    min-height: 48px;
  }
}

.index-updates {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ticker */
.ticker {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 20px;
  overflow: hidden;
  line-height: 20px;
}

.ticker::before,
.ticker::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: 1;
  width: 38px;
  height: 100%;
  pointer-events: none;
}

.ticker::before {
  left: 0;
  background: linear-gradient(to right, var(--cd-black), transparent);
}

.ticker::after {
  right: 0;
  background: linear-gradient(to left, var(--cd-black), transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
}

.ticker-group {
  display: flex;
  flex-shrink: 0;
  gap: 16px;
  padding-right: 16px;
  font-size: 12px;
  white-space: nowrap;
}

.ticker-group li::after {
  content: "+++";
  content: "+++" / "";
  margin-left: 16px;
  font-size: 12px;
  letter-spacing: 1px;
  color: rgb(var(--cd-rgb) / .58);
  text-shadow: 0 0 5px rgb(var(--cd-rgb) / .22);
}

/* duration depends on the text length */
.ticker.is-running .ticker-track {
  animation: ticker-move 75s linear infinite;
}

.ticker:hover .ticker-track,
.ticker.is-paused .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-move {
  to { transform: translateX(-50%); }
}

.ticker-toggle {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--cd-chip-bg);
  border: 1px solid rgb(var(--cd-rgb) / .40);
  box-shadow: var(--cd-chip-shadow);
}

.ticker-toggle[hidden] {
  display: none;
}

/* hit area */
.ticker-toggle::before {
  content: "";
  position: absolute;
  inset: -12px -10px;
}

/* pause icon */
.ticker-toggle::after {
  content: "";
  width: 7px;
  height: 8px;
  border-inline: 2px solid var(--cd-light);
}

/* play icon */
.ticker-toggle[aria-pressed="true"]::after {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-block: 4px solid transparent;
  border-inline-start: 7px solid var(--cd-light);
  border-inline-end: 0;
}

.ticker-toggle:hover {
  border-color: rgb(var(--cd-rgb) / .70);
}

@container (min-width: 560px) {
  .index-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    column-gap: 18px;
  }

  .index-label {
    margin-bottom: 0;
  }

  .index-row-list {
    align-items: start;
  }

  .index-row-list .index-label {
    padding-top: 2px;
  }

  .index-label-text {
    width: 140px;
    font-size: 10px;
  }

  .index-text {
    font-size: 13px;
  }

  .ticker-group {
    font-size: 13px;
  }

  .ticker.is-running .ticker-track {
    animation-duration: 68s;
  }
}

/* three columns */
@container (min-width: 1070px) {
  .index-list {
    columns: 3;
    column-gap: 36px;
  }
}

@media (min-width: 768px) {
  .index-box {
    margin-bottom: 44px;
    padding: 12px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker {
    height: auto;
  }

  .ticker::before,
  .ticker::after,
  .ticker-toggle,
  .ticker-group[aria-hidden="true"] {
    display: none;
  }

  .ticker-track {
    display: block;
    width: auto;
  }

  .ticker.is-running .ticker-track {
    animation: none;
  }

  .ticker-group {
    flex-wrap: wrap;
    gap: 4px 14px;
    padding-right: 0;
    white-space: normal;
  }
}

/* 7. Filter row */

.games {
  scroll-margin-top: 12px;
}

/* phones */
.index-row-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label random"
    "chips chips";
  align-items: center;
  gap: 10px 12px;
}

.index-row-filter .index-label {
  grid-area: label;
  margin-bottom: 0;
}

.index-filter {
  display: contents;
}

.index-filter .game-filter {
  grid-area: chips;
}

.index-filter .game-random {
  grid-area: random;
}

.game-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  min-width: 0;
  border: 0;
}

/* narrow box: 3 + 2 chips */
.game-filter::after {
  content: "";
  order: 1;
  flex-basis: 100%;
}

.game-filter [for="filter-technical-update"],
.game-filter [for="filter-in-development"] {
  order: 2;
}

.game-filter input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.game-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 7px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .5px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cd-primary);
  text-shadow: 1px 1px 0 var(--cd-black);
  background: linear-gradient(to bottom, rgb(var(--cd-rgb) / .07), rgb(10 18 18 / .96)), var(--cd-panel);
  border: 1px solid rgb(var(--cd-rgb) / .30);
  box-shadow: var(--cd-chip-shadow);
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

/* 48px touch target */
.game-chip::before {
  content: "";
  position: absolute;
  inset: -6px -3px;
}

@media (min-width: 768px) {
  /* status squares */
  .game-filter .game-chip:not([for="filter-all"])::after {
    content: "";
    order: -1;
    width: 5px;
    height: 5px;
    margin-right: 7px;
    background: var(--cd-primary);
    box-shadow: 0 0 4px rgb(var(--cd-rgb) / .75);
  }

  .game-filter .game-chip[for="filter-relaunch"]::after {
    background: var(--cd-gold);
    box-shadow: 0 0 4px rgb(var(--cd-gold-rgb) / .6);
  }

  .game-filter .game-chip[for="filter-technical-update"]::after {
    background: transparent;
    border: 1px solid var(--cd-primary);
    box-shadow: none;
  }

  .game-filter .game-chip[for="filter-in-development"]::after {
    background: var(--cd-light);
    box-shadow: 0 0 4px rgb(var(--cd-light-rgb) / .55);
  }
}

.game-chip:hover {
  color: var(--cd-light);
  border-color: rgb(var(--cd-rgb) / .60);
}

.game-filter input:checked + .game-chip {
  color: var(--cd-light);
  background: var(--cd-button-bg);
  border-color: rgb(var(--cd-rgb) / .66);
  box-shadow: var(--cd-chip-shadow), 0 0 8px rgb(var(--cd-rgb) / .14);
}

.game-filter input:focus-visible + .game-chip {
  outline: 2px solid var(--cd-light);
  outline-offset: 3px;
}

.game-random {
  visibility: hidden; /* shown by the script */
  color: var(--cd-light);
  background: var(--cd-button-bg);
  border-color: rgb(var(--cd-rgb) / .62);
}

.game-random.is-ready {
  visibility: visible;
}

.game-random:hover {
  background: var(--cd-button-bg-hover);
  border-color: rgb(178 226 221 / .90);
}

/* tablet and up */
@container (min-width: 560px) {
  .index-row-filter {
    grid-template-columns: 150px minmax(0, 1fr) auto;
    grid-template-areas: "label chips random";
    align-items: start;
    column-gap: 18px;
  }

  .index-row-filter .index-label {
    padding-top: 9px;
  }
}

/* wide box */
@container (min-width: 900px) {
  .game-filter {
    gap: 8px;
  }

  .game-filter::after {
    content: none;
  }

  .game-chip {
    padding-inline: 12px;
    letter-spacing: 1px;
  }

  .game-chip::before {
    inset: -6px -4px;
  }
}

/* filter */
.site-main:has(#filter-online:checked) :is(.game-card, .index-entry):not([data-status="online"]),
.site-main:has(#filter-relaunch:checked) :is(.game-card, .index-entry):not([data-status="relaunch"]),
.site-main:has(#filter-technical-update:checked) :is(.game-card, .index-entry):not([data-status="technical-update"]),
.site-main:has(#filter-in-development:checked) :is(.game-card, .index-entry):not([data-status="in-development"]) {
  display: none;
}

/* 8. Game cards */

.game-list {
  container-type: inline-size;
  display: grid;
  gap: 28px;
}

.game-card {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: start;
  gap: 18px;
  padding: 18px 14px;
  scroll-margin-top: 12px;
  background:
    var(--cd-grid),
    radial-gradient(circle at top left, rgb(var(--cd-rgb) / .05), transparent 34%),
    var(--cd-black);
  background-size: 6px 6px, 6px 6px, auto, auto;
  border: 1px solid rgb(var(--cd-rgb) / .34);
  box-shadow: var(--cd-frame);
}

/* scanlines */
.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .30;
  background: repeating-linear-gradient(to bottom, rgb(var(--cd-rgb) / .032) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

/* inner frame */
.game-card::after {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px solid rgb(var(--cd-rgb) / .18);
  pointer-events: none;
}

/* highlight */
.game-card.is-picked,
.game-card:target {
  border-color: rgb(178 226 221 / .80);
  outline: 1px solid transparent;
  outline-offset: 6px;
}

@media (prefers-reduced-motion: no-preference) {
  .game-card.is-picked,
  .game-card:target {
    animation: card-pick 2.6s ease-out;
  }
}

@keyframes card-pick {
  0%, 40% { outline-color: rgb(178 226 221 / .60); }
}

/* 8a. Preview image system */

.game-preview {
  position: relative;
  display: block;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--cd-panel);
  border: 1px solid var(--cd-line);
  box-shadow:
    0 0 0 1px rgb(var(--cd-rgb) / .12),
    0 0 0 2px var(--cd-black),
    0 0 0 3px rgb(var(--cd-rgb) / .12);
}

.game-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--preview-position-x) var(--preview-position-y);
  filter:
    brightness(var(--preview-brightness))
    contrast(var(--preview-contrast))
    saturate(var(--preview-saturation));
  transition: filter .3s ease;
}

a.game-preview:hover img {
  filter:
    brightness(calc(var(--preview-brightness) * 1.06))
    contrast(var(--preview-contrast))
    saturate(var(--preview-saturation));
}

/* color tint */
.game-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--cd-primary);
  mix-blend-mode: color;
  opacity: .14;
  pointer-events: none;
}

/* vignette + scanlines */
.game-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    repeating-linear-gradient(to bottom, rgb(var(--cd-rgb) / .045) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at center, rgb(0 0 0 / 0) 58%, rgb(0 0 0 / .30) 100%);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .55), inset 0 0 18px rgb(0 0 0 / .28);
  pointer-events: none;
}

/* release year */
.game-osd {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 1;
  font-family: var(--cd-font-retro);
  font-size: 16px;
  line-height: 1;
  color: var(--cd-light);
  text-shadow:
    1px 1px 0 rgb(0 0 0 / .65),
    0 0 3px rgb(var(--cd-rgb) / .90),
    0 0 12px rgb(var(--cd-rgb) / .55);
  pointer-events: none;
}

/* Per-image tuning */
[data-game="ironwar-blood-of-the-kings"] { --preview-brightness: .92; }
[data-game="epic-knights"] { --preview-brightness: .94; }
[data-game="piratenmacht"],
[data-game="dorfstern"] { --preview-brightness: .95; }
[data-game="ozeankampf"],
[data-game="ironwar-classic"] { --preview-brightness: 1.1; }
[data-game="kneipengame"],
[data-game="paraguay-1890"] { --preview-brightness: 1.14; }
[data-game="slayer-of-souls"] { --preview-brightness: 1.1; --preview-contrast: 1.12; }
[data-game="days-of-evil"] { --preview-position-y: 15%; }

/* 8b. Card content */

.game-content {
  min-width: 0;
}

.game-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.game-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .2px;
  color: var(--cd-primary);
  text-shadow: 0 0 5px rgb(var(--cd-rgb) / .18);
}

.game-status {
  order: -1;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  padding: 3px 8px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .8px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cd-status);
  text-shadow: 1px 1px 0 var(--cd-black);
  background: linear-gradient(to bottom, rgb(var(--cd-rgb) / .12), rgb(10 18 18 / .96)), var(--cd-panel);
  border: 1px solid var(--cd-line);
  box-shadow: var(--cd-chip-shadow);
}

/* status square */
.game-status::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--cd-primary);
  box-shadow: 0 0 4px rgb(var(--cd-rgb) / .75);
}

[data-status="relaunch"] .game-status {
  color: var(--cd-gold);
  background: linear-gradient(to bottom, rgb(var(--cd-gold-rgb) / .15), rgb(22 18 8 / .96)), #090704;
  border-color: rgb(var(--cd-gold-rgb) / .58);
}

[data-status="relaunch"] .game-status::before {
  background: var(--cd-gold);
  box-shadow: 0 0 4px rgb(var(--cd-gold-rgb) / .6);
}

[data-status="technical-update"] .game-status::before {
  background: transparent;
  border: 1px solid var(--cd-primary);
  box-shadow: none;
}

[data-status="in-development"] .game-status::before {
  background: var(--cd-light);
  box-shadow: 0 0 4px rgb(var(--cd-light-rgb) / .55);
}

.game-description {
  margin-top: 18px;
}

.game-description p + p {
  margin-top: 22px;
}

.game-actions,
.game-progress {
  margin-top: 22px;
}

/* 8c. Buttons */

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .6px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cd-light);
  text-shadow: 1px 1px 0 var(--cd-black);
  background: var(--cd-button-bg);
  border: 1px solid rgb(var(--cd-rgb) / .62);
  box-shadow: var(--cd-button-shadow);
  transition: color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

/* 48px touch target */
.button::before {
  content: "";
  position: absolute;
  inset: -6px;
}

.button::after {
  content: "\00bb";
  content: "\00bb" / "";
  color: var(--cd-primary);
}

.button:hover {
  color: #ffffff;
  background: var(--cd-button-bg-hover);
  border-color: rgb(178 226 221 / .90);
  box-shadow: var(--cd-button-shadow-hover);
}

/* 8d. Relaunch progress */

.game-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.game-progress-label {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cd-light);
  text-shadow: 1px 1px 0 var(--cd-black);
}

.game-progress-value {
  font-family: var(--cd-font-retro);
  font-size: 16px;
  line-height: 1;
  color: var(--cd-gold);
  text-shadow: 0 0 8px rgb(var(--cd-gold-rgb) / .35);
  white-space: nowrap;
}

/* in development: turquoise */
[data-status="in-development"] .game-progress-value {
  color: var(--cd-light);
  text-shadow: 0 0 8px rgb(var(--cd-rgb) / .45);
}

[data-status="in-development"] .game-progress-track {
  --bar: var(--cd-primary);
}

/* frame + empty blocks */
.game-progress-track {
  --p: 0;
  --bar: var(--cd-gold); /* block color */
  position: relative;
  padding: 3px 1px 3px 2px;
  background:
    repeating-linear-gradient(90deg, transparent 0 1px, rgb(var(--cd-rgb) / .12) 0 calc(5% - 2px), transparent 0 5%) content-box,
    #030706;
  border: 1px solid rgb(var(--cd-rgb) / .48);
  box-shadow:
    inset 0 0 10px rgb(var(--cd-rgb) / .08),
    0 0 0 2px var(--cd-black),
    0 0 0 3px rgb(var(--cd-rgb) / .13);
}

/* filled blocks */
.game-progress-track progress {
  display: block;
  width: 100%;
  height: 12px;
  -webkit-appearance: none;
  appearance: none;
  color: var(--bar);
  background: transparent;
  border: 0;
  border-radius: 0;
  -webkit-mask: repeating-linear-gradient(90deg, transparent 0 1px, #000 0 calc(5% - 2px), transparent 0 5%);
  mask: repeating-linear-gradient(90deg, transparent 0 1px, #000 0 calc(5% - 2px), transparent 0 5%);
}

.game-progress-track progress::-webkit-progress-bar {
  background: transparent;
}

.game-progress-track progress::-webkit-progress-value {
  background:
    linear-gradient(rgb(255 255 255 / .30) 0 1px, transparent 1px calc(100% - 1px), rgb(0 0 0 / .28) calc(100% - 1px)),
    var(--bar);
}

.game-progress-track progress::-moz-progress-bar {
  background:
    linear-gradient(rgb(255 255 255 / .30) 0 1px, transparent 1px calc(100% - 1px), rgb(0 0 0 / .28) calc(100% - 1px)),
    var(--bar);
}

/* pulse on the last block */
.game-progress-track::after {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: calc(3px + (100% - 3px) * (var(--p) - 5) / 100);
  width: calc(((100% - 3px) / 20 - 3px) * min(var(--p), 1));
  background: var(--cd-black);
  opacity: 0;
  pointer-events: none;
}

.game-progress-track:has(> [value="5"]) { --p: 5; }
.game-progress-track:has(> [value="10"]) { --p: 10; }
.game-progress-track:has(> [value="15"]) { --p: 15; }
.game-progress-track:has(> [value="20"]) { --p: 20; }
.game-progress-track:has(> [value="25"]) { --p: 25; }
.game-progress-track:has(> [value="30"]) { --p: 30; }
.game-progress-track:has(> [value="35"]) { --p: 35; }
.game-progress-track:has(> [value="40"]) { --p: 40; }
.game-progress-track:has(> [value="45"]) { --p: 45; }
.game-progress-track:has(> [value="50"]) { --p: 50; }
.game-progress-track:has(> [value="55"]) { --p: 55; }
.game-progress-track:has(> [value="60"]) { --p: 60; }
.game-progress-track:has(> [value="65"]) { --p: 65; }
.game-progress-track:has(> [value="70"]) { --p: 70; }
.game-progress-track:has(> [value="75"]) { --p: 75; }
.game-progress-track:has(> [value="80"]) { --p: 80; }
.game-progress-track:has(> [value="85"]) { --p: 85; }
.game-progress-track:has(> [value="90"]) { --p: 90; }
.game-progress-track:has(> [value="95"]) { --p: 95; }
.game-progress-track:has(> [value="100"]) { --p: 100; }

/* fill-in */
@media screen and (prefers-reduced-motion: no-preference) {
  .game-progress-track::after {
    animation: progress-pulse 2.4s ease-in-out infinite;
  }

  /* no pulse while filling */
  .game-progress-track.is-waiting::after {
    animation: none;
  }

  .game-progress-track.is-filling::after {
    animation-delay: 1.35s;
  }

  .game-progress-track.is-waiting progress {
    clip-path: inset(0 100% 0 0);
  }

  .game-progress-track.is-filling progress {
    animation: progress-fill 1.2s steps(20, jump-end) .15s both;
  }
}

@keyframes progress-pulse {
  50% { opacity: .6; }
}

@keyframes progress-fill {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}

@container (min-width: 700px) {
  .game-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.07fr);
    gap: 24px;
    padding: 28px;
    border-color: var(--cd-line);
    box-shadow: var(--cd-frame-wide);
  }

  .game-card::after {
    inset: 7px;
  }

  .game-preview {
    box-shadow:
      0 0 0 1px rgb(var(--cd-rgb) / .12),
      0 0 0 3px var(--cd-black),
      0 0 0 4px rgb(var(--cd-rgb) / .13);
  }

  .game-header {
    flex-direction: row;
    justify-content: space-between;
    gap: 10px 16px;
  }

  .game-title {
    font-size: 19px;
  }

  .game-osd {
    right: 14px;
    bottom: 12px;
  }

  /* first title line */
  .game-status {
    order: 0;
    margin-top: 3px;
    font-size: 9px;
    letter-spacing: 1px;
  }

  .game-description {
    margin-top: 22px;
  }

  .button {
    padding-inline: 20px;
    font-size: 13px;
  }

  .game-progress {
    margin-top: 26px;
  }

  .game-progress-label {
    font-size: 10px;
  }

  .game-progress-track progress {
    height: 14px;
  }
}

@media (min-width: 768px) {
  .game-list {
    gap: 48px;
  }
}

/* 9. About */

.about {
  margin-top: 56px;
  scroll-margin-top: 12px;
}

.about-box {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 20px 14px;
  background:
    linear-gradient(rgb(var(--cd-rgb) / .035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--cd-rgb) / .035) 1px, transparent 1px),
    radial-gradient(circle at top left, rgb(var(--cd-rgb) / .08), transparent 36%),
    var(--cd-black);
  background-size: 6px 6px, 6px 6px, auto, auto;
  border: 1px solid rgb(var(--cd-rgb) / .55);
  box-shadow:
    0 0 0 1px rgb(var(--cd-rgb) / .18),
    inset 0 0 0 1px rgb(var(--cd-rgb) / .12),
    inset 0 0 24px rgb(var(--cd-rgb) / .05),
    0 0 18px rgb(var(--cd-rgb) / .04);
}

/* scanlines */
.about-box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .42;
  background: repeating-linear-gradient(to bottom, rgb(var(--cd-rgb) / .055) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

/* corner marks */
.about-box::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgb(var(--cd-rgb) / .70);
  opacity: .75;
  -webkit-mask: conic-gradient(at 16px 16px, transparent 75%, #000 0) 0 0 / calc(100% - 16px) calc(100% - 16px);
  mask: conic-gradient(at 16px 16px, transparent 75%, #000 0) 0 0 / calc(100% - 16px) calc(100% - 16px);
  pointer-events: none;
}

/* scan sweep */
.about-content::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(to bottom, transparent 0, rgb(var(--cd-rgb) / .055) 45px, transparent 90px) top / 100% 90px no-repeat;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .about-content::before {
    animation: about-sweep 9s linear infinite;
  }
}

@keyframes about-sweep {
  0% { opacity: 0; transform: translateY(-90px); }
  12% { opacity: .7; }
  55% { opacity: .45; }
  100% { opacity: 0; transform: translateY(100%); }
}

.about-content p + p {
  margin-top: 22px;
}

@media (min-width: 768px) {
  .about {
    margin-top: 72px;
  }

  .about-box {
    padding: 28px 26px;
  }

  .about-box::before {
    opacity: .55;
  }

  .about-content p + p {
    margin-top: 28px;
  }
}

/* 10. Sell page */

/* 10a. Overview */

/* same start as the chapter text */
@container (min-width: 560px) {
  .sell-console .index-row {
    column-gap: 20px;
  }
}

@media (min-width: 768px) {
  .sell-console .index-row {
    column-gap: 30px;
  }
}

.sell-lead {
  color: var(--cd-light);
}

.sell-toc {
  display: none;
  margin-top: 10px;
}

.sell-toc-list {
  list-style: none;
}

.sell-toc-list a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-block: 3px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--cd-primary);
  text-decoration: none;
  transition: color .16s ease;
}

/* dotted leader */
.sell-toc-list a::after {
  content: "";
  order: 2;
  flex: 1 1 auto;
  min-width: 12px;
  border-bottom: 1px dotted rgb(var(--cd-rgb) / .32);
}

.sell-toc-name {
  order: 1;
}

.sell-toc-number {
  order: 3;
  font-size: 11px;
  color: var(--cd-muted);
}

.sell-toc-list a:hover {
  color: var(--cd-light);
}

.sell-toc-list a:hover .sell-toc-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (min-width: 768px) {
  .sell-toc {
    display: block;
  }
}

@media (pointer: coarse) {
  .sell-toc-list a {
    align-items: center;
    min-height: 48px;
  }
}

@container (min-width: 900px) {
  .sell-toc-list {
    columns: 2;
    column-gap: 36px;
  }

  .sell-toc-list li {
    break-inside: avoid;
  }
}

/* 10b. Email reveal */

.mail-reveal,
.mail-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.mail-field,
.mail-note {
  flex: 1 1 240px;
  min-width: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cd-muted);
}

.mail-reveal.is-revealed .mail-field {
  font-size: 15px;
  letter-spacing: .3px;
  text-transform: none;
  overflow-wrap: anywhere;
  color: var(--cd-light);
  text-shadow: 0 0 6px rgb(var(--cd-rgb) / .25);
}

.mail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mail-actions [hidden] {
  display: none;
}

.mail-noscript {
  margin-top: 8px;
  font-size: 12px;
}

@media (prefers-reduced-motion: no-preference) {
  .mail-reveal.is-revealed .mail-field {
    animation: mail-in .3s ease-out;
  }
}

@keyframes mail-in {
  from { opacity: 0; }
}

/* large version */
.mail-reveal-large .mail-field {
  flex-basis: 100%;
  padding: 14px 12px;
  text-align: center;
  background: rgb(0 0 0 / .6);
  border: 1px solid rgb(var(--cd-rgb) / .30);
  box-shadow: inset 0 0 0 1px rgb(var(--cd-rgb) / .06), inset 0 0 14px rgb(var(--cd-rgb) / .05);
}

.mail-reveal-large.is-revealed .mail-field {
  font-size: 17px;
}

/* build queue */
.mail-reveal:not(.is-revealed) .mail-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-inline: 16px;
  text-align: left;
}

/* labels share one cell */
.mail-build-name {
  display: grid;
  white-space: nowrap;
  color: var(--cd-light);
}

.mail-build-name > span {
  grid-area: 1 / 1;
}

.mail-build-level {
  margin-left: 8px;
  color: var(--cd-muted);
}

.mail-build-busy,
.mail-reveal[data-state="building"] .mail-build-idle {
  visibility: hidden;
}

.mail-reveal[data-state="building"] .mail-build-busy {
  visibility: visible;
}

/* turquoise bar */
.mail-build-track {
  --bar: var(--cd-primary);
  flex: 1 1 100px;
  min-width: 100px;
}

.mail-build-time {
  font-family: var(--cd-font-retro);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--cd-light);
  text-shadow: 0 0 8px rgb(var(--cd-rgb) / .35);
}

/* buttons share one cell */
.mail-build-buttons {
  display: grid;
}

.mail-build-buttons > .button {
  grid-area: 1 / 1;
}

.mail-finish,
.mail-reveal[data-state="building"] .mail-show {
  visibility: hidden;
}

.mail-reveal[data-state="building"] .mail-finish {
  visibility: visible;
}

/* 10c. Chapters */

.sell-dossier {
  container-type: inline-size;
  overflow: clip; /* clip, not hidden: keeps the tags sticky */
}

.sell-chapter {
  scroll-margin-top: 16px;
}

.sell-chapter + .sell-chapter {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgb(var(--cd-rgb) / .16);
}

.sell-tag {
  display: flex;
  margin-bottom: 12px;
}

/* target chapter */
.sell-chapter:target .sell-tag .index-label-text {
  border-color: rgb(var(--cd-rgb) / .85);
  box-shadow: var(--cd-chip-shadow), 0 0 10px rgb(var(--cd-rgb) / .35);
}

.sell-body h2 {
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .2px;
  text-wrap: balance;
  color: var(--cd-light);
  text-shadow: 0 0 5px rgb(var(--cd-rgb) / .22);
}

.sell-body p {
  text-wrap: pretty;
}

.sell-body > p + p {
  margin-top: 14px;
}

.sell-body > .sell-more {
  margin-top: 22px;
}

@container (min-width: 560px) {
  .sell-chapter {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    column-gap: 18px;
  }

  /* sticky tag */
  .sell-tag {
    position: sticky;
    top: 16px;
    align-self: start;
    margin: 3px 0 0;
  }

  .sell-body h2 {
    font-size: 19px;
  }
}

@media (min-width: 768px) {
  .sell-chapter + .sell-chapter {
    margin-top: 34px;
    padding-top: 34px;
  }
}

/* 10d. Price list */

.sell-prices {
  container: sell-prices / inline-size;
  margin-block: 22px;
  padding: 12px 14px 4px;
  background: var(--cd-grid), var(--cd-black);
  background-size: 6px 6px, 6px 6px, auto;
  border: 1px solid rgb(var(--cd-rgb) / .38);
  box-shadow: var(--cd-frame);
}

.sell-prices-head {
  display: flex;
  margin-bottom: 2px;
}

.sell-prices-head .index-label-text {
  width: auto;
}

.sell-price {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block: 12px;
}

.sell-price + .sell-price {
  border-top: 1px solid rgb(var(--cd-rgb) / .12);
}

.sell-price dt {
  font-size: 13px;
  line-height: 1.5;
}

.sell-price dd {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sell-price-note {
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cd-muted);
}

/* pixel font: multiples of 8px */
.sell-price-value {
  font-family: var(--cd-font-retro);
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: .04em;
  color: var(--cd-light);
  text-shadow: 0 0 3px rgb(var(--cd-rgb) / .35), 0 0 10px rgb(var(--cd-rgb) / .16);
}

.sell-price-individual {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cd-light);
}

@container sell-prices (min-width: 520px) {
  .sell-price {
    flex-direction: row;
    align-items: last baseline;
    gap: 12px;
  }

  .sell-price dt {
    flex: 0 1 auto;
    max-width: 52ch;
  }

  /* dotted leader */
  .sell-price::after {
    content: "";
    order: 2;
    flex: 1 1 auto;
    min-width: 24px;
    border-bottom: 1px dotted rgb(var(--cd-rgb) / .32);
  }

  .sell-price dd {
    order: 3;
    flex: 0 0 auto;
    align-items: flex-end;
    text-align: right;
  }
}

/* 10e. Contact console */

.sell-contact {
  container: sell-contact / inline-size;
  position: relative;
  margin-top: 24px;
  padding: 14px;
  background: var(--cd-grid), var(--cd-black);
  background-size: 6px 6px, 6px 6px, auto;
  border: 1px solid rgb(var(--cd-rgb) / .38);
  box-shadow:
    0 0 0 1px rgb(var(--cd-rgb) / .12),
    0 0 0 3px var(--cd-black),
    0 0 0 4px rgb(var(--cd-rgb) / .10),
    inset 0 0 18px rgb(var(--cd-rgb) / .035);
}

.sell-contact-tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 3px 8px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .8px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cd-status);
  text-shadow: 1px 1px 0 var(--cd-black);
  background: linear-gradient(to bottom, rgb(var(--cd-rgb) / .12), rgb(10 18 18 / .96)), var(--cd-panel);
  border: 1px solid var(--cd-line);
  box-shadow: var(--cd-chip-shadow);
}

.sell-contact-label {
  margin-bottom: 8px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cd-muted);
}

.sell-contact-include {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgb(var(--cd-rgb) / .16);
}

.sell-include {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sell-include li {
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--cd-primary);
  border: 1px dotted rgb(var(--cd-rgb) / .45);
}

/* not answered */
.sell-include + .sell-contact-label {
  margin-top: 12px;
}

.sell-exclude li {
  color: var(--cd-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(var(--cd-rgb) / .85);
  border-style: dashed;
  border-color: rgb(var(--cd-rgb) / .30);
}

.sell-contact-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.sell-contact-note a {
  position: relative;
  color: var(--cd-light);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sell-contact-note a:hover {
  color: #ffffff;
}

/* 48px touch target */
.sell-contact-note a::before {
  content: "";
  position: absolute;
  inset: -17px -6px;
}

@container sell-contact (min-width: 560px) {
  .sell-contact-tag {
    position: absolute;
    top: 14px;
    right: 16px;
    margin: 0;
  }

  .mail-reveal-large .mail-field {
    flex-basis: 280px;
  }

  .mail-reveal-large.is-revealed .mail-field {
    font-size: 19px;
  }
}

@media (min-width: 768px) {
  .sell-contact {
    padding: 16px 18px;
  }
}

/* 11. Legal pages */

/* 11a. Console */

.legal-console .legal-toc-single {
  columns: 1;
}

.legal-operator {
  container: legal-operator / inline-size;
}

.legal-op-grid {
  display: grid;
  gap: 14px;
}

.legal-op-label {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cd-muted);
}

/* value images (2x) */
.legal-op-value {
  display: block;
  max-width: calc(100% + 12px);
  margin: 0 0 -6px -6px;
  background: 0 0 / contain no-repeat;
}

.legal-op-name {
  width: 302px;
  aspect-ratio: 302 / 36;
  margin-top: -2px;
  background-image: url("/assets/images/legal/op-name.webp");
}

.legal-op-address {
  width: 206px;
  aspect-ratio: 206 / 76;
  background-image: url("/assets/images/legal/op-address.webp");
}

.legal-op-mail {
  width: 137px;
  aspect-ratio: 137 / 33;
  background-image: url("/assets/images/legal/op-mail.webp");
}

@container legal-operator (min-width: 760px) {
  .legal-op-grid {
    grid-template-columns: 1.3fr 1fr .9fr;
    column-gap: 30px;
  }

  .legal-op-col + .legal-op-col {
    padding-left: 30px;
    border-left: 1px solid rgb(var(--cd-rgb) / .16);
  }
}

/* support note */
.legal-support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 16px;
}

.legal-chip {
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--cd-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(var(--cd-rgb) / .85);
  border: 1px dashed rgb(var(--cd-rgb) / .30);
}

/* language row */
.legal-lang-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.legal-lang-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--cd-light);
}

/* keep hidden languages hidden */
.legal-page [hidden],
.legal-dossier [hidden] {
  display: none !important;
}

.legal-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.legal-lang .game-chip[aria-pressed="true"] {
  color: var(--cd-light);
  background: var(--cd-button-bg);
  border-color: rgb(var(--cd-rgb) / .66);
  box-shadow: var(--cd-chip-shadow), 0 0 8px rgb(var(--cd-rgb) / .14);
}

/* privacy: no contents on phones */
.legal-contents {
  display: none;
}

@media (min-width: 768px) {
  .legal-contents {
    display: grid;
  }
}

/* 11b. Text host */

.legal-text {
  min-height: 100vh;
}

.legal-noscript {
  padding: 18px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--cd-light);
  border: 1px dashed rgb(var(--cd-rgb) / .35);
}

.legal-noscript a {
  color: var(--cd-light);
  text-underline-offset: 3px;
}

.legal-page .site-main,
.legal-dossier {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.legal-print-note {
  display: none;
}

@media print {
  .legal-page .site-header,
  .legal-page .site-main,
  .legal-page .site-footer,
  .legal-page .to-top,
  .legal-page .no-signal {
    display: none !important;
  }

  .legal-page .legal-print-note {
    display: block;
    padding: 48px 0;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: #000000;
  }
}

/* 11c. Dossier */

.legal-dossier .sell-tag {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* stamp */
.legal-stamp {
  display: grid;
  gap: 5px;
  font-family: var(--cd-font-retro);
  font-size: 8px;
  line-height: 1;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: rgb(var(--cd-rgb) / .62);
}

@container (max-width: 559px) {
  .legal-dossier .sell-tag {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .legal-stamp {
    justify-items: end;
  }
}

/* target chapter */
.sell-chapter.is-target .sell-tag .index-label-text {
  border-color: rgb(var(--cd-rgb) / .85);
  box-shadow: var(--cd-chip-shadow), 0 0 10px rgb(var(--cd-rgb) / .35);
}

.legal-body > * + * {
  margin-top: 10px;
}

.legal-body .legal-h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 26px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--cd-light);
}

.legal-body .legal-h3 + * {
  margin-top: 8px;
}

.legal-num {
  flex: none;
  font-family: var(--cd-font-retro);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .5px;
  color: var(--cd-muted);
}

.legal-body .legal-operator {
  margin-block: 16px;
}

.legal-list,
.legal-domains,
.legal-credits {
  list-style: none;
}

.legal-list li,
.legal-domains li {
  position: relative;
  padding-left: 18px;
}

.legal-list li + li {
  margin-top: 4px;
}

.legal-defs > li + li {
  margin-top: 10px;
}

.legal-list li::before,
.legal-domains li::before {
  content: "";
  position: absolute;
  top: .72em;
  left: 2px;
  width: 5px;
  height: 5px;
  background: rgb(var(--cd-rgb) / .6);
}

/* definition term */
.legal-term {
  display: block;
  color: var(--cd-light);
}

.legal-list .legal-list {
  margin-top: 6px;
}

.legal-body .legal-domains {
  margin-block: 12px 14px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.9;
  border: 1px dotted rgb(var(--cd-rgb) / .35);
}

.legal-domains li,
.legal-credits li {
  break-inside: avoid;
}

/* image credits */
.legal-credits {
  columns: 2;
  column-gap: 20px;
  font-size: 11px;
  line-height: 1.75;
  color: var(--cd-muted);
}

.legal-body .legal-h3-credits {
  font-size: 12px;
  letter-spacing: .5px;
}

.legal-updated {
  font-size: 12px;
  color: var(--cd-muted);
}

@container (min-width: 700px) {
  .legal-domains {
    columns: 2;
    column-gap: 24px;
  }

  .legal-credits {
    columns: 3;
  }
}

@container (min-width: 1000px) {
  .legal-domains {
    columns: 3;
  }

  .legal-credits {
    columns: 4;
  }
}

/* 11d. Watermark */

.legal-watermark {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='190'%3E%3Cg fill='rgb(130,177,173)' fill-opacity='.085' font-family='Verdana,Arial,sans-serif' font-size='10' font-weight='700' letter-spacing='3'%3E%3Ctext x='20' y='70' transform='rotate(-16 180 95)'%3ECYBERDJINN.CO / LEGAL%3C/text%3E%3Ctext x='200' y='160' transform='rotate(-16 180 95)'%3ECYBERDJINN.CO / LEGAL%3C/text%3E%3C/g%3E%3C/svg%3E") 0 0 / 360px 190px repeat;
}

/* 11e. No signal screen */

.no-signal {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 24px;
  color: var(--cd-primary);
  text-align: center;
  background:
    repeating-linear-gradient(to bottom, rgb(var(--cd-rgb) / .07) 0 1px, transparent 1px 4px),
    linear-gradient(rgb(var(--cd-rgb) / .035) 1px, transparent 1px) 0 0 / 6px 6px,
    linear-gradient(90deg, rgb(var(--cd-rgb) / .035) 1px, transparent 1px) 0 0 / 6px 6px,
    radial-gradient(ellipse at center, rgb(var(--cd-rgb) / .10), transparent 60%),
    var(--cd-black);
  border: 0;
}

.no-signal[open] {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
}

.no-signal::backdrop {
  background: var(--cd-black);
}

html:has(.no-signal[open]) :is(.site-main, .site-footer) {
  visibility: hidden;
}

.no-signal-channel {
  position: absolute;
  top: 26px;
  left: 28px;
  font-family: var(--cd-font-retro);
  font-size: 16px;
  text-transform: uppercase;
  color: var(--cd-light);
  text-shadow: 0 0 8px rgb(var(--cd-rgb) / .55);
}

.no-signal-title {
  font-family: var(--cd-font-retro);
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cd-light);
  text-shadow: 0 0 12px rgb(var(--cd-rgb) / .6), 1px 1px 0 var(--cd-black);
}

.no-signal-line {
  width: min(420px, 70vw);
  height: 1px;
  background: rgb(var(--cd-rgb) / .5);
  box-shadow: 0 0 10px rgb(var(--cd-rgb) / .6);
}

.no-signal-text {
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.6;
  text-wrap: balance;
}

/* 12. Footer */

.site-footer {
  margin-top: 48px;
}

.site-footer::before {
  margin-bottom: 22px;
}

.footer-inner {
  padding-block: 20px 26px;
  text-align: center;
}

.footer-badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--cd-light);
  background: var(--cd-panel);
}

.footer-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 13px;
  line-height: 1.7;
}

.footer-years {
  padding-top: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links li + li::before,
.footer-years::after {
  content: "|";
  content: "|" / "";
  padding-inline: .35em;
}

.footer-years::after {
  display: none;
}

@media (min-width: 600px) {
  .footer-line {
    flex-direction: row;
    justify-content: center;
  }

  .footer-years {
    padding-top: 0;
  }

  .footer-years::after {
    display: inline;
  }
}

.footer-links a {
  display: inline-block;
  padding-block: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.footer-links a[aria-current="page"] {
  color: var(--cd-light);
}

.footer-links a:hover {
  color: var(--cd-light);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* 13. Scroll to top */

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--cd-light);
  background: var(--cd-button-bg);
  border: 1px solid rgb(var(--cd-rgb) / .62);
  box-shadow: var(--cd-button-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}

.to-top.is-visible {
  opacity: .92;
  visibility: visible;
  transform: none;
  transition: opacity .2s ease, transform .2s ease, visibility 0s;
}

.to-top:hover {
  opacity: 1;
  background: var(--cd-button-bg-hover);
  border-color: rgb(178 226 221 / .90);
  box-shadow: var(--cd-button-shadow-hover);
}

/* 48px touch target */
.to-top::before {
  content: "";
  position: absolute;
  inset: -6px;
}

/* chevron */
.to-top::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
  filter: drop-shadow(1px 1px 0 var(--cd-black));
}

@media (min-width: 768px) {
  .to-top {
    right: 28px;
    bottom: 28px;
    width: 40px;
    height: 40px;
  }

  .to-top::after {
    width: 10px;
    height: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .to-top,
  .to-top.is-visible {
    transform: none;
    transition: none;
  }
}

/* 14. Page transition */

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

.site-header {
  view-transition-name: site-header;
}

/* no slide if the header is out of view */
::view-transition-group(site-header) {
  animation: none;
}

::view-transition-old(root) {
  animation: channel-off .16s cubic-bezier(.55, 0, 1, .45) both;
}

::view-transition-new(root) {
  animation: channel-on .26s cubic-bezier(0, .55, .45, 1) .12s both;
}

@keyframes channel-off {
  to {
    opacity: .25;
    transform: scaleY(.005);
  }
}

@keyframes channel-on {
  from {
    opacity: .25;
    transform: scaleY(.005);
  }
}

/* 15. Print */

@media print {
  .hero-vignette,
  .hero-noise,
  .hero-scanlines,
  .hero-scanbeam,
  .hero-glitch,
  .index-row-filter,
  .ticker-toggle,
  .mail-actions,
  .to-top {
    display: none !important;
  }
}
