/* FangFeed's wiki, in the game's look: the night palette (its colours come from the
   game's data, set on :root by the layout), its pixel fonts at whole multiples of their
   em, hard pixel edges, no rounded corner, no blur, no gradient. */

@font-face {
  font-family: 'Departure Mono';
  src: url(fonts/DepartureMono-Regular.otf) format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Greybeard';
  src: url(fonts/Greybeard-16px.ttf) format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'FangFeed Drip';
  src: url(fonts/FangFeedDrip.ttf) format('truetype');
  font-display: swap;
}

:root {
  /* One frame pixel: the width of an edge. */
  --u: 2px;
  --body: 'Greybeard', 'Departure Mono', monospace;
  --mono: 'Departure Mono', monospace;
  --drip: 'FangFeed Drip', 'Departure Mono', monospace;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--text);
  font: 16px/20px var(--body);
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: never;
  overflow-wrap: break-word;
}

img,
.sprite {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

a {
  color: var(--head);
  text-decoration: underline;
  text-decoration-thickness: var(--u);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--bright);
}
:focus-visible {
  outline: var(--u) solid var(--head);
  outline-offset: var(--u);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: normal;
}
h1 {
  font: 24px/32px var(--drip);
  color: var(--head);
}
h2 {
  font: 24px/32px var(--drip);
  color: var(--head);
}
h3 {
  font: 22px/24px var(--mono);
  color: var(--bright);
}
p {
  margin: 0 0 12px;
}
p:last-child {
  margin-bottom: 0;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 8px;
  top: 8px;
  z-index: 10;
  background: var(--face);
  padding: 8px;
}

/* The header band and the bottom bar, as a menu screen's in the game. */
.band {
  background: var(--band);
  border-bottom: var(--u) solid var(--line);
}
.band-in {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 8px 16px;
  min-height: 56px;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--head);
  min-height: 44px;
  align-items: center;
}
.logo-name {
  font: 24px/32px var(--drip);
}
.logo-tag {
  font: 11px/11px var(--mono);
  color: var(--bright);
  background: var(--edge-red);
  padding: 3px 4px 2px;
}
.nav {
  display: none;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-left: auto;
}
.nav a {
  font: 16px/20px var(--body);
  color: var(--text);
  text-decoration: none;
  padding: 12px 0;
}
.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--head);
}
.band-keys {
  display: none;
  gap: 12px;
  align-items: center;
}

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  background: var(--band);
  border-top: var(--u) solid var(--line);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 10px;
}
.bar-space {
  height: calc(80px + env(safe-area-inset-bottom));
}

/* A key: a control's face, its edge and its lip, with notched pixel corners. */
.key {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin: var(--u) var(--u) calc(3 * var(--u));
  padding: 6px 12px;
  border: 0;
  background: var(--face);
  color: var(--bright);
  font: 16px/20px var(--body);
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--edge),
    calc(-1 * var(--u)) 0 0 0 var(--edge),
    var(--u) 0 0 0 var(--edge),
    0 var(--u) 0 0 var(--edge),
    0 calc(3 * var(--u)) 0 0 var(--lip);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.key:hover {
  color: var(--bright);
}
.key:active {
  background: var(--pressed);
  transform: translateY(calc(2 * var(--u)));
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--edge),
    calc(-1 * var(--u)) 0 0 0 var(--edge),
    var(--u) 0 0 0 var(--edge),
    0 var(--u) 0 0 var(--edge),
    0 var(--u) 0 0 var(--lip);
}
.key[aria-pressed='true'],
.key[aria-checked='true'],
.pick[data-chosen] > .key {
  background: var(--pressed);
  color: var(--head);
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--head),
    calc(-1 * var(--u)) 0 0 0 var(--head),
    var(--u) 0 0 0 var(--head),
    0 var(--u) 0 0 var(--head),
    0 calc(3 * var(--u)) 0 0 var(--lip);
}
.key-icon {
  width: 16px;
  height: 16px;
  flex: none;
}

/* A panel: a card over the night, with an edge and a hard shadow. */
.panel {
  margin: 0 var(--u) calc(4 * var(--u) + 16px);
  padding: 16px;
  background: var(--face);
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--edge),
    calc(-1 * var(--u)) 0 0 0 var(--edge),
    var(--u) 0 0 0 var(--edge),
    0 var(--u) 0 0 var(--edge),
    calc(2 * var(--u)) calc(4 * var(--u)) 0 0 var(--shadow);
}
.panel > h2 {
  margin-bottom: 12px;
}
.panel-red {
  --edge: var(--edge-red);
}

main {
  display: block;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 16px 24px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 12px;
  font: 16px/20px var(--body);
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  margin: var(--u);
  background: var(--face);
  color: var(--bright);
  text-decoration: none;
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--lip),
    calc(-1 * var(--u)) 0 0 0 var(--lip),
    var(--u) 0 0 0 var(--lip),
    0 var(--u) 0 0 var(--lip);
}
.crumbs a:hover {
  color: var(--head);
}

.lede {
  color: var(--bright);
}
.quote {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-left: calc(2 * var(--u)) solid var(--edge-red);
  background: var(--pressed);
  color: var(--text);
}
.tag {
  display: inline-block;
  font: 11px/11px var(--mono);
  padding: 4px 5px 3px;
  color: var(--pressed);
  background: var(--text);
  text-transform: uppercase;
  white-space: nowrap;
}
.tag-weapon {
  background: var(--red);
}
.tag-passive {
  background: var(--green);
}
.tag-duet,
.tag-fusion {
  background: var(--gold);
}
.tag-live {
  background: var(--live);
}
.tag-secret {
  background: var(--head);
}
.tag-r0 {
  background: var(--r0);
}
.tag-r1 {
  background: var(--r1);
}
.tag-r2 {
  background: var(--r2);
}
.tag-r3 {
  background: var(--r3);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

/* An entry's head: the sprite on its stage, the name, the kind, the game's lines. */
.hero {
  display: grid;
  gap: 16px;
  align-items: center;
  margin: 0 0 24px;
}
.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 16px;
  background: var(--pressed);
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--edge),
    calc(-1 * var(--u)) 0 0 0 var(--edge),
    var(--u) 0 0 0 var(--edge),
    0 var(--u) 0 0 var(--edge);
  margin: var(--u);
  background-color: var(--face);
  background-repeat: repeat;
  background-size: 256px 256px;
  overflow: hidden;
}
.stage.scene-ground {
  background-repeat: no-repeat;
  background-size: auto;
  background-position: 50% 62%;
}
.hero-text h1 {
  margin: 4px 0 8px;
}

/* A sprite at a whole scale (--sp on a phone, --sw on a desktop): a still, or a sheet's
   move loop that CSS steps through, frame by frame. */
.sprite {
  --s: var(--sp);
  display: block;
  flex: none;
  width: calc(var(--fw) * var(--s));
  height: calc(var(--fh) * var(--s));
}
.sheet {
  background-repeat: no-repeat;
  background-size: calc(var(--cols) * var(--fw) * var(--s)) calc(var(--rows) * var(--fh) * var(--s));
  background-position: 0 calc(var(--row) * var(--fh) * var(--s) * -1);
}
.sheet.plays {
  animation: play var(--secs) steps(var(--frames)) infinite;
}
@keyframes play {
  from {
    background-position-x: 0;
  }
  to {
    background-position-x: calc(var(--frames) * var(--fw) * var(--s) * -1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sheet.plays {
    animation: none;
  }
  .key:active,
  .card:active {
    transform: none;
  }
}

/* A grid of cards: two a row on a phone. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  min-height: 44px;
  margin: var(--u) var(--u) calc(3 * var(--u));
  padding: 12px 8px;
  background: var(--face);
  color: var(--bright);
  text-align: center;
  text-decoration: none;
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--edge),
    calc(-1 * var(--u)) 0 0 0 var(--edge),
    var(--u) 0 0 0 var(--edge),
    0 var(--u) 0 0 var(--edge),
    0 calc(3 * var(--u)) 0 0 var(--lip);
}
.card:hover {
  --edge: var(--head);
  color: var(--bright);
}
.card:active {
  background: var(--pressed);
  transform: translateY(calc(2 * var(--u)));
}
.card-sprite {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
}
.card-name {
  font: 16px/20px var(--body);
}
.card-line {
  color: var(--text);
  font: 16px/20px var(--body);
}
.card .tags {
  justify-content: center;
  margin: 0;
}

/* The filters: a row of chips over an index. */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 16px;
}
.filters-name {
  width: 100%;
  font: 16px/20px var(--body);
  color: var(--text);
}
.filters .key {
  padding: 6px 10px;
}
.count {
  margin: 0 0 12px;
  color: var(--text);
}
[hidden] {
  display: none !important;
}

/* Tables: a weapon's numbers by level, the Hours, the Formats. */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font: 16px/20px var(--body);
}
th,
td {
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
  border-bottom: var(--u) solid var(--pressed);
}
thead th {
  color: var(--head);
  border-bottom-color: var(--line);
}
td.n,
th.n {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
tbody th {
  color: var(--text);
  font-weight: normal;
}
td {
  color: var(--bright);
}

/* A row of linked things: a recipe, an attack, a part. */
.rows {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}
.row-text {
  min-width: 0;
}
.row-name {
  color: var(--bright);
}
.recipe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.op {
  font: 22px/24px var(--mono);
  color: var(--text);
}
.recipe-needs {
  width: 100%;
  color: var(--text);
}
.recipe-panel .rows {
  margin-bottom: 8px;
}
.recipes {
  grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
  gap: 0 12px;
}
.recipes > li {
  margin-bottom: 16px;
}

/* A boss's phases: what each one adds, linked to how to read it. */
.phases {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.phase-head {
  display: block;
  color: var(--bright);
  margin-bottom: 8px;
}
.phase-hp {
  color: var(--text);
}
.phase-line {
  margin: 0 0 6px;
  color: var(--text);
}
.flat {
  display: inline-block;
  padding: 4px 8px;
  background: var(--pressed);
  color: var(--text);
  text-decoration: line-through;
}

/* The Formats on the night page. */
.format {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding-bottom: 12px;
  border-bottom: var(--u) solid var(--pressed);
}
.format-base {
  color: var(--head);
  font-variant-numeric: tabular-nums;
}
.format-how {
  grid-column: 1 / -1;
  color: var(--text);
}
.scenes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
/* A scene at its own size, cropped to its middle: never scaled below a whole pixel. */
.scene {
  width: 100%;
  height: 320px;
  object-fit: none;
  object-position: 50% 60%;
  background: var(--pressed);
}
.unlock {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 0;
}
.unlock-rows {
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 16px 12px;
}
.grid-big {
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
}
.thumb {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  width: 80px;
  min-height: 44px;
  text-decoration: none;
  color: var(--bright);
}
.thumb span {
  font: 16px/20px var(--body);
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0;
}
.facts dt {
  color: var(--text);
}
.facts dd {
  margin: 0;
  color: var(--bright);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  background: var(--pressed);
  color: var(--bright);
  text-decoration: none;
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--lip),
    calc(-1 * var(--u)) 0 0 0 var(--lip),
    var(--u) 0 0 0 var(--lip),
    0 var(--u) 0 0 var(--lip);
  margin: var(--u);
}
a.chip:hover {
  color: var(--head);
}

/* Prose: the hand-written lines, in the game's voice. */
.prose h2 {
  margin: 20px 0 8px;
}
.prose h3 {
  margin: 16px 0 8px;
  color: var(--head);
}
.prose ul {
  margin: 0 0 12px;
  padding-left: 20px;
}
.prose li {
  margin-bottom: 6px;
}
.prose strong {
  color: var(--bright);
  font-weight: normal;
}

/* Sections of a long index, each with its own ground: a niche's floor. */
.floor {
  display: flex;
  align-items: flex-end;
  min-height: 96px;
  padding: 12px;
  margin: 0 var(--u) 16px;
  background-repeat: repeat;
  background-size: 128px 128px;
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--edge),
    calc(-1 * var(--u)) 0 0 0 var(--edge),
    var(--u) 0 0 0 var(--edge),
    0 var(--u) 0 0 var(--edge);
}
.floor h2 {
  display: inline-block;
  padding: 4px 10px 0;
  background: var(--pressed);
  box-shadow: 0 calc(-2 * var(--u)) 0 0 var(--accent, var(--edge));
}
.section {
  margin: 0 0 32px;
}
.section > h2 {
  margin: 0 0 12px;
}

/* The home page. */
.hero-art {
  position: relative;
  margin: -16px -16px 16px;
  height: 300px;
  background-color: var(--shadow);
  background-repeat: no-repeat;
  background-position: 50% 42%;
  background-size: 360px 688px;
  border-bottom: var(--u) solid var(--line);
}
.hero-title {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
}
.hero-title h1 {
  font: 48px/56px var(--drip);
  display: inline-block;
  background: var(--night);
  padding: 4px 12px 0;
  box-shadow: 0 calc(-2 * var(--u)) 0 0 var(--edge-red);
}
.pitch {
  color: var(--bright);
  max-width: 60ch;
}
.search-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 16px 0;
}
.field {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  margin: var(--u);
  padding: 8px 12px;
  border: 0;
  background: var(--pressed);
  color: var(--bright);
  font: 16px/20px var(--body);
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--edge),
    calc(-1 * var(--u)) 0 0 0 var(--edge),
    var(--u) 0 0 0 var(--edge),
    0 var(--u) 0 0 var(--edge);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.field::placeholder {
  color: var(--text);
  opacity: 1;
}
.kind-count {
  color: var(--text);
}

/* Search results. */
.results {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.result {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  margin: var(--u) var(--u) calc(3 * var(--u));
  background: var(--face);
  color: var(--bright);
  text-decoration: none;
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--edge),
    calc(-1 * var(--u)) 0 0 0 var(--edge),
    var(--u) 0 0 0 var(--edge),
    0 var(--u) 0 0 var(--edge),
    0 calc(3 * var(--u)) 0 0 var(--lip);
}
.result:hover {
  --edge: var(--head);
}
.result img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.result-text {
  min-width: 0;
}
.result-line {
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-line mark {
  background: none;
  color: var(--head);
}

/* Spoilers: a secret is gone from indexes, links and search while the switch is off. */
html[data-spoilers='off'] .is-spoiler {
  display: none !important;
}
html[data-spoilers='on'] .if-spoilers-off {
  display: none !important;
}
.secret-cover {
  text-align: center;
}
.secret-cover .key {
  margin-top: 16px;
}

footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 16px 24px;
  color: var(--text);
  border-top: var(--u) solid var(--pressed);
}

/* A desktop: the nav in the band, no bottom bar, more cards a row. */
@media (min-width: 900px) {
  .nav,
  .band-keys {
    display: flex;
  }
  .bar,
  .bar-space {
    display: none;
  }
  main {
    padding: 24px 32px 40px;
  }
  .band-in {
    padding: 8px 32px;
  }
  h1 {
    font: 48px/56px var(--drip);
  }
  .hero {
    grid-template-columns: minmax(280px, 400px) 1fr;
    gap: 32px;
  }
  .stage {
    min-height: 280px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  .sprite {
    --s: var(--sw);
  }
  .split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
    align-items: start;
  }
  .hero-art {
    margin: -24px -32px 24px;
    height: 420px;
    background-size: 720px 1376px;
    background-position: 50% 40%;
  }
  .hero-title {
    left: 32px;
    bottom: 32px;
  }
  .hero-title h1 {
    font: 96px/104px var(--drip);
  }
  .filters-name {
    width: auto;
    margin-right: 8px;
  }
}

.prose > h2:first-child {
  margin-top: 0;
}

/* Round two ([112]'s judges). */
.grid {
  margin-bottom: 24px;
}
.recipe {
  align-items: flex-end;
}
.equation {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.equation .thumb {
  flex: 1 1 0;
  min-width: 0;
  max-width: 96px;
  width: auto;
}
.equation .op {
  margin-top: 20px;
  flex: none;
}
.thumb-box {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.recipe-needs {
  margin: 8px 0 0;
}
.panel h3:not(.prose h3) {
  margin: 20px 0 8px;
  font: 16px/20px var(--body);
  color: var(--text);
}
.hero-text > p:not(.lede):not(.quote) {
  margin-top: 12px;
}
.prose p,
.prose li {
  max-width: 70ch;
}
.result-kind {
  display: block;
  color: var(--head);
}
.results,
footer p {
  max-width: 80ch;
}
footer p {
  margin: 0 0 8px;
}
/* The site's own pages ([386]): a key's height for the thumb. */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
/* A page of text, as wide as its lines with the panel's padding. */
.doc {
  max-width: calc(70ch + 32px);
}
.way {
  padding: 12px 0;
  border-bottom: var(--u) solid var(--pressed);
}
.ways {
  margin: 0;
  padding: 0;
  list-style: none;
}
.way-how {
  color: var(--bright);
  margin-bottom: 8px;
}
.icons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--face);
}
.icon:hover {
  background: var(--pressed);
}

/* Home: the art, the name and search on the first screen, then the kinds. */
.home-top .hero-art {
  position: static;
  height: 180px;
  margin: -16px -16px 12px;
  background-position: 50% 38%;
}
.home-title {
  font: 48px/56px var(--drip);
  margin: 0;
}
.home-top .search-form {
  margin: 8px 0 16px;
}
.home-pitch-wide {
  display: none;
}
.kinds {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.kind {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  margin: var(--u) var(--u) calc(3 * var(--u));
  padding: 4px 12px 4px 4px;
  background: var(--face);
  color: var(--bright);
  text-decoration: none;
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--edge),
    calc(-1 * var(--u)) 0 0 0 var(--edge),
    var(--u) 0 0 0 var(--edge),
    0 var(--u) 0 0 var(--edge),
    0 calc(3 * var(--u)) 0 0 var(--lip);
}
.kind:hover {
  --edge: var(--head);
}
.kind:active {
  background: var(--pressed);
}
.kind-sprite {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
}
.kind-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

@media (min-width: 900px) {
  .home-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: end;
    margin: -24px -32px 32px;
    padding: 0 32px 0 0;
    border-bottom: var(--u) solid var(--line);
  }
  .home-top .hero-art {
    height: 520px;
    margin: 0;
    border: 0;
    background-size: 720px 1376px;
    background-position: 50% 36%;
  }
  .home-intro {
    padding-bottom: 32px;
  }
  .home-title {
    font: 96px/104px var(--drip);
  }
  .home-pitch-wide {
    display: block;
  }
  .home-pitch-phone {
    display: none;
  }
  .kinds {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px 12px;
  }
  .kind {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    height: 100%;
    padding: 16px 8px;
  }
  .kind-sprite {
    height: 128px;
  }
  .kind .kind-text {
    align-items: center;
  }
  .prose-columns {
    columns: 2;
    column-gap: 40px;
  }
  /* The lede flows into the first column, so the second starts as high ([379]). */
  .prose-columns > h2 {
    column-span: all;
  }
  .prose-columns > h3 {
    break-after: avoid;
  }
  .prose-columns > p {
    break-inside: avoid;
  }
  .by-hour {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
  }
  .by-hour .section-wide {
    grid-column: 1 / -1;
  }
  .by-hour .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .hours table {
    max-width: 900px;
  }
}
.way-one {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  color: var(--bright);
  text-decoration: none;
}
.way-one:hover .row-name {
  color: var(--head);
}
.way:has(.way-one) {
  padding: 6px 0;
}
@media (min-width: 900px) {
  .ways {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 0 40px;
  }
  .way:not(:has(.way-one)) {
    grid-column: 1 / -1;
  }
  #bosses .grid {
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  }
  #bestiary .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  footer {
    padding: 16px 32px 24px;
  }
  .results {
    grid-template-columns: 1fr 1fr;
    max-width: none;
  }
  .prose-columns > h3 {
    margin-top: 0;
  }
}

/* A row of bosses: each at 1x in a box as big as the largest (96), names apart. */
.boss-row {
  gap: 8px 16px;
}
tr.has-bosses th,
tr.has-bosses td {
  border-bottom: 0;
}
.hour-bosses-row td {
  padding-top: 0;
}

/* [379]: the judge's minor notes, the recipes' ingredient list and the phone's menu. */
/* A list key: a select in a key's frame, its arrow drawn in frame pixels. */
.pick {
  position: relative;
  display: inline-block;
  max-width: 100%;
  color: var(--bright);
}
.pick[data-chosen] {
  color: var(--head);
}
.pick select.key {
  -webkit-appearance: none;
  appearance: none;
  max-width: 100%;
  padding-right: 36px;
  border-radius: 0;
  text-align: left;
}
.pick select.key option,
.pick select.key optgroup {
  background: var(--face);
  color: var(--bright);
}
.pick::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 25px;
  width: var(--u);
  height: var(--u);
  background: currentColor;
  pointer-events: none;
  box-shadow:
    calc(-2 * var(--u)) calc(-2 * var(--u)) 0 0,
    calc(-1 * var(--u)) calc(-2 * var(--u)) 0 0,
    0 calc(-2 * var(--u)) 0 0,
    var(--u) calc(-2 * var(--u)) 0 0,
    calc(2 * var(--u)) calc(-2 * var(--u)) 0 0,
    calc(-1 * var(--u)) calc(-1 * var(--u)) 0 0,
    0 calc(-1 * var(--u)) 0 0,
    var(--u) calc(-1 * var(--u)) 0 0;
}
/* The phone's menu: the sections, over the bar. */
.menu[popover] {
  position: fixed;
  inset: auto 16px calc(70px + env(safe-area-inset-bottom)) 16px;
  width: auto;
  height: auto;
  max-height: calc(100vh - 120px);
  margin: 0;
  padding: 8px;
  overflow: auto;
  border: 0;
  background: var(--band);
  color: var(--bright);
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--line),
    calc(-1 * var(--u)) 0 0 0 var(--line),
    var(--u) 0 0 0 var(--line),
    0 var(--u) 0 0 var(--line);
}
.menu:popover-open {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--text);
  font: 16px/20px var(--body);
  text-decoration: none;
}
.menu a:hover,
.menu a[aria-current='page'] {
  color: var(--head);
}
/* The phone's hero: the art at 1x in a frame inside the gutters, no wider than the art
   (360), so no dark strip shows at its sides. */
.home-top .hero-art {
  max-width: 360px;
  height: 200px;
  margin: var(--u) auto 16px;
  border: 0;
  background-size: 360px 688px;
  background-position: 50% 38%;
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--edge),
    calc(-1 * var(--u)) 0 0 0 var(--edge),
    var(--u) 0 0 0 var(--edge),
    0 var(--u) 0 0 var(--edge),
    calc(2 * var(--u)) calc(4 * var(--u)) 0 0 var(--shadow);
}
/* A card's tags at its foot, so the tags of a row line up. */
.card .tags {
  margin-top: auto;
}
/* A row of search results: each as tall as the row. */
.results > li {
  display: grid;
}
/* The key art is pixel art at a whole scale (1x, 2x on a desktop). */
.hero-art {
  image-rendering: pixelated;
}
@media (min-width: 900px) {
  .menu[popover] {
    display: none;
  }
  .home-top .hero-art {
    max-width: none;
    height: 520px;
    margin: 0;
    background-size: 720px 1376px;
    background-position: 50% 36%;
    box-shadow: none;
  }
  /* The kinds: sprite, then name and line from the same top, the count at the foot. */
  .kind {
    grid-template-rows: auto 1fr auto;
    align-items: start;
  }
  .kind > .tag {
    align-self: end;
  }
  /* Two Hours side by side: their cards as tall as each other's. */
  .by-hour > .section {
    display: flex;
    flex-direction: column;
  }
  .by-hour > .section > .grid {
    flex: 1 0 auto;
  }
}
/* A weapon's numbers at every level: the label wraps, the number at the right. */
.facts-fixed {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 6px;
}
.facts-fixed dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
