/* Rank 22 Shadow Switch — palace/void visual polish with accurate controls and contrast. */
:root {--switch-gold:#ffe4a0;--switch-violet:#ba91ff;--switch-light:#f8f4d9;}
#game-root {
  background:radial-gradient(ellipse at 50% 17%,#30204c,#090611 72%);
}
#game-canvas {
  border:1px solid rgba(232,195,255,.48);
  border-radius:14px;
  box-shadow:0 0 0 5px rgba(173,99,255,.05),0 18px 60px rgba(0,0,0,.63),0 0 26px rgba(169,101,255,.15);
}
#screen-title {
  background:linear-gradient(90deg,#d8ba7f 0 50%,#17112a 50% 100%);
  padding:max(46px,var(--ss-safe-t)) max(12px,var(--ss-safe-r)) max(15px,var(--ss-safe-b)) max(12px,var(--ss-safe-l));
  overflow-y:auto;overscroll-behavior:contain;
}
#screen-title::after {z-index:3;border-radius:999px;padding:7px 13px;font-size:11px}
#screen-title .title-card {
  position:relative;inset:auto;
  width:min(95vw,590px);max-width:590px;max-height:calc(100dvh - 65px);
  margin:auto;padding:clamp(19px,4vh,30px) clamp(18px,4vw,28px) 18px;
  border:1px solid rgba(255,231,163,.69);
  border-radius:23px;
  background:linear-gradient(140deg,rgba(22,16,46,.86),rgba(14,11,34,.94) 60%,rgba(26,14,43,.97));
  box-shadow:0 25px 65px rgba(0,0,0,.54),inset 0 1px rgba(255,255,255,.1);
  overflow-y:auto;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;
}
#screen-title .hero-art {
  width:calc(100% + 2px);height:clamp(120px,22vh,200px);flex:none;
  border-radius:16px;border:1px solid rgba(255,221,136,.19);
  background:
    linear-gradient(to bottom,transparent 54%,rgba(14,11,34,.85) 100%),
    url('/assets/game-thumbnails/reviewed-20260930/shadow-switch.webp') center / cover no-repeat;
}
#screen-title h1,#screen-title .game-title {
  position:static;transform:none;
  display:block;
  width:100%;max-width:none;margin:0!important;
  color:#fff1c1!important;
  font:900 clamp(24px,6.4vw,47px)/1.2 'Press Start 2P',monospace!important;
  letter-spacing:-.08em!important;
  text-align:center;
  text-shadow:0 0 23px rgba(237,192,91,.29),3px 3px 0 #43204c!important;
}
#screen-title .subtitle {
  position:static;transform:none;
  width:100%;max-width:490px;padding:0;border:0;
  margin:0!important;background:none;
  text-align:center;color:#e1d2ed;
  font-size:13px;line-height:1.5;
}
#screen-title .mode-chips {
  display:flex;justify-content:center;gap:6px;flex-wrap:wrap;width:100%;
}
#screen-title .mode-chips span {
  font:900 9px/1.25 Nunito,sans-serif;
  letter-spacing:.07em;color:#efdefb;background:rgba(135,92,195,.19);
  border:1px solid rgba(196,142,240,.3);border-radius:8px;padding:6px 8px;
}
#screen-title .menu-buttons {
  position:static;left:auto;bottom:auto;transform:none;width:100%;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:3px 0;
}
#screen-title .btn-pixel {
  min-height:50px;padding:10px 12px;border:1px solid rgba(237,198,141,.33)!important;
  border-radius:12px!important;
  background:rgba(110,73,145,.37)!important;color:#f8e7ff!important;
  box-shadow:0 5px 18px rgba(0,0,0,.24)!important;
  font:900 clamp(10px,2.4vw,13px)/1.4 Nunito,sans-serif!important;
}
#screen-title .btn-primary {
  grid-column:1/-1;min-height:55px;
  background:linear-gradient(100deg,#f9e9ae,#f5c77a 50%,#cbadff 100%)!important;
  color:#291732!important;border-color:#f9e7b4!important;
  text-shadow:none!important;
}
#screen-title .title-footer {
  position:static;left:auto;right:auto;bottom:auto;
  width:100%;margin:7px 0 0;padding-top:9px;
  border-top:1px solid rgba(218,178,249,.17);
  font-size:11px;color:#d2bedf;text-shadow:none;
}
#screen-title .title-footer .btn-pixel {min-width:44px;min-height:44px}
#screen-howto,#screen-levels,#screen-pause,#screen-result {
  overflow-y:auto;overscroll-behavior:contain;
  background:rgba(8,5,20,.87);backdrop-filter:blur(7px);
}
#screen-howto .panel-card,#screen-levels .panel-card,#screen-pause .panel-card,#screen-result .panel-card {
  background:linear-gradient(145deg,#312049,#140f2c 70%,#1e1130)!important;
  color:#f6ebff!important;
  border:1px solid rgba(231,190,255,.48)!important;
  border-radius:19px!important;
  padding:clamp(17px,4vw,29px)!important;
  box-shadow:0 22px 58px rgba(0,0,0,.61)!important;
  overflow-y:auto;text-align:center!important;
}
#screen-howto .howto-list {color:#e4d8ef}
#screen-howto .howto-list strong {color:#ffe4a0}
#screen-howto h2,#screen-levels h2,#screen-pause h2,#screen-result h2 {color:#ffe4a0!important}
.chapter-tabs {overflow-x:auto;flex-wrap:nowrap;justify-content:flex-start;min-height:48px;}
.chapter-tab {flex:none;min-height:44px;max-width:200px;white-space:normal;}
.chapter-tab.active {background:#c8a6ff;color:#1d1531}
.level-grid {max-height:min(45dvh,380px);overflow-y:auto;gap:7px;}
.level-tile {
  min-width:0;min-height:47px;color:#f7eaff;
  background:rgba(99,70,148,.39);
  border:1px solid rgba(204,160,249,.4);border-radius:10px;
  font:900 13px Nunito,sans-serif;
}
.level-tile:disabled {opacity:.38;cursor:not-allowed;}
.hud-top,.hud-mid {gap:6px;}
.hud-title {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.hud-chip,.world-badge,.icon-btn {
  border-radius:10px;min-height:35px;
  background:rgba(18,11,40,.9);
}
.icon-btn {width:44px;height:44px;min-width:44px;min-height:44px;}
.tc-btn {min-width:51px;min-height:51px;}
button:focus-visible,a:focus-visible{outline:3px solid #ffe697;outline-offset:3px}
@media(max-width:680px) {
  #screen-title .title-card{min-height:0;max-height:calc(100dvh - 73px);padding:13px 15px;}
  #screen-title .hero-art{height:clamp(100px,17vh,150px);}
  #screen-title h1,#screen-title .game-title{font-size:clamp(21px,6.9vw,34px)!important;line-height:1.27!important;}
  #screen-title .subtitle{font-size:12px;}
  #screen-title .btn-pixel{min-height:46px;font-size:11px!important;}
  #screen-title .mode-chips{gap:4px;}
  #screen-title .mode-chips span{font-size:8px;padding:5px;}
}
@media(max-height:550px) and (orientation:landscape) {
  #screen-title .title-card{max-width:760px;flex-direction:row;flex-wrap:wrap;gap:7px;padding:10px;}
  #screen-title .hero-art{width:36%;height:130px;}
  #screen-title .game-title{width:55%!important;font-size:clamp(17px,3.4vw,26px)!important;}
  #screen-title .subtitle,#screen-title .mode-chips {display:none}
  #screen-title .menu-buttons{max-width:100%;grid-template-columns:repeat(3,1fr)}
  #screen-title .btn-primary{grid-column:auto}
  #screen-title .title-footer{display:none}
}
@media(prefers-reduced-motion:reduce){.screen,.tc-btn,.hero-art{transition:none!important;animation:none!important}}
