/* MK4 scope: only activated for Marble King. No global game styling changed. */
body.mk4-shell-open .boardwrap>#board{visibility:hidden!important;pointer-events:none!important}
body.mk4-shell-open .boardwrap>#gameModuleViewport{display:flex!important;position:absolute!important;inset:2px!important;overflow:hidden!important;z-index:40!important;background:transparent!important;pointer-events:auto!important}
body.mk4-shell-open #mk4BoardFrame{display:block;width:100%;height:100%;border:0;background:transparent;overflow:hidden}
body.mk4-shell-open #gameModuleViewport~:not(#onlineReactionLayer):not(.onlineDoseBoardFlash){pointer-events:none!important;opacity:0!important}
body.mk4-shell-open #scoreModArea .scoreCard{position:relative;overflow:hidden}
body.mk4-shell-open #scoreModArea .scoreCard>.score{visibility:hidden!important}
.mk4-team{display:none}
body.mk4-shell-open #scoreModArea .scoreCard .mk4-team{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px 8px;color:#e7f6ff;z-index:2;font-family:system-ui,sans-serif}
.mk4-team-name{display:flex;gap:5px;align-items:center;justify-content:center;font-size:clamp(10px,2.6vw,12px);font-weight:900;letter-spacing:.015em;max-width:100%;white-space:nowrap}
.mk4-ball{width:15px;height:15px;border-radius:50%;border:1px solid rgba(255,255,255,.7);background:radial-gradient(circle at 30% 24%,#fff,#34aafa 38%,#163ec6 80%)}
.mk4-team-2 .mk4-ball{background:radial-gradient(circle at 30% 24%,#fff,#ff83bd 40%,#bb225e 80%)}
.mk4-score{font-size:clamp(19px,6vw,30px);font-weight:950;line-height:1.2;font-variant-numeric:tabular-nums}
.mk4-turn{font-size:9px;color:#acbdcd;font-weight:700}
.mk4-crown:empty{display:none}
.mk4-king .mk4-crown{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;font-size:clamp(12px,3vw,15px);line-height:1;filter:drop-shadow(0 0 4px #ffd35b)}
.mk4-active .mk4-team-name{color:#fff}
#mk4Message{display:none}
body.mk4-shell-open .turnCard{position:relative}
body.mk4-shell-open .turnCard #mk4Message{position:absolute;inset:1px;z-index:5;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.35;padding:5px 14px;background:rgba(7,15,33,.94);border-radius:inherit;color:#dfedff;font:800 clamp(10px,2.7vw,13px)/1.3 system-ui,sans-serif}
body.mk4-shell-open #undoBtn{opacity:.25!important;pointer-events:none!important}
body.mk4-shell-open #starflightCanvas{opacity:var(--starflight-opacity,.75)!important}

body.mk4-shell-open #mk4ScreenStars{position:fixed;inset:0;width:100vw;height:100dvh;z-index:2;pointer-events:none;opacity:.68;mix-blend-mode:screen}

/* MK8 – Hide only Marble King's redundant round/status card.
   Same layout rule as Marble-BÄNG; keep the reaction/message row,
   shared scoreboard and the original action/music controls unchanged. */
body.mk4-shell-open[data-score-mod-view="score"] .turnCard,
body.mk4-shell-open[data-score-mod-view="mod"] .turnCard{display:none!important;}
body.mk4-shell-open .boardwrap{flex:1 1 0!important;min-height:0!important;}

/* MK10: skin choices opened from existing score cards, never global skin editor CSS. */
.mk10-skin-backdrop{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;background:rgba(3,8,20,.70);padding:16px}
.mk10-skin-card{width:min(340px,95vw);border:1px solid rgba(116,216,255,.5);border-radius:16px;background:#111d34;box-shadow:0 14px 44px rgba(0,0,0,.6);display:grid;gap:15px;padding:18px;color:#f6faff;font:800 12px system-ui}
.mk10-skin-card select,.mk10-skin-card button{min-height:44px;border-radius:10px;border:1px solid rgba(123,213,255,.4);background:#182f52;color:#f6faff;padding:8px;font:800 13px system-ui}
body.mk4-shell-open #scoreModArea .scoreCard{cursor:pointer}

/* MK18: only Marble King replaces Go skin controls inside shared settings. */
#mk18SkinDirect[hidden],#mk18SkinGraphics[hidden]{display:none!important}
body.mk4-shell-open #mainMenuDetails .compactSkinDirect:not(.mk18SkinDirect){display:none!important}
body.mk4-shell-open #visualSettingsHost .compactSkinSettingsSection:not(.mk18SkinGraphics){display:none!important}
body.mk4-shell-open .mk18SkinDirectBtns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.mk4-shell-open .mk18SkinDirectBtns button{display:grid;place-items:center;min-height:46px;cursor:pointer;touch-action:manipulation}
body.mk4-shell-open .mk18SkinDirectBtns canvas{display:block;width:38px;height:38px;border-radius:50%;pointer-events:none}
body.mk4-shell-open .mk18SkinGraphicsChoices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.mk4-shell-open .mk18SkinGraphicsChoices canvas{display:block;width:42px;height:42px;border-radius:50%;pointer-events:none}
body.mk4-shell-open .mk18-team-skin{width:17px;height:17px;flex:0 0 17px;border-radius:50%;pointer-events:none}

/* MK20: native score card only; no changes to other games or global HUD. */
@keyframes mk20MarbleTurnGlow {
  0% {filter:drop-shadow(0 0 0 rgba(112,234,255,0));transform:scale(1)}
  32% {filter:drop-shadow(0 0 7px rgba(112,234,255,.92));transform:scale(1.14)}
  100% {filter:drop-shadow(0 0 0 rgba(112,234,255,0));transform:scale(1)}
}
body.mk4-shell-open .mk20-turn-pulse .mk18-team-skin{animation:mk20MarbleTurnGlow .65s ease-out 1}
@media(prefers-reduced-motion:reduce){body.mk4-shell-open .mk20-turn-pulse .mk18-team-skin{animation:none}}

/* MK25: Space is the only Marble King arena. Global theme choices are restored on exit. */
body.mk4-shell-open #themeSel option[value="holz"]{display:none!important}
body.mk4-shell-open .v495AtmosLayer,body.mk4-shell-open .v1005AtmosMaskStack{display:none!important}
body.mk4-shell-open #mk4ScreenStars{display:none!important}

/* Space-only visual treatment even when the previous game used Holz; no saved theme changes. */
body.mk4-shell-open[data-theme="holz"]{background:radial-gradient(ellipse at 50% 28%,#15233d 0%,#070d1b 62%,#030612 100%)!important}
/* Keep HUD colours in Space mode without touching persisted Go-Bäng preferences. */
body.mk4-shell-open{
 --bg1:#060010;--bg2:#17032d;--cyan:#2ef3ff;--pink:#ff45cf;
 --yellow:#ffef52;--lime:#84ff58;--orange:#ffab2d;
 --ink:#edf3ff;--muted:#a8afcc;--panelA:rgba(22,18,52,.96);
 --panelB:rgba(8,7,25,.96);--line:rgba(126,141,255,.2);
 --grid:rgba(46,243,255,.72);--beam:rgba(255,69,207,.08);
 --bubbleBorder:rgba(255,69,207,.24);--instructionBorder:rgba(46,243,255,.18)
}
