:root {
  color-scheme: light;
  --ink: #203442;
  --navy: #162737;
  --muted: #72797a;
  --paper: #f4f0e6;
  --gold: #d5ad65;
  --gold-light: #f9dda1;
  --line: #ded7c9;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
  background: var(--paper);
}
body {
  margin: 0;
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  background:
    radial-gradient(ellipse at 10% 20%, #fffdf8 0, transparent 55%),
    var(--paper);
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #ca802b;
  outline-offset: 4px;
}
button {
  color: inherit;
}
a {
  color: inherit;
}
[hidden] {
  display: none !important;
}
.site-header {
  min-height: 78px;
  background: var(--navy);
  color: #fbefce;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(24px, calc((100% - 1210px) / 2));
  border-bottom: 1px solid #b18b52;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 22px/1.2 var(--serif);
  white-space: nowrap;
}
.brand small {
  display: block;
  margin-top: 5px;
  font: 9px var(--sans);
  letter-spacing: 0.26em;
  color: #c8bba0;
}
.brand-seal {
  font-size: 32px;
  border: 1px solid #9f865b;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #edcf89;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 7px;
}
.site-header nav a,
.site-header nav button {
  background: none;
  border: 1px solid transparent;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #e3ddcd;
  text-decoration: none;
  font-size: 12px;
}
.site-header nav button:hover,
.site-header nav a:hover {
  background: #ffffff10;
  border-color: #d7c39955;
}
.site-header #newGameButton {
  border-color: #b6a07666;
}
.game-shell {
  max-width: 1260px;
  padding: 34px 24px 26px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 25px;
}
.eyebrow {
  font: 650 10px/1.4 var(--sans);
  letter-spacing: 0.17em;
  color: #91723e;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.page-heading h1 {
  font: 400 clamp(26px, 3.2vw, 43px)/1.2 var(--serif);
  letter-spacing: -0.025em;
  margin: 0;
}
.page-heading h1 em {
  font-weight: 400;
  color: #997a43;
}
.page-heading > div > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.edition-mark {
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.18em;
  line-height: 1.8;
  color: #8f8e82;
  padding-right: 10px;
}
.edition-mark span {
  display: block;
  font-size: 25px;
  color: #a38755;
  line-height: 1.6;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: start;
}
.board-column {
  min-width: 0;
}
.board-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 11px;
  font-size: 11px;
  color: #657274;
}
.board-topline b {
  font-weight: 600;
}
.board-topline button {
  border: 0;
  background: none;
  padding: 6px 0 6px 10px;
  min-height: 32px;
  font-size: 11px;
  color: #627377;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #6a9989;
  border-radius: 50%;
  margin-right: 5px;
}
.board-cabinet {
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(
    130deg,
    #8e733f 0%,
    #e6ca8b 18%,
    #7f6535 38%,
    #c6a975 62%,
    #695130 90%
  );
  box-shadow:
    0 14px 35px #12273320,
    0 2px 3px #12273340,
    inset 0 0 0 2px #433c28;
  position: relative;
}
.board-cabinet::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid #f2d89b80;
  border-radius: 10px;
  pointer-events: none;
}
.heaven-frieze {
  height: 57px;
  background: #234453;
  position: relative;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  border-bottom: 1px solid #cba668;
}
.heaven-frieze svg {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
}
.heaven-frieze > span {
  position: absolute;
  left: 50%;
  top: 32px;
  transform: translateX(-50%);
  font: 500 9px var(--sans);
  letter-spacing: 0.26em;
  color: #fff3ce;
  white-space: nowrap;
  background: #1b344a99;
  border-radius: 10px;
  padding: 2px 8px;
}
.hell-frieze {
  height: 29px;
  border-top: 1px solid #b17b47;
  background:
    radial-gradient(ellipse at 20% 140%, #e8a945 0, transparent 35%),
    radial-gradient(ellipse at 75% 200%, #bd5c2f 0, transparent 45%),
    linear-gradient(0deg, #a64e32, #522934);
  border-radius: 0 0 6px 6px;
  text-align: center;
  color: #f7d7ac;
  font-size: 8px;
  letter-spacing: 0.25em;
  display: grid;
  place-items: center;
}
.board-frame {
  aspect-ratio: 1;
  position: relative;
  isolation: isolate;
  background: #152e45;
  container-type: inline-size;
}
.board-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
}
.board-cell {
  position: relative;
  border: 0;
  border-right: 1px solid #1c29377d;
  border-bottom: 1px solid #1c293780;
  padding: 0;
  background:
    linear-gradient(135deg, #fff5cd12, transparent 50%, #051c301c), var(--glass);
  box-shadow: inset 0 0 0 1px #f7dab017;
  min-width: 0;
  min-height: 0;
  color: #f9efcb;
}
.board-cell::before {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid #fee5a114;
  border-radius: 45% 45% 5px 5px;
  pointer-events: none;
}
.board-cell::after {
  content: "✧";
  font: 18px var(--serif);
  color: #fae8b41c;
  position: absolute;
  right: 9%;
  bottom: 5%;
  pointer-events: none;
}
.board-cell:nth-child(even) {
  background-image: linear-gradient(
    135deg,
    #fff5cd24,
    transparent 70%,
    #07182519
  );
}
.board-cell:focus-visible {
  outline: 3px solid #ffe7a0;
  outline-offset: -4px;
  z-index: 6;
}
.board-cell.is-occupied {
  box-shadow: inset 0 0 0 2px #ffedb787;
}
.board-cell.is-landing {
  animation: cellGlow 1s ease-out;
}
.cell-number {
  position: absolute;
  left: 4%;
  top: 4%;
  z-index: 4;
  font: 650 clamp(8px, 1.65cqw, 14px)/1 var(--sans);
  font-variant-numeric: tabular-nums;
  background: #122331c4;
  padding: 3px 4px;
  border-radius: 4px;
  color: #fff2d8;
  box-shadow: 0 1px 1px #0002;
}
.cell-route {
  position: absolute;
  right: 4%;
  bottom: 4%;
  font: 600 clamp(7px, 1.3cqw, 10px)/1 var(--sans);
  z-index: 4;
  color: #fbeaab;
  background: #102432a6;
  padding: 3px;
  border-radius: 3px;
}
.snake-cell .cell-route {
  color: #ffc3ac;
}
.board-cell.finish {
  background: radial-gradient(circle at 50% 60%, #f4d989, #b99757 55%, #53757c);
  box-shadow: inset 0 0 0 3px #fce7a1;
}
.finish::after {
  content: "♜";
  inset: auto 0 4%;
  text-align: center;
  font-size: 36px;
  color: #fff1bc;
  line-height: 1;
}
.finish .cell-number {
  background: #785e2c;
  color: #fff5cc;
}
.board-paths {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
.route {
  opacity: 0.9;
  transition: opacity 0.2s;
}
.route.is-active {
  opacity: 1;
  filter: drop-shadow(0 0 8px #ffeaad);
}
.board-paths.has-active .route:not(.is-active) {
  opacity: 0.25;
}
.ladder-rail-outline,
.ladder-rung-outline {
  stroke: #594833;
  stroke-linecap: round;
}
.ladder-rail-outline {
  stroke-width: 13;
}
.ladder-rung-outline {
  stroke-width: 10;
}
.ladder-rail {
  stroke: url(#ladderGold);
  stroke-width: 8;
  stroke-linecap: round;
}
.ladder-rung {
  stroke: #edc889;
  stroke-width: 5;
  stroke-linecap: round;
}
.ladder-pin {
  fill: #fff1bf;
  stroke: #715039;
  stroke-width: 1.5;
}
.snake-outline {
  stroke: #1f2935;
  stroke-width: 29;
  fill: none;
  stroke-linecap: round;
}
.snake-body {
  stroke: var(--snake);
  stroke-width: 23;
  fill: none;
  stroke-linecap: round;
}
.snake-stripe {
  stroke: #fff1af70;
  stroke-width: 5;
  fill: none;
  stroke-dasharray: 4 17;
  stroke-linecap: round;
}
.snake-head-shape {
  fill: var(--snake);
  stroke: #23303c;
  stroke-width: 2.5;
}
.snake-mouth {
  fill: #432039;
  stroke: #263039;
  stroke-width: 2;
}
.snake-jaw {
  transform-box: fill-box;
  transform-origin: 90% 50%;
  transition: transform 0.45s ease;
}
.snake.is-eating .snake-jaw {
  transform: rotate(-34deg) translateY(-9px);
}
.snake.is-eating .snake-mouth {
  animation: mouthOpen 1.05s ease both;
}
.snake-tongue {
  stroke: #efa1a0;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
}
.snake-bulge {
  fill: var(--snake);
  stroke: #fff0b7;
  stroke-width: 3;
  opacity: 0;
}
.snake.is-eating .snake-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: eyeBlink 0.6s ease-in-out;
}
.token-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.board-token {
  position: absolute;
  width: 7.1%;
  height: 9%;
  min-width: 25px;
  min-height: 32px;
  transform: translate(-50%, -72%);
  will-change: left, top;
  filter: drop-shadow(0 2px 2px #092035a0);
  z-index: 1;
}
.board-token.is-current {
  z-index: 3;
}
.board-token.is-current::before {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 3%;
  height: 22%;
  background: var(--player);
  opacity: 0.8;
  filter: blur(5px);
  border-radius: 50%;
}
.board-token.is-moving {
  z-index: 8;
}
.monk-pose {
  width: 100%;
  height: 100%;
  transform-origin: 50% 90%;
}
.monk-figure {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}
.monk-arm,
.monk-leg {
  transform-box: fill-box;
  transform-origin: 50% 0;
}
.is-climbing .arm-left {
  animation: climbArm 0.62s ease-in-out infinite;
}
.is-climbing .arm-right {
  animation: climbArm 0.62s ease-in-out infinite reverse;
}
.is-climbing .leg-left {
  animation: climbLeg 0.62s ease-in-out infinite;
}
.is-climbing .leg-right {
  animation: climbLeg 0.62s ease-in-out infinite reverse;
}
.is-hopping .arm-left {
  transform: rotate(15deg);
}
.is-hopping .arm-right {
  transform: rotate(-15deg);
}
.departure {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
}
.departure-label {
  font-size: 11px;
  color: #78807b;
}
.departure-tokens {
  display: flex;
  align-items: center;
  min-width: 45px;
}
.departure-token {
  width: 38px;
  height: 46px;
  margin-right: -3px;
}
.board-legend {
  margin-left: auto;
  font-size: 10px;
  color: #6a786f;
  display: flex;
  align-items: center;
  gap: 7px;
}
.legend-ladder {
  display: inline-block;
  width: 12px;
  height: 16px;
  border-left: 2px solid #b48649;
  border-right: 2px solid #b48649;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 4px,
    #b48649 4px 6px
  );
}
.legend-snake {
  width: 15px;
  height: 9px;
  border: 3px solid #c77564;
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  margin-left: 9px;
}
.board-tip {
  font-size: 10px;
  color: #7c827d;
  margin: 12px 0 0;
  text-align: center;
}
.sidebar {
  display: grid;
  gap: 23px;
  margin-top: 44px;
}
.turn-card {
  padding: 22px;
  background: var(--navy);
  color: #f3ebd6;
  border: 1px solid #284252;
  border-radius: 13px;
  box-shadow: 0 10px 22px #18314113;
}
.turn-card > .eyebrow {
  color: #cdb582;
}
.turn-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.portrait {
  width: 51px;
  height: 60px;
  flex: 0 0 51px;
}
.turn-player > div {
  min-width: 0;
}
.turn-player h2 {
  margin: 0;
  font: 400 25px/1.25 var(--serif);
  overflow-wrap: anywhere;
}
.turn-player p {
  margin: 4px 0 0;
  color: #9eafaf;
  font-size: 11px;
}
.turn-star {
  margin-left: auto;
  color: #e7c680;
  font-size: 18px;
}
.last-dice {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 19px 0;
  margin: 8px 0 0;
  border-top: 1px solid #ffffff12;
  color: #8c9ea6;
}
.last-dice > strong {
  font: 500 16px var(--serif);
  color: #f2deb0;
  margin-left: auto;
}
.mini-die {
  width: 34px;
  height: 34px;
  background: #f7eddb;
  color: #283b4a;
  border-radius: 7px;
  box-shadow:
    inset 0 0 0 1px #fff,
    0 3px 0 #c8b799;
  position: relative;
}
.pip {
  position: absolute;
  width: 16%;
  height: 16%;
  background: currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 1px 1px #0004;
}
.primary-button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #ead092;
  border-radius: 7px;
  background: linear-gradient(135deg, #f6e0a5, #dcbc79);
  color: #263541;
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 3px 0 #957948;
  transition:
    filter 0.15s,
    transform 0.15s;
}
.primary-button:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translateY(-1px);
}
.primary-button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #957948;
}
.primary-button:disabled {
  opacity: 0.65;
}
.roll-button > span {
  font-size: 21px;
  line-height: 1;
}
.turn-instruction {
  font-size: 11px;
  line-height: 1.5;
  min-height: 34px;
  margin: 13px 0 0;
  color: #d4d8cd;
  text-align: center;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}
.section-heading h2 {
  font: 400 21px var(--serif);
  margin: 0;
}
.section-heading > span {
  font-size: 9px;
  color: #7c817b;
  letter-spacing: 0.12em;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 71px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  border-radius: 6px;
}
.player-row.is-current {
  background: #fff9e9;
  border: 1px solid #d6c497;
}
.player-row .portrait {
  width: 35px;
  height: 45px;
  flex-basis: 35px;
}
.player-row > div {
  flex: 1;
  min-width: 0;
}
.player-row b {
  font-size: 12px;
  display: block;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.player-row small {
  display: block;
  color: #858880;
  font-size: 9px;
  margin-top: 4px;
}
.player-position {
  font: 500 23px var(--serif);
  color: #566a6d;
}
.player-track {
  height: 3px;
  background: #e2dcd0;
  border-radius: 3px;
  margin-top: 7px;
  overflow: hidden;
}
.player-track i {
  display: block;
  height: 100%;
  background: #9cae9e;
  transition: width 0.3s;
}
.story-panel {
  padding: 18px 19px 17px;
  border: 1px solid #ddd5c3;
  border-radius: 9px;
  background: #ede7d9;
  position: relative;
  overflow: hidden;
}
.story-panel .eyebrow {
  font-size: 8px;
  margin: 0 0 7px;
}
.story-panel h2 {
  font: 400 20px/1.2 var(--serif);
  margin: 0 0 8px;
  padding-right: 12px;
}
.story-panel > p:last-child {
  margin: 0;
  color: #707c75;
  font-size: 11px;
}
.story-icon {
  position: absolute;
  right: 12px;
  top: 6px;
  font-size: 40px;
  color: #c6b28650;
}
.story-panel[data-kind="snake"] {
  background: #f0e0d6;
  border-color: #d3b7a7;
}
.story-panel[data-kind="ladder"] {
  background: #e4ebe0;
  border-color: #bdccba;
}
.history-panel {
  border-top: 1px solid var(--line);
  font-size: 11px;
  padding-top: 13px;
  color: #69766f;
}
.history-panel summary {
  cursor: pointer;
  font-size: 11px;
  min-height: 32px;
}
.history-panel ol {
  padding: 0 0 0 18px;
  margin: 8px 0 0;
  max-height: 200px;
  overflow: auto;
}
.history-panel li {
  padding: 0 0 8px 3px;
}
.save-note {
  font-size: 9px;
  color: #92968c;
  margin: -9px 0 0;
}
.game-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 11px;
  font-size: 10px;
  color: #8c9187;
  padding: 28px 0 0;
}
.game-footer > span {
  font-size: 18px;
  color: #b69a64;
}
.game-footer a {
  margin-left: 12px;
  text-decoration: none;
}
.game-dialog {
  width: min(480px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  color: var(--ink);
  border: 1px solid #d7bf8d;
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 24px 120px #0007;
}
.game-dialog::backdrop {
  background: #102131bb;
  backdrop-filter: blur(6px);
}
.game-dialog form {
  padding: 32px;
  position: relative;
}
.game-dialog h2 {
  font: 400 30px/1.2 var(--serif);
  margin: 5px 0 12px;
}
.game-dialog p {
  font-size: 12px;
  color: #748178;
}
.game-dialog .eyebrow {
  font-size: 9px;
  color: #927844;
}
.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  background: none;
  color: #66777b;
  font-size: 24px;
  border-radius: 50%;
}
.dialog-close:hover {
  background: #d9d1c2;
}
.dialog-ornament {
  display: block;
  color: #af8d4d;
  font-size: 32px;
  margin-bottom: 10px;
}
.mode-picker {
  border: 0;
  padding: 0;
  margin: 22px 0 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.mode-picker legend {
  font-size: 10px;
  font-weight: 600;
  padding: 0 0 9px;
}
.mode-picker label {
  position: relative;
  cursor: pointer;
}
.mode-picker input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.mode-picker label > span {
  display: block;
  text-align: center;
  border: 1px solid #d5cfc1;
  border-radius: 7px;
  padding: 10px 4px;
  font: 500 24px var(--serif);
  background: #fbf8f1;
}
.mode-picker small {
  display: block;
  font: 9px var(--sans);
  margin-top: 3px;
}
.mode-picker input:checked + span {
  background: var(--navy);
  color: #f3dba2;
  border-color: var(--navy);
}
.mode-picker input:focus-visible + span {
  outline: 3px solid #c6944d;
  outline-offset: 3px;
}
.name-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.name-fields label {
  font-size: 10px;
  color: #64716a;
}
.name-fields input {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 1px solid #d4cebd;
  border-radius: 6px;
  background: #fffaf1;
  color: #263946;
  padding: 10px;
  min-height: 44px;
  font-size: 13px;
}
.name-fields > label:only-child {
  grid-column: 1/-1;
}
.rules-list {
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
  display: grid;
  gap: 13px;
}
.rules-note {
  font-size: 10px !important;
  padding: 12px;
  background: #eae6dc;
  border-radius: 6px;
}
.winner-dialog {
  padding: 32px;
  text-align: center;
}
.winner-portrait {
  width: 95px;
  height: 110px;
  margin: 15px auto 25px;
}
.winner-dialog > a {
  display: block;
  padding: 17px 0 0;
  font-size: 12px;
  color: #5d716e;
}
.no-script {
  padding: 20px;
  background: #ffedb9;
  text-align: center;
}
.dice-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  visibility: hidden;
}
.dice-layer.is-visible {
  visibility: visible;
}
.rolling-die {
  position: absolute;
  width: 9%;
  height: 9%;
  border-radius: 20%;
  background: linear-gradient(135deg, #fffaf0, #ead8b6);
  color: #293f50;
  box-shadow:
    inset 1px 2px 1px #fff,
    inset -3px -3px 3px #b1976b55,
    4px 5px 0 #b5a084,
    7px 10px 9px #0a1f3675;
  transform: translate(-50%, -50%);
  will-change: transform, left, top;
}
.die-two {
  background: linear-gradient(130deg, #fffef7, #efe9d7);
  color: #815a33;
}
.dice-total {
  position: absolute;
  left: 50%;
  top: 69%;
  transform: translate(-50%, -50%);
  padding: 7px 20px;
  border-radius: 50px;
  background: #142e42ed;
  border: 1px solid #f5d493a6;
  box-shadow: 0 5px 20px #0003;
  color: #fff0c6;
  font: 500 clamp(12px, 3cqw, 24px) var(--serif);
  white-space: nowrap;
}
.dice-total:empty {
  display: none;
}
.board-message {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 13;
  background: #142e42ed;
  color: #fff1c9;
  border: 1px solid #f3d69c;
  padding: 10px 18px;
  border-radius: 8px;
  font: 500 18px var(--serif);
  pointer-events: none;
  white-space: nowrap;
}
.celebration {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 65%, #efce9160, transparent 60%), #132a42d9;
  animation: celestialEntry 1.3s ease both;
}
.celebration canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.heaven-halo {
  position: absolute;
  width: 80vmax;
  height: 80vmax;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0.38;
  background: repeating-conic-gradient(
    from 0deg,
    #ffe8ab45 0deg 5deg,
    transparent 6deg 20deg
  );
  animation: haloTurn 36s linear infinite;
  mask-image: radial-gradient(circle, #000, transparent 65%);
}
.celebration-copy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 24px;
  color: #fff3cc;
  text-shadow: 0 3px 20px #08213d;
  z-index: 3;
}
.celebration-copy > span {
  font-size: 40px;
  letter-spacing: 0.3em;
}
.celebration-copy h2 {
  font: 400 clamp(30px, 6vw, 70px)/1.15 var(--serif);
  margin: 8px 0 18px;
  max-width: 800px;
}
.celebration-copy p {
  font: 400 18px var(--serif);
  margin: 10px 0;
}
.celebration-copy p:last-child {
  font-size: 25px;
  color: #fde0a3;
  overflow-wrap: anywhere;
  max-width: 90vw;
}
@keyframes cellGlow {
  40% {
    box-shadow: inset 0 0 0 4px #fff2b4;
    background-color: #ffe3a970;
  }
}
@keyframes climbArm {
  0%,
  100% {
    transform: rotate(-30deg) translateY(-3px);
  }
  50% {
    transform: rotate(30deg) translateY(5px);
  }
}
@keyframes climbLeg {
  0%,
  100% {
    transform: rotate(22deg) translateY(-3px);
  }
  50% {
    transform: rotate(-20deg) translateY(2px);
  }
}
@keyframes mouthOpen {
  0%,
  100% {
    transform: scaleY(1);
  }
  40%,
  75% {
    transform: scaleY(1.45);
  }
}
@keyframes eyeBlink {
  50% {
    transform: scaleY(0.3);
  }
}
@keyframes celestialEntry {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes haloTurn {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@media (min-width: 1400px) {
  .game-shell {
    max-width: 1320px;
  }
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 36px;
  }
}
@media (max-width: 960px) {
  .game-shell {
    padding: 25px 16px;
  }
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 20px;
  }
  .turn-card {
    padding: 16px;
  }
  .sidebar {
    gap: 18px;
  }
  .page-heading h1 {
    font-size: 34px;
  }
  .turn-player h2 {
    font-size: 22px;
  }
  .site-header {
    padding: 12px 20px;
  }
  .site-header nav {
    gap: 0;
  }
  .site-header nav button,
  .site-header nav a {
    padding: 7px 9px;
  }
  .primary-button {
    gap: 8px;
    padding: 10px;
    font-size: 11px;
  }
  .story-panel {
    padding: 15px;
  }
  .brand {
    font-size: 19px;
  }
}
@media (max-width: 760px) {
  .site-header {
    min-height: 63px;
    gap: 10px;
    padding: 9px 13px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 19px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 0.23em;
  }
  .brand-seal {
    width: 36px;
    height: 36px;
    font-size: 26px;
  }
  .site-header nav {
    margin-left: auto;
    gap: 0;
  }
  .site-header nav a {
    display: none;
  }
  .site-header nav button {
    min-height: 40px;
    font-size: 10px;
    padding: 6px 8px;
  }
  .site-header #newGameButton {
    border: 0;
  }
  .game-shell {
    padding: 21px 12px calc(168px + env(safe-area-inset-bottom));
  }
  .page-heading {
    margin-bottom: 15px;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .page-heading .eyebrow {
    font-size: 8px;
    letter-spacing: 0.13em;
  }
  .page-heading > div > p:last-child {
    font-size: 11px;
    margin-top: 6px;
  }
  .edition-mark {
    display: none;
  }
  .game-layout {
    display: block;
  }
  .board-topline {
    margin-bottom: 7px;
    font-size: 10px;
  }
  .board-cabinet {
    padding: 7px;
    border-radius: 10px;
  }
  .heaven-frieze {
    height: 38px;
  }
  .heaven-frieze > span {
    top: 19px;
    font-size: 6px;
  }
  .hell-frieze {
    height: 21px;
    font-size: 6px;
  }
  .departure {
    min-height: 60px;
  }
  .departure-token {
    width: 32px;
    height: 39px;
  }
  .board-legend {
    font-size: 9px;
    gap: 5px;
  }
  .board-tip {
    font-size: 9px;
    margin: 9px 0;
  }
  .sidebar {
    margin-top: 23px;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .turn-card {
    position: fixed;
    z-index: 40;
    left: 9px;
    right: 9px;
    bottom: max(8px, env(safe-area-inset-bottom));
    border-radius: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(155px, 1.1fr);
    gap: 4px 10px;
    padding: 10px 13px;
    box-shadow: 0 4px 30px #081a3250;
    max-width: 720px;
    margin: auto;
  }
  .turn-card > .eyebrow,
  .turn-star {
    display: none;
  }
  .turn-player {
    gap: 6px;
    min-width: 0;
  }
  .turn-player .portrait {
    width: 36px;
    height: 45px;
    flex-basis: 36px;
  }
  .turn-player h2 {
    font-size: 19px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 44vw;
  }
  .turn-player p {
    font-size: 9px;
    margin-top: 1px;
  }
  .last-dice {
    grid-column: 1;
    grid-row: 2;
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 10px;
  }
  .mini-die {
    width: 22px;
    height: 22px;
    border-radius: 4px;
  }
  .last-dice > strong {
    font-size: 11px;
    margin-left: 2px;
  }
  .roll-button {
    grid-column: 2;
    grid-row: 1/3;
    min-height: 55px;
    font-size: 12px;
    line-height: 1.3;
  }
  .roll-button > span {
    display: none;
  }
  .turn-instruction {
    grid-column: 1/-1;
    min-height: 17px;
    margin: 5px 0 0;
    font-size: 10px;
    line-height: 1.4;
  }
  .players-panel {
    grid-column: 1/-1;
  }
  .players-panel > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .player-row {
    min-height: 61px;
    padding: 7px;
  }
  .player-row .portrait {
    width: 31px;
    height: 41px;
    flex-basis: 31px;
  }
  .player-row b {
    font-size: 11px;
  }
  .player-position {
    font-size: 22px;
  }
  .section-heading h2 {
    font-size: 20px;
  }
  .story-panel {
    grid-column: 1/-1;
  }
  .history-panel {
    grid-column: 1/-1;
  }
  .save-note {
    grid-column: 1/-1;
    margin: 0;
  }
  .board-message {
    font-size: 13px;
    padding: 8px 12px;
  }
  .board-token {
    width: 7.8%;
    height: 9.5%;
    min-width: 25px;
    min-height: 32px;
  }
  .cell-number {
    font-size: clamp(8px, 2.6vw, 12px);
    padding: 2px 3px;
    border-radius: 3px;
  }
  .cell-route {
    font-size: clamp(6px, 1.8vw, 9px);
    padding: 2px;
  }
  .finish::after {
    font-size: 22px;
  }
  .board-cell::after {
    font-size: 12px;
  }
  .game-footer {
    font-size: 9px;
    padding-top: 20px;
  }
  .game-footer a {
    margin: 0;
  }
  .game-dialog form {
    padding: 27px 22px;
  }
  .game-dialog h2 {
    font-size: 27px;
  }
  .game-dialog .eyebrow {
    font-size: 8px;
  }
  .board-frame {
    scroll-margin-top: 10px;
  }
  .rolling-die {
    width: 11%;
    height: 11%;
  }
}
@media (max-width: 380px) {
  .site-header {
    justify-content: center;
  }
  .site-header nav {
    margin: 0;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .game-shell {
    padding-left: 8px;
    padding-right: 8px;
  }
  .board-cabinet {
    padding: 5px;
  }
  .cell-number {
    font-size: 8px;
  }
  .turn-card {
    padding: 8px 10px;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 1.1fr);
  }
  .turn-player h2 {
    font-size: 17px;
  }
  .board-legend {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .heaven-halo {
    animation: none !important;
  }
  .is-climbing .monk-arm,
  .is-climbing .monk-leg {
    animation: none !important;
  }
}
body.focus-mode .site-header,
body.focus-mode .page-heading,
body.focus-mode .game-footer,
body.focus-mode .sidebar > :not(.turn-card) {
  display: none;
}
body.focus-mode .game-shell {
  max-width: 1100px;
  padding-top: 8px;
  padding-bottom: 150px;
}
body.focus-mode .game-layout {
  display: block;
}
body.focus-mode .board-column {
  max-width: 850px;
  margin: auto;
}
body.focus-mode .sidebar {
  margin: 0;
}
body.focus-mode .turn-card {
  position: fixed;
  z-index: 40;
  left: 10px;
  right: 10px;
  bottom: 10px;
  max-width: 600px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5px 16px;
  padding: 12px 18px;
}
body.focus-mode .turn-card > .eyebrow,
body.focus-mode .turn-star,
body.focus-mode .last-dice {
  display: none;
}
body.focus-mode .turn-card .turn-player {
  grid-column: 1;
  grid-row: 1;
}
body.focus-mode .turn-card .roll-button {
  grid-column: 2;
  grid-row: 1;
}
body.focus-mode .turn-card .turn-instruction {
  grid-column: 1/-1;
  min-height: 15px;
  margin-top: 0;
}
body.focus-mode .board-topline {
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 20;
  padding: 7px;
}
body.focus-mode .board-frame {
  scroll-margin-top: 42px;
}
/* Keep both ends of the journey visible on ordinary laptop displays. */
@media (min-width: 761px) {
  .game-shell {
    max-width: 1160px;
    padding-top: 22px;
  }
  .page-heading {
    margin-bottom: 14px;
  }
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 26px;
  }
  .board-column {
    width: min(100%, max(420px, calc(100dvh - 360px)));
    justify-self: center;
  }
  .sidebar {
    position: sticky;
    top: 16px;
  }
  body.focus-mode .board-column {
    width: 100%;
  }
}

/* The illustrations are scenery only; every square and route remains interactive. */
.board-cabinet {
  padding: 0;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #3b372b;
  --field-left: 12%;
  --field-top: 15%;
  --field-size: 76%;
}
.board-cabinet::after {
  content: none;
}
.board-artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}
.board-frame {
  position: absolute;
  left: var(--field-left);
  top: var(--field-top);
  width: var(--field-size);
  background: linear-gradient(180deg, #fff7d910, #111e3020);
  outline: 2px solid #edce8fba;
  box-shadow: 0 0 0 3px #19252b75;
}
.board-cell,
.board-cell:nth-child(even) {
  background: transparent;
  border-right: 1px solid #ffedc996;
  border-bottom: 1px solid #ffedc996;
  box-shadow: inset 0 0 0 1px #13253625;
}
.board-cell:nth-child(even) {
  background: #fff5dd15;
}
.board-cell::before,
.board-cell::after {
  content: none;
}
.cell-number {
  background: #162b3aee;
  color: #fff8e6;
  box-shadow: 0 1px 2px #0b172b60;
}
.cell-route {
  background: #162b3aeb;
}
.board-cell.is-occupied {
  box-shadow: inset 0 0 0 2px #fff2a6;
}
.board-cell.finish {
  background: radial-gradient(circle, #ffeaae85, #ffc94215);
  box-shadow: inset 0 0 0 2px #ffe595;
}
.finish::after {
  content: "✦";
  color: #fff8be;
  text-shadow: 0 1px 3px #614a11;
  font-size: clamp(16px, 5cqw, 34px);
}
.board-token {
  width: 8%;
  height: 10%;
}
.route {
  opacity: 1;
  filter: drop-shadow(0 1px 1px #18273e66);
}
.board-style-caption {
  margin: 10px 0 0;
  color: #51656a;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.board-style-caption > span {
  font-weight: 650;
}
.board-style-caption small {
  font-size: 10px;
}
.roll-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.roll-choices .roll-button {
  grid-column: auto;
  grid-row: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 12px 7px;
  min-height: 76px;
  font-size: 12px;
  line-height: 1.3;
  margin: 0;
}
.roll-choices .roll-button > span {
  display: block;
  font-size: inherit;
  line-height: inherit;
}
.roll-choices .roll-button > .dice-icon {
  font-size: 22px;
  line-height: 1;
}
.setup-decor-note {
  color: #586970;
  font-size: 12px !important;
  line-height: 1.6;
}
[hidden] {
  display: none !important;
}
body.focus-mode .turn-card .roll-choices {
  grid-column: 2;
  grid-row: 1;
}
body.focus-mode .turn-card .roll-choices .roll-button {
  grid-column: auto;
  grid-row: auto;
}
@media (min-width: 761px) {
  .board-column {
    width: min(100%, max(440px, calc(100dvh - 290px)));
  }
  .sidebar {
    position: static;
  }
}
@media (max-width: 760px) {
  .roll-choices {
    grid-column: 2;
    grid-row: 1 / 3;
    gap: 6px;
    align-self: stretch;
  }
  .roll-choices .roll-button {
    min-height: 55px;
    font-size: 11px;
    padding: 8px 5px;
  }
  .roll-choices .dice-icon {
    display: none !important;
  }
  .turn-player h2 {
    max-width: 30vw;
  }
  .board-style-caption {
    font-size: 10px;
    margin-top: 7px;
  }
  .board-style-caption small {
    display: block;
    font-size: 9px;
  }
  .cell-number {
    font-size: clamp(8px, 2cqw, 12px);
    padding: 2px;
  }
  .cell-route {
    font-size: clamp(6px, 1.5cqw, 9px);
    padding: 1px 2px;
  }
}
