@font-face {
  font-family: GateBrush;
  src: url('./brush.woff?v=7fc55b19') format('woff');
  font-display: swap;
}
@font-face {
  font-family: GateSans;
  src: url('./text.woff?v=1a9271df') format('woff');
  font-weight: 400;
  font-display: swap;
}
:root {
  --ink: #223c35;
  --soft: #6a6654;
  --cinnabar: #9a3d2c;
  --cinnabar-deep: #7b2c1f;
  --gold: #f3d9a4;
  --line: #c9b795;
  --paper: #f7eedf;
  --brush: GateBrush, 'KaiTi', 'STKaiti', 'Kaiti SC', serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
}
body,
input,
select,
button {
  font-family: GateSans, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  font-weight: 400;
}
button,
input,
select {
  color: inherit;
}
/* Wooden pointers, the user's pick of 2026-12-02 (黄花梨, the hand with one finger up; drawn by tmp/cursor-wood): the arrow on the
   whole lobby, the hand wherever something can be clicked. 1.25 times the 32-pixel drawing since 2026-12-03 (the user found it
   small), a second picture for high-density screens; the numbers are the point that clicks (the arrow's tip, the fingertip). Chrome
   skips a picture that would stick out of the page past the right or bottom edge and tries the next one, so the drawing at its own
   size (-small) comes second (static/portal/ART.md). Text boxes keep the text bar; .primary keeps busy and not-allowed. label is
   named because browsers give it the plain system arrow of their own, which would show over the whole row of a field's name (the
   labels are full width). */
html,
label {
  cursor: url('./cursor-arrow.png?v=7e9fb10f') 4 3, url('./cursor-arrow-small.png?v=a93ea369') 3 2, default;
  cursor: -webkit-image-set(url('./cursor-arrow.png?v=7e9fb10f') 1x, url('./cursor-arrow-2x.png?v=9a22020e') 2x) 4 3,
    -webkit-image-set(url('./cursor-arrow-small.png?v=a93ea369') 1x, url('./cursor-arrow-small-2x.png?v=a15a118c') 2x) 3 2, default;
}
button,
.field select,
.consent label,
.consent input {
  cursor: url('./cursor-hand.png?v=152f7f89') 15 3, url('./cursor-hand-small.png?v=4cd9b31e') 12 2, pointer;
  cursor: -webkit-image-set(url('./cursor-hand.png?v=152f7f89') 1x, url('./cursor-hand-2x.png?v=f7b95a2e') 2x) 15 3,
    -webkit-image-set(url('./cursor-hand-small.png?v=4cd9b31e') 1x, url('./cursor-hand-small-2x.png?v=77243077') 2x) 12 2, pointer;
}
input:is([type='text'], [type='password']) {
  cursor: text;
}
:focus-visible {
  outline: 2px solid #356859;
  outline-offset: 3px;
}

/* The painting and what is written on it. */
.stage {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  /* Clipping without becoming a scroller, so the hall's way in can stay at the bottom of a phone's screen. */
  overflow: clip;
  /* The hall after the gate: how wide its sheet is, and how far it stands from the painting. */
  --pad-x: clamp(24px, 4.8vw, 92px);
  --gap: 4vw;
  --hall: clamp(560px, 60vw, 1040px);
  padding: clamp(18px, 3.8vh, 42px) var(--pad-x) clamp(18px, 3.8vh, 42px);
}
.stage.few {
  --hall: clamp(420px, 36vw, 540px);
}
.painting {
  position: absolute;
  inset: 0;
  z-index: -2;
  /* Wide screens lose the bottom of the painting before her hair; tall ones lose the empty right before the left. */
  background: #f3dcc2 url('./luoshui.webp?v=6ff13df4') 35% 24% / cover no-repeat;
  transition: transform 0.9s cubic-bezier(0.22, 0.7, 0.2, 1);
}
.painting::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #f4e8d0a8 0%,
    #f4e8d038 13%,
    transparent 26%,
    transparent 56%,
    #f8efdf30 70%,
    #f8efdf8c 100%
  );
}
.mast {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 35px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand img {
  width: 32px;
  height: 32px;
}
.brand > span {
  display: grid;
  line-height: 1.12;
  font-size: 17px;
  letter-spacing: 0.17em;
}
.brand small,
.caption small {
  font-family: GateSans, Arial, sans-serif;
}
.brand small {
  font-size: 8px;
  letter-spacing: 0.18em;
  margin-top: 3px;
}
.spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 384px);
  align-items: center;
  column-gap: 4vw;
  margin-right: clamp(0px, 2.2vw, 52px);
}
.cover {
  position: relative;
  align-self: stretch;
  min-height: 530px;
}
.legend {
  position: absolute;
  top: 12%;
  left: 1%;
  display: grid;
  justify-items: center;
  width: max-content;
  transition:
    opacity 0.4s ease,
    visibility 0.4s;
}
.chapter {
  color: #783729;
  font-size: 11px;
  letter-spacing: 0.17em;
}
h1 {
  margin: 13px 0 12px;
  font-family: var(--brush);
  font-size: clamp(76px, 7.9vw, 144px);
  font-weight: 400;
  line-height: 0.98;
  writing-mode: vertical-rl;
  letter-spacing: 0.025em;
  text-shadow: 0 0 12px #f5e9ca90;
}
.chop {
  display: inline-block;
  border: 1px solid var(--cinnabar);
  color: var(--cinnabar);
  padding: 2px 4px 3px;
  font: 17px/1.1 var(--brush);
  background: #f7e8cdd9;
  transform: rotate(-4deg);
}
.caption {
  position: absolute;
  bottom: 5%;
  left: 0.6%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 16px 8px 9px;
  background: #f9ecd8eb;
  color: #413f33;
}
.caption b {
  font: 400 25px/1 var(--brush);
  padding: 0 9px 0 2px;
  border-right: 1px solid #a79b83;
}
.caption span {
  letter-spacing: 0.18em;
  font-size: 13px;
}
.caption small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.16em;
  margin-top: 2px;
}

/* The card: paper with notched corners and a double rule that follows them. */
.dock {
  margin: 22px 0;
  filter: drop-shadow(0 18px 26px #4a35201f) drop-shadow(0 2px 3px #4a352026);
}
.panel {
  --notch: 9px;
  position: relative;
  padding: 26px 34px 28px;
  background:
    url('./paper.svg?v=fdf81e6f') 0 0 / 240px 240px,
    linear-gradient(180deg, #fcf6e9 0%, #f8eedb 100%);
  clip-path: polygon(
    var(--notch) 0,
    calc(100% - var(--notch)) 0,
    calc(100% - var(--notch)) var(--notch),
    100% var(--notch),
    100% calc(100% - var(--notch)),
    calc(100% - var(--notch)) calc(100% - var(--notch)),
    calc(100% - var(--notch)) 100%,
    var(--notch) 100%,
    var(--notch) calc(100% - var(--notch)),
    0 calc(100% - var(--notch)),
    0 var(--notch),
    var(--notch) var(--notch)
  );
}
.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 24px solid transparent;
  border-image: url('./frame.svg?v=9ca3d01e') 24 / 24px stretch;
  pointer-events: none;
}
.steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #9a8c73;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.steps b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font: 400 14px/1 var(--brush);
  letter-spacing: 0;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}
.steps .thread {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #cdbd9f, #cdbd9f 50%, transparent 50%) 0 0 / 6px 1px;
}
.steps .on {
  color: var(--cinnabar);
}
.steps .on b {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: #fff3dc;
}
.steps .done {
  color: #6f6a55;
}
.view {
  animation: turn 0.32s ease both;
}
h2 {
  margin: 20px 0 4px;
  font: 400 40px/1.18 var(--brush);
  letter-spacing: 0.06em;
}
.intro {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--soft);
}

/* Fields. */
.field {
  position: relative;
  margin-top: 13px;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #6b5c45;
}
.field input,
.field select {
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fffdf6c7;
  line-height: normal;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.field input::placeholder {
  color: #9b927d;
  font-size: 13px;
}
.field select {
  padding-right: 38px;
  text-overflow: ellipsis;
  -webkit-appearance: none;
  appearance: none;
}
.field select.unset {
  color: #9b927d;
  font-size: 13px;
}
.field option {
  color: var(--ink);
  font-size: 14px;
}
.field input:hover,
.field select:hover {
  border-color: #a8926c;
}
.field input:focus,
.field select:focus {
  outline: 0;
  border-color: var(--cinnabar);
  background: #fffefa;
  box-shadow: 0 0 0 3px #9a3d2c21;
}
.field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 50px #fffaee inset;
  -webkit-text-fill-color: var(--ink);
}
.field svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.field .lead {
  position: absolute;
  left: 13px;
  bottom: 13px;
  width: 18px;
  height: 18px;
  color: #9a8a6c;
  pointer-events: none;
  transition: color 0.15s ease;
}
.field .fold {
  position: absolute;
  right: 13px;
  bottom: 14px;
  width: 16px;
  height: 16px;
  color: #9a8a6c;
  pointer-events: none;
}
.field:focus-within .lead {
  color: var(--cinnabar);
}
#password {
  padding-right: 46px;
}
.reveal {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #9a8a6c;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}
.reveal:hover {
  color: var(--ink);
  background: #e9dcc270;
}
.reveal svg {
  width: 19px;
  height: 19px;
}
.reveal[aria-pressed='true'] {
  color: var(--cinnabar);
}
.reveal[aria-pressed='true'] .slash {
  display: none;
}
.notice {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #9a3626;
}
.notice:not(:empty) {
  margin-top: 11px;
  padding: 7px 10px 7px 11px;
  border-left: 2px solid var(--cinnabar);
  background: #9a3d2c12;
}
.notice.good:not(:empty) {
  border-left-color: #5c7a4a;
  background: #5c7a4a14;
  color: #3f5f35;
}

/* The lacquered plaque. */
.primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 50px;
  margin-top: 20px;
  padding: 0;
  border: 1px solid var(--cinnabar-deep);
  border-radius: 3px;
  background: linear-gradient(180deg, #ad4831 0%, #963a29 52%, #86301f 100%);
  color: #fff3dc;
  box-shadow:
    0 1px 0 #ffffff59 inset,
    0 6px 14px #7b2c1f38;
  transition:
    transform 0.12s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}
.primary::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid #f3d9a45e;
  border-radius: 2px;
  pointer-events: none;
}
.primary span {
  font: 400 22px/1 var(--brush);
  letter-spacing: 0.42em;
  margin-right: -0.42em;
  text-shadow: 0 1px 0 #5e1f1470;
}
.primary:not(:disabled):hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 #ffffff59 inset,
    0 9px 18px #7b2c1f47;
}
.primary:not(:disabled):active {
  filter: brightness(0.96);
  transform: translateY(0);
  box-shadow:
    0 2px 5px #45150d59 inset,
    0 2px 5px #7b2c1f33;
}
.primary:disabled {
  filter: saturate(0.55) brightness(1.04);
  opacity: 0.72;
  cursor: not-allowed;
}
.primary[aria-busy='true'] {
  cursor: progress;
}
/* 进入游戏: a gold thread and a lozenge on each side of the words. */
.enter i {
  position: relative;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.enter i:last-child {
  transform: scaleX(-1);
}
.enter i::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -3px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--gold);
  background: #9a3d2c;
  transform: rotate(45deg);
}
.enter span {
  font-size: 24px;
  letter-spacing: 0.3em;
  margin-right: -0.3em;
}
.switch {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 15px 0 0;
  font-size: 12px;
  color: var(--soft);
}
.switch button,
.who button,
.retry {
  flex: none;
  padding: 3px 1px;
  border: 0;
  background: transparent;
  color: var(--cinnabar);
  font-size: 12px;
  text-decoration: underline;
  text-decoration-color: #9a3d2c66;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s ease;
}
#forgot-tab {
  margin-left: 14px;
}
.switch button:hover,
.who button:hover,
.retry:hover {
  text-decoration-color: currentColor;
}
.retry {
  display: block;
  margin: 12px auto 0;
}
.consent {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--soft);
}
.consent label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
}
.consent input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 15px;
  height: 15px;
  margin: 0;
  border: 1px solid #a8926c;
  border-radius: 3px;
  background: #fffdf6c7;
}
.consent input:checked {
  border-color: var(--cinnabar);
  background: var(--cinnabar)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.4 6 10.2 11.2 4.2' fill='none' stroke='%23fff3dc' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 13px no-repeat;
}
.consent button {
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--cinnabar);
  font-size: 12px;
}
.consent button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.consent.missing {
  color: #9a3626;
  animation: shake 0.42s ease;
}
.consent.missing input {
  border-color: var(--cinnabar);
  box-shadow: 0 0 0 3px #9a3d2c21;
}

/* An agreement, over the page. Its words come from the console, so they are set in the visitor's own typeface: the
   lobby's fonts hold only the characters the lobby itself shows. */
.agreement {
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  max-height: min(720px, calc(100vh - 48px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    url('./paper.svg?v=fdf81e6f') 0 0 / 240px 240px,
    linear-gradient(180deg, #fcf6e9 0%, #f8eedb 100%);
  color: var(--ink);
  box-shadow: 0 18px 50px #2a1c1059;
}
.agreement[open] {
  display: flex;
  flex-direction: column;
}
.agreement::backdrop {
  background: #2a1c1080;
}
.agreement header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px 28px;
  border-bottom: 1px solid var(--line);
}
.agreement h2 {
  margin: 0;
  font-size: 30px;
}
.agreement header button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #8a7a5c;
}
.agreement header button:hover {
  color: var(--ink);
  background: #e9dcc270;
}
.agreement header svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}
.agreement-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 28px 26px;
  outline: 0;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.agreement-body p {
  margin: 0;
}
.agreement-body p:empty {
  height: 0.7em;
}
.agreement-body .head {
  font-size: 15px;
  font-weight: 600;
}


/* The hall. After the gate the scroll moves on: the painting slides to the left and the register of zones is written
   on the blank paper that follows it. */
.hall {
  position: relative;
  z-index: 0;
  align-self: center;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  animation: unroll 0.6s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}
.hall::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -100vh;
  bottom: -100vh;
  left: calc(-1 * var(--gap) - 130px);
  right: -100vw;
  background:
    url('./paper.svg?v=fdf81e6f') 0 0 / 240px 240px,
    linear-gradient(180deg, #fbf4e6 0%, #f7ecd9 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000c calc(var(--gap) + 70px), #000 calc(var(--gap) + 125px));
  mask-image: linear-gradient(90deg, transparent, #000c calc(var(--gap) + 70px), #000 calc(var(--gap) + 125px));
  pointer-events: none;
}
.hall-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dccdaf;
}
.hall-head::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 58px;
  height: 2px;
  background: var(--cinnabar);
}
.hall-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}
.hall h2 {
  margin: 0;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.tally {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #8a775a;
  white-space: nowrap;
}
.who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 54%;
  margin: 0 0 5px;
  font-size: 13px;
  color: var(--soft);
}
.who .chop {
  flex: none;
  padding: 2px 4px 3px;
  font-size: 15px;
  background: var(--cinnabar);
  color: #fff3dc;
  transform: rotate(-3deg);
}
.who-label {
  flex: none;
  letter-spacing: 0.12em;
}
.who b {
  min-width: 0;
  font-weight: 400;
  color: var(--ink);
  word-break: break-all;
  line-height: 1.4;
}
.who button {
  margin-left: 8px;
}
.hall h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  width: 62px;
  margin: 0;
  font: 400 20px/1 var(--brush);
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.hall h3::before {
  content: '';
  width: 3px;
  height: 15px;
  border-radius: 1px;
  background: var(--cinnabar);
}

/* The zones the player goes to. */
.quick {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.quick-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.hint {
  grid-column: span 3;
  align-self: center;
  margin: 0 0 0 6px;
  font-size: 12px;
  line-height: 1.7;
  color: #8a775a;
}

/* All of them: a band of numbers at a time, or what a search finds. */
.roll {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 16px;
}
.roll-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 39px;
  border-bottom: 1px solid #e3d5ba;
}
.spans {
  flex: 1;
  align-self: flex-end;
  display: flex;
  gap: 2px;
  min-width: 0;
  margin-bottom: -1px;
  overflow-x: auto;
  scrollbar-width: none;
  /* Bands that continue past an edge fade out there. */
  --before: 0px;
  --after: 0px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--before), #000 calc(100% - var(--after)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--before), #000 calc(100% - var(--after)), transparent);
}
.spans.before {
  --before: 30px;
}
.spans.after {
  --after: 30px;
}
.spans::-webkit-scrollbar {
  display: none;
}
.spans button {
  flex: none;
  padding: 9px 12px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--soft);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.spans button:hover {
  color: var(--ink);
}
.spans button[aria-selected='true'] {
  border-bottom-color: var(--cinnabar);
  color: var(--cinnabar);
}
.spans button:focus-visible {
  outline-offset: -2px;
}
.seek {
  position: relative;
  flex: none;
  width: 204px;
  margin-left: auto;
}
.seek input {
  display: block;
  width: 100%;
  height: 32px;
  padding: 0 30px 0 33px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fffdf6c7;
  font-size: 13px;
  line-height: normal;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.seek input::placeholder {
  color: #9b927d;
}
.seek input:hover {
  border-color: #a8926c;
}
.seek input:focus {
  outline: 0;
  border-color: var(--cinnabar);
  background: #fffefa;
  box-shadow: 0 0 0 3px #9a3d2c21;
}
.seek svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}
.seek > svg {
  position: absolute;
  left: 10px;
  top: 8px;
  width: 16px;
  height: 16px;
  color: #9a8a6c;
  pointer-events: none;
}
.seek:focus-within > svg {
  color: var(--cinnabar);
}
.seek button {
  position: absolute;
  right: 3px;
  top: 3px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #9a8a6c;
}
.seek button:hover {
  color: var(--ink);
  background: #e9dcc270;
}
.seek button svg {
  width: 14px;
  height: 14px;
}
.zones {
  flex: 0 1 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  min-height: 0;
  margin: 12px -8px 0;
  padding: 2px 8px 6px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c7b592 transparent;
  /* Rows that continue past an edge fade out there instead of being cut. */
  --above: 0px;
  --below: 0px;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent,
    #000 var(--above),
    #000 calc(100% - var(--below)),
    transparent
  );
  mask-image: linear-gradient(180deg, transparent, #000 var(--above), #000 calc(100% - var(--below)), transparent);
}
.zones.above {
  --above: 26px;
}
.zones.below {
  --below: 26px;
}
.zones:empty {
  display: none;
}
.zones.cols-1 {
  grid-template-columns: minmax(0, 1fr);
}
.zones.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.zone {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  column-gap: 6px;
  row-gap: 4px;
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px 9px 15px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fffdf6b8;
  text-align: left;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}
.zone::before {
  content: '';
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 4px;
  border-radius: 3px 0 0 3px;
  background: var(--cinnabar);
  opacity: 0;
  transform: scaleY(0);
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}
.zone:not(:disabled):hover {
  border-color: #a8926c;
  background: #fffef9;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px #5b452a17;
}
.zone.chosen,
.zone.chosen:not(:disabled):hover {
  border-color: var(--cinnabar);
  background: #fff7e8;
  box-shadow: 0 5px 14px #9a3d2c1f;
}
.zone.chosen::before {
  opacity: 1;
  transform: scaleY(1);
}
.zone:focus-visible {
  outline: 2px solid #9a3d2c61;
  outline-offset: 2px;
}
.ordinal {
  grid-column: 1 / span 2;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.16em;
  color: #8a775a;
  white-space: nowrap;
}
.zone.chosen .ordinal {
  color: var(--cinnabar);
}
/* What the zone is to this player, folded over its top right corner. */
.ordinal em {
  position: absolute;
  top: -1px;
  right: -1px;
  padding: 1px 6px 1px 7px;
  border: 1px solid #c9b795;
  border-radius: 0 3px 0 4px;
  font-style: normal;
  font-size: 10px;
  line-height: 14px;
  letter-spacing: 0.1em;
  color: #7d6c50;
  background: #fbf3e2;
}
.ordinal em.last {
  border-color: var(--cinnabar);
  background: var(--cinnabar);
  color: #fff3dc;
}
.ordinal em.fresh {
  border-color: #bda264;
  background: #f8edc8;
  color: #7a6020;
}
.zone-name {
  grid-column: 1 / span 2;
  min-width: 0;
  font: 400 23px/1.15 var(--brush);
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The seal on the chosen zone. While there are only a few zones each also shows where it would go. */
.mark {
  position: absolute;
  right: 10px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #c3b08d;
  border-radius: 50%;
  background: #fffdf6;
  opacity: 0;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease;
}
.zone.chosen .mark,
.few .mark {
  opacity: 1;
}
.mark svg {
  width: 9px;
  height: 9px;
  fill: none;
  stroke: #fff3dc;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.15s ease,
    transform 0.18s ease;
}
.zone.chosen .mark {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
}
.zone.chosen .mark svg {
  opacity: 1;
  transform: none;
}
/* A card in the row above, and every zone while there are only a few: the same thing written larger. */
.zone.card,
.few .zone {
  min-height: 70px;
  padding: 10px 13px 11px 17px;
  column-gap: 10px;
  row-gap: 5px;
}
.zone.card .zone-name,
.few .zone-name {
  font-size: 25px;
  letter-spacing: 0.1em;
}
.zone.card .mark {
  bottom: 14px;
}
.few .zone {
  min-height: 78px;
}
.few .ordinal,
.few .zone-name {
  grid-column: 1;
}
.few .ordinal em {
  position: static;
  padding: 0 4px 0 5px;
  border-radius: 2px;
}
.few .mark {
  position: static;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
}
.few .mark svg {
  width: 13px;
  height: 13px;
}
.roll-bar[hidden] + .shelf .zones {
  margin-top: 0;
}
.blank {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #8a775a;
}
.blank:not(:empty) {
  margin-top: 14px;
}
/* The list and what is said about it. A search holds this at the height it had, so the page does not jump. */
.shelf {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.hall-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid #dccdaf;
}
.picked {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 12px;
  min-width: 0;
  margin: 0;
}
.picked span {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #8a775a;
}
.picked b {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--cinnabar);
}
.picked strong {
  font: 400 30px/1.15 var(--brush);
  letter-spacing: 0.14em;
}
.hall-foot .primary {
  flex: none;
  width: 264px;
  margin-top: 0;
}
.few .hall-foot {
  border-top: 0;
  padding-top: 6px;
}
.few .picked {
  display: none;
}
.few .hall-foot .primary {
  width: 100%;
}

@keyframes turn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}
@keyframes unroll {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
}

@media (min-width: 901px) {
  /* The hall is one screen: the list scrolls inside it, the way in stays in sight. */
  .stage[data-scene='hall'] {
    height: 100vh;
    height: 100svh;
    min-height: 540px;
  }
  [data-scene='hall'] .spread {
    grid-template-columns: minmax(0, 1fr) var(--hall);
    grid-template-rows: minmax(0, 1fr);
    column-gap: var(--gap);
    min-height: 0;
    margin-right: 0;
  }
  [data-scene='hall'] .cover {
    min-height: 0;
  }
  /* The painting moves until the figure stands in the middle of what is left of it. */
  [data-scene='hall'] .painting {
    transform: translateX(
      min(0px, calc(var(--pad-x) + (100vw - 2 * var(--pad-x) - var(--gap) - var(--hall)) * 0.5 - 45vw))
    );
  }
  [data-scene='hall'] .legend {
    opacity: 0;
    visibility: hidden;
  }
  /* The painting now runs under the name of the game: it gets the same slip of paper as the caption below. */
  [data-scene='hall'] .brand {
    margin: -6px 0 -6px -8px;
    padding: 6px 13px 6px 8px;
    background: #f9ecd8e0;
  }
}
@media (min-width: 901px) and (max-width: 1179px) {
  /* A narrower sheet: three to a row, and the row above keeps the newest zone before a third visit. */
  .stage:not(.few) .zones,
  .quick-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .quick-list .card:nth-child(3):nth-last-child(2) {
    display: none;
  }
  .hint {
    grid-column: span 2;
  }
}
@media (min-width: 901px) and (max-width: 1499px) {
  .zone.card .zone-name {
    font-size: 23px;
    letter-spacing: 0.08em;
  }
}
@media (min-width: 1500px) {
  .stage:not(.few) .zones {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .zone.card .zone-name,
  .few .zone-name {
    font-size: 27px;
    letter-spacing: 0.14em;
  }
}
@media (min-width: 901px) and (max-height: 760px) {
  .zone {
    min-height: 54px;
  }
  .zone.card {
    min-height: 64px;
  }
  .quick,
  .roll {
    margin-top: 14px;
  }
}
@media (min-width: 1600px) {
  .spread {
    grid-template-columns: 1fr 420px;
  }
  .panel {
    padding: 34px 40px 36px;
  }
  .cover {
    min-height: 590px;
  }
}
@media (min-width: 901px) and (min-height: 860px) {
  .quick {
    margin-top: 22px;
  }
  .roll {
    margin-top: 22px;
  }
  .zones {
    gap: 12px;
    margin-top: 16px;
  }
  .zone {
    min-height: 66px;
  }
  .zone.card {
    min-height: 76px;
  }
  .hall-foot {
    margin-top: 16px;
    padding-top: 18px;
  }
}
@media (min-width: 721px) and (max-height: 690px) {
  .stage {
    padding-top: 14px;
    padding-bottom: 12px;
  }
  .cover {
    min-height: 435px;
  }
  .dock {
    margin: 10px 0;
  }
  .panel {
    padding-top: 20px;
    padding-bottom: 22px;
  }
  h2 {
    margin-top: 13px;
    font-size: 36px;
  }
  .field {
    margin-top: 9px;
  }
  .field input,
  .field select {
    height: 42px;
  }
  .field .lead {
    bottom: 12px;
  }
  .field .fold {
    bottom: 13px;
  }
  .reveal {
    bottom: 4px;
  }
  .primary {
    margin-top: 16px;
    height: 48px;
  }
  .switch {
    margin-top: 11px;
  }
  .consent {
    margin-top: 4px;
  }
  .legend {
    top: 10%;
  }
  .hall h2 {
    font-size: 38px;
  }
  .hall-head {
    padding-bottom: 10px;
  }
  .quick,
  .roll {
    margin-top: 12px;
  }
  .zone.card {
    min-height: 60px;
    padding-top: 7px;
    padding-bottom: 8px;
  }
  .hall-foot {
    margin-top: 8px;
    padding-top: 10px;
  }
}
@media (max-width: 900px) {
  /* Narrow screens: the hall is a page that scrolls, with the way in held at the bottom. */
  .stage {
    --gap: 0px;
  }
  [data-scene='hall'] .spread {
    display: block;
    margin: 0;
  }
  [data-scene='hall'] .cover {
    display: none;
  }
  .hall {
    max-height: none;
    padding-top: 14px;
  }
  .zones {
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hall-foot {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin: 14px -16px 0;
    padding: 11px 16px 14px;
    background: linear-gradient(180deg, #f9f0e0f2, #f8eedc 30%);
    box-shadow: 0 -8px 14px -10px #4a352038;
  }
  .few .hall-foot {
    padding-top: 11px;
  }
}
@media (max-width: 720px) {
  .stage {
    display: block;
    padding: 0 0 22px;
  }
  .painting {
    inset: 0 0 auto;
    height: clamp(238px, 61vw, 320px);
    background-position: 47% 17%;
  }
  .painting::after {
    background:
      linear-gradient(0deg, var(--paper), transparent 21%), linear-gradient(90deg, #f4e8d09e, transparent 40%);
  }
  .mast {
    position: absolute;
    top: 13px;
    left: 18px;
    right: 18px;
  }
  .mast .brand {
    gap: 6px;
  }
  .brand img {
    width: 24px;
    height: 24px;
  }
  .brand > span {
    font-size: 12px;
  }
  .brand small {
    font-size: 6px;
  }
  .spread {
    display: block;
    margin: 0;
  }
  .cover {
    height: clamp(218px, 55vw, 292px);
    min-height: 0;
  }
  .legend {
    top: 57px;
    left: 6%;
  }
  .chapter {
    font-size: 8px;
  }
  h1 {
    font-size: 37px;
    margin: 6px 0;
  }
  .legend .chop {
    font-size: 13px;
  }
  .caption {
    right: 5%;
    left: auto;
    bottom: 7px;
    padding: 3px 7px;
    gap: 5px;
  }
  .caption b {
    display: none;
  }
  .caption span {
    font-size: 10px;
  }
  .caption small {
    font-size: 6px;
  }
  .dock {
    width: min(calc(100% - 32px), 440px);
    margin: 0 auto;
  }
  .panel {
    padding: 22px 24px 24px;
  }
  h2 {
    font-size: 34px;
    margin-top: 16px;
  }
  /* In the hall the painting is a strip above the page, and everything is stacked. */
  .hall-head {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
  }
  .who {
    max-width: none;
    margin: 0;
  }
  .who b {
    flex: 1;
  }
  .who button {
    margin-left: 0;
  }
  .quick {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .quick-list {
    flex: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hint {
    grid-column: span 1;
    margin-left: 4px;
  }
  .roll-bar {
    flex-wrap: wrap;
    row-gap: 8px;
    padding-top: 2px;
  }
  .seek {
    order: -1;
    width: calc(100% - 78px);
  }
  .roll-bar h3 {
    order: -2;
  }
  .spans {
    flex: none;
    width: 100%;
  }
  .hall-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
  }
  .hall-foot .primary {
    width: 100%;
  }
  .picked strong {
    font-size: 24px;
  }
  .stage[data-scene='hall'] {
    padding-bottom: 0;
  }
  [data-scene='hall'] .painting {
    height: 168px;
    background-position: 47% 12%;
  }
  .hall {
    width: min(calc(100% - 32px), 560px);
    margin: 0 auto;
    padding-top: 160px;
  }
  .hall::before {
    display: none;
  }
  .hall h2 {
    font-size: 36px;
  }
  .zones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 359px) {
  .panel {
    padding: 20px 18px 22px;
  }
  .steps {
    letter-spacing: 0.04em;
    gap: 6px;
  }
  .zone-name {
    font-size: 21px;
    letter-spacing: 0.04em;
  }
  .zone.card .zone-name,
  .few .zone-name {
    font-size: 21px;
    letter-spacing: 0.04em;
  }
  .zone,
  .zone.card {
    padding-left: 12px;
    padding-right: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
