/* Approved artwork, with layout independent of transparent image margins. */
:root{--panel:#27170fee;--ui-font:Arial,Helvetica,sans-serif}
button{transition:transform .16s ease,filter .16s ease}
button.primary:hover:not(:disabled),button.secondary:hover:not(:disabled){filter:brightness(1.12)}
.entrance-lobby button.primary:hover:not(:disabled),.entrance-lobby button.secondary:hover:not(:disabled),.welcome-copy button.primary:hover:not(:disabled){transform:scale(1.035);opacity:1}
.welcome-copy h2{font-size:clamp(46px,5vw,76px);line-height:1.1}
.welcome-copy p{line-height:1.4}
.room-lobby{min-height:680px}
.room-lobby .lobby-title{top:0;width:min(620px,45vw)}
.room-lobby .lobby-title h1{position:relative;height:clamp(126px,12vw,180px);padding:0;font-size:clamp(26px,2.7vw,43px)}
.room-lobby .lobby-title h1 span{position:absolute;inset:32% 6% 18%;display:grid;place-items:center;line-height:1;letter-spacing:.025em}
.room-lobby .lobby-title .eyebrow{height:46px;width:58%;margin-top:-17px;font:700 clamp(12px,1.1vw,17px)/1 var(--ui-font);letter-spacing:.08em;font-variant-numeric:lining-nums tabular-nums}
.room-lobby .lobby-title p{margin-top:0;font:500 clamp(12px,1vw,15px)/1.4 var(--ui-font);text-shadow:0 2px 4px #000}
.room-lobby .seat{width:clamp(124px,12vw,188px);transform:translate(-50%,-50%)}
.room-lobby .seat:nth-of-type(1){left:50%;top:65%}
.room-lobby .seat:nth-of-type(2){left:17%;top:50%}
.room-lobby .seat:nth-of-type(3){left:38%;top:35%}
.room-lobby .seat:nth-of-type(4){left:62%;top:35%}
.room-lobby .seat:nth-of-type(5){left:83%;top:50%}
.room-lobby .seat-portrait,.room-lobby .empty-seat .seat-portrait{width:clamp(92px,9.4vw,148px);height:clamp(92px,9.4vw,148px);background:#24150f}
.room-lobby .seat-portrait .figure{top:8%;left:12%;width:76%;height:158%;object-fit:cover;object-position:50% 0}
.room-lobby .seat strong{line-height:1.2;min-height:34px;display:grid;place-items:center;padding:5px 14px;font-size:clamp(13px,1.2vw,18px)}
.room-lobby .seat-status{min-height:25px;width:90%;font-size:clamp(9px,.7vw,11px)!important}
.room-lobby .room-panel{bottom:12px;width:min(650px,94vw);gap:5px;padding:8px 20px;background:#24150fed;box-shadow:0 5px 24px #0008}
.room-lobby .room-buttons{gap:12px}
.room-lobby .room-panel button.primary,.room-lobby .room-panel button.secondary{min-height:43px;font-size:15px}
.room-lobby .invite-row{display:flex;flex-direction:row;align-items:flex-end;width:100%;max-width:490px;gap:8px}
.room-lobby .invite-row .field{flex:1;min-width:0;gap:4px}
.room-lobby .invite-row input{width:100%;font:13px var(--ui-font)}
.room-lobby .invite-row button.secondary{flex:0 0 43px;min-width:43px;width:43px;min-height:39px;height:39px;display:grid;place-items:center;padding:7px;background-size:100% 100%}
.room-lobby .room-panel [data-action="leave-room"]{font-size:12px;min-height:27px}

/* New card fronts and a shared secret-role back. All game values remain live text. */
.selection{min-height:100svh;padding:80px 20px 22px;background-image:linear-gradient(#140b0870,#140b0830),url('/bang-prototipo/cenario-escolha-cartas-opcao-01-light.webp')}
.selection h1{font-size:clamp(25px,3vw,40px);margin:8px 0}
.selection .cards{gap:40px;margin:19px 0 15px;align-items:flex-start}
.selection .illustrated-card{position:relative;display:block;width:clamp(235px,29vh,350px);aspect-ratio:315/445;height:auto;min-height:0;padding:0;border:0;outline:0;background:transparent;box-shadow:none;filter:drop-shadow(5px 10px 8px #16090399);overflow:visible;isolation:isolate}
.illustrated-card .card-art{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none}
.selection .illustrated-card h2{position:absolute;top:65.5%;left:11%;width:78%;height:11.5%;display:grid;place-items:center;margin:0;color:#ffedc9;text-shadow:0 2px 2px #140905;font-size:clamp(16px,2.05vh,23px);line-height:1.1}
.selection .illustrated-card p{position:absolute;inset:77% 11% 5%;margin:0;display:grid;place-items:center;color:#392415;font:500 clamp(11px,1.35vh,14px)/1.25 var(--ui-font);text-wrap:pretty}
.card-life{position:absolute;right:8%;top:9%;display:flex;align-items:center;gap:4px;border:1px solid #c8a56a;background:#21130feb;border-radius:20px;padding:4px 8px;color:#fff4df;font:700 15px var(--ui-font);box-shadow:0 2px 5px #0009}
.card-life img{width:20px;height:20px;object-fit:contain}
.selection .illustrated-card:first-child{transform:rotate(-3deg)}
.selection .illustrated-card:last-child{transform:rotate(3deg)}
.selection .illustrated-card:hover:not(:disabled),.selection .illustrated-card.selected{transform:translateY(-7px);filter:drop-shadow(0 0 8px #f7ce6b)}
.selection .illustrated-card.selected:after{display:none}
.chosen-check{position:absolute;left:7%;top:8%;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#356128;color:#fff1cd;border:2px solid #e3c576;font:bold 20px var(--ui-font)}
.selection .illustrated-card:disabled{opacity:1}
.selection .fine-print{margin-top:12px}
.selection .illustrated-role{display:block;position:relative;width:clamp(205px,27vh,300px);height:auto;aspect-ratio:2/3;min-height:0;margin:16px 0 8px;padding:0;border:0;outline:0;background:none;box-shadow:none;filter:drop-shadow(4px 8px 10px #0009)}
.illustrated-role img{width:100%;height:100%;object-fit:fill;display:block}
.role-instruction{font:15px/1.5 var(--ui-font);max-width:480px;padding:10px 20px;margin:0 0 14px;border-radius:8px;background:#22140dda;color:#ffebc5}
.selection .role-card.revealed{background:none}

/* The battlefield now has a clear center and the archers behind the far fence. */
.battle,.battle.salvo{height:100svh;min-height:680px;background-image:url('/bang-prototipo/arena-deserto-arqueiros-atras-cerca.webp');background-position:center;background-size:cover}
.battle .arena{inset:0;max-width:none}
.battle .indian-foreground{display:none}
.battle .player{--body-height:clamp(180px,28vh,305px);width:clamp(140px,12vw,205px);transform:translate(-50%,-100%);top:auto;z-index:3}
.battle .player[data-seat="0"]{left:50%;top:83%}
.battle .player[data-seat="1"]{left:16%;top:65%}
.battle .player[data-seat="2"]{left:29%;top:40%;--body-height:clamp(175px,26vh,285px)}
.battle .player[data-seat="3"]{left:71%;top:40%;--body-height:clamp(175px,26vh,285px)}
.battle .player[data-seat="4"]{left:84%;top:65%}
.battle .four-players .player[data-seat="2"]{left:50%;top:40%}
.battle .player[data-seat] .avatar-button{display:flex;align-items:flex-end;justify-content:center;width:100%;height:var(--body-height);margin:0;padding:0;overflow:visible}
.battle .player[data-seat] .avatar-button .figure{width:auto;height:var(--body-height);max-width:none;object-fit:contain;object-position:center bottom;flex:none}
.battle .player.dead .avatar-button .figure{height:calc(var(--body-height)*.62)}
.battle .player .avatar-button:before{left:8%;bottom:-3px;width:84%;height:24px}
.battle .nameplate{width:100%;margin:0 0 2px}
.battle .nameplate strong{display:block;position:relative;min-height:32px;padding:7px 12px;font-size:clamp(14px,1.35vw,20px);line-height:1.15;white-space:nowrap;text-overflow:ellipsis;overflow:visible}
.battle .nameplate small{min-height:22px;margin-top:-2px;padding:4px 9px;font:600 clamp(10px,.78vw,12px)/1 var(--ui-font)}
.battle .player .local-mark{display:block;position:absolute;top:100%;left:50%;transform:translateX(-50%);width:max-content;margin:22px 0 0;padding:2px 5px;font:8px var(--ui-font);z-index:5}
.battle .stats{position:absolute;left:calc(100% + 6px);top:48%;display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:79px;padding:8px;border:1px solid #caa569;border-radius:7px;background:#25170fea;box-shadow:0 3px 6px #0006;font:700 14px/1.2 var(--ui-font);z-index:6}
.battle .player[data-seat="3"] .stats,.battle .player[data-seat="4"] .stats{left:auto;right:calc(100% + 6px)}
.battle .stats .health,.battle .stats .arrows{gap:4px}
.battle .stats img{display:block;width:20px;height:20px;object-fit:contain}
.battle .stats .arrows img{width:20px}
.battle .ability-toggle{align-self:center;width:25px;height:25px;border:1px solid #b9955d;color:#ffe5ae;background:#553624}
.battle .sheriff-tag{right:-32px;top:-29px;width:95px;height:44px;font:700 9px var(--ui-font);padding-right:8px}
.battle .center-camp,.battle .four-players .center-camp{left:50%;top:29%;z-index:2}
.battle .center-camp .pool{padding:5px 10px;font:12px var(--ui-font);background:#2c1b10e8;border-color:#d8b271;color:#fff0c5}
.battle .pool img{opacity:1;transform:none;filter:none;width:22px;height:22px}
.battle .passive{bottom:20%;left:50%;transform:translateX(-50%);width:240px;z-index:40;font:13px/1.5 var(--ui-font);background:#28190ff5}
.battle .player:has(.passive){z-index:45}
.battle .player:has(.assigned-marker),.battle .player:has(.impact-bullets){z-index:22}
.battle .assigned-marker,.battle .impact-bullets{position:absolute;top:-31px;left:50%;right:auto;transform:translateX(-50%);display:flex;flex-direction:row;justify-content:center;align-items:center;gap:9px;width:max-content;height:27px;padding:0;filter:drop-shadow(0 0 6px #ffe473);z-index:8;pointer-events:none}
.battle .bullet-glyph{width:15px;height:24px;flex:none}
.battle .impact-bullets{animation:impact-pulse 1.6s ease-out both}
@keyframes impact-pulse{0%{opacity:0;translate:0 5px}15%,75%{opacity:1;translate:0 0}100%{opacity:0;translate:0 -12px}}
.battle .aim-layer{display:none}

/* The frame and lever are separate PNG layers; holes contain square white reels. */
.battle .machine-anchor{position:absolute;width:clamp(248px,21vw,355px);transform:translate(-50%,0);z-index:9;bottom:auto;transition:none}
.battle .machine-label{width:max-content;max-width:100%;height:auto;margin:0 auto -5px;padding:4px 15px;color:#ffe9bb;background:#352011eb;border:1px solid #b68b4a;border-radius:5px;font:700 12px/1.2 var(--ui-font);text-shadow:0 1px #000;position:relative;z-index:5}
.battle .machine-label.mine{animation:turn-light 1.8s ease-in-out infinite}
@keyframes turn-light{50%{box-shadow:0 0 10px #ffd071;color:#fff6dd}}
.battle .machine{width:100%;aspect-ratio:2072/759;padding:0;border:0;outline:0;background:none;box-shadow:none;border-radius:0;isolation:isolate}
.machine-frame,.machine-lever-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;object-fit:fill}
.machine-frame{z-index:3}
.machine-lever-art{z-index:4;transform-origin:92.5% 77%;transition:transform .18s ease}
.rolling .machine-lever-art{transform:rotate(12deg)}
.battle .machine .reels{position:absolute;inset:0;display:block;z-index:2}
.battle .machine .reel{position:absolute;left:calc(9.25% + var(--slot)*15.4%);top:36%;width:10.8%;height:auto;aspect-ratio:1;padding:0;border:0;border-radius:3px;background:#fffdf4;box-shadow:inset 0 0 6px #55351555;display:grid;place-items:center;overflow:hidden;min-height:0}
.battle .machine .reel .reel-symbol{width:76%;height:76%;max-width:76%;max-height:76%;object-fit:contain;display:block;margin:0;position:absolute;left:12%;top:12%}
.battle .machine .reel-idle{font-size:clamp(19px,2vw,29px);line-height:1;color:#8f6b33}
.battle .machine .reel:after{bottom:2px;left:calc(50% - 2px);width:4px;height:4px;background:#b9a886}
.battle .machine .reel.held{background:#e1efc8;box-shadow:inset 0 0 0 3px #448940}
.battle .machine .reel.held:after{background:#387056}
.battle .machine .reel.forced{background:#ffe0d2;box-shadow:inset 0 0 0 3px #b9583f}
.battle .machine .reel.forced:after{background:#b73d28}
.battle .machine .lever,.battle .machine .lever:disabled{position:absolute;left:86%;top:4%;right:auto;width:13%;height:82%;padding:0;opacity:1;background:none;border:0;border-radius:20px;box-shadow:none;transform:none;z-index:6}
.battle .machine .lever:before,.battle .machine .lever:after{display:none}
.battle .machine .lever:focus-visible{outline:2px solid #ffe191}
.battle .machine-hint{margin-top:-5px;font:10px/1.3 var(--ui-font);color:#3e2516;text-shadow:0 1px #f5c38d}
.battle .machine.rolling .reel:not(.held):not(.forced) .reel-symbol{animation:contained-roll .18s linear infinite}
@keyframes contained-roll{50%{transform:scale(.84);filter:blur(1px);opacity:.6}}

.battle .action-bar{bottom:14px;width:max-content;min-width:470px;max-width:calc(100vw - 28px);padding:12px 18px;gap:18px;background:#23160ff5;border:2px solid #bd9058;box-shadow:0 4px 20px #0007,inset 0 0 0 2px #573b22;border-radius:9px;align-items:center}
.battle .action-copy{min-width:200px;max-width:390px}
.battle .action-copy strong{font:700 17px/1.2 var(--ui-font);color:#fff0cf}
.battle .action-copy small{font:13px/1.4 var(--ui-font);color:#ebd3ad;margin-top:5px}
.battle .action-buttons{gap:8px}
.battle .action-bar button{min-height:44px;min-width:90px;padding:10px 15px;border:0;background:transparent url('/bang-prototipo/ui-assets/lobby-botao-sair-light.webp') center/100% 100% no-repeat;color:#fff0cf;font:700 13px/1.2 var(--ui-font);text-shadow:0 1px 2px #000;border-radius:0;box-shadow:none}
.battle .action-bar button.primary{background-image:url('/bang-prototipo/ui-assets/lobby-botao-iniciar-light.webp')}
.battle .action-bar button:hover{background-color:transparent;filter:brightness(1.15)}
.battle .topbar{padding-top:16px}

@media(max-width:850px){
 .room-lobby .lobby-title{top:35px;width:min(560px,72vw)}
 .room-lobby .seat{width:120px}.room-lobby .seat-portrait,.room-lobby .empty-seat .seat-portrait{width:88px;height:88px}
 .room-lobby .seat:nth-of-type(3){left:35%;top:37%}.room-lobby .seat:nth-of-type(4){left:65%;top:37%}
 .room-lobby .seat:nth-of-type(2){left:16%;top:53%}.room-lobby .seat:nth-of-type(5){left:84%;top:53%}
 .room-lobby .seat:nth-of-type(1){top:66%}
 .battle .player{width:116px;--body-height:190px}.battle .player[data-seat="2"],.battle .player[data-seat="3"]{--body-height:178px}
 .battle .stats{width:63px;padding:5px;gap:4px;font-size:12px;left:calc(100% - 3px)}
 .battle .player[data-seat="3"] .stats,.battle .player[data-seat="4"] .stats{right:calc(100% - 3px)}
 .battle .stats img,.battle .stats .arrows img{width:16px;height:17px}
 .battle .machine-anchor{width:240px}
 .battle .action-bar{min-width:0;width:calc(100% - 24px);padding:10px 12px;gap:10px}
 .battle .action-copy{min-width:0}.battle .action-copy strong{font-size:15px}.battle .action-copy small{font-size:12px}
}
@media(max-width:550px){
 .room-lobby{height:100svh;min-height:800px;background-position:center}
 .room-lobby .lobby-title{top:47px;width:94vw}.room-lobby .lobby-title h1{height:125px;font-size:27px}
 .room-lobby .lobby-title .eyebrow{height:37px;font-size:12px;margin-top:-15px;width:61%}
 .room-lobby .lobby-title p{font-size:11px;max-width:95%;margin-top:1px}
 .room-lobby .seat{width:102px}.room-lobby .seat-portrait,.room-lobby .empty-seat .seat-portrait{width:76px;height:76px}
 .room-lobby .seat strong{font-size:12px;min-height:28px;padding:5px 8px}.room-lobby .seat-status{font-size:8px!important;min-height:22px}
 .room-lobby .seat:nth-of-type(1){left:50%;top:67%}.room-lobby .seat:nth-of-type(2){left:16%;top:51%}.room-lobby .seat:nth-of-type(3){left:34%;top:34%}.room-lobby .seat:nth-of-type(4){left:66%;top:34%}.room-lobby .seat:nth-of-type(5){left:84%;top:51%}
 .room-lobby .room-panel{width:96%;bottom:9px;padding:8px;gap:6px}.room-lobby .room-buttons{gap:6px}
 .room-lobby .room-buttons button{font-size:12px!important;padding:8px 10px;min-width:136px!important}
 .room-lobby .invite-row button.secondary{min-width:40px;min-height:37px}.room-lobby .invite-row input{font-size:11px}
 .selection{padding:86px 10px 24px;justify-content:flex-start}.selection h1{font-size:27px}.selection .subtitle{font-size:12px}
 .selection .cards{gap:10px;margin:28px 0 21px;width:100%}.selection .illustrated-card{width:calc(50vw - 18px);max-width:245px}
 .selection .illustrated-card h2{font-size:13px;left:10%;width:80%}.selection .illustrated-card p{font-size:9px;line-height:1.18;inset:77% 10% 4%}
 .card-life{font-size:11px;padding:3px 5px;gap:2px}.card-life img{width:14px;height:14px}.chosen-check{width:23px;height:23px;font-size:15px}
 .selection .illustrated-role{width:235px;max-width:66vw;margin-top:20px}.role-instruction{font-size:13px;max-width:95%}
 .battle,.battle.salvo{min-height:850px;background-position:center}
 .battle .topbar{padding:12px 9px}.battle .brand{font-size:10px;max-width:120px}.battle .top-actions{max-width:218px}
 .battle .player{width:85px;--body-height:140px}.battle .player[data-seat="2"],.battle .player[data-seat="3"]{--body-height:128px}
 .battle .player[data-seat="0"]{left:50%;top:71%}.battle .player[data-seat="1"]{left:15%;top:54%}.battle .player[data-seat="2"]{left:26%;top:31%}.battle .player[data-seat="3"]{left:74%;top:31%}.battle .player[data-seat="4"]{left:85%;top:54%}
 .battle .four-players .player[data-seat="2"]{left:50%;top:31%}
 .battle .nameplate strong{min-height:25px;padding:6px 4px;font-size:11px}.battle .nameplate small{font-size:8px;min-height:18px;padding:4px 2px}
 .battle .player .local-mark{margin-top:19px;font-size:7px}.battle .sheriff-tag{top:-22px;right:-14px;width:66px;height:32px;font-size:7px;padding-right:4px}
 .battle .stats{top:55%;left:calc(100% - 7px);width:54px;padding:4px;gap:4px;font-size:10px;background:#24170ff2}
 .battle .player[data-seat="3"] .stats,.battle .player[data-seat="4"] .stats{right:calc(100% - 7px)}
 .battle .stats img,.battle .stats .arrows img{width:13px;height:14px}.battle .stats .health,.battle .stats .arrows{gap:2px}.battle .ability-toggle{width:22px;height:22px;font-size:13px}
 .battle .center-camp,.battle .four-players .center-camp{left:50%;top:40%}.battle .center-camp .pool{font-size:10px;padding:3px 7px}
 .battle .pool strong{font-size:13px}.battle .pool img{width:15px;height:17px}
 .battle .machine-anchor{position:absolute;left:50%!important;top:auto!important;bottom:13%;width:260px}
 .battle .machine-label{font-size:11px}.battle .machine-hint{font-size:9px}
 .battle .assigned-marker,.battle .impact-bullets{top:-26px;gap:5px;transform:translateX(-50%) scale(.8)}
 .battle .action-bar{bottom:8px;padding:8px 11px;gap:7px;flex-wrap:wrap;max-width:96vw;min-height:76px;width:96vw}
 .battle .action-copy{max-width:none;flex:1 1 100%;text-align:center}.battle .action-copy strong{font-size:14px}.battle .action-copy small{font-size:11px;margin-top:2px}
 .battle .action-buttons{justify-content:center;width:100%;gap:4px}.battle .action-bar button{font-size:11px;min-height:35px;min-width:74px;padding:8px 11px}
 .battle .passive{width:200px;font-size:12px}.battle .player[data-seat="1"] .passive,.battle .player[data-seat="2"] .passive{left:0;transform:none}.battle .player[data-seat="3"] .passive,.battle .player[data-seat="4"] .passive{left:auto;right:0;transform:none}
}
@media(max-height:650px) and (min-width:551px){
 .battle,.battle.salvo{min-height:560px}.battle .player{--body-height:155px}.battle .player[data-seat="2"],.battle .player[data-seat="3"]{--body-height:145px}
 .battle .player[data-seat="2"],.battle .player[data-seat="3"]{top:46%}.battle .machine-anchor{width:220px;top:64%!important}.battle .action-copy small{font-size:11px}
 .room-lobby{min-height:580px}.room-lobby .lobby-title{top:-15px}.room-lobby .seat-portrait,.room-lobby .empty-seat .seat-portrait{width:76px;height:76px}.room-lobby .seat:nth-of-type(3),.room-lobby .seat:nth-of-type(4){top:39%}.room-lobby .seat:nth-of-type(1){top:64%}
 .selection .illustrated-card{width:220px}.selection .cards{margin:12px 0}.selection{padding-top:70px}
}
@media(prefers-reduced-motion:reduce){.machine-lever-art,button{transition:none}.machine-label.mine,.impact-bullets{animation:none}}
