:root {
  color-scheme: dark;
  --ink: #edf5f8;
  --muted: #a7bac5;
  --accent: #82e1ed;
  --cyan-light: #bcf5fc;
  --pink: #f1a4c8;
  --panel: #121b25;
  --screen: #0a1119;
  --edge: #344756;
  --line: #253743;
  --mono: "IBM Plex Mono", "Cascadia Mono", ui-monospace, monospace;
  font-family: Geist, "Segoe UI", system-ui, sans-serif;
  background: #070b12;
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 12% 0, #183344 0, transparent 37rem),
    radial-gradient(ellipse at 93% 5%, #27192d 0, transparent 32rem),
    #070b12;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:is(a, button):focus-visible {
  outline: 2px solid #ffd29c;
  outline-offset: 3px;
}
h1, h2, h3, p { margin-top: 0; }
h2 {
  font-size: clamp(2.15rem, 5.2vw, 4.65rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  margin-bottom: .55em;
}
h3 { font-size: 1.35rem; margin: .8rem 0 .45rem; }
p { line-height: 1.62; }
figure { margin: 0; min-width: 0; }

.site-header, main, footer { width: min(1240px, 94%); margin-inline: auto; }
.site-header, footer, .deck-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.site-header { flex-wrap: wrap; min-height: 5rem; padding-block: .8rem; }
.site-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.brand, .label, nav, .deck-foot, footer, #fx, .action {
  font-family: var(--mono);
}
.brand {
  font-size: 1.22rem;
  font-weight: 850;
  letter-spacing: .075em;
  text-decoration: none;
}
.brand span, .label { color: var(--accent); }
.brand small { font-size: .79rem; color: var(--muted); }
.brand i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: .25rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 13px #72e1f3a6;
}
.action, #fx, .deck-foot button, #viewer button, .play {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: .65rem .82rem;
  border: 1px solid var(--edge);
  border-radius: .42rem;
  color: var(--ink);
  background: #172635;
  text-decoration: none;
}
.action {
  color: var(--cyan-light);
  border-color: #527887;
  font-size: .9rem;
  line-height: 1.3;
}
:is(.action, #fx, .deck-foot button, #viewer button, .play):hover {
  color: #fff;
  background: #21374a;
  border-color: var(--accent);
}
.site-actions .support-link {
  border-color: var(--pink);
  color: #291126;
  background: var(--pink);
  font-weight: 750;
}
.site-actions .support-link:hover { background: #ffc0e1; }
#fx[aria-pressed=true] {
  color: var(--accent);
  border-color: #527887;
  background: #0e2833;
}
#fx::before {
  content: "";
  width: .44rem;
  height: .44rem;
  margin-right: .5rem;
  border-radius: 50%;
  background: #677682;
}
#fx[aria-pressed=true]::before { background: var(--accent); box-shadow: 0 0 .7rem #82e1ed80; }

.deck {
  padding: clamp(.55rem, 1.5vw, 1.05rem);
  border: 1px solid #485d6d;
  border-radius: clamp(1rem, 2.8vw, 1.8rem);
  background: linear-gradient(155deg, #253743, #17212d 30%, #151d29 82%, #211c2b);
  box-shadow: inset 0 1px #b1dbec45, 0 16px 75px #0009;
}
.deck-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: .6rem;
  padding-bottom: .8rem;
}
nav { display: flex; flex-wrap: wrap; gap: .38rem; }
nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: .35rem;
  padding: .55rem .68rem;
  border: 1px solid var(--edge);
  border-radius: .42rem;
  background: #111a26;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
}
nav a:hover { color: var(--cyan-light); border-color: #6a9ba8; }
nav a[aria-current=page] {
  color: #081e29;
  background: var(--accent);
  border-color: var(--cyan-light);
  box-shadow: 0 0 15px #82e1ed32;
  font-weight: 800;
}
nav small { font-size: .78rem; opacity: .73; }
#channels { min-width: 0; flex: 1 1 34rem; }
.deck-foot { margin: .75rem .25rem 0; font-size: .8rem; color: var(--muted); }
.deck-controls .deck-foot { margin: 0; gap: .35rem; }
.deck-foot button { min-width: 4.2rem; white-space: nowrap; box-shadow: inset 0 1px #c1e6f329; }
.speaker {
  height: 12px;
  flex: 1;
  margin-left: .5rem;
  border-radius: 2px;
  opacity: .7;
  background: repeating-linear-gradient(90deg, #080f17 0 2px, #2a3845 2px 3px, transparent 3px 6px);
}
.screen {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 340px;
  border: 1px solid #4b6879;
  border-radius: clamp(.7rem, 2vw, 1.25rem);
  background: var(--screen);
  box-shadow: 0 0 0 3px #090f17, 0 0 0 4px #6c859232;
}
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(transparent 0 3px, #00000028 3px 4px);
  box-shadow: inset 0 0 2.2rem #03101673;
  opacity: .58;
}
.clean-screen .screen::after { display: none; }

.hero, .game-hero {
  display: flex;
  align-items: end;
  background-repeat: no-repeat;
  background-size: cover;
}
.hero {
  min-height: clamp(365px, 49vw, 585px);
  padding: clamp(1.3rem, 6vw, 4.5rem);
  background-color: #102130;
  background-position: 55% center;
  background-image:
    linear-gradient(90deg, #071520f0 1%, #081927bb 36%, transparent 85%),
    linear-gradient(0deg, #081624 1%, #08162430 60%, transparent 95%),
    url("media/atelier-gaeldk.jpg");
}
.hero h1 {
  margin-bottom: 1.05rem;
  font-size: clamp(3rem, 9.1vw, 7.5rem);
  line-height: .87;
  letter-spacing: -.07em;
  text-shadow: 0 0 22px #091725;
}
.hero h1 em {
  color: var(--accent);
  font-size: .76em;
  font-style: normal;
  font-weight: 430;
  letter-spacing: -.07em;
}
.hero p:not(.label) {
  max-width: 27em;
  margin-bottom: 1.35rem;
  color: #d7ecf4;
  font-size: clamp(1rem, 2vw, 1.2rem);
}
.label { font-size: .88rem; font-weight: 750; letter-spacing: .1em; }
.game-hero {
  min-height: 410px;
  padding: clamp(1.25rem, 5vw, 3.8rem);
  border: 1px solid var(--edge);
  border-radius: .75rem;
  background-color: #101725;
  background-position: 60% center;
  background-image:
    linear-gradient(90deg, #0b1421 7%, #101827ed 35%, #10182732),
    linear-gradient(0deg, #0b1421, transparent 65%),
    url("media/side42-1.webp");
}
.game-hero h2 span {
  display: block;
  color: var(--cyan-light);
  font-size: .55em;
  font-weight: 500;
  letter-spacing: -.02em;
}

.content { padding: clamp(1.15rem, 5vw, 4rem); }
.content > .action { margin-top: 1.25rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.card {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--edge);
  border-radius: .55rem;
  background: var(--panel);
}
.feature-block {
  border-top: 1px solid var(--line);
  margin-top: clamp(2rem, 5vw, 4.5rem);
  padding-top: clamp(1.4rem, 4vw, 2.8rem);
}
.lede, .book-intro { max-width: 65ch; color: #c4d6e0; }
.links { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1.15rem; margin-top: 1.25rem; }
.links > a:not(.action), .directory a, .credit a, .clip a, #original {
  color: var(--cyan-light);
  text-underline-offset: .22em;
}
.secondary { background: transparent; }
.directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr));
  gap: .3rem 1rem;
  padding: 0;
  list-style: none;
}
.directory a { display: block; padding-block: .45rem; }
.bio { max-width: 48rem; }
.bio p { font-size: 1.1rem; }
.book-feature {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3rem);
}
.book-feature img { width: 100%; height: auto; }
.editions { margin-top: 1.5rem; }
.editions .card { display: flex; flex-direction: column; align-items: start; }
.editions .action { margin-top: auto; }
.price { color: var(--accent); font-family: var(--mono); font-size: 1.5rem; font-weight: 750; }
.digital {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .7rem 1.3rem;
  margin-top: 1.15rem;
}
.digital h3, .digital p { margin: 0; }
.credit { margin: 1.15rem 0 0; color: var(--muted); font-size: .875rem; }
footer { min-height: 4rem; color: var(--muted); font-size: .86rem; }

@media (max-width: 700px) {
  nav small { display: none; }
  .grid { grid-template-columns: 1fr; }
  .book-feature { grid-template-columns: 1fr; }
  .book-feature figure { width: min(57%, 175px); }
  .hero { background-position: 58% center; }
}
@media (max-width: 600px) {
  #channels a { justify-content: center; flex: 1 1 auto; padding-inline: .5rem; }
  .deck-controls .deck-foot { margin-left: auto; }
  .game-hero { padding: 1rem; }
}
