/* Line 98 — line-up-5 ball puzzle on a 9x9 grid, KidSafe Play pastel theme.
   All game rules are scoped under .gw so its generic class names (.btn, .pill, .app,
   .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:6px 0}
.gw .hud{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content: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);display:flex;align-items:center;gap:6px}
.gw .pill b{color:#ff7eb3}
.gw .next{display:inline-flex;gap:4px}
.gw .mini{width:16px;height:16px;border-radius:50%}

.gw .board-wrap{position:relative;max-width:100%}
.gw .grid{display:grid;gap:2px;background:#fffafd;border-radius:18px;padding:8px;box-shadow:0 12px 30px rgba(255,150,180,.25),inset 0 0 0 4px #fff}
.gw .cell{border-radius:8px;background:#fbeef6;display:flex;align-items:center;justify-content:center;cursor:pointer}
.gw .cell.target{background:#eafced}
.gw .ball{border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.18)}
.gw .ball.sel{animation:l98hop .45s ease-in-out infinite alternate}
@keyframes l98hop{from{transform:translateY(0) scale(1)}to{transform:translateY(-18%) scale(1.05)}}
.gw .cell.nopath{animation:l98flash .4s}
@keyframes l98flash{0%,100%{background:#fbeef6}50%{background:#ffd6d6}}
/* a line pops: the balls burst (scale up, spin a touch, fade) */
.gw .ball.pop{animation:l98pop .38s ease-out forwards;pointer-events:none}
@keyframes l98pop{0%{transform:scale(1) rotate(0)}45%{transform:scale(1.4) rotate(12deg);filter:brightness(1.4)}100%{transform:scale(.15) rotate(30deg);opacity:0}}
/* combo praise badge floating up over the board */
.gw .praise{position:absolute;left:50%;top:44%;z-index:5;pointer-events:none;white-space:nowrap;opacity:0;
  font-size:30px;font-weight:900;color:#ff4f9b;-webkit-text-stroke:1px #fff;text-shadow:0 2px 0 #fff,0 0 20px rgba(255,120,180,.8)}
.gw .praise.show{animation:l98praise 1.15s cubic-bezier(.2,.9,.3,1) forwards}
@keyframes l98praise{0%{opacity:0;transform:translate(-50%,-50%) scale(.4) rotate(-6deg)}
  20%{opacity:1;transform:translate(-50%,-58%) scale(1.18) rotate(3deg)}
  40%{transform:translate(-50%,-60%) scale(1) rotate(0)}
  100%{opacity:0;transform:translate(-50%,-86%) scale(1)}}

.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:18px;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 .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 .controls{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.gw .btn.ghost{color:#ff7eb3;background:#fff;border:2px solid #ffd0e3;box-shadow:0 4px 0 #ffd0e3}
.gw .btn.ghost.off{opacity:.55;filter:grayscale(.35)}
.gw .hint{margin:0;font-size:13px;color:#9a86ad;max-width:340px;text-align:center}

/* fullscreen: the shared helper centers the wrapper, which can clip the top controls when the
   game is taller than the screen — top-align it and let it scroll instead (more specific than
   fullscreen.css, split per-vendor so one unknown pseudo can't drop the whole rule). */
.game-page .gw:fullscreen{align-items:flex-start;overflow:auto;padding:10px 0}
.game-page .gw:-webkit-full-screen{align-items:flex-start;overflow:auto;padding:10px 0}
