/* Dedicated fourth-wall pause illustration; no legacy modal-panel styles. */
body #gameApp .pause-screen40,
body.ui-v21 #gameApp #pauseOverlay.pause-screen40 {
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  z-index:85;background:#032535!important;backdrop-filter:none!important;overflow:hidden;
  display:block;padding:0!important;border:0!important;border-radius:0!important;
  color:#fff4d9;font-family:var(--ui-font,'Rubik Game',Arial,sans-serif);direction:rtl;
}
body #gameApp .menu-sheet.pause-screen40>div {
  position:absolute!important;inset:0!important;width:100%!important;max-width:none!important;
  height:100%!important;max-height:none!important;padding:0!important;margin:0!important;
  background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  overflow:visible!important;transform:none!important;
}
body #gameApp .pause-screen40 .pause-art40 {
  position:absolute;inset:0;background:url('./assets/v40/pause-david.webp') center/cover no-repeat;
  pointer-events:none;
}
body #gameApp .pause-screen40 .pause-content40 {
  position:absolute;right:4.3%;top:50%;width:30.5%;transform:translateY(-50%);
  display:flex;flex-direction:column;align-items:stretch;text-align:right;
  padding:0;margin:0;background:none;border:0;box-shadow:none;
}
body #gameApp .pause-screen40 .pause-kicker40 {
  display:flex;align-items:center;align-self:flex-start;gap:.65cqw;color:#173d48;
  font-size:clamp(10px,1.05cqw,17px);font-weight:700;line-height:1.4;
  padding:.45cqh .8cqw;background:#dcebd8;border:2px solid #042433;
  border-radius:7px 4px 8px 3px;rotate:-3deg;box-shadow:2px 3px 0 #001c2ba6;
}
body #gameApp .pause-screen40 .pause-kicker40 i {
  display:block;width:.52cqw;height:.52cqw;min-width:4px;min-height:4px;
  background:#24746d;border-radius:2px;box-shadow:3px 0 0 #24746d;
}
body.ui-v21 #gameApp .pause-screen40 h2 {
  font-family:'Fredoka Game',var(--ui-font),sans-serif!important;font-size:clamp(25px,4.7cqw,78px)!important;
  font-weight:700!important;line-height:1.05!important;letter-spacing:-.12cqw;
  color:#fff3d7!important;margin:1.6cqh 0 1.4cqh!important;padding:0;
  text-shadow:2px 3px 0 #001c2b;
}
body #gameApp .pause-screen40 h2 em {display:block;font-style:normal;color:#f8cd69;white-space:nowrap;rotate:-2deg}
body #gameApp .pause-screen40 h2 em>span {display:inline-block}
body #gameApp .pause-screen40 .pause-hello40 {display:inline-flex;align-items:center;gap:1cqw;font-size:.67em;rotate:3deg;margin-bottom:1cqh}
body #gameApp .pause-screen40 .pause-dots40 {display:inline-flex;gap:.35cqw;align-self:center;direction:ltr}
body #gameApp .pause-screen40 .pause-dots40 i {width:.36cqw;height:.36cqw;min-width:3px;min-height:3px;background:#ffe2a3;border-radius:50%;display:block;animation:pause-dot40 2.8s ease-in-out infinite}
body #gameApp .pause-screen40 .pause-dots40 i:nth-child(2){animation-delay:.13s}
body #gameApp .pause-screen40 .pause-dots40 i:nth-child(3){animation-delay:.26s}
/* Retire the old pauseTitle/resumeButton ID rules in the compatibility layer. */
body.ui-v21 #gameApp #pauseOverlay #pauseTitle {
  font:700 clamp(25px,4.7cqw,78px)/1.05 'Fredoka Game',var(--ui-font),sans-serif!important;
  color:#fff3d7!important;
}
body.ui-v21 #gameApp .pause-screen40 .pause-copy40 {
  font:400 clamp(11px,1.35cqw,23px)/1.5 var(--ui-font,'Rubik Game',Arial,sans-serif)!important;
  color:#c8dddd!important;margin:0 0 2.6cqh!important;padding:0;
}
body #gameApp .pause-screen40 .pause-actions40 {display:grid;gap:1.2cqh;margin:0;padding:0}
body #gameApp .pause-screen40 .pause-action40 {
  display:flex;align-items:center;justify-content:flex-start;gap:1cqw;
  width:100%;min-width:0;min-height:44px;height:8.3cqh;margin:0;
  padding:0 1cqw;border:2px solid #03212e;border-radius:12px 7px 13px 7px;
  background:#176b79;color:#fff4dd;box-shadow:0 .6cqh 0 #03212e;
  font:700 clamp(12px,1.4cqw,24px)/1.2 var(--ui-font,'Rubik Game',Arial,sans-serif);
  text-align:right;cursor:pointer;touch-action:manipulation;
  transition:background .16s ease,box-shadow .16s ease,translate .16s ease,rotate .16s ease;
  position:relative;isolation:isolate;
}
body #gameApp .pause-screen40 .pause-icon40 {display:grid;place-items:center;flex-shrink:0;width:3cqw;height:3cqw;min-width:25px;min-height:25px;background:#d8eee0;color:#0b4051;border:2px solid #063044;border-radius:8px 5px 8px 4px;rotate:6deg}
body #gameApp .pause-screen40 .pause-label40 {display:flex;flex-direction:column;gap:.45cqh;min-width:0;position:relative;z-index:1}
body #gameApp .pause-screen40 .pause-label40 b {font:inherit;white-space:nowrap}
body #gameApp .pause-screen40 .pause-label40 small {font-size:clamp(9px,.9cqw,15px);font-weight:400;opacity:.8;white-space:nowrap;color:inherit}
body #gameApp .pause-screen40 .pause-action40 svg {width:1.8cqw;height:1.8cqw;min-width:16px;min-height:16px;flex-shrink:0;fill:none;stroke:currentColor}
body #gameApp .pause-screen40 .pause-primary40 {
  height:10.5cqh;min-height:52px;background:#ffd375;color:#142f3a;border-color:#03212e;
  font-weight:700;box-shadow:0 .7cqh 0 #ad7335,0 1.1cqh 0 #03212e;
  margin-bottom:.8cqh;overflow:hidden;rotate:-1deg;
}
body #gameApp .pause-screen40 .pause-primary40 .pause-icon40 {background:#fff0bd;border-radius:50%;width:3.4cqw;height:3.4cqw;rotate:-7deg;box-shadow:1px 2px 0 #c18b3b;z-index:1}
body #gameApp .pause-screen40 .pause-primary40::after {content:'';position:absolute;inset:-50% -100%;z-index:-1;background:linear-gradient(110deg,transparent 43%,#fff5d488 49%,transparent 56%);animation:pause-sheen40 7s ease-in-out 2s infinite;pointer-events:none}
body.ui-v21 #gameApp #pauseOverlay #resumeButton {
  background:#ffd375!important;color:#142f3a!important;border-color:#03212e!important;
}
body.ui-v21 #gameApp #pauseOverlay #resumeButton:hover {background:#ffe29a!important;border-color:#03212e!important}
body #gameApp .pause-screen40 .pause-arrow40 {margin-right:auto;font:300 2.8cqw/1 Arial,sans-serif;direction:ltr}
body #gameApp .pause-screen40 .pause-utilities40 {display:grid;grid-template-columns:1fr 1fr;gap:.7cqw;margin-top:.8cqh}
body #gameApp .pause-screen40 .pause-utilities40 .pause-action40 {
  justify-content:center;gap:.5cqw;padding:0 .45cqw;background:#dbe8cb;
  font-size:clamp(10px,1.05cqw,18px);color:#153746;rotate:1deg;
}
body #gameApp .pause-screen40 .pause-utilities40 .pause-title40 {background:#f1bba2;rotate:-1deg}
body #gameApp .pause-screen40 .pause-utilities40 .pause-icon40 {background:transparent;border:0;width:1.6cqw;height:1.6cqw;min-width:16px;min-height:16px;rotate:0deg}
body #gameApp .pause-screen40 .pause-utilities40 svg {width:1.4cqw;height:1.4cqw;min-width:14px;min-height:14px}
body #gameApp .pause-screen40 .pause-action40:is(:hover,:focus-visible) {background:#258694;translate:0 -3px;rotate:-1deg;box-shadow:0 .9cqh 0 #03212e}
body #gameApp .pause-screen40 .pause-primary40:is(:hover,:focus-visible) {background:#ffe29a;box-shadow:0 1cqh 0 #ad7335,0 1.4cqh 0 #03212e}
body #gameApp .pause-screen40 .pause-utilities40 .pause-action40:is(:hover,:focus-visible) {background:#eff6d8}
body #gameApp .pause-screen40 .pause-utilities40 .pause-title40:is(:hover,:focus-visible) {background:#ffd0b7}
body #gameApp .pause-screen40 .pause-action40:is(:hover,:focus-visible) .pause-icon40 {animation:pause-icon40 .4s ease-out}
body #gameApp .pause-screen40 .pause-action40:active {translate:0 4px;rotate:0deg;box-shadow:0 1px 0 #03212e}
body #gameApp .pause-screen40 .pause-action40:focus-visible {outline:2px solid #fff0c6;outline-offset:4px}
body #gameApp .pause-screen40 .pause-footnote40 {
  display:flex;align-items:center;justify-content:center;gap:.6cqw;
  font-size:clamp(9px,.95cqw,16px);color:#b7cccb;line-height:1.4;margin-top:2.5cqh;min-height:2.8cqh;
}
body #gameApp .pause-screen40 .pause-quote-mark40 {color:#ffd375;font:700 2.3em/.7 Georgia,serif;rotate:-8deg}
body #gameApp .pause-screen40 .pause-quip40 {display:none}
body #gameApp .pause-screen40 .pause-quip-default40 {display:inline}
body #gameApp .pause-screen40 .pause-content40:has(button:is(:hover,:focus-visible)) .pause-quip-default40 {display:none}
body #gameApp .pause-screen40 .pause-content40:has(.pause-resume40:is(:hover,:focus-visible)) .pause-quip-resume40,
body #gameApp .pause-screen40 .pause-content40:has(.pause-map40:is(:hover,:focus-visible)) .pause-quip-map40,
body #gameApp .pause-screen40 .pause-content40:has(.pause-training40:is(:hover,:focus-visible)) .pause-quip-training40,
body #gameApp .pause-screen40 .pause-content40:has(.pause-settings40:is(:hover,:focus-visible)) .pause-quip-settings40,
body #gameApp .pause-screen40 .pause-content40:has(.pause-title40:is(:hover,:focus-visible)) .pause-quip-title40 {display:inline;animation:pause-quip40 .18s ease-out}
body #gameApp .pause-screen40:not([hidden]) .pause-kicker40 {animation:pause-stamp40 .45s cubic-bezier(.2,.9,.3,1.25) both}
body #gameApp .pause-screen40:not([hidden]) h2 em>span {animation:pause-pop40 .5s cubic-bezier(.2,.9,.3,1.25) .1s both}
body #gameApp .pause-screen40:not([hidden]) h2 em>span:nth-child(2) {animation-delay:.2s}
body #gameApp .pause-screen40:not([hidden]) .pause-actions40>.pause-action40 {animation:pause-pop40 .4s cubic-bezier(.2,.9,.3,1.25) .28s both}
body #gameApp .pause-screen40:not([hidden]) .pause-actions40>.pause-map40 {animation-delay:.36s}
body #gameApp .pause-screen40:not([hidden]) .pause-utilities40 {animation:pause-pop40 .4s ease-out .44s both}
@keyframes pause-pop40 {from{opacity:0;transform:translateY(14px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes pause-stamp40 {from{opacity:0;transform:scale(1.3) rotate(8deg)}to{opacity:1;transform:scale(1) rotate(0)}}
@keyframes pause-dot40 {0%,15%,45%,100%{translate:0 0;opacity:.55}28%{translate:0 -4px;opacity:1}}
@keyframes pause-icon40 {0%,100%{transform:rotate(0)}35%{transform:rotate(-14deg)}70%{transform:rotate(8deg)}}
@keyframes pause-sheen40 {0%,75%{transform:translateX(65%)}100%{transform:translateX(-65%)}}
@keyframes pause-quip40 {from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
@media (max-width:750px) {
  body #gameApp .pause-screen40 .pause-content40{right:3%;width:32.5%}
  body.ui-v21 #gameApp .pause-screen40 h2{font-size:4.7cqw!important;margin-top:1.5cqh!important}
  body.ui-v21 #gameApp .pause-screen40 .pause-copy40{margin-bottom:2cqh!important}
  body #gameApp .pause-screen40 .pause-footnote40{margin-top:2cqh}
}
@media (prefers-reduced-motion:reduce) {
  body #gameApp .pause-screen40 *,body #gameApp .pause-screen40 *::after{animation:none!important;transition:none!important}
}
body.reduced-motion #gameApp .pause-screen40 *,body.reduced-motion #gameApp .pause-screen40 *::after{animation:none!important;transition:none!important}
body #gameApp .pause-screen40[hidden]{display:none!important}
