@font-face{font-family:Balatro;src:url('./assets/m6x11plus-web.ttf')}@font-face{font-family:BalatroCN;src:url('./assets/NotoSansSC-Bold.ttf');font-display:swap}
:root{color-scheme:dark;--blue:#009dff;--red:#ff4c40;--orange:#f5a623;--green:#39944d;--ink:#f7f5ef;--panel:#263638;--shadow:#122321}
*{box-sizing:border-box}body{margin:0;min-width:720px;background:#28634e;color:var(--ink);font-family:Balatro,BalatroCN,sans-serif;text-shadow:1px 2px #172a29;font-size:20px}button,input,select{font:inherit}button{color:inherit;border:0;border-radius:9px;box-shadow:0 5px 0 #142624, inset 0 2px 1px #ffffff30;padding:12px 22px;cursor:pointer;text-shadow:1px 2px #0005;transition:filter .15s,transform .15s}button:hover:not(:disabled){filter:brightness(1.12);transform:translateY(-2px)}button:active:not(:disabled){transform:translateY(3px);box-shadow:0 2px 0 #142624}button:disabled{cursor:not-allowed;filter:saturate(.25);opacity:.5}button:focus-visible{outline:3px solid #fff;outline-offset:5px}.blue{background:var(--blue)}.red{background:var(--red)}.orange{background:var(--orange)}.green{background:var(--green)}.blue-text{color:var(--blue)}.red-text{color:var(--red)}.orange-text{color:var(--orange)}.hidden{display:none!important}
.felt{position:fixed;inset:-20%;z-index:-2;background:repeating-radial-gradient(ellipse at 75% 20%,#0000 0 35px,#34785d55 50px 85px,#194a3d40 105px 140px);transform:rotate(-15deg);filter:blur(7px)}.scanlines{position:fixed;inset:0;pointer-events:none;z-index:20;opacity:.18;background:repeating-linear-gradient(transparent 0 2px,#071c1b70 3px 4px);box-shadow:inset 0 0 100px #0009}.game{max-width:1700px;margin:auto;display:grid;grid-template-columns:270px 1fr;min-height:1240px;position:relative}.sidebar{background:#293a3bdb;border-left:3px solid #204e59;border-right:3px solid #107bb2;padding:clamp(20px,99.2px,80px) 9px 20px;display:flex;flex-direction:column;gap:9px}.blind-panel{background:#124762;border:4px solid #1c2b30;border-radius:12px;box-shadow:0 4px #14252d;overflow:hidden;text-align:center}h1{margin:0;background:#0877ba;font-size:28px;padding:4px;box-shadow:0 4px #153f58}.blind-body{display:flex;align-items:center;justify-content:space-around;gap:8px;padding:22px 8px 12px}.blind-body>div{border-radius:10px;background:#203333;padding:7px 12px}.blind-body strong{display:block;font-size:38px}.blind-body small{font-size:17px;display:block}.blind-chip{border-radius:50%;width:80px;height:80px;display:flex;align-items:center;justify-content:center;text-align:center;background:#353797;box-shadow:0 4px #121d54,inset 0 0 0 5px #6e83d33d;border:2px dashed #8fa0ee;font-size:21px;line-height:.85;flex-shrink:0}.blind-chip.blind-1{background:#ac9d31;border-color:#eee19b}.blind-chip.blind-2{background:#a74479;border-color:#f4a0b0}.blind-panel p{font-size:12px;min-height:4px;margin:0 7px 5px;line-height:1.4}.round-score{display:flex;align-items:center;gap:10px;background:#18272a;border-radius:9px;padding:5px 10px;line-height:1}.round-score>span{font-size:21px}.round-score strong{background:#344347;border-radius:8px;flex:1;text-align:center;font-size:37px;padding:3px}.score-panel{background:#18272a;border-radius:9px;padding:9px 7px;text-align:center}.score-panel h2{font-size:30px;margin:0 0 10px;min-height:37px}.score-panel h2 small{font-size:16px;margin-left:5px}.equation{display:flex;gap:4px;align-items:center;justify-content:center}.equation strong{border-radius:9px;font-size:45px;line-height:1;padding:9px 3px;min-width:0;flex:1}.equation>b{color:var(--red);font-size:40px}.chips{background:#0089e2;box-shadow:inset 0 -4px #005bb5}.mult{background:#fa443e;box-shadow:inset 0 -4px #b52d30}.score-panel p{font-size:12px;min-height:17px;margin:6px 0 0;color:#cbd1cb}.run-stats{display:grid;grid-template-columns:80px 1fr 1fr;gap:7px}.tall{grid-row:span 2;font-size:22px;padding:10px 2px}.stat,.cash{border-radius:9px;background:#263739;border:5px solid #19282b;text-align:center;padding:3px}.stat>small{display:block;font-size:17px}.stat>strong{display:block;font-size:36px;line-height:1}.stat strong small{font-size:18px;margin-left:2px;color:#fff}.cash{grid-column:span 2;color:#f5be58;font-size:43px;line-height:1.2}.seed{font-size:13px;text-align:center;opacity:.6;margin-top:8px}.table{position:relative;padding:clamp(20px,99.2px,80px) 25px 35px;display:flex;flex-direction:column;min-width:0}.inventory{display:grid;grid-template-columns:minmax(0,2.6fr) minmax(0,1fr);gap:14px;flex-shrink:0;height:165px}.joker-zone,.consumable-zone{position:relative;background:#163f3538;border-radius:14px;padding:5px 7px}.joker-row,#consumables{display:flex;justify-content:center;gap:8px;align-items:center;height:100%}.capacity{position:absolute;bottom:-20px;left:6px;font-size:17px}.consumable-zone .capacity{left:auto;right:5px}.sprite{display:block;position:relative;width:100px;aspect-ratio:71/95;background-repeat:no-repeat;image-rendering:auto;flex-shrink:0}.card-face{position:absolute;inset:0;width:100%;height:100%}.art-button{background:none;padding:0;box-shadow:none!important;flex-shrink:0}.art-button:hover .sprite{filter:drop-shadow(0 7px 4px #0005)}.owned-card{min-width:0;flex:0 1 100px}.owned-card .sprite{width:100%;max-width:100px}.stage{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:450px;padding:35px 65px 15px 5px;gap:14px}.stage-heading{text-align:center}.stage-heading h2{font-size:32px;margin:5px 0}.stage-heading p{font-size:15px;margin:4px 0 14px}.blind-row{display:flex;gap:15px;width:100%;align-items:stretch}.blind-choice{flex:1;min-width:0;border:4px solid #1c302f;border-radius:14px;background:#31564f;padding:12px 8px;text-align:center;box-shadow:0 7px #163530;display:flex;flex-direction:column;align-items:center;gap:8px}.blind-choice.active{background:#385f5b;border-color:#e9a748}.blind-choice h3{font-size:24px;margin:0 0 5px}.blind-choice .blind-chip{margin:8px auto}.blind-choice p{font-size:15px;margin:0}.blind-choice .rule{min-height:42px;font-size:12px}.blind-choice button{width:100%;padding:8px 4px;font-size:20px}.blind-choice small{font-size:11px;line-height:1.4;margin-top:5px}.target-number{font-size:33px;color:var(--red)}.status{margin:auto 0;color:#b7c8bc;padding:14px 0;font-size:17px}.play-area{width:100%;align-self:stretch;margin-top:auto;margin-bottom:35px}.last-result{text-align:center;color:#e8e5d5;min-height:45px;font-size:25px;animation:appear .3s}.hand-row{min-height:220px;display:flex;align-items:flex-end;justify-content:center;padding:40px 0 20px}.hand-card{position:relative;isolation:isolate;z-index:0;background:transparent;padding:0;box-shadow:none!important;margin:0 -6px;transform:rotate(var(--tilt));border-radius:7px;flex:0 1 108px;min-width:0;transition:transform .15s;filter:drop-shadow(1px 5px 1px #102e2680)}.hand-card .sprite{width:100%}.hand-card:hover:not(:disabled){transform:translateY(-12px) rotate(var(--tilt));z-index:0}.hand-card.selected{transform:translateY(-28px) rotate(var(--tilt));z-index:0}.hand-card:disabled{opacity:1;filter:none}.debuffed .card-face{filter:grayscale(1) brightness(.7)}.debuff-mark{position:absolute;inset:20%;font-size:65px;color:#ff5a4e}.hand-count{text-align:center;margin:3px 0 12px;font-size:18px}.hand-actions{display:flex;justify-content:center;gap:10px;align-items:stretch}.hand-actions>button{min-width:135px;font-size:25px}.sorting{background:#2b5146;border:4px solid #ccd4ca;border-radius:12px;display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:3px 5px 7px;min-width:135px}.sorting small{grid-column:span 2;text-align:center;font-size:16px}.sorting button{font-size:16px;padding:5px 8px}.keyboard-hint{font-size:12px;text-align:center;margin:17px 0 0;opacity:.5}.deck-pile{position:absolute;right:20px;bottom:45px;text-align:center;font-size:17px}.deck-pile .sprite{width:90px;box-shadow:-3px 4px #b7b5b2,-6px 8px #878785,-9px 12px #525b56;transform:rotate(4deg);margin-bottom:18px}.deck-pile>span{display:block}.subtle{padding:3px;background:none;box-shadow:none;font-size:12px;color:#d3e0d2}.shop-top,.shop-bottom{display:flex;gap:20px;justify-content:center;width:100%;border:4px solid #a76136;background:#213b33ad;border-radius:15px;padding:15px;box-shadow:0 5px #403e2a}.shop-top{align-items:center}.shop-controls{display:flex;flex-direction:column;gap:15px;flex:1;min-width:100px}.shop-controls button{padding:16px 10px}.stock-row,.pack-choices{display:flex;justify-content:center;gap:20px;flex:3}.stock-card{display:flex;flex-direction:column;align-items:center;max-width:160px;flex:1;min-width:0;text-align:center;gap:7px}.stock-card>.sprite{width:100%;max-width:105px;filter:drop-shadow(2px 5px 2px #0005);transition:transform .15s}.stock-card:hover>.sprite{transform:translateY(-4px)}.stock-card strong{font-size:17px}.stock-card small{font-size:11px;line-height:1.5;min-height:30px;color:#e3e4d9}.stock-card button{margin-top:auto;width:100%;font-size:18px;padding:8px 6px}.stock-card.sold>.sprite{opacity:.25}.pack-choices{align-items:stretch;width:100%;padding:25px 10px}.pack-choices>.stock-card{max-width:170px}.pack-choices>.stock-card>.sprite{max-width:140px}.receipt{width:360px;background:#223634;border:5px solid #bacac0;border-radius:17px;box-shadow:0 7px #1c3c34;padding:20px}.receipt-row{display:flex;justify-content:space-between;border-bottom:2px dashed #778b7e;padding:15px 5px;font-size:23px}.receipt>button{width:100%;margin-top:25px;font-size:30px}
.menu{position:absolute;inset:0;background:radial-gradient(ellipse at 40% 50%,#31526bf5,#193e37f9);z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:45px;min-height:700px}.logo{font-family:Balatro,sans-serif;font-size:110px;letter-spacing:10px;transform:rotate(-6deg);text-shadow:0 6px #af392f,0 12px #18302a}.logo span{font-size:18px;display:block;letter-spacing:5px;text-align:right;margin-top:5px}.menu-card{background:#273b3d;border:5px solid #566c6d;border-radius:16px;padding:20px 25px;box-shadow:0 8px #162e2a;width:390px;display:flex;flex-direction:column;gap:13px}.menu-card h2{font-size:27px;text-align:center;margin:0 0 8px}.menu-card label{font-size:15px;display:flex;flex-direction:column;gap:6px}.menu-card select,.menu-card input{font-size:16px;padding:8px;background:#142a27;border:2px solid #4c6962;border-radius:6px;width:100%;color:white}.menu-card button{font-size:23px}.toast{position:fixed;left:50%;bottom:20px;z-index:40;background:#e6e4d4;color:#213832;text-shadow:none;box-shadow:0 5px #152d29;border-radius:10px;padding:12px 25px;transform:translate(-50%,20px);opacity:0;pointer-events:none;transition:.2s;font-size:19px}.toast.show{opacity:1;transform:translate(-50%,0)}dialog{background:#253b3c;color:#fff;border:5px solid #7c9793;border-radius:18px;box-shadow:0 8px #153630;width:min(900px,1785.6px);max-height:1054px;padding:20px;text-shadow:1px 2px #172a29}dialog::backdrop{background:#071c1ed9}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.modal-head h2{margin:0;font-size:30px}.modal-head button{padding:3px 15px;font-size:28px}.level-row{display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr;gap:8px;border-bottom:2px solid #49625c;padding:10px;font-size:21px}.level-row small{font-size:13px}.collection-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(71px,1fr));gap:15px;padding:10px}.collection-grid .sprite{width:100%}.owned-detail{text-align:center}.owned-detail>.sprite{width:125px;margin:auto}.owned-detail button{margin:8px}.options-content{display:flex;flex-direction:column;gap:15px}.small-print{font-size:15px;line-height:1.7}
@keyframes appear{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.game{grid-template-columns:310px 1fr}.sidebar{padding-left:15px;padding-right:15px}.inventory{height:180px}.owned-card .sprite{max-width:112px}.owned-card{flex-basis:112px}.hand-card{flex-basis:130px}.stage{padding-right:100px}.hand-row{min-height:260px}.deck-pile .sprite{width:105px}
body[data-mode="pack"]{background:#7d4d0b}body[data-mode="pack"] .felt{background:repeating-radial-gradient(ellipse at 70% 40%,#0000 0 35px,#df8c0c99 50px 85px,#372f2044 105px 140px)}body[data-mode="shop"] .sidebar{border-right-color:var(--red)}body[data-mode="pack"] .sidebar{border-right-color:var(--orange)}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
/* Explicit dimensions prevent the owned-card button and its percent-width sprite
   from shrinking each other to zero before a background image can paint. */
.inventory{--inventory-card-width:100px;position:relative;z-index:4;overflow:visible}
/* Native popups draw after the card areas. Contain scene card z-indices so
   selected shop/pack cards cannot paint over inventory descriptions/actions. */
.stage{isolation:isolate}
.joker-zone,.consumable-zone,.joker-row,#consumables{min-width:0;overflow:visible}
/* Native card areas reserve their own width; card count only changes the
   distance between faces, never the size of the area or the cards. */
.joker-row,#consumables{position:relative;display:block;width:100%}
/* CardArea:draw paints complete cards in array order. Equal stacking levels
   preserve that order and contain editions, legendary faces and stickers;
   hover/selection can then raise the whole card above its neighbours. */
.owned-card{position:absolute;left:calc((100% - var(--inventory-card-width)) * var(--inventory-position,.5));top:calc(50% - var(--inventory-card-width) * 95 / 71 / 2);width:var(--inventory-card-width);max-width:none;height:calc(var(--inventory-card-width) * 95 / 71);display:block;z-index:0;isolation:isolate}
.owned-card .art-button{display:block;width:var(--inventory-card-width);height:calc(var(--inventory-card-width) * 95 / 71);padding:0}
.owned-card .art-button .sprite{width:var(--inventory-card-width);height:calc(var(--inventory-card-width) * 95 / 71);max-width:none}
.owned-card:hover,.owned-card:focus-within{z-index:15}
.inventory-space-alert{position:absolute;inset:-8px;z-index:40;display:flex;align-items:center;justify-content:center;pointer-events:none;border-radius:18px;background:#374244b3;color:#fff;text-align:center;font-size:52px;line-height:1.15;text-shadow:3px 5px #172024}
.inventory-space-alert strong{white-space:nowrap;animation:inventory-no-space .22s ease-out}
@keyframes inventory-no-space{from{transform:scale(.75) rotate(-3deg)}60%{transform:scale(1.08) rotate(1deg)}to{transform:scale(1)}}
.stage[data-mode="shop"]{justify-content:center;padding-top:55px}
.shop-frame{width:100%;background:#192a2c;border:4px solid #dc4c43;border-bottom-color:#142325;border-radius:17px;padding:12px;box-shadow:0 8px #122124}
.shop-frame .shop-top{display:grid;grid-template-columns:minmax(100px,25%) minmax(0,1fr);gap:12px;border:0;box-shadow:none;background:none;padding:0;align-items:stretch}
.shop-frame .shop-controls{display:flex;flex-direction:column;justify-content:center;gap:10px;padding:0 0 12px}
.shop-frame .shop-controls button{min-height:80px;padding:12px 6px;font-size:25px}
.shop-frame .stock-row{display:flex;justify-content:center;gap:18px;min-height:235px;padding:22px 14px 8px;background:#3a5058;border-radius:12px;overflow:visible;align-items:center}
.shop-frame .shop-bottom{display:grid;grid-template-columns:1fr 1fr;gap:15px;padding:0;margin-top:22px;width:100%;background:none;border:0;box-shadow:none;align-items:stretch}
.voucher-tray,.booster-tray{position:relative;display:flex;align-items:center;justify-content:center;gap:18px;min-height:230px;padding:20px 12px 8px;border-radius:13px;background:#3a5058;overflow:visible}
.voucher-tray{border:6px solid #354c52;background:#172a2e}
.voucher-label{position:absolute;left:3px;top:50%;writing-mode:vertical-rl;transform:translateY(-50%);color:#63777a;font-size:14px;letter-spacing:2px}
.stock-card{position:relative;isolation:auto;display:flex;flex-direction:column;align-items:center;flex:0 1 115px;width:115px;min-width:65px;max-width:135px;gap:0;padding:0;text-align:center}
.stock-price{position:absolute;z-index:1;bottom:100%;left:50%;transform:translateX(-50%);background:#26383c;border:3px solid #121e23;border-radius:9px 9px 0 0;padding:1px 13px;color:#f5bb4c;font-size:26px;line-height:1.2;white-space:nowrap}
.stock-card .stock-pick{position:relative;display:block;background:none;padding:0;width:100%;margin:0;box-shadow:none;z-index:2;border-radius:7px;transform:none}
.stock-card .stock-pick .sprite{width:100%;max-width:none;aspect-ratio:71/95;filter:drop-shadow(2px 5px 1px #14202b)}
.stock-card.selected{transform:translateY(-8px);z-index:6}
.stock-card .stock-pick:hover:not(:disabled){transform:rotate(-2deg) scale(1.03)}
.stock-action{height:35px;width:100%;display:flex;justify-content:center}
.stock-card .stock-buy{font-size:21px;padding:2px 10px;min-width:65px;width:auto;margin:0;line-height:1;z-index:3;border-radius:0 0 7px 7px}
.stock-tooltip{display:none;position:absolute;right:calc(100% + 12px);left:auto;top:10px;width:185px;padding:7px;background:#344147;border:3px solid #d2d5d2;box-shadow:0 5px #132626;border-radius:12px;z-index:30;pointer-events:none;line-height:1.4}
/* Card:stop_hover clears the popup even when the card stays selected.
   Price and purchase actions are outside the card face's hover target. */
.stock-card>.stock-pick:hover+.stock-tooltip,.stock-card>.stock-pick:focus-visible+.stock-tooltip{display:block}
.stock-tooltip .tooltip-name{display:block;font-size:24px;font-family:Balatro,BalatroCN,sans-serif;color:#fff;margin:0 0 8px}
.stock-tooltip .tooltip-effect{display:block;font-size:16px;min-height:48px;background:#fff;color:#343e3f;text-shadow:none;border-radius:8px;padding:12px 7px;margin:0;line-height:1.6}
.stock-tooltip .rarity{display:block;border-radius:8px;margin-top:7px;padding:3px;font-size:20px;font-style:normal;color:white;background:#008de4;min-height:0}
.stock-tooltip .rarity-2{background:#36a34f}.stock-tooltip .rarity-3{background:#d94639}
.pack-choices .stock-card{width:150px;flex-basis:150px;max-width:160px}.pack-choices .stock-action{height:40px}
.shop-sign{display:none}body[data-mode="shop"] .shop-sign,body[data-mode="pack"] .shop-sign{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:185px;background:#1b2b2d;border:4px solid #ed4b40;border-radius:10px;padding:10px 3px}
.shop-sign-art{display:block;width:95%;aspect-ratio:113/57;background:url('./assets/ShopSignAnimation.png') left top/400% 100% no-repeat;image-rendering:pixelated}
.shop-sign small{font-size:22px;color:#f8d47c;margin-top:5px}
body[data-mode="shop"] .blind-panel,body[data-mode="pack"] .blind-panel{display:none}
.inventory{--inventory-card-width:112px}.stock-card{width:135px;flex-basis:135px}.shop-frame .stock-row{min-height:260px}.voucher-tray,.booster-tray{min-height:255px}


.stage[data-mode="shop"]>.stage-heading{display:none}
/* Match native texture_scaling=2: 2x atlases with linear filtering.
   Keep the same logical sprite grid and card dimensions when scaling. */
.playing-art{overflow:hidden;background-color:transparent;border-radius:0}
.sprite.enhancement-steel,.sprite.holo,.sprite.polychrome{filter:none}
.sprite.foil{box-shadow:none}
.modifier-label{background:#b8c9cf}
.playing-art>.card-face{z-index:1}
.playing-art.enhancement-stone .card-face{display:none}
.card-seal{position:absolute;inset:0;width:100%;height:100%;z-index:6;pointer-events:none}
.card-sticker{position:absolute;inset:0;width:100%;height:100%;z-index:7;pointer-events:none}
.edition-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;image-rendering:inherit}
.edition-rendered{background-image:none!important}
.edition-rendered>.card-face{visibility:hidden}
.stock-tooltip .modifier-info,.joker-tooltip .modifier-info,.owned-detail .modifier-info{display:block;margin-top:6px;border-radius:5px;overflow:hidden;background:#203337}
.modifier-label{display:block;color:#17272a;padding:2px 4px;font-size:14px;text-shadow:none}
.modifier-desc{display:block;padding:3px 4px;font-size:12px;line-height:1.3;color:#eff4ea}
.hand-card>.stock-tooltip{top:auto;bottom:calc(100% + 10px);left:50%;right:auto;transform:translateX(-50%);width:180px}
.hand-card:hover>.stock-tooltip,.hand-card:focus-within>.stock-tooltip{display:block}
.stage[data-mode="scoring"]{display:grid;grid-template-rows:minmax(220px,1fr) auto;width:100%;padding-top:65px}
.stage[data-mode="scoring"]>.play-area{grid-row:2;margin:0}
.score-playback{position:relative;z-index:9;grid-row:1;display:flex;align-items:center;justify-content:center;gap:clamp(8px,39.68px,28px);width:min(100%,820px);margin:0 auto;pointer-events:none}
.score-card{position:relative;width:clamp(92px,198.4px,142px);flex:0 1 142px;filter:drop-shadow(3px 10px 3px #102e2680);transition:transform .22s ease,filter .22s ease;opacity:.72}
.score-card>.sprite{width:100%;border-radius:5px}
.score-card.scoring-active{transform:translateY(-22px) scale(1.1);z-index:12;opacity:1;filter:drop-shadow(0 12px 9px #091c18bb) brightness(1.08)}
.score-card.scoring-active>.stock-tooltip{display:block;top:auto;bottom:calc(100% + 15px);left:50%;right:auto;transform:translateX(-50%);width:190px}
.score-card:not(.scoring-active){transform:translateY(4px) scale(.96)}

.pack-footer{display:flex;align-items:center;justify-content:center;gap:20px;width:100%;position:relative}
.pack-footer .stage-heading{background:#1d3032;border:4px solid #d84d42;border-radius:10px;padding:6px 30px;min-width:330px;order:0}
.pack-footer .stage-heading h2{font-size:28px;margin:0}.pack-footer .stage-heading p{font-size:19px;margin:0}
.pack-skip{background:#344b51;padding:16px 34px;font-size:25px;box-shadow:0 5px #1a2a2e}
body[data-mode="pack"] .pack-choices{padding-top:15px}
body[data-mode="pack"] .stage{justify-content:flex-end}
body[data-mode="pack"] .pack-choices{flex:1;align-items:flex-end}
body[data-mode="pack"] .pack-footer{padding-bottom:5px}
body[data-pack="card"]{background:#a93426}body[data-pack="card"] .felt{background:repeating-radial-gradient(ellipse at 70% 40%,#0000 0 35px,#dc4e3f99 50px 85px,#372f2044 105px 140px)}

/* Balatro splash menu */
.menu{position:fixed;inset:0;min-height:0;overflow:hidden;display:block;justify-content:initial;gap:0;background:#17292c;isolation:isolate}
.menu-backdrop{position:absolute;inset:0;width:100%;height:100%;z-index:0;background:radial-gradient(ellipse at 45% 48%,#0757a9 0 23%,#b71f2d 56%,#091719 100%)}
.menu::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;background:repeating-linear-gradient(transparent 0 3px,#071c1b28 4px 5px),radial-gradient(ellipse at center,transparent 48%,#0007 100%)}
.menu-version{position:absolute;right:4.5%;top:8.5%;z-index:3;font-size:clamp(15px,19.84px,24px);text-shadow:2px 3px #202b33}
.menu-main{position:absolute;inset:0;z-index:3}
.menu-brand{position:absolute;left:50%;top:3%;width:min(1289.6px,900px);aspect-ratio:333/216;transform:translateX(-50%);background:url('./assets/balatro.png') center/contain no-repeat;image-rendering:pixelated;filter:drop-shadow(6px 9px 0 #243137)}
.menu-social{position:absolute;right:6.1%;bottom:21%;display:flex;gap:10px}
.menu-social button{width:64px;height:64px;padding:0;border:4px solid #26393d;border-radius:10px;background:#1475a8;font-size:30px;line-height:1}
.menu-social .social-x{background:#101718;font-family:Arial,sans-serif;font-size:38px}
.menu-bottom{position:absolute;left:5%;right:5%;bottom:8%;height:17%;display:flex;align-items:stretch;gap:3.5%;}
.menu-bottom button{border:5px solid #263b40;border-radius:16px;box-shadow:0 7px #12292d,inset 0 3px #ffffff36;font-size:clamp(20px,44.64px,45px);}
.profile-card{width:13%;min-width:120px;background:#56666b;display:flex;flex-direction:column;justify-content:center;gap:12px;padding:9px!important;font-size:clamp(18px,29.76px,30px)!important}
.profile-card small{font-size:.75em}.profile-card strong{background:#75858a;border-radius:8px;padding:8px}
.menu-actions{flex:1;display:flex;gap:1%;align-items:center;padding:8px 0}
.menu-actions button{height:100%;flex:1;padding:8px 10px}.menu-actions .menu-play{flex:1.45;font-size:clamp(28px,67.456px,68px)}
.menu-actions button:last-child{flex:1.4}
.menu-bottom .language-button{width:14%;min-width:150px;align-self:center;height:75%;background:#33454c;font-size:clamp(15px,24.8px,26px);padding:8px}
.language-button span{display:inline-block;background:#26383c;padding:3px 7px;border-radius:5px;margin-right:5px}
.run-setup{position:absolute;left:50%;top:50%;z-index:3;transform:translate(-50%,-50%);width:min(1000px,1071.36px);height:min(1010px,1041.6px);min-height:610px;padding:32px 22px 18px;background:#20363ddd;border:6px solid #79888a;border-radius:20px;box-shadow:0 8px #12262b,inset 0 0 0 3px #263f46;display:flex;flex-direction:column;gap:23px}
.setup-tabs{height:70px;display:flex;justify-content:center;gap:12px;flex-shrink:0}
.setup-tabs button{flex:1;max-width:230px;border:3px solid #26383c;border-radius:12px;padding:5px;font-size:clamp(19px,33.728px,34px);box-shadow:0 5px #172a2e}
.setup-tabs button:not(.active){filter:brightness(.8)}.setup-tabs button.active{transform:translateY(-2px);filter:brightness(1.08)}
.setup-new,.setup-continue,.setup-challenges{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:20px}
.deck-picker{width:90%;height:34%;min-height:190px;display:flex;align-items:stretch;gap:10px}
.deck-arrow{width:8%;min-width:42px;background:#ef3038;border:3px solid #28383a;border-radius:12px;font-size:52px;padding:0;line-height:1}
.deck-preview{flex:1;display:flex;align-items:center;justify-content:center;gap:3%;padding:14px;background:#1b2e34;border:5px solid #101c22;border-radius:14px;box-shadow:0 8px #101c22;position:relative;min-width:0}
.deck-back-preview{height:88%;aspect-ratio:0.68;border:8px solid #e8e3da;border-radius:9px;background-color:#e6383d;box-shadow:0 7px #596266,inset 0 0 0 5px #fbf7ec;position:relative;flex-shrink:0;overflow:hidden}
.deck-back-preview::before{content:"";position:absolute;inset:7px;background:repeating-linear-gradient(45deg,transparent 0 7px,#fff9 8px 10px,transparent 11px 17px),repeating-linear-gradient(-45deg,transparent 0 10px,#fff8 11px 13px,transparent 14px 20px);border:3px dotted #fff}
.deck-back-preview::after{content:"♠";position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:clamp(30px,79.36px,68px);text-shadow:2px 3px #a31e2d}
.deck-back-preview.deck-blue{background-color:#1499ea}.deck-back-preview.deck-yellow{background-color:#e9b933}
.deck-description{width:64%;height:82%;border-radius:12px;background:#263b43;box-shadow:inset 0 0 0 5px #15252b;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:15px 10px;min-width:0}
.deck-description strong{font-size:clamp(19px,35.712px,36px);text-align:center}.deck-description>span{width:100%;height:62%;display:grid;place-content:center;text-align:center;background:#f5f4ec;color:#23353b;text-shadow:none;border-radius:9px;font-size:clamp(16px,26.784px,27px);line-height:1.25;box-shadow:0 5px #a9afb0}
.stake-picker{width:90%;height:19%;min-height:110px;display:flex;align-items:stretch;gap:10px}
.stake-arrow{width:8%;background:#111d20;border:3px solid #1a2c31;padding:0;font-size:42px}.stake-arrow:disabled{opacity:.85}
.stake-preview{flex:1;display:flex;align-items:center;justify-content:center;gap:20px;padding:10px;background:#1c3036;border:5px solid #111f24;border-radius:12px;box-shadow:0 7px #111d20}
.stake-icon{font-size:clamp(42px,99.2px,78px);color:#dce2e1;text-shadow:2px 3px #53676b}
.stake-preview>div{flex:1;display:flex;flex-direction:column;text-align:center;gap:8px}.stake-preview strong{font-size:clamp(19px,29.76px,30px)}.stake-preview>div span{background:#f1f0e9;color:#34454a;text-shadow:none;padding:14px;border-radius:10px;font-size:clamp(16px,24.8px,25px)}
.setup-seed{width:90%;min-height:42px;display:flex;justify-content:center;align-items:center;gap:14px;font-size:18px}.setup-seed label{display:flex;align-items:center;gap:8px}.setup-seed input[type=checkbox]{width:26px;height:26px;accent-color:#1499ea}.setup-seed input:not([type=checkbox]){width:180px;padding:7px;border:2px solid #52676d;border-radius:8px;background:#172a30;color:#fff;display:none}.setup-seed:has(input[type=checkbox]:checked) input:not([type=checkbox]){display:block}
.setup-play{width:47%;min-height:84px;font-size:clamp(32px,59.52px,60px);border:4px solid #203b48;box-shadow:0 7px #132832!important}
.setup-back{width:100%;min-height:54px;padding:7px;background:#f19a00;border:3px solid #3e3930;border-radius:10px;font-size:clamp(21px,33.728px,34px);flex-shrink:0}
.setup-continue{justify-content:flex-start;padding-top:4%;gap:6%}.continue-preview{height:36%;flex:none;width:72%}.continue-preview .deck-description{height:85%}.continue-marker{position:absolute;right:10px;bottom:8px;color:#fff;border:3px solid #fff;border-radius:4px;width:30px;height:22px;text-align:center;line-height:17px}.continue-stats{font-size:clamp(16px,27.776px,26px)!important}
.continue-stake{width:72%;height:17%;flex:none}.setup-challenges{justify-content:center}.challenge-placeholder{text-align:center;font-size:30px;line-height:2}.challenge-placeholder small{font-size:17px;display:block}


.menu-brand{width:min(1289.6px,1300px);top:8%}
.menu-ace{position:absolute;left:41%;top:29%;width:18%;aspect-ratio:71/95;background:url('./assets/Enhancers.png?v=cards-2x-1') 16.666667% 0/700% 500%;transform:rotate(-2deg);border-radius:5px;box-shadow:2px 5px 0 #142624;image-rendering:auto}
.menu-ace>span{position:absolute;inset:0;background:url('./assets/8BitDeck.png?v=cards-2x-1') 100% 100%/1300% 400%}
.menu-main.setup-open{filter:brightness(.46) saturate(.7);pointer-events:none}
.menu:has(.run-setup:not(.hidden)) .menu-backdrop{filter:brightness(.6) saturate(.65)}
.menu-social a{display:grid;place-items:center;width:64px;height:64px;border:4px solid #26393d;border-radius:10px;background-color:#1475a8;text-decoration:none;color:white;box-shadow:0 5px #12292d;image-rendering:pixelated}
.menu-social .social-discord{background-image:url('./assets/icons.png');background-size:400% 400%;background-position:0 0}
.menu-social a.social-x{font-family:Arial,sans-serif;font-size:44px;background:#101718}
.deck-back-preview,.deck-back-preview.deck-red{border:0;background:url('./assets/Enhancers.png?v=cards-2x-1') 0 0/700% 500%;border-radius:4px;image-rendering:auto;box-shadow:0 7px #596266}
.deck-back-preview.deck-blue{background:url('./assets/Enhancers.png?v=cards-2x-1') 0 50%/700% 500%}
.deck-back-preview.deck-yellow{background:url('./assets/Enhancers.png?v=cards-2x-1') 16.666667% 50%/700% 500%}
.deck-back-preview::before,.deck-back-preview::after{content:none}
.setup-tab{position:relative}.setup-tab.active::before{content:"";position:absolute;bottom:calc(100% + 12px);left:calc(50% - 12px);border-left:12px solid transparent;border-right:12px solid transparent;border-top:22px solid #ff4c40;filter:drop-shadow(1px 3px #17292c)}
.stake-icon{width:58px;height:58px;font-size:0;background:url('./assets/chips.png') 0 0/500% 200%;image-rendering:pixelated;flex-shrink:0}
.continue-preview .deck-description>span{white-space:pre-line;text-align:left}

.menu-actions{background:#253c43;border:7px solid #22383f;border-radius:14px;box-shadow:0 7px #11262c;gap:10px;padding:8px}
.run-setup{width:min(1000px,1031.68px);height:1066.4px;min-height:0;max-height:1010px;border-color:#dce2df;background:#20363df2}
.setup-tabs{height:8%;min-height:45px;margin:1% 0 2%}
.setup-play{position:relative;margin-top:auto}.setup-new .setup-seed{position:absolute;left:8%;bottom:17%;width:20%;min-height:50px;z-index:1;flex-direction:column;align-items:flex-start;font-size:clamp(12px,19.84px,20px)}
.setup-new>.setup-play{margin-bottom:3%}.setup-new .deck-picker{height:40%;min-height:170px}.setup-new .stake-picker{height:21%;min-height:95px}.setup-continue .setup-play{margin-bottom:3%}



/* Deck carousel details visible in the native New Run / Continue cards. */
.deck-page-dots{display:flex;justify-content:center;gap:7px;height:15px;flex-shrink:0;margin-top:-5px}
.deck-page-dots button{appearance:none;width:10px;height:10px;min-width:0;padding:0;border:0;border-radius:50%;background:#15282c;box-shadow:inset 1px 1px #081619;cursor:pointer}
.deck-page-dots button.active{background:#f5f5e9;box-shadow:none}
.stake-index-dots{position:absolute;right:-27px;top:12px;bottom:12px;width:16px;display:flex;flex-direction:column;justify-content:space-between;align-items:center;pointer-events:none}
.stake-index-dots i{display:block;width:12px;height:12px;border-radius:50%;background:#304348;box-shadow:inset 1px 1px #172629}
.stake-index-dots i:last-child{background:#f4f4e9;box-shadow:none}
.continue-preview .deck-description>span{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:6px;padding:22px 28px;text-align:left;font-size:clamp(15px,24.8px,25px);line-height:1.25}
.continue-preview .deck-description>span b{font-weight:400}
.stat-red{color:#f0443e}.stat-blue{color:#168ce4}.stat-orange{color:#f4a51d}
.setup-continue .deck-page-dots{margin-top:-3px}
.setup-continue .continue-stake{margin-top:4px}

/* Native run setup uses a fixed logical room: deck carousel, its index,
   stake carousel, and the seed/play row retain their positions at every zoom. */
.run-setup{width:990px;height:1000px;max-height:none;padding:0;gap:0}
.setup-tabs{position:absolute;left:14%;right:14%;top:44px;height:74px;min-height:0;margin:0}
.setup-tabs button{max-width:none}
.setup-new{position:absolute;inset:158px 20px 122px;display:block}
.setup-new .deck-picker{position:absolute;left:8%;top:-11px;width:84%;height:316px;min-height:0}
.setup-new .deck-preview{margin:12px 0 24px;padding:12px 56px 12px 12px;gap:20px}
.setup-new .deck-back-preview{height:238px;width:calc(238px * 71 / 95);aspect-ratio:71/95}
.setup-new .deck-description{width:auto;flex:1;height:100%;padding:12px 7px;box-shadow:none}
.deck-description>span{display:block;align-content:center;font-size:27px;line-height:1.15;box-shadow:none}
.setup-new .deck-description>span{height:70%}
.deck-description>span b,.stake-description b{font-weight:400}
.deck-description>strong{font-size:36px;line-height:1.25}
.deck-description>.deck-effect-green,.deck-description>.deck-effect-zodiac{font-size:22px}
.deck-description>.deck-effect-black{font-size:25px;line-height:1}
.purple-text{color:#a264d6}
.setup-new>.deck-page-dots{position:absolute;left:0;right:0;top:298px;height:10px;margin:0;gap:4px}
.deck-page-dots button{width:10px;height:10px}
.deck-page-dots button:disabled{opacity:1;cursor:default}
.deck-stake-column{position:absolute;right:10px;top:16px;bottom:16px;width:38px;display:flex;flex-direction:column;justify-content:space-between;align-items:center}
.deck-stake-column button{appearance:none;display:block;flex:none;min-width:0;width:36px;height:18px;padding:0;border:3px solid transparent;border-radius:5px;background:#ffffff19;background-clip:content-box;box-shadow:none;cursor:pointer}
.deck-stake-column button.active{outline:3px solid #f3f3e9;outline-offset:0;background:#ffffff19;box-shadow:none}
.deck-stake-column button:disabled{opacity:1;cursor:default}
.setup-new .stake-picker{position:absolute;left:8%;top:336px;width:84%;height:168px;min-height:0}
.stake-arrow{width:8%;min-width:42px;background:#ef3038;border:3px solid #28383a;border-radius:12px;font-size:52px;padding:0;line-height:1}
.stake-preview{min-width:0;gap:14px;padding:6px 8px}
.stake-preview>.stake-icon{width:90px;height:90px}
.stake-description{align-self:stretch;min-width:0;background:#30494f;border-radius:10px;gap:0!important}
.stake-description>strong{font-size:28px;line-height:1.2;padding:0 4px}
.stake-preview .stake-description>span{flex:1;display:block;align-content:center;line-height:1.05;padding:4px 7px;font-size:27px}
.stake-description small{font-size:20px;color:#89918b}
.stake-description .stake-cumulative{display:block;font-size:20px;color:#34454a;line-height:1.1}
.stake-page-dots{position:absolute;left:0;right:0;top:513px;display:flex;justify-content:center;gap:4px;height:10px}
.stake-page-dots button{appearance:none;width:10px;height:10px;min-width:0;padding:0;border:0;border-radius:50%;background:#15282c;box-shadow:inset 1px 1px #081619}
.stake-page-dots button.active{background:#f5f5e9;box-shadow:none}
.setup-new>.setup-play{position:absolute;left:calc(50% - 225px);bottom:0;width:450px;height:100px;min-height:0;margin:0;line-height:1;font-size:60px;padding:10px}
.setup-new .setup-seed{position:absolute;left:8%;bottom:20px;width:175px;min-height:50px;gap:10px}
.setup-seed label{flex-direction:row-reverse;font-size:18px}
.setup-seed input[type=checkbox]{appearance:none;width:40px;height:40px;border:5px solid #eee;border-radius:50%;background:#172a30;cursor:pointer}
.setup-seed input[type=checkbox]:checked{background:#1499ea;box-shadow:inset 0 0 0 5px #172a30}
.setup-new .setup-seed:has(input:checked){bottom:0}
.setup-back{position:absolute;left:20px;bottom:20px;width:calc(100% - 40px);height:56px;min-height:0;margin:0}
.setup-continue{position:absolute;inset:158px 20px 122px;padding:0;gap:25px}
.continue-preview{width:72%;height:285px;padding-right:60px}
.continue-preview .deck-description{width:70%;height:100%}
.continue-preview .deck-stake-column{top:16px;bottom:16px}
.continue-stake{width:72%;height:150px}
.setup-continue>.setup-play{width:450px;height:100px;min-height:0;margin:0;line-height:1;font-size:60px}
.setup-challenges{position:absolute;inset:158px 20px 122px}


/* Native run_info uses an 8-unit tab body in the fixed logical room.
   Give the dialog content an explicit height so flex sizing never clips tips. */
dialog.run-info-modal{position:fixed;inset:50% auto auto 50%;margin:0;transform:translate(-50%,-50%) scale(var(--game-scale));transform-origin:center;width:1040px;height:980px;max-height:none;max-width:none;padding:0;background:#293b41;border:6px solid #b9bdcd;border-radius:22px;box-shadow:0 8px #5b606c,0 13px #17272dcc,inset 0 0 0 3px #1c2e34;overflow:visible}
dialog.run-info-modal[data-info-tab="blinds"]{width:1140px}
dialog.run-info-modal[data-info-tab="vouchers"]{width:940px}
dialog.run-info-modal::backdrop{background:rgba(61,80,82,.7)}
.run-info-modal>.modal-head{display:none}
.run-info-modal>#modal-content{height:100%;min-height:0}
.run-info{height:100%;display:flex;flex-direction:column;padding:44px 18px 22px;gap:40px}
.run-info-tabs{display:flex;justify-content:center;gap:14px;flex:0 0 72px;position:relative;z-index:5}
.run-info-tab{position:relative;flex:0 0 224px;min-width:0;padding:0 12px;font-size:40px;line-height:1.1;border:0;border-radius:12px;background:#ff4c40;box-shadow:0 8px #17272d;isolation:isolate}
.run-info-tab.active{filter:none}
.run-info-tab:hover:not(:disabled),.run-info-back:hover:not(:disabled){transform:none}
.run-info-tab.active::before{content:"";position:absolute;left:50%;right:auto;top:-38px;transform:translateX(-50%);border-left:14px solid transparent;border-right:14px solid transparent;border-top:26px solid #ff4c40;filter:drop-shadow(1px 3px #17292c)}
.run-info-content{flex:1;min-height:0;display:flex;justify-content:center;align-items:stretch;overflow:visible;position:relative}
.run-info-page{width:100%;min-height:0}
.run-info-hands{display:flex;align-items:center;justify-content:center}
.run-info-hand-list{display:flex;flex-direction:column;gap:6px;width:920px;padding:0;margin:0}
.run-info-hand-row{position:relative;display:grid;grid-template-columns:140px minmax(0,1fr) 238px 118px;align-items:center;height:56px;min-height:0;padding:3px 7px;background:#8b919e;border:2px solid #6e7b87;border-radius:12px;box-shadow:0 4px #1d2e33;text-align:center;color:#f7f5ef;line-height:1;text-shadow:1px 3px #4b5b60}
.run-info-hand-row:hover,.run-info-hand-row:focus-visible{z-index:8;background:#9ba3b0;transform:none;filter:none}
.run-info-level{display:inline-flex;align-items:center;justify-content:center;width:136px;height:42px;padding:0 4px;color:#263638;text-shadow:none;border:3px solid #fff;border-radius:15px;font-size:32px;white-space:nowrap}
.run-info-hand-name{font-size:34px;font-weight:400;text-align:center}
.run-info-score{display:flex;justify-content:center;align-items:center;height:46px;min-width:0;border:4px solid #101b20;border-radius:17px;background:#101b20;overflow:hidden;font-size:38px;text-shadow:1px 2px #162426;line-height:1}
.run-info-score .chips-text,.run-info-score .mult-text{flex:1;min-width:0;padding:0 6px;height:100%;display:flex;align-items:center;font-weight:400}
.run-info-score .chips-text{background:#009dff;border-radius:10px;text-align:right;justify-content:flex-end}
.run-info-score .mult-text{background:#ff4c40;border-radius:10px;text-align:left;justify-content:flex-start}
.run-info-score em{font-style:normal;color:#ff4c40;background:#101b20;padding:0 3px;font-size:32px}
.run-info-count{display:flex;align-items:center;justify-content:flex-end;gap:6px;font-size:35px;color:#fff;background:none;padding:0;min-width:0}
.run-info-count>b{display:flex;align-items:center;justify-content:center;color:#ff9800;font-weight:400;min-width:76px;height:43px;border-radius:12px;background:#26373d}
/* A lower-row tooltip opens above its row, fully inside the dialog. No
   scroll clipping: hidden poker hands still fit when discovered. */
.run-info-hand-popup{display:none;position:absolute;left:50%;right:auto;top:calc(100% + 6px);width:660px;transform:translateX(-50%);z-index:20;padding:10px 14px 16px;background:#f6f5ee;color:#263638;border:4px solid #f14c42;border-radius:16px;box-shadow:0 6px #172a2b;text-align:center;text-shadow:none;pointer-events:none}
.run-info-hand-popup.popup-above{top:auto;bottom:calc(100% + 6px)}
.run-info-hand-row:hover .run-info-hand-popup,.run-info-hand-row:focus-visible .run-info-hand-popup{display:block}
.run-info-description{display:block;font-size:29px;line-height:1.35;white-space:pre-line}
.run-info-sample{display:flex;align-items:center;justify-content:space-between;gap:0;height:172px;margin:8px 20px 0}
.run-info-sample-card{width:71px;flex:0 0 71px;transform:rotate(var(--sample-rotation));filter:drop-shadow(2px 8px #657070)}
.run-info-sample-card.sample-scoring{width:105px;flex-basis:105px}
.extra-hands .run-info-hand-list{gap:4px}
.extra-hands .run-info-hand-row{height:50px}
.extra-hands .run-info-level{height:38px;font-size:29px}
.extra-hands .run-info-score{height:40px;font-size:33px}
.extra-hands .run-info-count>b{height:38px}
.run-info-blinds{display:flex;align-items:center;justify-content:center}
.run-info-blind-list{height:660px;width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:0 16px;align-items:stretch}
.run-info-blind-card{display:flex;flex-direction:column;align-items:center;gap:0;padding:26px 20px;background:#293b41;border:8px solid #17272d;border-radius:22px;box-shadow:inset 0 0 0 5px #3d5556,0 6px #142426;text-align:center;min-width:0}
.run-info-blind-card h3{font-size:34px;line-height:1.1;margin:27px 0 20px;padding:8px 4px;width:100%;border:4px solid #665044;border-radius:15px;background:#493328;color:#fff;box-shadow:0 5px #142426}
.run-info-blind-card.blind-0 h3{background:#060d13;border-color:#1c2b33}
.run-info-blind-card.blind-1 h3{background:#725000;border-color:#b47b00}
.run-info-blind-status{width:92%;height:54px;flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0 4px;border-radius:13px;background:#ff9800;box-shadow:0 7px #a66500;font-size:35px;line-height:1.1;white-space:nowrap}
.run-info-blind-card.state-current .run-info-blind-status{background:#ff4c40;box-shadow:0 7px #9c3029}
.run-info-blind-card.state-defeated .run-info-blind-status{background:#62767b;box-shadow:0 7px #34474c}
.run-info-blind-card.state-skipped .run-info-blind-status{background:#009dff;box-shadow:0 7px #006398}
.run-info-blind-card .blind-chip{width:122px;height:122px;min-width:122px;min-height:122px;aspect-ratio:1;flex:0 0 122px;margin:0 auto 16px;border:0;font-size:0}
.run-info-boss-rule{font-size:25px;line-height:1.2;margin:0 0 8px;white-space:pre-line}
.run-info-blind-details{width:100%;padding:6px 4px;background:#101c20;border-radius:15px;min-height:126px}
.run-info-blind-details p{font-size:25px;line-height:1.2;margin:0}
.run-info-target{display:flex;align-items:center;justify-content:center;color:#ff4c40;font-size:57px;font-weight:400;line-height:1.1;white-space:nowrap}
.run-info-target .chip-icon{font-size:40px;flex-shrink:0}
.run-info-reward{display:flex;justify-content:center;align-items:center;font-size:28px;line-height:1.1;white-space:nowrap}
.run-info-reward b{color:#f5bd4e;font-weight:400}
.run-info-or{display:block;font-size:44px;line-height:1;margin:14px 0 16px}
.run-info-tag-row{position:relative;display:flex;align-items:center;justify-content:center;gap:12px;margin:0}
.run-info-tag-row .blind-tag-icon{width:70px;height:70px;flex-shrink:0}
.run-info-skip{display:flex;align-items:center;justify-content:center;height:88px;padding:5px 10px;border-radius:13px;background:#086896;font-size:28px;white-space:nowrap;box-shadow:0 6px #163a4e;cursor:default}
.run-info-tag-target{position:relative;display:block;flex:0 0 70px;outline-offset:5px}
.run-info-tag-target>.blind-tag-icon{transition:transform .15s}
.run-info-tag-target:hover>.blind-tag-icon{transform:rotate(-3deg) scale(1.05)}
/* Tag:generate_UI attaches a card_h_popup at 'cl', offset x=-0.1.
   The reward caption has no hover proxy or click action in run_info. */
.run-info-tag-tooltip{display:none;position:absolute;left:auto;right:calc(100% + 9px);top:50%;bottom:auto;transform:translateY(-50%);z-index:30;width:max-content;max-width:390px;min-width:250px;padding:7px;background:#344147;border:4px solid #d9ded8;border-radius:12px;color:#fff;line-height:1.25;text-align:center;box-shadow:0 5px #132426;pointer-events:none}
.run-info-tag-tooltip .tooltip-name{font-size:34px;margin:0 0 8px;line-height:1.1}
.run-info-tag-tooltip .tooltip-effect{font-size:26px;line-height:1.25;white-space:pre-line;padding:8px 10px;min-height:0}
.run-info-tag-target:hover>.run-info-tag-tooltip,.run-info-tag-target:focus-visible>.run-info-tag-tooltip{display:block}
.run-info-vouchers{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:34px}
.run-info-empty,.run-info-voucher-title{font-size:42px;text-align:center;line-height:1.3;margin:0}
.run-info-voucher-list{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:24px 14px;max-width:100%;padding:20px;border-radius:30px;background:#17272d}
.run-info-voucher-list.compact-vouchers{display:grid;grid-template-columns:repeat(5,148px);gap:12px 14px;padding:20px 20px 60px}
.compact-vouchers .run-info-voucher-group{height:105px;width:148px!important}
.compact-vouchers .run-info-voucher-card,.compact-vouchers .run-info-voucher-card>.sprite{width:110px}
.compact-vouchers .run-info-voucher-group:has(>:nth-child(2)) .run-info-voucher-card{flex-basis:110px;margin:0 -18px}
.run-info-voucher-group{display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.run-info-voucher-card{position:relative;width:142px;text-align:center;isolation:isolate}
.run-info-voucher-group:has(>:nth-child(2)){width:190px}
.run-info-voucher-group:has(>:nth-child(2)) .run-info-voucher-card{flex:0 0 142px;margin:0 -23px;transform:rotate(-5deg)}
.run-info-voucher-group:has(>:nth-child(2)) .run-info-voucher-card:nth-child(2){transform:rotate(5deg)}
.run-info-voucher-card>.sprite{width:142px;margin:auto;filter:drop-shadow(2px 5px #122527)}
.run-info-voucher-card:hover,.run-info-voucher-card:focus-visible{z-index:10}
.run-info-voucher-card>.stock-tooltip{top:auto;bottom:calc(100% + 12px);left:50%;right:auto;transform:translateX(-50%);width:300px;text-align:center}
.run-info-voucher-card:hover>.stock-tooltip,.run-info-voucher-card:focus-visible>.stock-tooltip{display:block}
.run-info-voucher-card .tooltip-name{font-size:35px}
.run-info-voucher-card .tooltip-effect{font-size:25px}
.run-info-back{width:100%;flex:0 0 56px;font-size:38px;line-height:1.1;padding:0 10px;margin:0;background:#ff9800;border-radius:12px;box-shadow:0 8px #17272d}

/* Native blind chip sheet: 21 animation frames, 31 blind rows. */
.blind-chip{background-image:url('./assets/BlindChips.png');background-size:2100% 3100%;background-position:0 0;border:0;box-shadow:none;image-rendering:pixelated;color:transparent;font-size:0;text-shadow:none}
.blind-chip.blind-1{background-position:0 3.333333%;border:0;background-color:transparent}.blind-chip.blind-2{background-position:0 23.333333%;border:0;background-color:transparent}
/* Blind-chip originals retain their native lettering and illustrated symbols. */
.blind-chip{background-image:url('./assets/BlindChips.png');background-color:transparent;border:0;box-shadow:none;color:transparent;font-size:0;text-shadow:none}
.blind-chip.blind-1,.blind-chip.blind-2{background-color:transparent;border:0}
.native-blind-icon{display:block;flex-shrink:0;aspect-ratio:1;image-rendering:pixelated;background-color:transparent;border:0;box-shadow:none}
/* Keep the main play action and blind selection controls inside their frames
   when the browser window is narrowed. */
.menu-actions{min-width:0}
.menu-actions button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.05;padding-left:5px;padding-right:5px}



/* Native create_UIBox_blind_select reserves the inventory above three
   fixed-width columns. blind_choice_handler raises only the active column
   by 0.7 room units; viewport scaling belongs to the whole game canvas. */
body[data-mode="blind"] .table{padding:105px 114px 86px 20px}
body[data-mode="blind"] .inventory{height:240px;grid-template-columns:minmax(0,2.15fr) minmax(0,1fr);gap:18px}
body[data-mode="blind"] .capacity{bottom:-26px;font-size:28px}
body[data-mode="blind"] .stage{display:block;position:absolute;left:32px;top:378px;width:1104px;min-height:0;padding:0}
body[data-mode="blind"] .stage-heading{display:none}
body[data-mode="blind"] .blind-row{width:1104px;height:960px;gap:48px;align-items:stretch}
body[data-mode="blind"] .blind-choice{position:relative;flex:0 0 336px;width:336px;padding:28px 14px 30px;gap:0;border:5px solid #1477d1;border-radius:18px;background:linear-gradient(180deg,#26393ddd,#1b2b2ddd);box-shadow:inset 0 0 0 4px #43565a,0 8px #142a2d;text-align:center;overflow:visible}
body[data-mode="blind"] .blind-choice>*{flex-shrink:0}
body[data-mode="blind"] .blind-choice.blind-1{border-color:#b28322}
body[data-mode="blind"] .blind-choice.blind-2{border-color:#a02a18}
body[data-mode="blind"] .blind-choice:not(.active){transform:translateY(64px);filter:brightness(.66)}
body[data-mode="blind"] .blind-choice.active{filter:none}
body[data-mode="blind"] .blind-choice>button:first-child{width:250px;height:60px;margin-bottom:20px;padding:0 12px;border:4px solid #d98600;border-radius:15px;background:#ff9400;box-shadow:0 5px #70400b;color:white;font-size:36px;line-height:1.1}
body[data-mode="blind"] .blind-choice>button:first-child:disabled{border-color:#465257;background:#37464a;box-shadow:0 5px #18282b;color:#778184}
body[data-mode="blind"] .blind-nameplate{display:flex;align-items:center;justify-content:center;width:270px;height:50px;margin:0 0 30px;padding:0 5px;border:4px solid #07589e;border-radius:14px;background:#0873c6;box-shadow:0 5px #143b5b;font-size:31px;line-height:1.15}
body[data-mode="blind"] .blind-1 .blind-nameplate{border-color:#947018;background:#c19727;box-shadow:0 5px #594719}
body[data-mode="blind"] .blind-2 .blind-nameplate{border-color:#782619;background:#a93423;box-shadow:0 5px #451d19}
body[data-mode="blind"] .blind-emblem{display:block;flex:none;width:128px;height:128px;margin:0 auto 8px;border:0;border-radius:50%;background-color:transparent;image-rendering:pixelated;filter:drop-shadow(0 5px 2px #1118)}
body[data-mode="blind"] .blind-choice>.blind-card-rule{display:flex;align-items:center;justify-content:center;width:290px;min-height:64px;padding:4px;font-size:24px;line-height:1.2;white-space:pre-line}
body[data-mode="blind"] .blind-card-details{width:100%;margin:0;padding:6px 8px;border-radius:12px;background:#142426c9;box-shadow:inset 0 0 0 2px #253b3b}
body[data-mode="blind"] .blind-card-details p{margin:0;font-size:24px;line-height:1.15}
body[data-mode="blind"] .blind-target{display:flex;align-items:center;justify-content:center;gap:8px;min-height:58px}
body[data-mode="blind"] .blind-target .chip-icon{flex:none;width:44px;height:44px;margin:0}
body[data-mode="blind"] .blind-card-details .target-number{display:block;color:#f14a48;font-size:52px;line-height:1.1;overflow-wrap:anywhere}
body[data-mode="blind"] .blind-card-details .blind-card-reward{color:#f2bd4c;font-size:28px}
body[data-mode="blind"] .blind-or{display:flex;align-items:center;justify-content:center;height:62px;margin-top:8px;font-size:46px;line-height:1.15}
body[data-mode="blind"] .blind-skip-reward{position:relative;width:100%}
body[data-mode="blind"] .blind-skip-row{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:80px;padding:8px 0}
body[data-mode="blind"] .blind-skip-row button{width:auto;flex:1;min-width:0;min-height:60px;padding:9px 8px;font-size:32px;line-height:1.1}
.blind-tag-icon,body[data-mode="blind"] .blind-tag-icon{display:block;flex:none;width:54px;height:54px;aspect-ratio:1;border:0;border-radius:0;background-color:transparent;image-rendering:pixelated;filter:drop-shadow(0 4px 1px #1118)}
body[data-mode="blind"] .blind-tag-description{display:none;position:absolute;left:50%;bottom:100%;transform:translateX(-50%);z-index:5;width:304px;margin:0 0 8px;padding:10px;background:#344147;border:4px solid #d9ded8;border-radius:12px;color:#fff;font-size:24px;line-height:1.3;pointer-events:none}
body[data-mode="blind"] .blind-skip-row:hover+.blind-tag-description,body[data-mode="blind"] .blind-skip-row:focus-within+.blind-tag-description{display:block}
body[data-mode="blind"] .boss-ante-title{margin-top:16px;color:#e5aa20;font-size:40px;line-height:1.2}
body[data-mode="blind"] .boss-ante-rule{margin:0;color:#e1e5dd;font-size:24px;line-height:1.25;white-space:pre-line}
body[data-mode="blind"] .blind-panel{display:flex;align-items:center;justify-content:center;position:absolute;left:44px;top:224px;width:444px;height:136px;background:none;border:0;box-shadow:none}
body[data-mode="blind"] .blind-panel .blind-body,body[data-mode="blind"] .blind-panel>p{display:none}
body[data-mode="blind"] .sidebar h1{background:transparent;box-shadow:none;padding:0 10px;white-space:pre-line;font-size:44px;line-height:1.4;min-height:0}
body[data-mode="blind"] .deck-pile{right:124px;bottom:80px;font-size:26px}
body[data-mode="blind"] .deck-pile .sprite{width:170px;transform:none;margin-bottom:24px}
body[data-mode="blind"] #view-deck{display:none}



/* Splash proportions matched to the native 16:10 menu capture. */
.menu-brand{top:8%;width:min(1289.6px,1300px)}
.menu-ace{left:43.8%;top:29%;width:12.5%;}
.menu-social{right:6.1%;bottom:21%;}
.menu-bottom{left:4.5%;right:4.5%;bottom:8%;height:15%;gap:2%;}
.profile-card{width:12%;min-width:0;}
.menu-actions{min-width:0;}
.menu-bottom .language-button{width:14%;min-width:0;}


/* Play table proportions follow the native hand screenshots at 16:10. */
body:is([data-mode="play"],[data-mode="lost"]) .game{max-width:none;min-height:1240px;grid-template-columns:minmax(340px,499.968px) minmax(0,1fr)}
body:is([data-mode="play"],[data-mode="lost"]) .sidebar{padding:130.2px 2.2% 74.4px;gap:13.64px;justify-content:flex-start}
body:is([data-mode="play"],[data-mode="lost"]) .blind-panel h1{font-size:clamp(28px,46.624px,45px);padding:5px}
body:is([data-mode="play"],[data-mode="lost"]) .blind-body{padding:clamp(16px,34.72px,34px) 8px 16px}
body:is([data-mode="play"],[data-mode="lost"]) .blind-panel{min-height:320px}
body:is([data-mode="play"],[data-mode="lost"]) .blind-body{padding:clamp(27px,49.6px,48px) 8px clamp(24px,37.2px,38px)}
body:is([data-mode="play"],[data-mode="lost"]) .sidebar .blind-chip{width:clamp(72px,99.2px,98px);height:clamp(72px,99.2px,98px)}
body:is([data-mode="play"],[data-mode="lost"]) .blind-body strong{font-size:clamp(32px,50.592px,49px)}
body:is([data-mode="play"],[data-mode="lost"]) .round-score{min-height:70px;padding:7px 12px}
body:is([data-mode="play"],[data-mode="lost"]) .round-score>span{font-size:clamp(20px,29.76px,29px)}
body:is([data-mode="play"],[data-mode="lost"]) .round-score strong{font-size:clamp(35px,47.616px,47px)}
body:is([data-mode="play"],[data-mode="lost"]) .score-panel{padding:12px 9px 10px;min-height:220px;display:flex;flex-direction:column;justify-content:flex-end}
body:is([data-mode="play"],[data-mode="lost"]) .score-panel h2{font-size:clamp(28px,43.648px,42px);min-height:42px;margin:auto 0 15px}
body:is([data-mode="play"],[data-mode="lost"]) .score-panel h2 small{font-size:clamp(16px,21.824px,22px)}
body:is([data-mode="play"],[data-mode="lost"]) .equation strong{font-size:clamp(43px,59.52px,58px);padding:10px 4px}
body:is([data-mode="play"],[data-mode="lost"]) .run-stats{grid-template-columns:minmax(80px,30%) repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(65px,auto));grid-template-areas:"info hands discards" "info cash cash" "options ante round";gap:8px}
body:is([data-mode="play"],[data-mode="lost"]) .run-stats{margin-top:20px}
body:is([data-mode="play"],[data-mode="lost"]) .run-stats>#run-info{grid-area:info}
body:is([data-mode="play"],[data-mode="lost"]) .run-stats>.stat:nth-of-type(1){grid-area:hands}
body:is([data-mode="play"],[data-mode="lost"]) .run-stats>.stat:nth-of-type(2){grid-area:discards}
body:is([data-mode="play"],[data-mode="lost"]) .run-stats>#options{grid-area:options}
body:is([data-mode="play"],[data-mode="lost"]) .run-stats>.cash{grid-area:cash}
body:is([data-mode="play"],[data-mode="lost"]) .run-stats>.stat:nth-of-type(4){grid-area:ante}
body:is([data-mode="play"],[data-mode="lost"]) .run-stats>.stat:nth-of-type(5){grid-area:round}
body:is([data-mode="play"],[data-mode="lost"]) .run-stats .tall{grid-row:auto;padding:8px 3px}
body:is([data-mode="play"],[data-mode="lost"]) .run-stats .tall{font-size:clamp(20px,31.744px,31px)}
body:is([data-mode="play"],[data-mode="lost"]) .stat>small{font-size:clamp(14px,22.816px,21px)}
body:is([data-mode="play"],[data-mode="lost"]) .stat>strong{font-size:clamp(32px,47.616px,47px)}
body:is([data-mode="play"],[data-mode="lost"]) .cash{font-size:clamp(38px,55.552px,54px)}
body:is([data-mode="play"],[data-mode="lost"]) .seed{font-size:12px;margin-top:0}
body:is([data-mode="play"],[data-mode="lost"]) .table{padding:99.2px 113.088px 86.8px 23.808px;min-height:1240px}
body:is([data-mode="play"],[data-mode="lost"]) .inventory{height:clamp(220px,248px,280px);grid-template-columns:minmax(0,2.15fr) minmax(0,1fr);gap:14px}
body:is([data-mode="play"],[data-mode="lost"]) .joker-zone,body:is([data-mode="play"],[data-mode="lost"]) .consumable-zone{background:#163f3527}
body:is([data-mode="play"],[data-mode="lost"]) .capacity{bottom:-22px;font-size:clamp(17px,22.816px,23px)}
body:is([data-mode="play"],[data-mode="lost"]) .stage{min-height:0;padding:0 0 0 0;gap:0;overflow:visible}
body:is([data-mode="play"],[data-mode="lost"]) .play-area{margin:0 auto 0 0;width:calc(100% - 250px);align-self:flex-start;display:flex;flex-direction:column;justify-content:flex-end;position:relative}
body:is([data-mode="play"],[data-mode="lost"]) .last-result,body:is([data-mode="play"],[data-mode="lost"]) .keyboard-hint{display:none}
body:is([data-mode="play"],[data-mode="lost"]) .hand-row{height:clamp(300px,372px,380px);min-height:0;align-items:flex-end;padding:40px 0 0;overflow:visible;width:100%;}
body:is([data-mode="play"],[data-mode="lost"]) .stage:not([data-mode="scoring"]) .play-area{transform:translateY(82px)}
body:is([data-mode="play"],[data-mode="lost"]) .stage:not([data-mode="scoring"]) .hand-row{transform:translateX(30px)}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card{flex:0 1 clamp(120px,176.576px,176px);margin:0 -12px;transform:rotate(var(--tilt)) translateY(calc(var(--fan) * 12px));transform-origin:50% 100%}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card{cursor:grab;touch-action:none;user-select:none}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card.dragging,body:is([data-mode="play"],[data-mode="lost"]) .hand-card.dragging:hover:not(:disabled){cursor:grabbing;z-index:10;transform:translate(var(--drag-x,0px),var(--drag-y,0px)) rotate(0deg);transition:none;opacity:.72}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card.dragging>.playing-tooltip{display:none}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card:not(.dragging):hover{cursor:grab}
body:is([data-mode="play"],[data-mode="lost"]) .hand-row:has(.hand-card.dragging) .hand-card{transition:transform .12s ease,filter .12s ease}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card:hover:not(:disabled){transform:translateY(-18px) rotate(var(--tilt));z-index:0}
/* CardArea:draw paints hand cards in order, including highlighted cards.
   Selection changes height only; dragging is the separate foreground pass. */
body:is([data-mode="play"],[data-mode="lost"]) .hand-card.selected{transform:translateY(-55px) rotate(var(--tilt));z-index:0}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card .sprite{width:100%}
body:is([data-mode="play"],[data-mode="lost"]) .hand-count{font-size:clamp(18px,23.808px,24px);margin:4px 0 10px}
body:is([data-mode="play"],[data-mode="lost"]) .hand-actions{gap:12px;height:clamp(78px,136.4px,112px)}
body:is([data-mode="play"],[data-mode="lost"]) .hand-actions>button{min-width:clamp(140px,222.208px,225px);font-size:clamp(23px,33.728px,34px)}
body:is([data-mode="play"],[data-mode="lost"]) .sorting{min-width:clamp(160px,222.208px,225px);padding:3px 5px 7px}
body:is([data-mode="play"],[data-mode="lost"]) .sorting small{font-size:clamp(18px,23.808px,24px)}
body:is([data-mode="play"],[data-mode="lost"]) .sorting button{font-size:clamp(16px,20.832px,21px)}
body:is([data-mode="play"],[data-mode="lost"]) .deck-pile{right:0;bottom:62px;font-size:clamp(19px,23.808px,24px)}
body:is([data-mode="play"],[data-mode="lost"]) .deck-pile .sprite{width:clamp(100px,178.56px,180px);margin-bottom:18px}
body:is([data-mode="play"],[data-mode="lost"]) #view-deck{display:none}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card .playing-tooltip{top:auto;bottom:calc(100% + 12px);left:50%;right:auto;transform:translateX(-50%);width:190px;background:#263438;border:3px solid #ddd;border-radius:11px;padding:5px 8px;box-shadow:0 5px #151c1d}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card .playing-tooltip .tooltip-name{padding:4px 2px;background:#fff;color:#ec6248;text-shadow:none;border-radius:6px;font-size:19px}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card .playing-tooltip .tooltip-effect{min-height:38px;margin-top:4px;padding:4px 5px;background:#fff;color:#303a3d;text-shadow:none;border-radius:6px;font-size:17px}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card .playing-tooltip .tooltip-effect b{margin-right:4px}
body:is([data-mode="play"],[data-mode="lost"]) .hand-card:hover>.playing-tooltip{display:block}
body:is([data-mode="play"],[data-mode="lost"]) .stage[data-mode="scoring"]{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;padding:0;overflow:visible}
body:is([data-mode="play"],[data-mode="lost"]) .stage[data-mode="scoring"]>.play-area{grid-row:2;margin:0;align-self:end}
body:is([data-mode="play"],[data-mode="lost"]) .stage[data-mode="scoring"] .hand-row{height:clamp(280px,347.2px,350px);padding-bottom:0;transform:none}
body:is([data-mode="play"],[data-mode="lost"]) .stage[data-mode="scoring"] .hand-card{flex:0 0 clamp(120px,176.576px,176px)}
body:is([data-mode="play"],[data-mode="lost"]) .stage[data-mode="scoring"] .hand-count{margin:2px 0 0}
body:is([data-mode="play"],[data-mode="lost"]) .score-playback{grid-row:1;align-self:center;width:100%;max-width:none;gap:clamp(10px,29.76px,30px);padding:0 59.52px;transform:translateY(37.2px)}
body:is([data-mode="play"],[data-mode="lost"]) .score-card{width:clamp(120px,176.576px,176px);flex:0 1 176px;opacity:1;filter:drop-shadow(3px 10px 3px #102e2680)}
body:is([data-mode="play"],[data-mode="lost"]) .score-card.scoring-active{transform:translateY(-12px) scale(1.02);filter:drop-shadow(0 12px 8px #091c18bb)}
body:is([data-mode="play"],[data-mode="lost"]) .score-card:not(.scoring-active){transform:none}
body:is([data-mode="play"],[data-mode="lost"]) .score-card>.playing-tooltip{display:none!important}
.scoring-pop{position:absolute;left:50%;top:-.8em;transform:translate(-50%,-100%);z-index:4;font-size:clamp(34px,67.456px,68px);color:#168ff7;text-shadow:2px 3px #fff,3px 5px #183849;white-space:nowrap;opacity:0}
.pack-hand-row{display:flex;justify-content:center;align-items:flex-end;gap:4px;min-height:170px;padding:8px 4px}.pack-hand-row .hand-card{flex:0 1 115px;max-width:115px;cursor:pointer}.pack-hand-row .hand-card.selected{transform:translateY(-18px)}
.score-card.scoring-active .scoring-pop{opacity:1;animation:score-pop .32s ease-out}
@keyframes score-pop{from{transform:translate(-50%,-70%) scale(.7)}to{transform:translate(-50%,-100%) scale(1)}}
.chip-icon{display:inline-block;width:1em;height:1em;vertical-align:-.08em;margin-right:.12em;background:url('./assets/chips.png') 0 0/500% 200% no-repeat;image-rendering:pixelated}




/* Window mode: one logical room, uniformly fitted and centred (love.resize).
   All viewport lengths above refer to the reference 1984 x 1240 room. */
:root{--game-scale:1}
html,body{width:100%;height:100%;min-width:0;overflow:hidden}
body .game,body[data-mode] .game{position:fixed;width:1984px;height:1240px;min-height:1240px;max-width:none;margin:0;transform:scale(var(--game-scale));transform-origin:0 0}
body .table,body[data-mode] .table{min-height:1240px;min-width:0}
dialog{max-width:none;transform:scale(var(--game-scale));transform-origin:center}

/* Native debuff.fs crosses the full card in UV space (diagonal width .1).
   Isolate each card's layers; the debuff pass follows face, seal and edition. */
.playing-art{isolation:isolate}
.playing-art>.debuff-mark{position:absolute;inset:0;z-index:6;pointer-events:none;background:#e53838cc;clip-path:polygon(0 0,10% 0,50% 40%,90% 0,100% 0,100% 10%,60% 50%,100% 90%,100% 100%,90% 100%,50% 60%,10% 100%,0 100%,0 90%,40% 50%,0 10%)}

.legendary-face {position:absolute;inset:0;z-index:2;pointer-events:none;}
.boss-reroll {position:absolute;bottom:45px;right:90px;}
body[data-mode="blind"] .boss-reroll{left:-452px;top:-10px;right:auto;bottom:auto;width:360px;height:64px;padding:8px;font-size:30px}
.facedown-art {image-rendering:auto;}

/* Native generic options: fixed room units, centered independently of the
   table, with six 5-unit actions and the wider orange back row. */
dialog.options-modal{position:fixed;inset:50% auto auto 50%;margin:0;transform:translate(-50%,-50%) scale(var(--game-scale));transform-origin:center;width:680px;max-height:1120px;padding:32px 18px 24px;border:6px solid #b9bdcd;border-radius:25px;background:#293b41;box-shadow:0 8px 0 #5b606c,0 13px 0 #17272dcc,inset 0 0 0 3px #1c2e34;overflow:visible}
dialog.options-modal::backdrop{background:rgba(61,80,82,.7)}
.options-modal>.modal-head{display:none}
.native-options-page{display:flex;flex-direction:column;align-items:center;gap:36px}
.options-actions{display:flex;flex-direction:column;align-items:center;gap:18px;width:100%}
.options-actions>button{width:452px;height:82px;padding:0 12px;font-size:38px;line-height:1.2;background:#ff4c40;border-radius:12px;box-shadow:0 8px 0 #17272d;text-shadow:2px 3px #0005}
.options-modal .options-back{width:630px;height:56px;min-height:56px;padding:0 10px;font-size:38px;line-height:1.1;background:#ff9800;border-radius:12px;box-shadow:0 9px 0 #17272d;text-shadow:2px 3px #0005}
.options-modal button:hover{filter:brightness(1.08);transform:none}
.options-modal button:active{transform:translateY(3px);box-shadow:0 4px #17272d}
.options-actions>button,.options-modal .options-back{position:relative;isolation:isolate;border-radius:0;background:transparent;box-shadow:none}
.options-actions>button::before,.options-actions>button::after,.options-modal .options-back::before,.options-modal .options-back::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:#ff4c40;clip-path:polygon(12px 0,calc(100% - 12px) 0,calc(100% - 12px) 4px,calc(100% - 5px) 4px,calc(100% - 5px) 9px,100% 9px,100% calc(100% - 9px),calc(100% - 5px) calc(100% - 9px),calc(100% - 5px) calc(100% - 4px),calc(100% - 12px) calc(100% - 4px),calc(100% - 12px) 100%,12px 100%,12px calc(100% - 4px),5px calc(100% - 4px),5px calc(100% - 9px),0 calc(100% - 9px),0 9px,5px 9px,5px 4px,12px 4px)}
.options-actions>button::after,.options-modal .options-back::after{inset:8px 0 -8px;z-index:-2;background:#17272d}
.options-modal .options-back::before{background:#ff9800}
.options-modal::after{content:"";position:absolute;inset:0;z-index:10;pointer-events:none;border-radius:18px;opacity:var(--crt-opacity,.18);background:repeating-linear-gradient(transparent 0 2px,#071c1b70 3px 4px)}
.options-seed{height:64px;display:flex;align-items:center;gap:12px;font-size:27px}
.options-seed strong{padding:7px 15px;border-radius:8px;background:#b93836;user-select:all}
.options-seed button{font-size:24px;padding:10px 20px}
.options-tabs{display:flex;justify-content:center;gap:12px;width:100%}
.options-tabs>button{flex:1;min-width:0;font-size:29px;padding:12px 16px;white-space:nowrap;border-radius:10px}
.options-tabs>button.active{background:#b72e2a;box-shadow:inset 0 4px #792f2b;transform:translateY(3px)}
dialog.settings-modal,dialog.customize-modal{width:950px}
.settings-modal .options-back,.customize-modal .options-back,.stats-modal .options-back,.collection-modal .options-back{width:100%}
.settings-content,.customize-content{width:100%;display:flex;flex-direction:column;align-items:center;gap:30px}
.settings-controls{height:580px;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px}
.option-cycle{width:600px;display:flex;flex-direction:column;align-items:center;gap:12px}
.option-label{font-size:29px}
.option-cycle-controls{display:flex;align-items:center;justify-content:center;gap:14px;width:100%}
.option-cycle-controls>button{font-family:Balatro,sans-serif;font-size:48px;line-height:1;width:60px;height:58px;padding:0}
.option-cycle-value{font-size:30px;background:#1d2c32;border-radius:10px;min-height:58px;display:flex;justify-content:center;align-items:center;flex:1;text-align:center;padding:6px 10px}
.option-toggle{display:flex;align-items:center;justify-content:center;gap:20px;font-size:28px;background:transparent;box-shadow:none;padding:0;min-height:44px}
.option-check{width:43px;height:43px;display:flex;align-items:center;justify-content:center;background:#1b292e;border:3px solid #718088;border-radius:8px;color:#fff;font-size:35px;line-height:1;text-shadow:none}
.option-check.checked{background:#f0443e;border-color:#ff6b60}
.option-slider{width:630px;display:grid;grid-template-columns:200px 1fr 60px;align-items:center;gap:18px;font-size:27px}
.option-slider input{width:100%;accent-color:#ff4c40;cursor:pointer}
.option-slider strong{font-family:Balatro,BalatroCN,sans-serif;font-size:35px}
.settings-note{max-width:620px;font-size:26px;text-align:center;line-height:1.6;color:#c5cbd0}
.settings-controls h3{font-size:34px}
.options-fullscreen{font-size:31px;width:440px;padding:17px}
dialog.stats-modal{width:1250px}
.statistics-content{display:grid;grid-template-columns:1.2fr 1fr;gap:28px;width:100%;padding:10px}
.statistics-records,.statistics-run{display:flex;flex-direction:column;gap:14px}
.statistics-run h3{text-align:center;font-size:32px;margin:0 0 10px}
.statistics-row{background:#1b2b31;border-radius:12px;min-height:76px;padding:12px 20px;display:flex;justify-content:space-between;align-items:center;gap:18px;font-size:28px}
.statistics-row strong{color:#fa584b;font-size:35px}
dialog.collection-modal{width:1450px}
.collection-content{width:100%}
.collection-content .collection-grid{grid-template-columns:repeat(8,1fr);gap:24px;padding:32px 26px;max-height:700px;overflow:auto}
.collection-item{position:relative}
.collection-item>.sprite{width:100%}
.collection-item>.playing-tooltip{display:none;position:absolute;left:50%;top:100%;transform:translateX(-50%);z-index:3}
.collection-item:hover>.playing-tooltip,.collection-item:focus>.playing-tooltip{display:flex}
.customize-preview{display:flex;justify-content:center;gap:40px;padding:24px 45px;background:#1b292e;border-radius:13px}
.customize-preview>.sprite{width:185px}
.options-credits-content{text-align:center;font-size:30px;line-height:1.8}
.options-credits-content h2{font-family:Balatro,sans-serif;font-size:85px;margin:0}
body .scanlines{opacity:var(--crt-opacity,.18)}
body[data-play-on-left="false"] .hand-actions{flex-direction:row-reverse}
body[data-smoothing="false"] .sprite{image-rendering:pixelated}
body[data-shadows="false"] :is(.hand-card,.score-card,.stock-card>.sprite,.owned-card>.art-button){filter:none!important}
body[data-bloom="true"] :is(.score-panel strong,.round-score strong){text-shadow:0 0 9px currentColor}
body[data-reduced-motion="true"] *,body[data-reduced-motion="true"] *::before,body[data-reduced-motion="true"] *::after{animation:none!important;transition:none!important}

/* Collection hub matches the two columns in create_UIBox_your_collection.
   Popups live outside the card rows, so no scroll container clips them. */
dialog.collection-home-modal{width:1056px;padding:48px 18px 24px}
.collection-home-modal .native-options-page{gap:46px}
.collection-home-modal .options-back{width:100%}
.collection-home{display:grid;grid-template-columns:452px 452px;gap:44px;width:100%;padding:0 30px}
.collection-column{display:flex;flex-direction:column;gap:14px}
.collection-category-wrap{position:relative;min-width:0}
.collection-category{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:76px;padding:0 8px;background:transparent!important;border-radius:0;box-shadow:none!important;line-height:1.13;gap:2px;overflow:visible}
.collection-category::before,.collection-category::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:var(--category-color,#ff4c40);clip-path:polygon(12px 0,calc(100% - 12px) 0,calc(100% - 12px) 4px,calc(100% - 5px) 4px,calc(100% - 5px) 9px,100% 9px,100% calc(100% - 9px),calc(100% - 5px) calc(100% - 9px),calc(100% - 5px) calc(100% - 4px),calc(100% - 12px) calc(100% - 4px),calc(100% - 12px) 100%,12px 100%,12px calc(100% - 4px),5px calc(100% - 4px),5px calc(100% - 9px),0 calc(100% - 9px),0 9px,5px 9px,5px 4px,12px 4px)}
.collection-category::after{inset:8px 0 -8px;background:#14252b;z-index:-2}
.collection-category-name{font-size:38px;font-weight:700;color:#fff}
.collection-category-count{font-family:BalatroCN,sans-serif;font-size:28px;color:#fff}
.collection-category-jokers .collection-category{height:126px}
.collection-category-jokers .collection-category-name{font-size:46px}
.collection-category-enhancements .collection-category,.collection-category-seals .collection-category{height:82px}
.collection-category-blinds .collection-category{height:154px}
.collection-consumables{display:flex;gap:20px;padding:18px 22px 24px 12px;background:#17272c;border-radius:15px;height:296px}
.collection-consumable-label{writing-mode:vertical-rl;align-self:center;font-size:29px;color:#506369;letter-spacing:3px}
.collection-consumable-list{display:flex;flex-direction:column;gap:13px;flex:1;min-width:0}
.collection-alert{display:block;position:absolute;right:-5px;top:-6px;width:38px;height:43px;line-height:43px;background:#e5352c;color:white;font-family:Balatro,BalatroCN,sans-serif;font-size:46px;transform:rotate(11deg);text-align:center;border-radius:45%;box-shadow:0 5px #652622;text-shadow:2px 2px #932822;z-index:4;pointer-events:none}
.collection-category-tooltip{width:310px;left:calc(100% + 15px);right:auto;top:0;z-index:60}
.collection-right .collection-category-tooltip{right:calc(100% + 15px);left:auto}
.collection-category-wrap:has(>.collection-category:hover),.collection-category-wrap:focus-within{z-index:20}
.collection-category:hover+.collection-category-tooltip,.collection-category:focus-visible+.collection-category-tooltip{display:block}
.collection-category-tooltip .tooltip-name{font-size:30px;text-align:center}
.collection-category-tooltip .tooltip-effect{font-size:24px;min-height:0}
dialog.collection-detail-modal{width:1120px;padding:35px 28px 24px;overflow:visible}
.collection-detail{width:100%;display:flex;flex-direction:column;align-items:center;gap:24px}
.collection-card-rows{width:100%;display:flex;flex-direction:column;gap:12px;padding:16px 20px;background:#17282d;border-radius:15px;overflow:visible}
.collection-card-row{display:flex;justify-content:space-around;align-items:center;gap:14px;min-height:190px;overflow:visible}
.collection-item{position:relative;flex:0 0 142px;width:142px;outline-offset:7px;border-radius:6px}
.collection-item>.sprite{width:100%;filter:drop-shadow(2px 5px #101c2180)}
.collection-undiscovered>.collection-undiscovered-mark{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;scale:.95;animation:collection-undiscovered-scale 1.745329s ease-in-out -.872665s infinite alternate,collection-undiscovered-rotate 2.577188s ease-in-out -1.288594s infinite alternate}
/* Native Card:draw: scale = .95 + .05*sin(1.8*t), rotation = .03*sin(1.219*t). */
@keyframes collection-undiscovered-scale{from{scale:.9}to{scale:1}}
@keyframes collection-undiscovered-rotate{from{rotate:-1.718873deg}to{rotate:1.718873deg}}
.collection-item:hover,.collection-item:focus-visible{z-index:40}
.collection-item:hover>.sprite{transform:translateY(-5px) rotate(-2deg)}
.collection-item>.collection-tooltip{display:none;position:absolute;left:calc(100% + 12px);right:auto;top:0;transform:none;width:310px;z-index:60;pointer-events:none}
.collection-item.popup-left>.collection-tooltip{left:auto;right:calc(100% + 12px)}
.collection-item.popup-up>.collection-tooltip{top:auto;bottom:0}
.collection-item>.sprite:hover+.collection-tooltip,.collection-item>.collection-blind-icon:hover+.collection-tooltip,.collection-item:focus-visible>.collection-tooltip{display:block}
.collection-item .collection-tooltip .tooltip-name{font-size:29px;text-align:center}
.collection-item .collection-tooltip .tooltip-effect{font-size:23px;line-height:1.45;white-space:pre-line;min-height:0}
.collection-item .collection-tooltip .tooltip-effect span{font-size:inherit}
.collection-item .collection-tooltip .modifier-label{font-size:25px}
.collection-item .collection-tooltip .modifier-desc{font-size:22px}
.collection-item .collection-tooltip .functional-type,.collection-item .collection-tooltip .rarity{font-size:25px}
.collection-pagination{width:510px;gap:0}
.collection-pagination>.option-label:empty{display:none}
.collection-pagination .option-cycle-value{color:#fff;background:#e9453a}
.collection-detail .options-back{width:100%}
.collection-detail-packs .collection-item{flex-basis:150px;width:150px}
.collection-detail-packs .collection-card-row{min-height:218px}
.collection-detail-tags .collection-card-row{min-height:115px}
.collection-detail-tags .collection-item{width:90px;flex-basis:90px}
.collection-tag-icon{aspect-ratio:1}
.collection-detail-blinds .collection-item{width:85px;flex-basis:85px}
.collection-detail-blinds .collection-card-row{min-height:82px;gap:12px}
.collection-detail-blinds .collection-card-rows{padding:15px 14px;gap:12px}
.collection-blind-icon{display:block;width:85px;height:85px;background-size:100% 100%;background-repeat:no-repeat;image-rendering:auto;filter:drop-shadow(2px 5px #101c2180)}
.collection-blind-columns{display:grid;grid-template-columns:275px 1fr;gap:18px;width:100%}
.collection-blind-amounts{background:#17282d;padding:14px 18px;border-radius:12px;display:flex;flex-direction:column;gap:5px}
.collection-amount-heading{font-size:25px;color:#f7a62e;margin-bottom:9px}
.collection-amount-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-family:Balatro,BalatroCN,sans-serif;font-size:27px;line-height:1}
.collection-amount-row>strong{color:#ff5146}
.collection-detail-enhancements .collection-card-rows,.collection-detail-seals .collection-card-rows,.collection-detail-editions .collection-card-rows{padding:30px}
.collection-explanation{font-size:24px;text-align:center;max-width:850px;color:#b5c4c9;line-height:1.5;margin:0}
.collection-deck-preview{background:#17282d;border-radius:15px;padding:45px;display:flex;align-items:center;justify-content:center;gap:60px;width:100%}
.collection-deck-preview .collection-item{width:190px;flex-basis:190px}
.collection-deck-info{width:440px;text-align:center;font-size:32px}
.collection-deck-info>strong{display:block;font-size:36px;margin-bottom:20px}
.collection-deck-info>p{border-radius:12px;background:#f1f0e9;color:#263638;text-shadow:none;font-size:28px;line-height:1.5;margin:0;padding:25px 20px}

/* Native HUD dimensions shared by blind selection, cashout, shop and boosters. */
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .game{grid-template-columns:504px minmax(0,1fr)}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .sidebar{padding:468px 12px 0 44px;gap:12px;border-right:4px solid #183c36;border-left:0;background:#293a3beb}
body:is([data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .blind-panel,body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .seed{display:none}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .round-score{height:86px;flex-shrink:0;padding:8px 12px;border:5px solid #172729;box-shadow:0 5px #101d20;border-radius:14px;gap:24px}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .round-score>span{font-size:32px;line-height:1}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .round-score>strong{font-size:68px;line-height:1;padding:0 8px;background:#344347}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .round-score .chip-icon{font-size:44px}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .score-panel{height:223px;flex-shrink:0;display:flex;flex-direction:column;justify-content:flex-end;padding:14px 10px 18px;border:5px solid #172729;border-radius:14px;box-shadow:0 5px #101d20}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .score-panel h2,body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .score-panel p{display:none}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .equation{gap:10px;height:94px}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .equation strong{height:94px;display:flex;align-items:center;font-size:78px;line-height:1;padding:0 10px;border-radius:16px}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .chips{justify-content:flex-end}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .equation>b{font-size:70px}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .run-stats{margin:4px 0 0 14px;grid-template-columns:140px repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,108px);gap:12px}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) #run-info{grid-column:1;grid-row:1 / span 2;align-self:start;height:158px;margin-top:8px}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) #options{grid-column:1;grid-row:2 / span 2;align-self:end;height:158px;margin-bottom:8px}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .run-stats>.stat:nth-of-type(1){grid-column:2;grid-row:1}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .run-stats>.stat:nth-of-type(2){grid-column:3;grid-row:1}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .cash{grid-column:2 / span 2;grid-row:2;font-size:72px;line-height:1.15}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .run-stats>.stat:nth-of-type(4){grid-column:2;grid-row:3}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .run-stats>.stat:nth-of-type(5){grid-column:3;grid-row:3}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .run-stats .tall{font-size:34px;line-height:1.1;padding:10px 3px;border-radius:16px}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .stat{padding:4px;border-radius:14px}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .stat>small{font-size:28px;line-height:1.1}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .stat>strong{font-size:68px;background:#344347;border-radius:10px;line-height:.95}
body:is([data-mode="blind"],[data-mode="round"],[data-mode="shop"],[data-mode="pack"]) .stat strong small{font-size:32px}
body[data-mode="round"] .table{padding:105px 114px 86px 20px}
body[data-mode="round"] .inventory{height:240px;grid-template-columns:minmax(0,2.15fr) minmax(0,1fr);gap:18px}
body[data-mode="round"] .capacity{bottom:-26px;font-size:28px}
body[data-mode="round"] .stage{flex:none;min-height:0;padding:0;display:block;position:absolute;left:100px;top:440px;width:970px}
body[data-mode="round"] .deck-pile{right:124px;bottom:80px;font-size:26px}
body[data-mode="round"] .deck-pile .sprite{width:170px;transform:none;margin-bottom:24px}
body[data-mode="round"] #view-deck{display:none}
.stage[data-mode="round"] .receipt{width:100%;padding:25px 16px 12px;background:#1b2c2e;border:10px solid #344346;border-radius:26px;box-shadow:0 0 0 5px #182a2b,0 8px #172526,inset 0 0 0 4px #26383b}
.stage[data-mode="round"] .receipt>.cash-out{display:block;width:632px;height:100px;margin:0 auto 27px;padding:0 14px;font-size:80px;line-height:1;background:#ff9800;border-radius:16px;box-shadow:0 9px #0d2021,inset 0 3px #ffb534;white-space:nowrap}
.receipt-blind{display:flex;align-items:center;gap:16px;min-height:130px}
.receipt-blind-icon{width:100px;height:100px}
.receipt-target{display:flex;flex-direction:column;align-items:center;gap:0}
.receipt-target>span{font-size:30px;line-height:1.2}
.receipt-target-score{display:flex;align-items:center;font-size:76px;line-height:1;white-space:nowrap}
.receipt-target-score .chip-icon{font-size:44px}
.receipt-dollars{margin-left:auto;color:#f5bb4e;font-size:56px;line-height:1;letter-spacing:1px;white-space:nowrap;text-align:right}
.receipt-bonuses{border-top:6px dotted #f6efe9;margin-top:22px;padding-top:12px}
.stage[data-mode="round"] .receipt-row{display:flex;align-items:center;justify-content:space-between;border:0;gap:15px;min-height:60px;padding:4px 0;font-size:28px}
.receipt-label{display:flex;align-items:center;gap:12px;min-width:0;line-height:1.2}
.receipt-count{font-size:60px;line-height:1;color:#009dff}
.receipt-interest .receipt-count{color:#f5bb4e}

/* Native booster layout: standard-size choices above the bottom controls.
   Arcana/Spectral also deal a hand above the choices (06-pack5.jpg). */
.pack-backdrop,.pack-particles{display:none;position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
/* Every native booster state changes the shared background shader. Keep the
   canvases behind the room chrome while allowing the shader to cover the
   complete play area (standard, buffoon, celestial, arcana and spectral). */
body[data-mode="pack"] .game{isolation:isolate;background:#374244}
body[data-mode="pack"] .pack-backdrop,body[data-mode="pack"] .pack-particles{display:block;z-index:0}
body[data-mode="pack"] .sidebar,body[data-mode="pack"] .table{position:relative;z-index:1}
body:is([data-mode="shop"],[data-mode="pack"]) .sidebar{padding-top:140px;border-right-color:#e6e9e2;background:#293a3beb}
body:is([data-mode="shop"],[data-mode="pack"]) .shop-sign{height:300px;min-height:300px;margin-bottom:12px;padding:10px 6px 16px;border:6px solid #e9ede6;border-radius:18px;box-shadow:inset 0 0 0 4px #586669,0 6px #172729}
body:is([data-mode="shop"],[data-mode="pack"]) .shop-sign-art{width:100%}
body:is([data-mode="shop"],[data-mode="pack"]) .shop-sign small{font-size:38px;line-height:1.1;margin-top:8px}
body[data-mode="pack"][data-pack="spectral"] .shop-sign{border-color:#76b7ed}
body[data-mode="pack"][data-pack="joker"] .shop-sign{border-color:#f5a623}
body[data-mode="pack"][data-pack="joker"] .sidebar{border-right-color:#f5a623}
body[data-mode="pack"][data-pack="card"] .shop-sign{border-color:#ff4c40}
body[data-mode="pack"][data-pack="card"] .sidebar{border-right-color:#ff4c40}
body[data-mode="pack"][data-pack="planet"] .shop-sign{border-color:#00a5ca}
body[data-mode="pack"][data-pack="planet"] .sidebar{border-right-color:#00a5ca}
body:is([data-mode="shop"],[data-mode="pack"]) .table{padding:105px 114px 86px 20px}
body:is([data-mode="shop"],[data-mode="pack"]) .inventory{height:240px;grid-template-columns:minmax(0,2.15fr) minmax(0,1fr);gap:18px}
body:is([data-mode="shop"],[data-mode="pack"]) .capacity{bottom:-26px;font-size:28px}
body[data-mode="pack"] .stage{display:block;position:absolute;left:20px;top:430px;width:1144px;height:810px;min-height:0;padding:0}
body[data-mode="pack"]:is([data-pack="tarot"],[data-pack="spectral"]) .pack-hand-row{position:absolute;left:10px;top:0;width:1144px;height:285px;min-height:0;padding:0;gap:0;align-items:flex-start}
body[data-mode="pack"]:is([data-pack="tarot"],[data-pack="spectral"]) .pack-hand-row .hand-card{flex:0 1 176px;max-width:176px;margin:0 -22px;transform:translateY(calc(var(--fan) * 42px)) rotate(var(--tilt));transform-origin:50% 100%;filter:drop-shadow(3px 9px 2px #100d2480)}
body[data-mode="pack"]:is([data-pack="tarot"],[data-pack="spectral"]) .pack-hand-row .hand-card:hover{transform:translateY(calc(var(--fan) * 42px - 18px)) rotate(var(--tilt));z-index:0}
body[data-mode="pack"]:is([data-pack="tarot"],[data-pack="spectral"]) .pack-hand-row .hand-card.selected{transform:translateY(calc(var(--fan) * 42px - 45px)) rotate(var(--tilt));z-index:0}
body[data-mode="pack"] .pack-hand-row .hand-card{touch-action:none;user-select:none;cursor:grab}
body[data-mode="pack"]:is([data-pack="tarot"],[data-pack="spectral"]) .pack-hand-row .hand-card.dragging{cursor:grabbing;z-index:10;transform:translate(var(--drag-x,0px),var(--drag-y,0px)) rotate(0deg);transition:none;opacity:.72}
body[data-mode="pack"] .pack-hand-row .hand-card.dragging>.playing-tooltip{display:none}
/* create_UIBox_*_pack uses G.CARD_W/G.CARD_H for every choice. Never
   shrink individual faces to fit a larger pack; the logical room scales. */
body[data-mode="pack"] .pack-choices{position:absolute;left:0;top:316px;width:1144px;height:285px;padding:8px 0 0;gap:40px;align-items:flex-start}
body[data-mode="pack"]:is([data-pack="tarot"],[data-pack="spectral"]) .pack-choices{gap:14px}
body[data-mode="pack"][data-pack="planet"] .pack-choices{gap:48px}
body[data-mode="pack"][data-pack="joker"] .pack-choices{gap:48px}
body[data-mode="pack"] .pack-choices .stock-card{width:176px;flex:0 0 176px;min-width:176px;max-width:176px}
body[data-mode="pack"] .pack-choices .stock-pick>.sprite{width:176px;height:calc(176px * 95 / 71);max-width:none}
body[data-mode="pack"] .pack-choices .stock-card.selected{transform:translateY(-40px)}
body[data-mode="pack"] .pack-choices .stock-action{height:48px}
body[data-mode="pack"] .pack-choices .stock-buy{font-size:34px;line-height:1.1;padding:4px 12px;background:#35bd86}
body[data-mode="pack"] .pack-footer{position:absolute;left:0;top:600px;width:1144px;height:210px;padding:0;display:block}
body[data-mode="pack"] .pack-footer .stage-heading{position:absolute;left:370px;top:0;width:380px;min-width:0;height:230px;padding:12px 20px;background:#293539;border:5px solid #ecebe6;border-radius:24px;box-shadow:0 6px #182326,inset 0 0 0 4px #48545b}
body[data-mode="pack"] .pack-footer h2{font-size:54px;line-height:1.2;margin:0 0 4px}
body[data-mode="pack"] .pack-footer p{font-size:40px;line-height:1.2;margin:0}
body[data-mode="pack"] .pack-skip{position:absolute;left:784px;top:16px;width:164px;height:110px;padding:8px;font-size:38px;line-height:1;background:#5f7377;border-radius:16px;box-shadow:0 8px #152326}
body[data-mode="pack"][data-pack="joker"] .pack-footer .stage-heading{border-color:#f5a623}
body[data-mode="pack"][data-pack="card"] .pack-footer .stage-heading{border-color:#ff4c40}
body[data-mode="pack"][data-pack="planet"] .pack-footer .stage-heading{border-color:#00a5ca}
/* ease_background_colour_blind also colours the room outline and pack title. */
body[data-mode="pack"][data-pack="card"]{--pack-accent:#fe5f55}
body[data-mode="pack"][data-pack="joker"]{--pack-accent:#ff9a00}
body[data-mode="pack"][data-pack="planet"]{--pack-accent:#17a4bf}
body[data-mode="pack"][data-pack="tarot"]{--pack-accent:#ebeced}
body[data-mode="pack"][data-pack="spectral"]{--pack-accent:#447de8}
body[data-mode="pack"][data-pack] .sidebar{border-right-color:var(--pack-accent)}
body[data-mode="pack"][data-pack] .shop-sign,body[data-mode="pack"][data-pack] .pack-footer .stage-heading{border-color:var(--pack-accent)}
body:is([data-mode="shop"],[data-mode="pack"]) .deck-pile{right:124px;bottom:80px;font-size:26px}
body:is([data-mode="shop"],[data-mode="pack"]) .deck-pile .sprite{width:170px;transform:none;margin-bottom:24px}
body:is([data-mode="shop"],[data-mode="pack"]) #view-deck{display:none}

/* Native shop proportions leave room for the selected card's side controls. */
body[data-mode="shop"] #game .sidebar{border-right-color:#f04b41}
body[data-mode="shop"] #game .shop-sign{border-color:#f04b41}
/* Centre the balance after correcting the font's below-baseline ink bounds. */
body[data-mode="shop"] .run-stats>.cash{display:flex;align-items:center;justify-content:center;min-height:0;padding:0 3px;line-height:1.15;white-space:nowrap;overflow:visible}
body[data-mode="shop"] .inventory{--inventory-card-width:160px}
body[data-mode="shop"] .stage{position:absolute;left:48px;top:430px;width:1064px;height:730px;min-height:0;display:block;padding:0}
body[data-mode="shop"] .shop-frame{height:730px;padding:22px 26px 20px;border:6px solid #eb4d43;border-bottom-color:#142325;border-radius:24px;box-shadow:inset 0 0 0 5px #344348,0 8px #122124}
body[data-mode="shop"] .shop-top{grid-template-columns:250px minmax(0,1fr);gap:14px;height:310px}
body[data-mode="shop"] .shop-controls{gap:12px;padding:0}
body[data-mode="shop"] .shop-controls button{flex:1;min-height:0;font-size:36px;line-height:1.1;white-space:pre-line}
body[data-mode="shop"] .stock-row{padding:25px 16px 0;gap:36px;min-height:0;align-items:center}
/* create_card and shop vouchers use CARD_W/CARD_H; shop boosters use 1.27
   times those dimensions. Card count must not shrink the individual art. */
body[data-mode="shop"] .shop-frame{--shop-card-width:176px;--shop-booster-width:calc(var(--shop-card-width) * 1.27)}
body[data-mode="shop"] .stock-row .stock-card{width:var(--shop-card-width);flex:0 0 var(--shop-card-width);min-width:var(--shop-card-width);max-width:var(--shop-card-width)}
body[data-mode="shop"] .stock-row:has(>.stock-card:nth-child(4)){gap:0}
body[data-mode="shop"] .stock-card.selected{transform:translateY(-36px)}
body[data-mode="shop"] .stock-price{font-size:40px;border-width:5px;padding:2px 18px}
body[data-mode="shop"] .stock-action{height:48px}
body[data-mode="shop"] .stock-card .stock-buy{font-size:36px;padding:4px 12px}
body[data-mode="shop"] .shop-bottom{height:328px;margin-top:54px;gap:14px}
body[data-mode="shop"] .voucher-tray,body[data-mode="shop"] .booster-tray{min-height:0;padding:14px 12px 0;gap:22px}
body[data-mode="shop"] .voucher-label{font-size:28px}
body[data-mode="shop"] .voucher-tray .stock-card{width:var(--shop-card-width);flex:0 0 var(--shop-card-width);min-width:var(--shop-card-width);max-width:var(--shop-card-width)}
body[data-mode="shop"] .booster-tray .stock-card{width:var(--shop-booster-width);flex:0 0 var(--shop-booster-width);min-width:var(--shop-booster-width);max-width:var(--shop-booster-width)}
/* card_h_popup shares name/description/badge scales in shop, inventory and
   packs. Avoid the original small browser fallback of 24/16/20px. */
body[data-mode="shop"] .shop-frame .stock-tooltip{width:300px;padding:7px;border:4px solid #d9ded8;text-align:center;line-height:1.25}
body[data-mode="shop"] .shop-frame .stock-tooltip[data-type="joker"]{width:352px}
body[data-mode="shop"] .shop-frame .functional-tooltip{width:206px}
body[data-mode="shop"] .shop-frame .tooltip-name{font-size:40px;line-height:1.1;margin:0 0 8px}
body[data-mode="shop"] .shop-frame .tooltip-effect{font-size:26px;line-height:1.25;min-height:0;padding:8px 5px}
body[data-mode="shop"] .shop-frame .rarity{font-size:30px;line-height:1.15;padding:5px 8px;margin-top:8px}
body[data-mode="shop"] .shop-frame .modifier-label{font-size:28px;line-height:1.2;padding:5px 8px}
body[data-mode="shop"] .shop-frame .modifier-desc{font-size:26px;line-height:1.25;padding:6px 8px}
body[data-mode="shop"] .shop-frame .modifier-info{margin-top:8px;border-radius:8px}

/* Native Card:align_h_popup places top-slot consumable descriptions below
   the card in every scene; selected cards keep their actions on the right. */
#consumables{--inventory-card-width:160px}
.owned-functional-card{transition:transform .15s}
.owned-functional-card.selected{transform:translateY(-24px);z-index:30}
.owned-functional-card>.stock-tooltip{top:calc(100% + 18px);bottom:auto;left:50%;right:auto;transform:translateX(-50%)}
/* Owned-card actions persist after selection; descriptions follow only the
   card face's hover, so moving onto a side action also hides the popup. */
.owned-functional-card>.art-button:hover+.stock-tooltip{display:block}
.functional-tooltip{width:206px;padding:7px;border:4px solid #d9ded8}
.functional-tooltip .tooltip-name{font-size:32px;line-height:1.1;text-align:center;margin:0 0 8px}
.functional-tooltip .tooltip-effect{font-size:23px;line-height:1.25;padding:10px 6px;min-height:0;text-align:center}
.functional-tooltip .tooltip-effect>span{display:block}
.functional-tooltip .red-text{color:#f04b40}
.functional-tooltip .blue-text{color:#009dff}
.functional-type{display:block;margin-top:8px;padding:3px 6px;background:#00a5ca;border-radius:10px;text-align:center;font-size:28px;line-height:1.15;font-style:normal;color:#fff}
.consumable-actions{position:absolute;left:calc(100% - 4px);top:14px;width:92px;display:flex;flex-direction:column;gap:14px}
.consumable-actions>button{width:100%;padding:6px 4px;border-radius:0 12px 12px 0;font-size:30px;line-height:1.05;white-space:pre-line;box-shadow:0 7px #18302c}
.consumable-sell{min-height:88px;background:#35bd86}
.consumable-use{min-height:72px}
.consumable-actions>button:disabled{background:#525a5b;color:#858888;opacity:1;filter:none;box-shadow:0 7px #252c2d}
.stock-card .stock-buy-use{position:absolute;left:calc(100% - 4px);top:30%;width:94px;margin:0;min-height:96px;padding:6px 5px;white-space:pre-line;font-size:29px;line-height:1.05;border-radius:0 10px 10px 0;z-index:4;background:#ff9800;box-shadow:0 6px #18302c}

/* The play scene uses larger consumable cards within the same logical room. */
body:is([data-mode="play"],[data-mode="lost"]) #consumables{--inventory-card-width:176px}
.functional-tooltip[data-type="tarot"] .functional-type{background:#a67cc7}

/* Native Card:align_h_popup and card_focus_button: top-slot Jokers show
   their description below, with the selected card's sell action on the right. */
/* Native create_card uses G.CARD_W/G.CARD_H for owned Jokers in every
   scene. Keep their logical dimensions fixed as the whole room scales. */
#jokers{--inventory-card-width:176px}
.owned-joker-card{transition:transform .15s}
.owned-joker-card.selected{transform:translateY(-40px);z-index:30}
.owned-joker-card>.stock-tooltip{left:50%;right:auto;top:calc(100% + 18px);transform:translateX(-50%);width:352px;padding:7px;border:4px solid #d9ded8;text-align:center}
.owned-joker-card>.art-button:hover+.stock-tooltip{display:block}
.owned-joker-card>.stock-tooltip .tooltip-name{font-size:40px;line-height:1.1;margin:0 0 8px}
.owned-joker-card>.stock-tooltip .tooltip-effect{font-size:26px;line-height:1.25;min-height:0;padding:8px 5px}
/* Native info_tip_from_rows uses the same 0.32 text scale for an edition's
   title and effect as the main description, rather than miniature captions. */
.stock-tooltip[data-type="joker"] .modifier-label{font-size:24px;line-height:1.2;padding:5px 8px}
.stock-tooltip[data-type="joker"] .modifier-desc{font-size:22px;line-height:1.25;padding:6px 8px}
.owned-joker-card>.stock-tooltip .modifier-info{margin-top:8px;border-radius:8px}
.owned-joker-card>.stock-tooltip .modifier-label{font-size:28px}
.owned-joker-card>.stock-tooltip .modifier-desc{font-size:26px}
.owned-joker-card>.stock-tooltip .rarity{width:180px;margin:10px auto 3px;font-size:30px;line-height:1.15}
.stock-tooltip .rarity-4{background:#a67cc7}
.native-effect-badge{padding:0 2px;border-radius:3px;white-space:nowrap}
.joker-sell{position:absolute;left:calc(100% - 4px);top:50%;transform:translateY(-50%);z-index:20;width:96px;min-height:88px;padding:6px 4px;border-radius:0 12px 12px 0;background:#35bd86;font-size:32px;line-height:1.05;white-space:pre-line;box-shadow:0 7px #18302c}
.joker-sell:hover:not(:disabled){transform:translateY(calc(-50% - 2px))}
.joker-sell:active:not(:disabled){transform:translateY(calc(-50% + 3px))}
.joker-sell:disabled{background:#525a5b;color:#858888;opacity:1;filter:none;box-shadow:0 7px #252c2d}

/* Card:align_h_popup places the pack's low card row popup above its face.
   Native name/description/badge scales match top-inventory descriptions. */
body[data-mode="pack"] .pack-choices .stock-tooltip,
body[data-mode="pack"] .pack-hand-row .stock-tooltip{top:auto;bottom:calc(100% + 18px);left:50%;right:auto;transform:translateX(-50%);width:206px;padding:7px;border:4px solid #d9ded8;text-align:center}
body[data-mode="pack"] .pack-choices .stock-tooltip[data-type="joker"]{width:352px}
body[data-mode="pack"] .pack-choices .tooltip-name,
body[data-mode="pack"] .pack-hand-row .tooltip-name{font-size:40px;line-height:1.1;margin:0 0 8px}
body[data-mode="pack"] .pack-choices .playing-tooltip .tooltip-name,
body[data-mode="pack"] .pack-hand-row .playing-tooltip .tooltip-name{font-size:26px;padding:4px;background:#fff;color:#263c36;border-radius:8px;text-shadow:none}
body[data-mode="pack"] .pack-choices .tooltip-effect,
body[data-mode="pack"] .pack-hand-row .tooltip-effect{font-size:26px;line-height:1.25;min-height:0;padding:8px 5px}
body[data-mode="pack"] .pack-choices .rarity{font-size:30px;line-height:1.15;padding:5px 8px;margin-top:8px}
body[data-mode="pack"] .pack-choices .modifier-label,
body[data-mode="pack"] .pack-hand-row .modifier-label{font-size:28px;line-height:1.2;padding:5px 8px}
body[data-mode="pack"] .pack-choices .modifier-desc,
body[data-mode="pack"] .pack-hand-row .modifier-desc{font-size:26px;line-height:1.25;padding:6px 8px}
body[data-mode="pack"] .pack-choices .modifier-info,
body[data-mode="pack"] .pack-hand-row .modifier-info{margin-top:8px;border-radius:8px}


/* create_UIBox_game_over: frozen room, eased colour wash and right-hand panel.
   Coordinates use the same 1984 x 1240 room as the native reference. */
#game-over-root{position:absolute;inset:0;z-index:8;pointer-events:none}
.game-over-overlay{position:absolute;inset:0;pointer-events:auto;background:rgb(255 76 64 / .8);animation:game-over-wash .45s ease-out}
.game-over-overlay.game-over-endless{background:rgb(0 157 255 / .8)}
.game-over-panel{position:absolute;left:895px;top:122px;width:774px;height:990px;padding:12px 30px 35px;background:#34494e;border:6px solid #c3c6cf;border-radius:27px;box-shadow:0 7px #88909c,0 16px 0 -3px #592c25,inset 0 0 0 3px #57666c;text-align:center}
.game-over-title{height:135px;margin:0 0 7px;display:flex;align-items:center;justify-content:center;color:#ff4c40;font-size:110px;line-height:1;letter-spacing:0;text-shadow:0 10px #182628}
.game-over-scores{height:646px;padding:12px;background:#18292c;border-radius:23px;box-shadow:0 6px #132022,inset 0 0 0 4px #1c2c2f}
.game-over-row{height:62px;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:4px;padding:4px 8px;background:#9a9da9;border-radius:16px;box-shadow:0 4px #5d6973;text-shadow:1px 3px #566265}
.game-over-label{flex:1;min-width:0;font-size:39px;white-space:nowrap;line-height:1.1}
.game-over-value{display:flex;align-items:center;justify-content:center;flex:0 0 90px;min-width:0;height:49px;padding:1px 4px;background:#142427;border-radius:14px;box-shadow:0 3px #0d1d20;font-size:40px;line-height:1;white-space:nowrap;text-shadow:0 3px #091b20}
.game-over-best,.game-over-most{height:68px;margin:0 16px 12px}
.game-over-best .game-over-value,.game-over-most .game-over-value{flex-basis:50%;height:58px}
.game-over-best .chip-icon{font-size:30px}
.game-over-most .game-over-value{font-family:BalatroCN,Balatro,sans-serif;font-size:34px!important}
.game-over-most small{margin-left:8px;font-family:Balatro,BalatroCN,sans-serif;font-size:30px;color:#bfc3cf}
.game-over-columns{display:grid;grid-template-columns:390px 276px;gap:14px;margin-top:20px}
.game-over-left,.game-over-right{min-width:0;display:flex;flex-direction:column;gap:9px}
.game-over-seed .game-over-label{flex:1}
.game-over-seed .game-over-value{flex-basis:200px;user-select:text;cursor:text}
.game-over-seed.seeded .game-over-value{background:#ff4c40}
.game-over-value.money-text{color:#e7ab4f}.game-over-value.green-text{color:#35bd86}
.game-over-defeated{height:275px;padding:4px 6px 7px;border-radius:16px;background:#9a9da9;box-shadow:0 4px #5d6973}
.game-over-defeated>.game-over-label{display:block;height:49px;font-size:40px}
.game-over-blind{height:215px;background:#142427;border-radius:14px;box-shadow:0 3px #0d1d20;display:flex;flex-direction:column;align-items:center;gap:24px;padding:10px 5px 14px}
.game-over-blind>strong{font-size:34px;line-height:1.2;white-space:nowrap}
.game-over-blind-icon{display:block;width:126px;height:126px;flex-shrink:0;image-rendering:pixelated;filter:drop-shadow(0 7px #0b181a)}
.game-over-copy{align-self:center;width:208px;height:36px;min-height:0;padding:0 10px;font-size:25px;line-height:1;border-radius:12px;box-shadow:0 5px #0a181b}
.game-over-actions{display:flex;flex-direction:column;align-items:center;gap:11px;margin-top:13px}
.game-over-actions>button{width:452px;height:56px;padding:0 12px;font-size:40px;line-height:1;border-radius:16px;box-shadow:0 8px #142427}
body[data-mode="lost"] .last-result,body[data-mode="lost"] .hand-actions{display:none}
body[data-mode="lost"] .hand-row .hand-card{cursor:default}
@keyframes game-over-wash{from{background-color:transparent}}
@media(prefers-reduced-motion:reduce){.game-over-overlay{animation:none}}

/* Enhanced centers use the native atlas alpha, with no extra colour/filter.
   Card:draw omits the shadow for Glass Card, including its hover shadow. */
.playing-art[data-enhancement]{border-radius:0}
.enhancement-glass,
:is(.hand-card,.score-card,.art-button):has(>.enhancement-glass){filter:none!important}
.enhanced-tooltip .tooltip-effect{white-space:pre-line;text-align:center}
.enhancement-type{display:table;margin:7px auto 0;padding:3px 14px;border-radius:8px;background:#8389a3;color:#fff;font-size:18px;line-height:1.25;font-style:normal;text-align:center}
dialog.collection-detail-modal:has(.collection-detail-enhancements){width:780px}
.collection-detail-enhancements .collection-card-row{justify-content:center;gap:12px}
.collection-detail-enhancements .collection-explanation{font-size:22px}
.collection-item .enhanced-tooltip{width:310px;text-align:center;padding:8px;border:4px solid #d9ded8}
.collection-item .enhanced-tooltip .tooltip-effect{font-size:23px;line-height:1.35;padding:12px 6px}
.collection-item .enhanced-tooltip .tooltip-name{line-height:1.15;margin-bottom:8px}
