/* games.css — how the 12 games look on phones and laptops */
.g-banner { font-weight: 800; text-align: center; padding: 8px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); margin-bottom: 10px; font-size: 1rem; }
.g-banner.warn { background: #FFE3EC; border-color: #FFB3C9; color: #A3204E; }
.g-grid { display: grid; gap: 8px; margin: 0 auto; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; }
.dot.y { background: #F4B63F; } .dot.g { background: #46A86B; }
.pad { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 56px); gap: 8px; justify-content: center; margin-top: 12px; }
.padbtn { background: #fff; border-radius: 16px; font-size: 1.6rem; font-weight: 900; box-shadow: 0 4px 0 var(--line); color: var(--accent); touch-action: manipulation; }
.padbtn:active { transform: translateY(3px); box-shadow: none; }
.pad .p0 { grid-column: 2; grid-row: 1; } .pad .p3 { grid-column: 1; grid-row: 2; } .pad .p2 { grid-column: 2; grid-row: 2; } .pad .p1 { grid-column: 3; grid-row: 2; }

/* In Order */
.o-cell { background: #fff; border-radius: 14px; box-shadow: 0 4px 0 var(--line); font-weight: 900; font-size: 1.4rem; color: #fff; transition: background .12s, transform .12s; }
.o-cell.lit { background: var(--memory); transform: scale(1.06); box-shadow: 0 0 0 6px rgba(123,92,214,.25); }
.o-cell.picked { background: #9C86E8; }
.o-cell.answer { background: #F3B23A; color: #17324D; }

/* Card Pairs */
.pairs { gap: 8px; }
.p-card { position: relative; border-radius: 14px; perspective: 600px; background: none; padding: 0; }
.p-card span { position: absolute; inset: 0; border-radius: 14px; display: grid; place-items: center; backface-visibility: hidden; transition: transform .3s; }
.p-card .back { background: linear-gradient(135deg, var(--memory), #A48BF0); box-shadow: 0 4px 0 #5B40B0; }
.p-card .back::after { content: "☁"; color: rgba(255,255,255,.85); font-size: 1.6rem; }
.p-card .face { background: #fff; transform: rotateY(180deg); font-size: 2rem; box-shadow: 0 4px 0 var(--line); }
.p-card.up .back { transform: rotateY(180deg); } .p-card.up .face { transform: rotateY(0); }
.p-card.done .face { background: #E3F6EA; box-shadow: 0 4px 0 #A9DDBA; }

/* Sliding Puzzle */
.slide { gap: 8px; }
.s-tile { border-radius: 16px; font-size: 2.4rem; font-weight: 900; color: #fff; background: linear-gradient(160deg, #4B92DE, var(--reasoning)); box-shadow: 0 6px 0 #1E558F; }
.s-tile.home { background: linear-gradient(160deg, #4CC28A, #2E9E6B); box-shadow: 0 6px 0 #1E6E48; }
.s-gap { background: rgba(23,50,77,.06); border-radius: 16px; }
.s-goal { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 12px; font-weight: 800; color: var(--muted); }
.s-goal div { display: grid; grid-template-columns: repeat(3, 18px); gap: 2px; }
.s-goal b { background: #fff; border-radius: 4px; font-size: .7rem; text-align: center; }

/* Water Pipes */
.pipes-wrap { display: grid; gap: 3px; justify-content: center; margin: 0 auto; background: #2B3A4D; padding: 8px; border-radius: 18px; box-shadow: inset 0 0 0 3px #1D2836; }
.p-tile { background: #3A4B60; border-radius: 8px; padding: 0; overflow: hidden; }
.p-tile.wet { background: #33506F; }
.p-tile svg { transition: transform .15s; display: block; }
.p-side { display: grid; place-items: center; font-size: 1.6rem; }

/* Ebb and Flow + Cloudy Flock */
.pond, .flock-sky { position: relative; margin: 0 auto; border-radius: 22px; overflow: hidden; touch-action: none; cursor: grab; }
.pond { background: radial-gradient(circle at 30% 30%, #4E8FCB, #1E4E7E); box-shadow: inset 0 0 40px rgba(0,0,0,.25); }
.pond::before { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 70% 60%, rgba(255,255,255,.06) 0 8px, transparent 8px 26px); }
.leaf { position: absolute; width: 58px; height: 29px; }
.leaf svg { display: block; }
.flock-sky { background: linear-gradient(180deg, #8EC8FF, #CFE8FF); }
.flock { position: absolute; left: 0; top: 0; }
.bird { position: absolute; }
.bird-in { position: relative; }
.bird-in .cloudy-av { width: 100%; height: 100%; }
.beak { position: absolute; width: 0; height: 0; border: 9px solid transparent; }
.b1 .beak { right: -9px; top: 52%; border-left: 13px solid #F2A33A; border-right: 0; transform: translateY(-50%); }
.b3 .beak { left: -9px; top: 52%; border-right: 13px solid #F2A33A; border-left: 0; transform: translateY(-50%); }
.b0 .beak { top: 2px; left: 50%; border-bottom: 13px solid #F2A33A; border-top: 0; transform: translateX(-50%); }
.b2 .beak { bottom: -6px; left: 50%; border-top: 13px solid #F2A33A; border-bottom: 0; transform: translateX(-50%); }

/* Mirror Maze */
.maze-box { position: relative; margin: 0 auto; width: max-content; touch-action: none; border-radius: 12px; transition: box-shadow .2s; }
.maze-box.mirror { box-shadow: 0 0 0 5px #FF8FC0; }
.maze-me { position: absolute; left: 2px; top: 2px; display: grid; place-items: center; transition: transform .09s; }

/* Tap the Star */
.stars { gap: 10px; }
.hole { aspect-ratio: 1; padding: 0; background: radial-gradient(circle at 50% 60%, #22364D 0 55%, #34506E 56%); border-radius: 50%; display: grid; place-items: center; touch-action: manipulation; }
.star { font-size: 3rem; line-height: 1; animation: popup .18s ease-out; }
.star.g { color: #FFC83D; text-shadow: 0 0 14px rgba(255,200,61,.8); }
.star.r { color: #E5484D; text-shadow: 0 0 10px rgba(229,72,77,.6); }
.burst { font-size: 2.2rem; animation: pop .3s; }
@keyframes popup { from { transform: translateY(40%) scale(.4); } }

/* Cloudle */
.w-board { display: grid; gap: 6px; justify-content: center; margin: 0 auto 10px; }
.w-row { display: flex; gap: 6px; }
.w-tile { border: 2px solid #C7D7E8; border-radius: 8px; display: grid; place-items: center; font-weight: 900; background: #fff; transition: background .25s, border-color .25s, color .25s; }
.w-tile.typed { border-color: #6A88A8; }
.cg { background: #3AA66A !important; border-color: #3AA66A !important; color: #fff; }
.cy { background: #E6B53A !important; border-color: #E6B53A !important; color: #fff; }
.cx { background: #8C9AAB !important; border-color: #8C9AAB !important; color: #fff; }
.w-kb { display: grid; gap: 6px; max-width: 520px; margin: 0 auto; }
.w-krow { display: flex; gap: 4px; justify-content: center; }
.w-key { flex: 1; max-width: 44px; height: 48px; border-radius: 8px; background: #fff; font-weight: 800; box-shadow: 0 2px 0 var(--line); font-size: .95rem; }
.w-key.wide { max-width: 68px; flex: 1.6; font-size: .72rem; }

/* Word Grid */
.wg { gap: 8px; user-select: none; }
.wg-tile { background: #fff; border-radius: 14px; display: grid; place-items: center; font-weight: 900; box-shadow: 0 4px 0 var(--line); color: var(--ink); }
.wg-tile.on { background: var(--language); color: #fff; box-shadow: 0 4px 0 #9C2F63; }
.wg-word { text-align: center; font-size: 1.8rem; font-weight: 900; letter-spacing: .08em; min-height: 2.4rem; color: var(--language); }
.wg-list { text-align: center; margin-top: 10px; color: var(--muted); font-weight: 700; max-height: 72px; overflow: auto; }

/* Quick Calc */
.c-q { text-align: center; font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 900; margin: 6px 0; }
.c-display { text-align: center; font-size: 2.2rem; font-weight: 900; background: #fff; border-radius: 16px; padding: 6px; max-width: 320px; margin: 0 auto 10px; border: 2px solid var(--line); min-height: 3.2rem; }
.c-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 340px; margin: 0 auto; }
.c-key { height: 58px; border-radius: 14px; background: #fff; font-size: 1.6rem; font-weight: 900; box-shadow: 0 4px 0 var(--line); touch-action: manipulation; }
.c-key.ok { grid-column: span 3; background: var(--math); color: #fff; box-shadow: 0 4px 0 #11626E; font-size: 1.3rem; }

/* SAT Sprint */
.sat-q { font-size: clamp(1.15rem, 4.6vw, 1.6rem); font-weight: 800; text-align: center; background: #fff; border-radius: 18px; padding: 18px; margin-bottom: 12px; border: 1px solid var(--line); }
.sat-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sat-tile { color: #fff; border-radius: 16px; min-height: 74px; font-size: 1.5rem; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 5px 0 rgba(0,0,0,.18); }
.sat-tile.dim { opacity: .3; } .sat-tile.right { outline: 5px solid var(--ink); }
.sat-note { text-align: center; margin-top: 10px; font-weight: 700; color: var(--muted); min-height: 1.4em; }
.a0 { background: var(--a0); } .a1 { background: var(--a1); } .a2 { background: var(--a2); } .a3 { background: var(--a3); }
