/* The Moth Mask: a page of a masquerade programme cut into comic panels, laid on the night lawn
   outside the glasshouse. Kit colours and fonts only (kit.css). Flat, straight-on, no tilt. */

:root {
  --fs: 14px;
  --gut: 6px;
  --ink-line: color-mix(in srgb, var(--ak-bg) 35%, #000);
  --bone: var(--ak-accent-2);
  --bone-soft: color-mix(in srgb, var(--ak-accent-2) 55%, var(--ak-bg));
  --icon: clamp(44px, 6.2dvh, 58px);
  --gh: clamp(64px, 10dvh, 156px);
  --slow: 900ms;
}

[hidden] { display: none !important; }

html, body { margin: 0; height: 100%; }

body {
  background-color: var(--ak-bg);
  background-image: var(--ak-backdrop-layer, var(--ak-bg-art));
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ak-ink);
  font-family: var(--ak-font-body);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible { outline: 3px solid var(--ak-focus); outline-offset: 2px; }

.play {
  position: fixed;
  inset: 0;
  touch-action: manipulation;
  overflow: hidden;
}

:root.ac-lights-up .play { filter: brightness(1.18); }
:root.ac-lights-up body { background-color: color-mix(in srgb, var(--ak-bg) 80%, var(--ak-ink)); }

/* The page: a strip of panels with ink gutters, the lawn showing through between them. */
.page {
  box-sizing: border-box;
  height: 100dvh;
  max-width: 640px;
  margin: 0 auto;
  padding:
    calc(var(--ac-status-h, 60px) + 4px)
    max(8px, env(safe-area-inset-right))
    max(6px, env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "board"
    "tray"
    "foot"
    "kept";
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: var(--gut);
  font-size: var(--fs);
  line-height: 1.28;
  overflow: hidden;
}

.page.is-overflowing { overflow-y: auto; }

/* Closed up, for the smallest screens and the wordiest cases. */
.page.is-tight { --gut: 3px; --gh: clamp(50px, 7dvh, 120px); }
.page.is-tight .say { padding-top: 2px; padding-bottom: 2px; }
.page.is-tight .clue { padding: 2px 4px 2px 2px; }

.window-wide { display: none; }

/* Caption boxes: faded ink on dark paper, a bone rule down the left like a programme margin. */
.caption {
  margin: 0;
  padding: 3px 8px 3px 9px;
  border-left: 4px solid var(--bone);
  background: var(--ak-bg);
  color: var(--ak-ink-muted);
  font-family: var(--ak-font-display);
  font-size: calc(var(--fs) * 0.92);
  letter-spacing: 0.04em;
}

/* Upright, the logo sits small in the gap at the top, between the case-file label and the ? corner. */
.masthead {
  position: fixed;
  z-index: 2;
  top: max(14px, env(safe-area-inset-top));
  right: calc(72px + env(safe-area-inset-right));
  display: flex;
  align-items: center;
  height: 48px;
}

.logo {
  display: block;
  height: 44px;
  width: auto;
}

/* The timeline, laid along the top of the clue tray. */
.window {
  margin: 0;
  color: var(--ak-ink-muted);
  font-family: var(--ak-font-display);
  font-size: calc(var(--fs) * 0.88);
  line-height: 1.2;
}

.window b { color: var(--ak-ink); font-weight: 400; }

/* Panels: bone-paper frame, a thin ink line outside it so the gutter reads as ink. */
.panel {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  border: 2px solid var(--bone-soft);
  box-shadow: 0 0 0 2px var(--ink-line);
}

/* The big panel is the scene itself: the lawn and the lantern behind the guests. */
.board {
  grid-area: board;
  display: grid;
  gap: var(--gut);
  padding: var(--gut);
  background-image: var(--ak-backdrop-layer, var(--ak-bg-art));
  background-size: cover;
  background-position: center 42%;
}

.guests,
.says,
.clues {
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.guests {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gut);
}

/* A suspect's portrait panel: tall, narrow, straight on. */
.guest {
  position: relative;
  display: block;
  width: 100%;
  height: var(--gh);
  min-height: 48px;
  padding: 0;
  border: 2px solid var(--bone);
  background: var(--ak-bg);
  overflow: hidden;
  container-type: size;
}

.guest .art,
.last-portrait .art {
  position: absolute;
  inset: 0;
  background-image: url("art/suspect-cards.png");
  background-repeat: no-repeat;
  /* Scale the sheet so one card's width fills the panel, then centre on the face. */
  background-size: calc(100cqw * 384 / var(--cw)) auto;
  background-position:
    calc(-100cqw * var(--cx) / var(--cw))
    calc(50cqh - 100cqw * var(--cy, 150) / var(--cw));
}

/* The mask: a veil of night over the face that lifts a third at a time. */
.veil {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ak-bg) 76%, transparent);
  border-bottom: 2px solid var(--bone-soft);
  transform: translateY(calc(var(--lift, 0) * -33.34%));
  pointer-events: none;
}

.guest .name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 1px 3px;
  background: var(--ak-bg);
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-size: min(15px, calc(var(--fs) * 0.95), 15.5cqw);
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.guest .pins {
  position: absolute;
  top: 2px;
  left: 2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px 1px 1px;
  background: var(--ak-bg);
  color: var(--ak-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.pin-head {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-image: url("art/pins-and-marks.png");
  background-repeat: no-repeat;
  /* The teal wax pin head: centre (88, 80), radius 31 on a 376 by 384 sheet. */
  background-size: calc(376 / 62 * 100%) calc(384 / 62 * 100%);
  background-position: calc(57 / (376 - 62) * 100%) calc(49 / (384 - 62) * 100%);
  flex: 0 0 auto;
}

.guest .cleared-stamp {
  position: absolute;
  top: 38%;
  left: 50%;
  translate: -50% 0;
  padding: 1px 4px;
  border: 1.5px solid var(--bone);
  background: var(--ak-bg);
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guest.is-target { outline: 3px dashed var(--ak-accent); outline-offset: -5px; }
.guest.has-clue { border-color: var(--ak-accent); }
.guest.has-clue .pins { background: var(--ak-accent); color: var(--ak-choice-selected-ink); }
.guest.is-cleared .art { filter: grayscale(1) brightness(0.55); }
.guest.is-cleared .name { color: var(--ak-ink-muted); text-decoration: line-through; }
.guest.is-accusing { outline: 3px solid var(--bone); outline-offset: -5px; }
.guest.is-culprit { border-color: var(--ak-accent); box-shadow: 0 0 0 2px var(--ak-accent), 0 0 16px var(--ak-glow); }

/* Statements: word bubbles, their tails pointing up at the portraits. */
.says {
  display: grid;
  gap: 4px;
}

.say {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 3px 10px 4px 12px;
  border: 1.5px solid var(--bone-soft);
  border-radius: 16px 16px 16px 4px;
  background: var(--ak-surface);
  color: var(--ak-ink);
  text-align: left;
}

.say .text {
  font-size: calc(var(--fs) * 0.92);
  line-height: 1.24;
}

.say .who-name {
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.say .who-dress { color: var(--ak-ink-muted); }

.say .quote { color: var(--ak-ink); }

.say .tag {
  position: absolute;
  top: 50%;
  right: 8px;
  translate: 0 -50%;
  width: 54px;
  height: 30px;
  background-image: url("art/pins-and-marks.png");
  background-repeat: no-repeat;
  /* The paper 'lie' tag with its charcoal strike: x 36 to 224, y 136 to 240. */
  background-size: calc(376 / 188 * 100%) calc(384 / 104 * 100%);
  background-position: calc(36 / (376 - 188) * 100%) calc(136 / (384 - 104) * 100%);
  visibility: hidden;
}

.say.is-lie { border-color: var(--bone); padding-right: 68px; }
.say.is-lie .tag { visibility: visible; }
.say.is-lie .quote {
  text-decoration: line-through;
  text-decoration-color: var(--bone);
  text-decoration-thickness: 2px;
}

.say.is-cleared .who-dress { color: var(--ak-ink); }
.say.is-cleared .quote { color: var(--ak-ink-muted); }
.say.is-accusing { border-color: var(--bone); border-width: 2px; }

/* The clue tray: a contact sheet of evidence cards. */
.tray {
  grid-area: tray;
  display: grid;
  gap: 4px;
  padding: var(--gut);
  background: var(--ak-bg);
}

.clues {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.clue {
  position: relative;
  display: grid;
  grid-template-columns: var(--icon) minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  width: 100%;
  height: 100%;
  min-height: 48px;
  padding: 3px 5px 3px 3px;
  border: 1.5px solid var(--ak-outline);
  background: var(--ak-bg);
  color: var(--ak-ink);
  text-align: left;
}

.clue .icon {
  width: var(--icon);
  height: var(--icon);
  background-image: url("art/clue-cards.png");
  background-repeat: no-repeat;
  background-size: calc(384 / var(--s) * 100%) calc(382 / var(--s) * 100%);
  background-position: calc(var(--x) / (384 - var(--s)) * 100%) calc(var(--y) / (382 - var(--s)) * 100%);
}

.clue .body { min-width: 0; }

.clue .body {
  font-size: calc(var(--fs) * 0.88);
  line-height: 1.22;
}

.clue .title {
  font-family: var(--ak-font-display);
  font-weight: 400;
  color: var(--ak-ink);
}

.clue .on {
  display: inline-flex;
  gap: 2px;
  margin-right: 4px;
  vertical-align: 1px;
}

.clue .on:empty { display: none; }

.clue .on span {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 2px;
  background: var(--ak-accent);
  color: var(--ak-choice-selected-ink);
  font-family: var(--ak-font-body);
  font-size: 11px;
  font-weight: 700;
}

.clue.is-selected {
  border-color: var(--ak-accent);
  box-shadow: inset 0 0 0 2px var(--ak-accent);
  background: var(--ak-surface);
}

.clue.is-pointed { outline: 2px dashed var(--bone); outline-offset: -4px; }

/* The foot: the hint, the narrator's line, and the wax-sealed accusation. */
.foot {
  grid-area: foot;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--gut);
  align-items: stretch;
}

.hint {
  min-width: 52px;
  min-height: 48px;
  padding: 0 8px;
  border: 1.5px solid var(--bone-soft);
  box-shadow: 0 0 0 2px var(--ink-line);
  background: var(--ak-bg);
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-size: calc(var(--fs) * 1.02);
}

.line {
  display: flex;
  align-items: center;
  margin: 0;
  min-height: 48px;
  padding: 3px 8px 3px 9px;
  border-left: 4px solid var(--bone);
  background: var(--ak-bg);
  color: var(--ak-ink);
  font-size: calc(var(--fs) * 0.9);
  line-height: 1.22;
}

.line.is-hint { border-left-color: var(--ak-accent); }

.accuse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  min-width: 112px;
  padding: 0 10px 0 4px;
  border: 2px solid var(--bone);
  box-shadow: 0 0 0 2px var(--ink-line);
  background: var(--ak-bg);
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-size: calc(var(--fs) * 1.12);
  letter-spacing: 0.08em;
}

.accuse.is-on { background: var(--ak-surface); border-style: dashed; }

.seal {
  display: inline-block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-image: url("art/pins-and-marks.png");
  background-repeat: no-repeat;
  /* The red wax seal: centre (265, 287), radius 68. */
  background-size: calc(376 / 136 * 100%) calc(384 / 136 * 100%);
  background-position: calc(197 / (376 - 136) * 100%) calc(219 / (384 - 136) * 100%);
  flex: 0 0 auto;
}

.kept {
  grid-area: kept;
  margin: 0;
  color: var(--ak-ink-muted);
  font-size: 10.5px;
  line-height: 1.2;
  text-align: center;
}

.kept { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; }
.kept span { background: var(--ak-bg); padding: 0 4px; }
.kept .run { color: var(--ak-ink); }
.kept .run.is-spoilt { color: var(--ak-ink-muted); }

/* Turned sideways: the board on one side, the clues and controls on the other. */
@media (orientation: landscape) {
  :root {
    --gh: clamp(54px, 15dvh, 176px);
    --icon: 44px;
  }

  /* The status label pins the left column's top; the right column rises beside it, clear of the ? corner. */
  .page {
    max-width: 1180px;
    padding-top: max(8px, env(safe-area-inset-top));
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    grid-template-areas:
      "board mast"
      "board tray"
      "board foot"
      "board kept";
    grid-template-rows: auto auto auto auto;
    align-items: start;
  }

  /* Sideways, the logo and the timeline head the right-hand column, clear of the ? corner. */
  .masthead { grid-area: mast; position: static; gap: 10px; height: 44px; padding-right: 64px; min-width: 0; }
  .logo { height: 40px; flex: 0 0 auto; }
  .window-wide { display: block; min-width: 0; }
  .window-narrow { display: none; }
  .page.is-tight { --gh: clamp(50px, 14dvh, 120px); }
  .board { grid-row: 1 / span 4; align-self: start; align-content: start; margin-top: calc(var(--ac-status-h, 78px) - 6px); }
}

/* The guide: a ring, an arrow and a caption, until the player makes the move. */
.guide { position: fixed; inset: 0; z-index: 20; pointer-events: none; }

.guide-ring {
  position: fixed;
  border: 3px solid var(--ak-accent);
  border-radius: 6px;
  box-shadow: 0 0 0 3px var(--ak-bg);
}

.guide-arrow {
  position: fixed;
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--ak-accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px var(--ak-bg));
}

.guide-caption {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  max-width: 440px;
  margin: 0 auto;
  padding: 10px 14px;
  border: 2px solid var(--bone);
  border-left-width: 6px;
  box-shadow: 0 0 0 2px var(--ink-line), 0 10px 24px rgba(0, 0, 0, 0.55);
  background: var(--ak-bg);
  color: var(--ak-ink);
  font-family: var(--ak-font-body);
  font-size: 18px;
  line-height: 1.35;
}

/* The accusation's one question, asked in the page. */
.confirm {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
}

.confirm-panel {
  width: min(100%, 380px);
  padding: 18px 18px 14px;
  border: 2px solid var(--bone);
  box-shadow: 0 0 0 3px var(--ink-line), 0 24px 50px rgba(0, 0, 0, 0.6);
  background: var(--ak-surface);
  color: var(--ak-ink);
}

.confirm-head {
  margin: 0 0 6px;
  font-family: var(--ak-font-display);
  font-size: 22px;
}

.confirm-note { margin: 0 0 14px; color: var(--ak-ink-muted); font-size: 15px; }

.confirm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

.confirm-yes {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 16px 0 5px;
  border: 2px solid var(--bone);
  background: var(--ak-bg);
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-size: 19px;
  letter-spacing: 0.06em;
}

.confirm-no {
  min-height: 48px;
  min-width: 48px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid var(--ak-outline);
  background: none;
  color: var(--ak-ink-muted);
  font-style: italic;
  font-size: 16px;
}

/* The last panel: the culprit under the lantern, the violet jewels where they were hidden. */
.last {
  position: fixed;
  z-index: 22;
  inset: calc(var(--ac-status-h, 60px) + 6px) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  justify-items: center;
  gap: 8px;
  padding: 10px;
  border: 3px solid var(--bone);
  box-shadow: 0 0 0 3px var(--ink-line);
  background-color: var(--ak-bg);
  background-image: var(--ak-backdrop-layer, var(--ak-bg-art));
  background-size: cover;
  background-position: center 32%;
}

.last-time { grid-row: 1; justify-self: start; }

.last-scene {
  grid-row: 2;
  position: relative;
  align-self: center;
  /* At most about twice the painted card's own size, so the portrait stays crisp. */
  height: min(100%, 56dvh, 300px);
  aspect-ratio: 73 / 130;
  max-width: 70vw;
}

.last-portrait {
  position: absolute;
  inset: 0;
  border: 3px solid var(--bone);
  background: var(--ak-bg);
  overflow: hidden;
  container-type: size;
}

.last-mask {
  position: absolute;
  left: 50%;
  top: var(--mask-top, 22%);
  width: var(--mask-w, 74%);
  height: auto;
  translate: -50% 0;
}

.last-verdict {
  grid-row: 3;
  color: var(--ak-ink);
  font-size: clamp(17px, 2.6dvh, 24px);
}

.last-reveal {
  grid-row: 4;
  margin: 0;
  padding: 4px 10px;
  background: var(--ak-bg);
  color: var(--ak-ink-muted);
  font-style: italic;
  font-size: 16px;
}

@media (orientation: landscape) {
  .last {
    top: max(8px, env(safe-area-inset-top));
    max-width: 980px;
    padding-top: calc(var(--ac-status-h, 78px) - 4px);
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .last-time { grid-column: 2; grid-row: 1; }
  .last-scene { grid-column: 1; grid-row: 1 / span 3; height: min(100%, 76dvh); }
  .last-verdict { grid-column: 2; grid-row: 2; align-self: end; justify-self: start; }
  .last-reveal { grid-column: 2; grid-row: 3; justify-self: start; }
}

/* Motion: slow and quiet, only for players who have not asked for less. */
@media (prefers-reduced-motion: no-preference) {
  :root:not(.ac-still) .veil { transition: transform var(--slow) cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms); }
  :root:not(.ac-still) .guest .art { transition: filter var(--slow) ease; }
  :root:not(.ac-still) .guest { transition: border-color 400ms ease, box-shadow 600ms ease; }
  :root:not(.ac-still) .pins.is-settling { animation: mm-drift 520ms ease-out both; }
  :root:not(.ac-still) .clue { transition: background-color 300ms ease, border-color 300ms ease; }
  :root:not(.ac-still) .guide-ring { animation: mm-pulse 2400ms ease-in-out infinite; }
  :root:not(.ac-still) .guide-arrow { animation: mm-nod 2400ms ease-in-out infinite; }
  :root:not(.ac-still) .last:not([hidden]) { animation: mm-swap 1100ms ease-out both; }
  :root:not(.ac-still) .last-mask { animation: mm-glint 3600ms ease-in-out 900ms infinite; }
  :root:not(.ac-still) .confirm:not([hidden]) { animation: mm-fade 420ms ease-out both; }
  :root:not(.ac-still) .guest.is-culprit { animation: mm-answer 2600ms ease-in-out 600ms 2; }

  @keyframes mm-drift { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
  @keyframes mm-pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--ak-bg), 0 0 0 0 color-mix(in srgb, var(--ak-accent) 55%, transparent); }
    50% { box-shadow: 0 0 0 3px var(--ak-bg), 0 0 0 9px color-mix(in srgb, var(--ak-accent) 0%, transparent); }
  }
  @keyframes mm-nod { 0%, 100% { translate: 0 0; } 50% { translate: 0 4px; } }
  @keyframes mm-swap { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0); } }
  @keyframes mm-glint { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }
  @keyframes mm-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes mm-answer { 0%, 100% { box-shadow: 0 0 0 2px var(--ak-accent), 0 0 10px var(--ak-glow); } 50% { box-shadow: 0 0 0 2px var(--ak-accent), 0 0 22px var(--ak-glow); } }
}

/* The toast lands bottom-right, over Accuse. It goes on the player's next tap anyway, so that tap
   passes through it to whatever is underneath instead of being spent on the toast. */
#activity-chrome-toast { pointer-events: none; }

/* A guest picked first: their panel holds a teal frame, and every clue card waits to be pinned. */
.guest.is-chosen { border-color: var(--ak-accent); box-shadow: inset 0 0 0 3px var(--ak-accent); }
.guest.is-chosen .name { background: var(--ak-accent); color: var(--ak-choice-selected-ink); }
.clue.is-target { outline: 2px dashed var(--ak-accent); outline-offset: -4px; }
.clue.has-guest { border-color: var(--ak-accent); background: var(--ak-surface); }

/* The chrome's ending page (its own style tag loads after this file, so these rules carry 'body'
   to outrank it). Centred by auto margins rather than by the flex box, so a page taller
   than the screen scrolls from its top instead of losing its heading and buttons off both edges. */
body #activity-chrome-ending.site-shriversify { justify-content: flex-start; }
body #activity-chrome-ending.site-shriversify .ac-card { flex-shrink: 0; margin-block: auto; }
body #activity-chrome-ending.site-shriversify .ac-work img { max-height: 24dvh; width: auto; margin: 0 auto; }

/* Read at a glance: the page's words in full ink, and its two choices as framed, full-size buttons. */
body #activity-chrome-ending.site-shriversify .ac-lines { color: var(--ak-ink); font-size: 17px; line-height: 1.45; }
body #activity-chrome-ending.site-shriversify .ac-line + .ac-line { font-style: normal; color: var(--ak-ink); }
body #activity-chrome-ending.site-shriversify .ac-number { color: var(--ak-ink); }
body #activity-chrome-ending.site-shriversify .ac-actions { gap: 12px; }
body #activity-chrome-ending.site-shriversify .ac-actions button {
  min-height: 52px;
  padding: 0 18px;
  border: 1.5px solid var(--ak-accent-2);
  background: var(--ak-bg);
  color: var(--ak-ink);
  font-size: 18px;
  font-style: normal;
}
body #activity-chrome-ending.site-shriversify .ac-actions .ac-replay { border-width: 2px; }

/* Sideways, the page lies on its side too: the mask on the left, the words and the buttons beside it. */
@media (orientation: landscape) and (max-height: 600px) {
  body #activity-chrome-ending.site-shriversify { padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  body #activity-chrome-ending.site-shriversify .ac-card {
    display: grid;
    grid-template-columns: minmax(0, 130px) minmax(0, 1fr);
    column-gap: 22px;
    align-items: center;
    width: min(100%, 780px);
    padding: 14px 22px 10px;
    text-align: left;
  }
  body #activity-chrome-ending.site-shriversify .ac-card > * { grid-column: 2; }
  body #activity-chrome-ending.site-shriversify .ac-work { grid-column: 1; grid-row: 1 / span 5; margin: 0; }
  body #activity-chrome-ending.site-shriversify .ac-work img { max-height: 58dvh; }
  body #activity-chrome-ending.site-shriversify .ac-number { margin-bottom: 2px; }
  body #activity-chrome-ending.site-shriversify .ac-verdict { margin-bottom: 6px; padding-bottom: 6px; font-size: 20px; }
  body #activity-chrome-ending.site-shriversify .ac-lines { font-size: 16px; line-height: 1.38; }
  body #activity-chrome-ending.site-shriversify .ac-line { margin-bottom: 4px; }
  body #activity-chrome-ending.site-shriversify .ac-actions { justify-content: flex-start; margin-top: 4px; }
}

/* The window the mask went missing in, picked out on the timeline. */
.window b.win { color: var(--ak-accent); }

/* Once the case is closed, the ? corner steps aside with the board; it returns with the next case. */
:root.mm-closed #activity-help { visibility: hidden; }

/* Upright, the case-file page must fit whole: a smaller picture, closer margins, the same full ink. */
@media (orientation: portrait) {
  body #activity-chrome-ending.site-shriversify { padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom)); }
  body #activity-chrome-ending.site-shriversify .ac-card { padding: 20px 18px 14px; }
  body #activity-chrome-ending.site-shriversify .ac-work { margin: 8px auto; padding: 4px; }
  body #activity-chrome-ending.site-shriversify .ac-work img { max-height: 13dvh; }
  body #activity-chrome-ending.site-shriversify .ac-verdict { margin-bottom: 8px; padding-bottom: 8px; }
  body #activity-chrome-ending.site-shriversify .ac-lines { font-size: 16px; line-height: 1.4; }
  body #activity-chrome-ending.site-shriversify .ac-actions { margin-top: 8px; gap: 10px; }
}

/* The ending page's words follow --end-fs, which game.js steps down until the page fits the screen. */
body #activity-chrome-ending.site-shriversify .ac-lines { font-size: var(--end-fs, 17px); overflow-wrap: anywhere; }
body #activity-chrome-ending.site-shriversify .ac-verdict { font-size: calc(var(--end-fs, 17px) * 1.3); }
body #activity-chrome-ending.site-shriversify .ac-card { max-width: 100%; }
body #activity-chrome-ending.site-shriversify .ac-actions { flex-wrap: wrap; }
body #activity-chrome-ending.site-shriversify .ac-actions button { font-size: max(15px, calc(var(--end-fs, 17px) + 1px)); }

/* ---------------------------------------------------------------------------------------------
   The opening, read by candlelight. start.js draws the crawl and the letter; these rules (scoped to
   this site's start screen, and carrying 'body' to outrank its own) make both readable and whole.
   --------------------------------------------------------------------------------------------- */
body #activity-start.site-shriversify .ak-scene { gap: var(--ak-space-4); }
body #activity-start.site-shriversify .ak-scene .ak-logo { max-height: min(150px, 20dvh); }
body #activity-start.site-shriversify .ak-scene-lines {
  gap: var(--ak-space-3);
  padding: var(--ak-space-4) var(--ak-space-5);
  background: radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--ak-accent-2) 15%, transparent), transparent 72%);
}
body #activity-start.site-shriversify .ak-scene-line {
  font-size: clamp(17px, min(4.4vw, 3.4dvh), 26px);
  line-height: 1.4;
  color: var(--ak-ink);
  text-shadow: 0 0 10px var(--ak-bg), 0 0 2px var(--ak-bg);
}
body #activity-start.site-shriversify .ak-scene .ak-go { width: 108px; height: 108px; margin-top: var(--ak-space-2); }

/* Sideways, the crawl sits beside the title and its seal, so the whole passage stays on the page. */
@media (orientation: landscape) and (max-height: 600px) {
  body #activity-start#activity-start.site-shriversify .ak-scene {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "lines head" "lines actions";
    align-items: center;
    column-gap: var(--ak-space-6);
    min-height: calc(100dvh - 2 * var(--ak-space-4));
  }
  body #activity-start#activity-start.site-shriversify .ak-scene .ak-head { grid-area: head; align-self: end; }
  body #activity-start#activity-start.site-shriversify .ak-scene-lines { grid-area: lines; max-width: 40ch; }
  body #activity-start#activity-start.site-shriversify .ak-scene-actions { grid-area: actions; align-self: start; }
  body #activity-start#activity-start.site-shriversify .ak-scene .ak-logo { max-height: 24dvh; }
  body #activity-start#activity-start.site-shriversify .ak-scene-line { font-size: clamp(16px, 4.6dvh, 22px); }
  body #activity-start#activity-start.site-shriversify .ak-scene .ak-go { width: 92px; height: 92px; font-size: 12px; }
}

/* The letter: foxed paper warmed by a candle at its head, in full ink, the whole passage on the page. */
body #activity-start.site-shriversify .ak-sheet {
  background-color: var(--ak-surface);
  background-image:
    radial-gradient(ellipse 80% 45% at 50% 0%, color-mix(in srgb, var(--ak-accent-2) 20%, transparent), transparent 75%),
    linear-gradient(180deg, transparent 70%, color-mix(in srgb, var(--ak-accent-2) 6%, transparent));
  border-color: color-mix(in srgb, var(--ak-accent-2) 45%, var(--ak-outline));
  padding-top: var(--ak-space-6);
}
body #activity-start.site-shriversify .ak-sheet .ak-logo { max-height: min(96px, 13dvh); }
body #activity-start.site-shriversify .ak-head { padding-bottom: var(--ak-space-3); }
body #activity-start.site-shriversify .ak-tagline,
body #activity-start.site-shriversify .ak-badge,
body #activity-start.site-shriversify .ak-label { color: var(--ak-ink); }
body #activity-start.site-shriversify .ak-section { margin-top: var(--ak-space-3); }
body #activity-start.site-shriversify .ak-body,
body #activity-start.site-shriversify .ak-controls li { color: var(--ak-ink); font-size: 16px; line-height: 1.45; }
body #activity-start.site-shriversify .ak-controls li + li { margin-top: 4px; }
/* The wax seal closes the letter after its last line, instead of lying across the words. */
body #activity-start.site-shriversify .ak-sheet .ak-go { position: relative; bottom: auto; margin: var(--ak-space-4) auto 0; }
/* Sized so the whole letter, seal and all, sits on one phone page. */
body #activity-start.site-shriversify .ak-sheet { margin: max(10px, 1.5dvh) auto; padding: var(--ak-space-5) var(--ak-space-4) var(--ak-space-4); }
body #activity-start.site-shriversify .ak-sheet .ak-logo { max-height: min(78px, 10dvh); }
body #activity-start.site-shriversify .ak-tagline { font-size: 15px; margin-top: 4px; }
body #activity-start.site-shriversify .ak-badge,
body #activity-start.site-shriversify .ak-label { font-size: 15px; }
body #activity-start.site-shriversify .ak-body,
body #activity-start.site-shriversify .ak-controls li,
body #activity-start.site-shriversify .ak-first { font-size: 14.5px; line-height: 1.42; }
body #activity-start.site-shriversify .ak-first { margin-top: var(--ak-space-3); padding-top: var(--ak-space-2); }
body #activity-start.site-shriversify .ak-sheet .ak-go { width: 92px; height: 92px; padding: 8px; font-size: 12px; }
body #activity-start.site-shriversify .ak-sheet .ak-logo { max-height: min(62px, 8dvh); }
body #activity-start.site-shriversify .ak-head { padding-bottom: var(--ak-space-2); }
body #activity-start.site-shriversify .ak-tagline { font-size: 14px; letter-spacing: 0; }
body #activity-start.site-shriversify .ak-section { margin-top: var(--ak-space-2); }
body #activity-start.site-shriversify .ak-body,
body #activity-start.site-shriversify .ak-controls li,
body #activity-start.site-shriversify .ak-first { font-size: 14px; line-height: 1.38; }
body #activity-start.site-shriversify .ak-controls li + li { margin-top: 2px; }
/* The seal and the quick way in share the letter's last line. */
body #activity-start.site-shriversify .ak-sheet .ak-go { display: inline-flex; vertical-align: middle; margin: var(--ak-space-3) var(--ak-space-3) 0 0; }
body #activity-start.site-shriversify .ak-sheet .ak-jump { display: inline-block; width: calc(100% - 110px); margin-top: var(--ak-space-3); vertical-align: middle; text-align: left; }
body #activity-start.site-shriversify .ak-sheet { padding-top: var(--ak-space-5); }
body #activity-start.site-shriversify .ak-body,
body #activity-start.site-shriversify .ak-controls li,
body #activity-start.site-shriversify .ak-first { font-size: 13.5px; line-height: 1.36; }
body #activity-start.site-shriversify .ak-first { margin-top: var(--ak-space-2); padding-top: var(--ak-space-2); }
body #activity-start.site-shriversify .ak-sheet .ak-go { width: 84px; height: 84px; }

/* Sideways, the letter opens like a folded sheet in three panels: the title and seal, what happened
   and what you can do, then the warning and where to begin. */
@media (orientation: landscape) and (max-height: 600px) {
  body #activity-start#activity-start.site-shriversify .ak-sheet {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    align-items: start;
    column-gap: var(--ak-space-5);
    width: min(100%, 1000px);
    margin: 6px auto;
    padding: var(--ak-space-4) var(--ak-space-5) var(--ak-space-3);
  }
  body #activity-start#activity-start.site-shriversify .ak-sheet > .ak-howto { display: contents; }
  body #activity-start#activity-start.site-shriversify .ak-head { grid-column: 1; grid-row: 1; border-bottom: 0; padding-bottom: 0; }
  body #activity-start#activity-start.site-shriversify .ak-sheet > .ak-go { grid-column: 1; grid-row: 2; justify-self: center; margin: var(--ak-space-2) 0 0; }
  body #activity-start#activity-start.site-shriversify .ak-sheet > .ak-jump { grid-column: 1; grid-row: 3; width: auto; margin-top: var(--ak-space-2); text-align: center; }
  body #activity-start#activity-start.site-shriversify .ak-goal { grid-column: 2; grid-row: 1; }
  body #activity-start#activity-start.site-shriversify .ak-controls-block { grid-column: 2; grid-row: 2 / span 2; }
  body #activity-start#activity-start.site-shriversify .ak-tip { grid-column: 3; grid-row: 1 / span 2; }
  body #activity-start#activity-start.site-shriversify .ak-sheet > .ak-first { grid-column: 3; grid-row: 3; margin-top: var(--ak-space-2); }
  body #activity-start#activity-start.site-shriversify .ak-section { margin: 0 0 var(--ak-space-2); }
  body #activity-start#activity-start.site-shriversify .ak-body,
  body #activity-start#activity-start.site-shriversify .ak-controls li,
  body #activity-start#activity-start.site-shriversify .ak-first { font-size: 13px; line-height: 1.34; }
}

/* ---------------------------------------------------------------------------------------------
   The deduction board, given room: every clue and statement at full reading size.
   --------------------------------------------------------------------------------------------- */

/* The contact sheet: seven evidence frames and, in the eighth, the hint and the sealed accusation. */
.sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 5px; }
.sheet > .clues { display: contents; }
.sheet .clues > li { min-width: 0; }
.clue { display: block; padding: 4px 6px 5px 4px; }
/* The painted card sits in the corner and the words run on beneath it, so none of the width is lost. */
.clue .icon { float: left; margin: 0 7px 2px 0; }
.clue .body { display: block; font-size: var(--fs); line-height: 1.3; }
.clue .title { font-size: calc(var(--fs) * 1.02); }
.moves { display: flex; gap: 5px; min-width: 0; align-self: end; }
.moves .hint { flex: 0 0 auto; min-width: 52px; }
.moves .accuse { flex: 1 1 auto; min-width: 0; justify-content: center; gap: 6px; padding: 0 8px 0 3px; }

/* The narrator's line now has the whole width to itself. */
.foot { grid-template-columns: minmax(0, 1fr); }
.line { min-height: 0; padding: 4px 9px; font-size: var(--fs); }

/* The clue that wants reading next stands proud of the sheet with a small paper tab. */
.clue .next-tab:empty { display: none; }
.clue .next-tab {
  position: absolute;
  top: -9px;
  right: 6px;
  z-index: 1;
  padding: 0 6px;
  border: 1px solid var(--bone);
  background: var(--ak-bg);
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-size: 11px;
  line-height: 15px;
  letter-spacing: 0.06em;
}
.clue.is-next {
  border-color: var(--bone);
  background: var(--ak-surface);
  box-shadow: 0 0 0 1px var(--bone), 0 6px 14px rgba(0, 0, 0, 0.45);
}

/* The guide's caption shows the clue it names. */
.guide-icon {
  float: left;
  width: 42px;
  height: 42px;
  margin: 0 10px 0 0;
  background-image: url("art/clue-cards.png");
  background-repeat: no-repeat;
  background-size: calc(384 / var(--s) * 100%) calc(382 / var(--s) * 100%);
  background-position: calc(var(--x) / (384 - var(--s)) * 100%) calc(var(--y) / (382 - var(--s)) * 100%);
}

/* Statements: slips of foxed paper pinned in the scene, each cut, tilted and pinned its own way. */
.says { gap: 9px; padding-top: 5px; }
.say {
  display: block;
  min-height: 44px;
  padding: 7px 12px 7px 14px;
  border: 0;
  border-radius: 1px;
  background-color: var(--ak-btn-fill);
  background-image:
    radial-gradient(ellipse at var(--fox-a, 18% 30%), color-mix(in srgb, var(--ak-accent-2) 55%, transparent), transparent 62%),
    radial-gradient(ellipse at var(--fox-b, 86% 80%), color-mix(in srgb, var(--ak-accent-2) 70%, transparent), transparent 55%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 0 16px color-mix(in srgb, var(--ak-accent-2) 85%, transparent);
  color: var(--ak-btn-ink);
}
.say .text { font-size: var(--fs); line-height: 1.32; }
.say .who-name { color: var(--ak-btn-ink); font-family: var(--ak-font-display); }
.say .who-dress { color: var(--ak-btn-ink); font-style: italic; }
.say .quote { color: var(--ak-btn-ink); }
.say .slip-pin { position: absolute; top: -6px; left: var(--pin-x, 20%); width: 15px; height: 15px; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); }
.says li:nth-child(1) .say { rotate: -0.7deg; margin-right: 10px; --pin-x: 14%; --fox-a: 10% 20%; --fox-b: 90% 90%; }
.says li:nth-child(2) .say { rotate: 0.5deg; margin-left: 14px; --pin-x: 76%; --fox-a: 70% 10%; --fox-b: 20% 95%; }
.says li:nth-child(3) .say { rotate: -0.3deg; margin-right: 4px; --pin-x: 46%; --fox-a: 40% 90%; --fox-b: 95% 15%; }
.says li:nth-child(4) .say { rotate: 0.8deg; margin-left: 6px; margin-right: 8px; --pin-x: 88%; --fox-a: 5% 60%; --fox-b: 60% 5%; }
.says li:nth-child(5) .say { rotate: -0.5deg; margin-left: 10px; --pin-x: 24%; --fox-a: 85% 40%; --fox-b: 15% 10%; }
/* Two of the slips were torn from a longer sheet. */
.says li:nth-child(2) .say::after,
.says li:nth-child(4) .say::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 5px;
  background:
    linear-gradient(135deg, var(--ak-btn-fill) 33%, transparent 33%) 0 0 / 8px 5px,
    linear-gradient(225deg, var(--ak-btn-fill) 33%, transparent 33%) 0 0 / 8px 5px;
}
.say.is-lie { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 0 0 2px var(--ak-btn-ink); }
.say.is-lie .quote { text-decoration-color: var(--ak-btn-ink); }
.say.is-cleared { rotate: 0deg; background-image: none; background-color: color-mix(in srgb, var(--ak-btn-fill) 80%, var(--ak-ink-muted)); box-shadow: none; }
.say.is-cleared .who-dress,
.say.is-cleared .quote { color: var(--ak-btn-ink); }
.say.is-accusing { outline: 3px solid var(--ak-accent); outline-offset: 2px; border: 0; }

@media (prefers-reduced-motion: no-preference) {
  :root:not(.ac-still) .clue.is-next { animation: mm-candle 3200ms ease-in-out infinite; }
  @keyframes mm-candle {
    50% { box-shadow: 0 0 0 1px var(--bone), 0 6px 14px rgba(0, 0, 0, 0.45), 0 0 16px color-mix(in srgb, var(--ak-accent-2) 40%, transparent); }
  }
}

/* The start screen's pin, moved clear of the title. */
body #activity-start.site-shriversify .ak-sheet { padding-top: calc(var(--ak-space-5) + 10px); }
@media (orientation: landscape) and (max-height: 600px) {
  body #activity-start#activity-start.site-shriversify .ak-sheet::before { left: 90px; top: 8px; }
}

/* The ending: a page of the case file, foxed and candlelit, its corner turned. */
body #activity-chrome-ending.site-shriversify .ac-card {
  position: relative;
  background-color: var(--ak-surface);
  background-image:
    radial-gradient(ellipse 90% 40% at 50% 0%, color-mix(in srgb, var(--ak-accent-2) 22%, transparent), transparent 75%),
    linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--ak-accent-2) 10%, transparent));
  border: 1px solid color-mix(in srgb, var(--ak-accent-2) 55%, var(--ak-outline));
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.6),
    inset 0 0 0 7px var(--ak-surface),
    inset 0 0 0 8px color-mix(in srgb, var(--ak-accent-2) 45%, transparent);
}
body #activity-chrome-ending.site-shriversify .ac-card::after {
  content: '';
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 34px;
  height: 34px;
  background: linear-gradient(315deg, var(--ak-bg) 0 50%, color-mix(in srgb, var(--ak-accent-2) 50%, var(--ak-surface)) 50%);
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.3);
}
body #activity-chrome-ending.site-shriversify .ac-verdict { border-bottom-color: color-mix(in srgb, var(--ak-accent-2) 55%, var(--ak-outline)); }

/* Room, won back: the painted cards at their 44px, closer slips, a shorter row of portraits. */
:root { --icon: 44px; --gh: clamp(60px, 8.5dvh, 156px); }
.sheet { row-gap: 8px; }
.says { gap: 7px; }
.say { padding: 5px 10px 5px 12px; }
.page.is-tight .say { padding-top: 3px; padding-bottom: 3px; }
@media (orientation: landscape) { :root { --gh: clamp(54px, 15dvh, 176px); } }

/* ---------------------------------------------------------------------------------------------
   The clue tray as a contact sheet: a strip of square frames, each a foxed evidence card, and
   beneath it the captions, numbered to match, at full reading width.
   --------------------------------------------------------------------------------------------- */
.strip {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding: 2px 0 4px;
  border-bottom: 1px solid var(--ak-outline);
}
.strip > li { flex: 1 1 0; min-width: 44px; max-width: 64px; }
.strip .clue {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  min-height: 44px;
  padding: 2px;
  border: 1.5px solid var(--ak-outline);
  background: var(--ak-bg);
}
.strip .clue .icon { float: none; display: block; width: 100%; height: 100%; margin: 0; }
.strip .clue .num {
  position: absolute;
  left: -1px;
  bottom: -1px;
  min-width: 15px;
  padding: 0 3px;
  background: var(--ak-bg);
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-size: 11px;
  line-height: 15px;
}
.strip .clue.is-selected { border-color: var(--ak-accent); box-shadow: inset 0 0 0 2px var(--ak-accent), 0 0 0 2px var(--ak-accent); }
.strip .clue.is-next { border-color: var(--bone); box-shadow: 0 0 0 2px var(--bone), 0 5px 12px rgba(0, 0, 0, 0.5); }
.strip .clue.is-target { outline: 2px dashed var(--ak-accent); outline-offset: 1px; }
.strip .clue.has-guest { border-color: var(--ak-accent); }
.strip .clue.is-pointed { outline: 2px dashed var(--bone); outline-offset: 1px; }

.captions { margin: 0; padding: 4px 0 0; list-style: none; display: grid; gap: 2px; }
.caption {
  display: grid;
  grid-template-columns: 1.5em minmax(0, 1fr);
  gap: 4px;
  padding: 2px 6px 2px 3px;
  border-left: 3px solid transparent;
  color: var(--ak-ink);
  font-size: var(--fs);
  line-height: 1.3;
}
.caption .num { color: var(--bone); font-family: var(--ak-font-display); text-align: right; }
.caption .title { font-family: var(--ak-font-display); font-weight: 400; }
.caption .on { display: inline-flex; gap: 2px; vertical-align: 1px; }
.caption .on:empty { display: none; }
.caption .on span {
  display: inline-grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  padding: 0 2px;
  background: var(--ak-accent);
  color: var(--ak-choice-selected-ink);
  font-size: 10px;
  font-weight: 700;
}
.caption .next-label:empty { display: none; }
.caption .next-label {
  display: inline-block;
  margin-right: 5px;
  padding: 0 5px;
  border: 1px solid var(--bone);
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-size: 0.85em;
  line-height: 1.35;
  vertical-align: 1px;
}
.caption.is-next { border-left-color: var(--bone); background: var(--ak-surface); }
.caption.is-selected { border-left-color: var(--ak-accent); background: var(--ak-surface); }
.caption.is-pointed { border-left-color: var(--bone); }

/* The foot again holds the hint, the narrator's line and the sealed accusation. */
.foot.moves { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--gut); align-items: stretch; }
.foot.moves .accuse { flex: none; min-width: 112px; }
.foot.moves .line { min-height: 48px; font-size: calc(var(--fs) * 0.95); }

@media (prefers-reduced-motion: no-preference) {
  :root:not(.ac-still) .strip .clue.is-next { animation: mm-candle-frame 3200ms ease-in-out infinite; }
  @keyframes mm-candle-frame {
    50% { box-shadow: 0 0 0 2px var(--bone), 0 5px 12px rgba(0, 0, 0, 0.5), 0 0 16px color-mix(in srgb, var(--ak-accent-2) 45%, transparent); }
  }
}

/* The statements pinned in two columns, like notes on a board; each keeps its own tilt and pin. */
.says { display: block; columns: 2; column-gap: 10px; padding-top: 6px; }
.says > li { break-inside: avoid; margin-bottom: 9px; }
.says > li:last-child { margin-bottom: 0; }
.says li .say { margin-left: 0; margin-right: 0; }
.says li:nth-child(even) .say { margin-top: 4px; }

/* Sideways, the quiet line about the run and the save sits under the board, level with the foot. */
@media (orientation: landscape) {
  .page { grid-template-areas: "board mast" "board tray" "kept foot"; grid-template-rows: auto auto auto; }
  .board { grid-row: 1 / span 2; }
  .kept { grid-area: kept; align-self: center; }
}

/* The wax pin holds the slip by its top edge, clear of the first line of words. */
.say .slip-pin { top: -10px; }
.say { padding-top: 7px; }

/* The tightest fit closes the captions up before the type gets any smaller. */
.page.is-tight .captions { gap: 0; padding-top: 2px; }
.page.is-tight .caption { line-height: 1.2; padding-top: 1px; padding-bottom: 1px; }
.page.is-tight .strip { padding-bottom: 2px; }
.page.is-tight .strip > li { max-width: 48px; }
@media (orientation: landscape) {
  /* The board's extra height goes to the tray's row, never into a gap under the logo. */
  .page { grid-template-rows: auto minmax(0, 1fr) auto; }
  .tray { align-self: start; }
}

/* The quiet line about the run and the save sits at the foot of the scene, under the pinned slips. */
.board .kept { grid-area: auto; margin-top: 2px; }
.page { grid-template-areas: "board" "tray" "foot"; grid-template-rows: auto auto auto; }
@media (orientation: landscape) {
  .page { grid-template-areas: "board mast" "board tray" "board foot"; grid-template-rows: auto minmax(0, 1fr) auto; }
  .board { grid-row: 1 / span 3; }
}
.last-time { white-space: nowrap; }

/* The crawl's title keeps its own place beside the lines, and the seal comes before the quick way in. */
@media (orientation: landscape) and (max-height: 600px) {
  body #activity-start#activity-start.site-shriversify .ak-scene .ak-head { position: static; margin: 0; }
  body #activity-start#activity-start.site-shriversify .ak-scene-actions { display: flex; flex-direction: column; align-items: center; }
  body #activity-start#activity-start.site-shriversify .ak-scene-actions .ak-go { order: 0; }
  body #activity-start#activity-start.site-shriversify .ak-scene-actions .ak-jump { order: 1; }
}
