/* Pawsibly Innocent — one playable screen, one optional in-game menu.
   All HUD and drawers live inside #stage, including in native fullscreen. */
html{background:#f9ede4}
body{background:radial-gradient(circle at 50% 18%,#ffe9d9 0%,#fff8f0 70%)}
body>.sitebar{display:none!important}
.single-screen-game{width:min(1130px,calc(100% - 20px));max-width:none;margin:0 auto;padding:10px 0 20px!important;display:block!important}
.single-screen-game .board-layout{display:block!important;width:100%;margin:0 auto}
.single-screen-game .stage{
 position:relative;display:flex;align-items:center;justify-content:center;
 width:100%;max-width:1130px;height:auto;aspect-ratio:10/7;margin:auto;
 padding:0;overflow:hidden;isolation:isolate;border:5px solid #fffdf7;border-radius:24px;
 background:radial-gradient(ellipse at 40% 30%,#f4d5d6,#e6cfdd);
 box-shadow:0 10px 0 #eccfcc,0 24px 48px #8f6d7a2b
}
.single-screen-game .playfield{position:relative;aspect-ratio:10/7;width:100%;height:100%;max-width:100%;max-height:100%;flex:0 0 auto;overflow:hidden}
.single-screen-game #board{display:block;width:100%;height:100%;aspect-ratio:10/7;touch-action:none}
.single-screen-game .in-game-top{position:absolute;z-index:4;left:0;right:0;top:0;display:flex;justify-content:space-between;align-items:flex-start;gap:8px;padding:11px 11px 0;pointer-events:none}
.single-screen-game .in-game-top>*{pointer-events:auto}
.single-screen-game .sticker{position:relative;top:auto;left:auto;max-width:35%;flex:0 0 auto;margin:0;padding:5px 11px;border-radius:13px;background:#fffbf0ef;box-shadow:0 4px 13px #5b435222}
.single-screen-game .sticker b{font-size:clamp(11px,1.7vw,16px);line-height:1.1;margin:2px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.single-screen-game .sticker small{font-size:clamp(8px,1.1vw,10px)}
.single-screen-game .heist-status{position:relative;top:auto;right:auto;max-width:none;margin:0 auto;flex:0 0 auto;white-space:nowrap;background:#483952ee;border-color:#fffcf5c9;border-radius:12px;box-shadow:0 4px 13px #44304435;font-size:clamp(12px,1.9vw,17px);padding:8px 13px}
.single-screen-game .in-game-controls{display:flex;align-items:center;gap:6px;flex:0 0 auto;pointer-events:auto}
.single-screen-game .hud-icon,.single-screen-game .mw-fullscreen-toggle{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 width:43px!important;height:43px!important;min-width:43px!important;min-height:43px!important;
 padding:0!important;border:1px solid #f5e6e9!important;border-radius:13px!important;
 background:#fff9f3f2!important;color:#704e6e!important;font:900 20px/1 Nunito,system-ui!important;
 box-shadow:0 3px 9px #503b4633!important;text-decoration:none!important;cursor:pointer;pointer-events:auto
}
.single-screen-game .hud-icon:focus-visible,.single-screen-game .mw-fullscreen-toggle:focus-visible{outline:3px solid #a974c7;outline-offset:2px}
.single-screen-game .mw-fullscreen-toggle{font-size:0!important}
.single-screen-game .mw-fullscreen-toggle::before{content:'⛶';font-size:25px;line-height:1}
.single-screen-game .mw-fullscreen-toggle[aria-pressed=true]::before{content:'↙';font-size:19px}
.single-screen-game .mw-fullscreen-toggle[aria-pressed=true]{background:#5f4771!important;color:#fff!important}
.single-screen-game .paws-alert{top:63px;right:12px;z-index:5}
.single-screen-game .yarn-aim-banner{top:72px;max-width:82%;z-index:6;background:#fff6ffd9}
.single-screen-game .stealth-actionbar{
 position:absolute;z-index:4;left:11px;right:11px;bottom:10px;top:auto;
 width:auto!important;height:auto!important;min-height:0!important;max-width:none!important;
 margin:0!important;padding:8px 9px!important;border:1px solid #fff8f6ab!important;border-radius:14px!important;
 background:#fffaf0ed!important;box-shadow:0 6px 20px #59495c37!important;
 display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:10px!important
}
.single-screen-game .stealth-help{display:flex;flex:1 1 auto;min-width:0;flex-direction:column;gap:3px;align-items:flex-start}
.single-screen-game .stealth-help>strong{font-size:clamp(10px,1.7vw,15px);line-height:1.3;color:#6a516b}
.single-screen-game .guard-status{font-size:clamp(9px,1.3vw,12px);line-height:1.2}
.single-screen-game .yarn-hint{display:none!important}
.single-screen-game .board-yarn{
 order:0!important;position:relative;flex:0 0 auto!important;
 width:auto!important;min-width:133px!important;min-height:43px!important;max-width:42%!important;
 margin:0!important;padding:8px 11px!important;border-radius:12px!important;font-size:clamp(10px,1.35vw,13px)!important;
 background:#a875bf;color:white;box-shadow:0 3px 0 #81599a!important;touch-action:manipulation
}
.single-screen-game .board-yarn:disabled{opacity:.64}
.single-screen-game .toast{bottom:105px;z-index:8}
.single-screen-game .achievement-toast{top:24%;z-index:9}
.single-screen-game .coach-spot{position:absolute;z-index:2;width:53px;height:53px;border:4px dashed #e5a555;
 border-radius:50%;box-shadow:0 0 0 5px #fff3ce5c;pointer-events:none;opacity:0;
 animation:paws-coach 1s ease-in-out infinite alternate}
.single-screen-game .coach-spot.active{opacity:1}
@keyframes paws-coach{to{transform:scale(1.12);box-shadow:0 0 0 13px #fff3ce22}}
.single-screen-game .overlay{z-index:12;backdrop-filter:blur(4px);padding:8px}
.single-screen-game .modal{width:min(440px,92%);max-height:93%;padding:clamp(10px,3vh,22px)}
.single-screen-game .modal .cat-medal{font-size:44px}
.single-screen-game .modal h2{font-size:clamp(23px,4vw,34px);margin:7px 0}
.single-screen-game .modal p{margin:6px 0;font-size:12px}
.single-screen-game .modal .buttons{margin-top:11px}
.single-screen-game .game-menu{
 position:absolute;z-index:20;inset:0;padding:12px;
 display:flex;align-items:center;justify-content:center;
 background:#30243fc4;backdrop-filter:blur(7px);overflow:hidden
}
.single-screen-game [hidden]{display:none!important}
.single-screen-game .menu-shell{
 width:min(590px,100%);height:min(95%,690px);max-height:100%;overflow:hidden;
 display:flex;flex-direction:column;min-height:0;
 background:#fffaf1;border:3px solid #fffdf8;border-radius:21px;
 box-shadow:0 20px 70px #28213765;color:#594259
}
.single-screen-game .menu-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 16px 7px;flex:0 0 auto}
.single-screen-game .menu-head .eyebrow{font-size:9px;letter-spacing:.08em}
.single-screen-game .menu-head h2{font:700 clamp(21px,3vw,28px)/1.1 Fredoka,system-ui;margin:2px 0;color:#e47f95}
.single-screen-game .menu-head h2 span{color:#e4ac68}
.single-screen-game .menu-head p{font-size:11px;margin:3px 0 0;color:#897782}
.single-screen-game .menu-tabs{display:flex;gap:5px;padding:6px 12px 10px;flex:0 0 auto;overflow-x:auto;scrollbar-width:thin}
.single-screen-game .menu-tabs button{
 flex:1 0 auto;min-width:76px;min-height:41px;padding:7px 8px;
 background:#f9eae9;border:1px solid #ead7dd;border-radius:10px;font-size:11px;font-weight:900;color:#78637a
}
.single-screen-game .menu-tabs button[aria-selected=true]{background:#6f507f;color:#fff;border-color:#6f507f}
.single-screen-game .game-menu-body{display:block!important;flex:1 1 auto;overflow-y:auto;min-height:0;max-height:none!important;
 padding:12px 17px 20px!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fffaf1!important}
.single-screen-game .game-menu-body>section{display:block;min-height:0}
.single-screen-game .game-menu-body>section[hidden]{display:none!important}
.single-screen-game .game-menu-body .chapter{font-size:22px}
.single-screen-game .game-menu-body .stats{margin:10px 0}
.single-screen-game .game-menu-body .progress{display:flex!important;flex-wrap:wrap;gap:7px;margin:10px 0}
.single-screen-game .game-menu-body .wardrobe{display:flex!important;flex-wrap:wrap;gap:12px;margin:12px 0}
.single-screen-game .game-menu-body .skin{width:56px;height:55px}
.single-screen-game .game-menu-body .collection-count{display:flex!important;margin:0 0 10px;padding:8px 10px;align-items:center}
.single-screen-game .game-menu-body .collection-preview{margin:8px 0}
.single-screen-game .menu-section-title{font:700 18px/1.3 Fredoka,system-ui;margin:12px 0;color:#795f81}
.single-screen-game .relic-gallery,.single-screen-game .achievement-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:0}
.single-screen-game .badge-highlights{margin:9px 0}
.single-screen-game .menu-challenge{font-size:12px;color:#986390;font-weight:900;margin:9px 0}
.single-screen-game .menu-help-step{display:flex;gap:10px;align-items:baseline;margin:7px 0;padding:8px 11px;border:1px solid #efded9;border-radius:10px;background:#fff1e5;font-size:12px}
.single-screen-game .menu-help-step strong{min-width:120px}
.single-screen-game .menu-help-legend{font-size:12px;background:#fff2da;border-radius:10px;padding:8px}
.single-screen-game #ruleBonus,.single-screen-game #howBody{font-size:12px;line-height:1.5}
.single-screen-game .menu-language{display:flex;gap:7px;margin:9px 0}
.single-screen-game .menu-language button{padding:8px 12px;border:1px solid #e3cedf;background:#fff7f0;border-radius:10px;color:#614e64;font-weight:900}
.single-screen-game .menu-language button[aria-pressed=true]{background:#704a81;color:#fff}
.single-screen-game .menu-audio{display:flex;align-items:center;min-height:45px}
.single-screen-game .menu-audio .mw-audio-dock{display:flex!important;margin:0!important;order:0!important}
.single-screen-game .menu-home{display:inline-flex;margin-top:12px}
.single-screen-game .menu-byline{font-size:10px;color:#aa939b}
.single-screen-game .souvenir-shelf{margin-top:10px}
.single-screen-game .collection-hint{margin:8px 0;font-size:11px}
.single-screen-game #menuClose{background:#f9e5eb!important;box-shadow:none!important}
@media(max-width:700px){
 .single-screen-game{width:calc(100% - 8px);padding:3px 0 9px!important}
 .single-screen-game .stage{border-width:3px;border-radius:13px;box-shadow:0 5px 0 #eccfcc}
 .single-screen-game .in-game-top{padding:5px 5px 0;gap:3px}
 .single-screen-game .sticker{padding:4px 6px;max-width:36%;min-width:0;border-width:1px;border-radius:9px}
 .single-screen-game .sticker b{font-size:10px}
 .single-screen-game .sticker small{font-size:8px}
 .single-screen-game .heist-status{padding:5px 6px;font-size:11px;border-radius:8px;line-height:1.15}
 .single-screen-game .in-game-controls{gap:3px}
 .single-screen-game .hud-icon,.single-screen-game .mw-fullscreen-toggle{width:35px!important;height:35px!important;min-width:35px!important;min-height:35px!important;border-radius:9px!important;font-size:17px!important}
 .single-screen-game .mw-fullscreen-toggle{font-size:0!important}
 .single-screen-game .paws-alert{top:45px;right:5px;padding:4px 6px;font-size:10px}
 .single-screen-game .yarn-aim-banner{top:44px;padding:5px;font-size:10px}
 .single-screen-game .stealth-actionbar{left:5px;right:5px;bottom:5px;padding:4px 5px!important;gap:5px!important;border-radius:10px!important;box-shadow:0 2px 8px #59495c2c!important}
 .single-screen-game .stealth-help>strong{font-size:10px;line-height:1.13}
 .single-screen-game .guard-status{font-size:9px;line-height:1.12;gap:4px}
 .single-screen-game .guard-dot{width:6px;height:6px}
 .single-screen-game .board-yarn{min-width:98px!important;min-height:36px!important;padding:5px 6px!important;font-size:10px!important;max-width:40%!important}
 .single-screen-game .toast{bottom:70px;font-size:11px}
 .single-screen-game .coach-spot{width:26px;height:26px;border-width:2px}
 .single-screen-game .game-menu{padding:5px}
 .single-screen-game .menu-shell{height:min(98%,680px);border-width:2px;border-radius:12px}
 .single-screen-game .menu-head{padding:8px 10px 3px}
 .single-screen-game .menu-head h2{font-size:20px}
 .single-screen-game .menu-head .eyebrow{font-size:8px}
 .single-screen-game .menu-head p{font-size:9px}
 .single-screen-game .menu-tabs{padding:5px 6px}
 .single-screen-game .menu-tabs button{min-width:56px;font-size:10px;min-height:37px;padding:5px 6px}
 .single-screen-game .game-menu-body{padding:9px 10px!important}
 .single-screen-game .modal{padding:9px;max-height:95%}
 .single-screen-game .modal .stars{font-size:24px}
 .single-screen-game .modal .cat-medal{font-size:34px}
}
@media(prefers-reduced-motion:reduce){.single-screen-game .coach-spot{animation:none}}

/* The playable 10×7 board is never covered by a toolbar.
   HUD, canvas and controls form ONE framed game window. */
.single-screen-game .stage{
 width:100%;max-width:1040px;aspect-ratio:auto!important;height:auto!important;
 display:flex!important;flex-direction:column!important;gap:0!important;
 align-items:center!important;justify-content:center!important;
}
.single-screen-game .in-game-top{
 position:relative!important;top:auto!important;left:auto!important;right:auto!important;
 box-sizing:border-box;width:100%;height:auto;min-height:53px;flex:0 0 auto;
 padding:6px 10px!important;align-items:center!important;pointer-events:auto;
 background:linear-gradient(90deg,#fff8f2ee,#f8e8f0f2);border-bottom:1px solid #ead9dc
}
.single-screen-game .sticker{box-shadow:none!important;background:#fffdfaef!important}
.single-screen-game .playfield{
 position:relative;flex:0 1 auto;min-height:0;
 width:100%;height:auto!important;aspect-ratio:10/7!important;
 margin:0 auto!important;max-width:100%;max-height:none;
}
.single-screen-game #board{width:100%;height:100%;aspect-ratio:10/7}
.single-screen-game .stealth-actionbar{
 position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;top:auto!important;
 box-sizing:border-box;flex:0 0 auto;width:100%!important;max-width:none!important;
 min-height:61px!important;margin:0!important;padding:7px 12px!important;
 border-radius:0!important;border:0!important;border-top:1px solid #f2dedb!important;
 box-shadow:none!important;background:linear-gradient(90deg,#fffaf5,#fff1f2)!important
}
.single-screen-game .toast{bottom:14px}
.single-screen-game .board-yarn{min-width:144px!important;min-height:44px!important}
.single-screen-game #coachSpot{pointer-events:none}
.single-screen-game .in-game-controls{position:relative}
.single-screen-game .game-menu{z-index:40}
@media(max-width:700px){
 .single-screen-game .stage{border-width:3px;border-radius:12px}
 .single-screen-game .in-game-top{min-height:41px;padding:3px 5px!important}
 .single-screen-game .stealth-actionbar{min-height:49px!important;padding:5px 7px!important}
 .single-screen-game .board-yarn{min-width:101px!important;min-height:42px!important}
 .single-screen-game .sticker b{font-size:10px}
 .single-screen-game .heist-status{font-size:11px;padding:6px 7px}
 .single-screen-game .hud-icon,.single-screen-game .mw-fullscreen-toggle{width:39px!important;height:39px!important;min-width:39px!important;min-height:39px!important}
 .single-screen-game .mw-fullscreen-toggle{font-size:0!important}
 .single-screen-game .toast{bottom:10px}
}

/* Readability on the smallest supported phones and inside native fullscreen. */
.single-screen-game .coach-spot{margin-left:-26px;margin-top:-26px}
@keyframes paws-coach{to{transform:scale(1.12);box-shadow:0 0 0 11px #fff3ce22}}
html.mw-fs-active[data-mw-fullscreen-game="pawsibly-innocent"] #gameMenu #mw-audio-dock{display:flex!important}
body:has(.single-screen-game) #mw-language,
body:has(.single-screen-game) .mw-language-float{display:none!important}
@media(max-width:440px){
 .single-screen-game #quickHelp{display:none!important}
 .single-screen-game .sticker{max-width:37%}
 .single-screen-game .heist-status{margin:0 auto;padding:5px 5px;font-size:11px}
 .single-screen-game .coach-spot{width:27px;height:27px;margin-left:-13px;margin-top:-13px}
 .single-screen-game .stealth-help>strong{font-size:10px}
 .single-screen-game .guard-status{font-size:9px}
}

/* Reliable 44px touch targets in both the webpage and immersive mode. */
@media(max-width:700px){
 .single-screen-game #menuButton,.single-screen-game #quickHelp,
 .single-screen-game #stageControls>.mw-fullscreen-toggle{
  width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
 }
 .single-screen-game .in-game-top{min-height:46px}
}

/* A gentle in-context invitation to try the yarn after the first fish. */
.single-screen-game .board-yarn.teach-yarn{
 outline:3px solid #f4d48d;outline-offset:2px;
 animation:yarn-invite 1.2s ease-in-out infinite alternate
}
@keyframes yarn-invite{to{outline-color:#b77abf;box-shadow:0 2px 0 #80599b,0 0 0 7px #e8bcef63}}
@media(prefers-reduced-motion:reduce){.single-screen-game .board-yarn.teach-yarn{animation:none}}

/* Autoplay consent stays inside the help/settings drawer, never over the page. */
.single-screen-game #musicPermission{
 position:static!important;inset:auto!important;left:auto!important;bottom:auto!important;
 transform:none!important;z-index:auto!important;box-shadow:none!important;
 padding:9px 14px!important;margin:5px 0!important;
 max-width:100%;white-space:normal;font-size:12px
}
.single-screen-game .menu-audio{flex-wrap:wrap;gap:7px}

/* Clear navigation rather than an ambiguous hamburger glyph. */
.single-screen-game #menuButton{
 box-sizing:border-box!important;width:auto!important;min-width:94px!important;max-width:none!important;
 padding:0 12px!important;display:inline-flex!important;gap:7px!important;
 font:900 13px/1 Nunito,system-ui!important;white-space:nowrap;
 background:#70517c!important;color:#fff!important;border-color:#70517c!important
}
.single-screen-game #menuButton>span:first-child{font-size:19px;line-height:1}
.single-screen-game #menuButton>span:last-child{font-size:13px;font-weight:900;letter-spacing:.015em}
.single-screen-game #menuButton:hover{background:#5d4269!important}
.single-screen-game #menuButton:focus-visible{outline:3px solid #ffdb7b!important;outline-offset:2px}
/* Bonus target is an actual interactive task, not a tiny decorative star in a drawer. */
.single-screen-game .stealth-help{gap:4px}
.single-screen-game #bonusQuick{
 display:inline-flex!important;gap:6px;align-items:center;justify-content:flex-start;
 box-sizing:border-box;max-width:100%;min-height:29px;
 padding:4px 9px;margin:1px 0 0;
 background:linear-gradient(105deg,#ffe19b,#fff0bf);color:#74512c;
 border:1.5px solid #d99a37;border-radius:10px;
 box-shadow:0 2px 0 #d2a6546b;
 font:900 clamp(11px,1.4vw,13px)/1.22 Nunito,system-ui;
 cursor:pointer;text-align:left;transition:background .2s
}
.single-screen-game #bonusQuick .bonus-star{font-size:16px;color:#c7892b}
.single-screen-game #bonusQuickText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.single-screen-game #bonusQuick .bonus-count{
 margin-left:auto;white-space:nowrap;padding:2px 6px;
 border-radius:7px;background:#fff9e9c9;color:#795737;font-size:10px
}
.single-screen-game #bonusQuick.complete{
 background:linear-gradient(105deg,#c8f0d8,#e5fae8);color:#366f51;
 border-color:#87c59f;box-shadow:0 2px 0 #87c59f66
}
.single-screen-game #bonusQuick.complete .bonus-star{color:#43875f}
.single-screen-game #bonusQuick:focus-visible{outline:3px solid #ac6ed1;outline-offset:2px}
.single-screen-game .stealth-actionbar{min-height:76px!important}
@media(max-width:700px){
 .single-screen-game #menuButton{min-width:77px!important;padding:0 8px!important;gap:5px!important}
 .single-screen-game #menuButton>span:last-child{font-size:12px}
 .single-screen-game #bonusQuick{min-height:24px;font-size:10px;padding:3px 6px;gap:4px}
 .single-screen-game #bonusQuick .bonus-star{font-size:13px}
 .single-screen-game #bonusQuick .bonus-count{font-size:9px;padding:1px 4px}
 .single-screen-game .stealth-actionbar{min-height:70px!important}
}
@media(max-width:390px){
 .single-screen-game #quickHelp{display:none!important}
 .single-screen-game .sticker{max-width:31%}
 .single-screen-game #menuButton{min-width:74px!important}
}

/* Objectives-first single-screen layout: tutorial, owner awareness and the
   optional quest appear ABOVE the map on desktop, phones and fullscreen. */
.single-screen-game .in-game-top{
 position:relative!important;display:flex!important;flex-direction:column!important;
 align-items:stretch!important;justify-content:flex-start!important;gap:0!important;
 width:100%!important;min-width:0;box-sizing:border-box;padding:0!important;
 background:linear-gradient(180deg,#fff9f3,#fff2ec)!important;
}
.single-screen-game .in-game-head-row{
 display:flex;align-items:center;justify-content:space-between;gap:8px;
 min-height:46px;padding:5px 10px;box-sizing:border-box;width:100%;
}
.single-screen-game .in-game-head-row>*{pointer-events:auto}
.single-screen-game .in-game-head-row .sticker{min-width:0;max-width:37%}
.single-screen-game .in-game-head-row .heist-status{flex-shrink:0}
.single-screen-game .in-game-guidance{
 display:flex;align-items:center;justify-content:space-between;gap:12px;
 width:100%;min-width:0;box-sizing:border-box;padding:7px 11px;
 border-top:1px solid #ecdad4;border-bottom:1px solid #ebd1c7;
 background:linear-gradient(100deg,#fff9ec,#fff1e1);
}
.single-screen-game .in-game-guidance .stealth-help{
 display:flex;flex:1 1 50%;min-width:0;align-items:flex-start;
 flex-direction:column;gap:3px;margin:0;padding:0;
}
.single-screen-game .in-game-guidance #visionTip{
 display:block;font-size:clamp(11px,1.5vw,14px);
 line-height:1.24;font-weight:900;color:#6c455f;
}
.single-screen-game .in-game-guidance .guard-status{
 display:flex;align-items:center;gap:5px;
 font-size:clamp(9px,1.15vw,11px);line-height:1.2;color:#806d7f;
}
.single-screen-game .in-game-guidance #bonusQuick{
 flex:0 1 43%;max-width:43%;min-height:38px;
 margin:0!important;padding:6px 10px!important;
 font-size:clamp(10px,1.25vw,13px)!important;
 border-width:2px;border-radius:11px;
 box-shadow:0 2px 0 #d4a14d70;
}
.single-screen-game .in-game-guidance #bonusQuickText{
 overflow:hidden;text-overflow:ellipsis;white-space:normal;
 line-height:1.14;max-height:2.3em;
}
.single-screen-game .in-game-guidance #bonusQuickProgress{font-size:10px}
.single-screen-game .stealth-actionbar{
 position:relative!important;box-sizing:border-box;
 justify-content:center!important;align-items:center!important;
 width:100%!important;min-height:53px!important;height:auto!important;
 padding:5px 11px!important;gap:0!important;
 background:linear-gradient(90deg,#fff8f3,#fff1f2)!important
}
.single-screen-game .stealth-actionbar .board-yarn{
 min-width:170px!important;max-width:min(100%,360px)!important;min-height:43px!important;
}
@media(max-width:600px){
 .single-screen-game .in-game-head-row{min-height:44px;padding:3px 6px;gap:4px}
 .single-screen-game .in-game-head-row .sticker{max-width:34%}
 .single-screen-game .in-game-guidance{
  flex-wrap:wrap;gap:5px;padding:5px 8px 6px;align-items:stretch;
 }
 .single-screen-game .in-game-guidance .stealth-help{flex:1 1 100%;gap:2px}
 .single-screen-game .in-game-guidance #visionTip{font-size:11px}
 .single-screen-game .in-game-guidance .guard-status{font-size:10px}
 .single-screen-game .in-game-guidance #bonusQuick{
  flex:1 1 100%;max-width:100%;min-height:27px;
  justify-content:flex-start;padding:3px 7px!important;
  font-size:11px!important;
 }
 .single-screen-game .in-game-guidance #bonusQuickText{white-space:nowrap;max-height:none}
 .single-screen-game .stealth-actionbar{min-height:50px!important;padding:4px 8px!important}
 .single-screen-game .stealth-actionbar .board-yarn{min-width:145px!important;min-height:43px!important}
}
@media(max-width:370px){
 .single-screen-game .in-game-head-row .sticker{max-width:32%}
 .single-screen-game .in-game-head-row .heist-status{font-size:10px;padding:5px 4px}
 .single-screen-game .in-game-guidance{padding:4px 7px 5px}
}
@media(max-height:500px) and (min-width:601px){
 .single-screen-game .in-game-head-row{min-height:40px;padding:2px 8px}
 .single-screen-game .in-game-guidance{min-height:0;padding:3px 9px;gap:8px}
 .single-screen-game .in-game-guidance #visionTip{font-size:11px}
 .single-screen-game .in-game-guidance .guard-status{font-size:10px}
 .single-screen-game .in-game-guidance #bonusQuick{min-height:31px;padding:3px 8px!important}
 .single-screen-game .stealth-actionbar{min-height:46px!important;padding:3px 8px!important}
}

/* Unified visible objective bar: tutorial, optional quest and yarn share the
   area immediately above the playfield; the map has no bottom action strip. */
.single-screen-game .in-game-guidance{
 display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);
 align-items:center;gap:12px;padding:7px 11px!important;
}
.single-screen-game .in-game-guidance .stealth-help{min-width:0;display:flex;align-items:flex-start}
.single-screen-game .in-game-actions{
 display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:stretch;
 gap:7px;min-width:0;max-width:100%;
}
.single-screen-game .in-game-actions #bonusQuick{
 flex:1 1 auto!important;min-width:0;max-width:none!important;min-height:45px!important;
 padding:5px 9px!important;justify-content:flex-start;
}
.single-screen-game .in-game-actions .board-yarn{
 display:inline-flex!important;justify-content:center;align-items:center;
 flex:0 0 auto!important;width:auto!important;min-width:127px!important;
 max-width:40%!important;min-height:45px!important;max-height:none!important;
 padding:7px 9px!important;margin:0!important;border-radius:11px!important;
 font-size:clamp(11px,1.4vw,13px)!important;white-space:nowrap;
 touch-action:manipulation;
}
@media(max-width:700px){
 .single-screen-game .in-game-guidance{
  grid-template-columns:1fr;gap:5px;padding:5px 7px!important;
 }
 .single-screen-game .in-game-guidance .stealth-help{min-height:0;gap:2px}
 .single-screen-game .in-game-actions{width:100%;gap:6px}
 .single-screen-game .in-game-actions #bonusQuick{
  flex:1 1 0!important;max-width:none!important;min-width:0!important;
  min-height:43px!important;padding:5px 8px!important;
 }
 .single-screen-game .in-game-actions .board-yarn{
  flex:0 0 auto!important;min-width:110px!important;max-width:40%!important;
  min-height:43px!important;font-size:11px!important;padding:5px 8px!important
 }
}
@media(min-width:701px) and (max-height:500px){
 .single-screen-game .in-game-guidance{gap:8px;padding:3px 9px!important}
 .single-screen-game .in-game-actions #bonusQuick,
 .single-screen-game .in-game-actions .board-yarn{min-height:39px!important}
}

/* Desktop window fit: use the available HEIGHT as well as width.
   The outer game frame, its top navigation, guidance and map share exactly
   one content width. This rule excludes immersive/portal layouts. */
@media(min-width:701px){
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game{
  box-sizing:border-box!important;width:100%!important;max-width:none!important;
  padding:8px 12px 12px!important;margin:0 auto!important;
 }
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game .board-layout{
  width:100%!important;max-width:none!important;
  display:flex!important;justify-content:center!important;
 }
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game .stage{
  box-sizing:border-box!important;
  width:min(1040px,calc(100vw - 28px),calc(128dvh - 118px))!important;
  max-width:100%!important;min-width:0!important;
  height:auto!important;max-height:none!important;
  align-self:center!important;
 }
}
.single-screen-game .stage>.in-game-top,
.single-screen-game .stage>.playfield{
 box-sizing:border-box!important;display:block;
 width:100%!important;max-width:100%!important;min-width:0!important;
 align-self:stretch!important;
}
.single-screen-game .stage>.in-game-top{
 display:flex!important;flex:0 0 auto!important;
 margin:0!important;left:auto!important;right:auto!important;
}
.single-screen-game .stage>.playfield{
 aspect-ratio:10/7!important;flex:0 0 auto!important;
 margin:0!important;overflow:hidden;
}
.single-screen-game .in-game-head-row,
.single-screen-game .in-game-guidance{
 box-sizing:border-box!important;width:100%!important;
 max-width:100%!important;min-width:0!important;
 margin-left:0!important;margin-right:0!important;
}
/* Preserve usable space in short desktop browser windows without altering
   mobile portrait or the current fullscreen orientation. */
@media(min-width:701px) and (max-height:650px){
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game{padding:5px 10px 7px!important}
 .single-screen-game .in-game-head-row{min-height:38px!important;padding:3px 8px!important}
 .single-screen-game .in-game-guidance{padding:4px 9px!important;gap:6px!important}
 .single-screen-game .in-game-guidance #visionTip{font-size:11px!important}
 .single-screen-game .in-game-guidance .guard-status{font-size:10px!important}
 .single-screen-game .in-game-actions .board-yarn,
 .single-screen-game .in-game-actions #bonusQuick{min-height:39px!important}
}

/* Comfortable thumb target after moving the yarn action beside bonus missions. */
@media(max-width:700px){
 .single-screen-game .in-game-actions .board-yarn{
  box-sizing:border-box!important;min-height:46px!important;height:46px!important;
  max-height:none!important;flex-shrink:0!important;
 }
 .single-screen-game .in-game-actions #bonusQuick{min-height:46px!important}
}

/* In-stage menu visual polish: undo legacy sidebar spacing inside modal. */
.single-screen-game #gameMenu{
 box-sizing:border-box!important;padding:clamp(5px,1.5vw,12px)!important;
 overflow:hidden!important;
}
.single-screen-game #gameMenu .menu-shell{
 box-sizing:border-box!important;flex:0 1 auto!important;
 width:min(590px,100%)!important;max-width:100%!important;
 height:min(95%,690px)!important;max-height:100%!important;min-height:0!important;
 border-radius:16px!important;
 overflow:hidden!important;
}
.single-screen-game #gameMenu .menu-head{
 box-sizing:border-box!important;flex:0 0 auto!important;min-width:0!important;
 padding:11px 14px 6px!important;align-items:flex-start!important;
}
.single-screen-game #gameMenu .menu-head>div{min-width:0;flex:1}
.single-screen-game #gameMenu .menu-head h2{
 font:700 clamp(19px,3.1vw,27px)/1.14 Fredoka,system-ui!important;
 margin:2px 0 4px!important;overflow-wrap:anywhere
}
.single-screen-game #gameMenu .menu-head p{line-height:1.3!important}
.single-screen-game #gameMenu .menu-tabs{
 display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
 align-items:stretch!important;gap:6px!important;
 overflow:visible!important;min-width:0!important;width:100%!important;
 box-sizing:border-box!important;padding:7px 12px 9px!important;
}
.single-screen-game #gameMenu .menu-tabs button{
 box-sizing:border-box!important;flex:none!important;min-width:0!important;max-width:100%!important;
 white-space:nowrap!important;overflow:hidden!important;
 display:flex!important;gap:5px!important;align-items:center!important;justify-content:center!important;
 font:800 clamp(10px,1.3vw,12px)/1.15 Nunito,system-ui!important;
 min-height:40px!important;padding:7px 3px!important;border-radius:9px!important;
}
.single-screen-game #gameMenu .menu-tabs button span{
 display:inline-block;min-width:0;overflow:hidden;text-overflow:ellipsis;
}
.single-screen-game #gameMenu .game-menu-body{
 box-sizing:border-box!important;display:block!important;min-width:0!important;
 flex:1 1 auto!important;overflow-x:hidden!important;overflow-y:auto!important;
 padding:14px 16px 18px!important;
 scrollbar-width:thin;overscroll-behavior:contain;
}
.single-screen-game #gameMenu [data-tab-panel]{min-width:0;overflow-wrap:anywhere}
.single-screen-game #gameMenu [data-tab-panel="cats"] #closetLabel{
 display:block;font-size:11px;line-height:1.4;margin:0 0 10px!important;
}
.single-screen-game #gameMenu [data-tab-panel="cats"] #wardrobe{
 display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
 gap:10px!important;align-items:start!important;
 width:100%!important;max-width:480px!important;
 margin:0 0 14px!important;padding:3px 0 0!important;
}
.single-screen-game #gameMenu [data-tab-panel="cats"] .skin{
 box-sizing:border-box!important;display:grid!important;place-items:center!important;
 width:min(100%,68px)!important;height:68px!important;min-height:68px!important;
 margin:0!important;max-width:100%!important;
 border-radius:16px!important;
}
.single-screen-game #gameMenu [data-tab-panel="cats"] .cat-portrait{
 transform:none!important;width:36px!important;height:34px!important;
 border-radius:46% 46% 43% 43%!important;
}
/* Short triangular cat ears; previous rounded upright shapes resembled bunnies. */
.single-screen-game #gameMenu [data-tab-panel="cats"] .cat-portrait:before,
.single-screen-game #gameMenu [data-tab-panel="cats"] .cat-portrait:after{
 content:'';position:absolute;top:-11px;width:17px;height:16px;
 background:var(--cat-fur);border:2px solid var(--cat-detail);
 border-radius:2px 3px 0 0;z-index:-1;
 clip-path:polygon(0 100%,43% 0,100% 100%);
 transform:none!important;
}
.single-screen-game #gameMenu [data-tab-panel="cats"] .cat-portrait:before{left:-3px}
.single-screen-game #gameMenu [data-tab-panel="cats"] .cat-portrait:after{right:-3px}
.single-screen-game #gameMenu [data-tab-panel="cats"] #skinHint,
.single-screen-game #gameMenu [data-tab-panel="cats"] #ability{
 box-sizing:border-box!important;position:static!important;display:block!important;
 width:100%!important;height:auto!important;
 margin:0!important;padding:0!important;
 font:750 12px/1.55 Nunito,system-ui!important;
 color:#806a7e!important;overflow-wrap:anywhere!important;
}
.single-screen-game #gameMenu [data-tab-panel="cats"] #skinHint{
 margin:0 0 8px!important;color:#82677f!important
}
.single-screen-game #gameMenu [data-tab-panel="cats"] #ability{
 padding:9px 11px!important;border-radius:10px!important;
 background:#f8eef5!important;border:1px solid #eadbe9!important;
}
.single-screen-game #gameMenu [data-tab-panel="help"] #howBody{
 margin:6px 0 10px!important;
 font:750 12px/1.5 Nunito,system-ui!important;
 color:#756178!important;
}
.single-screen-game #gameMenu .menu-help-step{
 box-sizing:border-box!important;
 display:grid!important;grid-template-columns:minmax(100px,.72fr) minmax(0,1.28fr)!important;
 align-items:start!important;gap:12px!important;
 margin:7px 0!important;padding:9px 11px!important;
 font:750 12px/1.46 Nunito,system-ui!important;
}
.single-screen-game #gameMenu .menu-help-step strong{
 min-width:0!important;margin:0!important;line-height:1.4!important;
}
.single-screen-game #gameMenu .menu-help-step span{min-width:0}
.single-screen-game #gameMenu #ruleBonus{
 margin:11px 0!important;padding:10px 11px!important;
 border:1px solid #ead7eb;border-radius:10px;
 background:#f9eff9;color:#744f7c!important;
 font:750 12px/1.5 Nunito,system-ui!important;
}
.single-screen-game #gameMenu #yarnExplain{display:none!important}
.single-screen-game #gameMenu #helpLegend{
 margin:8px 0 13px!important;padding:9px 11px!important;
 font:800 11px/1.4 Nunito,system-ui!important;white-space:normal!important;
}
@media(max-width:480px){
 .single-screen-game #gameMenu .menu-head{padding:8px 10px 4px!important}
 .single-screen-game #gameMenu .menu-head h2{font-size:20px!important}
 .single-screen-game #gameMenu .menu-tabs{gap:4px!important;padding:5px 7px 7px!important}
 .single-screen-game #gameMenu .menu-tabs button{
  gap:2px!important;font-size:10px!important;min-height:38px!important;padding:5px 1px!important;
 }
 .single-screen-game #gameMenu .game-menu-body{padding:10px 12px 15px!important}
 .single-screen-game #gameMenu [data-tab-panel="cats"] #wardrobe{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  max-width:235px!important;gap:9px!important;
 }
 .single-screen-game #gameMenu [data-tab-panel="cats"] .skin{
  width:min(100%,66px)!important;height:65px!important;min-height:65px!important;
 }
 .single-screen-game #gameMenu .menu-help-step{
  grid-template-columns:1fr!important;gap:3px!important;
  padding:8px 10px!important;
 }
}
@media(max-height:420px){
 .single-screen-game #gameMenu .menu-head{padding:5px 10px 2px!important}
 .single-screen-game #gameMenu .menu-tabs{padding-top:3px!important;padding-bottom:4px!important}
 .single-screen-game #gameMenu .game-menu-body{padding-top:8px!important}
}

/* Browser zoom / short landscape windows: don't let the entire game or modal
   extend below the viewport just because the CSS viewport is under 700px. */
@media(max-width:700px) and (max-height:650px){
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game{
  padding:3px 0 5px!important;
 }
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game .stage{
  box-sizing:border-box!important;
  width:min(calc(100vw - 12px),calc((100dvh - 165px)*10/7))!important;
  min-width:0!important;max-width:100%!important;
  height:auto!important;margin:0 auto!important;
 }
 .single-screen-game #gameMenu .menu-shell{
  height:min(96%,calc(100dvh - 16px))!important;max-height:100%!important;
 }
}

/* Eighth-room cinematic is a real in-game scene: unobstructed on desktop/mobile. */
#stage.outro-active>.in-game-top,
#stage.outro-active>.in-game-guidance,
#stage.outro-active .paws-alert,
#stage.outro-active .yarn-aim-banner,
#stage.outro-active .coach-spot,
#stage.outro-active .toast,
#stage.outro-active .achievement-toast{
 visibility:hidden!important;
 pointer-events:none!important;
}
#stage.outro-active #board{cursor:pointer!important}

/* Always-visible home link in the top-left game header. */
.single-screen-game .in-game-head-row .stage-left{
 display:flex;align-items:center;gap:7px;flex:1 1 auto;min-width:0;
}
.single-screen-game .in-game-head-row .stage-left .sticker{
 flex:1 1 auto;min-width:0;max-width:none!important;
}
.single-screen-game #stageHome{
 display:inline-flex;align-items:center;justify-content:center;gap:4px;
 min-height:39px;flex:0 0 auto;padding:0 10px;
 border:1px solid #ead8df;border-radius:11px;background:#fffdfa;
 color:#70516a;font:900 12px/1.1 Nunito,system-ui,sans-serif;
 text-decoration:none;box-shadow:0 2px 5px #6d4f5e17;
 cursor:pointer;white-space:nowrap;touch-action:manipulation;
}
.single-screen-game #stageHome:hover{background:#ffebf2;color:#914d77}
.single-screen-game #stageHome:focus-visible{outline:3px solid #ac6c97;outline-offset:2px}
.single-screen-game .stage-home-arrow{font-size:23px;line-height:1}
@media(max-width:600px){
 .single-screen-game .in-game-head-row .stage-left{gap:3px}
 .single-screen-game #stageHome{width:39px;min-width:39px;height:39px;min-height:39px;padding:0}
 .single-screen-game #stageHomeLabel{display:none}
 .single-screen-game .in-game-head-row .stage-left .sticker{
  min-width:0!important;max-width:none!important;padding:4px!important;
 }
 .single-screen-game .in-game-head-row .stage-left .sticker b{font-size:9px}
 .single-screen-game .in-game-head-row .heist-status{margin:0 3px}
}
@media(max-width:390px){
 .single-screen-game .in-game-head-row .stage-left .sticker b{display:none}
 .single-screen-game .in-game-head-row .stage-left .sticker{flex:0 1 auto}
}
#stage.outro-active #stageHome{visibility:visible!important;position:relative;z-index:16}
html.cg-play #stageHome,html.cg-play #back{display:none!important}

/* In a short non-fullscreen browser window, the menu must be sized to
   the visible viewport, not the shrunken game board's bounding box. */
@media(max-width:700px) and (max-height:420px){
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game #gameMenu{
  position:fixed!important;inset:0!important;width:100vw!important;
  height:100dvh!important;padding:6px!important;z-index:1000!important;
 }
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game #gameMenu .menu-shell{
  box-sizing:border-box!important;height:min(100%,calc(100dvh - 12px))!important;
  max-height:calc(100dvh - 12px)!important;
 }
}

/* Keep desktop header to a single compact row in short windows; the
   game board must never be pushed below the fold by home navigation. */
@media(min-width:701px) and (max-height:650px){
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game .in-game-head-row{
  height:42px!important;min-height:42px!important;max-height:42px!important;
  flex-wrap:nowrap!important;gap:4px!important;padding:2px 6px!important;overflow:hidden;
 }
 .single-screen-game .in-game-head-row .stage-left{gap:3px!important}
 .single-screen-game .in-game-head-row .stage-left .sticker{
  flex:1 1 0!important;min-width:0!important;max-width:none!important;padding:3px 5px!important;
 }
 .single-screen-game .in-game-head-row .stage-left .sticker b{font-size:10px!important}
 .single-screen-game #stageHome{
  width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;
  padding:0!important;
 }
 .single-screen-game #stageHomeLabel{display:none!important}
 .single-screen-game .in-game-head-row .heist-status{margin:0 2px!important;padding:5px 6px!important}
 .single-screen-game .in-game-guidance{padding:3px 7px!important}
 .single-screen-game .in-game-guidance #visionTip{font-size:10px!important;line-height:1.16!important}
 .single-screen-game .in-game-guidance .guard-status{font-size:9px!important}
 .single-screen-game .in-game-actions #bonusQuick,
 .single-screen-game .in-game-actions .board-yarn{min-height:38px!important;padding-top:3px!important;padding-bottom:3px!important}
}

/* HUD restart beside the yarn action; visible without opening a menu. */
.single-screen-game .in-game-actions #restart{
 box-sizing:border-box;display:inline-flex;flex:0 0 68px;align-items:center;
 justify-content:center;gap:4px;min-width:68px;max-width:68px;min-height:45px;
 padding:5px 7px;border:1px solid #dcc7d2;border-radius:11px;
 background:#fffaf6;color:#78546c;box-shadow:0 2px 4px #7052661c;
 font:900 12px/1.1 Nunito,system-ui,sans-serif;white-space:nowrap;
 cursor:pointer;touch-action:manipulation;
}
.single-screen-game .in-game-actions #restart:hover{background:#ffedf1}
.single-screen-game .in-game-actions #restart:focus-visible{outline:3px solid #ad789e;outline-offset:2px}
.single-screen-game .in-game-actions #restart .restart-symbol{font:900 23px/1 system-ui,sans-serif}
@media(max-width:700px){
 .single-screen-game .in-game-actions #restart{flex-basis:44px;min-width:44px;max-width:44px;min-height:46px;padding:4px}
 .single-screen-game .in-game-actions #restart .restart-label{display:none}
}
@media(min-width:701px) and (max-height:500px){
 .single-screen-game .in-game-actions #restart{min-height:39px}
}

/* Results can be dismissed without restarting; retain board and main toolbar. */
.single-screen-game .overlay .modal{position:relative;overflow-y:auto;overscroll-behavior:contain}
.single-screen-game .overlay .result-close{position:absolute;right:8px;top:8px;display:grid;place-items:center;width:42px;height:42px;min-width:42px;min-height:42px;border:1px solid #e7cbda;border-radius:13px;background:#fff0f3;color:#89586d;font:700 27px/1 system-ui;cursor:pointer;z-index:2;touch-action:manipulation}
.single-screen-game .overlay .result-close:hover,.single-screen-game .overlay .result-close:focus-visible{background:#fbdce7;outline:2px solid #c583a1;outline-offset:1px}
.single-screen-game .overlay .cat-medal{padding-top:12px}
@media(max-width:620px){.single-screen-game .overlay .result-close{right:5px;top:5px;width:40px;height:40px;min-width:40px;min-height:40px}}

/* Cat sound controls belong inside the playable game, not the hidden legacy
   page header. Keep both switches accessible and within 320px phone widths. */
.single-screen-game #stageControls .mw-audio-dock{
  display:inline-flex!important;align-items:center;gap:4px!important;
  flex:0 0 auto;min-width:0;max-width:100%;margin:0!important;order:0!important;
}
.single-screen-game #stageControls .mw-audio-dock button{
  display:inline-flex!important;position:relative!important;flex:0 0 40px!important;
  box-sizing:border-box!important;width:40px!important;min-width:40px!important;
  max-width:40px!important;height:42px!important;min-height:42px!important;
  padding:0!important;margin:0!important;border-radius:12px!important;
  background:#fff9f3!important;border:1px solid #e9d8df!important;
  color:#78566e!important;font-size:0!important;line-height:1!important;
  white-space:nowrap!important;box-shadow:0 2px 5px #70526620!important;
  touch-action:manipulation;
}
.single-screen-game #stageControls #music::before{
  content:"♫";font:900 23px/1 system-ui;opacity:1;
}
.single-screen-game #stageControls #sound::before{
  content:"🔊";font:900 20px/1 system-ui;opacity:1;
}
.single-screen-game #stageControls #sound[aria-pressed="false"]::before{content:"🔇"}
.single-screen-game #stageControls #music[aria-pressed="false"]::before{opacity:.45}
.single-screen-game #stageControls .mw-audio-dock button:focus-visible{
  outline:3px solid #9d6ba6!important;outline-offset:1px!important;
}
@media(max-width:700px){
 .single-screen-game #stageControls .mw-audio-dock{gap:3px!important}
 .single-screen-game #stageControls .mw-audio-dock button{
  width:40px!important;min-width:40px!important;max-width:40px!important;
  height:42px!important;min-height:42px!important;padding:0!important;
 }
}
@media(max-width:600px){
 .single-screen-game .in-game-head-row{flex-wrap:wrap!important;row-gap:2px!important}
 .single-screen-game #stageControls{
  display:flex!important;width:100%!important;flex:1 1 100%!important;
  justify-content:flex-end!important;align-items:center!important;
  min-width:0!important;gap:4px!important;
 }
 .single-screen-game .in-game-head-row .heist-status{margin-left:auto!important}
 .single-screen-game #stageControls .mw-audio-dock{margin:0!important}
}

/* Shared fullscreen chrome uses a 34px cap. The cat HUD needs the real
   44px finger-sized control on desktop AND mobile, not just under 700px. */
html[data-mw-fullscreen-game="pawsibly-innocent"] #stageControls > #mw-fullscreen-toggle{
 box-sizing:border-box!important;width:44px!important;min-width:44px!important;
 max-width:44px!important;height:44px!important;min-height:44px!important;
 max-height:44px!important;flex:0 0 44px!important;
}

/* Short desktop windows: audio joins a compact ONE-LINE toolbar instead of
   adding a second row and forcing the board below the viewport. Help remains
   available through the visible Menu button; Home retains its back arrow. */
@media(min-width:701px) and (max-height:760px){
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game #quickHelp{display:none!important}
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game #stageHomeLabel{display:none!important}
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game #stageHome{
  width:40px!important;min-width:40px!important;max-width:40px!important;
  padding:0!important;
 }
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game #menuButton{
  min-width:80px!important;padding:0 6px!important;
 }
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game .in-game-head-row{
  flex-wrap:nowrap!important;align-items:center!important;gap:4px!important;
 }
}

/* Communicate why a perfect escape earned or missed three stars. */
.single-screen-game .overlay .modal .result-star-guide{
 margin:5px auto 9px;max-width:100%;padding:7px 9px;
 background:#f4edf7;border:1px solid #e8d7eb;border-radius:10px;
 color:#765774;font:800 12px/1.4 Nunito,system-ui,sans-serif;overflow-wrap:anywhere;
}
.single-screen-game .overlay .modal .result-star-guide:empty{display:none}
.single-screen-game #gameMenu .star-rule-help{
 background:#fff3d9;border-left:3px solid #d8ac64;border-radius:7px;
 margin:7px 0 9px;padding:7px 10px;font:800 12px/1.5 Nunito,system-ui,sans-serif;
 color:#70566b;overflow-wrap:anywhere;
}

/* A fair Wait turn also resolves fish temporarily blocked by moving actors. */
.single-screen-game .in-game-actions #wait{
 box-sizing:border-box;display:inline-flex;flex:0 0 65px;align-items:center;justify-content:center;gap:3px;
 min-width:65px;max-width:65px;min-height:45px;padding:5px 7px;border:1px solid #c5d5d0;
 border-radius:11px;background:#effaf6;color:#456f65;font:900 12px/1.1 Nunito,system-ui,sans-serif;
 cursor:pointer;touch-action:manipulation;
}
.single-screen-game .in-game-actions #wait:disabled{opacity:.55;cursor:default}
.single-screen-game .in-game-actions #wait:focus-visible{outline:3px solid #508f81;outline-offset:2px}
.single-screen-game .in-game-actions #wait .wait-symbol{font:900 19px/1 system-ui,sans-serif}
@media(max-width:700px){
 .single-screen-game .in-game-actions #wait{flex-basis:44px;min-width:44px;max-width:44px;min-height:46px;padding:2px;flex-direction:column;gap:0}
 .single-screen-game .in-game-actions #wait .wait-symbol{font-size:17px}
 .single-screen-game .in-game-actions #wait .wait-label{display:inline!important;font:900 10px/1 Nunito,system-ui,sans-serif}
}
@media(max-width:360px){
 .single-screen-game .in-game-actions{gap:4px!important;flex-wrap:wrap!important}
 .single-screen-game .in-game-actions #bonusQuick{flex:1 1 100%!important;order:0;min-height:35px!important;padding:4px!important}
 .single-screen-game .in-game-actions .board-yarn{flex:1 1 auto!important;order:1;min-width:101px!important;max-width:none!important;padding:4px!important;font-size:10px!important}
 .single-screen-game .in-game-actions #wait{order:2}
 .single-screen-game .in-game-actions #restart{order:3}
}
@media(min-width:701px) and (max-height:500px){.single-screen-game .in-game-actions #wait{min-height:39px}}

/* 900x520: previously the optional goal collapsed to 22px. A full-width
   action row on short desktop windows preserves instructions and readable CTA. */
@media(min-width:701px) and (max-height:830px){
 html:not(.cg-play):not(.mw-fs-active) .single-screen-game .stage{
  width:min(1040px,calc(100vw - 28px),calc(128dvh - 188px))!important;
 }
 html:not(.cg-play):not(.mw-fs-active) .single-screen-game .in-game-guidance{
  grid-template-columns:minmax(0,1fr)!important;gap:3px!important;
  padding:5px 9px!important;
 }
 html:not(.cg-play):not(.mw-fs-active) .single-screen-game .in-game-actions{
  width:100%!important;max-width:100%!important;
 }
 html:not(.cg-play):not(.mw-fs-active) .single-screen-game .in-game-actions #bonusQuick{
  min-width:120px!important;
 }
}

/* Narrow-screen player QA: controls may wrap, but ROOM 01/08 must never
   collapse into a three-line vertical label beside the audio tools. */
@media(max-width:620px){
 .single-screen-game .in-game-head-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:"controls controls" "room status"!important;
  align-items:center!important;column-gap:6px!important;row-gap:3px!important;
  padding:5px 7px!important;
 }
 .single-screen-game #stageControls{
  grid-area:controls!important;display:flex!important;
  width:100%!important;max-width:none!important;min-width:0!important;
  flex:none!important;justify-content:space-between!important;gap:3px!important;
 }
 .single-screen-game .in-game-head-row .stage-left{
  grid-area:room!important;min-width:0!important;max-width:100%!important;
  width:auto!important;flex:none!important;gap:4px!important;
  align-items:center!important;
 }
 .single-screen-game .in-game-head-row .stage-left .sticker{
  box-sizing:border-box!important;flex:1 1 auto!important;
  min-width:0!important;max-width:none!important;
  padding:3px 6px!important;overflow:hidden!important;
 }
 .single-screen-game #roomNum{
  display:block!important;font-size:9px!important;line-height:1.2!important;
  white-space:nowrap!important;word-break:normal!important;overflow:hidden!important;
  text-overflow:ellipsis!important;
 }
 .single-screen-game #roomTag{
  display:block!important;font-size:10px!important;line-height:1.2!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
 }
 .single-screen-game #heistStatus{
  grid-area:status!important;flex:none!important;justify-self:end!important;
  min-width:0!important;white-space:nowrap!important;
 }
}

/* Review correction: prior mobile grid had a fixed-height 42px ancestor
   from the desktop compact rule. Let two rows lay out at their real height. */
@media(max-width:620px){
 html:not(.cg-play) .single-screen-game .in-game-head-row,
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game .in-game-head-row{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:"controls controls" "room status"!important;
  height:auto!important;min-height:88px!important;max-height:none!important;
  overflow:visible!important;align-items:center!important;row-gap:3px!important;
 }
 .single-screen-game .in-game-head-row .stage-left{
  grid-area:room!important;justify-self:stretch!important;min-width:0!important;
  width:100%!important;max-width:none!important;
 }
 .single-screen-game .in-game-head-row .stage-left .sticker{
  min-width:85px!important;flex:1 1 auto!important;max-width:none!important;
  width:auto!important;overflow:hidden!important;
 }
 .single-screen-game .in-game-head-row #heistStatus{
  grid-area:status!important;justify-self:end!important;
 }
 .single-screen-game .in-game-head-row #stageControls{
  grid-area:controls!important;min-width:0!important;width:100%!important;
  justify-self:stretch!important;justify-content:space-between!important;
 }
}

/* Mobile release-review layout: do not cram navigation, 0/3 and a long
   icon toolbar on the same line. The room/status line and wrapped
   controls must each own genuine space and remain fully clickable. */
@media(max-width:620px){
 html:not(.mw-fs-active):not(.cg-play) .single-screen-game .in-game-head-row,
 html.mw-fs-active:not(.cg-play) .single-screen-game .in-game-head-row{
  position:relative!important;display:flex!important;flex-direction:column!important;
  justify-content:flex-start!important;align-items:stretch!important;
  height:auto!important;min-height:0!important;max-height:none!important;
  overflow:visible!important;gap:5px!important;padding:5px 7px!important;
 }
 html:not(.cg-play) .single-screen-game .in-game-head-row .stage-left{
  box-sizing:border-box!important;order:0!important;align-self:flex-start!important;
  flex:0 0 auto!important;width:calc(100% - 114px)!important;
  min-width:0!important;max-width:calc(100% - 114px)!important;
 }
 html:not(.cg-play) .single-screen-game .in-game-head-row .stage-left .sticker{
  width:auto!important;max-width:none!important;min-width:0!important;
  flex:1 1 auto!important;
 }
 html:not(.cg-play) .single-screen-game .in-game-head-row #heistStatus{
  position:absolute!important;top:7px!important;right:7px!important;
  order:0!important;white-space:nowrap!important;margin:0!important;
  font-size:10px!important;padding:5px 6px!important;
  z-index:2!important;max-width:106px!important;
 }
 html:not(.cg-play) .single-screen-game .in-game-head-row #stageControls{
  order:1!important;box-sizing:border-box!important;
  display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;
  align-self:stretch!important;width:100%!important;max-width:100%!important;
  flex:0 0 auto!important;min-width:0!important;height:auto!important;
  justify-content:center!important;align-content:center!important;
  row-gap:4px!important;column-gap:4px!important;
 }
}

/* Real phone touch-target audit: 28px icon hitboxes are too small, even
   when they appear visually inside the screen. Flex wrapping is allowed. */
@media(max-width:620px){
 html:not(.cg-play) .single-screen-game #stageControls button{
  box-sizing:border-box!important;
  min-width:34px!important;
  flex-shrink:0!important;
 }
}


/* 2026-11-22: Desktop HUD must reserve actual width for the room title,
   instead of squeezing it between the score and duplicate audio controls. */
.single-screen-game #menuButton{position:relative!important}
.single-screen-game #menuButton.badge-received{animation:pocketPulse .5s ease-out}
.single-screen-game #menuButton.badge-received::after{
 content:"🏅";position:absolute;top:-12px;right:-9px;pointer-events:none;
 font-size:14px;filter:drop-shadow(0 2px 2px #442a4259);
 animation:menuBadgeArrive .5s ease-out both;
}
@keyframes menuBadgeArrive{
 from{opacity:0;transform:translateY(7px) scale(.5)}
 45%{opacity:1;transform:translateY(-2px) scale(1.2)}
 to{opacity:0;transform:translateY(-5px) scale(.85)}
}
@keyframes pocketPulse{0%{box-shadow:0 0 0 0 #c68ab9}50%{box-shadow:0 0 0 7px #c68ab966}100%{box-shadow:0 0 0 0 #c68ab900}}
@media (min-width:701px){
 .single-screen-game .in-game-head-row{
  display:grid!important;grid-template-columns:minmax(205px,1.2fr) max-content minmax(0,2fr)!important;
  align-items:center!important;column-gap:9px!important;row-gap:4px!important;
  height:auto!important;max-height:none!important;min-height:46px!important;
  padding:5px 9px!important;overflow:visible!important
 }
 .single-screen-game .in-game-head-row .stage-left{
  width:100%!important;min-width:0!important;max-width:none!important;
  flex:initial!important;gap:5px!important
 }
 .single-screen-game .in-game-head-row .stage-left .sticker{
  flex:1 1 auto!important;min-width:0!important;max-width:100%!important;
  width:100%!important;padding:4px 8px!important;overflow:hidden!important
 }
 .single-screen-game #roomNum,.single-screen-game #roomTag{
  display:block!important;white-space:nowrap!important;word-break:normal!important;
  overflow:hidden!important;text-overflow:ellipsis!important;line-height:1.2!important
 }
 .single-screen-game #roomNum{font-size:10px!important}
 .single-screen-game #roomTag{font-size:clamp(11px,1.2vw,14px)!important}
 .single-screen-game .in-game-head-row .heist-status{
  white-space:nowrap!important;margin:0!important;max-width:none!important;
  font-size:13px!important;padding:7px 9px!important;justify-self:center!important
 }
 .single-screen-game #stageControls{
  display:flex!important;justify-content:flex-end!important;align-items:center!important;
  width:100%!important;min-width:0!important;flex:none!important;
  flex-wrap:nowrap!important;gap:4px!important
 }
 .single-screen-game #stageControls>.hud-icon,
 .single-screen-game #stageControls>.mw-fullscreen-toggle{
  box-sizing:border-box!important;flex:0 0 36px!important;
  width:36px!important;min-width:36px!important;height:38px!important;min-height:38px!important;
  max-width:36px!important;border-radius:10px!important;font-size:17px!important
 }
 .single-screen-game #stageControls #menuButton{
  flex:0 0 auto!important;width:auto!important;min-width:76px!important;
  max-width:none!important;padding:0 9px!important;font-size:13px!important
 }
 .single-screen-game #stageControls #mw-fullscreen-toggle{width:36px!important;min-width:36px!important;max-width:36px!important;flex-basis:36px!important;height:38px!important;min-height:38px!important}
 .single-screen-game #stageHomeLabel{display:none!important}
 .single-screen-game #stageHome{box-sizing:border-box!important;padding:0!important;width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important}
}
@media(min-width:701px) and (max-width:1070px){
 .single-screen-game .in-game-head-row{
  grid-template-columns:minmax(0,1fr) max-content!important;
  grid-template-areas:"room status" "tools tools"!important;
  row-gap:3px!important
 }
 .single-screen-game .in-game-head-row .stage-left{grid-area:room!important}
 .single-screen-game .in-game-head-row .heist-status{grid-area:status!important}
 .single-screen-game .in-game-head-row #stageControls{grid-area:tools!important;justify-content:flex-end!important}
}
/* Compact reward appears briefly, then flies to the existing menu button (Badges tab). */
.single-screen-game .achievement-toast{
 top:17%!important;width:max-content!important;max-width:min(300px,83%)!important;
 min-height:0!important;gap:8px!important;padding:8px 10px!important;
 border-radius:12px!important;border-width:1px!important;
 animation:badgeAppear .18s ease-out both!important;will-change:transform,opacity;
}
.single-screen-game .achievement-toast .award-icon{
 width:37px!important;height:37px!important;flex:0 0 37px!important;
 border-radius:9px!important;font-size:22px!important
}
.single-screen-game .achievement-toast .award-label{font-size:9px!important}
.single-screen-game .achievement-toast .award-title{font-size:14px!important;line-height:1.2!important}
.single-screen-game .achievement-toast .award-desc{font-size:10px!important;line-height:1.2!important}
.single-screen-game .achievement-toast.collecting{
 animation:badgeCollect .5s cubic-bezier(.5,0,.9,.6) both!important
}
@keyframes badgeAppear{
 from{opacity:0;transform:translate(-50%,-9px) scale(.92)}
 to{opacity:1;transform:translate(-50%,0) scale(1)}
}
@keyframes badgeCollect{
 from{opacity:1;transform:translate(-50%,0) scale(1)}
 75%{opacity:.9}
 to{opacity:0;transform:translate(calc(-50% + var(--badge-dx,0px)),var(--badge-dy,-100px)) scale(.15)}
}
@media(prefers-reduced-motion:reduce){
 .single-screen-game .achievement-toast,.single-screen-game .achievement-toast.collecting{
  animation:none!important;transition:opacity .15s ease!important
 }
 .single-screen-game .achievement-toast.collecting{opacity:0}
 .single-screen-game #menuButton.badge-received,.single-screen-game #menuButton.badge-received::after{animation:none}
}
/* Richer, readable end-of-room recap. */
.single-screen-game .overlay .modal .result-verdict{
 color:#7b5876;font-weight:850;font-size:12px;line-height:1.35;
 margin:5px auto 9px;max-width:340px
}
.single-screen-game .overlay .modal .result-breakdown{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:6px;margin:9px 0 11px;text-align:left
}
.single-screen-game .overlay .result-stat{
 display:flex;justify-content:space-between;align-items:center;gap:5px;
 padding:7px 9px;background:#fff1e9;border:1px solid #efdfd9;border-radius:10px;
 font-size:11px;min-width:0
}
.single-screen-game .overlay .result-stat span{color:#8d7383;min-width:0;line-height:1.2}
.single-screen-game .overlay .result-stat strong{color:#6f496b;white-space:nowrap;font-size:12px}
@media(max-width:420px){.single-screen-game .overlay .result-stat{padding:6px;font-size:10px}.single-screen-game .overlay .result-stat strong{font-size:10px}}


/* The complete-save reset lives in the menu, never in the quick-retry toolbar. */
.single-screen-game .reset-progress-section{
 margin:14px 0 2px;padding-top:12px;border-top:1px solid #ecdce2;
}
.single-screen-game .reset-progress-button{
 display:inline-flex;align-items:center;justify-content:center;gap:6px;
 min-height:42px;padding:8px 14px;border:1px solid #e7bec9;border-radius:11px;
 background:#fff1f2;color:#9b455f;font:900 12px/1.2 Nunito,system-ui,sans-serif;
 cursor:pointer;touch-action:manipulation;
}
.single-screen-game .reset-progress-button:hover,.single-screen-game .reset-progress-button:focus-visible{
 background:#ffe6ea;outline:2px solid #c8839b;outline-offset:2px;
}
.single-screen-game #resetConfirm{
 position:absolute;inset:0;z-index:80;box-sizing:border-box;
 display:flex;align-items:center;justify-content:center;padding:12px;
 background:#30243fdf;backdrop-filter:blur(4px);
}
.single-screen-game #resetConfirm[hidden]{display:none!important}
.single-screen-game .reset-confirm-card{
 width:min(390px,100%);max-height:100%;overflow-y:auto;
 border:3px solid #fffaf8;border-radius:19px;background:#fff9f2;
 padding:clamp(13px,3vw,23px);text-align:center;color:#644b61;
 box-shadow:0 20px 50px #28183075;
}
.single-screen-game .reset-confirm-icon{
 display:grid;place-items:center;margin:0 auto 7px;
 border-radius:16px;width:43px;height:43px;background:#fce5e9;color:#b54e67;
 font-size:27px;font-weight:900;
}
.single-screen-game #resetTitle{font:700 clamp(18px,3vw,23px)/1.3 Fredoka,system-ui;margin:5px 0 7px;color:#934662}
.single-screen-game #resetDescription{font:750 12px/1.5 Nunito,system-ui;margin:0 0 16px;color:#806978}
.single-screen-game .reset-confirm-actions{display:flex;gap:9px;justify-content:center;flex-wrap:wrap}
.single-screen-game .reset-confirm-actions button{
 flex:1 1 145px;box-sizing:border-box;min-height:43px;max-width:100%;
 padding:9px;border-radius:11px;border:1px solid transparent;
 font:900 12px/1.3 Nunito,system-ui;cursor:pointer;touch-action:manipulation;
}
.single-screen-game .reset-cancel{background:#eee2f0;color:#654c6c;border-color:#d9c4dc!important}
.single-screen-game .reset-danger{background:#c2516b;color:#fff}
.single-screen-game .reset-confirm-actions button:focus-visible{outline:3px solid #b36bac;outline-offset:2px}

/* Compact single replay control. Keep the action bar playable on narrow screens.
   Actual choices appear only in the existing game menu; never duplicate them. */
.single-screen-game .in-game-actions #restart.replay-menu-trigger{
 box-sizing:border-box!important;display:inline-flex!important;
 flex:0 0 auto!important;align-items:center!important;justify-content:center!important;
 min-width:82px!important;width:auto!important;max-width:100px!important;
 min-height:42px!important;max-height:none!important;
 gap:4px!important;padding:5px 10px!important;margin:0!important;
 border:1px solid #d6bfd1!important;border-radius:10px!important;
 background:#fffaf6!important;color:#674b65!important;box-shadow:0 2px 0 #ddc4d2!important;
 white-space:nowrap!important;text-align:center!important;
 font:900 12px/1.15 Nunito,system-ui,sans-serif!important;
 cursor:pointer!important;
}
.single-screen-game .in-game-actions #restart.replay-menu-trigger:hover{background:#f9e8f0!important}
.single-screen-game .in-game-actions #restart.replay-menu-trigger:focus-visible{outline:3px solid #a776a1!important;outline-offset:2px!important}
.single-screen-game .in-game-actions #restart.replay-menu-trigger .restart-symbol{font:900 19px/1 system-ui,sans-serif!important}
.single-screen-game .in-game-actions #restart.replay-menu-trigger .restart-label{
 display:inline!important;font:900 12px/1.15 Nunito,system-ui,sans-serif!important;
 white-space:nowrap!important;
}
@media(max-width:700px){
 .single-screen-game .in-game-actions #restart.replay-menu-trigger{
  order:3!important;min-width:74px!important;max-width:88px!important;
  min-height:44px!important;padding:4px 8px!important;
 }
}
@media(max-width:360px){
 .single-screen-game .in-game-actions #restart.replay-menu-trigger{
  min-width:70px!important;max-width:79px!important;gap:2px!important;padding:4px!important;
 }
 .single-screen-game .in-game-actions #restart.replay-menu-trigger .restart-symbol{font-size:17px!important}
 .single-screen-game .in-game-actions #restart.replay-menu-trigger .restart-label{font-size:11px!important}
}
/* Replay is a separate temporary view INSIDE the one existing game menu. */
.single-screen-game #gameMenu [data-tab-panel="replay"]{min-width:0!important;}
.single-screen-game #gameMenu .replay-choice-heading{
 margin:0 0 6px!important;font:700 clamp(19px,3vw,23px)/1.2 Fredoka,system-ui,sans-serif!important;
 color:#725273!important;
}
.single-screen-game #gameMenu .replay-choice-intro{
 margin:0 0 16px!important;font:700 12px/1.5 Nunito,system-ui,sans-serif!important;
 color:#806e7a!important;
}
.single-screen-game #gameMenu .replay-choice-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;}
.single-screen-game #gameMenu .replay-choice{
 display:flex!important;align-items:center!important;gap:12px!important;
 box-sizing:border-box!important;min-width:0!important;width:100%!important;
 min-height:74px!important;padding:12px 14px!important;
 border-radius:14px!important;text-align:left!important;
 background:#fff8f3!important;color:#624963!important;border:2px solid #e5d1da!important;
 box-shadow:0 3px 0 #e2d1db!important;cursor:pointer!important;touch-action:manipulation!important;
}
.single-screen-game #gameMenu .replay-choice-room:hover{background:#f8edf2!important;border-color:#c7a9c3!important}
.single-screen-game #gameMenu .replay-choice-all{
 background:#fff0f1!important;border-color:#eab8c5!important;color:#933f5c!important;
}
.single-screen-game #gameMenu .replay-choice-all:hover{background:#ffe3e8!important;border-color:#ce6e8b!important}
.single-screen-game #gameMenu .replay-choice:focus-visible{outline:3px solid #a8759e!important;outline-offset:3px!important}
.single-screen-game #gameMenu .replay-choice-icon{
 display:grid!important;place-items:center!important;flex:0 0 39px!important;width:39px!important;height:39px!important;
 border-radius:12px!important;background:#eee2ee!important;color:#795777!important;
 font:900 25px/1 system-ui,sans-serif!important;
}
.single-screen-game #gameMenu .replay-choice-all .replay-choice-icon{background:#f9dbe2!important;color:#a94f6c!important}
.single-screen-game #gameMenu .replay-choice-text{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;gap:3px!important;min-width:0!important}
.single-screen-game #gameMenu .replay-choice-text strong{font:900 15px/1.3 Nunito,system-ui,sans-serif!important}
.single-screen-game #gameMenu .replay-choice-text small{font:700 11px/1.4 Nunito,system-ui,sans-serif!important;color:#856e82!important}
.single-screen-game #gameMenu .replay-choice-chevron{flex:0 0 auto!important;font:700 24px/1 system-ui,sans-serif!important;color:#a793a2!important}
@media(max-width:390px){
 .single-screen-game #gameMenu .replay-choice{gap:8px!important;padding:10px!important;min-height:68px!important}
 .single-screen-game #gameMenu .replay-choice-icon{width:34px!important;height:34px!important;flex-basis:34px!important;font-size:21px!important}
 .single-screen-game #gameMenu .replay-choice-text strong{font-size:14px!important}
 .single-screen-game #gameMenu .replay-choice-text small{font-size:10px!important}
}
