*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{font-family:system-ui,sans-serif;color:#fff5de;background:radial-gradient(ellipse at 0 0,#49346a,transparent 65%),radial-gradient(ellipse at 100% 100%,#174958,transparent 65%),#101326}button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button{font:inherit;cursor:pointer;border:1px solid #ffffff3a;color:inherit;background:#ffffff12;border-radius:12px;min-height:36px;padding:7px 11px}button:disabled{opacity:.43;cursor:default}button:active{translate:0 2px}button:focus-visible,a:focus-visible{outline:3px solid #ffe2a0;outline-offset:2px}[hidden]{display:none!important}main{width:100%;height:100dvh;max-width:900px;margin:auto;padding:max(9px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(9px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:grid;grid-template-rows:auto minmax(0,1fr);gap:10px}header{display:flex;align-items:center;justify-content:space-between;min-height:32px}header a{color:#ded0ee;text-decoration:none;font-size:14px}.brand{font-size:10px;letter-spacing:3px;color:#c5b9df}.brand b{color:#f3c98c;font-size:20px;margin-left:6px}#menu{min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:10px}.choice{position:relative;min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;text-align:left;padding:12px 16px;border:1px solid #fff3;border-radius:22px;box-shadow:inset 0 1px #fff3,0 4px 0 #070b20,0 8px 15px #0003;background:radial-gradient(ellipse at 95% 0,#ffffff25,transparent 65%),linear-gradient(135deg,var(--a),var(--b));animation:tile-in .35s ease-out both}.choice::after{content:'';position:absolute;right:-20px;bottom:-20px;width:100px;height:100px;border-radius:50%;border:18px solid #ffffff09}.game-icon{font-size:clamp(26px,5vh,48px);line-height:1.15;margin-bottom:5px;text-shadow:0 5px 8px #0005}.choice strong{font-size:clamp(15px,2.2vh,21px);font-weight:850;line-height:1.5}.choice small{font-size:clamp(9px,1.5vh,12px);opacity:.75;line-height:1.4}.choice .resume{position:absolute;right:9px;top:9px;font-size:9px;background:#08172580;border:1px solid #fff2;padding:3px 6px;border-radius:20px;color:#ffe6b3}#game{min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:8px}.game-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.game-top>div{flex:1;text-align:center}.game-top h1{font-size:19px;margin:0;color:#ffe2a0;line-height:1.5}.game-top small{font-size:10px;color:#cfc3e6;letter-spacing:1px}#status{min-height:28px;text-align:center;font-size:13px;color:#e9efd8;border-radius:13px;background:#ffffff0b;padding:6px 9px}#stage{position:relative;min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;container-type:size;border-radius:22px;background:radial-gradient(ellipse at 30% 0,#ffffff13,transparent 65%),linear-gradient(145deg,#204f50,#122d38);border:1px solid #b0e6d13b;box-shadow:inset 0 0 0 5px #0001,0 4px 0 #050c1d;overflow:hidden}#actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px}#actions button{font-weight:750;font-size:13px;background:linear-gradient(#eed49b,#b28651);color:#282238;border-color:#f7e5bc;box-shadow:0 3px 0 #694a31;min-height:39px}footer{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#c2bdd4;font-size:10px}footer button{font-size:11px;min-height:32px}.square{width:min(100cqw - 12px,100cqh - 12px);height:min(100cqw - 12px,100cqh - 12px);display:grid;grid-template-columns:repeat(var(--cols,8),minmax(0,1fr));grid-template-rows:repeat(var(--cols,8),minmax(0,1fr));border:3px solid #ba9667;border-radius:6px;overflow:hidden;background:#ebdab5;box-shadow:0 5px 15px #0005}.cell{position:relative;display:flex;align-items:center;justify-content:center;min-height:0;min-width:0;padding:0;border:0;border-radius:0;background:#eedebd;color:#17232c;font-size:clamp(18px,6cqw,48px);line-height:1}.cell.dark{background:#6a7781}.cell.selected{box-shadow:inset 0 0 0 4px #ffc65e;background:#d8b463}.cell.legal::after{content:'';position:absolute;width:25%;height:25%;border-radius:50%;background:#a2f4bc;box-shadow:0 0 0 2px #1e6345}.cell.last{background:#acbca6}.piece{width:73%;height:73%;border-radius:50%;display:grid;place-items:center;border:3px solid #ffe6ac;box-shadow:inset 0 -5px 0 #0003,0 3px 3px #0005;background:radial-gradient(ellipse at 30% 20%,#ffa77c,#b13b54);font-size:clamp(12px,4cqw,30px);color:#fff2b5}.piece.bot{background:radial-gradient(ellipse at 30% 20%,#a9dbff,#345a9d);border-color:#cee9ff}.chess-piece{font-size:clamp(22px,7cqw,52px);color:#fff9e8;text-shadow:1px 1px #1b2439,-1px -1px #1b2439,0 2px 3px #0007}.chess-piece.black{color:#1d293f;text-shadow:0 1px #e8d7bc}.sudoku{--cols:9;border-color:#d7c594}.sudoku .cell{font-size:clamp(16px,5cqw,30px);border-right:1px solid #a6a5a36b;border-bottom:1px solid #a6a5a36b;background:#fff7e6;color:#4358a7;font-weight:650}.sudoku .cell.given{color:#263544;font-weight:850;background:#e7e5d6}.sudoku .cell.peer{background:#e1ebee}.sudoku .cell.selected{background:#f8d995;box-shadow:none}.sudoku .cell.invalid{color:#c63650;background:#ffe0db}.sudoku .cell:nth-child(3n){border-right:2px solid #67768a}.sudoku .cell:nth-child(n+19):nth-child(-n+27),.sudoku .cell:nth-child(n+46):nth-child(-n+54){border-bottom:2px solid #67768a}.number-pad{display:grid!important;grid-template-columns:repeat(11,minmax(0,1fr));gap:4px!important}.number-pad button{min-width:0;padding:5px!important}.ludo{--cols:15;border:0;background:#eae5d7}.ludo .cell{font-size:9px;background:#c7d3bd;border:0;position:relative}.ludo .cell.track{background:#fff7df;border:1px solid #b6b09b}.ludo .cell.safe{background:#e3c57f}.ludo .cell.home-red{background:#d7616f}.ludo .cell.home-blue{background:#6591bc}.ludo .cell.finish{background:#765d97;color:white}.token{position:absolute;width:46%;height:46%;min-height:0;padding:0;border-radius:50%;background:#be3451;border:1px solid #fff4d2;box-shadow:0 2px 2px #0005;color:#fff;font-size:clamp(6px,1.8cqw,13px);font-weight:900}.token.bot{background:#255fa9}.token.can{box-shadow:0 0 0 2px #ffffa5,0 0 10px #fff;animation:token-glow 1.2s infinite}.ludo-legend{position:absolute;right:12px;top:9px;background:#102139bb;padding:5px 9px;border-radius:10px;font-size:10px;pointer-events:none}.card-room{width:100%;height:100%;padding:10px;display:flex;flex-direction:column;justify-content:space-between;gap:8px;min-height:0}.hand-row{display:flex;align-items:center;justify-content:center;gap:4px;min-height:0;flex-wrap:wrap}.hand-row.scroll-free{flex-wrap:nowrap}.playing-card{position:relative;display:inline-flex;flex:0 0 auto;align-items:flex-start;justify-content:flex-start;border:1px solid #e3ca99;border-radius:7px;background:linear-gradient(130deg,#fffdf4,#e9dcc1);color:#263442;font-size:clamp(9px,2.8vw,15px);font-weight:850;padding:4px;line-height:1.2;width:clamp(32px,11cqw,66px);aspect-ratio:7/10;min-height:0;box-shadow:0 2px 0 #a09275,0 3px 6px #0004}.playing-card.red{color:#bb3050}.playing-card::after{content:attr(data-suit);position:absolute;inset:32% 0 0;display:block;text-align:center;font-size:clamp(16px,6cqw,32px);pointer-events:none}.playing-card.back{background:repeating-linear-gradient(45deg,#694e91 0 4px,#493668 4px 8px);border:2px solid #d9bc83;color:#ffe1a1;align-items:center;justify-content:center}.playing-card.back::after{content:'✦';inset:25% 0 0}.playing-card.pick{outline:3px solid #ffe187;translate:0 -4px}.playing-card:disabled{opacity:1}.playing-card.tiny{width:clamp(25px,7cqw,42px);font-size:10px}.playing-card.tiny::after{font-size:20px}.hand-label{text-align:center;font-size:11px;color:#d0dfd6;margin:0 0 3px}.centre-note{text-align:center;color:#ffe4a4;font-size:16px;font-weight:800}.stock-btn{background:#0f293a80;border:1px dashed #d8bd87;min-height:65px;min-width:55px}.sevens-table{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;flex:1;min-height:0;align-items:center}.suit-lane{text-align:center;border:1px solid #ffffff25;border-radius:16px;padding:12px 3px;background:#0002}.suit-lane b{font-size:28px;color:#ffe5a6}.suit-lane small{display:block;font-size:11px;color:#d8e4db}.meld-row{display:flex;flex-wrap:wrap;gap:5px;justify-content:center;max-height:25%;overflow:auto}.meld{font-size:11px;background:#ffffff13;padding:5px 7px;border-radius:8px;min-height:28px}.solitaire{height:100%;width:100%;display:grid;grid-template-rows:auto minmax(0,1fr);gap:12px;padding:10px 7px;min-height:0}.sol-top,.sol-table{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;min-height:0}.sol-slot{position:relative;border:1px dashed #ffffff4d;border-radius:7px;min-width:0;min-height:0;background:#0001}.sol-top .sol-slot{aspect-ratio:7/10}.sol-slot .playing-card{width:100%;height:auto;font-size:clamp(8px,2.1cqw,13px);min-width:0;padding:3px}.sol-slot .playing-card::after{font-size:clamp(14px,4cqw,26px)}.sol-slot.empty{display:grid;place-items:start center;color:#d7cb9a;font-size:13px;padding-top:5px}.sol-table .playing-card{position:absolute;left:0;top:calc(var(--index)*var(--overlap));}.sol-table .sol-slot{border-bottom:0}.result-icon{font-size:55px;color:#ffda8d}dialog{color:#fff1d7;border:1px solid #ddbd85;border-radius:25px;padding:24px;background:radial-gradient(ellipse at top,#604678,#222640 80%);box-shadow:0 15px 60px #000a;max-width:min(90vw,430px);text-align:center}dialog::backdrop{background:#080d21c9;backdrop-filter:blur(5px)}dialog h2{margin:0 0 12px;font-size:23px}dialog p{font-size:14px;line-height:1.8;color:#e6deed;white-space:pre-line}dialog button{display:block;width:100%;margin-top:10px;background:linear-gradient(#efd39a,#af8048);color:#252237;font-weight:800}.promotion{position:absolute;inset:30% 15%;z-index:10;background:#18283bf5;display:flex;align-items:center;justify-content:center;gap:10px;border:1px solid #f1ce8b;border-radius:18px}.promotion button{font-size:30px}.toast{position:absolute;bottom:10px;left:10px;right:10px;text-align:center;background:#1e213be8;border:1px solid #d7b977;padding:9px;border-radius:12px;font-size:12px;pointer-events:none;z-index:30}@keyframes tile-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes token-glow{50%{filter:brightness(1.3)}}@media(orientation:landscape) and (max-height:550px){main{gap:5px;padding:5px 12px;max-width:1100px}header{min-height:24px}#menu{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:8px}.choice{padding:8px 14px}.game-icon{font-size:29px}.choice strong{font-size:15px}.choice small{font-size:10px}#game{grid-template-columns:minmax(0,32%) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto;gap:5px 12px}.game-top{grid-column:1;grid-row:1;flex-wrap:wrap}.game-top h1{font-size:17px}.game-top button{font-size:11px;padding:4px 8px;min-height:30px}#status{grid-column:1;grid-row:2;font-size:11px}#stage{grid-column:2;grid-row:1/-1}#actions{grid-column:1;grid-row:3;align-content:center}footer{grid-column:1;grid-row:4;flex-wrap:wrap}#actions button{font-size:11px;min-height:32px}.number-pad{grid-template-columns:repeat(5,minmax(0,1fr))}.card-room{padding:6px;gap:4px}.hand-label{font-size:9px}.centre-note{font-size:12px}.playing-card{width:clamp(25px,9cqw,50px);font-size:10px}.playing-card::after{font-size:24px}.suit-lane{padding:6px 2px}.solitaire{padding:5px;gap:6px}.brand{font-size:9px}}
@media(max-height:650px) and (orientation:portrait){main{gap:6px}#game{gap:5px}.choice{padding:6px 12px;border-radius:16px}.game-icon{font-size:27px;margin:0}.choice strong{font-size:14px}.choice small{font-size:9px}.game-top h1{font-size:17px}#status{font-size:11px}#actions button{min-height:33px;font-size:12px}.playing-card{width:clamp(28px,10cqw,52px)}.hand-label{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.pyramid-layout{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.pyramid-row{display:flex;justify-content:center;gap:3px;min-height:0}.pyramid-row .playing-card,.pyramid-blank{width:min(11cqw,6.5cqh);height:min(15.7cqw,9.3cqh);aspect-ratio:7/10;font-size:clamp(8px,2cqw,12px);padding:2px}.pyramid-row .playing-card::after{font-size:clamp(12px,4cqh,23px)}.pyramid-row .covered{filter:brightness(.72)}.pyramid-blank{display:block}.golf-layout{width:100%;height:100%;padding:10px 7px;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:8px;min-height:0}.golf-layout .sol-slot .playing-card{position:absolute;top:calc(var(--index)*var(--overlap))}.playing-card.not-legal{filter:brightness(.65)}.sol-top .sol-slot button:not(.playing-card){width:100%;height:100%;padding:0;min-height:0;border:0}.sol-slot.empty{padding-top:0}.playing-card.tiny{font-size:9px}.meld-row{flex-shrink:1}.card-room>.hand-row:last-child{flex-shrink:0}
.trick-table{position:relative;min-height:0;flex:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:3px;align-items:center;justify-items:center}.trick-seat{display:flex;flex-direction:column;align-items:center;gap:3px;min-height:0}.trick-seat small{font-size:10px;color:#e2dbd0}.seat-0{grid-column:2;grid-row:3}.seat-1{grid-column:3;grid-row:2}.seat-2{grid-column:2;grid-row:1}.seat-3{grid-column:1;grid-row:2}.trick-seat .playing-card{width:min(13cqw,14cqh)}.seat-count{font-size:11px;opacity:.65}.juse-centre,.juse-rivals{display:flex;justify-content:space-evenly;gap:6px;min-height:0}.juse-pile{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0}.juse-pile small{font-size:10px;color:#d4dbd1}.juse-pile .stock-btn{min-width:0;width:clamp(32px,11cqw,66px);aspect-ratio:7/10;min-height:0}.juse-pile>span{font-size:10px;opacity:.6}select{min-height:36px;border-radius:10px;background:#25374a;color:#fff4cf;border:1px solid #d7b586;padding:6px 12px;font:inherit;font-weight:750}

.pyramid-row .playing-card,.pyramid-blank{width:min(11cqw,5.95cqh);height:min(15.7cqw,8.5cqh)}.pyramid-room>.hand-row .playing-card{width:min(11cqw,12.6cqh);height:min(15.7cqw,18cqh)}.pyramid-room .stock-btn{min-height:0;height:18cqh;padding:4px 8px;font-size:11px}

.trick-room>.hand-row .playing-card{width:min(10cqw,12cqh)}.trick-seat .playing-card{width:min(13cqw,8cqh)}.juse-room .playing-card{width:min(11cqw,12cqh)}.juse-room .stock-btn{height:17.15cqh;min-height:0;font-size:11px;padding:3px 8px}.juse-room .juse-pile .stock-btn{width:min(11cqw,12cqh)}
/* Illustrated card shelves fill the menu without changing its fixed viewport. */
.choice{isolation:isolate;justify-content:flex-end;padding:76px 14px 32px;background:radial-gradient(ellipse at 90% 8%,#ffffff42,transparent 65%),linear-gradient(135deg,var(--a),var(--b));border-color:#ffffff55}
.choice>.game-icon{position:absolute;left:14px;top:13px;font-size:clamp(28px,4.2vh,43px);margin:0;z-index:2}
.choice>strong,.choice>small{position:relative;z-index:2;max-width:100%;text-shadow:0 2px 6px #0004}
.choice>strong{font-size:clamp(14px,2.05vh,20px);line-height:1.3;margin-bottom:3px}
.choice>small{font-size:clamp(9px,1.4vh,12px);opacity:.9;line-height:1.4}
.choice::after{width:125px;height:125px;border:1px solid #fff2;background:radial-gradient(circle,#ffffff17,transparent 70%);right:-24px;bottom:-25px;z-index:-1}
.choice::before{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(115deg,transparent 25%,#ffffff23 45%,transparent 65%);transform:translateX(-130%);animation:tile-sheen 7s ease-in-out infinite}
.choice:nth-child(2n)::before{animation-delay:1.5s}.choice:nth-child(3n)::before{animation-delay:3s}
.tile-card-art{position:absolute;right:13px;top:22px;width:76px;height:61px;pointer-events:none;z-index:1}
.tile-card{position:absolute;left:calc(var(--i)*18px);top:calc(var(--i)*-4px);display:flex;align-items:flex-start;justify-content:center;width:34px;height:48px;padding:5px 2px;border:1px solid #fff5c4;border-radius:5px;background:linear-gradient(135deg,#fffef1,#e7d7af);color:#21334c;font:800 13px/1.3 system-ui,sans-serif;box-shadow:0 3px 8px #10132966;transform:rotate(calc((var(--i) - 1)*12deg));animation:tile-card-float 4s ease-in-out infinite;animation-delay:calc(var(--i)*-.8s)}
.tile-card::after{content:'✦';position:absolute;bottom:4px;font-size:14px;opacity:.5}.tile-card.tile-red{color:#b92c53}
.choice[data-game=twentyone] .tile-card:last-child{background:linear-gradient(135deg,#ffe7a0,#d7a245);color:#44315a}
.choice .resume{z-index:3;top:5px;right:7px;padding:1px 5px;font-size:8px}
.tile-footer{position:absolute;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:5px;padding:5px 12px;background:#12172930;border-top:1px solid #ffffff20;font-size:9px;letter-spacing:.5px;z-index:2}
.tile-level{color:#fff0c7;font-weight:800}.tile-play{color:#fff7df;font-weight:800}
@keyframes tile-card-float{0%,100%{transform:translateY(0) rotate(calc((var(--i) - 1)*12deg))}50%{transform:translateY(-5px) rotate(calc((var(--i) - 1)*12deg + 3deg))}}
@keyframes tile-sheen{0%,60%{transform:translateX(-130%)}90%,100%{transform:translateX(130%)}}
@media(hover:hover){.choice:hover{filter:brightness(1.12)}.choice:hover .tile-card{animation-duration:1.6s}}
@media(max-height:750px) and (orientation:portrait){.choice{padding:60px 12px 27px}.choice>.game-icon{top:12px;font-size:28px}.tile-card-art{top:17px;right:10px;transform:scale(.8);transform-origin:top right}.choice>strong{font-size:14px}.choice>small{font-size:9px}.tile-footer{padding:4px 10px;font-size:8px}}
@media(max-height:620px) and (orientation:portrait){.choice{padding-top:40px;padding-bottom:23px}.choice>.game-icon{top:6px;font-size:23px}.tile-card-art{top:10px;transform:scale(.6)}.choice>strong{font-size:12px}.choice>small{font-size:8px}.choice .resume{font-size:7px;top:2px}.tile-footer{padding:3px 9px}}
@media(orientation:landscape) and (max-height:550px){.choice{padding:58px 12px 27px}.tile-card-art{transform:scale(.75);transform-origin:top right;top:18px}.choice>.game-icon{font-size:30px}.choice>strong{font-size:14px}.choice>small{font-size:9px}}
@media(prefers-reduced-motion:reduce){.choice::before,.tile-card{animation:none!important}}
/* Game tables: felt, rail, larger proportional cards and restrained motion. */
#stage{isolation:isolate;background:radial-gradient(ellipse at 50% 20%,#ffffff20,transparent 65%),repeating-linear-gradient(35deg,#ffffff03 0 1px,transparent 1px 5px),linear-gradient(145deg,var(--table-a,#28595a),var(--table-b,#153642));border:2px solid #ebd7a85e;box-shadow:inset 0 0 0 5px #ffffff09,inset 0 0 25px #07152b66,0 4px 0 #050c1d}
#stage::before{content:attr(data-mark);position:absolute;inset:0;display:grid;place-items:center;font-size:clamp(85px,32cqw,230px);font-weight:900;color:#fff0c2;opacity:.09;pointer-events:none;z-index:-1;animation:felt-breathe 7s ease-in-out infinite}
#stage::after{content:'';position:absolute;inset:12px;border:1px solid #ffe4ab30;border-radius:18px;pointer-events:none;z-index:-1;box-shadow:inset 0 0 0 4px #ffffff04}
#stage>.card-room,#stage>.solitaire,#stage>.golf-layout{position:relative;z-index:1}
.card-room{padding:14px 12px;gap:10px}
.playing-card{width:min(18cqw,21cqh,96px);aspect-ratio:7/10;border:1px solid #fff1bf;border-radius:8px;background:linear-gradient(130deg,#fffdf4,#f3e7cb 70%,#ddc795);box-shadow:inset 0 1px #fff,0 3px 0 #b7a17c,0 6px 12px #07152b55;font-size:clamp(10px,3.4cqw,18px);animation:card-arrive .18s ease-out both;transition:filter .15s,box-shadow .15s}
.playing-card:not(.back)::before{content:attr(aria-label);position:absolute;right:3px;bottom:3px;transform:rotate(180deg);font-size:.62em;line-height:1;max-width:90%;overflow:hidden;white-space:nowrap;pointer-events:none}
.playing-card::after{font-size:clamp(21px,8cqw,44px);inset:29% 0 0}
.hand-row .playing-card{width:min(96px,19cqw,21cqh,calc((100cqw - 28px - (var(--hand-count,5) - 1)*4px)/var(--hand-count,5)))}
.hand-row .playing-card.tiny{font-size:clamp(9px,2.6cqw,13px)}
.hand-row .playing-card.tiny::after{font-size:clamp(18px,5cqw,28px)}
.playing-card.back{background:radial-gradient(ellipse at top,#9a77bb44,transparent 70%),repeating-linear-gradient(45deg,#694e91 0 4px,#493668 4px 8px);border:2px solid #e8d39f}
.playing-card.pick{outline:3px solid #ffe187;box-shadow:0 0 0 5px #ffe18733,0 6px 12px #0005;animation:chosen-glow 1.8s ease-in-out infinite}
.stock-btn{border:1px dashed #ffe4ab88;background:linear-gradient(135deg,#ffffff1f,#06192c44);box-shadow:inset 0 1px #ffffff20;min-height:75px;border-radius:10px;font-weight:800}
.hand-label{background:#0e18362e;border:1px solid #ffffff16;border-radius:12px;padding:5px 8px;margin:0;font-weight:700;letter-spacing:.2px;color:#fff0d1}
.centre-note{color:#ffe4aa;text-shadow:0 2px 5px #0005;font-size:clamp(15px,4cqw,22px);padding:5px 8px}
.suit-lane{padding:18px 4px;background:linear-gradient(145deg,#ffffff16,#09172c33);border:1px solid #f2d49a66;box-shadow:inset 0 1px #ffffff22,0 4px 10px #0002}
.suit-lane b{font-size:clamp(28px,10cqw,46px);text-shadow:0 3px 5px #0004}.suit-lane small{margin-top:7px;color:#fff2ca;font-size:12px}
.meld-row:empty::before{content:'♠  ♥  ♣  ♦';font-size:24px;letter-spacing:9px;color:#ffebbd55;padding:14px}
.trick-table{border:1px solid #ffe1a33b;border-radius:40%;background:radial-gradient(ellipse,#ffffff0c,transparent 70%);padding:5px}
.trick-seat .playing-card{width:min(18cqw,13.5cqh,88px)}
.trick-seat small{font-size:12px;font-weight:750}.trick-seat.is-turn small{color:#ffe7a3;text-shadow:0 0 8px #ffe7a366}.seat-count{padding:8px 10px;border:1px solid #ffffff20;border-radius:10px;background:#081a2a25;font-size:13px;opacity:.8}
.trick-room>.hand-row .playing-card{width:min(calc((100cqw - 50px)/8),14cqh,74px)}
.juse-room .playing-card{width:min(18cqw,14.7cqh,90px)}
.juse-room .stock-btn{height:21cqh;min-height:0;padding:4px 6px;font-size:12px}.juse-room .juse-pile .stock-btn{width:min(18cqw,14.7cqh,90px)}
.juse-centre,.juse-rivals{padding:8px 4px;border:1px solid #ffffff20;border-radius:15px;background:#101b2922}
.juse-pile small{color:#fff1cd;font-weight:700}
.pyramid-row .playing-card,.pyramid-blank{width:min(11cqw,6.4cqh);height:min(15.7cqw,9.14cqh)}
.pyramid-room>.hand-row .playing-card{width:min(15cqw,12.6cqh);height:min(21.43cqw,18cqh)}
.sol-slot{box-shadow:inset 0 0 12px #0b173922;border-color:#ffebbb66;background:#ffffff06}
.sol-slot .playing-card{animation:none}.sol-slot .playing-card::before{display:none}
#actions button{transition:filter .15s,box-shadow .15s}#actions button:active{filter:brightness(1.15)}
@keyframes card-arrive{from{opacity:.75;filter:brightness(1.12)}to{opacity:1;filter:brightness(1)}}
@keyframes chosen-glow{50%{box-shadow:0 0 0 5px #ffe18755,0 0 15px #ffe18755}}
@keyframes felt-breathe{50%{opacity:.14;transform:scale(1.025)}}
@media(orientation:landscape) and (max-height:550px){.card-room{padding:8px;gap:5px}.hand-label{padding:3px 5px;font-size:10px}.suit-lane{padding:9px 3px}.juse-centre,.juse-rivals{padding:3px}.centre-note{font-size:14px;padding:2px}.seat-count{padding:4px 6px}.trick-seat small{font-size:10px}}
@media(prefers-reduced-motion:reduce){#stage::before,.playing-card,.playing-card.pick{animation:none!important;transition:none!important}}

.suit-lane>.lane-preview{display:flex;margin:12px auto 0;width:min(15cqw,17cqh);pointer-events:none}.suit-lane>.lane-preview.lane-empty{opacity:.35;border-style:dashed}.trick-seat .seat-count::before{content:'✦';display:grid;place-items:center;width:min(10cqw,6cqh);aspect-ratio:7/10;margin:0 auto 4px;border:1px solid #f2d49a;border-radius:4px;background:repeating-linear-gradient(45deg,#674a83 0 3px,#392c55 3px 6px);color:#ffe5a3;font-size:18px;box-shadow:0 3px 5px #0003}

.golf-layout>.hand-row .playing-card{width:min(12cqw,12cqh,58px)}
#stage[data-game=twentyone] .hand-row .playing-card{width:min(112px,24cqw,24cqh,calc((100cqw - 28px - (var(--hand-count,5) - 1)*4px)/var(--hand-count,5)))}
#stage[data-game=twentyone] .card-room{justify-content:space-evenly}

/* Eight mini games in the existing two-column, four-row menu. */
.memory-room{position:relative;z-index:1;width:100%;height:100%;padding:12px;display:flex;flex-direction:column;align-items:center;gap:10px;min-height:0}
.memory-stats{display:flex;justify-content:space-between;gap:16px;width:100%;max-width:390px;font-size:clamp(11px,3cqw,15px);font-weight:800;color:#ffe7a3}
.memory-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:8px;flex:1;min-height:0;width:min(100%,64cqh,390px);padding-bottom:4px}
.memory-grid .memory-card{width:100%;height:100%;min-height:0;aspect-ratio:auto;padding:5px;animation:none;transition:background .18s,box-shadow .18s;overflow:hidden}
.memory-grid .memory-card:disabled{opacity:1;cursor:default}
.memory-grid .memory-card::before{display:none}
.memory-grid .memory-card::after{font-size:clamp(16px,6cqw,32px);inset:35% 0 0}
.memory-grid .memory-matched{border-color:#a2efbb;box-shadow:0 0 0 2px #74e9a252,0 3px 0 #3c9361;filter:brightness(.92)}
@media(orientation:landscape) and (max-height:550px){.memory-room{padding:7px;gap:4px}.memory-grid{width:min(100%,70cqh,390px);gap:4px}.memory-stats{font-size:10px}.memory-grid .memory-card{padding:2px;font-size:10px}.memory-grid .memory-card::after{font-size:16px}}
/* Game titles always sit above the decorative card fan, which shrinks on phones. */
.choice strong,.choice small{position:relative;z-index:2;text-shadow:0 1px 3px #000c}
@media (max-width:520px){.tile-card-art{top:6px;right:4px;transform:scale(.62);transform-origin:top right}}
/* Ten card games plus Mahjong: tiles keep a readable height and the menu scrolls instead of squeezing. */
#menu{grid-template-rows:none;grid-auto-rows:minmax(150px,1fr);overflow-y:auto;overscroll-behavior:contain;padding-bottom:6px}
@media(orientation:landscape){#menu{grid-auto-rows:minmax(132px,1fr)}}
