@font-face {
  font-family: "Monocraft";
  src: url("/static/29d847bdf66f515faeaf/fonts/Monocraft.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Monocraft";
  src: url("/static/29d847bdf66f515faeaf/fonts/Monocraft-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Monocraft";
  src: url("/static/29d847bdf66f515faeaf/fonts/Monocraft-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* ฿ and ≈, which Monocraft doesn't have, drawn on its pixel grid
   (scripts/symbols-font.py). */
@font-face {
  font-family: "Monocraft";
  src: url("/static/29d847bdf66f515faeaf/fonts/Qu1ntenSymbols.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0E3F, U+2248;
}

@font-face {
  font-family: "Monocraft";
  src: url("/static/29d847bdf66f515faeaf/fonts/Qu1ntenSymbols-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0E3F, U+2248;
}

@font-face {
  font-family: "Monocraft";
  src: url("/static/29d847bdf66f515faeaf/fonts/Qu1ntenSymbols-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0E3F, U+2248;
}

/* Longer reading text (policy pages, FAQ answers); hosted here rather than
   loaded from Google */
@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/29d847bdf66f515faeaf/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #0f120b;
  --header-bg: #151910;
  --border: #20261a;
  --text: #eef0d8;
  --muted: #bcc391;
  --accent: #e8913a;
  --on-light: #0f120b;
  --survival: #8cc45c;
  /* Only for deleting the account: a warm brick red, as light as the accent
     so it sits with the palette */
  --danger: #e0574a;
}

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Monocraft", monospace;
  text-transform: uppercase;
}

html {
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Logo on the left, page links centred on the page, account on the right */
.site-header {
  display: grid;
  /* minmax(0, ...) so a long display name can't push into the links */
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: 104px;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 10;
  isolation: isolate;
  /* Clicks pass through to whatever is under the header; only its links
     catch them */
  pointer-events: none;
}

.site-header a {
  pointer-events: auto;
}

/* Background fade that runs past the header's bottom edge so there is no
   visible stop where the header ends. The stops are in % of its own height
   so it reaches transparent right at its edge whatever the header's height
   (on the 104px header these are 20px, 40px, ... 180px). */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -76px;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    var(--header-bg) 0,
    rgb(21 25 16 / 0.98) 11.11%,
    rgb(21 25 16 / 0.93) 22.22%,
    rgb(21 25 16 / 0.84) 32.22%,
    rgb(21 25 16 / 0.71) 42.22%,
    rgb(21 25 16 / 0.55) 52.22%,
    rgb(21 25 16 / 0.38) 62.22%,
    rgb(21 25 16 / 0.22) 72.22%,
    rgb(21 25 16 / 0.1) 82.22%,
    rgb(21 25 16 / 0.03) 92.22%,
    transparent 100%
  );
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  /* Only as wide as the logo and name, not the whole header column */
  justify-self: start;
}

.brand-mark {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.brand-name {
  /* The site name is always lowercase, unlike the rest of the site */
  text-transform: none;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.12em;
  /* Same hard pixel shadow as the banner title */
  text-shadow: 0 calc(1em / 9) 0 var(--bg);
}

.site-nav {
  display: flex;
  gap: 56px;
  /* Dead zone around the links: catches stray clicks near them so they don't
     fall through to a card under the header, without enlarging the links */
  pointer-events: auto;
  padding: 20px;
  margin: -20px;
}

.site-nav a {
  color: var(--muted);
  font-size: 22px;
  letter-spacing: 0.1em;
  transition: color 0.15s, translate 0.15s;
}

/* Lifts slightly on hover, like the GET ALL-ACCESS button */
.site-nav a:hover {
  color: var(--text);
  translate: 0 -2px;
}

/* Everything that lifts 2px on hover gets a strip under it while lifted, so
   the hover area still reaches the spot the bottom edge lifted from and a
   cursor there doesn't make it flicker. The strip sits below the element,
   so it never covers links or buttons inside it. 4px also covers a 2px
   border; the strip is measured from inside the border. */
.site-nav a,
.account-toggle,
.tag-link,
.aa-title-link,
.aa-button,
.filter-chip,
.browse-all,
.page-btn,
.welcome-step,
.build-fav,
.build-cta,
.auth-submit,
.security-submit,
.security-action,
.file-picker-all,
.build-price {
  position: relative;
}

.site-nav a:hover::after,
.account-toggle:hover::after,
.tag-link:hover::after,
.aa-title-link:hover::after,
.aa-button:hover::after,
.about-social:hover::after,
.tools-show:hover::after,
.filter-chip:hover::after,
.browse-all:hover::after,
.page-btn:hover::after,
.plan:hover::after,
.welcome-step:hover::after,
.build-fav:hover::after,
.build-cta:hover::after,
.auth-submit:hover::after,
.security-submit:hover::after,
.security-action:hover::after,
.file-picker-all:hover::after,
.file-picker-guide:hover::after,
.account-badge:hover::after,
.build-price:hover::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 4px;
}

/* ACCOUNT with a pixel person icon; opens LOG IN / SIGN UP */
.account {
  position: relative;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 20px;
  pointer-events: auto;
}

/* Plan badge left of ACCOUNT (site.js): the picture badge, but in the row.
   Relative rather than static, for the hover strip under lifting buttons;
   top and z-index undo the picture badge's */
.badge.account-badge {
  position: relative;
  top: auto;
  z-index: auto;
}

/* Logged out: plain grey, no icon */
.badge-guest {
  color: #8d9088;
  border-color: rgb(141 144 136 / 0.5);
}

.account-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 22px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, translate 0.15s;
}

.account-toggle:hover,
.account-toggle[aria-expanded="true"] {
  color: var(--text);
}

.account-toggle:hover {
  translate: 0 -2px;
}

/* Logged in: the display name, with the capitals the member typed. It uses
   the room left beside the links and ends in "..." when that runs out; the
   menu always shows it in full. */
.account-label-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.account:has(.account-label-name) {
  min-width: 0;
  max-width: 100%;
  padding-left: 40px;
}

.account:has(.account-label-name) .account-toggle {
  min-width: 0;
}

/* All-Access members' icon and name in the accent colour, like their badge */
.account-toggle.is-access .pixel-icon,
.account-toggle.is-access .account-label-name {
  color: var(--accent);
}

.account-badge,
.account-toggle .pixel-icon {
  flex: none;
}

.account-menu {
  position: absolute;
  top: calc(100% + 20px);
  right: 0;
  display: grid;
  gap: 8px;
  width: 220px;
  padding: 12px;
  background: var(--header-bg);
  border: 1px solid var(--border);
  /* Fades in and drops down slightly, like Browse's tool bar */
  animation: account-menu-in 0.18s ease-out;
}

.account-menu[hidden] {
  display: none;
}

@keyframes account-menu-in {
  from {
    opacity: 0;
    translate: 0 -6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-menu {
    animation: none;
  }
}

/* While the menu is open, lift the header above Browse's search / sort bar */
.site-header:has(.account-menu:not([hidden])) {
  z-index: 12;
}

.account-menu a {
  padding: 12px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-align: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.account-menu a:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* SIGN UP: same look as the GET ALL-ACCESS button */
.account-menu .account-menu-primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--on-light);
}

.account-menu .account-menu-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-light);
}

/* Logged in: display name on top, then rows with an icon box on the left.
   Widens to fit any display name (16 characters at most, like Minecraft
   names); "..." is only a safety net */
.account-menu-user {
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  width: max-content;
  min-width: 220px;
  max-width: 280px;
}

/* Lets the name shrink so its "..." can kick in */
.account-user-text {
  min-width: 0;
}

.account-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  background: var(--accent);
  color: var(--on-light);
  font-size: 18px;
}

/* Skin face over the letter: the 8x8 face scaled up without blurring */
.account-skin {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* In the plan's colour, like the badge: orange for All-Access, the FREE
   badge's colour for free accounts */
.account-user-label {
  display: block;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-user-label.is-free {
  color: var(--muted);
}

.account-user-name {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.account-menu .account-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border-color: transparent;
  text-align: left;
}

.account-menu .account-menu-item:hover {
  border-color: var(--border);
  background: rgb(238 240 216 / 0.04);
}

.account-menu-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgb(188 195 145 / 0.3);
  transition: color 0.15s, border-color 0.15s;
}

.account-menu-item:hover .account-menu-icon {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

/* In the header the name is muted like the nav links, and white on the
   home page (marked as the current page) or on hover */
.site-header .brand-name {
  color: var(--muted);
  transition: color 0.15s;
}

.site-header .brand[aria-current="page"] .brand-name,
.site-header .brand:hover .brand-name {
  color: var(--text);
}

/* Narrower screens: a smaller name and links so the centred links keep clear
   of both sides, and just the person icon, in a square button like the
   arrow buttons */
@media (max-width: 1200px) {
  .site-header .brand-name {
    font-size: 20px;
  }

  .site-nav {
    gap: 32px;
  }

  .site-nav a {
    font-size: 18px;
  }

  .account-label {
    display: none;
  }

  .account-toggle {
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgb(21 25 16 / 0.9);
    border: 1px solid var(--border);
  }

  .account-toggle:hover,
  .account-toggle[aria-expanded="true"] {
    border-color: var(--muted);
  }

  /* The name and badge don't fit from here down, so the button's frame shows
     the plan: orange for All-Access, the FREE badge's colour for free */
  .account-toggle.is-access {
    border-color: rgb(232 145 58 / 0.6);
  }

  .account-toggle.is-access:hover,
  .account-toggle.is-access[aria-expanded="true"] {
    border-color: var(--accent);
  }

  .account-toggle.is-free {
    border-color: rgb(188 195 145 / 0.5);
  }
}

/* Tablets and phones: just the logo and account button, so the links fit
   beside them */
@media (max-width: 960px) {
  .site-header .brand-name,
  .badge.account-badge {
    display: none;
  }
}

.banner {
  position: relative;
  /* Keeps the canvas and fade (negative z-index) inside the banner */
  isolation: isolate;
  display: grid;
  place-items: center;
  /* Runs up under the header so its fade sits on the banner, not the page
     background; the padding keeps the visible 580px below the header */
  height: 684px;
  margin-top: -104px;
  padding-top: 104px;
  /* First sunrise frame, shown until the canvas has drawn */
  background: url("/static/29d847bdf66f515faeaf/images/sunrise/001.webp") center 20% / cover no-repeat;
}

/* Sunrise frames, scrubbed by scroll position in main.js */
.banner-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

/* Fades the top of the banner into the header colour, over the canvas */
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      to bottom,
      var(--header-bg) 0%,
      rgb(21 25 16 / 0.97) 5%,
      rgb(21 25 16 / 0.9) 10%,
      rgb(21 25 16 / 0.78) 17%,
      rgb(21 25 16 / 0.6) 28%,
      rgb(21 25 16 / 0.45) 45%,
      rgb(21 25 16 / 0.25) 62%,
      rgb(21 25 16 / 0.08) 78%,
      transparent 90%
    );
}

.banner-title {
  /* Sits a little above centre, leaving room for the character's bubble */
  margin-top: -20px;
  text-align: center;
  text-transform: none;
  font-weight: 400;
  color: var(--text);
  /* 63px keeps Monocraft's 9-unit pixel grid on whole pixels */
  font-size: 63px;
  line-height: 1.1;
  /* Hard shadow one font pixel straight down */
  text-shadow: 0 calc(1em / 9) 0 var(--bg);
}

/* Pixel character on the banner's bottom edge; --x is the point between its
   feet and --y its height above the edge. character.js sizes and offsets the
   sprite so every animation shares one pixel scale and stands on the same spot */
.buddy {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  transform: translate(var(--x, 50vw), calc(var(--y, 0px) * -1));
  pointer-events: none;
}

/* Where the characters live on pages without the home page banner: a strip
   whose bottom edge is the top of the footer, so they stand on it. It
   reaches up over the empty bottom padding of the page above, so it only
   adds a little space. They can be dragged and thrown anywhere above it,
   over the page, but pass behind the header (z-index 10) and Browse's
   stuck search bar (11) */
.buddy-stage {
  position: relative;
  z-index: 9;
  height: 176px;
  margin-top: -96px;
}

/* With several characters, the one talking shows its bubble over the others,
   and the one being held is on top of everything */
.buddy.is-talking {
  z-index: 1;
}

.buddy.is-held {
  z-index: 2;
}

.buddy-sprite {
  position: absolute;
  max-width: none;
  image-rendering: pixelated;
  cursor: grab;
  pointer-events: auto;
  /* Dragging the character shouldn't scroll the page on touch screens */
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.buddy.is-held .buddy-sprite {
  cursor: grabbing;
}

/* Name tag like Minecraft's: plain white text on a see-through black box,
   floating a little above the head. 18px keeps Monocraft's 9-unit pixel grid
   at the sprite's 2x scale */
.buddy-tag {
  position: absolute;
  left: 0;
  bottom: 90px;
  /* --half is half the tag's width rounded by character.js, so the pixel font
     lands on whole pixels instead of blurring across two */
  transform: translateX(calc(var(--half, 50%) * -1));
  padding: 0 2px;
  background: rgb(0 0 0 / 0.25);
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  line-height: 18px;
  text-transform: none;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.buddy.is-tagless .buddy-tag {
  visibility: hidden;
}

/* Speech bubble above the name tag, styled like the tag (white text on a
   see-through black box) with a pixel tail pointing down at the character.
   --shift slides the box (not the tail) to keep it inside the banner near
   its edges */
.buddy-say {
  position: absolute;
  left: 0;
  bottom: 120px;
  width: max-content;
  max-width: 320px;
  margin: 0;
  padding: 2px 6px;
  background: rgb(0 0 0 / 0.25);
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  line-height: 22px;
  text-transform: none;
  text-align: center;
  pointer-events: none;
  user-select: none;
  /* Centred with a rounded half width, like .buddy-tag */
  transform: translateX(calc(var(--shift, 0px) - var(--half, 50%)));
  opacity: 0;
  transition: opacity 0.15s;
}

.buddy-say.is-shown {
  opacity: 1;
}

/* Out of sight while it would run into the banner title */
.buddy-say.is-shown.is-blocked {
  opacity: 0;
}

/* Tail: 3x2 pixels at 2x, in the same see-through black */
.buddy-say::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(var(--half, 50%) - var(--shift, 0px) - 3px);
  width: 6px;
  height: 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2' shape-rendering='crispEdges'%3E%3Cpath fill-opacity='.25' d='M0 0h3v1H0zM1 1h1v1H1z'/%3E%3C/svg%3E") no-repeat;
}

.buddy.is-tagless .buddy-say {
  visibility: hidden;
}

/* The walk and sprint sprites face right */
.buddy.is-left .buddy-sprite {
  transform: scaleX(-1);
}

/* Grows a little from its feet while pressed, so it's clear clicking it does
   something */
.buddy-sprite {
  transition: scale 0.08s;
}

.buddy.is-pressed .buddy-sprite {
  scale: 1.05;
}

.section {
  max-width: 1920px;
  margin: 0 auto;
  /* Side room grows with the window: 32px on small screens up to 104px */
  padding: 96px clamp(32px, 5.2vw, 104px);
  /* Keeps section titles clear of the sticky header when jumped to */
  scroll-margin-top: 104px;
}

.row + .row {
  margin-top: 72px;
}

.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.row-title {
  font-weight: 400;
  font-size: 32px;
  letter-spacing: 0.08em;
  /* Shown as written, e.g. "Recently Added" */
  text-transform: none;
}

.view-all {
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 0.1em;
  transition: color 0.15s;
}

.view-all:hover {
  color: var(--text);
}

.track-wrap {
  --gap: 28px;
  --fade: 12%;
  /* --fade-l and --fade-r (0 to 1) are set from script, easing to 0 as
     the row reaches that edge. They drive the edge fades and the arrows. */
  --fade-l: 0;
  --fade-r: 0;
  /* Five cards plus a sliver of the sixth under the fade; in a narrow window
     (or zoomed in) fewer, never narrower than Browse's smallest 4-per-row
     cards, so they don't get squeezed */
  --card: max(220px, (100cqw - 5 * var(--gap)) / 5.12);
  position: relative;
  container-type: inline-size;
}

.card-track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* Room for hovered cards to grow without being clipped by the scroller */
  padding: 10px;
  margin: -10px;
  scroll-padding-inline: 10px;
  --mask: linear-gradient(
    to right,
    rgb(0 0 0 / calc(1 - var(--fade-l))),
    #000 var(--fade),
    #000 calc(100% - var(--fade)),
    rgb(0 0 0 / calc(1 - var(--fade-r)))
  );
  -webkit-mask-image: var(--mask);
  mask-image: var(--mask);
}

/* Arrows sit on the middle of the card images */
.row-arrow {
  position: absolute;
  top: calc(var(--card) / 2);
  translate: 0 -50%;
  width: 44px;
  height: 44px;
  background: rgb(21 25 16 / 0.9);
  border: 1px solid var(--border);
  color: var(--muted);
  font: inherit;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.row-arrow:hover {
  color: var(--text);
  border-color: var(--muted);
}

.row-arrow-left {
  left: 12px;
  opacity: var(--fade-l);
}

.row-arrow-right {
  right: 12px;
  opacity: var(--fade-r);
}

.row-arrow:disabled {
  pointer-events: none;
}

.card-track::-webkit-scrollbar {
  display: none;
}

.card {
  display: block;
  flex: 0 0 var(--card);
  scroll-snap-align: start;
  background: var(--header-bg);
  border: 1px solid var(--border);
  transition: border-color 0.15s, scale 0.2s;
}

.card:hover {
  border-color: var(--muted);
}

/* Only where there's a real hover: on phones a tap leaves the card "hovered",
   so tapping the heart would make the card jump */
@media (hover: hover) {
  .card:hover {
    scale: 1.03;
  }
}

/* On touch screens the card nearest the middle of the screen gets the hover
   look instead (site.js) */
@media (hover: none) {
  .card.is-centred {
    border-color: var(--muted);
    scale: 1.03;
  }
}

.card-media {
  position: relative;
  aspect-ratio: 1;
}

.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Corner labels on pictures: the outlined ALL-ACCESS badge style, on a dark
   backing so they stay readable over any screenshot */
.badge {
  position: absolute;
  top: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgb(15 18 11 / 0.85);
  border: 1px solid;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.badge-price {
  right: 12px;
}

/* On card pictures, as tall as the heart button (.card-fav) so the top
   corners sit on one line */
.card-media .badge {
  height: 34px;
  padding-block: 0;
}

.badge-access {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

.badge-free {
  color: var(--muted);
  border-color: rgb(188 195 145 / 0.5);
}

.card-body {
  padding: 16px;
}

/* Build name with the download count at the end of the line */
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title {
  flex: 1;
  min-width: 0;
  /* Build names show exactly as written, e.g. "Savanna Tree" */
  text-transform: none;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  /* Long names fade out before the count instead of being cut with "…";
     short names end before the fade starts */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}

/* Same size as the name, boxed like the category tags */
.card-downloads {
  flex-shrink: 0;
  padding: 2px 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.card-tags {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  /* Tags too long for the card (a long tag, or two on a small card) fade out
     at its edge like long names, instead of running past the border */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}

.card-tag {
  padding: 4px 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Builds that can be made in survival mode */
.card-tag-survival {
  color: var(--survival);
  border-color: rgb(140 196 92 / 0.45);
  background: rgb(140 196 92 / 0.08);
}

/* Tags on the build page open Browse filtered by that tag, and lift slightly
   on hover like the header links */
.tag-link {
  transition: color 0.15s, border-color 0.15s, translate 0.15s;
}

.tag-link:hover {
  color: var(--text);
  border-color: var(--muted);
  translate: 0 -2px;
}

.card-tag-survival.tag-link:hover {
  color: var(--survival);
  border-color: var(--survival);
}

/* Cards scale their contents with their own width, wherever they are (the
   home page rows, Browse at any number per row, My Library). At 240px and
   wider they look as designed; narrower ones shrink text, labels, buttons
   and spacing in proportion, down to 60%, which stays readable. --px is one
   design pixel at the card's current width (100cqi is the card's width), so
   every size below is its design size times --px */
.card {
  container-type: inline-size;
  --px: clamp(0.6px, 100cqi / 240, 1px);
}

.card .card-body {
  padding: calc(16 * var(--px));
}

.card .card-head {
  gap: calc(10 * var(--px));
}

.card .card-title,
.card .card-downloads {
  font-size: calc(16 * var(--px));
}

.card .card-downloads {
  padding: calc(2 * var(--px)) calc(6 * var(--px));
}

.card .card-tags {
  gap: calc(6 * var(--px));
  margin-top: calc(14 * var(--px));
}

.card .card-tag {
  padding: calc(4 * var(--px)) calc(6 * var(--px));
  font-size: calc(12 * var(--px));
}

.card .card-media .badge {
  top: calc(12 * var(--px));
  height: calc(34 * var(--px));
  gap: calc(8 * var(--px));
  padding-inline: calc(10 * var(--px));
  font-size: calc(13 * var(--px));
}

.card .card-media .badge-price {
  right: calc(12 * var(--px));
}

.card .card-labels {
  left: calc(12 * var(--px));
  bottom: calc(12 * var(--px));
  gap: calc(6 * var(--px));
}

.card .card-labels .badge {
  top: auto;
}

.card .card-fav {
  top: calc(12 * var(--px));
  left: calc(12 * var(--px));
  width: calc(34 * var(--px));
  height: calc(34 * var(--px));
}

.card .card-media .pixel-icon {
  width: calc(16 * var(--px));
  height: calc(16 * var(--px));
}

/* All-Access call to action under the build rows */
.all-access {
  display: grid;
  justify-items: center;
  gap: 28px;
  /* Less on top, since the reviews section above already ends in 96px, so
     the content sits midway between the reviews and the footer */
  padding: 72px 24px 168px;
  text-align: center;
  scroll-margin-top: 104px;
  /* Header-coloured band that fades in and out of the page, with a faint
     warm glow from the ACCESS colour */
  background:
    radial-gradient(ellipse 50% 45% at 50% 50%, rgb(232 145 58 / 0.08), transparent),
    linear-gradient(to bottom, var(--bg), var(--header-bg) 30%, var(--header-bg) 70%, var(--bg));
}

.pixel-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  shape-rendering: crispEdges;
}

.aa-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  color: var(--accent);
  border: 1px solid rgb(232 145 58 / 0.5);
  background: rgb(232 145 58 / 0.08);
  font-size: 14px;
  letter-spacing: 0.12em;
}

/* Same badge for free, in the colour of the FREE labels on build cards */
.aa-badge-free {
  color: var(--muted);
  border-color: rgb(188 195 145 / 0.5);
  background: rgb(188 195 145 / 0.08);
}

.aa-title {
  font-weight: 400;
  font-size: 63px;
  line-height: 1.1;
  text-transform: none;
  /* Same hard pixel shadow as the banner title */
  text-shadow: 0 calc(1em / 9) 0 var(--bg);
}

/* Home page title links to the membership page and lifts like GET ACCESS */
.aa-title-link {
  display: inline-block;
  transition: color 0.15s, translate 0.15s;
}

.aa-title-link:hover {
  color: var(--accent);
  translate: 0 -2px;
}

.aa-text {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  text-transform: none;
}

/* What All-Access includes, 2 by 2, as on the membership page */
.aa-features {
  display: grid;
  grid-template-columns: auto auto;
  gap: 14px 48px;
  list-style: none;
  font-size: 16px;
  text-align: left;
  text-transform: none;
}

.aa-features li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aa-features .pixel-icon {
  flex-shrink: 0;
  color: var(--survival);
}

.aa-button {
  margin-top: 8px;
  padding: 16px 28px;
  background: var(--text);
  color: var(--on-light);
  font-size: 18px;
  letter-spacing: 0.1em;
  transition: background 0.15s, translate 0.15s;
}

.aa-button:hover {
  background: var(--accent);
  translate: 0 -2px;
}

/* Beside the call to action, a 3D guide to try (main.js): the build pages'
   guide card, square. Side by side on wide screens, the guide under the text
   on narrower ones */
.all-access {
  grid-template-columns: auto;
  justify-content: center;
  align-items: center;
  column-gap: 72px;
}

.aa-copy {
  display: grid;
  justify-items: center;
  gap: 28px;
}

.aa-demo {
  width: min(440px, 100%);
  text-align: left;
}

@media (min-width: 1100px) {
  .all-access {
    grid-template-columns: auto minmax(0, 440px);
  }

  .aa-demo {
    width: 440px;
  }
}

@media (max-width: 1099px) {
  .aa-demo {
    margin-top: 16px;
  }
}

/* How it works: three steps on one line under the banner */
.steps {
  max-width: 1920px;
  margin: 0 auto;
  padding: 56px clamp(32px, 5.2vw, 104px) 0;
}

/* The build rows follow closer, since the strip already gives some room */
.steps + .section {
  padding-top: 64px;
}

.steps-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px 28px;
  list-style: none;
}

.step {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Arrow in front of every step but the first */
.step + .step::before {
  content: "\2192";
  margin-right: 14px;
  color: var(--muted);
}

.step-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(232 145 58 / 0.5);
  background: rgb(232 145 58 / 0.08);
  color: var(--accent);
}

.step-icon .pixel-icon {
  width: 18px;
  height: 18px;
}

/* About: the character next to a short intro and the socials */
.about.section {
  padding-top: 0;
}

.about-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 64px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 64px;
  background: var(--header-bg);
  border: 1px solid var(--border);
}

/* The banner character waving, at 5 screen pixels per sprite pixel, with a
   flat shadow under its feet like in game */
.about-char {
  display: grid;
  justify-items: center;
}

.about-char img {
  display: block;
  width: 185px;
  height: auto;
  image-rendering: pixelated;
}

.about-char::after {
  content: "";
  width: 120px;
  height: 10px;
  background: rgb(0 0 0 / 0.35);
}


.about-body {
  display: grid;
  justify-items: start;
  gap: 20px;
}

.about-title {
  font-weight: 400;
  /* Multiple of 9 so Monocraft stays on whole pixels */
  font-size: 45px;
  line-height: 1.1;
  text-transform: none;
  text-shadow: 0 calc(1em / 9) 0 var(--bg);
}

.about-text {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  text-transform: none;
}

/* The socials go two by two when four in a row would be too narrow for
   "X / TWITTER" (tiles under 170px) */
.about-body {
  container-type: inline-size;
}

.about-socials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 8px;
  list-style: none;
}

@container (max-width: 716px) {
  .about-socials {
    grid-template-columns: repeat(2, 1fr);
  }
}

.about-social {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 12px;
  height: 100%;
  position: relative;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.15s, translate 0.15s;
}

.about-social:hover {
  border-color: var(--muted);
  translate: 0 -2px;
}

.about-social-icon {
  grid-row: span 2;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: color 0.15s;
}

.about-social:hover .about-social-icon {
  color: var(--accent);
}

/* Small arrow marking that the tile leaves the site, as in the footer */
.about-social-ext {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  color: var(--muted);
  opacity: 0.6;
}

.about-social-name {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.about-social-count {
  font-size: 18px;
}

/* "subscribers" / "followers" on its own line, so every tile is the same */
.about-social-count span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  text-transform: none;
}

/* Reviews: three quote cards under the About card, in the same width */
.reviews {
  max-width: 1100px;
  margin: 48px auto 0;
}

.reviews-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.reviews-title {
  font-weight: 400;
  font-size: 27px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.reviews-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-transform: none;
}

/* Like VIEW ALL on the build rows, but kept on phones too */
.reviews-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.1em;
  transition: color 0.15s;
}

.reviews-link .pixel-icon {
  width: 8px;
  height: 8px;
}

.reviews-link:hover {
  color: var(--text);
}

.reviews-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  list-style: none;
}

.review {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 20px;
  padding: 24px;
  background: var(--header-bg);
  border: 1px solid var(--border);
}

/* Big pixel quote mark in the accent colour above the text */
.review-quote {
  font-size: 15px;
  line-height: 1.7;
  text-transform: none;
}

.review-quote::before {
  content: "\201C";
  display: block;
  height: 24px;
  color: var(--accent);
  font-size: 36px;
  line-height: 1;
}

.review-by {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Skin face like the account picture, or the first letter */
.review-face {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  /* 32px inside the border: the skin faces in images/reviews are 32px, so
     they show pixel for pixel */
  width: 34px;
  height: 34px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 16px;
}

.review-face img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.review-who {
  display: grid;
  gap: 4px;
}

.review-name {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.review-audience {
  color: var(--muted);
  font-size: 12px;
  text-transform: none;
}

/* Linked to the creator's channel: the face and name light up on hover */
.review-ext {
  width: 8px;
  height: 8px;
  margin-left: 8px;
  color: var(--muted);
  opacity: 0.6;
}

a.review-by .review-face,
a.review-by .review-name {
  transition: color 0.15s, border-color 0.15s;
}

a.review-by:hover .review-face {
  border-color: var(--accent);
}

a.review-by:hover .review-name {
  color: var(--accent);
}

@media (max-width: 960px) {
  .about-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 32px;
    padding: 48px 32px;
    text-align: center;
  }

  .about-body {
    justify-items: center;
    /* Full width, since its width can't come from its contents (container) */
    width: 100%;
  }

  .about-socials {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
  }

  .reviews-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .steps {
    padding: 40px 16px 0;
  }

  .steps + .section {
    padding-top: 48px;
  }

  /* Stacked and lined up on the left, as one centred group, with the arrow
     pointing down on its own line above each step, under the icons */
  .steps-list {
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    margin: 0 auto;
    gap: 6px;
  }

  .step {
    flex-wrap: wrap;
    font-size: 16px;
  }

  .step + .step::before {
    content: "\2193";
    box-sizing: border-box;
    flex-basis: 100%;
    /* Leaves a 40px box, the icon's width, to centre the arrow in */
    padding-right: calc(100% - 40px);
    margin: 0;
    text-align: center;
  }

  .about-inner {
    padding: 40px 16px;
  }

  .about-char img {
    width: 111px;
  }

  .about-char::after {
    width: 72px;
    height: 6px;
  }

  .about-title {
    font-size: 27px;
  }

  .about-text {
    font-size: 14px;
  }

  .about-socials {
    gap: 8px;
  }

  .about-social {
    gap: 4px 8px;
    padding: 12px;
  }

  /* Tighter, so "X / TWITTER" fits on one line */
  .about-social-name {
    letter-spacing: 0.06em;
  }

  .reviews {
    margin-top: 32px;
  }

  .reviews-head {
    flex-direction: column;
    align-items: start;
  }

  .reviews-title {
    font-size: 18px;
  }

  /* Swipe through the reviews sideways, the next one peeking in */
  .reviews-list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 85%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .review {
    padding: 20px;
    scroll-snap-align: start;
  }

  /* No room next to the longer names on phones */
  .about-social-ext {
    display: none;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 64px 16px;
    scroll-margin-top: 76px;
  }

  .all-access {
    gap: 22px;
    padding: 48px 16px 112px;
    scroll-margin-top: 76px;
  }

  .aa-title {
    font-size: 36px;
  }

  .aa-text {
    font-size: 15px;
  }

  /* One column on phones, still lined up on the left as one centred group */
  .aa-features {
    grid-template-columns: auto;
    font-size: 14px;
  }

  .row-title {
    font-size: 20px;
  }

  .view-all {
    display: none;
  }

  .row-arrow {
    width: 38px;
    height: 38px;
  }

  .track-wrap {
    --fade: 18%;
    --card: 240px;
  }

  .banner {
    height: 496px;
    margin-top: -76px;
    padding-top: 76px;
  }

  .banner-title {
    margin-top: -28px;
    padding: 0 16px;
    font-size: 27px;
  }

  .site-header {
    padding: 0 16px;
    height: 76px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .account-toggle {
    width: 38px;
    height: 38px;
  }

  .account-menu {
    top: calc(100% + 14px);
  }

  .site-nav {
    gap: 14px;
    /* Dead zone no wider than the header's 16px side padding, so it doesn't
       stick out past the screen edge */
    padding: 16px;
    margin: -16px;
  }

  .site-nav a {
    font-size: 12px;
  }
}

/* Current page in the header nav */
.site-nav a[aria-current="page"] {
  color: var(--text);
  /* Underline one font pixel thick, like the rest of the pixel type */
  text-decoration: underline;
  text-decoration-thickness: calc(1em / 9);
  text-underline-offset: calc(3em / 9);
}

/* Browse page */

/* Title on the left and the search / sort bar on the right, with the builds
   below. The heading box steps aside (display: contents) so the bar belongs
   to the whole page and can stay stuck under the header while scrolling. */
.browse {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 24px;
  max-width: 1920px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}

.browse-head {
  display: contents;
}

.browse-body {
  grid-column: 1 / -1;
  margin-top: 40px;
}

/* Fades out as the page scrolls (browse.js) */
.browse-intro {
  min-width: 0;
}

.browse-title {
  font-weight: 400;
  font-size: 45px;
  letter-spacing: 0.06em;
}

.browse-count {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.08em;
}

/* Search / sort bar: scrolls up with the page, then stays stuck just under
   the header, in front of the header's fade so it stays fully readable */
.browse-tools {
  position: sticky;
  top: 88px;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* While stuck (browse.js sets .tools-stuck), the bar becomes a compact
   floating panel the size of its contents, with its own solid background,
   so it stays readable without covering the rest of the page. The padding and
   negative margin give it room without moving its contents. */
.browse-tools {
  padding: 8px;
  margin: -8px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.tools-stuck .browse-tools {
  background: var(--header-bg);
  border-color: var(--border);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.45);
}

/* Hide button at the end of the panel: only usable while stuck, but always
   taking its space so nothing shifts when the bar sticks */
.tools-hide {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--header-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  visibility: hidden;
  transition: color 0.15s, border-color 0.15s, translate 0.15s;
}

.tools-stuck .tools-hide {
  visibility: visible;
}

.tools-hide:hover,
.tools-show:hover {
  color: var(--text);
  border-color: var(--muted);
  translate: 0 -2px;
}

/* Collapsed: the panel shrinks to one small search button in the same
   corner, with the number of active filters. The rest of the bar keeps its
   space (just invisible), so the page doesn't jump. */
.tools-show {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  background: var(--header-bg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.45);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.15s, border-color 0.15s, translate 0.15s;
}

.tools-show .search-icon {
  position: static;
  translate: none;
  fill: currentColor;
}

.tools-show-count:not(:empty) {
  padding: 2px 7px;
  background: var(--accent);
  color: var(--on-light);
  font-size: 12px;
}

.tools-collapsed.tools-stuck .browse-tools {
  background: none;
  border-color: transparent;
  box-shadow: none;
  pointer-events: none;
}

.tools-collapsed.tools-stuck .browse-tools > :not(.tools-show) {
  visibility: hidden;
}

.tools-collapsed.tools-stuck .tools-show {
  display: flex;
  animation: tools-show-in 0.2s ease-out;
}

@keyframes tools-show-in {
  from {
    opacity: 0;
    translate: 0 -6px;
  }
}

/* Not enough room beside the title: the bar goes underneath it */
@media (max-width: 1200px) {
  .browse {
    grid-template-columns: minmax(0, 1fr);
  }

  .browse-tools {
    justify-content: flex-start;
    margin-top: 24px;
  }

  /* Chips on their own line above the search box */
  .active-filters {
    flex-basis: 100%;
    margin-right: 0;
  }
}

.field {
  height: 44px;
  padding: 0 14px;
  background: var(--header-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.08em;
  transition: border-color 0.15s;
}

.field:hover,
.field:focus {
  border-color: var(--muted);
  outline: none;
}

.field::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.search-wrap {
  position: relative;
  display: flex;
}

.search {
  width: 280px;
  padding-left: 40px;
}

/* Pixel magnifier, 2px per pixel so it stays crisp */
.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 16px;
  height: 16px;
  translate: 0 -50%;
  fill: var(--muted);
  shape-rendering: crispEdges;
  pointer-events: none;
  transition: fill 0.15s;
}

.search-wrap:focus-within .search-icon {
  fill: var(--text);
}

select.field {
  cursor: pointer;
}

/* Sort: a field-style button opening a list like the account menu */
.sort-menu {
  position: relative;
  display: flex;
}

.sort-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 200px;
  text-align: left;
  cursor: pointer;
}

.sort-toggle .pixel-icon {
  flex: none;
  width: 12px;
  height: 12px;
  color: var(--muted);
  transition: color 0.15s, rotate 0.15s;
}

.sort-toggle:hover .pixel-icon,
.sort-toggle[aria-expanded="true"] .pixel-icon {
  color: var(--text);
}

.sort-toggle[aria-expanded="true"] {
  border-color: var(--muted);
}

.sort-toggle[aria-expanded="true"] .pixel-icon {
  rotate: 180deg;
}

.sort-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 100%;
  padding: 6px;
  background: var(--header-bg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.45);
  list-style: none;
  animation: account-menu-in 0.18s ease-out;
}

.sort-options[hidden] {
  display: none;
}

.sort-options:focus {
  outline: none;
}

.sort-option {
  padding: 10px 12px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.sort-option.is-active {
  color: var(--text);
  border-color: var(--border);
  background: rgb(238 240 216 / 0.04);
}

.sort-option[aria-selected="true"] {
  color: var(--accent);
}

.sort-options:focus-visible .sort-option.is-active {
  border-color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .sort-options {
    animation: none;
  }
}

.grid-size {
  display: flex;
}

/* Builds-per-row buttons, each showing a pixel grid of that density */
.grid-size-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--header-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.grid-size-btn + .grid-size-btn {
  margin-left: -1px;
}

.grid-size-btn:hover {
  color: var(--text);
}

.grid-size-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.grid-size[hidden] {
  display: none;
}

.grid-size-btn[aria-pressed="true"] {
  position: relative;
  color: var(--text);
  border-color: var(--muted);
}

.browse-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

.filters {
  display: grid;
  gap: 20px;
}

.filter-group {
  padding: 20px 12px;
  background: var(--header-bg);
  border: 1px solid var(--border);
}

.filter-title {
  padding: 0 8px 12px;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.1em;
}

.filter-list {
  display: grid;
}

.filter-option {
  display: flex;
  justify-content: space-between;
  /* Always some room between a long name and its count */
  gap: 16px;
  padding: 9px 8px;
  background: none;
  border: 1px solid transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.filter-option:hover {
  color: var(--text);
}

.filter-option[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--muted);
}

/* No builds with this option and the other filters as they are */
.filter-option:disabled {
  opacity: 0.35;
  cursor: default;
}

.filter-option:disabled:hover {
  color: var(--muted);
}

.filter-n {
  opacity: 0.6;
}

/* Active filters as chips at the start of the search bar: the square tag
   look, brighter so they read as "on", with an × to remove each one */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

.active-filters[hidden] {
  display: none;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  background: var(--header-bg);
  border: 1px solid var(--muted);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, translate 0.15s;
}

.filter-chip .pixel-icon {
  width: 8px;
  height: 8px;
  color: var(--muted);
  transition: color 0.15s;
}

.filter-chip:hover {
  border-color: var(--text);
  translate: 0 -2px;
}

.filter-chip:hover .pixel-icon {
  color: var(--text);
}

/* Green tint on a solid backing, so nothing shows through it */
.filter-chip-survival {
  color: var(--survival);
  border-color: rgb(140 196 92 / 0.6);
  background: linear-gradient(rgb(140 196 92 / 0.08), rgb(140 196 92 / 0.08)), var(--header-bg);
}

.filter-chip-survival:hover {
  border-color: var(--survival);
}

.filter-chip-survival .pixel-icon,
.filter-chip-survival:hover .pixel-icon {
  color: var(--survival);
}

.filter-clear-all {
  padding: 0 4px;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.15s;
}

.filter-clear-all:hover {
  color: var(--text);
}

.card-grid {
  --cols: 4;
  --gap: 28px;
  --card-min: 220px;
  display: grid;
  /* At most --cols per row; drops a column whenever cards would get under --card-min */
  grid-template-columns: repeat(
    auto-fill,
    minmax(max(var(--card-min), (100% - (var(--cols) - 1) * var(--gap)) / var(--cols)), 1fr)
  );
  gap: var(--gap);
}

/* Browse's 5 and 6 per row (browse.js): smaller cards and gaps, so more fit
   on laptop screens; the cards' contents shrink with them (.card below) */
.card-grid[data-cols="5"] {
  --gap: 22px;
  --card-min: 140px;
}

.card-grid[data-cols="6"] {
  --gap: 18px;
  --card-min: 140px;
}

.empty {
  padding: 64px 0;
  color: var(--muted);
  text-align: center;
  text-transform: none;
}

/* CLEAR FILTERS under "No builds match" on Browse */
.empty .empty-clear {
  margin-top: 24px;
}

/* Outlined button under a list of builds */
.browse-all {
  display: block;
  width: fit-content;
  margin: 48px auto 0;
  padding: 0 32px;
  height: 48px;
  background: var(--header-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, translate 0.15s;
}

.browse-all {
  display: flex;
  align-items: center;
  margin-top: 64px;
}

.browse-all:hover {
  color: var(--text);
  border-color: var(--muted);
  translate: 0 -2px;
}

/* Page buttons under the Browse results, in the 4/5/6 buttons' style */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination[hidden] {
  display: none;
}

.page-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  background: var(--header-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, translate 0.15s;
}

.page-btn:hover {
  color: var(--text);
  border-color: var(--muted);
  translate: 0 -2px;
}

.page-btn[aria-current="page"] {
  color: var(--text);
  border-color: var(--muted);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.page-arrow {
  font-size: 18px;
}

.page-gap {
  width: 20px;
  color: var(--muted);
  text-align: center;
}

/* Phones show "2 / 9" between the arrows instead of every number */
.page-of {
  display: none;
  min-width: 72px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-align: center;
}

@media (max-width: 600px) {
  .page-num,
  .page-gap {
    display: none;
  }

  .page-of {
    display: block;
  }
}

/* Only used by the small-screen filter drawer */
.filters-toggle,
.filters-head,
.filters-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .browse-body {
    grid-template-columns: 1fr;
  }

  /* Too narrow for a choice; the grid sizes itself */
  .grid-size {
    display: none;
  }

  .filters-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
  }

  .filters-active:not(:empty) {
    padding: 2px 7px;
    background: var(--accent);
    color: var(--on-light);
    font-size: 12px;
  }

  /* Filters slide in from the left as a drawer */
  .filters {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: min(320px, 85vw);
    padding: 0 16px 24px;
    align-content: start;
    overflow-y: auto;
    background: var(--bg);
    border-right: 1px solid var(--border);
    translate: -100% 0;
    visibility: hidden;
    transition: translate 0.25s, visibility 0s 0.25s;
  }

  .filters.is-open {
    translate: 0 0;
    visibility: visible;
    transition: translate 0.25s;
  }

  .filters-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .filters-heading {
    font-weight: 400;
    font-size: 20px;
    letter-spacing: 0.08em;
  }

  .filters-close {
    width: 40px;
    height: 40px;
    background: var(--header-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font: inherit;
    font-size: 22px;
    cursor: pointer;
  }

  .filters-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgb(15 18 11 / 0.6);
    backdrop-filter: blur(4px);
  }
}

@media (max-width: 600px) {
  .browse {
    padding: 32px 16px 64px;
  }

  /* On phones the bar is three rows tall, too much to keep on screen, so it
     scrolls away with the title, under the header like the rest of the page
     (it's a grid item, so its z-index would still put it in front) */
  .browse-tools {
    position: static;
    z-index: auto;
  }

  /* Nothing to hide when the bar doesn't stick */
  .tools-hide,
  .tools-show {
    display: none !important;
  }

  .browse-title {
    font-size: 27px;
  }

  .browse-tools,
  .search-wrap,
  .search,
  .filters-toggle {
    width: 100%;
  }

  .sort-menu {
    flex: 1;
  }

  .sort-toggle {
    width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Footer, shared by every page */

.site-footer {
  padding: 72px clamp(32px, 5.2vw, 104px) 32px;
  background: var(--header-bg);
  border-top: 1px solid var(--border);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 48px;
  max-width: 1712px;
  margin: 0 auto;
}

/* As tall as the link columns, so the hosting credit can sit at the bottom */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.footer-brand .brand-mark {
  width: 48px;
  height: 48px;
}

.footer-brand .brand-name {
  font-size: 22px;
}

/* Hosting credit for the developer, lined up with the bottom of the lowest
   link column. Set slightly apart from the other buttons as a command
   prompt: a > and a blinking cursor, and on hover the name is typed out
   again letter by letter */
.footer-host {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.1em;
  transition: color 0.15s, border-color 0.15s;
}

.footer-host::before {
  content: ">";
  color: var(--accent);
}

/* The line keeps its full width while the name is retyped, so the button
   never changes size (which would move it out from under the pointer); the
   cursor follows the letters */
.footer-host-line {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(18 * (1ch + 0.1em) + 15px);
}

.footer-host-line::after {
  content: "";
  flex: none;
  width: 7px;
  height: 13px;
  background: var(--accent);
  animation: host-cursor 1.1s steps(1) infinite;
}

/* "HOSTED BY TRAIL.MX" is 18 characters; Monocraft is monospaced, so each
   is 1ch plus the letter spacing */
.footer-host-text {
  flex: none;
  overflow: hidden;
  white-space: nowrap;
  width: calc(18 * (1ch + 0.1em));
}

.footer-host:hover {
  color: var(--text);
  border-color: var(--accent);
}

.footer-host:hover .footer-host-text {
  animation: host-type 0.9s steps(18);
}

@keyframes host-cursor {
  50% {
    opacity: 0;
  }
}

@keyframes host-type {
  from {
    width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-host-line::after,
  .footer-host:hover .footer-host-text {
    animation: none;
  }
}

/* Questions line under the Discord button, with the username as a link */
.footer-help {
  max-width: 300px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-transform: none;
}

.footer-help a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.footer-help a:hover {
  color: var(--accent);
}

.footer-title {
  margin-bottom: 20px;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.12em;
}

.footer-col ul {
  display: grid;
  gap: 14px;
  list-style: none;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: none;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--text);
}

/* Small arrow marking links that leave the site */
.footer-ext {
  width: 8px;
  height: 8px;
  opacity: 0.6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1712px;
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: none;
  opacity: 0.8;
}

/* The brand moves above the four columns, then the columns pair up */
@media (max-width: 1100px) {
  .footer-top {
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .site-footer {
    padding: 56px 16px 24px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    margin-top: 40px;
  }
}

/* Policy pages (/terms, /refund). Headings stay in Monocraft; body text uses
   JetBrains Mono, a regular monospace that reads easier in long passages. */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 32px 88px;
  text-transform: none;
}

.legal-title {
  text-transform: none;
  font-weight: 400;
  font-size: 36px;
  letter-spacing: 0.04em;
  text-shadow: 0 calc(1em / 9) 0 var(--bg);
}

.legal-updated {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.legal h2 {
  margin-bottom: 10px;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal p,
.legal li {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 1.6;
}

.legal p + p,
.legal p + ul,
.legal ul + p {
  margin-top: 10px;
}

.legal ul {
  display: grid;
  gap: 4px;
  padding-left: 0;
  list-style: none;
}

/* Square pixel bullets */
.legal li {
  position: relative;
  padding-left: 20px;
}

.legal li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 4px;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

/* Lead-in labels in lists; colour instead of bold, since only the regular
   weight of the body font is loaded */
.legal strong {
  color: var(--text);
  font-weight: 400;
}

.legal a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.legal a:hover {
  color: var(--accent);
}

.legal-note {
  margin-top: 40px;
  font-size: 12px;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .legal {
    padding: 32px 16px 64px;
  }

  .legal-title {
    font-size: 27px;
  }

  .legal p,
  .legal li {
    font-size: 13px;
  }
}

/* Membership page (/membership) */

.membership {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 32px 112px;
}

.membership-head {
  display: grid;
  justify-items: center;
  gap: 24px;
  text-align: center;
}

/* Monthly / yearly switch, built like the grid-size buttons */
.billing {
  display: flex;
  margin-top: 8px;
}

.billing-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  background: var(--header-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

/* A tab that's hidden (My Library's BOUGHT, for now) stays hidden */
.billing-btn[hidden] {
  display: none;
}

.billing-btn + .billing-btn {
  margin-left: -1px;
}

.billing-btn:hover {
  color: var(--text);
}

.billing-btn[aria-pressed="true"] {
  position: relative;
  color: var(--text);
  border-color: var(--muted);
}

.billing-save {
  padding: 3px 7px;
  background: var(--survival);
  color: var(--on-light);
  font-size: 11px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 380px));
  justify-content: center;
  gap: 28px;
  margin-top: 56px;
}

/* Plan cards share the build cards' look */
.plan {
  position: relative;
  /* Above the All-Access glow, so only that card looks lit */
  z-index: 1;
  display: flex;
  flex-direction: column;
  background: var(--header-bg);
  border: 1px solid var(--border);
  transition: translate 0.15s;
}

/* Lifts slightly on hover, like the header links */
.plan:hover {
  translate: 0 -2px;
}

/* Warm glow around the All-Access card, like the one behind the home page's
   All-Access section. Three layers, each wider and fainter, so it fades out
   with no visible edge. --glow is its strength: faint at rest, brightening
   slowly on hover. --breath dims it very slightly and back, over and over. */
@property --glow {
  syntax: "<number>";
  inherits: false;
  initial-value: 0.5;
}

@property --breath {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

.plan-featured {
  --glow: 0.5;
  z-index: 0;
  border-color: rgb(232 145 58 / 0.6);
  box-shadow:
    0 0 80px rgb(232 145 58 / calc(0.1 * var(--glow) * var(--breath))),
    0 0 200px rgb(232 145 58 / calc(0.08 * var(--glow) * var(--breath))),
    0 0 360px rgb(232 145 58 / calc(0.06 * var(--glow) * var(--breath)));
  transition: translate 0.15s, --glow 0.6s ease;
  animation: glow-breathe 6s ease-in-out infinite;
}

.plan-featured:hover {
  --glow: 1;
}

@keyframes glow-breathe {
  50% {
    --breath: 0.8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plan-featured {
    animation: none;
  }
}

.plan-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.plan-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fade the picture into the card body */
.plan-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--header-bg));
}


.plan-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 4px 24px 24px;
}

.plan-name {
  font-weight: 400;
  font-size: 27px;
  text-transform: none;
}

.plan-tagline {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 24px;
}

.plan-was {
  color: var(--muted);
  font-size: 18px;
  opacity: 0.7;
}

.plan-amount {
  font-size: 45px;
  line-height: 1;
  text-shadow: 0 calc(1em / 9) 0 var(--bg);
}

.plan-per {
  margin-left: -6px;
  color: var(--muted);
  font-size: 15px;
}

.plan-billed {
  min-height: 1.5em;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  text-transform: none;
}

.plan-features {
  display: grid;
  gap: 12px;
  margin: 24px 0 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  list-style: none;
  font-size: 14px;
  text-transform: none;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plan-features .pixel-icon {
  flex-shrink: 0;
  color: var(--survival);
}

.plan-features .is-off {
  color: var(--muted);
  opacity: 0.5;
}

.plan-features .is-off .pixel-icon {
  color: var(--muted);
}

.plan-button {
  margin-top: auto;
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  padding: 15px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-align: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.plan-button:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* In place of the button on the member's own plan (membership.js) */
.plan-current {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  border-color: rgb(232 145 58 / 0.5);
  background: rgb(232 145 58 / 0.08);
  cursor: default;
}

.plan-current:hover {
  color: var(--text);
  border-color: rgb(232 145 58 / 0.5);
}

/* Under GET ALL-ACCESS: checkout happens on Stripe's secure page. The Free
   card has an empty one, so both buttons stay level. */
.plan-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* A fixed height, so the empty one matches the one with text */
  height: 18px;
  margin-top: 12px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 18px;
  text-transform: none;
  white-space: nowrap;
}

.plan-secure .pixel-icon {
  width: 10px;
  height: 10px;
}

/* Still one line on the smallest phones */
@media (max-width: 400px) {
  .plan-secure {
    font-size: 11px;
  }
}

/* Welcome to All-Access (/welcome, welcome.js): a celebration with the
   home page's All-Access glow, then the membership and where to go next */
.welcome-hero {
  position: relative;
  /* Keeps the confetti (z-index -1) in front of this background */
  isolation: isolate;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 72px 24px 80px;
  text-align: center;
  background:
    radial-gradient(ellipse 50% 45% at 50% 50%, rgb(232 145 58 / 0.1), transparent),
    linear-gradient(to bottom, var(--bg), var(--header-bg) 30%, var(--header-bg) 70%, var(--bg));
}

/* The character celebrating, at 3 screen pixels per sprite pixel */
.welcome-char {
  width: 147px;
  height: auto;
  image-rendering: pixelated;
}

/* 404: the Welcome hero's layout with the character sitting, filling the
   space between the header and the footer. No glow: that's for All-Access. */
.not-found {
  align-content: center;
  min-height: 70vh;
  background: none;
}

/* 3 screen pixels per sprite pixel, like Welcome */
.not-found .welcome-char {
  width: 111px;
}

.welcome-text {
  max-width: 620px;
}

.welcome-text span {
  color: var(--text);
}

/* Square confetti falling from the top once, behind the title */
.welcome-confetti {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.welcome-hero > :not(.welcome-confetti) {
  position: relative;
}

.welcome-confetti span {
  position: absolute;
  top: -12px;
  opacity: 0;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    translate: 0 0;
    rotate: 0deg;
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    translate: var(--drift) 520px;
    rotate: var(--spin);
  }
}

.welcome-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px 112px;
}

/* Get started: three buttons, icon, label and arrow */
.welcome-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.welcome-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 14px;
  background: var(--header-bg);
  border: 1px solid var(--border);
  transition: border-color 0.15s, translate 0.15s;
}

.welcome-step:hover {
  border-color: var(--muted);
  translate: 0 -2px;
}

.welcome-step-title {
  flex: 1;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.welcome-step-arrow {
  color: var(--muted);
  transition: color 0.15s, translate 0.15s;
}

.welcome-step:hover .welcome-step-arrow {
  color: var(--accent);
  translate: 3px 0;
}

.welcome-fresh {
  margin-top: 72px;
}

/* On the build looked at last, in the card's bottom left corner */
.badge-recent {
  top: auto;
  bottom: 12px;
  left: 12px;
  color: var(--text);
  border-color: rgb(238 240 216 / 0.5);
}

/* Bottom-left corner of a card's picture: LAST VIEWED and NEW side by side */
.card-labels {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-labels .badge {
  position: static;
}

/* Added in the last week, in the accent colour like the ACCESS label */
.badge-new {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

.welcome-manage {
  margin-top: 56px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  text-transform: none;
}

.welcome-manage a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

@media (max-width: 860px) {
  .welcome-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .welcome-hero {
    padding: 48px 16px 56px;
  }

  .welcome-char {
    width: 98px;
  }

  .welcome-body {
    padding: 0 16px 80px;
  }
}

/* GET ALL-ACCESS while Stripe's page loads */
#get-all-access.is-loading {
  opacity: 0.7;
  cursor: progress;
}

/* All-Access members' one opens their membership details */
.plan-current[data-membership] {
  cursor: pointer;
}

.plan-current[data-membership]:hover {
  border-color: var(--accent);
}

/* Same as the GET ACCESS button on the home page */
.plan-button-primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--on-light);
}

.plan-button-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-light);
}

/* FAQ: on the membership page ("Before You Buy") and on /faq */

.faq {
  max-width: 788px;
  margin: 96px auto 0;
}

.faq-title {
  margin-bottom: 24px;
  font-weight: 400;
  font-size: 27px;
  text-align: center;
  text-transform: none;
}

.faq-list {
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  font-size: 15px;
  text-transform: none;
  list-style: none;
  cursor: pointer;
  transition: color 0.15s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover,
.faq-item[open] summary {
  color: var(--accent);
}

.faq-item .pixel-icon {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.faq-close,
.faq-item[open] .faq-open {
  display: none;
}

.faq-item[open] .faq-close {
  display: block;
}

/* Other text read as full sentences, in JetBrains Mono like the FAQ answers
   below: build descriptions, the About intro, review quotes, and the
   explanations in pop-ups, My Library's notice and the membership card.
   Headings, buttons, labels and tags stay in Monocraft. */
.build-desc,
.about-text,
.review-quote,
.modal-text,
.membership-note,
.membership-card .security-text,
.delete-list li,
.delete-note,
.library-notice-text {
  font-family: "JetBrains Mono", monospace;
}

/* The big quote mark above a review keeps the pixel look */
.review-quote::before {
  font-family: "Monocraft", monospace;
}

/* Answers in JetBrains Mono like the policy pages' body text, for easier
   reading; the questions stay in Monocraft */
.faq-item p {
  padding: 0 4px 20px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 1.6;
  text-transform: none;
}

.faq-item a,
.faq-intro a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.faq-item a:hover {
  color: var(--accent);
}

.faq-more {
  display: block;
  width: fit-content;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.1em;
  transition: color 0.15s;
}

.faq-more:hover {
  color: var(--text);
}

/* The /faq page itself */
.faq-page {
  margin: 0 auto;
  padding: 48px 32px 112px;
}

.faq-intro {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 14px;
  text-transform: none;
}

.faq-page .faq-list {
  border-top: 0;
}

.faq-group {
  margin: 40px 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.1em;
}

.faq-cta {
  display: grid;
  justify-items: center;
  gap: 20px;
  margin-top: 72px;
  text-align: center;
  text-transform: none;
  font-size: 18px;
}

@media (max-width: 800px) {
  .plans {
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .membership {
    padding: 48px 16px 80px;
  }

  .billing-btn {
    padding: 0 16px;
    font-size: 13px;
  }

  .faq {
    margin-top: 72px;
  }

  .faq-page {
    padding: 32px 16px 80px;
  }

  .faq-item summary {
    font-size: 14px;
  }

  .faq-item p {
    font-size: 13px;
  }
}

/* Build page (/builds/free-template, /builds/access-template) */

.build {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 32px 112px;
}

.build-back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.1em;
  transition: color 0.15s;
}

.build-back:hover {
  color: var(--text);
}

/* Square picture with the info panel beside it, stretched to the same height */
.build-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 40px;
}

.gallery-main {
  position: relative;
  aspect-ratio: 1;
  background: var(--header-bg);
}

/* The picture opens the full size view */
.gallery-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: none;
  border: 0;
  cursor: zoom-in;
}

.gallery-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.3s ease;
}

/* Zooms in a little on hover, a hint that it opens the full size view */
.gallery-open:hover img {
  scale: 1.04;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-main img {
    transition: none;
  }
}

/* Video slide, last in the gallery when a build has a video: a preview
   filling the square, like the screenshots. Its play button opens the full
   size view, where it plays (build.js). */
.gallery-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.gallery-open[hidden],
.gallery-video[hidden],
.lightbox-img[hidden],
.lightbox-video[hidden] {
  display: none;
}

.lightbox-video iframe,
.lightbox-video video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* YouTube's player fades in over the thumbnail once it has loaded */
.lightbox-video iframe {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lightbox-video iframe.is-ready {
  opacity: 1;
}

/* In the full size view the video shows whole, at 16:9, as big as fits in
   the room the screenshots get */
.lightbox-video {
  width: min(calc(100vw - 208px), calc((100vh - 144px) * 16 / 9));
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--border);
}

/* YouTube's thumbnail with a square play button in the middle */
.video-play {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: none;
  border: 0;
  cursor: pointer;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  translate: -50% -50%;
  background: var(--text);
  color: var(--on-light);
  transition: background 0.15s, scale 0.15s;
}

.video-play-icon .pixel-icon {
  width: 24px;
  height: 24px;
}

.video-play:hover .video-play-icon {
  background: var(--accent);
  scale: 1.08;
}

/* The preview fills its box, like a screenshot */
.video-play img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A video file's first frame, filling the square like a screenshot. Unlike
   the screenshots it doesn't zoom on hover, so nothing jumps when it starts
   playing; the play button reacts instead. */
.video-play video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The counter would cover the player's controls while a video plays */
.lightbox.is-playing .lightbox-count {
  display: none;
}

/* Same arrows as the home page rows, centred on the picture */
.gallery-main .row-arrow {
  top: 50%;
  opacity: 1;
}

.gallery-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgb(15 18 11 / 0.85);
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* Info panel, shares the plan cards' look */
.build-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
  background: var(--header-bg);
  border: 1px solid var(--border);
}

.build-price {
  align-self: flex-start;
  /* Same height as the share button across from it */
  height: 40px;
  padding-block: 0;
  transition: background 0.15s, translate 0.15s;
}

/* A link to the membership page, lifting like the header badge with a tint
   of its own colour */
.build-price:hover {
  background: rgb(232 145 58 / 0.16);
  translate: 0 -2px;
}

.build-price.aa-badge-free:hover {
  background: rgb(188 195 145 / 0.16);
}

/* Always one line; build.js steps the size down from 45px until it fits */
.build-title {
  margin-top: 18px;
  font-weight: 400;
  font-size: 45px;
  line-height: 1.1;
  white-space: nowrap;
  text-transform: none;
  text-shadow: 0 calc(1em / 9) 0 var(--bg);
}

/* The build page has room to wrap its tags onto more lines instead, and they
   lift on hover, so nothing is faded or cut off there */
.build-panel .card-tags {
  flex-wrap: wrap;
  margin-top: 18px;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}

.build-desc {
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-transform: none;
}

.build-desc [data-align="center"] {
  text-align: center;
}

.build-desc [data-align="right"] {
  text-align: right;
}

.build-desc [data-size="large"] {
  font-size: 1.25em;
}

.build-desc [data-size="small"] {
  font-size: 0.85em;
}

/* Pushed down so the stats sit together with the button at the bottom */
.build-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: auto 0 28px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.build-stat {
  padding: 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.build-stat dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.build-stat dt .pixel-icon {
  width: 8px;
  height: 8px;
}

.build-stat dd {
  margin-top: 8px;
  font-size: 15px;
  letter-spacing: 0.04em;
}

/* W, H and L after each size number, on one line */
.build-stat dd:has(.size-axis) {
  white-space: nowrap;
}

.size-axis {
  margin-left: 2px;
  color: var(--muted);
  font-size: 11px;
}

.size-x {
  margin: 0 5px;
  color: var(--muted);
}

/* Share button: a smaller square in the panel's top right corner */
.build-share {
  position: absolute;
  /* Level with the badge, which sits at the panel's top padding */
  top: 28px;
  right: 24px;
  width: 40px;
  height: 40px;
}

.build-share .pixel-icon {
  width: 16px;
  height: 16px;
}

.build-cta {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: color 0.15s, border-color 0.15s, background 0.15s, translate 0.15s;
}

/* Lifts on hover, like the heart and share buttons beside it */
.build-cta:hover {
  translate: 0 -2px;
}

/* DOWNLOAD BUILD with the favourite heart beside it */
.build-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.build-actions .build-cta {
  margin-top: 0;
}

/* Square heart button: outline when not saved, filled orange when saved */
.build-fav {
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, translate 0.15s;
}

.build-fav .pixel-icon {
  width: 20px;
  height: 20px;
}

.build-fav:hover {
  color: var(--text);
  border-color: var(--muted);
  translate: 0 -2px;
}

.build-fav[aria-pressed="true"] {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

/* Share pop-up (build.js): the promo card beside the ways to share it, and
   the build's link underneath */
.modal.share {
  width: min(720px, calc(100% - 32px));
}

/* .modal-box twice, to win over its centred layout further down */
.modal-box.share-box {
  gap: 0;
  padding: 32px 28px 28px;
  text-align: left;
}

.share-box .modal-title {
  margin-top: 10px;
}

.share-main {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: center;
  gap: 28px;
  margin-top: 24px;
}

.share-card {
  display: block;
  width: 100%;
  height: auto;
}

.share-actions {
  display: grid;
  gap: 4px;
}

.share-label {
  font-size: 13px;
  letter-spacing: 0.1em;
}

.share-text {
  margin: 6px 0 12px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 1.6;
  text-transform: none;
}

/* Download image, Share on X, More ways to share */
.share-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: none;
  border: 1px solid transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.share-action:hover {
  color: var(--accent);
  border-color: var(--border);
}

.share-action[hidden] {
  display: none;
}

.share-link {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.share-link-row {
  display: flex;
  gap: 10px;
}

.share-url {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  outline: none;
}

.share-url:focus {
  border-color: var(--muted);
}

.share-copy {
  flex: none;
  margin-top: 0;
  padding: 0 20px;
  background: none;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.share-copy.is-copied {
  color: var(--survival);
  border-color: rgb(140 196 92 / 0.45);
}

/* Phones: the card above the actions, smaller */
@media (max-width: 600px) {
  .modal-box.share-box {
    padding: 28px 18px 20px;
  }

  .share-main {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
  }

  .share-card {
    width: 200px;
  }

  .share-actions {
    justify-self: stretch;
  }

  .share-link-row {
    flex-direction: column;
  }

  /* Stacked, the field shouldn't stretch (that would squash its height) */
  .share-url {
    flex: none;
  }

  .share-copy {
    height: 48px;
  }
}

.build-included {
  margin-top: 72px;
}

.build-heading {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.1em;
}

.build-files {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  list-style: none;
}

/* Each file is a download button, like DOWNLOAD BUILD */
.build-file {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: var(--header-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s;
}

.build-file:hover {
  border-color: var(--muted);
}

/* An odd last file gets the full row instead of sitting alone in a column */
.build-files li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* Green download arrow, or a plain lock without access */
.build-file .pixel-icon {
  flex-shrink: 0;
  color: var(--survival);
}

.build-file.is-locked .pixel-icon {
  color: var(--text);
}

.build-file-name {
  text-transform: none;
}

.build-file-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* An asset pack's zip: last, the full width, with BUILDS at its end opening
   its builds one by one underneath. A file left alone before it gets the full
   row, like an odd last file */
.build-files li.build-files-pack,
.build-files li:nth-child(odd):has(+ li.build-files-pack:last-child) {
  grid-column: 1 / -1;
}

.build-files-pack {
  background: var(--header-bg);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}

.build-files-pack:hover,
.build-files-pack.is-open {
  border-color: var(--muted);
}

.build-pack {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 10px;
}

.build-pack .build-file {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
}

.build-pack .build-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Just the arrow, square, turning over while the builds are open */
.build-pack-toggle {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
}

.build-pack-toggle .pixel-icon {
  width: 12px;
  height: 12px;
  transition: transform 0.15s;
}

.build-pack-toggle[aria-expanded="true"] {
  color: var(--text);
  border-color: var(--muted);
}

.build-pack-toggle[aria-expanded="true"] .pixel-icon {
  transform: rotate(180deg);
}

/* A picture of each build with its name, as many across as fit; a press
   opens it in the 3D guide */
.build-pack-parts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--border);
  animation: account-menu-in 0.18s ease-out;
}

.build-pack-parts[hidden] {
  display: none;
}

.build-pack-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.build-pack-part {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  text-align: left;
}

button.build-pack-part {
  cursor: pointer;
}

button.build-pack-part:hover .pack-shot,
button.build-pack-part:focus-visible .pack-shot {
  border-color: var(--muted);
}

.build-pack-name {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

/* A build's picture, drawn from it by the 3D guide: square, on the view's
   own background, with a faint cube while it's drawn */
.pack-shot {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--border);
  transition: border-color 0.15s;
}

.pack-shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: pack-shot-in 0.3s ease-out;
}

.pack-shot .pixel-icon {
  width: 22px;
  height: 22px;
}

.pack-shot.is-loading .pixel-icon {
  animation: pack-shot-wait 1.2s ease-in-out infinite alternate;
}

@keyframes pack-shot-in {
  from { opacity: 0; }
}

@keyframes pack-shot-wait {
  to { color: var(--muted); }
}

@media (prefers-reduced-motion: reduce) {
  .pack-shot img,
  .pack-shot.is-loading .pixel-icon {
    animation: none;
  }
}

@media (max-width: 600px) {
  .build-files li:nth-child(odd):has(+ li.build-files-pack:last-child) {
    grid-column: auto;
  }

  .build-pack .build-file-meta {
    display: none;
  }

  .build-pack-parts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
  }
}

/* The 3D guide's pack button, beside 3D VIEW / 2D GUIDE / MATERIALS, dropping
   down a picture of every build in the pack like LAYER MATERIALS */
.guide-pack {
  position: relative;
  z-index: 4;
}

.guide-pack-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  max-width: 300px;
  margin: 0;
  padding: 0 16px;
  background: var(--header-bg);
  font-size: 13px;
  white-space: nowrap;
}

.guide-pack-toggle .pixel-icon {
  flex: none;
  width: 14px;
  height: 14px;
}

.guide-pack-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* One of the pack's builds, not all of them: lit in the accent */
.guide-pack-toggle.is-part {
  color: var(--text);
  border-color: rgb(232 145 58 / 0.5);
}

.guide-pack-toggle.is-part > .pixel-icon:first-child {
  color: var(--accent);
}

.guide-pack-toggle[aria-expanded="true"] {
  color: var(--text);
  border-color: var(--muted);
}

.guide-pack-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: min(560px, calc(100dvh - 160px));
  background: var(--header-bg);
  border: 1px solid var(--border);
  animation: account-menu-in 0.18s ease-out;
}

.guide-pack-menu[hidden],
.guide-pack-search[hidden],
.guide-pack-empty[hidden] {
  display: none;
}

.guide-pack-search {
  display: block;
  padding: 10px 12px 0;
}

.guide-pack-search .field {
  width: 100%;
  margin: 0;
}

.guide-pack-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.guide-pack-items li[hidden] {
  display: none;
}

.guide-pack-item {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.guide-pack-item:hover .pack-shot,
.guide-pack-item:focus-visible .pack-shot {
  border-color: var(--muted);
}

.guide-pack-item[aria-pressed="true"] .pack-shot {
  border-color: var(--accent);
}

.guide-pack-label {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.3;
  text-transform: none;
}

.guide-pack-item[aria-pressed="true"] .guide-pack-label {
  color: var(--accent);
}

.guide-pack-empty {
  padding: 0 12px 14px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 600px) {
  /* A line of its own between the heading and the view switch */
  .guide-head:has(.guide-pack) {
    grid-template-areas: "title close" "pack pack" "tabs tabs";
  }

  .guide-pack {
    grid-area: pack;
  }

  .guide-pack-toggle {
    width: 100%;
    max-width: none;
    height: 40px;
    font-size: 12px;
  }

  .guide-pack-toggle > .pixel-icon:last-child {
    margin-left: auto;
  }

  .guide-pack-menu {
    left: 0;
    width: auto;
  }
}

.build-help {
  margin-top: 72px;
}

/* The heading's line doubles as the top of the list, like the FAQ's */
.build-help .build-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.build-help .build-heading .pixel-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.build-help .faq-list {
  border-top: 0;
}

.build-help .faq-item p {
  overflow-wrap: anywhere;
}

/* 3D build guide (build.js, guide/guide-engine.js): a wide card on the page
   with the build slowly turning, which opens the guide full screen */

.build-guide {
  margin-top: 72px;
}

/* The heading's icon, like Helpful Resources' */
.build-guide .build-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.build-guide .build-heading .pixel-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* The 3D view fills whatever holds it. touch-action: none hands every touch
   to the guide (one finger turns, two pinch and move) */
.guide-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
  cursor: grab;
}

.guide-canvas:active {
  cursor: grabbing;
}

/* Loading, or why it couldn't load, in the view's corner */
.guide-status {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  background: rgb(15 18 11 / 0.85);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.guide-status:empty,
.guide-status[hidden] {
  display: none;
}

/* Without access: the build turning (blurred and darkened in the video
   itself), with a lock and the way in */
.guide-locked {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--header-bg);
  border: 1px solid var(--border);
}

.guide-locked-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* All of the build, as the live card shows it */
  object-fit: contain;
  pointer-events: none;
}

.guide-locked-box {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 360px;
  padding: 24px 16px;
  text-align: center;
}

.guide-locked-box > .pixel-icon {
  width: 24px;
  height: 24px;
  color: var(--text);
}

.guide-locked-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  text-transform: none;
}

.guide-locked .plan-button {
  margin-top: 0;
  padding: 14px 22px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* The card on the page; a click anywhere on it opens the guide */
.guide-card {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--header-bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

/* Square (the home page's guide to try): as the card is on phones, with just
   its button along the bottom */
.guide-card.is-square {
  aspect-ratio: 1;
}

.guide-card.is-square .guide-card-text {
  display: none;
}

.guide-card.is-square .guide-card-foot .plan-button {
  flex: 1;
  justify-content: center;
}

/* The home page's TRY THE 3D GUIDE!: outlined on the header colour rather
   than white, so GET ALL-ACCESS stays the main button; lit like the others
   while the card is hovered */
.guide-card-foot .guide-card-try {
  background: var(--header-bg);
  border-color: var(--muted);
  color: var(--text);
}

@media (hover: hover) {
  .guide-card:hover .guide-card-try {
    border-color: var(--text);
  }
}

@media (hover: hover) {
  .guide-card:hover {
    border-color: var(--muted);
  }

  .guide-card:hover .plan-button-primary {
    background: var(--accent);
    border-color: var(--accent);
  }
}

/* On touch screens the border lights up while the card is the one nearest
   the middle of the screen, like the build cards (site.js), fading in */
@media (hover: none) {
  .guide-card {
    transition: border-color 0.35s ease;
  }

  .guide-card.is-centred {
    border-color: var(--muted);
  }
}

/* The preview doesn't answer touch (only the full screen guide does), so a
   swipe over it scrolls the page and a tap opens the guide */
.guide-card .guide-canvas {
  cursor: pointer;
  touch-action: auto;
}

.guide-card .guide-status {
  top: 12px;
  bottom: auto;
}

.guide-card-foot {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(transparent, rgb(15 18 11 / 0.9));
  pointer-events: none;
}

.guide-card-text {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.guide-card-foot .plan-button {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  padding: 14px 20px;
  font-size: 13px;
}

/* Full screen: progress across the top, the layer as the heading, the build,
   and the layer slider along the bottom */
.guide {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  background: var(--bg);
  border: 0;
  color: var(--text);
}

.guide[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  animation: modal-in 0.25s ease-out;
}

.guide.is-closing {
  animation: modal-in 0.25s ease-in reverse forwards;
}

.guide::backdrop {
  background: var(--bg);
}

/* The page behind stays put (and its scrollbar out of the guide's way) */
html:has(.guide[open]) {
  overflow: hidden;
}

.guide .modal-close {
  position: static;
  flex: none;
  translate: none;
  opacity: 1;
}

/* How far up the build the shown layer is; full on ALL */
.guide-progress {
  height: 4px;
  background: var(--border);
}

.guide-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s;
}

/* The heading on the left; the pack's build (for a pack), the view switch
   and the close button on the right, level with the heading's middle. The
   controls are behind ? in the view */
.guide-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title end";
  align-items: center;
  gap: 24px;
  padding: 20px 24px 16px;
}

.guide-head > div:first-child {
  grid-area: title;
  min-width: 0;
}

.guide-head-end {
  grid-area: end;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

/* The close button set apart from the view's own controls */
.guide-head-end > .modal-close {
  margin-left: 12px;
}

.guide-head-title {
  margin-top: 8px;
  font-weight: 400;
  font-size: 36px;
  text-shadow: 0 calc(1em / 9) 0 var(--header-bg);
}

.guide-head-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.guide-stage {
  position: relative;
  min-height: 0;
  margin: 0 24px;
  overflow: hidden;
  background: var(--header-bg);
  border: 1px solid var(--border);
}

/* 1 at the left, ALL at the right */
.guide-rail {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
}

.guide-rail-end {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* The layer slider: a thin track with a square orange thumb */
.guide-slider {
  flex: 1;
  min-width: 0;
  height: 28px;
  background: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* The layers done (left of the thumb) in the accent, like the bar along the
   top. --fill (0 to 1) is how far along the thumb is (build.js); the colour
   changes under the thumb's middle, 9px in at either end. Firefox fills it
   itself. */
.guide-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(to right,
    var(--accent) calc(9px + var(--fill, 0) * (100% - 18px)),
    var(--border) calc(9px + var(--fill, 0) * (100% - 18px)));
}

.guide-slider::-moz-range-track {
  height: 4px;
  background: var(--border);
}

.guide-slider::-moz-range-progress {
  height: 4px;
  background: var(--accent);
}

.guide-slider::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -7px;
  background: var(--accent);
  border: 1px solid var(--bg);
  border-radius: 0;
  -webkit-appearance: none;
}

.guide-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--accent);
  border: 1px solid var(--bg);
  border-radius: 0;
}

.guide-slider:focus-visible {
  outline: 1px solid var(--muted);
  outline-offset: 4px;
}

/* 3D VIEW / 2D GUIDE / MATERIALS, the membership billing switch beside the heading */
.guide-tabs {
  flex: none;
  margin: 0;
}

.guide-tabs .billing-btn {
  height: 44px;
  padding: 0 18px;
  font-size: 13px;
  white-space: nowrap;
}

.guide-tabs .pixel-icon {
  width: 14px;
  height: 14px;
}

.guide-stage[hidden],
.guide-rail[hidden] {
  display: none;
}

/* Text for screen readers only */
.guide-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* A material's picture: its block texture, pixels kept square */
.guide-icon {
  flex: none;
  display: inline-grid;
  place-items: center;
}

.guide-icon span {
  display: block;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

/* LAYER MATERIALS: a button over the top right of the view, dropping down
   the shown layer's materials like the account menu */
.guide-layer-list {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-height: calc(100% - 32px);
}

/* As tall as the moon across from it */
.guide-layer-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  margin: 0;
  padding: 0 16px;
  background: var(--header-bg);
  font-size: 13px;
}

/* Open, as the account menu is when open */
.guide-layer-toggle[aria-expanded="true"] {
  color: var(--text);
  border-color: var(--muted);
}

.guide-layer-toggle .pixel-icon {
  width: 14px;
  height: 14px;
}

/* Materials picked in the list: lit in the accent, with how many, like the
   moon while the layers below are dimmed */
.guide-layer-toggle.is-filtering {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

.guide-layer-count[hidden] {
  display: none;
}

/* SHOW ALL beside the list's close button, while materials are picked */
.guide-layer-menu-end {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.guide-layer-show-all {
  margin: 0;
  padding: 8px 10px;
  font-size: 11px;
}

.guide-layer-show-all[hidden] {
  display: none;
}

/* No taller than the view: the list scrolls inside it */
.guide-layer-menu {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  width: 340px;
  max-width: calc(100vw - 64px);
  min-height: 0;
  background: var(--header-bg);
  border: 1px solid var(--border);
  animation: account-menu-in 0.18s ease-out;
}

.guide-layer-menu[hidden] {
  display: none;
}

.guide-layer-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.guide-layer-menu-title {
  font-size: 16px;
  text-transform: none;
}

.guide-layer-menu-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.guide-layer-menu-sub b {
  color: var(--text);
  font-weight: inherit;
}

.guide-layer-close {
  position: static;
  flex: none;
  translate: none;
  opacity: 1;
}

.guide-layer-items {
  display: grid;
  align-content: start;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

/* Each material a button: picked, it's the only one bright on the layer */
.guide-layer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.guide-layer-item:hover {
  border-color: var(--muted);
}

/* Picked, marked as the member's own plan is */
.guide-layer-item[aria-pressed="true"] {
  background: rgb(232 145 58 / 0.08);
  border-color: rgb(232 145 58 / 0.5);
}

.guide-layer-item:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}

/* The view's actions, CLEAR SELECTION and START BUILD GUIDE, side by side
   at the bottom middle, clear of the full view button in the corner */
.guide-actions {
  position: absolute;
  bottom: 16px;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 152px);
  translate: -50% 0;
  pointer-events: none;
}

.guide-actions > * {
  pointer-events: auto;
}

.guide-selection[hidden],
.guide-block[hidden] {
  display: none;
}

.guide-selection-clear {
  flex: none;
  margin: 0;
  padding: 11px 16px;
  background: var(--header-bg);
  font-size: 13px;
  white-space: nowrap;
}

/* The block under the pointer, named at the top middle, between the buttons
   on the left and LAYER MATERIALS on the right */
.guide-block {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: max(180px, calc(100% - 500px));
  overflow: hidden;
  translate: -50% 0;
  white-space: nowrap;
  padding: 8px 12px;
  background: var(--header-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  text-transform: none;
  pointer-events: none;
}

.guide-block .guide-icon {
  width: 20px;
  height: 20px;
}

.guide-labels {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.guide-labels span {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 7px;
  background: var(--header-bg);
  border: 1px solid var(--muted);
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 600px) {
  /* One above the other at the bottom middle, near the thumb */
  .guide-actions {
    bottom: 10px;
    flex-direction: column;
    gap: 6px;
    max-width: calc(100% - 112px);
  }

  .guide-selection-clear {
    padding: 9px 12px;
    font-size: 11px;
  }

  /* The block tapped is named at the top left, under the buttons there */
  .guide-block {
    top: 58px;
    left: 10px;
    max-width: calc(100% - 20px);
    translate: none;
  }
}

/* The moon over the top left of the view, like LAYER MATERIALS: lit in the
   accent while the layers below are dimmed, as a favourite's heart is */
/* Previous / next layer: square arrows, like the rows', at the slider's two
   ends; faded at the first layer and at all of them */
.guide-step {
  position: static;
  top: auto;
  translate: none;
  flex: none;
  margin: 0;
}

.guide-step:disabled {
  opacity: 0.35;
}

@media (max-width: 600px) {
  /* The slider gets the room the 1 and ALL took */
  .guide-rail-end {
    display: none;
  }

  .guide-rail {
    gap: 12px;
  }

  /* Full size, not the rows' smaller phone arrows: they're tapped a lot */
  .guide-rail .guide-step {
    width: 44px;
    height: 44px;
  }
}

/* START BUILD GUIDE, in the actions at the bottom middle while the whole
   build is shown */
.guide-start {
  flex: none;
  margin: 0;
  padding: 11px 16px;
  font-size: 13px;
  white-space: nowrap;
}

.guide-start[hidden] {
  display: none;
}

/* Full view, at the bottom right, like the moon: corners out, or in (lit)
   while in full view */
.guide-full-toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  background: var(--header-bg);
}

.guide-full-toggle .pixel-icon {
  width: 16px;
  height: 16px;
}

.guide-full-off,
.guide.is-full .guide-full-on {
  display: none;
}

.guide.is-full .guide-full-off {
  display: block;
}

.guide.is-full .guide-full-toggle {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

/* Full view: the progress line and the heading fold away while the view
   grows to the edges, all in one smooth movement (and back); the layer slider
   stays under it.
   A fold is a one-row grid going from 1fr to 0fr, so it shrinks from its
   own height to nothing; its padding goes with it */
.guide {
  --fold-time: 0.45s;
  --fold-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

.guide-fold {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--fold-time) var(--fold-ease), opacity var(--fold-time) var(--fold-ease), visibility 0s;
}

.guide-fold > * {
  min-height: 0;
  transition: padding var(--fold-time) var(--fold-ease), translate var(--fold-time) var(--fold-ease);
}

.guide.is-folding .guide-fold > *,
.guide.is-full .guide-fold > * {
  overflow: hidden;
}

.guide.is-full .guide-fold {
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows var(--fold-time) var(--fold-ease), opacity calc(var(--fold-time) * 0.6) ease-out, visibility 0s var(--fold-time);
}

/* The heading drifts up as it goes */
.guide.is-full .guide-head {
  padding-top: 0;
  padding-bottom: 0;
  translate: 0 -12px;
}

.guide-progress {
  transition: height var(--fold-time) var(--fold-ease);
}

.guide.is-full .guide-progress {
  height: 0;
}

.guide-stage {
  transition: margin var(--fold-time) var(--fold-ease), border-color var(--fold-time) var(--fold-ease);
}

/* To the top and side edges (clear of a phone's notch and rounded corners),
   with the layer slider under it */
.guide.is-full .guide-stage {
  margin: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
  border-color: transparent;
}

/* Closing the guide leaves full view at once */
.guide.is-instant,
.guide.is-instant * {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .guide {
    --fold-time: 0.01s;
  }
}

@media (max-width: 600px) {
  .guide-full-toggle {
    right: 10px;
    bottom: 10px;
    width: 40px;
    height: 40px;
  }
}

.guide-dim-toggle {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  background: var(--header-bg);
}

.guide-dim-toggle .pixel-icon {
  width: 16px;
  height: 16px;
}

.guide-dim-toggle[aria-pressed="true"] {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

/* The moon after ?, then the grid beside it and styled like it (it takes
   its classes) */
.guide-dim-toggle {
  left: 68px;
}

.guide-grid-toggle {
  left: 120px;
}

/* Only this layer, beside the grid */
.guide-only-toggle {
  left: 172px;
}

/* The 2D tilt, at the bottom left (2D only), like the moon: lit while tilted */
.guide-tilt-toggle {
  top: auto;
  bottom: 16px;
  left: 16px;
}

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

/* ?, first over the top left, like the moon */
.guide-help-toggle {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  background: var(--header-bg);
  font-size: 18px;
  line-height: 1;
}

.guide-help-toggle[aria-expanded="true"] {
  color: var(--text);
  border-color: var(--muted);
}

/* The controls, dropped down from ? like LAYER MATERIALS: one list for a
   mouse and keys, another for touch, whichever this device has */
.guide-help {
  position: absolute;
  top: 68px;
  left: 16px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: 340px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 84px);
  background: var(--header-bg);
  border: 1px solid var(--border);
  animation: account-menu-in 0.18s ease-out;
}

.guide-help[hidden] {
  display: none;
}

.guide-help-body {
  min-height: 0;
  padding: 4px 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.guide-help-group {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-help dl {
  display: grid;
  gap: 8px;
}

.guide-help dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.guide-help dd {
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: right;
}

.guide-help kbd {
  display: inline-block;
  padding: 3px 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.guide-help-touch {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .guide-help-mouse {
    display: none;
  }

  .guide-help-touch {
    display: block;
  }
}

.guide-layer-item-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 13px;
  text-transform: none;
}

.guide-layer-item-name .guide-icon {
  width: 28px;
  height: 28px;
}

.guide-layer-item-count {
  display: grid;
  justify-items: end;
  flex: none;
  font-size: 14px;
}

.guide-layer-item-count b {
  font-weight: inherit;
}

.guide-layer-item-count span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.guide-layer-items .guide-layer-none {
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* MATERIALS: a search, the totals and a reset over the table */
.guide-materials {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  margin: 0 24px 24px;
  background: var(--header-bg);
  border: 1px solid var(--border);
}

.guide-materials[hidden] {
  display: none;
}

.guide-materials-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.guide-materials-bar .search {
  background: var(--bg);
}

.guide-materials-summary {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.guide-materials-summary b {
  color: var(--text);
  font-weight: inherit;
}

.guide-stat + .guide-stat::before {
  content: " · ";
}

.guide-materials-reset {
  margin: 0 0 0 auto;
  padding: 12px 16px;
  font-size: 12px;
}

.guide-materials-scroll {
  position: relative;
  min-height: 0;
  overflow: auto;
}

.guide-materials-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.guide-materials-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 16px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: inherit;
  letter-spacing: 0.1em;
  text-align: left;
}

.guide-materials-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.guide-materials-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

.guide-materials-table tbody tr:hover {
  background: var(--bg);
}

.guide-materials-table th.guide-materials-number,
.guide-materials-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.guide-materials-have {
  width: 52px;
}

.guide-material {
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: none;
}

.guide-material .guide-icon {
  width: 20px;
  height: 20px;
}

/* Ticked: struck through and dimmed, the box green like the sign-up ticks */
.guide-materials-table tr.is-had td:not(.guide-materials-have) {
  color: var(--muted);
  text-decoration: line-through;
  opacity: 0.6;
}

/* Positioned, so its hidden input is placed inside it, not far down the guide */
.guide-check {
  position: relative;
  display: inline-grid;
  cursor: pointer;
}

.guide-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.guide-check input:checked + .auth-check {
  background: var(--survival);
  border-color: var(--survival);
  color: var(--on-light);
}

.guide-check input:checked + .auth-check .pixel-icon {
  opacity: 1;
}

.guide-check input:focus-visible + .auth-check {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}

.guide-check:hover .auth-check {
  border-color: var(--text);
}

.guide-materials-empty {
  padding: 32px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 800px) {
  .guide-materials-reset {
    width: 100%;
    margin-left: 0;
  }

  .guide-materials-bar .search-wrap,
  .guide-materials-bar .search {
    width: 100%;
  }

  /* The figures as a row of four, each number over its name */
  .guide-materials-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    border: 1px solid var(--border);
  }

  .guide-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    font-size: 10px;
    text-align: center;
  }

  .guide-stat + .guide-stat {
    border-left: 1px solid var(--border);
  }

  .guide-stat + .guide-stat::before {
    content: none;
  }

  .guide-stat b {
    font-size: 15px;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 600px) {
  /* The switch gets a line of its own under the heading */
  .guide-head {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title close" "tabs tabs";
    align-items: start;
    gap: 12px;
  }

  .guide-head-end {
    display: contents;
  }

  .guide-head-end .modal-close {
    grid-area: close;
    margin-left: 0;
  }

  .guide-tabs {
    grid-area: tabs;
  }

  /* Three of them share a phone's width */
  .guide-tabs .billing-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 6px;
    font-size: 12px;
  }

  .guide-materials {
    margin: 0 16px 16px;
  }

  .guide-materials-table th,
  .guide-materials-table td {
    padding: 10px 8px;
  }

  .guide-materials-table {
    font-size: 12px;
  }

  .guide-layer-list {
    top: 10px;
    right: 10px;
  }

  /* Just MATERIALS, with room beside the three toggles at the top left */
  .guide-layer-toggle {
    gap: 8px;
    padding: 0 12px;
  }

  .guide-layer-word {
    display: none;
  }

  /* A little smaller and closer, so the four of them leave room for
     MATERIALS across from them */
  .guide-help-toggle,
  .guide-dim-toggle {
    top: 10px;
    width: 40px;
    height: 40px;
  }

  .guide-help-toggle {
    left: 10px;
  }

  .guide-dim-toggle {
    left: 56px;
  }

  .guide-grid-toggle {
    left: 102px;
  }

  .guide-only-toggle {
    left: 148px;
  }

  .guide-tilt-toggle {
    top: auto;
    bottom: 10px;
    left: 10px;
  }

  .guide-help {
    top: 58px;
    left: 10px;
    max-width: calc(100% - 20px);
    max-height: calc(100% - 68px);
  }

  .guide-layer-menu {
    max-width: calc(100vw - 52px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-layer-menu {
    animation: none;
  }
}

@media (max-width: 1000px) {
  .build-guide {
    margin-top: 56px;
  }
}

@media (max-width: 600px) {
  .guide-card,
  .guide-locked {
    aspect-ratio: 1;
  }

  /* The square card crops the picture's empty sides, so the build stays big */
  .guide-locked-media {
    object-fit: cover;
  }

  .guide-card-text {
    display: none;
  }

  .guide-card-foot .plan-button {
    flex: 1;
    justify-content: center;
  }

  .guide-head {
    padding: 16px 16px 10px;
  }

  .guide-head-title {
    font-size: 27px;
  }

  .guide-stage {
    margin: 0 16px;
  }

  .guide-rail {
    padding: 12px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-progress span {
    transition: none;
  }

  .guide[open],
  .guide.is-closing {
    animation-duration: 0.01s;
  }
}

.build-more {
  margin-top: 96px;
}

@media (max-width: 1000px) {
  /* minmax(0, …) so the one-line title can't widen the column past the screen */
  .build-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .build-included,
  .build-help {
    margin-top: 56px;
  }
}

@media (max-width: 600px) {
  .build {
    padding: 20px 16px 80px;
  }

  .build-top {
    gap: 24px;
  }

  .build-panel {
    padding: 22px 16px 16px;
  }

  /* Still level with the badge in the smaller padding */
  .build-share {
    top: 22px;
    right: 16px;
  }

  .build-files {
    grid-template-columns: 1fr;
  }

  .build-more {
    margin-top: 72px;
  }

  /* Three suggestions are enough once cards stack */
  .build-more .card:nth-child(n + 4) {
    display: none;
  }
}

/* "Almost there!" download pop-up on the build page */

.modal {
  width: min(440px, calc(100% - 32px));
  margin: auto;
  padding: 0;
  background: var(--header-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.modal::backdrop {
  background: rgb(15 18 11 / 0.6);
  backdrop-filter: blur(4px);
}

/* The page dims and blurs in gradually while the pop-up fades in and lifts
   into place; closing (.is-closing, set in build.js) plays it in reverse */
.modal[open],
.lightbox[open] {
  animation: modal-in 0.25s ease-out;
}

.modal[open]::backdrop,
.lightbox[open]::backdrop {
  animation: backdrop-in 0.45s ease-out;
}

/* Both run for the same time, since the pop-up is removed when one ends */
.modal.is-closing,
.modal.is-closing::backdrop,
.lightbox.is-closing,
.lightbox.is-closing::backdrop {
  animation: modal-in 0.25s ease-in reverse forwards;
}

.modal.is-closing::backdrop,
.lightbox.is-closing::backdrop {
  animation-name: backdrop-in;
}

@keyframes modal-in {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}

@keyframes backdrop-in {
  from {
    background: rgb(15 18 11 / 0);
    backdrop-filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal[open],
  .modal[open]::backdrop,
  .modal.is-closing,
  .modal.is-closing::backdrop,
  .lightbox[open],
  .lightbox[open]::backdrop,
  .lightbox.is-closing,
  .lightbox.is-closing::backdrop {
    animation-duration: 0.01s;
  }
}

.modal-box {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 36px 24px 24px;
  text-align: center;
}

/* Same square button as the row arrows, in the top right corner */
.modal-close {
  top: 12px;
  right: 12px;
  translate: none;
}

.modal-title {
  font-weight: 400;
  font-size: 27px;
  text-transform: none;
  text-shadow: 0 calc(1em / 9) 0 var(--bg);
}

.modal-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-transform: none;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.build-cta,
.modal-actions .plan-button {
  font: inherit;
  cursor: pointer;
}

.modal-actions .plan-button {
  padding: 14px 10px;
  font-size: 13px;
  white-space: nowrap;
}

.modal-actions .plan-button:not(.plan-button-primary) {
  background: none;
}

/* Full size screenshot view on the build page, at the image's own shape */

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text);
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgb(15 18 11 / 0.85);
  backdrop-filter: blur(6px);
}

/* Room left around the image for the arrows, close button and counter */
.lightbox-img {
  display: block;
  max-width: calc(100vw - 208px);
  max-height: calc(100vh - 144px);
}

.lightbox .row-arrow {
  position: fixed;
  top: 50%;
  opacity: 1;
}

.lightbox .row-arrow-left {
  left: 32px;
}

.lightbox .row-arrow-right {
  right: 32px;
}

.lightbox .modal-close {
  top: 24px;
  right: 32px;
}

.lightbox-count {
  position: fixed;
  right: auto;
  bottom: 28px;
  left: 50%;
  translate: -50% 0;
}

@media (max-width: 600px) {
  .lightbox-img {
    max-width: calc(100vw - 32px);
  }

  .lightbox-video {
    width: min(calc(100vw - 32px), calc((100vh - 144px) * 16 / 9));
  }

  /* Arrows sit on the image edges once there is no room beside it */
  .lightbox .row-arrow-left {
    left: 24px;
  }

  .lightbox .row-arrow-right,
  .lightbox .modal-close {
    right: 24px;
  }
}

/* Sign in / create account pop-up (site.js), built on the "Almost there!"
   pop-up: same panel, close button, title and animation */

.auth {
  max-height: calc(100% - 32px);
  overflow-y: auto;
}

.auth-box {
  gap: 0;
  padding: 36px 28px 28px;
  text-align: left;
}

.auth-view {
  display: grid;
}

.auth-view[hidden] {
  display: none;
}

.auth-eyebrow {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.auth-title {
  margin-top: 10px;
}

.auth-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-transform: none;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.auth-input-wrap {
  position: relative;
  display: block;
}

/* Helper line under a field, e.g. the Minecraft skin tip on Display name */
.auth-hint {
  display: grid;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-transform: none;
}

/* The hint and its warning share one spot, so the field is as tall as the
   longer of the two and nothing shifts when they swap */
.auth-hint > span {
  grid-area: 1 / 1;
}

.auth-hint-text {
  opacity: 0.75;
}

/* Same colour as the form's error line */
.auth-hint-warning {
  color: var(--accent);
  visibility: hidden;
}

.auth-hint.is-warning .auth-hint-text {
  visibility: hidden;
}

.auth-hint.is-warning .auth-hint-warning {
  visibility: visible;
}

.auth-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  translate: 0 -50%;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.15s;
}

.auth-input-wrap:focus-within .auth-icon {
  color: var(--text);
}

/* Inputs sit on the darker page colour, like holes in the panel */
.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 42px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: none;
  transition: border-color 0.15s;
}

.auth-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.auth-input:hover,
.auth-input:focus {
  border-color: var(--muted);
  outline: none;
}

/* Eye button inside password fields */
.auth-reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  translate: 0 -50%;
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
}

.auth-reveal:hover,
.auth-reveal[aria-pressed="true"] {
  color: var(--text);
}

/* Human check stand-in: a box with a pixel tick in the Survival green */
.auth-verify {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14px;
  text-transform: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.auth-verify:hover {
  border-color: var(--muted);
}

.auth-verify input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.auth-check {
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--muted);
  transition: background 0.15s, border-color 0.15s;
}

.auth-check .pixel-icon {
  width: 12px;
  height: 12px;
  opacity: 0;
}

.auth-verify input:checked + .auth-check {
  background: var(--survival);
  border-color: var(--survival);
  color: var(--on-light);
}

.auth-verify input:checked + .auth-check .pixel-icon {
  opacity: 1;
}

.auth-verify input:focus-visible + .auth-check {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}

.auth-error {
  color: var(--accent);
  font-size: 13px;
  text-transform: none;
}

.auth-error[hidden] {
  display: none;
}

/* Confirmation in place of the form (Reset Password, Reset Your Password):
   the next step as the main button, and the resend line under it */
.auth-done {
  display: grid;
  margin-top: 24px;
}

.auth-done[hidden],
.auth-form[hidden],
.auth-form-only[hidden] {
  display: none;
}

.auth-done .auth-submit {
  margin-top: 0;
}

/* Same as GET ALL-ACCESS: light, golden and lifted on hover */
.auth-submit {
  margin-top: 8px;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, translate 0.15s;
}

.auth-submit:hover {
  translate: 0 -2px;
}

.auth-switch {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  text-transform: none;
}

.auth-switch a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
  transition: color 0.15s;
}

.auth-switch a:hover {
  color: var(--accent);
}

/* Under CREATE ACCOUNT: agreeing to the Terms and being at least 13 is part
   of signing up, so there's no checkbox to tick */
.auth-legal {
  margin-top: -4px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  text-transform: none;
}

.auth-legal a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.auth-legal a:hover {
  color: var(--accent);
}

.auth-forgot {
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
  text-transform: none;
}

.auth-forgot a {
  color: var(--muted);
  transition: color 0.15s;
}

.auth-forgot a:hover {
  color: var(--text);
}

/* /reset-password is just the pop-up; keeps the footer below the screen */
.reset-page {
  min-height: 100vh;
}

@media (max-width: 600px) {
  .auth-box {
    padding: 32px 18px 20px;
  }
}

/* Account security page (/settings/security, security.js): the sign-in pop-up's
   panels, labels and inputs, laid out as cards down the page */

.security {
  max-width: 1100px;
  /* Keeps the footer low when only the short logged-out card shows */
  min-height: 70vh;
  margin: 0 auto;
  padding: 56px 32px 112px;
}

.security-eyebrow {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.14em;
}

.security-title {
  margin-top: 10px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
  font-size: 45px;
  letter-spacing: 0.02em;
  text-shadow: 0 calc(1em / 9) 0 var(--bg);
  text-transform: none;
}

.security-settings {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.security-settings[hidden],
.security-card[hidden] {
  display: none;
}

/* Summary strip: three cells side by side (also on /library) */
.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--header-bg);
  border: 1px solid var(--border);
}

.status-strip div {
  padding: 18px 20px;
}

.status-strip div + div {
  border-left: 1px solid var(--border);
}

.status-strip dt {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.status-strip dd {
  margin-top: 8px;
  font-size: 15px;
  text-transform: none;
}

/* Survival green for anything that's set up and safe */
.status-strip .is-good,
.security-message.is-good {
  color: var(--survival);
}

.status-strip .is-access {
  color: var(--accent);
}

.security-card {
  display: grid;
  gap: 24px;
  padding: 32px;
  background: var(--header-bg);
  border: 1px solid var(--border);
}

/* Explanation on the left, form on the right */
.security-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 48px;
  align-items: start;
}

.security-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

/* On / off switch (Settings > Profile, new-build emails): a square knob in a
   square track, sliding right and turning orange when on */
.email-switch {
  position: relative;
  flex: none;
  width: 56px;
  height: 30px;
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.email-switch:hover {
  border-color: var(--muted);
}

.email-switch-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  background: var(--muted);
  transition: translate 0.15s, background 0.15s;
}

.email-switch[aria-checked="true"] {
  background: rgb(232 145 58 / 0.15);
  border-color: rgb(232 145 58 / 0.6);
}

.email-switch[aria-checked="true"] .email-switch-knob {
  translate: 26px 0;
  background: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .email-switch-knob {
    transition: none;
  }
}

.security-kicker {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.security-heading {
  margin-top: 10px;
  font-weight: 400;
  font-size: 24px;
  text-transform: none;
}

.security-text {
  margin-top: 10px;
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-transform: none;
}

/* Current email, sunk into the panel like the inputs */
.security-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.security-current > div {
  min-width: 0;
}

.security-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.security-email {
  margin-top: 6px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

/* Small outlined labels: VERIFIED, THIS DEVICE, OPTIONAL / ENABLED */
.security-tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.security-tag .pixel-icon {
  width: 10px;
  height: 10px;
}

.security-tag.is-good {
  color: var(--survival);
  border-color: rgb(140 196 92 / 0.5);
}

.security-form {
  display: grid;
  gap: 16px;
}

.security-message {
  color: var(--accent);
  font-size: 13px;
  line-height: 1.5;
  text-transform: none;
}

.security-message[hidden] {
  display: none;
}

/* The pop-up's SIGN IN button style, as real buttons */
.security-submit,
.security-action {
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, translate 0.15s;
}

.security-submit:hover,
.security-action:hover {
  translate: 0 -2px;
}

/* Outlined buttons (CANCEL, TURN OFF): no browser button fill */
.security-submit:not(.plan-button-primary),
.security-action:not(.plan-button-primary) {
  background: none;
}

.security-action {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 12px;
  padding: 14px 22px;
}

.security-action[hidden],
.security-twofactor[hidden],
.security-twofactor-on[hidden],
.security-backup[hidden],
.security-verify[hidden] {
  display: none;
}

/* NEW BACKUP CODES and TURN OFF side by side */
.security-twofactor-manage {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* Backup codes and the code check: below the heading, like the setup step */
.security-backup,
.security-verify {
  display: grid;
  gap: 16px;
  max-width: 560px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.security-backup .security-text,
.security-verify .security-text {
  margin-top: 6px;
}

/* The codes in two columns, sunk into the panel like the inputs */
.security-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  list-style: none;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: none;
}

.security-backup .security-twofactor-actions .plan-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
}

/* Two-factor setup: QR code stand-in beside the code field */
.security-twofactor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.security-qr {
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  background: var(--text);
  color: var(--on-light);
}

.security-qr svg {
  width: 126px;
  height: 126px;
  fill: currentColor;
  shape-rendering: crispEdges;
}

.security-twofactor-steps {
  display: grid;
  gap: 16px;
  max-width: 420px;
}

.security-twofactor-steps .security-text {
  margin-top: 0;
}

.security-twofactor-actions {
  display: flex;
  gap: 12px;
}

.security-twofactor-actions .plan-button {
  flex: 1;
}

/* SIGN OUT OTHERS: outlined in the accent colour */
.security-outline {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: none;
  border: 1px solid rgb(232 145 58 / 0.5);
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.security-outline:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-light);
}

.security-outline:disabled {
  border-color: var(--border);
  color: var(--muted);
  background: none;
  opacity: 0.5;
  cursor: default;
}

.security-sessions {
  list-style: none;
  border-top: 1px solid var(--border);
}

.security-session {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.security-session-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(188 195 145 / 0.3);
  color: var(--muted);
}

.security-session-info {
  display: grid;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.security-session-name {
  font-size: 15px;
  text-transform: none;
}

.security-session-time {
  color: var(--muted);
  font-size: 12px;
  text-transform: none;
}

.security-link {
  flex: none;
  padding: 8px;
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.security-link:hover {
  color: var(--text);
}

/* Logged out */
.security-signed-out {
  justify-items: start;
  margin-top: 28px;
}

.security-signed-out .security-text {
  margin-top: 0;
  font-size: 14px;
}

.security-signed-out-actions {
  display: flex;
  gap: 12px;
}

.security-signed-out-actions .plan-button {
  padding: 14px 28px;
}

@media (max-width: 860px) {
  .security-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .security {
    padding: 36px 16px 72px;
  }

  .security-title {
    font-size: 30px;
    padding-bottom: 20px;
  }

  .security-card {
    padding: 22px 18px;
  }

  .status-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .status-strip div + div {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .status-strip div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 14px 18px;
  }

  .status-strip dd {
    margin-top: 0;
  }

  .security-card-head {
    flex-direction: column;
    gap: 18px;
  }

  .security-twofactor {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .security-session {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .security-session-info {
    flex-basis: calc(100% - 56px);
  }

  .security-session .security-tag {
    margin-left: 56px;
  }

  .security-session .security-link {
    margin-left: auto;
  }
}

/* Settings pages (/settings/billing, /settings/security): the security
   page's header with a tab bar under it, one page per tab */

.settings-title {
  padding-bottom: 0;
  border-bottom: 0;
}

.settings-tabs {
  display: flex;
  gap: 32px;
  margin-top: 28px;
  border-bottom: 1px solid var(--border);
}

.settings-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* The current tab's underline sits on the bar's rule */
  margin-bottom: -1px;
  padding: 14px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.settings-tab .pixel-icon {
  width: 12px;
  height: 12px;
}

.settings-tab:hover {
  color: var(--text);
}

.settings-tab[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.settings-intro {
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
  text-transform: none;
}

.settings a.security-action {
  text-decoration: none;
  white-space: nowrap;
}

/* Profile: a preview of how the member appears, then the display name, the
   Minecraft skin and deleting the account */

.profile-preview {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* The account menu's avatar, larger */
.profile-avatar,
.profile-skin-face {
  display: grid;
  flex: none;
  place-items: center;
  overflow: hidden;
  background: var(--accent);
  color: var(--on-light);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  font-size: 32px;
}

.profile-skin-face {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.profile-avatar img,
.profile-skin-face img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  overflow: hidden;
  font-size: 24px;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.profile-since {
  margin-top: 8px;
  text-transform: none;
  letter-spacing: 0.04em;
}

.security-tag.is-access {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

.profile-skin-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-transform: none;
}

/* DELETE ACCOUNT centred against the heading and text */
.profile-delete-head {
  align-items: center;
}

/* Deleting the account is in red (--danger), the card's label, its button
   and the pop-up's, so it stands apart from the orange actions elsewhere */
.profile-delete .security-kicker,
.deletion-scheduled .security-kicker,
.delete-modal .auth-eyebrow {
  color: var(--danger);
}

.profile-delete .security-outline {
  border-color: rgb(224 87 74 / 0.5);
  color: var(--danger);
}

.profile-delete .security-outline:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-light);
}

/* Delete pop-up: the membership pop-up's box, with what deleting does as a
   list and the way back in an accent panel */
.delete-list {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-left: 4px;
  list-style: none;
  text-transform: none;
}

.delete-list li {
  display: flex;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}

/* A small square as the bullet */
.delete-list li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.55em;
  background: var(--danger);
}

.delete-list li[hidden] {
  display: none;
}

.delete-note {
  margin-top: 8px;
  padding: 14px 16px;
  background: rgb(232 145 58 / 0.06);
  border: 1px solid rgb(232 145 58 / 0.4);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-transform: none;
}

.delete-note strong {
  color: var(--text);
  font-weight: 400;
}

/* Password (and code) above the buttons */
.delete-form,
.password-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

/* Change password pop-up (Settings > Security): built like the delete
   pop-up, with CANCEL and UPDATE PASSWORD side by side */
.password-form .membership-actions .membership-button {
  margin-top: 6px;
}

/* "Your password has been updated." under the card's heading and button */
.security-password .security-message {
  margin-top: 16px;
}

.delete-form .auth-field[hidden] {
  display: none;
}

.delete-form .membership-actions .membership-button {
  margin-top: 6px;
}

/* DELETE MY ACCOUNT filled in the accent colour */
.delete-modal .membership-button.membership-button-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-light);
}

.delete-modal .membership-button.membership-button-danger:hover {
  background: var(--text);
  border-color: var(--text);
}

@media (max-width: 600px) {
  .profile-preview {
    flex-wrap: wrap;
    gap: 16px;
  }

  .profile-avatar {
    width: 56px;
    height: 56px;
    font-size: 26px;
  }

  .profile-info {
    flex-basis: calc(100% - 72px);
  }

  .profile-name {
    font-size: 20px;
  }

  .profile-preview .profile-plan {
    margin-left: 72px;
  }

  /* Stacked under the text: back to the left */
  .profile-delete-head {
    align-items: flex-start;
  }
}

/* Membership & Billing: the membership pop-up's details as a card, then the
   card on file and a list of payments */

.membership-card .membership-details {
  margin-top: 0;
}

.membership-card-action {
  margin-top: 24px;
}

.membership-card .membership-actions {
  align-self: center;
}

.membership-card .membership-actions .membership-button {
  margin-top: 0;
}

.settings .security-current {
  justify-content: flex-start;
  margin-top: 0;
}

.billing-card-info {
  flex: 1;
}

.billing-card-info .security-label {
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0.04em;
}

.billing-method {
  display: grid;
  gap: 16px;
}

.billing-payments[hidden],
.billing-empty[hidden] {
  display: none;
}

.billing-amount {
  flex: none;
  min-width: 64px;
  font-size: 15px;
  text-align: right;
}

.billing-empty {
  margin-top: 0;
}

/* Declined renewal (paymentFailed): the card, its tag, the history entry
   and the membership note in the accent colour */
.security-tag.is-warning {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

.security-current.is-failed {
  border-color: rgb(232 145 58 / 0.5);
}

.security-text.is-warning,
.membership-note.is-warning {
  color: var(--accent);
}

/* No receipt for a failed payment: RECEIPT greyed out, keeping the row's shape */
.billing-no-receipt {
  opacity: 0.3;
  cursor: default;
}

.billing-no-receipt:hover {
  color: var(--accent);
}

/* Under the header on every page but Settings > Billing: what went wrong and
   UPDATE CARD, in the library notice's style. Solid and in front, since the
   home page's banner runs up under it. */
.payment-banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 14px 20px;
  background: linear-gradient(rgb(232 145 58 / 0.06), rgb(232 145 58 / 0.06)), var(--header-bg);
  border: 1px solid rgb(232 145 58 / 0.4);
}

.payment-banner-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(232 145 58 / 0.5);
  color: var(--accent);
}

.payment-banner-text {
  flex: 1;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 1.6;
  text-transform: none;
}

.payment-banner-button {
  flex: none;
  margin-top: 0;
  padding: 13px 20px;
  font-size: 13px;
}

@media (max-width: 1280px) {
  .payment-banner {
    margin: 0 40px 24px;
  }
}

@media (max-width: 600px) {
  .payment-banner {
    flex-wrap: wrap;
    margin: 0 16px 20px;
  }

  .payment-banner-text {
    flex-basis: calc(100% - 56px);
  }

  .payment-banner-button {
    flex: 1;
  }
}

@media (max-width: 600px) {
  /* Tabs scroll sideways rather than wrap */
  .settings-tabs {
    gap: 24px;
    margin-top: 20px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .settings-tab {
    font-size: 12px;
  }

  /* Without icons, and with just BILLING, all three tabs fit on a phone */
  .settings-tab .pixel-icon,
  .settings-tab-long {
    display: none;
  }

  .settings-intro {
    margin-top: 18px;
    font-size: 13px;
  }

  /* DEFAULT drops under the card name, lined up with it */
  .settings .security-current {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .billing-card-info {
    flex-basis: calc(100% - 56px);
    min-width: 0;
  }

  .billing-method .security-current .security-tag {
    margin-left: 56px;
  }

  .billing-payment .billing-amount {
    min-width: 0;
    margin-left: 56px;
  }

  .billing-payment .security-tag {
    margin-left: 0;
  }
}

/* My Library page (/library, library.js): the security page's header and
   strip, then the build cards with a heart and a download button */

.library-content {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.library-content[hidden],
.library-notice[hidden] {
  display: none;
}

/* Without All-Access: one line about the locked builds, with the way back */
.library-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: rgb(232 145 58 / 0.06);
  border: 1px solid rgb(232 145 58 / 0.4);
}

.library-notice-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(232 145 58 / 0.5);
  color: var(--accent);
}

.library-notice-text {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-transform: none;
}

.library-notice-button {
  flex: none;
  margin-top: 0;
  padding: 13px 20px;
  font-size: 13px;
}

/* FAVOURITES / DOWNLOADED, built like the membership billing switch, as
   two halves across the full width of the line under My Library */
.library-tabs {
  margin-top: 4px;
}

.library-tabs .billing-btn {
  flex: 1;
  justify-content: center;
}

.library-tabs .billing-btn .pixel-icon {
  width: 14px;
  height: 14px;
}

.library-count {
  color: var(--muted);
  font-size: 12px;
  opacity: 0.8;
}

.library-grid {
  margin-top: 4px;
}

/* Grows on hover like the cards on Browse; a click anywhere except the heart
   and DOWNLOAD opens the build (library.js) */
.library-card {
  position: relative;
  cursor: pointer;
}

.card-media {
  display: block;
}

/* Heart in the top left corner of the picture, on the badges' dark backing.
   Also on the build cards on Browse and the home page (.card-fav). */
.library-fav,
.card-fav {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: rgb(15 18 11 / 0.85);
  border: 1px solid rgb(188 195 145 / 0.5);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.library-fav:hover,
.card-fav:hover {
  color: var(--text);
}

.library-fav[aria-pressed="true"],
.card-fav[aria-pressed="true"] {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

.library-meta {
  display: grid;
  min-height: 3em;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-transform: none;
}

/* The build page's file buttons: green download, or a lock without access */
.library-download {
  margin-top: 14px;
  padding: 12px 14px;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.library-download .build-file-name {
  text-transform: uppercase;
}

.library-download.is-locked {
  color: var(--muted);
}

.library-empty {
  display: grid;
  grid-column: 1 / -1;
  justify-items: center;
  gap: 20px;
  border: 1px dashed var(--border);
}

.library-empty .plan-button {
  margin-top: 0;
  padding: 13px 24px;
}

@media (max-width: 760px) {
  .library-notice {
    flex-wrap: wrap;
  }

  .library-notice-text {
    flex-basis: calc(100% - 56px);
  }

  .library-notice-button {
    flex: 1;
  }

  .library-tabs .billing-btn {
    gap: 6px;
    padding: 0 8px;
    font-size: 12px;
  }
}

/* PREVIOUSLY DOWNLOADED would wrap in half a phone's width */
@media (max-width: 600px) {
  .library-tab-extra {
    display: none;
  }
}

/* DOWNLOADED tab: one file per row across the full width, like What's
   Included, with the build's name in front and the download date */
.library-files {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
}

/* The file button with its X beside it */
.library-file-row {
  display: flex;
  gap: 8px;
}

/* X to take a file off the list: a square like the cards' heart button */
.library-remove {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  background: var(--header-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.library-remove:hover {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

.library-file .build-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.library-file-build {
  color: var(--text);
}

.library-file-sep {
  margin: 0 10px;
  color: var(--muted);
  opacity: 0.6;
}

.library-file .build-file-name {
  color: var(--muted);
}

.library-file-date {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0.8;
}

/* Wide enough for the longest format (".LITEMATIC") so the dates line up */
.library-file .build-file-meta {
  min-width: 172px;
  margin-left: 24px;
  text-align: right;
}

@media (max-width: 600px) {
  .library-file {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .library-file .build-file-name {
    flex-basis: calc(100% - 28px);
    white-space: normal;
  }

  .library-file-date {
    margin-left: 28px;
  }

  .library-file .build-file-meta {
    min-width: 0;
    margin-left: auto;
  }
}

/* "Choose a File" pop-up (site.js): What's Included's file buttons in one
   column, with DOWNLOAD ALL underneath */
.file-picker {
  width: min(520px, calc(100% - 32px));
}

.file-picker-box {
  gap: 0;
  padding: 36px 24px 24px;
  text-align: left;
}

.file-picker-files {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 20px;
}

.file-picker-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, translate 0.15s;
}

.file-picker-all:hover {
  translate: 0 -2px;
}

.file-picker-all-meta {
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0.7;
}

/* Under DOWNLOAD ALL, the same size but outlined: it opens the guide rather
   than downloading. Lifts on hover like DOWNLOAD ALL. */
.file-picker-guide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  background: none;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, translate 0.15s;
}

.file-picker-guide:hover {
  translate: 0 -2px;
}

@media (max-width: 600px) {
  .file-picker-box {
    padding: 32px 16px 16px;
  }

  /* Format and size under the file name, so names don't wrap */
  .file-picker-files .build-file {
    flex-wrap: wrap;
    row-gap: 4px;
    padding: 12px;
  }

  .file-picker-files .build-file-name {
    flex-basis: calc(100% - 28px);
  }

  .file-picker-files .build-file-meta {
    margin-left: 28px;
  }

  .file-picker-all {
    white-space: nowrap;
  }

  .file-picker-all-meta {
    display: none;
  }
}

/* Membership pop-up (site.js), opened from MEMBERSHIP in the header, the
   ALL-ACCESS badge and the name at the top of the account menu */

/* The badge and the menu's name block as buttons */
button.account-badge {
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, translate 0.15s;
}

button.account-badge:hover {
  background: rgb(232 145 58 / 0.12);
  translate: 0 -2px;
}

/* GUEST and FREE badges: links to the membership page, lifting the same way
   with a tint of their own colour */
a.account-badge {
  transition: background 0.15s, translate 0.15s;
}

a.account-badge:hover {
  background: rgb(188 195 145 / 0.12);
  translate: 0 -2px;
}

a.badge-guest:hover {
  background: rgb(141 144 136 / 0.15);
}

button.account-user {
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.membership-box {
  gap: 0;
  padding: 36px 24px 24px;
  text-align: left;
}

.membership-view {
  display: grid;
}

.membership-view[hidden] {
  display: none;
}

/* Plan, member since and renew / end date as label-value rows */
.membership-details {
  display: grid;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.membership-details div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.membership-details dt {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.membership-details dd {
  font-size: 14px;
  text-align: right;
  text-transform: none;
}

/* Days left, with a bar of how much of the period remains */
.membership-time {
  margin-top: 18px;
}

.membership-left {
  font-size: 14px;
  text-transform: none;
}

.membership-bar {
  height: 8px;
  margin-top: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.membership-bar span {
  display: block;
  height: 100%;
  background: var(--survival);
}

/* Cancelled: the remaining time in the accent colour */
.membership-bar.is-ending span {
  background: var(--accent);
}

.membership-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-transform: none;
}

.membership-button {
  margin-top: 20px;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.membership-button:not(.plan-button-primary) {
  background: none;
}

/* Switch billing period: a text button on Settings > Billing. Orange when
   it's the yearly saving. */
.membership-switch {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-align: center;
  cursor: pointer;
  transition: color 0.15s;
}

.membership-switch:hover {
  color: var(--text);
}

.membership-switch.is-upsell {
  color: var(--accent);
}

.membership-switch.is-upsell:hover {
  color: var(--text);
}

.membership-switch[hidden] {
  display: none;
}

/* On Settings > Billing it sits under the text in the card's left column */
.membership-card .membership-switch {
  width: auto;
  margin-top: 14px;
  text-align: left;
}

/* MANAGE BILLING in the pop-up: a link to /settings/billing */
a.membership-button {
  display: block;
  text-decoration: none;
}

.membership-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.membership-actions .membership-button {
  padding: 14px 8px;
  font-size: 12px;
}

/* CANCEL MEMBERSHIP in the confirm step: outlined in the accent colour */
.membership-button-danger {
  color: var(--accent);
  border-color: rgb(232 145 58 / 0.5);
}

.membership-button-danger:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-light);
}

@media (max-width: 600px) {
  .membership-box {
    padding: 32px 16px 16px;
  }

  .membership-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Short message at the bottom of the screen (showToast in site.js) */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  translate: -50% 0;
  background: var(--header-bg);
  border: 1px solid rgb(232 145 58 / 0.5);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: none;
  animation: toast-in 0.25s ease;
  transition: opacity 0.4s;
}

.toast.is-leaving {
  opacity: 0;
}

@keyframes toast-in {
  from {
    opacity: 0;
    translate: -50% 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}
