/* Click Out website. Uses the app's colour themes and light/dark mode
   (docs/requirements.md §7, §9): gradient background, rounded cards, an
   accent colour and glowing tiles. Each page type has its own body class and
   layout (docs/website.md W3). */

/* W12: the app's title font, for the wordmark and the bento headings. SIL
   Open Font License; /assets/fredoka-OFL.txt. */
@font-face {
  font-family: "Fredoka";
  src: url("/assets/fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  /* Colours come from the app's palette (lib/ui/palette.dart). The build
     appends them for every theme and mode, keyed on <html data-theme> and
     <html data-mode> (docs/website.md W8). Only sizes live here. */
  --radius: 28px;
  --max: 1080px;
  --bar-h: 56px;
  --bar-inset: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --read: 700px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom)) fixed;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  outline: none;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

/* W12: every heading in the app's title font, Fredoka Bold, like the
   features bento's. It's wide and rounded, so no tightened spacing. */
h1,
h2,
h3 {
  font-family: "Fredoka", ui-rounded, system-ui, sans-serif;
  font-weight: 700;
  font-variation-settings: "wght" 700;
  line-height: 1.15;
  letter-spacing: 0;
}

.wrap {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 12px;
  z-index: 20;
}

.skip:focus {
  left: 16px;
}

/* ---------- Header & footer ---------- */

.site-header {
  /* W9: a floating, frosted bar that stays at the top of the screen. The
     header itself is see-through and lets clicks pass; only the bar takes
     them. */
  position: sticky;
  top: 0;
  z-index: 10;
  padding: var(--bar-inset) 16px 0;
  pointer-events: none;
}

.bar {
  pointer-events: auto;
  position: relative;
  width: min(100%, calc(var(--max) + 24px));
  min-height: var(--bar-h);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg-top) var(--bar-glass), transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 0 0 1px var(--bar-ring), 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* Once the page scrolls, the glass thickens and lifts off the page. */
.site-header.scrolled .bar {
  background: color-mix(in srgb, var(--bg-top) var(--bar-glass-scrolled), transparent);
  box-shadow: inset 0 0 0 1px var(--bar-ring), var(--bar-shadow);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

/* W12: "Click Out" like the app's home screen title (H1): Fredoka Bold,
   filled with the theme's title gradient, with a halo and a soft bloom.
   Every colour in the fill keeps WCAG AA contrast (AAA in dark mode). */
.wordmark {
  font-family: "Fredoka", ui-rounded, system-ui, sans-serif;
  font-weight: 700;
  font-variation-settings: "wght" 700;
  font-size: 23px;
  letter-spacing: 0;
  line-height: 1;
  color: var(--title-1);
  background: linear-gradient(135deg, var(--title-1), var(--title-2), var(--title-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 1px var(--title-halo-1)) drop-shadow(0 0 4px var(--title-halo-2))
    drop-shadow(0 1px 7px var(--title-bloom));
  padding: 2px 0;
}

@media (forced-colors: active) {
  .wordmark {
    background: none;
    -webkit-text-fill-color: CanvasText;
    color: CanvasText;
    filter: none;
  }
}

.site-nav {
  display: flex;
  gap: 2px;
}

/* Links are soft pills: a faint tint on hover and a slightly deeper one for
   the current page, never a solid fill. */
.site-nav a {
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  opacity: 0.82;
  transition: opacity 0.25s var(--ease), background-color 0.25s var(--ease);
}

.site-nav a:hover {
  opacity: 1;
  background: var(--nav-hover);
}

.site-nav a[aria-current="page"] {
  opacity: 1;
  background: var(--nav-current);
}

.bar-end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-footer {
  margin-top: 72px;
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.site-footer a {
  color: var(--muted);
}

/* W17: the Click Out Crew's profiles, on a row of their own. */
.site-footer .social {
  flex-basis: 100%;
  align-items: center;
}

.site-footer .social > span {
  flex-basis: 100%;
}

.site-footer .social a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.site-footer .social a:hover {
  color: var(--ink);
}

/* The phone menu (W9): a two-line button that turns into a cross, and a
   frosted sheet under the bar. Hidden on wider screens. */
.menu,
.scrim,
.sheet {
  display: none;
}

.menu {
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.menu:hover {
  background: var(--nav-hover);
}

.menu span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.4s var(--ease);
}

.menu span:first-child {
  top: 17px;
}

.menu span:last-child {
  top: 25px;
}

.site-header.open .menu span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.site-header.open .menu span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--menu-scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.site-header.open .scrim {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  pointer-events: auto;
  position: absolute;
  top: calc(100% + 8px);
  left: 16px;
  right: 16px;
  padding: 10px;
  border-radius: 28px;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg-top) var(--sheet-glass), transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: inset 0 0 0 1px var(--bar-ring), var(--bar-shadow);
  transform-origin: top;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.98);
  transition: opacity 0.25s var(--ease), transform 0.4s var(--ease), visibility 0s linear 0.4s;
}

.site-header.open .sheet {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s var(--ease), transform 0.4s var(--ease);
}

.sheet ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Each item fades down in turn as the sheet opens. */
.sheet li,
.sheet .more {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease);
}

.site-header.open .sheet li,
.site-header.open .sheet .more {
  opacity: 1;
  transform: none;
  transition-delay: calc(45ms * var(--i) + 60ms);
}

.sheet li a {
  display: block;
  padding: 10px 16px;
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sheet li a:hover {
  background: var(--nav-hover);
}

.sheet li a[aria-current="page"] {
  background: var(--nav-current);
}

.sheet .more {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 8px 6px 0;
  padding: 10px 0 2px;
  border-top: 1px solid var(--line);
}

.sheet .more a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.sheet .more a:hover {
  color: var(--ink);
  background: var(--nav-hover);
}

@media (prefers-reduced-motion: reduce) {
  .menu span,
  .scrim,
  .sheet,
  .sheet li,
  .sheet .more {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

/* ---------- Colour and dark mode control (W8) ---------- */

.theme-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  flex: none;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.theme-button:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.theme-button[aria-expanded="true"] {
  box-shadow: inset 0 0 0 2px var(--ink);
}

.theme-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(360px, calc(100vw - 32px));
  padding: 22px 20px 16px;
  z-index: 30;
}

.theme-panel[hidden] {
  display: none;
}

.theme-panel h2 {
  font-size: 20px;
  margin: 0 0 14px;
}

.theme-panel h3 {
  font-size: 15px;
  margin: 0 0 12px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.swatches button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.swatches button span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid transparent;
  background-clip: content-box !important;
  padding: 3px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.swatches button[aria-checked="true"] {
  color: var(--ink);
}

.swatches button[aria-checked="true"] span {
  border-color: var(--ink);
}

.swatches button[aria-checked="true"] span::after {
  content: "✓";
}

.mode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-weight: 600;
}

.mode-row #theme-dark-label {
  flex: 1;
}

.mode-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sky-soft);
  color: var(--ink);
  flex: none;
}

.switch {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  padding: 3px;
  background: var(--line);
  cursor: pointer;
  transition: background 0.2s ease;
  flex: none;
}

.switch span {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.switch[aria-checked="true"] {
  background: var(--accent-deep);
}

.switch[aria-checked="true"] span {
  transform: translateX(22px);
}

/* ---------- Shared pieces ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 10px;
}

.lead {
  font-size: 20px;
  color: var(--muted);
  max-width: 34em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button.primary {
  border: 0;
  background: var(--accent-gradient);
  color: #fff;
}

.button[aria-disabled="true"] {
  opacity: 0.75;
  cursor: default;
}

.button small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
  line-height: 1.1;
}

.button span {
  text-align: left;
  line-height: 1.2;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.crumbs {
  font-size: 14px;
  color: var(--muted);
  margin: 28px 0 0;
}

.crumbs a {
  color: var(--muted);
}

.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.crumbs li + li::before {
  content: "›";
  margin-right: 6px;
}

/* Glowing tiles, as on the game board. */
.tile {
  aspect-ratio: 1;
  border-radius: 28%;
  background: var(--surface-soft);
  border: 1.5px solid var(--line);
  transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.12s ease;
}

.tile.on {
  background: var(--glow);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ---------- Home ---------- */

.page-home .hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 64px 0 40px;
}

.page-home .hero h1 {
  font-size: clamp(42px, 7vw, 68px);
  margin: 0 0 16px;
}

.page-home .store-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

/* W5: the download buttons, floating on a soft shadow: light in light
   mode, dark in dark mode. */
:root {
  --store-bg: #f7f7f9;
  --store-ink: #111114;
  --store-edge: rgba(0, 0, 0, 0.04);
  --store-shadow: 0 10px 24px rgba(15, 17, 21, 0.14), 0 2px 6px rgba(15, 17, 21, 0.08);
  --store-shadow-hover: 0 14px 32px rgba(15, 17, 21, 0.18), 0 3px 8px rgba(15, 17, 21, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-mode]) {
    --store-bg: #1b1c21;
    --store-ink: #ffffff;
    --store-edge: rgba(255, 255, 255, 0.08);
    --store-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
    --store-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.65), 0 3px 8px rgba(0, 0, 0, 0.45);
  }
}

html[data-mode="dark"] {
  --store-bg: #1b1c21;
  --store-ink: #ffffff;
  --store-edge: rgba(255, 255, 255, 0.08);
  --store-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
  --store-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.65), 0 3px 8px rgba(0, 0, 0, 0.45);
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 26px 10px 22px;
  border-radius: 20px;
  border: 1px solid var(--store-edge);
  background: var(--store-bg);
  color: var(--store-ink);
  box-shadow: var(--store-shadow);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-button svg {
  flex: none;
  width: auto;
  height: 32px;
}

.store-button > span {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.store-button small {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

a.store-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--store-shadow-hover);
}

a.store-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.store-button[aria-disabled="true"] {
  cursor: default;
}

.store-button[aria-disabled="true"] svg,
.store-button[aria-disabled="true"] > span {
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .store-button {
    transition: none;
  }

  a.store-button:hover {
    transform: none;
  }
}

.demo {
  padding: 28px;
  text-align: center;
}

.demo .board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: min(100%, 300px);
  margin: 0 auto 18px;
}

.demo .board button.tile {
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.demo .board button.tile:active {
  transform: scale(0.92);
}

.demo .status {
  min-height: 1.6em;
  font-weight: 600;
}

.demo .status button {
  font: inherit;
  color: var(--link);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Bento features (W3) ---------- */

.bento {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  grid-template-areas:
    "solve shapes shapes"
    "solve themes hints"
    "pair pair pair";
  gap: 18px;
  margin-top: 88px;
}

.bento-card {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
}

.bento h2 {
  font-size: 22px;
  margin: 0 0 6px;
}

.bento p {
  margin: 0;
  color: var(--muted);
}

.bento-solve {
  grid-area: solve;
}

.bento-solve h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.bento-art {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.bento-art > [role="img"] {
  width: min(100%, 240px);
}

.bento-pill {
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink) !important;
  font-weight: 600;
  font-size: 15px;
}

.bento-shapes {
  grid-area: shapes;
}

.bento-shape-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.bento-shape-row .mini-board {
  width: 76px;
  gap: 3px;
}

.bento-themes {
  grid-area: themes;
}

.bento-hints {
  grid-area: hints;
}

.bento-hints .mini-board {
  width: 64px;
  gap: 4px;
  margin-bottom: 20px;
}

.bento-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
}

/* W3: each theme's own glow; tapping one switches the page to it. */
.bento-dots button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.bento-dots button:hover {
  transform: scale(1.08);
}

.bento-dots button[aria-checked="true"] {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink);
}

.bento-dots button:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 5px;
}

.bento-dots .bento-dark {
  background: linear-gradient(135deg, #2c2b3a, #12111a);
}

.bento-pair {
  grid-area: pair;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 24px 0;
}

.bento-pair article {
  padding: 0 28px;
}

.bento-pair article + article {
  border-left: 1px solid var(--line);
}

/* The bento's little boards: tiles like the game's, lit ones glowing. */
.mini-board {
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  gap: 6px;
}

.mini-tile {
  aspect-ratio: 1;
  border-radius: 26%;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.mini-tile.on {
  background: var(--glow);
  box-shadow: 0 2px 8px -2px var(--glow-shadow);
}

.mini-tile.gone {
  visibility: hidden;
}

/* Like the app's hint: an outline that pulses. */
.mini-tile.hint {
  outline: 2.5px solid var(--ink);
  outline-offset: 1px;
  animation: hint-pulse 1.4s ease-in-out infinite;
}

@keyframes hint-pulse {
  50% {
    outline-color: color-mix(in srgb, var(--ink) 35%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mini-tile.hint {
    animation: none;
  }
}

@media (max-width: 860px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "solve shapes"
      "solve shapes"
      "themes hints"
      "pair pair";
  }

  .bento-shape-row {
    justify-content: flex-start;
  }

  .bento-shape-row .mini-board {
    width: 64px;
  }
}

@media (max-width: 640px) {
  .bento {
    grid-template-columns: 1fr;
    grid-template-areas: "solve" "shapes" "themes" "hints" "pair";
  }

  .bento-pair {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 0;
  }

  .bento-pair article + article {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 20px;
  }

  .bento-shape-row {
    gap: 10px;
  }

  .bento-shape-row .mini-board {
    width: min(48px, calc((100% - 40px) / 5));
    gap: 2px;
  }
}

/* W13: How to play. An example board on a tilted card, the tap and the
   four lights it flips marked, glowing numbered callouts, beside the three
   steps joined by a glowing line. */
.howto {
  margin-top: 112px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}

.howto-art {
  margin: 0;
  display: grid;
  place-items: center;
}

.howto-card {
  position: relative;
  width: min(100%, 380px);
  padding: 26px 26px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -34px var(--glow-shadow), 0 0 0 1px var(--line);
  transform: rotate(-2deg);
}

.howto-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  --cell: calc((100% - 32px) / 5);
}

.howto-board .tile {
  aspect-ratio: 1;
  border-radius: 28%;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  position: relative;
}

.howto-board .tile.on {
  background: var(--glow);
  border-color: transparent;
  box-shadow: 0 6px 18px -6px var(--glow-shadow);
}

/* The four lights the tap flipped. */
.howto-board .tile.flipped {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

/* The tapped light, just switched off: a ring with a dot. */
.howto-board .tile.tap {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.howto-board .tap-dot {
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}

.callout,
.howto-num,
.note-num {
  display: grid;
  place-items: center;
  border-radius: 30%;
  background: var(--glow);
  color: #fff;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 6px 16px -4px var(--glow-shadow);
}

.howto-board .callout {
  position: absolute;
  width: 30px;
  height: 30px;
  font-size: 16px;
  left: calc(var(--x) * (var(--cell) + 8px) + var(--cell) - 14px);
  top: calc(var(--y) * (var(--cell) + 8px) - 14px);
  border: 2px solid var(--surface);
  z-index: 1;
}

.howto-moves {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
}

.howto-moves b {
  color: var(--ink);
}

.howto-moves .callout {
  width: 26px;
  height: 26px;
  font-size: 14px;
}

.howto-stars {
  margin-left: auto;
  color: #f5b301;
  letter-spacing: 2px;
}

.howto-copy h2 {
  font-size: clamp(30px, 4.5vw, 42px);
  margin: 8px 0 26px;
}

.howto-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}

/* The glowing line that joins the steps' numbers. */
.howto-steps::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 24px;
  bottom: 24px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(var(--glow-1), var(--glow-2), var(--glow-3));
  opacity: 0.5;
}

.howto-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
  padding: 14px 0;
}

.howto-num {
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.howto-steps h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.howto-steps p {
  margin: 0;
  color: var(--muted);
}

/* W14: From the blog, as lit-tile notes: a trail of tiles lighting up in a
   wave, then cards with a glowing base edge, a numbered lit tile, a small
   lit pattern, the category, title, description and a Read link. */
.notes {
  margin-top: 112px;
  position: relative;
}

.notes-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: end;
}

.notes-head h2 {
  font-size: clamp(30px, 4.5vw, 42px);
  margin: 8px 0 0;
}

.notes-head .lead {
  margin: 0;
}

.light-trail {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 34px 0 30px;
}

.light-trail span {
  width: 16px;
  height: 16px;
  border-radius: 28%;
  background: var(--glow);
  box-shadow: 0 3px 10px -3px var(--glow-shadow);
  opacity: calc(0.2 + var(--i) * 0.065);
  animation: trail 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.12s);
}

@keyframes trail {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.35);
    opacity: 1;
  }
  35% {
    transform: scale(1);
  }
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  align-items: start;
}

.note {
  position: relative;
  padding: 30px 24px 22px;
  /* A lit tile's edge along the bottom: the glow shows through a thick
     bottom border. */
  border-bottom: 7px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--glow) border-box;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line), 0 24px 40px -30px var(--glow-shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.note:nth-child(1) {
  transform: rotate(-2deg);
}

.note:nth-child(2) {
  transform: rotate(1.5deg) translateY(26px);
}

.note:nth-child(3) {
  transform: rotate(-1deg) translateY(8px);
}

.note:hover,
.note:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px var(--line), 0 30px 46px -24px var(--glow-shadow);
}

.note-num {
  position: absolute;
  top: -16px;
  left: -12px;
  width: 40px;
  height: 40px;
  font-size: 19px;
  border: 3px solid var(--surface);
}

.note-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
}

.note-icon .mini-board {
  gap: 2px;
}

.note-cat {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
}

.note h3 {
  margin: 8px 48px 8px 0;
  font-size: 20px;
  line-height: 1.25;
}

.note h3 a {
  color: var(--ink);
  text-decoration: none;
}

.note h3 a:hover {
  color: var(--link);
}

.note p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
}

.note-read {
  font-weight: 700;
  color: var(--link);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .light-trail span {
    animation: none;
  }

  .note,
  .note:hover,
  .note:focus-within {
    transition: none;
  }

  .note:hover,
  .note:focus-within {
    transform: none;
  }
}

@media (max-width: 860px) {
  .howto,
  .notes-head,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .howto {
    gap: 40px;
  }

  .notes-grid {
    gap: 34px;
  }

  .note:nth-child(n) {
    transform: none;
  }

  .light-trail {
    gap: 7px;
  }

  .light-trail span {
    width: 13px;
    height: 13px;
  }
}

.cta-band {
  margin-top: 112px;
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius);
}

.cta-band h2 {
  margin: 0;
  font-size: 28px;
}

.cta-band .button {
  background: #fff;
  color: var(--accent-deep);
  border: 0;
}

/* Phone screenshots (W10): real screens from the app, in a phone frame. */
.phone {
  margin: 0;
  border: 10px solid #111018;
  border-radius: 46px;
  overflow: hidden;
  background: #111018;
}

/* The frame wraps the whole screen at its own shape: nothing is cropped. */
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 36px;
}

.showcase {
  margin-top: 112px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.showcase h2 {
  font-size: clamp(30px, 4.5vw, 42px);
  margin: 0 0 12px;
}

.showcase .phones {
  position: relative;
  height: 600px;
}

.showcase .phone {
  position: absolute;
  width: 260px;
}

.showcase .phone-back {
  left: 8%;
  top: 0;
  transform: rotate(-6deg);
}

.showcase .phone-front {
  right: 8%;
  top: 40px;
  transform: rotate(4deg);
}

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

  .showcase .phones {
    height: 520px;
  }

  .showcase .phone {
    width: 220px;
  }

  .showcase .phone-back {
    left: calc(50% - 215px);
  }

  .showcase .phone-front {
    right: calc(50% - 215px);
  }
}

@media (max-width: 480px) {
  .showcase .phones {
    height: 420px;
  }

  .showcase .phone {
    width: 170px;
    border-width: 7px;
    border-radius: 32px;
  }

  .showcase .phone img {
    border-radius: 25px;
  }

  .showcase .phone-back {
    left: 2px;
  }

  .showcase .phone-front {
    right: 2px;
  }
}

/* ---------- A closer look (W10.1) ---------- */

/* Without JavaScript, and on narrower screens: the screens in a carousel to
   swipe through. */
.closer {
  margin-top: 112px;
}

.closer-title {
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.04;
  margin: 0 0 28px;
  /* The app's title gradient, which keeps its contrast (W12). */
  color: var(--title-1);
  background: linear-gradient(135deg, var(--title-1), var(--title-2), var(--title-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.closer-glow,
.closer-tiles,
.closer-track,
.closer-phone-wrap {
  display: none;
}

.closer-carousel {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 20px;
  scrollbar-width: none;
}

.closer-carousel::-webkit-scrollbar {
  display: none;
}

.closer-card {
  flex: 0 0 min(72%, 260px);
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}

.closer-card figcaption {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.closer-card strong {
  display: block;
  margin-bottom: 4px;
  font-family: "Fredoka", ui-rounded, system-ui, sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
}

/* Wide screens, once app.js pins it: the stage holds still while the
   section scrolls by, and the steps, the phone's screen, the glow and the
   tiles follow the scroll. */
@media (min-width: 861px) {
  .closer.is-pinned {
    height: 420vh;
  }

  .closer.is-pinned .closer-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    padding-top: calc(var(--bar-h) + var(--bar-inset));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 4vw;
  }

  .closer.is-pinned .closer-carousel {
    display: none;
  }

  .closer.is-pinned .closer-glow,
  .closer.is-pinned .closer-tiles {
    display: block;
  }

  .closer.is-pinned .closer-track,
  .closer.is-pinned .closer-phone-wrap {
    display: block;
  }
}

.closer-intro {
  position: relative;
}

/* A soft glow behind the phone, in the current step's colour. */
.closer-glow {
  position: absolute;
  right: 0;
  top: 50%;
  width: min(70vmin, 560px);
  aspect-ratio: 1;
  transform: translateY(-40%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--closer-glow, var(--glow-1)) 0%, transparent 65%);
  opacity: 0.45;
  filter: blur(20px);
  pointer-events: none;
}

/* Game tiles drifting at their own speeds as the page scrolls. */
.closer-tiles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.closer-tile {
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: 22%;
  background: var(--glow);
  box-shadow: 0 0 24px color-mix(in srgb, var(--glow-shadow) 55%, transparent);
  opacity: var(--o);
  will-change: transform;
}

.closer-tile.off {
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* The steps, with a line that fills as the section scrolls. */
.closer-track {
  position: relative;
  padding-left: 22px;
}

.closer-track::before,
.closer-bar {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 3px;
  border-radius: 3px;
}

.closer-track::before {
  bottom: 6px;
  background: var(--line);
}

.closer-bar {
  height: 0;
  background: linear-gradient(var(--glow-1), var(--glow-3));
  box-shadow: 0 0 12px var(--glow-shadow);
}

.closer-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.closer-step {
  display: block;
  width: 100%;
  padding: 12px 8px;
  border: 0;
  border-radius: 16px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  /* Dimmed, not faded out: inactive steps stay readable. */
  opacity: 0.6;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.closer-step:hover {
  opacity: 0.85;
}

.closer-step.is-active {
  opacity: 1;
  transform: translateX(6px);
}

.closer-step:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.closer-num {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--link);
}

.closer-step-title {
  display: block;
  margin: 2px 0 4px;
  font-family: "Fredoka", ui-rounded, system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.2;
}

.closer-step-body {
  display: block;
  max-width: 36ch;
  max-height: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  transition: max-height 0.5s ease;
}

.closer-step.is-active .closer-step-body {
  max-height: 6em;
}

/* The phone: one screen per step, cross-fading as the steps change. */
.closer-phone-wrap {
  position: relative;
  justify-self: center;
}

.closer-phone {
  position: relative;
  width: min(300px, 28vw, calc((100vh - 220px) * 0.46));
  aspect-ratio: 570 / 1240;
}

.closer-phone img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04) translateY(14px);
  transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.closer-phone img.is-active {
  opacity: 1;
  transform: none;
}

.closer-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.closer-dots span {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  transition: width 0.35s ease, background 0.35s ease;
}

.closer-dots span.is-active {
  width: 26px;
  background: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .closer-phone img,
  .closer-step,
  .closer-step-body,
  .closer-dots span {
    transition: none;
  }

  .closer-tiles {
    display: none !important;
  }
}

/* ---------- FAQ ---------- */

.page-faq .page-hero,
.page-blog .page-hero,
.page-policy .page-hero,
.page-404 .page-hero {
  padding: 56px 0 24px;
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 54px);
  margin: 0 0 12px;
}

.page-faq .faq-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: start;
}

.page-faq .faq-toc {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.page-faq .faq-toc a {
  display: block;
  padding: 7px 10px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}

.page-faq .faq-toc a:hover {
  background: var(--accent-soft);
}

.page-faq .faq-group {
  margin-bottom: 36px;
}

.page-faq .faq-group h2 {
  font-size: 22px;
  margin: 0 0 14px;
}

.page-faq details {
  margin-bottom: 12px;
  padding: 0 22px;
}

.page-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 32px 18px 0;
  font-weight: 600;
  position: relative;
}

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

.page-faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--link);
  font-weight: 700;
}

.page-faq details[open] summary::after {
  content: "–";
}

.page-faq details > div {
  padding: 0 0 20px;
  color: var(--muted);
}

.page-faq details > div p {
  margin: 0 0 10px;
}

.page-faq .still {
  padding: 28px;
  text-align: center;
}

/* ---------- Blog index ---------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease;
}

.post-card:hover {
  transform: translateY(-3px);
}

.post-card .cover {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 18px 28px;
  background: var(--surface-soft);
}

.post-card .cover .tile {
  border-radius: 24%;
}

.post-card .body {
  padding: 22px 24px 26px;
}

.post-card h2 {
  font-size: 21px;
  margin: 8px 0;
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

.meta {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Article ---------- */

.page-article .article-head {
  width: min(100% - 32px, var(--read));
  margin: 0 auto;
  padding: 40px 0 28px;
  text-align: center;
}

.page-article .article-head h1 {
  font-size: clamp(34px, 5.5vw, 50px);
  margin: 14px 0;
}

.page-article .article-head .crumbs ol {
  justify-content: center;
}

.page-article .prose {
  width: min(100% - 32px, var(--read));
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 56px);
}

.prose h2 {
  font-size: 27px;
  margin: 60px 0 10px;
}

.prose h3 {
  font-size: 21px;
  margin: 28px 0 8px;
}

.prose p,
.prose li {
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.prose blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: var(--surface-soft);
  border-radius: 0 16px 16px 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-variant-numeric: tabular-nums;
}

.prose td code {
  font-size: 1.25em;
}

.prose th,
.prose td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: var(--surface-soft);
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.08em;
}

.prose .mini-board {
  display: inline-grid;
  grid-template-columns: repeat(var(--n, 5), 22px);
  gap: 4px;
  margin: 8px 0 18px;
}

.related {
  width: min(100% - 32px, var(--max));
  margin: 56px auto 0;
}

.related h2 {
  font-size: 22px;
}

/* ---------- Privacy ---------- */

.page-policy .policy {
  display: grid;
  /* minmax(0, …): a long link can't widen the column past the screen. */
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 36px;
  align-items: start;
}

.page-policy .policy-body {
  padding: 40px clamp(20px, 5vw, 52px);
  overflow-wrap: anywhere;
}

.page-policy .policy-body h2 {
  font-size: 22px;
  margin: 32px 0 8px;
}

.page-policy .policy-body h2:first-child {
  margin-top: 0;
}

.page-policy .policy-body p {
  margin: 0;
}

.page-policy .policy-body p + p {
  margin-top: 12px;
}

.page-policy aside {
  position: sticky;
  top: 92px;
  padding: 20px;
  font-size: 15px;
}

.page-policy aside ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.page-policy aside li {
  margin: 6px 0;
}

/* ---------- 404 ---------- */

.page-404 .lost {
  text-align: center;
  padding: 40px 0;
}

.page-404 .lost .board {
  display: inline-grid;
  grid-template-columns: repeat(3, 56px);
  gap: 10px;
  margin-bottom: 24px;
}

/* ---------- Page transitions & small screens ---------- */

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.22s;
  }
}

@media (max-width: 860px) {
  .page-home .hero,
  .page-faq .faq-layout,
  .page-policy .policy {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-home .hero {
    padding-top: 36px;
    gap: 32px;
  }

  .page-faq .faq-toc,
  .page-policy aside {
    position: static;
  }

  .page-policy aside {
    order: -1;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 84px;
  }

  /* One row: the logo, the palette button and the menu button; the links
     move into the sheet. */
  .bar {
    grid-template-columns: 1fr auto;
    padding: 0 6px 0 16px;
  }

  .site-nav {
    display: none;
  }

  .menu,
  .scrim,
  .sheet {
    display: block;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .site-header {
    padding-inline: 10px;
  }

  .sheet {
    left: 10px;
    right: 10px;
  }

  .theme-button {
    width: 44px;
    height: 44px;
  }

  .cta-band {
    padding: 28px;
  }
}

/* ---------- Glowbert (W11) ---------- */

.glowbert-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.glowbert {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--glow-shadow) 55%, transparent));
}

.glowbert rect {
  fill: url(#glowbert-glow);
}

/* Beside each home page section, on alternate sides: in the margin on wide
   screens, and small in the gap above the section on narrower ones, so he
   never covers anything. */
.page-home .wrap > section {
  position: relative;
}

.glowbert-peek {
  position: absolute;
  width: 40px;
  top: -54px;
  pointer-events: none;
}

.page-home .hero .glowbert-peek {
  top: 24px;
}

/* On phones the hero sits close under the bar: room for them above the
   eyebrow, clear of the bar. */
@media (max-width: 860px) {
  .page-home .hero:has(.glowbert-peek) {
    padding-top: 88px;
  }
}

.peek-left {
  left: 4px;
}

.peek-right {
  right: 4px;
}

@media (min-width: 1340px) {
  .glowbert-peek,
  .page-home .hero .glowbert-peek {
    width: 76px;
    top: 24px;
  }

  .peek-left {
    left: -116px;
  }

  .peek-right {
    right: -116px;
  }
}

/* The dance, at the bottom of the home page. */
/* Centered at the bottom of the page: the words, the stage, then the
   button under it. */
.glowbert-dance {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin-top: 112px;
  text-align: center;
}

.glowbert-copy {
  max-width: 620px;
}

.glowbert-dance .glowbert-stage {
  width: min(100%, 560px);
}

.glowbert-dance h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
}

/* The button sits under the stage, a little closer to it than the gap. */
.glowbert-play {
  margin-top: -8px;
}

.glowbert-dance .meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.glowbert-stage {
  position: relative;
  height: 460px;
  border-radius: var(--radius);
  background: #221f42;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  box-shadow: var(--shadow);
}

.glowbert-mover {
  width: 180px;
  will-change: transform;
}

.glowbert-caption {
  margin: 0;
  text-align: center;
  /* The app's caption: the title font (W12), in the theme's glow. */
  font-family: "Fredoka", ui-rounded, system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--glow-1), var(--glow-2), var(--glow-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glowbert-caption span {
  display: block;
  font-size: 18px;
}

.glowbert-caption strong {
  display: block;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
}

@media (max-width: 860px) {
  .glowbert-stage {
    height: 400px;
  }

  .glowbert-mover {
    width: 150px;
  }
}

/* Generated by tool/build_website.dart from lib/ui/palette.dart. */
:root { color-scheme: light; --ink: #17161f; --muted: #605e78; --surface: #ffffff; --surface-soft: #f4f3fa; --line: #e6e4f0; --pink-soft: #f6ddfb; --sky-soft: #d9f1f4; --bar-glass: 58%; --bar-glass-scrolled: 84%; --bar-ring: rgba(255, 255, 255, 0.55); --bar-shadow: 0 14px 34px -16px rgba(23, 22, 31, 0.30); --nav-hover: rgba(23, 22, 31, 0.06); --nav-current: rgba(23, 22, 31, 0.09); --sheet-glass: 90%; --menu-scrim: rgba(23, 22, 31, 0.20); --accent: #6d5df6; --accent-soft: #e6e2ff; --accent-deep: #5549ba; --accent-gradient: linear-gradient(135deg, #5c4fcb, #5549ba); --link: #5549ba; --glow: linear-gradient(135deg, #7c6cff, #b57bff, #f0a3f5); --glow-1: #7c6cff; --glow-2: #b57bff; --glow-3: #f0a3f5; --glow-shadow: #9b7bff; --title-1: #5b3fd9; --title-2: #7b3fd4; --title-3: #9b2fb8; --title-halo-1: #ffffff; --title-halo-2: #f3eeff; --title-bloom: rgba(139, 92, 246, 0.28); --bg-top: #ece9ff; --bg-bottom: #dcebff; --shadow: 0 8px 24px rgba(109, 93, 246, 0.08); }
@media (prefers-color-scheme: dark) { :root:not([data-mode]) { color-scheme: dark; --ink: #f1f0f7; --muted: #a3a1bc; --surface: #22212e; --surface-soft: #2c2b3a; --line: #3a3949; --pink-soft: #45304d; --sky-soft: #26414a; --bar-glass: 45%; --bar-glass-scrolled: 74%; --bar-ring: rgba(255, 255, 255, 0.08); --bar-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.6); --nav-hover: rgba(255, 255, 255, 0.10); --nav-current: rgba(255, 255, 255, 0.15); --sheet-glass: 88%; --menu-scrim: rgba(0, 0, 0, 0.45); --accent: #6d5df6; --accent-soft: #39336a; --accent-deep: #5549ba; --accent-gradient: linear-gradient(135deg, #5c4fcb, #5549ba); --link: #afa6fa; --glow: linear-gradient(135deg, #7c6cff, #b57bff, #f0a3f5); --glow-1: #7c6cff; --glow-2: #b57bff; --glow-3: #f0a3f5; --glow-shadow: #9b7bff; --title-1: #d9c6ff; --title-2: #c4a8ff; --title-3: #f2b8f5; --title-halo-1: #6a3fd8; --title-halo-2: #6a3fd8; --title-bloom: rgba(139, 92, 246, 0.55); --bg-top: #221f42; --bg-bottom: #141222; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); } }
html[data-mode="light"] { color-scheme: light; --ink: #17161f; --muted: #605e78; --surface: #ffffff; --surface-soft: #f4f3fa; --line: #e6e4f0; --pink-soft: #f6ddfb; --sky-soft: #d9f1f4; --bar-glass: 58%; --bar-glass-scrolled: 84%; --bar-ring: rgba(255, 255, 255, 0.55); --bar-shadow: 0 14px 34px -16px rgba(23, 22, 31, 0.30); --nav-hover: rgba(23, 22, 31, 0.06); --nav-current: rgba(23, 22, 31, 0.09); --sheet-glass: 90%; --menu-scrim: rgba(23, 22, 31, 0.20); }
html[data-mode="dark"] { color-scheme: dark; --ink: #f1f0f7; --muted: #a3a1bc; --surface: #22212e; --surface-soft: #2c2b3a; --line: #3a3949; --pink-soft: #45304d; --sky-soft: #26414a; --bar-glass: 45%; --bar-glass-scrolled: 74%; --bar-ring: rgba(255, 255, 255, 0.08); --bar-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.6); --nav-hover: rgba(255, 255, 255, 0.10); --nav-current: rgba(255, 255, 255, 0.15); --sheet-glass: 88%; --menu-scrim: rgba(0, 0, 0, 0.45); }
html[data-theme="aurora"][data-mode="light"] { --accent: #6d5df6; --accent-soft: #e6e2ff; --accent-deep: #5549ba; --accent-gradient: linear-gradient(135deg, #5c4fcb, #5549ba); --link: #5549ba; --glow: linear-gradient(135deg, #7c6cff, #b57bff, #f0a3f5); --glow-1: #7c6cff; --glow-2: #b57bff; --glow-3: #f0a3f5; --glow-shadow: #9b7bff; --title-1: #5b3fd9; --title-2: #7b3fd4; --title-3: #9b2fb8; --title-halo-1: #ffffff; --title-halo-2: #f3eeff; --title-bloom: rgba(139, 92, 246, 0.28); --bg-top: #ece9ff; --bg-bottom: #dcebff; --shadow: 0 8px 24px rgba(109, 93, 246, 0.08); }
html[data-theme="aurora"][data-mode="dark"] { --accent: #6d5df6; --accent-soft: #39336a; --accent-deep: #5549ba; --accent-gradient: linear-gradient(135deg, #5c4fcb, #5549ba); --link: #afa6fa; --glow: linear-gradient(135deg, #7c6cff, #b57bff, #f0a3f5); --glow-1: #7c6cff; --glow-2: #b57bff; --glow-3: #f0a3f5; --glow-shadow: #9b7bff; --title-1: #d9c6ff; --title-2: #c4a8ff; --title-3: #f2b8f5; --title-halo-1: #6a3fd8; --title-halo-2: #6a3fd8; --title-bloom: rgba(139, 92, 246, 0.55); --bg-top: #221f42; --bg-bottom: #141222; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
html[data-theme="ocean"][data-mode="light"] { --accent: #2f7df6; --accent-soft: #dcebff; --accent-deep: #2860ba; --accent-gradient: linear-gradient(135deg, #2a68cb, #2860ba); --link: #2860ba; --glow: linear-gradient(135deg, #2f7df6, #3fb6f2, #6fe3e1); --glow-1: #2f7df6; --glow-2: #3fb6f2; --glow-3: #6fe3e1; --glow-shadow: #3fa9f5; --title-1: #2664c5; --title-2: #266d91; --title-3: #356d6c; --title-halo-1: #ffffff; --title-halo-2: #eef5fe; --title-bloom: rgba(63, 169, 245, 0.28); --bg-top: #e3f1ff; --bg-bottom: #ddf7f5; --shadow: 0 8px 24px rgba(47, 125, 246, 0.08); }
html[data-theme="ocean"][data-mode="dark"] { --accent: #2f7df6; --accent-soft: #263d6a; --accent-deep: #2860ba; --accent-gradient: linear-gradient(135deg, #2a68cb, #2860ba); --link: #8db7fa; --glow: linear-gradient(135deg, #2f7df6, #3fb6f2, #6fe3e1); --glow-1: #2f7df6; --glow-2: #3fb6f2; --glow-3: #6fe3e1; --glow-shadow: #3fa9f5; --title-1: #97befb; --title-2: #65c5f5; --title-3: #6fe3e1; --title-halo-1: #286ad1; --title-halo-2: #286ad1; --title-bloom: rgba(63, 169, 245, 0.55); --bg-top: #172442; --bg-bottom: #101422; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
html[data-theme="sunset"][data-mode="light"] { --accent: #e8613a; --accent-soft: #ffe4d6; --accent-deep: #ad4c32; --accent-gradient: linear-gradient(135deg, #be5235, #ad4c32); --link: #ad4c32; --glow: linear-gradient(135deg, #ff6f59, #ff9f5a, #ffd36e); --glow-1: #ff6f59; --glow-2: #ff9f5a; --glow-3: #ffd36e; --glow-shadow: #ff8a5b; --title-1: #a8493b; --title-2: #8f5932; --title-3: #7a6535; --title-halo-1: #ffffff; --title-halo-2: #fdf2ef; --title-bloom: rgba(255, 138, 91, 0.28); --bg-top: #ffefe6; --bg-bottom: #fff6dd; --shadow: 0 8px 24px rgba(232, 97, 58, 0.08); }
html[data-theme="sunset"][data-mode="dark"] { --accent: #e8613a; --accent-soft: #5d3432; --accent-deep: #ad4c32; --accent-gradient: linear-gradient(135deg, #be5235, #ad4c32); --link: #f2a893; --glow: linear-gradient(135deg, #ff6f59, #ff9f5a, #ffd36e); --glow-1: #ff6f59; --glow-2: #ff9f5a; --glow-3: #ffd36e; --glow-shadow: #ff8a5b; --title-1: #ffa698; --title-2: #ffa96b; --title-3: #ffd36e; --title-halo-1: #c55231; --title-halo-2: #c55231; --title-bloom: rgba(255, 138, 91, 0.55); --bg-top: #391f20; --bg-bottom: #1b1216; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
html[data-theme="forest"][data-mode="light"] { --accent: #2e9e6b; --accent-soft: #d9f3e6; --accent-deep: #287856; --accent-gradient: linear-gradient(135deg, #29835c, #287856); --link: #287856; --glow: linear-gradient(135deg, #23a26d, #5cc98a, #b7e86b); --glow-1: #23a26d; --glow-2: #5cc98a; --glow-3: #b7e86b; --glow-shadow: #4cbf7f; --title-1: #19754e; --title-2: #34714d; --title-3: #586f33; --title-halo-1: #ffffff; --title-halo-2: #eef7f3; --title-bloom: rgba(76, 191, 127, 0.28); --bg-top: #e3f6ec; --bg-bottom: #eef8dc; --shadow: 0 8px 24px rgba(46, 158, 107, 0.08); }
html[data-theme="forest"][data-mode="dark"] { --accent: #2e9e6b; --accent-soft: #264740; --accent-deep: #287856; --accent-gradient: linear-gradient(135deg, #29835c, #287856); --link: #8ccaae; --glow: linear-gradient(135deg, #23a26d, #5cc98a, #b7e86b); --glow-1: #23a26d; --glow-2: #5cc98a; --glow-3: #b7e86b; --glow-shadow: #4cbf7f; --title-1: #84cbad; --title-2: #70cf98; --title-3: #b7e86b; --title-halo-1: #27865b; --title-halo-2: #27865b; --title-bloom: rgba(76, 191, 127, 0.55); --bg-top: #172a29; --bg-bottom: #101619; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
html[data-theme="rose"][data-mode="light"] { --accent: #e0457b; --accent-soft: #ffe0ea; --accent-deep: #a83861; --accent-gradient: linear-gradient(135deg, #b83c69, #a83861); --link: #a83861; --glow: linear-gradient(135deg, #f2557f, #ff7eb0, #ffb3d1); --glow-1: #f2557f; --glow-2: #ff7eb0; --glow-3: #ffb3d1; --glow-shadow: #f56c98; --title-1: #a93b59; --title-2: #994c6a; --title-3: #7f5968; --title-halo-1: #ffffff; --title-halo-2: #fdf0f4; --title-bloom: rgba(245, 108, 152, 0.28); --bg-top: #ffe8ef; --bg-bottom: #f6e6ff; --shadow: 0 8px 24px rgba(224, 69, 123, 0.08); }
html[data-theme="rose"][data-mode="dark"] { --accent: #e0457b; --accent-soft: #5b2c45; --accent-deep: #a83861; --accent-gradient: linear-gradient(135deg, #b83c69, #a83861); --link: #ee99b6; --glow: linear-gradient(135deg, #f2557f, #ff7eb0, #ffb3d1); --glow-1: #f2557f; --glow-2: #ff7eb0; --glow-3: #ffb3d1; --glow-shadow: #f56c98; --title-1: #f8a0b7; --title-2: #ff9ac1; --title-3: #ffb3d1; --title-halo-1: #be3b69; --title-halo-2: #be3b69; --title-bloom: rgba(245, 108, 152, 0.55); --bg-top: #371a2b; --bg-bottom: #1b101a; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
