  /* PRIMAL KING: the loading screen and the first screen (TAP TO PLAY). Read after the page's own sheet, so these
     rules win. Every picture named here is the pack's own; every url() begins with /.
     The heavy condensed face of the stage's drawn lettering (Anton, SIL Open Font Licence: /assets/ui/fonts/OFL-Anton.txt),
     under the family name the shared code asks for ('MK Heavy': packs/README.md section 3): the cards' words, the
     figures on the reels, and any title whose painted sign is not in. */
  @font-face { font-family: 'MK Heavy'; src: url('/assets/ui/fonts/MKHeavy-400.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
  /* THE LOADING SCREEN: the storm over the island, the sign, an amber bar. Everything it needs is here, so it is
     right before the page's sheet or any picture has arrived: the gradient is the scene's own colours, and the scene
     comes over it when it is in. */
  #loader { background: radial-gradient(120% 90% at 50% 34%, #5e6e7c 0%, #36444f 26%, #1c262d 54%, #0e1418 78%, #080b0c 100%); background-size: cover; background-position: center; }
  @media (orientation: landscape) { #loader { background-image: linear-gradient(rgba(8,11,12,.18), rgba(8,11,12,.04) 45%, rgba(8,11,12,.55)), url('/assets/scene/load_landscape.webp'), radial-gradient(120% 90% at 50% 34%, #5e6e7c 0%, #36444f 26%, #1c262d 54%, #0e1418 78%, #080b0c 100%); } }
  @media (orientation: portrait) { #loader { background-image: linear-gradient(rgba(8,11,12,.18), rgba(8,11,12,.04) 45%, rgba(8,11,12,.55)), url('/assets/scene/load_portrait.webp'), radial-gradient(120% 90% at 50% 34%, #5e6e7c 0%, #36444f 26%, #1c262d 54%, #0e1418 78%, #080b0c 100%); background-position: center top; } }
  /* THE TITLE ON ITS SIGN, as the machine wears it: ONE PICTURE, /assets/scene/machine/sign_first.webp (1920 x 360,
     clear ground): the frame's own picture above the reel window (the sign on its stone lintel, the plant at its left
     end, the amber at its right) with the title's lettering laid on it as the machine's list places them. It is made
     by tools/night/import-art.sh each time the frame or the lettering changes, so this sheet knows nothing of the
     frame's canvas. The page's own title picture (an <img> it lays here) is kept clear: the lettering is already in
     the sign. THE SIGN LIES OVER THE TYPED WORD (it is the box's last layer, ::after): the word stands only while
     the sign has not arrived, and can never show through or beside the painted lettering. The same rules serve #splash. */
  #loader .loader-title, #splash .loader-title, #splash-out .loader-title { position: relative; display: block; flex: none; width: min(100%, 760px); aspect-ratio: 1920 / 360;
    background: none; filter: drop-shadow(0 8px 16px rgba(0,0,0,.6)); }
  #loader .loader-title::after, #splash .loader-title::after, #splash-out .loader-title::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: url('/assets/scene/machine/sign_first.webp') 50% 100% / contain no-repeat; }
  #loader .loader-title img, #splash .loader-title img, #splash-out .loader-title img { position: absolute; inset: auto; left: 30%; top: 30%; width: 40%; height: 50%; margin: 0; object-fit: fill; opacity: 0; filter: none; }
  #loader .loader-title img.in, #splash .loader-title img.in, #splash-out .loader-title img.in { opacity: 0; }
  #loader .loader-title img.in + .loader-word { opacity: 0; }
  #loader .loader-word, #splash .loader-word, #splash-out .loader-word { position: absolute; left: 22%; right: 22%; top: 30%; height: 56%; display: flex; align-items: center; justify-content: center;
    font: 900 clamp(18px, 5.6vw, 46px)/1 'MK Heavy', Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", sans-serif; letter-spacing: .05em; color: #e8b84a; white-space: nowrap;
    text-shadow: 0 0 2px #0a0d0e, 0 3px 6px rgba(0,0,0,.75); transition: opacity .2s; }
  /* THE FIRST SCREEN: the game's own scene, bright; the sign in the sky; the three things the game does are three
     of its tiles with a few words, on the picture itself, no plate; and the button at the foot. */
  #app #splash, #app #splash-out { justify-content: flex-start; gap: clamp(8px, 2.2vh, 22px); padding-top: clamp(14px, 5.5vh, 60px); padding-bottom: calc(clamp(18px, 6.5vh, 70px) + env(safe-area-inset-bottom, 0px));
    background-color: #1c262d; background-size: cover; background-position: center; background-repeat: no-repeat; }
  @media (orientation: landscape) { #app #splash, #app #splash-out { background-image: linear-gradient(rgba(8,11,12,.3), rgba(8,11,12,0) 30%, rgba(8,11,12,0) 62%, rgba(8,11,12,.55)), url('/assets/scene/load_landscape.webp'); } }
  @media (orientation: portrait) { #app #splash, #app #splash-out { background-image: linear-gradient(rgba(8,11,12,.3), rgba(8,11,12,0) 20%, rgba(8,11,12,0) 57%, rgba(8,11,12,.74) 68%, rgba(8,11,12,.88)), url('/assets/scene/load_portrait.webp'); background-position: center top; } }
  #app #splash .loader-title, #app #splash-out .loader-title { width: min(92%, 62vh, 760px); }
  #app #splash .first-cards, #app #splash-out .first-cards { flex-direction: row; justify-content: center; align-items: flex-start; width: min(100%, 860px); gap: clamp(6px, 2.4vw, 44px); }
  #app #splash .first-cards li, #app #splash-out .first-cards li { flex: 1 1 0; max-width: 250px; min-height: 0; display: flex; flex-direction: column; align-items: center; row-gap: 3px; padding: 0; text-align: center;
    background: none; box-shadow: none; border-radius: 0; }
  #app #splash .first-cards img, #app #splash .first-cards li > i, #app #splash-out .first-cards img { width: clamp(46px, 9.5vh, 92px); height: clamp(46px, 9.5vh, 92px); filter: drop-shadow(0 4px 8px rgba(0,0,0,.65)); }
  /* ONE HEADING FACE ON EVERY SCREEN: the heavy capitals, in the sign's gold; the words under them are the game's
     serif (`--font-text`), in the bar's cream */
  #app #splash .first-cards b, #app #splash-out .first-cards b { align-self: center; padding: 0; font: 400 clamp(19px, 3.3vh, 30px)/1 'MK Heavy', Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; letter-spacing: .06em; color: #ffd676;
    text-shadow: 0 0 1px #0a0d0e, 0 0 3px #0a0d0e, 0 2px 0 #3a2413, 0 3px 6px rgba(8,11,12,.9), 0 0 18px rgba(8,11,12,.8); }
  #app #splash .first-cards span, #app #splash-out .first-cards span { align-self: center; padding: 0; max-width: 22ch; font-size: clamp(11.5px, 1.75vh, 15.5px); line-height: 1.15; color: #fdf3cb; text-shadow: 0 0 2px #0a0d0e, 0 1px 3px #0a0d0e, 0 0 12px rgba(8,11,12,.95); }
  /* AN UPRIGHT PHONE IS A POSTER: the sign in the sky, THE TWO BEASTS FACING EACH OTHER IN THE MIDDLE OF THE PICTURE
     (the upright plate holds them between 23% and 64% of its height), and under them, on the dark of the wet ground,
     the three lines and the button. The three are set one under another, each a row: its tile, its name, and its
     words beside it with the row's whole width to themselves, so no line of words takes more than two lines down to
     a phone 360 wide. */
  @media (orientation: portrait) {
    #app #splash, #app #splash-out { padding-bottom: calc(clamp(12px, 3vh, 34px) + env(safe-area-inset-bottom, 0px)); }
    #app #splash .first-cards, #app #splash-out .first-cards { flex-direction: column; align-items: center; width: 100%; gap: clamp(3px, .7vh, 8px); margin-top: auto; }
    #app #splash .first-cards li, #app #splash-out .first-cards li { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 3px;
      width: min(100%, 372px); max-width: none; text-align: left; }
    #app #splash .first-cards img, #app #splash .first-cards li > i, #app #splash-out .first-cards img { grid-row: 1 / 3; align-self: center; width: clamp(36px, 5.6vh, 50px); height: clamp(36px, 5.6vh, 50px); }
    #app #splash .first-cards b, #app #splash-out .first-cards b { align-self: end; justify-self: start; }
    /* (ONE LINE EACH down to a phone 360 wide: the size follows the width as well as the height. The longest line is
       36 letters: "THE HUNT, ISLAND WAR AND PRIMAL KING") */
    #app #splash .first-cards span, #app #splash-out .first-cards span { align-self: start; justify-self: start; max-width: none; font-size: clamp(10.5px, min(1.75vh, 3.2vw), 15px); font-weight: 700; letter-spacing: .01em; line-height: 1.16; white-space: nowrap; }
  }
  /* TAP TO PLAY: the art seat's PAINTED SIGN (/assets/ui/win/half/sign_tap_to_play.webp, 2092 x 518 at full size,
     imported 19 Nov 02:28: gold lettering on the sign's own stone and gold). The button's own words stay for a screen
     reader and are not drawn over the painted ones. UNDER THE SIGN, in the same box, stands a plain dark slab (drawn
     here, smaller than the sign so that none of it shows past the sign's cut corners): it is all there is until the
     sign has arrived. */
  #app #splash .play-go, #app #splash-out .play-go { position: relative; margin-top: auto; width: min(80vw, 58vh, 440px); min-width: 0; min-height: 0; aspect-ratio: 2092 / 518; padding: 0; border-radius: 10px;
    background: url('/assets/ui/win/half/sign_tap_to_play.webp') center / 100% 100% no-repeat, linear-gradient(180deg, #2b3134 0%, #171b1d 46%, #0b0e0f 100%) center / 90% 72% no-repeat;
    box-shadow: none; filter: drop-shadow(0 8px 14px rgba(0,0,0,.65)) drop-shadow(0 0 16px rgba(217,138,30,.34));
    color: transparent; text-shadow: none; font-size: clamp(19px, 3.4vh, 30px); letter-spacing: .16em; white-space: nowrap; overflow: hidden; }
  /* (the sign is fetched under the loading bar, so the first screen never comes up without it) */
  #loader .loader-track::after { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; background: url('/assets/ui/win/half/sign_tap_to_play.webp') no-repeat; }
  /* ON A DESKTOP (a screen with a mouse: html.mouse, the interface's own test) the words are CLICK TO PLAY: the art
     seat's small plate, empty (card_notice, 2068 x 508), with the button's own words on it in the heavy face in the
     sign's gold. */
  @media (orientation: landscape) {
    #app #splash .play-go, #app #splash-out .play-go { width: min(80vw, 62vh, 470px); }
    html.mouse #app #splash .play-go, html.mouse #app #splash-out .play-go { aspect-ratio: 2068 / 508;
      background: url('/assets/ui/win/half/card_notice.webp') center / 100% 100% no-repeat, linear-gradient(180deg, #2b3134 0%, #171b1d 46%, #0b0e0f 100%) center / 90% 72% no-repeat;
      font: 400 min(8.2vw, 6.4vh, 49px)/1 'MK Heavy', Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; letter-spacing: .06em; color: #ffd676;
      text-shadow: 0 0 1px #0a0d0e, 0 0 3px #0a0d0e, 0 3px 0 #4a2e10, 0 5px 8px rgba(0,0,0,.8); }
    html.mouse #loader .loader-track::after { background-image: url('/assets/ui/win/half/card_notice.webp'); }
  }
  /* (an upright phone: the button stands right under the three lines, at the foot of the poster, a little lower
     than wide so that the three lines begin under the beasts' feet: the upright picture has them at 62% to 64%) */
  @media (orientation: portrait) {
    #app #splash .play-go, #app #splash-out .play-go { margin-top: clamp(6px, 1.3vh, 14px); width: min(78vw, 54vh, 430px); }
  }
  @media (orientation: landscape) and (min-height: 560px) {
    /* (the sign a little smaller and higher, so that the captions stand in the valley between the two beasts) */
    #app #splash, #app #splash-out { padding-top: clamp(10px, 3vh, 34px); }
    #app #splash .loader-title, #app #splash-out .loader-title { width: min(92%, 54vh, 700px); }
    /* (THE THREE STAND IN THE VALLEY BETWEEN THE TWO BEASTS: in the wide picture the gorilla holds the left third of
       the width at this height and the tyrannosaur's head the right fifth. The row was 1180 px wide and its outer
       captions lay on the gorilla's shoulder and the tyrannosaur's snout) */
    #app #splash .first-cards, #app #splash-out .first-cards { width: min(100%, max(42vw, 620px), 1100px); gap: clamp(8px, 1.4vw, 28px); margin-top: clamp(0px, 1vh, 12px); }
    #app #splash .first-cards li, #app #splash-out .first-cards li { max-width: 372px; row-gap: 5px; }
    #app #splash .first-cards img, #app #splash .first-cards li > i, #app #splash-out .first-cards img { width: clamp(60px, 11.5vh, 112px); height: clamp(60px, 11.5vh, 112px); }
    #app #splash .first-cards b, #app #splash-out .first-cards b { font: 400 clamp(21px, 4.3vh, 42px)/1 'MK Heavy', Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; letter-spacing: .06em; color: #ffd676;
      text-shadow: 0 0 1px #0a0d0e, 0 0 3px #0a0d0e, 0 3px 0 #3a2413, 0 4px 8px rgba(8,11,12,.9), 0 0 22px rgba(8,11,12,.8); }
    #app #splash .first-cards span, #app #splash-out .first-cards span { max-width: 30ch; font-size: clamp(13.5px, 2.2vh, 21px); font-weight: 700; line-height: 1.18; letter-spacing: .03em; color: #fdf3cb;
      text-shadow: 0 0 2px #0a0d0e, 0 0 4px #0a0d0e, 0 2px 3px #0a0d0e, 0 0 16px rgba(8,11,12,.95); }
  }
  /* THE PICTURE BREATHES while the screen waits for the tap (nothing here costs a player time; none of it runs for
     reduced motion): the same picture once more, over the still one, pushed slowly in and let out again. The still one
     stays under it: nothing is lost if this fails. */
  #loader, #app #splash, #app #splash-out { overflow: hidden; }
  #loader::before, #app #splash::before, #app #splash-out::before { content: ''; position: absolute; inset: -1px; z-index: -1; pointer-events: none;
    background-size: cover; background-position: center; background-repeat: no-repeat; transform-origin: 50% 44%; will-change: transform;
    animation: pk-breathe 9s cubic-bezier(.4, 0, .6, 1) -1s infinite alternate; }
  @media (orientation: landscape) {
    #loader::before { background-image: linear-gradient(rgba(8,11,12,.18), rgba(8,11,12,.04) 45%, rgba(8,11,12,.55)), url('/assets/scene/load_landscape.webp'); }
    #app #splash::before, #app #splash-out::before { background-image: linear-gradient(rgba(8,11,12,.3), rgba(8,11,12,0) 30%, rgba(8,11,12,0) 62%, rgba(8,11,12,.55)), url('/assets/scene/load_landscape.webp'); }
  }
  @media (orientation: portrait) {
    #loader::before { background-image: linear-gradient(rgba(8,11,12,.18), rgba(8,11,12,.04) 45%, rgba(8,11,12,.55)), url('/assets/scene/load_portrait.webp'); background-position: center top; }
    #app #splash::before, #app #splash-out::before { background-image: linear-gradient(rgba(8,11,12,.3), rgba(8,11,12,0) 20%, rgba(8,11,12,0) 57%, rgba(8,11,12,.74) 68%, rgba(8,11,12,.88)), url('/assets/scene/load_portrait.webp'); background-position: center top; transform-origin: 50% 40%; }
  }
  @keyframes pk-breathe { from { transform: scale(1); } to { transform: scale(1.06) translateY(-0.5%); } }
  @media (prefers-reduced-motion: reduce) {
    #loader::before, #app #splash::before, #app #splash-out::before { animation: none; }
  }
  #loader .loader-track { background: #101315; border: 2px solid #a86a1e; border-radius: 6px; box-shadow: 0 0 0 1px #0a0d0e, inset 0 2px 4px rgba(0,0,0,.6); }
  #loader .loader-fill { background: linear-gradient(#ffe0a0, #f0b040 45%, #8a5a14); border-radius: 3px; }
  #loader .loader-text { color: #ffe0a0; letter-spacing: .22em; text-shadow: 0 1px 2px #0a0d0e; }
  /* ---- THE PARENT'S PURPLE, WHERE THE SHARED SHEET STILL TYPES IT. Ring 2 of the lift (every colour a value of the
     pack) is not done: client/styles.css types MAFIA KING's purple in four rules that a palette's variables do not
     reach. This sheet is the one the page reads after it, so each is said again here in this game's wet slate and
     jungle green. THEY ARE NOT THE FIRST SCREEN'S: the day those four read a variable, this block goes.
     1. the ground of every panel (the buy menu, the menu, the rules, the boxes) */
  #panels .panel { background: linear-gradient(180deg, #1d2529 0%, #131a1d 46%, #0b0e0f 100%); }
  /* 2. and 3. the disc of SPIN while autoplay runs and during free spins */
  #ui .btn-spin[data-mode='auto'] { --disc: #16281d; }
  #ui .btn-spin[data-mode='free'] { --disc: #16281d; }
  /* 4. the sheen on a drawn plate of the bar (where no painted plate is in) */
  #ui .plate::before { background:
      radial-gradient(120% 90% at 30% 0%, rgba(96, 124, 132, 0.16) 0%, rgba(96, 124, 132, 0) 60%),
      linear-gradient(180deg, #171b1d 0%, #101315 50%, #090b0c 100%); }
  /* 5. THE TOP WIN IS WRITTEN ONCE (seat pack, 19 Nov 09:2x; the critics' F20: "UP TO 15000X" on the first card and,
     two lines down, "15,000X YOUR BET" on the third). The first card's words are the pack's (words/rules.js card1_a),
     but the shared code lays the biggest number after them (client/src/ui/panels.js `firstCards`: seat stage's file).
     The pack's words END IN A NEW LINE and the pack's own mend cuts the card's text there (character/character/mends.js,
     part 3). THIS RULE IS THE SECOND LOCK, for an upright phone, should that mend not have run: the number then
     stands on a second line of its own and only the card's FIRST line is drawn (the second has no colour and no shadow,
     and takes no room: the box is one line high). When no number follows the words, this hides nothing. */
  @media (orientation: portrait) {
    #app #splash .first-cards li:first-child span, #app #splash-out .first-cards li:first-child span { white-space: pre; line-height: 1.16; max-height: 1.16em; color: transparent; text-shadow: none; }
    #app #splash .first-cards li:first-child span::first-line, #app #splash-out .first-cards li:first-child span::first-line { color: #fdf3cb; text-shadow: 0 0 2px #0a0d0e, 0 1px 3px #0a0d0e, 0 0 12px rgba(8,11,12,.95); }
  }
