/* Optical print hierarchy and limited reusable paper variation. No game
   tracks, word fitting, phase durations or input rules are changed here. */
@media (min-width: 901px) and (min-height: 561px) {
  #zineStoryApp #storyPrompt {
    max-width: 34ch;
    font-size: clamp(31px, 2.7vw, 44px);
    line-height: 1.16;
  }
  #zineStoryApp .story-sheet[data-density="long"] #storyPrompt {
    max-width: 34ch;
    font-size: clamp(31px, 2.7vw, 44px);
  }
  #zineCaseApp {
    --case-note-a: url("assets/nachtzine/final-polish/story-case/note-a-v2.webp");
    --case-note-b: url("assets/nachtzine/final-polish/story-case/note-b-v1.webp");
    --case-stamp-impression: url("assets/nachtzine/final-polish/story-case/stamp-v2.webp");
  }
  #zineCaseApp .case-note { --note-material: var(--brief-sheet); }
  #zineCaseApp .case-note:nth-child(3n + 1) { --note-material: var(--case-note-a); }
  #zineCaseApp .case-note:nth-child(3n + 2) { --note-material: var(--case-note-b); }
  /* The second row is not a repeated catalogue of the same three columns. */
  #zineCaseApp .case-note:nth-child(4) { --note-material: var(--case-note-b); }
  #zineCaseApp .case-note:nth-child(5) { --note-material: var(--brief-sheet); }
  #zineCaseApp .case-note:nth-child(6) { --note-material: var(--case-note-a); }
  #zineCaseApp .case-note .case-note-paper {
    background-image: var(--note-material), var(--stock);
    mask-image: var(--note-material);
  }
  #zineCaseApp .case-note,
  #zineCaseApp .case-note:nth-child(2n) {
    filter: drop-shadow(.5px 1px .5px #59472168) drop-shadow(1px 2px 1px #59472120);
  }
  #zineCaseApp .case-stamp::before,
  #zineCaseApp[data-cover-content="recall"] .case-stamp::before {
    border: 0;
    background: currentColor;
    clip-path: none;
    mask: var(--case-stamp-impression) center / 100% 100% no-repeat;
    opacity: .94;
  }
  /* The existing engine-owned closing phase starts one short ink-contact
     impression. Only the border's deposited pigment changes, never the
     stamp copy, cover geometry or duration of the dossier's movement. */
  #zineCaseApp:not([hidden]):not([inert])[data-phase="closing"] .case-stamp::before {
    animation: case-ink-contact 240ms steps(1, end) both;
  }
  @keyframes case-ink-contact {
    0% { opacity: .42; }
    23% { opacity: 1; }
    52% { opacity: .84; }
    80%, 100% { opacity: .94; }
  }
  #zineCaseApp[data-material-state="fallback"] .case-note .case-note-paper {
    background: var(--paper) var(--stock) 43px 181px / 700px;
    mask: none;
  }
  #zineCaseApp[data-material-state="fallback"] .case-stamp::before {
    border: 6px solid currentColor;
    background: none;
    mask: var(--ink-grain-mask) 0 0 / 192px 160px;
  }
}
@media (min-width: 901px) and (min-height: 561px) and (max-height: 800px) {
  #zineStoryApp #storyPrompt,
  #zineStoryApp .story-sheet[data-density="long"] #storyPrompt {
    font-size: clamp(29px, 2.5vw, 36px);
    line-height: 1.15;
  }
}
@media (prefers-reduced-motion: reduce) {
  #zineCaseApp .case-stamp::before { animation: none !important; }
}
@media (forced-colors: active) {
  #zineCaseApp .case-note .case-note-paper {
    background: Canvas !important; mask: none; border: 2px solid CanvasText;
  }
  #zineCaseApp .case-note,
  #zineCaseApp .case-note:nth-child(2n) { filter: none; }
  #zineCaseApp .case-stamp::before,
  #zineCaseApp[data-cover-content="recall"] .case-stamp::before {
    background: none; mask: none; border: 3px solid CanvasText;
    animation: none !important; opacity: 1;
  }
}
