/* The match is the entire surface. The lobby and the pink book site return on exit. */
body.arena-playing #pause-overlay{position:absolute;inset:0;z-index:20;border-radius:0;background:#080b24c9;padding:14px;overflow:auto}
body.arena-playing .pause-card{width:min(340px,100%);max-height:calc(100dvh - 28px);padding:22px}
@media(max-height:560px) and (orientation:landscape){body.arena-playing .pause-card{width:min(540px,100%);display:grid;grid-template-columns:1fr 1fr;gap:10px 24px;align-items:start;padding:18px 24px}body.arena-playing .pause-card h2{grid-column:1/3;margin:0}body.arena-playing .pause-card .primary{grid-column:1;grid-row:2;margin-top:6px}body.arena-playing .pause-card .text-button{grid-column:1;grid-row:3;margin-top:0}body.arena-playing .pause-card .audio-settings{grid-column:2;grid-row:2/4;margin-top:0}}
.arena-cabinet{display:contents}.arena-crowd[hidden]{display:none}
html.hockey-host-playing,html.hockey-host-playing body{overflow:hidden!important}
html.hockey-host-playing iframe.hockey-host-frame{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;min-height:0!important;max-height:none!important;border:0!important;border-radius:0!important;z-index:10000!important;background:#080b24}
body.arena-playing{overflow:hidden;background:#080b24}
body.arena-playing .masthead,body.arena-playing .heading,body.arena-playing .opponents-panel,body.arena-playing .friends-panel,body.arena-playing .back-link,body.arena-playing .standalone-tips,body.arena-playing .table-caption,body.arena-playing #pending-score,body.arena-playing #quick-start{display:none!important}
body.arena-playing .arena{position:fixed!important;inset:0!important;display:flex!important;justify-content:center;align-items:center;width:100%!important;max-width:none!important;margin:0!important;padding:8px max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));isolation:isolate;overflow:hidden;z-index:10;--court-width:min(580px,calc(100vw - 30px),calc((100dvh - 164px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*2/3));background:#080b24 url('assets/arena-night-v9.webp') center/cover no-repeat}
body.arena-playing .arena:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#03051a28,transparent 35%,transparent 65%,#03051a28);pointer-events:none;z-index:-1}
body.arena-playing .arena-cabinet{--board-width:var(--court-width);position:relative;display:flex;flex-direction:column;align-items:stretch;width:var(--board-width);max-width:580px;flex-shrink:0;z-index:2;filter:drop-shadow(0 14px 28px #000a)}
body.arena-playing .scoreboard{position:relative!important;inset:auto!important;display:flex;min-height:86px!important;height:86px;margin:0 0 6px!important;width:100%!important;padding:7px 12px!important;border-radius:18px;gap:5px}
body.arena-playing .scoreboard .competitor{font-size:12px;flex:1;flex-direction:column!important;align-items:center!important;gap:1px!important}
body.arena-playing .scoreboard .competitor>span{max-width:120px;overflow-wrap:normal}
body.arena-playing .score-avatar{display:block!important;width:44px!important;height:44px!important}
body.arena-playing .scoreboard .white-handle{width:36px;height:32px;margin:5px 0}
body.arena-playing .arcade-wordmark{font-size:21px;letter-spacing:3px}
body.arena-playing .goals{font-size:39px;gap:7px}body.arena-playing .goal-divider{font-size:24px}
body.arena-playing .table-wrap{width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;border-radius:28px;flex-shrink:0}
body.arena-playing .arena-controls{position:relative!important;inset:auto!important;display:flex!important;justify-content:space-between;align-items:center;gap:8px;width:100%!important;margin:0!important;padding:5px 2px 0!important;min-height:48px;background:#0b102abf;border-radius:0 0 17px 17px}
body.arena-playing .arena-controls .icon-button{width:44px;min-height:44px;height:44px;flex-shrink:0;font-size:23px}
body.arena-playing .arena-controls #sound{order:3}body.arena-playing .arena-controls #scores-mobile{display:none!important}
body.arena-playing .arena-controls .live-points{font-size:12px;gap:5px;line-height:1.1}body.arena-playing .arena-controls .live-points strong{font-size:24px}
body.arena-playing .arena-controls .timer{font-size:12px;color:#eee1f4;order:2}
/* A small theatre around the cabinet; all actors stand on lit platforms. */
.arena-crowd{position:absolute;inset:0;pointer-events:none;z-index:1;--actor-size:clamp(145px,24vw,260px);--stands-offset:min(430px,calc(25vw + var(--court-width)/4))}
.crowd-fan{position:absolute;pointer-events:auto;width:var(--actor-size);height:var(--actor-size);border:0;background:none;padding:0;filter:drop-shadow(0 7px 6px #02071599);transform:none;touch-action:manipulation}
.crowd-fan:focus-visible{outline:3px solid #ffe0a3;outline-offset:-14px;border-radius:14px}
.spectator-look,.spectator-motion{position:absolute;inset:0;display:block;transform-origin:50% 91%}
.spectator-look{transition:transform 180ms cubic-bezier(.22,.8,.25,1)}
.spectator-motion{animation:spectatorWatch 5.8s cubic-bezier(.45,0,.55,1) infinite;animation-delay:-1.2s}
.fan-child .spectator-motion{animation-duration:4.9s;animation-delay:-2.4s}.fan-father .spectator-motion{animation-duration:6.6s;animation-delay:-3.8s}
.fan-cat .spectator-motion{animation-duration:5.3s;animation-delay:-.7s}.fan-toy_mouse .spectator-motion{animation-duration:4.4s;animation-delay:-3.2s}
.human-sprite{position:absolute;inset:0;overflow:hidden;display:block}.human-sprite img{position:absolute;max-width:none;pointer-events:none}
.crowd-fan .character{width:100%;height:100%;display:block}.crowd-fan .portrait-art{border:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important}
.crowd-fan .face-layer{transition:none!important}.fan-father .human-sprite{transform:scaleX(-1)}
.spectator-plinth{position:absolute;bottom:1%;left:24%;width:52%;height:11%;background:linear-gradient(170deg,#344566,#15233d 55%,#090e22);border-top:2px solid #83eeff;box-shadow:0 7px 15px #02040cb3;transform:perspective(180px) rotateX(22deg);border-radius:50% 50% 5px 5px}
.spectator-rail{position:absolute;bottom:12%;left:26%;width:48%;height:1px;background:#c9ddff66;box-shadow:0 13px 0 #43526e55;pointer-events:none}
.crowd-fan:not(.book-bust) .spectator-rail{display:none}.book-bust .spectator-motion{bottom:17%;overflow:hidden}.book-bust .spectator-plinth{bottom:11%;height:10%}.book-bust .spectator-rail{bottom:20%;height:7px;background:linear-gradient(#a8d7e8,#395076);border-radius:4px}
.fan-mother{left:calc(50% - var(--stands-offset) - var(--actor-size)/2);top:20%}
.fan-child{left:calc(50% - var(--stands-offset) - var(--actor-size)/2);bottom:8%}
.fan-father{right:calc(50% - var(--stands-offset) - var(--actor-size)/2);top:34%}
.fan-cat{right:calc(50% - var(--stands-offset) - var(--actor-size)/2);bottom:6%;--actor-size:clamp(120px,19vw,205px)}
.fan-toy_mouse{left:calc(50% - var(--stands-offset) - var(--actor-size)/2 - 65px);top:49%;--actor-size:clamp(90px,12vw,140px)}
.arena-light-rig{display:none;pointer-events:none;position:absolute;inset:0;overflow:hidden;z-index:3;mix-blend-mode:screen}
body.arena-playing .arena-light-rig{display:block}
.spotlight{position:absolute;top:-7%;left:12%;width:37vw;height:145vh;transform-origin:50% 0;clip-path:polygon(49% 0,51% 0,100% 100%,0 100%);background:linear-gradient(180deg,#d8f5ff14,#77eaff16 25%,#90ddff05 80%,transparent);animation:spotlightSweep 12s cubic-bezier(.45,0,.55,1) infinite;animation-delay:-3s}
.spotlight:nth-child(2){left:auto;right:10%;background:linear-gradient(180deg,#fff0df12,#fdb6dd13 30%,#f6c2e603 80%,transparent);animation-duration:15s;animation-delay:-8s;animation-direction:reverse}
.spotlight:nth-child(3){left:38%;width:22vw;opacity:.55;animation-duration:19s;animation-delay:-13s}
.arena-goal .spotlight,.arena-win .spotlight{opacity:.9}
.crowd-paused .spectator-motion,.crowd-paused .spotlight,.page-hidden .spectator-motion,.page-hidden .spotlight{animation-play-state:paused}
.crowd-still .spectator-motion,.crowd-still .spotlight{animation:none;transform:none}.crowd-still .spectator-look{transition:none!important;transform:none!important}
@keyframes spectatorWatch{0%,100%{transform:translateY(0) rotate(-.7deg)}42%{transform:translateY(-3px) rotate(1.1deg)}74%{transform:translateY(-1px) rotate(.2deg)}}
@keyframes spotlightSweep{0%,100%{transform:rotate(-25deg)}50%{transform:rotate(24deg)}}
.arena-goal .arena-cabinet:after,.arena-win .arena-cabinet:after{content:"";position:absolute;inset:-5px;border:2px solid #ffe8b7;border-radius:25px;box-shadow:0 0 28px #ffc68780;pointer-events:none;animation:arenaCheer 1600ms cubic-bezier(.22,.8,.25,1) both}
.result-character{width:165px;margin:-6px auto 0}.result-character .portrait-art{background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
.result-dialog.won{border:2px solid #ffe0a3}.result-dialog.won h2{color:#fff0bd}.result-dialog.won .result-stars{color:#ffe0a3}
@keyframes arenaCheer{0%{opacity:0}15%,65%{opacity:1}100%{opacity:0}}
@media(max-width:1100px){.arena-crowd{--actor-size:210px}}
@media(max-width:800px){.arena-crowd{--actor-size:185px}.fan-cat{--actor-size:130px}.fan-toy_mouse{--actor-size:100px;left:calc(50% - var(--stands-offset) - var(--actor-size)/2)}}
@media(max-width:600px) and (orientation:portrait){body.arena-playing .arena{--court-width:min(calc(100vw - 108px),calc((100dvh - 180px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*2/3))}.arena-crowd{--actor-size:126px}.fan-mother{top:26%}.fan-child{bottom:20%}.fan-father{top:40%}.fan-cat{bottom:19%;--actor-size:93px}.fan-toy_mouse{top:47%;--actor-size:70px}body.arena-playing .scoreboard{padding-inline:8px!important;position:relative!important;width:calc(100vw - 26px)!important;align-self:center}body.arena-playing .scoreboard .competitor{font-size:11px}body.arena-playing .scoreboard .competitor>span{max-width:100px}body.arena-playing .arena-controls{width:calc(100vw - 26px)!important;align-self:center;padding-inline:8px!important}}
@media(max-height:560px) and (orientation:landscape){body.arena-playing .arena-cabinet{--board-width:calc((100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*2/3);margin-inline:0}body.arena-playing .scoreboard{position:absolute!important;inset:0 auto auto calc(100% + 18px)!important;width:190px!important;height:95px;min-height:95px!important}body.arena-playing .arena-controls{position:absolute!important;inset:auto auto 0 calc(100% + 18px)!important;width:190px!important;flex-wrap:wrap;justify-content:center;padding:8px!important}body.arena-playing .arena-controls .live-points{order:0;flex-basis:100%;justify-content:center}body.arena-playing .arena-controls #sound{order:3}body.arena-playing .arena-controls .timer{order:4;flex-basis:100%;text-align:center}body.arena-playing .goals{font-size:32px}body.arena-playing .arcade-wordmark{font-size:16px}body.arena-playing .score-avatar{width:36px!important;height:36px!important}body.arena-playing .scoreboard .white-handle{width:30px;height:27px}body.arena-playing .scoreboard .competitor{font-size:11px}.arena-crowd{--actor-size:160px;--stands-offset:calc(50vw - 100px)}.fan-mother{left:20px;top:6%}.fan-child{left:60px;bottom:5%}.fan-father{right:15px;top:35%;--actor-size:125px}.fan-cat{right:115px;bottom:31%;--actor-size:95px}.fan-toy_mouse{display:none}.result-character{width:110px}}
@media(max-width:600px) and (max-height:560px) and (orientation:landscape){body.arena-playing .arena-cabinet{margin-right:175px}body.arena-playing .scoreboard,body.arena-playing .arena-controls{width:165px!important;left:calc(100% + 10px)!important}.arena-crowd{--actor-size:110px}.fan-mother{left:0;top:15%}.fan-child{display:none}.fan-father{display:none}.fan-cat{right:10px;bottom:23%;--actor-size:75px}}
@media(max-height:680px) and (orientation:portrait){.arena-crowd{--actor-size:96px}.fan-toy_mouse{display:none}.fan-mother{top:24%}.fan-father{top:34%}.fan-child{bottom:21%}.fan-cat{bottom:19%;--actor-size:77px}body.arena-playing .arena-controls .live-points>span:last-child{display:none}}
@media(prefers-reduced-motion:reduce){.crowd-fan{transition:none}.arena-goal .arena-cabinet:after,.arena-win .arena-cabinet:after{animation:none;opacity:1}.face-layer{transition:none!important}}
/* The portrait illustration keeps the stars and light tubes visible on phones. */
@media(max-width:600px) and (orientation:portrait){body.arena-playing .arena{background-image:url('assets/arena-portrait-v9.webp')}}
@media(max-width:360px){body.arena-playing .arena{--court-width:min(calc(100vw - 80px),calc((100dvh - 180px)*2/3))}.arena-crowd{--actor-size:90px}body.arena-playing .goals{font-size:32px}body.arena-playing .arcade-wordmark{font-size:17px}body.arena-playing .scoreboard .competitor>span{max-width:62px;overflow-wrap:anywhere}}
@media(max-height:560px) and (orientation:landscape){
 body.arena-playing .scoreboard .competitor>span{max-width:49px;overflow-wrap:anywhere;white-space:normal;line-height:1.1}
 body.arena-playing .arena-controls{display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px;gap:5px;min-height:0}
 body.arena-playing .arena-controls .live-points{grid-column:1/4;grid-row:1}
 body.arena-playing #pause{grid-column:1;grid-row:2}
 body.arena-playing .arena-controls .timer{grid-column:2;grid-row:2}
 body.arena-playing .arena-controls #sound{grid-column:3;grid-row:2}
}

@media(prefers-reduced-motion:reduce){.spectator-motion,.spotlight{animation:none!important;transform:none!important}.spectator-look{transition:none!important;transform:none!important}}
/* Give the portrait spectators room above the controls and below the scores. */
@media(max-width:600px) and (orientation:portrait){.arena-crowd{--actor-size:110px}.fan-mother{top:30%}.fan-child{bottom:22.5%}.fan-cat{bottom:23%;--actor-size:83px;right:calc(50% - var(--stands-offset) - var(--actor-size)/2 + 8px)}}
@media(max-height:680px) and (orientation:portrait){.arena-crowd{--actor-size:96px}.fan-mother{top:27%}.fan-child{bottom:22%}.fan-cat{bottom:23%;--actor-size:72px}}

/* A quiet transport above the cabinet, with full-size finger targets. */
.music-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;width:min(580px,calc(100% - 28px));min-height:60px;margin:0 auto;padding:8px 4px;color:#f5eefa;background:#10152f;border-radius:10px;direction:ltr}
.music-song{display:flex;flex-direction:column;min-width:0;padding-inline:8px;gap:2px;text-align:start}
#music-number{font-size:11px;font-weight:800;color:#b9c5df;font-variant-numeric:tabular-nums;direction:ltr}
#music-track{font-size:12px;font-weight:800;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.25}
.music-buttons{display:flex;flex:none;gap:2px}.music-buttons button{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:7px;color:#e8e9f7;background:transparent;box-shadow:none;cursor:pointer;touch-action:manipulation}
.music-buttons button:hover{background:#2b3151}.music-buttons button:active{background:#39415e}.music-buttons .ui-icon{width:18px;height:18px}
#music-toggle{color:#9cf9ff}.music-bar[data-state=playing] #music-toggle{background:#232d49}
body.arena-playing .music-bar{width:100%;align-self:center;margin:0 0 6px;background:#0e1535ed}
body.arena-playing .arena{--court-width:min(580px,calc(100vw - 30px),calc((100dvh - 230px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*2/3))}
@media(max-width:600px) and (orientation:portrait){body.arena-playing .arena{--court-width:min(calc(100vw - 108px),calc((100dvh - 246px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*2/3))}body.arena-playing .music-bar{width:calc(100vw - 26px)}}
@media(max-width:360px) and (orientation:portrait){body.arena-playing .arena{--court-width:min(calc(100vw - 80px),calc((100dvh - 246px)*2/3))}.music-bar{gap:3px}.music-song{padding-inline:5px}.music-buttons{gap:0}}
@media(max-height:560px) and (orientation:landscape){body.arena-playing .music-bar{position:absolute;top:106px;left:calc(100% + 18px);width:190px;flex-direction:column;gap:0;padding:8px 3px;margin:0;align-items:stretch}.music-song{gap:2px;padding-inline:7px}.music-buttons{justify-content:space-between}.music-buttons button{width:44px}.music-bar #music-track{font-size:11px}}
@media(max-width:600px) and (max-height:560px) and (orientation:landscape){body.arena-playing .music-bar{left:calc(100% + 10px);width:176px}.music-buttons button{width:44px;min-width:44px}.music-buttons{gap:0}}

/* Publiken i 3D (publik3d.mjs, 2026-11-24): de målade figurerna döljs när 3D-figurerna står på fötterna. Musen är målad. */
.publik-3d-yta{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}
.arena-crowd.publik-3d .crowd-fan:not(.fan-toy_mouse) .spectator-look,.arena-crowd.publik-3d .crowd-fan:not(.fan-toy_mouse) .spectator-rail{visibility:hidden}
.arena-crowd.publik-3d .crowd-fan:not(.fan-toy_mouse){filter:none}
.arena-crowd.publik-3d .crowd-fan:not(.fan-toy_mouse) .spectator-plinth::after{content:'';position:absolute;left:22%;right:22%;top:-9%;height:42%;border-radius:50%;background:radial-gradient(closest-side,#020611b3,#02061100);pointer-events:none}
.arena-crowd.publik-3d .crowd-fan:not(.fan-toy_mouse):focus-visible{outline-offset:-4px}
