/* Sliding Puzzle — canvas sliding-tile puzzle, KidSafe Play pastel theme.
   All rules are scoped under .gw so the generic class names (.pill, .btn, .opt,
   .hint, .app) 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:12px;padding:6px 0}
.gw .toggle{display:flex;gap:6px;background:#fff;padding:4px;border-radius:999px;box-shadow:0 4px 12px rgba(255,150,180,.18)}
.gw .opt{cursor:pointer;border:none;background:transparent;color:#9a86ad;padding:7px 16px;border-radius:999px;font-size:13.5px;font-weight:800}
.gw .opt.active{background:linear-gradient(180deg,#ffa9cf,#ff7eb3);color:#fff}
.gw .hud{display:flex;gap:10px;align-items:center}
.gw .pill{background:#fff;border:2px solid #ffe1ee;border-radius:999px;padding:6px 14px;font-size:14px;font-weight:800;color:#9a86ad;box-shadow:0 4px 12px rgba(255,150,180,.18)}
.gw .pill b{color:#ff7eb3}
.gw .peek{font-size:30px;line-height:1}
.gw .peek img{width:30px;height:30px;border-radius:6px;object-fit:cover;vertical-align:middle}

.gw .board-wrap{position:relative}
.gw canvas{display:block;border-radius:20px;background:#fffafd;box-shadow:0 12px 30px rgba(255,150,180,.25),inset 0 0 0 4px #fff;touch-action:none}

.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}
.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 .controls{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.gw .btn{cursor:pointer;border:none;display:inline-block;width:auto;padding:11px 24px;border-radius:999px;font-size:16px;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 .btn.ghost{color:#ff7eb3;background:#fff;border:2px solid #ffd0e3;box-shadow:0 4px 0 #ffd0e3}
.gw .hint{margin:0;font-size:13px;color:#9a86ad;text-align:center;line-height:1.5}

/* live camera modal (Take a Photo) */
.gw .cam{position:fixed;inset:0;z-index:50;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:rgba(45,32,55,.93);padding:20px}
.gw .cam[hidden]{display:none}
.gw .cam video{width:min(90vw,520px);max-height:68vh;border-radius:18px;background:#000;box-shadow:0 14px 34px rgba(0,0,0,.45)}
.gw .cam-bar{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
