/*
 * Waddle Inn landing site. Tokens, buttons, panels, the sky backdrop, the floe and the
 * parade come from the game's own stylesheet (client/src/ui/styles.css) by way of the
 * coming-soon page (site/css/site.css), so the site looks like the game's login screen.
 *
 * build.mjs joins base.css, sky.css, site.css, manual.css and the generated sprite
 * classes into one dist/css/site.css. No inline styles anywhere: the pages run under
 * a CSP with style-src 'self'.
 */

@font-face {
  font-family: 'Fredoka Variable';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/fredoka-latin-wght.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('../fonts/nunito-latin-wght.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito Variable';
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url('../fonts/nunito-latin-wght-italic.woff2') format('woff2');
}

:root {
  --bg: #071226;
  --panel: #14284b;
  --panel-2: #1c355f;
  --well: rgba(3, 10, 26, 0.45);
  --glass: linear-gradient(180deg, rgba(32, 56, 96, 0.92), rgba(14, 28, 54, 0.94));
  --line: rgba(150, 200, 255, 0.16);
  --line-strong: rgba(150, 200, 255, 0.3);
  --ice: #9fd8ff;
  --ice-strong: #5cbcf5;
  --text: #eef6ff;
  --muted: #93abc9;
  --accent: #ffad33;
  --accent-2: #ff8a1f;
  --accent-dark: #b85c00;
  --good: #7be08f;
  --danger: #ff7a7a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --font-display: 'Fredoka Variable', 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito Variable', 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  color-scheme: dark;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
  /* the game's .sky backdrop, held still behind the page */
  background:
    radial-gradient(ellipse 90% 55% at 50% 115%, rgba(40, 110, 180, 0.45), transparent 70%),
    linear-gradient(180deg, #040916 0%, #0a1834 50%, #112a52 100%);
  background-attachment: fixed;
  background-color: var(--bg);
}
main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
}
.pixel {
  image-rendering: pixelated;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
p {
  margin: 0;
}
a {
  color: var(--ice);
  text-underline-offset: 2px;
}
a:hover {
  color: #fff;
}
strong {
  font-weight: 800;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 8px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffc251, var(--accent-2));
  color: #3a1a00;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}


/* Sky backdrop, buttons and icon buttons: copied from site/css/site.css (the game's own look). */


/* ---------- sky backdrop (aurora, stars, snow), as in the game ---------- */

.sky-layers {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora {
  position: absolute;
  left: -15%;
  right: -15%;
  top: -10%;
  height: 65%;
  background:
    radial-gradient(ellipse 30% 45% at 22% 45%, rgba(70, 255, 190, 0.2), transparent 70%),
    radial-gradient(ellipse 28% 40% at 52% 30%, rgba(80, 170, 255, 0.22), transparent 70%),
    radial-gradient(ellipse 26% 42% at 80% 48%, rgba(190, 110, 255, 0.16), transparent 70%);
  filter: blur(24px);
  animation: aurora 22s ease-in-out infinite alternate;
}
@keyframes aurora {
  from {
    transform: translateX(-5%) skewX(-8deg);
    opacity: 0.8;
  }
  to {
    transform: translateX(5%) skewX(8deg);
    opacity: 1;
  }
}
.stars,
.stars::after {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 60%),
    radial-gradient(1px 1px at 37% 62%, #dbefff 50%, transparent 60%),
    radial-gradient(1.4px 1.4px at 68% 12%, #fff 50%, transparent 60%),
    radial-gradient(1px 1px at 84% 44%, #cfe8ff 50%, transparent 60%),
    radial-gradient(1px 1px at 52% 84%, #fff 50%, transparent 60%),
    radial-gradient(1.2px 1.2px at 6% 72%, #e6f4ff 50%, transparent 60%);
  background-size: 260px 220px;
}
.stars {
  opacity: 0.75;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
}
.stars::after {
  content: '';
  background-size: 370px 300px;
  background-position: 120px 70px;
  animation: twinkle 4.5s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from {
    opacity: 0.2;
  }
  to {
    opacity: 1;
  }
}
.snow,
.snow::after {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, 0.85) 50%, transparent 60%),
    radial-gradient(1.5px 1.5px at 30% 70%, rgba(255, 255, 255, 0.7) 50%, transparent 60%),
    radial-gradient(2.5px 2.5px at 55% 40%, rgba(255, 255, 255, 0.8) 50%, transparent 60%),
    radial-gradient(1.5px 1.5px at 75% 85%, rgba(255, 255, 255, 0.65) 50%, transparent 60%),
    radial-gradient(2px 2px at 90% 15%, rgba(255, 255, 255, 0.75) 50%, transparent 60%);
  background-size: 300px 300px;
  animation: snow 24s linear infinite;
}
.snow::after {
  content: '';
  background-size: 460px 460px;
  animation-duration: 36s;
  opacity: 0.6;
  filter: blur(1px);
}
@keyframes snow {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 80px 600px;
  }
}

/* ---------- buttons, as in the game ---------- */

.btn {
  font: inherit;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(180deg, #2a4c86, #1d3766);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 3px 0 #0a1730,
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition:
    transform 0.12s ease,
    filter 0.12s ease,
    box-shadow 0.12s ease;
}
.btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow:
    0 4px 0 #0a1730,
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #0a1730,
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn.primary {
  background: linear-gradient(180deg, #ffc251, var(--accent-2));
  border-color: #ffd28a;
  color: #3a1a00;
  font-weight: 600;
  box-shadow:
    0 3px 0 var(--accent-dark),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn.primary:hover {
  box-shadow:
    0 4px 0 var(--accent-dark),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn.primary:active {
  box-shadow:
    0 1px 0 var(--accent-dark),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
/* the login screen's big "Play as guest" button */
.btn.big {
  font-size: 16px;
  padding: 11px 16px;
}
.btn.primary.big {
  box-shadow:
    0 4px 0 var(--accent-dark),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition:
    background 0.12s ease,
    transform 0.12s ease;
}
.icon-btn:hover {
  background: rgba(159, 216, 255, 0.14);
  transform: translateY(-1px);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ---------- header and navigation ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(7, 18, 38, 0.94), rgba(7, 18, 38, 0.82));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
}
.brand:hover {
  color: var(--text);
}
.brand img {
  width: 32px;
  height: 32px;
}
.main-nav {
  flex: 1;
  min-width: 0;
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 2px;
}
.main-nav a,
.menu-panel a {
  display: block;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
}
.main-nav a:hover,
.menu-panel a:hover {
  color: var(--text);
  background: rgba(159, 216, 255, 0.1);
}
.main-nav a[aria-current='page'],
.menu-panel a[aria-current='page'] {
  color: var(--text);
  background: rgba(159, 216, 255, 0.14);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.top .enter {
  flex: none;
}

/* The phone and tablet menu: a <details>, so it works without any script. */
.menu {
  display: none;
  position: relative;
  flex: none;
}
.menu summary {
  list-style: none;
  cursor: pointer;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu .close-icon,
.menu[open] .open-icon {
  display: none;
}
.menu[open] .close-icon {
  display: block;
}
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(300px, calc(100vw - 32px));
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding: 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, #203860, #0e1c36);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.menu-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.menu-panel a {
  padding: 9px 12px;
  font-size: 16px;
}
.menu-panel .btn {
  width: 100%;
  margin-top: 10px;
}
.menu-panel .socials {
  justify-content: center;
  margin-top: 12px;
}

.socials {
  display: flex;
  gap: 8px;
}

@media (max-width: 1180px) {
  .main-nav {
    display: none;
  }
  .menu {
    display: block;
  }
  .top .enter {
    margin-left: auto;
  }
}
@media (max-width: 480px) {
  .top .enter {
    padding: 7px 12px;
    font-size: 15px;
  }
  .top .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ---------- sprites: the game's animations, played from sheets ---------- */

/*
 * build.mjs writes one class per sheet from src/img/art.json: .sp-NAME sets --w and --h
 * (one frame), --n (frames) and --fps, and the sheet as background. --s is the scale.
 */
.sprite {
  --s: 2;
  display: inline-block;
  flex: none;
  width: calc(var(--w) * var(--s));
  height: calc(var(--h) * var(--s));
  background-repeat: no-repeat;
  background-size: calc(var(--w) * var(--n) * var(--s)) calc(var(--h) * var(--s));
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 2px rgba(0, 40, 80, 0.35));
  animation: frames calc(var(--n) * 1s / var(--fps)) steps(var(--n)) infinite;
}
@keyframes frames {
  from {
    background-position: 0 0;
  }
  to {
    background-position: calc(-1 * var(--w) * var(--n) * var(--s)) 0;
  }
}
.x1 {
  --s: 1;
}
.x15 {
  --s: 1.5;
}
.x2 {
  --s: 2;
}
.x3 {
  --s: 3;
}
img.art {
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 20, 50, 0.4));
}

/* ---------- hero (the login screen's layout) ---------- */

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 56px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
}
.login-hero {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.logo {
  align-self: flex-start;
  width: 484px;
  max-width: 100%;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.55));
}
.logo img {
  display: block;
  width: 100%;
  height: auto;
}
.tagline {
  margin: 6px 0 10px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 2px 20px rgba(92, 188, 245, 0.45);
}
.pitch {
  max-width: 560px;
  font-size: 17px;
  color: #d5e6f8;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.btn.huge {
  font-size: 20px;
  padding: 14px 28px;
  border-radius: 16px;
}
.btn.primary.huge {
  box-shadow:
    0 5px 0 var(--accent-dark),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn.primary.huge:hover {
  box-shadow:
    0 6px 0 var(--accent-dark),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn.primary.huge:active {
  box-shadow:
    0 2px 0 var(--accent-dark),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.hero-note {
  margin-top: 8px;
  font-size: 14px;
}

.login-card {
  width: min(420px, 100%);
  justify-self: end;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.login-card h2 {
  font-size: 26px;
}
.login-lead {
  margin: -6px 0 2px;
  font-size: 14px;
}
.badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  background: rgba(255, 173, 51, 0.14);
  border: 1px solid rgba(255, 173, 51, 0.45);
  color: #ffd28a;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge.ice {
  background: rgba(159, 216, 255, 0.12);
  border-color: rgba(159, 216, 255, 0.4);
  color: var(--ice);
}
.lamp {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: lamp 2.4s ease-in-out infinite alternate;
}
.lamp.green {
  background: var(--good);
  box-shadow: 0 0 10px var(--good);
}
@keyframes lamp {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}
.or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.or::before,
.or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}
.chain-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.chain-row li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--well);
  border: 1px solid var(--line);
  font-size: 14px;
}
.chain-row img {
  width: 24px;
  height: 24px;
  flex: none;
}
.chain-row li > span {
  color: var(--muted);
}
.chain-row strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ice);
}

.colony {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  margin: 0 auto;
}

/* ---------- sections ---------- */

.section {
  padding-top: 56px;
  padding-bottom: 56px;
}
.section.tight {
  padding-top: 28px;
  padding-bottom: 28px;
}
.eyebrow {
  margin-bottom: 6px;
  color: var(--ice);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.section-head {
  text-align: center;
  margin-bottom: 28px;
}
.section-head h2,
.panel h2,
.split h2 {
  font-size: clamp(26px, 4vw, 34px);
  text-shadow: 0 2px 20px rgba(92, 188, 245, 0.35);
}
.section-head p {
  margin: 10px auto 0;
  max-width: 600px;
}

.panel {
  background: var(--glass);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* feature cards on the home page: a stage with art, then the words */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.cards.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  position: relative;
  padding: 20px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card h3 {
  font-size: 19px;
}
.card p {
  font-size: 15px;
}
.card .more {
  margin-top: auto;
  padding-top: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.card .more::after {
  /* the whole card is the link */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
}
.card:hover {
  border-color: rgba(159, 216, 255, 0.5);
}
.card:focus-within {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}
.card .more:focus-visible {
  outline: none;
}
.stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 150px;
  margin: -6px -6px 4px;
  padding: 8px 8px 12px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse 70% 30% at 50% 92%, rgba(207, 232, 251, 0.25), transparent 70%),
    radial-gradient(ellipse 80% 70% at 50% 40%, rgba(92, 188, 245, 0.14), transparent 70%),
    var(--well);
  border: 1px solid var(--line);
  overflow: hidden;
}
.stage img {
  max-height: 100%;
  width: auto;
}
.feature-icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.feature-icon img {
  width: 24px;
  height: 24px;
}
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.features li {
  display: flex;
  gap: 14px;
  align-items: center;
}
.features strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
}
.features .muted {
  display: block;
  font-size: 14px;
  line-height: 1.45;
}

/* Moon Isle teaser with the statue */
.isle-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 32px;
  align-items: center;
  padding: 28px;
  overflow: hidden;
}
.statue {
  margin: 0;
  position: relative;
  text-align: center;
}
.statue::before {
  content: '';
  position: absolute;
  inset: 4% 4% 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 216, 255, 0.28), transparent 68%);
}
.statue img {
  position: relative;
  width: min(100%, 340px);
  height: auto;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.5));
}
.statue figcaption {
  position: relative;
  margin-top: 6px;
  font-size: 13px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stack h3 {
  margin-top: 4px;
  font-size: 15px;
  color: var(--ice);
}
.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--well);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}
.chip img {
  width: 20px;
  height: 20px;
}
.tier::before {
  content: '';
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  background: var(--tier);
  box-shadow: 0 0 8px var(--tier);
}
.t-driftwood {
  --tier: #c08a52;
}
.t-ice {
  --tier: #9fd8ff;
}
.t-moonstone {
  --tier: #cfd8ec;
}
.t-aurora {
  --tier: #7be0b8;
}
.t-starfall {
  --tier: #ffd36b;
}
.t-rime {
  --tier: #bfe6ff;
}
.t-abyss {
  --tier: #b07bff;
}
.lamp-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: rgba(255, 173, 51, 0.1);
  border: 1px solid rgba(255, 173, 51, 0.35);
  color: #ffe2b3;
  font-weight: 700;
}
.lamp-note .lamp {
  flex: none;
}

/* steps to get started */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 18px;
  border-radius: 18px;
  background: var(--well);
  border: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffc251, var(--accent-2));
  color: #3a1a00;
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: 0 3px 0 var(--accent-dark);
}
.steps h3 {
  font-size: 17px;
  margin-bottom: 4px;
}
.steps p {
  font-size: 14px;
}

/* the inn and the closing call */
.doors {
  text-align: center;
}
.inn-frame {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 28px;
  padding: 8px;
}
.inn-frame img {
  display: block;
  width: 640px;
  height: auto;
  border-radius: 14px;
}
.doors p {
  max-width: 560px;
  margin: 12px auto 0;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- feature pages ---------- */

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
  padding-top: 44px;
  padding-bottom: 28px;
}
.page-hero h1 {
  font-size: clamp(34px, 5.5vw, 52px);
  text-shadow: 0 2px 24px rgba(92, 188, 245, 0.45);
}
.page-hero .lede {
  margin-top: 14px;
  font-size: 18px;
  color: #d5e6f8;
  max-width: 600px;
}
.page-hero .hero-cta {
  margin-top: 22px;
}
.hero-art {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 4px 10px;
  min-height: 220px;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 70% 28% at 50% 92%, rgba(207, 232, 251, 0.28), transparent 70%),
    radial-gradient(ellipse 80% 70% at 50% 40%, rgba(92, 188, 245, 0.16), transparent 70%);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.split.flip > :first-child {
  order: 2;
}
.split.wide-art {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}
.prose-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.prose-block p,
.prose-block li {
  color: #d5e6f8;
}
.prose-block ul {
  margin: 0;
  padding-left: 1.2em;
}
.prose-block li + li {
  margin-top: 4px;
}
.prose-block li::marker {
  color: var(--ice-strong);
}
.read-more {
  font-family: var(--font-display);
  font-weight: 600;
}

.art-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 8px 14px;
  padding: 24px 18px;
}
.shot {
  margin: 0;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.shot figcaption,
.cast figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* a row of figures with names under them (creatures, vehicles, igloos, clans) */
.cast {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 200px));
  justify-content: center;
  gap: 14px;
}
.cast.wide {
  grid-template-columns: repeat(auto-fit, minmax(220px, 340px));
}
.cast li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 14px 10px 12px;
  border-radius: 16px;
  background: var(--well);
  border: 1px solid var(--line);
}
.cast .pic {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 140px;
  width: 100%;
}
.cast.tall .pic {
  height: 200px;
}
.cast.short .pic {
  height: 90px;
}
.cast .pic img {
  max-height: 100%;
  width: auto;
}
.cast strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
}
.cast span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.cast .tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(159, 216, 255, 0.1);
  border: 1px solid var(--line);
  color: var(--ice);
  font-weight: 700;
  font-size: 12px;
}

/* key numbers */
.facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.facts div {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--well);
  border: 1px solid var(--line);
}
.facts dt {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
}
.facts dd {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

/* data tables on the feature pages and in the manual */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--well);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  padding: 9px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ice);
  background: rgba(159, 216, 255, 0.07);
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
.al-center {
  text-align: center;
}
.al-right {
  text-align: right;
}
.al-left {
  text-align: left;
}

/* the closing band of a feature page */
.next-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px;
}
.next-band h2 {
  font-size: 24px;
}
.next-band p {
  margin-top: 4px;
}
.next-band .cta {
  margin: 0;
}

/* FAQ */
.faq {
  display: grid;
  gap: 10px;
  max-width: 820px;
  margin: 0 auto;
}
.faq details {
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--line-strong);
}
.faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(159, 216, 255, 0.12);
  color: var(--ice);
  font-size: 20px;
  line-height: 1;
}
.faq details[open] summary::after {
  content: '−';
}
.faq .answer {
  padding: 0 20px 18px;
  color: #d5e6f8;
}
.faq .answer p + p {
  margin-top: 10px;
}
.faq-group {
  max-width: 820px;
  margin: 34px auto 12px;
  font-size: 22px;
  color: var(--ice);
}

/* 404 */
.lost {
  text-align: center;
  padding-top: 60px;
  padding-bottom: 40px;
}
.lost h1 {
  font-size: clamp(34px, 6vw, 56px);
  margin-top: 14px;
}
.lost p {
  max-width: 520px;
  margin: 12px auto 0;
}

/* ---------- footer: the login screen's ice floe and parade ---------- */

.foot {
  position: relative;
  margin-top: 40px;
  padding-top: 150px;
}
.parade {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1;
  height: 150px;
  overflow: hidden;
  pointer-events: none;
}
.parader {
  position: absolute;
  left: 0;
  bottom: 0;
  animation: waddle 26s linear infinite;
}
.parader .sprite {
  --s: 1.5;
}
.parader:nth-child(2) {
  animation-delay: -6.5s;
}
.parader:nth-child(3) {
  animation-delay: -13s;
}
.parader:nth-child(4) {
  animation-delay: -19.5s;
}
@keyframes waddle {
  from {
    transform: translateX(-100px);
  }
  to {
    transform: translateX(calc(100vw + 100px));
  }
}
.floe {
  position: absolute;
  left: 0;
  top: 96px;
  width: 100%;
  height: 110px;
  filter: drop-shadow(0 -8px 24px rgba(120, 200, 255, 0.25));
}
.floe path {
  fill: #cfe8fb;
}
.floe path.floe-edge {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.foot-ice {
  position: relative;
  background: #cfe8fb;
  color: #14284b;
  padding: 64px 0 28px;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.foot-brand p {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #2b4c7e;
  max-width: 300px;
}
.foot-brand .brand {
  color: #14284b;
}
.foot-brand .socials {
  margin-top: 14px;
}
.foot .icon-btn {
  color: #14284b;
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(20, 40, 75, 0.2);
  box-shadow: 0 4px 10px rgba(20, 40, 75, 0.15);
}
.foot .icon-btn:hover {
  background: #fff;
}
.foot h2 {
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2b4c7e;
  margin-bottom: 8px;
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.foot ul a {
  color: #14284b;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.foot ul a:hover {
  text-decoration: underline;
}
.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(20, 40, 75, 0.15);
  font-size: 14px;
  font-weight: 700;
}
.foot-bottom .foot-note {
  font-weight: 600;
  color: #2b4c7e;
}
.foot :focus-visible {
  outline-color: #14284b;
}

/* ---------- smaller screens ---------- */

@media (max-width: 960px) {
  .cards.four,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .foot-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 860px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    justify-items: center;
    padding-top: 20px;
  }
  .login-hero {
    width: 100%;
    text-align: center;
    align-items: center;
  }
  .logo {
    align-self: center;
  }
  .hero-cta {
    justify-content: center;
  }
  .login-card {
    justify-self: center;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .isle-panel,
  .page-hero,
  .split,
  .split.wide-art {
    grid-template-columns: 1fr;
  }
  .split.flip > :first-child {
    order: 0;
  }
  .page-hero {
    gap: 20px;
    padding-top: 28px;
  }
  .statue img {
    width: min(100%, 260px);
  }
}
@media (max-width: 620px) {
  .tagline {
    font-size: 24px;
  }
  .colony {
    gap: 0;
  }
  .colony .sprite {
    --s: 1;
  }
  .cards,
  .cards.four,
  .steps {
    grid-template-columns: 1fr;
  }
  .section {
    padding-top: 36px;
    padding-bottom: 36px;
  }
  .login-card,
  .isle-panel,
  .next-band {
    padding: 20px;
  }
  .inn-frame {
    padding: 6px;
  }
  .inn-frame img {
    border-radius: 10px;
  }
  .hero-cta .btn,
  .cta .btn {
    flex: 1 1 auto;
  }
  .btn.huge {
    font-size: 18px;
    padding: 13px 20px;
  }
  .hero-art .sprite.x3 {
    --s: 2;
  }
  .hero-art .sprite.x2 {
    --s: 1.5;
  }
  .cast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .cast.wide {
    grid-template-columns: 1fr;
  }
  .cast .pic {
    height: 110px;
  }
  .cast.tall .pic {
    height: 160px;
  }
  .cast .sprite.x2 {
    --s: 1.5;
  }
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  th,
  td {
    padding: 8px 10px;
    font-size: 14px;
  }
}
@media (max-width: 420px) {
  .colony .sprite:nth-child(n + 6) {
    display: none;
  }
}

/* As in the game: no motion at all, and the parade stays home. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .parade {
    display: none;
  }
}

/* ---------- privacy policy ---------- */
.privacy {
  max-width: 46rem;
}
.privacy h2 {
  margin-top: 2rem;
}
.privacy ul {
  padding-left: 1.25rem;
}
.privacy li {
  margin-bottom: 0.5rem;
}

/* ---------- the manual: chapters generated from docs/manual/src ---------- */

.manual {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  padding-top: 28px;
  padding-bottom: 20px;
}
.toc-side {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 16px 12px;
  border-radius: 18px;
  scrollbar-width: thin;
}
.toc-side h2 {
  padding: 0 10px 8px;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ice);
}
.toc-side h2 a {
  color: inherit;
  text-decoration: none;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}
.toc-list a {
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.toc-list a:hover {
  color: var(--text);
  background: rgba(159, 216, 255, 0.08);
}
.toc-list a[aria-current='page'] {
  color: var(--text);
  background: rgba(159, 216, 255, 0.14);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.toc-no {
  flex: none;
  min-width: 1.6em;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
}
.toc-sub {
  list-style: none;
  margin: 2px 0 6px 2.1em;
  padding: 0 0 0 10px;
  border-left: 2px solid var(--line);
}
.toc-sub a {
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 600;
}
.toc-pdf {
  display: block;
  margin: 12px 10px 0;
  font-size: 13px;
  font-weight: 700;
}

/* phones: the contents fold into a <details> above the chapter */
.toc-fold {
  display: none;
  margin-bottom: 16px;
}
.toc-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
}
.toc-fold summary::-webkit-details-marker {
  display: none;
}
.toc-fold summary::after {
  content: '▾';
  color: var(--ice);
}
.toc-fold[open] summary::after {
  content: '▴';
}
.toc-fold .toc-list {
  padding: 0 8px 10px;
}

/* the chapter text */
.doc {
  min-width: 0;
  max-width: 800px;
  padding: 34px 40px 40px;
  border-radius: 22px;
  font-size: 17px;
  line-height: 1.65;
  color: #dbe9f8;
}
.doc > :first-child {
  margin-top: 0;
}
.doc h1 {
  font-size: clamp(30px, 4.5vw, 42px);
  color: #fff;
  text-shadow: 0 2px 20px rgba(92, 188, 245, 0.35);
}
.doc h2 {
  margin: 1.9em 0 0.5em;
  font-size: 26px;
  color: #fff;
}
.doc h3 {
  margin: 1.6em 0 0.4em;
  font-size: 20px;
  color: var(--ice);
}
.doc h4 {
  margin: 1.4em 0 0.3em;
  font-size: 17px;
  color: var(--ice);
}
.doc h2 a.anchor,
.doc h3 a.anchor {
  margin-left: 8px;
  color: var(--line-strong);
  text-decoration: none;
  font-weight: 500;
  opacity: 0;
}
.doc h2:hover a.anchor,
.doc h3:hover a.anchor,
.doc a.anchor:focus-visible {
  opacity: 1;
}
.doc p,
.doc ul,
.doc ol,
.doc dl,
.doc .table-wrap {
  margin: 0.9em 0;
}
.doc ul,
.doc ol {
  padding-left: 1.4em;
}
.doc li + li {
  margin-top: 0.3em;
}
.doc li::marker {
  color: var(--ice-strong);
  font-weight: 700;
}
.doc ol > li::marker {
  color: var(--accent);
  font-family: var(--font-display);
}
.doc strong {
  color: #fff;
}
.doc em {
  color: #eef6ff;
}
.doc code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(159, 216, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.35em;
}
.doc kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1.5;
  min-width: 1.8em;
  padding: 0 0.45em;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, #2a4c86, #1d3766);
  border: 1px solid var(--line-strong);
  border-bottom: 3px solid #0a1730;
  border-radius: 7px;
  vertical-align: 0.08em;
  white-space: nowrap;
}
.doc hr {
  border: 0;
  border-top: 2px dashed var(--line-strong);
  margin: 2em 0;
}
.doc img.gi {
  height: 1.3em;
  width: auto;
  vertical-align: -0.3em;
  image-rendering: pixelated;
  margin: 0 0.05em;
}
.doc .ui {
  font-weight: 800;
  color: #fff;
}

.chapter-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 8px;
  border-bottom: 2px dashed var(--line-strong);
}
.chapter-art {
  flex: none;
  width: auto;
  height: 96px;
  filter: drop-shadow(0 6px 10px rgba(0, 20, 50, 0.45));
}
.chapter-label {
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.doc .lede {
  font-size: 1.12em;
  color: #fff;
}

.doc figure.fig {
  margin: 1.5em auto;
  text-align: center;
}
.doc figure.fig img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.doc figure.fig img.pixel,
.doc figure.fig.plain img {
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.doc figure.fig.half img {
  max-width: min(62%, 100%);
}
.doc figure.fig.small img {
  max-width: 44%;
}
.doc figure.fig.tiny img {
  max-width: 30%;
}
.doc figcaption {
  margin-top: 0.7em;
  font-size: 0.86em;
  color: var(--muted);
  line-height: 1.45;
}
.fig-no {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.3em;
}
.doc .gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  align-items: flex-end;
  margin: 1.3em 0;
}
.doc .gallery figure {
  margin: 0;
  max-width: 120px;
  text-align: center;
  font-size: 0.8em;
  color: var(--muted);
  line-height: 1.35;
}
.doc .gallery img {
  display: block;
  margin: 0 auto 4px;
  height: 72px;
  width: auto;
  image-rendering: pixelated;
}
.doc .gallery.penguins img {
  height: 96px;
}

.callout {
  position: relative;
  margin: 1.3em 0;
  padding: 0.8em 1em 0.8em 3.2em;
  border-radius: 14px;
  border: 1px solid;
  border-left-width: 5px;
}
.callout::before {
  position: absolute;
  left: 0.8em;
  top: 0.8em;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95em;
  line-height: 1;
  color: #fff;
}
.callout-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.04em;
  margin-bottom: 0.15em;
}
.callout-body > :first-child {
  margin-top: 0;
}
.callout-body > :last-child {
  margin-bottom: 0;
}
.callout.tip {
  background: rgba(92, 188, 245, 0.1);
  border-color: rgba(92, 188, 245, 0.45);
}
.callout.tip::before {
  content: '★';
  background: var(--ice-strong);
  color: #062038;
}
.callout.tip .callout-title {
  color: var(--ice);
}
.callout.note {
  background: rgba(150, 170, 220, 0.1);
  border-color: rgba(150, 170, 220, 0.4);
}
.callout.note::before {
  content: 'i';
  background: #4a5f94;
  font-style: italic;
}
.callout.note .callout-title {
  color: #c9d6ff;
}
.callout.warning {
  background: rgba(255, 173, 51, 0.1);
  border-color: rgba(255, 173, 51, 0.45);
}
.callout.warning::before {
  content: '!';
  background: var(--accent);
  color: #3a2400;
}
.callout.warning .callout-title {
  color: #ffd28a;
}

.doc dl.defs {
  display: grid;
  gap: 0;
}
.doc dl.defs dt {
  margin-top: 0.9em;
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  font-size: 1.05em;
}
.doc dl.defs dd {
  margin: 0.15em 0 0;
  padding-left: 14px;
  border-left: 3px solid var(--line-strong);
}

/* prev / next */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 2px dashed var(--line-strong);
}
.pager a {
  display: block;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--well);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
}
.pager a:hover {
  border-color: var(--line-strong);
  background: rgba(159, 216, 255, 0.08);
}
.pager small {
  display: block;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
}
.pager .next {
  grid-column: 2;
  text-align: right;
}

/* the manual's front page */
.manual-cover {
  text-align: center;
  padding: 10px 0 18px;
}
.manual-cover .logo {
  margin: 0 auto;
  width: 360px;
}
.manual-cover .sub {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: #fff;
}
.manual-cover .edition {
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
}
.cover-penguins {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 16px;
}
.cover-penguins img {
  height: 96px;
  width: auto;
}
.doc .chapter-cards {
  list-style: none;
  margin: 1.4em 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.chapter-cards a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--well);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
}
.chapter-cards a:hover {
  border-color: var(--line-strong);
  background: rgba(159, 216, 255, 0.08);
}
.chapter-cards img {
  flex: none;
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.chapter-cards strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
}
.chapter-cards span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.pdf-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 1.6em;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 173, 51, 0.08);
  border: 1px solid rgba(255, 173, 51, 0.35);
}

@media (max-width: 960px) {
  .manual {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 16px;
  }
  .toc-side {
    display: none;
  }
  .toc-fold {
    display: block;
  }
  .doc {
    max-width: none;
  }
}
@media (max-width: 620px) {
  .doc {
    padding: 22px 18px 28px;
    font-size: 16px;
    border-radius: 18px;
  }
  .chapter-head {
    gap: 12px;
  }
  .chapter-art {
    height: 64px;
  }
  .doc h2 {
    font-size: 22px;
  }
  .doc figure.fig.half img,
  .doc figure.fig.small img {
    max-width: 100%;
  }
  .doc figure.fig.tiny img {
    max-width: 60%;
  }
  .doc .chapter-cards {
    grid-template-columns: 1fr;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .pager .next {
    grid-column: 1;
  }
  .callout {
    padding-left: 2.9em;
  }
  .callout::before {
    left: 0.6em;
  }
  .manual-cover .sub {
    font-size: 22px;
  }
  .cover-penguins img {
    height: 72px;
  }
}

/* ---------- sprite sheets (generated from src/img/art.json) ---------- */

.sp-parade-0 {
  --w: 64px;
  --h: 96px;
  --n: 4;
  --fps: 8;
  background-image: url('../img/parade-0.png');
}
.sp-parade-1 {
  --w: 64px;
  --h: 96px;
  --n: 4;
  --fps: 8;
  background-image: url('../img/parade-1.png');
}
.sp-parade-2 {
  --w: 64px;
  --h: 96px;
  --n: 4;
  --fps: 8;
  background-image: url('../img/parade-2.png');
}
.sp-parade-3 {
  --w: 64px;
  --h: 96px;
  --n: 4;
  --fps: 8;
  background-image: url('../img/parade-3.png');
}
.sp-colony-0 {
  --w: 64px;
  --h: 96px;
  --n: 2;
  --fps: 5;
  background-image: url('../img/colony-0.png');
}
.sp-colony-1 {
  --w: 64px;
  --h: 96px;
  --n: 4;
  --fps: 6;
  background-image: url('../img/colony-1.png');
}
.sp-colony-2 {
  --w: 64px;
  --h: 96px;
  --n: 4;
  --fps: 6;
  background-image: url('../img/colony-2.png');
}
.sp-colony-3 {
  --w: 64px;
  --h: 96px;
  --n: 8;
  --fps: 4;
  background-image: url('../img/colony-3.png');
}
.sp-colony-4 {
  --w: 64px;
  --h: 96px;
  --n: 4;
  --fps: 6;
  background-image: url('../img/colony-4.png');
}
.sp-colony-5 {
  --w: 64px;
  --h: 96px;
  --n: 2;
  --fps: 5;
  background-image: url('../img/colony-5.png');
}
.sp-knight-driftwood {
  --w: 58px;
  --h: 66px;
  --n: 8;
  --fps: 4;
  background-image: url('../img/knight-driftwood.png');
}
.sp-knight-ice {
  --w: 62px;
  --h: 63px;
  --n: 8;
  --fps: 4;
  background-image: url('../img/knight-ice.png');
}
.sp-knight-moonstone {
  --w: 60px;
  --h: 63px;
  --n: 8;
  --fps: 4;
  background-image: url('../img/knight-moonstone.png');
}
.sp-knight-aurora {
  --w: 57px;
  --h: 70px;
  --n: 8;
  --fps: 4;
  background-image: url('../img/knight-aurora.png');
}
.sp-knight-starfall {
  --w: 59px;
  --h: 69px;
  --n: 8;
  --fps: 4;
  background-image: url('../img/knight-starfall.png');
}
.sp-knight-walk {
  --w: 55px;
  --h: 65px;
  --n: 4;
  --fps: 8;
  background-image: url('../img/knight-walk.png');
}
.sp-creature-snow-crab {
  --w: 58px;
  --h: 34px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-snow-crab.png');
}
.sp-creature-skua {
  --w: 76px;
  --h: 67px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-skua.png');
}
.sp-creature-leopard-seal {
  --w: 34px;
  --h: 39px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-leopard-seal.png');
}
.sp-creature-walrus-bandit {
  --w: 46px;
  --h: 69px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-walrus-bandit.png');
}
.sp-creature-frost-bat {
  --w: 82px;
  --h: 69px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-frost-bat.png');
}
.sp-creature-rime-beetle {
  --w: 56px;
  --h: 54px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-rime-beetle.png');
}
.sp-creature-glacier-spider {
  --w: 64px;
  --h: 80px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-glacier-spider.png');
}
.sp-creature-tusk-warden {
  --w: 80px;
  --h: 161px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-tusk-warden.png');
}
.sp-creature-crystal-golem {
  --w: 81px;
  --h: 107px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-crystal-golem.png');
}
.sp-creature-deep-lurker {
  --w: 58px;
  --h: 63px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-deep-lurker.png');
}
.sp-creature-vault-sentinel {
  --w: 58px;
  --h: 91px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-vault-sentinel.png');
}
.sp-creature-dread-narwhal {
  --w: 82px;
  --h: 145px;
  --n: 4;
  --fps: 4;
  background-image: url('../img/creature-dread-narwhal.png');
}
.sp-obj-brazier {
  --w: 52px;
  --h: 86px;
  --n: 6;
  --fps: 8;
  background-image: url('../img/obj-brazier.png');
}
