/* Twin Embers web Builder: the Poke Ball look (plain red ground, dark-red pills, white cards and notes, a dark band
   for the footer). It is the last block of this file and overrides the earlier "ascuas" layers. One font. */
:root {
  --slate: rgb(64, 72, 104);
  --slate-soft: rgba(64, 72, 104, 0.18);
  --ember-deep: #4a0b0a;
  --ember: #9e1f17;
  --ember-hot: #d9401f;
  --flame: #ff8a3d;
  --gold: #ffd166;
  --panel: #fff8ec;
  --panel-inset: #f3e6cf;
  --ink: #2b2f45;
  --ink-soft: #5b6180;
  --ok: #2f9e5b;
  --bad: #c62828;
  --radius: 18px;
  --poke-red: #e3350d;
  --poke-yellow: #ffcb05;
  font-family: "Fredoka", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

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

html { background: var(--ember-deep); scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  /* The lower screen's backdrop (tools/make_ember_skin.py): a dark red gradient with faint diagonal stripes and a
     fire's glow at the foot. The embers rising over it are drawn by app.js on #embers. */
  background:
    radial-gradient(ellipse 110% 22% at 50% 104%, rgba(255, 110, 30, 0.42) 0%, rgba(255, 110, 30, 0.16) 55%, transparent 100%),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 0 2px, transparent 2px 8px),
    linear-gradient(180deg, rgb(132, 26, 22) 0%, rgb(34, 6, 8) 100%);
  background-attachment: fixed;
}

/* The embers' canvas: a third of the window's pixels, scaled up sharp like the 3DS's own. */
#embers {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; image-rendering: pixelated; z-index: 0;
}
.page { position: relative; z-index: 1; }

.page {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

header.hero {
  text-align: center;
  color: #fff;
  margin: 8px 0 22px;
}
header.hero h1 {
  margin: 0;
  font-size: clamp(30px, 7vw, 44px);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 0 var(--slate), 0 0 18px rgba(255, 138, 61, 0.7);
}
header.hero p {
  margin: 6px 0 0;
  color: #ffe2c4;
}

.card {
  background: var(--panel);
  border: 3px solid var(--slate);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
  padding: 18px 18px 20px;
  margin-bottom: 20px;
}
.card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 32px;
}
.card > p.lead { margin: 0 0 14px; color: var(--ink-soft); }

/* Steps: a number badge and its content, centred on the same line. */
.step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 2px dashed var(--slate-soft);
}
.step:first-of-type { border-top: 0; }
.step .num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ember-hot);
  border: 3px solid var(--slate);
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.step h3 { margin: 6px 0 8px; font-size: 18px; line-height: 24px; }
.step p { margin: 0 0 8px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Buttons in the style of Pokémon's own menus: chunky pills with a dark outline and a solid shadow that lift on
   hover and press down when tapped. The main ones carry a Poké Ball that spins on hover. */
.btn {
  --face: linear-gradient(180deg, #f2552e 0%, var(--poke-red) 60%, #c72b08 100%);
  --edge: #7a1a06;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 3px solid var(--slate);
  border-radius: 999px;
  background: var(--face);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.2px;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.18), 0 5px 0 var(--slate);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
/* The Poké Ball on the main buttons. */
.btn:not(.secondary):not(.x):not(.kofi)::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--slate);
  background:
    radial-gradient(circle, #fff 0 3px, var(--slate) 3px 5px, transparent 5px),
    linear-gradient(180deg, var(--poke-red) 0 44%, var(--slate) 44% 56%, #fff 56%);
  box-shadow: 0 0 0 2px #fff;
  transition: transform 0.45s cubic-bezier(.3, 1.4, .5, 1);
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.18), 0 8px 0 var(--slate),
              0 12px 20px rgba(0, 0, 0, 0.25);
}
.btn:not(.secondary):not(.x):not(.kofi):hover { --face: linear-gradient(180deg, #ff6a3d 0%, #f03e12 60%, #d13209 100%); }
.btn:hover::before { transform: rotate(360deg); }
.btn:active {
  transform: translateY(4px);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 1px 0 var(--slate);
  transition-duration: 0.05s;
}
.btn:focus-visible { outline: 3px solid var(--poke-yellow); outline-offset: 3px; }
/* Secondary: white, turning Pokémon yellow on hover. */
.btn.secondary { --face: linear-gradient(180deg, #ffffff 0%, #eceef4 100%); color: var(--ink); text-shadow: none; }
.btn.secondary:hover { --face: linear-gradient(180deg, #ffe066 0%, var(--poke-yellow) 100%); color: #2a3a8c; }
.btn.big { min-height: 56px; font-size: 20px; padding: 0 30px; }
.btn.big::before { width: 26px; height: 26px; }
.btn[disabled], .btn[aria-disabled="true"] {
  --face: linear-gradient(180deg, #e4e4ea 0%, #c9cbd6 100%);
  color: #8b90a8;
  text-shadow: none;
  opacity: 0.8;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 5px 0 var(--slate);
}
.btn[disabled]::before { transform: none; }
.btn.hidden, .hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover:not([disabled]):not([aria-disabled="true"]), .btn:focus-visible { transform: none; }
}

/* Status pills share the buttons' height so text lines up beside them. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 2px solid var(--slate);
  background: var(--panel-inset);
  font-size: 15px;
  line-height: 1;
  font-weight: bold;
}
.pill.ok { background: #d8f2e1; color: #1d6b3c; }
.pill.bad { background: #fadcd9; color: #8e1b1b; }
.pill.busy { background: #fff0cf; color: #7a4d00; }

/* Switch: the track and its knob, centred on the first line of the label. */
.switch {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  flex: none;
  position: relative;
  width: 58px;
  height: 32px;
  margin-top: 0;
  border-radius: 999px;
  border: 3px solid var(--slate);
  background: linear-gradient(180deg, #b9bdcd, #d3d6e2);
  box-shadow: inset 0 2px 3px rgba(64, 72, 104, 0.35);
  transition: background 0.15s, box-shadow 0.15s;
}
/* Inside the border the track is 52 x 26: a 20px knob sits 3px from every edge. */
.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #e3e5ee);
  border: 2px solid var(--slate);
  box-shadow: 0 2px 0 rgba(64, 72, 104, 0.3);
  transition: transform 0.15s;
}
.switch:hover .track { box-shadow: inset 0 2px 3px rgba(64, 72, 104, 0.35), 0 0 0 3px rgba(255, 190, 90, 0.6); }
.switch input:checked + .track { background: linear-gradient(180deg, #ff9a3c, var(--ember-hot)); }
.switch input:checked + .track::after { transform: translateX(26px); }
.switch input:focus-visible + .track { outline: 3px solid var(--gold); outline-offset: 3px; }
.switch .label { line-height: 1.3; }
.switch .label small { display: block; color: var(--ink-soft); }

/* Progress bar. */
.progress {
  height: 22px;
  border: 3px solid var(--slate);
  border-radius: 999px;
  background: var(--panel-inset);
  overflow: hidden;
  margin: 10px 0 6px;
}
.progress .fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(180deg, var(--gold), var(--flame));
  transition: width 0.2s;
}
.progress.indeterminate .fill {
  width: 35%;
  animation: slide 1.1s ease-in-out infinite alternate;
}
@keyframes slide { from { margin-left: 0; } to { margin-left: 65%; } }
.status { min-height: 1.45em; color: var(--ink-soft); margin: 0; }

.result {
  margin-top: 12px;
  padding: 12px 14px;
  border: 2px solid var(--slate);
  border-radius: 14px;
  background: #e9f7ee;
}
.result code, .mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}
.error {
  margin-top: 12px;
  padding: 12px 14px;
  border: 2px solid var(--slate);
  border-radius: 14px;
  background: #fadcd9;
  color: #6e1515;
}

.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--panel-inset);
  font-size: 14px;
}

/* Flat sprite-style icons: solid fills, one slate outline. */
.icon { flex: none; width: 32px; height: 32px; }
.icon .o { stroke: var(--slate); stroke-width: 2; stroke-linejoin: round; }

/* QR panels. */
.qr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qr-tag {
  display: inline-block; margin-bottom: 6px; padding: 2px 10px; border-radius: 999px;
  background: var(--poke-red); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
}
.qr-panel {
  background: #fff;
  border: 3px solid var(--slate);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}
.qr-panel h3 { margin: 0 0 10px; font-size: 18px; line-height: 24px; }
.qr-box {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-panel ol { text-align: left; margin: 8px 0 0; padding-left: 22px; font-size: 14px; }
.qr-panel > .mono { display: block; margin-top: 6px; color: var(--ink-soft); }
.qr-actions { justify-content: center; margin-top: 12px; }

footer {
  color: #ffd9bf;
  font-size: 13px;
  text-align: center;
  padding: 0 8px;
}
footer a, .card a:not(.btn) { color: inherit; }
.card a:not(.btn) { color: var(--ember); font-weight: bold; }

@media (max-width: 560px) {
  .page { padding: 16px 16px 32px; }
  .card { padding: 14px 14px 16px; }
  .qr-grid { grid-template-columns: 1fr; }
  .btn.big, .result .btn { width: 100%; }
  .btn { padding: 0 16px; font-size: 16px; }
  .btn.big { font-size: 19px; }
  .btn { white-space: normal; text-align: center; line-height: 1.15; padding-top: 6px; padding-bottom: 6px; }
  .result { padding: 10px; }
}

/* The hero: the banner over the embers, the way in, and what the game is. */
header.hero h1 { margin: 0; line-height: 0; }
header.hero .banner {
  width: min(680px, 96%);
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 22px rgba(255, 138, 61, 0.35));
}
header.hero .tagline { max-width: 600px; margin: 10px auto 16px; font-size: 18px; color: #ffe2c4; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 16px; }
.hero-actions .btn { text-decoration: none; }
.features {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  list-style: none; margin: 0; padding: 0;
}
.features li {
  padding: 5px 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 209, 102, 0.55);
  background: rgba(74, 11, 10, 0.55);
  color: #ffe9cc;
  font-size: 14px;
}

.gallery-group {
  margin: 18px 0 10px; padding: 4px 14px; display: inline-block;
  border-radius: 999px; background: var(--ember); color: #fff; font-size: 16px; line-height: 22px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 2px 0 var(--slate);
}
.gallery-group:first-child { margin-top: 4px; }

/* The gallery: each capture in a small 3DS-coloured frame, pixels kept sharp. */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery figure { margin: 0; text-align: center; }
.gallery .shot {
  display: block; width: 100%; padding: 6px; cursor: zoom-in;
  background: linear-gradient(180deg, #4a5070 0%, var(--slate) 100%);
  border: 0; border-radius: 12px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  transition: transform 0.12s ease;
}
.gallery .shot:hover { transform: translateY(-4px); box-shadow: 0 8px 0 rgba(0, 0, 0, 0.3), 0 0 0 3px var(--flame), 0 10px 22px rgba(255, 138, 61, 0.45); }
.gallery .shot:active { transform: translateY(1px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.gallery .shot:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.gallery img, .lightbox img {
  display: block; width: 100%; height: auto; border-radius: 6px;
  image-rendering: pixelated; background: #000;
}
.gallery figcaption { margin-top: 6px; font-size: 13px; line-height: 1.3; color: var(--ink-soft); }
.lightbox {
  border: 3px solid var(--slate); border-radius: var(--radius); padding: 12px;
  background: var(--panel); max-width: min(92vw, 520px); width: 100%;
}
.lightbox::backdrop { background: rgba(30, 6, 6, 0.75); }
.lightbox p { margin: 8px 0 0; text-align: center; color: var(--ink-soft); }
.lightbox form { text-align: right; margin: 0 0 6px; }
.lightbox .close {
  border: 0; background: var(--slate); color: #fff; font-size: 22px; line-height: 1;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}
.lightbox .close:hover { background: var(--ember-hot); transform: scale(1.1); }
.lightbox .close:active { transform: scale(0.95); }
.lightbox .close:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.lightbox img { width: auto; max-width: 100%; max-height: 76vh; margin: 0 auto; }

/* Pokémon look: a top bar with a Poké Ball, Pokédex-red card headers, type-coloured feature cards. */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, calc((100% - 1040px) / 2));
  background: rgba(34, 6, 8, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--poke-red);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.topbar a { color: #fff; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; flex: none; }
.brand .ball { width: 30px; height: 30px; transition: transform 0.4s ease; }
.brand:hover .ball { transform: rotate(-200deg); }
.topbar .links { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.topbar .links a {
  padding: 7px 13px; border-radius: 999px; font-weight: 500; font-size: 16px; white-space: nowrap;
  color: #ffe2c4; transition: background 0.15s, color 0.15s;
}
.topbar .links a:hover, .topbar .links a:focus-visible { background: rgba(255, 255, 255, 0.12); color: #fff; outline: none; }
.topbar .x-link { display: flex; align-items: center; background: #000; border: 2px solid rgba(255, 255, 255, 0.25); padding: 6px 9px !important; }
.topbar .x-link svg { width: 18px; height: 18px; }
/* The language selector: two segments in one pill, the page's own language lit in gold. */
.topbar .lang-switch {
  display: flex; flex: none; margin-right: 6px; padding: 2px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.28); border: 2px solid rgba(255, 255, 255, 0.18);
}
.topbar .lang-switch a { padding: 4px 10px; font-size: 14px; font-weight: 600; }
.topbar .lang-switch a[aria-current="page"] { background: var(--gold); color: #4a2a00; }

.page { max-width: 1040px; }
header.hero { margin: 18px 0 30px; }
header.hero .tagline { font-size: 19px; font-weight: 500; }

/* Feature cards, each with the colour of a Pokémon type. */
.features {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  max-width: 860px; margin: 6px auto 0; text-align: left;
}
.features li {
  --t: var(--poke-red);
  position: relative;
  padding: 14px 14px 14px 16px;
  border: 0; border-radius: 16px;
  background: rgba(255, 248, 236, 0.96);
  color: var(--ink-soft); font-size: 14px; line-height: 1.35;
  box-shadow: inset 6px 0 0 var(--t), 0 5px 0 rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease;
}
.features li:hover { transform: translateY(-3px); }
.features li b { display: block; color: var(--ink); font-size: 17px; font-weight: 600; margin: 6px 0 2px; }
.features .type {
  display: inline-block; padding: 2px 10px; border-radius: 6px;
  background: var(--t); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}
.t-fire { --t: #ee8130 !important; }
.t-water { --t: #6390f0 !important; }
.t-grass { --t: #5fbd3d !important; }
.t-psychic { --t: #f95587 !important; }
.t-electric { --t: #e8b800 !important; }
.t-dragon { --t: #6f35fc !important; }

/* Cards: a Pokédex-red header band with a faint Poké Ball, the content on cream. */
.card {
  border-radius: 22px; padding: 0 22px 22px; overflow: hidden; margin-bottom: 26px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.28), 0 18px 40px rgba(0, 0, 0, 0.25);
}
.card > h2 {
  position: relative;
  margin: 0 -22px 16px; padding: 14px 22px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.16' stroke-width='9'%3E%3Ccircle cx='50' cy='50' r='44'/%3E%3Cpath d='M6 50h28M66 50h28'/%3E%3Ccircle cx='50' cy='50' r='15'/%3E%3C/g%3E%3C/svg%3E") no-repeat right -26px center / 130px,
    linear-gradient(180deg, #ef4a26 0%, var(--poke-red) 55%, #b8280a 100%);
  color: #fff; font-size: 24px; font-weight: 600; line-height: 34px;
  text-shadow: 0 2px 0 rgba(64, 30, 20, 0.45);
  border-bottom: 3px solid var(--slate);
}
.card > h2 .icon {
  width: 42px; height: 42px; padding: 4px; border-radius: 50%;
  background: #fff; border: 3px solid var(--slate);
}
.card > p.lead { font-size: 17px; }
.step h3, .qr-panel h3 { font-weight: 600; }
.step .num { background: var(--poke-red); }


.gallery-group {
  display: flex; align-items: center; gap: 8px; width: fit-content;
  background: var(--slate); font-weight: 600;
}
.gallery-group::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: linear-gradient(180deg, var(--poke-red) 0 45%, var(--slate) 45% 55%, #fff 55%);
  box-shadow: 0 0 0 2px #fff;
}
.gallery .shot { border-radius: 14px; }
.gallery .shot:hover { transform: translateY(-4px) scale(1.015); box-shadow: 0 8px 0 rgba(0, 0, 0, 0.25); }
.gallery figcaption { font-weight: 500; }

/* Follow on X. */
.follow-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: 18px;
  background: linear-gradient(135deg, #14171f 0%, #2a2f40 100%);
  color: #d6d9e4; border: 3px solid var(--slate);
}
.follow-text { flex: 1 1 280px; }
.follow-text p { margin: 0; }
.follow-text .handle { color: #fff; font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.follow-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.x { --face: linear-gradient(180deg, #2b2f3a 0%, #000 100%); border-color: #fff; }
.btn.x:hover { --face: linear-gradient(180deg, #3a4050 0%, #0b0d12 100%); }
.btn.x svg { transition: transform 0.3s ease; }
.btn.x:hover svg { transform: scale(1.2) rotate(-8deg); }
.btn.x svg { width: 20px; height: 20px; position: relative; }
/* Ko-fi: a warm cup, the heart on it in Ko-fi's coral. */
.btn.kofi { --face: linear-gradient(180deg, #ffe3a3 0%, #f2b14a 100%); color: #4a2a00; border-color: var(--slate); }
.btn.kofi:hover { --face: linear-gradient(180deg, #fff0c8 0%, #f7c25e 100%); }
.btn.kofi svg { width: 22px; height: 22px; position: relative; transition: transform 0.3s ease; }
.btn.kofi:hover svg { transform: rotate(-10deg) scale(1.15); }

footer { padding-top: 6px; }
footer a { color: #fff; font-weight: 600; }

@media (max-width: 760px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qr-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar .brand span { display: none; }
  .topbar .links a { padding: 7px 9px; font-size: 15px; }
  .card { padding: 0 14px 16px; }
  .card > h2 { margin: 0 -14px 14px; padding: 12px 14px; font-size: 20px; }
  .features li { padding: 12px; }
  .follow-actions, .follow-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brand .ball, .features li, .gallery .shot, .btn, .btn::before, .btn svg { transition: none; }
}

/* ---- Ascuas 2: the look of the game's own lower screen (v0.6.0). Cream raised cards with a light inner line, the
   selected row's orange for headers and main buttons, the blue of BACK for the secondary ones, green switches and
   bars like the game's, and the message box's blue double frame for notes. Same structure, one font. ---- */
:root {
  --cream: #fff6e2;
  --cream-edge: #ffffff;
  --row: #fdeccb;
  --sel-top: #ffb24d;
  --sel: #f57f22;
  --sel-low: #d9531a;
  --sel-edge: #8a3208;
  --back-top: #7fa0ee;
  --back: #4f72cf;
  --back-low: #3552a6;
  --on-top: #6fdc8b;
  --on: #35b25c;
  --box-edge: #4763b3;
  --box-inner: #b9c9f2;
}

/* Cards: cream, slate outline, a white line inside it (the game's raised pieces). */
.card {
  background: var(--cream);
  box-shadow: inset 0 0 0 3px var(--cream-edge), 0 8px 0 rgba(0, 0, 0, 0.3), 0 18px 40px rgba(0, 0, 0, 0.25);
}
/* Their header is the selected row: orange, white text, the marker arrow before the icon. */
.card > h2 {
  background: linear-gradient(180deg, var(--sel-top) 0%, var(--sel) 52%, var(--sel-low) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), inset 0 -4px 0 rgba(120, 40, 0, 0.22);
  text-shadow: 0 2px 0 rgba(120, 40, 0, 0.5);
  border-bottom: 3px solid var(--slate);
}
.card > h2::before {
  content: ""; flex: none; width: 0; height: 0;
  border-style: solid; border-width: 9px 0 9px 13px; border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 2px 0 rgba(120, 40, 0, 0.45));
}
.card > h2 .icon { box-shadow: 0 2px 0 rgba(120, 40, 0, 0.35); }

/* Main buttons: the selected row. No Poke Ball: the marker arrow, which nudges forward on hover. */
.btn {
  --face: linear-gradient(180deg, var(--sel-top) 0%, var(--sel) 55%, var(--sel-low) 100%);
  border-radius: 14px;
  text-shadow: 0 2px 0 rgba(120, 40, 0, 0.45);
}
.btn:not(.secondary):not(.x):not(.kofi)::before {
  width: 0; height: 0; border-radius: 0; background: none; box-shadow: none;
  border-style: solid; border-width: 7px 0 7px 10px; border-color: transparent transparent transparent #fff;
  transition: transform 0.15s ease;
}
.btn.big::before { width: 0; height: 0; border-width: 8px 0 8px 12px; }
.btn:not(.secondary):not(.x):not(.kofi):hover { --face: linear-gradient(180deg, #ffc266 0%, #ff8f33 55%, #e5611f 100%); }
.btn:hover::before { transform: translateX(3px); }
/* Secondary buttons: the blue of BACK. */
.btn.secondary {
  --face: linear-gradient(180deg, var(--back-top) 0%, var(--back) 55%, var(--back-low) 100%);
  color: #fff; text-shadow: 0 2px 0 rgba(20, 30, 80, 0.5);
}
.btn.secondary:hover { --face: linear-gradient(180deg, #9db8f6 0%, #6285dc 55%, #4163bb 100%); color: #fff; }
.btn.kofi { border-radius: 14px; text-shadow: none; }
.btn.x { text-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { --face: linear-gradient(180deg, #e4e4ea 0%, #c9cbd6 100%); text-shadow: none; }

/* Switches and bars: the green of the game. */
.switch input:checked + .track { background: linear-gradient(180deg, var(--on-top), var(--on)); }
.progress { background: #3a3f55; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.3); }
.progress .fill { background: linear-gradient(180deg, var(--on-top), var(--on)); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35); }

/* Value chips and step numbers. */
.pill { background: var(--row); border-radius: 10px; }
.step { border-top: 2px solid rgba(64, 72, 104, 0.14); }
.step .num {
  background: linear-gradient(180deg, var(--sel-top), var(--sel-low)); border-radius: 12px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 3px 0 var(--slate); text-shadow: 0 1px 0 rgba(120, 40, 0, 0.5);
}

/* Notes, results and errors: the message box (white, blue double frame). */
.note, .result, .error {
  background: #fff; border: 3px solid var(--box-edge); border-radius: 12px;
  box-shadow: inset 0 0 0 2px var(--box-inner), 0 3px 0 rgba(34, 53, 111, 0.35);
  color: var(--ink);
}
.result { background: #f1fbf4; }
.error {
  background: #fff1ef; color: #6e1515; border-color: #a33a2e;
  box-shadow: inset 0 0 0 2px #f1c1ba, 0 3px 0 rgba(110, 21, 21, 0.3);
}

/* Feature cards: the option rows (cream, a colour stripe, slate outline). */
.features li {
  background: var(--cream); border: 2px solid var(--slate); border-radius: 14px;
  box-shadow: inset 7px 0 0 var(--t), inset 0 0 0 2px var(--cream-edge), 0 5px 0 rgba(0, 0, 0, 0.3);
  padding-left: 20px;
}
.features .type { border-radius: 8px; border: 2px solid rgba(0, 0, 0, 0.18); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3); }

/* Gallery groups: a selected tab. Captures: a cream frame like a card. */
.gallery-group {
  background: linear-gradient(180deg, var(--sel-top) 0%, var(--sel) 55%, var(--sel-low) 100%);
  border: 2px solid var(--slate); border-radius: 12px; padding: 4px 14px 4px 10px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 3px 0 var(--slate);
  text-shadow: 0 1px 0 rgba(120, 40, 0, 0.5);
}
.gallery-group::before {
  width: 0; height: 0; border-radius: 0; background: none; box-shadow: none;
  border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent #fff;
}
.gallery .shot {
  background: var(--cream); border: 2px solid var(--slate); padding: 5px;
  box-shadow: inset 0 0 0 2px var(--cream-edge), 0 4px 0 rgba(0, 0, 0, 0.3);
}
.gallery .shot:hover { box-shadow: inset 0 0 0 2px var(--cream-edge), 0 8px 0 rgba(0, 0, 0, 0.28), 0 0 0 3px var(--sel); }
.lightbox { background: var(--cream); box-shadow: inset 0 0 0 3px var(--cream-edge); }
.lightbox .close {
  border-radius: 10px; background: linear-gradient(180deg, var(--back-top), var(--back-low)); border: 2px solid var(--slate);
}
.lightbox .close:hover { background: linear-gradient(180deg, var(--sel-top), var(--sel-low)); }

/* QR panels and tags. */
.qr-panel { background: var(--row); box-shadow: inset 0 0 0 2px var(--cream-edge); }
.qr-box { border: 2px solid var(--slate); padding: 6px; }
.qr-tag { background: linear-gradient(180deg, var(--sel-top), var(--sel-low)); border: 2px solid var(--slate); border-radius: 8px; }

/* Top bar: the ember edge instead of a red line; a hovered link is one of the column buttons; the language of the
   page is the selected segment. */
.topbar { border-bottom: 3px solid var(--sel); box-shadow: 0 2px 0 var(--sel-edge), 0 6px 18px rgba(0, 0, 0, 0.4); }
.topbar .links a { border-radius: 10px; border: 2px solid transparent; }
.topbar .links a:hover, .topbar .links a:focus-visible { background: var(--cream); color: var(--ink); border-color: var(--slate); }
.topbar .lang-switch { border-radius: 12px; background: var(--row); border: 2px solid var(--slate); }
.topbar .lang-switch a { border-radius: 8px; color: var(--ink); border: 0; }
.topbar .lang-switch a:hover { background: rgba(245, 127, 34, 0.25); color: var(--ink); border: 0; }
.topbar .lang-switch a[aria-current="page"] {
  background: linear-gradient(180deg, var(--sel-top), var(--sel-low)); color: #fff; text-shadow: 0 1px 0 rgba(120, 40, 0, 0.5);
}
.topbar .x-link, .topbar .x-link:hover { border-radius: 10px; background: #000; border-color: rgba(255, 255, 255, 0.25); }

.card a:not(.btn) { color: var(--sel-low); }
.follow-panel { border-radius: 14px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12); }

/* The gallery: one row a group that slides sideways (35 captures in a 3-column grid made the page three screens of
   pictures). A capture snaps into place; the bar under the row is the ember's orange. */
.gallery {
  display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(220px, 27%);
  gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 8px 6px 14px; margin: 0 -6px;
  scroll-snap-type: x proximity; scroll-padding-left: 6px;
  scrollbar-width: thin; scrollbar-color: var(--sel) var(--row);
}
.gallery::-webkit-scrollbar { height: 12px; }
.gallery::-webkit-scrollbar-track { background: var(--row); border: 2px solid var(--slate); border-radius: 999px; }
.gallery::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--sel-top), var(--sel-low)); border: 2px solid var(--slate); border-radius: 999px;
}
.gallery figure { scroll-snap-align: start; }
.gallery figcaption { min-height: 2.6em; }
.gallery-group { margin-top: 14px; }
@media (max-width: 760px) { .gallery { grid-template-columns: none; grid-auto-columns: 46%; } }
@media (max-width: 480px) { .gallery { grid-auto-columns: 68%; } }

/* The Builder's options: each one a row of the game's OPTIONS (cream, slate outline, the switch centred on its first
   line); a row that is on gets the green stripe. */
.switch {
  align-items: center; gap: 14px; margin: 8px 0; padding: 10px 14px 10px 16px;
  background: var(--row); border: 2px solid var(--slate); border-radius: 14px;
  box-shadow: inset 0 0 0 2px var(--cream-edge), 0 3px 0 rgba(64, 72, 104, 0.35);
  transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
}
.switch:hover { transform: translateY(-1px); background: #fff3d8; }
.switch:has(input:checked) {
  background: #fffaf0;
  box-shadow: inset 6px 0 0 var(--on), inset 0 0 0 2px var(--cream-edge), 0 3px 0 rgba(64, 72, 104, 0.35);
}
.switch:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.switch:hover .track { box-shadow: inset 0 2px 3px rgba(64, 72, 104, 0.35); }
.switch .label { flex: 1; min-width: 0; font-weight: 600; }
.switch .label small { font-weight: 400; margin-top: 2px; }

/* The hero: the banner breathes like a fire (still for whoever asks for less motion); the main way in is larger. */
@keyframes ember-breathe {
  from { transform: translateY(0); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 18px rgba(255, 138, 61, 0.3)); }
  to { transform: translateY(-6px); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 34px rgba(255, 150, 60, 0.6)); }
}
header.hero .banner { animation: ember-breathe 3.2s ease-in-out infinite alternate; }
header.hero .tagline { text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.hero-actions { gap: 12px; margin-bottom: 22px; }
.hero-actions .btn:not(.secondary) { min-height: 54px; font-size: 19px; padding: 0 28px; }
.features li { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.features li:hover {
  box-shadow: inset 7px 0 0 var(--t), inset 0 0 0 2px var(--cream-edge), 0 8px 0 rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(255, 178, 77, 0.55);
}

/* Cards lift a little under the pointer's section; QR panels are rows of their own. */
.qr-panel { transition: transform 0.15s ease; }
.qr-panel:hover { transform: translateY(-3px); }
.qr-box { box-shadow: 0 3px 0 rgba(64, 72, 104, 0.3); }

footer { padding: 10px 12px 28px; line-height: 1.6; }

@media (max-width: 560px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .switch { padding: 10px 12px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  header.hero .banner { animation: none; }
  .switch, .features li, .qr-panel { transition: none; }
  .switch:hover, .qr-panel:hover { transform: none; }
}

/* Narrow screens: an option row takes the step's whole width (under its number), its switch on the first line. */
@media (max-width: 560px) {
  .step .switch { margin-left: -48px; align-items: flex-start; }
  .step .switch .track { margin-top: 2px; }
  .topbar .links { mask-image: linear-gradient(90deg, #000 86%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); }
}

/* The features section: groups in boxes (a grid that folds to one column) and the releases as folding lists. */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; margin: 6px 0 4px; }
.feat {
  padding: 12px 14px 10px;
  border-radius: 14px;
  background: var(--panel-inset);
  border: 2px solid var(--slate-soft);
}
.feat h3 {
  display: inline-block; margin: 0 0 8px; padding: 2px 12px;
  border-radius: 999px; background: var(--ember); color: #fff; font-size: 16px; line-height: 22px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 2px 0 var(--slate);
}
.feat ul, .release ul { margin: 0; padding-left: 20px; }
.feat li, .release li { margin: 0 0 5px; font-size: 15px; }
.feat-h { margin: 22px 0 8px; font-size: 19px; }
.release {
  margin: 0 0 8px; padding: 0 12px;
  border-radius: 12px; background: var(--panel-inset); border: 2px solid var(--slate-soft);
}
.release summary {
  cursor: pointer; padding: 8px 0; font-weight: 700; color: var(--ember); list-style-position: inside;
}
.release[open] summary { border-bottom: 2px solid var(--slate-soft); margin-bottom: 8px; }
.release ul { padding-bottom: 6px; }

/* ---- Poke Ball look (approved mockup): plain red ground #d42a2f, dark-red pills #8e141b with a thin #5c0b11 edge,
   the chosen/primary one white with red text, white cards and notes, section titles as dark-red pills, the header a
   dark-red strip, a dark band #2b1d21 under the page. The rising embers are hidden. ---- */
:root {
  --ground: #d42a2f;
  --pill: #8e141b;
  --edge: #5c0b11;
  --band: #2b1d21;
  --pink: #f5b4bf;
  --red-text: #c8202a;
  --card-white: #fdf8f6;
  --dim: #6e4f54;
  --sel: var(--pill);
  --sel-low: var(--pill);
  --box-edge: var(--edge);
  --box-inner: #f0d6d9;
  --on: var(--pill);
  --on-top: var(--pill);
}
html, body { background: var(--ground); }
body { background-attachment: scroll; }
#embers { display: none; }

header.hero .tagline { color: #fff; text-shadow: none; }
header.hero .banner { animation: none; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)); }
header.hero p { color: #fff; }

/* Top bar: the dark-red strip, links as pills, the page's language the white one. */
.topbar {
  background: var(--pill); backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom: 2px solid var(--edge); box-shadow: none;
}
.topbar .links a { color: #fff; border: 2px solid var(--edge); background: var(--pill); }
.topbar .links a:hover, .topbar .links a:focus-visible { background: #fff; color: var(--red-text); border-color: var(--edge); }
.topbar .links a:focus-visible { outline: 3px solid var(--poke-yellow); outline-offset: 2px; }
.topbar .lang-switch { background: var(--pill); border: 2px solid var(--edge); }
.topbar .lang-switch a { color: #fff; border: 0; background: transparent; }
.topbar .lang-switch a:hover { background: #fff; color: var(--red-text); }
.topbar .lang-switch a[aria-current="page"] { background: #fff; color: var(--red-text); text-shadow: none; }
.topbar .x-link, .topbar .x-link:hover { background: #000; border-color: var(--edge); color: #fff; }
.brand { color: #fff; }

/* Cards: white, thin dark-red edge, no shadows; the title a dark-red pill with white text. */
.card {
  background: var(--card-white); border: 2px solid var(--edge); border-radius: 16px;
  box-shadow: none; padding: 16px 20px 20px; overflow: visible;
}
.card > h2 {
  display: inline-flex; width: fit-content; max-width: 100%;
  margin: 0 0 12px; padding: 4px 16px; border-radius: 999px;
  background: var(--pill); border: 2px solid var(--edge); box-shadow: none;
  color: #fff; text-shadow: none; font-size: 20px; line-height: 28px;
}
.card > h2::before { display: none; }
.card > h2 .icon { box-shadow: none; border-color: var(--edge); }
.card a:not(.btn) { color: var(--red-text); }
.card > p.lead, .status, .switch .label small, .gallery figcaption, .lightbox p, .qr-panel > .mono { color: var(--dim); }

/* Buttons: primary white with red text, secondary a dark-red pill. */
.btn {
  --face: #fff; color: var(--red-text); text-shadow: none;
  border: 2px solid var(--edge); border-radius: 999px; box-shadow: none;
}
.btn:hover, .btn:not(.secondary):not(.x):not(.kofi):hover { --face: #fff0f1; transform: none; box-shadow: none; }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:not(.secondary):not(.x):not(.kofi)::before { border-left-color: var(--red-text); }
.btn.secondary, .btn.secondary:hover { --face: var(--pill); color: #fff; text-shadow: none; }
.btn.secondary:hover { --face: #a51b23; }
.btn.kofi { --face: #fff; color: var(--red-text); }
.btn.kofi:hover { --face: #fff0f1; }
.btn.x, .btn.x:hover { --face: #000; color: #fff; border-color: var(--edge); }
.btn[disabled], .btn[aria-disabled="true"] { --face: #e6d3d5; color: #7b5a5f; box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--poke-yellow); outline-offset: 3px; }

/* Pills, step numbers, tags. */
.pill { background: #fff; border: 2px solid var(--edge); border-radius: 999px; }
.pill.ok { background: #d8f2e1; color: #1d6b3c; }
.pill.bad { background: #fadcd9; color: #8e1b1b; }
.pill.busy { background: #fff0cf; color: #7a4d00; }
.step { border-top: 2px solid #ecd9d9; }
.step .num {
  background: var(--pill); border: 2px solid var(--edge); border-radius: 50%; box-shadow: none; text-shadow: none; color: #fff;
}
.qr-tag { background: var(--pill); border: 2px solid var(--edge); border-radius: 999px; color: #fff; }

/* Switches: a white row, the track a dark-red pill when on. */
.switch { background: #fff; border: 2px solid var(--edge); box-shadow: none; }
.switch:hover { background: #fff0f1; }
.switch:has(input:checked) { background: #fff; box-shadow: inset 6px 0 0 var(--pill); }
.switch:has(input:focus-visible) { outline: 3px solid var(--poke-yellow); outline-offset: 2px; }
.switch .track { border: 2px solid var(--edge); background: #e6d3d5; box-shadow: none; }
.switch .track::after { top: 3px; left: 3px; background: #fff; border: 2px solid var(--edge); box-shadow: none; }
.switch input:checked + .track { background: var(--pill); }
.switch input:focus-visible + .track { outline: 3px solid var(--poke-yellow); }

/* Progress: a white track, the fill dark red. */
.progress { background: #fff; border: 2px solid var(--edge); box-shadow: none; }
.progress .fill { background: var(--pill); box-shadow: none; }

/* Notes, results, errors: white with the thin dark-red edge. */
.note, .result, .error { background: #fff; border: 2px solid var(--edge); box-shadow: none; color: var(--ink); }
.result { background: #f1fbf4; }
.error { background: #fff1ef; color: #6e1515; border-color: var(--edge); box-shadow: none; }

/* Feature boxes, releases. */
.features li {
  background: #fff; border: 2px solid var(--edge); box-shadow: none; padding-left: 16px; color: var(--dim);
}
.features li:hover { box-shadow: none; transform: none; }
.features .type { background: var(--pill); border: 0; box-shadow: none; text-shadow: none; color: #fff; border-radius: 999px; padding: 2px 12px; }
.feat { background: #fff; border: 2px solid var(--edge); }
.feat h3, .gallery-group {
  background: var(--pill); border: 2px solid var(--edge); box-shadow: none; text-shadow: none; color: #fff;
}
.gallery-group { border-radius: 999px; }
.gallery-group::before { border-left-color: #fff; }
.release { background: #fff; border: 2px solid var(--edge); }
.release summary { color: var(--red-text); }
.release[open] summary { border-bottom: 2px solid #ecd9d9; }

/* Gallery and lightbox. */
.gallery .shot, .gallery .shot:hover {
  background: #fff; border: 2px solid var(--edge); box-shadow: none; transform: none;
}
.gallery .shot:hover { background: #fff0f1; }
.gallery .shot:focus-visible { outline: 3px solid var(--poke-yellow); outline-offset: 3px; }
.gallery { scrollbar-color: var(--pill) #fff; }
.gallery::-webkit-scrollbar-track { background: #fff; border: 2px solid var(--edge); }
.gallery::-webkit-scrollbar-thumb { background: var(--pill); border: 2px solid var(--edge); }
.lightbox { background: var(--card-white); border: 2px solid var(--edge); box-shadow: none; }
.lightbox::backdrop { background: rgba(43, 29, 33, 0.8); }
.lightbox .close { background: var(--pill); border: 2px solid var(--edge); color: #fff; }
.lightbox .close:hover { background: #a51b23; }
.lightbox .close:focus-visible { outline: 3px solid var(--poke-yellow); }
.qr-panel { background: #fff; border: 2px solid var(--edge); box-shadow: none; }
.qr-panel:hover { transform: none; }
.qr-box { border: 2px solid var(--edge); box-shadow: none; }

/* Follow panel: the dark band. */
.follow-panel { background: var(--band); border: 2px solid var(--edge); box-shadow: none; color: #fff; }

/* Footer: on the dark band, which runs the window's whole width. */
footer {
  color: #fff; background: var(--band); box-shadow: 0 0 0 100vmax var(--band);
  clip-path: inset(0 -100vmax -100vmax -100vmax); padding: 14px 12px 28px;
}
footer a { color: #fff; }

@media (max-width: 560px) {
  .card { padding: 14px 14px 16px; }
  .card > h2 { margin: 0 0 12px; padding: 4px 14px; font-size: 18px; }
}
