.runway-merge-instance{--red:#bd0000;--pink:#ed383e;--purple:#7e56a6;--rm-assets:;color:#fff;font-family:Outfit,Arial,sans-serif;width:100%;max-width:100%;margin:0 auto;}
.runway-merge-instance *{box-sizing:border-box}
.runway-merge-instance .rm-layout{width:100%;max-width:none;margin:0;padding:12px;display:grid!important;grid-template-columns:minmax(0,1000px) 220px!important;grid-auto-flow:row;gap:22px;align-items:start;flex-direction:initial!important;justify-content:center!important}
.runway-merge-instance .game-column{min-width:0;width:100%;max-width:1000px}
.runway-merge-instance #rm-game{width:100%;margin:0 auto;position:relative;overflow:hidden;border-radius:15px;background:#d9b8ef;box-shadow:0 0 10px #ff8cdd,0 0 24px #ff69d4aa,0 0 42px #ed383e55;border:2px solid #ffb4ec}
.runway-merge-instance .leaderboard{width:100%;min-width:0;border:1px solid #ff9cdb;border-radius:15px;background:linear-gradient(160deg,#28152f,#160f20 65%);box-shadow:0 0 18px #ed383e2e;padding:20px 16px;color:#fff;min-height:320px}
.runway-merge-instance .lb-kicker{font-size:10px;letter-spacing:.2em;font-weight:900;color:#ff9cdb;margin-bottom:7px}
.runway-merge-instance .leaderboard h2{font-size:23px;line-height:1.1;margin:0 0 7px;font-weight:900}
.runway-merge-instance .lb-sub{font-size:11px;color:#d5bfd9;line-height:1.45;margin:0 0 17px}
.runway-merge-instance .lb-head{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:8px;padding:8px 7px;color:#a88bab;font-size:9px;font-weight:900;letter-spacing:.12em;border-bottom:1px solid #ffffff1c}
.runway-merge-instance .lb-list{list-style:none;padding:0;margin:0}
.runway-merge-instance .lb-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:8px;align-items:center;padding:12px 7px;border-bottom:1px solid #ffffff12;font-size:12px}
.runway-merge-instance .lb-rank{color:#ff9cdb;font-weight:900}
.runway-merge-instance .lb-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.runway-merge-instance .lb-points{font-variant-numeric:tabular-nums;font-weight:900}
.runway-merge-instance .lb-empty{font-size:12px;color:#cbb6d1;line-height:1.5;padding:18px 7px}
.runway-merge-instance .lb-footer{font-size:10px;color:#a995b0;line-height:1.5;margin-top:15px}
.runway-merge-instance .lb-badge{display:inline-block;background:#ed383e;color:#fff;padding:4px 7px;border-radius:4px;font-size:9px;letter-spacing:.1em;font-weight:900;margin-top:10px}
.runway-merge-instance .board{width:100%;aspect-ratio:16/9;position:relative;overflow:hidden;border-radius:13px;background:#211326 var(--rm-bg-image) center center/100% 100% no-repeat}
.runway-merge-instance canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;outline:none;cursor:default}
.runway-merge-instance .hud{position:absolute;z-index:3;left:8.5%;right:8.5%;top:2.5%;display:flex;align-items:flex-start;justify-content:space-between;gap:1%;pointer-events:none}
.runway-merge-instance .hud-group{display:flex;align-items:center;gap:clamp(5px,1.1vw,18px);pointer-events:auto}
.runway-merge-instance .stat{width:clamp(75px,13vw,150px);aspect-ratio:892/357;background:var(--rm-score-image) center/100% 100% no-repeat;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#32143f;text-shadow:none;font-size:clamp(7px,.75vw,11px);letter-spacing:.08em;font-weight:900;padding:4% 2% 2%}
.runway-merge-instance .stat strong{color:#32143f;text-shadow:none;font-size:clamp(10px,1.3vw,18px);letter-spacing:0;margin-top:0;line-height:1}
.runway-merge-instance .next{display:flex;align-items:center;gap:clamp(4px,.8vw,12px);font-size:clamp(8px,.9vw,13px);font-weight:900;letter-spacing:.07em;color:#fff;text-shadow:0 1px 0 #fff9;white-space:nowrap}
.runway-merge-instance .next img{width:clamp(28px,5vw,68px);height:clamp(28px,5vw,68px);object-fit:contain;filter:drop-shadow(0 2px 3px #fff8)}
.runway-merge-instance .icon-button{border:0;background:transparent;padding:0;width:clamp(30px,5vw,62px);height:clamp(30px,5vw,62px);cursor:pointer;filter:drop-shadow(0 2px 4px #6a427466)}
.runway-merge-instance .icon-button img{width:100%;height:100%;object-fit:contain;display:block}
.runway-merge-instance .overlay{position:absolute;z-index:5;inset:0;display:grid;place-items:center;padding:4%;background:rgba(0,0,0,.62)}
.runway-merge-instance .overlay.hidden{display:none}
.runway-merge-instance .overlay.game-over-overlay{background:rgba(0,0,0,.62)}
.runway-merge-instance .card{text-align:center;max-width:520px;width:84%;padding:clamp(12px,2vw,25px);border:1px solid #ffffffa8;border-radius:18px;background:linear-gradient(145deg,#2b183bee,#5f2955ed);box-shadow:0 12px 35px #190b2880}
.runway-merge-instance .card h2{font-size:clamp(22px,4vw,42px);margin:10px 0}
.runway-merge-instance .start-poster{display:block;width:100%;height:auto;max-height:42vh;object-fit:contain;border-radius:10px;margin:0 auto 12px}
.runway-merge-instance .start-card p{margin:8px 0 18px}
.runway-merge-instance .card p{font-size:clamp(11px,1.4vw,14px);line-height:1.5;color:#eee2f4}
.runway-merge-instance .primary{border:0;border-radius:999px;padding:clamp(9px,1.3vw,13px) clamp(16px,2.5vw,25px);background:linear-gradient(90deg,#ffb6d9,#ed6eae,#ed383e);color:#fff;font-weight:900;letter-spacing:.1em;cursor:pointer}
.runway-merge-instance .gameover-image{width:min(90%,900px);max-height:84%;object-fit:contain;filter:drop-shadow(0 8px 20px #210d2b88)}
.runway-merge-instance .over-restart{position:absolute;left:50%;top:68%;transform:translate(-50%,-50%);width:30%;height:15%;border:0;background:transparent;cursor:pointer}
.runway-merge-instance .rm-rotate-message{display:none}
.runway-merge-instance .rm-rotate-mobile{display:none}
.runway-merge-instance .rm-mobile-title{display:none}
.runway-merge-instance .score-submit-card{max-width:460px;width:min(88%,460px);padding:clamp(16px,2.5vw,28px)}
.runway-merge-instance .score-submit-card .gameover-image{display:block;width:min(100%,360px);max-height:32vh;margin:0 auto 12px;object-fit:contain}
.runway-merge-instance .score-submit-card h2{margin:8px 0 7px;color:#fff;font-size:clamp(22px,3vw,32px)}
.runway-merge-instance .score-submit-card p{margin:0 0 16px}
.runway-merge-instance .score-name-input{display:block;width:100%;min-height:46px;margin:0 0 13px;padding:12px 15px;border:1px solid #ffb4ec;border-radius:9px;background:#fff;color:#32143f;font:700 15px Arial,sans-serif;outline:none;box-shadow:0 0 0 0 #ed383e;transition:border-color .15s,box-shadow .15s}
.runway-merge-instance .score-name-input:focus{border-color:#ed383e;box-shadow:0 0 0 3px #ed383e44}
.runway-merge-instance .score-submit-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.runway-merge-instance .score-skip{border:1px solid #ffffff70;border-radius:999px;padding:11px 18px;background:#ffffff12;color:#fff;font-weight:800;cursor:pointer}
.runway-merge-instance .score-submit-error{color:#ffd0df!important;font-size:12px!important;margin:10px 0 0!important;min-height:16px}

/* Desktop: force a two-column layout, including inside Elementor containers. The game
   can reach 1080px wide; narrower desktop viewports shrink the game column without
   changing the board's 16:9 aspect ratio. */
@media screen and (min-width:1024px){
 .runway-merge-instance,
 .runway-merge-instance *{box-sizing:border-box!important}
 .runway-merge-instance{display:block!important;position:relative!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow:visible!important}
 /* Full-width layout row. The game occupies the left track (up to 1000px); the
    leaderboard is explicitly placed in the second track on the right. */
 .runway-merge-instance .rm-layout{
   display:grid!important;
   grid-template-columns:minmax(0,1000px) 220px!important;
   grid-template-rows:auto!important;
   grid-auto-flow:row!important;
   align-items:start!important;
   justify-content:center!important;
   justify-items:stretch!important;
   column-gap:22px!important;
   row-gap:0!important;
   width:100%!important;
   max-width:none!important;
   min-width:0!important;
   padding:0!important;
   margin:0!important;
   float:none!important;
   position:relative!important;
 }
 .runway-merge-instance .rm-layout > .game-column{
   display:block!important;grid-column:1!important;grid-row:1!important;
   position:relative!important;align-self:start!important;justify-self:stretch!important;
   min-width:0!important;width:100%!important;max-width:1000px!important;
   margin:0!important;float:none!important;flex:none!important;
 }
 .runway-merge-instance .rm-layout > .leaderboard{
   display:block!important;grid-column:2!important;grid-row:1!important;
   position:relative!important;align-self:start!important;justify-self:stretch!important;
   min-width:0!important;width:220px!important;max-width:220px!important;
   margin:0!important;float:none!important;flex:none!important;
 }
 .runway-merge-instance .rm-layout > .game-column #rm-game,
 .runway-merge-instance .rm-layout > .game-column .board{display:block!important;width:100%!important;max-width:100%!important;margin:0!important}
 .runway-merge-instance .rm-layout > .game-column .board{aspect-ratio:16/9!important;height:auto!important}
}

/* Large desktop: game board capped at 1000px wide, preserving the original 16:9 ratio. */
@media screen and (min-width:1025px){
 .runway-merge-instance .rm-layout{
   grid-template-columns:minmax(0,1000px) 220px!important;
   column-gap:22px!important;
 }
 .runway-merge-instance .leaderboard{
   width:220px!important;
   max-width:220px!important;
   margin-left:0!important;
 }
 .runway-merge-instance .game-column{
   width:100%!important;
   max-width:1000px!important;
 }
 .runway-merge-instance #rm-game,
 .runway-merge-instance .board{
   width:100%!important;
   max-width:1000px!important;
 }
 .runway-merge-instance .board{aspect-ratio:16/9!important;height:auto!important}
 .runway-merge-instance .rm-layout > .game-column{
   display:block!important;
   grid-area:1 / 1!important;
   position:relative!important;
   place-self:start stretch!important;
 }
}

/* Stack at tablet widths and below; keep both blocks centered at 90% width. */
@media(max-width:1023px){
 .runway-merge-instance .rm-layout{display:flex!important;flex-direction:column!important;grid-template-columns:minmax(0,1fr)!important;width:90%;max-width:900px;padding:0;margin:0 auto;gap:26px;align-items:stretch}
 .runway-merge-instance .game-column,.runway-merge-instance .leaderboard{width:100%;max-width:100%}
 .runway-merge-instance .leaderboard{min-height:0;padding:18px 16px}
}
@media(max-width:1023px){
 .runway-merge-instance .start-card .start-poster{display:none!important}
 .runway-merge-instance .start-card .rm-mobile-title{display:block!important;font-size:clamp(22px,4vw,34px);margin:4px 0 8px;font-family:Outfit,Arial,sans-serif;font-weight:900;color:#fff}
 .runway-merge-instance .start-card .rm-rotate-message{display:none!important}
 .runway-merge-instance .start-card .rm-start-description{font-size:clamp(10px,1.4vw,13px);margin:6px 0 12px}
 .runway-merge-instance .start-card{width:min(72%,360px);padding:clamp(10px,2vw,16px)}
}
@media(max-width:767px){
 .runway-merge-instance .start-card .rm-rotate-message{display:block!important;font-size:clamp(10px,1.8vw,13px);font-family:Outfit,Arial,sans-serif;font-weight:900;color:#fff;line-height:1.25;margin:0 0 12px;text-transform:none;letter-spacing:0}
 .runway-merge-instance .rm-rotate-tablet{display:none!important}
 .runway-merge-instance .rm-rotate-mobile{display:inline!important}
 .runway-merge-instance .rm-layout{width:90%;gap:26px}
 .runway-merge-instance .lb-row{padding:9px 7px}
 .runway-merge-instance .hud{left:8%;right:8%;top:2%}
 .runway-merge-instance .next{white-space:normal;max-width:33%}
 .runway-merge-instance .stat{width:clamp(61px,17vw,90px)}
 .runway-merge-instance .hud-group{gap:3px}
 .runway-merge-instance .icon-button{width:clamp(26px,7vw,38px);height:clamp(26px,7vw,38px)}
}

/* Compact the opening / BEGIN card to suit the reduced game canvas. */
.runway-merge-instance .start-card{width:min(68%,400px);max-width:400px;padding:clamp(8px,1.35vw,18px);border-radius:15px;max-height:94%;overflow:auto}
.runway-merge-instance .rm-mobile-title{font-family:Outfit,Arial,sans-serif;font-weight:900;color:#fff;line-height:1.05}
.runway-merge-instance .rm-start-description{margin:8px 0 18px}
.runway-merge-instance .start-card h2{font-size:clamp(20px,2.8vw,32px);line-height:1.08;margin:5px 0 8px}
.runway-merge-instance .start-card .start-poster{max-height:29vh;margin:0 auto 8px;border-radius:8px}
.runway-merge-instance .start-card p{font-size:clamp(11px,1.15vw,13px);line-height:1.4;margin:6px 0 12px}
.runway-merge-instance .start-card .primary{padding:10px 22px;font-size:clamp(10px,1vw,12px)}
@media(max-width:767px){
 .runway-merge-instance .start-card{width:min(82%,340px);max-width:340px;padding:10px}
 .runway-merge-instance .start-card .start-poster{max-height:24vh;margin-bottom:7px}
 .runway-merge-instance .start-card p{margin:5px 0 10px}
}
