/* A small dealer-side limits plaque and a shared, actual S7 card back. */
.table-limits{position:absolute;z-index:3;left:14%;top:3.5%;width:min(14cqw,16cqh);aspect-ratio:1441/1091;container-type:inline-size;pointer-events:none}
.table-limits>img{display:block;width:100%;height:auto;object-fit:contain;transform:scaleX(-1)}
/* The live lettering shares the plaque face's two perspective axes. Container
   units refer to the sign, so height-constrained layouts cannot crowd its text.
   Mirror the face's angle and position, keeping the lettering itself readable. */
.limits-lettering{position:absolute;left:19.5%;top:calc(16% + 6.51cqw);width:62%;height:48%;display:grid;grid-template-rows:24% 38% 38%;align-items:center;color:#f9e3ac;text-shadow:0 .3px .4px #000,0 -.2px .2px #e0ad4840;text-align:center;transform:matrix(1,-.105,.105,1,0,0);transform-origin:0 0;padding:0 2%}
.limits-title{font:700 6.3cqw/1.1 Georgia,'Times New Roman',serif;letter-spacing:.035em;color:#eccc87;white-space:nowrap}
.limit-line{display:flex;align-items:baseline;justify-content:space-between;gap:2%;line-height:1}
.limit-line small{font:600 7.5cqw/1 Arial,sans-serif;letter-spacing:.04em}
.limit-line b{font:700 10cqw/1 Georgia,'Times New Roman',serif;font-variant-numeric:tabular-nums;letter-spacing:-.025em}
.desktop-shoe-backs{position:absolute;z-index:2;left:83.832335%;top:0;width:13.772455%;height:17.003188%;max-width:none;object-fit:fill;pointer-events:none}
.mobile-card-shoe{display:none;pointer-events:none}

/* The desktop board rests on the chip band's top edge, rising from the rail. */
.recent-history{position:absolute;z-index:30;top:auto;bottom:0;left:auto;right:2%;width:clamp(190px,16.2cqw,260px);pointer-events:none}
.recent-history-panel{position:relative;pointer-events:auto;padding:9px 10px 10px;border:1px solid #a67b39aa;border-radius:9px;color:#e8dbbd;background:linear-gradient(130deg,#080908ec,#16110ce8);box-shadow:inset 0 1px #f3d78625,0 5px 14px #0004}
.history-board-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:8px;letter-spacing:1px;line-height:1.1}
.history-board-heading strong{font-weight:700;color:#f5dda4}.history-board-heading>span{font-size:6px;color:#a89c81;letter-spacing:.6px}
.history-totals{display:flex;gap:12px;margin:8px 0 6px;font-size:8px}
.history-totals>span{display:flex;gap:4px;align-items:center}.history-totals b{font-weight:600;font-variant-numeric:tabular-nums}
.history-key{display:grid;place-items:center;width:11px;height:11px;flex:none;border-radius:50%;font:700 7px/1 Arial,sans-serif}
.key-red{background:#d32131;color:white}.key-black{background:#f8f6ef;color:#101218}.key-seven{background:#2385ed;color:white}.key-tie{border:1px solid #d5b256;color:#edce75}
.history-grid-wrap{position:relative}
.recent-history-grid{--history-cell:clamp(18px,1.6cqw,25px);display:grid;grid-template-columns:repeat(var(--history-columns,7),minmax(0,1fr));grid-template-rows:repeat(var(--history-rows,3),var(--history-cell));gap:3px 2px;list-style:none;padding:0;margin:0}
.history-cell{display:grid;place-items:center;min-width:0;min-height:0;position:relative}
.history-cell[data-empty=true]:after{content:"";width:2px;height:2px;border-radius:50%;background:#c3af8059}
.history-bead{display:grid;place-items:center;width:calc(var(--history-cell) - 2px);height:calc(var(--history-cell) - 2px);border-radius:50%;font:700 clamp(9px,.85cqw,13px)/1 Arial,sans-serif;font-variant-numeric:tabular-nums;box-shadow:inset 0 1px 1px #ffffff40,0 1px 3px #0008}
.history-bead[data-kind=red]{background:linear-gradient(#ed3146,#b41023);color:#fff}
.history-bead[data-kind=black]{background:linear-gradient(#fff,#e8e6df);color:#111218}
.history-bead[data-kind=seven]{background:linear-gradient(#389cff,#1261d1);color:white}
.history-bead[data-kind=tie]{border:1px solid #d2b162;color:#f3d78e;background:#262016}
.history-bead[data-newest=true]{outline:1px solid #f8d97f;outline-offset:2px}
.history-empty{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);font-size:8px;text-align:center;color:#bcad8d;background:#0d0b09e8;padding:5px 0;pointer-events:none}
.recent-history-toggle{display:none}
.recent-history-toggle svg{width:17px;height:17px;display:block;fill:none;stroke:#f4d78b;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.recent-history-toggle[aria-expanded=true] svg{transform:rotate(180deg)}

@media(min-width:1101px){
 .recent-history{bottom:-12px}
 .recent-history-panel{padding-bottom:22px;color:#fff2d4;background:linear-gradient(130deg,#080908f7,#16110cf5)}
 .history-board-heading{font-size:10px;letter-spacing:.7px}
 .history-board-heading strong{color:#ffe8b7}
 .history-board-heading>span{font-size:8px;color:#d7c59c;letter-spacing:.4px}
 .history-totals{font-size:10px}.history-totals b{font-weight:700}
 .history-key{width:13px;height:13px;font-size:8px}
 .history-bead{font-size:clamp(10px,.9cqw,13px)}
 .history-empty{font-size:10px;font-weight:500;color:#e6d8b9;background:#0d0b09f5}
}

/* Narrow layouts disclose the same board below the menu, over the logo. */
@media(max-width:1100px){
 .recent-history{position:fixed;top:70px;bottom:auto;left:50%;right:auto;width:min(360px,86vw);transform:translateX(-50%);z-index:34}
 .recent-history-panel{background:linear-gradient(130deg,#0c0c0af8,#17110bfa);border-color:#dfb45c;border-radius:0 0 12px 12px;box-shadow:0 8px 24px #000a,inset 0 1px #ffe5a44a;animation:history-drop .2s ease-out}
 .recent-history-grid{--history-cell:25px}
 .history-bead{font-size:12px}
 .history-board-heading{font-size:9px}.history-board-heading>span{font-size:7px}.history-totals{font-size:9px}
 .recent-history-toggle{display:flex;align-items:center;justify-content:center;padding:5px 8px}
}
@media(max-width:760px){.recent-history{top:60px}}
@media(max-width:600px) and (orientation:portrait){
 .topbar nav{width:62%}
 .topbar .menu-button{padding:0 3px;flex:1}
 .topbar .recent-history-toggle{flex:0 0 20px;border-left:1px solid #e6bd4f33}
 .recent-history{top:clamp(36px,4.8dvh,60px);width:min(360px,88vw)}
 .recent-history-panel{padding:8px 10px}
 .recent-history-grid{--history-cell:23px}
 .history-empty{font-size:9px}
 .table-limits{top:10.5%;left:1%;width:min(18.5cqw,16.5cqh)}
 .limits-lettering{padding:0 2%}
 .limits-title{font-size:7cqw;letter-spacing:0}
 .limit-line small{font-size:8cqw}
 .desktop-shoe-backs{display:none}
 .mobile-card-shoe{position:absolute;display:block;right:1%;top:8.5%;width:21%;height:17.5%;z-index:3}
 .mobile-card-shoe img{width:100%;height:100%;object-fit:contain}
 /* SVG exit (145,268) in its 320 × 360 image, including contain letterboxing. */
 #card-shoe-origin{left:calc(88.5% - min(.984375cqw,.729166667cqh));top:calc(17.25% + min(5.775cqw,4.277777778cqh))}
}
@media(max-width:1100px) and (max-height:520px) and (min-aspect-ratio:6/5){
 .recent-history{top:34px;width:300px}
 .recent-history-grid{--history-cell:20px}
 .recent-history-panel{padding:7px 9px}.history-board-heading{font-size:8px}.history-totals{margin:6px 0 5px}
 .table-limits{top:3.5%;left:18%;width:min(14cqw,28cqh)}
}
@keyframes history-drop{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
.casino-table.reduced-motion .recent-history-panel{animation:none}
body:has(.casino-table.reduced-motion) .recent-history-toggle svg{transition:none}
@media(prefers-reduced-motion:reduce){.recent-history-panel{animation:none}.recent-history-toggle svg{transition:none}}
