/* Petite Rouge — a Paris bistro. Layout comes from the table shell (shell.css, table.css); this file restyles it by tokens
   (js/skin.js themeMap sets the wall colours from the admin preset) and draws the game's own parts in #board: the little
   wheel on a round zinc (or marble) café table with the result slate beside it, and the betting slate — a chalkboard in a
   wooden frame with painted number discs, chalk lines and bistro tokens. The HUD is a chalk menu bar, the main button a
   brass service bell, the rules panel a slate. Sizes of the slate's cells and of the wheel come from main.js (--cw, --ch,
   --zw, --tw, --oh, --wheel, --chip, --kw, --ow, --below), measured from the room the board has, and so does the layout
   (.wide, .beside, .flat, .tuck on .pr-root). Text on slate is chalk (≥ 4.5:1 checked). */
:root{--display:"Pacifico","Brush Script MT",cursive;--ui:"Lato",system-ui,sans-serif;--radius:14px;--radius-sm:9px;
  --slate:#26302E;--slate-hi:#303B39;--slate-lo:#1B2220;--chalk:#F3EEE3;--chalk-muted:#C8C3B7;--chalk-accent:#F2C14E;--chalk-line:rgba(243,238,227,.5);
  --wood:#6A3F25;--wood-hi:#8A5733;--wood-lo:#3A2213;--frame:#8E5A35 #4F2F1B #3B2213 #76472A;--zinc:#AAB1B4;--zinc-hi:#CDD3D5;--zinc-lo:#737B7F;
  --p-red:#B3262E;--p-black:#171615;--p-green:#1D6B47;--brass:#D6A640;--brass-ink:#3A2508;
  --zw:40px;--cw:56px;--ch:44px;--tw:40px;--oh:44px;--wheel:150px;--chip:22px;color-scheme:var(--scheme,dark)}
body{background:var(--bg)}
/* Pacifico has one weight: never a synthetic bold */
.logo h1,.panel h2,.panel h3,.ovcard h2,.screen h2,.spin.tprim{font-weight:400}
/* Pacifico's tail letters (g, the swash of R) hang 0.25em under its line box: the header row makes room for them, so they
   never touch the results strip below it (the shell centres the title across; nothing here moves it sideways) */
.logo h1{letter-spacing:0;padding-bottom:.22em}
.message{font-family:var(--ui)}

/* the wall: bistro subway tiles over the preset's colour, a shadow along the bottom (body.bg-plain: no tiles); on the dark
   preset the grout is quieter (--wall-tile) and the vignette deeper, so the room recedes behind the table */
.pr-wall{background:var(--wall-line);-webkit-mask:var(--tiles-mask) 0 0/48px 24px repeat;mask:var(--tiles-mask) 0 0/48px 24px repeat;opacity:var(--wall-tile,.55)}
.pr-glaze{background:var(--wall-glaze);-webkit-mask:var(--glaze-mask) 0 0/48px 24px repeat;mask:var(--glaze-mask) 0 0/48px 24px repeat}
.pr-shade{background:radial-gradient(70% 60% at 50% 30%,transparent 40%,rgb(0 0 0 / var(--wall-vig,.32))),linear-gradient(180deg,transparent 56%,var(--wall-shade))}
.pr-grain{background:var(--grain) 0 0/160px 160px;mix-blend-mode:overlay;opacity:.07}
body.bg-plain .pr-wall,body.bg-plain .pr-glaze{display:none}

/* header buttons and the results strip: small slates in wooden frames */
.ibtn{background:var(--slate);color:var(--chalk);border:2px solid;border-color:var(--frame);box-shadow:inset 1px 1px 3px rgb(0 0 0 / .45),0 2px 4px rgb(0 0 0 / .3)}
.ibtn:hover{border-color:var(--chalk-accent)}
/* the newest result (first) stays in view when the strip is fuller than its row */
.tstrip{justify-content:safe center}
.tstrip li{display:flex;align-items:center;justify-content:center;gap:5px;background:var(--slate);border:1.5px solid;border-color:var(--frame);color:var(--chalk-muted);font-family:var(--ui)}
.tstrip li.won{color:var(--chalk-accent);border-color:var(--chalk-accent)}
/* a stake that came back: dashed, in chalk (the shell's --ink is the wall's ink, which may be dark on the light preset) */
.tstrip li.ret{color:var(--chalk);border-style:dashed}
.tstrip li[title^="Red "]::before,.tstrip li[title^="Black "]::before,.tstrip li[title^="Green "]::before{content:"";flex:none;width:9px;height:9px;border-radius:50%;background:var(--p-red);box-shadow:0 0 0 1px rgb(243 238 227 / .55)}
.tstrip li[title^="Black "]::before{background:var(--p-black)}
.tstrip li[title^="Green "]::before{background:var(--p-green)}
.toast{background:var(--slate);color:var(--chalk);border:2px solid;border-color:var(--frame)}

/* ---- the board: a café table — the wheel and its result slate, the betting slate ---- */
.table-game .frame{max-width:1160px}
.table-game .board.tboard{flex:1 1 auto;min-height:0;position:relative}
.pr-root{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
.pr-root.wide{flex-direction:row;gap:clamp(20px,3vw,48px)}
.pr-side{flex:none;display:flex;align-items:center;justify-content:center;gap:10px;max-width:100%}
.pr-root.wide .pr-side{flex-direction:column;gap:12px}

/* the round café table (zinc, brushed; or marble) and the wheel on it */
.pr-table{position:relative;z-index:3;flex:none;width:var(--wheel);height:var(--wheel);border-radius:50%;display:grid;place-items:center;
  background:var(--zinc) conic-gradient(from 315deg,#E2E6E8,#8F989C 25%,#D3D8DB 50%,#878F93 75%,#E2E6E8);
  box-shadow:inset 0 0 0 1px #4F575B,inset 2px 2px 1px 1px rgb(255 255 255 / .5),inset -2px -3px 2px 1px rgb(0 0 0 / .28),0 2px 3px rgb(0 0 0 / .4),5px 18px 30px -6px rgb(0 0 0 / .5)}
.pr-table::before{content:"";position:absolute;inset:3px;border-radius:50%;pointer-events:none;
  background:repeating-radial-gradient(circle,rgb(255 255 255 / .07) 0 1px,transparent 1px 3px)}
body[data-variant="marble"] .pr-table{background:#ECE7DF radial-gradient(80% 80% at 32% 26%,#F8F5F0,#E6E0D6 60%,#CFC6B8);box-shadow:inset 0 0 0 1px #9C9284,inset 2px 2px 1px 1px rgb(255 255 255 / .7),inset -2px -3px 2px 1px rgb(0 0 0 / .14),0 2px 3px rgb(0 0 0 / .35),5px 18px 30px -6px rgb(0 0 0 / .5)}
body[data-variant="marble"] .pr-table::before{background:linear-gradient(32deg,transparent 30%,rgb(120 112 100 / .2) 31%,transparent 32.5%),linear-gradient(-58deg,transparent 58%,rgb(120 112 100 / .16) 59%,transparent 60.5%),linear-gradient(74deg,transparent 70%,rgb(120 112 100 / .1) 70.6%,transparent 71.4%)}
.pr-wheel{position:relative;width:91%;height:91%}
.pr-wheel-svg{display:block;width:100%;height:100%;overflow:visible}
/* the wheel (wheel.js draws its gradients: the walnut bowl, the ivory track, the static key light, the spun-zinc dome,
   the brass knob and the ivory ball); here the flat paint of the parts that turn */
.pr-rings{stroke:#1E0F06;stroke-opacity:.2;stroke-width:.5;stroke-dasharray:88 14 46 22 120 9}
.pr-track-in{fill:#2E1A0E}
.pr-rotor-rim{fill:#22130B}
.pr-p.p-red{fill:#A8232B}.pr-p.p-black{fill:#1A1918}.pr-p.p-green{fill:#1B6343}
.pr-cups{fill:none;stroke:#000;stroke-opacity:.32;stroke-width:15}
.pr-frets{stroke:#D9DEE0;stroke-width:1.05;stroke-opacity:.9}
.pr-rim{fill:none;stroke:#D9DEE0;stroke-width:1.05;stroke-opacity:.9}
.pr-nums text{fill:#F7F1E4;font:900 9px/1 var(--ui);text-anchor:middle;dominant-baseline:central}
.pr-turret path{stroke:#5E666A;stroke-width:3.6;stroke-linecap:round}.pr-turret circle{fill:#B48A30;stroke:#5E420F;stroke-width:.6}
.pr-ball-sh{fill:#000;opacity:.4}
.pr-mark{fill:none;stroke:var(--chalk);stroke-width:1.6;stroke-dasharray:3 2;opacity:.9}
/* the last number on the hub (the result slate shows it on wide screens instead) */
.pr-hub circle:first-child{stroke:#F3EEE3;stroke-width:1.4}.pr-hub.h-red circle:first-child{fill:var(--p-red)}.pr-hub.h-black circle:first-child{fill:var(--p-black)}.pr-hub.h-green circle:first-child{fill:var(--p-green)}
.pr-hub text{fill:#F7F1E4;font:900 17px/1 var(--ui);text-anchor:middle;dominant-baseline:middle}
.pr-root.wide .pr-hub{display:none}
.pr-root:not(.wide) .pr-card{display:none}

/* the result slate under the wheel (wide screens) */
.pr-card{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;gap:14px;width:min(var(--wheel),360px);padding:9px 12px;
  border-radius:10px;background:var(--slate);border:4px solid;border-color:var(--frame);box-shadow:inset 0 0 0 1px var(--wood-lo),inset 2px 3px 6px rgb(0 0 0 / .4),0 2px 3px rgb(0 0 0 / .3),4px 12px 20px -6px rgb(0 0 0 / .45);color:var(--chalk);text-align:center;transition:opacity var(--t-slow,.3s) var(--ease-std,ease)}
.pr-card-l{font:700 13px/1.2 var(--ui);letter-spacing:.01em;color:var(--chalk-muted)}
.pr-card-n{display:grid;place-items:center;flex:none;width:54px;height:54px;padding-bottom:6px;border-radius:50%;font:400 27px/1 var(--display);color:var(--chalk);
  background-image:radial-gradient(circle at 34% 28%,rgb(255 255 255 / .16),transparent 48%),linear-gradient(160deg,transparent 50%,rgb(0 0 0 / .22));
  box-shadow:inset 0 0 0 1px rgb(0 0 0 / .3),0 0 0 1.5px rgb(243 238 227 / .42),0 1px 0 1.5px rgb(0 0 0 / .3)}
.pr-card-n[data-c="red"]{background-color:var(--p-red)}.pr-card-n[data-c="black"]{background-color:var(--p-black)}.pr-card-n[data-c="green"]{background-color:var(--p-green)}
.pr-card-n[data-c="none"]{background-image:none}
.pr-card-f{font:700 13px/1.3 var(--ui);color:var(--chalk)}

/* ---- the betting slate ---- */
.pr-slate{position:relative;flex:none;display:flex;flex-direction:column;gap:8px;max-width:100%;padding:8px;border-radius:12px;overflow:hidden;
  background:var(--slate);border:6px solid;border-color:var(--frame);color:var(--chalk);--focus:var(--chalk-accent);
  box-shadow:inset 0 0 0 1px var(--wood-lo),inset 3px 4px 10px rgb(0 0 0 / .45),inset 0 0 40px rgb(0 0 0 / .3),0 2px 3px rgb(0 0 0 / .35),6px 20px 34px -8px rgb(0 0 0 / .5);transition:opacity var(--t-slow,.3s) var(--ease-std,ease)}
/* the lamp's light on the slate, and old chalk rubbed out: faint smudges and one wiped arc */
.pr-slate::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(75% 60% at 32% 0%,rgb(255 248 230 / .06),transparent 70%),radial-gradient(40% 30% at 22% 18%,rgb(243 238 227 / .05),transparent 70%),
    radial-gradient(35% 28% at 78% 82%,rgb(243 238 227 / .045),transparent 70%),radial-gradient(120% 90% at 60% 130%,transparent 62%,rgb(243 238 227 / .035) 64%,transparent 68%),
    linear-gradient(180deg,transparent 55%,rgb(0 0 0 / .16))}
.pr-top{position:relative;display:flex;gap:6px;height:44px}
.pr-kinds{flex:1 1 auto;display:flex;gap:3px;min-width:0}
.pr-kind{flex:1 1 0;min-width:44px;min-height:44px;padding:0 4px;border:0;border-radius:8px;background:none;color:var(--chalk-muted);font:700 14px/1 var(--ui);letter-spacing:.02em;white-space:nowrap}
.pr-kind[aria-pressed="true"]{color:var(--chalk);background:var(--slate-hi);box-shadow:inset 0 -3px 0 var(--chalk-accent)}
@media (hover:hover){.pr-kind:hover{color:var(--chalk)}}
.pr-tools{flex:none;display:flex;gap:4px}
.pr-tool{display:flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px;padding:0 10px;border-radius:8px;border:1.5px dashed var(--chalk-line);background:none;color:var(--chalk);font:700 13px/1 var(--ui)}
.pr-tool svg{width:20px;height:20px;flex:none}
.pr-tool:disabled{opacity:.4}
@media (hover:hover){.pr-tool:hover:not(:disabled){border-color:var(--chalk)}}

/* the numbers: zero, 1–12 in four columns, the "2 to 1" boxes; chalk lines between them */
.pr-grid{position:relative;align-self:center;display:grid;grid-template-columns:var(--zw) repeat(4,var(--cw)) var(--tw);grid-template-rows:repeat(3,var(--ch));
  border-top:2px solid var(--chalk-line);border-left:2px solid var(--chalk-line)}
.pr-cell,.pr-third{position:relative;display:grid;place-items:center;min-width:0;padding:0;border:0;border-right:2px solid var(--chalk-line);border-bottom:2px solid var(--chalk-line);
  background:none;color:var(--chalk);transition:background .15s}
@media (hover:hover){.pr-cell:hover,.pr-box:hover{background:rgba(243,238,227,.07)}}
.pr-cell.hl{background:rgba(243,238,227,.14)}
.pr-disc{display:grid;place-items:center;width:min(78%,calc(var(--ch) - 10px));aspect-ratio:1;border-radius:50%;
  font:900 clamp(15px,calc(var(--ch) * .34),29px)/1 var(--ui);font-variant-numeric:tabular-nums;letter-spacing:-.01em;color:var(--chalk);
  background-image:radial-gradient(circle at 34% 28%,rgb(255 255 255 / .08),transparent 46%),linear-gradient(160deg,transparent 52%,rgb(0 0 0 / .22));
  box-shadow:inset 0 0 0 1px rgb(0 0 0 / .28),0 0 0 1.5px rgb(243 238 227 / .4),0 1px 0 1.5px rgb(0 0 0 / .28)}
.pr-zero .pr-disc{width:min(80%,calc(var(--ch) - 6px))}
.c-red{background-color:var(--p-red)}.c-black{background-color:var(--p-black)}.c-green{background-color:var(--p-green)}
.pr-cell.hit .pr-disc{box-shadow:inset 0 0 0 1px rgb(0 0 0 / .28),0 0 0 3px var(--chalk-accent),0 0 0 5px rgb(242 193 78 / .18)}
.pr-two{font:900 clamp(12px,calc(var(--tw) * .19),16px)/1.1 var(--ui);letter-spacing:.02em;color:var(--chalk)}

/* the even-money boxes under the numbers */
.pr-outside{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));height:var(--oh);border:2px solid var(--chalk-line);border-radius:4px}
.pr-box{position:relative;cursor:pointer}
.pr-out{display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;padding:0 2px;border:0;border-right:2px solid var(--chalk-line);background:none;color:var(--chalk);font:700 15px/1.1 var(--ui);transition:background .15s}
.pr-out:last-child{border-right:0}
.pr-lozenge{flex:none;width:15px;height:15px;border-radius:2px;transform:rotate(45deg);background-image:linear-gradient(135deg,rgb(255 255 255 / .16),transparent 55%);box-shadow:0 0 0 1.5px rgb(243 238 227 / .45)}
.pr-box.lit{background:rgba(243,238,227,.1)}
.pr-box.lit::after{content:"";position:absolute;left:20%;right:20%;bottom:5px;height:2px;border-radius:2px;background:var(--chalk);transform:rotate(-2deg);opacity:.85}
.pr-box.won{box-shadow:inset 0 0 0 2px var(--chalk-accent)}

/* tokens: cream (1–4), red (5–19), blue (20–99), gold (100) — clay tokens: a body with six edge inserts, a flat inlay with
   the amount, the lamp's highlight on the upper left, the token's thickness and its shadow on the slate */
.pr-chips{position:absolute;inset:0;pointer-events:none;z-index:2}
.pr-chip{--cb:#E6D6B4;--ci:#8C1C24;--cl:#F6EEDC;--ce:#8F7C58;position:absolute;display:grid;place-items:center;width:var(--chip);height:var(--chip);border-radius:50%;transform:translate(-50%,-50%);
  font:900 max(9px,calc(var(--chip) * .4))/1 var(--ui);font-style:normal;color:#3A1A10;background-color:var(--cl);
  background-image:radial-gradient(circle at 32% 26%,rgb(255 255 255 / .3),transparent 46%),radial-gradient(closest-side,var(--cl) 71%,rgb(0 0 0 / .2) 72.5%,transparent 76%),repeating-conic-gradient(from 10deg,var(--ci) 0 20deg,var(--cb) 0 60deg);
  box-shadow:inset 0 0 0 1px rgb(0 0 0 / .28),0 1.5px 0 var(--ce),1px 3px 4px rgb(0 0 0 / .45);transition:opacity .2s}
.pr-chip.t5{--cb:#A9232B;--ci:#F1E2C4;--cl:#B02A32;--ce:#5A0F14;color:#FFF6E8}
.pr-chip.t20{--cb:#2C5672;--ci:#DCE8EF;--cl:#305F7E;--ce:#152A39;color:#fff}
.pr-chip.t100{--cb:#D3A43A;--ci:#2A1A06;--cl:#E2B74C;--ce:#735412;color:#2A1A06}
/* a losing token after the spin: its paint rubbed off to a dashed chalk ring, the amount still readable (≥ 4.5:1) */
.pr-chip.lost,.pr-box.lost .pr-chip{color:var(--chalk-muted);background:var(--slate-lo);border:1.5px dashed var(--chalk-muted);box-shadow:0 1px 2px rgba(0,0,0,.4)}
/* a winning token shows what it paid: a pill in the accent chalk */
.pr-chip.tw{width:auto;min-width:var(--chip);padding:0 6px;border-radius:999px;color:var(--tag-ink);background:var(--tag);font-size:max(10px,calc(var(--chip) * .4));box-shadow:0 0 0 2px var(--slate),0 2px 4px rgba(0,0,0,.5);z-index:2}
/* a box holds its chip under its label */
.pr-box{flex-direction:column;gap:2px}
.pr-third{display:flex;align-items:center;justify-content:center}
.pr-lbl{display:flex;align-items:center;gap:6px}
.pr-box .pr-chip{position:relative;flex:none;width:calc(var(--chip) * .82);height:calc(var(--chip) * .82);transform:none;font-size:max(9px,calc(var(--chip) * .34));z-index:1}
.pr-box.on .pr-two,.pr-box.on .pr-lbl{font-size:.88em}
.pr-box .pr-chip:empty{display:none}
.pr-box .pr-chip.tw{width:auto;height:calc(var(--chip) * .82)}

/* the lines a mouse can bet on (large slates): a chalk dot shows under the pointer and the numbers of the bet light up;
   the streets' zones sit on the numbers' bottom edge, so the even-money row moves down by --below to keep clear of them */
.pr-zones{position:absolute;inset:0;z-index:1;display:none;pointer-events:none}
.pr-root.zones .pr-zones{display:block}
.pr-root.zones .pr-grid{margin-bottom:var(--below)}
.pr-zone{position:absolute;width:calc(min(var(--cw),var(--ch)) / 2);height:calc(min(var(--cw),var(--ch)) / 2);border-radius:50%;transform:translate(-50%,-50%);cursor:pointer;pointer-events:auto}
.pr-zone i{position:absolute;inset:32%;border-radius:50%;background:var(--chalk);opacity:0;transition:opacity .12s;pointer-events:none}
@media (hover:hover){.pr-zone:hover i{opacity:.6}}
.pr-slate.locked .pr-zone,.pr-slate.locked .pr-cell,.pr-slate.locked .pr-box{cursor:default}

/* chalk round the winning number */
.pr-ring{position:absolute;z-index:2;display:none;overflow:visible;pointer-events:none}
.pr-ring.on{display:block}
.pr-ring path{fill:none;stroke:var(--chalk);stroke-width:3;stroke-linecap:round;vector-effect:non-scaling-stroke;stroke-dasharray:100 100;opacity:.92}

/* the choices of a tap (a split, street or corner with that number): over the numbers */
.pr-pick{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;gap:4px;padding:2px 6px 3px;background:var(--slate);box-shadow:inset 0 0 0 2px var(--chalk-line)}
.pr-pick[hidden]{display:none}
.pr-pick-h{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:40px;padding-left:4px;font:700 14px/1.2 var(--ui);color:var(--chalk)}
.pr-pick-x{flex:none;width:44px;height:44px;margin:-2px -4px -2px 0;padding:0;border:0;background:none;color:var(--chalk);display:grid;place-items:center}
.pr-pick-x svg{width:20px;height:20px}
/* the choices sit in the middle of the room under the heading; when they need more room than that, the list starts at
   its top and scrolls (an auto margin, not align-content:center, which would push the first row out of reach) */
.pr-pick-o{flex:0 1 auto;min-height:0;margin-block:auto;display:flex;flex-wrap:wrap;align-content:flex-start;justify-content:center;gap:6px;overflow:auto}
.pr-opt{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:56px;min-height:48px;padding:clamp(4px,calc(var(--ch) * .1),12px) clamp(6px,calc(var(--cw) * .14),18px);
  border-radius:9px;border:2px dashed var(--chalk-line);background:var(--slate-hi);color:var(--chalk)}
@media (hover:hover){.pr-opt:hover{border-color:var(--chalk);border-style:solid}}
.pr-opt .pr-chip{left:calc(100% - 6px);top:6px}
.pr-mini{display:inline-grid;grid-auto-columns:clamp(20px,calc(var(--cw) * .36),40px);grid-auto-rows:clamp(17px,calc(var(--ch) * .3),34px);gap:2px}
.pr-mini i{display:grid;place-items:center;border-radius:4px;font:900 clamp(11px,calc(var(--ch) * .16),16px)/1 var(--ui);font-style:normal;color:#F7F1E4}
.pr-opt small{font:700 clamp(11px,calc(var(--ch) * .13),14px)/1 var(--ui);color:var(--chalk-muted)}

/* the damp sponge that wipes the chalk marks before a new spin */
.pr-wipe{position:absolute;z-index:6;top:-12%;bottom:-12%;left:0;width:42%;pointer-events:none;transform:translateX(-130%);
  background:linear-gradient(90deg,transparent,rgba(12,17,16,.6) 30%,rgba(12,17,16,.6) 70%,transparent)}
.pr-slate.fading .pr-chip.tw,.pr-slate.fading .pr-ring,.pr-slate.fading .pr-box.lit::after{opacity:0;transition:opacity .2s}

/* short screens: the kinds (2 × 2) and the tools stand beside the wheel */
.pr-side>.pr-top{flex:none;display:grid;grid-template-columns:repeat(2,80px);gap:3px;height:auto;padding:3px;border-radius:10px;transition:opacity .3s;
  background:var(--slate);border:3px solid;border-color:var(--frame);box-shadow:inset 0 0 0 1px var(--wood-lo),inset 2px 3px 6px rgb(0 0 0 / .4),0 2px 3px rgb(0 0 0 / .3),4px 12px 20px -6px rgb(0 0 0 / .45);color:var(--chalk);--focus:var(--chalk-accent)}
.pr-side>.pr-top .pr-kinds,.pr-side>.pr-top .pr-tools{display:contents}
.pr-side>.pr-top .pr-tool span{display:inline}

/* phones held sideways: one row — the wheel, then the slate with the kinds and the tools (a 2 × 3 block) left of the
   numbers and the even-money boxes (2 × 3: 1–6 | 7–12, red | black, even | odd) right of them */
.pr-root.flat{flex-direction:row;gap:12px}
.pr-root.flat .pr-slate{flex-direction:row;align-items:flex-start;gap:8px}
.pr-root.flat .pr-top{display:grid;grid-template-columns:repeat(2,var(--kw));grid-auto-rows:var(--ch);gap:3px;height:auto}
.pr-root.flat .pr-kinds,.pr-root.flat .pr-tools{display:contents}
.pr-root.flat .pr-kind{font-size:13px;padding:0 2px}
.pr-root.flat .pr-tool{padding:0}
.pr-root.flat .pr-tool span,.pr-root.flat .pr-out[data-spot="red"] .pr-bl,.pr-root.flat .pr-out[data-spot="black"] .pr-bl{display:none}
.pr-root.flat .pr-outside{grid-template-columns:repeat(2,var(--ow));grid-template-rows:repeat(3,var(--ch));height:auto}
.pr-root.flat .pr-out{border-right:0;border-bottom:2px solid var(--chalk-line);font-size:14px}
.pr-root.flat .pr-out:is([data-spot="low"],[data-spot="red"],[data-spot="even"]){border-right:2px solid var(--chalk-line)}
.pr-root.flat .pr-out:is([data-spot="even"],[data-spot="odd"]){border-bottom:0}
.pr-root.flat .pr-out[data-spot="low"]{order:1}.pr-root.flat .pr-out[data-spot="high"]{order:2}.pr-root.flat .pr-out[data-spot="red"]{order:3}
.pr-root.flat .pr-out[data-spot="black"]{order:4}.pr-root.flat .pr-out[data-spot="even"]{order:5}.pr-root.flat .pr-out[data-spot="odd"]{order:6}
.pr-root.flat .pr-lozenge{width:17px;height:17px}

/* no room for the wheel at rest: it rises in the middle of the board for the spin only */
.pr-root.tuck .pr-side{position:absolute;left:50%;top:50%;z-index:7;transform:translate(-50%,-50%);pointer-events:none}
.pr-root.tuck:not(.zoomed) .pr-side{visibility:hidden}

/* phones: the wheel comes forward for the spin */
.pr-root.zoomed .pr-slate,.pr-root.zoomed .pr-side>.pr-top{opacity:.2}

/* ---- the HUD: a chalk menu bar; the main button: a brass service bell ---- */
.hud.thud{background:var(--slate);border:4px solid;border-color:var(--frame);border-radius:12px;color:var(--chalk);
  box-shadow:inset 0 0 0 1px var(--wood-lo),inset 3px 4px 10px rgb(0 0 0 / .4),inset 0 0 26px rgb(0 0 0 / .3),0 2px 3px rgb(0 0 0 / .3),5px 16px 26px -8px rgb(0 0 0 / .45);
  --ink:var(--chalk);--muted:var(--chalk-muted);--primary:var(--chalk-accent);--line:var(--chalk-line);--ibtn-bg:var(--slate-hi);--ibtn-ink:var(--chalk);--focus:var(--chalk-accent)}
.hud .meter b{font-family:var(--ui);font-weight:900}
.hud .pm{border:1.5px dashed var(--chalk-line)}
.spin.tprim{min-width:128px;height:56px;margin:8px 4px 6px;padding:4px 24px 0;border-radius:64px 64px 8px 8px / 50px 50px 8px 8px;color:var(--brass-ink);
  background:radial-gradient(40% 36% at 30% 18%,rgb(255 249 222 / var(--bell-hi,.7)),transparent 72%) no-repeat,linear-gradient(180deg,#F2D689 0%,#DDB553 20%,#CFA545 44%,#C59A3B 70%,#8E6820 86%,#B38634 94%,#6E4F16 100%) var(--brass);
  font-family:var(--display);font-size:clamp(20px,1.9vw,24px);letter-spacing:.01em;
  box-shadow:inset 0 2px 0 rgb(255 255 255 / .42),inset -8px 0 12px -8px rgb(0 0 0 / .32),0 5px 0 -1px #3E280C,0 2px 3px rgb(0 0 0 / .35),4px 14px 18px -6px rgb(0 0 0 / .5)}
.spin.tprim span{padding-bottom:.12em}
/* the bell's plunger on top and its wooden base */
.spin.tprim::before{content:"";position:absolute;left:50%;top:-8px;width:18px;height:10px;margin-left:-9px;border-radius:9px 9px 3px 3px;
  background:#C9A040 radial-gradient(60% 70% at 35% 30%,#FFF0B8,#C9A040 60%,#6B4A12);box-shadow:0 1px 1px rgb(0 0 0 / .35)}
.spin.tprim::after{content:"";position:absolute;left:-7px;right:-7px;bottom:-7px;height:6px;border-radius:3px;background:linear-gradient(180deg,#7A4A2B,#3A2213 70%,#24140A);box-shadow:0 2px 3px rgb(0 0 0 / .4)}
@media (hover:hover){.spin.tprim:hover:not(:disabled){--bell-hi:1}}
.spin.tprim:active:not(:disabled){transform:translateY(2px)}
/* the plunger goes down once when the bell is rung */
.spin.tprim.busy::before{animation:pr-ding 150ms var(--ease-std,ease-in-out) 2 alternate}
@keyframes pr-ding{to{transform:translateY(3px)}}
body.still .spin.tprim.busy::before{animation:none}
@media (prefers-reduced-motion:reduce){.spin.tprim.busy::before{animation:none}}
/* the DEMO tag and the autoplay count: on the accent chalk (the preset's accent itself may be too dark for small text) */
.demo,.auto span{background:var(--tag);color:var(--tag-ink)}

/* ---- the big-win card: the tier's words written in the script in sentence case (Pacifico in capitals reads as a
   cartoon sign), the amount chalked on a small slate in the same walnut frame ---- */
.overlay.bigwin .ovcard h2{text-transform:lowercase;padding-bottom:.12em}
.overlay.bigwin .ovcard h2::first-letter{text-transform:uppercase}
.overlay .ovamt:not(:empty){margin-top:6px;padding:.1em .55em .14em;color:var(--chalk);background:var(--slate);border:4px solid;border-color:var(--frame);border-radius:12px;
  box-shadow:inset 0 0 0 1px var(--wood-lo),inset 2px 3px 8px rgb(0 0 0 / .45),0 2px 3px rgb(0 0 0 / .3),6px 18px 30px -8px rgb(0 0 0 / .55)}

/* ---- the rules and settings panels: a slate in a wooden frame ---- */
.panel{border:6px solid;border-color:var(--frame);color:var(--chalk);--ink:var(--chalk);--muted:var(--chalk-muted);--primary:var(--chalk);--primary-hi:var(--chalk-accent);--line:var(--chalk-line);
  --ibtn-bg:var(--slate-hi);--ibtn-ink:var(--chalk);--focus:var(--chalk-accent);--btn-ink:var(--slate)}
/* chalk-white chips and buttons in a panel carry slate text (the shell's default, the page colour, may be light) */
.panel .chips button[aria-pressed="true"]{color:var(--slate)}
.panel h2{padding-bottom:.1em}
.pr-paywrap{overflow-x:auto;margin:10px 0}
.pr-pays{width:100%;border-collapse:collapse;font-size:15px}
.pr-pays th,.pr-pays td{padding:7px 8px;border-bottom:1px solid var(--chalk-line);text-align:left;vertical-align:top;line-height:1.35}
.pr-pays th{font-size:13px;color:var(--chalk-muted)}
.pr-pays .r{text-align:right;white-space:nowrap}

/* small phones: tighter labels */
@media (max-width:520px){.pr-tool span{display:none}.pr-tool{padding:0 10px}}
@media (max-width:480px){
  .pr-kind{font-size:13px}
  .pr-out{font-size:13px}
  .pr-out[data-spot="red"] .pr-bl,.pr-out[data-spot="black"] .pr-bl{display:none}
  .pr-lozenge{width:17px;height:17px}
  .spin.tprim{min-width:104px;height:50px;padding:3px 14px 0;font-size:19px}
}
@media (max-width:400px){.pr-slate{border-width:5px;padding:6px;gap:6px}.pr-top{gap:4px}}
@media (max-width:340px){.pr-kinds{gap:2px}.pr-tools{gap:2px}.pr-kind{font-size:12px;padding:0 2px}.spin.tprim{min-width:92px;padding:3px 10px 0}}
/* phones held sideways (and other short, wide screens): the shell's three-row phone HUD and a stacked stage would leave
   the board 30–100 px of height. The HUD goes back to its one-row desktop order with a smaller bell, and the results
   strip and the message share one row; the board keeps 170–250 px for the flat slate. */
@media (max-height:500px) and (min-width:560px){
  .table-game .stage.tstage{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);grid-template-rows:auto minmax(0,1fr) auto;
    grid-template-areas:"strip msg" "board board" "ctl ctl";justify-items:stretch;gap:6px 14px}
  .table-game .boardarea.tboardarea,.table-game .frame{display:contents}
  .tstrip{grid-area:strip;align-self:center}
  .table-game .board.tboard{grid-area:board}
  .table-game .message{grid-area:msg;align-self:center;min-height:0;font-size:15px;line-height:1.25}
  .tcontrols{grid-area:ctl}
  /* each meter as wide as its value, the room shared out between them: a five-digit balance still clears the − key */
  .hud.thud{grid-template-columns:repeat(4,auto);justify-content:space-between;grid-template-areas:"acts acts acts acts" "bal bet win spin";row-gap:0;column-gap:8px;padding-block:4px}
  body.lefty .hud.thud{grid-template-columns:repeat(4,auto);grid-template-areas:"acts acts acts acts" "spin bal bet win"}
  .thud>.tacts:not(:empty){margin-bottom:6px}
  .spin.tprim{height:44px;min-width:104px;margin:6px 4px 4px;padding:3px 16px 0;font-size:19px}
  .auto{width:44px;height:44px}
  .thud #mBetSub{font-size:11px;line-height:1.1}
}
/* the shortest (≈ 320 px, e.g. 568 × 320): the results strip goes (the message keeps its row) and the frames get thinner,
   so the slate keeps 44 px targets; the header's icons take the shell's small-phone size (their tap area stays 44 px) */
@media (max-height:340px) and (min-width:560px){
  .tstrip{display:none}
  .table-game .stage.tstage{grid-template-areas:"msg msg" "board board" "ctl ctl";row-gap:4px}
  .ibtn{width:38px;height:38px}
  .logo h1{font-size:30px}
  .pr-slate{border-width:4px;padding:5px}
  .hud.thud{border-width:3px;padding-block:2px}
}
/* the shortest phones held upright (≈ 320 × 480): the results strip goes, the bell and the slate's frame get smaller, so
   the slate (its wheel tucked) keeps 44 px targets; the message, the chalk ring and the win meter still show each result */
@media (max-height:500px) and (max-width:559px){
  .tstrip{display:none}
  .pr-slate{border-width:4px;padding:5px}
  .spin.tprim{height:44px;margin:6px 4px 4px}
}
