:host {
  all: initial;
  display: block;
  container: how / inline-size;
}

/* off screen: looping animations hold still until the section comes back (js/pause-offscreen.js) */
:host(.is-offscreen) *,
:host(.is-offscreen) *::before,
:host(.is-offscreen) *::after {
  animation-play-state: paused !important;
}

.sr-page {
  --fw: 1cqw;
} /* 1% of this section's width; used where a size scales with the section */

/* Layout: the finished How it works section of the Mench Cafe site. A thin top strip with the day/night switch,
   then the section: title, try-a-path row, the flowchart panel and the rate card. Day: Dice steps and questions on
   Metro lines and background. Night: Pixel Quest. No walking token in either mode.
   Mench Toy Box colors: ivory day, Plum night. */
.sr-page {
  --bg: #fffbf0;
  --surface: #ffffff;
  --ink: #1a1714;
  --muted: #5b5045;
  --hair: #e3d8c0;
  --edge: #1a1714;
  --yellow: #ffd731;
  --on-yellow: #1a1714;
  --blue: #2f8fff;
  --on-blue: #1a1714;
  --red: #db2e27;
  --on-red: #ffffff;
  --green: #1fb36a;
  --on-green: #1a1714;
  --purple: #9542fb;
  --on-purple: #ffffff;
  --brass: #e9c24a;
  --map: #fffdf6;
  --mapgrid: rgba(26, 23, 20, 0.055);
  --cloud: #ffffff;
  --tray: #fff3d6;
  --table: #f3ebda;
  --font-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --boing: cubic-bezier(0.25, 3, 0.5, 1);
  --spring: cubic-bezier(0.2, 1.5, 0.35, 1);
  color-scheme: light;
}

.sr-page[data-mode="night"] {
  --bg: #14171b;
  --surface: #171030;
  --ink: #f0ebff;
  --muted: #b3a8d6;
  --hair: #33285a;
  --edge: #f0ebff;
  --yellow: #ffd731;
  --on-yellow: #0b0717;
  --blue: #4fa6ff;
  --on-blue: #0b0717;
  --red: #ff5b52;
  --on-red: #0b0717;
  --green: #35e08b;
  --on-green: #0b0717;
  --purple: #b977ff;
  --on-purple: #0b0717;
  --map: #0e0920;
  --mapgrid: rgba(240, 235, 255, 0.06);
  --cloud: #3e3366;
  --tray: #120b26;
  --table: #110a24;
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
.sr-page {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}
button {
  font: inherit;
  color: inherit;
}
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.i {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.is-y {
  --c: var(--yellow);
  --on-c: var(--on-yellow);
}
.is-b {
  --c: var(--blue);
  --on-c: var(--on-blue);
}
.is-r {
  --c: var(--red);
  --on-c: var(--on-red);
}
.is-g {
  --c: var(--green);
  --on-c: var(--on-green);
}
.is-p {
  --c: var(--purple);
  --on-c: var(--on-purple);
}
.is-w {
  --c: #ffffff;
  --on-c: #1a1714;
}

/* ================= page shell ================= */
.top {
  padding-block: clamp(28px, calc(5 * var(--fw)), 56px) 0;
  display: grid;
  gap: 18px;
}
h1 {
  font: 700 clamp(2.1rem, 1.4rem + calc(3 * var(--fw)), 3.6rem)/1.02 var(--font-body);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* ---------- final page ---------- */
.try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -8px 0 24px;
}
/* "Pick another path" under the chart (shown once a path is picked): a path button without a colour */
.back-row {
  display: flex;
  justify-content: center;
  margin-top: clamp(24px, calc(3 * var(--fw)), 36px);
}
.back-row[hidden] {
  display: none; /* the display: flex above would otherwise beat the hidden attribute */
}
.pb--back {
  --c: var(--ink);
  min-height: 46px;
  padding: 0 22px;
  font-size: 1rem;
}
.pb--back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-mode="night"] .pb--back {
  border-color: var(--hair);
}
[data-mode="night"] .pb--back:hover,
[data-mode="night"] .pb--back:focus-visible {
  transform: none;
  border-color: var(--ink);
  box-shadow:
    0 0 6px var(--ink),
    0 0 18px color-mix(in srgb, var(--ink) 45%, transparent);
}
/* after "Pick another path", the path buttons hop once (day) or flash their neon once (night) */
.try.is-back .pb:not(.pb--all) {
  animation: backHop 0.6s ease-out both;
}
.try.is-back .pb:nth-of-type(2) {
  animation-delay: 0.08s;
}
.try.is-back .pb:nth-of-type(3) {
  animation-delay: 0.16s;
}
.try.is-back .pb:nth-of-type(4) {
  animation-delay: 0.24s;
}
[data-mode="night"] .try.is-back .pb:not(.pb--all) {
  animation: backGlow 0.9s ease-in-out both !important; /* the night buttons' rule turns animations off with !important */
}
@keyframes backHop {
  40% {
    translate: 0 -8px;
    rotate: -2deg;
  }
}
@keyframes backGlow {
  40% {
    border-color: var(--c);
    box-shadow:
      0 0 6px var(--c),
      0 0 18px color-mix(in srgb, var(--c) 70%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .try.is-back .pb:not(.pb--all),
  [data-mode="night"] .try.is-back .pb:not(.pb--all) {
    animation: none !important;
  }
}
.rates-h {
  margin: clamp(36px, calc(5 * var(--fw)), 56px) 0 18px;
  font: 700 clamp(1.15rem, 1rem + calc(0.5 * var(--fw)), 1.4rem)/1.2 var(--font-body);
}
.rates {
  display: grid;
  gap: 20px;
}
@container how (min-width: 820px) {
  .rates {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.rate {
  display: grid;
  gap: 10px;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 20px 22px;
  background: var(--c);
  color: var(--on-c);
  border: 3px solid var(--edge);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--edge);
}
[data-mode="night"] .rate {
  border-color: var(--c);
  box-shadow: none;
}
.rate-k {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rate-n {
  font: 700 clamp(2.1rem, 1.6rem + calc(1.6 * var(--fw)), 2.7rem)/1 var(--font-body);
  font-variant-numeric: tabular-nums;
}
.rate-u {
  font-weight: 600;
}
.minute {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 26px 20px;
  background: var(--c);
  color: var(--on-c);
  border: 3px solid var(--edge);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--edge);
}
.minute svg {
  flex: none;
}
.minute p {
  margin: 0;
  font-size: clamp(1rem, 0.95rem + calc(0.3 * var(--fw)), 1.15rem);
  line-height: 1.4;
}
.minute b {
  display: block;
  font-weight: 700;
  font-size: clamp(1.1rem, 1rem + calc(0.5 * var(--fw)), 1.35rem);
}
[data-mode="day"] .minute {
  background: var(--surface);
  color: var(--ink);
}
[data-mode="night"] .minute {
  border-color: var(--c);
  box-shadow: none;
}
[data-mode="night"] .minute svg circle {
  fill: var(--on-c);
  stroke: var(--c);
}
[data-mode="night"] .minute svg path {
  stroke: var(--c);
}
.tiers {
  display: grid;
  gap: 10px;
  justify-self: stretch;
}
.tiers div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--on-c) 22%, transparent);
  font-size: 0.96rem;
  font-weight: 600;
}
.tiers b {
  font-size: 1.2rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* ---------- builder ---------- */
.builder {
  margin-top: 26px;
  display: grid;
  gap: 18px;
  padding: clamp(16px, calc(2.4 * var(--fw)), 26px);
  background: var(--surface);
  border: 3px solid var(--edge);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--edge);
}
.parts {
  display: grid;
  gap: 0 28px;
  grid-template-columns: 1fr;
}
@container how (min-width: 980px) {
  .parts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
[hidden] {
  display: none !important;
}
.bar-k {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.pb,
.tb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 2px solid var(--edge);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 600 0.92rem/1 var(--font-body);
  cursor: pointer;
  box-shadow: 0 0 0 var(--edge);
  transition:
    transform 150ms var(--boing),
    box-shadow 150ms var(--boing),
    background-color 0.2s;
}
.tb {
  border-radius: 12px;
  padding: 0 12px;
}
.pb:hover,
.pb:focus-visible,
.tb:hover,
.tb:focus-visible {
  transform: translateY(-3px) rotate(-2deg);
  box-shadow: 0 3px 0 var(--edge);
}
.pb:active,
.tb:active {
  transform: scale(0.94);
  box-shadow: 0 0 0 var(--edge);
}
.pb > i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid var(--edge);
  flex: none;
}
.pb[aria-pressed="true"] {
  background: var(--c);
  color: var(--on-c);
}
@keyframes roll {
  0% {
    transform: rotate(0) scale(1);
  }
  40% {
    transform: rotate(260deg) scale(1.25);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}
.pb--all {
  background: transparent;
}
@container how (width < 700px) {
  .try {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: -4px 0 22px;
  }
  .try .bar-k {
    grid-column: 1 / -1;
    font-size: 0.92rem;
  }
  .try .pb {
    min-height: 56px;
    padding: 0 14px;
    font-size: 1.05rem;
    justify-content: center;
    border-radius: 16px;
    gap: 10px;
  }
  .try .pb > i {
    width: 16px;
    height: 16px;
  }
  .try .pb--all {
    grid-column: 1 / -1;
  }
}
[data-mode="night"] .pb,
[data-mode="night"] .tb {
  border-color: var(--hair);
}
@container how (max-width: 760px) {
  .bar-k {
    flex-basis: 100%;
  }
}

.stage-wrap {
  padding-block: 30px 90px;
}
.stage {
  container-type: inline-size;
  margin-inline: auto;
  transition: max-width 0.35s ease;
}
.stage-wrap[data-width="phone"] .stage {
  max-width: 400px;
}

/* ================= chart engine ================= */
.panel {
  position: relative;
  isolation: isolate;
  padding: clamp(22px, calc(3.4 * var(--fw)), 48px);
  border-radius: 28px;
  transition: background-color 0.3s;
}
@container (max-width: 699px) {
  .panel {
    padding: 24px 12px 30px;
    border-radius: 22px;
  }
}
.flow {
  position: relative;
  isolation: isolate;
  --gap: 44px;
  --lane: 116px;
  --lane-m: 90px;
  --lane-or: 158px;
  --root: var(--ink);
  --on-root: var(--bg);
}
.col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
}
.it {
  position: relative;
  z-index: 1;
}
.k-step,
.k-end,
.k-note {
  width: 100%;
}
/* a step that comes a while after the one before (Lv 4 of board games, after playing): three gaps instead of one */
.it--later {
  margin-top: calc(var(--gap) * 2);
}
.k-hub {
  width: 4px;
  height: 0;
}
[data-mode="day"] .flow {
  --on-blue: #ffffff;
  --on-green: #ffffff;
  --on-purple: #ffffff;
}
[data-mode="day"] .flow .is-b .dc-die circle,
[data-mode="day"] .flow .is-g .dc-die circle {
  fill: #1a1714 !important;
}
.hub-pt {
  display: block;
  width: 4px;
  height: 0;
}
.fork {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: 100%;
}
.fork--top {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
}
.fork--exp {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
}
.arm {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--lane) 12px 0;
}
.arm > .col {
  flex: none;
}
.fork--merge > .arm {
  padding-top: var(--lane-m);
  padding-inline: 8px;
}
.fork--merge {
  margin-bottom: 18px;
}
.fork--merge > .arm > .col {
  flex: 1;
}
.fork--merge > .arm > .col > .it {
  flex: 1;
  display: flex;
}
.fork--merge > .arm > .col > .it > * {
  flex: 1;
}
.lbl-h {
  margin: 0;
  font-size: inherit;
  height: 0;
}
.lbl {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  translate: -50% -50%;
  white-space: nowrap;
  cursor: pointer;
  visibility: hidden;
  transition:
    transform 150ms var(--boing),
    opacity 0.25s,
    background-color 0.2s;
}
.lbl.placed {
  visibility: visible;
}
.wires,
.toks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.wires {
  z-index: 0;
}
.toks {
  z-index: 4;
}
.marks {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.or {
  position: absolute;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 1.05rem;
}
.fill {
  display: none;
  position: relative;
  min-height: 440px;
  margin-top: 20px;
  pointer-events: none;
}
.fill > * {
  position: absolute;
}
.fill svg {
  display: block;
  overflow: visible;
}
@container (min-width: 1060px) {
  .fill {
    display: block;
  }
  .fork--top {
    --no-or: 1;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
  }
  .fork--top > .arm:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr);
    align-items: start;
    padding-inline: 0;
  }
  .fork--top > .arm:first-child > .col {
    grid-column: 1;
    grid-row: 1;
  }
  .fork--top > .arm:first-child > .fill {
    grid-column: 3;
    grid-row: 1;
    align-self: stretch;
    display: flex;
    min-height: 0;
    margin: calc(24px - var(--lane)) 0 0;
  }
  .fork--top > .arm:first-child > .fill > .legend {
    position: relative;
    left: auto;
    top: auto;
    translate: none;
    flex: 0 0 85%;
    width: auto;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px clamp(24px, calc(3 * var(--fw)), 44px);
  }
  .fork--top > .arm:first-child > .fill > .legend b {
    font-size: 1rem;
    margin-bottom: 18px;
  }
  .fork--top > .arm:first-child > .fill > .legend ul {
    gap: 18px;
    font-size: clamp(1.1rem, 0.9rem + calc(0.5 * var(--fw)), 1.35rem);
  }
  .fork--top > .arm:first-child > .fill > .legend li {
    gap: 16px;
  }
  .fork--top > .arm:first-child > .fill > .legend li i {
    width: 56px;
    height: 14px;
  }
  [data-mode="night"] .fork--top > .arm:first-child > .fill > .legend li i {
    height: 10px;
  }
  .fork--top > .arm + .arm {
    padding-top: var(--lane);
  }
}
@container (max-width: 1059px) {
  .fork--top {
    grid-template-columns: none;
    grid-auto-flow: row;
  }
  .fork--top > .arm:first-child {
    width: 100%;
    max-width: 520px;
    justify-self: center;
  }
  .fork--top > .arm + .arm {
    padding-top: var(--lane-or);
    margin-top: 26px;
  }
}
@container (max-width: 699px) {
  .flow {
    --gap: 34px;
    --lane: 106px;
    --lane-m: 84px;
    --lane-or: 146px;
  }
  .fork--exp {
    grid-template-columns: none;
    grid-auto-flow: row;
  }
  .fork--exp > .arm {
    padding-inline: 0;
  }
  .fork--exp > .arm + .arm {
    padding-top: var(--lane-or);
    margin-top: 26px;
  }
  .fork--merge > .arm {
    padding-inline: 4px;
  }
  .fork--merge .lbl i {
    display: none;
  }
  .fork--merge .lb-metro {
    padding: 6px 12px;
    box-shadow:
      0 0 0 4px color-mix(in srgb, var(--bc) 35%, var(--bg)),
      3px 4px 0 4px var(--edge);
  }
  .fork--merge .lb-px {
    padding: 6px 11px;
  }
  .fork--merge .lb-px .cur {
    display: none;
  }
}
.w {
  transition: opacity 0.3s;
}
.flow.has-route .w.off {
  opacity: 0.16;
}
.flow.has-route .ln.off {
  opacity: 0.2;
}
.flow.has-route .w.off .ln.off {
  opacity: 1;
}
.sk-metro .mt-o.ln-o {
  transition: opacity 0.3s;
}
.flow.has-route .ln-o.off {
  opacity: 0;
}
.flow.hide-off .ln.off,
.flow.hide-off .ln-o.off {
  display: none;
}
.sk-pixel .pl {
  shape-rendering: crispEdges;
  transition: opacity 0.3s;
}
.sk-metro .mt-l.ln {
  transition: opacity 0.3s;
}
.flow.has-route .it.off {
  opacity: 0.32;
  filter: saturate(0.35);
  transition:
    opacity 0.3s,
    filter 0.3s;
}
.flow.has-route .arm.off > .lbl-h > .lbl {
  opacity: 0.4;
}
.lbl[aria-pressed="true"] {
  z-index: 5;
}
.fork--merge .col > .it {
  width: 100%;
  min-width: 0;
}
.fork--merge .dc {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.fork--merge .dc-die {
  width: 44px;
  height: 44px;
}
.fork--merge .dc-t {
  width: 100%;
}
.fork--merge .dc {
  align-items: center;
  text-align: center;
}
.fork--merge .dc-t {
  align-items: center;
}
.fork--merge .nl {
  margin-inline: auto;
}
/* every step box: all text centered */
.dc {
  text-align: center;
}
.dc-t {
  align-items: center;
  text-align: center;
}
.px-b {
  align-items: center;
  text-align: center;
}
.dc-t .nl,
.px-b .nl {
  margin-left: auto;
  margin-right: auto;
}
.flow.hide-off .it.off,
.flow.hide-off .arm.off {
  display: none;
}
.flow.hide-off .fork:not(.fork--merge) > .arm {
  padding-top: var(--lane);
  margin-top: 0;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
}
@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* ================= MENCH METRO (day) ================= */
.panel[data-skin="metro"] {
  background-color: var(--map);
  border: 3px solid var(--edge);
  border-radius: 24px;
  background-image:
    linear-gradient(var(--mapgrid) 1px, transparent 1px), linear-gradient(90deg, var(--mapgrid) 1px, transparent 1px);
  background-size: 32px 32px;
}
.sk-metro .mt-o {
  fill: none;
  stroke: var(--edge);
  stroke-width: 15;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sk-metro .mt-l {
  fill: none;
  stroke: var(--bc);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sk-metro .mt-d {
  fill: none;
  stroke: var(--muted);
  stroke-width: 3.5;
  stroke-dasharray: 0.1 9;
  stroke-linecap: round;
}
.st-metro .fork--merge > .arm:first-child {
  padding-left: 0;
}
.stn {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  text-align: left;
}
.stn-dot {
  justify-self: center;
  width: 30px;
  height: 30px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--surface);
  border: 6px solid var(--edge);
  transition: transform 200ms var(--boing);
}
.stn--end .stn-dot {
  width: 36px;
  height: 36px;
  margin-top: 4px;
  border-width: 7px;
  background: var(--c);
}
.stn-t {
  display: grid;
  gap: 4px;
  justify-items: start;
  padding: 7px 12px 9px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--map) 88%, transparent);
  transition:
    background-color 0.2s,
    box-shadow 0.2s;
}
.stn-code {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--c);
  color: var(--on-c);
  border: 2px solid var(--edge);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.stn-t b {
  font-weight: 700;
  font-size: 1.04rem;
  line-height: 1.28;
  text-wrap: pretty;
}
.stn-t small {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.35;
}
.stn:hover .stn-dot {
  transform: scale(1.18);
}
.stn:hover .stn-t {
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--c);
}
.xc {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.xc-ring {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: var(--surface);
  border: 7px solid var(--edge);
  font-weight: 700;
  font-size: 1.05rem;
}
.xc b {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 1.05rem;
  line-height: 1.2;
}
.xc--start .xc-ring {
  width: 56px;
  height: 56px;
  background: var(--red);
  color: var(--on-red);
  font-size: 1.4rem;
}
.xc--start b {
  background: var(--red);
  color: var(--on-red);
  font-size: 1.2rem;
}
.lb-metro {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 9px;
  background: var(--bc);
  color: var(--on-bc);
  border: 3px solid var(--edge);
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--bc) 35%, var(--bg)),
    3px 4px 0 5px var(--edge);
}
.lb-metro i {
  width: 24px;
  height: 10px;
  flex: none;
  border-radius: 99px;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--edge);
}
.lb-metro:hover {
  transform: translateY(-3px);
}
.lb-metro[aria-pressed="true"] {
  box-shadow:
    0 0 0 3px var(--bg),
    0 0 0 6px var(--edge),
    3px 4px 0 6px var(--edge);
}
.notice {
  border: 3px solid var(--edge);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}
.notice-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.notice-h .i {
  width: 20px;
  height: 20px;
}
.notice-b {
  padding: 12px 16px 14px;
  display: grid;
  gap: 2px;
}
.notice-b b {
  font-size: 1.1rem;
}
.notice-b p {
  color: var(--muted);
  font-size: 0.95rem;
}
[data-mode="night"] .legend {
  border: 0;
  border-radius: 0;
  margin: 4px;
  box-shadow:
    0 -4px 0 0 var(--hair),
    0 4px 0 0 var(--hair),
    -4px 0 0 0 var(--hair),
    4px 0 0 0 var(--hair);
}
[data-mode="night"] .legend li i {
  border-radius: 0;
  box-shadow: none;
  height: 6px;
}
.legend {
  left: 50%;
  top: 10px;
  translate: -50% 0;
  width: min(240px, 90%);
  padding: 14px 16px 16px;
  background: var(--surface);
  border: 3px solid var(--edge);
  border-radius: 14px;
}
.legend b {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.legend ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  font-weight: 600;
  font-size: 0.92rem;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.legend li i {
  width: 30px;
  height: 9px;
  border-radius: 99px;
  background: var(--bc);
  box-shadow: 0 0 0 2px var(--edge);
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--c, var(--ink)) 70%, transparent);
    scale: 1.3;
  }
  100% {
    box-shadow: 0 0 0 18px transparent;
    scale: 1;
  }
}
.sk-metro .it.hit .anc {
  animation: ping 0.7s ease-out;
}
.sk-metro.is-intro .mt-o,
.sk-metro.is-intro .mt-l {
  stroke-dasharray: 1;
  animation: draw 1s ease both;
  animation-delay: calc(var(--i) * 70ms);
}
.sk-metro.is-intro .it {
  animation: fadeIn 0.5s ease both;
  animation-delay: calc(var(--i) * 70ms);
}

/* ================= PIXEL QUEST (day and night) ================= */
.panel[data-skin="pixel"] {
  --b: 6px;
  border-radius: 0;
  margin: var(--b);
  background-color: var(--bg);
  background-image: radial-gradient(color-mix(in srgb, var(--muted) 22%, transparent) 1.5px, transparent 1.6px);
  background-size: 16px 16px;
  box-shadow:
    0 calc(-1 * var(--b)) 0 0 var(--edge),
    0 var(--b) 0 0 var(--edge),
    calc(-1 * var(--b)) 0 0 0 var(--edge),
    var(--b) 0 0 0 var(--edge);
}
[data-mode="night"] .panel[data-skin="pixel"] {
  background-image: none;
  box-shadow:
    0 calc(-1 * var(--b)) 0 0 var(--hair),
    0 var(--b) 0 0 var(--hair),
    calc(-1 * var(--b)) 0 0 0 var(--hair),
    var(--b) 0 0 0 var(--hair);
}
.px-stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: none;
  pointer-events: none;
  /* the stars are placed in % of the panel, so they move when a pick resizes the chart;
     without this the browser's scroll anchoring could lock onto one and drag the page with it */
  overflow-anchor: none;
}
[data-mode="night"] .px-stars {
  display: block;
}
.px-stars i {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--ink);
  animation: twinkle 3s steps(2) infinite;
}
@keyframes twinkle {
  50% {
    opacity: 0.2;
  }
}
.sk-pixel .pw {
  fill: none;
  stroke: var(--bc);
  stroke-width: 6;
  stroke-dasharray: 6 6;
  stroke-linejoin: miter;
}
.sk-pixel .pw-d {
  fill: none;
  stroke: var(--muted);
  stroke-width: 4;
  stroke-dasharray: 4 8;
}
.sk-pixel .pa {
  fill: var(--bc);
  stroke: var(--edge);
  stroke-width: 2;
  shape-rendering: crispEdges;
}
.px {
  --pb: 4px;
  position: relative;
  margin: var(--pb);
  background: var(--surface);
  color: var(--ink);
  box-shadow:
    0 calc(-1 * var(--pb)) 0 0 var(--edge),
    0 var(--pb) 0 0 var(--edge),
    calc(-1 * var(--pb)) 0 0 0 var(--edge),
    var(--pb) 0 0 0 var(--edge),
    0 calc(var(--pb) * 2.5) 0 0 color-mix(in srgb, var(--edge) 22%, transparent);
  transition: translate 140ms steps(2);
}
[data-mode="night"] .px {
  box-shadow:
    0 calc(-1 * var(--pb)) 0 0 var(--c, var(--hair)),
    0 var(--pb) 0 0 var(--c, var(--hair)),
    calc(-1 * var(--pb)) 0 0 0 var(--c, var(--hair)),
    var(--pb) 0 0 0 var(--c, var(--hair)),
    0 calc(var(--pb) * 2.5) 0 0 color-mix(in srgb, var(--c, var(--hair)) 30%, transparent);
}
.px-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--c);
  color: var(--on-c);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.px-ic {
  width: 20px;
  height: 20px;
  flex: none;
  display: block;
}
.px-h .goal {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.px-b {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px 12px;
  flex: 1;
}
.px:has(.nl) {
  display: flex;
  flex-direction: column;
}
.px-b b {
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  text-wrap: pretty;
}
.px-b small {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.35;
}
.px-start {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 26px 14px;
  background: var(--red);
  color: var(--on-red);
  text-align: center;
}
.px-start span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  animation: blink 1.2s steps(2) infinite;
}
.px-start b {
  font-size: 1.24rem;
  line-height: 1.15;
}
.px-start {
  padding: 16px 28px 15px;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.px-q {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px 11px 12px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 1.06rem;
  line-height: 1.2;
}
.px-q .qm {
  width: 22px;
  height: 28px;
  color: var(--yellow);
  display: block;
  flex: none;
}
.lb-px {
  --pb: 3px;
  --hl: color-mix(in srgb, var(--bc) 40%, transparent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 14px 7px 9px;
  border: 0;
  background: var(--bc);
  color: var(--on-bc);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
  box-shadow:
    0 calc(-1 * var(--pb)) 0 0 var(--edge),
    0 var(--pb) 0 0 var(--edge),
    calc(-1 * var(--pb)) 0 0 0 var(--edge),
    var(--pb) 0 0 0 var(--edge),
    0 -7px 0 0 var(--hl),
    0 7px 0 0 var(--hl),
    -7px 0 0 0 var(--hl),
    7px 0 0 0 var(--hl);
}
.lb-px .cur {
  width: 10px;
  height: 12px;
  color: var(--on-bc);
  opacity: 0;
}
.lb-px:hover .cur,
.lb-px:focus-visible .cur,
.lb-px[aria-pressed="true"] .cur {
  opacity: 1;
  animation: blink 0.8s steps(2) infinite;
}
.lb-px i {
  width: 10px;
  height: 10px;
  background: var(--on-bc);
  box-shadow: 0 0 0 2px var(--edge);
}
.lb-px[aria-pressed="true"] {
  outline: 3px solid var(--edge);
  outline-offset: 9px;
}
.lb-px[aria-pressed="true"] .cur {
  color: var(--on-bc);
}
.px-note .px-h {
  background: var(--red);
  color: var(--on-red);
}
.sk-pixel .it.hit .px {
  animation: pjump 0.45s steps(3);
}
@keyframes pjump {
  50% {
    translate: 0 -10px;
  }
}
.sk-pixel.is-intro .it {
  animation: ppop 0.5s steps(4) both;
  animation-delay: calc(var(--i) * 60ms);
}
.sk-pixel.is-intro .w {
  animation: fadeIn 0.4s steps(3) both;
  animation-delay: calc(var(--i) * 60ms);
}
@keyframes ppop {
  from {
    scale: 0.3;
    opacity: 0;
  }
}
.bob {
  animation: bob 1.6s steps(2) infinite;
}
@keyframes bob {
  50% {
    translate: 0 -6px;
  }
}
.art-pixel .fill svg {
  filter: drop-shadow(3px 3px 0 color-mix(in srgb, var(--edge) 30%, transparent));
}

/* ================= CHESS CLUB (day) ================= */
.panel[data-skin="chess"] {
  padding: 54px 56px 74px;
  border: 3px solid var(--edge);
  border-radius: 18px;
  background-color: var(--bg);
  background-image: repeating-conic-gradient(rgba(26, 23, 20, 0.032) 0 25%, transparent 0 50%);
  background-size: 84px 84px;
}
.panel[data-skin="chess"]::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: -1;
  padding: 20px;
  border-radius: 10px;
  background: repeating-conic-gradient(#1a1714 0 25%, #ffffff 0 50%) 0 0 / 20px 20px;
  box-shadow: inset 0 0 0 2px #1a1714;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.ch-files,
.ch-ranks {
  position: absolute;
  z-index: 0;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font: 700 0.72rem/1 var(--font-body);
  letter-spacing: 0.08em;
  pointer-events: none;
}
.ch-files {
  left: 74px;
  right: 74px;
  bottom: 36px;
}
.ch-ranks {
  top: 64px;
  bottom: 64px;
  left: 36px;
  flex-direction: column;
}
@container (max-width: 699px) {
  .panel[data-skin="chess"] {
    padding: 36px 22px 40px;
  }
  .panel[data-skin="chess"]::before {
    inset: 5px;
    padding: 12px;
    background-size: 12px 12px;
  }
  .ch-files,
  .ch-ranks {
    display: none;
  }
}
.sk-chess .cw {
  fill: none;
  stroke: rgba(26, 23, 20, 0.3);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 0 15;
  transition: stroke 0.3s;
}
.sk-chess .cw-d {
  fill: none;
  stroke: rgba(26, 23, 20, 0.26);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 0 10;
}
.sk-chess .cr {
  fill: none;
  stroke: rgba(26, 23, 20, 0.42);
  stroke-width: 3;
  transition: stroke 0.3s;
}
.sk-chess.has-route .w.on .cw {
  stroke: var(--bc);
}
.sk-chess.has-route .w.on .cr {
  stroke: var(--edge);
}
.sk-chess {
  --root: #1a1714;
}
.ch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 10px;
  background: var(--surface);
  color: var(--ink);
  border: 3px solid var(--edge);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--edge);
  text-align: left;
  transition:
    transform 150ms var(--boing),
    box-shadow 150ms var(--boing);
}
.ch:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--edge);
}
.ch-sq {
  flex: none;
  display: grid;
  place-items: end center;
  width: 58px;
  height: 58px;
  padding-bottom: 2px;
  overflow: hidden;
  border: 2.5px solid var(--edge);
  border-radius: 7px;
  background: repeating-conic-gradient(
      color-mix(in srgb, var(--c) 34%, #ffffff) 0 25%,
      color-mix(in srgb, var(--c) 12%, #ffffff) 0 50%
    )
    0 0 / 50% 50%;
}
.ch-sq svg {
  width: 34px;
  height: 48px;
  display: block;
  transition: transform 0.35s var(--spring);
}
.ch:hover .ch-sq svg {
  transform: translateY(-5px) rotate(-7deg);
}
.ch-sq .i {
  width: 30px;
  height: 30px;
  align-self: center;
  color: #1a1714;
  stroke-width: 2.2;
}
.ch-t {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.ch-k {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ch-t b {
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  text-wrap: pretty;
}
.ch-t small {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.35;
}
.ch--end {
  box-shadow:
    5px 5px 0 var(--c),
    5px 5px 0 3px var(--edge);
}
.ch--end:hover {
  box-shadow:
    8px 8px 0 var(--c),
    8px 8px 0 3px var(--edge);
}
.ch--end .ch-k {
  color: var(--ink);
}
.ch-q {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 8px 8px;
  background: #1a1714;
  color: #fffbf0;
  border-radius: 12px;
  box-shadow: 4px 4px 0 color-mix(in srgb, #1a1714 28%, transparent);
  text-align: left;
}
.ch-qi {
  flex: none;
  display: grid;
  place-items: end center;
  width: 50px;
  height: 50px;
  padding-bottom: 1px;
  overflow: hidden;
  border: 2px solid #fffbf0;
  border-radius: 8px;
  background: repeating-conic-gradient(var(--yellow) 0 25%, #ffefa6 0 50%) 0 0 / 50% 50%;
}
.ch-qi svg {
  width: 30px;
  height: 42px;
  display: block;
  transition: transform 0.35s var(--spring);
}
.ch-q:hover .ch-qi svg {
  transform: translateY(-4px) rotate(8deg);
}
.ch-q .ch-k {
  color: var(--yellow);
}
.ch-q b {
  display: block;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.2;
}
.ch-start {
  padding: 10px 24px 10px 10px;
  background: var(--red);
  color: #ffffff;
  box-shadow: 4px 4px 0 #1a1714;
  border: 3px solid #1a1714;
}
.ch-start .ch-qi {
  width: 58px;
  height: 58px;
  background: repeating-conic-gradient(#ffffff 0 25%, #ffd9d6 0 50%) 0 0 / 50% 50%;
  border-color: #1a1714;
}
.ch-start .ch-qi svg {
  width: 36px;
  height: 50px;
}
.ch-start .ch-k {
  color: #ffe3e0;
}
.ch-start b {
  font-size: 1.28rem;
}
.lb-ch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 6px;
  background: var(--surface);
  color: var(--ink);
  border: 2.5px solid var(--edge);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 2px 2px 0 var(--edge);
}
.lb-ch svg {
  width: 17px;
  height: 24px;
  display: block;
}
.lb-ch:hover {
  transform: translate(-2px, -2px) rotate(-2deg);
}
.lb-ch[aria-pressed="true"] {
  background: var(--bc);
  color: var(--on-bc);
}
.ch-note {
  border-style: dashed;
  box-shadow: none;
}
@keyframes chHop {
  0% {
    transform: none;
  }
  40% {
    transform: translateY(-10px) rotate(-10deg);
  }
  70% {
    transform: translateY(1px);
  }
  100% {
    transform: none;
  }
}
.sk-chess .it.hit .ch-sq svg,
.sk-chess .it.hit .ch-qi svg {
  animation: chHop 0.5s ease;
}
.sk-chess.is-intro .it {
  animation: chIn 0.55s var(--spring) both;
  animation-delay: calc(var(--i) * 55ms);
}
.sk-chess.is-intro .w {
  animation: fadeIn 0.5s ease both;
  animation-delay: calc(var(--i) * 55ms + 150ms);
}
@keyframes chIn {
  from {
    translate: -26px 0;
    opacity: 0;
  }
}
@container (max-width: 699px) {
  .fork--merge .ch {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px 12px;
  }
  .fork--merge .ch-sq {
    width: 46px;
    height: 46px;
  }
  .fork--merge .ch-sq svg {
    width: 27px;
    height: 38px;
  }
  .ch-q b {
    font-size: 1rem;
  }
}

/* ================= DICE BAG (day) ================= */
.panel[data-skin="dice"] {
  padding: 46px;
  background-color: var(--tray);
  border: 3px solid var(--edge);
  border-radius: 36px;
  background-image: radial-gradient(rgba(26, 23, 20, 0.075) 2.2px, transparent 2.7px);
  background-size: 30px 30px;
  box-shadow:
    inset 0 0 0 11px #fffbf0,
    inset 0 0 0 14px var(--edge),
    inset 0 22px 28px -14px rgba(26, 23, 20, 0.14);
}
@container (max-width: 699px) {
  .panel[data-skin="dice"] {
    padding: 32px 20px 36px;
    border-radius: 28px;
    box-shadow:
      inset 0 0 0 7px #fffbf0,
      inset 0 0 0 10px var(--edge);
  }
}
.sk-dice {
  --root: #ffffff;
  --on-root: #1a1714;
}
.sk-dice .dw-o {
  fill: none;
  stroke: #1a1714;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 0 18;
}
.sk-dice .dw-f {
  fill: none;
  stroke: var(--bc);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 0 18;
}
.sk-dice .dw-d {
  fill: none;
  stroke: rgba(26, 23, 20, 0.4);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 0 10;
}
.dc {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px 12px 12px;
  background: var(--surface);
  color: var(--ink);
  border: 3px solid var(--edge);
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--edge);
  text-align: left;
  transition:
    transform 160ms var(--boing),
    box-shadow 160ms var(--boing);
}
.dc-die {
  flex: none;
  width: 52px;
  height: 52px;
  display: block;
  transition: transform 0.55s var(--spring);
}
.dc:hover .dc-die {
  transform: rotate(90deg) scale(1.08);
}
.dc-t {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
  align-self: stretch;
  justify-content: center;
}
.dc-t:has(.nl) {
  justify-content: flex-start;
}
.dc-t:has(.nl) .nl {
  margin-top: auto;
}
.dc-t:has(.nl) > :nth-last-child(2),
.px-b:has(.nl) > :nth-last-child(2) {
  margin-bottom: 8px;
}
.px-b > .nl {
  margin-top: auto;
}
.dc-k {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.dc-t b {
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  text-wrap: pretty;
}
.dc-t small {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.35;
}
.dc-q {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.dc-q .d20w {
  position: relative;
  z-index: 1;
  width: 74px;
  height: 74px;
  margin-bottom: -18px;
  transition: transform 0.6s var(--spring);
}
.dc-q:hover .d20w {
  transform: rotate(60deg);
}
.dc-q .d20w svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 3px 0 #1a1714);
}
.dc-q b {
  padding: 22px 20px 11px;
  background: #1a1714;
  color: #fffbf0;
  border-radius: 16px;
  font-size: 1.06rem;
  line-height: 1.2;
  text-align: center;
}
.dc-start {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px 10px 12px;
  background: var(--red);
  color: #ffffff;
  border: 3px solid var(--edge);
  border-radius: 999px;
  box-shadow: 0 6px 0 var(--edge);
}
.dc-pair {
  display: flex;
}
.dc-pair svg {
  width: 36px;
  height: 36px;
  display: block;
}
.dc-pair svg:first-child {
  rotate: -12deg;
}
.dc-pair svg:last-child {
  rotate: 14deg;
  margin-left: -4px;
}
.dc-start:hover .dc-pair svg:first-child {
  animation: dcRoll 0.6s ease;
}
.dc-start:hover .dc-pair svg:last-child {
  animation: dcRoll 0.6s ease 0.08s;
}
.dc-start b {
  font-size: 1.24rem;
  line-height: 1.15;
}
.lb-dc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 6px;
  background: var(--surface);
  color: var(--ink);
  border: 2.5px solid var(--edge);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 3px 0 var(--edge);
}
.lb-dc i {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #1a1714;
  background: radial-gradient(circle, var(--on-bc) 0 2.6px, transparent 3px) var(--bc);
}
.lb-dc:hover {
  transform: translateY(-3px) rotate(-3deg);
}
.lb-dc[aria-pressed="true"] {
  background: var(--bc);
  color: var(--on-bc);
}
.lb-dc[aria-pressed="true"] i {
  border-color: currentColor;
}
@keyframes dcRoll {
  0% {
    transform: none;
  }
  45% {
    transform: translateY(-12px) rotate(200deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.sk-dice .it.hit .dc-die,
.sk-dice .it.hit .d20w {
  animation: dcRoll 0.6s ease;
}
.sk-dice.is-intro .it {
  animation: dcDrop 0.6s var(--spring) both;
  animation-delay: calc(var(--i) * 50ms);
}
.sk-dice.is-intro .w {
  animation: fadeIn 0.5s ease both;
  animation-delay: calc(var(--i) * 50ms + 200ms);
}
@keyframes dcDrop {
  from {
    translate: 0 -40px;
    rotate: -8deg;
    opacity: 0;
  }
}
@container (max-width: 699px) {
  .fork--merge .dc {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 10px 12px;
  }
  .fork--merge .dc-die {
    width: 42px;
    height: 42px;
  }
}

/* text sits at the true center of the box: the die is taken out of the flow and the same space is reserved on both sides */
.flow .dc {
  padding-left: 80px;
  padding-right: 80px;
}
.flow .dc > .dc-die {
  position: absolute;
  left: 14px;
  top: 50%;
  translate: 0 -50%;
}
@container (max-width: 699px) {
  .flow .dc {
    padding-left: 64px;
    padding-right: 64px;
  }
  .flow .dc > .dc-die {
    left: 12px;
    width: 42px;
    height: 42px;
  }
}
.flow .fork--merge .dc {
  padding: 12px 14px 14px;
  align-items: center;
}
.flow .fork--merge .dc > .dc-die {
  position: static;
  translate: none;
}

/* ================= DOMINO RUN (day) ================= */
.panel[data-skin="domino"] {
  background-color: var(--table);
  border: 3px solid var(--edge);
  border-radius: 22px;
  background-image:
    repeating-linear-gradient(90deg, rgba(26, 23, 20, 0.045) 0 2px, transparent 2px 58px),
    radial-gradient(ellipse at 50% 0, rgba(255, 255, 255, 0.7), transparent 60%);
}
.ln-domino {
  --gap: 62px;
}
@container (max-width: 699px) {
  .ln-domino {
    --gap: 50px;
  }
}
.sk-domino .dmw {
  fill: none;
  stroke: none;
}
.sk-domino .dmc {
  transform-box: fill-box;
  transform-origin: 0 50%;
  transform: scaleX(0.24);
  transition: transform 0.24s cubic-bezier(0.55, 0, 0.85, 0.35);
}
.sk-domino .dmc rect {
  fill: var(--bc);
  stroke: #1a1714;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  transition: fill 0.2s;
}
.sk-domino .dmc .pp {
  opacity: 0;
  transition: opacity 0.15s;
}
.sk-domino .dmc .pp:not(path) {
  fill: var(--bc);
}
.sk-domino .dmc.down {
  transform: scaleX(1);
}
.sk-domino .dmc.down rect {
  fill: #ffffff;
}
.sk-domino .dmc.down .pp {
  opacity: 1;
}
.sk-domino .dma {
  fill: #1a1714;
}
.sk-domino .dmt {
  fill: none;
  stroke: rgba(26, 23, 20, 0.4);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 0 10;
}
.dm {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--surface);
  color: var(--ink);
  border: 3px solid var(--edge);
  border-radius: 12px;
  box-shadow: 0 6px 0 var(--edge);
  text-align: left;
  transition:
    transform 180ms var(--boing),
    box-shadow 180ms var(--boing);
}
.dm:hover {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 9px 0 var(--edge);
}
.dm-h {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 68px;
  border-right: 3px solid var(--edge);
}
.dm-h .dp {
  width: 46px;
  height: 46px;
  display: block;
}
.dm-h .i {
  width: 30px;
  height: 30px;
  color: #1a1714;
  stroke-width: 2.2;
}
.dm-h::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: var(--brass);
  border: 2px solid var(--edge);
}
.dm-x {
  display: grid;
  gap: 3px;
  align-content: center;
  min-width: 0;
  padding: 12px 18px 12px 20px;
}
.dm-k {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.dm-x b {
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  text-wrap: pretty;
}
.dm-x small {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.35;
}
.dm--end .dm-x {
  text-align: center;
  justify-items: center;
  flex: 1;
}
.dm--end {
  box-shadow:
    0 6px 0 var(--edge),
    inset 0 0 0 4px #ffffff,
    inset 0 0 0 6px color-mix(in srgb, var(--c) 60%, #ffffff);
}
.dm-start {
  --c: #ffffff;
  background: var(--red);
  color: #ffffff;
}
.dm-start .dm-x b {
  font-size: 1.28rem;
  font-weight: 700;
}
.dm-start .dm-k {
  color: #ffe3e0;
}
.dm-q {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.dm-v {
  display: grid;
  grid-template-rows: 1fr 1fr;
  width: 36px;
  height: 64px;
  flex: none;
  background: #ffffff;
  border: 3px solid #1a1714;
  border-radius: 8px;
  rotate: -10deg;
  box-shadow: 3px 4px 0 #1a1714;
  transition: rotate 0.4s var(--spring);
}
.dm-v span {
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: #1a1714;
}
.dm-v span + span {
  border-top: 2.5px solid #1a1714;
}
.dm-v span + span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  border: 1.5px solid #1a1714;
}
.dm-q:hover .dm-v {
  rotate: 18deg;
}
.dm-q b {
  padding: 10px 18px;
  background: #1a1714;
  color: #fffbf0;
  border-radius: 12px;
  font-size: 1.06rem;
  line-height: 1.2;
}
.lb-dm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 7px;
  background: var(--surface);
  color: var(--ink);
  border: 2.5px solid var(--edge);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 3px 0 var(--edge);
}
.lb-dm i {
  width: 26px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid #1a1714;
  background:
    radial-gradient(circle at 25% 50%, var(--bc) 0 2.4px, transparent 2.8px),
    radial-gradient(circle at 75% 50%, var(--bc) 0 2.4px, transparent 2.8px),
    linear-gradient(
        90deg,
        transparent calc(50% - 1px),
        #1a1714 calc(50% - 1px) calc(50% + 1px),
        transparent calc(50% + 1px)
      )
      #ffffff;
}
.lb-dm:hover {
  transform: translateY(-3px) rotate(2deg);
}
.lb-dm[aria-pressed="true"] {
  background: var(--bc);
  color: var(--on-bc);
}
@keyframes dmKnock {
  0% {
    rotate: 0deg;
  }
  30% {
    rotate: -3.5deg;
    translate: 0 -5px;
  }
  60% {
    rotate: 2deg;
  }
  100% {
    rotate: 0deg;
  }
}
.sk-domino .it.hit .dm {
  animation: dmKnock 0.45s ease;
}
.sk-domino .it.hit .dm-v {
  animation: dcRoll 0.55s ease;
}
.sk-domino.is-intro .it {
  animation: dmIn 0.55s var(--spring) both;
  animation-delay: calc(var(--i) * 55ms);
}
.sk-domino.is-intro .w {
  animation: fadeIn 0.5s ease both;
  animation-delay: calc(var(--i) * 55ms + 200ms);
}
@keyframes dmIn {
  from {
    rotate: -14deg;
    translate: 0 -24px;
    opacity: 0;
  }
}
@container (max-width: 699px) {
  .fork--merge .dm {
    flex-direction: column;
  }
  .fork--merge .dm-h {
    width: auto;
    height: 46px;
    border-right: 0;
    border-bottom: 3px solid var(--edge);
  }
  .fork--merge .dm-h .dp {
    width: 36px;
    height: 36px;
  }
  .fork--merge .dm-h::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -8px;
    margin: 0 0 0 -6.5px;
  }
  .fork--merge .dm-x {
    padding: 14px 10px 12px;
  }
}

/* ================= SPIN & PLAY (day) ================= */
.panel[data-skin="spinner"] {
  background-color: var(--bg);
  border: 3px solid var(--edge);
  border-radius: 26px;
  background-image:
    radial-gradient(circle at 8% 6%, color-mix(in srgb, var(--yellow) 30%, transparent) 0 30px, transparent 31px),
    radial-gradient(circle at 94% 4%, color-mix(in srgb, var(--blue) 18%, transparent) 0 22px, transparent 23px),
    radial-gradient(circle at 97% 46%, color-mix(in srgb, var(--red) 14%, transparent) 0 40px, transparent 41px),
    radial-gradient(circle at 3% 58%, color-mix(in srgb, var(--green) 18%, transparent) 0 24px, transparent 25px),
    radial-gradient(circle at 40% 99%, color-mix(in srgb, var(--purple) 15%, transparent) 0 34px, transparent 35px),
    radial-gradient(circle at 76% 97%, color-mix(in srgb, var(--yellow) 26%, transparent) 0 18px, transparent 19px);
}
.sk-spinner {
  --root: #ffffff;
  --on-root: #1a1714;
}
.sk-spinner .spw {
  fill: none;
  stroke: none;
}
.sk-spinner .st {
  fill: var(--bc);
  stroke: #1a1714;
  stroke-width: 2.2;
  transition: transform 0.25s var(--spring);
  transform-box: fill-box;
  transform-origin: center;
}
.sk-spinner .st.lit {
  transform: scale(1.35);
}
.sk-spinner .spa {
  fill: none;
  stroke: #1a1714;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sk-spinner .spt {
  fill: none;
  stroke: rgba(26, 23, 20, 0.4);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 0 10;
}
.sp2 {
  position: relative;
  display: grid;
  gap: 3px;
  align-content: center;
  margin-left: 20px;
  min-height: 64px;
  padding: 12px 18px 12px 46px;
  background: var(--surface);
  color: var(--ink);
  border: 3px solid var(--edge);
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--edge);
  text-align: left;
  transition:
    transform 170ms var(--boing),
    box-shadow 170ms var(--boing);
}
.sp2:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 0 var(--edge);
}
.sp2-n {
  position: absolute;
  left: -22px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--c);
  color: var(--on-c);
  border: 3px solid var(--edge);
  box-shadow: 0 4px 0 var(--edge);
  font-weight: 700;
  font-size: 1.3rem;
  rotate: -8deg;
  transition:
    rotate 0.45s var(--spring),
    scale 0.45s var(--spring);
}
.sp2:hover .sp2-n {
  rotate: 352deg;
  scale: 1.08;
}
.sp2-n .i {
  width: 26px;
  height: 26px;
  stroke-width: 2.3;
}
.sp2 b {
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  text-wrap: pretty;
}
.sp2 small {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.35;
}
.sp2-k {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sp2--end {
  background: color-mix(in srgb, var(--c) 16%, #ffffff);
}
.sp2--end b {
  font-weight: 700;
}
.sp2-q {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.spinw {
  position: relative;
  z-index: 1;
  width: 70px;
  height: 70px;
  margin-bottom: -16px;
  filter: drop-shadow(0 4px 0 #1a1714);
}
.spinw svg {
  width: 100%;
  height: 100%;
  display: block;
}
.spin .arrow,
.dz .arrow {
  transform-box: view-box;
  transform-origin: 50% 50%;
  transform: rotate(var(--spin, 0deg));
  transition: transform 1.7s cubic-bezier(0.12, 0.75, 0.2, 1);
  transition-delay: var(--sd, 0ms);
}
.sp2-q:hover .spin .arrow {
  transform: rotate(calc(var(--spin, 0deg) + 25deg));
  transition-duration: 0.4s;
  transition-delay: 0ms;
}
.sp2-q b {
  padding: 21px 20px 11px;
  background: var(--surface);
  color: var(--ink);
  border: 3px solid var(--edge);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--edge);
  font-size: 1.06rem;
  line-height: 1.2;
  text-align: center;
}
.sp2-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 26px 10px 14px;
  background: var(--red);
  color: #ffffff;
  border: 3px solid var(--edge);
  border-radius: 20px;
  box-shadow: 0 6px 0 var(--edge);
  rotate: -1.5deg;
}
.sp2-start .peg {
  width: 30px;
  height: 44px;
  display: block;
}
.sp2-start .sp2-k {
  color: #ffe3e0;
}
.sp2-start b {
  display: block;
  font-size: 1.26rem;
  line-height: 1.15;
}
.lb-sp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 14px 4px 8px;
  background: var(--surface);
  color: var(--ink);
  border: 2.5px solid var(--edge);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 3px 0 var(--edge);
}
.lb-sp .peg {
  width: 15px;
  height: 22px;
  display: block;
}
.lb-sp:hover {
  transform: translateY(-3px) rotate(-3deg);
}
.lb-sp[aria-pressed="true"] {
  background: var(--bc);
  color: var(--on-bc);
}
.amb {
  animation: ambSpin 7s infinite;
}
@keyframes ambSpin {
  0%,
  52% {
    transform: rotate(20deg);
    animation-timing-function: cubic-bezier(0.12, 0.75, 0.2, 1);
  }
  86%,
  100% {
    transform: rotate(740deg);
  }
}
.sand {
  animation: sand 0.9s linear infinite;
}
@keyframes sand {
  to {
    stroke-dashoffset: -6;
  }
}
@keyframes spPop {
  0% {
    scale: 1;
  }
  40% {
    scale: 1.3;
  }
  100% {
    scale: 1;
  }
}
.sk-spinner .it.hit .sp2-n,
.sk-spinner .it.hit .spinw,
.sk-spinner .it.hit .sp2-start {
  animation: spPop 0.45s ease;
}
.sk-spinner.is-intro .it {
  animation: spIn 0.55s var(--spring) both;
  animation-delay: calc(var(--i) * 55ms);
}
.sk-spinner.is-intro .w {
  animation: fadeIn 0.5s ease both;
  animation-delay: calc(var(--i) * 55ms + 200ms);
}
@keyframes spIn {
  from {
    scale: 0.7;
    opacity: 0;
  }
}
@container (max-width: 699px) {
  .fork--merge .sp2 {
    margin-left: 12px;
    padding: 34px 10px 12px 12px;
    min-height: 0;
  }
  .fork--merge .sp2-n {
    left: 50%;
    top: -14px;
    translate: -50% 0;
    width: 42px;
    height: 42px;
    font-size: 1.05rem;
    margin-left: -6px;
  }
}

/* ================= game browser buttons: pixel variations ================= */
.nl {
  --w: 3px;
  --nb: var(--edge);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 2 * var(--w));
  margin: auto var(--w) var(--w);
  padding: 8px 10px;
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: var(--c);
  color: var(--on-c);
  font: 700 0.86rem/1.2 var(--font-body);
  text-decoration: none;
  box-shadow:
    0 calc(-1 * var(--w)) 0 0 var(--nb),
    0 var(--w) 0 0 var(--nb),
    calc(-1 * var(--w)) 0 0 0 var(--nb),
    var(--w) 0 0 0 var(--nb);
  transition:
    translate 140ms steps(2),
    box-shadow 140ms steps(2),
    background-color 140ms steps(2);
}
[data-mode="night"] .nl {
  --nb: var(--c);
}
.nl:hover,
.nl:focus-visible {
  translate: 0 -3px;
}
.nl:active {
  translate: 0 1px;
}
.nl {
  max-width: 450px;
  justify-content: center;
  text-align: center;
}
.nl-t {
  flex: 0 1 auto;
  min-width: 0;
}
.nl > svg {
  flex: none;
}
.nl-ic {
  display: none;
  width: 18px;
  height: 18px;
  flex: none;
}
.nl-cur {
  display: none;
  width: 8px;
  height: 11px;
  flex: none;
}

/* B · Chip: small, sits left */
.panel[data-bv="chip"] .nl {
  --w: 2px;
  width: fit-content;
  max-width: calc(100% - 4px);
  min-height: 30px;
  padding: 4px 9px;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  gap: 6px;
}
.panel[data-bv="chip"] .nl > svg:last-child {
  width: 11px;
  height: 11px;
}

/* C · Big: tall, with icon and a pixel drop shadow that presses */
.panel[data-bv="big"] .nl {
  --w: 4px;
  min-height: 52px;
  padding: 10px 12px;
  font-size: 0.98rem;
  gap: 10px;
  margin-bottom: 12px;
  box-shadow:
    0 calc(-1 * var(--w)) 0 0 var(--nb),
    0 var(--w) 0 0 var(--nb),
    calc(-1 * var(--w)) 0 0 0 var(--nb),
    var(--w) 0 0 0 var(--nb),
    0 10px 0 0 color-mix(in srgb, var(--nb) 45%, transparent);
}
.panel[data-bv="big"] .nl .nl-ic {
  display: block;
  width: 22px;
  height: 22px;
}
.panel[data-bv="big"] .nl:active {
  translate: 0 5px;
  box-shadow:
    0 calc(-1 * var(--w)) 0 0 var(--nb),
    0 var(--w) 0 0 var(--nb),
    calc(-1 * var(--w)) 0 0 0 var(--nb),
    var(--w) 0 0 0 var(--nb),
    0 4px 0 0 color-mix(in srgb, var(--nb) 45%, transparent);
}

/* D · Outline: empty box in the path color, fills on hover */
.panel[data-bv="outline"] .nl {
  --nb: var(--c);
  background: transparent;
  color: var(--ink);
}
[data-mode="day"] .panel[data-bv="outline"] .nl {
  --nb: var(--edge);
  background: var(--surface);
}
.panel[data-bv="outline"] .nl .nl-ic {
  display: block;
  color: var(--c);
}
[data-mode="day"] .panel[data-bv="outline"] .nl .nl-ic {
  color: var(--ink);
}
.panel[data-bv="outline"] .nl:hover,
.panel[data-bv="outline"] .nl:focus-visible {
  background: var(--c);
  color: var(--on-c);
}
.panel[data-bv="outline"] .nl:hover .nl-ic,
.panel[data-bv="outline"] .nl:focus-visible .nl-ic {
  color: var(--on-c);
}

/* E · Cartridge: icon block on the left, label on a light strip */
.panel[data-bv="cart"] .nl {
  padding: 0 10px 0 0;
  gap: 10px;
  min-height: 42px;
  background: color-mix(in srgb, var(--c) 22%, var(--surface));
  color: var(--ink);
}
.panel[data-bv="cart"] .nl .nl-ic {
  display: block;
  box-sizing: content-box;
  align-self: stretch;
  height: auto;
  width: 20px;
  padding: 0 10px;
  background: var(--c);
  color: var(--on-c);
  box-shadow: var(--w) 0 0 0 var(--nb);
}
.panel[data-bv="cart"] .nl:hover,
.panel[data-bv="cart"] .nl:focus-visible {
  background: var(--c);
  color: var(--on-c);
}

/* F · Menu option: no box, blinking cursor and a pixel underline */
.panel[data-bv="menu"] .nl {
  --w: 0px;
  width: 100%;
  margin: auto 0 0;
  min-height: 34px;
  padding: 4px 2px 7px;
  color: var(--ink);
  box-shadow: none;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, var(--c) 50%, transparent 50%) 0 100% / 8px 4px repeat-x;
}
.panel[data-bv="menu"] .nl .nl-cur {
  display: block;
  color: var(--c);
  animation: blink 0.8s steps(2) infinite;
}
[data-mode="day"] .panel[data-bv="menu"] .nl .nl-cur {
  color: var(--ink);
}
.panel[data-bv="menu"] .nl:hover,
.panel[data-bv="menu"] .nl:focus-visible {
  translate: 4px 0;
}

/* G · Tab: like the "Lv" header strip, small caps and icon */
[data-mode="day"] .panel .nl {
  --w: 2px;
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  gap: 8px;
}
[data-mode="day"] .panel .nl .nl-ic {
  display: block;
  width: 16px;
  height: 16px;
}
[data-mode="day"] .panel .nl > svg:last-child {
  width: 12px;
  height: 12px;
}

/* variation picker */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
/* ---------- inside the Mench Cafe page: the site supplies the title, the switch and the side padding ---------- */
.sr-page {
  background: transparent !important;
}
.wrap {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
@container how (min-width: 700px) {
  .wrap {
    padding-left: 32px;
    padding-right: 32px;
  }
} /* this section is 64px wider than the column, so glows aren't clipped */
.stage-wrap {
  padding-block: 12px 4px;
} /* room above the path buttons so their hover lift and outline aren't cut off */ /* the path bar stays in place instead of sticking to the top of the screen */
@container how (min-width: 700px) {
  .try {
    margin-top: 0;
  }
  .stage-wrap {
    padding-top: 34px;
  }
} /* room for the picker card's glow */
/* the path buttons sit inside the chart, between its first question and the split into paths */
.k-pick {
  width: 100%;
  max-width: 860px;
}
.k-pick > .try {
  margin: 0;
}
/* wider screens: "Show all" moves up beside the heading, so the four paths share the full width; 2 × 2 on tablets */
@container how (min-width: 700px) {
  .k-pick > .try {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
  }
  .k-pick > .try .bar-k {
    grid-column: 1 / -2;
    margin: 0;
  }
  .k-pick > .try .pb {
    padding: 0 14px;
    white-space: nowrap;
  }
  .k-pick > .try .pb--all {
    grid-row: 1;
    grid-column: -2 / -1;
    justify-self: end;
    min-height: 44px;
    padding: 0 18px;
    font-size: 1rem;
  }
}
@container how (min-width: 700px) and (max-width: 999px) {
  .k-pick > .try {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* phones: a card behind the buttons too, so the chart's lines stop at it instead of running through */
@container how (width < 700px) {
  .k-pick > .try {
    padding: 14px 10px;
    gap: 8px;
    background: var(--surface);
    border: 3px solid var(--edge);
    border-radius: 18px;
    box-shadow: 4px 4px 0 var(--edge);
  }
  [data-mode="night"] .k-pick > .try {
    border-color: var(--purple);
    box-shadow: 0 0 24px -8px color-mix(in srgb, var(--purple) 60%, transparent);
  }
  .k-pick > .try .bar-k {
    text-align: center;
  }
  .k-pick > .try .pb {
    padding: 0 8px;
    gap: 7px;
    font-size: 1rem;
  }
  .k-pick > .try .pb > i {
    width: 14px;
    height: 14px;
  }
}
/* desktop: the path picker is a big, hard-to-miss card */
@container how (min-width: 700px) {
  .try {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 14px;
    margin: 0 0 28px;
    padding: 22px 22px 24px;
    background: var(--surface);
    border: 3px solid var(--edge);
    border-radius: 22px;
    box-shadow: 6px 6px 0 var(--edge);
  }
  [data-mode="night"] .try {
    border-color: var(--purple);
    box-shadow: 0 0 34px -8px color-mix(in srgb, var(--purple) 60%, transparent);
  }
  .try .bar-k {
    grid-column: 1 / -1;
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 1.3225rem;
    letter-spacing: 0.02em;
    text-transform: none;
    font-weight: 700;
  }
  .try .bar-k::after {
    content: " ↓";
    color: var(--red);
  }
  .try .pb {
    min-height: 76px;
    padding: 0 20px;
    justify-content: center;
    gap: 12px;
    border-width: 3px;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    background: color-mix(in srgb, var(--c) 16%, var(--surface));
  }
  [data-mode="night"] .try .pb {
    border-color: var(--c);
  }
  .try .pb > i {
    width: 20px;
    height: 20px;
    border-width: 3px;
  }
  .try .pb:hover,
  .try .pb:focus-visible {
    transform: translateY(-5px) rotate(-2deg);
    box-shadow: 0 5px 0 var(--edge);
    background: var(--c);
    color: var(--on-c);
  }
  [data-mode="night"] .try .pb:hover,
  [data-mode="night"] .try .pb:focus-visible {
    box-shadow: 0 5px 0 var(--c);
  }
  .try .pb[aria-pressed="true"] {
    background: var(--c);
    color: var(--on-c);
    box-shadow: 0 5px 0 var(--edge);
  }
  .try .pb--all {
    --c: var(--ink);
    --on-c: var(--bg);
    padding: 0 24px;
    background: transparent;
  }
  [data-mode="night"] .try .pb--all {
    border-color: var(--hair);
  }
  /* before the first pick, the four path buttons give a little hop in turn, every few seconds */
  .try.is-waiting .pb:not(.pb--all) {
    animation: tryHop 4.2s ease-in-out infinite;
  }
  .try.is-waiting .pb:nth-of-type(2) {
    animation-delay: 0.12s;
  }
  .try.is-waiting .pb:nth-of-type(3) {
    animation-delay: 0.24s;
  }
  .try.is-waiting .pb:nth-of-type(4) {
    animation-delay: 0.36s;
  }
  .try.is-waiting .pb:hover {
    animation: none;
  }
}
/* night: the path buttons don't move; their borders light up like neon in the path's color */
[data-mode="night"] .try .pb {
  transform: none !important;
  translate: none !important;
  animation: none !important;
  background: color-mix(in srgb, var(--c) 7%, var(--surface));
  color: var(--ink);
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    color 0.25s ease,
    background-color 0.25s ease;
}
[data-mode="night"] .try .pb > i {
  background: var(--c);
  border-color: var(--c);
  box-shadow: 0 0 8px var(--c);
}
[data-mode="night"] .try .pb:hover,
[data-mode="night"] .try .pb:focus-visible {
  background: color-mix(in srgb, var(--c) 10%, var(--surface));
  color: var(--ink);
  border-color: var(--c);
  box-shadow:
    0 0 6px var(--c),
    0 0 18px color-mix(in srgb, var(--c) 70%, transparent),
    inset 0 0 10px color-mix(in srgb, var(--c) 45%, transparent);
}
[data-mode="night"] .try .pb[aria-pressed="true"] {
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
  color: color-mix(in srgb, var(--c) 35%, #ffffff);
  border-color: color-mix(in srgb, var(--c) 40%, #ffffff);
  box-shadow:
    0 0 4px var(--c),
    0 0 14px var(--c),
    0 0 34px color-mix(in srgb, var(--c) 70%, transparent),
    inset 0 0 14px color-mix(in srgb, var(--c) 60%, transparent);
  text-shadow: 0 0 10px color-mix(in srgb, var(--c) 80%, transparent);
}
[data-mode="night"] .try .pb:active {
  transform: none !important;
}
[data-mode="night"] .try .pb--all {
  --c: #f0ebff;
}
/* night, before the first pick: the four borders flicker on in turn instead of hopping */
[data-mode="night"] .try.is-waiting .pb:not(.pb--all) {
  animation: tryGlow 4.2s ease-in-out infinite !important;
}
[data-mode="night"] .try.is-waiting .pb:nth-of-type(2) {
  animation-delay: 0.25s !important;
}
[data-mode="night"] .try.is-waiting .pb:nth-of-type(3) {
  animation-delay: 0.5s !important;
}
[data-mode="night"] .try.is-waiting .pb:nth-of-type(4) {
  animation-delay: 0.75s !important;
}
[data-mode="night"] .try.is-waiting .pb:hover {
  animation: none !important;
}
/* its !important shorthand outranks the general off-screen pause at the top of this file, so it gets its own */
:host(.is-offscreen) [data-mode="night"] .try.is-waiting .pb {
  animation-play-state: paused !important;
}
@keyframes tryGlow {
  0%,
  66%,
  100% {
    border-color: color-mix(in srgb, var(--c) 45%, transparent);
    box-shadow: none;
  }
  74%,
  82% {
    border-color: var(--c);
    box-shadow:
      0 0 6px var(--c),
      0 0 18px color-mix(in srgb, var(--c) 70%, transparent),
      inset 0 0 10px color-mix(in srgb, var(--c) 45%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-mode="night"] .try.is-waiting .pb:not(.pb--all) {
    animation: none !important;
  }
}
@keyframes tryHop {
  0%,
  72%,
  100% {
    translate: 0 0;
  }
  78% {
    translate: 0 -7px;
  }
  84% {
    translate: 0 0;
  }
  88% {
    translate: 0 -3px;
  }
  92% {
    translate: 0 0;
  }
}
