:root{--bg:#0b1520;--bg2:#132432;--ink:#f3f1e6;--muted:#9aa9a6;--line:#2b4144;--lime:#c7f15d;--coral:#fc7666;--grass:#225b44;--bright:#2b8160;--font:Inter, "Arial Narrow", "Helvetica Neue",Arial,"Hiragino Kaku Gothic ProN",sans-serif;font-synthesis:none}
*{box-sizing:border-box}html,body{padding:0;margin:0;width:100%;min-width:320px;height:100%;background:var(--bg);overscroll-behavior:none;color:var(--ink);-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}button{font:inherit;cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none}button:focus-visible{outline:2px solid white;outline-offset:3px}button:active{transform:scale(.96)}[hidden]{display:none!important}
body{font-family:var(--font);-webkit-font-smoothing:antialiased;overflow:hidden}.app{width:min(100%,850px);height:100dvh;min-height:0;margin:0 auto;display:flex;flex-direction:column;overflow:hidden;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);position:relative;background:radial-gradient(ellipse 70% 56% at 45% 38%,rgba(41,81,72,.14),transparent),var(--bg)}
.masthead{flex:0 0 54px;min-height:54px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(186,224,200,.11)}.identity{display:flex;align-items:center;gap:10px}.mark{height:30px;width:30px;display:grid;place-items:center;background:var(--lime);color:var(--bg);border-radius:5px;font-size:24px;font-weight:900;transform:rotate(-7deg);box-shadow:3px 3px 0 rgba(199,241,93,.16)}.brand{display:flex;flex-direction:column;gap:2px}.brand strong{font-size:16px;letter-spacing:-.07em;line-height:1;font-weight:950}.brand strong span{color:var(--lime);padding-left:3px}.brand small{font-weight:700;font-size:7px;letter-spacing:.16em;color:#91a19b}.mast-actions{display:flex;gap:7px}.utility{border:1px solid rgba(200,235,215,.2);background:rgba(255,255,255,.025);width:36px;height:34px;border-radius:6px;color:var(--ink);display:grid;place-items:center;font-size:16px}.utility[aria-pressed=true]{border-color:var(--lime);color:var(--lime)}
.scoreboard{flex:0 0 76px;padding:8px 14px;display:grid;grid-template-columns:minmax(0,1fr) 112px minmax(0,1fr);gap:3px;align-items:center;max-width:540px;width:100%;margin:0 auto}.team{display:flex;align-items:center;gap:7px;min-width:0}.team.away{justify-content:flex-end;text-align:right}.team>div{display:flex;flex-direction:column;min-width:0;gap:4px}.team-label{font-size:9px;letter-spacing:.18em;color:var(--muted);font-weight:900}.team strong{font-size:10px;letter-spacing:.02em;white-space:nowrap;font-weight:900}.kit-indicator{width:8px;height:27px;flex:none;border-radius:2px}.home-kit{background:var(--lime);box-shadow:0 0 13px #b5e95d47}.away-kit{background:var(--coral);box-shadow:0 0 13px #fb746c47}.match-result{text-align:center;align-self:center}.scoreline{font-size:32px;display:flex;justify-content:center;gap:10px;align-items:center;line-height:1;font-weight:950;font-variant-numeric:tabular-nums;letter-spacing:-.06em}.score-sep{color:#70887b;font-size:21px;font-weight:400}.clock-line{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:5px;color:#bdd5bd;font-size:9px;font-weight:850;letter-spacing:.055em}.clock-line span:last-child{color:#7c9b8a;letter-spacing:.09em;font-size:8px}.live-beacon{height:5px;width:5px;border-radius:50%;background:var(--lime);box-shadow:0 0 10px var(--lime)}
.arena{min-height:0;flex:1 1 auto;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0 12px}.pitch-topline,.pitch-bottomline{flex:0 0 18px;width:min(100%,440px);display:flex;justify-content:space-between;align-items:center;gap:5px;color:#94ad9c;font-size:9px;font-weight:850;letter-spacing:.08em}.pitch-topline{padding:0 6px 3px}.pitch-bottomline{padding:4px 6px 0}.grass-dot{display:inline-block;width:6px;height:6px;border-radius:1px;background:#99b894;margin-right:5px}.touch-legend{display:flex;gap:5px;align-items:center;color:#6b9086}.legend-ring{border:2px solid var(--lime);height:10px;width:10px;border-radius:50%;display:inline-block}.pitch-bottomline #actionStatus{font-weight:750;color:var(--lime);text-align:right}
.pitch-shell{position:relative;flex:1 1 auto;min-height:0;max-width:100%;aspect-ratio:420/620;border:3px solid #3f6455;outline:1px solid #0a3025;border-radius:10px;overflow:hidden;box-shadow:0 12px 35px #0008,0 0 0 5px rgba(35,60,54,.37);isolation:isolate;background:#235c43}#pitch{display:block;width:100%;height:100%;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}.pitch-shell::after{content:"";position:absolute;pointer-events:none;inset:0;border:1px solid rgba(253,254,241,.19);border-radius:7px;mix-blend-mode:screen}
.pitch-message{pointer-events:none;position:absolute;z-index:2;left:0;right:0;top:30%;display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;opacity:0;transform:translateY(15px) scale(.86);transition:opacity .25s,transform .3s}.pitch-message.show{opacity:1;transform:translateY(0) scale(1)}.pitch-message span{display:block;letter-spacing:.24em;font-weight:900;font-size:10px;color:#fff;text-shadow:1px 2px 7px #000a}.pitch-message strong{font-weight:1000;font-size:clamp(35px,10vw,62px);letter-spacing:-.075em;color:var(--lime);font-style:italic;text-shadow:2px 4px 0 #153d2d,0 0 24px #0005}
.game-overlay{position:absolute;z-index:5;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;background:linear-gradient(160deg,rgba(9,27,33,.81),rgba(7,23,28,.91) 53%,rgba(8,38,32,.86));backdrop-filter:blur(5px);padding:24px 15px}.overlay-eyebrow{font-size:9px;font-weight:900;letter-spacing:.23em;color:var(--lime);white-space:nowrap}.overlay-ball{width:84px;height:84px;display:grid;place-items:center;border:2px solid var(--lime);border-radius:50%;font-size:41px;color:var(--lime);transform:rotate(-15deg);margin:19px 0 11px;position:relative;box-shadow:0 0 0 10px #bfe95d14}.overlay-ball::after{content:"";position:absolute;inset:19px;border:2px dashed var(--lime);border-radius:50%}.game-overlay h1{font-size:clamp(42px,11vw,65px);font-weight:950;letter-spacing:-.09em;line-height:.89;margin:16px 0 15px}.game-overlay h1 em{font-style:normal;color:var(--lime)}.game-overlay p{font-size:12px;color:#c5d6cd;line-height:1.9;margin:0 0 23px}.primary-start{border:0;background:var(--lime);color:#0c2925;min-width:195px;min-height:50px;padding:0 20px 0 27px;border-radius:5px;box-shadow:0 6px 0 #4d7a34,0 12px 26px #091b19a6;display:flex;align-items:center;justify-content:space-between;gap:35px;font-size:15px;letter-spacing:.07em;font-weight:950}.primary-start span{font-size:21px}.primary-start:hover{filter:brightness(1.07)}.overlay-hint{font-weight:850;font-size:9px;letter-spacing:.18em;color:#a4bdb3;margin-top:28px}.game-overlay.compact{background:#091e24dd;gap:12px}.compact h2{font-size:56px;letter-spacing:-.09em;font-style:italic;font-weight:950;margin:12px 0}.accent-point{color:var(--lime)}
.controls{flex:0 0 150px;min-height:140px;max-width:540px;width:100%;margin:0 auto;display:flex;justify-content:space-between;gap:8px;padding:7px 16px 4px;border-top:1px solid rgba(186,224,200,.12);touch-action:none}.move-module{flex:0 0 34%;min-width:110px;display:flex;flex-direction:column}.buttons-module{flex:1;display:flex;flex-direction:column;min-width:0}.module-title{font-size:9px;letter-spacing:.18em;font-weight:900;color:#c7d7cf;white-space:nowrap;display:flex;gap:5px;align-items:baseline}.module-title span{color:var(--lime)}.module-title small{font-size:7px;color:#68847b;letter-spacing:.035em;margin-left:auto}.joystick{height:112px;width:112px;border-radius:50%;display:grid;place-items:center;position:relative;margin-top:6px;touch-action:none;user-select:none;flex:none;cursor:grab}.joystick:active{cursor:grabbing}.joystick::before{content:"";position:absolute;inset:5px;background:radial-gradient(circle,#273947,#1b2f39);border:1px solid #476257;border-radius:50%;box-shadow:inset 0 0 18px #0d1d20,0 3px 10px #0006}.stick-lines{position:absolute;inset:17px;border:1px dashed #46605a;border-radius:50%}.stick-lines::after,.stick-lines::before{content:"";position:absolute;top:50%;left:50%;background:#42594f}.stick-lines::before{width:1px;height:100%;transform:translate(-50%,-50%)}.stick-lines::after{width:100%;height:1px;transform:translate(-50%,-50%)}.stick-ring{width:87px;height:87px;border:1px solid #5f7867a0;border-radius:50%;display:grid;place-items:center;position:relative}.stick-knob{width:49px;height:49px;transform:translate(0,0);border-radius:50%;border:3px solid #bedc91;display:grid;place-items:center;background:radial-gradient(circle at 32% 24%,#c9eac1,#456c57 65%,#153b38);box-shadow:0 5px 14px #071d21a6,0 0 0 3px #0002;will-change:transform;transition:background .1s}.stick-knob span{width:10px;height:10px;background:#d7f4a9;border-radius:50%;box-shadow:0 0 9px #d5ff9d96}.joystick.active .stick-knob{border-color:var(--lime);background:radial-gradient(circle at 30% 25%,#dbfba5,#7db567 65%,#336042)}
.action-buttons{display:flex;align-items:stretch;justify-content:flex-end;gap:8px;margin-top:13px;min-width:0;flex:1}.action-btn{position:relative;overflow:hidden;flex:1;max-width:99px;min-width:0;height:97px;border-radius:13px 13px 11px 11px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;box-shadow:0 5px 0 #0009,0 12px 20px #0004;transition:transform .09s,border-color .12s,filter .12s}.action-btn .button-glyph{line-height:1;font-size:25px;margin:0 0 5px}.action-btn strong{font-size:clamp(11px,3.1vw,14px);letter-spacing:.035em;font-weight:1000}.action-btn small{font-weight:900;font-size:8px;letter-spacing:.09em;opacity:.73}.action-btn.pass{background:#f0f0d8;color:#223429;border:2px solid #eef6de}.action-btn.shoot{background:var(--lime);color:#122620;border:2px solid #dcff92;box-shadow:0 5px 0 #667e2f,0 12px 19px #0004}.action-btn.slide{background:#24424b;color:#f1f6ed;border:2px solid #55797a}.action-btn:active,.action-btn.pressed{transform:translateY(4px) scale(.98);box-shadow:0 1px 0 #0009,0 4px 9px #0005}.action-btn:disabled{filter:grayscale(.6);opacity:.68}.charge-line{position:absolute;bottom:0;left:0;height:5px;width:0;background:#fff;box-shadow:0 0 9px #fff}.cooldown-mask{position:absolute;inset:auto 0 0;height:0;background:#071921b9;pointer-events:none}.action-btn.ready{box-shadow:0 0 0 2px #c7f15d40,0 6px 0 #000b}.footer{flex:0 0 22px;min-height:22px;display:flex;align-items:center;justify-content:space-between;gap:5px;padding:0 14px;color:#68837f;font-size:7px;font-weight:800;letter-spacing:.12em;border-top:1px solid #1a3138}.footer-center{font-size:7px;letter-spacing:.03em}
@media (min-width:700px){.app{max-width:1000px}.masthead{padding:0 27px}.pitch-shell{box-shadow:0 18px 70px #0009,0 0 0 5px rgba(35,60,54,.37)}.scoreboard{padding-top:11px;padding-bottom:11px}.controls{padding-inline:27px}.action-buttons{gap:14px}.action-btn{max-width:117px}.pitch-bottomline,.pitch-topline{width:430px}}
@media (max-width:375px){.controls{flex-basis:140px;min-height:138px;padding-inline:10px}.move-module{flex-basis:34%;min-width:102px}.joystick{height:103px;width:103px}.buttons-module{min-width:0}.action-buttons{gap:5px}.action-btn{height:89px}.action-btn .button-glyph{font-size:22px}.module-title small{display:none}.team strong{font-size:9px}.pitch-topline,.pitch-bottomline{font-size:8px}.footer-center{display:none}}
@media (max-height:700px){.masthead{flex-basis:45px;min-height:45px}.scoreboard{flex-basis:59px;padding-top:3px;padding-bottom:3px}.controls{flex-basis:124px;min-height:120px;padding-top:4px}.joystick{height:94px;width:94px}.action-btn{height:75px;border-radius:10px}.action-btn .button-glyph{font-size:19px;margin-bottom:0}.action-btn small{display:none}.action-buttons{margin-top:9px}.module-title{font-size:8px}.footer{flex-basis:16px;min-height:16px}.pitch-topline,.pitch-bottomline{flex-basis:15px;font-size:8px}}
@media (max-height:450px) and (orientation:landscape){.app{flex-direction:row;flex-wrap:wrap;padding:0 5px}.masthead{height:45px;flex:0 0 22%;border-bottom:none}.scoreboard{height:45px;flex:1 1 78%;max-width:initial}.arena{height:calc(100% - 56px);flex:1}.pitch-shell{aspect-ratio:420/620}.controls{height:calc(100% - 56px);flex:0 0 min(310px,38%);align-self:flex-end;flex-direction:column;justify-content:center;border:0}.move-module{height:45%;flex:initial}.buttons-module{height:50%}.joystick{height:85px;width:85px;margin:0 auto}.action-buttons{gap:3px;align-items:center}.action-btn{height:65px}.footer{display:none}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;transition-duration:.001ms!important}}

/* Isometric voxel stadium view: camera toggle remains reachable on small screens. */
.utility.view-toggle{width:58px;font-size:11px;font-weight:900;letter-spacing:.025em;background:#c7f15d15;color:var(--lime);border-color:#c7f15d72}
#pitch{image-rendering:pixelated}
@media(max-width:360px){.masthead{padding-left:10px;padding-right:10px}.mast-actions{gap:4px}}

/* ============================================================
   MOBILE FULLSCREEN OVERRIDE
   Arena + pitch fill the viewport edge-to-edge; HUD floats over field.
   Goals remain visible; 3D camera and JS behavior untouched.
   ============================================================ */

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: manipulation;
  background: #05130a;
}

body {
  position: fixed !important;
  inset: 0 !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
}

/* App shell becomes the full-bleed stage */
.app {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  display: block !important;
  background: #05130a;
}

/* Arena = viewport; no card frame, no shadow, no gaps */
.arena,
.pitch-shell {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: hidden !important;
  display: block !important;
}

/* Pitch / canvas: edge to edge, guaranteed both-goal framing via object-fit */
#pitch {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: block !important;
  background: transparent !important;
  object-fit: contain;
  touch-action: none;
}

#pitch canvas,
.pitch-shell canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  border-radius: 0 !important;
  touch-action: none;
}

/* Header + scoreboard float translucently OVER the field */
.masthead,
.scoreboard {
  position: absolute !important;
  z-index: 40 !important;
  left: calc(var(--safe-left) + 8px) !important;
  right: calc(var(--safe-right) + 8px) !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 12px !important;
  background: rgba(4, 18, 10, 0.42) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: none !important;
  color: #fff !important;
  pointer-events: none;
  box-sizing: border-box !important;
}

.masthead {
  top: calc(var(--safe-top) + 8px) !important;
}

.scoreboard {
  top: calc(var(--safe-top) + 8px) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: max-content !important;
  max-width: calc(100vw - var(--safe-left) - var(--safe-right) - 24px) !important;
  text-align: center;
}

.scoreboard + .masthead,
.masthead + .scoreboard {
  margin-top: 0 !important;
}

/* Field edge labels are decorative on phones */
.pitch-topline,
.pitch-bottomline {
  display: none !important;
}

/* Controls: transparent overlay layer, never eat field space */
.controls {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: block !important;
  pointer-events: none;
  z-index: 60 !important;
}

/* Joystick lower left — two-thumb reachable */
.move-module,
.joystick {
  position: fixed !important;
  z-index: 70 !important;
  left: calc(var(--safe-left) + 14px) !important;
  right: auto !important;
  bottom: calc(var(--safe-bottom) + 18px) !important;
  top: auto !important;
  width: clamp(112px, 30vw, 160px) !important;
  height: clamp(112px, 30vw, 160px) !important;
  max-width: 44vw !important;
  max-height: 44vw !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  pointer-events: auto !important;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.move-module { background: transparent !important; }

.joystick {
  background: rgba(255,255,255,0.10) !important;
  border: 2px solid rgba(255,255,255,0.28) !important;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28) !important;
}

/* PASS / SHOOT / SLIDE cluster lower right — larger touch targets */
.buttons-module,
.action-buttons {
  position: fixed !important;
  z-index: 70 !important;
  right: calc(var(--safe-right) + 12px) !important;
  left: auto !important;
  bottom: calc(var(--safe-bottom) + 18px) !important;
  top: auto !important;
  width: auto !important;
  height: auto !important;
  max-width: 56vw !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: flex-end !important;
  gap: 8px !important;
  pointer-events: auto !important;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.buttons-module { background: transparent !important; }

.action-btn {
  position: relative !important;
  width: clamp(58px, 16vw, 76px) !important;
  height: clamp(58px, 16vw, 76px) !important;
  min-width: 54px !important;
  min-height: 54px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: clamp(12px, 3.4vw, 15px) !important;
  line-height: 1 !important;
  border: 2px solid rgba(255,255,255,0.34) !important;
  background: rgba(255,255,255,0.16) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.30) !important;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.action-btn:active {
  transform: scale(0.94);
  background: rgba(255,255,255,0.32) !important;
}

/* Footer + redundant labels disappear on phones */
.footer {
  display: none !important;
}

/* Overlay stays centered over the full field */
.game-overlay {
  position: absolute !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: calc(var(--safe-top) + 12px) calc(var(--safe-right) + 12px)
           calc(var(--safe-bottom) + 12px) calc(var(--safe-left) + 12px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  z-index: 80 !important;
}

.game-overlay[hidden],
.game-overlay.is-hidden {
  display: none !important;
}

/* Landscape phones: shorter HUD, keep both goals in frame */
@media (orientation: landscape) and (max-height: 520px) {
  .masthead {
    padding: 4px 10px !important;
    font-size: 12px !important;
  }
  .scoreboard {
    padding: 4px 10px !important;
    font-size: 12px !important;
  }
  .move-module,
  .joystick {
    width: clamp(96px, 20vh, 128px) !important;
    height: clamp(96px, 20vh, 128px) !important;
    max-width: 26vw !important;
    max-height: 26vw !important;
    bottom: calc(var(--safe-bottom) + 12px) !important;
  }
  .action-btn {
    width: clamp(50px, 12vh, 62px) !important;
    height: clamp(50px, 12vh, 62px) !important;
    min-width: 48px !important;
    min-height: 48px !important;
    font-size: 12px !important;
  }
  .buttons-module,
  .action-buttons {
    max-width: 50vw !important;
    gap: 6px !important;
    bottom: calc(var(--safe-bottom) + 12px) !important;
  }
}

/* Small narrow portraits (360x740 / 390x844 and similar) */
@media (max-width: 430px) and (orientation: portrait) {
  .masthead,
  .scoreboard {
    font-size: 13px !important;
  }
  .move-module,
  .joystick {
    left: calc(var(--safe-left) + 12px) !important;
    bottom: calc(var(--safe-bottom) + 16px) !important;
    width: clamp(108px, 31vw, 142px) !important;
    height: clamp(108px, 31vw, 142px) !important;
  }
  .buttons-module,
  .action-buttons {
    right: calc(var(--safe-right) + 10px) !important;
    bottom: calc(var(--safe-bottom) + 16px) !important;
    gap: 7px !important;
  }
  .action-btn {
    width: clamp(56px, 15.5vw, 70px) !important;
    height: clamp(56px, 15.5vw, 70px) !important;
    min-width: 52px !important;
    min-height: 52px !important;
  }
}

/* DSH QA fix: masthead controls must stay clickable above the fullscreen pitch */
.masthead { pointer-events: none !important; z-index: 2147482999 !important; }
.masthead .mast-actions,
.mast-actions,
.mast-actions *,
#viewBtn,
#soundBtn,
#pauseBtn {
  pointer-events: auto !important;
}
.mast-actions {
  position: relative !important;
  z-index: 2147483000 !important;
}
.mast-actions .utility,
.mast-actions .utility *,
#viewBtn,
#soundBtn,
#pauseBtn {
  position: relative !important;
  z-index: 2147483001 !important;
  touch-action: manipulation !important;
}

/* Decorative headings/captions only; action labels stay readable */
.module-title,
.action-btn small,
.action-btn .caption,
.action-btn .hint {
  display: none !important;
}
.action-btn {
  min-height: 56px !important;
}

/* Phones: compact top-right control row below the centered scoreboard */
@media (max-width: 430px) and (orientation: portrait) {
  .mast-actions {
    position: fixed !important;
    top: calc(env(safe-area-inset-top, 0px) + 68px) !important;
    right: max(8px, env(safe-area-inset-right, 0px)) !important;
    left: auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    margin: 0 !important;
    z-index: 2147483000 !important;
    pointer-events: auto !important;
  }
  .mast-actions > *,
  .mast-actions .utility,
  #viewBtn,
  #soundBtn,
  #pauseBtn {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 2147483001 !important;
    flex: 0 0 auto !important;
  }
}

/* Final visual QA fix: keep masthead glass out of the scoreboard's stacking layer. */
.masthead {
  background: transparent !important;
  background-color: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border: 0 !important;
  box-shadow: none !important;
  z-index: 65 !important;
}
.scoreboard {
  z-index: 75 !important;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 1);
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
}
.masthead .mast-actions {
  position: relative;
  z-index: 76;
  pointer-events: auto !important;
}

/* Phone portrait: hide masthead brand text to avoid scoreboard overlap */
@media (max-width: 430px) and (orientation: portrait) {
  .masthead .brand {
    display: none;
  }
}
