/* Physical art pass / Royale, Case Closed and Story Reactor.
   The light has one source above-left. Contact describes touching paper;
   only raised props cast a longer shadow. No lettering receives its own
   blur, no game geometry depends on a word, and no animation is added here.
   Load after scenes + delivery. The illustration pass owns asset URLs. */

@media (min-width: 901px) and (min-height: 561px) {
  #zineRoyaleApp.bomtafel {
    --table-shadow-flat: drop-shadow(.6px 1.5px .55px #2314256e) drop-shadow(2px 3px 2px #2314252b);
    --table-shadow-raised: drop-shadow(1px 2px .75px #23142580) drop-shadow(3px 6px 3px #23142540);
    --table-shadow-object: drop-shadow(1px 2px 1px #2314257a) drop-shadow(5px 9px 4px #23142540);
  }

  /* The reading ticket is the raised foreground, not a textured rectangle
     floating at the same depth as the players. Its stable footprint stays. */
  #zineRoyaleApp.bomtafel .royale-words > .paper-surface {
    filter: drop-shadow(1px 2px .65px #21152991) drop-shadow(3px 7px 3px #21152952);
  }
  #zineRoyaleApp.bomtafel .royale-score[data-active="true"] {
    filter: var(--table-shadow-raised);
  }

  /* The large-group fuse already has a compressed, checked corridor. Only
     the spacious two/three-player stage gets the fuller paper spark. */
  #zineRoyaleApp.bomtafel:is([data-player-count="2"], [data-player-count="3"]) .bomb-spark {
    width: 24%; height: 24%;
  }

  /* With eight seats, the old 55svh circle extended behind the lower cards.
     The gap between their inner edges exposed a narrow black "stem". Keep
     the entire bomb above those seats instead of masking part of the game.
     Body, registered fuse and spark share this one proportional footprint;
     the fixed reading strip moves once with roster size, never with words. */
  #zineRoyaleApp.bomtafel:is([data-player-count="5"], [data-player-count="6"], [data-player-count="7"], [data-player-count="8"]) .royale-bomb {
    width: min(42%, calc(min(100svh, 1040px) * .46));
  }
  #zineRoyaleApp.bomtafel:is([data-player-count="5"], [data-player-count="6"], [data-player-count="7"], [data-player-count="8"]) .royale-words {
    top: 39%;
  }

  /* A substantial cut ticket, not an extremely thin digital transport bar.
     The first review still showed a stretched ribbon. Keep the same control
     track, but let the centered pair use a shorter, taller physical ticket.
     Stop keeps its own separate hit target and neither touches player cards. */
  #zineRoyaleApp.bomtafel:not([data-phase="setup"], [data-phase="loading"], [data-phase="matchEnd"]):is([data-player-count="2"], [data-player-count="3"], [data-player-count="4"]) .zine-controls {
    justify-content: center;
  }
  #zineRoyaleApp.bomtafel:not([data-phase="setup"], [data-phase="loading"], [data-phase="matchEnd"]):is([data-player-count="2"], [data-player-count="3"], [data-player-count="4"]) .main-action {
    flex: 0 1 380px; max-width: 400px; min-height: 56px;
    font-size: clamp(28px, 2.65cqw, 42px);
  }
  #zineRoyaleApp.bomtafel:not([data-phase="setup"], [data-phase="loading"], [data-phase="matchEnd"]):is([data-player-count="2"], [data-player-count="3"], [data-player-count="4"]) .main-action::before {
    inset: -85% -6%;
    filter: var(--object-action-shadow, var(--table-shadow-raised));
  }
  #zineRoyaleApp.bomtafel .main-action:not(:disabled):active {
    --object-action-shadow: var(--table-shadow-flat);
  }
  #zineRoyaleApp.bomtafel[data-phase="matchEnd"] .royale-result::before {
    /* Unequal snips, not five perfectly straight vector edges. Keep the
       existing crown pose, animation lifecycle and readable winner space. */
    clip-path: polygon(1% 10%, 7% 17%, 24% 44%, 27% 42%, 47% 2%, 51% 0, 72% 40%, 76% 44%, 96% 8%, 100% 5%, 97% 26%, 89% 88%, 87% 100%, 62% 98%, 38% 100%, 14% 96%, 11% 77%, 5% 36%);
    background-size: 135px;
    filter: var(--table-shadow-raised);
  }
  #zineRoyaleApp.bomtafel[data-phase="matchEnd"] .royale-score:nth-child(n) {
    /* The old live-seat overscan made adjacent final cards touch. The mint
       pigment consumes the same variable, so its contour still matches. */
    --table-score-inset: 1% 0;
  }
  #zineRoyaleApp.bomtafel[data-phase="matchEnd"]:is([data-player-count="2"], [data-player-count="3"]) .royale-scores {
    left: 50%; right: auto; top: 82%; bottom: auto;
    width: min(70%, 960px); height: min(13%, 110px); translate: -50% 0;
  }
  #zineRoyaleApp.bomtafel[data-phase="matchEnd"][data-player-count="2"] .royale-scores {
    width: min(62%, 650px);
  }
  #zineRoyaleApp.bomtafel[data-phase="matchEnd"] .zine-character {
    left: 12%; top: 39%;
  }
  #zineRoyaleApp.bomtafel[data-phase="matchEnd"] .main-action {
    min-height: 56px;
  }
  #zineRoyaleApp.bomtafel[data-phase="matchEnd"] .main-action::before {
    inset: -65% -6%;
  }

  /* CASE / real card stock already supplies the highlight and curled edge.
     Add its missing contact, not another illuminated rim or shiny bevel.
     Filters remain on flat material children: the folding carrier must
     retain preserve-3d and the engine's native held poses. */
  #zineCaseApp .case-folder-base {
    filter: drop-shadow(1px var(--case-contact-y, 3px) .7px rgb(21 35 62 / var(--case-contact-alpha, .68))) drop-shadow(5px 10px 4px #15234166);
  }
  #zineCaseApp .case-cover-material {
    filter: brightness(var(--cover-light, 1)) drop-shadow(.6px 1.5px .6px #5a451991) drop-shadow(var(--cover-shadow-x, 3px) var(--cover-shadow-y, 6px) var(--cover-shadow-softness, 4px) #59411c42);
  }
  #zineCaseApp .case-folder-tab {
    filter: drop-shadow(.6px 1.5px .65px #172b4b80) drop-shadow(1.5px 3px 1.5px #172b4b30);
  }
  #zineCaseApp .case-folder-tab::before {
    box-shadow: none;
  }
  #zineCaseApp .case-note {
    filter: drop-shadow(.6px 1.5px .6px #5947219c) drop-shadow(2.5px 5px 2px #59472154);
  }
  #zineCaseApp .case-note-paper {
    /* Trim substrate, not the measured text or stable 3/5/7 card grid.
       The safe central printed area stays opaque on every word length. */
    inset-block: 5%;
  }
  #zineCaseApp .case-note:nth-child(2n) {
    filter: drop-shadow(.6px 1.5px .6px #59472191) drop-shadow(3px 6px 2.5px #5947214d);
  }
  #zineCaseApp .case-levels button {
    filter: drop-shadow(.6px 1.3px .5px #59472191) drop-shadow(2px 4px 2px #5947213d);
  }
  #zineCaseApp .case-levels button[aria-pressed="true"] {
    filter: drop-shadow(.6px 1px .5px #59472180);
  }
  #zineCaseApp .case-stamp {
    color: #27262e;
    letter-spacing: .015em;
  }
  #zineCaseApp[data-cover-content="recall"] .case-stamp {
    color: #233e83;
  }
  #zineCaseApp .case-hint {
    font-size: clamp(24px, 2.1vw, 33px);
  }

  /* STORY / a loose reading sheet over shallow, unequal backing corners.
     Paper and type already travel together; retain their complete stage. */
  #zineStoryApp .story-paper-lift {
    filter: drop-shadow(.7px 1.8px .7px #102e2b99) drop-shadow(4px 8px 4px #102e2b50);
  }
  #zineStoryApp .story-desk::before,
  #zineStoryApp .story-desk::after {
    filter: drop-shadow(.5px 1px .45px #102e2b80);
  }
  #zineStoryApp .story-type {
    filter: drop-shadow(.6px 1.4px .65px #233d3580) drop-shadow(2px 3px 1.5px #233d3530);
  }
  #zineStoryApp .story-button {
    filter: drop-shadow(.6px 1.6px .6px #172f2c80) drop-shadow(3px 5px 2.5px #172f2c40);
  }
}

@media (forced-colors: active) {
  #zineRoyaleApp.bomtafel {
    --table-shadow-flat: none; --table-shadow-raised: none; --table-shadow-object: none;
  }
  #zineRoyaleApp.bomtafel .royale-words > .paper-surface,
  #zineCaseApp .case-folder-base,
  #zineCaseApp .case-cover-material,
  #zineCaseApp .case-folder-tab,
  #zineCaseApp .case-note,
  #zineCaseApp .case-note:nth-child(2n),
  #zineCaseApp .case-levels button,
  #zineCaseApp .case-levels button[aria-pressed="true"],
  #zineStoryApp .story-paper-lift,
  #zineStoryApp .story-desk::before,
  #zineStoryApp .story-desk::after,
  #zineStoryApp .story-type,
  #zineStoryApp .story-button { filter: none; }
  #zineCaseApp .case-stamp,
  #zineCaseApp[data-cover-content="recall"] .case-stamp { color: CanvasText; }
  #zineCaseApp .case-note-paper { inset-block: 0; }
}
