/* The Gilded Cube: HUD, table panels, dialogs and the title screen. The 3D view sits underneath on #view.
   The look is a toy casino. One blocky sign face (Bungee, capitals only) with a dark outline for everything that is a
   name, a number or a button, and one round text face (Fredoka) for everything that is read. The sign face is far wider
   than a text face and its sizes here are real ones: no size-adjust, which Safari before 17 does not know. The chrome is
   built like the blocks the hall is made of: a thick ink edge, a lit top, a shaded foot, a hard shadow under it and
   corners cut close (--rk). Nothing is glass. */
@font-face { font-family: 'Bungee'; src: url('assets/fonts/bungee.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('assets/fonts/fredoka.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
:root {
  --gold: #ffd95e; --gold2: #f2a91f; --ink: #170a2a; --brown: #4d2b00; --txt: #fff7ea; --dim: #c9badf; --red: #ff4d6d; --green: #4dffa3;
  --board: linear-gradient(#38215f, #25133f); --slab: #2d1852; --violet: linear-gradient(#8a62ec, #5f38c4); --gilt: linear-gradient(#ffe98c, #f7b52c);
  --display: 'Bungee', 'Arial Black', system-ui, sans-serif; --text: 'Fredoka', 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --rk: .4; --r0: calc(8px * var(--rk)); --r1: calc(12px * var(--rk)); --r2: calc(14px * var(--rk)); --r3: calc(18px * var(--rk));       /* corners: tags, buttons, pills, boards */
  --dg: .75em;                                           /* the slot a counting digit sits in (see .dg): as wide as the widest figure, the 0 */
  /* Outlines are rings of text shadows: copies of the letters set round a circle, which read as one round-cornered edge
     in every browser (a text stroke eats into the letter where paint-order is not honoured). --o1 and --o15 are in px for
     interface type, --oe and --oE scale with the type for the big lines. */
  --o1: 1px 0 var(--ink), .707px .707px var(--ink), 0 1px var(--ink), -.707px .707px var(--ink), -1px 0 var(--ink), -.707px -.707px var(--ink), 0 -1px var(--ink), .707px -.707px var(--ink);
  --o15: 1.5px 0 var(--ink), 1.299px .75px var(--ink), .75px 1.299px var(--ink), 0 1.5px var(--ink), -.75px 1.299px var(--ink), -1.299px .75px var(--ink), -1.5px 0 var(--ink), -1.299px -.75px var(--ink), -.75px -1.299px var(--ink), 0 -1.5px var(--ink), .75px -1.299px var(--ink), 1.299px -.75px var(--ink);
  --oe: .094em 0 var(--ink), .089em .029em var(--ink), .076em .055em var(--ink), .055em .076em var(--ink), .029em .089em var(--ink), 0 .094em var(--ink), -.029em .089em var(--ink), -.055em .076em var(--ink), -.076em .055em var(--ink), -.089em .029em var(--ink), -.094em 0 var(--ink), -.089em -.029em var(--ink), -.076em -.055em var(--ink), -.055em -.076em var(--ink), -.029em -.089em var(--ink), 0 -.094em var(--ink), .029em -.089em var(--ink), .055em -.076em var(--ink), .076em -.055em var(--ink), .089em -.029em var(--ink);
  --oE: .138em 0 var(--ink), .134em .031em var(--ink), .124em .06em var(--ink), .108em .086em var(--ink), .086em .108em var(--ink), .06em .124em var(--ink), .031em .134em var(--ink), 0 .138em var(--ink), -.031em .134em var(--ink), -.06em .124em var(--ink), -.086em .108em var(--ink), -.108em .086em var(--ink), -.124em .06em var(--ink), -.134em .031em var(--ink), -.138em 0 var(--ink), -.134em -.031em var(--ink), -.124em -.06em var(--ink), -.108em -.086em var(--ink), -.086em -.108em var(--ink), -.06em -.124em var(--ink), -.031em -.134em var(--ink), 0 -.138em var(--ink), .031em -.134em var(--ink), .06em -.124em var(--ink), .086em -.108em var(--ink), .108em -.086em var(--ink), .124em -.06em var(--ink), .134em -.031em var(--ink);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #05030a; color: var(--txt); font-family: var(--text); font-weight: 500; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; -webkit-font-smoothing: antialiased; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#ui { position: fixed; inset: 0; pointer-events: none; font-size: 15px; line-height: 1.35; }
#ui > * { pointer-events: none; }
button { font: inherit; color: inherit; touch-action: manipulation; cursor: pointer; }
b, strong { font-weight: 600; }
.hide { display: none !important; }
/* Money that counts up or down: every digit sits in a slot of one width, so the figures do not shuffle sideways as they run
   (neither face has tabular figures of its own). */
.dg, .ch { font-style: normal; }
.dg { display: inline-block; width: var(--dg); text-align: center; }
/* The casino's own signs (src/ui/glyphs.js): one colour, as big as the type they stand in, round at every corner.
   .gl-e is the ink edge under a sign that stands on its own. */
.gl { display: block; width: 1em; height: 1em; flex: none; overflow: visible; }
.gl path { stroke-linejoin: round; stroke-linecap: round; }
.gl .f { fill: currentColor; stroke: currentColor; } .gl .l { fill: none; stroke: currentColor; }
.gl .gl-e .f { fill: var(--ink); stroke: var(--ink); } .gl .gl-e .l { stroke: var(--ink); }
/* read out, not shown */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- world labels ---------- */
#labels { position: absolute; inset: 0; overflow: hidden; transition: opacity .25s; }
#ui:has(> #banner:not(.off):not(.out)) > #labels { opacity: .16; }   /* a win banner has the screen to itself */
.wl { position: absolute; left: 0; top: 0; padding: 1px 9px 3px; border-radius: calc(9px * var(--rk)); background: var(--slab); border: 2.5px solid var(--ink); color: #fff;
  font: 700 12px/1.5 var(--display); letter-spacing: .3px; white-space: nowrap; will-change: transform; text-shadow: 0 1.5px 0 var(--ink); box-shadow: 0 3px 0 var(--ink); }
.wl.big { font-size: 15.2px; padding: 1px 11px 3px; border-radius: calc(10px * var(--rk)); }
.wl.win { color: #06301c; background: linear-gradient(#93ffcd, #2fd884); text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.wl.lose { color: #ffd0d8; background: #5c1026; }
.wl.push { color: #efe6ff; background: #3d3554; }
.wl.active { color: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 2.5px var(--ink), 0 4px 0 2.5px var(--ink), 0 0 16px 4px rgba(255, 217, 94, .7); }
.wl.gold { color: var(--brown); background: var(--gilt); text-shadow: 0 1px 0 rgba(255, 255, 255, .55); }
.wl.note { color: var(--gold); font-size: 10.8px; padding: 0 6px 2px; border-width: 2px; border-radius: calc(7px * var(--rk)); box-shadow: 0 2px 0 var(--ink); }
.wl.sm, .wl.sm.big { font-size: 10.4px; padding: 0 6px 2px; border-width: 2px; border-radius: calc(7px * var(--rk)); box-shadow: 0 2px 0 var(--ink); }
.wl.pop { animation: wlpop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes wlpop { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }

/* ---------- HUD ---------- */
#hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding: calc(10px + var(--sat)) calc(12px + var(--sar)) 0 calc(12px + var(--sal)); transition: opacity .4s, transform .4s; }
#hud.off { opacity: 0; transform: translateY(-16px); visibility: hidden; transition: opacity .4s, transform .4s, visibility 0s .4s; }
#hud > div { display: flex; gap: 9px; align-items: flex-start; pointer-events: auto; }
#hud > div:first-child { min-width: 0; }                                 /* in a narrow window the left side gives way... */
#hud > div:last-child, .pill, .buff { flex: none; }                      /* ...but never a pill, and never the buttons on the right */
.pill { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 14px 0 7px; border-radius: var(--r2); background: var(--board); border: 3px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .14), inset 0 -3px 0 rgba(0, 0, 0, .3), 0 4px 0 var(--ink), 0 10px 16px rgba(0, 0, 0, .35); }
.coin { width: 26px; height: 26px; border-radius: 50%; flex: none; background: conic-gradient(#ffd95e 0 12.5%, #fff6d0 0 25%, #ffd95e 0 37.5%, #fff6d0 0 50%, #ffd95e 0 62.5%, #fff6d0 0 75%, #ffd95e 0 87.5%, #fff6d0 0);
  box-shadow: inset 0 0 0 5px #e9a51f, inset 0 0 0 6px #9a5c08, 0 0 0 2px var(--ink), 0 2px 0 2px var(--ink); position: relative; }
.coin::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c0, #e9a51f 70%); }
#chips { font: 700 17.6px/1.25 var(--display); letter-spacing: .3px; color: var(--gold); text-shadow: var(--o1), 0 2.5px 0 var(--ink); min-width: 74px; padding-bottom: 2px; }
#chips.up { color: var(--green); } #chips.down { color: #ffb3c0; }
.pill.chips { position: relative; }
.delta { position: absolute; left: 44px; top: 36px; font: 700 14.4px/1.25 var(--display); pointer-events: none; animation: delta 1.5s ease-out forwards; text-shadow: var(--o1), 0 2px 0 var(--ink); white-space: nowrap; }
.delta.plus { color: var(--green); } .delta.minus { color: #ff9aad; }
@keyframes delta { 0% { opacity: 0; transform: translateY(-6px) scale(.7); } 15% { opacity: 1; transform: translateY(0) scale(1.15); } 25% { transform: scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(18px); } }
.pill.vip { padding: 0 14px 0 11px; gap: 10px; cursor: pointer; }
.gem { width: 20px; height: 20px; transform: rotate(45deg); border-radius: calc(4px * var(--rk)); flex: none; background: var(--tier, #d08a4e); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .28), inset 3px 3px 0 rgba(255, 255, 255, .45), 0 0 0 2px var(--ink); }
.vip-txt { display: flex; flex-direction: column; gap: 3px; min-width: 96px; text-align: left; }
.vip-name { font: 700 11.2px/1.25 var(--display); letter-spacing: 1px; text-transform: uppercase; color: var(--tier, var(--gold)); text-shadow: 0 1.5px 0 var(--ink); }
.bar { height: 8px; border-radius: calc(5px * var(--rk)); background: var(--ink); overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--ink), 0 1px 0 rgba(255, 255, 255, .12); }
.bar > i { display: block; height: 100%; width: 0; border-radius: calc(4px * var(--rk)); background: linear-gradient(#fff3b0 0 38%, var(--gold) 38% 72%, var(--gold2) 72%); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.vip-sub { font-size: 11px; font-weight: 600; color: var(--dim); line-height: 1; }
/* the drinks give way: those that do not fit wrap onto a second line that is not shown, so the HUD keeps to one row of whole badges */
.buffs { display: flex; flex-wrap: wrap; gap: 10px 7px; flex: 0 1 auto; min-width: 0; height: 50px; overflow: hidden; }
.buff { height: 44px; padding: 0 10px; border-radius: var(--r2); background: var(--board); border: 3px solid var(--ink); display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .14), inset 0 -3px 0 rgba(0, 0, 0, .3), 0 4px 0 var(--ink); }
.buff .dg { width: .6em; }
.buff i:first-child { width: 14px; height: 18px; border-radius: calc(2px * var(--rk)) calc(2px * var(--rk)) calc(6px * var(--rk)) calc(6px * var(--rk)); background: var(--bc); box-shadow: 0 0 0 2px var(--ink); display: block; }
.ib { width: 44px; height: 44px; border-radius: var(--r2); background: var(--board); border: 3px solid var(--ink); display: grid; place-items: center; position: relative;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .14), inset 0 -3px 0 rgba(0, 0, 0, .3), 0 4px 0 var(--ink), 0 10px 16px rgba(0, 0, 0, .35); transition: transform .1s, filter .1s, box-shadow .1s; }
.ib:hover { filter: brightness(1.25); transform: translateY(-2px); }
.ib:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .14), inset 0 -3px 0 rgba(0, 0, 0, .3), 0 1px 0 var(--ink); }
.ib .gl { font-size: 27px; color: var(--gold); filter: drop-shadow(0 2px 0 var(--ink)); }
.ib .dot { position: absolute; right: -7px; top: -8px; min-width: 24px; height: 20px; padding: 0 5px 1px; border-radius: calc(8px * var(--rk)); background: var(--red); color: #fff; font: 700 11.2px/1.25 var(--display); display: grid; place-items: center; border: 2px solid var(--ink); text-shadow: 0 1px 0 var(--ink); }
.ib .dot.ok { background: #2fd884; color: #06301c; text-shadow: none; }

/* ---------- prompt ---------- */
#prompt { position: absolute; left: 50%; bottom: calc(28px + var(--sab)); transform: translateX(-50%); pointer-events: auto; display: flex; align-items: center; gap: 11px;
  padding: 8px 18px 9px 10px; border-radius: calc(16px * var(--rk)); background: var(--board); border: 3px solid var(--ink); box-shadow: inset 0 0 0 2px var(--gold2), 0 5px 0 var(--ink), 0 12px 20px rgba(0, 0, 0, .45);
  transition: opacity .18s, transform .18s; white-space: nowrap; font: inherit; color: inherit; animation: pglow 1.5s ease-in-out infinite; }
/* The pill itself never moves (a steady thing to tap, and a box a test can click): it calls with a glow, its key cap is pressed and its verb bobs. */
@keyframes pglow { 50% { box-shadow: inset 0 0 0 2px var(--gold), 0 5px 0 var(--ink), 0 12px 20px rgba(0, 0, 0, .45), 0 0 28px 3px rgba(255, 217, 94, .6); } }
@keyframes bob { 50% { translate: 0 -2px; } }
@keyframes keytap { 0%, 55%, 100% { translate: 0 0; box-shadow: inset 0 -3px 0 #cbb98a, 0 2px 0 var(--ink); } 72% { translate: 0 2px; box-shadow: inset 0 -1px 0 #cbb98a, 0 0 0 var(--ink); } }
/* what is off is hidden outright once it has faded: a browser that does not know `inert` then keeps it out of the Tab order too */
#prompt.off { opacity: 0; transform: translateX(-50%) translateY(10px); pointer-events: none; visibility: hidden; transition: opacity .18s, transform .18s, visibility 0s .18s; }
#prompt.off, #prompt.off * { animation: none; }
/* On a touch screen the prompt stands at the right, under the other thumb. The left of the screen is the walking stick's:
   a button there would swallow the press that was meant to walk, and sit the player down instead. */
.touch #prompt { left: auto; right: calc(14px + var(--sar)); transform: none; width: max-content; max-width: calc(55vw - 26px - var(--sar)); padding: 8px 14px 9px; white-space: normal; flex-wrap: wrap; justify-content: center; gap: 2px 10px; text-align: center; }
.touch #prompt.off { transform: translateY(10px); }
/* the keyboard's place: every control shows where Tab has got to (a mouse click or a tap shows nothing) */
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
#modal:focus { outline: none; }
#prompt.locked { box-shadow: inset 0 0 0 2px var(--red), 0 5px 0 var(--ink), 0 12px 20px rgba(0, 0, 0, .45); animation: none; }
#prompt b { font: 700 16.8px/1.25 var(--display); letter-spacing: .4px; color: var(--gold); text-shadow: var(--o1), 0 2px 0 var(--ink); padding-bottom: 2px; animation: bob 1.5s ease-in-out infinite; }
#prompt.locked b { color: #ff9aad; animation: none; }
#prompt kbd { animation: keytap 1.5s ease-in-out infinite; }
#prompt span { color: var(--txt); font-size: 14.5px; font-weight: 600; }
kbd { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 7px 3px; border-radius: calc(8px * var(--rk)); background: linear-gradient(#fffdf2, #f3e6c3); color: var(--ink); font: 700 13.6px/1.25 var(--display);
  border: 2px solid var(--ink); box-shadow: inset 0 -3px 0 #cbb98a, 0 2px 0 var(--ink); text-shadow: none; letter-spacing: 0; }
.btn kbd, .act kbd { min-width: 22px; height: 22px; padding: 0 5px 2px; font-size: 10.8px; border-radius: calc(6px * var(--rk)); box-shadow: inset 0 -2px 0 #cbb98a; }

/* ---------- buttons ---------- */
.btn { height: 44px; padding: 0 18px 3px; border-radius: var(--r1); background: var(--violet); border: 3px solid var(--ink); color: #fff; font: 700 13.6px/1.25 var(--display); letter-spacing: .3px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-shadow: var(--o1), 0 2px 0 var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .38), inset 0 -4px 0 rgba(0, 0, 0, .26), 0 4px 0 var(--ink); transition: transform .08s, filter .1s, box-shadow .08s; }
.btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .38), inset 0 -2px 0 rgba(0, 0, 0, .26), 0 1px 0 var(--ink); }
.btn:disabled { filter: saturate(.3) brightness(.6); cursor: default; }
.btn.primary { background: var(--gilt); color: var(--brown); text-shadow: 0 1px 0 rgba(255, 255, 255, .6); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -4px 0 rgba(160, 92, 0, .45), 0 4px 0 var(--ink); }
.btn.primary:active:not(:disabled) { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(160, 92, 0, .45), 0 1px 0 var(--ink); }
.btn.red { background: linear-gradient(#ff7a92, #d92b52); }
.btn.ghost { background: linear-gradient(#4a2c7c, #38205f); }
.btn.small { height: 34px; padding: 0 12px 2px; font-size: 11.6px; border-radius: calc(10px * var(--rk)); border-width: 2.5px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .34), inset 0 -3px 0 rgba(0, 0, 0, .26), 0 3px 0 var(--ink); }
.btn.small.primary { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(160, 92, 0, .45), 0 3px 0 var(--ink); }
.touch .btn.small { height: 38px; padding: 0 14px 2px; }             /* a thumb needs more to aim at than a pointer does */
.touch .tab, .touch .seg button { height: 40px; }
@media (pointer: coarse) { .act kbd, .btn kbd, #prompt kbd { display: none; } }   /* a tablet has no keys to show, however wide it is */
.btn.on { background: linear-gradient(#93ffcd, #2fd884); color: #06301c; text-shadow: 0 1px 0 rgba(255, 255, 255, .55); }

/* ---------- the table panel ---------- */
#panel { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(1400px, 100%); pointer-events: auto; padding: 0 calc(10px + var(--sar)) calc(12px + var(--sab)) calc(10px + var(--sal));
  transition: transform .32s cubic-bezier(.2, .9, .2, 1), opacity .25s; }
#panel.off { transform: translateX(-50%) translateY(110%); opacity: 0; pointer-events: none; visibility: hidden; transition: transform .32s cubic-bezier(.2, .9, .2, 1), opacity .25s, visibility 0s .32s; }
.panel-in { background: var(--board); border: 3px solid var(--ink); border-radius: var(--r3); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .15), inset 0 -4px 0 rgba(0, 0, 0, .3), 0 6px 0 var(--ink), 0 -8px 30px rgba(0, 0, 0, .35);
  padding: 10px 14px 14px; display: grid; grid-template-columns: minmax(min-content, 1fr) auto minmax(min-content, max-content); grid-template-areas: 'head head head' 'info rack acts'; gap: 8px 14px; align-items: center; }
/* The columns: the buttons take the width of their one row first and the chips their own, and the numbers get what is
   left. Where that is too little the list of past results gives way, a whole disc at a time (.hist), and only when the
   numbers themselves would not fit do the buttons wrap. So nothing a player presses moves as results come in. */
/* The head row spans every column. Left to itself its width as one line (the name, the note, the whole status line)
   would be handed to the numbers' column, the buttons would be the ones to give way, and a long status line would wrap
   them. So it asks the columns for nothing (width: 0) and then fills the row it is given (min-width: 100%). */
.p-head { grid-area: head; display: flex; align-items: center; gap: 12px; min-height: 34px; width: 0; min-width: 100%; }
/* the table's name is a brass plate hung on the board's top edge */
.p-title { font: 700 14.4px/1.25 var(--display); letter-spacing: .8px; text-transform: uppercase; color: var(--brown); white-space: nowrap; padding: 5px 13px 7px; margin: -24px 0 0 -4px; border-radius: calc(10px * var(--rk)); background: var(--gilt); border: 3px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(160, 92, 0, .45), 0 3px 0 var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, .6); rotate: -2deg; }
.p-sub { font-size: 13px; font-weight: 500; color: var(--dim); white-space: nowrap; }
/* The status line is never cut short. ui.js (fitStatus) measures it in the room it has and steps a line that does not
   fit down through .long and .xlong; the last step is two short lines, which fit inside the row the tools already make. */
.p-status { flex: 1; min-width: 0; text-align: center; font: 700 16px/1.5 var(--display); letter-spacing: .3px; min-height: 28px; padding: 1px 3px 3px; text-shadow: var(--o1), 0 2px 0 var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-status.long { font-size: 14.4px; }
.p-status.xlong, .p-status.xxlong { font-size: 12.8px; line-height: 1.15; letter-spacing: 0; min-height: 0; white-space: normal; text-wrap: balance; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.p-status.win { color: var(--green); } .p-status.lose { color: #ff9aad; } .p-status.gold { color: var(--gold); }
.p-status.flash { animation: stflash .5s ease-out; }
@keyframes stflash { from { transform: scale(1.22) rotate(-1.5deg); filter: brightness(1.8); } to { transform: none; filter: none; } }
.p-tools { display: flex; gap: 7px; } .t-sign { display: none; }
.p-info { grid-area: info; display: flex; gap: 14px; align-items: center; min-height: 52px; min-width: 0; }
.kv { display: flex; flex-direction: column; gap: 2px; min-width: 56px; white-space: nowrap; flex: none; }
.kv span { display: flex; align-items: center; gap: 3px; font: 700 10.4px/1.5 var(--display); letter-spacing: .7px; text-transform: uppercase; color: var(--dim); }
.kv span .gl { font-size: 11px; color: #e3d6f7; }
.kv b { font: 700 16.8px/1.375 var(--display); letter-spacing: .3px; text-shadow: 0 2px 0 var(--ink); }
.kv b.gold { color: var(--gold); } .kv b.win { color: var(--green); }
/* past results, newest first. The strip is one row high and wraps: a disc with no room drops to a second row that is
   never seen, so the list gets shorter by whole discs and never cuts one in half. A row never wraps its first item, so
   an empty one stands before the newest result: then that disc can drop as well, when there is no room even for it. */
.hist { display: flex; gap: 4px; align-items: center; align-content: flex-start; flex-wrap: wrap; height: 37px; flex: 0 1 auto; min-width: 0; overflow: hidden; padding: 3px 0; }
.hist::before { content: ''; flex: none; width: 0; height: 31px; margin-right: -4px; }
.hist i { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; font: 700 10.4px/1.25 var(--display); font-style: normal; color: #fff; flex: none; border: 2px solid var(--ink); padding-bottom: 1px; }
.hist i.red { background: #dc2c3a; } .hist i.black { background: #2a2a36; } .hist i.green { background: #17a45c; }
.hist i:first-child { width: 31px; height: 31px; font-size: 12px; box-shadow: 0 0 0 2px var(--gold); margin-right: 3px; margin-left: 2px; }
.p-rack { grid-area: rack; display: flex; gap: 9px; align-items: center; justify-content: center; padding: 0 3px; }
.chipb { width: 50px; height: 50px; border-radius: 50%; border: none; position: relative; flex: none; background: conic-gradient(var(--c) 0 8.33%, #f3efe2 0 16.66%, var(--c) 0 25%, #f3efe2 0 33.33%, var(--c) 0 41.66%, #f3efe2 0 50%, var(--c) 0 58.33%, #f3efe2 0 66.66%, var(--c) 0 75%, #f3efe2 0 83.33%, var(--c) 0 91.66%, #f3efe2 0);
  box-shadow: 0 0 0 3px var(--ink), 0 4px 0 3px var(--ink); transition: transform .12s, box-shadow .12s; color: var(--ct, #fff); font: 700 12.4px/1.25 var(--display); }
.chipb::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), inset 0 -6px 0 rgba(0, 0, 0, .18); }
.chipb span { position: relative; top: -1px; }
.chipb:hover { transform: translateY(-3px); }
.chipb.sel { transform: translateY(-8px) scale(1.08); box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--gold), 0 0 0 8.5px var(--ink), 0 9px 0 6px rgba(0, 0, 0, .4); }
.chipb:disabled { filter: grayscale(.8) brightness(.55); cursor: default; transform: none; }
.p-acts { grid-area: acts; display: flex; gap: 7px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.act { min-width: 0; padding: 0 12px 3px; gap: 7px; font-size: 13.6px; }
.l-short { display: none; }
/* A narrower window keeps its buttons on one row and its results in sight. The key caps on the row go first (Settings
   lists the keys); then the line under the table's name, the slack between the columns and the long form of a label. */
@media (max-width: 1240px) { .act kbd { display: none; } }
/* one label is too long for any window under 1400 wide: roulette's fifth button says "Again" there */
@media (min-width: 901px) and (max-width: 1400px) and (min-height: 521px) { .act.tight .l-full { display: none; } .act.tight .l-short { display: inline; } }
@media (min-width: 901px) and (max-width: 1100px) and (min-height: 521px) {
  .p-sub { display: none; }
  .panel-in { column-gap: 10px; } .p-info { gap: 10px; } .p-rack { gap: 6px; padding: 0; } .act { padding: 0 10px 3px; }
  .chipb { width: 46px; height: 46px; font-size: 11.6px; }
  .l-full { display: none; } .l-short { display: inline; }
}
/* half of a wide screen: one past result is all the strip could show here, and the status line has just said it */
@media (min-width: 901px) and (max-width: 960px) and (min-height: 521px) { .hist { display: none; } }
.act.big { min-width: 124px; height: 52px; padding: 0 18px 4px; font-size: 19.2px; letter-spacing: .6px; }

/* ---------- toasts and banners ---------- */
#toasts { position: absolute; left: calc(12px + var(--sal)); top: calc(96px + var(--sat)); display: flex; flex-direction: column; gap: 11px; align-items: flex-start; width: min(390px, calc(100vw - 24px)); }
.toast { display: flex; gap: 12px; align-items: center; padding: 8px 16px 10px 9px; border-radius: var(--r2); background: var(--board); border: 3px solid var(--ink); width: 100%;
  box-shadow: inset 0 0 0 2px var(--tc, var(--gold2)), 0 5px 0 var(--ink), 0 12px 20px rgba(0, 0, 0, .45); animation: toastin .5s cubic-bezier(.2, 1.5, .4, 1); }
.toast.out { animation: toastout .35s ease-in forwards; }
@keyframes toastin { from { opacity: 0; transform: translateX(-30px) rotate(-5deg) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateX(-18px) scale(.96); } }
.toast .ti { width: 40px; height: 40px; border-radius: calc(10px * var(--rk)); flex: none; display: grid; place-items: center; background: var(--tc, var(--gold)); border: 2.5px solid var(--ink); font: 700 18.4px/1.25 var(--display); color: var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -3px 0 rgba(0, 0, 0, .2); }
.toast .ti .gl { font-size: 25px; }
.toast small { display: block; font: 700 10px/1.562 var(--display); letter-spacing: 1px; text-transform: uppercase; color: var(--tc, var(--gold)); }
.toast b { display: block; font: 700 14.4px/1.437 var(--display); letter-spacing: .2px; text-shadow: 0 2px 0 var(--ink); }
.toast p { font-size: 13px; color: var(--dim); line-height: 1.3; margin-top: 1px; }
.toast.mini { width: auto; padding: 6px 16px 8px; border-radius: calc(12px * var(--rk)); font: 700 13.2px/1.5 var(--display); letter-spacing: .2px; text-shadow: 0 2px 0 var(--ink); }
#banner { position: absolute; left: 50%; top: 30%; --by: -50%; transform: translate(-50%, var(--by)); text-align: center; white-space: nowrap; }
#banner::before { content: ''; position: absolute; inset: -38px -120px; z-index: -1; background: radial-gradient(closest-side, rgba(7, 4, 13, .85), rgba(7, 4, 13, .62) 56%, rgba(7, 4, 13, .25) 80%, transparent); pointer-events: none; }
/* a slow fan of light turns behind every call-out */
#banner::after { content: ''; position: absolute; left: 50%; top: 50%; width: min(980px, 170vmin); height: min(980px, 170vmin); margin: calc(min(980px, 170vmin) / -2); z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 217, 94, .2) 0 9deg, transparent 9deg 18deg); -webkit-mask: radial-gradient(closest-side, #000 16%, transparent 70%); mask: radial-gradient(closest-side, #000 16%, transparent 70%); animation: rays 20s linear infinite; }
@keyframes rays { to { rotate: 360deg; } }
#banner.off { display: none; }
#banner.high { top: 20%; }                                /* over a slot machine: clear of the reels that won it */
/* the big line is two layers: the ink outline and its heavy foot underneath, and the gold face (a copy of the words,
   from data-t) on top. A gradient face and an outline cannot share one layer: shadows paint over a background. */
#banner .b-title { position: relative; display: inline-block; padding: 0 .175em .15em; font: 700 clamp(32px, min(6.72vw, 11.2vh), 76.8px)/1.312 var(--display); letter-spacing: .025em; text-transform: uppercase; color: var(--ink);
  text-shadow: var(--oE), 0 .213em 0 var(--ink), .075em .2em 0 var(--ink), -.075em .2em 0 var(--ink); rotate: -2deg; animation: bpop .6s cubic-bezier(.2, 1.7, .4, 1); }
#banner .b-title::after { content: attr(data-t); position: absolute; inset: 0; padding: inherit; background: linear-gradient(#fffbe0 16%, #ffe98c 40%, #f7b52c 66%, #ffd95e 88%); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 .056em 0 #a45f06); }
#banner .b-amt { font: 700 clamp(25.6px, min(4.96vw, 8.8vh), 56px)/1.437 var(--display); letter-spacing: .025em; color: #fff; text-shadow: var(--oe), 0 .138em 0 var(--ink), 0 0 .563em rgba(77, 255, 163, .9); }
#banner .b-sub { display: inline-block; font: 700 clamp(11.2px, 1.6vw, 16px)/1.375 var(--display); letter-spacing: .125em; text-transform: uppercase; color: #fff; margin-top: 12px; padding: .475em 1.188em .625em; border-radius: calc(10px * var(--rk)); background: var(--violet); border: 3px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .34), inset 0 -3px 0 rgba(0, 0, 0, .26), 0 4px 0 var(--ink); text-shadow: var(--o1), 0 2px 0 var(--ink); rotate: 1.5deg; }
#banner.out { animation: bout .5s ease-in forwards; }
@keyframes bpop { from { opacity: 0; transform: scale(.3) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes bout { to { opacity: 0; transform: translate(-50%, calc(var(--by) - 12%)) scale(1.08); } }

/* ---------- dialogs ---------- */
#shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(5, 3, 10, .4), rgba(5, 3, 10, .84)); pointer-events: auto; opacity: 1; transition: opacity .25s; }
#shade.off { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
#shade.side { background: linear-gradient(90deg, transparent 30%, rgba(5, 3, 10, .7)); pointer-events: none; }
/* a framed sign: ink, a gold band, ink again */
#modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100vw - 24px)); max-height: 86vh; max-height: min(86vh, calc(100dvh - 30px)); pointer-events: auto; display: flex; flex-direction: column;
  background: var(--board); border: 3px solid var(--ink); border-radius: calc(20px * var(--rk)); box-shadow: 0 0 0 4px var(--gold2), 0 0 0 7px var(--ink), 0 10px 0 7px rgba(0, 0, 0, .45), 0 30px 60px rgba(0, 0, 0, .6);
  transition: opacity .22s, transform .28s cubic-bezier(.2, 1.4, .3, 1); }
#modal.off { opacity: 0; transform: translate(-50%, -44%) scale(.92) rotate(-1.5deg); pointer-events: none; visibility: hidden; transition: opacity .22s, transform .28s cubic-bezier(.2, 1.4, .3, 1), visibility 0s .28s; }
/* the dialog at a counter stands to the right, under the HUD's buttons and clear of them */
#modal.side { left: auto; right: calc(18px + var(--sar)); top: calc(50% + 28px); transform: translateY(-50%); width: min(430px, calc(100vw - 24px)); max-height: calc(100vh - 104px); max-height: calc(100dvh - 104px - var(--sat)); }
#modal.side.off { transform: translate(30px, -50%); }
#modal.narrow { width: min(480px, calc(100vw - 24px)); }
.m-head { display: flex; align-items: center; gap: 12px; padding: 13px 14px 12px 20px; background: var(--violet); border-bottom: 3px solid var(--ink); border-radius: calc(16px * var(--rk)) calc(16px * var(--rk)) 0 0; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3); }
.m-head h2 { flex: 1; font: 700 21.6px/1.312 var(--display); letter-spacing: .8px; text-transform: uppercase; color: var(--gold); text-shadow: var(--o15), 0 3px 0 var(--ink); padding-bottom: 2px; }
.m-head p { font-size: 13.5px; font-weight: 600; color: #efe4ff; margin-top: 3px; }
.m-x { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: calc(10px * var(--rk)); border: 2.5px solid var(--ink); background: linear-gradient(#ff7a92, #d92b52); font: 700 13.6px/1.25 var(--display); color: #fff; text-shadow: 0 2px 0 var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 3px 0 var(--ink); transition: transform .08s, filter .1s; }
.m-x:hover { filter: brightness(1.12); transform: translateY(-1px) rotate(4deg); }
.m-x:active { transform: translateY(2px); }
.m-x .gl { font-size: 19px; filter: drop-shadow(0 2px 0 var(--ink)); }
.m-body { padding: 16px 18px 18px; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--gold2) transparent; }
/* a dialog with no foot fades out at its lower edge: rows that run on under the frame are more to scroll to, not a cut */
.m-body:last-child { padding-bottom: 30px; -webkit-mask-image: linear-gradient(#000 calc(100% - 24px), transparent); mask-image: linear-gradient(#000 calc(100% - 24px), transparent); }
.m-foot { padding: 12px 18px 16px; display: flex; gap: 10px; justify-content: flex-end; border-top: 3px solid var(--ink); background: rgba(0, 0, 0, .2); border-radius: 0 0 calc(16px * var(--rk)) calc(16px * var(--rk)); flex-wrap: wrap; }
.m-body h3 { font: 700 13.6px/1.375 var(--display); letter-spacing: .8px; text-transform: uppercase; color: var(--gold); text-shadow: 0 2px 0 var(--ink); margin: 16px 0 8px; }
.m-body h3:first-child { margin-top: 0; }
.m-body p { color: #f1e8ff; font-size: 15px; margin: 6px 0; }
.m-body p.dim, .dim { color: var(--dim); font-size: 13.5px; }
.tabs { display: flex; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { height: 36px; padding: 0 14px 2px; border-radius: calc(10px * var(--rk)); border: 2.5px solid var(--ink); background: linear-gradient(#4a2c7c, #38205f); font: 700 12px/1.25 var(--display); letter-spacing: .3px; color: #e3d6f7; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .16), 0 3px 0 var(--ink); text-shadow: 0 1.5px 0 var(--ink); }
.tab.on { background: var(--gilt); color: var(--brown); text-shadow: 0 1px 0 rgba(255, 255, 255, .6); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), 0 3px 0 var(--ink); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px 11px; border-radius: calc(13px * var(--rk)); background: var(--slab); border: 2.5px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1), 0 3px 0 rgba(0, 0, 0, .4); margin-bottom: 10px; }
.row.done { background: #17543b; box-shadow: inset 0 0 0 2px #2fd884, 0 3px 0 rgba(0, 0, 0, .4); }
.row .grow { flex: 1; min-width: 0; }
.row b { display: block; font: 700 13.6px/1.437 var(--display); letter-spacing: .2px; text-shadow: 0 1.5px 0 var(--ink); }
.row small { color: var(--dim); font-size: 13px; display: block; }
.row.done small { color: #b9f5d6; }
.row .bar { margin-top: 7px; }
.row.done .bar > i { background: linear-gradient(#d8ffec 0 38%, #5dffb0 38% 72%, #2fd884 72%); }
.tag { font: 700 10.4px/1.25 var(--display); letter-spacing: .3px; padding: 5px 9px 6px; border-radius: var(--r0); background: #1c0c31; color: var(--gold); white-space: nowrap; border: 2px solid var(--ink); box-shadow: inset 0 2px 0 rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .13); text-shadow: 0 1px 0 var(--ink); }
.tag.green { background: #0b2e20; color: #7dffc0; }
.tag.red { background: #3a0c1b; color: #ffb3c0; }
.icon-box { width: 42px; height: 42px; border-radius: calc(11px * var(--rk)); display: grid; place-items: center; flex: none; background: var(--ic, var(--gold)); border: 2.5px solid var(--ink); font: 700 18.4px/1.25 var(--display); color: var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -3px 0 rgba(0, 0, 0, .2); }
.icon-box .gl { font-size: 26px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
.ach { padding: 9px 12px 10px; border-radius: calc(13px * var(--rk)); background: #24123d; border: 2.5px solid var(--ink); display: flex; gap: 10px; align-items: flex-start; }
.ach.got { background: #3d2a55; background: color-mix(in srgb, var(--ac) 20%, var(--slab)); box-shadow: inset 0 0 0 2px var(--ac), 0 3px 0 rgba(0, 0, 0, .4); }
.ach .medal { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; margin-top: 1px; background: var(--ac); border: 2.5px solid var(--ink); font-size: 16px; color: rgba(23, 10, 42, .42);
  box-shadow: inset 0 0 0 2.5px rgba(255, 255, 255, .5), inset 0 0 0 4.5px rgba(23, 10, 42, .2), 0 3px 0 var(--ink); filter: saturate(.62) brightness(.66); }
.ach.got .medal { filter: none; color: #fff; }
.ach.got .medal .gl { filter: drop-shadow(0 1.5px 0 rgba(23, 10, 42, .55)); }
.ach b { font: 700 12.4px/1.437 var(--display); letter-spacing: .2px; display: block; color: #ddd0f2; text-shadow: 0 1.5px 0 var(--ink); } .ach small { font-size: 12.5px; color: #b3a5cf; display: block; line-height: 1.3; }
.ach.got b { color: #fff; } .ach.got small { color: #e9defa; }
.ach .bar { margin: 6px 0 2px; height: 10px; background: #4b3774; border: 2px solid var(--ink); box-shadow: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 9px; }
.stat { padding: 9px 12px 10px; border-radius: calc(13px * var(--rk)); background: var(--slab); border: 2.5px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1); }
.stat span { font: 700 10px/1.5 var(--display); letter-spacing: .7px; text-transform: uppercase; color: var(--dim); display: block; }
.stat b { font: 700 16.8px/1.437 var(--display); color: var(--gold); text-shadow: 0 2px 0 var(--ink); }
table.pay { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.pay th { text-align: left; font: 700 10px/1.5 var(--display); letter-spacing: .7px; text-transform: uppercase; color: var(--dim); padding: 4px 8px; border-bottom: 2.5px solid var(--ink); }
table.pay td { padding: 7px 8px; border-bottom: 1.5px solid rgba(23, 10, 42, .7); }
table.pay tr:nth-child(odd) td { background: rgba(255, 255, 255, .035); }
table.pay td:last-child, table.pay th:last-child { text-align: right; }
table.pay td.num { text-align: right; color: var(--gold); font: 700 12.8px/1.5 var(--display); letter-spacing: .2px; text-shadow: 0 1.5px 0 var(--ink); }
.sym { display: inline-block; width: 22px; height: 22px; vertical-align: middle; image-rendering: pixelated; margin-right: 2px; }
.tiers { display: flex; flex-direction: column; gap: 8px; }
.tier-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px 9px; border-radius: calc(13px * var(--rk)); border: 2.5px solid var(--ink); background: var(--slab); }
.tier-row b { font: 700 13.2px/1.437 var(--display); letter-spacing: .3px; text-shadow: 0 1.5px 0 var(--ink); }
.tier-row.cur { background: #45305a; background: color-mix(in srgb, var(--tier) 22%, var(--slab)); box-shadow: inset 0 0 0 2px var(--tier), 0 3px 0 rgba(0, 0, 0, .4); }
.tier-row.lock { opacity: .62; }
.tier-row .gem { width: 18px; height: 18px; }
.swatches { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 4px; }
.sw { width: 38px; height: 38px; border-radius: calc(10px * var(--rk)); border: 3px solid var(--ink); background: var(--c); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 3px 0 var(--ink); }
.sw.on { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 0 0 3px var(--gold), 0 0 0 5.5px var(--ink); }
.item { display: flex; align-items: center; gap: 12px; padding: 8px 10px 9px; border-radius: calc(13px * var(--rk)); background: var(--slab); border: 2.5px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1), 0 3px 0 rgba(0, 0, 0, .4); margin-bottom: 9px; }
.item b { font: 700 13.2px/1.437 var(--display); letter-spacing: .2px; text-shadow: 0 1.5px 0 var(--ink); }
.item.on { background: #4a3413; box-shadow: inset 0 0 0 2px var(--gold), 0 3px 0 rgba(0, 0, 0, .4); }
.item .pv { width: 46px; height: 46px; border-radius: calc(10px * var(--rk)); flex: none; background: var(--pv, #333); border: 2.5px solid var(--ink); display: grid; place-items: center; overflow: hidden; }
.item .pv i { display: block; width: 60%; height: 34%; background: var(--pv2, #fff); border-radius: calc(2px * var(--rk)); box-shadow: 0 0 0 2px rgba(0, 0, 0, .25); }
.field { display: flex; align-items: center; gap: 12px; margin: 11px 0; }
.field label { flex: 0 0 110px; font-size: 15px; font-weight: 600; color: #f1e8ff; }
/* a slider is a block too: an ink-edged trough that fills with gold up to a gilt slab of a thumb (--v is its value, 0 to 1, kept by ui.js) */
.field input[type=range] { flex: 1; min-width: 0; height: 34px; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; --fill: linear-gradient(90deg, var(--gold) calc(13px + (100% - 26px) * var(--v, .5)), #21103a 0); }
.field input[type=range]::-webkit-slider-runnable-track { box-sizing: border-box; height: 16px; border: 2.5px solid var(--ink); border-radius: calc(8px * var(--rk)); background: var(--fill); box-shadow: 0 3px 0 var(--ink); }
.field input[type=range]::-moz-range-track { box-sizing: border-box; height: 16px; border: 2.5px solid var(--ink); border-radius: calc(8px * var(--rk)); background: var(--fill); box-shadow: 0 3px 0 var(--ink); }
.field input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 26px; height: 30px; margin-top: -9.5px; border: 2.5px solid var(--ink); border-radius: calc(8px * var(--rk)); background: var(--gilt);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(160, 92, 0, .45), 0 3px 0 var(--ink); }
.field input[type=range]::-moz-range-thumb { box-sizing: border-box; width: 26px; height: 30px; border: 2.5px solid var(--ink); border-radius: calc(8px * var(--rk)); background: var(--gilt);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(160, 92, 0, .45), 0 3px 0 var(--ink); }
.touch .field input[type=range] { height: 42px; }
.seg { display: flex; border: 2.5px solid var(--ink); border-radius: calc(11px * var(--rk)); overflow: hidden; flex: 1; background: #21103a; box-shadow: 0 3px 0 var(--ink); }
.seg button { flex: 1; height: 36px; padding-bottom: 2px; border: none; background: transparent; font: 700 12px/1.25 var(--display); letter-spacing: .3px; color: var(--dim); border-right: 2.5px solid var(--ink); }
.seg button:last-child { border-right: none; }
.seg button:focus-visible { outline-offset: -5px; }
.seg button.on { background: var(--gilt); color: var(--brown); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7); text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 14.5px; align-items: center; color: #f1e8ff; }
.keys kbd, .keys .caps { justify-self: start; } .keys .caps { display: inline-flex; align-items: center; gap: 4px; }
.big-num { font: 700 44.8px/1.375 var(--display); letter-spacing: .5px; color: var(--gold); text-shadow: var(--oe), 0 .125em 0 var(--ink); padding-bottom: 6px; }
.center { text-align: center; }

/* ---------- title and boot ---------- */
/* the loading card, and the error card it turns into, lie over everything: the only z-index among the layers, which otherwise stack in the order they are added */
#boot { position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 50% 40%, #2a1548, #05030a 72%); display: grid; place-items: center; pointer-events: auto; transition: opacity .6s; }
#boot.off { opacity: 0; pointer-events: none; }
.boot-card { text-align: center; }
.boot-card p { font: 700 15.2px/1.5 var(--display); letter-spacing: 3px; text-transform: uppercase; color: var(--gold); text-shadow: 0 3px 0 var(--ink); margin-top: 28px; }
.boot-card p.err { color: #ffb3c0; letter-spacing: 0; text-transform: none; font: 500 15px/1.4 var(--text); max-width: 420px; text-shadow: none; }
.boot-cube { width: 54px; height: 54px; margin: 0 auto; position: relative; animation: bspin 2.4s linear infinite; }
.boot-cube i { position: absolute; inset: 0; border: 4px solid var(--gold); background: rgba(255, 217, 94, .1); box-shadow: 0 0 22px rgba(255, 217, 94, .5), inset 0 0 14px rgba(255, 217, 94, .3); }
.boot-cube i:nth-child(2) { transform: rotate(30deg) scale(.72); border-color: #ffe9a6; }
.boot-cube i:nth-child(3) { transform: rotate(60deg) scale(.5); border-color: #fff; }
@keyframes bspin { to { transform: rotate(360deg); } }
#title { position: absolute; inset: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  background: radial-gradient(ellipse at 50% 45%, rgba(5, 3, 10, .15), rgba(5, 3, 10, .78) 78%); transition: opacity .7s; padding: 20px; }
#title.off { opacity: 0; pointer-events: none; }
#title .kicker { font: 700 clamp(13.6px, 2vw, 21.6px)/1.25 var(--display); letter-spacing: .275em; text-transform: uppercase; color: #fff3c4; text-shadow: var(--oe), 0 .188em 0 var(--ink); margin: 0 0 10px .275em; rotate: -1.5deg; }
#title canvas.logo { width: min(820px, 92vw); height: auto; image-rendering: pixelated; filter: drop-shadow(0 5px 0 var(--ink)) drop-shadow(0 0 26px rgba(255, 217, 94, .55)); animation: logo 4s ease-in-out infinite; }
@keyframes logo { 50% { filter: drop-shadow(0 5px 0 var(--ink)) drop-shadow(0 0 44px rgba(255, 217, 94, .95)); } }
#title .tag2 { font: 700 clamp(12.8px, 1.84vw, 19.2px)/1.562 var(--display); color: #fff; letter-spacing: .038em; margin: 16px 0 26px; padding: 0 16px; text-shadow: var(--oe), 0 .163em 0 var(--ink); }
#title .tag2 span { display: inline-block; }                         /* a narrow screen breaks the line at the comma, never at a dot */
#title .enter { height: 74px; padding: 0 46px 5px; font-size: 24.8px; letter-spacing: 1.5px; text-transform: uppercase; border-radius: calc(20px * var(--rk)); border-width: 4px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -6px 0 rgba(160, 92, 0, .45), 0 7px 0 var(--ink), 0 0 44px rgba(255, 217, 94, .5); position: relative; animation: enter 1.5s ease-in-out infinite; }
/* the button calls without moving: its glow breathes and a gold ring goes out from it, so the thing to press keeps its place */
#title .enter::after { content: ''; position: absolute; inset: -4px; border-radius: inherit; border: 4px solid var(--gold); opacity: 0; pointer-events: none; animation: ping 1.5s ease-out infinite; }
#title .enter:active { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(160, 92, 0, .45), 0 2px 0 var(--ink); transform: translateY(5px); animation: none; }
@keyframes enter { 50% { filter: brightness(1.1); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -6px 0 rgba(160, 92, 0, .45), 0 7px 0 var(--ink), 0 0 72px 8px rgba(255, 217, 94, .9); } }
@keyframes ping { 0% { opacity: .85; transform: scale(1); } 75%, 100% { opacity: 0; transform: scale(1.1, 1.4); } }
#title .who { margin-top: 24px; display: flex; gap: 10px; align-items: baseline; justify-content: center; flex-wrap: wrap; font-size: 17px; font-weight: 600; color: #f1e8ff; text-shadow: var(--o1), 0 2px 0 var(--ink); }
#title .who b { font: 700 16.8px/1.25 var(--display); letter-spacing: .3px; color: var(--gold); text-shadow: var(--o1), 0 2px 0 var(--ink); }
#title .who .came { flex-basis: 100%; color: var(--green); }
#title .foot { position: absolute; bottom: calc(14px + var(--sab)); left: 0; right: 0; font-size: 12.5px; font-weight: 500; color: #cdbfe3; letter-spacing: .2px; padding: 0 16px; text-shadow: var(--o1); }

/* ---------- touch ---------- */
#stick { position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; border: 3px solid var(--ink); background: rgba(45, 24, 82, .5); box-shadow: inset 0 0 0 2px rgba(255, 217, 94, .5); opacity: 0; transition: opacity .15s; }
#stick.on { opacity: 1; }
#stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c0, #e9a51f 70%); box-shadow: 0 0 0 3px var(--ink), 0 4px 0 3px var(--ink); }
#hint { position: absolute; left: 50%; bottom: calc(98px + var(--sab)); transform: translateX(-50%); padding: 7px 16px 8px; border-radius: calc(12px * var(--rk)); background: var(--slab); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-size: 14px; font-weight: 600; color: #f1e8ff; white-space: nowrap; transition: opacity .6s; }
#hint.off { opacity: 0; }
/* the tag over a finger that is aiming at a bet (roulette on a touch screen): above the fingertip, its tail on the finger */
#aim { position: absolute; left: 0; top: 0; display: grid; justify-items: center; padding: 3px 13px 5px; border-radius: calc(12px * var(--rk)); background: var(--slab); border: 2.5px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink), 0 10px 18px rgba(0, 0, 0, .45); white-space: nowrap; pointer-events: none; will-change: transform; }
#aim.off { display: none; }
#aim::after { content: ''; position: absolute; left: calc(50% + var(--tail, 0px) - 7px); bottom: -8.5px; width: 12px; height: 12px; background: var(--slab); border: solid var(--ink); border-width: 0 2.5px 2.5px 0; rotate: 45deg; }
#aim b { font: 700 14.4px/1.437 var(--display); letter-spacing: .3px; color: var(--gold); text-shadow: 0 1.5px 0 var(--ink); }
#aim span { font: 600 12.5px/1.2 var(--text); color: #f1e8ff; }
#aim.none b { color: #cfc3e6; }
#fade { position: absolute; inset: 0; background: #05030a; opacity: 0; transition: opacity .35s; }
#fade.on { opacity: 1; }

/* ---------- small screens ---------- */
@media (max-width: 900px), (max-height: 520px) {
  #ui { font-size: 14px; }
  .pill { height: 38px; padding: 0 11px 0 5px; gap: 7px; border-width: 2.5px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .14), inset 0 -3px 0 rgba(0, 0, 0, .3), 0 3px 0 var(--ink); } .coin { width: 22px; height: 22px; } .coin::after { inset: 6px; }
  #chips { font-size: 15.2px; min-width: 58px; }
  .vip-txt { min-width: 70px; } .vip-sub { display: none; } .pill.vip { padding: 0 11px 0 10px; }
  .ib { width: 38px; height: 38px; border-width: 2.5px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .14), inset 0 -3px 0 rgba(0, 0, 0, .3), 0 3px 0 var(--ink); } .ib .gl { font-size: 23px; }
  .buff { height: 38px; padding: 0 8px; border-width: 2.5px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .14), inset 0 -3px 0 rgba(0, 0, 0, .3), 0 3px 0 var(--ink); } .buffs { height: 43px; }
  #panel { padding-bottom: calc(10px + var(--sab)); }
  .panel-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'head head' 'rack rack' 'info acts'; padding: 8px 10px 11px; gap: 6px 10px; border-radius: calc(16px * var(--rk)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .15), inset 0 -3px 0 rgba(0, 0, 0, .3), 0 4px 0 var(--ink), 0 -8px 30px rgba(0, 0, 0, .35); }
  .p-status { font-size: 13.6px; min-height: 24px; } .p-status.long { font-size: 12.4px; } .p-status.xlong, .p-status.xxlong { font-size: 11.6px; line-height: 1.2; min-height: 0; } .p-title { font-size: 11.6px; letter-spacing: .6px; padding: 4px 10px 5px; margin-top: -20px; border-width: 2.5px; } .p-sub { display: none; }
  .chipb { width: 42px; height: 42px; font-size: 10.8px; box-shadow: 0 0 0 2.5px var(--ink), 0 3px 0 2.5px var(--ink); } .chipb::before { inset: 6px; }
  .chipb.sel { transform: translateY(-2px) scale(1.06); box-shadow: 0 0 0 2.5px var(--ink), 0 0 0 5px var(--gold), 0 0 0 7px var(--ink), 0 5px 0 5px rgba(0, 0, 0, .4); }
  .p-rack { padding-top: 5px; }                                /* the picked chip's ring stays clear of the status line above it */
  .btn { height: 40px; padding: 0 13px 3px; font-size: 12.8px; } .act { min-width: 64px; font-size: 12.8px; } .act.big { min-width: 104px; height: 46px; font-size: 16.8px; }
  .act kbd, .btn kbd, #prompt kbd { display: none; }
  .kv b { font-size: 14.4px; } .kv { min-width: 50px; } .p-info { gap: 11px; }
  #toasts { top: calc(58px + var(--sat)); gap: 9px; width: auto; max-width: min(310px, 76vw); }
  .toast { width: auto; padding: 4px 13px 6px 5px; gap: 9px; border-radius: calc(12px * var(--rk)); border-width: 2.5px; box-shadow: inset 0 0 0 2px var(--tc, var(--gold2)), 0 4px 0 var(--ink); }
  .toast .ti { width: 30px; height: 30px; font-size: 13.6px; border-radius: calc(8px * var(--rk)); border-width: 2px; } .toast .ti .gl { font-size: 19px; }
  .toast small { font-size: 10.4px; letter-spacing: .5px; } .toast b { font-size: 12.4px; } .toast p { font-size: 12.5px; line-height: 1.25; margin-top: 0; }
  .toast.mini { padding: 4px 13px 6px; font-size: 12px; }
  .l-full { display: none; } .l-short { display: inline; }
  .m-head { padding: 10px 11px 9px 15px; } .m-head h2 { font-size: 17.6px; letter-spacing: .6px; } .m-body { padding: 13px 14px 14px; } .m-foot { padding: 10px 14px 13px; }
  #modal.side { right: 12px; }
  #prompt { bottom: calc(20px + var(--sab)); padding: 9px 20px 10px; }
}
/* the labels over the felt close up where the picture is small: a phone upright, or on its side */
@media (max-width: 560px), (max-height: 520px) {
  .wl { font-size: 10.8px; padding: 0 7px 2px; border-width: 2px; box-shadow: 0 2px 0 var(--ink); } .wl.big { font-size: 12.8px; padding: 0 9px 2px; }
  .wl.note, .wl.sm, .wl.sm.big { font-size: 10.4px; padding: 0 5px 1px; }
  /* and the VIP pill is its badge: the tier's gem in a ring that fills as the points come in. Upright there is no room
     for more. On its side the shot of a table runs under the HUD, and the dealer's total and the winning number are read
     in the middle of the top edge, where a long pill would lie over them. */
  .vip-txt { display: none; } .pill.vip { width: 38px; padding: 0; justify-content: center; position: relative; }
  .pill.vip .gem { width: 15px; height: 15px; }
  .pill.vip::before { content: ''; position: absolute; inset: 0; border-radius: calc(11px * var(--rk)); padding: 3px; pointer-events: none;
    background: conic-gradient(var(--tier, var(--gold)) calc(var(--p, 0) * 1%), rgba(255, 255, 255, .12) 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
}
@media (max-width: 560px) {
  .buffs { display: none; } #hud { gap: 6px; } #hud > div { gap: 7px; }
  #chips.long { font-size: 13.2px; }                         /* a bankroll in the millions still leaves the buttons their room */
  .panel-in { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'rack' 'info' 'acts'; }   /* minmax(0, ...): a long status line must not widen the panel */
  .p-acts { justify-content: stretch; flex-wrap: wrap; gap: 7px; } .p-acts .act { flex: 1 1 auto; min-width: 0; padding: 0 8px 3px; } .p-acts .act.big { min-width: 88px; }
  .p-info { justify-content: space-between; }
  /* The status line has a row of its own under the name and the tools, two lines high whatever it says: the sign face
     is wide, most lines need the second one, and a row that came and went would move Leave under a thumb. */
  .p-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 36px; grid-template-areas: 'title tools' 'status status'; gap: 3px 8px; }
  .p-title { grid-area: title; justify-self: start; } .p-tools { grid-area: tools; }
  .p-status, .p-status.long, .p-status.xlong, .p-status.xxlong { grid-area: status; align-self: center; min-height: 0; padding: 0 3px 2px; line-height: 1.25; white-space: normal; text-wrap: balance; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .p-status { font-size: 13.6px; } .p-status.long { font-size: 12.4px; } .p-status.xlong, .p-status.xxlong { font-size: 11.2px; letter-spacing: 0; }
  /* blackjack's five decisions on two rows that never change: the three that come and go above, Stand and Hit below,
     and "Next hand" across the lower row, so nothing moves under a thumb between one decision and the next */
  .p-acts.five { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: 40px 46px; }
  .p-acts.five .act { grid-column: span 2; height: 40px; }
  .p-acts.five .act:nth-child(n+4), .p-acts.five .act:only-child { grid-column: span 3; grid-row: 2; height: 46px; }
  .p-acts.five .act:only-child { grid-column: 1 / -1; }
  .p-acts.five .act { padding: 0 5px 3px; letter-spacing: 0; }   /* "Surrender" in a third of a narrow row */
  #modal.side { left: 50%; right: auto; top: auto; bottom: calc(18px + var(--sab)); transform: translateX(-50%); max-height: 56vh; }
  /* the lines that float over the picture stay whole on a narrow screen: they wrap instead of running off both edges */
  #banner, #prompt, #hint { width: max-content; max-width: calc(100vw - 20px - var(--sal) - var(--sar)); white-space: normal; text-wrap: balance; }
  #banner .b-sub { font-size: 10.8px; letter-spacing: .075em; }
  #prompt { flex-wrap: wrap; justify-content: center; gap: 2px 10px; text-align: center; }
  #hint { text-align: center; }
  #modal.side.off { transform: translate(-50%, 30px); }
  #title .enter { height: 64px; padding: 0 30px 4px; font-size: 20.8px; }
}
/* an upright phone in a browser with its bars showing (390 x 664 and shorter) is a third shorter than its screen:
   the panel drops its title, puts the status line beside two signs and closes up, and the felt gets the height back */
@media (max-width: 560px) and (max-height: 720px) {
  #panel { padding-bottom: calc(8px + var(--sab)); }
  .panel-in { padding: 6px 10px 9px; gap: 5px 10px; }
  .p-title { display: none; } .p-head { display: flex; gap: 8px; min-height: 0; }
  .p-status, .p-status.long, .p-status.xlong, .p-status.xxlong { flex: 1 1 0; line-height: 1.35; }             /* two lines beside the two signs, inside their height */
  .p-status { font-size: 12px; } .p-status.long { font-size: 11.2px; } .p-status.xlong, .p-status.xxlong { font-size: 10.4px; }
  .p-tools .t-word { display: none; } .p-tools .t-sign { display: grid; place-items: center; font-size: 13.6px; line-height: 1.25; } .p-tools .t-sign .gl { font-size: 17px; }
  .p-tools .btn.small, .touch .p-tools .btn.small { width: 38px; height: 38px; padding: 0 0 2px; }
  .p-info { min-height: 0; } .kv span { font-size: 10px; letter-spacing: .3px; } .kv b { font-size: 13.6px; }
  .chipb { width: 38px; height: 38px; font-size: 10.4px; } .act.big { height: 42px; } .btn { height: 38px; }
  .p-acts.five { grid-template-rows: 38px 42px; } .p-acts.five .act { height: 38px; }
  .p-acts.five .act:nth-child(n+4), .p-acts.five .act:only-child { height: 42px; }
}
@media (max-height: 520px) {
  .toast p { display: none; }                               /* no height to spare for a third line */
  #modal, #modal.side { top: 50%; max-height: calc(100vh - 26px); max-height: calc(100dvh - 26px); }
  #banner { top: 37%; }
  /* over a slot machine a phone on its side has some 110px above the line that won, and less on a small one. The
     call-out drops its third line (the status line says it too), is set smaller and hangs from the top of the screen,
     between the chips and the buttons; the VIP pill and the drinks step aside while it is up. */
  #banner.high { top: calc(4px + var(--sat)); --by: 0%; }
  #banner.high::before { inset: -14px -90px -18px; }
  #banner.high .b-title { font-size: clamp(24px, 8.4vh, 34px); }
  #banner.high .b-amt { font-size: clamp(20px, 7vh, 28px); }
  #banner.high .b-sub { display: none; }
  #hud .pill.vip, #hud .buffs { transition: opacity .2s; }
  #ui:has(> #banner.high:not(.off):not(.out)) #hud :is(.pill.vip, .buffs) { opacity: 0; }
  /* at a table the drinks stop short of the middle of the top edge, which is the table's (see the VIP badge above);
     those that do not fit are not shown, as in any narrow window */
  #hud.seated > div:first-child { max-width: calc(50vw - 102px - var(--sal)); }
  /* a phone on its side: two rows, the numbers beside the status line and the chips beside the buttons */
  .panel-in { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'info head' 'rack acts'; padding: 6px 10px 9px; gap: 7px 12px; }
  .p-tools { order: -1; }                                   /* Leave keeps away from the big button under the right thumb */
  .p-title { display: none; } .p-info { min-height: 0; gap: 12px; } .p-info .hist i:nth-child(n+3) { display: none; }
  .kv span { font-size: 10px; letter-spacing: .3px; } .kv b { font-size: 13.6px; }
  .p-head { min-height: 38px; gap: 8px; } .p-rack { justify-content: flex-start; gap: 8px; }
  /* beside the tools the status line has two short lines to say it in, and the row is tall enough for both */
  .p-status, .p-status.long, .p-status.xlong, .p-status.xxlong { line-height: 1.3; min-height: 0; padding: 0 3px 2px; white-space: normal; text-wrap: balance; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .p-status { font-size: 12.4px; } .p-status.long { font-size: 11.6px; } .p-status.xlong, .p-status.xxlong { font-size: 10.8px; letter-spacing: 0; }
  .chipb { width: 38px; height: 38px; font-size: 10.4px; } .act.big { height: 42px; } .btn { height: 38px; }
  .p-acts { flex-wrap: nowrap; gap: 7px; } .act { padding: 0 10px 3px; } .act.big { min-width: 92px; }
  .p-rack:empty + .p-acts { grid-column: 1 / -1; }           /* no chips on offer (a hand in play, the ball rolling): the buttons have the whole row, "Surrender" at its full measure */
  #title .kicker { margin-bottom: 4px; } #title .tag2 { margin: 8px 0 12px; } #title .enter { height: 54px; font-size: 19.2px; } #title canvas.logo { width: min(560px, 70vw); } #title .who { margin-top: 14px; }
}
/* a small phone on its side: the two tools are signs, as on a short upright phone, and the room they give goes to
   the status line, which may take a third line for the longest things a table has to say (.xxlong, see ui.js) */
@media (max-height: 520px) and (max-width: 740px) {
  .p-tools .t-word { display: none; } .p-tools .t-sign { display: grid; place-items: center; font-size: 13.6px; line-height: 1.25; } .p-tools .t-sign .gl { font-size: 17px; }
  .p-tools .btn.small, .touch .p-tools .btn.small { width: 38px; height: 38px; padding: 0 0 2px; }
  .p-status.xxlong { font-size: 10.4px; line-height: 1.2; padding: 0 3px; -webkit-line-clamp: 3; }
}
/* narrower than an iPhone SE on its side (667 wide): five buttons beside five chips no longer fit one row at their
   full measure, and a row that does not fit slides under the chips. The slack between them goes first; under 600 wide
   the buttons' lettering is a size smaller, and the two past results go as well (the status line has just said the last). */
@media (max-height: 520px) and (max-width: 660px) {
  .panel-in { column-gap: 8px; } .p-rack { gap: 6px; padding: 0; } .p-acts { gap: 5px; } .act { min-width: 56px; padding: 0 7px 3px; } .act.big { min-width: 80px; padding: 0 12px 4px; }
}
@media (max-height: 520px) and (max-width: 620px) {
  .panel-in { padding-left: 8px; padding-right: 8px; } .p-rack { gap: 3px; } .act { min-width: 46px; font-size: 12px; padding: 0 6px 3px; } .act.big { min-width: 72px; padding: 0 9px 4px; font-size: 15.2px; }
}
@media (max-height: 520px) and (max-width: 600px) { .p-info .hist { display: none; } }
@media (prefers-reduced-motion: reduce) {
  /* once, not for ever: a looping glow cut to a hundredth of a second would flicker at the screen's refresh rate */
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .05s !important; }
  #title .enter::after { animation: none !important; }      /* a ring that goes out once is still a flash */
}
/* a narrow desktop window: the call-out over a slot machine reaches the VIP pill, which steps aside as on a phone */
@media (min-width: 561px) and (max-width: 1100px) and (min-height: 521px) {
  #hud .pill.vip, #hud .buffs { transition: opacity .2s; }
  #ui:has(> #banner.high:not(.off):not(.out)) #hud :is(.pill.vip, .buffs) { opacity: 0; }
}
/* a short desktop window: a fifth of the way down is less than half the call-out, so it hangs from the top instead */
@media (min-width: 561px) and (min-height: 521px) and (max-height: 660px) {
  #banner.high { top: 10px; --by: 0%; }
  #banner.high .b-title { font-size: clamp(32px, min(6.72vw, 10vh), 76.8px); }
  #banner.high .b-sub { margin-top: 4px; }
}
/* where a toast and a win banner would share a corner the toasts wait out of sight (ui.js holds their time) */
@media (max-width: 1100px), (max-height: 520px) {
  #toasts { transition: opacity .2s; }
  #ui:has(> #banner:not(.off):not(.out)) #toasts { opacity: 0; }
}
