/* v1.0.8.21: immersive live-table layout for Fast Run and Werewolf. */

.game-modal.mini-match{position:fixed;inset:76px 18px 18px 110px;width:auto;max-width:none;max-height:none;margin:0;padding:18px 22px;background:#0c141c;border-color:#3a5362;overflow:auto}.game-modal.mini-match::backdrop{background:transparent}.game-modal.mini-match>.modal-close{z-index:20;right:14px;top:14px;border:1px solid #60737e;background:#17242e}.game-modal.mini-match>.game-help{z-index:20;right:62px;top:14px}.game-modal.mini-match .fast-run-shell,.game-modal.mini-match .werewolf-shell{width:100%;max-width:none;min-height:calc(100dvh - 148px)}

/* A four-direction card table. The local player is always south; opponents rotate around the table. */
.fast-run-live .fast-run-head{padding-right:92px}.fast-run-live .fast-run-table{margin-top:12px}.fast-run-live .fast-run-room-meta{min-height:34px}.fast-run-battle-stage{position:relative;min-height:350px;padding:14px;background:radial-gradient(ellipse at 50% 48%,#31553f 0,#182f2b 38%,#101c24 73%);overflow:hidden}.fast-run-battle-stage:before{content:'';position:absolute;inset:14% 24%;border:1px solid #99c69242;border-radius:50%;box-shadow:inset 0 0 60px #061b16a8,0 0 46px #4ea88224;pointer-events:none}.fast-run-battle-seat-grid{position:relative;z-index:1;display:grid;grid-template-columns:minmax(130px,1fr) minmax(210px,1.5fr) minmax(130px,1fr);grid-template-rows:78px minmax(160px,1fr) 78px;grid-template-areas:'west north east' 'west center east' 'south south south';gap:8px;min-height:322px}.fast-run-battle-seat{position:relative;align-self:center;justify-self:center;display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:7px;width:min(210px,100%);min-height:58px;padding:7px 9px;border:1px solid #507078;background:#12212aeb;color:#dce7e8;box-shadow:0 8px 16px #0007}.fast-run-battle-seat.north{grid-area:north}.fast-run-battle-seat.east{grid-area:east}.fast-run-battle-seat.west{grid-area:west}.fast-run-battle-seat.south{grid-area:south;width:min(290px,100%);background:#263624f0;border-color:#d9bc61}.fast-run-battle-seat.turn{box-shadow:inset 0 0 0 1px #f4d76a,0 0 19px #ead16659}.fast-run-battle-seat.left{opacity:.56}.fast-run-battle-seat.vacant{display:flex;align-items:center;justify-content:center;color:#8da1a4;border-style:dashed}.fast-run-battle-seat img{width:38px;height:38px;object-fit:cover;border-radius:50%;border:1px solid #708a8c}.fast-run-battle-seat>div{display:grid;min-width:0;gap:2px}.fast-run-battle-seat b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.fast-run-battle-seat small{color:#a7bbc0;font-size:9px}.fast-run-battle-seat-number{position:absolute;left:6px;top:4px;color:#9ab1b6;font:800 8px var(--display)}.fast-run-battle-seat strong{position:absolute;right:7px;bottom:4px;color:#f2d872;font:800 8px var(--display)}.fast-run-card-count{position:absolute;right:7px;top:5px;color:#c8dadd;font-style:normal;font:700 8px var(--display)}.fast-run-card-count em{color:#f5dc79;font-style:normal;font-size:13px}.fast-run-battle-stage .fast-run-last-play{position:absolute;z-index:2;left:50%;top:50%;width:min(330px,44%);min-height:120px;transform:translate(-50%,-38%);padding:12px;border:1px solid #6b9870;background:#0c1a1ce8;box-shadow:0 14px 32px #0008;text-align:center;display:grid;justify-items:center}.fast-run-battle-stage .fast-run-last-play>span{color:#b3d7b4}.fast-run-battle-stage .fast-run-table-cards{justify-content:center}.fast-run-battle-stage .fast-run-table-empty{padding:11px 0}.fast-run-live .fast-run-hand{padding:11px 14px;border-top:1px solid #38515a;background:#111d25}.fast-run-live .fast-run-cards{grid-template-columns:repeat(auto-fit,minmax(36px,1fr));gap:5px;padding-bottom:8px}.fast-run-live .fast-run-card-button{height:66px}.fast-run-live .fast-run-card-button b{font-size:17px}.fast-run-live .fast-run-card-button i{font-size:16px}.fast-run-live .fast-run-log{margin-top:10px}.fast-run-live .fast-run-log>div{max-height:76px}.fast-run-live .fast-run-result,.fast-run-live .fast-run-finished-actions{margin-top:10px}

/* Werewolf keeps the private action panel in the centre and the public seats around it. */
.werewolf-live .werewolf-head{padding-right:92px}.werewolf-live .werewolf-table{display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,.62fr);grid-template-areas:'seats phase';gap:0;margin-top:12px;background:#101921}.werewolf-live .werewolf-room-meta{grid-column:1/-1;min-height:34px}.werewolf-live .werewolf-seat-grid{grid-area:seats;align-content:start;grid-template-columns:repeat(3,minmax(120px,1fr));gap:9px;padding:14px;background:radial-gradient(ellipse at 50% 45%,#26334b 0,#121d29 66%)}.werewolf-live .werewolf-seat{min-height:76px}.werewolf-live .werewolf-phase{grid-area:phase;display:grid;align-content:center;gap:12px;padding:18px;border-left:1px solid #354656;background:#111a25}.werewolf-live .werewolf-role{min-height:104px}.werewolf-live .werewolf-action{min-height:142px}.werewolf-live .werewolf-log{margin-top:10px}.werewolf-live .werewolf-log>div{max-height:80px}

@media(max-width:900px){.game-modal.mini-match{inset:6px;width:auto;height:auto;max-height:none;margin:0;padding:12px;border:0}.game-modal.mini-match::backdrop{background:#05080bbf}.game-modal.mini-match>.modal-close{right:10px;top:10px;width:38px;height:38px}.game-modal.mini-match>.game-help{right:56px;top:10px}.game-modal.mini-match .fast-run-shell,.game-modal.mini-match .werewolf-shell{min-height:calc(100dvh - 36px)}.fast-run-live .fast-run-head,.werewolf-live .werewolf-head{min-height:47px;padding:0 88px 8px 2px}.fast-run-live .fast-run-head .eyebrow,.werewolf-live .werewolf-head .eyebrow{display:none}.fast-run-live .fast-run-head h2,.werewolf-live .werewolf-head h2{font-size:20px}.fast-run-live .fast-run-head>div>span,.werewolf-live .werewolf-head>div>span{font-size:9px}.fast-run-live .fast-run-head-actions,.werewolf-live .werewolf-head-actions{position:absolute;right:52px;top:8px;flex-direction:column;align-items:end;gap:2px}.fast-run-live .fast-run-leave,.werewolf-live .werewolf-leave{height:28px;min-height:28px;padding-inline:7px;font-size:9px}.fast-run-live .fast-run-timer,.werewolf-live .werewolf-timer{font-size:8px}.fast-run-live .fast-run-timer strong,.werewolf-live .werewolf-timer strong{font-size:13px}.fast-run-live .fast-run-room-meta,.werewolf-live .werewolf-room-meta{display:none}.fast-run-battle-stage{min-height:300px;padding:8px}.fast-run-battle-seat-grid{grid-template-columns:minmax(82px,1fr) minmax(128px,1.1fr) minmax(82px,1fr);grid-template-rows:64px minmax(148px,1fr) 64px;min-height:284px;gap:4px}.fast-run-battle-seat{grid-template-columns:31px minmax(0,1fr);gap:4px;min-height:49px;padding:5px}.fast-run-battle-seat.south{width:min(230px,100%)}.fast-run-battle-seat img{width:30px;height:30px}.fast-run-battle-seat b{font-size:9px}.fast-run-battle-seat small{font-size:8px}.fast-run-card-count{font-size:7px}.fast-run-card-count em{font-size:11px}.fast-run-battle-stage .fast-run-last-play{width:min(220px,58%);min-height:100px;padding:8px;transform:translate(-50%,-35%)}.fast-run-battle-stage .fast-run-last-play b{font-size:13px}.fast-run-battle-stage .fast-run-last-play small{font-size:8px}.fast-run-table-card{width:26px;height:37px}.fast-run-table-card b{font-size:11px}.fast-run-table-card i{font-size:10px}.fast-run-live .fast-run-hand{padding:8px}.fast-run-live .fast-run-cards{grid-template-columns:repeat(auto-fit,minmax(30px,1fr));gap:3px;padding:5px 0 7px}.fast-run-live .fast-run-card-button{height:51px;padding:3px}.fast-run-live .fast-run-card-button b{font-size:14px}.fast-run-live .fast-run-card-button i{font-size:13px}.fast-run-live .fast-run-card-button em{font-size:5px}.fast-run-live .fast-run-actions button{min-height:32px;height:32px;padding-inline:5px;font-size:9px}.fast-run-live .fast-run-actions button svg{display:none}.fast-run-live .fast-run-log{display:none}.werewolf-live .werewolf-table{grid-template-columns:1fr;grid-template-areas:'seats' 'phase'}.werewolf-live .werewolf-seat-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:7px}.werewolf-live .werewolf-seat{min-height:55px;padding:5px;grid-template-columns:27px minmax(0,1fr);gap:4px}.werewolf-live .werewolf-seat img{width:25px;height:25px}.werewolf-live .werewolf-seat b{font-size:9px}.werewolf-live .werewolf-seat small{font-size:7px}.werewolf-live .werewolf-phase{padding:10px;border-left:0;border-top:1px solid #354656;gap:7px}.werewolf-live .werewolf-role{min-height:66px}.werewolf-live .werewolf-action{min-height:0}.werewolf-live .werewolf-log{display:none}}

@media(max-width:390px){.fast-run-battle-stage{min-height:272px}.fast-run-battle-seat-grid{grid-template-rows:59px minmax(140px,1fr) 59px;min-height:258px}.fast-run-battle-seat{min-height:45px}.fast-run-battle-seat small,.fast-run-battle-seat-number{display:none}.fast-run-battle-stage .fast-run-last-play{width:64%;min-height:92px}.fast-run-live .fast-run-cards{grid-template-columns:repeat(auto-fit,minmax(27px,1fr))}.fast-run-live .fast-run-card-button{height:47px}.fast-run-live .fast-run-card-button b{font-size:12px}.fast-run-live .fast-run-card-button i{font-size:11px}.fast-run-live .fast-run-actions button{font-size:8px}.werewolf-live .werewolf-seat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.werewolf-live .werewolf-target-list{grid-template-columns:repeat(3,minmax(0,1fr))}}

@media(prefers-reduced-motion:reduce){.fast-run-battle-seat{transition:none}}

/* v1.0.8.22: Fast Run interaction pass. Keep every card and the central play readable without horizontal scrolling. */
.fast-run-live .fast-run-table{min-width:0;overflow:hidden}.fast-run-battle-stage{isolation:isolate}.fast-run-battle-stage:before{z-index:0}.fast-run-battle-seat-grid{pointer-events:none}.fast-run-battle-stage .fast-run-last-play{z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:min(380px,48%);min-height:132px;box-sizing:border-box;border-color:#96bc79;background:#0b1719f5;backdrop-filter:blur(3px)}.fast-run-battle-stage .fast-run-last-play>b{line-height:1.1}.fast-run-battle-stage .fast-run-last-play small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fast-run-battle-stage .fast-run-table-cards{width:100%;min-height:46px;justify-content:center;flex-wrap:nowrap;gap:0;overflow:visible;padding:3px 4px 6px;box-sizing:border-box}.fast-run-battle-stage .fast-run-table-card{width:clamp(24px,2.25vw,34px);height:clamp(35px,3.25vw,46px);margin-left:-4px;flex:0 0 auto;transform-origin:50% 100%}.fast-run-battle-stage .fast-run-table-card:first-child{margin-left:0}.fast-run-table-cards.played .fast-run-table-card{animation:fast-run-play-in .32s cubic-bezier(.18,.78,.25,1.22) both}.fast-run-table-cards.played .fast-run-table-card:nth-child(2){animation-delay:.04s}.fast-run-table-cards.played .fast-run-table-card:nth-child(3){animation-delay:.08s}.fast-run-table-cards.played .fast-run-table-card:nth-child(4){animation-delay:.12s}.fast-run-table-cards.played .fast-run-table-card:nth-child(5){animation-delay:.16s}.fast-run-table-cards.played .fast-run-table-card:nth-child(n+6){animation-delay:.2s}.fast-run-opening-notice{position:absolute;z-index:4;left:50%;top:50%;display:grid;justify-items:center;gap:3px;min-width:146px;padding:8px 13px;transform:translate(-50%,-50%);border:1px solid #f1d46f;background:#172319f2;color:#f5e59b;box-shadow:0 0 0 4px #e4c85a18,0 10px 25px #0008;animation:fast-run-opening-pulse 1.4s ease-in-out infinite}.fast-run-opening-notice small{color:#a9c9aa;font:800 8px var(--display);letter-spacing:1.2px}.fast-run-opening-notice b{font:800 17px var(--display)}.fast-run-opening-notice span{color:#d0dfd1;font-size:10px}.fast-run-live .fast-run-hand{min-width:0;overflow:hidden}.fast-run-live .fast-run-hand>header{min-width:0}.fast-run-live .fast-run-hand>header>div,.fast-run-live .fast-run-hand>header>span{min-width:0}.fast-run-live .fast-run-cards{display:flex;align-items:flex-end;min-width:0;min-height:78px;height:78px;gap:0;padding:10px 3px 12px;overflow:visible}.fast-run-live .fast-run-card-button{flex:1 1 0;min-width:0;width:auto;height:66px;margin-left:-1px;border-radius:4px;transform-origin:50% 100%;will-change:transform;contain:layout paint}.fast-run-live .fast-run-card-button:first-child{margin-left:0}.fast-run-live .fast-run-card-button:not(:disabled):hover,.fast-run-live .fast-run-card-button.selected{z-index:2;transform:translateY(-10px);border-color:#e0bd51}.fast-run-live .fast-run-card-button.dealing{visibility:hidden;pointer-events:none}.fast-run-live .fast-run-actions{min-width:0;flex-wrap:nowrap}.fast-run-live .fast-run-actions button{white-space:nowrap}.fast-run-live .fast-run-actions .ready{border-color:#e0c657;color:#fff0a1;box-shadow:0 0 0 1px #e3c85043}.fast-run-live .fast-run-card-button b{font-size:clamp(11px,1.25vw,17px)}.fast-run-live .fast-run-card-button i{font-size:clamp(10px,1.12vw,16px)}.fast-run-live .fast-run-card-button em{font-size:5px}@keyframes fast-run-play-in{from{opacity:0;transform:translateY(30px) scale(.72) rotate(-5deg)}to{opacity:1;transform:translateY(0) scale(1) rotate(0)}}@keyframes fast-run-opening-pulse{50%{box-shadow:0 0 0 8px #e4c85a0d,0 10px 25px #0008;filter:brightness(1.08)}}
@media(max-width:900px){.fast-run-battle-stage .fast-run-last-play{width:min(244px,64%);min-height:106px}.fast-run-opening-notice{padding:6px 9px;min-width:126px}.fast-run-opening-notice b{font-size:14px}.fast-run-opening-notice span{font-size:8px}.fast-run-live .fast-run-cards{height:61px;min-height:61px;padding:7px 2px 9px}.fast-run-live .fast-run-card-button{height:51px;padding:3px}.fast-run-live .fast-run-card-button b{font-size:clamp(9px,3.4vw,14px)}.fast-run-live .fast-run-card-button i{font-size:clamp(8px,3.1vw,13px)}.fast-run-live .fast-run-card-button em{display:none}.fast-run-live .fast-run-actions button{min-width:0;flex:1 1 0}.fast-run-live .fast-run-actions button span{overflow:hidden;text-overflow:ellipsis}.fast-run-battle-stage .fast-run-table-card{width:clamp(20px,7vw,27px);height:clamp(30px,9vw,39px);margin-left:-5px}.fast-run-battle-stage .fast-run-table-card b{font-size:10px}.fast-run-battle-stage .fast-run-table-card i{font-size:9px}}
@media(max-width:390px){.fast-run-live .fast-run-cards{height:56px;min-height:56px}.fast-run-live .fast-run-card-button{height:47px;padding:2px}.fast-run-live .fast-run-card-button b{font-size:10px}.fast-run-live .fast-run-card-button i{font-size:9px}.fast-run-live .fast-run-actions button{padding-inline:3px;font-size:8px}.fast-run-battle-stage .fast-run-last-play{width:68%}.fast-run-opening-notice{min-width:112px}.fast-run-opening-notice small{font-size:7px}.fast-run-opening-notice b{font-size:12px}}
@media(prefers-reduced-motion:reduce){.fast-run-table-cards.played .fast-run-table-card,.fast-run-opening-notice{animation:none}}

/* v1.0.8.25: reserve the full picker row so the scrollbar is not clipped. */
.world-battle-pet>.pet-stars{height:auto;padding:0;border:0;background:transparent;box-shadow:none;gap:0}
.world-battle-pet>.pet-stars svg{width:13px;height:13px}
.team-dock{height:214px;padding:14px 24px 16px;grid-template-rows:auto minmax(0,1fr);gap:9px}
.team-dock .team-picker{height:156px;min-height:0;padding-bottom:5px;overflow-x:auto;overflow-y:hidden;scrollbar-width:auto;scrollbar-color:#d8bd58 #1b2931;-ms-overflow-style:auto;overscroll-behavior-inline:contain;align-items:flex-start}
.team-dock .team-picker::-webkit-scrollbar{height:11px;display:block}
.team-dock .team-picker::-webkit-scrollbar-track{background:#1b2931;border:1px solid #3b4b54}
.team-dock .team-picker::-webkit-scrollbar-thumb{background:#d8bd58;border:2px solid #1b2931;border-radius:2px}
.team-dock .team-picker::-webkit-scrollbar-thumb:hover{background:#f2db72}
.team-dock .team-pet{flex:0 0 122px;width:122px;min-width:122px;height:136px}
.team-dock .team-pet img{height:78px}
.team-dock .team-pet>span{font-size:10px;line-height:14px}
.team-dock .team-pet>.team-speed{bottom:5px;font-size:8px}

@media(min-width:901px){
  .battle-view.active-view{grid-template-rows:100px minmax(0,1fr) 214px}
}

@media(max-width:560px){
  .battle-view.active-view{grid-template-rows:auto minmax(230px,1fr) 208px}
  .team-dock{height:208px;padding:8px 10px calc(7px + env(safe-area-inset-bottom));grid-template-rows:31px minmax(0,1fr);gap:5px}
  .team-dock .team-picker{height:156px;gap:7px}
  .team-dock .team-pet{flex:0 0 112px;width:112px;min-width:112px;height:136px}
  .team-dock .team-pet img{height:84px}
  .team-dock .team-pet>span{font-size:9px}
}
.world-adventure-fighter .wa-boss-badge{display:flex;align-items:center;gap:5px;margin-bottom:5px;padding:4px 6px;border:1px solid #9a633f;background:#302219;color:#ffc078;font-size:9px;font-weight:800;letter-spacing:.04em}.world-adventure-fighter .wa-boss-badge svg{width:12px;height:12px}.world-adventure-fighter .wa-boss-fortress{border-left-color:#e88b52;box-shadow:0 0 0 1px #e88b5244,0 8px 24px #0008}.world-adventure-fighter.wa-fortress .wa-fighter-meta{animation:wa-fortress-launch .54s ease-out}.wa-projectile.fortress{height:8px;border-radius:2px;background:linear-gradient(90deg,transparent,var(--wa-effect) 16%,#ffd0a2 48%,var(--wa-effect) 82%,transparent);filter:drop-shadow(0 0 9px var(--wa-effect));animation-duration:.62s}.wa-impact.fortress{border-color:#ffbd7f;box-shadow:0 0 18px #ef9a5b99}.wa-impact.fortress:after{content:"";position:absolute;inset:12px;border-radius:50%;background:#ffd0a2;box-shadow:0 0 16px #ef9a5b}
@keyframes wa-fortress-launch{0%,100%{transform:translateX(0)}28%{transform:translateX(-5px) scale(1.015);filter:brightness(1.22)}58%{transform:translateX(3px)}}
.world-adventure-rogue-panel{position:relative;z-index:2;margin:0 24px 24px;padding:22px;background:#101d18;border:1px solid #30463d;color:#e8efe9}.world-adventure-rogue-panel header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.world-adventure-rogue-panel h3{margin:4px 0;font-size:22px}.world-adventure-rogue-panel p{margin:5px 0;color:#9fb1a7;font-size:12px}.world-adventure-rogue-panel header small{color:#68d49e;font:800 9px var(--display)}.wa-rogue-pets{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;margin:18px 0}.wa-rogue-pets label{position:relative;display:grid;gap:4px;padding:9px;background:#17251f;border:1px solid #30463d;cursor:pointer}.wa-rogue-pets label:has(input:checked){border-color:#68d49e;box-shadow:inset 0 0 0 1px #68d49e}.wa-rogue-pets input{position:absolute;right:7px;top:7px;accent-color:#68d49e}.wa-rogue-pets img{width:54px;height:54px;object-fit:contain}.wa-rogue-pets b{font-size:12px}.wa-rogue-pets small{font-size:10px;color:#9fb1a7}.wa-rogue-map{display:grid;grid-template-columns:repeat(4,minmax(110px,1fr));gap:12px;margin-top:20px}.wa-rogue-layer{display:grid;gap:8px}.wa-rogue-layer>small{color:#8ca097;font-size:11px;text-align:center}.wa-rogue-layer>div{display:grid;gap:10px}.wa-rogue-node{min-height:66px;border:1px solid #416250;background:#17251f;color:#e8efe9;display:grid;place-items:center;gap:3px;padding:8px;cursor:pointer}.wa-rogue-node:disabled{opacity:.32;cursor:not-allowed}.wa-rogue-node.resolved{border-color:#65766d;background:#18201c}.wa-rogue-node.money{border-color:#b8904c}.wa-rogue-node.boss{border-color:#e36f63;box-shadow:0 0 20px #e36f6333}.wa-rogue-node svg{width:18px}.wa-rogue-node b{font-size:11px}.wa-rogue-node span{font-size:10px;color:#e1b954}.wa-rogue-battle{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:18px;margin:22px 0}.wa-rogue-fighter{padding:18px;background:#17251f;border-left:3px solid #68d49e;display:grid;gap:8px}.wa-rogue-fighter.enemy{border-left-color:#ee7168;text-align:right}.wa-rogue-fighter span{color:#9fb1a7;font-size:12px}.wa-rogue-hand,.wa-rogue-switches{display:flex;flex-wrap:wrap;gap:8px}.wa-rogue-hand button,.wa-rogue-switches button{padding:9px 12px;border:1px solid #416250;background:#17251f;color:#d9e8de;cursor:pointer}.wa-rogue-hand button:hover,.wa-rogue-switches button:not(:disabled):hover{border-color:#68d49e}.wa-rogue-switches{margin-top:12px}.wa-rogue-switches button:disabled{opacity:.35;cursor:not-allowed}@media(max-width:700px){.world-adventure-rogue-panel{margin:0 10px 12px;padding:14px}.wa-rogue-map{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.wa-rogue-node{min-height:58px;padding:4px}.wa-rogue-node b{font-size:9px}.wa-rogue-node span{font-size:8px}.wa-rogue-battle{gap:7px}.wa-rogue-fighter{padding:10px;font-size:11px}}
.draw-pity-badge{display:flex;align-items:center;justify-content:center;gap:7px;margin:0 auto 12px;padding:8px 12px;border:1px solid #edc95a;background:#302c1b;color:#ffe28d;font:800 12px var(--display);box-shadow:0 0 20px #e8c95a44}.draw-pity-badge svg{width:16px;height:16px}
