/* Snake — canvas grid game, KidSafe Play pastel theme.
   Scoped under .gw so generic names (.app, .pill, .btn, .opt, .hint) don't clobber
   the site nav/buttons from head.php. The full-page html,body rules from the
   standalone version are dropped (the site owns <body>). The .game-* chrome
   matches the other game pages. */

.game-page{width:min(96vw,920px);margin:0 auto}
.game-head{display:flex;align-items:center;gap:14px;margin-bottom:18px}
.game-thumb{border-radius:16px;flex:none;box-shadow:0 6px 14px rgba(255,150,180,.25)}
.game-head h1{margin:0;font-size:26px;color:#5a4a6a;text-shadow:0 2px 0 #fff}
.game-head .sub{margin:2px 0 0;color:#9a86ad;font-size:14px}

.gw{user-select:none}
.gw *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
.gw .app{display:flex;flex-direction:column;align-items:center;gap:10px;padding:10px 0}
.gw .toggle{display:flex;gap:6px;background:#fff;padding:4px;border-radius:999px;box-shadow:0 4px 12px rgba(255,150,180,.18);flex-wrap:wrap;justify-content:center}
.gw .opt{cursor:pointer;border:none;background:transparent;color:#9a86ad;padding:7px 13px;border-radius:999px;font-size:13px;font-weight:800}
.gw .opt.active{background:linear-gradient(180deg,#ffa9cf,#ff7eb3);color:#fff}
.gw .hud{display:flex;gap:10px}
.gw .pill{background:#fff;border:2px solid #ffe1ee;border-radius:999px;padding:6px 16px;font-size:15px;font-weight:800;color:#9a86ad;box-shadow:0 4px 12px rgba(255,150,180,.18)}
.gw .pill b{color:#ff7eb3}
.gw .board-wrap{position:relative}
.gw canvas{display:block;border-radius:20px;background:#eafbf0;box-shadow:0 12px 30px rgba(255,150,180,.25),inset 0 0 0 4px #fff;touch-action:none}
.gw .dpad{display:flex;flex-direction:column;align-items:center;gap:6px}
.gw .dpad .mid{display:flex;gap:56px}
.gw .dbtn{width:56px;height:56px;border:none;border-radius:18px;cursor:pointer;font-size:22px;font-weight:900;color:#fff;background:linear-gradient(180deg,#ffa9cf,#ff7eb3);box-shadow:0 5px 0 #ef5e98;transition:transform .06s ease,box-shadow .06s ease}
.gw .dbtn:active{transform:translateY(3px);box-shadow:0 2px 0 #ef5e98}
.gw .overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.85);backdrop-filter:blur(4px);border-radius:20px;text-align:center;padding:18px;cursor:pointer}
.gw .overlay.hidden{display:none}
.gw .ovcard{display:flex;flex-direction:column;align-items:center;gap:12px;max-width:280px}
.gw .ovcard h2{margin:0;font-size:26px;color:#ff8fb1}
.gw .ovcard p{margin:0;font-size:14.5px;line-height:1.5}
.gw .btn{display:inline-block;width:auto;cursor:pointer;border:none;padding:12px 28px;border-radius:999px;font-size:17px;font-weight:800;color:#fff;background:linear-gradient(180deg,#ffa9cf,#ff7eb3);box-shadow:0 5px 0 #ef5e98}
.gw .btn:active{transform:translateY(3px);box-shadow:0 2px 0 #ef5e98}
.gw .hint{margin:0;font-size:12.5px;color:#9a86ad;text-align:center;max-width:340px}
