/* The squishy look, shared by the game (styles.css) and its Terms and Privacy pages (generated by scripts/content/build-legal.cjs):
   the outline, the blobby radii, the bounce, the squash of a press and the few brand colours. Loaded before styles.css. */
:root {
  --squish-ink: #2b1d1d;
  --squish-anim: squish-hover 0.5s var(--squish-ease) forwards; /* a hover: squash, stretch, settle */
  --squish-press: translateY(4px) scale(1.06, 0.88); /* a press */
  --silly-text: #3a1a05;
  --silly-muted: #7a6a55;
  --silly-link: #1f1fd6;
  --silly-magenta: #be1fd6;
  --silly-indigo: #3d23e7;
  --silly-red-gradient: linear-gradient(135deg, #d9200e 0%, #ff6a2e 100%); /* the start button's red-orange */
  --ui-stroke: 3px; /* the one outline weight of the UI: main.ts sets it from UI_STROKE (shared/faces.js) */
  --ui-outline: var(--ui-stroke) solid var(--squish-ink); /* the outline of every button, card, input and pill */
  --button-shadow: 0 5px 0 var(--squish-ink); /* a button's hard "jelly" shadow... */
  --button-shadow-pressed: 0 1px 0 var(--squish-ink); /* ...that a press squashes away */
  --squish-ease: cubic-bezier(0.34, 1.8, 0.64, 1);
  --lumpy-radius: 56px 30px 48px 34px / 32px 52px 28px 58px; /* the cards' shape: every corner round, some rounder than others */
  --lumpy-radius-small: 28px 15px 24px 17px / 16px 26px 14px 29px; /* the same shape at the tooltip's size, so its corners look as round as the cards' */
  --squish-radius-a: 34px 46px 38px 50px / 46px 34px 50px 38px;
  --squish-radius-b: 46px 32px 50px 36px / 34px 48px 36px 46px;
  --squish-radius-small-a: 10px 15px 11px 16px / 15px 10px 16px 11px;
  --squish-radius-small-b: 15px 10px 16px 11px / 10px 15px 11px 16px;
}

@keyframes squish-hover {
  0% { transform: scale(1, 1); }
  35% { transform: scale(1.1, 0.88); }
  65% { transform: scale(0.97, 1.07); }
  100% { transform: scale(1.04, 0.96); }
}

@keyframes squish-focus {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.03, 0.92); }
  60% { transform: scale(0.99, 1.05); }
  100% { transform: scale(1, 1); }
}

.scroll-thumb {
  position: fixed;
  display: none;
  z-index: 50;
  box-sizing: border-box;
  width: 9px;
  margin-left: -9px; /* the thumb's right edge is the panel's right edge, less the inset */
  border: var(--ui-stroke) solid var(--squish-ink);
  border-radius: 8px;
  background: linear-gradient(to bottom, hsl(285 75% 55%), hsl(225 80% 55%), hsl(170 75% 45%), hsl(55 90% 55%), hsl(5 85% 55%));
  pointer-events: none;
}

/* A thumb inside its panel (scroll-thumb.js, host = the panel): a zero-height rail stuck to the panel's top edge, so the thumb scrolls with nothing and
   moves, scales and fades with the panel */
.scroll-rail {
  position: sticky;
  top: 0;
  height: 0;
}

.scroll-rail .scroll-thumb {
  position: absolute;
  right: 0;
  margin-left: 0;
}
