/* Crumble Bridge site tokens, jelly style (docs/style.md, The site): the game's own palette
   (scripts/look.gd), so a page and the game look one. Every page: the turning sunburst sky (.nb-sky),
   cards in the ink line with a hard offset shadow (.nb-card), jelly pill buttons (.nb-btn), and
   Shrikhand titles in a thick ink outline (.nb-title). */
@font-face { font-family: "Baloo 2"; src: url("/fonts/Baloo2.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Shrikhand"; src: url("/fonts/Shrikhand.ttf") format("truetype"); font-weight: 400; font-display: swap; }
:root {
  --bg-top: #12072a; --bg-low: #4c0d52; --panel: rgba(26, 10, 48, .95); --row: #2c1250; --row-quiet: #221040; --edge: #c23fa0;
  --hot: #ff4fb8; --accent: #ffe23d; --amber: #ffb020;
  --ink: #fff8ec; --ink-dim: #ead9f7; --ink-faint: #b194d2; --on-light: #1a0826; --line: #0b0416;
  --danger: #ff4a3d; --danger-ink: #ff9d94; --success: #3ddc84; --scrim: rgba(10, 3, 20, .74);
  --stone: #3b1f5e; --stone-dark: #26123f; --stone-line: #5b3290;
  /* The seats: tangerine, aqua, mint, lemon, grape, cherry, bubblegum, cream */
  --p0: #ff8c1a; --p1: #29c8f2; --p2: #3ddc84; --p3: #ffe23d; --p4: #9d6bff; --p5: #ff3d5a; --p6: #ff7ad0; --p7: #fff3d6;
  --r-s: 10px; --r-m: 18px; --r-l: 28px;
  --lw: 3px; /* the ink line */
  --font: "Baloo 2", system-ui, sans-serif;
  --display: "Shrikhand", "Baloo 2", system-ui, sans-serif;
}
/* The page under the sky (only a full-page capture or an overscroll shows it): the horizon's colour */
html { background: #3a0a44; color: var(--ink); font-family: var(--font); font-weight: 500; }

/* The sky: grape night down to a plum horizon, a sunburst of 14 two-tone rays turning once in four
   minutes round a sun on the horizon, faint daisies, stars, swirls and a moon. Both layers are fixed
   (no repaint on scroll); only the rays move, as one composited turn. */
.nb-sky::before, .nb-sky::after { content: ""; position: fixed; pointer-events: none; }
.nb-sky::after { inset: 0; z-index: -2;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3Cg id='d'%3E%3Cg fill='%23fff8ec' fill-opacity='.16'%3E%3Cellipse cx='0' cy='-11' rx='4.5' ry='9'/%3E%3Cellipse cx='0' cy='11' rx='4.5' ry='9'/%3E%3Cellipse cx='11' cy='0' rx='9' ry='4.5'/%3E%3Cellipse cx='-11' cy='0' rx='9' ry='4.5'/%3E%3Cellipse cx='7.8' cy='-7.8' rx='4.5' ry='9' transform='rotate(45 7.8 -7.8)'/%3E%3Cellipse cx='-7.8' cy='7.8' rx='4.5' ry='9' transform='rotate(45 -7.8 7.8)'/%3E%3Cellipse cx='7.8' cy='7.8' rx='4.5' ry='9' transform='rotate(-45 7.8 7.8)'/%3E%3Cellipse cx='-7.8' cy='-7.8' rx='4.5' ry='9' transform='rotate(-45 -7.8 -7.8)'/%3E%3C/g%3E%3Ccircle r='5.5' fill='%23ffe23d' fill-opacity='.22'/%3E%3C/g%3E%3Cpath id='s' d='M0-10 2.6-3.6 9.5-3.1 4.2 1.4 5.9 8.1 0 4.4-5.9 8.1-4.2 1.4-9.5-3.1-2.6-3.6Z' fill='%23ff4fb8' fill-opacity='.26'/%3E%3C/defs%3E%3Cuse href='%23d' transform='translate(130 150) scale(3.4)'/%3E%3Cuse href='%23d' transform='translate(1470 130) scale(4.2)'/%3E%3Cuse href='%23d' transform='translate(300 640) scale(2.2)'/%3E%3Cuse href='%23d' transform='translate(1360 600) scale(2.8)'/%3E%3Cuse href='%23d' transform='translate(60 860) scale(3)'/%3E%3Cuse href='%23s' transform='translate(430 95) scale(2)'/%3E%3Cuse href='%23s' transform='translate(1180 270) scale(1.6)'/%3E%3Cuse href='%23s' transform='translate(80 430) scale(2.4)'/%3E%3Cuse href='%23s' transform='translate(1540 400) scale(1.8)'/%3E%3Cuse href='%23s' transform='translate(1000 820) scale(2)'/%3E%3Cuse href='%23s' transform='translate(560 840) scale(1.4)'/%3E%3Cpath d='M1290 80a42 42 0 1 0 36 64a34 34 0 1 1-36-64Z' fill='%23fff8ec' fill-opacity='.17'/%3E%3Cpath d='M230 330m-4 0a4 4 0 0 1 8 0a8 8 0 0 1-16 0a12 12 0 0 1 24 0a16 16 0 0 1-32 0a20 20 0 0 1 40 0' fill='none' stroke='%23ff4fb8' stroke-opacity='.22' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M1440 790m-4 0a4 4 0 0 1 8 0a8 8 0 0 1-16 0a12 12 0 0 1 24 0a16 16 0 0 1-32 0a20 20 0 0 1 40 0' fill='none' stroke='%23ff4fb8' stroke-opacity='.22' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / cover no-repeat,
    radial-gradient(ellipse 70vmax 45vmax at 50% 82%, rgba(255, 79, 184, .16), transparent 70%),
    linear-gradient(var(--bg-top), var(--bg-low) 82%, #3a0a44); }
.nb-sky::before { z-index: -1; left: 50%; top: 82%;
  width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax;
  width: calc(2 * hypot(50vw, 82vh)); height: calc(2 * hypot(50vw, 82vh)); margin: calc(-1 * hypot(50vw, 82vh)) 0 0 calc(-1 * hypot(50vw, 82vh));
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 204, 255, .04) 0 12.857deg, transparent 0 25.714deg);
  animation: nb-turn 240s linear infinite; will-change: transform; }
/* A tall screen: the flourishes smaller and repeating down it, so a phone gets some too */
@media (max-aspect-ratio: 3/4) { .nb-sky::after { background-size: 120vw auto, auto, auto; background-repeat: repeat-y, no-repeat, no-repeat; background-position: center top, 0 0, 0 0; } }
@keyframes nb-turn { to { transform: rotate(1turn); } }

/* A title in Shrikhand in a thick ink outline with a hard shadow, as the game draws it */
.nb-title { font-family: var(--display); font-weight: 400; color: var(--ink); -webkit-text-stroke: .16em var(--line); paint-order: stroke fill;
  text-shadow: .045em .06em 0 var(--line); letter-spacing: .01em; }

/* A card: the panel, a magenta rim inside the ink line, a hard offset shadow (a poster's misprint) */
.nb-card { background: var(--panel); border: var(--lw) solid var(--edge); border-radius: var(--r-l);
  box-shadow: 0 0 0 var(--lw) var(--line), 8px 9px 0 var(--lw) var(--line); }

/* Buttons: lumps of jelly. Lemon (the primary), or bubblegum with a hot-pink underside (.quiet).
   The ink line, a darker underside, one gloss streak, a hard shadow that the press closes. */
.nb-btn { --c: var(--accent); --c-low: var(--amber); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 800 clamp(1.25rem, 3vw, 1.6rem)/1 var(--font); color: var(--on-light); background: var(--c); border: var(--lw) solid var(--line);
  border-radius: 999px; padding: .72em 1.5em .62em; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 -.22em 0 var(--c-low), 5px 6px 0 var(--line); transition: transform .08s, box-shadow .08s; }
.nb-btn::after { content: ""; position: absolute; top: .3em; left: 1.05em; width: 1.1em; height: .26em; border-radius: 99px;
  background: rgba(255, 255, 255, .72); }
.nb-btn::before { content: ""; position: absolute; top: .3em; left: 2.4em; width: .26em; height: .26em; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.nb-btn:hover { transform: translate(-1px, -1px); box-shadow: inset 0 -.22em 0 var(--c-low), 6px 7px 0 var(--line); }
.nb-btn:active { transform: translate(4px, 5px) scale(1.03, .96); box-shadow: inset 0 -.14em 0 var(--c-low), 1px 1px 0 var(--line); }
.nb-btn:focus-visible { outline: 4px solid var(--ink); outline-offset: 5px; }
.nb-btn.quiet { --c: var(--p6); --c-low: var(--hot); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
