/* Viewport-sized cabinet. Extras have a permanent slot: no card/console jump.
   Explicit resets prevent the lobby's sticky header and line-height leaking in. */
.ortiz-game{inset:0;display:block;width:100%;height:100dvh;min-height:0;max-height:100dvh;padding:0;margin:0;line-height:1.15;overflow:hidden}
.ortiz-game .og-toolbar,.ortiz-game .og-card header{position:relative;top:auto;z-index:auto;backdrop-filter:none;flex-wrap:nowrap;border-bottom:0;line-height:1.1}
.ortiz-game .og-shell{width:100%;height:100%;min-height:0;max-height:100%;display:grid;padding:8px 16px;gap:6px;grid-template-areas:'toolbar' 'paytable' 'summary' 'board' 'page' 'rack' 'extra' 'status' 'console';grid-template-rows:58px 50px auto minmax(0,1fr) auto 68px 52px 18px 66px;overflow:hidden;background-attachment:local}
.ortiz-game .og-toolbar{grid-area:toolbar;min-height:0;max-height:100%;gap:10px}.ortiz-game .og-paytable{grid-area:paytable;min-height:0;margin:0;padding:4px 8px}.ortiz-game .og-multi-summary{grid-area:summary;padding:4px;font-size:11px}.ortiz-game .og-board{grid-area:board;min-height:0;height:100%;grid-template-rows:minmax(0,1fr);gap:10px}
.ortiz-game .og-page{grid-area:page;min-height:0;height:26px}.ortiz-game .og-page button{padding:0 15px;min-height:24px;height:24px}
.ortiz-game .og-rack{grid-area:rack;margin:0;min-height:0;height:100%;padding:3px 8px;grid-template-columns:repeat(20,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:2px;align-items:center;justify-items:center;overflow:hidden}
.ortiz-game .og-rack span{width:auto;height:100%;max-width:100%;max-height:30px;aspect-ratio:1;margin:0;font-size:19px}
.ortiz-game .og-extra{grid-area:extra;min-height:0;height:100%;margin:0;padding:5px 10px;gap:14px;flex-wrap:nowrap;overflow:hidden}.ortiz-game .og-extra[hidden]{display:flex!important;visibility:hidden;pointer-events:none}
.ortiz-game .og-extra b{font-size:14px}.ortiz-game .og-extra small{font-size:12px;margin-top:3px}.ortiz-game .og-extra button{min-height:34px;padding:8px 14px;white-space:nowrap}
.ortiz-game .og-status{grid-area:status;min-height:0;height:100%;line-height:18px;font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:0}
.ortiz-game .og-console{grid-area:console;position:relative;bottom:auto;height:100%;min-height:0;padding:5px 10px;gap:10px;flex-wrap:nowrap;overflow:hidden;z-index:1}
.ortiz-game .og-metric{min-width:80px}.ortiz-game .og-metric small,.ortiz-game .og-console label small{font-size:9px;margin-bottom:4px;letter-spacing:.035em;white-space:nowrap}.ortiz-game .og-metric strong{padding:5px 8px;font-size:22px}.ortiz-game .og-console select{min-height:34px;padding:6px 10px}.ortiz-game .og-console button{min-height:34px;padding:8px 12px;font-size:12px}.ortiz-game .og-console .og-main-play{padding:9px 20px!important;font-size:20px!important;min-width:110px}
.ortiz-game .og-cards{height:100%;min-height:0;grid-template-rows:repeat(2,minmax(0,1fr));gap:12px;contain:size}.ortiz-game .og-card{min-height:0;height:100%;display:flex;flex-direction:column;overflow:hidden}.ortiz-game .og-card header{height:28px;min-height:28px;flex:0 0 28px;padding:4px 7px;gap:4px}.ortiz-game .og-card header b{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ortiz-game .og-card header small{margin-left:auto;font-size:9px;white-space:nowrap}.ortiz-game .og-card header button{flex-shrink:0;min-height:18px;line-height:1}
.ortiz-game .og-cells{height:auto;min-height:0;flex:1;container-type:size;grid-template-rows:repeat(3,minmax(0,1fr));grid-template-columns:repeat(5,minmax(0,1fr));aspect-ratio:auto}.ortiz-game[data-game] .og-cell{font-size:min(14cqw,25cqh);line-height:1;min-width:0;min-height:0}
.ortiz-game .og-machine{min-width:0;min-height:0;max-height:100%;gap:2px}.ortiz-game .og-drum{width:min(100%,24vh);max-height:56%;min-height:0;flex-shrink:1}.ortiz-game .og-tube{height:30px;flex-shrink:1}.ortiz-game .og-catcher{height:68px;width:76px;flex-shrink:0}.ortiz-game .og-catcher .og-ball{width:56px;height:56px;font-size:30px}
.ortiz-game .og-shell{isolation:isolate;position:relative;z-index:0}
.ortiz-game .og-overlay{overflow:auto;z-index:100;isolation:isolate}
.ortiz-game .og-joker-actor canvas,.ortiz-game .og-original-jester{background:transparent;border:0;border-radius:0;box-shadow:none}.ortiz-game .og-bonus{min-height:0;max-height:calc(100dvh - 24px);overflow:auto}
/* Ace's rails lie beside the cards, outside the content grid. */
.ortiz-game[data-game="ace-mania"] .og-shell{padding:8px 6.2%;grid-template-areas:'toolbar' 'board' 'rack' 'extra' 'status' 'console';grid-template-rows:100px minmax(0,1fr) 72px 52px 18px 66px;gap:6px;min-height:0}
.ortiz-game[data-game="ace-mania"] .og-toolbar{min-height:0;gap:8px;align-items:flex-start;padding-top:15px}
.ortiz-game[data-game="ace-mania"] .og-board{grid-template-columns:minmax(0,1fr) 6% minmax(0,1fr);gap:4px}
.ortiz-game[data-game="ace-mania"] .og-paytable{top:114px;bottom:248px;padding:0;grid-template-rows:repeat(6,minmax(0,1fr));gap:5px;grid-area:auto}.ortiz-game[data-game="ace-mania"] .og-pattern{min-height:0;max-height:100%;padding:3px 1px}
.ortiz-game[data-game="ace-mania"] .og-card header{font-size:clamp(11px,1.2vw,19px)}
.ortiz-game[data-game="ace-mania"] .og-last-ball{top:-103px;width:102px;height:102px;font-size:60px;z-index:4}.ortiz-game[data-game="ace-mania"] .og-idle-logo{top:-85px;width:120px}
.ortiz-game[data-game="ace-mania"] .og-catcher{width:100%;height:60px;max-width:65px}.ortiz-game[data-game="ace-mania"] .og-catcher .og-ball{width:min(4.5vw,56px);height:min(4.5vw,56px)}
.ortiz-game[data-game="ace-mania"] .og-console{padding:5px 8px}.ortiz-game[data-game="ace-mania"] .og-rack{padding:2px 9%;margin:0;min-height:0}
@media(max-width:1000px){
 .ortiz-game .og-shell{padding:6px;gap:4px;grid-template-rows:52px 44px auto minmax(0,1fr) auto 58px 50px 18px 94px}
 .ortiz-game .og-toolbar{gap:5px}.ortiz-game .og-logo{width:115px;height:48px}.ortiz-game .og-toolbar button{font-size:10px;padding:5px 8px;min-height:30px}
 .ortiz-game .og-console{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:3px 6px;padding:5px}.ortiz-game .og-metric{min-width:0}.ortiz-game .og-metric strong{font-size:18px;padding:3px 5px}.ortiz-game .og-console label{text-align:center;min-width:0}.ortiz-game .og-console select{min-height:25px;max-width:100%;padding:3px 8px;font-size:12px}.ortiz-game .og-console button,.ortiz-game .og-console .og-main-play{min-width:0;min-height:30px;height:100%;padding:5px!important;font-size:13px!important}
 .ortiz-game[data-game="ace-mania"] .og-shell{padding:6px 7%;gap:4px;grid-template-rows:84px minmax(0,1fr) 58px 50px 18px 94px}
 .ortiz-game[data-game="ace-mania"] .og-toolbar{min-height:0;padding-top:5px;align-items:flex-start;flex-wrap:wrap;align-content:flex-start;gap:4px}
 .ortiz-game[data-game="ace-mania"] .og-last-ball{top:-78px;width:76px;height:76px;font-size:42px}.ortiz-game[data-game="ace-mania"] .og-idle-logo{top:-70px;width:90px}
 .ortiz-game[data-game="ace-mania"] .og-paytable{top:94px;bottom:245px}.ortiz-game[data-game="ace-mania"] .og-rack{padding:2px 0}.ortiz-game[data-game="ace-mania"] .og-card header small{display:none}
 .ortiz-game .og-rack span{max-height:25px;font-size:15px}.ortiz-game .og-extra{gap:6px;padding:4px 6px}.ortiz-game .og-extra b{font-size:12px}.ortiz-game .og-extra small{font-size:10px}.ortiz-game .og-extra button{font-size:11px;padding:5px 8px}
}
@media(max-width:650px){
 .ortiz-game .og-shell{grid-template-rows:76px 38px auto minmax(0,1fr) auto 50px 60px 16px 110px}
 .ortiz-game .og-toolbar{flex-wrap:wrap;align-content:center;gap:4px}.ortiz-game .og-board{grid-template-columns:minmax(0,1fr) 62px minmax(0,1fr);gap:3px}.ortiz-game .og-cards{gap:6px}.ortiz-game .og-card header{height:21px;min-height:21px;flex-basis:21px;padding:2px 3px;font-size:8px}.ortiz-game .og-card header small{display:none}.ortiz-game .og-card header button{font-size:10px;min-height:15px;padding:0 3px}
 .ortiz-game .og-machine small{font-size:6px}.ortiz-game .og-machine>b{font-size:8px}.ortiz-game .og-drum{width:100%;max-height:40%}.ortiz-game .og-catcher{width:48px;height:48px}.ortiz-game .og-catcher .og-ball{width:40px;height:40px;font-size:22px}.ortiz-game .og-tube{width:20px;height:20px}.ortiz-game .og-paytable{gap:5px;padding:3px}.ortiz-game .og-pattern{min-width:40px;font-size:8px}.ortiz-game .og-rack span{max-height:21px;font-size:10px}.ortiz-game .og-extra{flex-wrap:nowrap}.ortiz-game .og-extra>div{min-width:0}.ortiz-game .og-extra button{max-width:40%;white-space:normal;font-size:10px}.ortiz-game .og-extra b{font-size:11px}.ortiz-game .og-status{font-size:9px;line-height:16px}
 .ortiz-game .og-console{padding:4px;gap:4px}.ortiz-game .og-console small{font-size:7px;letter-spacing:0}.ortiz-game .og-metric strong{font-size:15px;padding:3px}.ortiz-game .og-console b{font-size:12px}
 .ortiz-game[data-game="ace-mania"] .og-shell{grid-template-rows:100px minmax(0,1fr) 50px 60px 16px 110px}
 .ortiz-game[data-game="ace-mania"] .og-toolbar{gap:3px}.ortiz-game[data-game="ace-mania"] .og-logo{width:80px;height:38px}.ortiz-game[data-game="ace-mania"] .og-toolbar button{padding:4px;font-size:9px}
 .ortiz-game[data-game="ace-mania"] .og-last-ball{top:-60px;width:58px;height:58px;font-size:34px}.ortiz-game[data-game="ace-mania"] .og-idle-logo{top:-56px;width:75px}.ortiz-game[data-game="ace-mania"] .og-paytable{top:110px;bottom:267px}.ortiz-game[data-game="ace-mania"] .og-pattern{width:6vw;min-width:0;padding:2px 0}.ortiz-game[data-game="ace-mania"] .og-pattern-grid{margin-bottom:1px}.ortiz-game[data-game="ace-mania"] .og-pattern b{margin-top:1px;font-size:6px}.ortiz-game[data-game="ace-mania"] .og-card header{font-size:8px}
}
@media(max-height:600px) and (min-width:651px){
 .ortiz-game .og-shell{grid-template-rows:38px 35px auto minmax(0,1fr) auto 44px 40px 15px 52px;padding:4px 10px;gap:3px}.ortiz-game .og-toolbar{padding:0;min-height:0}.ortiz-game .og-logo{height:32px}.ortiz-game .og-toolbar button{min-height:26px;font-size:9px;padding:4px 7px}.ortiz-game .og-console{display:flex;flex-wrap:nowrap;padding:3px;gap:5px}.ortiz-game .og-console small{font-size:7px;margin-bottom:1px}.ortiz-game .og-metric strong{font-size:16px;padding:3px}.ortiz-game .og-console button{min-height:26px;font-size:10px;padding:5px}.ortiz-game .og-console label select{min-height:26px;font-size:10px;padding:3px}.ortiz-game .og-metric{min-width:65px}.ortiz-game .og-rack span{max-height:19px;font-size:12px}.ortiz-game .og-extra b{font-size:11px}.ortiz-game .og-extra small{font-size:9px}.ortiz-game .og-extra button{min-height:28px;padding:4px;font-size:10px}.ortiz-game .og-status{font-size:9px;line-height:15px}
 .ortiz-game[data-game="ace-mania"] .og-shell{grid-template-rows:58px minmax(0,1fr) 44px 40px 15px 52px;gap:3px;padding:4px 6.2%}.ortiz-game[data-game="ace-mania"] .og-toolbar{padding:0}.ortiz-game[data-game="ace-mania"] .og-last-ball{top:-59px;width:58px;height:58px}.ortiz-game[data-game="ace-mania"] .og-idle-logo{top:-54px;width:76px}.ortiz-game[data-game="ace-mania"] .og-paytable{top:65px;bottom:167px}
}
/* Comodín: original ball art, a persistent selected-ball preview and explicit price. */
.ortiz-game .og-bonus.is-joker{width:min(1040px,calc(100vw - 24px));min-height:0;max-height:calc(100dvh - 24px);padding:50px 28px 20px;border:2px solid #efd478;border-radius:18px;background:radial-gradient(ellipse at 18% 35%,#833dbc66,transparent 46%),linear-gradient(130deg,#16052b,#082d4b);box-shadow:0 16px 70px #000a,inset 0 1px #fff5;overflow:auto}
.og-bonus.is-joker::before{display:none}.og-bonus.is-joker h2{margin:4px 0 16px;font-size:32px;letter-spacing:.08em;color:#ffe89b;text-shadow:0 2px #4c2610}.og-bonus.is-joker .og-bonus-close{font-size:10px!important;top:10px;left:12px;padding:6px 10px;min-height:28px;background:#ffffff0d}.og-bonus.is-joker .og-bonus-total{display:none}.og-bonus.is-joker .og-bonus-note{display:none}
.og-joker-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px;align-items:center}.og-joker-showcase{position:relative;display:flex;flex-direction:column;align-items:center;min-width:0;align-self:stretch;justify-content:center;border-right:1px solid #f2d48e33;padding:12px}.og-joker-actor{height:165px;width:190px;position:relative}.og-joker-sheet{width:100%;height:100%;object-fit:contain}.og-joker-pedestal{width:136px;height:144px;display:grid;place-items:center;position:relative;background:radial-gradient(ellipse at center 86%,#f7df8744,transparent 58%)}
.og-joker-pedestal::after{content:'';position:absolute;bottom:0;left:3%;right:3%;height:18px;border-radius:50%;border:1px solid #e8c770;background:linear-gradient(#f6dc9277,#78431977);box-shadow:0 0 28px #f5cb7e55}.og-joker-pedestal .og-ball,.og-joker-empty{width:108px;height:108px;font-size:62px;z-index:1}.og-joker-empty{display:grid;place-items:center;border-radius:50%;border:2px solid #9bd7ff66;background:radial-gradient(circle at 30% 20%,#6aacdc,#163359 70%);color:#a1c8e3;box-shadow:inset -7px -8px 14px #0005,0 10px 20px #0005}
.og-joker-showcase>b{font-size:12px;line-height:1.4;color:#ffe38c;margin-top:14px;min-height:32px}.og-joker-picker>p:first-child{font-size:14px;color:#cdddf2;line-height:1.5;margin:0 0 14px}.og-joker-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin:0;padding:6px 2px;max-height:430px;overflow:auto}
.ortiz-game .og-joker-number{position:relative;display:grid;place-items:center;min-height:0;aspect-ratio:1;padding:5px;border-radius:12px;border:1px solid #b8d9ff33;background:#b6cfff0b;box-shadow:inset 0 1px #fff1;transition:background-color .15s,box-shadow .15s,transform .15s;min-width:0}
.og-joker-number .og-ball{width:100%;height:auto;max-height:100%;aspect-ratio:1;font-size:clamp(21px,2.5vw,38px);pointer-events:none}.og-joker-number>i{position:absolute;right:-3px;top:-5px;display:none;border:2px solid #fff7c5;background:#ffc938;color:#162d20;border-radius:50%;width:22px;height:22px;line-height:18px;font-size:14px;font-style:normal;font-weight:900;box-shadow:0 3px 8px #0008}
.ortiz-game .og-joker-number.chosen{background:#facf3d2b;outline:2px solid #ffe58b;outline-offset:1px;box-shadow:0 0 20px #ffe35b55}.og-joker-number.chosen>i{display:block}.ortiz-game .og-joker-number:focus-visible{outline:3px solid #d3faff;outline-offset:2px}
.og-joker-picker .og-joker-price{margin:14px 0 4px;font-size:15px;color:#c9d9eb}.og-joker-price strong{font-size:21px;color:#ffe58b}.og-joker-confirm-note{font-size:11px;line-height:1.4;display:block;color:#b9c8d9}.og-bonus.is-joker .og-bonus-action{margin-top:18px;min-height:46px;width:min(100%,580px);font-size:16px!important;border:1px solid #ffe19c;background:linear-gradient(#fbd572,#b07a19)!important;color:#362005;box-shadow:inset 0 1px #fff9,0 4px 0 #67420c}.og-bonus.is-joker .og-bonus-action:disabled{background:linear-gradient(#36475e,#213149)!important;box-shadow:none;border-color:#879aaa55;color:#b8c6d7;opacity:1}
@media(max-width:650px){.ortiz-game .og-overlay{padding:8px}.ortiz-game .og-bonus.is-joker{width:100%;padding:44px 12px 14px;max-height:calc(100dvh - 16px)}.og-bonus.is-joker h2{font-size:22px;margin:4px 0 10px}.og-joker-layout{grid-template-columns:1fr;gap:8px}.og-joker-showcase{display:grid;grid-template-columns:80px 80px minmax(0,1fr);gap:8px;align-items:center;border-right:0;border-bottom:1px solid #f2d48e33;padding:0 0 8px}.og-joker-actor{width:80px;height:82px}.og-joker-pedestal{width:78px;height:82px}.og-joker-pedestal .og-ball,.og-joker-empty{width:65px;height:65px;font-size:36px}.og-joker-pedestal::after{height:10px}.og-joker-showcase>b{font-size:10px;margin:0;min-height:0}.og-joker-grid{gap:7px;grid-template-columns:repeat(6,minmax(0,1fr));max-height:350px;padding:5px}.ortiz-game .og-joker-number{padding:3px;border-radius:8px}.og-joker-number .og-ball{font-size:23px}.og-joker-number>i{width:17px;height:17px;line-height:13px;font-size:11px}.og-joker-picker>p:first-child{font-size:11px;margin:0 0 6px}.og-joker-picker .og-joker-price{font-size:12px;margin-top:8px}.og-joker-price strong{font-size:17px}.og-joker-confirm-note{font-size:10px}.og-bonus.is-joker .og-bonus-action{font-size:12px!important;margin-top:10px;min-height:42px;padding:8px}}
@media(max-height:600px) and (min-width:651px){.ortiz-game .og-bonus.is-joker{padding:34px 16px 10px;max-height:calc(100dvh - 12px)}.og-bonus.is-joker h2{font-size:20px;margin:0 0 6px}.og-joker-layout{grid-template-columns:140px minmax(0,1fr);gap:12px}.og-joker-showcase{padding:0}.og-joker-actor{width:110px;height:70px}.og-joker-pedestal{width:70px;height:76px}.og-joker-pedestal .og-ball,.og-joker-empty{width:60px;height:60px;font-size:32px}.og-joker-showcase>b{font-size:9px;margin-top:4px;min-height:22px}.og-joker-grid{grid-template-columns:repeat(10,minmax(0,1fr));gap:6px;max-height:160px;padding:4px}.og-joker-number .og-ball{font-size:22px}.ortiz-game .og-joker-number{padding:3px;border-radius:8px}.og-joker-picker>p:first-child{font-size:10px;margin:0 0 3px}.og-joker-picker .og-joker-price{font-size:11px;margin:4px 0 0}.og-joker-price strong{font-size:16px}.og-joker-confirm-note{font-size:9px}.og-bonus.is-joker .og-bonus-action{min-height:32px;font-size:12px!important;padding:5px;margin-top:8px}}

/* Keep the card numerals readable on short landscape screens. */
@media(max-height:450px) and (min-width:651px){
 .ortiz-game .og-shell{grid-template-rows:28px 24px auto minmax(0,1fr) auto 32px 32px 12px 42px;gap:2px;padding:3px 8px}
 .ortiz-game .og-card header{height:16px;min-height:16px;flex-basis:16px;padding:1px 4px;font-size:9px}
 .ortiz-game .og-card header button{min-height:12px;font-size:9px;padding:0 3px}.ortiz-game .og-cards{gap:5px}
 .ortiz-game .og-toolbar button{min-height:23px;padding:3px 6px}.ortiz-game .og-logo{height:27px;width:80px}
 .ortiz-game .og-extra{padding:2px 6px;gap:8px}.ortiz-game .og-extra small{margin-top:1px;font-size:8px}.ortiz-game .og-extra b{font-size:9px}.ortiz-game .og-extra button{min-height:24px;font-size:9px}
 .ortiz-game .og-status{line-height:12px;font-size:8px}.ortiz-game .og-rack span{max-height:14px;font-size:9px}
 .ortiz-game .og-console button,.ortiz-game .og-console .og-main-play{font-size:10px!important;min-height:25px;padding:3px!important}.ortiz-game .og-console .og-main-play{min-width:70px}.ortiz-game .og-metric{min-width:50px}.ortiz-game .og-console{gap:4px}.ortiz-game .og-metric strong{font-size:13px;padding:2px}.ortiz-game .og-console select{max-width:55px}
 .ortiz-game[data-game="ace-mania"] .og-shell{grid-template-rows:36px minmax(0,1fr) 32px 32px 12px 42px;gap:2px;padding:3px 6.2%}
 .ortiz-game[data-game="ace-mania"] .og-card header{font-size:10px}.ortiz-game[data-game="ace-mania"] .og-last-ball{top:-38px;width:36px;height:36px;font-size:22px}.ortiz-game[data-game="ace-mania"] .og-idle-logo{top:-34px;width:45px}.ortiz-game[data-game="ace-mania"] .og-paytable{top:41px;bottom:131px}.ortiz-game[data-game="ace-mania"] .og-pattern b{font-size:7px}.ortiz-game[data-game="ace-mania"] .og-pattern-grid i{height:3px}
}

@media(max-height:600px) and (min-width:651px){
 .og-joker-grid{max-height:none;grid-auto-rows:44px;overflow:visible}
 .ortiz-game .og-joker-number{width:44px;max-width:100%;height:44px;aspect-ratio:auto;justify-self:center}
}
