/* Shoe Rack Contours: one scene. A graph-paper sheet taped to the blue planks, a torn caption strip under
   it, the shoe rack on the floor and the tools as tilted paper chips along one edge. */

:root {
  --src-wobble: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --src-wobble-2: 15px 225px 15px 255px / 255px 15px 225px 15px;
  /* Upright, thirteen chips run down one edge: full size whenever the height allows, gaps go first. */
  --src-chip: clamp(44px, calc((100dvh - var(--ac-status-h, 64px) - 40px) / 13), 48px);
  --src-chip-gap: clamp(0px, calc((100dvh - 760px) / 20), 3px);
  --src-group-gap: clamp(4px, calc((100dvh - 700px) / 10), 10px);
  --src-gap: 8px;
  --src-tape: url("./art/pin-and-tape.png");
  --src-ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --src-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --src-grid: color-mix(in srgb, var(--ak-accent-2) 16%, var(--ak-outline));
}

* { box-sizing: border-box; }

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

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

button { font: inherit; color: inherit; }

/* ---------- the scene grid ---------- */

.src {
  position: fixed;
  inset: 0;
  margin: 0 auto;
  max-width: 1180px;
  display: grid;
  grid-template-columns: calc(var(--src-chip) + 20px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "tools logo"
    "tools sheet"
    "tools caption"
    "tools rack";
  column-gap: 4px;
  row-gap: var(--src-gap);
  padding:
    calc(var(--ac-status-h, 64px) + 2px)
    max(10px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom))
    max(4px, env(safe-area-inset-left));
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* The planks: faint cobalt grooves over the washed wall picture. */
.src::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(11.11% - 3px), color-mix(in srgb, var(--ak-accent-2) 22%, transparent) calc(11.11% - 3px) 11.11%),
    color-mix(in srgb, var(--ak-accent-2) 9%, transparent);
}

.src-wall { display: contents; }

.src-logo {
  grid-area: logo;
  justify-self: center;
  display: block;
  height: clamp(24px, 3.4dvh, 32px);
  width: auto;
  max-width: 100%;
  rotate: -2deg;
  pointer-events: none;
}

@media (orientation: landscape) {
  /* Sideways the tools run along the bottom: full-size chips with room between them whenever the width allows. */
  :root {
    --src-row: calc(100dvw - env(safe-area-inset-left) - env(safe-area-inset-right) - 24px);
    --src-chip: clamp(44px, calc((var(--src-row) - 60px) / 16), 50px);
    --src-chip-gap: clamp(3px, calc((var(--src-row) - 700px) / 12), 12px);
    --src-group-gap: clamp(10px, calc((var(--src-row) - 640px) / 8), 30px);
  }
  .src {
    grid-template-columns: minmax(0, 1fr) minmax(244px, 34%);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "sheet logo"
      "sheet caption"
      "sheet rack"
      "tools tools";
    column-gap: 14px;
  }
  .src-logo { height: clamp(28px, 9dvh, 56px); }
}

/* ---------- the sheet ---------- */

.src-sheet {
  grid-area: sheet;
  position: relative;
  min-height: 0;
  min-width: 0;
  margin: 6px 4px 2px;
  background-color: var(--ak-bg);
  background-image:
    linear-gradient(var(--src-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--src-grid) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
  box-shadow: 3px 5px 0 color-mix(in srgb, var(--ak-ink) 16%, transparent);
  touch-action: none;
  outline: none;
  cursor: crosshair;
}
.src-sheet:focus-visible { box-shadow: 0 0 0 4px var(--ak-focus); }

.src-wobble {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.src-wobble path { fill: none; stroke: var(--ak-ink); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }

.src-tape {
  position: absolute;
  z-index: 3;
  width: 64px;
  height: 20px;
  background-image: var(--src-tape);
  background-repeat: no-repeat;
  background-size: 104.8% 404%;
  background-position: 11.8% 25.9%;
  pointer-events: none;
}
.src-tape-tl { top: -9px; left: -18px; rotate: -38deg; }
.src-tape-tr { top: -9px; right: -18px; rotate: 36deg; }
.src-tape-bl { bottom: -9px; left: -18px; rotate: 34deg; }
.src-tape-br { bottom: -9px; right: -18px; rotate: -40deg; }

/* The look timer: a pencil line across the top that shrinks from both ends toward the middle. */
.src-timer {
  position: absolute;
  top: 56px;
  left: 92px;
  right: 7%;
  height: 10px;
  z-index: 2;
  pointer-events: none;
}
.src-timer-line {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: var(--ak-ink-muted);
  box-shadow: inset 0 -2px 0 var(--ak-ink);
  transform: scaleX(var(--src-left, 1));
  transform-origin: 50% 50%;
}
.src-timer-line::before,
.src-timer-line::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 6px;
  height: 14px;
  border-radius: 2px;
  background: var(--ak-accent);
  border: 2px solid var(--ak-ink);
}
.src-timer-line::before { left: -3px; }
.src-timer-line::after { right: -3px; }
.src:not([data-phase="look"]) .src-timer { visibility: hidden; }

.src-stage {
  position: absolute;
  inset: 80px 12px 12px;
}

.src-shoe {
  position: absolute;
  background-repeat: no-repeat;
  pointer-events: none;
}

.src-look-shoe { visibility: hidden; }
.src[data-phase="look"] .src-look-shoe { visibility: visible; }

/* The blind draw's top strip sits where the countdown was: the same place says what to do now. */
.src-blank-note {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 12px;
  right: 12px;
  margin: 0;
  padding: 4px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ak-surface);
  border: 3px solid var(--ak-ink);
  border-radius: var(--src-wobble);
  box-shadow: 3px 3px 0 var(--ak-accent);
  color: var(--ak-ink);
  text-align: center;
  rotate: -1deg;
  pointer-events: none;
}
.src-blank-note[hidden] { display: none; }
.src-blank-pencil { flex: 0 0 36px; width: 36px; height: 36px; }
.src-blank-pencil path { fill: var(--ak-accent); stroke: var(--ak-ink); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
/* Two lines: first that the shoe is hidden, then the plan's own words. */
.src-blank-words { display: flex; flex-direction: column; align-items: center; }
.src-blank-head { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.2; }
.src-blank-main {
  margin: 0;
  font-family: var(--ak-font-display);
  font-weight: 700;
  font-size: clamp(24px, 5.4vmin, 34px);
  line-height: 1.05;
}

/* The press-here target in the middle of the empty paper. */
.src-target {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(92%, 300px);
  translate: -50% -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.src-target[hidden] { display: none; }
/* The example: one line traced all the way round a shoe, starting at the yellow dot. */
.src-target-dot {
  width: 150px;
  height: 92px;
  padding: 6px 8px;
  border: 3px dashed var(--ak-accent-2);
  border-radius: 14px;
  background: var(--ak-surface);
}
.src-demo-line { fill: none; stroke: var(--ak-ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.src-demo-tip { fill: var(--ak-accent); stroke: var(--ak-ink); stroke-width: 2.5; }
.src-target-main,
.src-target-sub {
  margin: 0;
  padding: 0 10px;
  background: var(--ak-surface);
  color: var(--ak-ink);
  text-align: center;
  border-radius: 3px;
}
.src-target-main { font-family: var(--ak-font-display); font-weight: 700; font-size: clamp(26px, 6vmin, 34px); line-height: 1.1; }
.src-target-sub { font-size: 16px; font-weight: 700; line-height: 1.3; }
/* While the finger is down the cues step aside (visibility, so no entrance animation can hold them on screen). */
.src.is-drawing .src-blank-note,
.src.is-drawing .src-target,
.src.is-drawing .src-area-tag { visibility: hidden; }

/* The look's label beside the countdown: what the line and the number mean. */
.src-look-label {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 92px;
  right: 7%;
  margin: 0;
  padding: 0 8px;
  background: var(--ak-surface);
  color: var(--ak-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  border-radius: 3px;
  pointer-events: none;
}
.src:not([data-phase="look"]) .src-look-label { visibility: hidden; }

.src-ripples { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
/* Keyboard drawing only: one pencil-tip mark where the pen is. It moves; it never leaves a trail. */
.src-pen {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2px solid var(--ak-ink);
  background: var(--ak-accent);
}
.src-ripple {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ak-ink-muted) 70%, transparent);
  opacity: 0.8;
}

/* ---------- the reveal ---------- */

.src-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.src-reveal[hidden] { display: none; }
.src-panes {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.src-panes.is-stacked { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
.src-pane {
  position: relative;
  margin: 0;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.src-pane-art {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.src-pane-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.src-pane figcaption {
  align-self: center;
  padding: 0 10px;
  background: var(--ak-surface);
  color: var(--ak-ink-muted);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--src-wobble-2);
}
.src-pane + .src-pane .src-pane-art {
  border-left: 2px dashed color-mix(in srgb, var(--ak-ink) 30%, transparent);
}
.src-panes.is-stacked .src-pane + .src-pane .src-pane-art {
  border-left: 0;
  border-top: 2px dashed color-mix(in srgb, var(--ak-ink) 30%, transparent);
}

.src-reveal-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.src-lace {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin: 0;
  padding: 6px 54px 4px 16px;
  min-height: 48px;
  background: var(--ak-surface);
  border: 2px solid var(--ak-ink);
  border-radius: 4px 18px 18px 4px;
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-weight: 700;
  rotate: -2deg;
}
.src-lace::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: 34px;
  height: 14px;
  translate: 0 -50%;
  rotate: -80deg;
  background-image: var(--src-tape);
  background-size: 104.8% 404%;
  background-position: 11.8% 25.9%;
}
.src-lace-num { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.src-lace-unit { font-size: 22px; }
.src-bow {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 46px;
  height: 28px;
  translate: 0 -50%;
}
.src-bow path {
  fill: none;
  stroke: var(--ak-accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  paint-order: stroke;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
}
.src-lace.is-tied .src-bow path { stroke-dashoffset: 0; }

.src-next {
  position: relative;
  min-height: 52px;
  min-width: 48px;
  padding: 0 20px;
  border: 3px solid var(--ak-ink);
  border-radius: var(--src-wobble);
  background: var(--ak-btn-fill);
  color: var(--ak-btn-ink);
  font-family: var(--ak-font-display);
  font-weight: 700;
  font-size: 24px;
  box-shadow: 3px 4px 0 var(--ak-accent);
  rotate: 1.5deg;
  flex: 0 0 auto;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}
.src-next:hover { background: var(--ak-btn-hover); }
.src-next:active { background: var(--ak-btn-active); }
.src-next:focus-visible { outline: 3px solid var(--ak-focus); outline-offset: 3px; }

/* ---------- the pinboard (the last beat on the sheet) ---------- */

.src-pinboard {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 10px 4px 4px;
}
.src-pinboard[hidden] { display: none; }
.src-pinboard.is-column { grid-template-columns: 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); }
.src-print {
  position: relative;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 8px 8px;
  background: var(--ak-surface);
  border: 2px solid var(--ak-ink);
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--ak-ink) 30%, transparent);
}
.src-print:nth-child(1) { rotate: -2.5deg; }
.src-print:nth-child(2) { rotate: 1.5deg; }
.src-print:nth-child(3) { rotate: -1deg; }
.src-print-art { position: relative; flex: 1 1 auto; min-height: 0; }
.src-print-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.src-print-pin {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 28px;
  height: 24px;
  translate: -50% 0;
  background-image: var(--src-tape);
  background-repeat: no-repeat;
  background-size: 314.5% 384%;
  background-position: 7.57% 70.4%;
}
.src-print-tag {
  align-self: center;
  margin: 4px 0 0;
  padding: 0 10px;
  background: var(--ak-surface);
  border: 2px solid var(--ak-ink);
  border-radius: 3px 14px 14px 3px;
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-weight: 700;
  font-size: 20px;
  white-space: nowrap;
  rotate: -2deg;
}

/* ---------- the guide (first sitting) ---------- */

.src-guide { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.src-guide[hidden] { display: none; }
.src-guide-ring {
  position: absolute;
  border: 4px solid var(--ak-accent);
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--ak-ink);
}


/* ---------- the caption strip ---------- */

.src-caption-row {
  grid-area: caption;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.src-caption {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 8px 12px 8px 16px;
  background: var(--ak-surface);
  color: var(--ak-ink);
  /* A torn edge of fixed depth, so a tall strip tears the same as a short one. */
  clip-path: polygon(0% 6px, 4% 0, 9% 5px, 15% 1px, 22% 6px, 30% 0, 37% 5px, 45% 1px, 52% 6px, 60% 0, 68% 5px, 75% 1px, 83% 6px, 90% 0, 96% 5px, 100% 1px,
    100% calc(100% - 5px), 96% 100%, 90% calc(100% - 6px), 83% 100%, 76% calc(100% - 5px), 68% calc(100% - 1px), 60% calc(100% - 6px), 52% 100%, 45% calc(100% - 5px), 37% 100%, 30% calc(100% - 6px), 22% calc(100% - 1px), 15% calc(100% - 5px), 8% 100%, 3% calc(100% - 6px), 0% calc(100% - 1px));
  filter: drop-shadow(0 2px 0 color-mix(in srgb, var(--ak-ink) 25%, transparent));
}
.src-caption-text {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--ak-font-display);
  font-weight: 700;
  font-size: clamp(19px, calc(1.2dvh + 1.4vw + 6px), 25px);
  line-height: 1.12;
}
.src-hint {
  flex: 0 0 auto;
  min-width: 56px;
  min-height: 48px;
  padding: 0 10px;
  border: 2px solid var(--ak-ink);
  border-radius: var(--src-wobble);
  background: var(--ak-choice-bg);
  color: var(--ak-choice-ink);
  font-weight: 700;
  font-size: 16px;
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--ak-ink) 40%, transparent);
  rotate: 2deg;
  cursor: pointer;
  touch-action: manipulation;
}
.src-hint:hover { background: var(--ak-choice-selected-bg); color: var(--ak-choice-selected-ink); }
.src-hint:focus-visible { outline: 3px solid var(--ak-focus); outline-offset: 2px; }

/* ---------- the rack ---------- */

.src-rack {
  grid-area: rack;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.src-rack-shoes {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: clamp(62px, 9dvh, 84px);
  padding: 0 10px 14px;
  overflow: hidden;
}
/* The front rail and two legs of a pine rack, drawn flat. */
.src-rack-shoes::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  z-index: 2;
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, color-mix(in srgb, var(--ak-ink) 14%, transparent) 22px 24px),
    color-mix(in srgb, var(--ak-accent) 52%, var(--ak-surface));
  border: 2px solid var(--ak-ink);
  border-radius: 3px;
}
.src-rack-slot {
  position: relative;
  flex: 0 0 30%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.src-rack-shoe {
  position: relative;
  transform-origin: 50% 100%;
}
.src-rack-shoe .src-shoe { position: absolute; inset: 0; }
.src-rack-slot.is-out .src-rack-shoe { opacity: 0; }
.src-rack-tag {
  position: absolute;
  z-index: 3;
  bottom: -2px;
  left: 50%;
  translate: -50% 0;
  padding: 0 6px;
  background: var(--ak-surface);
  border: 2px solid var(--ak-ink);
  border-radius: 3px 10px 10px 3px;
  color: var(--ak-ink);
  font-family: var(--ak-font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
  rotate: -3deg;
}
.src[data-phase="blind"] .src-rack-shoe { translate: 0 72%; }
.src[data-phase="look"] .src-rack-slot:nth-child(odd) .src-rack-shoe { rotate: -7deg; scale: 1.06; }
.src[data-phase="look"] .src-rack-slot:nth-child(even) .src-rack-shoe { rotate: 6deg; scale: 1.06; }

.src-kept {
  align-self: center;
  margin: 0;
  padding: 1px 10px;
  background: var(--ak-surface);
  color: var(--ak-ink-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--src-wobble-2);
  text-align: center;
}
.src-kept.is-trouble { color: var(--ak-ink); outline: 2px dashed var(--ak-accent-2); }
.src-kept:empty { display: none; }

/* ---------- the tools: tilted paper chips along one edge ---------- */

.src-tools {
  grid-area: tools;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: var(--src-group-gap);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 6px 3px;
  align-items: flex-start;
}
.src-tool-group { display: flex; flex-direction: column; align-items: center; gap: var(--src-chip-gap); }

@media (orientation: landscape) {
  .src-tools { flex-direction: row; align-items: center; overflow-x: auto; overflow-y: hidden; padding: 8px 4px 13px; }
  .src-tool-group { flex-direction: row; }
}

.src-chip {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: var(--src-chip);
  height: var(--src-chip);
  padding: 0;
  border: 2px solid var(--ak-ink);
  border-radius: var(--src-wobble);
  background: var(--ak-surface);
  color: var(--ak-ink);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--ak-ink) 40%, transparent);
  cursor: pointer;
  touch-action: manipulation;
  rotate: -3deg;
}
.src-chip:nth-child(even) { rotate: 2.5deg; border-radius: var(--src-wobble-2); }
.src-chip:nth-child(3n) { rotate: -1deg; }
/* A tiny square of tape holds each chip. */
.src-chip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 18px;
  height: 9px;
  translate: -50% 0;
  rotate: 6deg;
  background-image: var(--src-tape);
  background-size: 104.8% 404%;
  background-position: 11.8% 25.9%;
}
.src-chip:hover { background: color-mix(in srgb, var(--ak-accent) 14%, var(--ak-surface)); }
.src-chip:focus-visible { outline: 3px solid var(--ak-focus); outline-offset: 2px; }
.src-chip[aria-checked="true"] {
  border-width: 3px;
  box-shadow: 3px 3px 0 var(--ak-ink);
}
/* The chosen chip gets the yellow tape tab. */
.src-chip[aria-checked="true"]::after {
  content: '';
  position: absolute;
  z-index: 2;
  right: -13px;
  top: 50%;
  width: 18px;
  height: 10px;
  translate: 0 -50%;
  background-image: var(--src-tape);
  background-repeat: no-repeat;
  background-size: 203.3% 457%;
  background-position: 90.9% 72.3%;
}
@media (orientation: landscape) {
  .src-chip[aria-checked="true"]::after { right: auto; left: 50%; top: auto; bottom: -11px; translate: -50% 0; rotate: 90deg; }
}
.src-chip[data-locked="true"] { border-style: dashed; box-shadow: none; }
.src-chip[data-locked="true"] > * { opacity: 0.45; }
.src-chip[data-off="true"] { border-style: dashed; box-shadow: none; }
.src-chip[data-off="true"] > * { opacity: 0.45; }

.src-dot { display: block; border-radius: 50%; background: var(--src-ink, var(--ak-ink)); box-shadow: 0 0 0 2px var(--ak-surface), 0 0 0 3px var(--ak-ink); }
.src-dab { width: 72%; height: 72%; }
.src-dab path { stroke: var(--ak-ink); stroke-width: 2.2; stroke-linejoin: round; }
.src-chip-act { grid-template-rows: auto auto; align-content: center; gap: 0; }
.src-chip-act svg { width: 24px; height: 24px; }
.src-chip-act svg path { fill: none; stroke: var(--ak-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.src-chip-act span { font-size: 13px; font-weight: 700; line-height: 1; }

/* ---------- in-page sheets: ask once, and the shelf viewer ---------- */

.src-ask,
.src-viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--ak-bg) 72%, transparent);
}
.src-viewer { z-index: 60; }
.src-ask[hidden], .src-viewer[hidden] { display: none; }
.src-ask-paper,
.src-viewer-paper {
  position: relative;
  width: min(100%, 420px);
  max-height: 100%;
  overflow-y: auto;
  padding: 26px 22px 18px;
  background: var(--ak-surface);
  color: var(--ak-ink);
  border: 2px solid var(--ak-ink);
  border-radius: var(--src-wobble-2);
  box-shadow: 4px 4px 0 var(--ak-ink);
  rotate: -1deg;
}
.src-viewer-paper { width: min(100%, 560px); display: flex; flex-direction: column; gap: 10px; }
.src-ask-paper::before,
.src-viewer-paper::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 96px;
  height: 26px;
  translate: -50% 0;
  rotate: -3deg;
  background-image: var(--src-tape);
  background-size: 104.8% 404%;
  background-position: 11.8% 25.9%;
}
.src-ask-paper h2,
.src-viewer-paper h2 { margin: 0 0 6px; font-family: var(--ak-font-display); font-size: 32px; line-height: 1.05; }
.src-ask-paper p { margin: 0 0 16px; font-size: 17px; line-height: 1.4; }
.src-viewer-paper canvas { width: 100%; height: min(52dvh, 340px); flex: 0 0 auto; }
@media (max-height: 500px) {
  .src-viewer-paper, .src-ask-paper { padding-top: 18px; padding-bottom: 12px; }
  .src-viewer-paper { gap: 6px; }
  .src-viewer-paper h2, .src-ask-paper h2 { font-size: 26px; margin-bottom: 0; }
  .src-viewer-paper canvas { height: 36dvh; }
  .src-viewer-line { font-size: 15px; }
}
.src-viewer-line { margin: 0; font-size: 17px; line-height: 1.4; }
.src-ask-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.src-ask-yes,
.src-ask-no {
  min-height: 52px;
  min-width: 48px;
  padding: 0 18px;
  border: 3px solid var(--ak-ink);
  border-radius: var(--src-wobble);
  font-family: var(--ak-font-display);
  font-weight: 700;
  font-size: 22px;
  cursor: pointer;
  touch-action: manipulation;
}
.src-ask-yes { background: var(--ak-btn-fill); color: var(--ak-btn-ink); rotate: 1deg; }
.src-ask-yes:hover { background: var(--ak-btn-hover); }
.src-ask-no { background: var(--ak-choice-bg); color: var(--ak-choice-ink); rotate: -1deg; }
.src-ask-no:hover { background: var(--ak-choice-selected-bg); color: var(--ak-choice-selected-ink); }
.src-ask-yes:focus-visible, .src-ask-no:focus-visible { outline: 3px solid var(--ak-focus); outline-offset: 3px; }

/* ---------- the shelf, on the start screen ---------- */

#activity-start .src-shelf {
  position: relative;
  margin: 40px 0 8px;
  padding: 26px 16px 14px;
  background: var(--ak-surface);
  color: var(--ak-ink);
  border: 2px solid var(--ak-ink);
  border-radius: var(--src-wobble-2);
  rotate: 0.6deg;
}
#activity-start .src-shelf::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 96px;
  height: 24px;
  translate: -50% 0;
  rotate: 2deg;
  background-image: var(--src-tape);
  background-size: 104.8% 404%;
  background-position: 11.8% 25.9%;
}
#activity-start .src-shelf h2 { margin: 0 0 10px; font-family: var(--ak-font-display); font-size: 30px; rotate: -1.5deg; }
#activity-start .src-shelf-list { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; list-style: none; }
#activity-start .src-shelf button.ak-jump.src-shelf-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 132px;
  min-height: 48px;
  margin: 0;
  padding: 6px 6px 4px;
  background: var(--ak-bg);
  color: var(--ak-ink);
  border: 2px solid var(--ak-ink);
  border-radius: 3px;
  box-shadow: 2px 3px 0 color-mix(in srgb, var(--ak-ink) 35%, transparent);
  font-family: var(--ak-font-display);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  rotate: -1.5deg;
}
#activity-start .src-shelf li:nth-child(even) button.ak-jump.src-shelf-item { rotate: 1.5deg; }
#activity-start .src-shelf button.ak-jump.src-shelf-item:hover { background: color-mix(in srgb, var(--ak-accent) 18%, var(--ak-bg)); }
#activity-start .src-shelf-item canvas { width: 118px; height: 80px; }
#activity-start .src-shelf-note { margin: 12px 0 0; color: var(--ak-ink-muted); font-size: 14px; }
#activity-start .src-shelf-empty { margin: 0; font-size: 16px; color: var(--ak-ink-muted); }

/* ---------- confetti of paper scraps ---------- */

.src-confetti { position: fixed; inset: 0; z-index: 31; pointer-events: none; overflow: hidden; }
.src-scrap { position: absolute; top: -20px; width: 12px; height: 7px; border: 1.5px solid var(--ak-ink); }

/* ---------- motion: only when the player has not asked for less ---------- */

@media (prefers-reduced-motion: no-preference) {
  :root:not(.ac-still) .src-chip { transition: scale 160ms var(--src-ease-pop), box-shadow 160ms ease; }
  :root:not(.ac-still) .src-chip:active { scale: 0.9; }
  :root:not(.ac-still) .src-chip.is-pop { animation: src-pop 300ms var(--src-ease-pop); }
  :root:not(.ac-still) .src-hint:active,
  :root:not(.ac-still) .src-next:active,
  :root:not(.ac-still) .src-ask-yes:active,
  :root:not(.ac-still) .src-ask-no:active { scale: 0.93; }
  :root:not(.ac-still) .src-next { animation: src-nudge 2.4s ease-in-out 1.2s infinite; }

  :root:not(.ac-still) .src-rack-shoe {
    transition: translate 360ms var(--src-ease-pop), rotate 420ms var(--src-ease-pop), scale 420ms var(--src-ease-pop), opacity 200ms ease;
    animation: src-bob 2.8s ease-in-out infinite;
  }
  :root:not(.ac-still) .src-rack-slot:nth-child(2) .src-rack-shoe { animation-delay: -0.9s; }
  :root:not(.ac-still) .src-rack-slot:nth-child(3) .src-rack-shoe { animation-delay: -1.8s; }
  :root:not(.ac-still) .src[data-phase="blind"] .src-rack-shoe { animation: none; }
  :root:not(.ac-still) .src-rack.is-popping .src-rack-shoe { animation: src-pop-up 520ms var(--src-ease-pop) both; }
  :root:not(.ac-still) .src-rack.is-wiggling .src-rack-shoe { animation: src-wiggle 520ms ease-in-out 3 both; }
  :root:not(.ac-still) .src-rack.is-wiggling .src-rack-slot:nth-child(2) .src-rack-shoe { animation-delay: 120ms; }
  :root:not(.ac-still) .src-rack.is-wiggling .src-rack-slot:nth-child(3) .src-rack-shoe { animation-delay: 240ms; }

  :root:not(.ac-still) .src[data-phase="look"] .src-look-shoe { animation: src-breathe 2.2s ease-in-out infinite; }
  :root:not(.ac-still) .src-reveal-shoe.is-peeking { animation: src-peek 700ms var(--src-ease-pop) both; }
  :root:not(.ac-still) .src-blank-note { animation: src-note-in 420ms var(--src-ease-pop) both; transition: opacity 180ms ease; }
  :root:not(.ac-still) .src-target { animation: src-rise-low 480ms var(--src-ease-pop) 120ms both; }
  :root:not(.ac-still) .src-demo-line { stroke-dasharray: 100; animation: src-trace 2.8s ease-in-out infinite; }
  :root:not(.ac-still) .src-ripple { animation: src-ripple 520ms var(--src-ease-out) forwards; }
  :root:not(.ac-still) .src-bow path { transition: stroke-dashoffset 640ms var(--src-ease-out); }
  :root:not(.ac-still) .src-lace.is-tied { animation: src-pop 360ms var(--src-ease-pop); }
  :root:not(.ac-still) .src-caption.is-new .src-caption-text { animation: src-ink 380ms var(--src-ease-out); }
  :root:not(.ac-still) .src-caption.is-turn { animation: src-flap 420ms var(--src-ease-pop); }
  :root:not(.ac-still) .src-guide-ring { animation: src-ring 1.2s ease-in-out infinite; }
  :root:not(.ac-still) .src-print { animation: src-pin-in 560ms var(--src-ease-pop) both; animation-delay: calc(var(--i, 0) * 280ms); }
  :root:not(.ac-still) .src-print-pin { animation: src-pin-push 360ms var(--src-ease-pop) both; animation-delay: calc(var(--i, 0) * 280ms + 380ms); }
  :root:not(.ac-still) .src-scrap { animation: src-fall var(--d, 2.2s) cubic-bezier(0.3, 0.1, 0.6, 1) var(--delay, 0s) forwards; }
  :root:not(.ac-still) .src-timer.is-low .src-timer-line { animation: src-tick 500ms ease-in-out infinite; }
  :root:not(.ac-still) .src-ask:not([hidden]) .src-ask-paper,
  :root:not(.ac-still) .src-viewer:not([hidden]) .src-viewer-paper { animation: src-pin-in 380ms var(--src-ease-pop) both; }
  :root:not(.ac-still) .src-logo { animation: src-sway 6s ease-in-out infinite; }
}

/* Under less motion a scrap or ripple never shows at all. */
:root.ac-still .src-scrap { display: none; }
@media (prefers-reduced-motion: reduce) { .src-scrap { display: none; } }

@keyframes src-pop { 0% { scale: 1; } 40% { scale: 1.16 0.86; } 70% { scale: 0.94 1.08; } 100% { scale: 1; } }
@keyframes src-nudge { 0%, 80%, 100% { translate: 0 0; } 88% { translate: 0 -4px; } 94% { translate: 0 1px; } }
@keyframes src-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes src-pop-up { 0% { translate: 0 72%; } 60% { translate: 0 -18%; scale: 0.92 1.12; } 100% { translate: 0 0; scale: 1; } }
@keyframes src-wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -10deg; } 75% { rotate: 10deg; } }
@keyframes src-breathe { 0%, 100% { scale: 1; } 50% { scale: 1.025 0.985; } }
@keyframes src-peek { 0% { rotate: 0deg; translate: 0 0; } 50% { rotate: 7deg; translate: 6% -4%; } 100% { rotate: 3deg; translate: 2% -1%; } }
@keyframes src-drop { from { opacity: 0; translate: -50% calc(-50% - 16px); } to { opacity: 1; translate: -50% -50%; } }
@keyframes src-note-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes src-ripple { from { scale: 0.4; opacity: 0.85; } to { scale: 2.2; opacity: 0; } }
@keyframes src-ink { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes src-flap { 0% { rotate: 0deg; } 35% { rotate: -1.4deg; translate: 0 -3px; } 100% { rotate: 0deg; translate: 0 0; } }
@keyframes src-ring { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: 1.08; opacity: 0.75; } }
@keyframes src-pin-in { 0% { opacity: 0; translate: 0 -40px; scale: 1.08; } 70% { opacity: 1; translate: 0 4px; scale: 0.98; } 100% { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes src-pin-push { 0% { opacity: 0; scale: 2.4; } 70% { opacity: 1; scale: 0.85; } 100% { scale: 1; } }
@keyframes src-fall { 0% { translate: 0 0; rotate: 0deg; opacity: 1; } 100% { translate: var(--dx, 0px) 110dvh; rotate: var(--r, 540deg); opacity: 1; } }
@keyframes src-tick { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes src-sway { 0%, 100% { rotate: -2deg; } 50% { rotate: -0.5deg; } }

/* Sideways: the caption strip gets the side column's whole width and Hint moves up beside the logo.
   Kept last so it wins over the upright rules above. */
@media (orientation: landscape) {
  .src-caption-row { display: contents; }
  .src-caption { grid-area: caption; align-self: center; max-height: 100%; min-height: 0; overflow-y: auto; }
  .src-hint { grid-area: logo; justify-self: end; align-self: center; }
  .src-logo { justify-self: start; margin-left: 6px; }
}

/* A small phone on its side: every pixel of height goes to the sheet and the caption. */
@media (orientation: landscape) and (max-height: 420px) {
  .src { row-gap: 4px; }
  .src-logo { height: 28px; }
  .src-rack-shoes { height: 48px; padding-bottom: 12px; }
  .src-rack-shoes::after { height: 13px; }
  .src-kept { font-size: 12px; }
  .src-caption { padding: 4px 10px 4px 12px; min-height: 48px; }
  .src-caption-text { line-height: 1.04; }
}

/* ---------- the seconds badge beside the pencil line ---------- */

.src-count {
  position: absolute;
  z-index: 3;
  top: 6px;
  left: 12px;
  display: grid;
  place-items: center;
  align-content: center;
  width: 68px;
  height: 68px;
  margin: 0;
  background: var(--ak-surface);
  border: 3px solid var(--ak-ink);
  border-radius: 50%;
  color: var(--ak-ink);
  line-height: 0.9;
  pointer-events: none;
}
.src-count-num { font-family: var(--ak-font-display); font-weight: 700; font-size: 40px; font-variant-numeric: tabular-nums; }
.src-count-unit { font-size: 12px; font-weight: 700; color: var(--ak-ink-muted); }
.src-count.is-low { background: var(--ak-accent); border-color: var(--ak-ink); }
.src-count.is-low .src-count-unit { color: var(--ak-ink); }
.src:not([data-phase="look"]) .src-count { visibility: hidden; }

/* ---------- the blind draw: the paper itself is the target ---------- */

.src-sheet.is-target::after {
  content: '';
  position: absolute;
  inset: 10px;
  z-index: 1;
  border: 3px dashed var(--ak-accent-2);
  border-radius: 14px;
  pointer-events: none;
}

/* ---------- the caption strip as the first-time guide ---------- */

.src-caption-tab,
.src-caption-arrow { display: none; }
.src-caption.is-guide { padding-top: 32px; box-shadow: none; }
.src-caption.is-guide .src-caption-tab {
  display: block;
  position: absolute;
  top: 9px;
  left: 16px;
  padding: 0 8px;
  background: var(--ak-accent);
  color: var(--ak-ink);
  font-size: 13px;
  font-weight: 700;
  border-radius: 2px;
}
.src-caption.is-guide .src-caption-arrow { display: block; flex: 0 0 28px; width: 28px; height: 28px; align-self: flex-start; }
.src-caption.is-guide .src-caption-arrow path { fill: none; stroke: var(--ak-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.src-caption.is-guide .src-caption-text {
  font-family: var(--ak-font-body);
  font-size: clamp(18px, calc(0.8dvh + 0.8vw + 8px), 21px);
  line-height: 1.3;
}

/* ---------- looking back on the reveal, and new shoes on the rack ---------- */

.src-reveal-note {
  align-self: center;
  margin: 0;
  padding: 2px 12px;
  background: var(--ak-surface);
  color: var(--ak-ink);
  border: 2px solid var(--ak-ink);
  border-radius: var(--src-wobble-2);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  rotate: -1deg;
}
.src-reveal-note[hidden] { display: none; }
.src-rack-tag.is-new { background: var(--ak-accent); }
#activity-start .src-shelf-count { margin: -4px 0 12px; font-size: 17px; font-weight: 700; color: var(--ak-ink); }

@media (orientation: landscape) {
  .src-caption-text { font-size: clamp(22px, calc(1.8vw + 8px), 28px); }
  .src-rack-shoes { height: clamp(48px, 13dvh, 72px); }
}

@media (prefers-reduced-motion: no-preference) {
  :root:not(.ac-still) .src-sheet.is-target::after { animation: src-target 1.4s ease-in-out infinite; }
  :root:not(.ac-still) .src-count.is-pop { animation: src-pop 320ms var(--src-ease-pop); }
  :root:not(.ac-still) .src-blank-pencil { animation: src-wiggle 1.6s ease-in-out infinite; transform-origin: 20% 80%; }
}
@keyframes src-target { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (orientation: landscape) and (max-height: 420px) {
  .src-caption-text { font-size: clamp(20px, calc(1.4vw + 8px), 24px); }
  .src-caption.is-guide .src-caption-text { font-size: 18px; line-height: 1.22; }
}

/* Sideways, while the first-time guide is up, its words take the rack's row too, and the arrow points left at the sheet. */
@media (orientation: landscape) {
  .src.is-guiding .src-caption { grid-row: 2 / 4; align-self: stretch; }
  .src.is-guiding .src-rack { display: none; }
  .src-caption.is-guide .src-caption-arrow { rotate: -90deg; }
}
.src-rack-slot.is-out .src-rack-tag.is-new { opacity: 0; }

/* ---------- sideways: big, spaced tools along the bottom, and a compact look row ---------- */
@media (orientation: landscape) {
  :root {
    --src-chip-gap: clamp(2px, calc((var(--src-row) - 640px) / 30), 6px);
    --src-group-gap: clamp(8px, calc((var(--src-row) - 640px) / 10), 18px);
    --src-chip: clamp(44px, calc((var(--src-row) - 10 * var(--src-chip-gap) - 2 * var(--src-group-gap)) / 13), 56px);
  }
  .src-chip-act svg { width: 26px; height: 26px; }
  .src-chip-act span { font-size: 14px; }
  .src-dab { width: 76%; height: 76%; }
  .src-hint { min-height: 52px; min-width: 64px; font-size: 19px; }
  .src-caption.is-guide .src-caption-text { font-size: clamp(19px, calc(0.9vw + 12px), 22px); }
  .src-count { width: 58px; height: 58px; top: 5px; }
  .src-count-num { font-size: 34px; }
  .src-look-label { left: 80px; font-size: 15px; line-height: 1.2; }
  .src-timer { top: 52px; left: 80px; }
  .src-stage { top: 72px; }
  .src-blank-note { top: 6px; }
}
@media (orientation: landscape) and (max-height: 420px) {
  .src-target-sub { font-size: 15px; }
  .src-target-dot { width: 118px; height: 70px; }
}

/* The countdown row is only needed while looking and drawing: the reveal and the pinboard get the whole sheet. */
.src[data-phase="reveal"] .src-stage,
.src[data-phase="done"] .src-stage { top: 14px; }
@media (orientation: landscape) and (max-height: 420px) {
  .src-caption.is-guide { padding-top: 28px; }
  .src-caption.is-guide .src-caption-text { font-size: 18px; line-height: 1.18; }
  .src-reveal-note { font-size: 15px; }
}
@keyframes src-trace { 0% { stroke-dashoffset: 100; } 70%, 100% { stroke-dashoffset: 0; } }

/* ---------- sideways reveal: the comparison gets the whole sheet ---------- */
.src-side { display: none; }
@media (orientation: landscape) {
  .src[data-phase="reveal"] .src-rack { display: none; }
  .src[data-phase="reveal"] .src-side {
    grid-area: rack;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
  }
  .src-side .src-reveal-foot { gap: 8px; }
  .src-side .src-next { font-size: 22px; padding: 0 14px; }
  .src-side .src-lace { padding-right: 50px; }
}
@media (orientation: landscape) {
  /* During the reveal the side column widens a little so the plan's two sentences fit without scrolling. */
  .src[data-phase="reveal"] { grid-template-columns: minmax(0, 1fr) minmax(260px, 40%); }
  .src[data-phase="reveal"] .src-reveal-note { font-size: 15px; padding: 0 10px; }
}

/* ---------- the drawing area named, and the live lace while the finger is down ---------- */
.src-area-tag {
  display: none;
  position: absolute;
  z-index: 2;
  left: 22px;
  bottom: 16px;
  padding: 0 8px;
  background: var(--ak-accent-2);
  color: var(--ak-btn-ink);
  font-size: 14px;
  font-weight: 700;
  border-radius: 3px;
  pointer-events: none;
}
.src-sheet.is-target .src-area-tag { display: block; }
.src-live {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 14px;
  right: 14px;
  margin: 0;
  padding: 6px 12px;
  background: var(--ak-surface);
  color: var(--ak-ink);
  border: 3px solid var(--ak-ink);
  border-radius: var(--src-wobble-2);
  box-shadow: 3px 3px 0 var(--ak-accent);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
}
.src-live[hidden] { display: none; }

/* A met brief lands like a stamp. */
.src-reveal-note.is-met { background: var(--ak-accent); color: var(--ak-ink); }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.ac-still) .src-reveal-note.is-met { animation: src-stamp 520ms var(--src-ease-pop) both; }
}
@keyframes src-stamp { 0% { opacity: 0; scale: 1.6; rotate: -8deg; } 60% { opacity: 1; scale: 0.94; } 100% { scale: 1; rotate: -1deg; } }

/* The quiet line can carry the shelf and streak too: let it wrap rather than spill. */
.src-kept { max-width: 100%; }

/* The press-here target sits low on the sheet, clear of the strip at the top and above the area tag. */
.src-target { top: auto; bottom: 36px; translate: -50% 0; }
.src-target-words { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.src-live { z-index: 4; }
@media (orientation: portrait) {
  .src-blank-main { font-size: clamp(22px, 5.8vw, 30px); }
  .src-blank-head { font-size: 16px; }
}
@media (orientation: landscape) {
  /* Sideways the example sits beside its words, so the target stays one short row. */
  .src-target { flex-direction: row; width: min(94%, 560px); gap: 12px; bottom: 34px; }
  .src-target-words { align-items: flex-start; }
  .src-target-main, .src-target-sub { text-align: left; }
  .src-target-main { font-size: clamp(22px, 3vw, 30px); }
  .src-target-sub { font-size: 15px; }
  .src-target-dot { flex: 0 0 auto; width: 118px; height: 72px; }
}
@keyframes src-rise-low { from { opacity: 0; translate: -50% 18px; } to { opacity: 1; translate: -50% 0; } }
@media (orientation: landscape) {
  /* Sideways the sheet is short: the strip at the top already says to draw, so the target keeps only the example and how. */
  .src-target-main { display: none; }
  .src-target { width: min(94%, 520px); bottom: 32px; align-items: center; }
  .src-target-dot { width: 100px; height: 62px; }
  .src-target-sub { font-size: 15px; line-height: 1.25; }
}

/* ---------- the study screen: the shoe is there from the moment it lands, under a taped note ---------- */
.src[data-phase="hop"] .src-look-shoe { visibility: visible; }
.src-look-shoe.is-flying { visibility: hidden !important; }
.src[data-phase="hop"] .src-look-label,
.src[data-phase="hop"] .src-count,
.src[data-phase="hop"] .src-timer { visibility: visible; }
.src-look-label {
  padding: 4px 12px 4px;
  border: 2px solid var(--ak-ink);
  border-radius: 2px;
  box-shadow: 2px 3px 0 color-mix(in srgb, var(--ak-ink) 25%, transparent);
  rotate: -1deg;
}
.src-look-label::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  width: 64px;
  height: 16px;
  translate: -50% 0;
  rotate: 3deg;
  background-image: var(--src-tape);
  background-size: 104.8% 404%;
  background-position: 11.8% 25.9%;
}

/* The eyes' path: a dot goes round outside the shoe, heel along the sole to the toe and back over. */
.src-eye-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; visibility: hidden; }
.src[data-phase="look"] .src-eye-trail.is-on { visibility: visible; }
.src-eye-path { fill: none; stroke: color-mix(in srgb, var(--ak-accent-2) 55%, transparent); stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; }
.src-eye-dot { fill: var(--ak-accent); stroke: var(--ak-ink); stroke-width: 2.5; }

/* ---------- each pinned print says what its line was ---------- */
.src-print-tag { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 6px; white-space: normal; text-align: center; }
.src-print-name { font-family: var(--ak-font-body); font-size: 14px; font-weight: 700; color: var(--ak-ink-muted); }
.src-print-met { flex-basis: 100%; font-family: var(--ak-font-body); font-size: 13px; font-weight: 700; background: var(--ak-accent); padding: 0 6px; }
/* One line per tag, so the drawing keeps the print's height; "brief met" is a tab on the print's corner. */
.src-print-tag { flex-wrap: nowrap; white-space: nowrap; max-width: 100%; font-size: 18px; padding: 0 8px; }
.src-print-name { font-size: 13px; overflow: hidden; text-overflow: clip; }
.src-print-met {
  position: absolute;
  top: 6px;
  right: -8px;
  flex-basis: auto;
  padding: 0 6px;
  border: 2px solid var(--ak-ink);
  font-size: 12px;
  line-height: 1.3;
  rotate: 8deg;
}
.src-print { overflow: visible; }
/* Three across (sideways), each tag stacks the shoe's name over its lace so neither is cut. */
.src-pinboard:not(.is-column) .src-print-tag { flex-direction: column; align-items: center; line-height: 1.05; padding: 2px 8px; }
.src-pinboard:not(.is-column) .src-print-name { overflow: visible; }
/* A figure's default side margins were stealing most of each print's width. */
.src-print { margin: 0; }
.src-pinboard:not(.is-column) .src-print-name { white-space: normal; text-align: center; }
