/* The Loop Stair: a blueprint sheet. The painted stairwell runs edge to edge; everything else is a
   one-pixel ruled strip beside it. One registration red always means "look here". */

:root {
  --cream: var(--ak-bg);
  --ink: var(--ak-ink);
  --red: var(--ak-accent-2);
  --gap: 6px;
  --edge: 12px;
  --status: var(--ac-status-h, 60px);
}

* { box-sizing: border-box; }

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

body {
  background-color: var(--ak-bg);
  background-image: var(--ak-bg-art), var(--ak-backdrop-layer, none);
  background-size: var(--ak-bg-size), cover, cover;
  background-position: center, center top, center top;
  color: var(--ak-ink);
  font-family: var(--ak-font-body);
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; color: inherit; }

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

/* ---------- layout: the picture first; title, clue, list and footer are quiet rules around it ---------- */

/* Upright: the title, then the picture across the full width, the clue bar hung off its bottom
   edge, one quiet row of outlines, and a small footer. */
.play {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  grid-template-areas: "title" "board" "clue" "list" "foot";
  row-gap: var(--gap);
  padding:
    calc(var(--status) + 2px)
    env(safe-area-inset-right)
    max(6px, env(safe-area-inset-bottom))
    env(safe-area-inset-left);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.play[hidden] { display: none; }

.title-row {
  grid-area: title;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.logo {
  display: block;
  width: auto;
  height: clamp(40px, 7dvh, 60px);
}

.board {
  grid-area: board;
  min-height: 0;
  container-type: size;
  display: grid;
  place-items: end center;
}

.clue,
.strip,
.foot {
  margin-left: max(10px, env(safe-area-inset-left));
  margin-right: max(10px, env(safe-area-inset-right));
}

.clue { grid-area: clue; margin-top: calc(-1 * var(--gap)); }
.strip { grid-area: list; }
.foot { grid-area: foot; }

/* Sideways: clue and title on the left, the picture full height in the middle, the list on the
   right. The three sit together in the middle of the screen. */
@media (orientation: landscape) {
  .play {
    --left-w: min(320px, max(var(--chips-w, 270px), 200px));
    --list-w: 140px;
    grid-template-columns: var(--left-w) auto var(--list-w);
    grid-template-rows:
      calc(var(--status) - max(4px, env(safe-area-inset-top)))
      auto auto auto minmax(0, 1fr);
    grid-template-areas:
      ".     board ."
      "title board list"
      "clue  board list"
      "foot  board list"
      ".     board list";
    justify-content: center;
    column-gap: 12px;
    row-gap: 8px;
    padding:
      max(4px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(4px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .board {
    width: min(
      calc((100dvh - 8px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 0.75),
      calc(100dvw - var(--left-w) - var(--list-w) - 48px - env(safe-area-inset-left) - env(safe-area-inset-right))
    );
    height: 100%;
    place-items: center;
  }

  .title-row { justify-content: flex-start; }
  .logo { height: clamp(48px, 20dvh, 84px); }

  .clue,
  .strip,
  .foot { margin: 0; }

  .strip { align-self: start; }
  .foot { flex-wrap: wrap; }
}

/* ---------- the picture: a one-pixel ruled edge ---------- */

.frame {
  position: relative;
  width: min(100cqw, 100cqh * 0.75);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

@media (orientation: landscape) {
  .frame { border: 0; border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); }
}

.viewport { -webkit-touch-callout: none; }

/* The lens: hold the picture and a round loupe shows the spot under the finger, magnified, with
   a red crosshair on the exact point a lift will tap. */
.lens {
  position: absolute;
  z-index: 3;
  width: var(--lens, 136px);
  height: var(--lens, 136px);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--cream);
  overflow: hidden;
  pointer-events: none;
  background: var(--ink);
}

.lens[hidden] { display: none; }
.lens svg { display: block; width: 100%; height: 100%; }

.lens-cross {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--cream);
}

.lens-cross::before,
.lens-cross::after {
  content: '';
  position: absolute;
  background: var(--red);
}

.lens-cross::before { left: 50%; top: -10px; bottom: -10px; width: 2px; margin-left: -1px; }
.lens-cross::after { top: 50%; left: -10px; right: -10px; height: 2px; margin-top: -1px; }

/* ---------- the ending: the card is the one thing to read beside the picture ---------- */

.play.is-ended .clue,
.play.is-ended .strip,
.play.is-ended .foot { visibility: hidden; opacity: 0; pointer-events: none; }
.play.is-ended .strike { visibility: hidden; }

/* Upright, the card sits under the picture: the rows below fold away and the play area keeps the
   card's height free, so the picture (and the find in focus) stays in view above it. */
@media (orientation: portrait) {
  .play.is-ended .clue,
  .play.is-ended .strip,
  .play.is-ended .foot { display: none; }

  .play.is-ended { padding-bottom: var(--card-room, 0px); }
}

/* Sideways, the picture moves right and the card sits in the middle of the wide left column. */
@media (orientation: landscape) {
  .play.is-ended {
    grid-template-columns: calc(var(--left-w) + var(--list-w) + 12px) auto;
    grid-template-areas:
      ".     board"
      "title board"
      "clue  board"
      "foot  board"
      ".     board";
  }

  .play.is-ended .strip { display: none; }

  /* The title block on the picture carries the name; the card has the column to itself. */
  .play.is-ended .title-row { visibility: hidden; }

  html #activity-chrome-ending.site-expercepth {
    justify-content: center;
    padding-left: max(var(--edge), env(safe-area-inset-left));
  }

  html #activity-chrome-ending.site-expercepth .ac-card {
    max-width: min(440px, var(--dock-w, 420px));
  }
}

.viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
  outline-offset: 3px;
  background: var(--ink);
}

.scene {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  container-type: inline-size;
}

.scene.is-easing { transition: left 320ms cubic-bezier(0.22, 1, 0.36, 1), top 320ms cubic-bezier(0.22, 1, 0.36, 1), width 320ms cubic-bezier(0.22, 1, 0.36, 1), height 320ms cubic-bezier(0.22, 1, 0.36, 1); }

.loop {
  position: absolute;
  inset: 0;
}

.sheet,
.ink {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.sheet.is-copy { top: -100%; }

.ink { pointer-events: none; }


.ink [hidden] { display: none; }

/* ---------- find marks: ring, ticks, leader line, label ---------- */

.mark .ring {
  fill: none;
  stroke: var(--red);
  stroke-width: 7;
}

.mark .cross {
  stroke: var(--red);
  stroke-width: 5;
  stroke-linecap: square;
}

.mark .leader {
  fill: none;
  stroke: var(--cream);
  stroke-width: 3;
}

.mark .dot { fill: var(--red); }

.mark .tag { fill: var(--cream); stroke: var(--ink); stroke-width: 2; }

.mark .tag-text {
  fill: var(--ink);
  font-family: var(--ak-font-body);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hint-ring {
  fill: none;
  stroke: var(--red);
  stroke-width: 7;
  stroke-dasharray: 26 16;
}

.hint-cross { stroke: var(--red); stroke-width: 4; }

.teach-ring {
  fill: none;
  stroke: var(--red);
  stroke-width: 8;
}

.teach-arrow {
  fill: none;
  stroke: var(--red);
  stroke-width: 8;
  stroke-linecap: square;
}

.teach-arrow-head { fill: var(--red); }

.teach-backing { fill: none; stroke: var(--cream); stroke-width: 16; stroke-linecap: square; }

.ripple {
  fill: none;
  stroke: var(--cream);
  stroke-width: 4;
}

.press-back,
.miss-back { fill: none; stroke: var(--cream); stroke-width: 9; stroke-linecap: square; }
.press-ring { fill: none; stroke: var(--red); stroke-width: 4; }
.miss-ring { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: square; }
.miss.is-near .miss-ring { stroke-dasharray: 10 7; }

.reticle circle,
.reticle path {
  stroke: var(--red);
  stroke-width: 5;
}

.reticle .reticle-back { stroke: var(--cream); stroke-width: 11; }

/* Only finds are marked. Earlier finds keep a thin ring; the latest keeps the full crosshair. */
.mark:not(.is-latest) .ring { stroke-width: 3.5; }
.mark:not(.is-latest) .cross { display: none; }

/* The ending's focus pull: everything but the last find steps back under a wash of ink. */
.focus-dim { fill: var(--ink); opacity: 0.5; }

/* ---------- the trick, turned off ---------- */

.trick .panel { fill: var(--ink); stroke: var(--cream); stroke-width: 2; }
.trick .grid { stroke: color-mix(in srgb, var(--cream) 22%, transparent); stroke-width: 1.5; }
.trick .flight { fill: none; stroke: var(--cream); stroke-width: 5; stroke-linejoin: miter; }
.trick .base { stroke: color-mix(in srgb, var(--cream) 60%, transparent); stroke-width: 2; stroke-dasharray: 10 8; }
.trick .gap { stroke: var(--red); stroke-width: 4; stroke-dasharray: 12 8; }
.trick .dim { stroke: var(--red); stroke-width: 4; }
.trick .flight-g { transition: transform 1400ms cubic-bezier(0.22, 1, 0.36, 1); }
.trick .gap-g { opacity: 0; transition: opacity 500ms ease 1100ms; }
.trick.is-apart .gap-g { opacity: 1; }

/* ---------- the title block stamp ---------- */

.stamp {
  position: absolute;
  right: 3.5%;
  bottom: 2.4%;
  width: 37%;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  background: var(--ak-surface);
  color: var(--ak-ink);
  border: 1px solid var(--ak-ink);
  outline: 1px solid var(--ak-surface);
  font-family: var(--ak-font-body);
  font-weight: 600;
  font-size: max(8px, 2.7cqw);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
}

.stamp[hidden] { display: none; }

.stamp-title {
  grid-column: 1 / -1;
  padding: 0.6em 0.6em 0.5em 1.7em;
  border-bottom: 1px solid var(--ak-ink);
  font-family: var(--ak-font-display);
  font-weight: var(--ak-title-weight);
  font-size: 1.2em;
  letter-spacing: 0.06em;
}

.stamp-cell { padding: 0.5em 0.6em; }

.stamp-cell + .stamp-cell { border-left: 1px solid var(--ak-ink); }

.stamp-dot {
  position: absolute;
  left: 0.6em;
  top: 0.95em;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--red);
}

/* ---------- the clue bar: what you are looking for, where, and Hint ---------- */

.clue {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 6px 6px 8px;
  border: 1px solid var(--ak-ink);
  border-left: 4px solid var(--red);
  background: var(--ak-surface);
  color: var(--ak-ink);
}

/* A small red pointer from the clue bar into the picture it describes. */
.clue::before {
  content: '';
  position: absolute;
  left: 24px;
  top: -9px;
  border: 8px solid transparent;
  border-bottom-color: var(--red);
  border-top: 0;
}

@media (orientation: landscape) {
  .clue::before {
    left: auto;
    right: -9px;
    top: 18px;
    border: 8px solid transparent;
    border-left-color: var(--red);
    border-right: 0;
  }
}

.clue-shape { flex: 0 0 auto; width: 40px; height: 40px; overflow: visible; }
.clue-shape image { filter: brightness(0); }
.clue-shape:empty { display: none; }

.clue-words {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.clue-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.clue-name:empty { display: none; }

/* Teaching uses the same bar, at teaching size. */
.clue.is-teach .clue-words { font-size: 18px; line-height: 1.32; }

@media (orientation: portrait) {
.clue.points-down::after {
  content: '';
  position: absolute;
  left: 24px;
  bottom: -11px;
  border: 10px solid transparent;
  border-top-color: var(--red);
  border-bottom: 0;
}
}

.look-chip {
  flex: 0 0 auto;
  display: inline-grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  min-height: 48px;
  min-width: 64px;
  max-width: 84px;
  padding: 4px 6px;
  border: 1px solid var(--ak-ink);
  border-radius: 2px;
  background: var(--ak-surface);
  color: var(--ak-ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--red);
  touch-action: manipulation;
}

.look-chip svg { width: 20px; height: 20px; color: var(--red); }
.look-chip:active { background: var(--ak-bg); }
.look-chip[hidden] { display: none; }
.look-chip.is-close .look-plus { d: path('M7 10h6'); }

.hint-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  min-width: 48px;
  padding: 0 10px;
  border: 1px solid var(--ak-ink);
  border-radius: 2px;
  background: var(--ak-surface);
  color: var(--ak-ink);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--red);
  touch-action: manipulation;
}

.hint-chip svg { width: 18px; height: 18px; color: var(--red); }
.hint-chip[hidden] { display: none; }
.hint-chip:active { background: var(--ak-bg); }
.hint-chip .wait { stroke-dasharray: 100; stroke-dashoffset: 0; }
.hint-chip.is-waiting { box-shadow: none; color: var(--ak-ink-muted); border-style: dashed; }
.hint-chip.is-waiting svg { color: var(--ak-ink-muted); }
.hint-chip.is-waiting .wait { stroke: var(--ak-ink); stroke-dashoffset: calc(100 - var(--waited, 0)); }

/* ---------- the list and footer: quiet one-pixel details ---------- */

.foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: var(--ak-ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.flight-tag { white-space: nowrap; }
.flight-tag.is-cleared { color: var(--red); }
.list-tip { flex: 1 1 auto; color: var(--ak-ink-muted); font-weight: 500; letter-spacing: 0.08em; text-align: right; }

/* Upright: one row of eight outlines; the names live in the clue bar and each button's label. */
.strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid color-mix(in srgb, var(--ak-ink) 45%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--ak-ink) 45%, transparent);
}

.strip li {
  position: relative;
  display: flex;
  border-right: 1px solid color-mix(in srgb, var(--ak-ink) 45%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--ak-ink) 45%, transparent);
  color: var(--ak-ink);
}

.strip .item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  width: 100%;
  min-height: 48px;
  padding: 3px 2px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.strip .outline { width: 30px; height: 30px; overflow: visible; }
.strip .name { display: none; }

/* Not found: the thing's exact outline, solid ink. Found: the painted thing, struck through. */
.strip .outline image { filter: brightness(0); opacity: 0.85; }
.strip li.is-found .outline image { filter: none; opacity: 0.5; }

.strip .strike {
  stroke: var(--red);
  stroke-width: 4;
  stroke-linecap: square;
  visibility: hidden;
}

.strip li.is-found .strike { visibility: visible; }
.strip .item:active { background: color-mix(in srgb, var(--ak-surface) 70%, transparent); }

/* The thing the clue bar is about. */
.strip li.is-target { outline: 2px solid var(--red); outline-offset: -2px; background: var(--ak-surface); }

/* Sideways the list has room for names: two columns, four rows. */
@media (orientation: landscape) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip .item { min-height: 64px; }
  .strip .name {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
  }
  .strip li.is-found .name { color: var(--ak-ink-muted); text-decoration: line-through; text-decoration-color: var(--red); }
}

/* The toast sits just above the clue bar, and taps pass through it to the picture: it is read, never pressed. */
html #activity-chrome-toast { pointer-events: none; font-size: 14px; letter-spacing: 0.1em; line-height: 1.35; }

html #activity-chrome-toast[data-at="bottom-center"] {
  bottom: calc(var(--strip-h, 0px) + 8px);
}

@media (orientation: landscape) {
  html #activity-chrome-toast[data-at="bottom-center"] {
    bottom: max(var(--edge), env(safe-area-inset-bottom));
    left: calc(var(--side-mid, 50vw));
    max-width: calc(var(--side-w, 50vw) - 4px);
    font-size: 13px;
    letter-spacing: 0.05em;
  }
}

/* Short upright screens: a smaller title so the picture keeps its room. */
@media (max-height: 700px) and (orientation: portrait) {
  .logo { height: 34px; }
  .clue { min-height: 50px; }
}

/* Short sideways screens: a tighter list and clue. */
@media (orientation: landscape) and (max-height: 420px) {
  .strip .item { min-height: 60px; }
  .strip .outline { width: 26px; height: 26px; }
  .clue { min-height: 48px; }
  .clue-words { font-size: 14px; }
}

/* ---------- the opening, over start.js's lens screen ---------- */

/* The stair shows plainly behind the opening, under a light veil of ink, not washed to cream. */
html #activity-start.site-expercepth.is-scene.has-backdrop::before {
  background-image:
    linear-gradient(color-mix(in srgb, var(--ak-ink) 22%, transparent), color-mix(in srgb, var(--ak-ink) 22%, transparent)),
    url("art/loop-stairwell.jpg");
  background-size: cover;
  background-position: center 30%;
}

/* The title, front and centre and large: cream capitals read clearly on the dark stair. */
html #activity-start#activity-start.site-expercepth.is-scene .ak-logo {
  max-width: min(88vw, 520px);
  max-height: min(36vh, 300px);
}

/* The lines sit on a ruled sheet so they read over the picture. */
html #activity-start.site-expercepth.is-scene .ak-scene-lines {
  padding: 14px 18px;
  border: 1px solid var(--ak-ink);
  border-left: 4px solid var(--ak-accent-2);
  background: var(--ak-surface);
  text-align: left;
}

html #activity-start.site-expercepth.is-scene .ak-scene-line { font-size: clamp(17px, 4.2vw, 24px); }

/* The lens to press: ringed in the one red that means "look here". */
html #activity-start.site-expercepth.is-scene .ak-go {
  box-shadow: 0 0 0 10px var(--ak-bg), 0 0 0 12px var(--ak-ink), 0 0 0 16px var(--ak-accent-2);
}

html #activity-start.site-expercepth.is-scene .ak-jump {
  padding: 10px 14px;
  border: 1px solid var(--ak-ink);
  background: var(--ak-surface);
  color: var(--ak-ink);
}

/* Sideways: the title large on the left, the lines and the lens on the right, all inside the
   screen height. (Doubled ids: start.js adds its own rules after this sheet.) */
@media (orientation: landscape) and (max-height: 600px) {
  html #activity-start#activity-start.site-expercepth.is-scene { padding: 10px 24px; }

  html #activity-start#activity-start.site-expercepth.is-scene .ak-scene {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-areas: "head lines" "head actions";
    align-content: center;
    align-items: center;
    justify-items: center;
    column-gap: 24px;
    row-gap: 10px;
    min-height: calc(100dvh - 20px);
  }

  html #activity-start#activity-start.site-expercepth.is-scene .ak-head { grid-area: head; }
  html #activity-start#activity-start.site-expercepth.is-scene .ak-scene-lines { grid-area: lines; padding: 10px 14px; gap: 6px; }
  html #activity-start#activity-start.site-expercepth.is-scene .ak-scene-actions { grid-area: actions; flex-direction: row; gap: 28px; }
  html #activity-start#activity-start.site-expercepth.is-scene .ak-logo { max-height: min(70dvh, 300px); max-width: 42vw; }
  html #activity-start#activity-start.site-expercepth.is-scene .ak-scene-line { font-size: clamp(13px, 3.6dvh, 19px); line-height: 1.25; }
  html #activity-start#activity-start.site-expercepth.is-scene .ak-go { width: min(96px, 24dvh); height: min(96px, 24dvh); margin: 16px; font-size: 12px; letter-spacing: 0.2em; }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* The opening: the stair comes into focus like a print, and a red plotter line sweeps the sheet once. */
  :root:not(.ac-still) #activity-start.site-expercepth.is-scene.has-backdrop::before {
    animation: ls-focus 1600ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  :root:not(.ac-still) #activity-start.site-expercepth.is-scene.has-backdrop::after {
    background-image:
      linear-gradient(to bottom, transparent calc(50% - 1px), var(--ak-accent-2) calc(50% - 1px), var(--ak-accent-2) calc(50% + 1px), transparent calc(50% + 1px)),
      var(--ak-bg-art, none);
    background-size: 100% 200%, var(--ak-bg-size, auto);
    background-repeat: no-repeat, repeat;
    animation: ls-sweep 1400ms cubic-bezier(0.65, 0, 0.35, 1) 200ms both;
  }
  :root:not(.ac-still) #activity-start.site-expercepth.is-scene .ak-go::after {
    content: '';
    position: absolute;
    inset: -22px;
    border: 2px solid var(--ak-accent-2);
    border-radius: 50%;
    animation: ls-lens 1800ms ease-out 1800ms infinite;
    pointer-events: none;
  }
  :root:not(.ac-still) .focus-dim { animation: ls-dim 700ms ease-out both; }
  :root:not(.ac-still) .mark .ring { stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
  :root:not(.ac-still) .mark .leader { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 420ms ease-out 260ms forwards; }
  :root:not(.ac-still) .mark .label { opacity: 0; animation: appear 240ms ease-out 560ms forwards; }
  :root:not(.ac-still) .mark .cross { opacity: 0; animation: appear 200ms ease-out 400ms forwards; }
  :root:not(.ac-still) .piece.is-settling { transform-box: fill-box; transform-origin: center; animation: settle 460ms cubic-bezier(0.34, 1.4, 0.64, 1); }
  :root:not(.ac-still) .marks-all-lit .ring { animation: draw 1ms forwards, lit 900ms ease-in-out 2; }
  :root:not(.ac-still) .ripple { animation: ripple 560ms ease-out forwards; transform-box: fill-box; transform-origin: center; }
  :root:not(.ac-still) .teach-ring { transform-box: fill-box; transform-origin: center; animation: pulse 1300ms ease-in-out infinite; }
  :root:not(.ac-still) .hint-ring { transform-box: fill-box; transform-origin: center; animation: hint-in 520ms cubic-bezier(0.22, 1, 0.36, 1); }
  :root:not(.ac-still) .loop.is-looping { transition: transform 2000ms cubic-bezier(0.65, 0, 0.35, 1); }
  :root:not(.ac-still) .scene.is-soft { filter: blur(3px); }
  :root:not(.ac-still) .scene.is-sharpening { transition: filter 700ms ease-out; }
  :root:not(.ac-still) .stamp.is-stamped { animation: stamp 460ms cubic-bezier(0.34, 1.3, 0.64, 1) both; }
  :root:not(.ac-still) .strip li.is-found.is-new .outline image { animation: fill-in 420ms ease-out; }
  :root:not(.ac-still) .mark.is-quiet .ring,
  :root:not(.ac-still) .mark.is-quiet .leader,
  :root:not(.ac-still) .mark.is-quiet .label,
  :root:not(.ac-still) .mark.is-quiet .cross { animation: none; stroke-dashoffset: 0; opacity: 1; }
  :root:not(.ac-still) .press { animation: press-in 160ms ease-out; transform-box: fill-box; transform-origin: center; }
  :root:not(.ac-still) .strip li.is-found.is-new .strike { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 300ms ease-out 180ms forwards; }
  :root:not(.ac-still) .strip li.is-target { animation: target-in 260ms ease-out; }
  :root:not(.ac-still) .strip.is-settling li { animation: settle-cell 360ms cubic-bezier(0.34, 1.4, 0.64, 1) both; animation-delay: calc(var(--i) * 70ms); }
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ls-focus { from { filter: blur(14px) saturate(0.3) brightness(1.5); transform: scale(1.06); } to { filter: none; transform: none; } }
@keyframes ls-sweep { from { background-position: 0 100%, 0 0; } to { background-position: 0 -2%, 0 0; } }
@keyframes ls-lens { 0% { transform: scale(0.92); opacity: 0.9; } 70%, 100% { transform: scale(1.18); opacity: 0; } }
@keyframes ls-dim { from { opacity: 0; } to { opacity: 0.5; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { 0% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes lit { 0%, 100% { stroke-width: 7; } 50% { stroke-width: 14; } }
@keyframes ripple { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes hint-in { from { transform: scale(1.25); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes stamp { 0% { transform: scale(1.5); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fill-in { from { filter: brightness(0); opacity: 0.88; } to { filter: none; opacity: 0.55; } }
@keyframes press-in { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes target-in { from { outline-color: transparent; } to { outline-color: var(--red); } }
@keyframes settle-cell { 0% { transform: translateY(-4px); } 100% { transform: none; } }
