*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#000;color:#fff}body{font-family:"Arial Black",Impact,Arial,sans-serif;background:#000;min-height:100vh;display:flex;flex-direction:column;align-items:center;overflow-x:hidden}.screen{display:none;width:100%}.screen.active{display:block}.hidden-support{display:none!important}.v4-page{width:min(100%,1484px);min-height:calc(100vh - 86px);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:0 18px 16px}.v4-header{width:min(100%,1484px);margin:0 auto 8px;display:flex;justify-content:center;pointer-events:none}.header-link{display:block;width:100%;pointer-events:auto}.v4-header img{display:block;width:100%;height:auto;filter:drop-shadow(0 18px 20px rgba(0,0,0,.65))}.menu-grid{width:min(760px,90vw);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 32px;margin-top:18px;align-items:center;justify-content:center}.game-tile{appearance:none;border:5px solid rgba(255,255,255,.92);min-width:0;width:100%;height:118px;border-radius:24px;display:grid;grid-template-columns:76px 1fr;align-items:center;padding:12px 18px;text-align:left;text-decoration:none;color:#fff;position:relative;box-shadow:inset 0 5px 0 rgba(255,255,255,.45),inset 0 -15px 0 rgba(0,0,0,.22),0 10px 0 rgba(0,0,0,.55),0 17px 28px rgba(0,0,0,.75);text-shadow:4px 4px 0 #000,-2px -2px 0 #000,2px -2px 0 #000,-2px 2px 0 #000;font-family:"Arial Black",Impact,Arial,sans-serif;font-size:28px;line-height:1.05;letter-spacing:.2px;cursor:pointer;transition:transform .12s ease,filter .12s ease}.game-tile:before{content:"";position:absolute;inset:8px 10px auto 10px;height:45%;border-radius:22px;background:linear-gradient(to bottom,rgba(255,255,255,.42),rgba(255,255,255,.08) 56%,rgba(255,255,255,0));pointer-events:none}.game-tile:hover,.game-tile:focus-visible{transform:translateY(-3px);filter:brightness(1.12);outline:3px solid rgba(255,255,255,.35);outline-offset:3px}.game-tile:active{transform:translateY(3px);box-shadow:inset 0 5px 0 rgba(255,255,255,.35),inset 0 -10px 0 rgba(0,0,0,.27),0 5px 0 rgba(0,0,0,.55),0 9px 16px rgba(0,0,0,.7)}.game-tile:nth-child(n){grid-column:auto}.game-tile:nth-child(7){grid-column:1 / -1;width:min(360px,100%);justify-self:center;margin-top:2px}.green{background:linear-gradient(#6fff14,#15a300 58%,#087306)}.red{background:linear-gradient(#ff4242,#d60000 58%,#8c0000)}.blue{background:linear-gradient(#1db0ff,#006de7 58%,#0149a8)}.purple{background:linear-gradient(#c63cff,#7d13c0 58%,#581085)}.orange{background:linear-gradient(#ffb21b,#f06b00 58%,#bd3900)}.teal{background:linear-gradient(#2ee9e7,#00aeb5 58%,#077d86)}.yellow{background:linear-gradient(#ffe957,#ffb400 58%,#c77100);color:#fff}.credits-icon{font-size:76px;color:#fff700;text-shadow:4px 4px 0 #000,0 0 12px rgba(255,255,0,.6)}.tile-icon{display:grid;place-items:center;width:76px;height:76px;font-size:64px;filter:drop-shadow(4px 5px 2px rgba(0,0,0,.6))}.maze-icon{border:6px solid #111;border-radius:8px;background:#37e935;position:relative;box-shadow:inset 0 0 0 6px #0a8d0a}.maze-icon:before{content:"";position:absolute;inset:12px;background:linear-gradient(90deg,#111 0 12px,transparent 12px 25px,#111 25px 36px,transparent 36px),linear-gradient(#111 0 10px,transparent 10px 23px,#111 23px 34px,transparent 34px);opacity:.9}.timer-icon{font-size:70px;color:#ffe600;text-shadow:3px 3px 0 #000}.folder-icon{position:relative;width:84px;height:62px;border:5px solid #5a3200;border-radius:8px;background:linear-gradient(#ffdb62,#ff9d00);align-self:center}.folder-icon:before{content:"";position:absolute;left:6px;top:-22px;width:42px;height:23px;border:5px solid #5a3200;border-bottom:0;border-radius:8px 8px 0 0;background:#fff2b5}.trophy-icon{font-size:70px}.gear-icon{font-family:Arial,sans-serif;font-size:78px;color:#d7d7d7;text-shadow:2px 2px 0 #333,-2px -2px 0 #fff,0 0 4px #000}.bars-icon{display:flex;align-items:end;gap:7px}.bars-icon i{display:block;width:20px;border:3px solid #034384;border-radius:4px;box-shadow:3px 4px 0 rgba(0,0,0,.45)}.bars-icon i:nth-child(1){height:46px;background:#1fa2ff}.bars-icon i:nth-child(2){height:66px;background:#58e713}.bars-icon i:nth-child(3){height:84px;background:#ffb718}.tagline-bottom{text-align:center;color:#ffd900;font-size:34px;line-height:1.05;margin:34px 0 18px;text-shadow:4px 4px 0 #000,0 0 10px rgba(255,210,0,.4)}.site-footer{width:100%;margin-top:auto;min-height:66px;border-top:4px solid #d90000;background:#030303;display:flex;align-items:center;justify-content:center;gap:14px;padding:13px 18px;font-family:"Arial Black",Arial,sans-serif;font-size:21px;line-height:1.2;text-shadow:2px 2px 0 #000;white-space:nowrap}.site-footer strong,.site-footer a{color:#ffe600;text-decoration:none}.site-footer a:hover{text-decoration:underline}.sep{color:#e10000;font-size:28px}.game-active .site-footer{display:none}.v4-game-page{min-height:100vh;width:100%;display:flex;flex-direction:column;align-items:center;background:#000;padding:0 16px 12px}.v4-game-header{width:min(780px,75vw);margin:-8px auto -16px;display:flex;justify-content:center}.v4-game-header.small{width:min(660px,72vw);margin:-8px auto -34px}.v4-game-header img{display:block;width:100%;height:auto;filter:drop-shadow(0 14px 18px rgba(0,0,0,.75))}.v4-game-card,.v4-info-card{width:min(1700px,98.5vw);background:linear-gradient(145deg,#1b1b1b,#050505);border:6px solid #d60000;border-radius:28px;box-shadow:0 0 0 4px #420000,0 18px 34px rgba(0,0,0,.8),inset 0 2px 0 rgba(255,255,255,.16);padding:clamp(12px,2vw,20px)}.v4-game-card{display:flex;flex-direction:column;gap:12px;min-height:min(94vh,1040px)}.v4-gamebar{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;background:linear-gradient(#e82929,#8b0000);border:4px solid #fff;border-radius:18px;padding:8px 12px;box-shadow:inset 0 3px 0 rgba(255,255,255,.38),0 8px 0 rgba(0,0,0,.45);font-size:clamp(12px,1.35vw,18px);text-shadow:2px 2px 0 #000}.v4-control,.v4-action{appearance:none;border:4px solid #fff;border-radius:14px;background:linear-gradient(#323232,#070707);color:#fff;font-family:"Arial Black",Impact,Arial,sans-serif;text-decoration:none;cursor:pointer;padding:8px 14px;box-shadow:inset 0 3px 0 rgba(255,255,255,.22),0 4px 0 rgba(0,0,0,.5);text-shadow:2px 2px 0 #000}.v4-control:hover,.v4-action:hover{filter:brightness(1.15);transform:translateY(-1px)}#maze{width:100%;height:min(82vh,900px);min-height:460px;background:#fff;border:6px solid #ff2020;border-radius:14px;display:block;cursor:crosshair;touch-action:none;box-shadow:0 0 18px rgba(255,0,0,.55)}#message{text-align:center;margin:0;font-family:Arial,sans-serif;font-weight:700;font-size:clamp(13px,1.5vw,18px);line-height:1.3;color:#fff;text-shadow:1px 1px 0 #000}.v4-info-card{margin-top:14px;padding:clamp(18px,3vw,34px);font-family:Arial,sans-serif;font-weight:700;overflow:auto;max-height:78vh}.v4-info-card h2{font-family:"Arial Black",Impact,Arial,sans-serif;margin:0 0 14px;color:#ffd400;text-shadow:3px 3px 0 #000,0 0 10px #ff0000;font-size:clamp(32px,5vw,66px)}.v4-info-card p{font-size:clamp(16px,2vw,24px);line-height:1.45}.level-pager{display:flex;align-items:center;justify-content:center;gap:14px;margin:10px 0 18px;color:#ffd400}.level-grid{display:grid;grid-template-columns:repeat(10,1fr);gap:8px}.level-grid button{border:2px solid #fff;border-radius:10px;background:linear-gradient(#ff3b3b,#920000);color:#fff;font-family:"Arial Black";padding:8px 4px;cursor:pointer}.level-grid button.locked{opacity:.35;filter:grayscale(1);cursor:not-allowed}.back-link{display:inline-block;margin-top:18px}.credits-text{text-align:center}.credits-text p{font-size:clamp(22px,4vw,44px);line-height:1.15}.credits-text span{display:block;color:#bbb}.credits-text strong{display:block;color:#fff;text-shadow:3px 3px 0 #000,0 0 10px #f00}.bottom-actions{display:flex;justify-content:center;gap:16px;flex-wrap:wrap}.shake{animation:shake .25s infinite}.shake.d1{animation-delay:.07s}.shake.d2{animation-delay:.14s}.game-panel.time-warning #timer{color:#ffd300}.game-panel.time-danger #timer{color:#ff3030}.game-panel.time-danger #maze{border-color:#ff0000;box-shadow:0 0 28px #ff0000}.maze-crash{animation:mazeCrash .18s linear 3}@keyframes mazeCrash{0%{transform:translateX(0)}25%{transform:translateX(-7px)}50%{transform:translateX(7px)}75%{transform:translateX(-4px)}100%{transform:translateX(0)}}@keyframes shake{0%{transform:translate(0,0) rotate(0)}25%{transform:translate(2px,-1px) rotate(.4deg)}50%{transform:translate(-2px,1px) rotate(-.3deg)}75%{transform:translate(1px,2px) rotate(.2deg)}100%{transform:translate(0,0) rotate(0)}}@media(max-width:1050px){.v4-page{min-height:calc(100vh - 96px)}.menu-grid{width:min(720px,92vw);gap:20px 24px}.game-tile{height:112px;font-size:26px;grid-template-columns:72px 1fr}.site-footer{font-size:17px;gap:9px;white-space:normal;flex-wrap:wrap}.tagline-bottom{font-size:30px}}@media(max-width:780px){.v4-game-header{margin-bottom:-18px;padding:0 4px}.v4-game-page{padding:0 8px 8px}.v4-game-card,.v4-info-card{border-width:4px;border-radius:20px;padding:10px;min-height:calc(100vh - 130px)}.v4-gamebar{gap:7px;padding:7px;border-radius:14px}.v4-control,.v4-action{border-width:3px;border-radius:12px;padding:6px 10px}#maze{height:72vh;min-height:330px;border-width:4px}.level-grid{grid-template-columns:repeat(5,1fr)}}@media(max-width:620px){.v4-page{padding:0 10px 6px}.v4-header{width:118vw;max-width:none;margin-left:-9vw;margin-right:-9vw;margin-bottom:4px}.menu-grid{grid-template-columns:1fr;width:min(420px,92vw);gap:13px}.game-tile:nth-child(7){grid-column:auto;width:100%;justify-self:stretch}.game-tile{height:102px;font-size:24px;grid-template-columns:66px 1fr;border-width:4px;border-radius:20px}.tile-icon{width:58px;height:58px;font-size:46px}.tagline-bottom{font-size:25px;margin:16px 0 10px}.site-footer{font-size:14px;gap:7px;padding:12px 8px;line-height:1.35}.sep{display:none}.v4-game-header{display:none}.v4-game-card{min-height:calc(100vh - 16px)}#maze{height:calc(100vh - 180px);min-height:280px}.level-grid{grid-template-columns:repeat(4,1fr)}}@media(max-height:700px){.v4-game-header{display:none}.v4-game-page{padding-top:8px}.v4-game-card{min-height:calc(100vh - 18px)}#maze{height:calc(100vh - 124px);min-height:280px}.site-footer{display:none}}


/* V4 homepage button polish */
.menu-grid{
  width:min(820px,90vw);
  gap:22px 30px;
  margin-top:20px;
}
.game-tile{
  height:124px;
  grid-template-columns:82px 1fr;
  padding:13px 20px;
  border-radius:26px;
  font-size:29px;
  letter-spacing:.3px;
  line-height:1.02;
}
.game-tile > span:last-child{
  display:block;
  font-family:Impact,"Arial Black",Arial,sans-serif;
  font-weight:900;
  -webkit-text-stroke:1.1px #000;
  paint-order:stroke fill;
  text-shadow:4px 4px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 8px rgba(0,0,0,.45);
}
.game-tile:nth-child(7){width:min(380px,100%)}
.tile-icon{width:78px;height:78px}
.book-icon{
  width:76px;height:76px;border:6px solid #111;border-radius:14px;
  background:linear-gradient(#fff2a6,#ffb000 60%,#c86b00);
  color:#fff;font-size:58px;line-height:1;font-family:"Arial Black",Impact,Arial,sans-serif;
  text-shadow:4px 4px 0 #000,0 0 8px rgba(255,255,255,.5);
  box-shadow:inset 0 5px 0 rgba(255,255,255,.45),inset 0 -8px 0 rgba(0,0,0,.22),4px 5px 0 rgba(0,0,0,.5);
}
@media(max-width:1050px){
  .menu-grid{width:min(760px,92vw);gap:20px 24px}
  .game-tile{height:116px;font-size:27px;grid-template-columns:76px 1fr}
}
@media(max-width:620px){
  .menu-grid{gap:14px;width:min(430px,92vw)}
  .game-tile{height:104px;font-size:25px;grid-template-columns:68px 1fr;padding:10px 16px}
  .game-tile > span:last-child{-webkit-text-stroke:.8px #000}
  .book-icon{width:58px;height:58px;font-size:42px;border-width:5px;border-radius:12px}
}

/* Final V4 button layout: centred text with decorative corner icons */
.menu-grid{
  width:min(840px,90vw);
  gap:24px 32px;
  margin-top:22px;
}
.game-tile{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  height:136px;
  min-height:136px;
  padding:18px 26px !important;
  position:relative;
  overflow:hidden;
}
.game-tile > span:last-child{
  display:block;
  width:100%;
  padding:0 18px;
  text-align:center;
  line-height:1.04;
  font-size:clamp(28px,2.45vw,35px);
  letter-spacing:.4px;
  z-index:2;
}
.tile-icon{
  position:absolute !important;
  left:18px;
  top:14px;
  width:58px !important;
  height:58px !important;
  font-size:46px !important;
  transform:rotate(-7deg);
  opacity:.95;
  z-index:1;
  pointer-events:none;
}
.maze-icon{
  width:58px !important;
  height:58px !important;
  border-width:5px;
  box-shadow:inset 0 0 0 5px #0a8d0a;
}
.maze-icon:before{inset:9px;}
.timer-icon,.trophy-icon,.credits-icon{font-size:48px !important;}
.folder-icon{
  width:62px !important;
  height:45px !important;
  border-width:4px;
  top:18px;
}
.folder-icon:before{
  left:4px;
  top:-17px;
  width:32px;
  height:17px;
  border-width:4px;
  border-bottom:0;
}
.book-icon{
  width:56px !important;
  height:56px !important;
  font-size:40px !important;
  border-width:5px;
}
.bars-icon{
  align-items:end;
  gap:5px;
}
.bars-icon i{
  width:14px;
  border-width:2px;
}
.bars-icon i:nth-child(1){height:30px;}
.bars-icon i:nth-child(2){height:43px;}
.bars-icon i:nth-child(3){height:54px;}
.game-tile:nth-child(7){
  width:min(390px,100%);
}
@media(max-width:1050px){
  .menu-grid{width:min(780px,92vw);gap:21px 26px;}
  .game-tile{height:126px;min-height:126px;}
  .game-tile > span:last-child{font-size:clamp(26px,3.1vw,31px);}
  .tile-icon{left:16px;top:13px;width:52px !important;height:52px !important;font-size:40px !important;}
}
@media(max-width:620px){
  .menu-grid{grid-template-columns:1fr;width:min(430px,92vw);gap:14px;margin-top:12px;}
  .game-tile{height:108px;min-height:108px;padding:14px 20px !important;}
  .game-tile > span:last-child{font-size:26px;padding:0 12px;}
  .tile-icon{left:14px;top:12px;width:44px !important;height:44px !important;font-size:34px !important;}
  .maze-icon{width:44px !important;height:44px !important;border-width:4px;box-shadow:inset 0 0 0 4px #0a8d0a;}
  .maze-icon:before{inset:7px;}
  .timer-icon,.trophy-icon,.credits-icon{font-size:36px !important;}
  .folder-icon{width:48px !important;height:36px !important;border-width:3px;top:16px;}
  .folder-icon:before{top:-13px;width:24px;height:13px;border-width:3px;border-bottom:0;}
  .book-icon{width:44px !important;height:44px !important;font-size:30px !important;border-width:4px;}
  .game-tile:nth-child(7){width:100%;}
}

/* Final polish: keep Credits Back button on the left */
.credits-panel .bottom-actions{justify-content:flex-start;}
#statsBox p{font-size:clamp(18px,2.1vw,26px);margin:.45em 0;}

/* Game page logo refinement */
#game .v4-game-header{
  width:min(860px,72vw);
  max-width:860px;
  margin:0 auto -8px;
  padding:0;
}
#game .v4-game-header img{
  width:100%;
  max-height:190px;
  object-fit:contain;
  filter:drop-shadow(0 10px 14px rgba(0,0,0,.72));
}
#game .v4-game-card{
  margin-top:0;
}
@media(max-width:900px){
  #game .v4-game-header{width:min(680px,86vw);margin:0 auto -8px;}
  #game .v4-game-header img{max-height:150px;}
}
@media(max-width:620px){
  #game .v4-game-header{display:none;}
}

/* Refinement: lower the game away from the logo and make the play area larger */
#game .v4-game-page{
  padding-top:10px;
}
#game .v4-game-header{
  width:min(820px,64vw);
  max-width:820px;
  margin:0 auto 22px;
  padding:0;
  flex:0 0 auto;
}
#game .v4-game-header img{
  width:100%;
  max-height:170px;
  object-fit:contain;
}
#game .v4-game-card{
  width:min(1840px,99vw);
  margin-top:0;
  padding:12px;
  gap:10px;
  min-height:auto;
}
#game #maze{
  height:calc(100vh - 260px);
  min-height:560px;
  max-height:940px;
}
#game .v4-gamebar{
  padding:9px 14px;
}
@media(max-width:1200px){
  #game .v4-game-header{width:min(720px,70vw);margin-bottom:18px;}
  #game .v4-game-header img{max-height:150px;}
  #game #maze{height:calc(100vh - 235px);min-height:480px;}
}
@media(max-width:780px){
  #game .v4-game-header{width:min(560px,84vw);margin:0 auto 12px;}
  #game .v4-game-header img{max-height:120px;}
  #game .v4-game-card{width:98vw;padding:9px;}
  #game #maze{height:calc(100vh - 205px);min-height:330px;}
}
@media(max-width:620px){
  #game .v4-game-header{display:none;}
  #game .v4-game-card{width:98vw;min-height:calc(100vh - 16px);}
  #game #maze{height:calc(100vh - 165px);min-height:300px;}
}


/* V4 final layout polish: consistent logo position, no footer except home, larger auto-fitting game */
body:not(.home-active) .site-footer{display:none!important;}
body.home-active .site-footer{display:flex!important;}

#game .v4-game-page{
  min-height:100vh;
  height:100vh;
  padding:clamp(8px,1.1vh,14px) clamp(8px,1.1vw,16px) clamp(8px,1.1vh,14px);
  overflow:hidden;
}
#game .v4-game-header{
  width:min(620px,44vw);
  max-width:620px;
  margin:0 auto clamp(14px,2.1vh,24px);
  padding:0;
  flex:0 0 auto;
}
#game .v4-game-header img{
  width:100%;
  max-height:clamp(92px,15vh,150px);
  object-fit:contain;
}
#game .v4-game-card{
  width:min(1760px,96vw);
  margin:0 auto;
  padding:clamp(9px,1.1vw,14px);
  gap:clamp(8px,1vh,12px);
  min-height:0;
  height:calc(100vh - clamp(128px,18vh,182px));
  max-height:none;
  display:flex;
  flex-direction:column;
}
#game .v4-gamebar{
  flex:0 0 auto;
  min-height:clamp(46px,6vh,62px);
  padding:clamp(6px,.8vh,10px) clamp(10px,1vw,14px);
  gap:clamp(8px,1.3vw,28px);
  font-size:clamp(13px,1.15vw,20px);
}
#game .v4-control{
  padding:clamp(6px,.75vh,9px) clamp(12px,1.4vw,24px);
  font-size:clamp(12px,.95vw,17px);
}
#game #maze{
  flex:1 1 auto;
  width:100%;
  height:auto;
  min-height:0;
  max-height:none;
}
#game #message{
  flex:0 0 auto;
  padding-top:2px;
  font-size:clamp(13px,1.1vw,18px);
}
body.fullscreen-active #game .v4-game-header{display:none!important;}
body.fullscreen-active #game .v4-game-page{padding:6px 8px;}
body.fullscreen-active #game .v4-game-card{height:calc(100vh - 12px);width:99vw;}

@media(max-width:1200px){
  #game .v4-game-header{width:min(560px,58vw);margin-bottom:14px;}
  #game .v4-game-card{width:97vw;height:calc(100vh - 150px);}
}
@media(max-width:780px){
  #game .v4-game-page{padding:6px;}
  #game .v4-game-header{width:min(440px,78vw);margin-bottom:10px;}
  #game .v4-game-header img{max-height:94px;}
  #game .v4-game-card{width:98vw;height:calc(100vh - 112px);border-width:4px;border-radius:18px;padding:8px;}
  #game .v4-gamebar{min-height:auto;gap:6px;font-size:12px;}
  #game .v4-control{padding:5px 8px;font-size:11px;border-width:3px;}
}
@media(max-width:620px){
  #game .v4-game-header{width:min(360px,86vw);display:flex!important;margin-bottom:8px;}
  #game .v4-game-header img{max-height:78px;}
  #game .v4-game-card{height:calc(100vh - 94px);}
  body.fullscreen-active #game .v4-game-header{display:none!important;}
}


/* FINAL responsive game scaling fix
   The game page now reserves space for the logo/control bar and lets JS size the maze
   to the remaining viewport. These rules intentionally override earlier fixed-height
   experiments. */
body.game-active{overflow:hidden;}
body:not(.home-active) .site-footer{display:none!important;}
body.home-active .site-footer{display:flex!important;}
#game.screen.active{height:100vh;overflow:hidden;}
#game .v4-game-page{
  height:100vh!important;
  min-height:100vh!important;
  padding:clamp(6px,1vh,12px) clamp(8px,1vw,16px) !important;
  overflow:hidden!important;
  justify-content:flex-start!important;
}
#game .v4-game-header{
  display:flex!important;
  width:min(620px,58vw)!important;
  max-width:620px!important;
  margin:0 auto clamp(8px,1.4vh,16px)!important;
  padding:0!important;
  flex:0 0 auto!important;
  position:relative!important;
  z-index:2!important;
}
#game .v4-game-header img{
  width:100%!important;
  max-height:clamp(78px,13vh,138px)!important;
  object-fit:contain!important;
}
#game .v4-game-card{
  width:min(1760px,98.5vw)!important;
  min-height:0!important;
  height:auto!important;
  margin:0 auto!important;
  padding:clamp(8px,1vw,14px)!important;
  gap:clamp(6px,1vh,10px)!important;
  display:flex!important;
  flex-direction:column!important;
  flex:0 1 auto!important;
  overflow:hidden!important;
}
#game .v4-gamebar{
  flex:0 0 auto!important;
  min-height:auto!important;
  padding:clamp(6px,.8vh,9px) clamp(8px,1vw,14px)!important;
  gap:clamp(6px,1vw,18px)!important;
  font-size:clamp(12px,1vw,17px)!important;
}
#game .v4-control{font-size:clamp(11px,.9vw,16px)!important;padding:clamp(5px,.65vh,8px) clamp(8px,1vw,18px)!important;}
#game #maze{
  flex:0 0 auto!important;
  width:100%!important;
  min-height:0!important;
  max-height:none!important;
  height:420px;
}
#game #message{flex:0 0 auto!important;margin:0!important;font-size:clamp(12px,1vw,16px)!important;}
body.fullscreen-active #game .v4-game-header{display:none!important;}
body.fullscreen-active #game .v4-game-page{padding:6px 8px!important;}
body.fullscreen-active #game .v4-game-card{width:99vw!important;}
@media(max-width:900px){
  #game .v4-game-header{width:min(520px,74vw)!important;}
  #game .v4-game-header img{max-height:clamp(70px,11vh,110px)!important;}
}
@media(max-width:620px){
  #game .v4-game-header{width:min(360px,86vw)!important;margin-bottom:8px!important;}
  #game .v4-game-header img{max-height:78px!important;}
  #game .v4-gamebar{gap:5px!important;}
}
@media(max-height:620px){
  #game .v4-game-header{display:none!important;}
}

/* Upload hotfix: keep home footer visible and scale the homepage into the viewport */
body.home-active{overflow:auto;}
body.home-active .v4-page{
  min-height:calc(100vh - 66px);
  height:auto;
  justify-content:flex-start;
  padding:clamp(6px,1vh,14px) clamp(10px,1vw,18px) clamp(10px,1vh,16px);
}
body.home-active .v4-header{
  width:min(1100px,92vw);
  margin:0 auto clamp(8px,1.2vh,16px);
}
body.home-active .v4-header img{
  max-height:clamp(150px,30vh,360px);
  object-fit:contain;
}
body.home-active .menu-grid{
  width:min(820px,88vw);
  gap:clamp(12px,2.2vh,24px) clamp(18px,2.2vw,32px);
  margin-top:clamp(8px,1.2vh,18px);
}
body.home-active .game-tile{
  height:clamp(92px,13vh,128px);
  min-height:clamp(92px,13vh,128px);
}
body.home-active .game-tile > span:last-child{
  font-size:clamp(24px,2.35vw,34px);
}
body.home-active .tagline-bottom{
  margin:clamp(12px,2vh,26px) 0 clamp(8px,1.2vh,14px);
  font-size:clamp(22px,2.5vw,34px);
}
@media(max-height:760px) and (min-width:700px){
  body.home-active .v4-header{width:min(900px,80vw);}
  body.home-active .v4-header img{max-height:210px;}
  body.home-active .menu-grid{width:min(760px,84vw);gap:12px 26px;}
  body.home-active .game-tile{height:98px;min-height:98px;}
  body.home-active .game-tile > span:last-child{font-size:26px;}
  body.home-active .tagline-bottom{font-size:24px;margin:10px 0 6px;}
  .site-footer{min-height:54px;font-size:16px;padding:8px 12px;}
}
@media(max-width:620px){
  body.home-active .v4-header{width:108vw;margin-left:-4vw;margin-right:-4vw;}
  body.home-active .v4-header img{max-height:185px;}
  body.home-active .menu-grid{width:min(410px,90vw);}
}

/* Upload hotfix: game page - logo matches other pages, footer removed, maze auto-fits viewport */
body.game-active{overflow:hidden!important;}
body:not(.home-active) .site-footer{display:none!important;}
body.home-active .site-footer{display:flex!important;}
#game.screen.active{height:100vh!important;overflow:hidden!important;}
#game .v4-game-page{
  height:100vh!important;
  min-height:100vh!important;
  padding:clamp(6px,1vh,12px) clamp(8px,1vw,16px)!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
}
#game .v4-game-header{
  display:flex!important;
  flex:0 0 auto!important;
  width:min(620px,58vw)!important;
  max-width:620px!important;
  margin:0 auto clamp(14px,2vh,22px)!important;
  padding:0!important;
  z-index:2!important;
}
#game .v4-game-header img{
  width:100%!important;
  height:auto!important;
  max-height:clamp(88px,15vh,150px)!important;
  object-fit:contain!important;
}
#game .v4-game-card{
  width:min(1760px,98vw)!important;
  margin:0 auto!important;
  padding:clamp(8px,1vw,14px)!important;
  gap:clamp(6px,1vh,10px)!important;
  min-height:0!important;
  height:auto!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
#game .v4-gamebar{
  flex:0 0 auto!important;
  min-height:auto!important;
  padding:clamp(6px,.8vh,9px) clamp(8px,1vw,14px)!important;
  gap:clamp(6px,1vw,18px)!important;
  font-size:clamp(12px,1vw,17px)!important;
}
#game .v4-control{font-size:clamp(11px,.9vw,16px)!important;padding:clamp(5px,.65vh,8px) clamp(8px,1vw,18px)!important;}
#game #maze{
  flex:0 0 auto!important;
  width:100%!important;
  min-height:0!important;
  max-height:none!important;
}
#game #message{flex:0 0 auto!important;margin:0!important;font-size:clamp(12px,1vw,16px)!important;}
body.fullscreen-active #game .v4-game-header{display:none!important;}
@media(max-width:900px){#game .v4-game-header{width:min(520px,74vw)!important;}#game .v4-game-header img{max-height:clamp(70px,11vh,110px)!important;}}
@media(max-width:620px){#game .v4-game-header{width:min(360px,86vw)!important;margin-bottom:8px!important;}#game .v4-game-header img{max-height:78px!important;}}
@media(max-height:620px){#game .v4-game-header{display:none!important;}}


/* ==== FINAL RELEASE RESPONSIVE PATCH ==== */
/* Home: footer stays visible and the whole menu scales to typical laptop displays. */
body.home-active{
  min-height:100vh!important;
  overflow-y:auto!important;
}
body.home-active .site-footer{
  display:flex!important;
  position:static!important;
}
body.home-active #app{
  width:100%!important;
  flex:1 0 auto!important;
}
body.home-active .v4-page{
  width:100%!important;
  max-width:1484px!important;
  min-height:calc(100vh - 64px)!important;
  height:auto!important;
  margin:0 auto!important;
  padding:clamp(6px,1vh,12px) clamp(10px,1vw,18px) clamp(8px,1vh,14px)!important;
  justify-content:flex-start!important;
}
body.home-active .v4-header{
  width:min(980px,88vw)!important;
  max-width:980px!important;
  margin:0 auto clamp(8px,1.2vh,14px)!important;
}
body.home-active .v4-header img{
  width:100%!important;
  height:auto!important;
  max-height:clamp(130px,26vh,300px)!important;
  object-fit:contain!important;
}
body.home-active .menu-grid{
  width:min(760px,88vw)!important;
  gap:clamp(12px,1.8vh,22px) clamp(18px,2vw,32px)!important;
  margin-top:clamp(6px,1vh,14px)!important;
}
body.home-active .game-tile{
  height:clamp(82px,11.5vh,118px)!important;
  min-height:0!important;
  padding:clamp(8px,1vh,12px) clamp(12px,1.2vw,18px)!important;
  grid-template-columns:clamp(50px,6vw,76px) 1fr!important;
}
body.home-active .tile-icon{
  width:clamp(50px,6vw,76px)!important;
  height:clamp(50px,6vw,76px)!important;
  font-size:clamp(40px,5vw,64px)!important;
}
body.home-active .game-tile > span:last-child{
  font-size:clamp(20px,2.15vw,32px)!important;
  line-height:1.02!important;
}
body.home-active .tagline-bottom{
  margin:clamp(8px,1.4vh,22px) 0 clamp(5px,.8vh,10px)!important;
  font-size:clamp(18px,2vw,30px)!important;
}
body.home-active .site-footer{
  min-height:58px!important;
  padding:9px 12px!important;
  font-size:clamp(13px,1.25vw,20px)!important;
  gap:clamp(6px,1vw,14px)!important;
  flex-wrap:wrap!important;
}
body.home-active .site-footer .sep{font-size:clamp(18px,1.7vw,28px)!important;}
@media (max-height:780px) and (min-width:700px){
  body.home-active .v4-header{width:min(840px,78vw)!important;}
  body.home-active .v4-header img{max-height:190px!important;}
  body.home-active .menu-grid{width:min(700px,82vw)!important;gap:10px 24px!important;}
  body.home-active .game-tile{height:88px!important;}
  body.home-active .game-tile > span:last-child{font-size:23px!important;}
  body.home-active .tagline-bottom{font-size:21px!important;margin:8px 0 4px!important;}
  body.home-active .site-footer{min-height:46px!important;font-size:14px!important;padding:6px 10px!important;}
}
@media (max-width:680px){
  body.home-active .v4-header{width:96vw!important;}
  body.home-active .v4-header img{max-height:150px!important;}
  body.home-active .menu-grid{grid-template-columns:1fr!important;width:min(390px,90vw)!important;gap:12px!important;}
  body.home-active .game-tile{height:78px!important;}
  body.home-active .game-tile:nth-child(7){width:100%!important;grid-column:auto!important;}
}

/* Secondary/info screens: no footer, consistent logo, content fits viewport. */
body:not(.home-active) .site-footer{display:none!important;}
.info-page{
  min-height:100vh!important;
  height:100vh!important;
  overflow:hidden!important;
  padding:clamp(8px,1vh,14px) clamp(10px,1vw,16px)!important;
}
.info-page .v4-game-header{
  width:min(620px,58vw)!important;
  margin:0 auto clamp(12px,2vh,22px)!important;
  flex:0 0 auto!important;
}
.info-page .v4-game-header img{
  width:100%!important;
  max-height:clamp(82px,15vh,145px)!important;
  object-fit:contain!important;
}
.info-page .v4-info-card{
  margin:0 auto!important;
  width:min(1200px,94vw)!important;
  max-height:calc(100vh - clamp(118px,18vh,180px))!important;
  overflow:auto!important;
}
@media (max-width:680px){
  .info-page .v4-game-header{width:min(390px,86vw)!important;margin-bottom:10px!important;}
  .info-page .v4-game-header img{max-height:86px!important;}
  .info-page .v4-info-card{max-height:calc(100vh - 108px)!important;}
}

/* Game screen: no footer, logo clear of game, canvas sized by JS. */
body.game-active{overflow:hidden!important;}
#game.screen.active{height:100vh!important;overflow:hidden!important;}
#game .v4-game-page{
  height:100vh!important;
  min-height:100vh!important;
  overflow:hidden!important;
  padding:clamp(8px,1vh,14px) clamp(8px,1vw,16px)!important;
  justify-content:flex-start!important;
}
#game .v4-game-header{
  width:min(620px,58vw)!important;
  margin:0 auto clamp(14px,2vh,22px)!important;
  flex:0 0 auto!important;
}
#game .v4-game-header img{
  width:100%!important;
  max-height:clamp(82px,15vh,150px)!important;
  object-fit:contain!important;
}
#game .v4-game-card{
  width:min(1780px,98vw)!important;
  margin:0 auto!important;
  padding:clamp(8px,1vw,14px)!important;
  gap:clamp(6px,1vh,10px)!important;
  min-height:0!important;
  height:auto!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
#game #maze{
  display:block!important;
  flex:0 0 auto!important;
  min-height:0!important;
  max-width:100%!important;
  margin:0 auto!important;
}
#game #message{flex:0 0 auto!important;}
body.fullscreen-active #game .v4-game-header{display:none!important;}
body.fullscreen-active #game .v4-game-page{padding:6px 8px!important;}
@media(max-height:620px){#game .v4-game-header{display:none!important;}}

/* ==== VERSION 4 FINAL TEXT-FIT / NO-SCROLL POLISH ==== */
/* Keep the footer only on the home page. */
body:not(.home-active) .site-footer{display:none!important;}
body.home-active .site-footer{display:flex!important;}

/* Secondary pages should fit like app screens rather than showing internal scrollbars. */
body:not(.home-active):not(.game-active){overflow:hidden!important;}
body:not(.home-active):not(.game-active) .screen.active{height:100dvh!important;overflow:hidden!important;}
.info-page{
  height:100dvh!important;
  min-height:100dvh!important;
  overflow:hidden!important;
  padding:clamp(6px,.9vh,12px) clamp(8px,1vw,16px)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
}
.info-page .v4-game-header{
  flex:0 0 auto!important;
  width:min(560px,54vw)!important;
  margin:0 auto clamp(8px,1.25vh,16px)!important;
}
.info-page .v4-game-header img{
  width:100%!important;
  height:auto!important;
  max-height:clamp(76px,13vh,132px)!important;
  object-fit:contain!important;
}
.info-page .v4-info-card{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  width:min(1160px,94vw)!important;
  margin:0 auto!important;
  padding:clamp(14px,2.2vh,28px) clamp(16px,2.2vw,32px)!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}
.info-page .v4-info-card h2{
  flex:0 0 auto!important;
  font-size:clamp(28px,4.6vw,56px)!important;
  line-height:1!important;
  margin:0 0 clamp(8px,1.2vh,16px)!important;
}
.info-page .v4-info-card p,
.info-page .v4-info-card div,
.info-page .v4-info-card li{
  font-size:clamp(15px,1.7vw,22px)!important;
  line-height:1.28!important;
}
.info-page .text-panel p{margin:clamp(6px,.9vh,12px) 0!important;}
.info-page .back-link,
.info-page .bottom-actions{
  flex:0 0 auto!important;
  margin-top:auto!important;
}

/* Saved Games: compact 100-level grid that fits without an inner scrollbar. */
.level-pager{
  flex:0 0 auto!important;
  margin:0 0 clamp(8px,1vh,12px)!important;
  gap:clamp(8px,1vw,14px)!important;
  font-size:clamp(14px,1.6vw,20px)!important;
}
.level-grid{
  flex:1 1 auto!important;
  min-height:0!important;
  display:grid!important;
  grid-template-columns:repeat(10,1fr)!important;
  grid-auto-rows:minmax(0,1fr)!important;
  gap:clamp(4px,.65vw,8px)!important;
  overflow:hidden!important;
}
.level-grid button{
  min-height:0!important;
  padding:2px!important;
  font-size:clamp(11px,1.15vw,16px)!important;
  line-height:1!important;
  border-radius:8px!important;
}

/* Scores/statistics/credits: compact typography so all text stays inside the box. */
#scoreBox,#statsBox,.credits-text{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:hidden!important;
}
#scoreBox p,#statsBox p{
  margin:clamp(4px,.75vh,9px) 0!important;
  font-size:clamp(15px,1.55vw,22px)!important;
  line-height:1.2!important;
}
.credits-panel .credits-text{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:clamp(8px,1.6vh,18px)!important;
}
.credits-panel .credits-text p{
  margin:0!important;
  font-size:clamp(20px,3.4vw,42px)!important;
  line-height:1.08!important;
}
.credits-panel .bottom-actions{
  display:flex!important;
  justify-content:flex-start!important;
  width:100%!important;
  margin-top:clamp(10px,1.4vh,18px)!important;
}

/* Game screen remains app-like with no footer or page scrollbar. */
body.game-active{overflow:hidden!important;}
#game.screen.active{height:100dvh!important;overflow:hidden!important;}
#game .v4-game-page{height:100dvh!important;min-height:100dvh!important;overflow:hidden!important;}

@media(max-width:680px){
  .info-page .v4-game-header{width:min(380px,86vw)!important;margin-bottom:8px!important;}
  .info-page .v4-game-header img{max-height:82px!important;}
  .info-page .v4-info-card{width:95vw!important;padding:12px!important;border-width:4px!important;border-radius:18px!important;}
  .info-page .v4-info-card h2{font-size:clamp(26px,8vw,40px)!important;}
  .info-page .v4-info-card p,.info-page .v4-info-card div{font-size:clamp(14px,4.2vw,18px)!important;}
  .level-grid{grid-template-columns:repeat(5,1fr)!important;}
  .level-grid button{font-size:12px!important;}
  .credits-panel .credits-text p{font-size:clamp(20px,7vw,34px)!important;}
}

@media(max-height:700px){
  .info-page .v4-game-header{display:none!important;}
  .info-page .v4-info-card{height:calc(100dvh - 16px)!important;}
  .info-page .v4-info-card h2{font-size:clamp(24px,5vh,42px)!important;margin-bottom:8px!important;}
  .credits-panel .credits-text p{font-size:clamp(18px,5.2vh,32px)!important;}
}

/* ==== FINAL POLISH: Credits back button + homepage icons ==== */
/* Keep the Credits Back button normal-sized and left aligned. */
.credits-panel .bottom-actions{
  width:100% !important;
  display:flex !important;
  justify-content:flex-start !important;
  align-items:center !important;
  margin-top:clamp(12px,1.8vh,22px) !important;
}
.credits-panel .bottom-actions .v4-control{
  flex:0 0 auto !important;
  width:auto !important;
  min-width:132px !important;
  max-width:220px !important;
  font-size:clamp(15px,1.45vw,20px) !important;
  line-height:1 !important;
  padding:10px 18px !important;
  border-radius:14px !important;
}

/* Homepage buttons: keep centred text, with icons small enough to fit inside each button. */
body.home-active .game-tile{
  overflow:hidden !important;
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  padding:clamp(10px,1.2vh,16px) clamp(18px,2vw,28px) !important;
}
body.home-active .game-tile > span:last-child{
  position:relative !important;
  z-index:2 !important;
  width:100% !important;
  max-width:100% !important;
  padding:0 clamp(18px,2.2vw,34px) !important;
  text-align:center !important;
  overflow-wrap:normal !important;
  word-break:normal !important;
}
body.home-active .tile-icon{
  position:absolute !important;
  left:clamp(10px,1.2vw,16px) !important;
  top:clamp(9px,1.1vh,14px) !important;
  width:clamp(34px,4.2vw,48px) !important;
  height:clamp(34px,4.2vw,48px) !important;
  font-size:clamp(28px,3.4vw,40px) !important;
  transform:rotate(-7deg) !important;
  opacity:.9 !important;
  z-index:1 !important;
  pointer-events:none !important;
}
body.home-active .maze-icon{
  width:clamp(34px,4.2vw,48px) !important;
  height:clamp(34px,4.2vw,48px) !important;
  border-width:4px !important;
  box-shadow:inset 0 0 0 4px #0a8d0a !important;
}
body.home-active .maze-icon:before{inset:7px !important;}
body.home-active .folder-icon{
  width:clamp(42px,5vw,56px) !important;
  height:clamp(30px,3.7vw,40px) !important;
  border-width:3px !important;
  top:clamp(12px,1.5vh,16px) !important;
}
body.home-active .folder-icon:before{
  top:-12px !important;
  width:26px !important;
  height:12px !important;
  border-width:3px !important;
  border-bottom:0 !important;
}
body.home-active .book-icon{
  width:clamp(34px,4.2vw,48px) !important;
  height:clamp(34px,4.2vw,48px) !important;
  font-size:clamp(24px,3vw,34px) !important;
  border-width:4px !important;
}
body.home-active .bars-icon{gap:4px !important;align-items:end !important;}
body.home-active .bars-icon i{width:clamp(8px,1.1vw,13px) !important;border-width:2px !important;}
body.home-active .bars-icon i:nth-child(1){height:clamp(22px,2.8vw,32px) !important;}
body.home-active .bars-icon i:nth-child(2){height:clamp(30px,3.7vw,44px) !important;}
body.home-active .bars-icon i:nth-child(3){height:clamp(38px,4.6vw,54px) !important;}
body.home-active .timer-icon,
body.home-active .trophy-icon,
body.home-active .credits-icon{
  font-size:clamp(28px,3.6vw,42px) !important;
}
@media(max-width:680px){
  body.home-active .game-tile > span:last-child{padding:0 14px !important;}
  body.home-active .tile-icon{left:10px !important;top:9px !important;width:34px !important;height:34px !important;font-size:28px !important;}
  body.home-active .maze-icon{width:34px !important;height:34px !important;border-width:3px !important;box-shadow:inset 0 0 0 3px #0a8d0a !important;}
  body.home-active .maze-icon:before{inset:6px !important;}
}

/* ==== RELEASE FIX: all secondary page Back buttons left aligned and consistent ==== */
.info-page .back-link{
  align-self:flex-start !important;
  display:inline-flex !important;
  justify-content:center !important;
  align-items:center !important;
  flex:0 0 auto !important;
  width:auto !important;
  min-width:132px !important;
  max-width:220px !important;
  margin-top:auto !important;
  margin-left:0 !important;
  margin-right:auto !important;
  font-size:clamp(15px,1.45vw,20px) !important;
  line-height:1 !important;
  padding:10px 18px !important;
  border-radius:14px !important;
}
.info-page .bottom-actions{
  align-self:stretch !important;
  justify-content:flex-start !important;
  margin-top:auto !important;
}
.info-page .bottom-actions .v4-control{
  flex:0 0 auto !important;
  width:auto !important;
  min-width:132px !important;
  max-width:220px !important;
  font-size:clamp(15px,1.45vw,20px) !important;
  line-height:1 !important;
  padding:10px 18px !important;
  border-radius:14px !important;
}

/* ==== SAVED GAMES FIX: stop Back button overlapping the level grid ==== */
#levels .v4-info-card{
  display:grid!important;
  grid-template-rows:auto auto auto minmax(0,1fr) auto!important;
  row-gap:clamp(6px,1vh,12px)!important;
  overflow:hidden!important;
}
#levels .v4-info-card h2,
#levels .v4-info-card p,
#levels .level-pager{
  margin-top:0!important;
  margin-bottom:0!important;
}
#levels .level-grid{
  min-height:0!important;
  overflow:hidden!important;
  margin:0 0 clamp(8px,1vh,14px)!important;
  padding:0!important;
}
#levels .back-link{
  grid-row:5!important;
  align-self:end!important;
  justify-self:start!important;
  margin-top:0!important;
  margin-bottom:0!important;
  position:relative!important;
  z-index:3!important;
}
@media(max-height:760px){
  #levels .v4-info-card{row-gap:5px!important;padding:10px 14px!important;}
  #levels .v4-info-card h2{font-size:clamp(24px,5vh,38px)!important;margin-bottom:0!important;}
  #levels .v4-info-card p{font-size:clamp(13px,2.1vh,16px)!important;line-height:1.15!important;}
  #levels .level-pager{font-size:clamp(12px,2vh,15px)!important;gap:6px!important;}
  #levels .level-grid{gap:3px!important;margin-bottom:6px!important;}
  #levels .level-grid button{font-size:10px!important;padding:1px!important;border-radius:6px!important;}
  #levels .back-link{min-width:108px!important;padding:7px 12px!important;font-size:14px!important;}
}


/* ==== FINAL RELEASE: homepage button readability fix ==== */
body.home-active .menu-grid{
  width:min(840px,90vw)!important;
  gap:clamp(14px,2vh,24px) clamp(20px,2.3vw,34px)!important;
}
body.home-active .game-tile{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  height:clamp(96px,12.5vh,130px)!important;
  min-height:0!important;
  padding:clamp(12px,1.4vh,18px) clamp(22px,2.2vw,34px)!important;
  overflow:hidden!important;
}
body.home-active .game-tile > span:last-child{
  position:relative!important;
  z-index:2!important;
  display:block!important;
  width:100%!important;
  max-width:88%!important;
  margin:0 auto!important;
  padding:0!important;
  text-align:center!important;
  font-size:clamp(22px,2vw,31px)!important;
  line-height:1.08!important;
  letter-spacing:.35px!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  text-shadow:3px 3px 0 #000,-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000,0 0 8px rgba(0,0,0,.55)!important;
  -webkit-text-stroke:.75px #000!important;
}
body.home-active .tile-icon{
  position:absolute!important;
  left:clamp(10px,1.2vw,16px)!important;
  top:clamp(8px,1vh,14px)!important;
  width:clamp(38px,4.4vw,54px)!important;
  height:clamp(38px,4.4vw,54px)!important;
  font-size:clamp(30px,3.8vw,44px)!important;
  opacity:.78!important;
  transform:rotate(-8deg)!important;
  z-index:1!important;
  pointer-events:none!important;
}
body.home-active .maze-icon{
  width:clamp(38px,4.4vw,54px)!important;
  height:clamp(38px,4.4vw,54px)!important;
  border-width:4px!important;
  box-shadow:inset 0 0 0 4px #0a8d0a!important;
}
body.home-active .maze-icon:before{inset:7px!important;}
body.home-active .timer-icon,
body.home-active .trophy-icon,
body.home-active .credits-icon{font-size:clamp(30px,3.8vw,44px)!important;}
body.home-active .folder-icon{
  width:clamp(42px,4.8vw,58px)!important;
  height:clamp(30px,3.5vw,42px)!important;
  border-width:3px!important;
}
body.home-active .folder-icon:before{
  top:-12px!important;
  width:24px!important;
  height:12px!important;
  border-width:3px!important;
  border-bottom:0!important;
}
body.home-active .book-icon{
  width:clamp(38px,4.4vw,52px)!important;
  height:clamp(38px,4.4vw,52px)!important;
  font-size:clamp(27px,3.3vw,38px)!important;
  border-width:4px!important;
}
body.home-active .bars-icon{gap:4px!important;}
body.home-active .bars-icon i{width:12px!important;border-width:2px!important;}
body.home-active .bars-icon i:nth-child(1){height:26px!important;}
body.home-active .bars-icon i:nth-child(2){height:36px!important;}
body.home-active .bars-icon i:nth-child(3){height:46px!important;}
@media(max-height:760px) and (min-width:700px){
  body.home-active .game-tile{height:92px!important;padding:10px 24px!important;}
  body.home-active .game-tile > span:last-child{font-size:22px!important;max-width:90%!important;}
  body.home-active .tile-icon{width:36px!important;height:36px!important;font-size:28px!important;left:10px!important;top:8px!important;opacity:.68!important;}
}
@media(max-width:680px){
  body.home-active .game-tile{height:86px!important;padding:10px 20px!important;}
  body.home-active .game-tile > span:last-child{font-size:22px!important;max-width:88%!important;line-height:1.05!important;}
  body.home-active .tile-icon{width:34px!important;height:34px!important;font-size:26px!important;left:10px!important;top:8px!important;opacity:.7!important;}
  body.home-active .maze-icon{width:34px!important;height:34px!important;border-width:3px!important;box-shadow:inset 0 0 0 3px #0a8d0a!important;}
  body.home-active .maze-icon:before{inset:6px!important;}
  body.home-active .folder-icon{width:38px!important;height:28px!important;}
  body.home-active .book-icon{width:34px!important;height:34px!important;font-size:24px!important;}
}

/* ==== FINAL FINAL: larger, readable home button labels and balanced icons ==== */
body.home-active .menu-grid{
  width:min(920px,92vw)!important;
  gap:clamp(16px,2.2vh,28px) clamp(22px,2.5vw,38px)!important;
}
body.home-active .game-tile{
  height:clamp(112px,13.8vh,146px)!important;
  min-height:112px!important;
  padding:clamp(14px,1.7vh,22px) clamp(24px,2.8vw,42px)!important;
}
body.home-active .game-tile > span:last-child{
  max-width:92%!important;
  font-size:clamp(30px,2.65vw,42px)!important;
  line-height:1.03!important;
  letter-spacing:.25px!important;
  -webkit-text-stroke:1.05px #000!important;
  text-shadow:4px 4px 0 #000,-2px -2px 0 #000,2px -2px 0 #000,-2px 2px 0 #000,2px 2px 0 #000,0 0 10px rgba(0,0,0,.65)!important;
}
body.home-active .tile-icon{
  left:clamp(14px,1.5vw,22px)!important;
  top:clamp(12px,1.4vh,18px)!important;
  width:clamp(52px,5.6vw,76px)!important;
  height:clamp(52px,5.6vw,76px)!important;
  font-size:clamp(42px,4.8vw,62px)!important;
  opacity:.88!important;
}
body.home-active .maze-icon{
  width:clamp(52px,5.6vw,76px)!important;
  height:clamp(52px,5.6vw,76px)!important;
  border-width:5px!important;
  box-shadow:inset 0 0 0 5px #0a8d0a!important;
}
body.home-active .maze-icon:before{inset:9px!important;}
body.home-active .timer-icon,
body.home-active .trophy-icon,
body.home-active .credits-icon{font-size:clamp(44px,5vw,66px)!important;}
body.home-active .folder-icon{
  width:clamp(56px,6vw,76px)!important;
  height:clamp(40px,4.4vw,56px)!important;
  border-width:4px!important;
}
body.home-active .folder-icon:before{
  top:-16px!important;
  width:34px!important;
  height:16px!important;
  border-width:4px!important;
  border-bottom:0!important;
}
body.home-active .book-icon{
  width:clamp(52px,5.6vw,72px)!important;
  height:clamp(52px,5.6vw,72px)!important;
  font-size:clamp(38px,4.2vw,54px)!important;
  border-width:5px!important;
}
body.home-active .bars-icon{gap:5px!important;}
body.home-active .bars-icon i{width:clamp(13px,1.4vw,18px)!important;border-width:3px!important;}
body.home-active .bars-icon i:nth-child(1){height:clamp(34px,3.4vw,46px)!important;}
body.home-active .bars-icon i:nth-child(2){height:clamp(46px,4.4vw,62px)!important;}
body.home-active .bars-icon i:nth-child(3){height:clamp(58px,5.4vw,76px)!important;}
@media(max-height:760px) and (min-width:700px){
  body.home-active .menu-grid{width:min(860px,90vw)!important;gap:12px 26px!important;}
  body.home-active .game-tile{height:104px!important;min-height:104px!important;padding:12px 28px!important;}
  body.home-active .game-tile > span:last-child{font-size:28px!important;max-width:92%!important;}
  body.home-active .tile-icon{width:48px!important;height:48px!important;font-size:38px!important;left:14px!important;top:10px!important;opacity:.82!important;}
  body.home-active .maze-icon{width:48px!important;height:48px!important;border-width:4px!important;box-shadow:inset 0 0 0 4px #0a8d0a!important;}
  body.home-active .maze-icon:before{inset:8px!important;}
}
@media(max-width:680px){
  body.home-active .game-tile{height:98px!important;min-height:98px!important;padding:12px 24px!important;}
  body.home-active .game-tile > span:last-child{font-size:27px!important;max-width:90%!important;line-height:1.04!important;}
  body.home-active .tile-icon{width:44px!important;height:44px!important;font-size:34px!important;left:12px!important;top:10px!important;opacity:.82!important;}
  body.home-active .maze-icon{width:44px!important;height:44px!important;border-width:4px!important;box-shadow:inset 0 0 0 4px #0a8d0a!important;}
  body.home-active .maze-icon:before{inset:7px!important;}
  body.home-active .folder-icon{width:50px!important;height:36px!important;}
  body.home-active .book-icon{width:44px!important;height:44px!important;font-size:31px!important;}
  body.home-active .bars-icon i{width:10px!important;border-width:2px!important;}
}

/* ==== TRUE FINAL: readable home buttons with contained icons ==== */
body.home-active .menu-grid{
  width:min(980px,94vw)!important;
  gap:clamp(18px,2.2vh,28px) clamp(24px,2.8vw,42px)!important;
}
body.home-active .game-tile{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:clamp(16px,1.8vw,24px)!important;
  height:clamp(124px,14.5vh,154px)!important;
  min-height:124px!important;
  padding:clamp(14px,1.5vh,20px) clamp(22px,2.4vw,34px)!important;
  overflow:hidden!important;
  text-align:left!important;
}
body.home-active .game-tile > span:last-child{
  position:relative!important;
  z-index:3!important;
  display:block!important;
  flex:1 1 auto!important;
  width:auto!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  text-align:left!important;
  font-family:"Arial Black",Impact,Arial,sans-serif!important;
  font-size:clamp(30px,2.6vw,39px)!important;
  font-weight:900!important;
  line-height:1.03!important;
  letter-spacing:.1px!important;
  white-space:normal!important;
  overflow:visible!important;
  -webkit-text-stroke:1px #000!important;
  text-shadow:4px 4px 0 #000,-2px -2px 0 #000,2px -2px 0 #000,-2px 2px 0 #000,2px 2px 0 #000,0 0 12px rgba(0,0,0,.75)!important;
}
body.home-active .tile-icon{
  position:relative!important;
  left:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  flex:0 0 clamp(56px,6vw,78px)!important;
  width:clamp(56px,6vw,78px)!important;
  height:clamp(56px,6vw,78px)!important;
  min-width:clamp(56px,6vw,78px)!important;
  min-height:clamp(56px,6vw,78px)!important;
  display:grid!important;
  place-items:center!important;
  font-size:clamp(42px,4.8vw,62px)!important;
  transform:none!important;
  opacity:1!important;
  z-index:2!important;
  pointer-events:none!important;
  margin:0!important;
}
body.home-active .maze-icon{
  width:clamp(56px,6vw,78px)!important;
  height:clamp(56px,6vw,78px)!important;
  border-width:5px!important;
  border-radius:10px!important;
  box-shadow:inset 0 0 0 5px #0a8d0a!important;
}
body.home-active .maze-icon:before{inset:9px!important;}
body.home-active .timer-icon,
body.home-active .trophy-icon,
body.home-active .credits-icon{
  font-size:clamp(44px,5vw,64px)!important;
}
body.home-active .folder-icon{
  width:clamp(58px,6.2vw,78px)!important;
  height:clamp(42px,4.6vw,56px)!important;
  min-height:0!important;
  border-width:4px!important;
}
body.home-active .folder-icon:before{
  top:-16px!important;
  width:34px!important;
  height:16px!important;
  border-width:4px!important;
  border-bottom:0!important;
}
body.home-active .book-icon{
  width:clamp(56px,6vw,76px)!important;
  height:clamp(56px,6vw,76px)!important;
  font-size:clamp(40px,4.4vw,56px)!important;
  border-width:5px!important;
}
body.home-active .bars-icon{
  width:clamp(56px,6vw,78px)!important;
  height:clamp(56px,6vw,78px)!important;
  gap:5px!important;
  justify-content:center!important;
}
body.home-active .bars-icon i{width:clamp(12px,1.3vw,17px)!important;border-width:3px!important;}
body.home-active .bars-icon i:nth-child(1){height:clamp(32px,3.2vw,42px)!important;}
body.home-active .bars-icon i:nth-child(2){height:clamp(42px,4.2vw,56px)!important;}
body.home-active .bars-icon i:nth-child(3){height:clamp(52px,5.2vw,70px)!important;}

@media(max-height:780px) and (min-width:700px){
  body.home-active .menu-grid{width:min(900px,92vw)!important;gap:12px 28px!important;}
  body.home-active .game-tile{height:106px!important;min-height:106px!important;padding:10px 24px!important;gap:16px!important;}
  body.home-active .game-tile > span:last-child{font-size:28px!important;line-height:1.02!important;}
  body.home-active .tile-icon{flex-basis:52px!important;width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;font-size:40px!important;}
  body.home-active .maze-icon{width:52px!important;height:52px!important;border-width:4px!important;box-shadow:inset 0 0 0 4px #0a8d0a!important;}
  body.home-active .maze-icon:before{inset:8px!important;}
  body.home-active .folder-icon{width:54px!important;height:38px!important;}
}
@media(max-width:680px){
  body.home-active .menu-grid{width:min(430px,92vw)!important;gap:14px!important;}
  body.home-active .game-tile{height:96px!important;min-height:96px!important;padding:10px 18px!important;gap:14px!important;}
  body.home-active .game-tile > span:last-child{font-size:25px!important;line-height:1.03!important;-webkit-text-stroke:.8px #000!important;text-shadow:3px 3px 0 #000,-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000!important;}
  body.home-active .tile-icon{flex-basis:46px!important;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;font-size:34px!important;}
  body.home-active .maze-icon{width:46px!important;height:46px!important;border-width:4px!important;box-shadow:inset 0 0 0 4px #0a8d0a!important;}
  body.home-active .maze-icon:before{inset:7px!important;}
  body.home-active .folder-icon{width:48px!important;height:34px!important;}
  body.home-active .book-icon{width:46px!important;height:46px!important;font-size:32px!important;}
  body.home-active .bars-icon i{width:10px!important;border-width:2px!important;}
}

/* ==== GOLD FINAL: clean, readable home buttons (no icons) ==== */
body.home-active .menu-grid{
  width:min(820px,90vw)!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:clamp(14px,2vh,22px) clamp(24px,3vw,36px)!important;
  margin-top:clamp(12px,2vh,22px)!important;
}
body.home-active .game-tile{
  height:clamp(88px,10vh,108px)!important;
  min-height:88px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:10px 22px!important;
  border-radius:22px!important;
  text-align:center!important;
  overflow:hidden!important;
}
body.home-active .tile-icon{
  display:none!important;
}
body.home-active .game-tile > span:last-child{
  flex:none!important;
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
  font-family:"Arial Black",Impact,Arial,sans-serif!important;
  font-size:clamp(30px,2.9vw,40px)!important;
  font-weight:900!important;
  line-height:1.02!important;
  letter-spacing:.2px!important;
  white-space:normal!important;
  color:#fff!important;
  -webkit-text-stroke:1.15px #000!important;
  text-shadow:4px 4px 0 #000,-2px -2px 0 #000,2px -2px 0 #000,-2px 2px 0 #000,2px 2px 0 #000,0 0 12px rgba(0,0,0,.85)!important;
}
body.home-active .game-tile:nth-child(7){
  grid-column:1 / -1!important;
  width:min(390px,100%)!important;
  justify-self:center!important;
}
@media(max-height:780px) and (min-width:700px){
  body.home-active .menu-grid{width:min(760px,88vw)!important;gap:10px 26px!important;margin-top:10px!important;}
  body.home-active .game-tile{height:82px!important;min-height:82px!important;padding:8px 18px!important;border-radius:20px!important;}
  body.home-active .game-tile > span:last-child{font-size:clamp(25px,2.5vw,32px)!important;line-height:1!important;}
  body.home-active .game-tile:nth-child(7){width:min(350px,100%)!important;}
}
@media(max-width:680px){
  body.home-active .menu-grid{grid-template-columns:1fr!important;width:min(390px,88vw)!important;gap:12px!important;margin-top:10px!important;}
  body.home-active .game-tile{height:78px!important;min-height:78px!important;padding:8px 16px!important;border-radius:18px!important;}
  body.home-active .game-tile:nth-child(7){grid-column:auto!important;width:100%!important;}
  body.home-active .game-tile > span:last-child{font-size:clamp(24px,7vw,30px)!important;line-height:1.02!important;-webkit-text-stroke:.9px #000!important;text-shadow:3px 3px 0 #000,-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000!important;}
}
@media(max-width:380px){
  body.home-active .game-tile > span:last-child{font-size:23px!important;}
}

/* ==== MOBILE GAME RELEASE FIX: responsive, no sideways scroll, touch-friendly ==== */
html, body { max-width: 100%; overflow-x: hidden; }
body.game-active {
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
}
#game.screen.active {
  width: 100vw !important;
  height: 100dvh !important;
  overflow: hidden !important;
}
#game .v4-game-page {
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: clamp(4px, 1vh, 10px) !important;
  padding: clamp(4px, 1vh, 10px) clamp(5px, 1vw, 14px) !important;
}
#game .v4-game-header {
  flex: 0 0 auto !important;
  width: min(620px, 70vw) !important;
  margin: 0 auto !important;
  padding: 0 !important;
}
#game .v4-game-header img {
  max-height: clamp(70px, 13vh, 130px) !important;
  object-fit: contain !important;
}
#game .v4-game-card {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: min(1780px, 98vw) !important;
  height: auto !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(5px, 1vh, 10px) !important;
  padding: clamp(6px, 1.2vw, 14px) !important;
  border-width: clamp(3px, .7vw, 6px) !important;
  border-radius: clamp(14px, 2vw, 28px) !important;
}
#game .v4-gamebar {
  flex: 0 0 auto !important;
  gap: clamp(4px, .8vw, 10px) !important;
  padding: clamp(5px, .9vw, 9px) clamp(6px, 1vw, 12px) !important;
  font-size: clamp(11px, 1.6vw, 18px) !important;
  line-height: 1.15 !important;
}
#game .v4-control {
  padding: clamp(5px, .8vw, 8px) clamp(7px, 1vw, 14px) !important;
  font-size: clamp(11px, 1.6vw, 16px) !important;
  border-width: clamp(2px, .45vw, 4px) !important;
}
#game #maze {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
#game #message {
  flex: 0 0 auto !important;
  font-size: clamp(11px, 1.8vw, 16px) !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 4px !important;
}
body.fullscreen-active #game .v4-game-header { display: none !important; }
@media (max-width: 760px), (max-height: 620px) {
  #game .v4-game-header { display: none !important; }
  #game .v4-game-page { padding: 5px !important; gap: 5px !important; }
  #game .v4-game-card { width: 99vw !important; padding: 6px !important; gap: 5px !important; }
  #game .v4-gamebar { justify-content: center !important; }
}
@media (max-width: 430px) {
  #game .v4-gamebar strong { font-size: 11px !important; }
  #game .v4-control { font-size: 11px !important; padding: 5px 6px !important; }
  #game #message { font-size: 11px !important; }
}

/* ==== V4.0.2 MOBILE GAME LANDSCAPE FIX ==== */
body.game-active{overflow:hidden!important;touch-action:none;}
body.mobile-game-mode #game .v4-game-header{display:none!important;}
body.mobile-game-mode #game .v4-game-page{
  padding:4px!important;
  gap:4px!important;
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:100dvh!important;
  overflow:hidden!important;
}
body.mobile-game-mode #game .v4-game-card{
  width:100vw!important;
  height:100dvh!important;
  max-height:100dvh!important;
  min-height:0!important;
  border-width:3px!important;
  border-radius:12px!important;
  padding:4px!important;
  gap:4px!important;
  overflow:hidden!important;
}
body.mobile-game-mode #game .v4-gamebar{
  border-width:2px!important;
  border-radius:10px!important;
  padding:3px 4px!important;
  gap:3px!important;
  font-size:10px!important;
  line-height:1!important;
}
body.mobile-game-mode #game .v4-control{
  border-width:2px!important;
  border-radius:8px!important;
  padding:4px 5px!important;
  font-size:10px!important;
  line-height:1!important;
}
body.mobile-game-mode #game #message{display:none!important;}
body.mobile-game-mode #game #maze{
  border-width:3px!important;
  border-radius:8px!important;
  max-width:100%!important;
  touch-action:none!important;
}
@media (max-width: 900px) and (orientation: landscape){
  #game .v4-game-header{display:none!important;}
  #game .v4-game-page{padding:4px!important;gap:4px!important;height:100dvh!important;overflow:hidden!important;}
  #game .v4-game-card{width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-width:3px!important;border-radius:12px!important;padding:4px!important;gap:4px!important;}
  #game #message{display:none!important;}
}
@media (max-width: 520px) and (orientation: portrait){
  body.game-active #game .v4-game-header{display:none!important;}
  body.game-active #game #message{display:none!important;}
  body.game-active #game .v4-gamebar{font-size:10px!important;gap:3px!important;padding:4px!important;}
  body.game-active #game .v4-control{font-size:10px!important;padding:4px 5px!important;}
}


/* ==== V4.0.5 GOLD MOBILE GAME MODE - FINAL OVERRIDES ==== */
/* Keep footer only on the homepage. */
body:not(.home-active) .site-footer{display:none!important;}
body.home-active .site-footer{display:flex!important;}

/* General responsive homepage guards. */
body.home-active{overflow-x:hidden!important;}
body.home-active .v4-page{
  min-height:calc(100dvh - 62px)!important;
  justify-content:flex-start!important;
}
body.home-active .v4-header img{max-width:100%;height:auto!important;}
@media (max-width: 700px){
  body.home-active .v4-page{padding:0 10px 8px!important;}
  body.home-active .menu-grid{grid-template-columns:1fr!important;width:min(430px,92vw)!important;gap:12px!important;}
  body.home-active .game-tile{height:82px!important;font-size:clamp(20px,6vw,28px)!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;padding:8px 16px!important;}
  body.home-active .game-tile .tile-icon{display:none!important;}
  body.home-active .tagline-bottom{font-size:clamp(20px,6vw,28px)!important;margin:12px 0 8px!important;}
  body.home-active .site-footer{font-size:12px!important;line-height:1.25!important;min-height:46px!important;padding:6px 8px!important;white-space:normal!important;}
}

/* Desktop/tablet game page: logo in normal position; no footer. */
body.game-active{overflow:hidden!important;}
body.game-active #game .v4-game-page{
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:100dvh!important;
  overflow:hidden!important;
}

/* True phone gameplay: no top bar/header/logo; maze uses the full screen. */
body.mobile-game-mode,
body.mobile-game-mode html{
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#000!important;
  touch-action:none!important;
  overscroll-behavior:none!important;
}
body.mobile-game-mode #app,
body.mobile-game-mode #game,
body.mobile-game-mode #game .v4-game-page{
  width:100dvw!important;
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:100dvh!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
  background:#000!important;
}
body.mobile-game-mode #game .v4-game-header,
body.mobile-game-mode #game #message{
  display:none!important;
}
body.mobile-game-mode #game .v4-game-card{
  position:relative!important;
  width:100dvw!important;
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:100dvh!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#000!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
/* No mobile top bar: turn desktop controls into small overlays without taking layout space. */
body.mobile-game-mode #game .v4-gamebar{
  position:absolute!important;
  inset:0!important;
  z-index:50!important;
  width:100%!important;
  height:100%!important;
  display:block!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  pointer-events:none!important;
}
body.mobile-game-mode #game .v4-gamebar strong{
  display:none!important;
}
body.mobile-game-mode #game .v4-gamebar .v4-control{
  position:absolute!important;
  z-index:60!important;
  pointer-events:auto!important;
  border:2px solid rgba(255,255,255,.92)!important;
  border-radius:10px!important;
  background:rgba(0,0,0,.68)!important;
  color:#fff!important;
  box-shadow:0 2px 8px rgba(0,0,0,.55)!important;
  font-size:12px!important;
  line-height:1!important;
  padding:7px 9px!important;
  min-width:auto!important;
  text-shadow:1px 1px 0 #000!important;
}
body.mobile-game-mode #game .v4-gamebar .v4-control[data-screen="home"]{
  top:calc(env(safe-area-inset-top,0px) + 6px)!important;
  left:calc(env(safe-area-inset-left,0px) + 6px)!important;
}
body.mobile-game-mode #game .v4-gamebar #restartBtn{
  top:calc(env(safe-area-inset-top,0px) + 6px)!important;
  right:calc(env(safe-area-inset-right,0px) + 6px)!important;
}
body.mobile-game-mode #game .v4-gamebar #fullscreenBtn{
  right:calc(env(safe-area-inset-right,0px) + 6px)!important;
  bottom:calc(env(safe-area-inset-bottom,0px) + 6px)!important;
}
body.mobile-game-mode #maze{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100dvw!important;
  max-height:100dvh!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#fff!important;
  touch-action:none!important;
}
/* In portrait, still use the full available screen but keep a small rotate hint possibility via title/message hidden. */
@media (orientation:portrait) and (max-width:760px){
  body.mobile-game-mode #game .v4-gamebar .v4-control{font-size:11px!important;padding:6px 8px!important;}
}


/* Version 4.0.1 Professional Edition */
.site-footer, .site-footer span, .site-footer strong, .site-footer a, .site-footer button{
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}
.site-footer a, .site-footer button.footer-nav{
  color:#ffe600;
  text-decoration:none;
}
.site-footer button.footer-nav{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  cursor:pointer;
  text-shadow:inherit;
}
.site-footer a:hover, .site-footer button.footer-nav:hover{
  text-decoration:underline;
}
.policy-panel a{color:#ffe600;}
.cookie-banner{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  width:min(920px,calc(100vw - 24px));
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:16px;
  background:linear-gradient(145deg,#1b1b1b,#050505);
  border:4px solid #d60000;
  border-radius:18px;
  box-shadow:0 12px 34px rgba(0,0,0,.85),0 0 0 3px #420000;
  font-family:Arial,sans-serif;
}
.cookie-banner[hidden]{display:none!important;}
.cookie-copy{display:flex;flex-direction:column;gap:4px;font-size:15px;line-height:1.35;}
.cookie-copy strong{font-family:"Arial Black",Impact,Arial,sans-serif;color:#ffd400;font-size:18px;}
.cookie-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.cookie-actions .v4-control{white-space:nowrap;font-size:13px;padding:8px 10px;}
@media(max-width:700px){
  .cookie-banner{flex-direction:column;align-items:stretch;bottom:10px;}
  .cookie-actions{justify-content:center;}
}
